@poe-platform/safe-bash 0.1.757 → 0.1.758
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 +72 -19
- package/dist/image-ast/index.js +72 -19
- package/dist/pdf-ast/ast.d.ts +3 -0
- package/dist/pdf-ast/index.js +88 -36
- package/dist/safe-bash/command-chunks/{chunk-F3J5ZLKF.js → chunk-522TDVLS.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-VFS2MDAB.js → chunk-6YLD37NH.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-YI3GKJ7Q.js → chunk-766IWMTB.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-KSH2F6RG.js → chunk-CUFCNL6G.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-S4MLIYSN.js → chunk-J2NPH7DO.js} +4 -0
- package/dist/safe-bash/command-chunks/{chunk-KBBI4CSU.js → chunk-L2C5TIII.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-H2FQA4OU.js → chunk-TCAGGM44.js} +72 -19
- package/dist/safe-bash/command-chunks/{chunk-WI35236J.js → chunk-XYCWDGOG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4F6PG2OT.js → chunk-YJWWRCIG.js} +8 -8
- package/dist/safe-bash-command-column/column.js +3 -3
- package/dist/safe-bash-command-column/index.js +3 -3
- package/dist/safe-bash-command-column/layout.js +2 -2
- package/dist/safe-bash-command-factor/command.js +2 -2
- package/dist/safe-bash-command-factor/index.js +2 -2
- package/dist/safe-bash-command-ffmpeg/index.js +5923 -5893
- package/dist/safe-bash-command-imagemagick/index.js +2 -2
- 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 +72 -19
- package/dist/safe-bash-command-pdfinfo/index.js +88 -36
- package/dist/safe-bash-command-pdftk/index.js +72 -19
- package/dist/safe-bash-command-pdftoppm/index.js +88 -36
- package/dist/safe-bash-command-pdftotext/index.js +72 -19
- package/dist/safe-bash-command-qpdf/index.js +72 -19
- package/dist/safe-bash-command-sips/index.js +2 -2
- package/dist/safe-bash-command-soffice/index.js +2 -2
- package/dist/safe-bash-command-ssconvert/command-bindings.d.ts +18 -0
- package/dist/safe-bash-command-ssconvert/command.d.ts +5 -14
- package/dist/safe-bash-command-ssconvert/commands.d.ts +6 -0
- package/dist/safe-bash-command-ssconvert/commands.js +871 -0
- package/dist/safe-bash-command-ssconvert/core.js +1 -1
- package/dist/safe-bash-command-ssconvert/index.js +269 -209
- package/dist/safe-bash-command-wkhtmltopdf/index.js +72 -19
- package/dist/safe-bash-command-yq/index.js +4 -4
- package/dist/safe-bash-compression-engine/files.js +2 -2
- package/dist/safe-bash-compression-engine/operand.js +4 -4
- package/dist/safe-bash-markdown-engine/commonmark-blocks.js +4 -4
- package/dist/safe-bash-markdown-engine/commonmark-inlines.js +4 -4
- package/dist/safe-bash-markdown-engine/commonmark-syntax.js +2 -2
- package/dist/safe-bash-markdown-engine/gfm-syntax.js +3 -3
- package/dist/safe-bash-markdown-engine/index.js +7 -7
- package/dist/safe-bash-query-engine/index.js +5 -5
- package/dist/safe-bash-query-engine/interpreter.js +4 -4
- package/dist/safe-bash-query-engine/query-core.js +5 -5
- package/package.json +6 -2
- package/third-party/pdf-ast/THIRD_PARTY_NOTICES.md +16 -0
- package/dist/safe-bash/command-chunks/{chunk-OQVIJMBY.js → chunk-7HINP7ZK.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-XAYEDOV5.js → chunk-CG4JSOK2.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-YIK4ZYQ4.js → chunk-DC52GWRK.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-TOTZFBDT.js → chunk-TKACIO4X.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-VTWKS4RM.js → chunk-WF2LSKMI.js} +3 -3
|
@@ -4540,7 +4540,7 @@ function decryptCosDocument(doc, state) {
|
|
|
4540
4540
|
doc.objects.set(num, { objectNumber: obj.objectNumber, generationNumber: obj.generationNumber, value: decrypted, span: obj.span });
|
|
4541
4541
|
}
|
|
4542
4542
|
}
|
|
4543
|
-
function parseNodeFromLexer(lexer, bytes, maxDepth,
|
|
4543
|
+
function parseNodeFromLexer(lexer, bytes, maxDepth, repair = false) {
|
|
4544
4544
|
const stack = [];
|
|
4545
4545
|
while (true) {
|
|
4546
4546
|
const tok = lexer.nextToken();
|
|
@@ -4549,7 +4549,7 @@ function parseNodeFromLexer(lexer, bytes, maxDepth, recoverEmptyObject = false)
|
|
|
4549
4549
|
if (!parent) return void 0;
|
|
4550
4550
|
throw new PdfError("E_PARSE", parent.kind === "array" ? "Unterminated PDF array" : "Unterminated PDF dictionary");
|
|
4551
4551
|
}
|
|
4552
|
-
if (!parent &&
|
|
4552
|
+
if (!parent && repair && tok.kind === "keyword" && tok.value === "endobj") {
|
|
4553
4553
|
return { kind: "null", span: tok.span };
|
|
4554
4554
|
}
|
|
4555
4555
|
let node;
|
|
@@ -4564,6 +4564,7 @@ function parseNodeFromLexer(lexer, bytes, maxDepth, recoverEmptyObject = false)
|
|
|
4564
4564
|
parent.key = { kind: "name", rawBytes: tok.rawBytes, decoded: tok.decoded, span: tok.span };
|
|
4565
4565
|
continue;
|
|
4566
4566
|
} else {
|
|
4567
|
+
if (repair) continue;
|
|
4567
4568
|
throw new PdfError("E_PARSE", `Expected dictionary key /Name, got ${tok.kind}`);
|
|
4568
4569
|
}
|
|
4569
4570
|
} else {
|
|
@@ -4730,7 +4731,7 @@ function parseHeaderVersion(bytes) {
|
|
|
4730
4731
|
}
|
|
4731
4732
|
return head.slice(idx + 5, idx + 8);
|
|
4732
4733
|
}
|
|
4733
|
-
function parseObjectAtOffset(bytes, offset, maxRecursionDepth,
|
|
4734
|
+
function parseObjectAtOffset(bytes, offset, maxRecursionDepth, repair = false) {
|
|
4734
4735
|
const lexer = new CosByteLexer(bytes, offset);
|
|
4735
4736
|
const objNumTok = lexer.nextToken();
|
|
4736
4737
|
const genNumTok = lexer.nextToken();
|
|
@@ -4738,7 +4739,7 @@ function parseObjectAtOffset(bytes, offset, maxRecursionDepth, recoverEmptyObjec
|
|
|
4738
4739
|
if (objNumTok?.kind !== "number" || genNumTok?.kind !== "number" || objKwTok?.kind !== "keyword" || objKwTok.value !== "obj") {
|
|
4739
4740
|
throw new PdfError("E_PARSE", `Malformed indirect object header at byte offset ${offset}`);
|
|
4740
4741
|
}
|
|
4741
|
-
const value = parseNodeFromLexer(lexer, bytes, maxRecursionDepth,
|
|
4742
|
+
const value = parseNodeFromLexer(lexer, bytes, maxRecursionDepth, repair);
|
|
4742
4743
|
if (!value) {
|
|
4743
4744
|
throw new PdfError("E_PARSE", `Empty indirect object ${objNumTok.value} at offset ${offset}`);
|
|
4744
4745
|
}
|
|
@@ -4927,7 +4928,7 @@ function repairScanCosDocument(bytes, maxObjects, maxRecursionDepth) {
|
|
|
4927
4928
|
try {
|
|
4928
4929
|
const token = lexer.nextToken();
|
|
4929
4930
|
if (token?.kind === "keyword" && token.value === "trailer") {
|
|
4930
|
-
const trailer = parseNodeFromLexer(lexer, bytes, maxRecursionDepth);
|
|
4931
|
+
const trailer = parseNodeFromLexer(lexer, bytes, maxRecursionDepth, true);
|
|
4931
4932
|
if (trailer?.kind === "dict") trailers.push(trailer);
|
|
4932
4933
|
pos = lexer.offset;
|
|
4933
4934
|
continue;
|
|
@@ -4983,7 +4984,7 @@ function unpackRecoveredObjects(objects, maxObjects, maxDecompressedBytes, maxRe
|
|
|
4983
4984
|
const t = dictGet(obj.value.dict, "Type");
|
|
4984
4985
|
if (t?.kind === "name" && t.decoded === "ObjStm") {
|
|
4985
4986
|
try {
|
|
4986
|
-
for (const [unpackedNum, unpackedVal] of unpackObjectStream(obj.value, maxDecompressedBytes, maxRecursionDepth).entries()) {
|
|
4987
|
+
for (const [unpackedNum, unpackedVal] of unpackObjectStream(obj.value, maxDecompressedBytes, maxRecursionDepth, true).entries()) {
|
|
4987
4988
|
if (!objects.has(unpackedNum)) {
|
|
4988
4989
|
objects.set(unpackedNum, {
|
|
4989
4990
|
objectNumber: unpackedNum,
|
|
@@ -5019,7 +5020,7 @@ function recoveredReferences(objects) {
|
|
|
5019
5020
|
}
|
|
5020
5021
|
return { ...rootRef ? { rootRef } : {}, ...infoRef ? { infoRef } : {} };
|
|
5021
5022
|
}
|
|
5022
|
-
function unpackObjectStream(streamObj, maxDecompressedBytes, maxRecursionDepth) {
|
|
5023
|
+
function unpackObjectStream(streamObj, maxDecompressedBytes, maxRecursionDepth, repair = false) {
|
|
5023
5024
|
const nNode = dictGet(streamObj.dict, "N");
|
|
5024
5025
|
const firstNode = dictGet(streamObj.dict, "First");
|
|
5025
5026
|
if (nNode?.kind !== "number" || firstNode?.kind !== "number") {
|
|
@@ -5039,7 +5040,7 @@ function unpackObjectStream(streamObj, maxDecompressedBytes, maxRecursionDepth)
|
|
|
5039
5040
|
for (const pair of pairs) {
|
|
5040
5041
|
try {
|
|
5041
5042
|
const valLexer = new CosByteLexer(decoded, firstNode.value + pair.relativeOffset);
|
|
5042
|
-
const node = parseNodeFromLexer(valLexer, decoded, maxRecursionDepth);
|
|
5043
|
+
const node = parseNodeFromLexer(valLexer, decoded, maxRecursionDepth, repair);
|
|
5043
5044
|
if (node) {
|
|
5044
5045
|
result.set(pair.objectNumber, node);
|
|
5045
5046
|
}
|
|
@@ -5222,7 +5223,7 @@ function parseCosDocument(bytes, options = {}) {
|
|
|
5222
5223
|
if (!unpacked) {
|
|
5223
5224
|
const stmObj = objects.get(entry.objectStreamNumber)?.value;
|
|
5224
5225
|
if (stmObj?.kind === "stream") {
|
|
5225
|
-
unpacked = unpackObjectStream(stmObj, maxDecompressedBytes, maxRecursionDepth);
|
|
5226
|
+
unpacked = unpackObjectStream(stmObj, maxDecompressedBytes, maxRecursionDepth, recovery === "repair");
|
|
5226
5227
|
objStmCache.set(entry.objectStreamNumber, unpacked);
|
|
5227
5228
|
}
|
|
5228
5229
|
}
|
|
@@ -10469,7 +10470,11 @@ function resolvePageFonts(doc, resourcesDict) {
|
|
|
10469
10470
|
let cmap;
|
|
10470
10471
|
const toUniNode = doc.resolve(dictGet(fObj, "ToUnicode"));
|
|
10471
10472
|
if (toUniNode?.kind === "stream") {
|
|
10472
|
-
|
|
10473
|
+
try {
|
|
10474
|
+
cmap = parseToUnicodeCMap(doc.decodeStream(toUniNode));
|
|
10475
|
+
} catch (error) {
|
|
10476
|
+
if (error instanceof PdfError && error.code === "E_LIMIT") throw error;
|
|
10477
|
+
}
|
|
10473
10478
|
}
|
|
10474
10479
|
const encNode = doc.resolve(dictGet(fObj, "Encoding"));
|
|
10475
10480
|
if (encNode?.kind === "dict") {
|
|
@@ -11593,8 +11598,12 @@ function evaluateContentStreamToDisplayList(params) {
|
|
|
11593
11598
|
const images = [];
|
|
11594
11599
|
const operations = [];
|
|
11595
11600
|
const emit = (operation) => {
|
|
11596
|
-
const clipPaths = curState()
|
|
11597
|
-
if (clipPaths) operation = { ...operation, value: {
|
|
11601
|
+
const { clipPaths, clipImages } = curState();
|
|
11602
|
+
if (clipPaths || clipImages) operation = { ...operation, value: {
|
|
11603
|
+
...operation.value,
|
|
11604
|
+
...clipPaths ? { clipPaths } : {},
|
|
11605
|
+
...clipImages ? { clipImages } : {}
|
|
11606
|
+
} };
|
|
11598
11607
|
operations.push(operation);
|
|
11599
11608
|
switch (operation.kind) {
|
|
11600
11609
|
case "path":
|
|
@@ -11858,6 +11867,18 @@ function evaluateContentStreamToDisplayList(params) {
|
|
|
11858
11867
|
let hasTextClip = false;
|
|
11859
11868
|
let activeTm = [1, 0, 0, 1, 0, 0];
|
|
11860
11869
|
let activeTlm = [1, 0, 0, 1, 0, 0];
|
|
11870
|
+
const paintImage = (image, patternMask, resources, activeFonts, depth) => {
|
|
11871
|
+
if (!patternMask) {
|
|
11872
|
+
emit({ kind: "image", value: image });
|
|
11873
|
+
return;
|
|
11874
|
+
}
|
|
11875
|
+
const st = curState();
|
|
11876
|
+
stateStack.push({ ...st, clipImages: [...st.clipImages ?? [], image] });
|
|
11877
|
+
walkNodes([{ kind: "path-op", paint: "f", segments: [
|
|
11878
|
+
{ kind: "rect", x: 0, y: 0, width: 1, height: 1 }
|
|
11879
|
+
] }], void 0, void 0, resources, activeFonts, depth);
|
|
11880
|
+
stateStack.pop();
|
|
11881
|
+
};
|
|
11861
11882
|
const walkNodes = (nodes, mcid, actualText, activeResources = params.resourcesDict, activeFonts = fonts, depth = 0) => {
|
|
11862
11883
|
for (const node of nodes) {
|
|
11863
11884
|
switch (node.kind) {
|
|
@@ -12041,7 +12062,8 @@ function evaluateContentStreamToDisplayList(params) {
|
|
|
12041
12062
|
st.fillAlpha,
|
|
12042
12063
|
"PatternShading_" + st.fillPatternName,
|
|
12043
12064
|
patClip,
|
|
12044
|
-
shading?.kind === "stream" ? shading : void 0
|
|
12065
|
+
shading?.kind === "stream" ? shading : void 0,
|
|
12066
|
+
st.blendMode
|
|
12045
12067
|
);
|
|
12046
12068
|
if (shImg) {
|
|
12047
12069
|
emit({ kind: "image", value: shImg });
|
|
@@ -12150,18 +12172,20 @@ function evaluateContentStreamToDisplayList(params) {
|
|
|
12150
12172
|
const subNode = params.cosDoc.resolve(dictGet(xobjNode.dict, "Subtype"));
|
|
12151
12173
|
const sub = subNode?.kind === "name" ? subNode.decoded : "";
|
|
12152
12174
|
if (sub === "Image") {
|
|
12175
|
+
const maskNode = params.cosDoc.resolve(dictGet(xobjNode.dict, "ImageMask"));
|
|
12176
|
+
const patternMask = !!st.fillPatternName && maskNode?.kind === "boolean" && maskNode.value;
|
|
12153
12177
|
const decoded = decodeXObjectImageToRgba(
|
|
12154
12178
|
params.cosDoc,
|
|
12155
12179
|
xobjNode,
|
|
12156
12180
|
activeResources,
|
|
12157
|
-
{
|
|
12181
|
+
patternMask ? { r: 1, g: 1, b: 1, alpha: 1 } : {
|
|
12158
12182
|
r: st.fillColor.r,
|
|
12159
12183
|
g: st.fillColor.g,
|
|
12160
12184
|
b: st.fillColor.b,
|
|
12161
12185
|
alpha: st.fillAlpha
|
|
12162
12186
|
}
|
|
12163
12187
|
);
|
|
12164
|
-
|
|
12188
|
+
paintImage({
|
|
12165
12189
|
name: node.name,
|
|
12166
12190
|
matrix: [...st.ctm],
|
|
12167
12191
|
width: decoded.width,
|
|
@@ -12171,7 +12195,7 @@ function evaluateContentStreamToDisplayList(params) {
|
|
|
12171
12195
|
decodedRgba: decoded.rgba,
|
|
12172
12196
|
...st.blendMode && st.blendMode !== "Normal" ? { blendMode: st.blendMode } : {},
|
|
12173
12197
|
...st.clipRect ? { clipRect: [...st.clipRect] } : {}
|
|
12174
|
-
}
|
|
12198
|
+
}, patternMask, activeResources, activeFonts, depth);
|
|
12175
12199
|
} else if (sub === "Form" && depth < 8) {
|
|
12176
12200
|
const formStreamBytes = params.cosDoc.decodeStream(xobjNode);
|
|
12177
12201
|
const formNodes = parseContentStream(formStreamBytes);
|
|
@@ -12227,19 +12251,22 @@ function evaluateContentStreamToDisplayList(params) {
|
|
|
12227
12251
|
}
|
|
12228
12252
|
case "inline-image": {
|
|
12229
12253
|
const st = curState();
|
|
12254
|
+
const maskEntry = dictGet(node.dict, "ImageMask") ?? dictGet(node.dict, "IM");
|
|
12255
|
+
const maskNode = params.cosDoc ? params.cosDoc.resolve(maskEntry) : maskEntry;
|
|
12256
|
+
const patternMask = !!st.fillPatternName && maskNode?.kind === "boolean" && maskNode.value;
|
|
12230
12257
|
const decoded = decodeInlineImageNodeToRgba(
|
|
12231
12258
|
params.cosDoc,
|
|
12232
12259
|
node.dict,
|
|
12233
12260
|
node.data,
|
|
12234
12261
|
activeResources,
|
|
12235
|
-
{
|
|
12262
|
+
patternMask ? { r: 1, g: 1, b: 1, alpha: 1 } : {
|
|
12236
12263
|
r: st.fillColor.r,
|
|
12237
12264
|
g: st.fillColor.g,
|
|
12238
12265
|
b: st.fillColor.b,
|
|
12239
12266
|
alpha: st.fillAlpha
|
|
12240
12267
|
}
|
|
12241
12268
|
);
|
|
12242
|
-
|
|
12269
|
+
paintImage({
|
|
12243
12270
|
name: "InlineImage",
|
|
12244
12271
|
matrix: [...st.ctm],
|
|
12245
12272
|
width: decoded.width,
|
|
@@ -12249,7 +12276,7 @@ function evaluateContentStreamToDisplayList(params) {
|
|
|
12249
12276
|
decodedRgba: decoded.rgba,
|
|
12250
12277
|
...st.blendMode && st.blendMode !== "Normal" ? { blendMode: st.blendMode } : {},
|
|
12251
12278
|
...st.clipRect ? { clipRect: [...st.clipRect] } : {}
|
|
12252
|
-
}
|
|
12279
|
+
}, patternMask, activeResources, activeFonts, depth);
|
|
12253
12280
|
break;
|
|
12254
12281
|
}
|
|
12255
12282
|
case "text-object": {
|
|
@@ -14502,6 +14529,7 @@ function renderDisplayListToBitmap(displayList, options = {}) {
|
|
|
14502
14529
|
const aaVec = options.antialiasVector !== false;
|
|
14503
14530
|
const aaTxt = options.antialiasText !== false;
|
|
14504
14531
|
const clipMasks = /* @__PURE__ */ new Map();
|
|
14532
|
+
const imageClipMasks = /* @__PURE__ */ new Map();
|
|
14505
14533
|
for (const original of paintOperations(displayList)) {
|
|
14506
14534
|
if (original.kind === "glyph" && (original.value.renderMode === 3 || !original.value.outline && !original.value.unicode.trim())) continue;
|
|
14507
14535
|
const operation = original.kind === "glyph" ? { kind: "path", value: glyphPaint(original.value) } : original;
|
|
@@ -14516,6 +14544,31 @@ function renderDisplayListToBitmap(displayList, options = {}) {
|
|
|
14516
14544
|
}
|
|
14517
14545
|
clipMasks.set(clips, clipMask);
|
|
14518
14546
|
}
|
|
14547
|
+
const imageClips = original.value.clipImages;
|
|
14548
|
+
if (imageClips) {
|
|
14549
|
+
let imageMask = imageClipMasks.get(imageClips);
|
|
14550
|
+
if (!imageMask) {
|
|
14551
|
+
imageMask = new Uint8Array(width * height * 4).fill(255);
|
|
14552
|
+
for (const image of imageClips) {
|
|
14553
|
+
const layer = renderDisplayListToBitmap({
|
|
14554
|
+
...displayList,
|
|
14555
|
+
rotation: 0,
|
|
14556
|
+
paths: [],
|
|
14557
|
+
glyphs: [],
|
|
14558
|
+
images: [image],
|
|
14559
|
+
operations: [{ kind: "image", value: image }]
|
|
14560
|
+
}, { scale, transparent: true }).data;
|
|
14561
|
+
for (let i = 3; i < layer.length; i += 4) imageMask[i] = Math.round(imageMask[i] * layer[i] / 255);
|
|
14562
|
+
}
|
|
14563
|
+
imageClipMasks.set(imageClips, imageMask);
|
|
14564
|
+
}
|
|
14565
|
+
if (clipMask) {
|
|
14566
|
+
clipMask = clipMask.slice();
|
|
14567
|
+
for (let i = 3; i < clipMask.length; i += 4) clipMask[i] = Math.round(clipMask[i] * imageMask[i] / 255);
|
|
14568
|
+
} else {
|
|
14569
|
+
clipMask = imageMask;
|
|
14570
|
+
}
|
|
14571
|
+
}
|
|
14519
14572
|
if (operation.kind === "path") {
|
|
14520
14573
|
const path = operation.value;
|
|
14521
14574
|
if (path.fillColor) {
|
|
@@ -9,15 +9,15 @@ import {
|
|
|
9
9
|
resolveYqLimits,
|
|
10
10
|
yqCaps
|
|
11
11
|
} from "../safe-bash/command-chunks/chunk-LOAD233I.js";
|
|
12
|
+
import {
|
|
13
|
+
YqError,
|
|
14
|
+
fromJqLimit
|
|
15
|
+
} from "../safe-bash/command-chunks/chunk-HACCCNFF.js";
|
|
12
16
|
import {
|
|
13
17
|
encodeJson,
|
|
14
18
|
encodeRaw,
|
|
15
19
|
encodeYaml
|
|
16
20
|
} from "../safe-bash/command-chunks/chunk-7DEZJSBF.js";
|
|
17
|
-
import {
|
|
18
|
-
YqError,
|
|
19
|
-
fromJqLimit
|
|
20
|
-
} from "../safe-bash/command-chunks/chunk-HACCCNFF.js";
|
|
21
21
|
import {
|
|
22
22
|
init_buffer
|
|
23
23
|
} from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -4,7 +4,8 @@ import {
|
|
|
4
4
|
unchangedSource,
|
|
5
5
|
verifyOperandDestinations,
|
|
6
6
|
writeFileOperand
|
|
7
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
7
|
+
} from "../safe-bash/command-chunks/chunk-CG4JSOK2.js";
|
|
8
|
+
import "../safe-bash/command-chunks/chunk-LVEHHFOV.js";
|
|
8
9
|
import "../safe-bash/command-chunks/chunk-E5TEVROY.js";
|
|
9
10
|
import "../safe-bash/command-chunks/chunk-3ZK5F23O.js";
|
|
10
11
|
import "../safe-bash/command-chunks/chunk-6NTY42E5.js";
|
|
@@ -14,7 +15,6 @@ import "../safe-bash/command-chunks/chunk-KHGQDFQ7.js";
|
|
|
14
15
|
import "../safe-bash/command-chunks/chunk-A7L65T2H.js";
|
|
15
16
|
import "../safe-bash/command-chunks/chunk-2MFNTNK7.js";
|
|
16
17
|
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
17
|
-
import "../safe-bash/command-chunks/chunk-LVEHHFOV.js";
|
|
18
18
|
import "../safe-bash/command-chunks/chunk-RDV7UCYZ.js";
|
|
19
19
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
20
20
|
export {
|
|
@@ -2,7 +2,10 @@ import {
|
|
|
2
2
|
sourceBytes,
|
|
3
3
|
unchangedSource,
|
|
4
4
|
writeFileOperand
|
|
5
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
5
|
+
} from "../safe-bash/command-chunks/chunk-CG4JSOK2.js";
|
|
6
|
+
import {
|
|
7
|
+
FileOperation
|
|
8
|
+
} from "../safe-bash/command-chunks/chunk-LVEHHFOV.js";
|
|
6
9
|
import {
|
|
7
10
|
transform
|
|
8
11
|
} from "../safe-bash/command-chunks/chunk-E5TEVROY.js";
|
|
@@ -14,9 +17,6 @@ import "../safe-bash/command-chunks/chunk-KHGQDFQ7.js";
|
|
|
14
17
|
import "../safe-bash/command-chunks/chunk-A7L65T2H.js";
|
|
15
18
|
import "../safe-bash/command-chunks/chunk-2MFNTNK7.js";
|
|
16
19
|
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
17
|
-
import {
|
|
18
|
-
FileOperation
|
|
19
|
-
} from "../safe-bash/command-chunks/chunk-LVEHHFOV.js";
|
|
20
20
|
import "../safe-bash/command-chunks/chunk-RDV7UCYZ.js";
|
|
21
21
|
import {
|
|
22
22
|
init_buffer
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseCommonMarkBlocks
|
|
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-6YLD37NH.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-522TDVLS.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-WF2LSKMI.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-XC57GYGL.js";
|
|
6
7
|
import "../safe-bash/command-chunks/chunk-OEE6EKOT.js";
|
|
7
8
|
import "../safe-bash/command-chunks/chunk-UI6H6YG4.js";
|
|
8
|
-
import "../safe-bash/command-chunks/chunk-XC57GYGL.js";
|
|
9
9
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
10
10
|
export {
|
|
11
11
|
parseCommonMarkBlocks
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseCommonMarkInlines
|
|
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-766IWMTB.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-522TDVLS.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-WF2LSKMI.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-XC57GYGL.js";
|
|
6
7
|
import "../safe-bash/command-chunks/chunk-OEE6EKOT.js";
|
|
7
8
|
import "../safe-bash/command-chunks/chunk-UI6H6YG4.js";
|
|
8
|
-
import "../safe-bash/command-chunks/chunk-XC57GYGL.js";
|
|
9
9
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
10
10
|
export {
|
|
11
11
|
parseCommonMarkInlines
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
readLabel,
|
|
11
11
|
readTitle,
|
|
12
12
|
whitespace
|
|
13
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
14
|
-
import "../safe-bash/command-chunks/chunk-OEE6EKOT.js";
|
|
13
|
+
} from "../safe-bash/command-chunks/chunk-WF2LSKMI.js";
|
|
15
14
|
import "../safe-bash/command-chunks/chunk-XC57GYGL.js";
|
|
15
|
+
import "../safe-bash/command-chunks/chunk-OEE6EKOT.js";
|
|
16
16
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
17
17
|
export {
|
|
18
18
|
asciiPunctuation,
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
bareAutolink,
|
|
3
3
|
filterGfmHtml,
|
|
4
4
|
pipeRow
|
|
5
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
+
} from "../safe-bash/command-chunks/chunk-522TDVLS.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-WF2LSKMI.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-XC57GYGL.js";
|
|
7
8
|
import "../safe-bash/command-chunks/chunk-OEE6EKOT.js";
|
|
8
9
|
import "../safe-bash/command-chunks/chunk-UI6H6YG4.js";
|
|
9
|
-
import "../safe-bash/command-chunks/chunk-XC57GYGL.js";
|
|
10
10
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
11
11
|
export {
|
|
12
12
|
bareAutolink,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
parseCommonMarkInlines
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-YI3GKJ7Q.js";
|
|
4
1
|
import {
|
|
5
2
|
parseCommonMarkBlocks
|
|
6
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import
|
|
8
|
-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-6YLD37NH.js";
|
|
4
|
+
import {
|
|
5
|
+
parseCommonMarkInlines
|
|
6
|
+
} from "../safe-bash/command-chunks/chunk-766IWMTB.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-522TDVLS.js";
|
|
8
|
+
import "../safe-bash/command-chunks/chunk-WF2LSKMI.js";
|
|
9
|
+
import "../safe-bash/command-chunks/chunk-XC57GYGL.js";
|
|
9
10
|
import "../safe-bash/command-chunks/chunk-OEE6EKOT.js";
|
|
10
11
|
import "../safe-bash/command-chunks/chunk-UI6H6YG4.js";
|
|
11
|
-
import "../safe-bash/command-chunks/chunk-XC57GYGL.js";
|
|
12
12
|
import {
|
|
13
13
|
init_buffer
|
|
14
14
|
} from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
YqValueFailure,
|
|
3
3
|
createYqQuerySession
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-CUFCNL6G.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-DC52GWRK.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-NSEUBSOD.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-WVWWRMFD.js";
|
|
8
|
+
import "../safe-bash/command-chunks/chunk-Z47EO74H.js";
|
|
7
9
|
import "../safe-bash/command-chunks/chunk-ACRMXIQC.js";
|
|
8
10
|
import "../safe-bash/command-chunks/chunk-5PM5TEPM.js";
|
|
9
|
-
import "../safe-bash/command-chunks/chunk-WVWWRMFD.js";
|
|
10
11
|
import "../safe-bash/command-chunks/chunk-GZOUGVVV.js";
|
|
11
12
|
import "../safe-bash/command-chunks/chunk-SNXWY3KV.js";
|
|
12
13
|
import "../safe-bash/command-chunks/chunk-TFZEYNMX.js";
|
|
13
|
-
import "../safe-bash/command-chunks/chunk-3JS4FOLB.js";
|
|
14
|
-
import "../safe-bash/command-chunks/chunk-Z47EO74H.js";
|
|
15
14
|
import "../safe-bash/command-chunks/chunk-IFUNAM4D.js";
|
|
16
15
|
import "../safe-bash/command-chunks/chunk-NYUMOVF2.js";
|
|
16
|
+
import "../safe-bash/command-chunks/chunk-3JS4FOLB.js";
|
|
17
17
|
import "../safe-bash/command-chunks/chunk-BIXN77VL.js";
|
|
18
18
|
import "../safe-bash/command-chunks/chunk-UPOI7O7Y.js";
|
|
19
19
|
import "../safe-bash/command-chunks/chunk-744EDSWN.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Interpreter
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-DC52GWRK.js";
|
|
4
4
|
import "../safe-bash/command-chunks/chunk-NSEUBSOD.js";
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-5PM5TEPM.js";
|
|
6
5
|
import "../safe-bash/command-chunks/chunk-WVWWRMFD.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-Z47EO74H.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-5PM5TEPM.js";
|
|
7
8
|
import "../safe-bash/command-chunks/chunk-GZOUGVVV.js";
|
|
8
9
|
import "../safe-bash/command-chunks/chunk-SNXWY3KV.js";
|
|
9
10
|
import "../safe-bash/command-chunks/chunk-TFZEYNMX.js";
|
|
10
|
-
import "../safe-bash/command-chunks/chunk-3JS4FOLB.js";
|
|
11
|
-
import "../safe-bash/command-chunks/chunk-Z47EO74H.js";
|
|
12
11
|
import "../safe-bash/command-chunks/chunk-IFUNAM4D.js";
|
|
13
12
|
import "../safe-bash/command-chunks/chunk-NYUMOVF2.js";
|
|
13
|
+
import "../safe-bash/command-chunks/chunk-3JS4FOLB.js";
|
|
14
14
|
import "../safe-bash/command-chunks/chunk-BIXN77VL.js";
|
|
15
15
|
import "../safe-bash/command-chunks/chunk-UPOI7O7Y.js";
|
|
16
16
|
import "../safe-bash/command-chunks/chunk-744EDSWN.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
YqValueFailure,
|
|
3
3
|
createYqQuerySession
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-CUFCNL6G.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-DC52GWRK.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-NSEUBSOD.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-WVWWRMFD.js";
|
|
8
|
+
import "../safe-bash/command-chunks/chunk-Z47EO74H.js";
|
|
7
9
|
import "../safe-bash/command-chunks/chunk-ACRMXIQC.js";
|
|
8
10
|
import "../safe-bash/command-chunks/chunk-5PM5TEPM.js";
|
|
9
|
-
import "../safe-bash/command-chunks/chunk-WVWWRMFD.js";
|
|
10
11
|
import "../safe-bash/command-chunks/chunk-GZOUGVVV.js";
|
|
11
12
|
import "../safe-bash/command-chunks/chunk-SNXWY3KV.js";
|
|
12
13
|
import "../safe-bash/command-chunks/chunk-TFZEYNMX.js";
|
|
13
|
-
import "../safe-bash/command-chunks/chunk-3JS4FOLB.js";
|
|
14
|
-
import "../safe-bash/command-chunks/chunk-Z47EO74H.js";
|
|
15
14
|
import "../safe-bash/command-chunks/chunk-IFUNAM4D.js";
|
|
16
15
|
import "../safe-bash/command-chunks/chunk-NYUMOVF2.js";
|
|
16
|
+
import "../safe-bash/command-chunks/chunk-3JS4FOLB.js";
|
|
17
17
|
import "../safe-bash/command-chunks/chunk-BIXN77VL.js";
|
|
18
18
|
import "../safe-bash/command-chunks/chunk-UPOI7O7Y.js";
|
|
19
19
|
import "../safe-bash/command-chunks/chunk-744EDSWN.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poe-platform/safe-bash",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.758",
|
|
4
4
|
"description": "Extensible virtual shell with pluggable filesystems and streaming commands",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,6 +36,10 @@
|
|
|
36
36
|
"types": "./dist/pdf-ast/index.d.ts",
|
|
37
37
|
"import": "./dist/pdf-ast/index.js"
|
|
38
38
|
},
|
|
39
|
+
"./ssconvert/commands": {
|
|
40
|
+
"types": "./dist/safe-bash-command-ssconvert/commands.d.ts",
|
|
41
|
+
"import": "./dist/safe-bash-command-ssconvert/commands.js"
|
|
42
|
+
},
|
|
39
43
|
"./mcp": {
|
|
40
44
|
"types": "./dist/safe-bash-mcp/index.d.ts",
|
|
41
45
|
"import": "./dist/safe-bash-mcp/index.js"
|
|
@@ -837,7 +841,7 @@
|
|
|
837
841
|
"access": "public"
|
|
838
842
|
},
|
|
839
843
|
"dependencies": {
|
|
840
|
-
"@poe-platform/safe-fs": "0.1.
|
|
844
|
+
"@poe-platform/safe-fs": "0.1.758",
|
|
841
845
|
"pdf-lib": "1.17.1",
|
|
842
846
|
"@noble/hashes": "2.4.0",
|
|
843
847
|
"pako": "3.0.1",
|
|
@@ -295,3 +295,19 @@ tables and clear the high byte only for F000–F0FF. The TrueType reader records
|
|
|
295
295
|
the selected cmap's encoding. Tests in `src/fonts/cid-to-gid.test.ts` cover
|
|
296
296
|
raw and prefixed symbol codes plus the original issue2948 fixture at the
|
|
297
297
|
same pinned PDF.js revision documented above.
|
|
298
|
+
|
|
299
|
+
Pattern-painted stencils follow PDF.js `CanvasGraphics._createMaskCanvas`:
|
|
300
|
+
the current pattern is painted in page coordinates through transformed mask
|
|
301
|
+
alpha, rather than coloring the source mask pixels. `stencil-pattern.test.ts`
|
|
302
|
+
ports the original `issue13372` equality fixture and adds memory-only coverage
|
|
303
|
+
for inline masks, rotation, inverted Decode, alpha, one-pixel masks, and tiling.
|
|
304
|
+
The source fixture and hashes are recorded in `src/fixtures/SOURCES.md`.
|
|
305
|
+
The one-pixel gradient expectation is independently verified by Poppler and
|
|
306
|
+
MuPDF; PDF.js's `paintSolidColorImageMask` optimization loses that pattern.
|
|
307
|
+
|
|
308
|
+
Malformed dictionary-key recovery follows PDF.js `Parser.getObj`, skipping
|
|
309
|
+
stray non-Name tokens only in local repair mode. Damaged optional ToUnicode
|
|
310
|
+
streams follow `PartialEvaluator.readToUnicode` error recovery while retaining
|
|
311
|
+
local resource-limit errors. `dictionary-recovery.test.ts` ports the original
|
|
312
|
+
`issue11549` equality fixture and covers ordinary/compressed dictionaries,
|
|
313
|
+
trailer metadata, strict mode, and explicit limits.
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
factorRecord,
|
|
3
|
+
parseNumber
|
|
4
|
+
} from "./chunk-MYVOHXZB.js";
|
|
1
5
|
import {
|
|
2
6
|
Lifecycle,
|
|
3
7
|
RecordWriter,
|
|
@@ -10,10 +14,6 @@ import {
|
|
|
10
14
|
quote,
|
|
11
15
|
settings
|
|
12
16
|
} from "./chunk-4SYSDBZA.js";
|
|
13
|
-
import {
|
|
14
|
-
factorRecord,
|
|
15
|
-
parseNumber
|
|
16
|
-
} from "./chunk-MYVOHXZB.js";
|
|
17
17
|
import {
|
|
18
18
|
init_buffer
|
|
19
19
|
} from "./chunk-HX3SHTCE.js";
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FileOperation
|
|
3
|
+
} from "./chunk-LVEHHFOV.js";
|
|
1
4
|
import {
|
|
2
5
|
chunkBytes,
|
|
3
6
|
stagingLimit,
|
|
@@ -10,9 +13,6 @@ import {
|
|
|
10
13
|
codeOf,
|
|
11
14
|
pathOf
|
|
12
15
|
} from "./chunk-A7L65T2H.js";
|
|
13
|
-
import {
|
|
14
|
-
FileOperation
|
|
15
|
-
} from "./chunk-LVEHHFOV.js";
|
|
16
16
|
import {
|
|
17
17
|
init_buffer
|
|
18
18
|
} from "./chunk-HX3SHTCE.js";
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
splitRegex
|
|
3
3
|
} from "./chunk-NSEUBSOD.js";
|
|
4
|
-
import {
|
|
5
|
-
recurse
|
|
6
|
-
} from "./chunk-5PM5TEPM.js";
|
|
7
4
|
import {
|
|
8
5
|
scanRegex,
|
|
9
6
|
substituteRegex
|
|
10
7
|
} from "./chunk-WVWWRMFD.js";
|
|
8
|
+
import {
|
|
9
|
+
indices
|
|
10
|
+
} from "./chunk-Z47EO74H.js";
|
|
11
|
+
import {
|
|
12
|
+
recurse
|
|
13
|
+
} from "./chunk-5PM5TEPM.js";
|
|
11
14
|
import {
|
|
12
15
|
capture
|
|
13
16
|
} from "./chunk-GZOUGVVV.js";
|
|
@@ -18,12 +21,6 @@ import {
|
|
|
18
21
|
import {
|
|
19
22
|
delpaths
|
|
20
23
|
} from "./chunk-TFZEYNMX.js";
|
|
21
|
-
import {
|
|
22
|
-
formatValue
|
|
23
|
-
} from "./chunk-3JS4FOLB.js";
|
|
24
|
-
import {
|
|
25
|
-
indices
|
|
26
|
-
} from "./chunk-Z47EO74H.js";
|
|
27
24
|
import {
|
|
28
25
|
binary,
|
|
29
26
|
compare,
|
|
@@ -41,6 +38,9 @@ import {
|
|
|
41
38
|
import {
|
|
42
39
|
splitString
|
|
43
40
|
} from "./chunk-NYUMOVF2.js";
|
|
41
|
+
import {
|
|
42
|
+
formatValue
|
|
43
|
+
} from "./chunk-3JS4FOLB.js";
|
|
44
44
|
import {
|
|
45
45
|
JqParseError,
|
|
46
46
|
measureValue,
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cell,
|
|
3
|
+
widthOf
|
|
4
|
+
} from "./chunk-FXNKUBHR.js";
|
|
1
5
|
import {
|
|
2
6
|
jsonOutput,
|
|
3
7
|
tableOutput
|
|
@@ -5,10 +9,6 @@ import {
|
|
|
5
9
|
import {
|
|
6
10
|
usage
|
|
7
11
|
} from "./chunk-6WTZPHDU.js";
|
|
8
|
-
import {
|
|
9
|
-
cell,
|
|
10
|
-
widthOf
|
|
11
|
-
} from "./chunk-FXNKUBHR.js";
|
|
12
12
|
import {
|
|
13
13
|
init_buffer
|
|
14
14
|
} from "./chunk-HX3SHTCE.js";
|