@darkrymit/crunes-cli 0.13.0 → 0.14.1

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.
Files changed (26) hide show
  1. package/dist/chunks/{benchmark-2TVN6HDF.js → benchmark-Y2FTRSOP.js} +3 -3
  2. package/dist/chunks/{chunk-THGPCLJD.js → chunk-2N6X32LY.js} +5 -3
  3. package/dist/chunks/{chunk-CBWT3DFR.js → chunk-5L2GJWCD.js} +4 -0
  4. package/dist/chunks/{chunk-3VFNNPQI.js → chunk-JDPQACG7.js} +3 -3
  5. package/dist/chunks/{chunk-ATI5HNNC.js → chunk-NCSTZMBQ.js} +2 -2
  6. package/dist/chunks/{chunk-KP4EW2DS.js → chunk-SPXPSPM7.js} +221 -57
  7. package/dist/chunks/{chunk-QAP63JIK.js → chunk-W2A4ECOP.js} +5 -5
  8. package/dist/chunks/chunk-XPEVUBUK.js +40 -0
  9. package/dist/chunks/{chunk-TXCUSUZ6.js → chunk-ZO2JKBJX.js} +2552 -2372
  10. package/dist/chunks/{doctor-SXKAEYUF.js → doctor-Q6FZHDMH.js} +1 -1
  11. package/dist/chunks/{install-FSJAC3CL.js → install-2K5BNXDO.js} +1 -1
  12. package/dist/chunks/{intro-PN7LT6ZG.js → intro-PTGUS5FN.js} +1 -1
  13. package/dist/chunks/{kill-Z7ZDY5MB.js → kill-IX7HNMVP.js} +12 -4
  14. package/dist/chunks/{list-45SHVKXO.js → list-BJTV6SPK.js} +1 -1
  15. package/dist/chunks/{repl-PSADU3MJ.js → repl-QNXLTQYU.js} +4 -4
  16. package/dist/chunks/{resolver-YEUZSOS4.js → resolver-4IZNQ3QJ.js} +2 -2
  17. package/dist/chunks/{run-CYGL3HTA.js → run-BFGVSKV7.js} +3 -3
  18. package/dist/chunks/{rune-OQX5EYSQ.js → rune-RNJCIH4L.js} +5 -4
  19. package/dist/chunks/{runner-VUSHR2OR.js → runner-RYJO4AN3.js} +3 -2
  20. package/dist/chunks/{uninstall-MSCIWDWV.js → uninstall-X75QTERD.js} +1 -1
  21. package/dist/chunks/{update-IHCYA3JW.js → update-HHIDPHGX.js} +1 -1
  22. package/dist/chunks/{utils-DJ3BXOQC.js → utils-N6QJKOAO.js} +1 -1
  23. package/dist/chunks/{version-SBE7LQ5C.js → version-CYVVKOVG.js} +1 -1
  24. package/dist/cli.js +14 -14
  25. package/dist/test/index.js +227 -44
  26. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  joinBracketTokens,
3
3
  parseBracketKey
4
- } from "./chunk-3VFNNPQI.js";
4
+ } from "./chunk-JDPQACG7.js";
5
5
  import {
6
6
  output
7
7
  } from "./chunk-RQ6KHY6W.js";
@@ -11,8 +11,8 @@ import {
11
11
  } from "./chunk-AFAVAB5Q.js";
12
12
  import {
13
13
  runRune
14
- } from "./chunk-QAP63JIK.js";
15
- import "./chunk-ATI5HNNC.js";
14
+ } from "./chunk-W2A4ECOP.js";
15
+ import "./chunk-NCSTZMBQ.js";
16
16
  import "./chunk-UKAIACRQ.js";
17
17
  import "./chunk-HQUMVDQE.js";
18
18
  import {
@@ -352,10 +352,12 @@ async function updatePlugin(pluginKey, newPluginDir, newPluginJson, projectDir,
352
352
  }
353
353
  async function setEnabled(projectDir, pluginKey, enabled, global) {
354
354
  if (!projectDir && !global) return;
355
- try {
356
- await setPluginEnabled(getConfigPath({ configRoot: projectDir, global }), pluginKey, enabled);
357
- } catch {
355
+ const configPath = getConfigPath({ configRoot: projectDir, global });
356
+ if (readRawConfig(configPath) === null) {
357
+ if (!global) return;
358
+ await writeRawConfig(configPath, { runes: {} });
358
359
  }
360
+ await setPluginEnabled(configPath, pluginKey, enabled);
359
361
  }
360
362
  async function removeEnabled(projectDir, pluginKey, global) {
361
363
  if (!projectDir && !global) return;
@@ -22,6 +22,9 @@ function jobStderrPath(projectDir, id) {
22
22
  function jobStdinPath(projectDir, id) {
23
23
  return join(jobDir(projectDir, id), "stdin.log");
24
24
  }
25
+ function jobPgidPath(projectDir, id) {
26
+ return join(jobDir(projectDir, id), "pgid");
27
+ }
25
28
  async function updateJobPid(projectDir, id, pid) {
26
29
  const record = await getJob(projectDir, id);
27
30
  if (!record) return;
@@ -97,6 +100,7 @@ export {
97
100
  jobStdoutPath,
98
101
  jobStderrPath,
99
102
  jobStdinPath,
103
+ jobPgidPath,
100
104
  updateJobPid,
101
105
  createJob,
102
106
  getJob,
@@ -5,10 +5,10 @@ import {
5
5
  import {
6
6
  describeConfigLayers,
7
7
  runRune
8
- } from "./chunk-QAP63JIK.js";
8
+ } from "./chunk-W2A4ECOP.js";
9
9
  import {
10
10
  renderSection
11
- } from "./chunk-ATI5HNNC.js";
11
+ } from "./chunk-NCSTZMBQ.js";
12
12
  import {
13
13
  loadConfig
14
14
  } from "./chunk-YUI5RTLD.js";
@@ -216,7 +216,7 @@ async function handler({
216
216
  process.exit(1);
217
217
  }
218
218
  if (isBatch) {
219
- const { resolvePluginRune } = await import("./resolver-YEUZSOS4.js");
219
+ const { resolvePluginRune } = await import("./resolver-4IZNQ3QJ.js");
220
220
  const { loadPluginJson } = await import("./manifest-6KLIS7BL.js");
221
221
  for (const seg of segments) {
222
222
  let entry = config.runes?.[seg.key] ?? {};
@@ -440,7 +440,7 @@ async function getRunBlockSchema(desc, projectDir, { vars = {}, runeKey = null }
440
440
  if (/\.json$/i.test(desc.argsModule)) {
441
441
  return loadJsonSchema(desc.argsModule, relative(projectDir, desc.argsModule).replace(/\\/g, "/") || desc.argsModule);
442
442
  }
443
- const { getArgsSchema } = await import("./runner-VUSHR2OR.js");
443
+ const { getArgsSchema } = await import("./runner-RYJO4AN3.js");
444
444
  return getArgsSchema(desc.argsModule, blockGrants({ permissions: desc.argsPermissions }), projectDir, { vars, runeKey });
445
445
  }
446
446
  function parseOutputLine(line) {
@@ -474,7 +474,7 @@ async function runRunBlock({ dir, key, args, entry, opts = {}, configDir, runeCa
474
474
  const desc = describeRunBlock(entry, configDir);
475
475
  let callArgs = [...desc.argv, ...args];
476
476
  if (desc.runtime === "isolate") {
477
- const { runRuneInIsolate } = await import("./runner-VUSHR2OR.js");
477
+ const { runRuneInIsolate } = await import("./runner-RYJO4AN3.js");
478
478
  return runRuneInIsolate(desc.command, blockGrants(desc), callArgs, dir, {
479
479
  runeCallback,
480
480
  sections: opts.sections ?? null,