@darkrymit/crunes-cli 0.10.0 → 0.10.2

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 (40) hide show
  1. package/dist/chunks/{add-MSX6XSU3.js → add-2OM5KGN5.js} +2 -3
  2. package/dist/chunks/{apply-LOIJIPLR.js → apply-GBUQQ4XF.js} +7 -4
  3. package/dist/chunks/{benchmark-3IHFP3V2.js → benchmark-5OWBATUN.js} +6 -6
  4. package/dist/chunks/{chunk-2FI6KN3C.js → chunk-3KKRNQQU.js} +5 -13
  5. package/dist/chunks/{chunk-6IC6ZJ74.js → chunk-AG4PDJSY.js} +98 -10
  6. package/dist/chunks/{chunk-SUCYDYMU.js → chunk-E7CZPAM2.js} +1 -1
  7. package/dist/chunks/{chunk-KUEMDPNG.js → chunk-EHKFHILS.js} +4 -4
  8. package/dist/chunks/{chunk-DTOYFY3Z.js → chunk-JBQXPW7P.js} +2 -2
  9. package/dist/chunks/{chunk-KSQDFE5N.js → chunk-KQMTTEJV.js} +3 -3
  10. package/dist/chunks/{chunk-H2OT7D6N.js → chunk-MOAQLHP2.js} +8 -8
  11. package/dist/chunks/{chunk-XDMMSZIL.js → chunk-MUWDZJN2.js} +1 -1
  12. package/dist/chunks/{chunk-RVBAAXRY.js → chunk-NJVPLN5D.js} +4 -4
  13. package/dist/chunks/{chunk-PBGUKXT6.js → chunk-TXCUSUZ6.js} +2291 -1812
  14. package/dist/chunks/chunk-WE4HDHFU.js +37 -0
  15. package/dist/chunks/{create-Y4LHLWGL.js → create-2CQZF53Z.js} +2 -3
  16. package/dist/chunks/{create-LPLNCOW4.js → create-3TDAFVL2.js} +130 -32
  17. package/dist/chunks/{create-DXW4YYLJ.js → create-EC6TQW7N.js} +20 -4
  18. package/dist/chunks/{disable-TITOSMXB.js → disable-FB64CSYV.js} +2 -3
  19. package/dist/chunks/{doctor-R2Y6UAY4.js → doctor-WXTY6RGK.js} +5 -5
  20. package/dist/chunks/{enable-LGTPDWPV.js → enable-UVXHTKCJ.js} +2 -3
  21. package/dist/chunks/{init-KO2HLED5.js → init-GPNC7TR5.js} +2 -3
  22. package/dist/chunks/{install-7IRUAGSF.js → install-3G7U5ZIO.js} +5 -5
  23. package/dist/chunks/{intro-JNJ6A75J.js → intro-3FSOGWPR.js} +3 -3
  24. package/dist/chunks/{list-BCCM3TLP.js → list-J2UCBYAY.js} +1 -2
  25. package/dist/chunks/{list-QVZKR3IE.js → list-JB4447YK.js} +3 -3
  26. package/dist/chunks/{list-MLKZE36K.js → list-W4JAYPAA.js} +4 -4
  27. package/dist/chunks/{repl-5GDN3RAO.js → repl-32TENE2U.js} +7 -7
  28. package/dist/chunks/{resolver-CA2A32AC.js → resolver-WN4HKKBV.js} +5 -5
  29. package/dist/chunks/{run-WL3IZBXF.js → run-WD2ZA63Z.js} +6 -6
  30. package/dist/chunks/{rune-YA4TFHTB.js → rune-TSED6W3R.js} +7 -7
  31. package/dist/chunks/{runner-QNZMBHQY.js → runner-KA3YHICN.js} +4 -2
  32. package/dist/chunks/{trust-BFIDANXD.js → trust-LXXYSF6W.js} +2 -2
  33. package/dist/chunks/{uninstall-3MWZIZVA.js → uninstall-J7JUYETA.js} +5 -5
  34. package/dist/chunks/{update-W4MJUTTW.js → update-ZJRLDCUT.js} +5 -5
  35. package/dist/chunks/{utils-B2QULX5J.js → utils-VVD4VCTC.js} +1 -1
  36. package/dist/chunks/{version-FLHI5KFS.js → version-HUA2QNMT.js} +1 -1
  37. package/dist/cli.js +28 -32
  38. package/package.json +1 -1
  39. package/dist/chunks/chunk-YKIKJHYO.js +0 -94
  40. package/dist/chunks/migrate-Y3EKMVP5.js +0 -87
@@ -0,0 +1,37 @@
1
+ import {
2
+ init_require_shim
3
+ } from "./chunk-TPK5AGRA.js";
4
+
5
+ // src/core/rune-entry.js
6
+ init_require_shim();
7
+ import { join, isAbsolute } from "node:path";
8
+ var ISOLATE_MODULE = /\.rune\.m?js$/i;
9
+ function blockOf(entry, name) {
10
+ const block = entry?.[name];
11
+ if (block == null) return null;
12
+ return typeof block === "string" ? { command: block } : block;
13
+ }
14
+ function scopedPermissions(entry) {
15
+ const out = {};
16
+ for (const mode of ["run", "repl"]) {
17
+ const permissions = blockOf(entry, mode)?.permissions;
18
+ if (permissions) out[mode] = permissions;
19
+ }
20
+ return Object.keys(out).length ? out : void 0;
21
+ }
22
+ function blockModule(entry, mode, base) {
23
+ const command = blockOf(entry, mode)?.command;
24
+ if (!command) return null;
25
+ return isAbsolute(command) ? command : join(base, command);
26
+ }
27
+ function isolateName(file) {
28
+ if (ISOLATE_MODULE.test(file)) return file;
29
+ return file.replace(/\.(m?js)$/i, ".rune.$1");
30
+ }
31
+
32
+ export {
33
+ blockOf,
34
+ scopedPermissions,
35
+ blockModule,
36
+ isolateName
37
+ };
@@ -2,7 +2,7 @@ import {
2
2
  getConfigPath,
3
3
  readRawConfig,
4
4
  writeRawConfig
5
- } from "./chunk-SUCYDYMU.js";
5
+ } from "./chunk-E7CZPAM2.js";
6
6
  import {
7
7
  output
8
8
  } from "./chunk-MIKWIFYR.js";
@@ -13,10 +13,9 @@ import {
13
13
  ye
14
14
  } from "./chunk-CGZL5SSH.js";
15
15
  import "./chunk-WCODTMDN.js";
16
- import "./chunk-2FI6KN3C.js";
16
+ import "./chunk-3KKRNQQU.js";
17
17
  import "./chunk-UBCAZGLE.js";
18
18
  import "./chunk-VP7YLCQP.js";
19
- import "./chunk-YKIKJHYO.js";
20
19
  import {
21
20
  getStorePath
22
21
  } from "./chunk-2Q3KLBE6.js";
@@ -2,7 +2,7 @@ import {
2
2
  getConfigPath,
3
3
  readRawConfig,
4
4
  writeRawConfig
5
- } from "./chunk-SUCYDYMU.js";
5
+ } from "./chunk-E7CZPAM2.js";
6
6
  import {
7
7
  output
8
8
  } from "./chunk-MIKWIFYR.js";
@@ -14,10 +14,9 @@ import {
14
14
  ye
15
15
  } from "./chunk-CGZL5SSH.js";
16
16
  import "./chunk-WCODTMDN.js";
17
- import "./chunk-2FI6KN3C.js";
17
+ import "./chunk-3KKRNQQU.js";
18
18
  import "./chunk-UBCAZGLE.js";
19
19
  import "./chunk-VP7YLCQP.js";
20
- import "./chunk-YKIKJHYO.js";
21
20
  import {
22
21
  getStorePath
23
22
  } from "./chunk-2Q3KLBE6.js";
@@ -29,8 +28,100 @@ import {
29
28
  // src/rune/commands/create.js
30
29
  init_require_shim();
31
30
  import { mkdir, writeFile } from "node:fs/promises";
31
+ import { existsSync } from "node:fs";
32
32
  import { join, dirname } from "node:path";
33
33
  var VALID_FORMATS = ["tree", "markdown"];
34
+ function runeTestTemplate(key) {
35
+ return [
36
+ `import { describe, it } from 'node:test'`,
37
+ `import assert from 'node:assert/strict'`,
38
+ ``,
39
+ `describe('${key} rune', () => {`,
40
+ ` it('placeholder', () => {`,
41
+ ` assert.ok(true)`,
42
+ ` })`,
43
+ `})`,
44
+ ``
45
+ ].join("\n");
46
+ }
47
+ async function resolveTarget({ configRoot, global, plugin, project, isNonInteractive }) {
48
+ if (plugin && project) {
49
+ output.error("Cannot specify both --plugin and --project.");
50
+ process.exit(1);
51
+ }
52
+ if (global && plugin) {
53
+ output.error("Cannot specify both --global and --plugin.");
54
+ process.exit(1);
55
+ }
56
+ if (global) return "global";
57
+ if (plugin) return "plugin";
58
+ if (project) return "project";
59
+ const hasPlugin = existsSync(join(configRoot, ".crunes-plugin", "plugin.json"));
60
+ const hasProject = existsSync(join(configRoot, ".crunes", "config.json"));
61
+ if (hasPlugin && hasProject) {
62
+ if (isNonInteractive) {
63
+ output.error("Both .crunes-plugin/plugin.json and .crunes/config.json exist. Pass --plugin or --project.");
64
+ process.exit(1);
65
+ }
66
+ const picked = await Ee({
67
+ message: "Where should this rune be registered?",
68
+ options: [
69
+ { value: "plugin", label: "plugin (.crunes-plugin/plugin.json)", hint: "exported plugin rune" },
70
+ { value: "project", label: "project (.crunes/config.json)", hint: "dev-time project rune" }
71
+ ]
72
+ });
73
+ if (picked === /* @__PURE__ */ Symbol.for("clack:cancel")) return null;
74
+ return picked;
75
+ }
76
+ return hasPlugin ? "plugin" : "project";
77
+ }
78
+ function defaultRunePaths({ target, key, ext, pluginManifest }) {
79
+ if (target === "plugin") {
80
+ const isEmpty = Object.keys(pluginManifest?.runes ?? {}).length === 0;
81
+ return {
82
+ runeRelPath: isEmpty ? `src/index.${ext}` : `runes/${key}/src/index.${ext}`,
83
+ testRelPath: isEmpty ? `test/${key}.test.js` : `runes/${key}/test/${key}.test.js`
84
+ };
85
+ }
86
+ if (target === "global") {
87
+ return {
88
+ runeRelPath: `runes/${key}/src/index.${ext}`,
89
+ testRelPath: `runes/${key}/test/${key}.test.js`
90
+ };
91
+ }
92
+ return {
93
+ runeRelPath: `.crunes/runes/${key}/src/index.${ext}`,
94
+ testRelPath: `.crunes/runes/${key}/test/${key}.test.js`
95
+ };
96
+ }
97
+ async function registerRune({ target, configRoot, key, name, description, runeRelPath, isIsolate }) {
98
+ if (target === "plugin") {
99
+ const pluginJsonPath = join(configRoot, ".crunes-plugin", "plugin.json");
100
+ const manifest = readRawConfig(pluginJsonPath) ?? { format: "1", runes: {} };
101
+ if (manifest.runes?.[key] != null) {
102
+ output.error(`Rune "${key}" already exists in ${pluginJsonPath}.`);
103
+ process.exit(1);
104
+ }
105
+ const runBlock = isIsolate ? { command: runeRelPath, permissions: { allow: [], deny: [] } } : { command: runeRelPath };
106
+ manifest.runes = {
107
+ ...manifest.runes ?? {},
108
+ [key]: { ...name && { name }, ...description && { description }, run: runBlock }
109
+ };
110
+ await writeRawConfig(pluginJsonPath, manifest);
111
+ return;
112
+ }
113
+ const configPath = getConfigPath({ configRoot, global: target === "global" });
114
+ const config = readRawConfig(configPath) ?? { runes: {} };
115
+ if (config.runes?.[key] != null) {
116
+ output.error(`Rune "${key}" already exists in ${configPath}.`);
117
+ process.exit(1);
118
+ }
119
+ config.runes = {
120
+ ...config.runes ?? {},
121
+ [key]: { ...name && { name }, ...description && { description }, run: runeRelPath }
122
+ };
123
+ await writeRawConfig(configPath, config);
124
+ }
34
125
  var SCRIPT_LANGS = {
35
126
  python: {
36
127
  ext: "py",
@@ -83,7 +174,7 @@ var SCRIPT_LANGS = {
83
174
  }
84
175
  };
85
176
  var VALID_LANGS = Object.keys(SCRIPT_LANGS);
86
- async function createScriptRune({ key, lang, runeRelPath, name, description, configRoot, global }) {
177
+ async function createScriptRune({ key, lang, runeRelPath, name, description, configRoot, target }) {
87
178
  const spec = SCRIPT_LANGS[lang];
88
179
  if (!spec) {
89
180
  output.error(`Invalid --lang. Must be one of: ${VALID_LANGS.join(", ")}`);
@@ -93,21 +184,20 @@ async function createScriptRune({ key, lang, runeRelPath, name, description, con
93
184
  output.error("Missing required argument: <key>");
94
185
  process.exit(1);
95
186
  }
96
- runeRelPath = runeRelPath ?? (global ? `runes/${key}.${spec.ext}` : `.crunes/runes/${key}.${spec.ext}`);
97
- const runeAbsPath = join(global ? getStorePath() : configRoot, runeRelPath);
98
- const configPath = getConfigPath({ configRoot, global });
99
- const config = readRawConfig(configPath) ?? { runes: {} };
100
- if (config.runes?.[key] != null) {
101
- output.error(`Rune "${key}" already exists in ${configPath}.`);
102
- process.exit(1);
103
- }
187
+ const pluginManifest = target === "plugin" ? readRawConfig(join(configRoot, ".crunes-plugin", "plugin.json")) : null;
188
+ const defaults = defaultRunePaths({ target, key, ext: spec.ext, pluginManifest });
189
+ const hasCustomPath = Boolean(runeRelPath);
190
+ runeRelPath = runeRelPath ?? defaults.runeRelPath;
191
+ const baseRoot = target === "global" ? getStorePath() : configRoot;
192
+ const runeAbsPath = join(baseRoot, runeRelPath);
193
+ await registerRune({ target, configRoot, key, name, description, runeRelPath, isIsolate: false });
104
194
  await mkdir(dirname(runeAbsPath), { recursive: true });
105
195
  await writeFile(runeAbsPath, spec.body(key));
106
- config.runes = {
107
- ...config.runes ?? {},
108
- [key]: { ...name && { name }, ...description && { description }, run: runeRelPath }
109
- };
110
- await writeRawConfig(configPath, config);
196
+ if (!hasCustomPath) {
197
+ const testAbsPath = join(baseRoot, defaults.testRelPath);
198
+ await mkdir(dirname(testAbsPath), { recursive: true });
199
+ await writeFile(testAbsPath, runeTestTemplate(key));
200
+ }
111
201
  output.success(`Created ${runeRelPath} (${lang}, native)`);
112
202
  output.info(`Run: crunes run ${key}`);
113
203
  }
@@ -165,13 +255,22 @@ async function handler({
165
255
  yes = false,
166
256
  projectRoot = process.cwd(),
167
257
  configRoot = projectRoot,
168
- global = false
258
+ global = false,
259
+ plugin = false,
260
+ project = false
169
261
  } = {}) {
262
+ const isNonInteractive = yes || !process.stdout.isTTY;
263
+ const target = await resolveTarget({ configRoot, global, plugin, project, isNonInteractive });
264
+ if (!target) {
265
+ ge("Cancelled.");
266
+ return;
267
+ }
170
268
  if (lang) {
171
- await createScriptRune({ key, lang, runeRelPath, name, description, configRoot, global });
269
+ await createScriptRune({ key, lang, runeRelPath, name, description, configRoot, target });
172
270
  return;
173
271
  }
174
- const isNonInteractive = yes || !process.stdout.isTTY;
272
+ const pluginManifest = target === "plugin" ? readRawConfig(join(configRoot, ".crunes-plugin", "plugin.json")) : null;
273
+ const defaults = key ? defaultRunePaths({ target, key, ext: "rune.js", pluginManifest }) : null;
175
274
  if (isNonInteractive) {
176
275
  if (!key) {
177
276
  output.error("Missing required argument: <key>");
@@ -210,7 +309,7 @@ async function handler({
210
309
  format = result;
211
310
  }
212
311
  if (!runeRelPath) {
213
- const defaultPath = global ? `runes/${key}.rune.js` : `.crunes/runes/${key}.rune.js`;
312
+ const defaultPath = defaultRunePaths({ target, key, ext: "rune.js", pluginManifest }).runeRelPath;
214
313
  const result = await Re({ message: "File path?", initialValue: defaultPath });
215
314
  if (result === /* @__PURE__ */ Symbol.for("clack:cancel")) {
216
315
  ge("Cancelled.");
@@ -235,24 +334,23 @@ async function handler({
235
334
  description = result || void 0;
236
335
  }
237
336
  }
238
- runeRelPath = runeRelPath ?? (global ? `runes/${key}.rune.js` : `.crunes/runes/${key}.rune.js`);
337
+ const finalDefaults = defaults ?? defaultRunePaths({ target, key, ext: "rune.js", pluginManifest });
338
+ const hasCustomPath = Boolean(runeRelPath);
339
+ runeRelPath = runeRelPath ?? finalDefaults.runeRelPath;
239
340
  if (!/\.rune\.m?js$/i.test(runeRelPath)) {
240
341
  output.error(`${runeRelPath}: a sandboxed rune's file must be named *.rune.js \u2014 the name is what runs it in the isolate.`);
241
342
  process.exit(1);
242
343
  }
243
- const baseRoot = global ? getStorePath() : configRoot;
344
+ const baseRoot = target === "global" ? getStorePath() : configRoot;
244
345
  const runeAbsPath = join(baseRoot, runeRelPath);
346
+ await registerRune({ target, configRoot, key, name, description, runeRelPath, isIsolate: true });
245
347
  await mkdir(dirname(runeAbsPath), { recursive: true });
246
348
  await writeFile(runeAbsPath, template(key, format));
247
- const configPath = getConfigPath({ configRoot, global });
248
- const config = readRawConfig(configPath) ?? { runes: {} };
249
- const entry = {
250
- ...name && { name },
251
- ...description && { description },
252
- run: runeRelPath
253
- };
254
- config.runes = { ...config.runes ?? {}, [key]: entry };
255
- await writeRawConfig(configPath, config);
349
+ if (!hasCustomPath) {
350
+ const testAbsPath = join(baseRoot, finalDefaults.testRelPath);
351
+ await mkdir(dirname(testAbsPath), { recursive: true });
352
+ await writeFile(testAbsPath, runeTestTemplate(key));
353
+ }
256
354
  if (!isNonInteractive) {
257
355
  fe(`Created ${runeRelPath}
258
356
  Run: crunes run ${key}`);
@@ -18,7 +18,7 @@ init_require_shim();
18
18
  import { mkdir, writeFile, readdir } from "node:fs/promises";
19
19
  import { join, resolve, dirname } from "node:path";
20
20
  import { spawnSync } from "node:child_process";
21
- function pluginJson({ name, description, author, license }) {
21
+ function pluginJson({ name, description, author, license, multi = false }) {
22
22
  return JSON.stringify({
23
23
  format: "1",
24
24
  runes: {
@@ -26,7 +26,7 @@ function pluginJson({ name, description, author, license }) {
26
26
  name: "Example Rune",
27
27
  description: "Replace with your rune description",
28
28
  run: {
29
- command: "runes/example.rune.js",
29
+ command: multi ? "runes/example/src/index.rune.js" : "src/index.rune.js",
30
30
  permissions: {
31
31
  allow: [],
32
32
  deny: []
@@ -135,6 +135,17 @@ function changelogMd() {
135
135
  - Initial release
136
136
  `;
137
137
  }
138
+ function exampleTest() {
139
+ return `import { describe, it } from 'node:test'
140
+ import assert from 'node:assert/strict'
141
+
142
+ describe('example rune', () => {
143
+ it('placeholder', () => {
144
+ assert.ok(true)
145
+ })
146
+ })
147
+ `;
148
+ }
138
149
  function getGitAuthor() {
139
150
  const result = spawnSync("git", ["config", "user.name"], { encoding: "utf8" });
140
151
  return result.status === 0 ? result.stdout.trim() : "";
@@ -145,6 +156,7 @@ async function handler({
145
156
  author,
146
157
  license,
147
158
  out,
159
+ multi = false,
148
160
  yes = false,
149
161
  projectRoot = process.cwd()
150
162
  } = {}) {
@@ -212,11 +224,14 @@ async function handler({
212
224
  return;
213
225
  }
214
226
  }
215
- const opts = { name, description, author, license };
227
+ const opts = { name, description, author, license, multi };
228
+ const runeEntry = multi ? join(outDir, "runes", "example", "src", "index.rune.js") : join(outDir, "src", "index.rune.js");
229
+ const testEntry = multi ? join(outDir, "runes", "example", "test", "example.test.js") : join(outDir, "test", `${name}.test.js`);
216
230
  const files = [
217
231
  [join(outDir, ".crunes-plugin", "plugin.json"), pluginJson(opts)],
218
232
  [join(outDir, ".crunes-plugin", "marketplace.json"), marketplaceJson(opts)],
219
- [join(outDir, "runes", "example.rune.js"), exampleRune()],
233
+ [runeEntry, exampleRune()],
234
+ [testEntry, exampleTest()],
220
235
  [join(outDir, "templates", "example-template.js"), exampleTemplate()],
221
236
  [join(outDir, "README.md"), readmeMd(opts)],
222
237
  [join(outDir, "CHANGELOG.md"), changelogMd()]
@@ -241,6 +256,7 @@ export {
241
256
  changelogMd,
242
257
  exampleRune,
243
258
  exampleTemplate,
259
+ exampleTest,
244
260
  handler,
245
261
  marketplaceJson,
246
262
  pluginJson,
@@ -1,14 +1,13 @@
1
1
  import {
2
2
  getConfigPath,
3
3
  setPluginEnabled
4
- } from "./chunk-SUCYDYMU.js";
4
+ } from "./chunk-E7CZPAM2.js";
5
5
  import {
6
6
  enabledPluginKeys,
7
7
  loadConfig
8
- } from "./chunk-2FI6KN3C.js";
8
+ } from "./chunk-3KKRNQQU.js";
9
9
  import "./chunk-UBCAZGLE.js";
10
10
  import "./chunk-VP7YLCQP.js";
11
- import "./chunk-YKIKJHYO.js";
12
11
  import "./chunk-2Q3KLBE6.js";
13
12
  import "./chunk-55GTJG5I.js";
14
13
  import {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getConfigPath,
3
3
  readRawConfig
4
- } from "./chunk-SUCYDYMU.js";
4
+ } from "./chunk-E7CZPAM2.js";
5
5
  import {
6
6
  output
7
7
  } from "./chunk-MIKWIFYR.js";
@@ -9,7 +9,7 @@ import "./chunk-CGZL5SSH.js";
9
9
  import "./chunk-WCODTMDN.js";
10
10
  import {
11
11
  describeRunBlock
12
- } from "./chunk-DTOYFY3Z.js";
12
+ } from "./chunk-JBQXPW7P.js";
13
13
  import {
14
14
  assertNotMissedRename,
15
15
  onPath,
@@ -19,11 +19,11 @@ import {
19
19
  isNativeRune,
20
20
  trustDigest,
21
21
  trustState
22
- } from "./chunk-XDMMSZIL.js";
22
+ } from "./chunk-MUWDZJN2.js";
23
23
  import {
24
24
  coercePlugins,
25
25
  loadConfig
26
- } from "./chunk-2FI6KN3C.js";
26
+ } from "./chunk-3KKRNQQU.js";
27
27
  import "./chunk-UBCAZGLE.js";
28
28
  import {
29
29
  loadRegistry
@@ -34,7 +34,7 @@ import {
34
34
  import {
35
35
  loadJsonSchema
36
36
  } from "./chunk-VP7YLCQP.js";
37
- import "./chunk-YKIKJHYO.js";
37
+ import "./chunk-WE4HDHFU.js";
38
38
  import "./chunk-MVCBPI4J.js";
39
39
  import "./chunk-GVMT55GH.js";
40
40
  import "./chunk-2HM5Q52B.js";
@@ -1,15 +1,14 @@
1
1
  import {
2
2
  getConfigPath,
3
3
  setPluginEnabled
4
- } from "./chunk-SUCYDYMU.js";
5
- import "./chunk-2FI6KN3C.js";
4
+ } from "./chunk-E7CZPAM2.js";
5
+ import "./chunk-3KKRNQQU.js";
6
6
  import "./chunk-UBCAZGLE.js";
7
7
  import {
8
8
  loadRegistry,
9
9
  resolvePluginKey
10
10
  } from "./chunk-MTJ2KW3V.js";
11
11
  import "./chunk-VP7YLCQP.js";
12
- import "./chunk-YKIKJHYO.js";
13
12
  import "./chunk-2Q3KLBE6.js";
14
13
  import "./chunk-55GTJG5I.js";
15
14
  import {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getConfigPath
3
- } from "./chunk-SUCYDYMU.js";
3
+ } from "./chunk-E7CZPAM2.js";
4
4
  import {
5
5
  output
6
6
  } from "./chunk-MIKWIFYR.js";
@@ -11,10 +11,9 @@ import {
11
11
  ye
12
12
  } from "./chunk-CGZL5SSH.js";
13
13
  import "./chunk-WCODTMDN.js";
14
- import "./chunk-2FI6KN3C.js";
14
+ import "./chunk-3KKRNQQU.js";
15
15
  import "./chunk-UBCAZGLE.js";
16
16
  import "./chunk-VP7YLCQP.js";
17
- import "./chunk-YKIKJHYO.js";
18
17
  import "./chunk-2Q3KLBE6.js";
19
18
  import "./chunk-55GTJG5I.js";
20
19
  import {
@@ -3,20 +3,20 @@ import {
3
3
  } from "./chunk-YVN3VDRE.js";
4
4
  import {
5
5
  installPlugin
6
- } from "./chunk-RVBAAXRY.js";
7
- import "./chunk-SUCYDYMU.js";
6
+ } from "./chunk-NJVPLN5D.js";
7
+ import "./chunk-E7CZPAM2.js";
8
8
  import {
9
9
  output
10
10
  } from "./chunk-MIKWIFYR.js";
11
11
  import "./chunk-CGZL5SSH.js";
12
12
  import "./chunk-WCODTMDN.js";
13
- import "./chunk-XDMMSZIL.js";
14
- import "./chunk-2FI6KN3C.js";
13
+ import "./chunk-MUWDZJN2.js";
14
+ import "./chunk-3KKRNQQU.js";
15
15
  import "./chunk-UBCAZGLE.js";
16
16
  import "./chunk-MTJ2KW3V.js";
17
17
  import "./chunk-FIAFVIAN.js";
18
18
  import "./chunk-VP7YLCQP.js";
19
- import "./chunk-YKIKJHYO.js";
19
+ import "./chunk-WE4HDHFU.js";
20
20
  import "./chunk-2Q3KLBE6.js";
21
21
  import "./chunk-55GTJG5I.js";
22
22
  import {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  utils_api_default
3
- } from "./chunk-PBGUKXT6.js";
3
+ } from "./chunk-TXCUSUZ6.js";
4
4
  import {
5
5
  globals_api_default
6
6
  } from "./chunk-V35LVVNV.js";
@@ -2664,7 +2664,7 @@ async function compileIntro() {
2664
2664
  lines.push(" }");
2665
2665
  lines.push("}");
2666
2666
  lines.push("```");
2667
- lines.push('A block written as a string is shorthand for `{ "command": \u2026 }`. An entry in the old shape \u2014 `path`, `permissions.run`, or none at all relying on `.crunes/runes/<key>.js` \u2014 is refused; `crunes migrate` rewrites every entry and renames the modules.');
2667
+ lines.push('A block written as a string is shorthand for `{ "command": \u2026 }`.');
2668
2668
  lines.push("");
2669
2669
  lines.push('To grant a **plugin** rune extra permissions or vars from the project side (plugin runes have no `runes.<key>` entry of their own), add an entry keyed by the fully-qualified `"marketplace@plugin:runeKey"` string \u2014 **this must always be the full form, never the bare plugin name**, since two enabled plugins could share a bare name and a bare-form key can never resolve to anything (config loading rejects a bare-form key outright).');
2670
2670
  lines.push("```json");
@@ -2723,7 +2723,7 @@ async function compileIntro() {
2723
2723
  lines.push("");
2724
2724
  lines.push("### Config File Fields Reference");
2725
2725
  lines.push('- **`runes`**: Definition of project-registered runes, keyed by rune key (or the fully-qualified `"marketplace@plugin:runeKey"` string for a plugin-rune override \u2014 never a bare plugin name). Each entry declares a `run` block (and optionally `args` \u2014 see Script Runes \u2014 and `repl`), `name`, `description` and `vars` (key-value settings read via `utils.vars.read(key)`); or `plugin` (an alias to a specific plugin rune, see above). Grants live inside the `run` and `repl` blocks as `{ "allow": [...], "deny": [...] }`; a plugin alias or `marketplace@plugin:rune` override may carry blocks with only `permissions`.');
2726
- lines.push('- **`plugins`**: Map of plugin key to a boolean, e.g. `{"my-market@my-plugin": true}`. A legacy array of keys is still read and is converted to map form on the next write. `false` is meaningful: it turns a plugin off in this layer even though a lower layer enabled it.');
2726
+ lines.push('- **`plugins`**: Map of plugin key to a boolean, e.g. `{"my-market@my-plugin": true}`. `false` is meaningful: it turns a plugin off in this layer even though a lower layer enabled it.');
2727
2727
  lines.push("- **`templates`**: Definition of registered templates, keyed by template name, merged across layers exactly like `runes`.");
2728
2728
  lines.push("");
2729
2729
  lines.push("### Config Layers");
@@ -8,7 +8,7 @@ import "./chunk-CGZL5SSH.js";
8
8
  import "./chunk-WCODTMDN.js";
9
9
  import {
10
10
  loadConfig
11
- } from "./chunk-2FI6KN3C.js";
11
+ } from "./chunk-3KKRNQQU.js";
12
12
  import "./chunk-UBCAZGLE.js";
13
13
  import {
14
14
  loadRegistry
@@ -17,7 +17,6 @@ import {
17
17
  loadPluginJson
18
18
  } from "./chunk-FIAFVIAN.js";
19
19
  import "./chunk-VP7YLCQP.js";
20
- import "./chunk-YKIKJHYO.js";
21
20
  import "./chunk-2Q3KLBE6.js";
22
21
  import "./chunk-55GTJG5I.js";
23
22
  import {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  isNativeRune
3
- } from "./chunk-XDMMSZIL.js";
3
+ } from "./chunk-MUWDZJN2.js";
4
4
  import {
5
5
  loadConfig
6
- } from "./chunk-2FI6KN3C.js";
6
+ } from "./chunk-3KKRNQQU.js";
7
7
  import "./chunk-UBCAZGLE.js";
8
8
  import {
9
9
  loadRegistry
@@ -12,7 +12,7 @@ import {
12
12
  loadPluginJson
13
13
  } from "./chunk-FIAFVIAN.js";
14
14
  import "./chunk-VP7YLCQP.js";
15
- import "./chunk-YKIKJHYO.js";
15
+ import "./chunk-WE4HDHFU.js";
16
16
  import "./chunk-2Q3KLBE6.js";
17
17
  import "./chunk-55GTJG5I.js";
18
18
  import {
@@ -3,23 +3,23 @@ import {
3
3
  } from "./chunk-DMMC4X27.js";
4
4
  import {
5
5
  enumerateRunes
6
- } from "./chunk-KSQDFE5N.js";
6
+ } from "./chunk-KQMTTEJV.js";
7
7
  import {
8
8
  output
9
9
  } from "./chunk-MIKWIFYR.js";
10
10
  import "./chunk-CGZL5SSH.js";
11
11
  import "./chunk-WCODTMDN.js";
12
12
  import "./chunk-2DNYVKBF.js";
13
- import "./chunk-XDMMSZIL.js";
13
+ import "./chunk-MUWDZJN2.js";
14
14
  import {
15
15
  LAYER,
16
16
  ROOTLESS,
17
17
  loadConfig
18
- } from "./chunk-2FI6KN3C.js";
18
+ } from "./chunk-3KKRNQQU.js";
19
19
  import "./chunk-UBCAZGLE.js";
20
20
  import "./chunk-MTJ2KW3V.js";
21
21
  import "./chunk-VP7YLCQP.js";
22
- import "./chunk-YKIKJHYO.js";
22
+ import "./chunk-WE4HDHFU.js";
23
23
  import "./chunk-2HM5Q52B.js";
24
24
  import "./chunk-2Q3KLBE6.js";
25
25
  import "./chunk-55GTJG5I.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  parseSegment,
3
3
  permissionHint
4
- } from "./chunk-KUEMDPNG.js";
4
+ } from "./chunk-EHKFHILS.js";
5
5
  import {
6
6
  tailStdin
7
7
  } from "./chunk-EO3CSXWK.js";
@@ -13,20 +13,20 @@ import "./chunk-CGZL5SSH.js";
13
13
  import "./chunk-WCODTMDN.js";
14
14
  import {
15
15
  describeConfigLayers
16
- } from "./chunk-H2OT7D6N.js";
16
+ } from "./chunk-MOAQLHP2.js";
17
17
  import {
18
18
  formatSection
19
- } from "./chunk-DTOYFY3Z.js";
19
+ } from "./chunk-JBQXPW7P.js";
20
20
  import "./chunk-2DNYVKBF.js";
21
- import "./chunk-XDMMSZIL.js";
21
+ import "./chunk-MUWDZJN2.js";
22
22
  import {
23
23
  loadConfig
24
- } from "./chunk-2FI6KN3C.js";
24
+ } from "./chunk-3KKRNQQU.js";
25
25
  import "./chunk-UBCAZGLE.js";
26
26
  import "./chunk-MTJ2KW3V.js";
27
27
  import "./chunk-FIAFVIAN.js";
28
28
  import "./chunk-VP7YLCQP.js";
29
- import "./chunk-YKIKJHYO.js";
29
+ import "./chunk-WE4HDHFU.js";
30
30
  import {
31
31
  isGlobMatch
32
32
  } from "./chunk-MVCBPI4J.js";
@@ -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-CA2A32AC.js");
160
+ const { resolveRuneEntry } = await import("./resolver-WN4HKKBV.js");
161
161
  let runeEntry;
162
162
  try {
163
163
  runeEntry = await resolveRuneEntry(projectRoot, config, key, configRoot);
@@ -4,19 +4,19 @@ import {
4
4
  resolveRuneEntry,
5
5
  resolveRuneFromPlugins,
6
6
  runRune
7
- } from "./chunk-H2OT7D6N.js";
8
- import "./chunk-DTOYFY3Z.js";
7
+ } from "./chunk-MOAQLHP2.js";
8
+ import "./chunk-JBQXPW7P.js";
9
9
  import "./chunk-2DNYVKBF.js";
10
- import "./chunk-XDMMSZIL.js";
10
+ import "./chunk-MUWDZJN2.js";
11
11
  import {
12
12
  getRune,
13
13
  normaliseRune
14
- } from "./chunk-2FI6KN3C.js";
14
+ } from "./chunk-3KKRNQQU.js";
15
15
  import "./chunk-UBCAZGLE.js";
16
16
  import "./chunk-MTJ2KW3V.js";
17
17
  import "./chunk-FIAFVIAN.js";
18
18
  import "./chunk-VP7YLCQP.js";
19
- import "./chunk-YKIKJHYO.js";
19
+ import "./chunk-WE4HDHFU.js";
20
20
  import "./chunk-MVCBPI4J.js";
21
21
  import "./chunk-GVMT55GH.js";
22
22
  import "./chunk-2HM5Q52B.js";