@poe-platform/safe-bash 0.1.823 → 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/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-64HIOP7Q.js → chunk-3EBQOZET.js} +33 -353
- 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-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-WDTWJFPK.js → chunk-IKBTII7C.js} +35 -73
- 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-EO3RYGUZ.js → chunk-NNGWTDVJ.js} +476 -75
- package/dist/safe-bash/command-chunks/{chunk-NWA7ZJDV.js → chunk-NU64GWGN.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-RGKHTSUY.js → chunk-NW3S6T6R.js} +1 -1
- 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-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-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/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-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/executor.d.ts +1 -1
- package/dist/safe-bash-command-python/executor.js +5 -4
- package/dist/safe-bash-command-python/index.js +5 -4
- 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 +7 -3
- 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/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
|
@@ -3,20 +3,20 @@ import {
|
|
|
3
3
|
} from "./chunk-ZS4J5B6Y.js";
|
|
4
4
|
import {
|
|
5
5
|
readTable
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-565AAQTV.js";
|
|
7
7
|
import {
|
|
8
8
|
nodeFor
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YODHIRPW.js";
|
|
10
10
|
import {
|
|
11
11
|
readTextBodies
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-P6YTNXRV.js";
|
|
13
13
|
import {
|
|
14
14
|
child,
|
|
15
15
|
escape,
|
|
16
16
|
loadShared,
|
|
17
17
|
nextRel,
|
|
18
18
|
relPart
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-C23L4HZB.js";
|
|
20
20
|
import {
|
|
21
21
|
protectedEquationNodes
|
|
22
22
|
} from "./chunk-PNOXBL2B.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Presentation
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S2T7DDGY.js";
|
|
4
4
|
import {
|
|
5
5
|
SlidePlaceholder
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-63WEGFLL.js";
|
|
7
7
|
import {
|
|
8
8
|
chartTypes,
|
|
9
9
|
validateChartData
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-APUXNXXQ.js";
|
|
11
11
|
import {
|
|
12
12
|
admitImage
|
|
13
13
|
} from "./chunk-ZS4J5B6Y.js";
|
|
14
14
|
import {
|
|
15
15
|
readSelectionIndex
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-I2OKE2NI.js";
|
|
17
17
|
import {
|
|
18
18
|
readBinary
|
|
19
19
|
} from "./chunk-S5MBHFLB.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openRetainedPresentationIndex
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S3QYSI5E.js";
|
|
4
4
|
import {
|
|
5
5
|
stageRetainedOutput,
|
|
6
6
|
streamJson
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
loadShared,
|
|
14
14
|
nextRel,
|
|
15
15
|
relPart
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-C23L4HZB.js";
|
|
17
17
|
import {
|
|
18
18
|
SelectionError,
|
|
19
19
|
decodeSelectionToken
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-I2OKE2NI.js";
|
|
21
21
|
import {
|
|
22
22
|
openRetainedPresentationValidation
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ATUZ7J3B.js";
|
|
24
24
|
import {
|
|
25
25
|
dialects
|
|
26
26
|
} from "./chunk-P3LHQOX7.js";
|
|
@@ -1,54 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
openPythonPackageFile
|
|
3
|
+
} from "./chunk-NXCJNPL3.js";
|
|
4
|
+
|
|
1
5
|
// packages/safe-bash-command-python/src/package-download.ts
|
|
2
6
|
import { FsError } from "../../safe-bash-contracts/index.js";
|
|
3
7
|
import { resolvePath } from "../../safe-bash-contracts/path.js";
|
|
4
8
|
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
9
|
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
10
|
var serial = 0;
|
|
53
11
|
async function stagePythonPackage(context, directory, body, maxBytes, progress, verify, publish) {
|
|
54
12
|
const { fs, signal } = context, settings = { signal };
|
|
@@ -103,7 +61,7 @@ async function stagePythonPackage(context, directory, body, maxBytes, progress,
|
|
|
103
61
|
const chunk = Uint8Array.from(bytes.subarray(offset, offset + 65536));
|
|
104
62
|
await owner.writer.write(chunk, settings);
|
|
105
63
|
count += chunk.length;
|
|
106
|
-
await
|
|
64
|
+
await yieldTurn(signal);
|
|
107
65
|
}
|
|
108
66
|
if (bytes.length) progress(count);
|
|
109
67
|
}
|
|
@@ -146,7 +104,7 @@ async function stagePythonPackage(context, directory, body, maxBytes, progress,
|
|
|
146
104
|
}
|
|
147
105
|
|
|
148
106
|
// packages/safe-bash-command-python/src/provisioning.ts
|
|
149
|
-
import { sha256
|
|
107
|
+
import { sha256 } from "@noble/hashes/sha2.js";
|
|
150
108
|
import { resolvePath as resolve, dirname } from "../../safe-bash-contracts/path.js";
|
|
151
109
|
import { inheritYieldCheckpoint } from "../../safe-bash-contracts/yield.js";
|
|
152
110
|
|
|
@@ -155,9 +113,9 @@ function readPackageManifest(value) {
|
|
|
155
113
|
const strings = (values) => Array.isArray(values) && values.every((item) => typeof item === "string");
|
|
156
114
|
if (Array.isArray(value)) return strings(value) ? value : void 0;
|
|
157
115
|
if (!value || typeof value !== "object") return;
|
|
158
|
-
const record = value;
|
|
159
|
-
if (![1, 2].includes(
|
|
160
|
-
if (
|
|
116
|
+
const record = value, version = record.version;
|
|
117
|
+
if (![1, 2, 3].includes(version) || Object.keys(value).length !== (version === 1 ? 2 : 3)) return;
|
|
118
|
+
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
119
|
return strings(record.installed) ? record.installed : void 0;
|
|
162
120
|
}
|
|
163
121
|
var PythonPackageConflictError = class extends Error {
|
|
@@ -271,7 +229,7 @@ var pythonDocumentPackages = Object.freeze([
|
|
|
271
229
|
var encoder = new TextEncoder();
|
|
272
230
|
var decoder = new TextDecoder();
|
|
273
231
|
function digest(value) {
|
|
274
|
-
return Array.from(
|
|
232
|
+
return Array.from(sha256(value), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
275
233
|
}
|
|
276
234
|
function validDigest(value) {
|
|
277
235
|
if (typeof value !== "string" || value.length !== 64) return false;
|
|
@@ -307,8 +265,8 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
307
265
|
const value = options[name];
|
|
308
266
|
if (value !== void 0 && (!Number.isSafeInteger(value) || value < 1)) throw new RangeError(`${name} must be a positive integer`);
|
|
309
267
|
}
|
|
310
|
-
const cacheRecord = (key, headers) => {
|
|
311
|
-
const bytes = encoder.encode(JSON.stringify({ digest: key, headers }));
|
|
268
|
+
const cacheRecord = (key, headers, url) => {
|
|
269
|
+
const bytes = encoder.encode(JSON.stringify({ digest: key, headers, url }));
|
|
312
270
|
if (bytes.length > maxMetadataBytes) throw failure("Python package cache metadata exceeds maxMetadataBytes");
|
|
313
271
|
return bytes;
|
|
314
272
|
};
|
|
@@ -405,13 +363,15 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
405
363
|
throw failure(`Cannot read Python requirements ${path}: ${error instanceof Error ? error.message : String(error)}`);
|
|
406
364
|
}
|
|
407
365
|
for (const line of source.split("\n")) {
|
|
408
|
-
|
|
366
|
+
let comment = line.indexOf("#");
|
|
367
|
+
while (comment > 0 && line[comment - 1].trim()) comment = line.indexOf("#", comment + 1);
|
|
409
368
|
const text = (comment < 0 ? line : line.slice(0, comment)).trim();
|
|
410
369
|
if (!text) continue;
|
|
411
|
-
if (text.endsWith("\\")
|
|
412
|
-
requirements.push(normalizeRequirement(text, dirname(path)));
|
|
370
|
+
if (text.endsWith("\\")) throw failure(`Unsupported requirements continuation in ${path}: ${text}`);
|
|
371
|
+
requirements.push(text[0] === "-" && options.prepareRequirements ? text : normalizeRequirement(text, dirname(path)));
|
|
413
372
|
}
|
|
414
373
|
}
|
|
374
|
+
if ((options.editable?.length || context.editable?.length) && !options.prepareRequirements) throw failure("Editable packages require a source package environment");
|
|
415
375
|
const requested = [...new Set(await options.prepareRequirements?.(requirements, context) ?? requirements)];
|
|
416
376
|
signal.throwIfAborted();
|
|
417
377
|
const session = String(++counter);
|
|
@@ -491,15 +451,16 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
491
451
|
try {
|
|
492
452
|
await release(session);
|
|
493
453
|
checkSession(session);
|
|
494
|
-
const url = args[1];
|
|
454
|
+
const url = args[1], { cacheDirectory, noCache } = session;
|
|
495
455
|
const expected = args[2];
|
|
456
|
+
let responseUrl = url;
|
|
496
457
|
const verifyIntegrity = (key2) => {
|
|
497
458
|
if (expected && key2 !== expected) throw failure(`Package integrity mismatch: ${url}`);
|
|
498
459
|
};
|
|
499
460
|
if (expected !== void 0 && expected !== null && !validDigest(expected)) throw failure("Invalid SHA-256 package integrity value");
|
|
500
461
|
const address = pythonPackageRuntimeKey + "-url-" + digest(encoder.encode(url));
|
|
501
462
|
const canonicalWheel = url.startsWith("file:") || url.startsWith("emfs:");
|
|
502
|
-
const metadata = canonicalWheel ||
|
|
463
|
+
const metadata = canonicalWheel || noCache || args[3] === "metadata" && !session.offline ? void 0 : await session.cache.get(address);
|
|
503
464
|
checkSession(session);
|
|
504
465
|
let key = "", bytes;
|
|
505
466
|
let headers = [];
|
|
@@ -509,7 +470,7 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
509
470
|
checkSession(session);
|
|
510
471
|
await ready();
|
|
511
472
|
checkSession(session);
|
|
512
|
-
return { key: artifact.key, size: artifact.size, headers };
|
|
473
|
+
return { key: artifact.key, size: artifact.size, headers, url: responseUrl };
|
|
513
474
|
} catch (error) {
|
|
514
475
|
await release(session);
|
|
515
476
|
throw error;
|
|
@@ -522,13 +483,14 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
522
483
|
record = JSON.parse(decoder.decode(metadata));
|
|
523
484
|
} catch {
|
|
524
485
|
}
|
|
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}`);
|
|
486
|
+
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
487
|
headers = record.headers;
|
|
488
|
+
responseUrl = record.url ?? url;
|
|
527
489
|
let absent = false;
|
|
528
|
-
if (
|
|
490
|
+
if (cacheDirectory) {
|
|
529
491
|
let artifact;
|
|
530
492
|
try {
|
|
531
|
-
artifact = await openPythonPackageFile(session, resolve(
|
|
493
|
+
artifact = await openPythonPackageFile(session, resolve(cacheDirectory, pythonPackageRuntimeKey + "-sha256-" + record.digest), maxBytes);
|
|
532
494
|
} catch (error) {
|
|
533
495
|
if (!missing(error)) throw error;
|
|
534
496
|
absent = true;
|
|
@@ -591,14 +553,15 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
591
553
|
}
|
|
592
554
|
if (response.status < 200 || response.status >= 300) throw failure(`Package download failed: HTTP ${response.status} ${current.href}`);
|
|
593
555
|
headers = response.headers;
|
|
556
|
+
responseUrl = current.href;
|
|
594
557
|
const encoding = headers.find(([key2]) => key2.toLowerCase() === "content-encoding")?.[1].trim().toLowerCase();
|
|
595
558
|
const length = headers.find(([key2]) => key2.toLowerCase() === "content-length")?.[1];
|
|
596
559
|
const total = length === void 0 || encoding !== void 0 && encoding !== "identity" ? void 0 : Number(length);
|
|
597
560
|
if (total !== void 0 && Number.isFinite(total) && total > maxBytes) throw failure("Package download exceeds maxDownloadBytes");
|
|
598
561
|
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 (
|
|
562
|
+
if (cacheDirectory || noCache) {
|
|
563
|
+
const directory = cacheDirectory ?? session.cwd;
|
|
564
|
+
if (cacheDirectory) await session.fs.mkdir(directory, { recursive: true, signal: session.signal });
|
|
602
565
|
let metadataBytes;
|
|
603
566
|
const artifact = await stagePythonPackage(
|
|
604
567
|
session,
|
|
@@ -608,13 +571,13 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
608
571
|
progress,
|
|
609
572
|
(key2) => {
|
|
610
573
|
verifyIntegrity(key2);
|
|
611
|
-
if (!
|
|
574
|
+
if (!noCache) metadataBytes = cacheRecord(key2, headers, responseUrl);
|
|
612
575
|
},
|
|
613
|
-
|
|
576
|
+
noCache ? void 0 : (key2) => resolve(directory, pythonPackageRuntimeKey + "-sha256-" + key2)
|
|
614
577
|
);
|
|
615
578
|
if (artifact) {
|
|
616
579
|
return await adopt(artifact, async () => {
|
|
617
|
-
if (!
|
|
580
|
+
if (!noCache) await session.cache.set(address, metadataBytes);
|
|
618
581
|
});
|
|
619
582
|
}
|
|
620
583
|
}
|
|
@@ -642,8 +605,8 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
642
605
|
}
|
|
643
606
|
checkSession(session);
|
|
644
607
|
verifyIntegrity(key = digest(bytes));
|
|
645
|
-
if (!
|
|
646
|
-
const metadataBytes = cacheRecord(key, headers);
|
|
608
|
+
if (!noCache) {
|
|
609
|
+
const metadataBytes = cacheRecord(key, headers, responseUrl);
|
|
647
610
|
await session.cache.set(pythonPackageRuntimeKey + "-sha256-" + key, Uint8Array.from(bytes));
|
|
648
611
|
checkSession(session);
|
|
649
612
|
if (!canonicalWheel) await session.cache.set(address, metadataBytes);
|
|
@@ -653,7 +616,7 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
653
616
|
verifyIntegrity(key);
|
|
654
617
|
const value = bytes;
|
|
655
618
|
session.opened = { key, size: bytes.length, read: (offset, length) => value.subarray(offset, offset + length) };
|
|
656
|
-
return { key, size: bytes.length, headers };
|
|
619
|
+
return { key, size: bytes.length, headers, url: responseUrl };
|
|
657
620
|
} finally {
|
|
658
621
|
session.opening = false;
|
|
659
622
|
}
|
|
@@ -687,7 +650,6 @@ function createPythonPackageEnvironment(options = {}) {
|
|
|
687
650
|
}
|
|
688
651
|
|
|
689
652
|
export {
|
|
690
|
-
openPythonPackageFile,
|
|
691
653
|
stagePythonPackage,
|
|
692
654
|
PythonPackageConflictError,
|
|
693
655
|
createPythonPackageManifestStore,
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
relPart,
|
|
13
13
|
required,
|
|
14
14
|
unique
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-C23L4HZB.js";
|
|
16
16
|
import {
|
|
17
17
|
SelectionError
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-I2OKE2NI.js";
|
|
19
19
|
import {
|
|
20
20
|
parseXmlPart
|
|
21
21
|
} from "./chunk-YWP62BAZ.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
dashPresets,
|
|
3
3
|
patternPresets
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CEKBIZGU.js";
|
|
5
5
|
import {
|
|
6
6
|
themeColorSlots
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CH5JDE3C.js";
|
|
8
8
|
|
|
9
9
|
// packages/safe-bash-presentation-engine/src/drawing-schema.ts
|
|
10
10
|
var ratio = { type: "number", minimum: 0, maximum: 1 };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import {
|
|
2
|
+
openPythonPackageFile
|
|
3
|
+
} from "./chunk-NXCJNPL3.js";
|
|
4
|
+
|
|
5
|
+
// packages/safe-bash-command-python/src/source-archive-path.ts
|
|
6
|
+
var splitPythonSourcePath = (name) => {
|
|
7
|
+
while (name.startsWith("/")) name = name.slice(1);
|
|
8
|
+
while (name.startsWith("\\")) name = name.slice(1);
|
|
9
|
+
const slash = name.indexOf("/"), backslash = name.indexOf("\\");
|
|
10
|
+
const at = slash < 0 ? backslash : backslash < 0 ? slash : Math.min(slash, backslash);
|
|
11
|
+
return at < 0 ? [name, ""] : [name.slice(0, at), name.slice(at + 1)];
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// packages/safe-bash-command-python/src/source-zip-extract.ts
|
|
15
|
+
import { resolvePath, dirname } from "../../safe-bash-contracts/path.js";
|
|
16
|
+
import { readZipIndexedArchive, decodeZipEntry } from "../../safe-bash-zip-engine/index.js";
|
|
17
|
+
import { DEFAULT_ARCHIVE_LIMITS } from "../../safe-bash-io-engine/commands/archive/internal.js";
|
|
18
|
+
import { createArchiveScratchFactory } from "../../safe-bash-io-engine/commands/archive/scratch.js";
|
|
19
|
+
async function pythonSourceZipSize(input) {
|
|
20
|
+
const tail = new Uint8Array(Math.min(input.size, 65558)), start = input.size - tail.length;
|
|
21
|
+
for (let offset = 0; offset < tail.length; ) {
|
|
22
|
+
const bytes = await input.read(start + offset, tail.length - offset);
|
|
23
|
+
tail.set(bytes, offset);
|
|
24
|
+
offset += bytes.length;
|
|
25
|
+
}
|
|
26
|
+
const signature = (offset) => tail[offset] === 80 && tail[offset + 1] === 75 && tail[offset + 2] === 5 && tail[offset + 3] === 6;
|
|
27
|
+
let end = -1;
|
|
28
|
+
if (tail.length >= 22 && signature(tail.length - 22) && tail[tail.length - 2] === 0 && tail[tail.length - 1] === 0) end = tail.length - 22;
|
|
29
|
+
else for (let offset = tail.length - 4; offset >= 0; offset--) if (signature(offset)) {
|
|
30
|
+
if (offset + 22 <= tail.length) end = offset;
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
return end < 0 ? void 0 : Math.min(input.size, start + end + 22 + tail[end + 20] + 256 * tail[end + 21]);
|
|
34
|
+
}
|
|
35
|
+
async function extractPythonSourceZipFile(input, directory, maxBytes, context, zipSize, flatten = true) {
|
|
36
|
+
const { fs, signal } = context;
|
|
37
|
+
const limits = { ...DEFAULT_ARCHIVE_LIMITS, maxArchiveBytes: maxBytes };
|
|
38
|
+
let scratch;
|
|
39
|
+
let archive, primary, failed = false;
|
|
40
|
+
try {
|
|
41
|
+
scratch = createArchiveScratchFactory({ context, limits, operation: (action) => Promise.resolve().then(action) }, dirname(directory));
|
|
42
|
+
const size = zipSize ?? await pythonSourceZipSize(input) ?? input.size;
|
|
43
|
+
archive = await readZipIndexedArchive({ ...input, size }, limits, signal, scratch, { allowUnreferencedData: true });
|
|
44
|
+
let prefix;
|
|
45
|
+
for await (const entry of archive.entries) {
|
|
46
|
+
const [part] = splitPythonSourcePath(entry.name);
|
|
47
|
+
if (!part || prefix !== void 0 && part !== prefix) {
|
|
48
|
+
flatten = false;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
prefix = part;
|
|
52
|
+
}
|
|
53
|
+
for await (const entry of archive.entries) {
|
|
54
|
+
signal.throwIfAborted();
|
|
55
|
+
const name = flatten ? splitPythonSourcePath(entry.name)[1] : entry.name, path = resolvePath(directory, name);
|
|
56
|
+
if (path !== directory && !path.startsWith(directory + "/")) throw new Error("Source ZIP member escapes the build directory");
|
|
57
|
+
if (path.includes("\0")) throw new Error("Invalid source ZIP member");
|
|
58
|
+
if (!name || name.endsWith("/") || name.endsWith("\\")) await fs.mkdir(path, { recursive: true, mode: 493, signal });
|
|
59
|
+
else {
|
|
60
|
+
await fs.mkdir(dirname(path), { recursive: true, mode: 493, signal });
|
|
61
|
+
const bytes = decodeZipEntry(entry, limits, signal);
|
|
62
|
+
let finished = false;
|
|
63
|
+
const observed = (async function* () {
|
|
64
|
+
yield* bytes;
|
|
65
|
+
finished = true;
|
|
66
|
+
})();
|
|
67
|
+
try {
|
|
68
|
+
await fs.writeStream(path, observed, { flag: "w", mode: entry.mode & 73 ? 493 : 420, signal });
|
|
69
|
+
if (!finished) throw new Error("Source ZIP write ended before consuming its member");
|
|
70
|
+
if (entry.mode & 73) {
|
|
71
|
+
if (!fs.chmod) throw new Error("Source ZIP executable files require permissions support");
|
|
72
|
+
await fs.chmod(path, 493, { signal });
|
|
73
|
+
}
|
|
74
|
+
} finally {
|
|
75
|
+
await observed.return(void 0);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
} catch (error) {
|
|
80
|
+
primary = error;
|
|
81
|
+
failed = true;
|
|
82
|
+
}
|
|
83
|
+
{
|
|
84
|
+
const errors = [];
|
|
85
|
+
try {
|
|
86
|
+
await archive?.close();
|
|
87
|
+
} catch (error) {
|
|
88
|
+
errors.push(error);
|
|
89
|
+
}
|
|
90
|
+
try {
|
|
91
|
+
await scratch?.close();
|
|
92
|
+
} catch (error) {
|
|
93
|
+
errors.push(error);
|
|
94
|
+
}
|
|
95
|
+
try {
|
|
96
|
+
await input.close();
|
|
97
|
+
} catch (error) {
|
|
98
|
+
errors.push(error);
|
|
99
|
+
}
|
|
100
|
+
if (errors.length) {
|
|
101
|
+
if (failed) errors.unshift(primary);
|
|
102
|
+
if (errors.length === 1) throw errors[0];
|
|
103
|
+
throw new AggregateError(errors, "Python source archive cleanup failed");
|
|
104
|
+
}
|
|
105
|
+
if (failed) throw primary;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// packages/safe-bash-command-python/src/source-zip.ts
|
|
110
|
+
async function extractPythonSourceZip(source, directory, maxBytes, context, metadata) {
|
|
111
|
+
if (maxBytes !== Infinity && (!Number.isSafeInteger(maxBytes) || maxBytes < 0)) throw new RangeError("Invalid Python source archive size limit");
|
|
112
|
+
if (!context.fs.writeStream) throw new Error("Python source archives require streaming writes");
|
|
113
|
+
const input = await openPythonPackageFile(context, source, maxBytes);
|
|
114
|
+
if (!input) throw new Error("Python source archives require retained reads");
|
|
115
|
+
await extractPythonSourceZipFile(input, directory, maxBytes, context, void 0, !(metadata?.filename ?? source).endsWith(".whl"));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export {
|
|
119
|
+
splitPythonSourcePath,
|
|
120
|
+
pythonSourceZipSize,
|
|
121
|
+
extractPythonSourceZipFile,
|
|
122
|
+
extractPythonSourceZip
|
|
123
|
+
};
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
nodeFor,
|
|
3
3
|
selected,
|
|
4
4
|
validateSelection
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YODHIRPW.js";
|
|
6
6
|
import {
|
|
7
7
|
attr,
|
|
8
8
|
child,
|
|
9
9
|
loadShared
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-C23L4HZB.js";
|
|
11
11
|
import {
|
|
12
12
|
OfficeError
|
|
13
13
|
} from "./chunk-VJQ5OWS5.js";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
escape
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-C23L4HZB.js";
|
|
4
4
|
import {
|
|
5
5
|
writePackageArchive
|
|
6
6
|
} from "./chunk-5KWEZV5H.js";
|
|
7
7
|
import {
|
|
8
8
|
buildSelectionIndex,
|
|
9
9
|
readSelectionIndex
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-I2OKE2NI.js";
|
|
11
11
|
import {
|
|
12
12
|
readPackage
|
|
13
13
|
} from "./chunk-KVTZJBLM.js";
|
|
14
14
|
import {
|
|
15
15
|
parseXmlPart
|
|
16
16
|
} from "./chunk-YWP62BAZ.js";
|
|
17
|
-
import {
|
|
18
|
-
readRelationshipGraph
|
|
19
|
-
} from "./chunk-QMXOKYMJ.js";
|
|
20
17
|
import {
|
|
21
18
|
parseContentTypes
|
|
22
19
|
} from "./chunk-6ZHNKHQQ.js";
|
|
20
|
+
import {
|
|
21
|
+
readRelationshipGraph
|
|
22
|
+
} from "./chunk-QMXOKYMJ.js";
|
|
23
23
|
import {
|
|
24
24
|
relativePartReference
|
|
25
25
|
} from "./chunk-PZVFNPRC.js";
|
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
} from "./chunk-ITJDLFPW.js";
|
|
4
4
|
import {
|
|
5
5
|
openRetainedPresentationIndex
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-S3QYSI5E.js";
|
|
7
7
|
import {
|
|
8
8
|
RetainedOrder
|
|
9
9
|
} from "./chunk-7JTJQKIV.js";
|
|
10
10
|
import {
|
|
11
11
|
loadShared
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-C23L4HZB.js";
|
|
13
13
|
import {
|
|
14
14
|
writePackageArchive
|
|
15
15
|
} from "./chunk-5KWEZV5H.js";
|
|
16
16
|
import {
|
|
17
17
|
openRetainedPresentationValidation
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ATUZ7J3B.js";
|
|
19
19
|
import {
|
|
20
20
|
openRetainedContentTypes
|
|
21
21
|
} from "./chunk-O4H7HPMP.js";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-ITJDLFPW.js";
|
|
7
7
|
import {
|
|
8
8
|
openRetainedPresentationIndex
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-S3QYSI5E.js";
|
|
10
10
|
import {
|
|
11
11
|
stageRetainedOutput,
|
|
12
12
|
streamJson
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
} from "./chunk-5KWEZV5H.js";
|
|
17
17
|
import {
|
|
18
18
|
SelectionError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-I2OKE2NI.js";
|
|
20
20
|
import {
|
|
21
21
|
readPackage
|
|
22
22
|
} from "./chunk-KVTZJBLM.js";
|
|
23
23
|
import {
|
|
24
24
|
openRetainedPresentationValidation,
|
|
25
25
|
validatePresentation
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ATUZ7J3B.js";
|
|
27
27
|
import {
|
|
28
28
|
dialects
|
|
29
29
|
} from "./chunk-P3LHQOX7.js";
|
|
@@ -34,12 +34,12 @@ import {
|
|
|
34
34
|
import {
|
|
35
35
|
parseXmlPart
|
|
36
36
|
} from "./chunk-YWP62BAZ.js";
|
|
37
|
-
import {
|
|
38
|
-
readRelationshipGraph
|
|
39
|
-
} from "./chunk-QMXOKYMJ.js";
|
|
40
37
|
import {
|
|
41
38
|
parseContentTypes
|
|
42
39
|
} from "./chunk-6ZHNKHQQ.js";
|
|
40
|
+
import {
|
|
41
|
+
readRelationshipGraph
|
|
42
|
+
} from "./chunk-QMXOKYMJ.js";
|
|
43
43
|
import {
|
|
44
44
|
packageUri,
|
|
45
45
|
partName
|