@poe-platform/safe-bash 0.1.789 → 0.1.790
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/image-ast/index.browser.js +147 -80
- package/dist/image-ast/index.js +147 -80
- package/dist/mp4-ast/mp4.d.ts +2 -0
- package/dist/pdf-ast/cos/parser.d.ts +1 -0
- package/dist/pdf-ast/cos/security.d.ts +2 -0
- package/dist/pdf-ast/cos/writer.d.ts +1 -0
- package/dist/pdf-ast/document.d.ts +3 -0
- package/dist/pdf-ast/edit/forms.d.ts +1 -0
- package/dist/pdf-ast/index.js +171 -82
- package/dist/safe-bash/chunks/{chunk-L5QQLNTO.js → chunk-22PI65AH.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-KHJGUF2W.js → chunk-2TAGYMPK.js} +43 -42
- package/dist/safe-bash/chunks/{chunk-D4PHJK4T.js → chunk-2W4HTMEK.js} +52 -48
- package/dist/safe-bash/chunks/{chunk-FFZXP6ZC.js → chunk-3M7L7XU2.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-XNODZRVD.js → chunk-3QAO6UYS.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-YPETOVQU.js → chunk-3VKFK3NF.js} +2 -2
- package/dist/safe-bash/chunks/chunk-5OST7NOX.js +42 -0
- package/dist/safe-bash/chunks/{chunk-KEBSX2AX.js → chunk-6HLURHVU.js} +2 -2
- package/dist/safe-bash/chunks/chunk-DYEUZE6Z.js +19 -0
- package/dist/safe-bash/chunks/{chunk-T2TGCHKE.js → chunk-FM3WBSZT.js} +2 -2
- package/dist/safe-bash/chunks/chunk-GAYRKQM6.js +22 -0
- package/dist/safe-bash/chunks/{chunk-Q45QCA4J.js → chunk-I3KSESCR.js} +0 -7
- package/dist/safe-bash/chunks/{chunk-OSKDIBQS.js → chunk-JLIMK5TD.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-2AYZCT5X.js → chunk-JQ2FAJJT.js} +27 -23
- package/dist/safe-bash/chunks/{chunk-QA3NVP43.js → chunk-JRE6Z3T7.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-DC5EHLKS.js → chunk-NDIL6T7Y.js} +5 -5
- package/dist/safe-bash/chunks/{chunk-747G42FY.js → chunk-OPR4UAIT.js} +2 -2
- package/dist/safe-bash/chunks/chunk-OSMQCYSP.js +19 -0
- package/dist/safe-bash/chunks/chunk-OYB332PQ.js +17 -0
- package/dist/safe-bash/chunks/{chunk-X5ZCECM6.js → chunk-QTIH2AFE.js} +77 -69
- package/dist/safe-bash/chunks/{chunk-CTUHLNJM.js → chunk-SBESXWT2.js} +43 -44
- package/dist/safe-bash/chunks/{chunk-4FDQJUFW.js → chunk-SDEPGTOF.js} +1 -1
- package/dist/safe-bash/chunks/chunk-UZU5BIJI.js +32 -0
- package/dist/safe-bash/chunks/{chunk-BI6JV62X.js → chunk-VCCMROTL.js} +7 -10
- package/dist/safe-bash/chunks/chunk-W47GHRRF.js +13 -0
- package/dist/safe-bash/chunks/{chunk-NPMQWZUZ.js → chunk-WS7KZIUM.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-3PZYHMGM.js → chunk-YYAERCWS.js} +7 -7
- package/dist/safe-bash/chunks/{chunk-5U7JECDB.js → chunk-ZPGVEUKF.js} +8 -7
- package/dist/safe-bash/chunks/{csvkit-K55OYAQC.js → csvkit-USUJG62I.js} +65 -11
- package/dist/safe-bash/chunks/{ffmpeg-BEFTQ6DZ.js → ffmpeg-KRGG5DLH.js} +21 -10
- package/dist/safe-bash/chunks/{gh-HQWOWLWE.js → gh-UCFDUZCX.js} +16 -8
- package/dist/safe-bash/chunks/{git-HO7WDPHZ.js → git-LPAF6KDG.js} +7 -9
- package/dist/safe-bash/chunks/{imagemagick-53BMHH6D.js → imagemagick-KGREKK4G.js} +38 -7
- package/dist/safe-bash/chunks/{implementation-QUTAAYMT.js → implementation-FXDRYS5A.js} +34 -8
- package/dist/safe-bash/chunks/{pdfimages-4OYI6FLG.js → pdfimages-UADCF4G4.js} +12 -8
- package/dist/safe-bash/chunks/{pdfinfo-I7U6TQPP.js → pdfinfo-O7UWPF4W.js} +38 -13
- package/dist/safe-bash/chunks/{pdftk-SUA6FMHI.js → pdftk-AERXIJTN.js} +13 -8
- package/dist/safe-bash/chunks/{pdftoppm-4C5DGEWX.js → pdftoppm-L466JQKI.js} +17 -10
- package/dist/safe-bash/chunks/{pdftotext-Y4WI225Y.js → pdftotext-SUSI4WXS.js} +19 -9
- package/dist/safe-bash/chunks/{qpdf-IORB4RV5.js → qpdf-YL24KVRH.js} +14 -8
- package/dist/safe-bash/chunks/{sips-WHAMJFEU.js → sips-QXEQZERX.js} +14 -7
- package/dist/safe-bash/chunks/{soffice-SYEK6WJS.js → soffice-TBITRML3.js} +16 -8
- package/dist/safe-bash/chunks/{wkhtmltopdf-ZIICWJLF.js → wkhtmltopdf-NJA2THRC.js} +27 -7
- package/dist/safe-bash/command-chunks/chunk-2C5BEBPY.js +1388 -0
- package/dist/safe-bash/command-chunks/{chunk-2VTMZTV3.js → chunk-2EXV2ZLV.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-UJOO6DKY.js → chunk-6EASC5EC.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ZF3ZVGQC.js → chunk-7JRITHKW.js} +150 -80
- package/dist/safe-bash/{chunks/chunk-LD76P7AG.js → command-chunks/chunk-AKDMCNX4.js} +74 -39
- package/dist/safe-bash/command-chunks/{chunk-6F7QJMJ3.js → chunk-CBDVLMJB.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-H4LWTITX.js +169 -0
- package/dist/safe-bash/command-chunks/chunk-I2MQNBGR.js +145 -0
- package/dist/safe-bash/command-chunks/{chunk-5GRLAARV.js → chunk-IOXI5ZAJ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-XNHSCU6I.js → chunk-MDPIOQUD.js} +6 -6
- package/dist/safe-bash/command-chunks/chunk-QI4MGIN6.js +6 -0
- package/dist/safe-bash/command-chunks/chunk-QTYZAWSB.js +91 -0
- package/dist/safe-bash/command-chunks/chunk-SNK7K3XW.js +90 -0
- package/dist/safe-bash/command-chunks/chunk-T5OLGM43.js +314 -0
- package/dist/safe-bash/command-chunks/chunk-TB7IFMUZ.js +802 -0
- package/dist/safe-bash/command-chunks/{chunk-AT6ZSOE6.js → chunk-TPPBPIWL.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-VMK4XVKO.js +82 -0
- package/dist/safe-bash/command-chunks/chunk-VNSJKXDU.js +130 -0
- package/dist/safe-bash/command-chunks/chunk-YFNTMH6Z.js +6 -0
- package/dist/safe-bash/commands/csplit/index.browser.js +2 -2
- package/dist/safe-bash/commands/docx/index.browser.js +2 -2
- package/dist/safe-bash/commands/factor/index.browser.js +2 -2
- package/dist/safe-bash/commands/getopt/index.browser.js +2 -2
- package/dist/safe-bash/commands/hexdump/index.browser.js +2 -2
- package/dist/safe-bash/commands/iconv/index.browser.js +2 -2
- package/dist/safe-bash/commands/line-endings/index.browser.js +2 -2
- package/dist/safe-bash/commands/llm/command.d.ts +1 -4
- package/dist/safe-bash/commands/llm/command.js +1 -248
- package/dist/safe-bash/commands/llm/elevenlabs-stream.d.ts +1 -2
- package/dist/safe-bash/commands/llm/elevenlabs-stream.js +1 -117
- package/dist/safe-bash/commands/llm/elevenlabs.d.ts +1 -15
- package/dist/safe-bash/commands/llm/elevenlabs.js +1 -123
- package/dist/safe-bash/commands/llm/index.browser.js +20 -15
- package/dist/safe-bash/commands/llm/index.d.ts +1 -6
- package/dist/safe-bash/commands/llm/index.js +1 -4
- package/dist/safe-bash/commands/llm/mime.d.ts +1 -2
- package/dist/safe-bash/commands/llm/mime.js +1 -136
- package/dist/safe-bash/commands/llm/openai-http.d.ts +1 -8
- package/dist/safe-bash/commands/llm/openai-http.js +1 -143
- package/dist/safe-bash/commands/llm/openai-sse.d.ts +1 -3
- package/dist/safe-bash/commands/llm/openai-sse.js +1 -78
- package/dist/safe-bash/commands/llm/openai.d.ts +1 -14
- package/dist/safe-bash/commands/llm/openai.js +1 -288
- package/dist/safe-bash/commands/llm/providers/elevenlabs.d.ts +1 -1
- package/dist/safe-bash/commands/llm/providers/elevenlabs.js +1 -1
- package/dist/safe-bash/commands/llm/providers/index.browser.js +6 -6
- package/dist/safe-bash/commands/llm/providers/index.d.ts +1 -3
- package/dist/safe-bash/commands/llm/providers/index.js +1 -2
- package/dist/safe-bash/commands/llm/providers/openai.d.ts +1 -1
- package/dist/safe-bash/commands/llm/providers/openai.js +1 -1
- package/dist/safe-bash/commands/llm/providers/shared.d.ts +1 -23
- package/dist/safe-bash/commands/llm/providers/shared.js +1 -65
- package/dist/safe-bash/commands/llm/service.d.ts +1 -37
- package/dist/safe-bash/commands/llm/service.js +1 -151
- package/dist/safe-bash/commands/llm/types.d.ts +1 -52
- package/dist/safe-bash/commands/llm/types.js +1 -1
- package/dist/safe-bash/commands/mdq/index.browser.js +3 -3
- package/dist/safe-bash/commands/media/index.browser.js +1 -1
- package/dist/safe-bash/commands/network/index.browser.js +9 -9
- package/dist/safe-bash/commands/network/types.d.ts +2 -40
- package/dist/safe-bash/commands/node/index.browser.js +6 -8
- package/dist/safe-bash/commands/op/index.browser.js +3 -3
- package/dist/safe-bash/commands/op/index.js +12 -28
- package/dist/safe-bash/commands/pr/index.browser.js +2 -2
- package/dist/safe-bash/commands/python/index.browser.js +8 -8
- package/dist/safe-bash/commands/python/worker.browser.js +2 -2
- package/dist/safe-bash/commands/tsort/index.browser.js +2 -2
- package/dist/safe-bash/commands/xml/index.browser.js +2 -2
- package/dist/safe-bash/commands/yq/index.browser.js +3 -3
- package/dist/safe-bash/core.browser.js +9775 -10975
- package/dist/safe-bash/core.d.ts +0 -1
- package/dist/safe-bash/core.js +0 -1
- package/dist/safe-bash/jobs.browser.js +5 -4
- package/dist/safe-bash/optional-host.browser.js +61 -88
- package/dist/safe-bash/shell/runtime.js +34 -12
- package/dist/safe-bash/yq-browser/index.js +1 -1
- package/dist/safe-bash-command-ffmpeg/index.js +8130 -8011
- package/dist/safe-bash-command-git/git_rust.wasm +0 -0
- package/dist/safe-bash-command-git/wasm.generated.js +1 -1
- package/dist/safe-bash-command-imagemagick/index.js +2 -2
- package/dist/safe-bash-command-llm/LICENSE +21 -0
- package/dist/safe-bash-command-llm/command.d.ts +5 -0
- package/dist/safe-bash-command-llm/command.js +14 -0
- package/dist/safe-bash-command-llm/configuration.d.ts +18 -0
- package/dist/safe-bash-command-llm/elevenlabs-stream.d.ts +2 -0
- package/dist/safe-bash-command-llm/elevenlabs-stream.js +7 -0
- package/dist/safe-bash-command-llm/elevenlabs.d.ts +15 -0
- package/dist/safe-bash-command-llm/elevenlabs.js +10 -0
- package/dist/safe-bash-command-llm/index.d.ts +10 -0
- package/dist/safe-bash-command-llm/index.js +46 -0
- package/dist/safe-bash-command-llm/mime.d.ts +2 -0
- package/dist/safe-bash-command-llm/mime.js +9 -0
- package/dist/safe-bash-command-llm/model-options.d.ts +3 -0
- package/dist/safe-bash-command-llm/openai-http.d.ts +8 -0
- package/dist/safe-bash-command-llm/openai-http.js +17 -0
- package/dist/safe-bash-command-llm/openai-sse.d.ts +3 -0
- package/dist/safe-bash-command-llm/openai-sse.js +8 -0
- package/dist/safe-bash-command-llm/openai.d.ts +14 -0
- package/dist/safe-bash-command-llm/openai.js +12 -0
- package/dist/safe-bash-command-llm/providers/elevenlabs.d.ts +1 -0
- package/dist/safe-bash-command-llm/providers/elevenlabs.js +11 -0
- package/dist/safe-bash-command-llm/providers/index.d.ts +3 -0
- package/dist/safe-bash-command-llm/providers/index.js +24 -0
- package/dist/safe-bash-command-llm/providers/openai.d.ts +1 -0
- package/dist/safe-bash-command-llm/providers/openai.js +13 -0
- package/dist/safe-bash-command-llm/providers/shared.d.ts +23 -0
- package/dist/safe-bash-command-llm/providers/shared.js +13 -0
- package/dist/safe-bash-command-llm/schemas.d.ts +2 -0
- package/dist/safe-bash-command-llm/service.d.ts +42 -0
- package/dist/safe-bash-command-llm/service.js +9 -0
- package/dist/safe-bash-command-llm/templates.d.ts +27 -0
- package/dist/safe-bash-command-llm/types.d.ts +87 -0
- package/dist/safe-bash-command-llm/types.js +6 -0
- package/dist/safe-bash-command-mmdc/command.d.ts +4 -0
- package/dist/safe-bash-command-mmdc/index.d.ts +1 -1
- package/dist/safe-bash-command-mmdc/index.js +7084 -6687
- package/dist/safe-bash-command-mmdc/layout.d.ts +1 -0
- package/dist/safe-bash-command-mmdc/parser.d.ts +1 -0
- package/dist/safe-bash-command-mmdc/png.d.ts +3 -0
- package/dist/safe-bash-command-mmdc/raster.d.ts +1 -0
- package/dist/safe-bash-command-pandoc/command.js +3 -3
- package/dist/safe-bash-command-pandoc/index.js +3 -3
- package/dist/safe-bash-command-pdfimages/index.js +147 -80
- package/dist/safe-bash-command-pdfinfo/index.js +147 -80
- package/dist/safe-bash-command-pdftk/index.js +147 -80
- package/dist/safe-bash-command-pdftoppm/index.js +147 -80
- package/dist/safe-bash-command-pdftotext/index.js +147 -80
- package/dist/safe-bash-command-qpdf/index.js +174 -101
- package/dist/safe-bash-command-sips/index.js +2 -2
- package/dist/safe-bash-command-soffice/index.js +1 -1
- package/dist/safe-bash-command-ssconvert/index.js +147 -80
- package/dist/safe-bash-command-wkhtmltopdf/index.js +147 -80
- package/dist/safe-bash-contracts/default-executor.d.ts +5 -0
- package/dist/safe-bash-contracts/default-executor.js +37 -0
- package/dist/safe-bash-contracts/http.d.ts +41 -0
- package/dist/safe-bash-contracts/http.js +6 -0
- package/dist/safe-bash-io-engine/commands/search/requirements.js +3 -3
- package/dist/safe-bash-io-engine/commands/text-programs/shared.js +3 -3
- package/dist/safe-bash-io-engine/gnu-information.d.ts +1 -1
- package/dist/safe-bash-io-engine/gnu-information.js +1 -1
- package/dist/safe-bash-io-engine/internal.js +2 -2
- package/dist/safe-bash-query-engine/index.js +3 -3
- package/dist/safe-bash-query-engine/interpreter.js +2 -2
- package/dist/safe-bash-query-engine/query-core.js +3 -3
- package/package.json +2 -2
- package/dist/safe-bash/chunks/chunk-2G2T5MEM.js +0 -14
- package/dist/safe-bash/chunks/chunk-2MUJ7RLZ.js +0 -409
- package/dist/safe-bash/chunks/chunk-GJWUEOT6.js +0 -14
- package/dist/safe-bash/chunks/chunk-H7MMJS26.js +0 -37
- package/dist/safe-bash/chunks/chunk-LAPF2XE6.js +0 -14
- package/dist/safe-bash/chunks/chunk-S2LSZFZ6.js +0 -758
- package/dist/safe-bash/chunks/chunk-T3VDYWKZ.js +0 -21
- package/dist/safe-bash/chunks/chunk-VUVKC6HV.js +0 -81
- package/dist/safe-bash/chunks/chunk-VYW4Q6KF.js +0 -12
- package/dist/safe-bash/command-chunks/{chunk-BJ6DGYJA.js → chunk-KNI4GRXF.js} +3 -3
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
concatShellValues,
|
|
3
|
+
shellValueBytes,
|
|
4
|
+
shellValueFromBytes
|
|
5
|
+
} from "./chunk-VCCMROTL.js";
|
|
4
6
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
commandRuntimeIdentity
|
|
8
|
+
} from "./chunk-DYEUZE6Z.js";
|
|
9
|
+
import {
|
|
10
|
+
writeText
|
|
11
|
+
} from "./chunk-OSMQCYSP.js";
|
|
8
12
|
import {
|
|
9
13
|
init_platform
|
|
10
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-I3KSESCR.js";
|
|
11
15
|
|
|
12
16
|
// packages/safe-bash/src/shell/extensions/jobs/index.ts
|
|
13
17
|
init_platform();
|
|
@@ -453,12 +457,12 @@ function instance(inherited, getParent) {
|
|
|
453
457
|
const entry = listed.find((entry2) => entry2.handle === handle);
|
|
454
458
|
if (!entry || mode === "-s" || mode === "-r" && entry.state === "done") continue;
|
|
455
459
|
const pid = [...activeChildren].find(([, child]) => child === handle)?.[0];
|
|
456
|
-
if (mode === "-p") await
|
|
460
|
+
if (mode === "-p") await writeText(context.stdout, `${pid}
|
|
457
461
|
`);
|
|
458
462
|
else {
|
|
459
463
|
const marker = handle === listed.at(-1)?.handle ? "+" : handle === listed.at(-2)?.handle ? "-" : " ";
|
|
460
464
|
const state = entry.state === "done" ? "Done" : "Running";
|
|
461
|
-
await
|
|
465
|
+
await writeText(context.stdout, `[${handle.jobId}]${marker} ${mode === "-l" ? `${pid} ` : ""}${state}
|
|
462
466
|
`);
|
|
463
467
|
}
|
|
464
468
|
}
|
|
@@ -474,7 +478,7 @@ function instance(inherited, getParent) {
|
|
|
474
478
|
let offset = 0, signal = signals.SIGTERM;
|
|
475
479
|
if (context.args[0] === "-l" || context.args[0] === "-L") {
|
|
476
480
|
if (context.args.length === 1) {
|
|
477
|
-
await
|
|
481
|
+
await writeText(context.stdout, `${Object.keys(signals).map((name) => name.slice(3)).join(" ")}
|
|
478
482
|
`);
|
|
479
483
|
return 0;
|
|
480
484
|
}
|
|
@@ -486,7 +490,7 @@ function instance(inherited, getParent) {
|
|
|
486
490
|
if (!name) {
|
|
487
491
|
await context.diagnostic(`kill: ${operand}: invalid signal specification`);
|
|
488
492
|
result2 = 1;
|
|
489
|
-
} else await
|
|
493
|
+
} else await writeText(context.stdout, `${numeric === void 0 ? number : name.slice(3)}
|
|
490
494
|
`);
|
|
491
495
|
}
|
|
492
496
|
return result2;
|
|
@@ -601,7 +605,7 @@ function instance(inherited, getParent) {
|
|
|
601
605
|
let destination;
|
|
602
606
|
while (offset < context.args.length) {
|
|
603
607
|
context.signal.throwIfAborted();
|
|
604
|
-
const option =
|
|
608
|
+
const option = shellValueBytes(context.argumentValues[offset]);
|
|
605
609
|
if (option.length < 2 || option[0] !== 45) break;
|
|
606
610
|
offset++;
|
|
607
611
|
if (option.length === 2 && option[1] === 45) break;
|
|
@@ -612,30 +616,30 @@ function instance(inherited, getParent) {
|
|
|
612
616
|
continue;
|
|
613
617
|
}
|
|
614
618
|
if (option[index] === 112) {
|
|
615
|
-
if (index + 1 < option.length) destination =
|
|
619
|
+
if (index + 1 < option.length) destination = shellValueFromBytes(option.subarray(index + 1));
|
|
616
620
|
else if (offset < context.args.length) destination = context.argumentValues[offset++];
|
|
617
621
|
else {
|
|
618
622
|
await context.diagnostic("wait: -p: option requires an argument");
|
|
619
|
-
await
|
|
623
|
+
await writeText(context.stderr, "wait: usage: wait [-fn] [-p var] [id ...]\n");
|
|
620
624
|
return 2;
|
|
621
625
|
}
|
|
622
626
|
break;
|
|
623
627
|
}
|
|
624
|
-
await context.diagnostic(
|
|
625
|
-
await
|
|
628
|
+
await context.diagnostic(concatShellValues(["wait: -", shellValueFromBytes(option.subarray(index, index + 1)), ": invalid option"]));
|
|
629
|
+
await writeText(context.stderr, "wait: usage: wait [-fn] [-p var] [id ...]\n");
|
|
626
630
|
return 2;
|
|
627
631
|
}
|
|
628
632
|
}
|
|
629
633
|
if (destination !== void 0) {
|
|
630
634
|
const prepared = await context.bindings.prepareReference(destination);
|
|
631
635
|
if (!prepared.ok) {
|
|
632
|
-
await context.diagnostic(
|
|
636
|
+
await context.diagnostic(concatShellValues(["wait: ", prepared.diagnostic]));
|
|
633
637
|
return 1;
|
|
634
638
|
}
|
|
635
639
|
reference = prepared.value;
|
|
636
640
|
const removed = await reference.unbindName();
|
|
637
641
|
if (!removed.ok) {
|
|
638
|
-
await context.diagnostic(
|
|
642
|
+
await context.diagnostic(concatShellValues(["wait: ", removed.diagnostic]));
|
|
639
643
|
return 1;
|
|
640
644
|
}
|
|
641
645
|
}
|
|
@@ -643,7 +647,7 @@ function instance(inherited, getParent) {
|
|
|
643
647
|
if (reference && processId !== void 0) {
|
|
644
648
|
const assigned = await reference.assignInteger(processId);
|
|
645
649
|
if (!assigned.ok) {
|
|
646
|
-
await context.diagnostic(
|
|
650
|
+
await context.diagnostic(concatShellValues(["wait: ", assigned.diagnostic]));
|
|
647
651
|
return 1;
|
|
648
652
|
}
|
|
649
653
|
}
|
|
@@ -669,8 +673,8 @@ function instance(inherited, getParent) {
|
|
|
669
673
|
targets.push({ handle });
|
|
670
674
|
continue;
|
|
671
675
|
}
|
|
672
|
-
if ((processId2 === void 0 || processId2 === -1) && operand.length && operand[0] !== "%") await context.diagnostic(
|
|
673
|
-
await context.diagnostic(
|
|
676
|
+
if ((processId2 === void 0 || processId2 === -1) && operand.length && operand[0] !== "%") await context.diagnostic(concatShellValues(["wait: warning: ", raw, ": job specification requires leading `%'"]));
|
|
677
|
+
await context.diagnostic(concatShellValues(["wait: `", raw, operand[0] === "%" ? "': no such job" : "': not a pid or valid job spec"]));
|
|
674
678
|
}
|
|
675
679
|
if (offset < context.args.length && !targets.length) return 127;
|
|
676
680
|
const selected = offset === context.args.length ? void 0 : targets;
|
|
@@ -697,12 +701,12 @@ function instance(inherited, getParent) {
|
|
|
697
701
|
returnedProcessId = void 0;
|
|
698
702
|
const handle = resolve(operand);
|
|
699
703
|
if (operand.startsWith("%") && !handle) {
|
|
700
|
-
await context.diagnostic(
|
|
704
|
+
await context.diagnostic(concatShellValues(["wait: `", raw, "': no such job"]));
|
|
701
705
|
result2 = 127;
|
|
702
706
|
continue;
|
|
703
707
|
}
|
|
704
708
|
if (processId === void 0 && !operand.startsWith("%")) {
|
|
705
|
-
await context.diagnostic(
|
|
709
|
+
await context.diagnostic(concatShellValues(["wait: `", raw, "': not a pid or valid job spec"]));
|
|
706
710
|
if (operand.length && operand[0] >= "0" && operand[0] <= "9") return { result: 1, processId: void 0 };
|
|
707
711
|
result2 = 1;
|
|
708
712
|
continue;
|
|
@@ -811,7 +815,7 @@ function instance(inherited, getParent) {
|
|
|
811
815
|
function jobsExtension() {
|
|
812
816
|
return {
|
|
813
817
|
name: "jobs",
|
|
814
|
-
runtimeIdentity:
|
|
818
|
+
runtimeIdentity: commandRuntimeIdentity,
|
|
815
819
|
syntax: { listTerminators: [{ operator: "&" }], specialParameters: [{ name: "!" }] },
|
|
816
820
|
create: () => instance()
|
|
817
821
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_platform
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I3KSESCR.js";
|
|
4
4
|
|
|
5
5
|
// packages/safe-bash/src/commands/csplit/index.ts
|
|
6
6
|
init_platform();
|
|
7
|
-
|
|
7
|
+
import {} from "../../safe-bash-command-csplit/index.js";
|
|
8
8
|
import { createCsplitCommand, createCsplitCommands, csplitCommands, evalSyncCsplit } from "../../safe-bash-command-csplit/index.js";
|
|
9
9
|
|
|
10
10
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
builtInDirectContextExecutors
|
|
3
|
+
} from "./chunk-5OST7NOX.js";
|
|
4
4
|
import {
|
|
5
5
|
init_platform
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I3KSESCR.js";
|
|
7
7
|
|
|
8
8
|
// packages/safe-bash/src/commands/yq/index.ts
|
|
9
9
|
init_platform();
|
|
@@ -16,13 +16,13 @@ function isDefaultYqOptions(options) {
|
|
|
16
16
|
}
|
|
17
17
|
function createYqCommand(options = {}) {
|
|
18
18
|
const def = createRawYqCommand(options);
|
|
19
|
-
if (isDefaultYqOptions(options))
|
|
19
|
+
if (isDefaultYqOptions(options)) builtInDirectContextExecutors.add(def.execute);
|
|
20
20
|
return def;
|
|
21
21
|
}
|
|
22
22
|
function createYqCommands(options = {}) {
|
|
23
23
|
const defs = createRawYqCommands(options);
|
|
24
24
|
if (isDefaultYqOptions(options)) {
|
|
25
|
-
for (let i = 0; i < defs.length; i++)
|
|
25
|
+
for (let i = 0; i < defs.length; i++) builtInDirectContextExecutors.add(defs[i].execute);
|
|
26
26
|
}
|
|
27
27
|
return defs;
|
|
28
28
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_platform
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I3KSESCR.js";
|
|
4
4
|
|
|
5
5
|
// packages/safe-bash/src/commands/iconv/index.ts
|
|
6
6
|
init_platform();
|
|
7
|
-
|
|
7
|
+
import {} from "../../safe-bash-command-iconv/index.js";
|
|
8
8
|
import { createIconvCommand, createIconvCommands, iconvCommands, evalSyncIconv } from "../../safe-bash-command-iconv/index.js";
|
|
9
9
|
|
|
10
10
|
export {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_platform
|
|
3
|
+
} from "./chunk-I3KSESCR.js";
|
|
4
|
+
|
|
5
|
+
// packages/safe-bash/src/contracts/io.ts
|
|
6
|
+
init_platform();
|
|
7
|
+
import { InputByteBudget, collectBytes, collectText, createBufferedOutput, createBytePipe, outputFailure, pipeBytes, readBytes, toByteSource, writeBytes, writeText } from "../../safe-bash-contracts/io.js";
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
collectBytes,
|
|
11
|
+
createBufferedOutput,
|
|
12
|
+
createBytePipe,
|
|
13
|
+
outputFailure,
|
|
14
|
+
pipeBytes,
|
|
15
|
+
readBytes,
|
|
16
|
+
toByteSource,
|
|
17
|
+
writeBytes,
|
|
18
|
+
writeText
|
|
19
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_platform
|
|
3
|
+
} from "./chunk-I3KSESCR.js";
|
|
4
|
+
|
|
5
|
+
// packages/safe-bash/src/contracts/output.ts
|
|
6
|
+
init_platform();
|
|
7
|
+
import { createOutputOperation } from "../../safe-bash-contracts/output.js";
|
|
8
|
+
|
|
9
|
+
// packages/safe-bash/src/contracts/errors.ts
|
|
10
|
+
init_platform();
|
|
11
|
+
import { FsError, isErrnoCode, isFsError, toFsError } from "../../safe-bash-contracts/errors.js";
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
FsError,
|
|
15
|
+
isFsError,
|
|
16
|
+
createOutputOperation
|
|
17
|
+
};
|