@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.
- package/dist/chunks/{benchmark-Y2FTRSOP.js → benchmark-A7DPPZUW.js} +3 -3
- package/dist/chunks/{chunk-JDPQACG7.js → chunk-6P4O4KTM.js} +3 -3
- package/dist/chunks/{chunk-SPXPSPM7.js → chunk-Q74KNCQU.js} +5 -3
- package/dist/chunks/{chunk-QFW2V36K.js → chunk-RMATXIQR.js} +10 -8
- package/dist/chunks/{chunk-NCSTZMBQ.js → chunk-RSWRJRXY.js} +2 -2
- package/dist/chunks/{chunk-ZO2JKBJX.js → chunk-XDMUY57P.js} +2945 -2040
- package/dist/chunks/{chunk-W2A4ECOP.js → chunk-ZUCXO4U2.js} +5 -5
- package/dist/chunks/{create-676JD63L.js → create-55VUMBHT.js} +1 -1
- package/dist/chunks/{create-WHYUMBIP.js → create-E3ACC6RE.js} +1 -1
- package/dist/chunks/{create-UUYJ76JB.js → create-W3N3SDAH.js} +1 -1
- package/dist/chunks/{doctor-Q6FZHDMH.js → doctor-GWXRRGSP.js} +1 -1
- package/dist/chunks/{intro-PTGUS5FN.js → intro-WGKSPFHP.js} +1 -1
- package/dist/chunks/{repl-QNXLTQYU.js → repl-73VHB2E5.js} +4 -4
- package/dist/chunks/{resolver-4IZNQ3QJ.js → resolver-SZFXFIYZ.js} +2 -2
- package/dist/chunks/{run-BFGVSKV7.js → run-FNNK5C65.js} +3 -3
- package/dist/chunks/{rune-RNJCIH4L.js → rune-O4WXVDRJ.js} +3 -3
- package/dist/chunks/{runner-RYJO4AN3.js → runner-OU2W6JAG.js} +1 -1
- package/dist/chunks/{utils-N6QJKOAO.js → utils-ZHBJUFJT.js} +1 -1
- package/dist/chunks/{version-CYVVKOVG.js → version-VHAKR4T6.js} +1 -1
- package/dist/cli.js +12 -12
- package/package.json +1 -1
|
@@ -212,7 +212,7 @@ async function createScriptRune({ key, lang, runeRelPath, name, description, con
|
|
|
212
212
|
output.info(`Run: crunes run ${key}`);
|
|
213
213
|
}
|
|
214
214
|
function template(key, format) {
|
|
215
|
-
const imports = format === "tree" ? `import { md, section, tree } from '@utils'` : `import { md, section } from '@utils'`;
|
|
215
|
+
const imports = format === "tree" ? `import { md, rune, section, tree } from '@utils'` : `import { md, rune, section } from '@utils'`;
|
|
216
216
|
const header = [
|
|
217
217
|
`// permissions:`,
|
|
218
218
|
`// run:`,
|
|
@@ -221,17 +221,19 @@ function template(key, format) {
|
|
|
221
221
|
``,
|
|
222
222
|
imports,
|
|
223
223
|
``,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
224
|
+
`export async function args(b) {`,
|
|
225
|
+
` return b`,
|
|
226
|
+
` .option('-h, --help', 'Show help')`,
|
|
227
|
+
` .option('-v, --verbose', 'Verbose output', false)`,
|
|
228
|
+
`}`,
|
|
229
229
|
``,
|
|
230
230
|
`export async function run(args) {`,
|
|
231
|
+
` const stop = rune.guard(args)`,
|
|
232
|
+
` if (stop) return stop`,
|
|
233
|
+
``,
|
|
231
234
|
` // args._ \u2014 data positionals (command tokens stripped)`,
|
|
232
235
|
` // args.$rest \u2014 unmapped positional arguments`,
|
|
233
|
-
` // args.verbose \u2014 named flag (
|
|
234
|
-
` // utils.fs.cwd() \u2014 absolute path to the project root`
|
|
236
|
+
` // args.verbose \u2014 named flag (defined in args() above)`
|
|
235
237
|
].join("\n");
|
|
236
238
|
if (format === "tree") {
|
|
237
239
|
return header + "\n" + [
|
|
@@ -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-
|
|
443
|
+
const { getArgsSchema } = await import("./runner-OU2W6JAG.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-
|
|
477
|
+
const { runRuneInIsolate } = await import("./runner-OU2W6JAG.js");
|
|
478
478
|
return runRuneInIsolate(desc.command, blockGrants(desc), callArgs, dir, {
|
|
479
479
|
runeCallback,
|
|
480
480
|
sections: opts.sections ?? null,
|