@poe-platform/safe-bash 0.1.810 → 0.1.811
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/audio-ast/flac-source.d.ts +13 -0
- package/dist/audio-ast/index.d.ts +1 -0
- package/dist/audio-ast/index.js +248 -179
- package/dist/json-ast/backed-json-parser.d.ts +12 -1
- package/dist/json-ast/index.d.ts +1 -1
- package/dist/office-xml/index.d.ts +1 -0
- package/dist/office-xml/retained-xml-edits.d.ts +22 -0
- package/dist/pdf-ast/cos/qpdf-json-document.d.ts +2 -1
- package/dist/pdf-ast/index.js +151 -56
- package/dist/pdf-ast/retained-document.d.ts +2 -0
- package/dist/safe-bash/audio-ast.browser.js +2 -1
- package/dist/safe-bash/chunks/{chunk-65TFMAZU.js → chunk-BUYRKFW2.js} +8 -35
- package/dist/safe-bash/chunks/{chunk-ZA5FQ34E.js → chunk-TPG55BAQ.js} +0 -2
- package/dist/safe-bash/command-chunks/{biff-ORSHM4YX-QYPGRDAZ.js → biff-3EFLKBAH-NYWZOYQS.js} +2141 -2136
- package/dist/safe-bash/command-chunks/{chunk-HEHGHIE2.js → chunk-22MOB45U.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-6DEWZMOL.js → chunk-2CORNDGF.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-6UHGIWFX.js → chunk-2ZFLMWOX.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-HONWGFDA.js → chunk-33YCKZZX.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-AXWPJRY6.js → chunk-36XGIPOG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-32ADKP5E.js → chunk-456PHA3L.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-UJXP3T6R.js → chunk-4CKFNXRN.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-5L6GHFRW.js → chunk-554Z6IKP.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-ORZRWT62.js → chunk-56NYSX65.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-53JP3S6H.js → chunk-5HPU7D36.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-YTFWPJ3F.js → chunk-5LI2DLNZ.js} +26 -26
- package/dist/safe-bash/command-chunks/{chunk-CHR2OD2U.js → chunk-5MB64DWR.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-3ZWBBS6U.js → chunk-5OO2P27R.js} +340 -34
- package/dist/safe-bash/command-chunks/{chunk-IC5GJI7E.js → chunk-5Q22ZLNC.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-YO3V5RLY.js → chunk-6CCQI6XZ.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-EO2IVGV7.js → chunk-6M6TM5Z5.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-Z54Z3KRN.js → chunk-6QBMND4A.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-INX4JMQ6.js → chunk-6VPQ3CDZ.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-D5AYP2UM.js → chunk-72C3TZ2U.js} +25 -15
- package/dist/safe-bash/command-chunks/{chunk-VGXVN3BX.js → chunk-7GKKMNL6.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-TZJC67W3.js → chunk-7PVHO47B.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-CM3C7AXJ.js → chunk-A2CLZMQZ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ASR27KHW.js → chunk-A5FZBR7X.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-DMDHE5KC.js → chunk-AHA6IWAJ.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-PTZ55XXN.js → chunk-APEWTWCC.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-YUVH6CE4.js → chunk-ATTWQVR2.js} +17 -17
- package/dist/safe-bash/command-chunks/{chunk-JON5DB3Z.js → chunk-B5LDP7AA.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-CHJL6JMU.js → chunk-COKYZUBW.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-KCTV4NVX.js → chunk-CRV2Q3PB.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-V3WXPCKN.js → chunk-CV7M2QJU.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-VPDSQPSN.js → chunk-DM2CPMB4.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-3DTDMEOP.js → chunk-EAGIJ4VW.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-JW6CMBF2.js → chunk-EHSM5ZQS.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-WIOH7ZQN.js → chunk-ENT3IV2G.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-5IE4LJGB.js → chunk-EUT24Y5Z.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-COKZFXHG.js → chunk-FIIAYCWS.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-MWVFP2HY.js → chunk-GEM47B2P.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-EHL6B34L.js → chunk-HDJVJTCK.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-JMM3MNAY.js → chunk-HKATEVAP.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-VWY3EAVQ.js → chunk-HTVIYLVB.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-Z4QJMDK3.js → chunk-IT7TAC3F.js} +16 -16
- package/dist/safe-bash/command-chunks/{chunk-EWS4KYJE.js → chunk-JFYWVQ4V.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-ZCX63QWA.js → chunk-JOCFI7TG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-F5WTH4O4.js → chunk-JQVHUSDD.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-O4VJEGL6.js → chunk-K5GB2YMN.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-27C3NT5V.js → chunk-KB7DUBVL.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-4DZ32PI7.js → chunk-KCOJA7EM.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-CAXJ4RLF.js → chunk-KJ4XXZIL.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-BYZUOF6X.js → chunk-KL3OIBKB.js} +3742 -3726
- package/dist/safe-bash/command-chunks/{chunk-U6QHTC5J.js → chunk-L5MCW6CM.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-LVL3A7YE.js → chunk-LCZDBW55.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-DJVRDUCA.js → chunk-LXLLA4PM.js} +17 -17
- package/dist/safe-bash/command-chunks/{chunk-K7AGAS3K.js → chunk-M7QE2MN7.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-SWT6ILF2.js → chunk-MPUHH2KR.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-DC3OJLRB.js → chunk-NQDIT667.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-LWZVDDJA.js → chunk-NUGQQDGE.js} +5 -1
- package/dist/safe-bash/command-chunks/{chunk-MFLQZLFR.js → chunk-OA75SGN2.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-5LATYOF7.js → chunk-OEJM666F.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-AF25YYIO.js → chunk-PMAM4N33.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-KMMAJ6H6.js → chunk-PNGDJA6M.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-62BHPSKJ.js → chunk-Q6S57NOQ.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-KJ3PEDI2.js → chunk-Q73EMLLZ.js} +146 -4
- package/dist/safe-bash/command-chunks/{chunk-FXKBM5KJ.js → chunk-QC5RMGSA.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-UQ6UIZMM.js → chunk-QD7ZRDUN.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-JHUYZZGV.js → chunk-QYMEASQ6.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-3GY5VDIX.js → chunk-QZZ73J2O.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-S2CYIGWH.js → chunk-R6EGGK5M.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-7AVN3OBH.js → chunk-RHYJVTJO.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-EWGDSO6U.js → chunk-RID6VYS3.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-MMBRBANA.js → chunk-RNSKXOG3.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-D3ZRZTY5.js → chunk-RQIQ75W5.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-DWKQPLRT.js → chunk-RRL3Y562.js} +11 -11
- package/dist/safe-bash/command-chunks/{chunk-NXCMXD74.js → chunk-S6R3IB36.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-XUPKFHAQ.js → chunk-SDTPO2VV.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-PIAGKRFW.js → chunk-SPLOIABU.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-WLTJDNSQ.js → chunk-TVH4JORU.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-6XVMWFHD.js → chunk-TW73OXPR.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-SFO43CID.js → chunk-UAXSE3XE.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-K35BSUHO.js → chunk-UYWSIIUX.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-DCD32BEY.js → chunk-VU3EQF7F.js} +91 -53
- package/dist/safe-bash/command-chunks/{chunk-2E2YEDVB.js → chunk-W5YSINXC.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-EYNT4OEJ.js → chunk-WGG6G2KG.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-DVQBZXMQ.js → chunk-WJCN2IXI.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-XBZ4ZWGL.js → chunk-WVMHRNXZ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-7GXUCQI4.js → chunk-WXRYDALR.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-S4IIOSRA.js → chunk-X7FA7ZD5.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-SFCERNHU.js → chunk-XPD636C4.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-HYDWQLJ3.js → chunk-XRVKWGVQ.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-3UJWHRK4.js → chunk-XVP6V5K3.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-KTI3BULE.js → chunk-XZ2FWFNV.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-QK3CHRGL.js → chunk-Y4EYCZFT.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-GTWVMFBK.js → chunk-YORJDX4V.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-H6F5SN2N.js → chunk-YSMNXMAO.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-ZEPDT6I5.js → chunk-YSY6R6AS.js} +21 -25
- package/dist/safe-bash/command-chunks/{chunk-SE5SJ4JT.js → chunk-Z2JW6M2D.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-WC2OCF4H.js → chunk-ZHRGYR7B.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-HQYFRQ5W.js → chunk-ZIIO6GRY.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-NTRZMQZP.js → chunk-ZMHEGDU2.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-EYBXHGA6.js → chunk-ZXR6LXV5.js} +2 -2
- package/dist/safe-bash/command-chunks/{engine-MEPOXIXT-WZMRHACG.js → engine-AXXFTGCL-QBQNBI6K.js} +1 -1
- package/dist/safe-bash/command-chunks/pdf-XHHFTOT4-UJJYOYJ2.js +573 -0
- package/dist/safe-bash/commands/diff-patch/index.js +0 -3
- package/dist/safe-bash/commands/diff3/index.js +0 -2
- package/dist/safe-bash/full-core.browser.js +2 -2
- package/dist/safe-bash/plugins/index.browser.js +2 -2
- package/dist/safe-bash/plugins/index.js +3 -1
- package/dist/safe-bash/plugins/portable-commands.d.ts +1 -1
- package/dist/safe-bash/plugins/portable-commands.js +5 -3
- package/dist/safe-bash/registry-entry.browser.js +1 -1
- package/dist/safe-bash-command-diff/index.js +0 -2
- package/dist/safe-bash-command-diff3/index.js +830 -56
- package/dist/safe-bash-command-ffmpeg/index.js +1 -1
- package/dist/safe-bash-command-ffprobe/index.js +2 -2
- package/dist/safe-bash-command-ffprobe/media.js +2 -2
- package/dist/safe-bash-command-html-to-markdown/index.js +75 -21
- package/dist/safe-bash-command-pandoc/command.js +3 -3
- package/dist/safe-bash-command-pandoc/execution.d.ts +2 -2
- package/dist/safe-bash-command-pandoc/index.d.ts +1 -1
- package/dist/safe-bash-command-pandoc/index.js +14 -14
- package/dist/safe-bash-command-pandoc/lua-filters.js +2 -2
- package/dist/safe-bash-command-pandoc/types.d.ts +17 -2
- package/dist/safe-bash-command-patch/index.js +1 -1
- package/dist/safe-bash-command-patch/patch.js +1 -1
- package/dist/safe-bash-command-pdftk/index.js +616 -265
- package/dist/safe-bash-command-qpdf/index.js +115 -9
- package/dist/safe-bash-command-soffice/index.js +1 -1
- package/dist/safe-bash-command-ssconvert/index.js +2 -2
- package/dist/safe-bash-command-xq/index.js +45 -29
- package/dist/safe-bash-presentation-engine/accessibility.js +30 -30
- package/dist/safe-bash-presentation-engine/animation-editing.js +15 -15
- package/dist/safe-bash-presentation-engine/animations.js +15 -15
- package/dist/safe-bash-presentation-engine/backgrounds.js +16 -16
- package/dist/safe-bash-presentation-engine/bytes.js +3 -3
- package/dist/safe-bash-presentation-engine/chart-editing.js +33 -33
- package/dist/safe-bash-presentation-engine/chart-object-operations.js +24 -24
- package/dist/safe-bash-presentation-engine/charts.js +30 -30
- package/dist/safe-bash-presentation-engine/command-placeholder.js +55 -55
- package/dist/safe-bash-presentation-engine/comments.js +16 -16
- package/dist/safe-bash-presentation-engine/connector-operations.js +31 -31
- package/dist/safe-bash-presentation-engine/connectors.js +28 -28
- package/dist/safe-bash-presentation-engine/content-types.js +4 -4
- package/dist/safe-bash-presentation-engine/creation.js +6 -6
- package/dist/safe-bash-presentation-engine/diff.js +31 -31
- package/dist/safe-bash-presentation-engine/drawing-format.js +19 -19
- package/dist/safe-bash-presentation-engine/drawing-operations.js +30 -30
- package/dist/safe-bash-presentation-engine/drawing-schema.js +20 -20
- package/dist/safe-bash-presentation-engine/equations.js +16 -16
- package/dist/safe-bash-presentation-engine/errors.js +2 -2
- package/dist/safe-bash-presentation-engine/fields.js +16 -16
- package/dist/safe-bash-presentation-engine/font-metrics.js +3 -3
- package/dist/safe-bash-presentation-engine/image-extraction.js +19 -19
- package/dist/safe-bash-presentation-engine/image-formatting.js +31 -31
- package/dist/safe-bash-presentation-engine/image-insertion.js +17 -17
- package/dist/safe-bash-presentation-engine/image-replacement.js +20 -20
- package/dist/safe-bash-presentation-engine/image-value.js +4 -4
- package/dist/safe-bash-presentation-engine/images.js +18 -18
- package/dist/safe-bash-presentation-engine/index.d.ts +1 -1
- package/dist/safe-bash-presentation-engine/index.js +95 -93
- package/dist/safe-bash-presentation-engine/layouts.js +15 -15
- package/dist/safe-bash-presentation-engine/length.js +3 -3
- package/dist/safe-bash-presentation-engine/links.js +15 -15
- package/dist/safe-bash-presentation-engine/masters.js +14 -14
- package/dist/safe-bash-presentation-engine/media-editing.js +23 -23
- package/dist/safe-bash-presentation-engine/media-extraction.js +16 -16
- package/dist/safe-bash-presentation-engine/media.js +15 -15
- package/dist/safe-bash-presentation-engine/memberships.js +14 -14
- package/dist/safe-bash-presentation-engine/notes.js +15 -15
- package/dist/safe-bash-presentation-engine/ole-enum.js +4 -4
- package/dist/safe-bash-presentation-engine/ole-insertion.js +19 -19
- package/dist/safe-bash-presentation-engine/opaque-objects.js +9 -9
- package/dist/safe-bash-presentation-engine/package-reader.js +5 -5
- package/dist/safe-bash-presentation-engine/package-tools.js +15 -15
- package/dist/safe-bash-presentation-engine/package-uri.js +3 -3
- package/dist/safe-bash-presentation-engine/package-writer.js +4 -4
- package/dist/safe-bash-presentation-engine/presentation-model.js +54 -54
- package/dist/safe-bash-presentation-engine/presentation-settings.js +13 -13
- package/dist/safe-bash-presentation-engine/properties.js +15 -15
- package/dist/safe-bash-presentation-engine/relationships.js +4 -4
- package/dist/safe-bash-presentation-engine/resource-limits.js +1 -1
- package/dist/safe-bash-presentation-engine/retained-inspection.js +12 -12
- package/dist/safe-bash-presentation-engine/retained-package.js +4 -4
- package/dist/safe-bash-presentation-engine/retained-slide-settings.d.ts +15 -0
- package/dist/safe-bash-presentation-engine/retained-text.js +17 -17
- package/dist/safe-bash-presentation-engine/sanitize.js +16 -16
- package/dist/safe-bash-presentation-engine/selectors.js +10 -10
- package/dist/safe-bash-presentation-engine/shape-groups.js +30 -30
- package/dist/safe-bash-presentation-engine/shape-operations.js +29 -29
- package/dist/safe-bash-presentation-engine/shape-path-operations.js +31 -31
- package/dist/safe-bash-presentation-engine/shape-paths.js +15 -15
- package/dist/safe-bash-presentation-engine/shape-presets.js +3 -3
- package/dist/safe-bash-presentation-engine/shape-selection.js +30 -30
- package/dist/safe-bash-presentation-engine/shape-transforms.js +17 -17
- package/dist/safe-bash-presentation-engine/shapes.js +26 -26
- package/dist/safe-bash-presentation-engine/slide-copy.js +16 -16
- package/dist/safe-bash-presentation-engine/slide-import.js +17 -17
- package/dist/safe-bash-presentation-engine/slide-merge-split.js +19 -19
- package/dist/safe-bash-presentation-engine/slide-model.js +42 -42
- package/dist/safe-bash-presentation-engine/slide-removal.js +17 -17
- package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +9 -9
- package/dist/safe-bash-presentation-engine/slides.d.ts +2 -0
- package/dist/safe-bash-presentation-engine/slides.js +21 -16
- package/dist/safe-bash-presentation-engine/table-operations.js +32 -32
- package/dist/safe-bash-presentation-engine/table-spans.js +31 -31
- package/dist/safe-bash-presentation-engine/tables.js +30 -30
- package/dist/safe-bash-presentation-engine/tags.js +15 -15
- package/dist/safe-bash-presentation-engine/template-bindings.js +32 -32
- package/dist/safe-bash-presentation-engine/template-repeat.js +39 -39
- package/dist/safe-bash-presentation-engine/text-fitting.js +26 -26
- package/dist/safe-bash-presentation-engine/text-frames.js +26 -26
- package/dist/safe-bash-presentation-engine/text-paragraphs.js +26 -26
- package/dist/safe-bash-presentation-engine/text-reading.js +11 -11
- package/dist/safe-bash-presentation-engine/text-replacement.js +16 -16
- package/dist/safe-bash-presentation-engine/text-runs.js +19 -19
- package/dist/safe-bash-presentation-engine/themes.js +15 -15
- package/dist/safe-bash-presentation-engine/transitions.js +15 -15
- package/dist/safe-bash-presentation-engine/validation.js +9 -9
- package/dist/safe-bash-presentation-engine/xml-parts.js +15 -15
- package/dist/safe-bash-presentation-engine/xml-view.js +3 -3
- package/dist/safe-bash-presentation-engine/xml.js +3 -3
- package/dist/safe-bash-xml-engine/json.d.ts +1 -0
- package/dist/safe-bash-xml-engine/json.js +203 -0
- package/dist/safe-bash-xml-engine/stored-json.d.ts +5 -0
- package/dist/spreadsheet-engine/rendering/print/bidi-runs.d.ts +5 -0
- package/dist/spreadsheet-engine/rendering/print/bidi-runs.js +35 -0
- package/dist/spreadsheet-engine/rendering/print/control-bidi.d.ts +8 -0
- package/dist/spreadsheet-engine/rendering/print/control-bidi.js +80 -0
- package/dist/spreadsheet-format-xls/biff-encrypted-properties.d.ts +4 -4
- package/dist/spreadsheet-format-xls/biff-encrypted-properties.js +36 -23
- package/dist/spreadsheet-format-xls/biff-encryption.js +1 -1
- package/dist/spreadsheet-format-xls/biff-property-bytes.d.ts +4 -1
- package/dist/spreadsheet-format-xls/biff-property-bytes.js +1 -1
- package/dist/spreadsheet-format-xls/biff-range.js +1 -1
- package/package.json +5 -2
- package/dist/safe-bash/command-chunks/pdf-LOZAXXS6-ERI57IAV.js +0 -557
package/dist/pdf-ast/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
indexJsonObjects,
|
|
10
10
|
parseBackedJson,
|
|
11
11
|
readJsonNumber
|
|
12
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
12
|
+
} from "../safe-bash/command-chunks/chunk-NUGQQDGE.js";
|
|
13
13
|
import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
|
|
14
14
|
|
|
15
15
|
// packages/pdf-ast/src/source.ts
|
|
@@ -31443,16 +31443,20 @@ function parseCosDocument(bytes, options = {}) {
|
|
|
31443
31443
|
|
|
31444
31444
|
// packages/pdf-ast/src/content/array-cursor.ts
|
|
31445
31445
|
var PdfArrayCursor = class {
|
|
31446
|
-
constructor(array) {
|
|
31446
|
+
constructor(array, state) {
|
|
31447
31447
|
this.array = array;
|
|
31448
31448
|
this.length = array.storedItems?.length ?? array.items.length;
|
|
31449
31449
|
if (!Number.isSafeInteger(this.length) || this.length < 0) throw new RangeError("Invalid stored array length");
|
|
31450
|
-
this.position = array.storedItems?.position ?? -1;
|
|
31450
|
+
this.position = state?.position ?? array.storedItems?.position ?? -1;
|
|
31451
|
+
this.index = state?.index ?? 0;
|
|
31451
31452
|
}
|
|
31452
31453
|
array;
|
|
31453
31454
|
index = 0;
|
|
31454
31455
|
position;
|
|
31455
31456
|
length;
|
|
31457
|
+
snapshot() {
|
|
31458
|
+
return { array: this.array, index: this.index, position: this.position };
|
|
31459
|
+
}
|
|
31456
31460
|
*next() {
|
|
31457
31461
|
if (this.index === this.length) {
|
|
31458
31462
|
if (this.array.storedItems && this.position !== -1) throw new Error("Invalid stored array terminator");
|
|
@@ -31510,7 +31514,7 @@ function* sampledVertices(size, domain, encode3, inputs, sampleCount) {
|
|
|
31510
31514
|
function* resolveNode(node, arrayKey) {
|
|
31511
31515
|
if (!node) return void 0;
|
|
31512
31516
|
const result = yield { kind: "resolve", node, ...arrayKey ? { arrayKey } : {} };
|
|
31513
|
-
if (typeof result === "number" || typeof result === "boolean") throw new TypeError("Expected a PDF annotation object");
|
|
31517
|
+
if (typeof result === "number" || typeof result === "boolean" || result?.kind === "annotation-page-frame") throw new TypeError("Expected a PDF annotation object");
|
|
31514
31518
|
return result;
|
|
31515
31519
|
}
|
|
31516
31520
|
function* resolveDict(node) {
|
|
@@ -31635,26 +31639,45 @@ function* extractPageAnnotationSteps(pageDict, root, maxDepth = Infinity) {
|
|
|
31635
31639
|
}
|
|
31636
31640
|
}
|
|
31637
31641
|
function* annotationPageNumberSteps(root, reference, maxDepth = Infinity) {
|
|
31638
|
-
let index2 = 0;
|
|
31639
|
-
|
|
31640
|
-
|
|
31642
|
+
let index2 = 0, depth = 0;
|
|
31643
|
+
const catalog = yield* resolveDict(root);
|
|
31644
|
+
let node = catalog ? dictGet(catalog, "Pages") : void 0;
|
|
31645
|
+
let cursor, cursorDepth = 0;
|
|
31646
|
+
while (true) {
|
|
31647
|
+
if (!node) {
|
|
31648
|
+
if (!cursor) {
|
|
31649
|
+
const frame = yield { kind: "pop-page-frame" };
|
|
31650
|
+
if (frame === void 0) return void 0;
|
|
31651
|
+
if (typeof frame !== "object" || frame.kind !== "annotation-page-frame") throw new TypeError("Expected an annotation page frame");
|
|
31652
|
+
cursor = new PdfArrayCursor(frame.cursor.array, frame.cursor);
|
|
31653
|
+
cursorDepth = frame.depth;
|
|
31654
|
+
}
|
|
31655
|
+
const step = yield* cursor.next();
|
|
31656
|
+
if (step.done) {
|
|
31657
|
+
cursor = void 0;
|
|
31658
|
+
continue;
|
|
31659
|
+
}
|
|
31660
|
+
node = step.value;
|
|
31661
|
+
depth = cursorDepth;
|
|
31662
|
+
if (!node) continue;
|
|
31663
|
+
}
|
|
31664
|
+
const current = node;
|
|
31665
|
+
node = void 0;
|
|
31641
31666
|
if (depth > maxDepth) throw new PdfError("E_LIMIT", "PDF annotation page-tree depth limit exceeded");
|
|
31642
|
-
if (
|
|
31643
|
-
const dict = yield* resolveDict(
|
|
31644
|
-
if (!dict)
|
|
31667
|
+
if (current.kind === "ref" && !(yield { kind: "visit-page", reference: current })) continue;
|
|
31668
|
+
const dict = yield* resolveDict(current);
|
|
31669
|
+
if (!dict) continue;
|
|
31645
31670
|
const type = yield* resolveNode(dictGet(dict, "Type"));
|
|
31646
31671
|
const kids = yield* resolveArray(dictGet(dict, "Kids"), "Kids");
|
|
31647
31672
|
if (kids && (type?.kind !== "name" || type.decoded !== "Page")) {
|
|
31648
|
-
|
|
31649
|
-
|
|
31673
|
+
if (cursor) yield { kind: "push-page-frame", frame: { kind: "annotation-page-frame", cursor: cursor.snapshot(), depth: cursorDepth } };
|
|
31674
|
+
cursor = new PdfArrayCursor(kids);
|
|
31675
|
+
cursorDepth = depth + 1;
|
|
31650
31676
|
} else {
|
|
31651
31677
|
index2++;
|
|
31652
|
-
if (
|
|
31678
|
+
if (current.kind === "ref" && current.objectNumber === reference.objectNumber) return index2;
|
|
31653
31679
|
}
|
|
31654
|
-
return void 0;
|
|
31655
31680
|
}
|
|
31656
|
-
const catalog = yield* resolveDict(root);
|
|
31657
|
-
return yield* walk(catalog ? dictGet(catalog, "Pages") : void 0);
|
|
31658
31681
|
}
|
|
31659
31682
|
|
|
31660
31683
|
// packages/pdf-ast/src/fonts/stored-widths.ts
|
|
@@ -43914,11 +43937,16 @@ function evaluateContentStreamToDisplayList(params) {
|
|
|
43914
43937
|
function extractPageAnnotations(cosDoc, pageDict) {
|
|
43915
43938
|
function pageNumber(reference) {
|
|
43916
43939
|
const visited = /* @__PURE__ */ new Set();
|
|
43940
|
+
const frames = [];
|
|
43917
43941
|
const work2 = annotationPageNumberSteps(cosDoc.rootRef, reference);
|
|
43918
43942
|
let step2 = work2.next();
|
|
43919
43943
|
while (!step2.done) {
|
|
43920
43944
|
const request = step2.value;
|
|
43921
43945
|
if (request.kind === "resolve") step2 = work2.next(cosDoc.resolve(request.node));
|
|
43946
|
+
else if (request.kind === "push-page-frame") {
|
|
43947
|
+
frames.push(request.frame);
|
|
43948
|
+
step2 = work2.next();
|
|
43949
|
+
} else if (request.kind === "pop-page-frame") step2 = work2.next(frames.pop());
|
|
43922
43950
|
else if (request.kind === "visit-page") {
|
|
43923
43951
|
const number = request.reference.objectNumber, added = !visited.has(number);
|
|
43924
43952
|
visited.add(number);
|
|
@@ -59911,19 +59939,62 @@ var PdfRetainedDocument = class _PdfRetainedDocument {
|
|
|
59911
59939
|
...arrayPathPrefix.length && arrays.storedStringKeys?.includes(arrayPathPrefix[arrayPathPrefix.length - 1]) ? { storeRootString: true } : {}
|
|
59912
59940
|
};
|
|
59913
59941
|
let reference;
|
|
59914
|
-
const visited =
|
|
59942
|
+
const visited = new PdfReferenceSet(this.storage, this.options.maxTraversalStagingBytes, this.options.signal);
|
|
59915
59943
|
const maximum10 = this.options.maxRecursionDepth ?? 100;
|
|
59916
|
-
|
|
59917
|
-
|
|
59918
|
-
|
|
59919
|
-
|
|
59920
|
-
|
|
59921
|
-
|
|
59922
|
-
|
|
59923
|
-
|
|
59924
|
-
|
|
59944
|
+
let depth = 0, failed = false;
|
|
59945
|
+
try {
|
|
59946
|
+
while (node?.kind === "ref") {
|
|
59947
|
+
if (depth >= maximum10) throw new PdfError("E_LIMIT", "PDF reference depth limit exceeded");
|
|
59948
|
+
if (!await visited.add(node.objectNumber)) throw new PdfError("E_PARSE", "Circular PDF indirect reference");
|
|
59949
|
+
if (++depth % 64 === 0) await new Promise((resolve2) => setTimeout(resolve2, 0));
|
|
59950
|
+
this.assertOpen();
|
|
59951
|
+
reference = node;
|
|
59952
|
+
const object = await this.objects.get(node.objectNumber, node.generationNumber, arrays);
|
|
59953
|
+
this.assertOpen();
|
|
59954
|
+
if (object?.stream) return { value: object.value, reference, stream: object.stream };
|
|
59955
|
+
node = object?.value;
|
|
59956
|
+
}
|
|
59957
|
+
return node ? { value: node, ...reference ? { reference } : {} } : void 0;
|
|
59958
|
+
} catch (error) {
|
|
59959
|
+
failed = true;
|
|
59960
|
+
throw error;
|
|
59961
|
+
} finally {
|
|
59962
|
+
await visited.close().catch((error) => {
|
|
59963
|
+
if (!failed) throw error;
|
|
59964
|
+
});
|
|
59925
59965
|
}
|
|
59926
|
-
|
|
59966
|
+
}
|
|
59967
|
+
/** Visit page dictionaries in inheritance order using caller-backed cycle state. */
|
|
59968
|
+
pageAncestors(first) {
|
|
59969
|
+
async function* visit(doc) {
|
|
59970
|
+
doc.assertOpen();
|
|
59971
|
+
doc.walks.add(work);
|
|
59972
|
+
const visited = new PdfReferenceSet(doc.storage, doc.options.maxTraversalStagingBytes, doc.options.signal);
|
|
59973
|
+
let current = first, depth = 0, failed = false;
|
|
59974
|
+
try {
|
|
59975
|
+
while (current) {
|
|
59976
|
+
if (depth++ > doc.depthLimit) throw new PdfError("E_LIMIT", "PDF inherited page depth limit exceeded");
|
|
59977
|
+
if (depth % 64 === 0) await new Promise((resolve2) => setTimeout(resolve2, 0));
|
|
59978
|
+
doc.assertOpen();
|
|
59979
|
+
yield current;
|
|
59980
|
+
doc.assertOpen();
|
|
59981
|
+
const parent = dictGet(current, "Parent");
|
|
59982
|
+
if (parent?.kind === "ref" && !await visited.add(parent.objectNumber)) break;
|
|
59983
|
+
const resolved = (await doc.lookup(parent))?.value;
|
|
59984
|
+
current = resolved?.kind === "dict" ? resolved : void 0;
|
|
59985
|
+
}
|
|
59986
|
+
} catch (error) {
|
|
59987
|
+
failed = true;
|
|
59988
|
+
throw error;
|
|
59989
|
+
} finally {
|
|
59990
|
+
doc.walks.delete(work);
|
|
59991
|
+
await visited.close().catch((error) => {
|
|
59992
|
+
if (!failed) throw error;
|
|
59993
|
+
});
|
|
59994
|
+
}
|
|
59995
|
+
}
|
|
59996
|
+
const work = visit(this);
|
|
59997
|
+
return work;
|
|
59927
59998
|
}
|
|
59928
59999
|
/** Read one caller-backed array record with document cancellation and ownership. */
|
|
59929
60000
|
async readArrayItem(items, position) {
|
|
@@ -59946,6 +60017,8 @@ var PdfRetainedDocument = class _PdfRetainedDocument {
|
|
|
59946
60017
|
async annotationPageNumber(reference) {
|
|
59947
60018
|
this.assertOpen();
|
|
59948
60019
|
const visited = new PdfReferenceSet(this.storage, this.options.maxTraversalStagingBytes, this.options.signal);
|
|
60020
|
+
const backing = this.options.valueArrays?.storedArrayKeys?.includes("Kids") ? this.options.valueArrays.arrayStorage : void 0;
|
|
60021
|
+
const frames = backing ? new StoredMetadataStack(backing, this.options.signal) : [];
|
|
59949
60022
|
const work = annotationPageNumberSteps(this.crossReference.rootRef, reference, this.depthLimit);
|
|
59950
60023
|
let failed = false;
|
|
59951
60024
|
try {
|
|
@@ -59959,7 +60032,11 @@ var PdfRetainedDocument = class _PdfRetainedDocument {
|
|
|
59959
60032
|
step = work.next(resolved?.stream && resolved.value.kind === "dict" ? { kind: "stream", dict: resolved.value, rawBytes: new Uint8Array() } : resolved?.value);
|
|
59960
60033
|
} else if (request.kind === "array-item") {
|
|
59961
60034
|
step = work.next(await this.readArrayItem(request.items, request.position));
|
|
59962
|
-
} else if (request.kind === "
|
|
60035
|
+
} else if (request.kind === "push-page-frame") {
|
|
60036
|
+
await frames.push(request.frame);
|
|
60037
|
+
step = work.next();
|
|
60038
|
+
} else if (request.kind === "pop-page-frame") step = work.next(await frames.pop());
|
|
60039
|
+
else if (request.kind === "visit-page") step = work.next(await visited.add(request.reference.objectNumber));
|
|
59963
60040
|
else throw new TypeError("Unexpected annotation page lookup request");
|
|
59964
60041
|
}
|
|
59965
60042
|
return step.value;
|
|
@@ -59980,21 +60057,50 @@ var PdfRetainedDocument = class _PdfRetainedDocument {
|
|
|
59980
60057
|
const visited = new PdfReferenceSet(doc.storage, doc.options.maxTraversalStagingBytes, doc.options.signal);
|
|
59981
60058
|
let count = 0;
|
|
59982
60059
|
let failed = false;
|
|
59983
|
-
async function* walk(
|
|
59984
|
-
doc.
|
|
59985
|
-
|
|
59986
|
-
|
|
59987
|
-
|
|
59988
|
-
|
|
59989
|
-
|
|
59990
|
-
|
|
59991
|
-
|
|
59992
|
-
|
|
59993
|
-
|
|
59994
|
-
|
|
59995
|
-
|
|
59996
|
-
|
|
59997
|
-
|
|
60060
|
+
async function* walk(first) {
|
|
60061
|
+
const backing = doc.options.valueArrays?.storedArrayKeys?.includes("Kids") ? doc.options.valueArrays.arrayStorage : void 0;
|
|
60062
|
+
const frames = backing ? new StoredMetadataStack(backing, doc.options.signal) : [];
|
|
60063
|
+
let frame, node = first, depth = 0, turns = 0;
|
|
60064
|
+
while (true) {
|
|
60065
|
+
if (++turns % 64 === 0) await new Promise((resolve2) => setTimeout(resolve2, 0));
|
|
60066
|
+
doc.assertOpen();
|
|
60067
|
+
if (!node) {
|
|
60068
|
+
frame ??= await frames.pop();
|
|
60069
|
+
if (!frame) return;
|
|
60070
|
+
const stored = frame.kids.storedItems, length = stored?.length ?? frame.kids.items.length;
|
|
60071
|
+
if (!Number.isSafeInteger(length) || length < 0) throw new RangeError("Invalid stored array length");
|
|
60072
|
+
if (frame.index === length) {
|
|
60073
|
+
if (stored && frame.position !== -1) throw new Error("Invalid stored array terminator");
|
|
60074
|
+
frame = void 0;
|
|
60075
|
+
continue;
|
|
60076
|
+
}
|
|
60077
|
+
if (stored) {
|
|
60078
|
+
const record = await readStoredRecord(stored.storage, frame.position, doc.options.signal);
|
|
60079
|
+
frame.position = record.next;
|
|
60080
|
+
node = record.value;
|
|
60081
|
+
} else node = frame.kids.items[frame.index];
|
|
60082
|
+
frame.index++;
|
|
60083
|
+
depth = frame.depth;
|
|
60084
|
+
if (!node) continue;
|
|
60085
|
+
}
|
|
60086
|
+
const current = node;
|
|
60087
|
+
node = void 0;
|
|
60088
|
+
if (depth > doc.depthLimit) throw new PdfError("E_LIMIT", "PDF page tree depth limit exceeded");
|
|
60089
|
+
if (current.kind === "ref" && !await visited.add(current.objectNumber)) continue;
|
|
60090
|
+
const resolved = await doc.lookup(current);
|
|
60091
|
+
if (resolved?.value.kind !== "dict") continue;
|
|
60092
|
+
const dict = resolved.value;
|
|
60093
|
+
const type = (await doc.lookup(dictGet(dict, "Type")))?.value;
|
|
60094
|
+
const kids = (await doc.lookup(dictGet(dict, "Kids"), void 0, ["Kids"]))?.value;
|
|
60095
|
+
if (type?.kind === "name" && type.decoded === "Pages" || kids?.kind === "array") {
|
|
60096
|
+
if (kids?.kind === "array") {
|
|
60097
|
+
if (frame) await frames.push(frame);
|
|
60098
|
+
frame = { kids, index: 0, position: kids.storedItems?.position ?? -1, depth: depth + 1 };
|
|
60099
|
+
}
|
|
60100
|
+
} else if (type?.kind === "name" && type.decoded === "Page" || dictGet(dict, "MediaBox") || dictGet(dict, "Contents")) {
|
|
60101
|
+
if (count >= Math.min(doc.options.maxPages, Number.MAX_SAFE_INTEGER)) throw new PdfError("E_LIMIT", "PDF page count limit exceeded");
|
|
60102
|
+
yield new PdfRetainedPage(doc, count++, dict, current.kind === "ref" ? current : void 0);
|
|
60103
|
+
}
|
|
59998
60104
|
}
|
|
59999
60105
|
}
|
|
60000
60106
|
try {
|
|
@@ -60008,7 +60114,7 @@ var PdfRetainedDocument = class _PdfRetainedDocument {
|
|
|
60008
60114
|
}
|
|
60009
60115
|
} else {
|
|
60010
60116
|
const root = (await doc.lookup(doc.crossReference.rootRef))?.value;
|
|
60011
|
-
if (root?.kind === "dict") yield* walk(dictGet(root, "Pages")
|
|
60117
|
+
if (root?.kind === "dict") yield* walk(dictGet(root, "Pages"));
|
|
60012
60118
|
}
|
|
60013
60119
|
} catch (error) {
|
|
60014
60120
|
failed = true;
|
|
@@ -60239,11 +60345,7 @@ var PdfRetainedPage = class {
|
|
|
60239
60345
|
const values = /* @__PURE__ */ new Map();
|
|
60240
60346
|
const boxes = /* @__PURE__ */ new Map();
|
|
60241
60347
|
const keys = ["MediaBox", "CropBox", "BleedBox", "TrimBox", "ArtBox", "Rotate", "Resources"];
|
|
60242
|
-
|
|
60243
|
-
const visited = /* @__PURE__ */ new Set();
|
|
60244
|
-
let depth = 0;
|
|
60245
|
-
while (current) {
|
|
60246
|
-
if (depth++ > this.document.depthLimit) throw new PdfError("E_LIMIT", "PDF inherited page depth limit exceeded");
|
|
60348
|
+
for await (const current of this.document.pageAncestors(this.dict)) {
|
|
60247
60349
|
for (const key of keys) {
|
|
60248
60350
|
const entry = dictGet(current, key);
|
|
60249
60351
|
if (values.has(key) || !entry) continue;
|
|
@@ -60256,13 +60358,6 @@ var PdfRetainedPage = class {
|
|
|
60256
60358
|
values.set(key, value);
|
|
60257
60359
|
}
|
|
60258
60360
|
if (values.size === keys.length) break;
|
|
60259
|
-
const parent = dictGet(current, "Parent");
|
|
60260
|
-
if (parent?.kind === "ref") {
|
|
60261
|
-
if (visited.has(parent.objectNumber)) break;
|
|
60262
|
-
visited.add(parent.objectNumber);
|
|
60263
|
-
}
|
|
60264
|
-
const resolved = (await this.document.lookup(parent))?.value;
|
|
60265
|
-
current = resolved?.kind === "dict" ? resolved : void 0;
|
|
60266
60361
|
}
|
|
60267
60362
|
async function box(node, document2) {
|
|
60268
60363
|
if (node?.kind !== "array" || node.items.length < 4) return void 0;
|
|
@@ -64,6 +64,8 @@ export declare class PdfRetainedDocument {
|
|
|
64
64
|
private assertOpen;
|
|
65
65
|
/** Resolve a bounded reference chain, retaining the final stream's identity. */
|
|
66
66
|
lookup(node: PdfCosNode | undefined, arrays?: ValueArrayStorage, arrayPathPrefix?: readonly string[]): Promise<PdfRetainedValue | undefined>;
|
|
67
|
+
/** Visit page dictionaries in inheritance order using caller-backed cycle state. */
|
|
68
|
+
pageAncestors(first: PdfCosDict): AsyncGenerator<PdfCosDict, void, void>;
|
|
67
69
|
/** Read one caller-backed array record with document cancellation and ownership. */
|
|
68
70
|
readArrayItem(items: PdfStoredItems, position: number): Promise<import("./ast.js").PdfCosArray>;
|
|
69
71
|
info(): Promise<Readonly<Record<string, string>>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/safe-bash/src/audio-ast.ts
|
|
2
|
-
import { concat, decodePcm, encodeWav, extractChannels, fade, normalize, pad, parseAudio, probeAudio, probeWavSource, remix, resample, stats, transformAudio, trim, writeAudioMetadata } from "../audio-ast/index.js";
|
|
2
|
+
import { concat, decodePcm, encodeWav, extractChannels, fade, normalize, pad, parseAudio, probeAudio, probeFlacSource, probeWavSource, remix, resample, stats, transformAudio, trim, writeAudioMetadata } from "../audio-ast/index.js";
|
|
3
3
|
export {
|
|
4
4
|
concat,
|
|
5
5
|
decodePcm,
|
|
@@ -10,6 +10,7 @@ export {
|
|
|
10
10
|
pad,
|
|
11
11
|
parseAudio,
|
|
12
12
|
probeAudio,
|
|
13
|
+
probeFlacSource,
|
|
13
14
|
probeWavSource,
|
|
14
15
|
remix,
|
|
15
16
|
resample,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
composeAgentCommands,
|
|
6
6
|
createAgentCommandPlugin,
|
|
7
7
|
createRegexExecutors
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TPG55BAQ.js";
|
|
9
9
|
import {
|
|
10
10
|
createOpCommands
|
|
11
11
|
} from "./chunk-UKMP6ZT5.js";
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
createLazyCommandLoader,
|
|
15
15
|
createLazyCommands,
|
|
16
16
|
createOptionalCommands,
|
|
17
|
+
createPandocCommand,
|
|
17
18
|
lazyCommandPlugin
|
|
18
19
|
} from "./chunk-HHSOUC3Z.js";
|
|
19
20
|
import {
|
|
@@ -82,36 +83,7 @@ function diff3Commands(options = {}) {
|
|
|
82
83
|
}
|
|
83
84
|
};
|
|
84
85
|
}
|
|
85
|
-
var _syncDiff3Signal;
|
|
86
|
-
var syncDiff3Signal = () => _syncDiff3Signal ??= new AbortController().signal;
|
|
87
86
|
var syncDiff3Decoder = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
|
|
88
|
-
function evalSyncDiff3(inBytes, opArgs, readFileSync) {
|
|
89
|
-
try {
|
|
90
|
-
const options = parseDiff3Arguments([...opArgs], diff3DefaultLimits);
|
|
91
|
-
if (options.information !== void 0 || options.files.length !== 3) return void 0;
|
|
92
|
-
const inputs = [];
|
|
93
|
-
let stdinUsed = false;
|
|
94
|
-
for (const file of options.files) {
|
|
95
|
-
let srcBytes;
|
|
96
|
-
if (file === "-") {
|
|
97
|
-
if (stdinUsed || !inBytes) return void 0;
|
|
98
|
-
stdinUsed = true;
|
|
99
|
-
srcBytes = inBytes;
|
|
100
|
-
} else {
|
|
101
|
-
if (!readFileSync) return void 0;
|
|
102
|
-
srcBytes = readFileSync(file);
|
|
103
|
-
}
|
|
104
|
-
if (!srcBytes || srcBytes.byteLength > 16384) return void 0;
|
|
105
|
-
inputs.push(srcBytes);
|
|
106
|
-
}
|
|
107
|
-
const rendered = compareDiff3(inputs, options, diff3DefaultLimits, syncDiff3Signal());
|
|
108
|
-
if (rendered.exitCode !== 0 || rendered.stderr.byteLength !== 0 || rendered.stdout.includes(0)) return void 0;
|
|
109
|
-
return syncDiff3Decoder.decode(rendered.stdout);
|
|
110
|
-
} catch {
|
|
111
|
-
return void 0;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
syncCommandEvaluators.evalSyncDiff3 = evalSyncDiff3;
|
|
115
87
|
|
|
116
88
|
// packages/safe-bash/src/commands/exiftool/index.ts
|
|
117
89
|
import {
|
|
@@ -456,7 +428,7 @@ function evalSyncCsvgrep(inBytes, opArgs, readFileSync) {
|
|
|
456
428
|
syncCommandEvaluators.evalSyncCsvgrep = evalSyncCsvgrep;
|
|
457
429
|
|
|
458
430
|
// packages/safe-bash/src/plugins/portable-commands.ts
|
|
459
|
-
function createPortableAgentCommands() {
|
|
431
|
+
function createPortableAgentCommands(hasCommand) {
|
|
460
432
|
return new CommandRegistry([
|
|
461
433
|
...createYqCommands(),
|
|
462
434
|
...createHtmlqCommands(),
|
|
@@ -465,10 +437,9 @@ function createPortableAgentCommands() {
|
|
|
465
437
|
...createUnrtfCommands(),
|
|
466
438
|
...createMmdcCommands(),
|
|
467
439
|
...createOpCommands(),
|
|
440
|
+
...createOptionalCommands({ families: ["ffmpeg", "soffice"] }),
|
|
441
|
+
createPandocCommand({}, hasCommand),
|
|
468
442
|
...createOptionalCommands({ families: [
|
|
469
|
-
"ffmpeg",
|
|
470
|
-
"soffice",
|
|
471
|
-
"pandoc",
|
|
472
443
|
"ssconvert",
|
|
473
444
|
"pdfinfo",
|
|
474
445
|
"pdftotext",
|
|
@@ -516,11 +487,13 @@ function createAgentCommands(options = {}) {
|
|
|
516
487
|
}
|
|
517
488
|
function agentCommands(options = {}) {
|
|
518
489
|
const regex = Object.freeze({ ...options.regex });
|
|
519
|
-
|
|
490
|
+
let hasCommand;
|
|
491
|
+
const base = createAgentCommandPlugin({ ...options, regex }, createRegexExecutors({ ...options, regex }), createGhCommands(options.gh), createPortableAgentCommands((name) => hasCommand?.(name) ?? false));
|
|
520
492
|
const recipe = captureAgentWorkerRecipe(options);
|
|
521
493
|
const plugin = {
|
|
522
494
|
name: "agent-commands",
|
|
523
495
|
setup(host) {
|
|
496
|
+
hasCommand = (name) => host.commands.has(name);
|
|
524
497
|
const previous = new Map(host.commands.list().map((command) => [command.name, command.execute]));
|
|
525
498
|
base.setup(host);
|
|
526
499
|
if (recipe) for (const definition of host.commands.list()) {
|
|
@@ -4063,7 +4063,6 @@ import { diffCommand } from "../../safe-bash-command-diff/index.js";
|
|
|
4063
4063
|
import { patchCommand } from "../../safe-bash-command-patch/index.js";
|
|
4064
4064
|
import { createDiffCommand, createDiffCommands, diffCommand as diffCommand2, diffCommands, evalSyncDiff } from "../../safe-bash-command-diff/index.js";
|
|
4065
4065
|
import { createPatchCommand, createPatchCommands, evalSyncPatch, patchCommand as patchCommand2, patchCommands } from "../../safe-bash-command-patch/index.js";
|
|
4066
|
-
import { evalSyncDiff as evalSyncDiff2 } from "../../safe-bash-command-diff/index.js";
|
|
4067
4066
|
function createDiffPatchCommands(options2 = {}) {
|
|
4068
4067
|
return registerDefaultExecutors([diffCommand(options2), patchCommand(options2)], options2);
|
|
4069
4068
|
}
|
|
@@ -4079,7 +4078,6 @@ function diffPatchCommands(options2 = {}) {
|
|
|
4079
4078
|
}
|
|
4080
4079
|
};
|
|
4081
4080
|
}
|
|
4082
|
-
syncCommandEvaluators.evalSyncDiff = evalSyncDiff2;
|
|
4083
4081
|
|
|
4084
4082
|
// packages/safe-bash/src/commands/which/index.ts
|
|
4085
4083
|
import { createWhichCommand, createWhichCommands, evalSyncWhich, whichCommands } from "../../safe-bash-command-which/index.js";
|