@darkrymit/crunes-cli 0.14.1 → 0.14.3

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runRunBlock
3
- } from "./chunk-NCSTZMBQ.js";
3
+ } from "./chunk-RSWRJRXY.js";
4
4
  import {
5
5
  isNativeRune,
6
6
  trustDigest,
@@ -127,7 +127,7 @@ async function runPluginMatch({ match, pluginJson, projectPerms, projectVars, ke
127
127
  });
128
128
  return result2?.directExitCode !== void 0 ? result2 : normaliseResult(result2);
129
129
  }
130
- const { executePluginRune } = await import("./runner-RYJO4AN3.js");
130
+ const { executePluginRune } = await import("./runner-OU2W6JAG.js");
131
131
  const result = await executePluginRune({
132
132
  pluginDir,
133
133
  pluginCacheDir,
@@ -225,7 +225,7 @@ async function resolveRuneEntry(projectDir, config, key, configDir = projectDir)
225
225
  const vars = { ...pluginJson.runes[runeKey]?.vars ?? {}, ...config.runes?.[`${pluginKey}:${runeKey}`]?.vars ?? {} };
226
226
  return {
227
227
  async createReplSession(args, opts = {}) {
228
- const { getPluginRunePath, runRuneInRepl } = await import("./runner-RYJO4AN3.js");
228
+ const { getPluginRunePath, runRuneInRepl } = await import("./runner-OU2W6JAG.js");
229
229
  const runeFile = getPluginRunePath(pluginDir, runeKey, pluginJson, "repl");
230
230
  const nodeModulesDir = join(pluginCacheDir, "node_modules");
231
231
  return runRuneInRepl(runeFile, effective, args, projectDir, {
@@ -251,7 +251,7 @@ async function resolveRuneEntry(projectDir, config, key, configDir = projectDir)
251
251
  const vars = entry.vars ?? {};
252
252
  return {
253
253
  async createReplSession(args, opts = {}) {
254
- const { runRuneInRepl } = await import("./runner-RYJO4AN3.js");
254
+ const { runRuneInRepl } = await import("./runner-OU2W6JAG.js");
255
255
  return runRuneInRepl(runeFile, effective, args, projectDir, {
256
256
  vars,
257
257
  runeKey: key,
@@ -275,7 +275,7 @@ async function resolveRuneEntry(projectDir, config, key, configDir = projectDir)
275
275
  const vars = { ...pluginJson.runes[runeKey]?.vars ?? {}, ...config.runes?.[`${pluginKey}:${runeKey}`]?.vars ?? {} };
276
276
  return {
277
277
  async createReplSession(args, opts = {}) {
278
- const { getPluginRunePath, runRuneInRepl } = await import("./runner-RYJO4AN3.js");
278
+ const { getPluginRunePath, runRuneInRepl } = await import("./runner-OU2W6JAG.js");
279
279
  const runeFile = getPluginRunePath(pluginDir, runeKey, pluginJson, "repl");
280
280
  const nodeModulesDir = join(pluginCacheDir, "node_modules");
281
281
  return runRuneInRepl(runeFile, effective, args, projectDir, {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runeTestTemplate
3
- } from "./chunk-QFW2V36K.js";
3
+ } from "./chunk-RMATXIQR.js";
4
4
  import "./chunk-J33GQMPV.js";
5
5
  import {
6
6
  output
@@ -2,7 +2,7 @@ import {
2
2
  SCRIPT_LANGS,
3
3
  VALID_LANGS,
4
4
  runeTestTemplate
5
- } from "./chunk-QFW2V36K.js";
5
+ } from "./chunk-RMATXIQR.js";
6
6
  import {
7
7
  getConfigPath,
8
8
  readRawConfig,
@@ -4,7 +4,7 @@ import {
4
4
  handler,
5
5
  runeTestTemplate,
6
6
  template
7
- } from "./chunk-QFW2V36K.js";
7
+ } from "./chunk-RMATXIQR.js";
8
8
  import "./chunk-J33GQMPV.js";
9
9
  import "./chunk-RQ6KHY6W.js";
10
10
  import "./chunk-PRCVJ727.js";
@@ -9,7 +9,7 @@ import "./chunk-PRCVJ727.js";
9
9
  import "./chunk-AFAVAB5Q.js";
10
10
  import {
11
11
  describeRunBlock
12
- } from "./chunk-NCSTZMBQ.js";
12
+ } from "./chunk-RSWRJRXY.js";
13
13
  import {
14
14
  assertNotMissedRename,
15
15
  onPath,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  utils_api_default
3
- } from "./chunk-ZO2JKBJX.js";
3
+ } from "./chunk-XDMUY57P.js";
4
4
  import {
5
5
  globals_api_default
6
6
  } from "./chunk-V35LVVNV.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  parseSegment,
3
3
  permissionHint
4
- } from "./chunk-JDPQACG7.js";
4
+ } from "./chunk-6P4O4KTM.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-W2A4ECOP.js";
16
+ } from "./chunk-ZUCXO4U2.js";
17
17
  import {
18
18
  formatSection
19
- } from "./chunk-NCSTZMBQ.js";
19
+ } from "./chunk-RSWRJRXY.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-4IZNQ3QJ.js");
160
+ const { resolveRuneEntry } = await import("./resolver-SZFXFIYZ.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-W2A4ECOP.js";
8
- import "./chunk-NCSTZMBQ.js";
7
+ } from "./chunk-ZUCXO4U2.js";
8
+ import "./chunk-RSWRJRXY.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-JDPQACG7.js";
7
+ } from "./chunk-6P4O4KTM.js";
8
8
  import "./chunk-RQ6KHY6W.js";
9
9
  import "./chunk-PRCVJ727.js";
10
10
  import "./chunk-AFAVAB5Q.js";
11
- import "./chunk-W2A4ECOP.js";
12
- import "./chunk-NCSTZMBQ.js";
11
+ import "./chunk-ZUCXO4U2.js";
12
+ import "./chunk-RSWRJRXY.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-SPXPSPM7.js";
8
+ } from "./chunk-Q74KNCQU.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-W2A4ECOP.js";
22
+ } from "./chunk-ZUCXO4U2.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-NCSTZMBQ.js";
31
+ } from "./chunk-RSWRJRXY.js";
32
32
  import {
33
33
  resolveInterpreter
34
34
  } from "./chunk-UKAIACRQ.js";
@@ -7,7 +7,7 @@ import {
7
7
  runPluginRune,
8
8
  runRuneInIsolate,
9
9
  runRuneInRepl
10
- } from "./chunk-SPXPSPM7.js";
10
+ } from "./chunk-Q74KNCQU.js";
11
11
  import "./chunk-HYPUZ5DT.js";
12
12
  import "./chunk-XPEVUBUK.js";
13
13
  import "./chunk-5L2GJWCD.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  utils_api_default
3
- } from "./chunk-ZO2JKBJX.js";
3
+ } from "./chunk-XDMUY57P.js";
4
4
  import {
5
5
  formatNode,
6
6
  walk
@@ -16,7 +16,7 @@ import path from "node:path";
16
16
  // package.json
17
17
  var package_default = {
18
18
  name: "@darkrymit/crunes-cli",
19
- version: "0.14.1",
19
+ version: "0.14.3",
20
20
  description: "CLI tool for querying crunes enrichers",
21
21
  type: "module",
22
22
  bin: {
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.1", "-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");
3400
+ program3.name("crunes").description("CLI tool for managing context runes").version("0.14.3", "-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-BFGVSKV7.js");
3420
+ const { handler, parseRunArgs } = await import("./chunks/run-FNNK5C65.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-QNXLTQYU.js");
3428
+ const { handler, parseReplArgs } = await import("./chunks/repl-73VHB2E5.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,11 +3434,11 @@ 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-RNJCIH4L.js");
3437
+ const { handler } = await import("./chunks/rune-O4WXVDRJ.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) => {
3441
- const { handler } = await import("./chunks/utils-N6QJKOAO.js");
3441
+ const { handler } = await import("./chunks/utils-ZHBJUFJT.js");
3442
3442
  await handler({ namespaces, format: opts.format });
3443
3443
  });
3444
3444
  helpGroup.command("globals").description("Show injected sandbox globals and ES2020 builtins available in rune scripts").addOption(new Option("--format <format>", "output format").choices(["text", "json"]).default("text")).action(async (opts) => {
@@ -3446,7 +3446,7 @@ function buildProgram() {
3446
3446
  await handler({ format: opts.format });
3447
3447
  });
3448
3448
  helpGroup.command("intro").description("Generate a comprehensive introduction to Crunes: rune anatomy, calling conventions, config, permissions and the full @utils API. Generic \u2014 for this project's own runes use `crunes list` and `crunes docs rune`").option("--out <path>", "output file path (defaults to stdout)").action(async (opts) => {
3449
- const { handler } = await import("./chunks/intro-PTGUS5FN.js");
3449
+ const { handler } = await import("./chunks/intro-WGKSPFHP.js");
3450
3450
  await handler({ out: opts.out });
3451
3451
  });
3452
3452
  helpGroup.command("args").description("Show detailed documentation, conventions, and examples for the args(builder) export").action(async () => {
@@ -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-CYVVKOVG.js");
3485
+ const { handler } = await import("./chunks/version-VHAKR4T6.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-Q6FZHDMH.js");
3489
+ const { handler } = await import("./chunks/doctor-GWXRRGSP.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-Y2FTRSOP.js");
3496
+ const { handler, parseBenchArgs } = await import("./chunks/benchmark-A7DPPZUW.js");
3497
3497
  const parsed = parseBenchArgs(args);
3498
3498
  if (!parsed.segments[0]?.key) {
3499
3499
  const { output } = await import("./chunks/output-JVJFXQPF.js");
@@ -3564,7 +3564,7 @@ function buildProgram() {
3564
3564
  await handler({ yes: !!program3.opts().yes, projectRoot: projectRoot(), global: !!opts.global });
3565
3565
  });
3566
3566
  program3.command("create [new-rune]").description("Scaffold a new rune and register it in config").addOption(new Option("--format <format>", "rune output format").choices(["tree", "markdown"])).option("--path <path>", "file path for the rune (default: .crunes/runes/<key>/src/index.rune.js)").addOption(new Option("--lang <lang>", "scaffold a script rune instead of a sandboxed JS one").choices(["python", "bash", "node"])).option("--name <name>", "human-readable label shown in crunes list").option("--description <description>", "short description of what context this rune provides").option("-g, --global", "operate on the global config (~/.crunes/config.json) instead of the project").option("--plugin", "register the rune in .crunes-plugin/plugin.json instead of .crunes/config.json").option("--project", "register the rune in .crunes/config.json even when .crunes-plugin/plugin.json exists").action(async (key, opts) => {
3567
- const { handler } = await import("./chunks/create-UUYJ76JB.js");
3567
+ const { handler } = await import("./chunks/create-W3N3SDAH.js");
3568
3568
  await handler({ key, format: opts.format, lang: opts.lang, path: opts.path, name: opts.name, description: opts.description, yes: !!program3.opts().yes, projectRoot: projectRoot(), configRoot: configRoot(), global: !!opts.global, plugin: !!opts.plugin, project: !!opts.project });
3569
3569
  });
3570
3570
  program3.command("add <key> <command> [argv...]").description("Register an existing script or program as a rune (fixed arguments go after --)").option("--name <name>", "human-readable label shown in crunes list").option("--description <description>", "short description of what the rune does").option("-g, --global", "operate on the global config (~/.crunes/config.json) instead of the project").addHelpText("after", '\nExamples:\n crunes add coverage tools/coverage.py --description "Test coverage per module"\n crunes add log git -- log --oneline -n 20').action(async (key, command, argv, opts) => {
@@ -3601,7 +3601,7 @@ function buildProgram() {
3601
3601
  await handler({ name, projectRoot: projectRoot(), configRoot: configRoot(), global: !!opts.global });
3602
3602
  });
3603
3603
  plugin.command("create [new-plugin]").description("Scaffold a new plugin directory with all required files").option("--description <text>", "short description for plugin.json and marketplace.json").option("--author <name>", "author name (default: git config user.name)").option("--license <spdx>", "SPDX license identifier (default: MIT)").option("--out <path>", "output directory (default: ./<name>)").option("--multi", "scaffold under runes/example/{src,test}/ for a multi-rune plugin").action(async (name, opts) => {
3604
- const { handler } = await import("./chunks/create-676JD63L.js");
3604
+ const { handler } = await import("./chunks/create-55VUMBHT.js");
3605
3605
  await handler({ name, description: opts.description, author: opts.author, license: opts.license, out: opts.out, multi: !!opts.multi, yes: !!program3.opts().yes, projectRoot: projectRoot() });
3606
3606
  });
3607
3607
  const template = program3.command("template").description("Manage rune templates");
@@ -3617,7 +3617,7 @@ function buildProgram() {
3617
3617
  await handler({ ref, key: opts.as, path: opts.path, name: opts.name, description: opts.description, yes: !!program3.opts().yes, projectRoot: projectRoot(), configRoot: configRoot() });
3618
3618
  });
3619
3619
  template.command("create [new-template]").description("Scaffold a new template folder and register it in config").option("--path <path>", "folder for the template (default: .crunes/templates/<name>)").addOption(new Option("--lang <lang>", "scaffold a script template instead of a sandboxed JS one").choices(["python", "bash", "node"])).option("--name <name>", "display label shown in crunes template list (separate from the template key)").option("--description <description>", "short description of what kind of rune this template produces").option("-g, --global", "operate on the global config (~/.crunes/config.json) instead of the project").action(async (name, opts) => {
3620
- const { handler } = await import("./chunks/create-WHYUMBIP.js");
3620
+ const { handler } = await import("./chunks/create-E3ACC6RE.js");
3621
3621
  await handler({ name, path: opts.path, lang: opts.lang, templateName: opts.name, description: opts.description, yes: !!program3.opts().yes, projectRoot: projectRoot(), configRoot: configRoot(), global: !!opts.global });
3622
3622
  });
3623
3623
  const marketplace = program3.command("marketplace").description("Manage plugin marketplace sources");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darkrymit/crunes-cli",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "CLI tool for querying crunes enrichers",
5
5
  "type": "module",
6
6
  "bin": {