@poe-platform/safe-bash 0.1.809 → 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 +2 -1
- package/dist/audio-ast/index.js +254 -179
- package/dist/audio-ast/wav-source.d.ts +7 -1
- package/dist/image-ast/index.js +1 -1
- 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/mutable-object-store.d.ts +3 -0
- package/dist/pdf-ast/cos/qpdf-json-document.d.ts +43 -0
- package/dist/pdf-ast/cos/qpdf-json-values.d.ts +7 -0
- package/dist/pdf-ast/index.d.ts +1 -0
- package/dist/pdf-ast/index.js +653 -87
- package/dist/pdf-ast/retained-document.d.ts +5 -1
- package/dist/safe-bash/audio-ast.browser.js +2 -1
- package/dist/safe-bash/chunks/{chunk-RQCK77SC.js → chunk-BUYRKFW2.js} +9 -36
- package/dist/safe-bash/chunks/{chunk-SOFBGDXG.js → chunk-HHSOUC3Z.js} +32 -0
- package/dist/safe-bash/chunks/{chunk-WAZEELYB.js → chunk-TPG55BAQ.js} +10 -7
- package/dist/safe-bash/command-chunks/biff-3EFLKBAH-NYWZOYQS.js +4942 -0
- 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-62ZAHKFS.js → chunk-2VCKUNDZ.js} +130 -14
- 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-NB7JO7FE.js → chunk-5LI2DLNZ.js} +26 -26
- package/dist/safe-bash/command-chunks/{chunk-YJJBGN7U.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-72C3TZ2U.js +826 -0
- 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-D7XBUF76.js → chunk-D2ASPM7R.js} +109 -23
- 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-WFDG3N5R.js → chunk-ECDEPKKW.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-OQCJGUI6.js → chunk-HARUYHH7.js} +10 -10
- 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-NVBUC644.js → chunk-HKGNBH7Z.js} +2 -2
- 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-6OKH4X67.js → chunk-KJ4XXZIL.js} +273 -10
- package/dist/safe-bash/command-chunks/{chunk-GLVD3JJG.js → chunk-KL3OIBKB.js} +4712 -4654
- 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-MGBHGZEX.js +12 -0
- 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-4557HE3J.js → chunk-PMWW7KSB.js} +161 -42
- 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-JW3KIZU6.js → chunk-RUXY7GN5.js} +1 -1
- 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-KELMIFVV.js → chunk-TI52LKLL.js} +1 -1
- 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-JJQ72P3V.js → chunk-VCML4T5D.js} +1 -1
- 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-WH3TIOTS.js +326 -0
- package/dist/safe-bash/command-chunks/{chunk-DVQBZXMQ.js → chunk-WJCN2IXI.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-45FI2IPY.js → chunk-WQ6ABTJU.js} +3 -6
- 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-GKYCV6BU.js → chunk-YSY6R6AS.js} +493 -183
- package/dist/safe-bash/command-chunks/{chunk-SE5SJ4JT.js → chunk-Z2JW6M2D.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-5HGEXQVD.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/{command-engine-P5DFM4OU.js → command-engine-BEWABZ75.js} +10 -3
- package/dist/safe-bash/command-chunks/{engine-RU4OFLPO-CPLFYD67.js → engine-AXXFTGCL-QBQNBI6K.js} +1 -1
- package/dist/safe-bash/command-chunks/pdf-XHHFTOT4-UJJYOYJ2.js +573 -0
- package/dist/safe-bash/commands/audio/index.browser.js +2 -14
- package/dist/safe-bash/commands/diff-patch/index.js +0 -5
- package/dist/safe-bash/commands/diff3/index.js +0 -2
- package/dist/safe-bash/commands/ffprobe/index.browser.js +2 -5
- package/dist/safe-bash/commands/pandoc/index.browser.js +3 -1
- package/dist/safe-bash/commands/text.js +10 -1
- package/dist/safe-bash/core.d.ts +2 -2
- package/dist/safe-bash/core.js +2 -2
- package/dist/safe-bash/full-core.browser.js +18 -22
- package/dist/safe-bash/lazy-optional.d.ts +9 -0
- package/dist/safe-bash/lazy-optional.js +24 -0
- package/dist/safe-bash/plugins/index.browser.js +5 -3
- 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-apply-patch/apply.js +2 -2
- package/dist/safe-bash-command-apply-patch/index.js +2 -2
- package/dist/safe-bash-command-apply-patch/parser.d.ts +20 -1
- package/dist/safe-bash-command-apply-patch/parser.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 +3 -2
- package/dist/safe-bash-command-ffprobe/media.js +3 -2
- package/dist/safe-bash-command-ffprobe/options.d.ts +15 -0
- package/dist/safe-bash-command-ffprobe/options.js +7 -0
- package/dist/safe-bash-command-html-to-markdown/index.js +75 -21
- package/dist/safe-bash-command-media/index.js +2 -2
- package/dist/safe-bash-command-media/plugin.js +1 -1
- package/dist/safe-bash-command-media/remote.js +2 -2
- package/dist/safe-bash-command-pandoc/command.js +8 -8
- 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 +37 -37
- 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 +2 -2
- package/dist/safe-bash-command-patch/patch-publication.d.ts +2 -2
- package/dist/safe-bash-command-patch/patch-publication.js +1 -1
- package/dist/safe-bash-command-patch/patch.js +2 -2
- package/dist/safe-bash-command-pdftk/index.js +616 -265
- package/dist/safe-bash-command-pptx/engine.js +1 -1
- 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-xmllint/index.js +137 -30
- package/dist/safe-bash-command-xq/index.js +45 -29
- package/dist/safe-bash-compression-engine/bounded-codec.js +2 -2
- package/dist/safe-bash-compression-engine/codec-loader.js +1 -1
- package/dist/safe-bash-compression-engine/files.js +5 -5
- package/dist/safe-bash-compression-engine/index.js +4 -4
- package/dist/safe-bash-compression-engine/operand.js +5 -5
- package/dist/safe-bash-compression-engine/stream.js +4 -4
- package/dist/safe-bash-compression-engine/zstd-decode.js +3 -3
- package/dist/safe-bash-media-engine/imagemagick.d.ts +2 -0
- package/dist/safe-bash-media-engine/index.js +162 -72
- package/dist/safe-bash-network-engine/body.d.ts +1 -0
- package/dist/safe-bash-network-engine/body.js +1 -1
- package/dist/safe-bash-network-engine/transfer.js +11 -3
- 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 -54
- 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 +2 -2
- package/dist/safe-bash-presentation-engine/index.js +100 -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 -53
- 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 +19 -19
- package/dist/safe-bash-presentation-engine/retained-xml-parts.d.ts +26 -0
- 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.d.ts +1 -0
- package/dist/safe-bash-presentation-engine/xml-parts.js +19 -13
- 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/document.js +1 -1
- package/dist/safe-bash-xml-engine/index.js +1 -1
- 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-engine/rendering/print/tab-layout.d.ts +11 -0
- package/dist/spreadsheet-engine/rendering/print/tab-layout.js +15 -0
- package/dist/spreadsheet-engine/rendering/print/text-lines.d.ts +2 -2
- package/dist/spreadsheet-engine/rendering/print/text-lines.js +3 -3
- package/dist/spreadsheet-format-xls/biff-encrypted-properties.d.ts +5 -1
- package/dist/spreadsheet-format-xls/biff-encrypted-properties.js +151 -57
- package/dist/spreadsheet-format-xls/biff-encryption.d.ts +1 -1
- package/dist/spreadsheet-format-xls/biff-encryption.js +8 -3
- package/dist/spreadsheet-format-xls/biff-property-bytes.d.ts +4 -1
- package/dist/spreadsheet-format-xls/biff-property-bytes.js +3 -3
- package/dist/spreadsheet-format-xls/biff-range.js +1 -1
- package/dist/spreadsheet-format-xls/biff.js +11 -3
- package/package.json +6 -2
- package/dist/safe-bash/chunks/chunk-I2A5ZCPD.js +0 -17
- package/dist/safe-bash/chunks/chunk-PQTT2EZP.js +0 -8
- package/dist/safe-bash/command-chunks/biff-DS263V2K-2GP4GZT7.js +0 -4868
- package/dist/safe-bash/command-chunks/chunk-6ZFYWT3U.js +0 -581
- package/dist/safe-bash/command-chunks/chunk-S244SWDH.js +0 -153
- package/dist/safe-bash/command-chunks/pdf-T7AWYZGQ-KNAYJ7YF.js +0 -552
- /package/dist/safe-bash/command-chunks/{chunk-EMMSXKEJ.js → chunk-4Q4R3VZU.js} +0 -0
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
attr
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-56NYSX65.js";
|
|
4
4
|
import {
|
|
5
5
|
SelectionError,
|
|
6
6
|
readSelectionIndex
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-X7FA7ZD5.js";
|
|
8
8
|
import {
|
|
9
9
|
readPackage
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XPD636C4.js";
|
|
11
11
|
import {
|
|
12
12
|
readBinary
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PNGDJA6M.js";
|
|
14
14
|
import {
|
|
15
15
|
equationOpaqueElements,
|
|
16
16
|
interpretCompatibility
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-2ZFLMWOX.js";
|
|
18
18
|
import {
|
|
19
19
|
parseXmlPart
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-554Z6IKP.js";
|
|
21
21
|
import {
|
|
22
22
|
OfficeError
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-Q73EMLLZ.js";
|
|
24
24
|
|
|
25
25
|
// packages/safe-bash-presentation-engine/src/media.ts
|
|
26
26
|
import { sha1 } from "@noble/hashes/legacy.js";
|
|
@@ -338357,8 +338357,98 @@ function mp3Ast() {
|
|
|
338357
338357
|
}
|
|
338358
338358
|
};
|
|
338359
338359
|
}
|
|
338360
|
+
function flacDocument(bytes, byteLength, data = new Uint8Array()) {
|
|
338361
|
+
let sampleRate = 44100;
|
|
338362
|
+
let channels = 2;
|
|
338363
|
+
let totalSamples = 44100;
|
|
338364
|
+
if (bytes.byteLength >= 42 && decodeFourCC(bytes, 0) === "fLaC") {
|
|
338365
|
+
const b18 = bytes[18];
|
|
338366
|
+
const b19 = bytes[19];
|
|
338367
|
+
const b20 = bytes[20];
|
|
338368
|
+
sampleRate = b18 << 12 | b19 << 4 | b20 >>> 4 || 44100;
|
|
338369
|
+
channels = (b20 >>> 1 & 7) + 1 || 2;
|
|
338370
|
+
const b21 = bytes[21];
|
|
338371
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset + 22, 4);
|
|
338372
|
+
totalSamples = (b21 & 15) * 4294967296 + view.getUint32(0, false) || 44100;
|
|
338373
|
+
}
|
|
338374
|
+
return {
|
|
338375
|
+
containerFormat: "flac",
|
|
338376
|
+
timescale: sampleRate,
|
|
338377
|
+
duration: totalSamples,
|
|
338378
|
+
durationSeconds: totalSamples / sampleRate,
|
|
338379
|
+
tracks: [
|
|
338380
|
+
{
|
|
338381
|
+
id: 1,
|
|
338382
|
+
type: "audio",
|
|
338383
|
+
handlerType: "soun",
|
|
338384
|
+
timescale: sampleRate,
|
|
338385
|
+
duration: totalSamples,
|
|
338386
|
+
language: "und",
|
|
338387
|
+
enabled: true,
|
|
338388
|
+
codecDescriptions: [
|
|
338389
|
+
{
|
|
338390
|
+
formatFourCC: "fLaC",
|
|
338391
|
+
codecName: "flac",
|
|
338392
|
+
sampleRate,
|
|
338393
|
+
channels,
|
|
338394
|
+
bitsPerSample: 16
|
|
338395
|
+
}
|
|
338396
|
+
],
|
|
338397
|
+
samples: [
|
|
338398
|
+
{
|
|
338399
|
+
data,
|
|
338400
|
+
dts: 0,
|
|
338401
|
+
pts: 0,
|
|
338402
|
+
cts: 0,
|
|
338403
|
+
duration: totalSamples,
|
|
338404
|
+
size: byteLength,
|
|
338405
|
+
isKeyframe: true,
|
|
338406
|
+
sampleDescriptionIndex: 1
|
|
338407
|
+
}
|
|
338408
|
+
]
|
|
338409
|
+
}
|
|
338410
|
+
],
|
|
338411
|
+
metadata: {},
|
|
338412
|
+
byteLength
|
|
338413
|
+
};
|
|
338414
|
+
}
|
|
338360
338415
|
function flacAst() {
|
|
338361
338416
|
return {
|
|
338417
|
+
async probeMetadata(source, options = {}) {
|
|
338418
|
+
options.signal?.throwIfAborted();
|
|
338419
|
+
if (!Number.isSafeInteger(source.size) || source.size < 0) throw new RangeError("Invalid FLAC source size");
|
|
338420
|
+
const header = new Uint8Array(Math.min(42, source.size));
|
|
338421
|
+
for (let offset = 0; offset < header.length; ) {
|
|
338422
|
+
const chunk = await source.read(offset, header.length - offset);
|
|
338423
|
+
options.signal?.throwIfAborted();
|
|
338424
|
+
if (!chunk.length) throw new Error("Unexpected end of FLAC source");
|
|
338425
|
+
if (chunk.length > header.length - offset) throw new Error("FLAC source returned more bytes than requested");
|
|
338426
|
+
header.set(chunk, offset);
|
|
338427
|
+
offset += chunk.length;
|
|
338428
|
+
}
|
|
338429
|
+
return buildProbeResultFromDoc(flacDocument(header, source.size), source.size, options.filename ?? "input.flac", {
|
|
338430
|
+
...options,
|
|
338431
|
+
formatName: "flac",
|
|
338432
|
+
formatLongName: "raw FLAC"
|
|
338433
|
+
});
|
|
338434
|
+
},
|
|
338435
|
+
async probeMetadataStream(source, options = {}) {
|
|
338436
|
+
options.signal?.throwIfAborted();
|
|
338437
|
+
const header = new Uint8Array(42);
|
|
338438
|
+
let size = 0;
|
|
338439
|
+
for await (const chunk of source) {
|
|
338440
|
+
options.signal?.throwIfAborted();
|
|
338441
|
+
if (size < header.length) header.set(chunk.subarray(0, header.length - size), size);
|
|
338442
|
+
size += chunk.length;
|
|
338443
|
+
if (!Number.isSafeInteger(size)) throw new RangeError("Invalid FLAC source size");
|
|
338444
|
+
}
|
|
338445
|
+
options.signal?.throwIfAborted();
|
|
338446
|
+
return buildProbeResultFromDoc(flacDocument(header.subarray(0, Math.min(size, header.length)), size), size, options.filename ?? "input.flac", {
|
|
338447
|
+
...options,
|
|
338448
|
+
formatName: "flac",
|
|
338449
|
+
formatLongName: "raw FLAC"
|
|
338450
|
+
});
|
|
338451
|
+
},
|
|
338362
338452
|
id: "flac",
|
|
338363
338453
|
formatName: "flac",
|
|
338364
338454
|
formatLongName: "raw FLAC",
|
|
@@ -338376,59 +338466,7 @@ function flacAst() {
|
|
|
338376
338466
|
return false;
|
|
338377
338467
|
},
|
|
338378
338468
|
parse(bytes) {
|
|
338379
|
-
|
|
338380
|
-
let channels = 2;
|
|
338381
|
-
let totalSamples = 44100;
|
|
338382
|
-
if (bytes.byteLength >= 42 && decodeFourCC(bytes, 0) === "fLaC") {
|
|
338383
|
-
const b18 = bytes[18];
|
|
338384
|
-
const b19 = bytes[19];
|
|
338385
|
-
const b20 = bytes[20];
|
|
338386
|
-
sampleRate = b18 << 12 | b19 << 4 | b20 >>> 4 || 44100;
|
|
338387
|
-
channels = (b20 >>> 1 & 7) + 1 || 2;
|
|
338388
|
-
const b21 = bytes[21];
|
|
338389
|
-
const view = new DataView(bytes.buffer, bytes.byteOffset + 22, 4);
|
|
338390
|
-
totalSamples = (b21 & 15) * 4294967296 + view.getUint32(0, false) || 44100;
|
|
338391
|
-
}
|
|
338392
|
-
return {
|
|
338393
|
-
containerFormat: "flac",
|
|
338394
|
-
timescale: sampleRate,
|
|
338395
|
-
duration: totalSamples,
|
|
338396
|
-
durationSeconds: totalSamples / sampleRate,
|
|
338397
|
-
tracks: [
|
|
338398
|
-
{
|
|
338399
|
-
id: 1,
|
|
338400
|
-
type: "audio",
|
|
338401
|
-
handlerType: "soun",
|
|
338402
|
-
timescale: sampleRate,
|
|
338403
|
-
duration: totalSamples,
|
|
338404
|
-
language: "und",
|
|
338405
|
-
enabled: true,
|
|
338406
|
-
codecDescriptions: [
|
|
338407
|
-
{
|
|
338408
|
-
formatFourCC: "fLaC",
|
|
338409
|
-
codecName: "flac",
|
|
338410
|
-
sampleRate,
|
|
338411
|
-
channels,
|
|
338412
|
-
bitsPerSample: 16
|
|
338413
|
-
}
|
|
338414
|
-
],
|
|
338415
|
-
samples: [
|
|
338416
|
-
{
|
|
338417
|
-
data: bytes,
|
|
338418
|
-
dts: 0,
|
|
338419
|
-
pts: 0,
|
|
338420
|
-
cts: 0,
|
|
338421
|
-
duration: totalSamples,
|
|
338422
|
-
size: bytes.byteLength,
|
|
338423
|
-
isKeyframe: true,
|
|
338424
|
-
sampleDescriptionIndex: 1
|
|
338425
|
-
}
|
|
338426
|
-
]
|
|
338427
|
-
}
|
|
338428
|
-
],
|
|
338429
|
-
metadata: {},
|
|
338430
|
-
byteLength: bytes.byteLength
|
|
338431
|
-
};
|
|
338469
|
+
return flacDocument(bytes, bytes.byteLength, bytes);
|
|
338432
338470
|
},
|
|
338433
338471
|
serialize(doc) {
|
|
338434
338472
|
return concatBytes(encodeFlacPackets(doc));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readImages
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GEM47B2P.js";
|
|
4
4
|
import {
|
|
5
5
|
admitImage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QD7ZRDUN.js";
|
|
7
7
|
import {
|
|
8
8
|
attr,
|
|
9
9
|
child,
|
|
@@ -11,18 +11,18 @@ import {
|
|
|
11
11
|
loadShared,
|
|
12
12
|
nextRel,
|
|
13
13
|
relPart
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-56NYSX65.js";
|
|
15
15
|
import {
|
|
16
16
|
SelectionError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-X7FA7ZD5.js";
|
|
18
18
|
import {
|
|
19
19
|
asciiKey,
|
|
20
20
|
partName,
|
|
21
21
|
relativePartReference
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-36XGIPOG.js";
|
|
23
23
|
import {
|
|
24
24
|
OfficeError
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-Q73EMLLZ.js";
|
|
26
26
|
|
|
27
27
|
// packages/safe-bash-presentation-engine/src/image-replacement.ts
|
|
28
28
|
function invalid(message) {
|
|
@@ -3,29 +3,29 @@ import {
|
|
|
3
3
|
readShapePath,
|
|
4
4
|
shapePathXml,
|
|
5
5
|
validateShapePath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FIIAYCWS.js";
|
|
7
7
|
import {
|
|
8
8
|
addShape,
|
|
9
9
|
nodeFor,
|
|
10
10
|
selected,
|
|
11
11
|
validateSelection
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TW73OXPR.js";
|
|
13
13
|
import {
|
|
14
14
|
validateShapeOptions
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IT7TAC3F.js";
|
|
16
16
|
import {
|
|
17
17
|
Length
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6QBMND4A.js";
|
|
19
19
|
import {
|
|
20
20
|
loadShared,
|
|
21
21
|
required
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-56NYSX65.js";
|
|
23
23
|
import {
|
|
24
24
|
SelectionError
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-X7FA7ZD5.js";
|
|
26
26
|
import {
|
|
27
27
|
OfficeError
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-Q73EMLLZ.js";
|
|
29
29
|
|
|
30
30
|
// packages/safe-bash-presentation-engine/src/shape-path-operations.ts
|
|
31
31
|
function optionsFor(options, adding = false) {
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
// packages/safe-bash-command-patch/src/patch-publication.ts
|
|
2
|
+
import { compareCopyIdentity } from "../../safe-bash-contracts/filesystem-identity.js";
|
|
3
|
+
import { retainFileSystemCleanup } from "@poe-platform/safe-fs/core";
|
|
4
|
+
import { dirname, FsError, isFsError } from "../../safe-bash-contracts/index.js";
|
|
5
|
+
import { host as host2, ToolError as ToolError2 } from "../../safe-bash-diff-engine/shared.js";
|
|
6
|
+
|
|
7
|
+
// packages/safe-bash-command-patch/src/stored-target.ts
|
|
8
|
+
import { PagedStorage } from "@poe-platform/safe-fs/storage";
|
|
9
|
+
import { IndexedDocument, closeDocumentResources } from "../../safe-bash-diff-engine/document.js";
|
|
10
|
+
import { ToolError, host } from "../../safe-bash-diff-engine/shared.js";
|
|
11
|
+
async function* targetBytes(line) {
|
|
12
|
+
if (typeof line !== "string") {
|
|
13
|
+
const range = await line.document.line(line.index);
|
|
14
|
+
yield* line.document.range(range.start, range.end);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
for (let start = 0; start < line.length; ) {
|
|
18
|
+
let end = Math.min(start + 4096, line.length);
|
|
19
|
+
const last = line.charCodeAt(end - 1);
|
|
20
|
+
if (end < line.length && last >= 55296 && last <= 56319) end--;
|
|
21
|
+
yield new TextEncoder().encode(line.slice(start, end));
|
|
22
|
+
start = end;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async function* normalized(line, whitespace) {
|
|
26
|
+
if (!whitespace) {
|
|
27
|
+
yield* targetBytes(line);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
let pending = false, cr = false;
|
|
31
|
+
let output = [];
|
|
32
|
+
for await (const block of targetBytes(line)) {
|
|
33
|
+
for (const byte of block) {
|
|
34
|
+
if (cr) {
|
|
35
|
+
if (byte !== 10 && pending) output.push(32);
|
|
36
|
+
output.push(13);
|
|
37
|
+
cr = false;
|
|
38
|
+
pending = false;
|
|
39
|
+
}
|
|
40
|
+
if (byte === 32 || byte === 9) pending = true;
|
|
41
|
+
else if (byte === 13 && pending) cr = true;
|
|
42
|
+
else {
|
|
43
|
+
if (pending && byte !== 10) output.push(32);
|
|
44
|
+
pending = false;
|
|
45
|
+
output.push(byte);
|
|
46
|
+
}
|
|
47
|
+
if (output.length >= 4096) {
|
|
48
|
+
yield Uint8Array.from(output);
|
|
49
|
+
output = [];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (cr) output.push(32, 13);
|
|
54
|
+
if (output.length) yield Uint8Array.from(output);
|
|
55
|
+
}
|
|
56
|
+
async function equalTargetLines(left, right, budget, whitespace = false) {
|
|
57
|
+
const a = normalized(left, whitespace)[Symbol.asyncIterator]();
|
|
58
|
+
const b = normalized(right, whitespace)[Symbol.asyncIterator]();
|
|
59
|
+
try {
|
|
60
|
+
let x = await a.next(), y = await b.next(), i = 0, j = 0;
|
|
61
|
+
while (!x.done && !y.done) {
|
|
62
|
+
const count = Math.min(x.value.length - i, y.value.length - j);
|
|
63
|
+
budget.step(count);
|
|
64
|
+
for (let k = 0; k < count; k++) if (x.value[i + k] !== y.value[j + k]) return false;
|
|
65
|
+
i += count;
|
|
66
|
+
j += count;
|
|
67
|
+
if (i === x.value.length) {
|
|
68
|
+
x = await a.next();
|
|
69
|
+
i = 0;
|
|
70
|
+
}
|
|
71
|
+
if (j === y.value.length) {
|
|
72
|
+
y = await b.next();
|
|
73
|
+
j = 0;
|
|
74
|
+
}
|
|
75
|
+
const checkpoint = budget.checkpoint();
|
|
76
|
+
if (checkpoint) await checkpoint;
|
|
77
|
+
}
|
|
78
|
+
return !!x.done && !!y.done;
|
|
79
|
+
} finally {
|
|
80
|
+
await a.return?.();
|
|
81
|
+
await b.return?.();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
var TargetDocuments = class {
|
|
85
|
+
constructor(budget) {
|
|
86
|
+
this.budget = budget;
|
|
87
|
+
}
|
|
88
|
+
budget;
|
|
89
|
+
documents = /* @__PURE__ */ new Set();
|
|
90
|
+
async load(source) {
|
|
91
|
+
const document = new IndexedDocument(this.budget, 2);
|
|
92
|
+
this.documents.add(document);
|
|
93
|
+
await document.load(source);
|
|
94
|
+
if (document.binary) throw new ToolError("binary input is unsupported (NUL byte)");
|
|
95
|
+
if (!document.validUtf8) throw new ToolError("binary input is unsupported (invalid UTF-8)");
|
|
96
|
+
return document;
|
|
97
|
+
}
|
|
98
|
+
async read(path) {
|
|
99
|
+
const iterator = this.budget.diffSource(path);
|
|
100
|
+
const context = this.budget.context;
|
|
101
|
+
return this.load({ async *[Symbol.asyncIterator]() {
|
|
102
|
+
try {
|
|
103
|
+
for (; ; ) {
|
|
104
|
+
const next = await host(context, () => iterator.next());
|
|
105
|
+
if (next.done) break;
|
|
106
|
+
yield next.value;
|
|
107
|
+
}
|
|
108
|
+
} finally {
|
|
109
|
+
const closed = iterator.return(void 0);
|
|
110
|
+
if (context.signal.aborted) void closed.catch(() => {
|
|
111
|
+
});
|
|
112
|
+
else await closed;
|
|
113
|
+
}
|
|
114
|
+
} });
|
|
115
|
+
}
|
|
116
|
+
async concat(left, right) {
|
|
117
|
+
return this.load({ async *[Symbol.asyncIterator]() {
|
|
118
|
+
yield* left.range(0, left.size);
|
|
119
|
+
yield* right.range(0, right.size);
|
|
120
|
+
} });
|
|
121
|
+
}
|
|
122
|
+
async release(document) {
|
|
123
|
+
await document.close();
|
|
124
|
+
this.documents.delete(document);
|
|
125
|
+
}
|
|
126
|
+
close() {
|
|
127
|
+
return closeDocumentResources([...this.documents]);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
var TargetOutput = class {
|
|
131
|
+
constructor(documents) {
|
|
132
|
+
this.documents = documents;
|
|
133
|
+
this.data = new PagedStorage(documents.budget.context, 2);
|
|
134
|
+
}
|
|
135
|
+
documents;
|
|
136
|
+
data;
|
|
137
|
+
size = 0;
|
|
138
|
+
unterminated = false;
|
|
139
|
+
length = 0;
|
|
140
|
+
async append(line) {
|
|
141
|
+
if (this.unterminated) await this.write(new Uint8Array([10]));
|
|
142
|
+
this.unterminated = false;
|
|
143
|
+
for await (const bytes of targetBytes(line)) {
|
|
144
|
+
await this.write(bytes);
|
|
145
|
+
this.unterminated = bytes.at(-1) !== 10;
|
|
146
|
+
}
|
|
147
|
+
this.length++;
|
|
148
|
+
}
|
|
149
|
+
async write(bytes) {
|
|
150
|
+
this.size += bytes.length;
|
|
151
|
+
if (this.size > this.documents.budget.limits.maxOutputBytes) throw new ToolError("output byte limit exceeded");
|
|
152
|
+
await this.data.append(bytes);
|
|
153
|
+
}
|
|
154
|
+
async finish() {
|
|
155
|
+
const data = this.data, size = this.size;
|
|
156
|
+
this.documents.budget.outputLength(size);
|
|
157
|
+
return this.documents.load({ async *[Symbol.asyncIterator]() {
|
|
158
|
+
for (let offset = 0; offset < size; offset += 16384) yield await data.read(8 + offset, Math.min(16384, size - offset));
|
|
159
|
+
} });
|
|
160
|
+
}
|
|
161
|
+
close() {
|
|
162
|
+
return this.data.close();
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// packages/safe-bash-command-patch/src/patch-publication.ts
|
|
167
|
+
import { readBytes } from "../../safe-bash-contracts/index.js";
|
|
168
|
+
var PatchPublication = class {
|
|
169
|
+
constructor(context, trusted = false) {
|
|
170
|
+
this.context = context;
|
|
171
|
+
this.trusted = trusted;
|
|
172
|
+
}
|
|
173
|
+
context;
|
|
174
|
+
trusted;
|
|
175
|
+
directories = /* @__PURE__ */ new Map();
|
|
176
|
+
removals = /* @__PURE__ */ new Map();
|
|
177
|
+
pruning = /* @__PURE__ */ new Map();
|
|
178
|
+
async capture(path, prune = []) {
|
|
179
|
+
const paths = [];
|
|
180
|
+
for (let parent = dirname(path); ; parent = dirname(parent)) {
|
|
181
|
+
paths.unshift(parent);
|
|
182
|
+
if (parent === "/") break;
|
|
183
|
+
}
|
|
184
|
+
for (const parent of paths) {
|
|
185
|
+
if (this.directories.has(parent)) continue;
|
|
186
|
+
let stat;
|
|
187
|
+
try {
|
|
188
|
+
stat = await host2(this.context, () => this.context.fs.lstat(parent, { signal: this.context.signal }));
|
|
189
|
+
} catch (error) {
|
|
190
|
+
if (isFsError(error, "ENOENT")) break;
|
|
191
|
+
throw error;
|
|
192
|
+
}
|
|
193
|
+
if (stat.type !== "directory") throw new ToolError2(`unsafe patch parent: ${parent}`);
|
|
194
|
+
this.directories.set(parent, stat);
|
|
195
|
+
}
|
|
196
|
+
if (this.trusted) return;
|
|
197
|
+
if (this.directories.has(dirname(path)) && !this.removals.has(path)) {
|
|
198
|
+
this.removals.set(path, await host2(this.context, () => this.context.fs.confineExtraction([dirname(path)], { signal: this.context.signal })));
|
|
199
|
+
}
|
|
200
|
+
const parents = prune.filter((parent) => this.directories.has(parent) && !this.pruning.has(parent));
|
|
201
|
+
if (this.directories.has(dirname(path)) && parents.length) {
|
|
202
|
+
const view = await host2(this.context, () => this.context.fs.confineExtraction([dirname(path), parents.at(-1)], { signal: this.context.signal }));
|
|
203
|
+
for (const parent of parents) this.pruning.set(parent, view);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
async validate(path) {
|
|
207
|
+
const parents = [];
|
|
208
|
+
for (let parent = dirname(path); ; parent = dirname(parent)) {
|
|
209
|
+
parents.unshift(parent);
|
|
210
|
+
if (parent === "/") break;
|
|
211
|
+
}
|
|
212
|
+
for (const parent of parents) {
|
|
213
|
+
const expected = this.directories.get(parent);
|
|
214
|
+
const current = await host2(this.context, () => this.context.fs.lstat(parent, { signal: this.context.signal }));
|
|
215
|
+
if (current.type !== "directory" || compareCopyIdentity(current, expected) !== "same") {
|
|
216
|
+
throw new FsError("EAGAIN", { syscall: "patch", path: parent });
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
async mkdir(path) {
|
|
221
|
+
await this.capture(path);
|
|
222
|
+
await this.validate(path);
|
|
223
|
+
const stat = await host2(this.context, () => this.context.fs.prepareDirectory(path, {
|
|
224
|
+
parent: this.directories.get(dirname(path)),
|
|
225
|
+
expected: null,
|
|
226
|
+
signal: this.context.signal
|
|
227
|
+
}));
|
|
228
|
+
this.directories.set(path, stat);
|
|
229
|
+
}
|
|
230
|
+
async write(path, source, destination, mode, mtimeMs) {
|
|
231
|
+
await this.capture(path);
|
|
232
|
+
const ancestors = [];
|
|
233
|
+
for (let parent2 = dirname(path); ; parent2 = dirname(parent2)) {
|
|
234
|
+
const stat = this.directories.get(parent2);
|
|
235
|
+
if (!stat) throw new ToolError2(`patch parent does not exist: ${parent2}`);
|
|
236
|
+
ancestors.unshift({ path: parent2, stat });
|
|
237
|
+
if (parent2 === "/") break;
|
|
238
|
+
}
|
|
239
|
+
const context = this.context;
|
|
240
|
+
const parent = ancestors[ancestors.length - 1].stat;
|
|
241
|
+
let staging;
|
|
242
|
+
let operation;
|
|
243
|
+
let closed = false;
|
|
244
|
+
const release = retainFileSystemCleanup(context.fs, async (view) => {
|
|
245
|
+
await operation?.catch(() => {
|
|
246
|
+
});
|
|
247
|
+
if (staging?.cleanup) await staging.cleanup.remove();
|
|
248
|
+
else if (staging) await view.removeStagedFile(staging);
|
|
249
|
+
}, { maxOperations: 1 });
|
|
250
|
+
const cleanup = () => {
|
|
251
|
+
closed = true;
|
|
252
|
+
return release();
|
|
253
|
+
};
|
|
254
|
+
context.registerCleanup?.(cleanup);
|
|
255
|
+
try {
|
|
256
|
+
operation = Promise.resolve().then(async () => {
|
|
257
|
+
context.signal.throwIfAborted();
|
|
258
|
+
if (closed) throw new ToolError2("patch publication is closed");
|
|
259
|
+
if (this.trusted) await this.validate(path);
|
|
260
|
+
staging = await context.fs.createStagedFile(`${dirname(path) === "/" ? "" : dirname(path)}/.patch-${globalThis.crypto.randomUUID()}`, "file", {
|
|
261
|
+
type: "file",
|
|
262
|
+
data: new Uint8Array()
|
|
263
|
+
}, {
|
|
264
|
+
parent,
|
|
265
|
+
retainCleanup: true,
|
|
266
|
+
signal: context.signal,
|
|
267
|
+
...mode === void 0 ? {} : { mode },
|
|
268
|
+
...mtimeMs === void 0 ? {} : { atimeMs: mtimeMs, mtimeMs }
|
|
269
|
+
});
|
|
270
|
+
if (!staging.writer || !staging.cleanup) throw new ToolError2("filesystem does not support retained staging writes");
|
|
271
|
+
for await (const bytes of readBytes(typeof source === "string" ? targetBytes(source) : source, context.signal)) {
|
|
272
|
+
if (closed) throw new ToolError2("patch publication is closed");
|
|
273
|
+
await staging.writer.write(bytes, { signal: context.signal });
|
|
274
|
+
}
|
|
275
|
+
const stat = await staging.writer.finish({ signal: context.signal });
|
|
276
|
+
context.signal.throwIfAborted();
|
|
277
|
+
if (closed) throw new ToolError2("patch publication is closed");
|
|
278
|
+
if (this.trusted) await this.validate(path);
|
|
279
|
+
await context.fs.publishStagedFile({ ...staging, file: { ...staging.file, stat } }, path, {
|
|
280
|
+
parent,
|
|
281
|
+
destination: destination ?? null,
|
|
282
|
+
...this.trusted ? {} : { ancestors },
|
|
283
|
+
signal: context.signal
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
await host2(context, () => operation);
|
|
287
|
+
} finally {
|
|
288
|
+
await cleanup();
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
async remove(path, expected) {
|
|
292
|
+
if (this.trusted) {
|
|
293
|
+
await this.validate(path);
|
|
294
|
+
await host2(this.context, () => this.context.fs.removeFileConditional(path, {
|
|
295
|
+
parent: this.directories.get(dirname(path)),
|
|
296
|
+
expected,
|
|
297
|
+
signal: this.context.signal
|
|
298
|
+
}));
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
const fs = this.removals.get(path);
|
|
302
|
+
if (!fs) throw new ToolError2(`patch removal was not admitted: ${path}`);
|
|
303
|
+
await host2(this.context, () => fs.rm(path, { signal: this.context.signal }));
|
|
304
|
+
}
|
|
305
|
+
async prune(path) {
|
|
306
|
+
if (this.trusted) {
|
|
307
|
+
await this.validate(`${path}/.patch-prune`);
|
|
308
|
+
if (!this.context.fs.rmdir) throw new FsError("ENOTSUP", { syscall: "rmdir", path });
|
|
309
|
+
await host2(this.context, () => this.context.fs.rmdir(path, { signal: this.context.signal }));
|
|
310
|
+
this.directories.delete(path);
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
const fs = this.pruning.get(path);
|
|
314
|
+
if (!fs) throw new ToolError2(`patch directory pruning was not admitted: ${path}`);
|
|
315
|
+
if (!fs.rmdir) throw new FsError("ENOTSUP", { syscall: "rmdir", path });
|
|
316
|
+
await host2(this.context, () => fs.rmdir(path, { signal: this.context.signal }));
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
export {
|
|
321
|
+
targetBytes,
|
|
322
|
+
equalTargetLines,
|
|
323
|
+
TargetDocuments,
|
|
324
|
+
TargetOutput,
|
|
325
|
+
PatchPublication
|
|
326
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
asciiKey,
|
|
3
3
|
partName
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-36XGIPOG.js";
|
|
5
5
|
import {
|
|
6
6
|
OfficeError
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q73EMLLZ.js";
|
|
8
8
|
|
|
9
9
|
// packages/safe-bash-presentation-engine/src/content-types.ts
|
|
10
10
|
import { SaxesParser } from "saxes";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// packages/safe-bash-command-media/src/plugin.ts
|
|
2
|
+
import { readFileStream } from "@poe-platform/safe-fs/core";
|
|
2
3
|
import { getCommandArguments } from "../../safe-bash-contracts/command.js";
|
|
3
4
|
import { createFFmpegShims } from "../../safe-bash-media-engine/index.js";
|
|
4
5
|
import { createImageMagickShims } from "../../safe-bash-media-engine/index.js";
|
|
@@ -46,12 +47,8 @@ function mediaShims(options) {
|
|
|
46
47
|
return void 0;
|
|
47
48
|
}
|
|
48
49
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return await context.fs.readFile(path(bytes), { signal: context.signal });
|
|
52
|
-
} catch {
|
|
53
|
-
return void 0;
|
|
54
|
-
}
|
|
50
|
+
readStream(bytes) {
|
|
51
|
+
return readFileStream(context.fs, path(bytes), { signal: context.signal, chunkSize: 65536 });
|
|
55
52
|
}
|
|
56
53
|
};
|
|
57
54
|
}
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
nodeFor,
|
|
3
3
|
selected,
|
|
4
4
|
validateSelection
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TW73OXPR.js";
|
|
6
6
|
import {
|
|
7
7
|
attr,
|
|
8
8
|
child,
|
|
9
9
|
loadShared
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-56NYSX65.js";
|
|
11
11
|
import {
|
|
12
12
|
OfficeError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Q73EMLLZ.js";
|
|
14
14
|
|
|
15
15
|
// packages/safe-bash-presentation-engine/src/charts.ts
|
|
16
16
|
import { SaxesParser } from "saxes";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
attr,
|
|
3
3
|
child
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-56NYSX65.js";
|
|
5
5
|
import {
|
|
6
6
|
parseXmlPart
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-554Z6IKP.js";
|
|
8
8
|
import {
|
|
9
9
|
TypeError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-S6R3IB36.js";
|
|
11
11
|
import {
|
|
12
12
|
OfficeError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Q73EMLLZ.js";
|
|
14
14
|
|
|
15
15
|
// packages/safe-bash-presentation-engine/src/shape-id.ts
|
|
16
16
|
var ShapeIdAllocator = class {
|