Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cli use axios replace fetch #3741

Merged
merged 2 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
const { Command } = require('commander')
const program = new Command()
const { version } = require('./package.json')
const axios = require('axios')


const pluginPkgPath = (pluginRepo) => {
Expand All @@ -31,8 +32,8 @@
.description('manage elizaOS plugins')

async function getPlugins() {
const resp = await fetch('https://raw.githubusercontent.com/elizaos-plugins/registry/refs/heads/main/index.json')
return await resp.json();
const resp = await axios.get('https://raw.githubusercontent.com/elizaos-plugins/registry/refs/heads/main/index.json')
return resp.data;
}


Expand Down Expand Up @@ -104,7 +105,7 @@
if (!fs.existsSync(pkgPath + '/package.json')) {
// clone it
console.log('cloning', namePart, 'to', pkgPath)
const gitOutput = execSync('git clone https://github.com/' + repo + ' "' + pkgPath + '"', { stdio: 'pipe' }).toString().trim();

Check failure

Code scanning / CodeQL

Uncontrolled command line Critical

This command line depends on a
user-provided value
.
// submodule init & update?
}

Expand Down
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"license": "ISC",
"description": "",
"dependencies": {
"axios": "^1.8.1",
"commander": "^13.1.0"
}
}
Loading