@poe-platform/safe-bash 0.1.822 → 0.1.824
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/safe-bash/chunks/{chunk-HNT2MR4W.js → chunk-363QOIDR.js} +2 -1
- package/dist/safe-bash/chunks/chunk-AGHV53VF.js +42 -0
- package/dist/safe-bash/chunks/{chunk-VF3Q2V3E.js → chunk-RAFD5ZAH.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-67QE3JLU.js → chunk-TZRVK3NU.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-IRJS54AA.js → chunk-VWLQDZFF.js} +20 -12
- package/dist/safe-bash/chunks/{chunk-NAETSXBW.js → chunk-ZJAXMB5M.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LDR3PPM3.js → chunk-22QEL76N.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-QX3WKBLI.js → chunk-36FV6BAG.js} +5 -3
- package/dist/safe-bash/command-chunks/{chunk-BSLXS4PE.js → chunk-3DH5QBZC.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ZSHXZ3XG.js → chunk-3EAZRKI4.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-5EFNQ6FY.js → chunk-3EBQOZET.js} +216 -1
- package/dist/safe-bash/command-chunks/{chunk-KQE2D7PX.js → chunk-3HUCLYKJ.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-J4I7KCQQ.js → chunk-4JABZEDO.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-PVKSBXHB.js → chunk-4M6D4IUB.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-UVM6QG2H.js → chunk-4MVQE6CT.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-QWQHLMDX.js → chunk-4VTB4DGE.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-JQPDVCBU.js → chunk-565AAQTV.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-JSW6YH6T.js → chunk-5PRXCH54.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-42OQIFPW.js → chunk-5RLK2QSY.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-PYYAX5FB.js → chunk-63WEGFLL.js} +16 -16
- package/dist/safe-bash/command-chunks/{chunk-5QR4LTAK.js → chunk-6KZXFPOT.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-LJLB7TBN.js → chunk-6YTXU3NF.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-NNYOPI7K.js → chunk-7NF44M2V.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-ZRHKXN6W.js → chunk-7RQGRFHJ.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-QGSY4ZAU.js → chunk-7UYBNOOM.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-WOT2YXBT.js → chunk-7ZQVMPSB.js} +213 -42
- package/dist/safe-bash/command-chunks/{chunk-6REH56FL.js → chunk-AA254KE5.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-2VSNIHIW.js → chunk-APUXNXXQ.js} +11 -11
- package/dist/safe-bash/command-chunks/{chunk-4VHCA4KK.js → chunk-AVSINNZ6.js} +80 -3
- package/dist/safe-bash/command-chunks/{chunk-XE75H5ZZ.js → chunk-AVXSR5MO.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-22D6Q6SW.js → chunk-BKCVCMUX.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-UDRJKA3P.js → chunk-C23L4HZB.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-PAEAEFK3.js → chunk-C3EEMMQL.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-NDJPULBE.js → chunk-CEKBIZGU.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-75OUKYCM.js → chunk-CH5JDE3C.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-XNVL6AOV.js → chunk-CIYGC7WU.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-RUXY7GN5.js → chunk-CMJBRGU2.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-DGFMOT4O.js → chunk-CO4HYNPS.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-TMJG745A.js → chunk-CQLZM75U.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-T2LZWXWF.js → chunk-DBCTHLB5.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-6RE4MZYM.js → chunk-DBEJMI7J.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-XXUMECE4.js → chunk-DEEZYCOQ.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-YJMS5Q4Y.js → chunk-DHTTI7CE.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-D3WMD32B.js → chunk-DLLGOC4Q.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-HVLF3Y4B.js → chunk-DYCYAIET.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-BZLLQWRK.js → chunk-E5CDHXFA.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-5NC2IQMQ.js → chunk-EV7A5FNN.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-MCUDSE4H.js → chunk-EWECMOQ5.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-2YC6MWQB.js → chunk-EY3UE26F.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ZQ4NQ24M.js → chunk-FJLVISSD.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-WOO3YO2X.js → chunk-HTMGN3KL.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-2E53ZL5D.js → chunk-HU72CZBN.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-AH3ZEPAN.js → chunk-IGHFIRXK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-R4NPYXQX.js → chunk-IKBTII7C.js} +285 -70
- package/dist/safe-bash/command-chunks/{chunk-J3ISXTYB.js → chunk-JTEAYB72.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-NR7POLKP.js → chunk-KCS25XUJ.js} +2 -2
- package/dist/safe-bash/command-chunks/chunk-LKAFLJ5L.js +123 -0
- package/dist/safe-bash/command-chunks/{chunk-EU5SR3LS.js → chunk-LSH6UKCT.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-WV3C6BRD.js → chunk-MHZ7UTRX.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-K6J3KFQ2.js → chunk-MSA5BQFK.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-OMD45J52.js → chunk-MW3L6JB7.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-AR65HNNX.js → chunk-N2TN7IBE.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-NNGWTDVJ.js +2819 -0
- package/dist/safe-bash/command-chunks/{chunk-NWA7ZJDV.js → chunk-NU64GWGN.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-4Q3HP33O.js → chunk-NW3S6T6R.js} +146 -123
- package/dist/safe-bash/command-chunks/chunk-NXCJNPL3.js +47 -0
- package/dist/safe-bash/command-chunks/{chunk-GAYTDZPP.js → chunk-ORWYNKKL.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-FCGMSOF6.js → chunk-P6YTNXRV.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-3RDEX4AF.js → chunk-PAS4YSNN.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-RKAL5VFP.js → chunk-PLVFJ6FF.js} +255 -616
- package/dist/safe-bash/command-chunks/{chunk-TTPT3OME.js → chunk-PSNTCRL5.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-CJIFJ45R.js → chunk-QBCEAYQT.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-FGK6HLSY.js → chunk-QC2RWSYM.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-HCZITM4C.js → chunk-QPY3NCMC.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-3TXPZLFI.js → chunk-R6RVR6ZZ.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-HQFX5XKV.js → chunk-RB7XAYO2.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-6PDXNY3T.js → chunk-RF5VEKFU.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-VAMBWXDV.js → chunk-RUAGHZNF.js} +18 -18
- package/dist/safe-bash/command-chunks/{chunk-3MFYCMQU.js → chunk-S2T7DDGY.js} +16 -16
- package/dist/safe-bash/command-chunks/{chunk-LZHFVNEV.js → chunk-S3QYSI5E.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ZLMCWAAU.js → chunk-STTXZKR6.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-AXUHORS3.js → chunk-SUYSZJI3.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-C5SLY3RB.js → chunk-U2C6A3QO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-HCJWEB6P.js → chunk-U6IEK2CI.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-NN6OWOJG.js → chunk-UC6DUY3K.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-64L57DEI.js → chunk-UQTU7H6T.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-I7MEH76L.js → chunk-UYNJF5QN.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ARA57PMC.js → chunk-V5PVNBOS.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-IAHYG67O.js → chunk-V5ZBRM5R.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-ZZ6EIACJ.js → chunk-VGHRMAI4.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-DZTT5SLG.js → chunk-VP7R7HKY.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-TP5MZHCB.js → chunk-W5Y7Y7PS.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-ZTW2E5OT.js → chunk-WAE3OCOU.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-DBYY7IDI.js → chunk-WCM47S5A.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-U6VSRO6E.js → chunk-WNVBS4GV.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-CXOAMPOV.js → chunk-WUIS2INH.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-4HJEZGYN.js → chunk-YODHIRPW.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-C3FERGHU.js → chunk-YRMTOLG5.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-GQV5RWMN.js → chunk-ZFXHSFTU.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-YXIJOYT6.js → chunk-ZUOCXDYW.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LBBJ5S3W.js → chunk-ZZKJPLIH.js} +1 -1
- package/dist/safe-bash/command-chunks/{engine-UPLVIV72-IGXUDNO5.js → engine-UPLVIV72-MSSFJLK4.js} +1 -1
- package/dist/safe-bash/command-chunks/{prompt-tool-debug-ERJKK3XZ.js → prompt-tool-debug-3POFNRYP.js} +5 -5
- package/dist/safe-bash/commands/bc/index.browser.js +1 -1
- package/dist/safe-bash/commands/llm/index.browser.js +3 -1
- package/dist/safe-bash/commands/llm/index.js +1 -1
- package/dist/safe-bash/commands/python/executor.browser.js +12 -1
- package/dist/safe-bash/commands/python/executor.js +1 -1
- package/dist/safe-bash/commands/python/index.browser.js +23 -1
- package/dist/safe-bash/commands/python/index.js +1 -1
- package/dist/safe-bash/commands/python/source-archive.d.ts +2 -0
- package/dist/safe-bash/commands/python/source-archive.js +2 -0
- package/dist/safe-bash/commands/python/source-zip.d.ts +2 -0
- package/dist/safe-bash/commands/python/source-zip.js +2 -0
- package/dist/safe-bash/core.browser.js +2 -2
- package/dist/safe-bash/full-core.browser.js +30 -6
- package/dist/safe-bash/plugins/index.browser.js +3 -3
- package/dist/safe-bash/registry-entry.browser.js +2 -2
- package/dist/safe-bash/search.browser.js +1 -1
- package/dist/safe-bash/shell/runtime.d.ts +2 -2
- package/dist/safe-bash/shell/runtime.js +11 -2
- package/dist/safe-bash/shell/sync-extra-evaluators.js +12 -12
- package/dist/safe-bash/shell-entry.browser.js +2 -2
- package/dist/safe-bash-command-exiftool/index.js +41 -0
- package/dist/safe-bash-command-git/git_rust.wasm +0 -0
- package/dist/safe-bash-command-llm/collections.js +24 -65
- package/dist/safe-bash-command-llm/command.js +6 -6
- package/dist/safe-bash-command-llm/fragment-loaders.d.ts +3 -2
- package/dist/safe-bash-command-llm/index.d.ts +3 -2
- package/dist/safe-bash-command-llm/index.js +10 -8
- package/dist/safe-bash-command-llm/loader-provider.d.ts +25 -0
- package/dist/safe-bash-command-llm/openai-sse.js +2 -2
- package/dist/safe-bash-command-llm/openai.js +4 -4
- package/dist/safe-bash-command-llm/providers/index.js +4 -4
- package/dist/safe-bash-command-llm/providers/openai.js +4 -4
- package/dist/safe-bash-command-llm/python-unicode.d.ts +2 -0
- package/dist/safe-bash-command-llm/templates.d.ts +7 -2
- package/dist/safe-bash-command-llm/types.d.ts +7 -1
- package/dist/safe-bash-command-mcp/index.browser.js +3 -0
- package/dist/safe-bash-command-mcp/index.js +3 -0
- package/dist/safe-bash-command-playwright-cli/index.js +36 -36
- package/dist/safe-bash-command-playwright-cli/playwright/abilities.js +7 -7
- package/dist/safe-bash-command-playwright-cli/playwright/adapter.js +3 -3
- package/dist/safe-bash-command-playwright-cli/playwright/capability-events.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/capability-result.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/controller.js +15 -15
- package/dist/safe-bash-command-playwright-cli/playwright/download-capabilities.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/drop-capability.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/index.js +35 -35
- package/dist/safe-bash-command-playwright-cli/playwright/modal-capabilities.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/native-evaluation.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/native-json-snapshot.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/native-snapshot.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/native-storage-replacement.js +2 -2
- package/dist/safe-bash-command-playwright-cli/playwright/profile.js +3 -3
- package/dist/safe-bash-command-playwright-cli/playwright/recording-capabilities.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/route-capabilities.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/snapshot.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/standard-capabilities.js +6 -6
- package/dist/safe-bash-command-playwright-cli/playwright/storage-capabilities.js +5 -5
- package/dist/safe-bash-command-playwright-cli/playwright/tracing-capabilities.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/webmcp-capabilities.js +1 -1
- package/dist/safe-bash-command-python/build-backend.d.ts +93 -0
- package/dist/safe-bash-command-python/build-dependencies.d.ts +13 -0
- package/dist/safe-bash-command-python/build-environment.d.ts +3 -0
- package/dist/safe-bash-command-python/build-wheel.d.ts +8 -0
- package/dist/safe-bash-command-python/executor.d.ts +12 -2
- package/dist/safe-bash-command-python/executor.js +27 -4
- package/dist/safe-bash-command-python/index.js +27 -4
- package/dist/safe-bash-command-python/jspi.js +2 -2
- package/dist/safe-bash-command-python/llm-assets-node.js +1 -1
- package/dist/safe-bash-command-python/llm-fragment-loader.d.ts +6 -0
- package/dist/safe-bash-command-python/llm-functions-loader.d.ts +5 -1
- package/dist/safe-bash-command-python/llm-loader-discovery.d.ts +13 -0
- package/dist/safe-bash-command-python/llm-package-manager.d.ts +7 -0
- package/dist/safe-bash-command-python/llm-template-loader.d.ts +6 -0
- package/dist/safe-bash-command-python/manifest.d.ts +17 -0
- package/dist/safe-bash-command-python/provisioning.d.ts +37 -5
- package/dist/safe-bash-command-python/provisioning.js +2 -1
- package/dist/safe-bash-command-python/source-archive.d.ts +4 -0
- package/dist/safe-bash-command-python/source-archive.js +136 -0
- package/dist/safe-bash-command-python/source-environment.d.ts +12 -0
- package/dist/safe-bash-command-python/source-snapshot.d.ts +8 -0
- package/dist/safe-bash-command-python/source-zip.d.ts +8 -0
- package/dist/safe-bash-command-python/source-zip.js +8 -0
- package/dist/safe-bash-command-python/worker.js +3 -185
- package/dist/safe-bash-command-safejs/index.js +5 -5
- package/dist/safe-bash-command-safejs/runtime.js +3 -3
- package/dist/safe-bash-command-ssconvert/index.js +8 -8
- 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-csv-engine/index.js +1 -1
- package/dist/safe-bash-csv-engine/python-utf7.d.ts +18 -0
- package/dist/safe-bash-csv-engine/text-decoder.d.ts +1 -0
- package/dist/safe-bash-csv-engine/text-decoder.js +5 -3
- package/dist/safe-bash-presentation-engine/accessibility.js +15 -15
- package/dist/safe-bash-presentation-engine/animation-editing.js +5 -5
- package/dist/safe-bash-presentation-engine/animations.js +5 -5
- package/dist/safe-bash-presentation-engine/backgrounds.js +6 -6
- package/dist/safe-bash-presentation-engine/chart-editing.js +18 -18
- package/dist/safe-bash-presentation-engine/chart-object-operations.js +12 -12
- package/dist/safe-bash-presentation-engine/charts.js +15 -15
- package/dist/safe-bash-presentation-engine/command-placeholder.js +39 -39
- package/dist/safe-bash-presentation-engine/comments.js +6 -6
- package/dist/safe-bash-presentation-engine/connector-operations.js +16 -16
- package/dist/safe-bash-presentation-engine/connectors.js +13 -13
- package/dist/safe-bash-presentation-engine/diff.js +21 -21
- package/dist/safe-bash-presentation-engine/drawing-format.js +7 -7
- package/dist/safe-bash-presentation-engine/drawing-operations.js +15 -15
- package/dist/safe-bash-presentation-engine/drawing-schema.js +8 -8
- package/dist/safe-bash-presentation-engine/equations.js +6 -6
- package/dist/safe-bash-presentation-engine/fields.js +6 -6
- package/dist/safe-bash-presentation-engine/image-extraction.js +7 -7
- package/dist/safe-bash-presentation-engine/image-formatting.js +16 -16
- package/dist/safe-bash-presentation-engine/image-insertion.js +6 -6
- package/dist/safe-bash-presentation-engine/image-replacement.js +7 -7
- package/dist/safe-bash-presentation-engine/images.js +6 -6
- package/dist/safe-bash-presentation-engine/index.js +104 -104
- package/dist/safe-bash-presentation-engine/layouts.js +5 -5
- package/dist/safe-bash-presentation-engine/links.js +5 -5
- package/dist/safe-bash-presentation-engine/masters.js +4 -4
- package/dist/safe-bash-presentation-engine/media-editing.js +13 -13
- package/dist/safe-bash-presentation-engine/media-extraction.js +7 -7
- package/dist/safe-bash-presentation-engine/media.js +6 -6
- package/dist/safe-bash-presentation-engine/memberships.js +5 -5
- package/dist/safe-bash-presentation-engine/notes.js +6 -6
- package/dist/safe-bash-presentation-engine/ole-insertion.js +6 -6
- package/dist/safe-bash-presentation-engine/opaque-objects.js +2 -2
- package/dist/safe-bash-presentation-engine/package-tools.js +6 -6
- package/dist/safe-bash-presentation-engine/presentation-model.js +38 -38
- package/dist/safe-bash-presentation-engine/presentation-settings.js +5 -5
- package/dist/safe-bash-presentation-engine/properties.js +6 -6
- package/dist/safe-bash-presentation-engine/retained-inspection.js +3 -3
- package/dist/safe-bash-presentation-engine/retained-text.js +16 -16
- package/dist/safe-bash-presentation-engine/sanitize.js +7 -7
- package/dist/safe-bash-presentation-engine/selectors.js +2 -2
- package/dist/safe-bash-presentation-engine/shape-groups.js +15 -15
- package/dist/safe-bash-presentation-engine/shape-operations.js +14 -14
- package/dist/safe-bash-presentation-engine/shape-path-operations.js +16 -16
- package/dist/safe-bash-presentation-engine/shape-paths.js +5 -5
- package/dist/safe-bash-presentation-engine/shape-selection.js +15 -15
- package/dist/safe-bash-presentation-engine/shape-transforms.js +5 -5
- package/dist/safe-bash-presentation-engine/shapes.js +11 -11
- package/dist/safe-bash-presentation-engine/slide-copy.js +7 -7
- package/dist/safe-bash-presentation-engine/slide-import.js +6 -6
- package/dist/safe-bash-presentation-engine/slide-merge-split.js +8 -8
- package/dist/safe-bash-presentation-engine/slide-model.js +25 -25
- package/dist/safe-bash-presentation-engine/slide-removal.js +7 -7
- package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +2 -2
- package/dist/safe-bash-presentation-engine/slides.js +5 -5
- package/dist/safe-bash-presentation-engine/table-operations.js +17 -17
- package/dist/safe-bash-presentation-engine/table-spans.js +16 -16
- package/dist/safe-bash-presentation-engine/tables.js +15 -15
- package/dist/safe-bash-presentation-engine/tags.js +6 -6
- package/dist/safe-bash-presentation-engine/template-bindings.js +16 -16
- package/dist/safe-bash-presentation-engine/template-repeat.js +26 -26
- package/dist/safe-bash-presentation-engine/text-fitting.js +11 -11
- package/dist/safe-bash-presentation-engine/text-frames.js +11 -11
- package/dist/safe-bash-presentation-engine/text-paragraphs.js +11 -11
- package/dist/safe-bash-presentation-engine/text-reading.js +3 -3
- package/dist/safe-bash-presentation-engine/text-replacement.js +6 -6
- package/dist/safe-bash-presentation-engine/text-runs.js +8 -8
- package/dist/safe-bash-presentation-engine/themes.js +5 -5
- package/dist/safe-bash-presentation-engine/transitions.js +6 -6
- package/dist/safe-bash-presentation-engine/validation.js +2 -2
- package/dist/safe-bash-presentation-engine/xml-parts.js +5 -5
- package/dist/safe-bash-zip-engine/index.js +1 -1
- package/dist/safe-bash-zip-engine/zip/repair.js +1 -1
- package/dist/safe-bash-zip-engine/zip/sfx.js +1 -1
- package/dist/safe-bash-zip-engine/zip-format.d.ts +3 -1
- package/dist/safe-bash-zip-engine/zip-format.js +1 -1
- package/dist/safe-playwright-cloudflare/shell-browser-resource.d.ts +1 -1
- package/dist/safe-playwright-cloudflare/shell-browser-resource.js +35 -20
- package/package.json +13 -3
- package/dist/safe-bash/chunks/chunk-PSD2RSOS.js +0 -31
- package/dist/safe-bash/command-chunks/chunk-RHXV2KG5.js +0 -1466
- package/dist/safe-bash/command-chunks/{biff-AYJZR2YV-YFF3BK43.js → biff-AYJZR2YV-2BK47I2W.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-SKDJCMGI.js → chunk-ATUZ7J3B.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-4Q4R3VZU.js → chunk-ETFJ4L7F.js} +0 -0
- package/dist/safe-bash/command-chunks/{chunk-QWHBQBPB.js → chunk-EXDMIGZY.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-SKF6PGA5.js → chunk-I2OKE2NI.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-2H6RJPCQ.js → chunk-JDDZRKC4.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-3TP4SSPS.js → chunk-SRXARACJ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-D54L2IOZ.js → chunk-Y7UXJ77P.js} +3 -3
- package/dist/safe-bash/command-chunks/{dif-BXKPQOCO-FVJYYGYB.js → dif-BXKPQOCO-4KB3RC6G.js} +4 -4
- package/dist/safe-bash/command-chunks/{sylk-25D7TL2Y-NJKBZZTF.js → sylk-25D7TL2Y-RU6ANKGT.js} +4 -4
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import {
|
|
2
|
+
extractPythonSourceZip,
|
|
3
|
+
extractPythonSourceZipFile,
|
|
4
|
+
pythonSourceZipSize,
|
|
5
|
+
splitPythonSourcePath
|
|
6
|
+
} from "../safe-bash/command-chunks/chunk-LKAFLJ5L.js";
|
|
7
|
+
import {
|
|
8
|
+
openPythonPackageFile
|
|
9
|
+
} from "../safe-bash/command-chunks/chunk-NXCJNPL3.js";
|
|
10
|
+
import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
|
|
11
|
+
|
|
12
|
+
// packages/safe-bash-command-python/src/source-archive.ts
|
|
13
|
+
import { resolvePath, dirname } from "../safe-bash-contracts/path.js";
|
|
14
|
+
import { readArchive } from "../safe-bash-command-tar/extract.js";
|
|
15
|
+
import { parseOptions } from "../safe-bash-command-tar/options.js";
|
|
16
|
+
import { autodetected } from "../safe-bash-command-tar/stream.js";
|
|
17
|
+
import { Budget, DEFAULT_ARCHIVE_LIMITS } from "../safe-bash-io-engine/commands/archive/internal.js";
|
|
18
|
+
async function extractPythonSourceArchive(source, directory, maxBytes, context, metadata) {
|
|
19
|
+
const filename = metadata?.filename ?? source;
|
|
20
|
+
if (metadata?.contentType === "application/zip" || [".zip", ".whl"].some((suffix) => filename.toLowerCase().endsWith(suffix))) return extractPythonSourceZip(source, directory, maxBytes, context, metadata);
|
|
21
|
+
const { fs, signal } = context, settings = { signal };
|
|
22
|
+
if (maxBytes !== Infinity && (!Number.isSafeInteger(maxBytes) || maxBytes < 0)) throw new RangeError("Invalid Python source archive size limit");
|
|
23
|
+
if (!fs.confineExtraction || !fs.writeStream) throw new Error("Python tar sources require confined streaming writes");
|
|
24
|
+
const input = await openPythonPackageFile(context, source, maxBytes);
|
|
25
|
+
if (!input) throw new Error("Python tar sources require retained reads");
|
|
26
|
+
let failed = false, primary, zipSize;
|
|
27
|
+
try {
|
|
28
|
+
zipSize = await pythonSourceZipSize(input);
|
|
29
|
+
if (zipSize === void 0) {
|
|
30
|
+
const destination = await fs.confineExtraction([directory], settings);
|
|
31
|
+
const limits = DEFAULT_ARCHIVE_LIMITS;
|
|
32
|
+
const command = { ...context, args: ["-tf", "-"], cwd: directory };
|
|
33
|
+
const options = await parseOptions(command, limits);
|
|
34
|
+
if (options === "help") throw new Error("Invalid source tar options");
|
|
35
|
+
const stream = async function* () {
|
|
36
|
+
for (let offset = 0; offset < input.size; ) {
|
|
37
|
+
const bytes = await input.read(offset, 65536);
|
|
38
|
+
offset += bytes.length;
|
|
39
|
+
yield bytes;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
let prefix, flatten = true, members = 0;
|
|
43
|
+
await readArchive(command, autodetected(stream(), signal, limits), options, new Budget(command, limits), { async member(entry, reader) {
|
|
44
|
+
members++;
|
|
45
|
+
const [part] = splitPythonSourcePath(entry.name);
|
|
46
|
+
if (!part || prefix !== void 0 && part !== prefix) flatten = false;
|
|
47
|
+
prefix ??= part;
|
|
48
|
+
await reader.discard(entry.size);
|
|
49
|
+
} });
|
|
50
|
+
const target = (name) => {
|
|
51
|
+
const path = resolvePath(directory, flatten ? splitPythonSourcePath(name)[1] : name);
|
|
52
|
+
if (path !== directory && !path.startsWith(directory + "/")) throw new Error("Source tar member escapes the build directory");
|
|
53
|
+
return path;
|
|
54
|
+
};
|
|
55
|
+
const write = async (path, bytes, mode) => {
|
|
56
|
+
let finished = false;
|
|
57
|
+
const observed = (async function* () {
|
|
58
|
+
yield* bytes;
|
|
59
|
+
finished = true;
|
|
60
|
+
})();
|
|
61
|
+
try {
|
|
62
|
+
await destination.writeStream(path, observed, { flag: "w", mode: 420, signal });
|
|
63
|
+
if (!finished) throw new Error("Source tar write ended before consuming its member");
|
|
64
|
+
} finally {
|
|
65
|
+
await observed.return(void 0);
|
|
66
|
+
}
|
|
67
|
+
if (mode & 73) {
|
|
68
|
+
if (!destination.chmod) throw new Error("Source tar executables require permissions support");
|
|
69
|
+
await destination.chmod(path, 493, settings);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const copyLink = async (name, before, path, mode) => {
|
|
73
|
+
for (let step = 0; step <= members; step++) {
|
|
74
|
+
let matched;
|
|
75
|
+
await readArchive(command, autodetected(stream(), signal, limits), options, new Budget(command, limits), { async member(entry, reader, _selected, _root, start) {
|
|
76
|
+
if (entry.name === name && start < before) matched = { entry, start, body: reader.position };
|
|
77
|
+
await reader.discard(entry.size);
|
|
78
|
+
} });
|
|
79
|
+
if (!matched) throw new Error("Source tar link target was not found");
|
|
80
|
+
const selected = matched;
|
|
81
|
+
if (selected.entry.type === "0") {
|
|
82
|
+
await readArchive(command, autodetected(stream(), signal, limits), options, new Budget(command, limits), { async member(entry, reader) {
|
|
83
|
+
if (reader.position === selected.body) await write(path, reader.body(entry.size), mode);
|
|
84
|
+
else await reader.discard(entry.size);
|
|
85
|
+
} });
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (selected.entry.type === "1") {
|
|
89
|
+
name = selected.entry.linkname;
|
|
90
|
+
before = selected.start;
|
|
91
|
+
} else if (selected.entry.type === "2") {
|
|
92
|
+
name = resolvePath("/", dirname(selected.entry.name), selected.entry.linkname).slice(1);
|
|
93
|
+
before = Infinity;
|
|
94
|
+
} else throw new Error("Source tar link target is not a file");
|
|
95
|
+
}
|
|
96
|
+
throw new Error("Source tar link cycle");
|
|
97
|
+
};
|
|
98
|
+
await readArchive(command, autodetected(stream(), signal, limits), options, new Budget(command, limits), { async member(entry, reader, _selected, _root, start) {
|
|
99
|
+
const path = target(entry.name);
|
|
100
|
+
if (entry.type === "5") {
|
|
101
|
+
await destination.mkdir(path, { recursive: true, mode: 493, signal });
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
await destination.mkdir(dirname(path), { recursive: true, mode: 493, signal });
|
|
105
|
+
if (entry.type === "2") {
|
|
106
|
+
const link = resolvePath(dirname(path), entry.linkname);
|
|
107
|
+
if (link !== directory && !link.startsWith(directory + "/")) throw new Error("Source tar symlink escapes the build directory");
|
|
108
|
+
if (!destination.symlink) throw new Error("Source tar links require symlink support");
|
|
109
|
+
await destination.rm(path, { force: true, signal });
|
|
110
|
+
await destination.symlink(entry.linkname, path, settings);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (entry.type === "1") await copyLink(entry.linkname, start, path, entry.mode);
|
|
114
|
+
else await write(path, reader.body(entry.size), entry.mode);
|
|
115
|
+
if (entry.mtime !== void 0) {
|
|
116
|
+
if (!destination.utimes) throw new Error("Source tar files require timestamp support");
|
|
117
|
+
await destination.utimes(path, entry.mtime * 1e3, entry.mtime * 1e3, settings);
|
|
118
|
+
}
|
|
119
|
+
} });
|
|
120
|
+
}
|
|
121
|
+
} catch (error) {
|
|
122
|
+
primary = error;
|
|
123
|
+
failed = true;
|
|
124
|
+
}
|
|
125
|
+
if (!failed && zipSize !== void 0) return extractPythonSourceZipFile(input, directory, maxBytes, context, zipSize, !filename.endsWith(".whl"));
|
|
126
|
+
try {
|
|
127
|
+
await input.close();
|
|
128
|
+
} catch (error) {
|
|
129
|
+
if (failed) throw new AggregateError([primary, error], "Python source tar cleanup failed");
|
|
130
|
+
throw error;
|
|
131
|
+
}
|
|
132
|
+
if (failed) throw primary;
|
|
133
|
+
}
|
|
134
|
+
export {
|
|
135
|
+
extractPythonSourceArchive
|
|
136
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type PythonPackageOptions } from './provisioning.js';
|
|
2
|
+
import type { extractPythonSourceZip } from './source-zip.js';
|
|
3
|
+
import type { PythonCommandsOptions } from './executor.js';
|
|
4
|
+
export interface PythonSourceBuildOptions {
|
|
5
|
+
/** Existing caller-owned directory for build staging and durable wheels. */
|
|
6
|
+
readonly directory: string;
|
|
7
|
+
/** Optional caller-selected archive implementation; omitted hosts support source directories. */
|
|
8
|
+
readonly extractArchive?: typeof extractPythonSourceZip;
|
|
9
|
+
readonly python: Omit<PythonCommandsOptions, 'packages' | 'requirements' | 'packageProfile' | 'provisioning' | 'environment'>;
|
|
10
|
+
}
|
|
11
|
+
/** Package environment that builds local PEP 517 and legacy setup projects before normal installation. */
|
|
12
|
+
export declare function createPythonSourcePackageEnvironment(options: PythonPackageOptions, build: PythonSourceBuildOptions): import("./provisioning.js").PythonPackageEnvironment;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type CommandContext } from "../safe-bash-contracts/index.js";
|
|
2
|
+
export interface PythonSourceSnapshot {
|
|
3
|
+
readonly path: string;
|
|
4
|
+
/** Retires only the owned tree; substituted identities are never removed. */
|
|
5
|
+
dispose(): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
/** Copy a build tree into caller storage using pip 21.2.4's directory policy. */
|
|
8
|
+
export declare function createPythonSourceSnapshot(source: string, directory: string, context: CommandContext): Promise<PythonSourceSnapshot>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CommandContext } from "../safe-bash-contracts/index.js";
|
|
2
|
+
export interface PythonSourceArchiveMetadata {
|
|
3
|
+
/** Native download filename; metadata only, never a staging path. */
|
|
4
|
+
readonly filename: string;
|
|
5
|
+
readonly contentType?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Extract a source ZIP into an owned, confined build directory using pip's flattening policy. */
|
|
8
|
+
export declare function extractPythonSourceZip(source: string, directory: string, maxBytes: number, context: CommandContext, metadata?: PythonSourceArchiveMetadata): Promise<void>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
installPythonPackages,
|
|
2
3
|
parsePythonInvocation,
|
|
3
4
|
pythonDirectoryEntries,
|
|
4
5
|
pythonExecution,
|
|
@@ -7,7 +8,7 @@ import {
|
|
|
7
8
|
pythonRuntimeRelocation,
|
|
8
9
|
pythonStatProjection,
|
|
9
10
|
pythonTreeCleanup
|
|
10
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
11
|
+
} from "../safe-bash/command-chunks/chunk-3EBQOZET.js";
|
|
11
12
|
import {
|
|
12
13
|
PythonFailure
|
|
13
14
|
} from "../safe-bash/command-chunks/chunk-TO6UNFEF.js";
|
|
@@ -15,189 +16,6 @@ import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
|
|
|
15
16
|
|
|
16
17
|
// packages/safe-bash-command-python/src/worker.ts
|
|
17
18
|
import { mountPythonFileSystem } from "@poe-platform/safe-fs/core";
|
|
18
|
-
|
|
19
|
-
// packages/safe-bash-command-python/src/provisioning-runtime.ts
|
|
20
|
-
async function installPythonPackages(supplied, start, request, maxTransferBytes) {
|
|
21
|
-
if (start.requirements.length === 0) return;
|
|
22
|
-
const runtime = supplied;
|
|
23
|
-
if (runtime.version !== "314.0.6" || !runtime._api?.packageManager || !runtime._api.lockfile_packages || typeof runtime.loadPackage !== "function" || typeof runtime.runPythonAsync !== "function") throw new Error("Python package installer ABI requires Pyodide 314.0.6");
|
|
24
|
-
let transportFailure;
|
|
25
|
-
const fetch = (url, expected) => {
|
|
26
|
-
try {
|
|
27
|
-
const opened = request("package-open", start.session, url, expected);
|
|
28
|
-
try {
|
|
29
|
-
const bytes = new Uint8Array(opened.size);
|
|
30
|
-
for (let offset = 0; offset < bytes.length; ) {
|
|
31
|
-
const chunk = request("package-read", start.session, opened.key, offset, Math.min(maxTransferBytes, 65536, bytes.length - offset));
|
|
32
|
-
if (!Array.isArray(chunk) || chunk.length === 0 || offset + chunk.length > bytes.length) throw new Error("Invalid Python package chunk");
|
|
33
|
-
bytes.set(chunk, offset);
|
|
34
|
-
offset += chunk.length;
|
|
35
|
-
}
|
|
36
|
-
return { bytes, headers: opened.headers };
|
|
37
|
-
} finally {
|
|
38
|
-
request("package-close", start.session, opened.key);
|
|
39
|
-
}
|
|
40
|
-
} catch (error) {
|
|
41
|
-
transportFailure ??= { error };
|
|
42
|
-
throw error;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
runtime._api.packageManager.downloadPackage = async (metadata) => {
|
|
46
|
-
if (metadata.channel === runtime._api.packageManager.defaultChannel) {
|
|
47
|
-
const pkg = runtime._api.lockfile_packages[metadata.normalizedName];
|
|
48
|
-
if (!pkg) throw new Error(`Missing matching Pyodide package: ${metadata.normalizedName}`);
|
|
49
|
-
return fetch(new URL(pkg.file_name, "https://cdn.jsdelivr.net/pyodide/v314.0.6/full/").href, pkg.sha256).bytes;
|
|
50
|
-
}
|
|
51
|
-
return fetch(metadata.channel).bytes;
|
|
52
|
-
};
|
|
53
|
-
const loadPackages = async (names) => {
|
|
54
|
-
const errors = [];
|
|
55
|
-
await runtime.loadPackage(names, { messageCallback() {
|
|
56
|
-
}, errorCallback(message) {
|
|
57
|
-
errors.push(message);
|
|
58
|
-
} });
|
|
59
|
-
if (errors.length) throw new Error(errors.join("\n"));
|
|
60
|
-
};
|
|
61
|
-
const installedGlobals = [];
|
|
62
|
-
try {
|
|
63
|
-
await loadPackages(["micropip"]);
|
|
64
|
-
runtime.globals.set("_safe_package_native", loadPackages);
|
|
65
|
-
installedGlobals.push("_safe_package_native");
|
|
66
|
-
runtime.globals.set("_safe_package_bytes", (url, hash) => fetch(url, hash).bytes);
|
|
67
|
-
installedGlobals.push("_safe_package_bytes");
|
|
68
|
-
runtime.globals.set("_safe_package_metadata", (url) => {
|
|
69
|
-
const result = fetch(url);
|
|
70
|
-
return JSON.stringify({ text: new TextDecoder().decode(result.bytes), headers: Object.fromEntries(result.headers.map(([name, value]) => [name.toLowerCase(), value])) });
|
|
71
|
-
});
|
|
72
|
-
installedGlobals.push("_safe_package_metadata");
|
|
73
|
-
runtime.globals.set("_safe_package_requirements_json", JSON.stringify(start.requirements));
|
|
74
|
-
installedGlobals.push("_safe_package_requirements_json");
|
|
75
|
-
await runtime.runPythonAsync(`
|
|
76
|
-
import json as _safe_json
|
|
77
|
-
import micropip as _safe_micropip
|
|
78
|
-
from micropip._compat import compatibility_layer as _safe_compat
|
|
79
|
-
from micropip.package_manager import PackageManager as _SafePackageManager
|
|
80
|
-
from micropip.wheelinfo import WheelInfo as _SafeWheelInfo
|
|
81
|
-
from micropip._utils import check_compatible as _safe_check_compatible
|
|
82
|
-
from micropip._vendored.packaging.src.packaging.requirements import Requirement as _SafeRequirement, InvalidRequirement as _SafeInvalidRequirement
|
|
83
|
-
from micropip._vendored.packaging.src.packaging.utils import canonicalize_name as _safe_name
|
|
84
|
-
|
|
85
|
-
class _SafePackageCompatibility(_safe_compat):
|
|
86
|
-
@staticmethod
|
|
87
|
-
async def loadPackage(names):
|
|
88
|
-
return await _safe_package_native(names)
|
|
89
|
-
@staticmethod
|
|
90
|
-
async def fetch_bytes(url, kwargs):
|
|
91
|
-
return _safe_package_bytes(url).to_bytes()
|
|
92
|
-
@staticmethod
|
|
93
|
-
async def fetch_string_and_headers(url, kwargs):
|
|
94
|
-
value = _safe_json.loads(_safe_package_metadata(url))
|
|
95
|
-
return value['text'], value['headers']
|
|
96
|
-
|
|
97
|
-
# Require index/URL digests before publishing wheel bytes to the host cache.
|
|
98
|
-
# Local wheels are host-trusted inputs and receive a content digest on first read.
|
|
99
|
-
async def _safe_wheel_fetch(self, url, kwargs, compat):
|
|
100
|
-
expected = self.sha256 if url == self.url else None
|
|
101
|
-
if url == self.metadata_url and isinstance(self.core_metadata, dict):
|
|
102
|
-
expected = self.core_metadata.get('sha256')
|
|
103
|
-
return _safe_package_bytes(url, expected).to_bytes()
|
|
104
|
-
_SafeWheelInfo._fetch_bytes = _safe_wheel_fetch
|
|
105
|
-
_safe_manager = _SafePackageManager(_SafePackageCompatibility)
|
|
106
|
-
_safe_requirements = _safe_json.loads(_safe_package_requirements_json)
|
|
107
|
-
# A persisted base wheel may be visited before a newly requested extra. Micropip
|
|
108
|
-
# skips already locked names, so every occurrence must carry the requested extras.
|
|
109
|
-
_safe_roots = []
|
|
110
|
-
_safe_extras = {}
|
|
111
|
-
for _safe_source in _safe_requirements:
|
|
112
|
-
try:
|
|
113
|
-
_safe_root = _SafeRequirement(_safe_source)
|
|
114
|
-
if _safe_root.name.endswith('.whl'):
|
|
115
|
-
raise _SafeInvalidRequirement(_safe_source)
|
|
116
|
-
except _SafeInvalidRequirement:
|
|
117
|
-
_safe_wheel = _SafeWheelInfo.from_url(_safe_source)
|
|
118
|
-
_safe_root = _SafeRequirement(_safe_wheel.name + ' @ ' + _safe_source)
|
|
119
|
-
_safe_roots.append(_safe_root)
|
|
120
|
-
if not _safe_root.marker or _safe_root.marker.evaluate({'extra': ''}):
|
|
121
|
-
# Named requirements may be skipped when already locked. Validate direct
|
|
122
|
-
# wheels even then, rather than letting an incompatible URL report success.
|
|
123
|
-
if _safe_root.url:
|
|
124
|
-
_safe_direct_wheel = _SafeWheelInfo.from_url(_safe_root.url)
|
|
125
|
-
_safe_check_compatible(_safe_direct_wheel.filename)
|
|
126
|
-
# Validate the actual archive and host-checked digest even if micropip's
|
|
127
|
-
# satisfied-name fast path will skip installing this explicit operand.
|
|
128
|
-
await _safe_direct_wheel.download({}, _SafePackageCompatibility)
|
|
129
|
-
_safe_extras.setdefault(_safe_name(_safe_root.name), set()).update(_safe_root.extras)
|
|
130
|
-
for _safe_root in _safe_roots:
|
|
131
|
-
_safe_root.extras.update(_safe_extras.get(_safe_name(_safe_root.name), set()))
|
|
132
|
-
await _safe_manager.install([str(root) for root in _safe_roots], deps=True)
|
|
133
|
-
# Resolve selected extras from distribution metadata, including extras added to
|
|
134
|
-
# an already satisfied transitive dependency. Micropip skips those names early.
|
|
135
|
-
# Keep its installer and conflict policy; do not infer dependencies from imports.
|
|
136
|
-
import importlib.metadata as _safe_metadata
|
|
137
|
-
_safe_previous_pending = None
|
|
138
|
-
while True:
|
|
139
|
-
_safe_distributions = [d for d in _safe_metadata.distributions() if d.metadata['Name']]
|
|
140
|
-
_safe_versions = {_safe_name(d.metadata['Name']): d.version for d in _safe_distributions}
|
|
141
|
-
while True:
|
|
142
|
-
_safe_changed = False
|
|
143
|
-
_safe_dependencies = []
|
|
144
|
-
for _safe_dist in _safe_distributions:
|
|
145
|
-
_safe_contexts = {''} | _safe_extras.get(_safe_name(_safe_dist.metadata['Name']), set())
|
|
146
|
-
for _safe_dep in _safe_dist.requires or []:
|
|
147
|
-
_safe_requirement = _SafeRequirement(_safe_dep)
|
|
148
|
-
if _safe_requirement.marker and not any(_safe_requirement.marker.evaluate({'extra': extra}) for extra in _safe_contexts):
|
|
149
|
-
continue
|
|
150
|
-
# The marker belongs to the requesting distribution's extra context, already
|
|
151
|
-
# evaluated above; a separate installer transaction must not reinterpret it.
|
|
152
|
-
_safe_requirement.marker = None
|
|
153
|
-
_safe_dependencies.append(_safe_requirement)
|
|
154
|
-
_safe_selected = _safe_extras.setdefault(_safe_name(_safe_requirement.name), set())
|
|
155
|
-
if not _safe_requirement.extras.issubset(_safe_selected):
|
|
156
|
-
_safe_selected.update(_safe_requirement.extras)
|
|
157
|
-
_safe_changed = True
|
|
158
|
-
if not _safe_changed:
|
|
159
|
-
break
|
|
160
|
-
_safe_pending = set()
|
|
161
|
-
for _safe_requirement in _safe_dependencies:
|
|
162
|
-
_safe_version = _safe_versions.get(_safe_name(_safe_requirement.name))
|
|
163
|
-
if _safe_version is None:
|
|
164
|
-
_safe_pending.add(str(_safe_requirement))
|
|
165
|
-
elif not _safe_requirement.specifier.contains(_safe_version, prereleases=True):
|
|
166
|
-
raise ValueError('Python package dependency conflict: ' + str(_safe_requirement))
|
|
167
|
-
if not _safe_pending:
|
|
168
|
-
break
|
|
169
|
-
if _safe_pending == _safe_previous_pending:
|
|
170
|
-
raise ValueError('Python package dependencies remain missing: ' + ', '.join(sorted(_safe_pending)))
|
|
171
|
-
_safe_previous_pending = _safe_pending
|
|
172
|
-
await _safe_manager.install(sorted(_safe_pending), deps=True)
|
|
173
|
-
# Explicit roots also constrain the result: direct URLs can bypass micropip's
|
|
174
|
-
# already-installed version check, including when another root pins that name.
|
|
175
|
-
for _safe_root in _safe_roots:
|
|
176
|
-
if _safe_root.marker and not _safe_root.marker.evaluate({'extra': ''}):
|
|
177
|
-
continue
|
|
178
|
-
_safe_version = _safe_versions.get(_safe_name(_safe_root.name))
|
|
179
|
-
if _safe_version is None or not _safe_root.specifier.contains(_safe_version, prereleases=True):
|
|
180
|
-
raise ValueError('Python package version conflict: ' + str(_safe_root))
|
|
181
|
-
if _safe_root.url:
|
|
182
|
-
_safe_wheel = _SafeWheelInfo.from_url(_safe_root.url)
|
|
183
|
-
_safe_wheel_pin = _SafeRequirement(_safe_wheel.name + '==' + str(_safe_wheel.version))
|
|
184
|
-
if _safe_name(_safe_wheel.name) != _safe_name(_safe_root.name) or not _safe_wheel_pin.specifier.contains(_safe_version, prereleases=True):
|
|
185
|
-
raise ValueError('Python package wheel version conflict: ' + str(_safe_root))
|
|
186
|
-
_safe_installed_json = _safe_json.dumps([name + '==' + version for name, version in sorted(_safe_versions.items())])
|
|
187
|
-
`);
|
|
188
|
-
const pinned = JSON.parse(runtime.runPython("_safe_installed_json"));
|
|
189
|
-
request("package-commit", start.session, pinned);
|
|
190
|
-
} catch (error) {
|
|
191
|
-
throw transportFailure ? transportFailure.error : error;
|
|
192
|
-
} finally {
|
|
193
|
-
runtime._api.packageManager.downloadPackage = async () => {
|
|
194
|
-
throw new Error("Python package transport is only available during installation");
|
|
195
|
-
};
|
|
196
|
-
for (const name of installedGlobals) runtime.globals.delete(name);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
// packages/safe-bash-command-python/src/worker.ts
|
|
201
19
|
function createPythonWorkerRequest(shared, postMessage, error) {
|
|
202
20
|
let control;
|
|
203
21
|
let payload;
|
|
@@ -329,7 +147,7 @@ async function runPythonWorker(options) {
|
|
|
329
147
|
if ("loadPackage" in publicRuntime) publicRuntime.loadPackage = unavailablePackage;
|
|
330
148
|
if (publicRuntime._api?.packageManager) publicRuntime._api.packageManager.downloadPackage = unavailablePackage;
|
|
331
149
|
if (start.installOnly) {
|
|
332
|
-
startupWrite("stdout", "Successfully installed requested Python packages");
|
|
150
|
+
if (!start.packages?.uninstall) startupWrite("stdout", "Successfully installed requested Python packages");
|
|
333
151
|
postMessage({ type: "exit", exitCode: 0 });
|
|
334
152
|
return;
|
|
335
153
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSafeJsCommands
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-YFZ6FPIC.js";
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-EXDMIGZY.js";
|
|
5
4
|
import "../safe-bash/command-chunks/chunk-K2R7H3KO.js";
|
|
5
|
+
import {
|
|
6
|
+
defaultSafeJsLimits
|
|
7
|
+
} from "../safe-bash/command-chunks/chunk-B4UWZCQR.js";
|
|
6
8
|
import "../safe-bash/command-chunks/chunk-CZXYWGVO.js";
|
|
9
|
+
import "../safe-bash/command-chunks/chunk-YFZ6FPIC.js";
|
|
7
10
|
import "../safe-bash/command-chunks/chunk-PQOAM5SC.js";
|
|
8
11
|
import {
|
|
9
12
|
SafeJsCommandLimitError
|
|
10
13
|
} from "../safe-bash/command-chunks/chunk-ABH5FMMA.js";
|
|
11
|
-
import {
|
|
12
|
-
defaultSafeJsLimits
|
|
13
|
-
} from "../safe-bash/command-chunks/chunk-B4UWZCQR.js";
|
|
14
14
|
import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
|
|
15
15
|
export {
|
|
16
16
|
SafeJsCommandLimitError,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSafeJsCommands
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-YFZ6FPIC.js";
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-EXDMIGZY.js";
|
|
5
4
|
import "../safe-bash/command-chunks/chunk-K2R7H3KO.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-B4UWZCQR.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-CZXYWGVO.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-YFZ6FPIC.js";
|
|
7
8
|
import "../safe-bash/command-chunks/chunk-PQOAM5SC.js";
|
|
8
9
|
import "../safe-bash/command-chunks/chunk-ABH5FMMA.js";
|
|
9
|
-
import "../safe-bash/command-chunks/chunk-B4UWZCQR.js";
|
|
10
10
|
import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
|
|
11
11
|
export {
|
|
12
12
|
createSafeJsCommands
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
gt,
|
|
11
11
|
j,
|
|
12
12
|
oe
|
|
13
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
13
|
+
} from "../safe-bash/command-chunks/chunk-RF5VEKFU.js";
|
|
14
14
|
import {
|
|
15
15
|
a,
|
|
16
16
|
g,
|
|
@@ -32,6 +32,9 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
p as p2
|
|
34
34
|
} from "../safe-bash/command-chunks/chunk-4XWFUW5L.js";
|
|
35
|
+
import {
|
|
36
|
+
r as r2
|
|
37
|
+
} from "../safe-bash/command-chunks/chunk-RVEDPJRP.js";
|
|
35
38
|
import {
|
|
36
39
|
i as i2,
|
|
37
40
|
o as o4
|
|
@@ -47,16 +50,13 @@ import {
|
|
|
47
50
|
t as t2,
|
|
48
51
|
x
|
|
49
52
|
} from "../safe-bash/command-chunks/chunk-PFOVSF3U.js";
|
|
53
|
+
import {
|
|
54
|
+
o as o3
|
|
55
|
+
} from "../safe-bash/command-chunks/chunk-PYU5VF5I.js";
|
|
50
56
|
import {
|
|
51
57
|
a as a4,
|
|
52
58
|
t as t4
|
|
53
59
|
} from "../safe-bash/command-chunks/chunk-Y4RGZJIG.js";
|
|
54
|
-
import {
|
|
55
|
-
r as r2
|
|
56
|
-
} from "../safe-bash/command-chunks/chunk-RVEDPJRP.js";
|
|
57
|
-
import {
|
|
58
|
-
o as o3
|
|
59
|
-
} from "../safe-bash/command-chunks/chunk-PYU5VF5I.js";
|
|
60
60
|
import {
|
|
61
61
|
A,
|
|
62
62
|
S,
|
|
@@ -719,7 +719,7 @@ var le;
|
|
|
719
719
|
function wr(...u) {
|
|
720
720
|
return le ??= V({ read: readZipArchiveEntries, write: createStoredZipArchive }), le(...u);
|
|
721
721
|
}
|
|
722
|
-
var H = de(async (u) => (await import("../safe-bash/command-chunks/engine-UPLVIV72-
|
|
722
|
+
var H = de(async (u) => (await import("../safe-bash/command-chunks/engine-UPLVIV72-MSSFJLK4.js")).createEngine(u), true, wr);
|
|
723
723
|
var Do = H.createSsconvertCommand;
|
|
724
724
|
var To = H.createSsconvertCommands;
|
|
725
725
|
var Uo = H.ssconvertCommands;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
boundedCodec
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-CMJBRGU2.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-ETFJ4L7F.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-5AQAWIYK.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-5T7WL5CN.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-V7IP2PFT.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCodec,
|
|
3
3
|
loadRawCodecFactory
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-ETFJ4L7F.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-5AQAWIYK.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-5T7WL5CN.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-V7IP2PFT.js";
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
unchangedSource,
|
|
5
5
|
verifyOperandDestinations,
|
|
6
6
|
writeFileOperand
|
|
7
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
8
|
-
import "../safe-bash/command-chunks/chunk-
|
|
9
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
+
} from "../safe-bash/command-chunks/chunk-EV7A5FNN.js";
|
|
8
|
+
import "../safe-bash/command-chunks/chunk-7RQGRFHJ.js";
|
|
9
|
+
import "../safe-bash/command-chunks/chunk-4MVQE6CT.js";
|
|
10
10
|
import "../safe-bash/command-chunks/chunk-52DDLGBS.js";
|
|
11
|
-
import "../safe-bash/command-chunks/chunk-
|
|
12
|
-
import "../safe-bash/command-chunks/chunk-
|
|
11
|
+
import "../safe-bash/command-chunks/chunk-CMJBRGU2.js";
|
|
12
|
+
import "../safe-bash/command-chunks/chunk-ETFJ4L7F.js";
|
|
13
13
|
import "../safe-bash/command-chunks/chunk-5AQAWIYK.js";
|
|
14
14
|
import "../safe-bash/command-chunks/chunk-5T7WL5CN.js";
|
|
15
15
|
import "../safe-bash/command-chunks/chunk-LNWJHOR5.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DecodedBudget,
|
|
3
3
|
transform
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-7RQGRFHJ.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-4MVQE6CT.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-52DDLGBS.js";
|
|
7
7
|
import {
|
|
8
8
|
boundedCodec
|
|
9
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
10
|
-
import "../safe-bash/command-chunks/chunk-
|
|
9
|
+
} from "../safe-bash/command-chunks/chunk-CMJBRGU2.js";
|
|
10
|
+
import "../safe-bash/command-chunks/chunk-ETFJ4L7F.js";
|
|
11
11
|
import "../safe-bash/command-chunks/chunk-5AQAWIYK.js";
|
|
12
12
|
import "../safe-bash/command-chunks/chunk-5T7WL5CN.js";
|
|
13
13
|
import "../safe-bash/command-chunks/chunk-LNWJHOR5.js";
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
sourceBytes,
|
|
3
3
|
unchangedSource,
|
|
4
4
|
writeFileOperand
|
|
5
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
5
|
+
} from "../safe-bash/command-chunks/chunk-EV7A5FNN.js";
|
|
6
6
|
import {
|
|
7
7
|
transform
|
|
8
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
9
|
-
import "../safe-bash/command-chunks/chunk-
|
|
8
|
+
} from "../safe-bash/command-chunks/chunk-7RQGRFHJ.js";
|
|
9
|
+
import "../safe-bash/command-chunks/chunk-4MVQE6CT.js";
|
|
10
10
|
import "../safe-bash/command-chunks/chunk-52DDLGBS.js";
|
|
11
|
-
import "../safe-bash/command-chunks/chunk-
|
|
12
|
-
import "../safe-bash/command-chunks/chunk-
|
|
11
|
+
import "../safe-bash/command-chunks/chunk-CMJBRGU2.js";
|
|
12
|
+
import "../safe-bash/command-chunks/chunk-ETFJ4L7F.js";
|
|
13
13
|
import "../safe-bash/command-chunks/chunk-5AQAWIYK.js";
|
|
14
14
|
import "../safe-bash/command-chunks/chunk-5T7WL5CN.js";
|
|
15
15
|
import "../safe-bash/command-chunks/chunk-LNWJHOR5.js";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
chunkBytes,
|
|
4
4
|
stagingLimit,
|
|
5
5
|
transform
|
|
6
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
+
} from "../safe-bash/command-chunks/chunk-7RQGRFHJ.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-4MVQE6CT.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-52DDLGBS.js";
|
|
9
|
-
import "../safe-bash/command-chunks/chunk-
|
|
10
|
-
import "../safe-bash/command-chunks/chunk-
|
|
9
|
+
import "../safe-bash/command-chunks/chunk-CMJBRGU2.js";
|
|
10
|
+
import "../safe-bash/command-chunks/chunk-ETFJ4L7F.js";
|
|
11
11
|
import "../safe-bash/command-chunks/chunk-5AQAWIYK.js";
|
|
12
12
|
import "../safe-bash/command-chunks/chunk-5T7WL5CN.js";
|
|
13
13
|
import "../safe-bash/command-chunks/chunk-LNWJHOR5.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
zstdDecode
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-4MVQE6CT.js";
|
|
4
4
|
import "../safe-bash/command-chunks/chunk-52DDLGBS.js";
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-CMJBRGU2.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-ETFJ4L7F.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-5AQAWIYK.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-5T7WL5CN.js";
|
|
9
9
|
import "../safe-bash/command-chunks/chunk-LNWJHOR5.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PythonTextDecoder
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-AVSINNZ6.js";
|
|
4
4
|
import "../safe-bash/command-chunks/chunk-OLXMWQJ5.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-OOYVZAWL.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-ZERCTWUI.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class PythonUtf7EncodingError extends TypeError {
|
|
2
|
+
constructor();
|
|
3
|
+
}
|
|
4
|
+
/** File-oriented UTF-7 decoding. Completed units can be staged before the shift
|
|
5
|
+
* ends; callers must discard that staging if decoding or final UTF8 admission fails.
|
|
6
|
+
* Unlike Python's incremental codec, this never retains an entire shifted segment. */
|
|
7
|
+
export declare class PythonUtf7FileDecoder {
|
|
8
|
+
private shifted;
|
|
9
|
+
private haveSextet;
|
|
10
|
+
private bits;
|
|
11
|
+
private value;
|
|
12
|
+
private high;
|
|
13
|
+
private loneSurrogate;
|
|
14
|
+
private unit;
|
|
15
|
+
decode(bytes?: Uint8Array, options?: {
|
|
16
|
+
stream?: boolean;
|
|
17
|
+
}): string;
|
|
18
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PythonIso2022PendingError,
|
|
3
|
-
PythonTextDecoder
|
|
4
|
-
|
|
3
|
+
PythonTextDecoder,
|
|
4
|
+
PythonUtf7EncodingError
|
|
5
|
+
} from "../safe-bash/command-chunks/chunk-AVSINNZ6.js";
|
|
5
6
|
import "../safe-bash/command-chunks/chunk-OLXMWQJ5.js";
|
|
6
7
|
import {
|
|
7
8
|
PythonTextDecodeError
|
|
@@ -13,5 +14,6 @@ import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
|
|
|
13
14
|
export {
|
|
14
15
|
PythonIso2022PendingError,
|
|
15
16
|
PythonTextDecodeError,
|
|
16
|
-
PythonTextDecoder
|
|
17
|
+
PythonTextDecoder,
|
|
18
|
+
PythonUtf7EncodingError
|
|
17
19
|
};
|