@locusai/cli 0.21.8 → 0.21.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/bin/locus.js +18 -7
- package/package.json +2 -2
package/bin/locus.js
CHANGED
|
@@ -2277,19 +2277,26 @@ function saveRegistry(registry) {
|
|
|
2277
2277
|
}
|
|
2278
2278
|
function resolvePackageBinary(packageName) {
|
|
2279
2279
|
const fullName = normalizePackageName(packageName);
|
|
2280
|
-
const
|
|
2280
|
+
const binName = fullName.includes("/") ? fullName.split("/").pop() : fullName;
|
|
2281
|
+
const binPath = join7(getPackagesDir(), "node_modules", ".bin", binName);
|
|
2281
2282
|
return existsSync7(binPath) ? binPath : null;
|
|
2282
2283
|
}
|
|
2283
2284
|
function normalizePackageName(input) {
|
|
2284
|
-
if (input.startsWith(
|
|
2285
|
+
if (input.startsWith(SCOPED_PREFIX)) {
|
|
2285
2286
|
return input;
|
|
2286
2287
|
}
|
|
2287
|
-
|
|
2288
|
-
|
|
2288
|
+
return `${SCOPED_PREFIX}${input}`;
|
|
2289
|
+
}
|
|
2290
|
+
function extractShortName(packageName) {
|
|
2291
|
+
if (packageName.startsWith(SCOPED_PREFIX)) {
|
|
2292
|
+
return packageName.slice(SCOPED_PREFIX.length);
|
|
2289
2293
|
}
|
|
2290
|
-
return
|
|
2294
|
+
return packageName;
|
|
2291
2295
|
}
|
|
2292
|
-
var
|
|
2296
|
+
var PACKAGE_SCOPE = "@locusai", SCOPED_PREFIX;
|
|
2297
|
+
var init_registry = __esm(() => {
|
|
2298
|
+
SCOPED_PREFIX = `${PACKAGE_SCOPE}/locus-`;
|
|
2299
|
+
});
|
|
2293
2300
|
|
|
2294
2301
|
// src/commands/pkg.ts
|
|
2295
2302
|
var exports_pkg = {};
|
|
@@ -2316,6 +2323,7 @@ ${bold2("Installed packages:")}
|
|
|
2316
2323
|
for (const entry of entries) {
|
|
2317
2324
|
const { name, version, manifest } = entry;
|
|
2318
2325
|
const displayName = manifest.displayName || name;
|
|
2326
|
+
const shortName = extractShortName(name);
|
|
2319
2327
|
process.stderr.write(` ${bold2(cyan2(displayName))} ${dim2(`v${version}`)}
|
|
2320
2328
|
`);
|
|
2321
2329
|
if (manifest.description) {
|
|
@@ -2326,7 +2334,7 @@ ${bold2("Installed packages:")}
|
|
|
2326
2334
|
process.stderr.write(` Commands: ${manifest.commands.map((c) => green(c)).join(", ")}
|
|
2327
2335
|
`);
|
|
2328
2336
|
}
|
|
2329
|
-
process.stderr.write(` Run: ${bold2(`locus pkg ${
|
|
2337
|
+
process.stderr.write(` Run: ${bold2(`locus pkg ${shortName} --help`)}
|
|
2330
2338
|
`);
|
|
2331
2339
|
process.stderr.write(`
|
|
2332
2340
|
`);
|
|
@@ -2631,6 +2639,7 @@ ${yellow2("⚠")} No binary found for ${bold2(packageName)} in node_modules/.bi
|
|
|
2631
2639
|
registry.packages[packageName] = entry;
|
|
2632
2640
|
saveRegistry(registry);
|
|
2633
2641
|
const verb = existing ? "upgraded" : "installed";
|
|
2642
|
+
const shortName = extractShortName(packageName);
|
|
2634
2643
|
process.stderr.write(`
|
|
2635
2644
|
${green("✓")} Package ${verb} successfully!
|
|
2636
2645
|
|
|
@@ -2647,6 +2656,8 @@ ${green("✓")} Package ${verb} successfully!
|
|
|
2647
2656
|
process.stderr.write(` Binary: ${dim2(binaryPath)}
|
|
2648
2657
|
`);
|
|
2649
2658
|
}
|
|
2659
|
+
process.stderr.write(` Run: ${bold2(`locus pkg ${shortName} --help`)}
|
|
2660
|
+
`);
|
|
2650
2661
|
process.stderr.write(`
|
|
2651
2662
|
`);
|
|
2652
2663
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusai/cli",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.9",
|
|
4
4
|
"description": "GitHub-native AI engineering assistant",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"dependencies": {},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@locusai/sdk": "^0.21.
|
|
39
|
+
"@locusai/sdk": "^0.21.9",
|
|
40
40
|
"@types/bun": "latest",
|
|
41
41
|
"typescript": "^5.8.3"
|
|
42
42
|
},
|