rushangle-cli 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/install.js +2 -2
package/package.json
CHANGED
package/src/commands/install.js
CHANGED
|
@@ -149,7 +149,7 @@ module.exports = new Command('install')
|
|
|
149
149
|
installDir = path.join(INSTALL_DIR, 'mcp', item.id);
|
|
150
150
|
fs.mkdirSync(installDir, { recursive: true });
|
|
151
151
|
if (item.code) {
|
|
152
|
-
const ext = item.language === 'python' ? '.py'
|
|
152
|
+
const ext = item.language === 'python' || item.language === 'py' ? '.py'
|
|
153
153
|
: item.language === 'javascript' ? '.js'
|
|
154
154
|
: item.language === 'typescript' ? '.ts'
|
|
155
155
|
: item.language === 'json' ? '.json'
|
|
@@ -206,7 +206,7 @@ module.exports = new Command('install')
|
|
|
206
206
|
installDir = path.join(INSTALL_DIR, 'code', item.id);
|
|
207
207
|
fs.mkdirSync(installDir, { recursive: true });
|
|
208
208
|
if (item.code) {
|
|
209
|
-
const extMap = { python: '.py', javascript: '.js', typescript: '.ts', go: '.go', rust: '.rs', java: '.java', c: '.c', cpp: '.cpp', shell: '.sh', bash: '.sh', json: '.json', yaml: '.yml', toml: '.toml', sql: '.sql', ruby: '.rb', php: '.php', swift: '.swift', kotlin: '.kt', scala: '.scala', r: '.r' };
|
|
209
|
+
const extMap = { python: '.py', py: '.py', javascript: '.js', typescript: '.ts', go: '.go', rust: '.rs', java: '.java', c: '.c', cpp: '.cpp', shell: '.sh', bash: '.sh', json: '.json', yaml: '.yml', toml: '.toml', sql: '.sql', ruby: '.rb', php: '.php', swift: '.swift', kotlin: '.kt', scala: '.scala', r: '.r' };
|
|
210
210
|
const ext = extMap[item.language] || `.${item.language}` || '.txt';
|
|
211
211
|
fs.writeFileSync(path.join(installDir, `snippet${ext}`), item.code);
|
|
212
212
|
}
|