@claude-collective/cli 0.2.0 → 0.6.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/CHANGELOG.md +113 -0
- package/README.md +1 -1
- package/dist/chunk-367K3JB3.js +84 -0
- package/dist/chunk-367K3JB3.js.map +1 -0
- package/dist/chunk-6ESUJMM7.js +54 -0
- package/dist/chunk-6ESUJMM7.js.map +1 -0
- package/dist/chunk-6OY6ZYQF.js +93 -0
- package/dist/chunk-6OY6ZYQF.js.map +1 -0
- package/dist/chunk-6WEQADPL.js +307 -0
- package/dist/chunk-6WEQADPL.js.map +1 -0
- package/dist/chunk-AU7XVCLO.js +91 -0
- package/dist/chunk-AU7XVCLO.js.map +1 -0
- package/dist/chunk-AZP2AA5M.js +425 -0
- package/dist/chunk-AZP2AA5M.js.map +1 -0
- package/dist/chunk-D4IQAT27.js +114 -0
- package/dist/chunk-D4IQAT27.js.map +1 -0
- package/dist/chunk-DHET7RCE.js +50 -0
- package/dist/chunk-DHET7RCE.js.map +1 -0
- package/dist/chunk-DHFFRMF6.js +31 -0
- package/dist/chunk-DHFFRMF6.js.map +1 -0
- package/dist/chunk-FKU7VSUD.js +453 -0
- package/dist/chunk-FKU7VSUD.js.map +1 -0
- package/dist/chunk-J2Y4A3LP.js +478 -0
- package/dist/chunk-J2Y4A3LP.js.map +1 -0
- package/dist/chunk-JMQGWQZU.js +607 -0
- package/dist/chunk-JMQGWQZU.js.map +1 -0
- package/dist/chunk-JY4RO76L.js +73 -0
- package/dist/chunk-JY4RO76L.js.map +1 -0
- package/dist/chunk-M7YCPFIX.js +108 -0
- package/dist/chunk-M7YCPFIX.js.map +1 -0
- package/dist/chunk-MJSFR562.js +57 -0
- package/dist/chunk-MJSFR562.js.map +1 -0
- package/dist/chunk-MMDXNZPF.js +69 -0
- package/dist/chunk-MMDXNZPF.js.map +1 -0
- package/dist/chunk-MYAVQ23U.js +356 -0
- package/dist/chunk-MYAVQ23U.js.map +1 -0
- package/dist/chunk-OSQDDJXX.js +146 -0
- package/dist/chunk-OSQDDJXX.js.map +1 -0
- package/dist/chunk-QESUUPOE.js +241 -0
- package/dist/chunk-QESUUPOE.js.map +1 -0
- package/dist/chunk-SJYG4EJZ.js +57 -0
- package/dist/chunk-SJYG4EJZ.js.map +1 -0
- package/dist/chunk-SYQ7R2JO.js +95 -0
- package/dist/chunk-SYQ7R2JO.js.map +1 -0
- package/dist/chunk-TD643KB3.js +245 -0
- package/dist/chunk-TD643KB3.js.map +1 -0
- package/dist/chunk-TFV6Z7F7.js +129 -0
- package/dist/chunk-TFV6Z7F7.js.map +1 -0
- package/dist/chunk-TGOHJCQ4.js +83 -0
- package/dist/chunk-TGOHJCQ4.js.map +1 -0
- package/dist/chunk-TOPAIL5W.js +22 -0
- package/dist/chunk-TOPAIL5W.js.map +1 -0
- package/dist/chunk-U4VYHKPM.js +110 -0
- package/dist/chunk-U4VYHKPM.js.map +1 -0
- package/dist/chunk-UFWNMW3G.js +392 -0
- package/dist/chunk-UFWNMW3G.js.map +1 -0
- package/dist/chunk-UNHCZRO4.js +64 -0
- package/dist/chunk-UNHCZRO4.js.map +1 -0
- package/dist/chunk-URDV4OCP.js +308 -0
- package/dist/chunk-URDV4OCP.js.map +1 -0
- package/dist/chunk-YI6JVSFO.js +43 -0
- package/dist/chunk-YI6JVSFO.js.map +1 -0
- package/dist/chunk-YNSNRR5D.js +184 -0
- package/dist/chunk-YNSNRR5D.js.map +1 -0
- package/dist/chunk-Z6DLWTBY.js +46 -0
- package/dist/chunk-Z6DLWTBY.js.map +1 -0
- package/dist/chunk-ZDQIUHAM.js +89 -0
- package/dist/chunk-ZDQIUHAM.js.map +1 -0
- package/dist/chunk-ZSKHDU5P.js +124 -0
- package/dist/chunk-ZSKHDU5P.js.map +1 -0
- package/dist/cli-v2/defaults/agent-mappings.yaml +185 -0
- package/dist/commands/build/marketplace.js +295 -0
- package/dist/commands/build/marketplace.js.map +1 -0
- package/dist/commands/build/plugins.js +362 -0
- package/dist/commands/build/plugins.js.map +1 -0
- package/dist/commands/build/stack.js +169 -0
- package/dist/commands/build/stack.js.map +1 -0
- package/dist/commands/compile.js +461 -0
- package/dist/commands/compile.js.map +1 -0
- package/dist/commands/config/get.js +60 -0
- package/dist/commands/config/get.js.map +1 -0
- package/dist/commands/config/index.js +22 -0
- package/dist/commands/config/index.js.map +1 -0
- package/dist/commands/config/path.js +35 -0
- package/dist/commands/config/path.js.map +1 -0
- package/dist/commands/config/set-project.js +61 -0
- package/dist/commands/config/set-project.js.map +1 -0
- package/dist/commands/config/set.js +60 -0
- package/dist/commands/config/set.js.map +1 -0
- package/dist/commands/config/show.js +13 -0
- package/dist/commands/config/show.js.map +1 -0
- package/dist/commands/config/unset-project.js +57 -0
- package/dist/commands/config/unset-project.js.map +1 -0
- package/dist/commands/config/unset.js +56 -0
- package/dist/commands/config/unset.js.map +1 -0
- package/dist/commands/diff.js +755 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/doctor.js +413 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/edit.js +253 -0
- package/dist/commands/edit.js.map +1 -0
- package/dist/commands/eject.js +208 -0
- package/dist/commands/eject.js.map +1 -0
- package/dist/commands/info.js +205 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init.js +914 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.js +44 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/new/agent.js +230 -0
- package/dist/commands/new/agent.js.map +1 -0
- package/dist/commands/new/skill.js +204 -0
- package/dist/commands/new/skill.js.map +1 -0
- package/dist/commands/outdated.js +242 -0
- package/dist/commands/outdated.js.map +1 -0
- package/dist/commands/search.js +115 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/test-imports.js +92 -0
- package/dist/commands/test-imports.js.map +1 -0
- package/dist/commands/uninstall.js +302 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.js +428 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/validate.js +375 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/commands/version/bump.js +95 -0
- package/dist/commands/version/bump.js.map +1 -0
- package/dist/commands/version/index.js +70 -0
- package/dist/commands/version/index.js.map +1 -0
- package/dist/commands/version/set.js +101 -0
- package/dist/commands/version/set.js.map +1 -0
- package/dist/commands/version/show.js +70 -0
- package/dist/commands/version/show.js.map +1 -0
- package/dist/components/common/confirm.js +9 -0
- package/dist/components/common/confirm.js.map +1 -0
- package/dist/components/common/message.js +24 -0
- package/dist/components/common/message.js.map +1 -0
- package/dist/components/common/spinner.js +14 -0
- package/dist/components/common/spinner.js.map +1 -0
- package/dist/components/wizard/selection-header.js +11 -0
- package/dist/components/wizard/selection-header.js.map +1 -0
- package/dist/components/wizard/step-approach.js +11 -0
- package/dist/components/wizard/step-approach.js.map +1 -0
- package/dist/components/wizard/step-category.js +12 -0
- package/dist/components/wizard/step-category.js.map +1 -0
- package/dist/components/wizard/step-confirm.js +12 -0
- package/dist/components/wizard/step-confirm.js.map +1 -0
- package/dist/components/wizard/step-stack.js +11 -0
- package/dist/components/wizard/step-stack.js.map +1 -0
- package/dist/components/wizard/step-subcategory.js +13 -0
- package/dist/components/wizard/step-subcategory.js.map +1 -0
- package/dist/components/wizard/wizard.js +19 -0
- package/dist/components/wizard/wizard.js.map +1 -0
- package/dist/hooks/init.js +41 -0
- package/dist/hooks/init.js.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/magic-string.es-RGXYGAW3.js +1316 -0
- package/dist/magic-string.es-RGXYGAW3.js.map +1 -0
- package/dist/stores/wizard-store.js +10 -0
- package/dist/stores/wizard-store.js.map +1 -0
- package/dist/stores/wizard-store.test.js +15991 -0
- package/dist/stores/wizard-store.test.js.map +1 -0
- package/package.json +44 -25
- package/dist/cli/index.js +0 -6314
- package/dist/cli/index.js.map +0 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
PLUGIN_MANIFEST_DIR,
|
|
4
|
+
PLUGIN_MANIFEST_FILE
|
|
5
|
+
} from "../../chunk-SJYG4EJZ.js";
|
|
6
|
+
import {
|
|
7
|
+
BaseCommand,
|
|
8
|
+
EXIT_CODES
|
|
9
|
+
} from "../../chunk-SYQ7R2JO.js";
|
|
10
|
+
import {
|
|
11
|
+
fileExists,
|
|
12
|
+
readFile,
|
|
13
|
+
writeFile
|
|
14
|
+
} from "../../chunk-MMDXNZPF.js";
|
|
15
|
+
import {
|
|
16
|
+
init_esm_shims
|
|
17
|
+
} from "../../chunk-DHET7RCE.js";
|
|
18
|
+
|
|
19
|
+
// src/cli-v2/commands/version/set.ts
|
|
20
|
+
init_esm_shims();
|
|
21
|
+
import { Args } from "@oclif/core";
|
|
22
|
+
import path from "path";
|
|
23
|
+
var SEMVER_REGEX = /^(\d+)\.(\d+)\.(\d+)$/;
|
|
24
|
+
async function findPluginManifest(startDir) {
|
|
25
|
+
let currentDir = startDir;
|
|
26
|
+
const root = path.parse(currentDir).root;
|
|
27
|
+
while (currentDir !== root) {
|
|
28
|
+
const manifestPath = path.join(
|
|
29
|
+
currentDir,
|
|
30
|
+
PLUGIN_MANIFEST_DIR,
|
|
31
|
+
PLUGIN_MANIFEST_FILE
|
|
32
|
+
);
|
|
33
|
+
if (await fileExists(manifestPath)) {
|
|
34
|
+
return manifestPath;
|
|
35
|
+
}
|
|
36
|
+
currentDir = path.dirname(currentDir);
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
function isValidSemver(version) {
|
|
41
|
+
return SEMVER_REGEX.test(version);
|
|
42
|
+
}
|
|
43
|
+
var VersionSet = class _VersionSet extends BaseCommand {
|
|
44
|
+
static summary = "Set plugin version to a specific value";
|
|
45
|
+
static description = "Set the plugin version to an explicit semantic version (e.g., 1.2.3).";
|
|
46
|
+
static args = {
|
|
47
|
+
version: Args.string({
|
|
48
|
+
description: "Version to set (semantic version format: X.Y.Z)",
|
|
49
|
+
required: true
|
|
50
|
+
})
|
|
51
|
+
};
|
|
52
|
+
static flags = {
|
|
53
|
+
...BaseCommand.baseFlags
|
|
54
|
+
};
|
|
55
|
+
static examples = [
|
|
56
|
+
"<%= config.bin %> <%= command.id %> 1.0.0",
|
|
57
|
+
"<%= config.bin %> <%= command.id %> 2.1.3",
|
|
58
|
+
"<%= config.bin %> <%= command.id %> 1.0.0 --dry-run"
|
|
59
|
+
];
|
|
60
|
+
async run() {
|
|
61
|
+
const { args, flags } = await this.parse(_VersionSet);
|
|
62
|
+
const newVersion = args.version;
|
|
63
|
+
if (!isValidSemver(newVersion)) {
|
|
64
|
+
this.error(
|
|
65
|
+
`Invalid version format: "${newVersion}". Must be semantic version (e.g., 1.0.0)`,
|
|
66
|
+
{ exit: EXIT_CODES.INVALID_ARGS }
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
const manifestPath = await findPluginManifest(process.cwd());
|
|
70
|
+
if (!manifestPath) {
|
|
71
|
+
this.error(
|
|
72
|
+
`No plugin.json found in current directory or parents
|
|
73
|
+
Expected location: ${PLUGIN_MANIFEST_DIR}/${PLUGIN_MANIFEST_FILE}`,
|
|
74
|
+
{ exit: EXIT_CODES.ERROR }
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
try {
|
|
78
|
+
const content = await readFile(manifestPath);
|
|
79
|
+
const manifest = JSON.parse(content);
|
|
80
|
+
const oldVersion = manifest.version || "1.0.0";
|
|
81
|
+
const pluginName = manifest.name || "unknown";
|
|
82
|
+
if (flags["dry-run"]) {
|
|
83
|
+
this.log(
|
|
84
|
+
`[DRY RUN] Would set ${pluginName} version: ${oldVersion} -> ${newVersion}`
|
|
85
|
+
);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
manifest.version = newVersion;
|
|
89
|
+
await writeFile(manifestPath, JSON.stringify(manifest, null, 2));
|
|
90
|
+
this.log(`${pluginName}: ${oldVersion} -> ${newVersion}`);
|
|
91
|
+
} catch (error) {
|
|
92
|
+
this.error(`Failed to set plugin version: ${error}`, {
|
|
93
|
+
exit: EXIT_CODES.ERROR
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
export {
|
|
99
|
+
VersionSet as default
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=set.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/cli-v2/commands/version/set.ts"],"sourcesContent":["/**\n * Set plugin version to a specific value.\n */\nimport { BaseCommand } from \"../../base-command.js\";\nimport { Args, Flags } from \"@oclif/core\";\nimport { EXIT_CODES } from \"../../lib/exit-codes.js\";\nimport path from \"path\";\nimport { PLUGIN_MANIFEST_DIR, PLUGIN_MANIFEST_FILE } from \"../../consts.js\";\nimport { fileExists, readFile, writeFile } from \"../../utils/fs.js\";\nimport type { PluginManifest } from \"../../../types.js\";\n\nconst SEMVER_REGEX = /^(\\d+)\\.(\\d+)\\.(\\d+)$/;\n\nasync function findPluginManifest(startDir: string): Promise<string | null> {\n let currentDir = startDir;\n const root = path.parse(currentDir).root;\n\n while (currentDir !== root) {\n const manifestPath = path.join(\n currentDir,\n PLUGIN_MANIFEST_DIR,\n PLUGIN_MANIFEST_FILE,\n );\n if (await fileExists(manifestPath)) {\n return manifestPath;\n }\n currentDir = path.dirname(currentDir);\n }\n\n return null;\n}\n\nfunction isValidSemver(version: string): boolean {\n return SEMVER_REGEX.test(version);\n}\n\nexport default class VersionSet extends BaseCommand {\n static summary = \"Set plugin version to a specific value\";\n static description =\n \"Set the plugin version to an explicit semantic version (e.g., 1.2.3).\";\n\n static args = {\n version: Args.string({\n description: \"Version to set (semantic version format: X.Y.Z)\",\n required: true,\n }),\n };\n\n static flags = {\n ...BaseCommand.baseFlags,\n };\n\n static examples = [\n \"<%= config.bin %> <%= command.id %> 1.0.0\",\n \"<%= config.bin %> <%= command.id %> 2.1.3\",\n \"<%= config.bin %> <%= command.id %> 1.0.0 --dry-run\",\n ];\n\n async run(): Promise<void> {\n const { args, flags } = await this.parse(VersionSet);\n const newVersion = args.version;\n\n // Validate semver format\n if (!isValidSemver(newVersion)) {\n this.error(\n `Invalid version format: \"${newVersion}\". Must be semantic version (e.g., 1.0.0)`,\n { exit: EXIT_CODES.INVALID_ARGS },\n );\n }\n\n const manifestPath = await findPluginManifest(process.cwd());\n\n if (!manifestPath) {\n this.error(\n `No plugin.json found in current directory or parents\\nExpected location: ${PLUGIN_MANIFEST_DIR}/${PLUGIN_MANIFEST_FILE}`,\n { exit: EXIT_CODES.ERROR },\n );\n }\n\n try {\n // Read current manifest\n const content = await readFile(manifestPath);\n const manifest = JSON.parse(content) as PluginManifest;\n const oldVersion = manifest.version || \"1.0.0\";\n const pluginName = manifest.name || \"unknown\";\n\n if (flags[\"dry-run\"]) {\n this.log(\n `[DRY RUN] Would set ${pluginName} version: ${oldVersion} -> ${newVersion}`,\n );\n return;\n }\n\n // Update and write manifest\n manifest.version = newVersion;\n await writeFile(manifestPath, JSON.stringify(manifest, null, 2));\n\n this.log(`${pluginName}: ${oldVersion} -> ${newVersion}`);\n } catch (error) {\n this.error(`Failed to set plugin version: ${error}`, {\n exit: EXIT_CODES.ERROR,\n });\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAIA,SAAS,YAAmB;AAE5B,OAAO,UAAU;AAKjB,IAAM,eAAe;AAErB,eAAe,mBAAmB,UAA0C;AAC1E,MAAI,aAAa;AACjB,QAAM,OAAO,KAAK,MAAM,UAAU,EAAE;AAEpC,SAAO,eAAe,MAAM;AAC1B,UAAM,eAAe,KAAK;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA,IACF;AACA,QAAI,MAAM,WAAW,YAAY,GAAG;AAClC,aAAO;AAAA,IACT;AACA,iBAAa,KAAK,QAAQ,UAAU;AAAA,EACtC;AAEA,SAAO;AACT;AAEA,SAAS,cAAc,SAA0B;AAC/C,SAAO,aAAa,KAAK,OAAO;AAClC;AAEA,IAAqB,aAArB,MAAqB,oBAAmB,YAAY;AAAA,EAClD,OAAO,UAAU;AAAA,EACjB,OAAO,cACL;AAAA,EAEF,OAAO,OAAO;AAAA,IACZ,SAAS,KAAK,OAAO;AAAA,MACnB,aAAa;AAAA,MACb,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AAAA,EAEA,OAAO,QAAQ;AAAA,IACb,GAAG,YAAY;AAAA,EACjB;AAAA,EAEA,OAAO,WAAW;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EAEA,MAAM,MAAqB;AACzB,UAAM,EAAE,MAAM,MAAM,IAAI,MAAM,KAAK,MAAM,WAAU;AACnD,UAAM,aAAa,KAAK;AAGxB,QAAI,CAAC,cAAc,UAAU,GAAG;AAC9B,WAAK;AAAA,QACH,4BAA4B,UAAU;AAAA,QACtC,EAAE,MAAM,WAAW,aAAa;AAAA,MAClC;AAAA,IACF;AAEA,UAAM,eAAe,MAAM,mBAAmB,QAAQ,IAAI,CAAC;AAE3D,QAAI,CAAC,cAAc;AACjB,WAAK;AAAA,QACH;AAAA,qBAA4E,mBAAmB,IAAI,oBAAoB;AAAA,QACvH,EAAE,MAAM,WAAW,MAAM;AAAA,MAC3B;AAAA,IACF;AAEA,QAAI;AAEF,YAAM,UAAU,MAAM,SAAS,YAAY;AAC3C,YAAM,WAAW,KAAK,MAAM,OAAO;AACnC,YAAM,aAAa,SAAS,WAAW;AACvC,YAAM,aAAa,SAAS,QAAQ;AAEpC,UAAI,MAAM,SAAS,GAAG;AACpB,aAAK;AAAA,UACH,uBAAuB,UAAU,aAAa,UAAU,OAAO,UAAU;AAAA,QAC3E;AACA;AAAA,MACF;AAGA,eAAS,UAAU;AACnB,YAAM,UAAU,cAAc,KAAK,UAAU,UAAU,MAAM,CAAC,CAAC;AAE/D,WAAK,IAAI,GAAG,UAAU,KAAK,UAAU,OAAO,UAAU,EAAE;AAAA,IAC1D,SAAS,OAAO;AACd,WAAK,MAAM,iCAAiC,KAAK,IAAI;AAAA,QACnD,MAAM,WAAW;AAAA,MACnB,CAAC;AAAA,IACH;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
getPluginVersion
|
|
4
|
+
} from "../../chunk-UNHCZRO4.js";
|
|
5
|
+
import {
|
|
6
|
+
PLUGIN_MANIFEST_DIR,
|
|
7
|
+
PLUGIN_MANIFEST_FILE
|
|
8
|
+
} from "../../chunk-SJYG4EJZ.js";
|
|
9
|
+
import {
|
|
10
|
+
BaseCommand,
|
|
11
|
+
EXIT_CODES
|
|
12
|
+
} from "../../chunk-SYQ7R2JO.js";
|
|
13
|
+
import {
|
|
14
|
+
fileExists
|
|
15
|
+
} from "../../chunk-MMDXNZPF.js";
|
|
16
|
+
import {
|
|
17
|
+
init_esm_shims
|
|
18
|
+
} from "../../chunk-DHET7RCE.js";
|
|
19
|
+
|
|
20
|
+
// src/cli-v2/commands/version/show.ts
|
|
21
|
+
init_esm_shims();
|
|
22
|
+
import path from "path";
|
|
23
|
+
async function findPluginManifest(startDir) {
|
|
24
|
+
let currentDir = startDir;
|
|
25
|
+
const root = path.parse(currentDir).root;
|
|
26
|
+
while (currentDir !== root) {
|
|
27
|
+
const manifestPath = path.join(
|
|
28
|
+
currentDir,
|
|
29
|
+
PLUGIN_MANIFEST_DIR,
|
|
30
|
+
PLUGIN_MANIFEST_FILE
|
|
31
|
+
);
|
|
32
|
+
if (await fileExists(manifestPath)) {
|
|
33
|
+
return manifestPath;
|
|
34
|
+
}
|
|
35
|
+
currentDir = path.dirname(currentDir);
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
var VersionShow = class _VersionShow extends BaseCommand {
|
|
40
|
+
static summary = "Show current plugin version";
|
|
41
|
+
static description = "Display the current version of the plugin in the current directory.";
|
|
42
|
+
static flags = {
|
|
43
|
+
...BaseCommand.baseFlags
|
|
44
|
+
};
|
|
45
|
+
static examples = ["<%= config.bin %> <%= command.id %>"];
|
|
46
|
+
async run() {
|
|
47
|
+
await this.parse(_VersionShow);
|
|
48
|
+
const manifestPath = await findPluginManifest(process.cwd());
|
|
49
|
+
if (!manifestPath) {
|
|
50
|
+
this.error(
|
|
51
|
+
`No plugin.json found in current directory or parents
|
|
52
|
+
Expected location: ${PLUGIN_MANIFEST_DIR}/${PLUGIN_MANIFEST_FILE}`,
|
|
53
|
+
{ exit: EXIT_CODES.ERROR }
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
const pluginDir = path.dirname(path.dirname(manifestPath));
|
|
57
|
+
try {
|
|
58
|
+
const version = await getPluginVersion(pluginDir);
|
|
59
|
+
this.log(version);
|
|
60
|
+
} catch (error) {
|
|
61
|
+
this.error(`Failed to read plugin version: ${error}`, {
|
|
62
|
+
exit: EXIT_CODES.ERROR
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
export {
|
|
68
|
+
VersionShow as default
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=show.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/cli-v2/commands/version/show.ts"],"sourcesContent":["/**\n * Show current plugin version.\n */\nimport { BaseCommand } from \"../../base-command.js\";\nimport { getPluginVersion } from \"../../lib/plugin-version.js\";\nimport { EXIT_CODES } from \"../../lib/exit-codes.js\";\nimport path from \"path\";\nimport { PLUGIN_MANIFEST_DIR, PLUGIN_MANIFEST_FILE } from \"../../consts.js\";\nimport { fileExists } from \"../../utils/fs.js\";\n\nasync function findPluginManifest(startDir: string): Promise<string | null> {\n let currentDir = startDir;\n const root = path.parse(currentDir).root;\n\n while (currentDir !== root) {\n const manifestPath = path.join(\n currentDir,\n PLUGIN_MANIFEST_DIR,\n PLUGIN_MANIFEST_FILE,\n );\n if (await fileExists(manifestPath)) {\n return manifestPath;\n }\n currentDir = path.dirname(currentDir);\n }\n\n return null;\n}\n\nexport default class VersionShow extends BaseCommand {\n static summary = \"Show current plugin version\";\n static description =\n \"Display the current version of the plugin in the current directory.\";\n\n static flags = {\n ...BaseCommand.baseFlags,\n };\n\n static examples = [\"<%= config.bin %> <%= command.id %>\"];\n\n async run(): Promise<void> {\n await this.parse(VersionShow);\n const manifestPath = await findPluginManifest(process.cwd());\n\n if (!manifestPath) {\n this.error(\n `No plugin.json found in current directory or parents\\nExpected location: ${PLUGIN_MANIFEST_DIR}/${PLUGIN_MANIFEST_FILE}`,\n { exit: EXIT_CODES.ERROR },\n );\n }\n\n const pluginDir = path.dirname(path.dirname(manifestPath));\n\n try {\n const version = await getPluginVersion(pluginDir);\n this.log(version);\n } catch (error) {\n this.error(`Failed to read plugin version: ${error}`, {\n exit: EXIT_CODES.ERROR,\n });\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAMA,OAAO,UAAU;AAIjB,eAAe,mBAAmB,UAA0C;AAC1E,MAAI,aAAa;AACjB,QAAM,OAAO,KAAK,MAAM,UAAU,EAAE;AAEpC,SAAO,eAAe,MAAM;AAC1B,UAAM,eAAe,KAAK;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA,IACF;AACA,QAAI,MAAM,WAAW,YAAY,GAAG;AAClC,aAAO;AAAA,IACT;AACA,iBAAa,KAAK,QAAQ,UAAU;AAAA,EACtC;AAEA,SAAO;AACT;AAEA,IAAqB,cAArB,MAAqB,qBAAoB,YAAY;AAAA,EACnD,OAAO,UAAU;AAAA,EACjB,OAAO,cACL;AAAA,EAEF,OAAO,QAAQ;AAAA,IACb,GAAG,YAAY;AAAA,EACjB;AAAA,EAEA,OAAO,WAAW,CAAC,qCAAqC;AAAA,EAExD,MAAM,MAAqB;AACzB,UAAM,KAAK,MAAM,YAAW;AAC5B,UAAM,eAAe,MAAM,mBAAmB,QAAQ,IAAI,CAAC;AAE3D,QAAI,CAAC,cAAc;AACjB,WAAK;AAAA,QACH;AAAA,qBAA4E,mBAAmB,IAAI,oBAAoB;AAAA,QACvH,EAAE,MAAM,WAAW,MAAM;AAAA,MAC3B;AAAA,IACF;AAEA,UAAM,YAAY,KAAK,QAAQ,KAAK,QAAQ,YAAY,CAAC;AAEzD,QAAI;AACF,YAAM,UAAU,MAAM,iBAAiB,SAAS;AAChD,WAAK,IAAI,OAAO;AAAA,IAClB,SAAS,OAAO;AACd,WAAK,MAAM,kCAAkC,KAAK,IAAI;AAAA,QACpD,MAAM,WAAW;AAAA,MACnB,CAAC;AAAA,IACH;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "../../chunk-DHET7RCE.js";
|
|
5
|
+
|
|
6
|
+
// src/cli-v2/components/common/message.tsx
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
import { Alert } from "@inkjs/ui";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var InfoMessage = ({ children }) => /* @__PURE__ */ jsx(Alert, { variant: "info", children });
|
|
11
|
+
var WarningMessage = ({
|
|
12
|
+
children
|
|
13
|
+
}) => /* @__PURE__ */ jsx(Alert, { variant: "warning", children });
|
|
14
|
+
var ErrorMessage = ({ children }) => /* @__PURE__ */ jsx(Alert, { variant: "error", children });
|
|
15
|
+
var SuccessMessage = ({
|
|
16
|
+
children
|
|
17
|
+
}) => /* @__PURE__ */ jsx(Alert, { variant: "success", children });
|
|
18
|
+
export {
|
|
19
|
+
ErrorMessage,
|
|
20
|
+
InfoMessage,
|
|
21
|
+
SuccessMessage,
|
|
22
|
+
WarningMessage
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/cli-v2/components/common/message.tsx"],"sourcesContent":["import React from \"react\";\nimport { Alert } from \"@inkjs/ui\";\n\nexport const InfoMessage: React.FC<{ children: string }> = ({ children }) => (\n <Alert variant=\"info\">{children}</Alert>\n);\n\nexport const WarningMessage: React.FC<{ children: string }> = ({\n children,\n}) => <Alert variant=\"warning\">{children}</Alert>;\n\nexport const ErrorMessage: React.FC<{ children: string }> = ({ children }) => (\n <Alert variant=\"error\">{children}</Alert>\n);\n\nexport const SuccessMessage: React.FC<{ children: string }> = ({\n children,\n}) => <Alert variant=\"success\">{children}</Alert>;\n"],"mappings":";;;;;;AAAA;AACA,SAAS,aAAa;AAGpB;AADK,IAAM,cAA8C,CAAC,EAAE,SAAS,MACrE,oBAAC,SAAM,SAAQ,QAAQ,UAAS;AAG3B,IAAM,iBAAiD,CAAC;AAAA,EAC7D;AACF,MAAM,oBAAC,SAAM,SAAQ,WAAW,UAAS;AAElC,IAAM,eAA+C,CAAC,EAAE,SAAS,MACtE,oBAAC,SAAM,SAAQ,SAAS,UAAS;AAG5B,IAAM,iBAAiD,CAAC;AAAA,EAC7D;AACF,MAAM,oBAAC,SAAM,SAAQ,WAAW,UAAS;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "../../chunk-DHET7RCE.js";
|
|
5
|
+
|
|
6
|
+
// src/cli-v2/components/common/spinner.tsx
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
import { Spinner as InkSpinner } from "@inkjs/ui";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var Spinner = ({ label }) => /* @__PURE__ */ jsx(InkSpinner, { label });
|
|
11
|
+
export {
|
|
12
|
+
Spinner
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/cli-v2/components/common/spinner.tsx"],"sourcesContent":["import React from \"react\";\nimport { Spinner as InkSpinner } from \"@inkjs/ui\";\n\ninterface SpinnerProps {\n label: string;\n}\n\nexport const Spinner: React.FC<SpinnerProps> = ({ label }) => (\n <InkSpinner label={label} />\n);\n"],"mappings":";;;;;;AAAA;AACA,SAAS,WAAW,kBAAkB;AAOpC;AADK,IAAM,UAAkC,CAAC,EAAE,MAAM,MACtD,oBAAC,cAAW,OAAc;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
SelectionHeader
|
|
4
|
+
} from "../../chunk-Z6DLWTBY.js";
|
|
5
|
+
import "../../chunk-6OY6ZYQF.js";
|
|
6
|
+
import "../../chunk-SJYG4EJZ.js";
|
|
7
|
+
import "../../chunk-DHET7RCE.js";
|
|
8
|
+
export {
|
|
9
|
+
SelectionHeader
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=selection-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
StepApproach
|
|
4
|
+
} from "../../chunk-ZDQIUHAM.js";
|
|
5
|
+
import "../../chunk-6OY6ZYQF.js";
|
|
6
|
+
import "../../chunk-SJYG4EJZ.js";
|
|
7
|
+
import "../../chunk-DHET7RCE.js";
|
|
8
|
+
export {
|
|
9
|
+
StepApproach
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=step-approach.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
StepCategory
|
|
4
|
+
} from "../../chunk-JY4RO76L.js";
|
|
5
|
+
import "../../chunk-AZP2AA5M.js";
|
|
6
|
+
import "../../chunk-6OY6ZYQF.js";
|
|
7
|
+
import "../../chunk-SJYG4EJZ.js";
|
|
8
|
+
import "../../chunk-DHET7RCE.js";
|
|
9
|
+
export {
|
|
10
|
+
StepCategory
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=step-category.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
StepConfirm
|
|
4
|
+
} from "../../chunk-TGOHJCQ4.js";
|
|
5
|
+
import "../../chunk-AZP2AA5M.js";
|
|
6
|
+
import "../../chunk-6OY6ZYQF.js";
|
|
7
|
+
import "../../chunk-SJYG4EJZ.js";
|
|
8
|
+
import "../../chunk-DHET7RCE.js";
|
|
9
|
+
export {
|
|
10
|
+
StepConfirm
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=step-confirm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
StepSubcategory
|
|
4
|
+
} from "../../chunk-TD643KB3.js";
|
|
5
|
+
import "../../chunk-AZP2AA5M.js";
|
|
6
|
+
import "../../chunk-6OY6ZYQF.js";
|
|
7
|
+
import "../../chunk-DHFFRMF6.js";
|
|
8
|
+
import "../../chunk-SJYG4EJZ.js";
|
|
9
|
+
import "../../chunk-DHET7RCE.js";
|
|
10
|
+
export {
|
|
11
|
+
StepSubcategory
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=step-subcategory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
Wizard
|
|
4
|
+
} from "../../chunk-YNSNRR5D.js";
|
|
5
|
+
import "../../chunk-JY4RO76L.js";
|
|
6
|
+
import "../../chunk-TGOHJCQ4.js";
|
|
7
|
+
import "../../chunk-YI6JVSFO.js";
|
|
8
|
+
import "../../chunk-TD643KB3.js";
|
|
9
|
+
import "../../chunk-AZP2AA5M.js";
|
|
10
|
+
import "../../chunk-Z6DLWTBY.js";
|
|
11
|
+
import "../../chunk-ZDQIUHAM.js";
|
|
12
|
+
import "../../chunk-6OY6ZYQF.js";
|
|
13
|
+
import "../../chunk-DHFFRMF6.js";
|
|
14
|
+
import "../../chunk-SJYG4EJZ.js";
|
|
15
|
+
import "../../chunk-DHET7RCE.js";
|
|
16
|
+
export {
|
|
17
|
+
Wizard
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=wizard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
resolveSource
|
|
4
|
+
} from "../chunk-QESUUPOE.js";
|
|
5
|
+
import "../chunk-TOPAIL5W.js";
|
|
6
|
+
import "../chunk-MMDXNZPF.js";
|
|
7
|
+
import {
|
|
8
|
+
init_esm_shims
|
|
9
|
+
} from "../chunk-DHET7RCE.js";
|
|
10
|
+
|
|
11
|
+
// src/cli-v2/hooks/init.ts
|
|
12
|
+
init_esm_shims();
|
|
13
|
+
var hook = async function(options) {
|
|
14
|
+
const projectDir = process.cwd();
|
|
15
|
+
let sourceFlag;
|
|
16
|
+
const sourceArgIndex = options.argv.indexOf("--source");
|
|
17
|
+
if (sourceArgIndex !== -1 && sourceArgIndex + 1 < options.argv.length) {
|
|
18
|
+
sourceFlag = options.argv[sourceArgIndex + 1];
|
|
19
|
+
} else {
|
|
20
|
+
const sourceFlagWithEquals = options.argv.find(
|
|
21
|
+
(arg) => arg.startsWith("--source=")
|
|
22
|
+
);
|
|
23
|
+
if (sourceFlagWithEquals) {
|
|
24
|
+
sourceFlag = sourceFlagWithEquals.split("=")[1];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const sArgIndex = options.argv.indexOf("-s");
|
|
28
|
+
if (sArgIndex !== -1 && sArgIndex + 1 < options.argv.length) {
|
|
29
|
+
sourceFlag = options.argv[sArgIndex + 1];
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
const resolvedConfig = await resolveSource(sourceFlag, projectDir);
|
|
33
|
+
options.config.sourceConfig = resolvedConfig;
|
|
34
|
+
} catch (error) {
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var init_default = hook;
|
|
38
|
+
export {
|
|
39
|
+
init_default as default
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/cli-v2/hooks/init.ts"],"sourcesContent":["// Init hook - runs before each command\nimport { Hook } from \"@oclif/core\";\nimport { resolveSource } from \"../lib/config.js\";\n\nconst hook: Hook<\"init\"> = async function (options) {\n // Detect project directory (current working directory)\n const projectDir = process.cwd();\n\n // Get the --source flag value if provided\n // The flag value will be available in the command's flags after parse()\n // but during init hook we need to check argv manually\n let sourceFlag: string | undefined;\n const sourceArgIndex = options.argv.indexOf(\"--source\");\n if (sourceArgIndex !== -1 && sourceArgIndex + 1 < options.argv.length) {\n sourceFlag = options.argv[sourceArgIndex + 1];\n } else {\n const sourceFlagWithEquals = options.argv.find((arg) =>\n arg.startsWith(\"--source=\"),\n );\n if (sourceFlagWithEquals) {\n sourceFlag = sourceFlagWithEquals.split(\"=\")[1];\n }\n }\n\n // Short form -s\n const sArgIndex = options.argv.indexOf(\"-s\");\n if (sArgIndex !== -1 && sArgIndex + 1 < options.argv.length) {\n sourceFlag = options.argv[sArgIndex + 1];\n }\n\n // Resolve configuration\n try {\n const resolvedConfig = await resolveSource(sourceFlag, projectDir);\n\n // Store resolved config in the oclif Config object\n // This will be available to commands via this.sourceConfig getter in BaseCommand\n (options.config as any).sourceConfig = resolvedConfig;\n } catch (error) {\n // If config loading fails, we let the command handle it\n // This ensures commands can still run even if config is invalid\n // The command can check if config.sourceConfig is undefined and handle accordingly\n }\n};\n\nexport default hook;\n"],"mappings":";;;;;;;;;;;AAAA;AAIA,IAAM,OAAqB,eAAgB,SAAS;AAElD,QAAM,aAAa,QAAQ,IAAI;AAK/B,MAAI;AACJ,QAAM,iBAAiB,QAAQ,KAAK,QAAQ,UAAU;AACtD,MAAI,mBAAmB,MAAM,iBAAiB,IAAI,QAAQ,KAAK,QAAQ;AACrE,iBAAa,QAAQ,KAAK,iBAAiB,CAAC;AAAA,EAC9C,OAAO;AACL,UAAM,uBAAuB,QAAQ,KAAK;AAAA,MAAK,CAAC,QAC9C,IAAI,WAAW,WAAW;AAAA,IAC5B;AACA,QAAI,sBAAsB;AACxB,mBAAa,qBAAqB,MAAM,GAAG,EAAE,CAAC;AAAA,IAChD;AAAA,EACF;AAGA,QAAM,YAAY,QAAQ,KAAK,QAAQ,IAAI;AAC3C,MAAI,cAAc,MAAM,YAAY,IAAI,QAAQ,KAAK,QAAQ;AAC3D,iBAAa,QAAQ,KAAK,YAAY,CAAC;AAAA,EACzC;AAGA,MAAI;AACF,UAAM,iBAAiB,MAAM,cAAc,YAAY,UAAU;AAIjE,IAAC,QAAQ,OAAe,eAAe;AAAA,EACzC,SAAS,OAAO;AAAA,EAIhB;AACF;AAEA,IAAO,eAAQ;","names":[]}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "./chunk-DHET7RCE.js";
|
|
5
|
+
|
|
6
|
+
// src/cli-v2/index.ts
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
import { run, flush, Errors } from "@oclif/core";
|
|
9
|
+
run(void 0, import.meta.url).then(() => flush()).catch((error) => Errors.handle(error));
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli-v2/index.ts"],"sourcesContent":["// oclif entry point - to be implemented\nimport { run, flush, Errors } from \"@oclif/core\";\n\nrun(undefined, import.meta.url)\n .then(() => flush())\n .catch((error) => Errors.handle(error));\n"],"mappings":";;;;;;AAAA;AACA,SAAS,KAAK,OAAO,cAAc;AAEnC,IAAI,QAAW,YAAY,GAAG,EAC3B,KAAK,MAAM,MAAM,CAAC,EAClB,MAAM,CAAC,UAAU,OAAO,OAAO,KAAK,CAAC;","names":[]}
|