@darkrymit/crunes-cli 0.14.4 → 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.
@@ -233,8 +233,15 @@ function classifySource(source) {
233
233
  return { type: "npm", resolved: source };
234
234
  }
235
235
  async function downloadGitHub(repoUrl, destDir) {
236
- const apiUrl = repoUrl.replace("https://github.com/", "https://api.github.com/repos/") + "/tarball";
237
- const res = await fetch(apiUrl, { headers: { "User-Agent": "crunes-cli" } });
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");
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-Z4W3ZDFC.js";
4
4
  import {
5
5
  installPlugin
6
- } from "./chunk-2N6X32LY.js";
6
+ } from "./chunk-W2TXRPKE.js";
7
7
  import "./chunk-GBUZOC3O.js";
8
8
  import "./chunk-J33GQMPV.js";
9
9
  import {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  uninstallPlugin
3
- } from "./chunk-2N6X32LY.js";
3
+ } from "./chunk-W2TXRPKE.js";
4
4
  import "./chunk-GBUZOC3O.js";
5
5
  import "./chunk-J33GQMPV.js";
6
6
  import {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-Z4W3ZDFC.js";
4
4
  import {
5
5
  installPlugin
6
- } from "./chunk-2N6X32LY.js";
6
+ } from "./chunk-W2TXRPKE.js";
7
7
  import "./chunk-GBUZOC3O.js";
8
8
  import "./chunk-J33GQMPV.js";
9
9
  import {
@@ -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.4",
19
+ version: "0.14.5",
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.4", "-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.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 });
@@ -3482,7 +3482,7 @@ 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-YC3VCSXY.js");
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 () => {
@@ -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-2K5BNXDO.js");
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-X75QTERD.js");
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-HHIDPHGX.js");
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) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darkrymit/crunes-cli",
3
- "version": "0.14.4",
3
+ "version": "0.14.5",
4
4
  "description": "CLI tool for querying crunes enrichers",
5
5
  "type": "module",
6
6
  "bin": {