@botskill/cli 1.0.8 → 1.0.9
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/get.js +4 -1
package/package.json
CHANGED
package/src/commands/get.js
CHANGED
|
@@ -27,7 +27,10 @@ getCommand
|
|
|
27
27
|
.option('--api-url <url>', 'API base URL (overrides config for this command)')
|
|
28
28
|
.action(async (specifier, options, command) => {
|
|
29
29
|
const apiUrl = command.optsWithGlobals().apiUrl;
|
|
30
|
-
const
|
|
30
|
+
const spec = (specifier || '').trim();
|
|
31
|
+
const parsed = parseSpecifier(spec);
|
|
32
|
+
const name = spec.startsWith('@') ? spec : parsed.name;
|
|
33
|
+
const version = spec.startsWith('@') ? undefined : parsed.version;
|
|
31
34
|
const outputDir = path.resolve(options.output || process.cwd());
|
|
32
35
|
|
|
33
36
|
if (!name) {
|