@poe-platform/safe-bash 0.1.823 → 0.1.825
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/command-chunks/{chunk-LDR3PPM3.js → chunk-22QEL76N.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-BSLXS4PE.js → chunk-3DH5QBZC.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-KQE2D7PX.js → chunk-3HUCLYKJ.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-PLVFJ6FF.js → chunk-4EA7WI3L.js} +9 -1
- 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-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-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-5NC2IQMQ.js → chunk-EV7A5FNN.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-3UDJYSAF.js → chunk-IX3B4HCD.js} +34 -2
- 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-EO3RYGUZ.js → chunk-LFTGMUAV.js} +465 -121
- 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-NWA7ZJDV.js → chunk-NU64GWGN.js} +3 -3
- 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-TTPT3OME.js → chunk-PSNTCRL5.js} +4 -4
- 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-WDTWJFPK.js → chunk-RZOHZGEZ.js} +160 -85
- 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-ARA57PMC.js → chunk-V5PVNBOS.js} +4 -4
- 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-64HIOP7Q.js → chunk-WY6THI6J.js} +33 -353
- package/dist/safe-bash/command-chunks/{chunk-RGKHTSUY.js → chunk-XSZNL3GV.js} +1 -1
- 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-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/commands/llm/collections.browser.js +4 -2
- package/dist/safe-bash/commands/llm/collections.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-command-exiftool/index.js +41 -0
- package/dist/safe-bash-command-git/git_rust.wasm +0 -0
- package/dist/safe-bash-command-llm/collections.d.ts +2 -0
- package/dist/safe-bash-command-llm/collections.js +146 -22
- package/dist/safe-bash-command-llm/command.js +1 -1
- package/dist/safe-bash-command-llm/import-sql.d.ts +9 -0
- package/dist/safe-bash-command-llm/index.js +1 -1
- 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 +45 -3
- package/dist/safe-bash-command-python/build-dependencies.d.ts +2 -1
- package/dist/safe-bash-command-python/build-wheel.d.ts +11 -2
- package/dist/safe-bash-command-python/executor.d.ts +1 -1
- package/dist/safe-bash-command-python/executor.js +6 -5
- package/dist/safe-bash-command-python/index.js +6 -5
- package/dist/safe-bash-command-python/jspi.js +2 -2
- package/dist/safe-bash-command-python/manifest.d.ts +5 -1
- package/dist/safe-bash-command-python/provisioning.d.ts +8 -4
- 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 +4 -1
- 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 +1 -1
- 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-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-sqlite-engine/safe-fs.d.ts +6 -0
- package/dist/safe-bash-sqlite-engine/safe-fs.js +1 -1
- package/dist/safe-bash-sqlite-engine/sqlite-attachments.d.ts +5 -0
- package/dist/safe-bash-sqlite-engine/sqlite-input-snapshots.d.ts +20 -0
- package/dist/safe-bash-sqlite-engine/sqlite-query-records.d.ts +9 -0
- package/dist/safe-bash-sqlite-engine/sqlite-read-session.d.ts +3 -16
- package/dist/safe-bash-sqlite-engine/sqlite-session.d.ts +4 -0
- package/dist/safe-bash-sqlite-engine/sqlite-statement.d.ts +4 -0
- package/dist/safe-bash-sqlite-engine/storage.d.ts +2 -0
- package/dist/safe-bash-sqlite-engine/storage.js +324 -31
- package/dist/safe-bash-sqlite-engine/types.d.ts +1 -0
- package/package.json +12 -2
- 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
|
@@ -1,54 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
openPythonPackageFile
|
|
3
|
+
} from "./chunk-NXCJNPL3.js";
|
|
4
|
+
|
|
5
|
+
// packages/safe-bash-command-python/src/build-wheel.ts
|
|
6
|
+
import { FsError as FsError2 } from "../../safe-bash-contracts/index.js";
|
|
7
|
+
import { resolvePath as resolvePath2, basename } from "../../safe-bash-contracts/path.js";
|
|
8
|
+
|
|
1
9
|
// packages/safe-bash-command-python/src/package-download.ts
|
|
2
10
|
import { FsError } from "../../safe-bash-contracts/index.js";
|
|
3
11
|
import { resolvePath } from "../../safe-bash-contracts/path.js";
|
|
4
12
|
import { interruptible } from "../../safe-bash-contracts/runtime-control.js";
|
|
5
|
-
import { yieldTurn as yieldTurn2 } from "../../safe-bash-contracts/yield.js";
|
|
6
|
-
|
|
7
|
-
// packages/safe-bash-command-python/src/package-file.ts
|
|
8
13
|
import { yieldTurn } from "../../safe-bash-contracts/yield.js";
|
|
9
|
-
import { sha256 } from "@noble/hashes/sha2.js";
|
|
10
|
-
import { compareIdentity, compareFileVersion } from "@poe-platform/safe-fs/core";
|
|
11
|
-
async function openPythonPackageFile({ fs, signal }, path, maxBytes, expected) {
|
|
12
|
-
const settings = { signal };
|
|
13
|
-
const capabilities = await fs.capabilitiesFor?.(path, settings) ?? fs.capabilities;
|
|
14
|
-
if (!capabilities.retainedRead || !fs.openReadFile) return void 0;
|
|
15
|
-
const file = await fs.openReadFile(path, settings);
|
|
16
|
-
try {
|
|
17
|
-
signal.throwIfAborted();
|
|
18
|
-
const state = { ...await file.stat(settings) };
|
|
19
|
-
if (expected && (compareIdentity(expected, state) !== "same" || !compareFileVersion(expected, state))) throw new Error("Canonical Python wheel changed");
|
|
20
|
-
if (state.type !== "file" || !Number.isSafeInteger(state.size) || state.size < 0) throw new Error("Invalid canonical Python wheel");
|
|
21
|
-
if (state.size > maxBytes) throw new Error("Canonical package exceeds maxDownloadBytes");
|
|
22
|
-
const check = async () => {
|
|
23
|
-
signal.throwIfAborted();
|
|
24
|
-
const current = await file.stat(settings);
|
|
25
|
-
if (compareIdentity(state, current) !== "same" || !compareFileVersion(state, current)) throw new Error("Canonical Python wheel changed");
|
|
26
|
-
};
|
|
27
|
-
const read = async (offset, length) => {
|
|
28
|
-
await check();
|
|
29
|
-
const count = Math.min(length, Math.max(0, state.size - offset));
|
|
30
|
-
if (!count) return new Uint8Array(0);
|
|
31
|
-
const bytes = Uint8Array.from(await file.read(offset, count, settings));
|
|
32
|
-
if (!bytes.length || bytes.length > count) throw new Error("Invalid canonical package read");
|
|
33
|
-
await check();
|
|
34
|
-
return bytes;
|
|
35
|
-
};
|
|
36
|
-
const hash = sha256.create();
|
|
37
|
-
for (let offset = 0, pulls = 0; offset < state.size; ) {
|
|
38
|
-
if (++pulls % 16 === 0) await yieldTurn(signal);
|
|
39
|
-
const bytes = await read(offset, 65536);
|
|
40
|
-
hash.update(bytes);
|
|
41
|
-
offset += bytes.length;
|
|
42
|
-
}
|
|
43
|
-
await check();
|
|
44
|
-
return { key: Array.from(hash.digest(), (byte) => byte.toString(16).padStart(2, "0")).join(""), size: state.size, read, close: () => file.close() };
|
|
45
|
-
} catch (error) {
|
|
46
|
-
await file.close();
|
|
47
|
-
throw error;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// packages/safe-bash-command-python/src/package-download.ts
|
|
52
14
|
var serial = 0;
|
|
53
15
|
async function stagePythonPackage(context, directory, body, maxBytes, progress, verify, publish) {
|
|
54
16
|
const { fs, signal } = context, settings = { signal };
|
|
@@ -103,7 +65,7 @@ async function stagePythonPackage(context, directory, body, maxBytes, progress,
|
|
|
103
65
|
const chunk = Uint8Array.from(bytes.subarray(offset, offset + 65536));
|
|
104
66
|
await owner.writer.write(chunk, settings);
|
|
105
67
|
count += chunk.length;
|
|
106
|
-
await
|
|
68
|
+
await yieldTurn(signal);
|
|
107
69
|
}
|
|
108
70
|
if (bytes.length) progress(count);
|
|
109
71
|
}
|
|
@@ -145,9 +107,67 @@ async function stagePythonPackage(context, directory, body, maxBytes, progress,
|
|
|
145
107
|
}
|
|
146
108
|
}
|
|
147
109
|
|
|
110
|
+
// packages/safe-bash-command-python/src/build-wheel.ts
|
|
111
|
+
async function publishPythonBuildWheel(source, directory, maxBytes, context) {
|
|
112
|
+
const { fs, signal } = context, settings = { signal };
|
|
113
|
+
let artifact = typeof source === "string" ? void 0 : source.artifact;
|
|
114
|
+
let reading;
|
|
115
|
+
try {
|
|
116
|
+
signal.throwIfAborted();
|
|
117
|
+
if (maxBytes !== Infinity && (!Number.isSafeInteger(maxBytes) || maxBytes < 0)) throw new RangeError("Invalid Python wheel size limit");
|
|
118
|
+
const filename = typeof source === "string" ? basename(source) : source.filename;
|
|
119
|
+
if (basename(filename) !== filename || !filename.endsWith(".whl") || filename.includes("\\") || filename.includes("\0")) throw new TypeError("Invalid Python build wheel filename");
|
|
120
|
+
const root = await fs.realpath(resolvePath2(context.cwd, directory), settings);
|
|
121
|
+
const caps = await fs.capabilitiesFor?.(root, settings) ?? fs.capabilities;
|
|
122
|
+
if (!fs.confineExtraction || !fs.prepareDirectory || !caps.retainedStagingWrite || !caps.retainedStagingCleanup || !caps.retainedRead || !caps.atomicFileStaging) throw new Error("Python wheel publication requires confined retained atomic staging");
|
|
123
|
+
if (typeof source === "string") artifact = await openPythonPackageFile(context, resolvePath2(context.cwd, source), maxBytes);
|
|
124
|
+
if (!artifact) throw new Error("Python wheel publication requires retained source reads");
|
|
125
|
+
if (artifact.size > maxBytes) throw new Error("Canonical package exceeds maxDownloadBytes");
|
|
126
|
+
const retained = artifact;
|
|
127
|
+
const confined = await fs.confineExtraction([root], settings);
|
|
128
|
+
const destination = new Proxy(confined, { get(target, key) {
|
|
129
|
+
const owner = key === "openReadFile" ? fs : target, value = Reflect.get(owner, key);
|
|
130
|
+
return typeof value === "function" ? value.bind(owner) : value;
|
|
131
|
+
} });
|
|
132
|
+
const parent = await destination.stat(root, settings), path = resolvePath2(root, artifact.key);
|
|
133
|
+
try {
|
|
134
|
+
await destination.prepareDirectory(path, { parent, expected: null, mode: 448, signal });
|
|
135
|
+
} catch (error) {
|
|
136
|
+
if (!(error instanceof FsError2) || !["EEXIST", "EAGAIN"].includes(error.code)) throw error;
|
|
137
|
+
}
|
|
138
|
+
if ((await destination.lstat(path, settings)).type !== "directory") throw new Error("Python wheel publication directory changed");
|
|
139
|
+
const output = resolvePath2(path, filename);
|
|
140
|
+
const body = async function* () {
|
|
141
|
+
for (let offset = 0; offset < retained.size; ) {
|
|
142
|
+
const bytes = await (reading = Promise.resolve(retained.read(offset, Math.min(65536, retained.size - offset))));
|
|
143
|
+
if (!bytes.length || bytes.length > Math.min(65536, retained.size - offset)) throw new Error("Invalid Python wheel read");
|
|
144
|
+
offset += bytes.length;
|
|
145
|
+
yield bytes;
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
const published = await stagePythonPackage({ ...context, fs: destination }, path, body(), maxBytes, () => {
|
|
149
|
+
}, (key) => {
|
|
150
|
+
if (key !== retained.key) throw new Error("Built Python wheel integrity mismatch");
|
|
151
|
+
}, () => output);
|
|
152
|
+
if (!published) throw new Error("Python wheel publication requires retained atomic staging");
|
|
153
|
+
try {
|
|
154
|
+
return { url: "file://" + output.split("/").map(encodeURIComponent).join("/"), digest: published.key, size: published.size };
|
|
155
|
+
} finally {
|
|
156
|
+
await published.close();
|
|
157
|
+
}
|
|
158
|
+
} finally {
|
|
159
|
+
try {
|
|
160
|
+
await reading?.catch(() => {
|
|
161
|
+
});
|
|
162
|
+
} finally {
|
|
163
|
+
await artifact?.close?.();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
148
168
|
// packages/safe-bash-command-python/src/provisioning.ts
|
|
149
|
-
import { sha256
|
|
150
|
-
import { resolvePath as resolve, dirname } from "../../safe-bash-contracts/path.js";
|
|
169
|
+
import { sha256 } from "@noble/hashes/sha2.js";
|
|
170
|
+
import { resolvePath as resolve, dirname, basename as basename2 } from "../../safe-bash-contracts/path.js";
|
|
151
171
|
import { inheritYieldCheckpoint } from "../../safe-bash-contracts/yield.js";
|
|
152
172
|
|
|
153
173
|
// packages/safe-bash-command-python/src/manifest.ts
|
|
@@ -155,9 +175,9 @@ function readPackageManifest(value) {
|
|
|
155
175
|
const strings = (values) => Array.isArray(values) && values.every((item) => typeof item === "string");
|
|
156
176
|
if (Array.isArray(value)) return strings(value) ? value : void 0;
|
|
157
177
|
if (!value || typeof value !== "object") return;
|
|
158
|
-
const record = value;
|
|
159
|
-
if (![1, 2].includes(
|
|
160
|
-
if (
|
|
178
|
+
const record = value, version = record.version;
|
|
179
|
+
if (![1, 2, 3].includes(version) || Object.keys(value).length !== (version === 1 ? 2 : 3)) return;
|
|
180
|
+
if (version !== 1 && (!Array.isArray(record.records) || !record.records.every((row) => Array.isArray(row) && row.length === version + 3 && row.every((part, index) => index > 2 && index < 5 ? strings(part) : typeof part === "string" || index === 5 && part === null)))) return;
|
|
161
181
|
return strings(record.installed) ? record.installed : void 0;
|
|
162
182
|
}
|
|
163
183
|
var PythonPackageConflictError = class extends Error {
|
|
@@ -271,7 +291,7 @@ var pythonDocumentPackages = Object.freeze([
|
|
|
271
291
|
var encoder = new TextEncoder();
|
|
272
292
|
var decoder = new TextDecoder();
|
|
273
293
|
function digest(value) {
|
|
274
|
-
return Array.from(
|
|
294
|
+
return Array.from(sha256(value), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
275
295
|
}
|
|
276
296
|
function validDigest(value) {
|
|
277
297
|
if (typeof value !== "string" || value.length !== 64) return false;
|
|
@@ -307,8 +327,8 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
307
327
|
const value = options[name];
|
|
308
328
|
if (value !== void 0 && (!Number.isSafeInteger(value) || value < 1)) throw new RangeError(`${name} must be a positive integer`);
|
|
309
329
|
}
|
|
310
|
-
const cacheRecord = (key, headers) => {
|
|
311
|
-
const bytes = encoder.encode(JSON.stringify({ digest: key, headers }));
|
|
330
|
+
const cacheRecord = (key, headers, url) => {
|
|
331
|
+
const bytes = encoder.encode(JSON.stringify({ digest: key, headers, url }));
|
|
312
332
|
if (bytes.length > maxMetadataBytes) throw failure("Python package cache metadata exceeds maxMetadataBytes");
|
|
313
333
|
return bytes;
|
|
314
334
|
};
|
|
@@ -353,18 +373,20 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
353
373
|
const context = { ...input, signal };
|
|
354
374
|
signal.throwIfAborted();
|
|
355
375
|
const directory = options.cacheDirectory === void 0 ? void 0 : resolve(context.cwd, options.cacheDirectory, pythonPackageRuntimeKey);
|
|
356
|
-
const
|
|
376
|
+
const noCache = context.noCache ?? options.noCache ?? false;
|
|
377
|
+
const artifactDirectory = directory ?? (!options.cache && !noCache ? resolve(context.cwd, ".python-packages", "cache", pythonPackageRuntimeKey) : void 0);
|
|
378
|
+
const cache = options.cache ?? (artifactDirectory === void 0 ? defaultCache : {
|
|
357
379
|
async get(key) {
|
|
358
380
|
try {
|
|
359
|
-
return await context.fs.readFile(resolve(
|
|
381
|
+
return await context.fs.readFile(resolve(artifactDirectory, key), { signal });
|
|
360
382
|
} catch (error) {
|
|
361
383
|
if (missing(error)) return void 0;
|
|
362
384
|
throw error;
|
|
363
385
|
}
|
|
364
386
|
},
|
|
365
387
|
async set(key, bytes) {
|
|
366
|
-
await context.fs.mkdir(
|
|
367
|
-
await context.fs.writeFile(resolve(
|
|
388
|
+
await context.fs.mkdir(artifactDirectory, { recursive: true, signal });
|
|
389
|
+
await context.fs.writeFile(resolve(artifactDirectory, key), bytes, { signal });
|
|
368
390
|
}
|
|
369
391
|
});
|
|
370
392
|
const manifestCache = options.cacheDirectory === void 0 ? defaultCache : cache;
|
|
@@ -405,13 +427,15 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
405
427
|
throw failure(`Cannot read Python requirements ${path}: ${error instanceof Error ? error.message : String(error)}`);
|
|
406
428
|
}
|
|
407
429
|
for (const line of source.split("\n")) {
|
|
408
|
-
|
|
430
|
+
let comment = line.indexOf("#");
|
|
431
|
+
while (comment > 0 && line[comment - 1].trim()) comment = line.indexOf("#", comment + 1);
|
|
409
432
|
const text = (comment < 0 ? line : line.slice(0, comment)).trim();
|
|
410
433
|
if (!text) continue;
|
|
411
|
-
if (text.endsWith("\\")
|
|
412
|
-
requirements.push(normalizeRequirement(text, dirname(path)));
|
|
434
|
+
if (text.endsWith("\\")) throw failure(`Unsupported requirements continuation in ${path}: ${text}`);
|
|
435
|
+
requirements.push(text[0] === "-" && options.prepareRequirements ? text : normalizeRequirement(text, dirname(path)));
|
|
413
436
|
}
|
|
414
437
|
}
|
|
438
|
+
if ((options.editable?.length || context.editable?.length) && !options.prepareRequirements) throw failure("Editable packages require a source package environment");
|
|
415
439
|
const requested = [...new Set(await options.prepareRequirements?.(requirements, context) ?? requirements)];
|
|
416
440
|
signal.throwIfAborted();
|
|
417
441
|
const session = String(++counter);
|
|
@@ -424,7 +448,7 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
424
448
|
}
|
|
425
449
|
};
|
|
426
450
|
const offline = context.offline ?? options.offline ?? false;
|
|
427
|
-
sessions.set(session, { ...context, cacheDirectory: directory,
|
|
451
|
+
sessions.set(session, { ...context, cacheDirectory: directory, artifactDirectory, noCache, cache, manifestCache, manifestRevision, controller: invocation, offline, requirements: unique, opening: false, retained: /* @__PURE__ */ new Map(), closed: false, manifest, aborted });
|
|
428
452
|
signal.addEventListener("abort", aborted, { once: true });
|
|
429
453
|
const controls = {};
|
|
430
454
|
for (const key of ["pre", "upgrade", "forceReinstall"]) if (context[key] ?? options[key]) controls[key] = true;
|
|
@@ -474,42 +498,85 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
474
498
|
return Array.from(bytes);
|
|
475
499
|
}
|
|
476
500
|
if (op === "package-retain") {
|
|
477
|
-
|
|
501
|
+
let artifact = session.opened;
|
|
478
502
|
if (!artifact || artifact.key !== String(args[1])) throw failure("Invalid package retention request");
|
|
503
|
+
if (artifact.url && artifact.close) {
|
|
504
|
+
const source = artifact;
|
|
505
|
+
const retaining = (async () => {
|
|
506
|
+
const path = decodeURIComponent(new URL(source.url).pathname);
|
|
507
|
+
const directory = resolve(session.cacheDirectory ?? resolve(session.cwd, ".python-packages"), "installed");
|
|
508
|
+
const capabilities = await session.fs.capabilitiesFor?.(directory, { signal: session.signal }) ?? session.fs.capabilities;
|
|
509
|
+
if (!session.fs.confineExtraction || !session.fs.prepareDirectory || !capabilities.retainedStagingWrite || !capabilities.retainedStagingCleanup || !capabilities.retainedRead || !capabilities.atomicFileStaging) return;
|
|
510
|
+
const target = resolve(directory, source.key, basename2(path));
|
|
511
|
+
if (path !== target) {
|
|
512
|
+
await session.fs.mkdir(directory, { recursive: true, signal: session.signal });
|
|
513
|
+
checkSession(session);
|
|
514
|
+
session.opened = void 0;
|
|
515
|
+
const published = await publishPythonBuildWheel({ filename: basename2(path), artifact: source }, directory, maxBytes, session);
|
|
516
|
+
artifact = await openPythonPackageFile(session, decodeURIComponent(new URL(published.url).pathname), maxBytes);
|
|
517
|
+
if (!artifact) throw failure("Installed Python wheels require retained reads");
|
|
518
|
+
if (artifact.key !== published.digest) {
|
|
519
|
+
await artifact.close?.();
|
|
520
|
+
throw failure("Installed Python wheel changed");
|
|
521
|
+
}
|
|
522
|
+
session.opened = artifact;
|
|
523
|
+
artifact.url = published.url;
|
|
524
|
+
try {
|
|
525
|
+
checkSession(session);
|
|
526
|
+
} catch (error) {
|
|
527
|
+
await release(session);
|
|
528
|
+
throw error;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
const durable = new URL(artifact.url);
|
|
532
|
+
durable.hash = "sha256=" + artifact.key;
|
|
533
|
+
artifact.url = durable.href;
|
|
534
|
+
})();
|
|
535
|
+
session.retaining = retaining;
|
|
536
|
+
try {
|
|
537
|
+
await retaining;
|
|
538
|
+
} finally {
|
|
539
|
+
session.retaining = void 0;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
checkSession(session);
|
|
543
|
+
if (!artifact) throw failure("Installed Python wheel unavailable");
|
|
479
544
|
const token = String(++counter);
|
|
480
545
|
session.retained.set(token, artifact);
|
|
481
546
|
session.opened = void 0;
|
|
482
|
-
return { token, key: artifact.key, size: artifact.size };
|
|
547
|
+
return { token, key: artifact.key, size: artifact.size, ...artifact.url ? { url: artifact.url } : {} };
|
|
483
548
|
}
|
|
484
549
|
if (op === "package-close") {
|
|
485
550
|
if (session.opened?.key === String(args[1])) await release(session);
|
|
486
551
|
return null;
|
|
487
552
|
}
|
|
488
553
|
if (op !== "package-open" || typeof args[1] !== "string") throw failure("Invalid package operation");
|
|
489
|
-
if (session.opening) throw failure("Package download already in progress");
|
|
554
|
+
if (session.opening || session.retaining) throw failure("Package download already in progress");
|
|
490
555
|
session.opening = true;
|
|
491
556
|
try {
|
|
492
557
|
await release(session);
|
|
493
558
|
checkSession(session);
|
|
494
|
-
const url = args[1];
|
|
559
|
+
const url = args[1], { artifactDirectory: cacheDirectory, noCache } = session;
|
|
495
560
|
const expected = args[2];
|
|
561
|
+
let responseUrl = url;
|
|
496
562
|
const verifyIntegrity = (key2) => {
|
|
497
563
|
if (expected && key2 !== expected) throw failure(`Package integrity mismatch: ${url}`);
|
|
498
564
|
};
|
|
499
565
|
if (expected !== void 0 && expected !== null && !validDigest(expected)) throw failure("Invalid SHA-256 package integrity value");
|
|
500
566
|
const address = pythonPackageRuntimeKey + "-url-" + digest(encoder.encode(url));
|
|
501
567
|
const canonicalWheel = url.startsWith("file:") || url.startsWith("emfs:");
|
|
502
|
-
const metadata = canonicalWheel ||
|
|
568
|
+
const metadata = canonicalWheel || noCache || args[3] === "metadata" && !session.offline ? void 0 : await session.cache.get(address);
|
|
503
569
|
checkSession(session);
|
|
504
570
|
let key = "", bytes;
|
|
505
571
|
let headers = [];
|
|
506
572
|
const adopt = async (artifact, ready) => {
|
|
507
573
|
session.opened = artifact;
|
|
574
|
+
if (canonicalWheel) artifact.url = url;
|
|
508
575
|
try {
|
|
509
576
|
checkSession(session);
|
|
510
577
|
await ready();
|
|
511
578
|
checkSession(session);
|
|
512
|
-
return { key: artifact.key, size: artifact.size, headers };
|
|
579
|
+
return { key: artifact.key, size: artifact.size, headers, url: responseUrl };
|
|
513
580
|
} catch (error) {
|
|
514
581
|
await release(session);
|
|
515
582
|
throw error;
|
|
@@ -522,13 +589,14 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
522
589
|
record = JSON.parse(decoder.decode(metadata));
|
|
523
590
|
} catch {
|
|
524
591
|
}
|
|
525
|
-
if (typeof record !== "object" || record === null || !validDigest(record.digest) || !Array.isArray(record.headers) || record.headers.some((pair) => !Array.isArray(pair) || pair.length !== 2 || pair.some((value2) => typeof value2 !== "string"))) throw failure(`Invalid package cache metadata: ${url}`);
|
|
592
|
+
if (typeof record !== "object" || record === null || !validDigest(record.digest) || record.url !== void 0 && typeof record.url !== "string" || !Array.isArray(record.headers) || record.headers.some((pair) => !Array.isArray(pair) || pair.length !== 2 || pair.some((value2) => typeof value2 !== "string"))) throw failure(`Invalid package cache metadata: ${url}`);
|
|
526
593
|
headers = record.headers;
|
|
594
|
+
responseUrl = record.url ?? url;
|
|
527
595
|
let absent = false;
|
|
528
|
-
if (
|
|
596
|
+
if (cacheDirectory) {
|
|
529
597
|
let artifact;
|
|
530
598
|
try {
|
|
531
|
-
artifact = await openPythonPackageFile(session, resolve(
|
|
599
|
+
artifact = await openPythonPackageFile(session, resolve(cacheDirectory, pythonPackageRuntimeKey + "-sha256-" + record.digest), maxBytes);
|
|
532
600
|
} catch (error) {
|
|
533
601
|
if (!missing(error)) throw error;
|
|
534
602
|
absent = true;
|
|
@@ -591,14 +659,15 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
591
659
|
}
|
|
592
660
|
if (response.status < 200 || response.status >= 300) throw failure(`Package download failed: HTTP ${response.status} ${current.href}`);
|
|
593
661
|
headers = response.headers;
|
|
662
|
+
responseUrl = current.href;
|
|
594
663
|
const encoding = headers.find(([key2]) => key2.toLowerCase() === "content-encoding")?.[1].trim().toLowerCase();
|
|
595
664
|
const length = headers.find(([key2]) => key2.toLowerCase() === "content-length")?.[1];
|
|
596
665
|
const total = length === void 0 || encoding !== void 0 && encoding !== "identity" ? void 0 : Number(length);
|
|
597
666
|
if (total !== void 0 && Number.isFinite(total) && total > maxBytes) throw failure("Package download exceeds maxDownloadBytes");
|
|
598
667
|
const progress = (count2) => options.onProgress?.({ phase: "download", url, bytes: count2, ...typeof total === "number" && Number.isSafeInteger(total) ? { totalBytes: total } : {} });
|
|
599
|
-
if (
|
|
600
|
-
const directory =
|
|
601
|
-
if (
|
|
668
|
+
if (cacheDirectory || noCache) {
|
|
669
|
+
const directory = cacheDirectory ?? session.cwd;
|
|
670
|
+
if (cacheDirectory) await session.fs.mkdir(directory, { recursive: true, signal: session.signal });
|
|
602
671
|
let metadataBytes;
|
|
603
672
|
const artifact = await stagePythonPackage(
|
|
604
673
|
session,
|
|
@@ -608,13 +677,13 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
608
677
|
progress,
|
|
609
678
|
(key2) => {
|
|
610
679
|
verifyIntegrity(key2);
|
|
611
|
-
if (!
|
|
680
|
+
if (!noCache) metadataBytes = cacheRecord(key2, headers, responseUrl);
|
|
612
681
|
},
|
|
613
|
-
|
|
682
|
+
noCache ? void 0 : (key2) => resolve(directory, pythonPackageRuntimeKey + "-sha256-" + key2)
|
|
614
683
|
);
|
|
615
684
|
if (artifact) {
|
|
616
685
|
return await adopt(artifact, async () => {
|
|
617
|
-
if (!
|
|
686
|
+
if (!noCache) await session.cache.set(address, metadataBytes);
|
|
618
687
|
});
|
|
619
688
|
}
|
|
620
689
|
}
|
|
@@ -642,8 +711,8 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
642
711
|
}
|
|
643
712
|
checkSession(session);
|
|
644
713
|
verifyIntegrity(key = digest(bytes));
|
|
645
|
-
if (!
|
|
646
|
-
const metadataBytes = cacheRecord(key, headers);
|
|
714
|
+
if (!noCache) {
|
|
715
|
+
const metadataBytes = cacheRecord(key, headers, responseUrl);
|
|
647
716
|
await session.cache.set(pythonPackageRuntimeKey + "-sha256-" + key, Uint8Array.from(bytes));
|
|
648
717
|
checkSession(session);
|
|
649
718
|
if (!canonicalWheel) await session.cache.set(address, metadataBytes);
|
|
@@ -652,8 +721,8 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
652
721
|
checkSession(session);
|
|
653
722
|
verifyIntegrity(key);
|
|
654
723
|
const value = bytes;
|
|
655
|
-
session.opened = { key, size: bytes.length, read: (offset, length) => value.subarray(offset, offset + length) };
|
|
656
|
-
return { key, size: bytes.length, headers };
|
|
724
|
+
session.opened = { key, size: bytes.length, ...canonicalWheel ? { url } : {}, read: (offset, length) => value.subarray(offset, offset + length) };
|
|
725
|
+
return { key, size: bytes.length, headers, url: responseUrl };
|
|
657
726
|
} finally {
|
|
658
727
|
session.opening = false;
|
|
659
728
|
}
|
|
@@ -668,7 +737,14 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
668
737
|
session.signal.removeEventListener("abort", session.aborted);
|
|
669
738
|
session.controller.abort(failure("Python package session is closed"));
|
|
670
739
|
sessions.delete(start.session);
|
|
671
|
-
|
|
740
|
+
const retired = release(session, true);
|
|
741
|
+
return Promise.allSettled([session.retaining, retired]).then(async () => {
|
|
742
|
+
try {
|
|
743
|
+
await retired;
|
|
744
|
+
} finally {
|
|
745
|
+
await release(session, true);
|
|
746
|
+
}
|
|
747
|
+
});
|
|
672
748
|
}
|
|
673
749
|
},
|
|
674
750
|
dispose() {
|
|
@@ -687,8 +763,7 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
687
763
|
}
|
|
688
764
|
|
|
689
765
|
export {
|
|
690
|
-
|
|
691
|
-
stagePythonPackage,
|
|
766
|
+
publishPythonBuildWheel,
|
|
692
767
|
PythonPackageConflictError,
|
|
693
768
|
createPythonPackageManifestStore,
|
|
694
769
|
createPythonPackageCache,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
validateXmlPartReplacement,
|
|
3
3
|
validateXmlViewReplacement
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MW3L6JB7.js";
|
|
5
5
|
import {
|
|
6
6
|
createPresentation
|
|
7
7
|
} from "./chunk-2GUI3ZKE.js";
|
|
@@ -11,42 +11,42 @@ import {
|
|
|
11
11
|
indexed,
|
|
12
12
|
preservePlaceholder,
|
|
13
13
|
reparentInsertedAsset
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-63WEGFLL.js";
|
|
15
15
|
import {
|
|
16
16
|
Chart,
|
|
17
17
|
insertChartIntoState,
|
|
18
18
|
inspectWorkbook,
|
|
19
19
|
replaceChartData
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-APUXNXXQ.js";
|
|
21
21
|
import {
|
|
22
22
|
createLiveLinkSession,
|
|
23
23
|
isOrdinaryLinkUrl
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-MHZ7UTRX.js";
|
|
25
25
|
import {
|
|
26
26
|
addOleObject
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-QC2RWSYM.js";
|
|
28
28
|
import {
|
|
29
29
|
applyPresentationCanvasSettings
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-VGHRMAI4.js";
|
|
31
31
|
import {
|
|
32
32
|
prepareSlideInsertion
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-DEEZYCOQ.js";
|
|
34
34
|
import {
|
|
35
35
|
Image
|
|
36
36
|
} from "./chunk-ZXIOTUXC.js";
|
|
37
37
|
import {
|
|
38
38
|
addMedia
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-7NF44M2V.js";
|
|
40
40
|
import {
|
|
41
41
|
addImage
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-RB7XAYO2.js";
|
|
43
43
|
import {
|
|
44
44
|
CoreProperties,
|
|
45
45
|
createPropertyPart
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-AA254KE5.js";
|
|
47
47
|
import {
|
|
48
48
|
readShape
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-UQTU7H6T.js";
|
|
50
50
|
import {
|
|
51
51
|
createXmlElementView
|
|
52
52
|
} from "./chunk-RKON2TGI.js";
|
|
@@ -60,26 +60,26 @@ import {
|
|
|
60
60
|
loadShared,
|
|
61
61
|
relPart,
|
|
62
62
|
required
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-C23L4HZB.js";
|
|
64
64
|
import {
|
|
65
65
|
writePackageArchive
|
|
66
66
|
} from "./chunk-5KWEZV5H.js";
|
|
67
67
|
import {
|
|
68
68
|
buildSelectionIndex
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-I2OKE2NI.js";
|
|
70
70
|
import {
|
|
71
71
|
readPackage
|
|
72
72
|
} from "./chunk-KVTZJBLM.js";
|
|
73
73
|
import {
|
|
74
74
|
parseXmlPart
|
|
75
75
|
} from "./chunk-YWP62BAZ.js";
|
|
76
|
+
import {
|
|
77
|
+
parseContentTypes
|
|
78
|
+
} from "./chunk-6ZHNKHQQ.js";
|
|
76
79
|
import {
|
|
77
80
|
parseRelationships,
|
|
78
81
|
readRelationshipGraph
|
|
79
82
|
} from "./chunk-QMXOKYMJ.js";
|
|
80
|
-
import {
|
|
81
|
-
parseContentTypes
|
|
82
|
-
} from "./chunk-6ZHNKHQQ.js";
|
|
83
83
|
import {
|
|
84
84
|
packageUri,
|
|
85
85
|
partName,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readTextBodies,
|
|
3
3
|
validateTextReadingOptions
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-P6YTNXRV.js";
|
|
5
5
|
import {
|
|
6
6
|
loadShared
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-C23L4HZB.js";
|
|
8
8
|
import {
|
|
9
9
|
SelectionError,
|
|
10
10
|
readSelectionIndex
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-I2OKE2NI.js";
|
|
12
12
|
import {
|
|
13
13
|
readPackage
|
|
14
14
|
} from "./chunk-KVTZJBLM.js";
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readPlaywrightStorageState,
|
|
3
|
+
replacePlaywrightStorageState
|
|
4
|
+
} from "./chunk-SRXARACJ.js";
|
|
5
|
+
import {
|
|
6
|
+
parsePlaywrightStorageStateJson
|
|
7
|
+
} from "./chunk-YMZQFL3O.js";
|
|
1
8
|
import {
|
|
2
9
|
capabilityArtifact,
|
|
3
10
|
capabilityResult,
|
|
@@ -6,13 +13,6 @@ import {
|
|
|
6
13
|
requireSession,
|
|
7
14
|
unsupported
|
|
8
15
|
} from "./chunk-MI4J3AIL.js";
|
|
9
|
-
import {
|
|
10
|
-
readPlaywrightStorageState,
|
|
11
|
-
replacePlaywrightStorageState
|
|
12
|
-
} from "./chunk-3TP4SSPS.js";
|
|
13
|
-
import {
|
|
14
|
-
parsePlaywrightStorageStateJson
|
|
15
|
-
} from "./chunk-YMZQFL3O.js";
|
|
16
16
|
import {
|
|
17
17
|
PlaywrightResourceLimitError
|
|
18
18
|
} from "./chunk-I6ICC6AG.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sanitizeProperties
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AA254KE5.js";
|
|
4
4
|
import {
|
|
5
5
|
attr,
|
|
6
6
|
invalid,
|
|
7
7
|
loadShared,
|
|
8
8
|
relPart
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-C23L4HZB.js";
|
|
10
10
|
import {
|
|
11
11
|
readPackage
|
|
12
12
|
} from "./chunk-KVTZJBLM.js";
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
MSO_AUTO_SHAPE_TYPE,
|
|
3
3
|
shapePresets
|
|
4
4
|
} from "./chunk-RC4TNFNF.js";
|
|
5
|
+
import {
|
|
6
|
+
MSO_LANGUAGE_ID
|
|
7
|
+
} from "./chunk-ZZKJPLIH.js";
|
|
5
8
|
import {
|
|
6
9
|
createXmlElementView
|
|
7
10
|
} from "./chunk-RKON2TGI.js";
|
|
8
|
-
import {
|
|
9
|
-
MSO_LANGUAGE_ID
|
|
10
|
-
} from "./chunk-LBBJ5S3W.js";
|
|
11
11
|
import {
|
|
12
12
|
readRunFormatting,
|
|
13
13
|
runPropertiesMerge,
|
|
14
14
|
textUnderlineStyles,
|
|
15
15
|
validateTextRunOptions
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WNVBS4GV.js";
|
|
17
17
|
import {
|
|
18
18
|
bestFitText
|
|
19
19
|
} from "./chunk-RESJSUHH.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
applyDrawingUpdate,
|
|
23
23
|
readDrawingColor,
|
|
24
24
|
readDrawingFormat
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-CEKBIZGU.js";
|
|
26
26
|
import {
|
|
27
27
|
ColorFormat,
|
|
28
28
|
MSO_COLOR_TYPE,
|
|
@@ -33,11 +33,11 @@ import {
|
|
|
33
33
|
defineEnum,
|
|
34
34
|
defineXmlEnum,
|
|
35
35
|
readRunColor
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-PAS4YSNN.js";
|
|
37
37
|
import {
|
|
38
38
|
readTextBodies,
|
|
39
39
|
validateTextReadingOptions
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-P6YTNXRV.js";
|
|
41
41
|
import {
|
|
42
42
|
readXmlCoordinate,
|
|
43
43
|
readXmlInteger
|
|
@@ -50,10 +50,10 @@ import {
|
|
|
50
50
|
attr,
|
|
51
51
|
child,
|
|
52
52
|
loadShared
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-C23L4HZB.js";
|
|
54
54
|
import {
|
|
55
55
|
SelectionError
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-I2OKE2NI.js";
|
|
57
57
|
import {
|
|
58
58
|
protectedEquationNodes
|
|
59
59
|
} from "./chunk-PNOXBL2B.js";
|