@darkrymit/crunes-cli 0.14.3 → 0.14.5
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/chunks/{benchmark-A7DPPZUW.js → benchmark-2Z4SJUKF.js} +3 -3
- package/dist/chunks/{chunk-6P4O4KTM.js → chunk-CTMEKDXG.js} +3 -3
- package/dist/chunks/{chunk-ZUCXO4U2.js → chunk-D7O7ZP55.js} +5 -5
- package/dist/chunks/{chunk-RSWRJRXY.js → chunk-FJLWK47H.js} +2 -2
- package/dist/chunks/{chunk-Q74KNCQU.js → chunk-VRPCFYR5.js} +231 -225
- package/dist/chunks/{chunk-2N6X32LY.js → chunk-W2TXRPKE.js} +9 -2
- package/dist/chunks/{doctor-GWXRRGSP.js → doctor-TQIZC4CG.js} +1 -1
- package/dist/chunks/{install-2K5BNXDO.js → install-2GZTPTPO.js} +1 -1
- package/dist/chunks/{repl-73VHB2E5.js → repl-IVRI5R4T.js} +4 -4
- package/dist/chunks/{resolver-SZFXFIYZ.js → resolver-BMNOUSRL.js} +2 -2
- package/dist/chunks/{run-FNNK5C65.js → run-QF7OARD7.js} +3 -3
- package/dist/chunks/{rune-O4WXVDRJ.js → rune-IOPOOR6C.js} +3 -3
- package/dist/chunks/{runner-OU2W6JAG.js → runner-L2AJXLY7.js} +1 -1
- package/dist/chunks/{uninstall-X75QTERD.js → uninstall-F6DMPXM5.js} +1 -1
- package/dist/chunks/{update-HHIDPHGX.js → update-Y6ZV3FUQ.js} +1 -1
- package/dist/chunks/{version-VHAKR4T6.js → version-T3E4MODY.js} +1 -1
- package/dist/cli.js +10 -10
- package/package.json +1 -1
|
@@ -233,8 +233,15 @@ function classifySource(source) {
|
|
|
233
233
|
return { type: "npm", resolved: source };
|
|
234
234
|
}
|
|
235
235
|
async function downloadGitHub(repoUrl, destDir) {
|
|
236
|
-
|
|
237
|
-
|
|
236
|
+
try {
|
|
237
|
+
await downloadGit(`${repoUrl}.git`, destDir);
|
|
238
|
+
return;
|
|
239
|
+
} catch {
|
|
240
|
+
await fs2.rm(destDir, { recursive: true, force: true });
|
|
241
|
+
await fs2.mkdir(destDir, { recursive: true });
|
|
242
|
+
}
|
|
243
|
+
const archiveUrl = `${repoUrl}/archive/HEAD.tar.gz`;
|
|
244
|
+
const res = await fetch(archiveUrl, { headers: { "User-Agent": "crunes-cli" } });
|
|
238
245
|
if (!res.ok) throw new Error(`Failed to download ${repoUrl}: HTTP ${res.status}`);
|
|
239
246
|
const buf = Buffer.from(await res.arrayBuffer());
|
|
240
247
|
const tarPath = path2.join(destDir, "plugin.tar.gz");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseSegment,
|
|
3
3
|
permissionHint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CTMEKDXG.js";
|
|
5
5
|
import {
|
|
6
6
|
tailStdin
|
|
7
7
|
} from "./chunk-OV4WBJT3.js";
|
|
@@ -13,10 +13,10 @@ import "./chunk-PRCVJ727.js";
|
|
|
13
13
|
import "./chunk-AFAVAB5Q.js";
|
|
14
14
|
import {
|
|
15
15
|
describeConfigLayers
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-D7O7ZP55.js";
|
|
17
17
|
import {
|
|
18
18
|
formatSection
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FJLWK47H.js";
|
|
20
20
|
import "./chunk-UKAIACRQ.js";
|
|
21
21
|
import "./chunk-HQUMVDQE.js";
|
|
22
22
|
import {
|
|
@@ -157,7 +157,7 @@ async function handler({
|
|
|
157
157
|
output.info("Run `crunes init` to create a config file.");
|
|
158
158
|
process.exit(1);
|
|
159
159
|
}
|
|
160
|
-
const { resolveRuneEntry } = await import("./resolver-
|
|
160
|
+
const { resolveRuneEntry } = await import("./resolver-BMNOUSRL.js");
|
|
161
161
|
let runeEntry;
|
|
162
162
|
try {
|
|
163
163
|
runeEntry = await resolveRuneEntry(projectRoot, config, key, configRoot);
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
resolveRuneEntry,
|
|
5
5
|
resolveRuneFromPlugins,
|
|
6
6
|
runRune
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-D7O7ZP55.js";
|
|
8
|
+
import "./chunk-FJLWK47H.js";
|
|
9
9
|
import "./chunk-UKAIACRQ.js";
|
|
10
10
|
import "./chunk-HQUMVDQE.js";
|
|
11
11
|
import {
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
parseBracketKey,
|
|
5
5
|
parseRunArgs,
|
|
6
6
|
parseSegment
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CTMEKDXG.js";
|
|
8
8
|
import "./chunk-RQ6KHY6W.js";
|
|
9
9
|
import "./chunk-PRCVJ727.js";
|
|
10
10
|
import "./chunk-AFAVAB5Q.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-D7O7ZP55.js";
|
|
12
|
+
import "./chunk-FJLWK47H.js";
|
|
13
13
|
import "./chunk-UKAIACRQ.js";
|
|
14
14
|
import "./chunk-HQUMVDQE.js";
|
|
15
15
|
import "./chunk-YUI5RTLD.js";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getArgsSchema,
|
|
6
6
|
getPluginRunePath,
|
|
7
7
|
getReplSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VRPCFYR5.js";
|
|
9
9
|
import "./chunk-HYPUZ5DT.js";
|
|
10
10
|
import "./chunk-XPEVUBUK.js";
|
|
11
11
|
import "./chunk-5L2GJWCD.js";
|
|
@@ -19,7 +19,7 @@ import "./chunk-AFAVAB5Q.js";
|
|
|
19
19
|
import {
|
|
20
20
|
resolvePluginRune,
|
|
21
21
|
resolveRuneFromPlugins
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-D7O7ZP55.js";
|
|
23
23
|
import {
|
|
24
24
|
describeRunBlock,
|
|
25
25
|
flattenCommands,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
formatRuneIndex,
|
|
29
29
|
getRunBlockSchema,
|
|
30
30
|
selectNode
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-FJLWK47H.js";
|
|
32
32
|
import {
|
|
33
33
|
resolveInterpreter
|
|
34
34
|
} from "./chunk-UKAIACRQ.js";
|
package/dist/cli.js
CHANGED
|
@@ -3397,7 +3397,7 @@ var program = new Command();
|
|
|
3397
3397
|
// src/cli/program.js
|
|
3398
3398
|
function buildProgram() {
|
|
3399
3399
|
const program3 = new Command();
|
|
3400
|
-
program3.name("crunes").description("CLI tool for managing context runes").version("0.14.
|
|
3400
|
+
program3.name("crunes").description("CLI tool for managing context runes").version("0.14.5", "-v, --version").enablePositionalOptions().option("-y, --yes", "assume yes to all prompts and skip interactive mode (also auto-detected in non-TTY environments)").option("-p, --plain", "plain output: no colors, no box-drawing, plain symbols \u2014 optimised for AI/pipe use").option("--cwd <path>", "project root to use instead of the current working directory").option("--ccd <path>", "config directory \u2014 where .crunes/config.json and local rune files live (default: --cwd)").option("--verbose", "print full error stack traces and other verbose output");
|
|
3401
3401
|
program3.hook("preAction", (_thisCommand, actionCommand) => {
|
|
3402
3402
|
const opts = { ...program3.opts(), ...actionCommand.opts() };
|
|
3403
3403
|
configure({ plain: !!opts.plain, verbose: !!opts.verbose });
|
|
@@ -3417,7 +3417,7 @@ function buildProgram() {
|
|
|
3417
3417
|
"after",
|
|
3418
3418
|
'\nImportant: Global flags (e.g. --cwd) MUST appear before the "run" command.\n\nSyntax:\n [run-flags] <key>[-s s1,s2] [rune-args...]\n -b [run-flags] <key1>[-s s1] [rune-args1] + <key2>[-s s2] [rune-args2]\n\nCommand flags:\n -b, --batch enable batching multiple runes with +\n --format text|jsonl output format (default: text)\n --fail-fast stop on first error\n\nPer-rune bracket flags (inside key[...]):\n -s, --section s1,s2 filter output sections for this rune\n\nKey prefixes:\n project:name resolve from project config only\n plugin:name resolve directly from an enabled plugin\n name auto-resolve: project config first, then plugins\n\nFor rune argument documentation: crunes docs rune <key>'
|
|
3419
3419
|
).allowUnknownOption().passThroughOptions().action(async (args, _opts, _command) => {
|
|
3420
|
-
const { handler, parseRunArgs } = await import("./chunks/run-
|
|
3420
|
+
const { handler, parseRunArgs } = await import("./chunks/run-QF7OARD7.js");
|
|
3421
3421
|
const { segments, format, failFast, isBatch } = parseRunArgs(args);
|
|
3422
3422
|
await handler({ segments, format, failFast, isBatch, projectRoot: projectRoot(), configRoot: configRoot() });
|
|
3423
3423
|
});
|
|
@@ -3425,7 +3425,7 @@ function buildProgram() {
|
|
|
3425
3425
|
"after",
|
|
3426
3426
|
'\nImportant: Global flags (e.g. --cwd) MUST appear before the "repl" command.\n\nSyntax:\n [--format text|jsonl] <key>[-s s1,s2] [rune-args...]\n\nPer-rune bracket flags (inside key[...]):\n -s, --section s1,s2 filter output sections for this rune\n\nThe rune must export repl(args) and/or inputRepl(input).\nFor rune argument documentation: crunes docs rune <key>'
|
|
3427
3427
|
).allowUnknownOption().passThroughOptions().action(async (args, _opts, _command) => {
|
|
3428
|
-
const { handler, parseReplArgs } = await import("./chunks/repl-
|
|
3428
|
+
const { handler, parseReplArgs } = await import("./chunks/repl-IVRI5R4T.js");
|
|
3429
3429
|
const { key, runeArgs, sections, format } = parseReplArgs(args);
|
|
3430
3430
|
await handler({ key, runeArgs, sections, format, projectRoot: projectRoot(), configRoot: configRoot() });
|
|
3431
3431
|
});
|
|
@@ -3434,7 +3434,7 @@ function buildProgram() {
|
|
|
3434
3434
|
"after",
|
|
3435
3435
|
"\n crunes docs rune index of every rune and its commands\n crunes docs rune <key> command index for one rune\n crunes docs rune <key> <cmd>... detail for one command path\n"
|
|
3436
3436
|
).addOption(new Option("--format <format>", "output format").choices(["text", "json"]).default("text")).action(async (key, path3, opts) => {
|
|
3437
|
-
const { handler } = await import("./chunks/rune-
|
|
3437
|
+
const { handler } = await import("./chunks/rune-IOPOOR6C.js");
|
|
3438
3438
|
await handler({ key, path: path3, format: opts.format, projectRoot: projectRoot(), configRoot: configRoot() });
|
|
3439
3439
|
});
|
|
3440
3440
|
helpGroup.command("utils [namespaces...]").description("Show function signatures and parameter docs for utils.* namespaces").addOption(new Option("--format <format>", "output format").choices(["text", "json"]).default("text")).action(async (namespaces, opts) => {
|
|
@@ -3482,18 +3482,18 @@ function buildProgram() {
|
|
|
3482
3482
|
await handler();
|
|
3483
3483
|
});
|
|
3484
3484
|
program3.command("version").description("Print the installed version and check for updates").option("--no-check", "skip the npm update check").action(async (opts) => {
|
|
3485
|
-
const { handler } = await import("./chunks/version-
|
|
3485
|
+
const { handler } = await import("./chunks/version-T3E4MODY.js");
|
|
3486
3486
|
await handler({ check: opts.check, plain: !!program3.opts().plain });
|
|
3487
3487
|
});
|
|
3488
3488
|
program3.command("doctor").description("Verify environment and project setup").option("-p, --plain", "plain output: no colors, no box-drawing, plain symbols \u2014 optimised for AI/pipe use").action(async () => {
|
|
3489
|
-
const { handler } = await import("./chunks/doctor-
|
|
3489
|
+
const { handler } = await import("./chunks/doctor-TQIZC4CG.js");
|
|
3490
3490
|
await handler({ projectRoot: projectRoot() });
|
|
3491
3491
|
});
|
|
3492
3492
|
program3.command("bench [args...]").description("Time rune execution and report fast, ok, or slow.").addHelpText(
|
|
3493
3493
|
"after",
|
|
3494
3494
|
'\nImportant: Global flags (e.g. --cwd) MUST appear before the "bench" command.\n\nSyntax:\n [--runs <n>] [--warmup] <key>[--runs <n>] [--warmup] [-s s1,s2] [rune-args...]\n\nCommand flags:\n -b, --batch enable batching multiple runes with +\n --format text|jsonl output format (default: text)\n --fail-fast stop on first error\n --runs <n> default number of runs for all runes (default: 1)\n --warmup default warmup run for all runes\n\nPer-rune bracket flags (inside key[...]):\n --runs <n> override run count for this rune\n --warmup override warmup for this rune\n -s, --section s1,s2 filter output sections for this rune'
|
|
3495
3495
|
).allowUnknownOption().passThroughOptions().action(async (args, _opts, _command) => {
|
|
3496
|
-
const { handler, parseBenchArgs } = await import("./chunks/benchmark-
|
|
3496
|
+
const { handler, parseBenchArgs } = await import("./chunks/benchmark-2Z4SJUKF.js");
|
|
3497
3497
|
const parsed = parseBenchArgs(args);
|
|
3498
3498
|
if (!parsed.segments[0]?.key) {
|
|
3499
3499
|
const { output } = await import("./chunks/output-JVJFXQPF.js");
|
|
@@ -3573,11 +3573,11 @@ function buildProgram() {
|
|
|
3573
3573
|
});
|
|
3574
3574
|
const plugin = program3.command("plugin").description("Manage rune plugins");
|
|
3575
3575
|
plugin.command("install <source>").description("Install a plugin from a configured marketplace in the format <marketplace>@<plugin>").option("-g, --global", "enable in the global config (~/.crunes/config.json) instead of the project").action(async (source, opts) => {
|
|
3576
|
-
const { handler } = await import("./chunks/install-
|
|
3576
|
+
const { handler } = await import("./chunks/install-2GZTPTPO.js");
|
|
3577
3577
|
await handler({ source, projectRoot: projectRoot(), configRoot: configRoot(), yes: !!program3.opts().yes, global: !!opts.global });
|
|
3578
3578
|
});
|
|
3579
3579
|
plugin.command("uninstall <plugin>").description("Uninstall an installed plugin").option("-g, --global", "also drop the plugin from the global config (~/.crunes/config.json)").action(async (name, opts) => {
|
|
3580
|
-
const { handler } = await import("./chunks/uninstall-
|
|
3580
|
+
const { handler } = await import("./chunks/uninstall-F6DMPXM5.js");
|
|
3581
3581
|
await handler({ name, yes: !!program3.opts().yes, projectRoot: projectRoot(), configRoot: configRoot(), global: !!opts.global });
|
|
3582
3582
|
});
|
|
3583
3583
|
plugin.command("list").description("List installed plugins").addOption(new Option("--format <format>", "output format").choices(["text", "json"]).default("text")).option("-p, --plain", "plain output: no colors, no box-drawing, plain symbols \u2014 optimised for AI/pipe use").action(async (opts) => {
|
|
@@ -3585,7 +3585,7 @@ function buildProgram() {
|
|
|
3585
3585
|
await handler({ format: opts.format, projectRoot: projectRoot() });
|
|
3586
3586
|
});
|
|
3587
3587
|
plugin.command("update [plugin]").description("Update one or all installed plugins").action(async (name) => {
|
|
3588
|
-
const { handler } = await import("./chunks/update-
|
|
3588
|
+
const { handler } = await import("./chunks/update-Y6ZV3FUQ.js");
|
|
3589
3589
|
await handler({ name, projectRoot: projectRoot(), configRoot: configRoot() });
|
|
3590
3590
|
});
|
|
3591
3591
|
plugin.command("trust <plugin> [rune]").description("Review a plugin's native runes \u2014 scripts that run outside the sandbox \u2014 and trust them to run").action(async (name, rune) => {
|