@ishlabs/cli 0.19.0 → 0.21.0
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/dist/commands/ask.js +26 -2
- package/dist/commands/config.js +9 -1
- package/dist/commands/docs.js +6 -7
- package/dist/commands/person.js +123 -9
- package/dist/commands/secret.js +25 -2
- package/dist/commands/source.d.ts +1 -1
- package/dist/commands/source.js +10 -6
- package/dist/commands/study.js +269 -13
- package/dist/commands/workspace.js +41 -6
- package/dist/index.js +227 -44
- package/dist/lib/alias-store.d.ts +1 -0
- package/dist/lib/alias-store.js +25 -4
- package/dist/lib/auth.js +22 -4
- package/dist/lib/baggage.d.ts +15 -6
- package/dist/lib/baggage.js +14 -8
- package/dist/lib/command-helpers.d.ts +1 -0
- package/dist/lib/command-helpers.js +79 -7
- package/dist/lib/docs.js +400 -21
- package/dist/lib/output.d.ts +18 -0
- package/dist/lib/output.js +278 -18
- package/dist/lib/profile-sources.js +18 -0
- package/dist/lib/skill-content.js +78 -2
- package/dist/lib/study-participants.d.ts +13 -0
- package/dist/lib/study-participants.js +13 -0
- package/dist/lib/study-results-filters.d.ts +91 -0
- package/dist/lib/study-results-filters.js +538 -0
- package/dist/lib/study-results-projections.d.ts +122 -0
- package/dist/lib/study-results-projections.js +577 -0
- package/dist/upgrade.js +9 -2
- package/package.json +1 -1
package/dist/upgrade.js
CHANGED
|
@@ -32,11 +32,18 @@ export async function upgrade(currentVersion, targetVersion) {
|
|
|
32
32
|
const scriptUrl = import.meta.url;
|
|
33
33
|
const runningFromNodeModules = scriptUrl.includes("/node_modules/");
|
|
34
34
|
if (looksLikeNode || runningFromNodeModules) {
|
|
35
|
-
|
|
35
|
+
// Pattern C: tag as ValidationError so exitCodeFromError maps to 2
|
|
36
|
+
// (usage_error). Otherwise this would fall through to the generic
|
|
37
|
+
// exit 1 even with the wrapper in place (ISSUE-012).
|
|
38
|
+
const err = new Error("Cannot self-upgrade an npm-installed CLI (would overwrite the node binary). " +
|
|
36
39
|
"Run `npm install -g @ishlabs/cli@latest` instead.");
|
|
40
|
+
err.name = "ValidationError";
|
|
41
|
+
throw err;
|
|
37
42
|
}
|
|
38
43
|
if (targetVersion && !/^\d+\.\d+\.\d+/.test(targetVersion)) {
|
|
39
|
-
|
|
44
|
+
const err = new Error(`Invalid version format: ${targetVersion}`);
|
|
45
|
+
err.name = "ValidationError";
|
|
46
|
+
throw err;
|
|
40
47
|
}
|
|
41
48
|
const latest = targetVersion || (await getLatestVersion());
|
|
42
49
|
if (latest === currentVersion) {
|