@poe-platform/safe-bash 0.1.801 → 0.1.803
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/README.md +4 -2
- package/dist/image-ast/index.browser.js +16 -5
- package/dist/image-ast/index.js +16 -5
- package/dist/safe-bash/chunks/chunk-2LSAMQER.js +84 -0
- package/dist/safe-bash/chunks/chunk-3HQU4OJO.js +13 -0
- package/dist/safe-bash/chunks/chunk-4BSJLKNM.js +14 -0
- package/dist/safe-bash/chunks/chunk-4D4N7IU2.js +47 -0
- package/dist/safe-bash/chunks/chunk-55YJASTN.js +14 -0
- package/dist/safe-bash/chunks/{chunk-NZQXYWA3.js → chunk-5OHX7C2V.js} +0 -1
- package/dist/safe-bash/chunks/chunk-7ZBU7KYV.js +14 -0
- package/dist/safe-bash/chunks/{chunk-7VNF5BFF.js → chunk-B7PIL77G.js} +101 -415
- package/dist/safe-bash/chunks/chunk-DQP3VHSB.js +15 -0
- package/dist/safe-bash/chunks/{chunk-VQDD3G76.js → chunk-EEEWOYEG.js} +18 -18
- package/dist/safe-bash/chunks/chunk-FZE4HW6G.js +11 -0
- package/dist/safe-bash/chunks/{chunk-45PK3NWI.js → chunk-GDYNCWRV.js} +1 -1
- package/dist/safe-bash/chunks/chunk-GEG3BWGE.js +14 -0
- package/dist/safe-bash/chunks/chunk-HBCN24ZA.js +50 -0
- package/dist/safe-bash/chunks/chunk-HZ7BWKQ3.js +13 -0
- package/dist/safe-bash/chunks/{chunk-ICFDYV64.js → chunk-HZAMGT5I.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-FNDNHAGE.js → chunk-JMMEIDPF.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-IVRQ4BXL.js → chunk-PH63PLPZ.js} +7 -7
- package/dist/safe-bash/chunks/{chunk-SZH7EJLD.js → chunk-PNBBUWSM.js} +5529 -6547
- package/dist/safe-bash/chunks/chunk-QGUV42T5.js +44 -0
- package/dist/safe-bash/chunks/chunk-R3NAKOED.js +51 -0
- package/dist/safe-bash/chunks/chunk-RRR7AQ24.js +38 -0
- package/dist/safe-bash/chunks/{chunk-PQRAK7HU.js → chunk-RYFQ3LZG.js} +281 -476
- package/dist/safe-bash/chunks/chunk-VBTDHOWC.js +55 -0
- package/dist/safe-bash/chunks/{chunk-NR3EM4LS.js → chunk-VKNVHEX3.js} +1 -6
- package/dist/safe-bash/chunks/chunk-XAQMU6OY.js +14 -0
- package/dist/safe-bash/chunks/chunk-ZVD5IS4V.js +49 -0
- package/dist/safe-bash/command-chunks/{chunk-ORYGZYKW.js → chunk-4FEVBOL5.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-VXSLJH7G.js → chunk-6JSIFWYT.js} +26 -6
- package/dist/safe-bash/command-chunks/chunk-A7MU7762.js +200 -0
- package/dist/safe-bash/command-chunks/{chunk-KJIMDLBB.js → chunk-BXCXRYVU.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-F4TEEZTL.js → chunk-CQHP3I66.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-PEF7K3UQ.js → chunk-EARHPPPJ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-QKFSRZGQ.js → chunk-GFC2NTDG.js} +2 -2
- package/dist/safe-bash/command-chunks/chunk-GIRNFXP3.js +466 -0
- package/dist/safe-bash/command-chunks/{chunk-EFANWIHL.js → chunk-GY3BWK7K.js} +1 -0
- package/dist/safe-bash/command-chunks/{chunk-FPVUD6TH.js → chunk-HDCNKOIX.js} +9 -7
- package/dist/safe-bash/command-chunks/{chunk-MQFIPHIQ.js → chunk-ILX2NOLF.js} +18 -15
- package/dist/safe-bash/command-chunks/{chunk-5E4WAO4O.js → chunk-JD5QNRNO.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-I237SNW5.js → chunk-LFJJQQND.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-W5DNF4JH.js → chunk-LOICUCHG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-7U7EXOXX.js → chunk-NASVPT6F.js} +2 -1
- package/dist/safe-bash/command-chunks/{chunk-WBNZ4PRE.js → chunk-NGG2XL56.js} +7 -4
- package/dist/safe-bash/command-chunks/{chunk-GLOZX57Y.js → chunk-NKIELG7Y.js} +45 -115
- package/dist/safe-bash/command-chunks/{chunk-WPYIOKE3.js → chunk-PICVQ6B5.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-YOFC45RK.js → chunk-QVOS4YXL.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-VGG2DL5Q.js → chunk-TRR4MYWF.js} +4 -0
- package/dist/safe-bash/command-chunks/{chunk-2JRBIDAD.js → chunk-V4K2JDYU.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-CZ7EN3JG.js → chunk-VT6MJBEI.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-PCEFOYA3.js → chunk-WWIBP2ET.js} +41 -114
- package/dist/safe-bash/command-chunks/{chunk-F6OYH562.js → chunk-X54L3DBL.js} +4 -9
- package/dist/safe-bash/command-chunks/{chunk-TNOA7FCQ.js → chunk-YVNGTIJO.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-ZDN7MJE6.js +168 -0
- package/dist/safe-bash/commands/apply-patch/index.browser.js +14 -0
- package/dist/safe-bash/commands/archive/index.browser.js +36 -0
- package/dist/safe-bash/commands/bytes/compression/index.js +54 -51
- package/dist/safe-bash/commands/chmod/index.browser.js +14 -0
- package/dist/safe-bash/commands/chmod/index.d.ts +2 -0
- package/dist/safe-bash/commands/chmod/index.js +2 -0
- package/dist/safe-bash/commands/column/index.browser.js +12 -0
- package/dist/safe-bash/commands/du/index.browser.js +14 -0
- package/dist/safe-bash/commands/expr/index.browser.js +12 -0
- package/dist/safe-bash/commands/file/index.browser.js +14 -0
- package/dist/safe-bash/commands/filesystem.js +9 -2
- package/dist/safe-bash/commands/grep-aliases/index.browser.js +14 -0
- package/dist/safe-bash/commands/html-to-markdown/index.browser.js +16 -0
- package/dist/safe-bash/commands/metadata/chmod.d.ts +1 -7
- package/dist/safe-bash/commands/metadata/chmod.js +1 -204
- package/dist/safe-bash/commands/metadata/index.browser.js +17 -0
- package/dist/safe-bash/commands/metadata/internal.d.ts +1 -30
- package/dist/safe-bash/commands/metadata/internal.js +1 -76
- package/dist/safe-bash/commands/metadata/mktemp.d.ts +1 -3
- package/dist/safe-bash/commands/metadata/mktemp.js +1 -202
- package/dist/safe-bash/commands/metadata/stat.d.ts +1 -7
- package/dist/safe-bash/commands/metadata/stat.js +1 -530
- package/dist/safe-bash/commands/mktemp/index.browser.js +13 -0
- package/dist/safe-bash/commands/mktemp/index.d.ts +2 -0
- package/dist/safe-bash/commands/mktemp/index.js +2 -0
- package/dist/safe-bash/commands/network/index.browser.js +1 -1
- package/dist/safe-bash/commands/node/index.browser.js +4 -4
- package/dist/safe-bash/commands/portable-random.d.ts +1 -1
- package/dist/safe-bash/commands/portable-random.js +1 -12
- package/dist/safe-bash/commands/python/index.browser.js +8 -8
- package/dist/safe-bash/commands/regex-execution/public.browser.js +5 -3
- package/dist/safe-bash/commands/split/index.browser.js +14 -0
- package/dist/safe-bash/commands/stat/index.browser.js +13 -0
- package/dist/safe-bash/commands/stat/index.d.ts +2 -0
- package/dist/safe-bash/commands/stat/index.js +2 -0
- package/dist/safe-bash/commands/stream-format/index.browser.js +11 -0
- package/dist/safe-bash/commands/stream-inspection/index.browser.js +11 -0
- package/dist/safe-bash/commands/streams.js +5 -5
- package/dist/safe-bash/commands/table-text/index.browser.js +11 -0
- package/dist/safe-bash/commands/text.js +48 -143
- package/dist/safe-bash/commands/time-env/index.browser.js +15 -0
- package/dist/safe-bash/commands/tree/index.browser.js +14 -0
- package/dist/safe-bash/full-core.browser.js +256 -247
- package/dist/safe-bash/opt-in/commands/yq/native-work.js +1 -0
- package/dist/safe-bash/optional-host.browser.js +12 -12
- package/dist/safe-bash/plugins/index.browser.js +25 -11
- package/dist/safe-bash/registry-entry.browser.js +28 -14
- package/dist/safe-bash/search.browser.js +48 -0
- package/dist/safe-bash/shell/runtime.d.ts +3 -9
- package/dist/safe-bash/shell/runtime.js +63 -311
- package/dist/safe-bash/shell/shell.js +0 -23
- package/dist/safe-bash/shell/types.d.ts +2 -0
- package/dist/safe-bash/shell/worker-limits.js +1 -0
- package/dist/safe-bash/shell-entry.browser.js +19 -10
- package/dist/safe-bash/worker/host.js +1 -1
- package/dist/safe-bash-command-bc/index.js +12 -5
- package/dist/safe-bash-command-bzip2/index.js +4 -3
- package/dist/safe-bash-command-chmod/LICENSE +21 -0
- package/dist/safe-bash-command-chmod/command.d.ts +7 -0
- package/dist/safe-bash-command-chmod/command.js +11 -0
- package/dist/safe-bash-command-chmod/index.d.ts +6 -0
- package/dist/safe-bash-command-chmod/index.js +27 -0
- package/dist/safe-bash-command-exiftool/index.js +5 -5
- package/dist/safe-bash-command-find/find.js +1 -1
- package/dist/safe-bash-command-find/index.js +1 -1
- package/dist/safe-bash-command-fmt/index.js +9 -2
- package/dist/safe-bash-command-gzip/index.js +45 -42
- package/dist/safe-bash-command-imagemagick/index.js +3 -1
- package/dist/safe-bash-command-jq/index.js +1 -1
- package/dist/safe-bash-command-jq/jq.js +1 -1
- package/dist/safe-bash-command-less/index.js +12 -3
- package/dist/safe-bash-command-mktemp/LICENSE +21 -0
- package/dist/safe-bash-command-mktemp/command.d.ts +3 -0
- package/dist/safe-bash-command-mktemp/command.js +9 -0
- package/dist/safe-bash-command-mktemp/index.d.ts +6 -0
- package/dist/safe-bash-command-mktemp/index.js +25 -0
- package/dist/safe-bash-command-nl/index.js +1 -1
- package/dist/safe-bash-command-nl/nl.js +1 -1
- package/dist/safe-bash-command-od/index.js +6 -2
- package/dist/safe-bash-command-op/index.js +25 -6
- package/dist/safe-bash-command-rg/index.js +1 -1
- package/dist/safe-bash-command-rg/rg-command.d.ts +0 -1
- package/dist/safe-bash-command-rg/rg-command.js +3 -5
- package/dist/safe-bash-command-sed/index.js +1 -1
- package/dist/safe-bash-command-sed/sed.js +1 -1
- package/dist/safe-bash-command-sips/index.js +13 -5
- package/dist/safe-bash-command-sponge/index.js +10 -3
- package/dist/safe-bash-command-stat/LICENSE +21 -0
- package/dist/safe-bash-command-stat/command.d.ts +7 -0
- package/dist/safe-bash-command-stat/command.js +9 -0
- package/dist/safe-bash-command-stat/index.d.ts +6 -0
- package/dist/safe-bash-command-stat/index.js +25 -0
- package/dist/safe-bash-command-unexpand/index.js +1 -1
- package/dist/safe-bash-command-unexpand/unexpand.js +1 -1
- package/dist/safe-bash-command-unrtf/index.js +11 -1
- package/dist/safe-bash-command-xxd/index.js +6 -2
- package/dist/safe-bash-command-xz/command.d.ts +1 -1
- package/dist/safe-bash-command-xz/index.js +3 -2
- package/dist/safe-bash-command-yq/index.js +1 -0
- package/dist/safe-bash-command-yq/native-work.js +1 -0
- package/dist/safe-bash-command-yq/query.js +3 -0
- package/dist/safe-bash-compression-engine/bounded-codec.js +3 -3
- package/dist/safe-bash-compression-engine/codec-loader.js +2 -2
- package/dist/safe-bash-compression-engine/files.js +6 -6
- package/dist/safe-bash-compression-engine/index.js +5 -5
- package/dist/safe-bash-compression-engine/operand.js +6 -6
- package/dist/safe-bash-compression-engine/options.js +1 -1
- package/dist/safe-bash-compression-engine/stream.js +5 -5
- package/dist/safe-bash-compression-engine/zstd-decode.js +4 -4
- package/dist/safe-bash-contracts/escaping.js +2 -2
- package/dist/safe-bash-contracts/filesystem-output.js +2 -2
- package/dist/safe-bash-contracts/index.js +2 -2
- package/dist/safe-bash-contracts/io.d.ts +2 -0
- package/dist/safe-bash-contracts/io.js +1 -1
- package/dist/safe-bash-contracts/output.js +2 -2
- package/dist/safe-bash-io-engine/commands/search/requirements.js +1 -1
- package/dist/safe-bash-io-engine/commands/text-programs/shared.js +1 -1
- package/dist/safe-bash-mcp/index.browser.js +11 -1
- package/dist/safe-bash-mcp/index.js +38 -17
- package/dist/safe-bash-metadata-engine/LICENSE +21 -0
- package/dist/safe-bash-metadata-engine/index.d.ts +30 -0
- package/dist/safe-bash-metadata-engine/index.js +82 -0
- package/dist/safe-bash-metadata-engine/random.d.ts +1 -0
- package/dist/safe-bash-metadata-engine/random.js +21 -0
- package/dist/safe-bash-regex-engine/index.js +4 -4
- package/dist/safe-bash-regex-engine/text/budget.d.ts +0 -1
- package/dist/safe-bash-regex-engine/text/budget.js +1 -1
- package/dist/safe-bash-regex-engine/text/regex.js +4 -4
- package/dist/safe-bash-regex-engine/text/replacement-buffer.js +2 -2
- package/dist/safe-bash-regex-engine/text/rust-syntax.js +2 -2
- package/dist/safe-bash-search-engine/ergonomic-regex.js +2 -2
- package/dist/safe-bash-search-engine/glob.js +2 -2
- package/dist/safe-bash-search-engine/grep.js +2 -2
- package/dist/safe-bash-search-engine/matcher.js +2 -2
- package/dist/safe-bash-search-engine/options.d.ts +2 -0
- package/dist/safe-bash-search-engine/options.js +1 -1
- package/dist/safe-bash-search-engine/output.js +1 -1
- package/dist/safe-bash-search-engine/shared.js +2 -2
- package/dist/safe-bash-search-engine/walk.js +3 -3
- package/dist/safe-playwright-cloudflare/browser-snapshot-json.js +2 -2
- package/dist/safe-playwright-cloudflare/browser-snapshot-references.js +1 -1
- package/package.json +91 -10
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type CommandDefinition } from "../safe-bash-contracts/index.js";
|
|
2
2
|
import { type SearchOptions } from "../safe-bash-search-engine/options.js";
|
|
3
3
|
import { RegexExecutor } from "../safe-bash-regex-engine/execution/portable.js";
|
|
4
|
-
export declare function preverifyMemoryRgTree(fastMem: unknown): void;
|
|
5
4
|
export declare function clearRgFastRunnerPool(): void;
|
|
6
5
|
export declare function createRgCommand(executor: RegexExecutor, options?: SearchOptions): CommandDefinition;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearRgFastRunnerPool,
|
|
3
|
-
createRgCommand
|
|
4
|
-
|
|
5
|
-
} from "../safe-bash/command-chunks/chunk-GLOZX57Y.js";
|
|
3
|
+
createRgCommand
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-NKIELG7Y.js";
|
|
6
5
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
7
6
|
export {
|
|
8
7
|
clearRgFastRunnerPool,
|
|
9
|
-
createRgCommand
|
|
10
|
-
preverifyMemoryRgTree
|
|
8
|
+
createRgCommand
|
|
11
9
|
};
|
|
@@ -111,6 +111,7 @@ function writeProperties(bytes, format, properties) {
|
|
|
111
111
|
|
|
112
112
|
// packages/safe-bash-command-sips/src/index.ts
|
|
113
113
|
import { yieldTurn, drainCooperativeSteps as drainSteps } from "../safe-bash-contracts/yield.js";
|
|
114
|
+
import { FsError } from "../safe-bash-contracts/errors.js";
|
|
114
115
|
import { InputByteBudget } from "../safe-bash-contracts/io.js";
|
|
115
116
|
import { writeFileOutput } from "../safe-bash-contracts/filesystem-output-budget.js";
|
|
116
117
|
import {
|
|
@@ -1114,6 +1115,7 @@ async function executeVfsImageTool(context, runner) {
|
|
|
1114
1115
|
const carrier = getCommandArguments(context);
|
|
1115
1116
|
const argv = [...carrier.args];
|
|
1116
1117
|
const vfsFiles = /* @__PURE__ */ new Map();
|
|
1118
|
+
let totalInputBytes = 0;
|
|
1117
1119
|
const normalizedArgv = [...argv];
|
|
1118
1120
|
for (let i = 0; i < normalizedArgv.length; i++) {
|
|
1119
1121
|
if (++cooperativeWork % 64 === 0) await yieldTurn(context.signal);
|
|
@@ -1126,7 +1128,8 @@ async function executeVfsImageTool(context, runner) {
|
|
|
1126
1128
|
if (st.type === "directory") {
|
|
1127
1129
|
normalizedArgv[i + 1] = next + "/";
|
|
1128
1130
|
}
|
|
1129
|
-
} catch {
|
|
1131
|
+
} catch (error) {
|
|
1132
|
+
if (!(error instanceof FsError) || !["ENOENT", "ENOTDIR"].includes(error.code)) throw error;
|
|
1130
1133
|
}
|
|
1131
1134
|
}
|
|
1132
1135
|
continue;
|
|
@@ -1134,15 +1137,20 @@ async function executeVfsImageTool(context, runner) {
|
|
|
1134
1137
|
if (token.startsWith("-")) continue;
|
|
1135
1138
|
const bracketMatch = /^(.*)\[(\d+)\]$/.exec(token);
|
|
1136
1139
|
const fileToken = bracketMatch ? bracketMatch[1] : token;
|
|
1140
|
+
let bytes;
|
|
1137
1141
|
try {
|
|
1138
|
-
|
|
1142
|
+
bytes = await context.fs.readFile(resolvePath(context.cwd, fileToken), {
|
|
1139
1143
|
signal: invocation.signal
|
|
1140
1144
|
});
|
|
1141
|
-
|
|
1142
|
-
|
|
1145
|
+
} catch (error) {
|
|
1146
|
+
if (!(error instanceof FsError) || !["ENOENT", "ENOTDIR", "EISDIR", "EACCES", "EPERM"].includes(error.code)) throw error;
|
|
1147
|
+
continue;
|
|
1143
1148
|
}
|
|
1149
|
+
totalInputBytes += bytes.byteLength;
|
|
1150
|
+
context.inputBudget?.check(totalInputBytes);
|
|
1151
|
+
vfsFiles.set(fileToken, bytes);
|
|
1144
1152
|
}
|
|
1145
|
-
context.inputBudget?.check(
|
|
1153
|
+
context.inputBudget?.check(totalInputBytes);
|
|
1146
1154
|
const existingSnap = new Map(vfsFiles);
|
|
1147
1155
|
const res = await runner(normalizedArgv, vfsFiles, invocation.signal);
|
|
1148
1156
|
for (const [key, val] of vfsFiles.entries()) {
|
|
@@ -51,13 +51,14 @@ function settings(options = {}) {
|
|
|
51
51
|
}
|
|
52
52
|
return Object.freeze(limits);
|
|
53
53
|
}
|
|
54
|
-
async function collectSourceBytes(source, maxBytes, signal) {
|
|
54
|
+
async function collectSourceBytes(source, maxBytes, signal, admit) {
|
|
55
55
|
const chunks = [];
|
|
56
56
|
let total = 0;
|
|
57
57
|
let quantum = 0;
|
|
58
58
|
let chunksRead = 0;
|
|
59
59
|
for await (const chunk of readBytes(source, signal)) {
|
|
60
60
|
total += chunk.byteLength;
|
|
61
|
+
admit(chunk.byteLength);
|
|
61
62
|
signal.throwIfAborted();
|
|
62
63
|
quantum += Math.max(1, chunk.byteLength);
|
|
63
64
|
if (quantum >= 16384 || ++chunksRead >= 128) {
|
|
@@ -89,6 +90,11 @@ function createSpongeCommand(options = {}) {
|
|
|
89
90
|
description: "Soak up all standard input before writing to a file",
|
|
90
91
|
runtimeIdentity: commandRuntimeIdentity,
|
|
91
92
|
async execute(context) {
|
|
93
|
+
let inputBytes = 0;
|
|
94
|
+
const admit = (bytes) => {
|
|
95
|
+
context.signal.throwIfAborted();
|
|
96
|
+
context.inputBudget?.check(inputBytes += bytes);
|
|
97
|
+
};
|
|
92
98
|
context.signal.throwIfAborted();
|
|
93
99
|
const args = getCommandArguments(context).args;
|
|
94
100
|
let append = false;
|
|
@@ -131,7 +137,7 @@ function createSpongeCommand(options = {}) {
|
|
|
131
137
|
}
|
|
132
138
|
try {
|
|
133
139
|
const maxBytes = Math.min(limits.maxBufferedBytes, context.limits?.maxInputBytes ?? limits.maxBufferedBytes);
|
|
134
|
-
const buffered = await collectSourceBytes(context.stdin, maxBytes, context.signal);
|
|
140
|
+
const buffered = await collectSourceBytes(context.stdin, maxBytes, context.signal, admit);
|
|
135
141
|
if (files.length === 0 || files[0] === "-") {
|
|
136
142
|
await writeBytes(context.stdout, buffered, context.signal);
|
|
137
143
|
return { exitCode: 0 };
|
|
@@ -140,7 +146,8 @@ function createSpongeCommand(options = {}) {
|
|
|
140
146
|
if (append) {
|
|
141
147
|
let existing = new Uint8Array(0);
|
|
142
148
|
try {
|
|
143
|
-
existing = await context.fs.readFile(targetPath);
|
|
149
|
+
existing = await context.fs.readFile(targetPath, { signal: context.signal });
|
|
150
|
+
admit(existing.byteLength);
|
|
144
151
|
} catch (error) {
|
|
145
152
|
context.signal.throwIfAborted();
|
|
146
153
|
if (!(error instanceof FsError) || error.code !== "ENOENT") throw error;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Poe Platform
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type FileStat } from "../safe-bash-contracts/index.js";
|
|
2
|
+
import { type MetadataCommandsOptions } from "../safe-bash-metadata-engine/index.js";
|
|
3
|
+
export declare function createStatCommand(configuration?: MetadataCommandsOptions): import("../safe-bash-contracts/index.js").CommandDefinition;
|
|
4
|
+
export interface SyncStatInfo extends FileStat {
|
|
5
|
+
readonly target?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function evalSyncStat(args: readonly string[], cwd: string, quotingStyle: string | undefined, inspectStat: (absPath: string, follow: boolean) => SyncStatInfo | undefined): string | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { VirtualShellPlugin } from "../safe-bash-contracts/index.js";
|
|
2
|
+
import type { MetadataCommandsOptions } from "../safe-bash-metadata-engine/index.js";
|
|
3
|
+
export * from "./command.js";
|
|
4
|
+
export type { MetadataCommandsOptions as StatCommandsOptions, MetadataLimits as StatLimits } from "../safe-bash-metadata-engine/index.js";
|
|
5
|
+
export declare function createStatCommands(options?: MetadataCommandsOptions): import("../safe-bash-contracts/index.js").CommandDefinition[];
|
|
6
|
+
export declare function statCommands(options?: MetadataCommandsOptions): VirtualShellPlugin;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createStatCommand,
|
|
3
|
+
evalSyncStat
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-GIRNFXP3.js";
|
|
5
|
+
import {
|
|
6
|
+
init_buffer
|
|
7
|
+
} from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
8
|
+
|
|
9
|
+
// packages/safe-bash-command-stat/src/index.ts
|
|
10
|
+
init_buffer();
|
|
11
|
+
function createStatCommands(options = {}) {
|
|
12
|
+
return [createStatCommand(options)];
|
|
13
|
+
}
|
|
14
|
+
function statCommands(options = {}) {
|
|
15
|
+
const commands = createStatCommands(options);
|
|
16
|
+
return { name: "stat-commands", setup(host) {
|
|
17
|
+
for (const command of commands) host.commands.register(command, { replace: options.replace ?? false });
|
|
18
|
+
} };
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
createStatCommand,
|
|
22
|
+
createStatCommands,
|
|
23
|
+
evalSyncStat,
|
|
24
|
+
statCommands
|
|
25
|
+
};
|
|
@@ -2136,9 +2136,17 @@ async function executeUnrtf(context, configuration = {}, cli = false) {
|
|
|
2136
2136
|
new Budget({ limits, signal, ...profile === void 0 ? {} : { profile } });
|
|
2137
2137
|
if (format !== "text" && format !== "html" && !(profile === "gnu-0.21.10" && format === "latex") || noremap && profile !== "gnu-0.21.10") throw new UnrtfError("E_PROFILE", "Option requires the GNU personality profile", 0);
|
|
2138
2138
|
if (file?.includes("\0")) throw new UnrtfError("E_PARSE", "NUL is unavailable in VFS paths", 0);
|
|
2139
|
+
let inputBytes = 0;
|
|
2140
|
+
const admitInput = (bytes) => {
|
|
2141
|
+
signal.throwIfAborted();
|
|
2142
|
+
context.inputBudget?.check(inputBytes += bytes.byteLength);
|
|
2143
|
+
};
|
|
2139
2144
|
async function* source() {
|
|
2140
2145
|
if (file === void 0) {
|
|
2141
|
-
|
|
2146
|
+
for await (const bytes of readBytes(context.stdin, signal)) {
|
|
2147
|
+
admitInput(bytes);
|
|
2148
|
+
yield bytes;
|
|
2149
|
+
}
|
|
2142
2150
|
return;
|
|
2143
2151
|
}
|
|
2144
2152
|
const path = file.startsWith("/") ? file : context.cwd + "/" + file;
|
|
@@ -2147,12 +2155,14 @@ async function executeUnrtf(context, configuration = {}, cli = false) {
|
|
|
2147
2155
|
try {
|
|
2148
2156
|
if (context.fs.readStream) {
|
|
2149
2157
|
for await (const bytes of readBytes(context.fs.readStream(candidate, { signal }), signal)) {
|
|
2158
|
+
admitInput(bytes);
|
|
2150
2159
|
yielded = true;
|
|
2151
2160
|
yield bytes;
|
|
2152
2161
|
}
|
|
2153
2162
|
} else {
|
|
2154
2163
|
const maxBytes = Math.min(limits.inputBytes, limits.retainedBytes);
|
|
2155
2164
|
const bytes = await context.fs.readFile(candidate, { signal, ...Number.isFinite(maxBytes) ? { maxBytes } : {} });
|
|
2165
|
+
admitInput(bytes);
|
|
2156
2166
|
budget.charge("retainedBytes", bytes.length, 0);
|
|
2157
2167
|
try {
|
|
2158
2168
|
yield bytes;
|
|
@@ -146,10 +146,12 @@ function output(context, text) {
|
|
|
146
146
|
return writeBytes(context.stdout, bytes, context.signal);
|
|
147
147
|
}
|
|
148
148
|
var ByteInputBudget = class {
|
|
149
|
-
constructor(maxInputBytes) {
|
|
149
|
+
constructor(maxInputBytes, inputBudget) {
|
|
150
150
|
this.maxInputBytes = maxInputBytes;
|
|
151
|
+
this.inputBudget = inputBudget;
|
|
151
152
|
}
|
|
152
153
|
maxInputBytes;
|
|
154
|
+
inputBudget;
|
|
153
155
|
#bytes = 0;
|
|
154
156
|
#failure;
|
|
155
157
|
assertOpen(signal) {
|
|
@@ -165,13 +167,14 @@ var ByteInputBudget = class {
|
|
|
165
167
|
throw this.#failure;
|
|
166
168
|
}
|
|
167
169
|
this.#bytes += chunk.byteLength;
|
|
170
|
+
this.inputBudget?.check(this.#bytes);
|
|
168
171
|
yield chunk;
|
|
169
172
|
this.assertOpen(signal);
|
|
170
173
|
}
|
|
171
174
|
}
|
|
172
175
|
};
|
|
173
176
|
async function* sources(context, operands, maxInputBytes) {
|
|
174
|
-
const budget = new ByteInputBudget(maxInputBytes);
|
|
177
|
+
const budget = new ByteInputBudget(maxInputBytes, context.inputBudget);
|
|
175
178
|
let usedStdin = false;
|
|
176
179
|
let emptyChunks = 0;
|
|
177
180
|
for (const operand of operands.length ? operands : ["-"]) {
|
|
@@ -420,6 +423,7 @@ function defineCommand(name, handler) {
|
|
|
420
423
|
return await handler(context);
|
|
421
424
|
} catch (error) {
|
|
422
425
|
context.signal.throwIfAborted();
|
|
426
|
+
if (error instanceof Error && (error.name === "BudgetExceededError" || error.name === "AbortError")) throw error;
|
|
423
427
|
await writeDiagnostic(
|
|
424
428
|
context.stderr,
|
|
425
429
|
`${context.command}: ${publicDiagnosticMessage(error, context.onInternalError)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CommandDefinition } from "../safe-bash-contracts/index.js";
|
|
2
2
|
import { type CompressionCommandOptions } from "../safe-bash-compression-engine/stream.js";
|
|
3
3
|
import type { VirtualShellPlugin } from "../safe-bash-contracts/plugin.js";
|
|
4
4
|
export interface XzLimits {
|
|
@@ -19,6 +19,7 @@ init_buffer();
|
|
|
19
19
|
// packages/safe-bash-command-xz/src/command.ts
|
|
20
20
|
init_buffer();
|
|
21
21
|
import { PublicDiagnostic } from "../safe-bash-contracts/diagnostics.js";
|
|
22
|
+
import { withInputByteBudget } from "../safe-bash-contracts/index.js";
|
|
22
23
|
import { codeOf, diagnostic, output } from "../safe-bash-compression-engine/internal.js";
|
|
23
24
|
import { UsageError } from "../safe-bash-contracts/diagnostics.js";
|
|
24
25
|
import { runOperand } from "../safe-bash-compression-engine/operand.js";
|
|
@@ -29,7 +30,7 @@ function createXzCommand(config = {}, name = "xz") {
|
|
|
29
30
|
if (maxDecodedBytes !== void 0 && maxDecodedBytes !== Infinity && (!Number.isSafeInteger(maxDecodedBytes) || maxDecodedBytes < 0)) {
|
|
30
31
|
throw new RangeError("maxDecodedBytes must be a nonnegative safe integer or Infinity");
|
|
31
32
|
}
|
|
32
|
-
return { name, async
|
|
33
|
+
return { name, execute: withInputByteBudget(async (context) => {
|
|
33
34
|
context.signal.throwIfAborted();
|
|
34
35
|
try {
|
|
35
36
|
const options = parseOptions(name, context.args);
|
|
@@ -114,7 +115,7 @@ file ${value.streams} ${value.blocks} ${value.compressed} ${value.uncompressed}
|
|
|
114
115
|
await diagnostic(context, error);
|
|
115
116
|
return { exitCode: error instanceof UsageError ? 2 : 1 };
|
|
116
117
|
}
|
|
117
|
-
} };
|
|
118
|
+
}) };
|
|
118
119
|
}
|
|
119
120
|
function createUnxzCommand(options = {}) {
|
|
120
121
|
return createXzCommand(options, "unxz");
|
|
@@ -123,6 +123,7 @@ var NativeWork = class {
|
|
|
123
123
|
this.assertOpen();
|
|
124
124
|
if (bytes > this.limits.maxInputBytes - this.#input) throw new MikeError("yq limit exceeded: maxInputBytes");
|
|
125
125
|
this.#input += bytes;
|
|
126
|
+
this.context.inputBudget?.check(this.#input);
|
|
126
127
|
}
|
|
127
128
|
node(count = 1) {
|
|
128
129
|
this.assertOpen();
|
|
@@ -84,6 +84,7 @@ export class NativeWork {
|
|
|
84
84
|
if (bytes > this.limits.maxInputBytes - this.#input)
|
|
85
85
|
throw new MikeError("yq limit exceeded: maxInputBytes");
|
|
86
86
|
this.#input += bytes;
|
|
87
|
+
this.context.inputBudget?.check(this.#input);
|
|
87
88
|
}
|
|
88
89
|
node(count = 1) {
|
|
89
90
|
this.assertOpen();
|
|
@@ -161,6 +161,7 @@ var SinkFailure = class {
|
|
|
161
161
|
reason;
|
|
162
162
|
};
|
|
163
163
|
var InvocationOwner = class {
|
|
164
|
+
inputBytes = 0;
|
|
164
165
|
#accepting = true;
|
|
165
166
|
#callbacks = [];
|
|
166
167
|
#closePromise;
|
|
@@ -397,6 +398,7 @@ async function collectSource(context, owner, session, sourceName, source, vfs, i
|
|
|
397
398
|
}
|
|
398
399
|
owner.assertOpen(context.signal);
|
|
399
400
|
if (chunk.byteLength === 0) continue;
|
|
401
|
+
context.inputBudget?.check(owner.inputBytes += chunk.byteLength);
|
|
400
402
|
session.ownedWork.admitInputBytes(chunk.byteLength);
|
|
401
403
|
if (chunk.byteLength > yqCaps.maxInputBytes - size) throw fromJqLimit(new JqLimitError("maxInputBytes"));
|
|
402
404
|
if (inputFormat === "toml" && chunk.byteLength > yqCaps.maxDocumentBytes - size) throw new YqError("limit", "LIMIT_MAX_DOCUMENT_BYTES", 5);
|
|
@@ -451,6 +453,7 @@ async function sourceFrames(context, owner, session, sourceName, inputFormat) {
|
|
|
451
453
|
throw failure;
|
|
452
454
|
}
|
|
453
455
|
owner.assertOpen(context.signal);
|
|
456
|
+
context.inputBudget?.check(owner.inputBytes += bytes.byteLength);
|
|
454
457
|
session.ownedWork.admitInputBytes(bytes.byteLength);
|
|
455
458
|
if (inputFormat === "toml") {
|
|
456
459
|
if (bytes.byteLength > yqCaps.maxDocumentBytes) throw new YqError("limit", "LIMIT_MAX_DOCUMENT_BYTES", 5);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
boundedCodec
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-LOICUCHG.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-BXCXRYVU.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-JD5QNRNO.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-QE3VAUMI.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-2UQSP2CE.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCodec
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-BXCXRYVU.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-JD5QNRNO.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-QE3VAUMI.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-2UQSP2CE.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
unchangedSource,
|
|
5
5
|
verifyOperandDestinations,
|
|
6
6
|
writeFileOperand
|
|
7
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
8
|
-
import "../safe-bash/command-chunks/chunk-
|
|
9
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
+
} from "../safe-bash/command-chunks/chunk-PICVQ6B5.js";
|
|
8
|
+
import "../safe-bash/command-chunks/chunk-V4K2JDYU.js";
|
|
9
|
+
import "../safe-bash/command-chunks/chunk-CQHP3I66.js";
|
|
10
10
|
import "../safe-bash/command-chunks/chunk-Z6UEDK5T.js";
|
|
11
|
-
import "../safe-bash/command-chunks/chunk-
|
|
12
|
-
import "../safe-bash/command-chunks/chunk-
|
|
13
|
-
import "../safe-bash/command-chunks/chunk-
|
|
11
|
+
import "../safe-bash/command-chunks/chunk-LOICUCHG.js";
|
|
12
|
+
import "../safe-bash/command-chunks/chunk-BXCXRYVU.js";
|
|
13
|
+
import "../safe-bash/command-chunks/chunk-JD5QNRNO.js";
|
|
14
14
|
import "../safe-bash/command-chunks/chunk-QE3VAUMI.js";
|
|
15
15
|
import "../safe-bash/command-chunks/chunk-I6YHLFNL.js";
|
|
16
16
|
import "../safe-bash/command-chunks/chunk-2UQSP2CE.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DecodedBudget,
|
|
3
3
|
transform
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-V4K2JDYU.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-CQHP3I66.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-Z6UEDK5T.js";
|
|
7
7
|
import {
|
|
8
8
|
boundedCodec
|
|
9
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
10
|
-
import "../safe-bash/command-chunks/chunk-
|
|
11
|
-
import "../safe-bash/command-chunks/chunk-
|
|
9
|
+
} from "../safe-bash/command-chunks/chunk-LOICUCHG.js";
|
|
10
|
+
import "../safe-bash/command-chunks/chunk-BXCXRYVU.js";
|
|
11
|
+
import "../safe-bash/command-chunks/chunk-JD5QNRNO.js";
|
|
12
12
|
import "../safe-bash/command-chunks/chunk-QE3VAUMI.js";
|
|
13
13
|
import "../safe-bash/command-chunks/chunk-I6YHLFNL.js";
|
|
14
14
|
import "../safe-bash/command-chunks/chunk-2UQSP2CE.js";
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
sourceBytes,
|
|
3
3
|
unchangedSource,
|
|
4
4
|
writeFileOperand
|
|
5
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
5
|
+
} from "../safe-bash/command-chunks/chunk-PICVQ6B5.js";
|
|
6
6
|
import {
|
|
7
7
|
transform
|
|
8
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
9
|
-
import "../safe-bash/command-chunks/chunk-
|
|
8
|
+
} from "../safe-bash/command-chunks/chunk-V4K2JDYU.js";
|
|
9
|
+
import "../safe-bash/command-chunks/chunk-CQHP3I66.js";
|
|
10
10
|
import "../safe-bash/command-chunks/chunk-Z6UEDK5T.js";
|
|
11
|
-
import "../safe-bash/command-chunks/chunk-
|
|
12
|
-
import "../safe-bash/command-chunks/chunk-
|
|
13
|
-
import "../safe-bash/command-chunks/chunk-
|
|
11
|
+
import "../safe-bash/command-chunks/chunk-LOICUCHG.js";
|
|
12
|
+
import "../safe-bash/command-chunks/chunk-BXCXRYVU.js";
|
|
13
|
+
import "../safe-bash/command-chunks/chunk-JD5QNRNO.js";
|
|
14
14
|
import "../safe-bash/command-chunks/chunk-QE3VAUMI.js";
|
|
15
15
|
import "../safe-bash/command-chunks/chunk-I6YHLFNL.js";
|
|
16
16
|
import "../safe-bash/command-chunks/chunk-2UQSP2CE.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
formats,
|
|
4
4
|
parseOptions,
|
|
5
5
|
profiles
|
|
6
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
6
|
+
} from "../safe-bash/command-chunks/chunk-JD5QNRNO.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-QE3VAUMI.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
9
9
|
export {
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
chunkBytes,
|
|
4
4
|
stagingLimit,
|
|
5
5
|
transform
|
|
6
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
+
} from "../safe-bash/command-chunks/chunk-V4K2JDYU.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-CQHP3I66.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-Z6UEDK5T.js";
|
|
9
|
-
import "../safe-bash/command-chunks/chunk-
|
|
10
|
-
import "../safe-bash/command-chunks/chunk-
|
|
11
|
-
import "../safe-bash/command-chunks/chunk-
|
|
9
|
+
import "../safe-bash/command-chunks/chunk-LOICUCHG.js";
|
|
10
|
+
import "../safe-bash/command-chunks/chunk-BXCXRYVU.js";
|
|
11
|
+
import "../safe-bash/command-chunks/chunk-JD5QNRNO.js";
|
|
12
12
|
import "../safe-bash/command-chunks/chunk-QE3VAUMI.js";
|
|
13
13
|
import "../safe-bash/command-chunks/chunk-I6YHLFNL.js";
|
|
14
14
|
import "../safe-bash/command-chunks/chunk-2UQSP2CE.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
zstdDecode
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-CQHP3I66.js";
|
|
4
4
|
import "../safe-bash/command-chunks/chunk-Z6UEDK5T.js";
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-LOICUCHG.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-BXCXRYVU.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-JD5QNRNO.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-QE3VAUMI.js";
|
|
9
9
|
import "../safe-bash/command-chunks/chunk-I6YHLFNL.js";
|
|
10
10
|
import "../safe-bash/command-chunks/chunk-2UQSP2CE.js";
|
|
@@ -4,10 +4,10 @@ import "../safe-bash/command-chunks/chunk-VM6YNUJE.js";
|
|
|
4
4
|
import "../safe-bash/command-chunks/chunk-UEEPCFWK.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-O5SNTXHH.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-OF4LJSBK.js";
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-QVOS4YXL.js";
|
|
8
8
|
import {
|
|
9
9
|
writeBytes
|
|
10
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
10
|
+
} from "../safe-bash/command-chunks/chunk-6JSIFWYT.js";
|
|
11
11
|
import "../safe-bash/command-chunks/chunk-X475DYQM.js";
|
|
12
12
|
import "../safe-bash/command-chunks/chunk-G5PQV7XW.js";
|
|
13
13
|
import "../safe-bash/command-chunks/chunk-XPT2UGBF.js";
|
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
} from "../safe-bash/command-chunks/chunk-VM6YNUJE.js";
|
|
11
11
|
import {
|
|
12
12
|
createOutputOperation
|
|
13
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
13
|
+
} from "../safe-bash/command-chunks/chunk-QVOS4YXL.js";
|
|
14
14
|
import {
|
|
15
15
|
createBytePipe,
|
|
16
16
|
outputFailure
|
|
17
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
17
|
+
} from "../safe-bash/command-chunks/chunk-6JSIFWYT.js";
|
|
18
18
|
import {
|
|
19
19
|
FsError
|
|
20
20
|
} from "../safe-bash/command-chunks/chunk-X475DYQM.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from "../safe-bash/command-chunks/chunk-OF4LJSBK.js";
|
|
33
33
|
import {
|
|
34
34
|
createOutputOperation
|
|
35
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
35
|
+
} from "../safe-bash/command-chunks/chunk-QVOS4YXL.js";
|
|
36
36
|
import {
|
|
37
37
|
InputByteBudget,
|
|
38
38
|
collectBytes,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
withInputByteBudget,
|
|
48
48
|
writeBytes,
|
|
49
49
|
writeText
|
|
50
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
50
|
+
} from "../safe-bash/command-chunks/chunk-6JSIFWYT.js";
|
|
51
51
|
import {
|
|
52
52
|
FsError,
|
|
53
53
|
isErrnoCode,
|
|
@@ -52,6 +52,8 @@ export interface PipeWriteEndpoint extends PipeEndpoint {
|
|
|
52
52
|
}
|
|
53
53
|
export interface BytePipeOptions {
|
|
54
54
|
readonly highWaterMark?: number;
|
|
55
|
+
/** Admit each nonempty write before copying or publishing its bytes. */
|
|
56
|
+
readonly admitWrite?: (byteLength: number) => void;
|
|
55
57
|
/** Maximum pending endpoint observations across both ends; defaults to Infinity. */
|
|
56
58
|
readonly maxObservationWaiters?: number;
|
|
57
59
|
readonly signal?: AbortSignal;
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
withInputByteBudget,
|
|
12
12
|
writeBytes,
|
|
13
13
|
writeText
|
|
14
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
14
|
+
} from "../safe-bash/command-chunks/chunk-6JSIFWYT.js";
|
|
15
15
|
import "../safe-bash/command-chunks/chunk-X475DYQM.js";
|
|
16
16
|
import "../safe-bash/command-chunks/chunk-Y2WBSJG6.js";
|
|
17
17
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createOutputOperation
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-QVOS4YXL.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-6JSIFWYT.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-X475DYQM.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-Y2WBSJG6.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
requiredFileInput,
|
|
6
6
|
searchRequirements,
|
|
7
7
|
sedRequirements
|
|
8
|
-
} from "../../../safe-bash/command-chunks/chunk-
|
|
8
|
+
} from "../../../safe-bash/command-chunks/chunk-HDCNKOIX.js";
|
|
9
9
|
import "../../../safe-bash/command-chunks/chunk-XS72HTMA.js";
|
|
10
10
|
import "../../../safe-bash/command-chunks/chunk-PM2PFWPC.js";
|
|
11
11
|
import "../../../safe-bash/command-chunks/chunk-RHKBCQYQ.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "../../../safe-bash/command-chunks/chunk-ZMAFOEN7.js";
|
|
5
5
|
import {
|
|
6
6
|
requiredFileInput
|
|
7
|
-
} from "../../../safe-bash/command-chunks/chunk-
|
|
7
|
+
} from "../../../safe-bash/command-chunks/chunk-HDCNKOIX.js";
|
|
8
8
|
import {
|
|
9
9
|
RESOLVED_EXIT_ONE,
|
|
10
10
|
RESOLVED_EXIT_ZERO,
|