@unbrained/pm-cli 2026.11.30 → 2026.12.2
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/.claude-plugin/marketplace.json +1 -1
- package/dist/cli/commander-usage.js +10 -10
- package/dist/cli/error-guidance.js +5 -5
- package/dist/cli/extension-command-help.js +6 -6
- package/dist/cli/help-json-payload.js +7 -7
- package/dist/cli/main.js +5 -5
- package/dist/cli/register-list-query.js +10 -10
- package/dist/cli/register-mutation.js +3 -3
- package/dist/cli/runtime/invocation-command-path.js +2 -0
- package/dist/cli/runtime/read-output-mutation-retry.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-DCWGM7CY.js → chunk-3HKPVOAN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Z7YL2SUM.js → chunk-3KEMIPKG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TX74QJ4W.js → chunk-4YYFY33T.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-47ZS6RPL.js → chunk-7NAO7I75.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IGEFPHV7.js → chunk-7V65VACG.js} +52 -52
- package/dist/cli-bundle/chunks/chunk-A5ZEMOVR.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-5PNOVDVO.js → chunk-AHV3CSQG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KCVSSONY.js → chunk-C6WM6ZN4.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-CBUC4X7Q.js +127 -0
- package/dist/cli-bundle/chunks/{chunk-CCKM5YQM.js → chunk-G6TARHFK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TY55UX6M.js → chunk-GOEQXVOI.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-I4SPJQQI.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-Q4VZSMUL.js → chunk-L2ZSSMYY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NHBG5ET3.js → chunk-MZZ4ZJ5Z.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-NRQCBUYD.js +113 -0
- package/dist/cli-bundle/chunks/{chunk-YVTALIN3.js → chunk-OBPO6V7H.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KXTKLDKD.js → chunk-OXC5KBIQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HXQ3OHQR.js → chunk-PCDTWL6V.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AOTI76Q6.js → chunk-Q6K7HWZ7.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-QDV7S2QS.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-NZSXWIX7.js → chunk-ROTEELDL.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-WFYE34TO.js → chunk-SDXCJZKB.js} +23 -23
- package/dist/cli-bundle/chunks/{chunk-2SBTXR6C.js → chunk-SY5C3U32.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-FR7ULTM4.js → chunk-TKUG2X24.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FECZV72T.js → chunk-UNBW2LF3.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-V2S4XAX3.js +2 -0
- package/dist/cli-bundle/chunks/chunk-WSEIEDEK.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-ZA5NS3PL.js → chunk-ZL6J6JYT.js} +6 -6
- package/dist/cli-bundle/chunks/{field-option-collisions-2F2Z7R7B.js → field-option-collisions-BBGTV7AD.js} +2 -2
- package/dist/cli-bundle/chunks/item-revision-3LENTXYF.js +2 -0
- package/dist/cli-bundle/chunks/item-transaction-56J5OCHA.js +2 -0
- package/dist/cli-bundle/chunks/{linked-resource-value-list-WXPPYUVQ.js → linked-resource-value-list-ZBIY4H23.js} +2 -2
- package/dist/cli-bundle/chunks/{mutation-actor-UK3QNEEB.js → mutation-actor-NHN33ITJ.js} +2 -2
- package/dist/cli-bundle/chunks/{mutation-admission-UTDYPFWP.js → mutation-admission-PGKJTCG6.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-DRA3CWHI.js → register-list-query-7S5QWDTI.js} +11 -11
- package/dist/cli-bundle/chunks/{register-mutation-WO74VLEQ.js → register-mutation-EK6DVIQK.js} +5 -5
- package/dist/cli-bundle/chunks/{register-operations-CRBKH7WN.js → register-operations-6MURXE4V.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-6V6NQB5C.js → register-setup-RW26X3GJ.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-DYEHGASU.js → stage-4ZCF74G4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-RQYVX2T6.js → chunk-2DGKVXFT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-2UWKU2BQ.js +3 -0
- package/dist/cli-bundle/focused-chunks/{chunk-A3DORTXS.js → chunk-3COWDIPX.js} +54 -54
- package/dist/cli-bundle/focused-chunks/{chunk-UQJ4PY2Y.js → chunk-4SCFAWAW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-7G7JIXLL.js → chunk-6BKT6XQN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-6IY5CVGJ.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-7A6SEZEY.js +4 -0
- package/dist/cli-bundle/focused-chunks/{chunk-IJ3T3W4U.js → chunk-BHNBPCHP.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-LWBZ7UGG.js → chunk-EQCQTYKO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-FM5WQ6ZU.js → chunk-HTDYNY4L.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-TQQO42C2.js → chunk-J72TRWR5.js} +26 -26
- package/dist/cli-bundle/focused-chunks/{chunk-L357ZAES.js → chunk-JPZGC3W4.js} +5 -5
- package/dist/cli-bundle/focused-chunks/{chunk-62AMZMR4.js → chunk-KNBGHCIP.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-N64AC5G6.js +100 -0
- package/dist/cli-bundle/focused-chunks/{chunk-IIVDBAJM.js → chunk-OG57ESZK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MZNV26XE.js → chunk-P2H3GTJK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-QZRYGYTI.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-SQMOF65W.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-T3ILWAEV.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-SXC3NVZI.js → chunk-TR22GU7M.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-M57KDG7I.js → chunk-TXTPAFHJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-VK3IE3TS.js +29 -0
- package/dist/cli-bundle/focused-chunks/{chunk-NJTKGBSK.js → chunk-VQIC3UZB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-U35K7FSE.js → chunk-W4JMV7GF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{field-option-collisions-7TG7STO7.js → field-option-collisions-2C6DLUC4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/item-revision-723XCQPS.js +2 -0
- package/dist/cli-bundle/focused-chunks/{item-transaction-2IC2MLML.js → item-transaction-LQLQLZE7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-actor-LJVF2HVD.js → mutation-actor-DJMZUIZI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/mutation-admission-SDWQVVHN.js +2 -0
- package/dist/cli-bundle/focused-chunks/{stage-MWR73LTZ.js → stage-QBZIK3T5.js} +2 -2
- package/dist/cli-bundle/main.js +27 -27
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +1 -1
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +61 -61
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +2 -2
- package/dist/core/extensions/reserved-host-flags.js +1 -1
- package/dist/core/shared/secret-rules.d.ts +86 -12
- package/dist/core/shared/secret-rules.js +7 -5
- package/dist/sdk/cli-bootstrap.js +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +50 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +3 -1
- package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
- package/dist/sdk/extension/command-options.js +1 -1
- package/dist/sdk/extension/install-sources.d.ts +2 -2
- package/dist/sdk/extension/install-sources.js +5 -5
- package/dist/sdk/lifecycle/expect-hash-admission.d.ts +15 -0
- package/dist/sdk/lifecycle/expect-hash-admission.js +2 -0
- package/dist/sdk/lifecycle/item-revision.d.ts +4 -1
- package/dist/sdk/lifecycle/item-revision.js +1 -1
- package/dist/sdk/mutation-guard.js +1 -1
- package/dist/sdk/output-contracts.js +1 -1
- package/dist/sdk/output-projection.d.ts +1 -1
- package/dist/sdk/output-projection.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/aggregate.js +1 -1
- package/dist/sdk/query/context.js +1 -1
- package/dist/sdk/query/list.js +1 -1
- package/dist/sdk/query/next.js +1 -1
- package/dist/sdk/query/search-contracts.js +1 -1
- package/dist/sdk/read-output/surfaces.js +1 -1
- package/dist/sdk/read-output-budget.d.ts +1 -1
- package/dist/sdk/read-output-budget.js +1 -1
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/read-output-rows.js +1 -1
- package/docs/COMMANDS.md +37 -0
- package/docs/MUTATION_INTEGRITY.md +226 -10
- package/docs/SDK.md +16 -6
- package/docs/agent-task-token-baseline.json +1 -1
- package/marketplace.json +1 -1
- package/node_modules/tar/README.md +1792 -1147
- package/node_modules/tar/dist/commonjs/bytes.d.ts +21 -0
- package/node_modules/tar/dist/commonjs/bytes.js +83 -0
- package/node_modules/tar/dist/commonjs/codec.d.ts +53 -0
- package/node_modules/tar/dist/commonjs/codec.js +35 -0
- package/node_modules/tar/dist/commonjs/concat.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/concat.js +20 -0
- package/node_modules/tar/dist/commonjs/create.d.ts +39 -2
- package/node_modules/tar/dist/commonjs/create.js +150 -64
- package/node_modules/tar/dist/commonjs/dealias.d.ts +79 -0
- package/node_modules/tar/dist/commonjs/dealias.js +50 -0
- package/node_modules/tar/dist/commonjs/delete.d.ts +19 -0
- package/node_modules/tar/dist/commonjs/delete.js +121 -0
- package/node_modules/tar/dist/commonjs/entries.d.ts +82 -0
- package/node_modules/tar/dist/commonjs/entries.js +398 -0
- package/node_modules/tar/dist/commonjs/extract.d.ts +14 -2
- package/node_modules/tar/dist/commonjs/extract.js +40 -81
- package/node_modules/tar/dist/commonjs/fs.d.ts +201 -0
- package/node_modules/tar/dist/commonjs/fs.js +5 -0
- package/node_modules/tar/dist/commonjs/header.d.ts +4 -4
- package/node_modules/tar/dist/commonjs/header.js +71 -53
- package/node_modules/tar/dist/commonjs/index.d.ts +25 -18
- package/node_modules/tar/dist/commonjs/index.js +46 -18
- package/node_modules/tar/dist/commonjs/index.min.js +2 -3
- package/node_modules/tar/dist/commonjs/large-numbers.d.ts +2 -2
- package/node_modules/tar/dist/commonjs/large-numbers.js +4 -4
- package/node_modules/tar/dist/commonjs/list.d.ts +23 -6
- package/node_modules/tar/dist/commonjs/list.js +99 -138
- package/node_modules/tar/dist/commonjs/mkdir.d.ts +16 -11
- package/node_modules/tar/dist/commonjs/mkdir.js +121 -159
- package/node_modules/tar/dist/commonjs/normalize-unicode.js +9 -0
- package/node_modules/tar/dist/commonjs/options.d.ts +284 -513
- package/node_modules/tar/dist/commonjs/options.js +20 -61
- package/node_modules/tar/dist/commonjs/pack.d.ts +150 -96
- package/node_modules/tar/dist/commonjs/pack.js +752 -445
- package/node_modules/tar/dist/commonjs/parser.d.ts +98 -0
- package/node_modules/tar/dist/commonjs/parser.js +452 -0
- package/node_modules/tar/dist/commonjs/path-reservations.d.ts +17 -7
- package/node_modules/tar/dist/commonjs/path-reservations.js +110 -140
- package/node_modules/tar/dist/commonjs/path.d.ts +19 -0
- package/node_modules/tar/dist/commonjs/path.js +90 -0
- package/node_modules/tar/dist/commonjs/pax.d.ts +3 -1
- package/node_modules/tar/dist/commonjs/pax.js +67 -36
- package/node_modules/tar/dist/commonjs/read-entry.d.ts +97 -11
- package/node_modules/tar/dist/commonjs/read-entry.js +251 -97
- package/node_modules/tar/dist/commonjs/read-file.d.ts +22 -0
- package/node_modules/tar/dist/commonjs/read-file.js +104 -0
- package/node_modules/tar/dist/commonjs/replace.d.ts +45 -1
- package/node_modules/tar/dist/commonjs/replace.js +164 -211
- package/node_modules/tar/dist/commonjs/server/codecs.d.ts +38 -0
- package/node_modules/tar/dist/commonjs/server/codecs.js +252 -0
- package/node_modules/tar/dist/commonjs/server/index.d.ts +115 -0
- package/node_modules/tar/dist/commonjs/server/index.js +166 -0
- package/node_modules/tar/dist/commonjs/server/index.min.js +3 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +8 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.js +17 -20
- package/node_modules/tar/dist/commonjs/to-stream.d.ts +7 -0
- package/node_modules/tar/dist/commonjs/to-stream.js +22 -0
- package/node_modules/tar/dist/commonjs/types.d.ts +4 -3
- package/node_modules/tar/dist/commonjs/types.js +4 -3
- package/node_modules/tar/dist/commonjs/unpack.d.ts +143 -89
- package/node_modules/tar/dist/commonjs/unpack.js +780 -725
- package/node_modules/tar/dist/commonjs/update.d.ts +11 -1
- package/node_modules/tar/dist/commonjs/update.js +37 -28
- package/node_modules/tar/dist/commonjs/warn.d.ts +27 -0
- package/node_modules/tar/dist/commonjs/warn.js +36 -0
- package/node_modules/tar/dist/commonjs/win32-path.d.ts +16 -0
- package/node_modules/tar/dist/commonjs/win32-path.js +67 -0
- package/node_modules/tar/dist/commonjs/write-entry.d.ts +64 -111
- package/node_modules/tar/dist/commonjs/write-entry.js +108 -672
- package/node_modules/tar/dist/commonjs/write-flag.d.ts +18 -0
- package/node_modules/tar/dist/commonjs/write-flag.js +29 -0
- package/node_modules/tar/dist/esm/bytes.d.ts +21 -0
- package/node_modules/tar/dist/esm/bytes.js +72 -0
- package/node_modules/tar/dist/esm/codec.d.ts +53 -0
- package/node_modules/tar/dist/esm/codec.js +32 -0
- package/node_modules/tar/dist/esm/concat.d.ts +3 -0
- package/node_modules/tar/dist/esm/concat.js +16 -0
- package/node_modules/tar/dist/esm/create.d.ts +39 -2
- package/node_modules/tar/dist/esm/create.js +144 -61
- package/node_modules/tar/dist/esm/dealias.d.ts +79 -0
- package/node_modules/tar/dist/esm/dealias.js +46 -0
- package/node_modules/tar/dist/esm/delete.d.ts +19 -0
- package/node_modules/tar/dist/esm/delete.js +117 -0
- package/node_modules/tar/dist/esm/entries.d.ts +82 -0
- package/node_modules/tar/dist/esm/entries.js +388 -0
- package/node_modules/tar/dist/esm/extract.d.ts +14 -2
- package/node_modules/tar/dist/esm/extract.js +37 -44
- package/node_modules/tar/dist/esm/fs.d.ts +201 -0
- package/node_modules/tar/dist/esm/fs.js +4 -0
- package/node_modules/tar/dist/esm/header.d.ts +4 -4
- package/node_modules/tar/dist/esm/header.js +71 -53
- package/node_modules/tar/dist/esm/index.d.ts +25 -18
- package/node_modules/tar/dist/esm/index.js +23 -18
- package/node_modules/tar/dist/esm/index.min.js +2 -3
- package/node_modules/tar/dist/esm/large-numbers.d.ts +2 -2
- package/node_modules/tar/dist/esm/large-numbers.js +4 -4
- package/node_modules/tar/dist/esm/list.d.ts +23 -6
- package/node_modules/tar/dist/esm/list.js +96 -101
- package/node_modules/tar/dist/esm/mkdir.d.ts +16 -11
- package/node_modules/tar/dist/esm/mkdir.js +119 -154
- package/node_modules/tar/dist/esm/normalize-unicode.js +9 -0
- package/node_modules/tar/dist/esm/options.d.ts +284 -513
- package/node_modules/tar/dist/esm/options.js +17 -51
- package/node_modules/tar/dist/esm/pack.d.ts +150 -96
- package/node_modules/tar/dist/esm/pack.js +750 -441
- package/node_modules/tar/dist/esm/parser.d.ts +98 -0
- package/node_modules/tar/dist/esm/parser.js +448 -0
- package/node_modules/tar/dist/esm/path-reservations.d.ts +17 -7
- package/node_modules/tar/dist/esm/path-reservations.js +110 -140
- package/node_modules/tar/dist/esm/path.d.ts +19 -0
- package/node_modules/tar/dist/esm/path.js +80 -0
- package/node_modules/tar/dist/esm/pax.d.ts +3 -1
- package/node_modules/tar/dist/esm/pax.js +66 -35
- package/node_modules/tar/dist/esm/read-entry.d.ts +97 -11
- package/node_modules/tar/dist/esm/read-entry.js +248 -96
- package/node_modules/tar/dist/esm/read-file.d.ts +22 -0
- package/node_modules/tar/dist/esm/read-file.js +99 -0
- package/node_modules/tar/dist/esm/replace.d.ts +45 -1
- package/node_modules/tar/dist/esm/replace.js +160 -207
- package/node_modules/tar/dist/esm/server/codecs.d.ts +38 -0
- package/node_modules/tar/dist/esm/server/codecs.js +214 -0
- package/node_modules/tar/dist/esm/server/index.d.ts +115 -0
- package/node_modules/tar/dist/esm/server/index.js +102 -0
- package/node_modules/tar/dist/esm/server/index.min.js +3 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.d.ts +8 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.js +17 -20
- package/node_modules/tar/dist/esm/to-stream.d.ts +7 -0
- package/node_modules/tar/dist/esm/to-stream.js +18 -0
- package/node_modules/tar/dist/esm/types.d.ts +4 -3
- package/node_modules/tar/dist/esm/types.js +4 -3
- package/node_modules/tar/dist/esm/unpack.d.ts +143 -89
- package/node_modules/tar/dist/esm/unpack.js +776 -719
- package/node_modules/tar/dist/esm/update.d.ts +11 -1
- package/node_modules/tar/dist/esm/update.js +35 -28
- package/node_modules/tar/dist/esm/warn.d.ts +27 -0
- package/node_modules/tar/dist/esm/warn.js +31 -0
- package/node_modules/tar/dist/esm/win32-path.d.ts +16 -0
- package/node_modules/tar/dist/esm/win32-path.js +60 -0
- package/node_modules/tar/dist/esm/write-entry.d.ts +64 -111
- package/node_modules/tar/dist/esm/write-entry.js +107 -633
- package/node_modules/tar/dist/esm/write-flag.d.ts +18 -0
- package/node_modules/tar/dist/esm/write-flag.js +25 -0
- package/node_modules/tar/package.json +68 -224
- package/package.json +2 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/dist/cli-bundle/chunks/chunk-3TXEWHQX.js +0 -125
- package/dist/cli-bundle/chunks/chunk-JPJNJHQW.js +0 -2
- package/dist/cli-bundle/chunks/chunk-NVYDPNQP.js +0 -2
- package/dist/cli-bundle/chunks/chunk-SJWIPGZW.js +0 -113
- package/dist/cli-bundle/chunks/chunk-USBTXMKS.js +0 -2
- package/dist/cli-bundle/chunks/chunk-VCXQ6A35.js +0 -3
- package/dist/cli-bundle/chunks/chunk-YPMNXG2C.js +0 -2
- package/dist/cli-bundle/chunks/item-revision-UAF6L47R.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-RJECL53Y.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2UUBS4BG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-4ER3VMST.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-4YBMHMBJ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HXM7K6VH.js +0 -100
- package/dist/cli-bundle/focused-chunks/chunk-NGHT2LNG.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-P55AZPFN.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-WAP3DF4B.js +0 -27
- package/dist/cli-bundle/focused-chunks/chunk-XR745UGE.js +0 -4
- package/dist/cli-bundle/focused-chunks/item-revision-J7EUGCHR.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-admission-SLFAUONA.js +0 -2
- package/node_modules/@isaacs/fs-minipass/LICENSE +0 -15
- package/node_modules/@isaacs/fs-minipass/README.md +0 -71
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts +0 -118
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +0 -430
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +0 -3
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts +0 -118
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +0 -420
- package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +0 -3
- package/node_modules/@isaacs/fs-minipass/package.json +0 -72
- package/node_modules/chownr/LICENSE.md +0 -63
- package/node_modules/chownr/README.md +0 -3
- package/node_modules/chownr/dist/commonjs/index.d.ts +0 -3
- package/node_modules/chownr/dist/commonjs/index.js +0 -93
- package/node_modules/chownr/dist/commonjs/package.json +0 -3
- package/node_modules/chownr/dist/esm/index.d.ts +0 -3
- package/node_modules/chownr/dist/esm/index.js +0 -85
- package/node_modules/chownr/dist/esm/package.json +0 -3
- package/node_modules/chownr/package.json +0 -69
- package/node_modules/minipass/LICENSE.md +0 -55
- package/node_modules/minipass/README.md +0 -825
- package/node_modules/minipass/dist/commonjs/index.d.ts +0 -545
- package/node_modules/minipass/dist/commonjs/index.js +0 -1038
- package/node_modules/minipass/dist/commonjs/package.json +0 -3
- package/node_modules/minipass/dist/esm/index.d.ts +0 -545
- package/node_modules/minipass/dist/esm/index.js +0 -1020
- package/node_modules/minipass/dist/esm/package.json +0 -3
- package/node_modules/minipass/package.json +0 -77
- package/node_modules/minizlib/LICENSE +0 -26
- package/node_modules/minizlib/README.md +0 -64
- package/node_modules/minizlib/dist/commonjs/constants.d.ts +0 -2
- package/node_modules/minizlib/dist/commonjs/constants.js +0 -123
- package/node_modules/minizlib/dist/commonjs/index.d.ts +0 -99
- package/node_modules/minizlib/dist/commonjs/index.js +0 -416
- package/node_modules/minizlib/dist/commonjs/package.json +0 -3
- package/node_modules/minizlib/dist/esm/constants.d.ts +0 -2
- package/node_modules/minizlib/dist/esm/constants.js +0 -117
- package/node_modules/minizlib/dist/esm/index.d.ts +0 -99
- package/node_modules/minizlib/dist/esm/index.js +0 -363
- package/node_modules/minizlib/dist/esm/package.json +0 -3
- package/node_modules/minizlib/package.json +0 -80
- package/node_modules/tar/dist/commonjs/get-write-flag.d.ts +0 -2
- package/node_modules/tar/dist/commonjs/get-write-flag.js +0 -32
- package/node_modules/tar/dist/commonjs/make-command.d.ts +0 -49
- package/node_modules/tar/dist/commonjs/make-command.js +0 -52
- package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +0 -2
- package/node_modules/tar/dist/commonjs/normalize-windows-path.js +0 -12
- package/node_modules/tar/dist/commonjs/parse.d.ts +0 -92
- package/node_modules/tar/dist/commonjs/parse.js +0 -655
- package/node_modules/tar/dist/commonjs/process-umask.d.ts +0 -2
- package/node_modules/tar/dist/commonjs/process-umask.js +0 -7
- package/node_modules/tar/dist/commonjs/warn-method.d.ts +0 -24
- package/node_modules/tar/dist/commonjs/warn-method.js +0 -31
- package/node_modules/tar/dist/esm/get-write-flag.d.ts +0 -2
- package/node_modules/tar/dist/esm/get-write-flag.js +0 -26
- package/node_modules/tar/dist/esm/make-command.d.ts +0 -49
- package/node_modules/tar/dist/esm/make-command.js +0 -48
- package/node_modules/tar/dist/esm/normalize-windows-path.d.ts +0 -2
- package/node_modules/tar/dist/esm/normalize-windows-path.js +0 -9
- package/node_modules/tar/dist/esm/parse.d.ts +0 -92
- package/node_modules/tar/dist/esm/parse.js +0 -651
- package/node_modules/tar/dist/esm/process-umask.d.ts +0 -2
- package/node_modules/tar/dist/esm/process-umask.js +0 -3
- package/node_modules/tar/dist/esm/warn-method.d.ts +0 -24
- package/node_modules/tar/dist/esm/warn-method.js +0 -27
- package/node_modules/yallist/LICENSE.md +0 -63
- package/node_modules/yallist/README.md +0 -205
- package/node_modules/yallist/dist/commonjs/index.d.ts +0 -39
- package/node_modules/yallist/dist/commonjs/index.js +0 -384
- package/node_modules/yallist/dist/commonjs/package.json +0 -3
- package/node_modules/yallist/dist/esm/index.d.ts +0 -39
- package/node_modules/yallist/dist/esm/index.js +0 -379
- package/node_modules/yallist/dist/esm/package.json +0 -3
- package/node_modules/yallist/package.json +0 -68
|
@@ -1,169 +1,139 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// is called with a cb that clears the reservation.
|
|
6
|
-
//
|
|
7
|
-
// Used by async unpack to avoid clobbering paths in use,
|
|
8
|
-
// while still allowing maximal safe parallelization.
|
|
2
|
+
// The async extraction does several entries at one time. Two entries
|
|
3
|
+
// must not work on the same path at one time: a link needs its
|
|
4
|
+
// target, and an entry can replace an object of a different type.
|
|
9
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
6
|
exports.PathReservations = void 0;
|
|
11
|
-
const node_path_1 = require("node:path");
|
|
12
7
|
const normalize_unicode_js_1 = require("./normalize-unicode.js");
|
|
13
8
|
const strip_trailing_slashes_js_1 = require("./strip-trailing-slashes.js");
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (s !== undefined) {
|
|
25
|
-
path = (0, node_path_1.join)(s, path);
|
|
26
|
-
}
|
|
27
|
-
set.push(path || '/');
|
|
28
|
-
return set;
|
|
29
|
-
}, []);
|
|
30
|
-
return dirs;
|
|
31
|
-
};
|
|
9
|
+
const path_js_1 = require("./path.js");
|
|
10
|
+
/**
|
|
11
|
+
* Gives each task the exclusive use of its paths, and the shared use
|
|
12
|
+
* of their parent directories. A task starts when each task before
|
|
13
|
+
* it that uses one of its paths, or a directory above or below one,
|
|
14
|
+
* is done.
|
|
15
|
+
*
|
|
16
|
+
* Paths that differ only in case or in Unicode form are the same
|
|
17
|
+
* path, because they can be the same file on disk.
|
|
18
|
+
*/
|
|
32
19
|
class PathReservations {
|
|
33
|
-
|
|
34
|
-
// A Set object means a directory reservation
|
|
35
|
-
// A fn is a direct reservation on that path
|
|
36
|
-
#queues = new Map();
|
|
37
|
-
// fn => {paths:[path,...], dirs:[path, ...]}
|
|
20
|
+
#root = { queue: [], name: '' };
|
|
38
21
|
#reservations = new Map();
|
|
39
|
-
// functions currently running
|
|
40
22
|
#running = new Set();
|
|
23
|
+
#win32;
|
|
24
|
+
/** @param win32 run one task at a time */
|
|
25
|
+
constructor(win32 = false) {
|
|
26
|
+
this.#win32 = win32;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Call `fn` when it is first in line for each of its paths. The
|
|
30
|
+
* paths are free again when the promise of `fn` settles. Returns a
|
|
31
|
+
* promise with the result of `fn`.
|
|
32
|
+
*/
|
|
41
33
|
reserve(paths, fn) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
return new Promise((res, rej) => {
|
|
35
|
+
const handler = () => {
|
|
36
|
+
fn().then(() => {
|
|
37
|
+
this.#clear(handler);
|
|
38
|
+
res();
|
|
39
|
+
}, er => {
|
|
40
|
+
this.#clear(handler);
|
|
41
|
+
rej(er);
|
|
48
42
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
else {
|
|
71
|
-
q.push(new Set([fn]));
|
|
72
|
-
}
|
|
43
|
+
};
|
|
44
|
+
this.#add(paths, handler);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
#add(names, fn) {
|
|
48
|
+
const root = this.#root;
|
|
49
|
+
const paths = new Set();
|
|
50
|
+
const dirs = new Set();
|
|
51
|
+
for (const name of this.#win32 ?
|
|
52
|
+
['win32 parallelization disabled']
|
|
53
|
+
: names) {
|
|
54
|
+
const path = this.#win32 ? name : ((0, strip_trailing_slashes_js_1.stripTrailingSlashes)((0, path_js_1.join)((0, normalize_unicode_js_1.normalizeUnicode)(name))));
|
|
55
|
+
let node = root;
|
|
56
|
+
for (const part of path.split('/')) {
|
|
57
|
+
if (node !== root)
|
|
58
|
+
dirs.add(node);
|
|
59
|
+
const kids = (node.kids ??= new Map());
|
|
60
|
+
let kid = kids.get(part);
|
|
61
|
+
if (!kid)
|
|
62
|
+
kids.set(part, (kid = { queue: [], name: part, up: node }));
|
|
63
|
+
node = kid;
|
|
73
64
|
}
|
|
65
|
+
paths.add(node);
|
|
74
66
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
67
|
+
// A path of the task is exclusive, so it also covers the use of
|
|
68
|
+
// that path as a parent directory of another path.
|
|
69
|
+
for (const p of paths)
|
|
70
|
+
dirs.delete(p);
|
|
71
|
+
this.#reservations.set(fn, { dirs, paths });
|
|
72
|
+
for (const p of paths)
|
|
73
|
+
p.queue.push(fn);
|
|
74
|
+
for (const { queue } of dirs) {
|
|
75
|
+
const last = queue[queue.length - 1];
|
|
76
|
+
if (last instanceof Set)
|
|
77
|
+
last.add(fn);
|
|
78
|
+
else
|
|
79
|
+
queue.push(new Set([fn]));
|
|
84
80
|
}
|
|
85
|
-
|
|
86
|
-
return {
|
|
87
|
-
paths: res.paths.map((path) => this.#queues.get(path)),
|
|
88
|
-
dirs: [...res.dirs].map(path => this.#queues.get(path)),
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
// check if fn is first in line for all its paths, and is
|
|
92
|
-
// included in the first set for all its dir queues
|
|
93
|
-
check(fn) {
|
|
94
|
-
const { paths, dirs } = this.#getQueues(fn);
|
|
95
|
-
return (paths.every(q => q && q[0] === fn) &&
|
|
96
|
-
dirs.every(q => q && q[0] instanceof Set && q[0].has(fn)));
|
|
81
|
+
this.#run(fn);
|
|
97
82
|
}
|
|
98
|
-
//
|
|
83
|
+
// Start the task if it is first in line for each path, and in the
|
|
84
|
+
// first set for each directory. A task that waits is never first in
|
|
85
|
+
// line for each of them, so a task starts one time only.
|
|
99
86
|
#run(fn) {
|
|
100
|
-
|
|
101
|
-
|
|
87
|
+
const { paths, dirs } = this.#reservations.get(fn);
|
|
88
|
+
for (const p of paths) {
|
|
89
|
+
if (p.queue[0] !== fn)
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
for (const { queue } of dirs) {
|
|
93
|
+
const first = queue[0];
|
|
94
|
+
if (!(first instanceof Set) || !first.has(fn))
|
|
95
|
+
return;
|
|
102
96
|
}
|
|
103
97
|
this.#running.add(fn);
|
|
104
|
-
fn(
|
|
105
|
-
return true;
|
|
98
|
+
fn();
|
|
106
99
|
}
|
|
107
100
|
#clear(fn) {
|
|
108
|
-
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
const res = this.#reservations.get(fn);
|
|
112
|
-
/* c8 ignore start */
|
|
113
|
-
if (!res) {
|
|
114
|
-
throw new Error('invalid reservation');
|
|
115
|
-
}
|
|
116
|
-
/* c8 ignore stop */
|
|
117
|
-
const { paths, dirs } = res;
|
|
101
|
+
const { paths, dirs } = this.#reservations.get(fn);
|
|
118
102
|
const next = new Set();
|
|
119
|
-
for (const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
if (!q0) {
|
|
128
|
-
this.#queues.delete(path);
|
|
129
|
-
continue;
|
|
130
|
-
}
|
|
131
|
-
q.shift();
|
|
132
|
-
if (typeof q0 === 'function') {
|
|
133
|
-
next.add(q0);
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
for (const f of q0) {
|
|
103
|
+
for (const { queue } of paths) {
|
|
104
|
+
// A running task is first in the queue of each of its paths.
|
|
105
|
+
queue.shift();
|
|
106
|
+
const after = queue[0];
|
|
107
|
+
if (typeof after === 'function')
|
|
108
|
+
next.add(after);
|
|
109
|
+
else if (after)
|
|
110
|
+
for (const f of after)
|
|
137
111
|
next.add(f);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
112
|
}
|
|
141
|
-
for (const
|
|
142
|
-
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
continue;
|
|
147
|
-
if (q0.size === 1 && q.length === 1) {
|
|
148
|
-
this.#queues.delete(dir);
|
|
149
|
-
continue;
|
|
150
|
-
}
|
|
151
|
-
else if (q0.size === 1) {
|
|
152
|
-
q.shift();
|
|
153
|
-
// next one must be a function,
|
|
154
|
-
// or else the Set would've been reused
|
|
155
|
-
const n = q[0];
|
|
156
|
-
if (typeof n === 'function') {
|
|
157
|
-
next.add(n);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
113
|
+
for (const { queue } of dirs) {
|
|
114
|
+
// A running task is in the first set of each of its directories.
|
|
115
|
+
const first = queue[0];
|
|
116
|
+
if (first.size > 1)
|
|
117
|
+
first.delete(fn);
|
|
160
118
|
else {
|
|
161
|
-
|
|
119
|
+
queue.shift();
|
|
120
|
+
// Two sets in a row would be one set, so this is a function.
|
|
121
|
+
if (queue.length)
|
|
122
|
+
next.add(queue[0]);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// Remove each node that no task uses. Each directory of the task
|
|
126
|
+
// is above one of its paths.
|
|
127
|
+
for (let node of paths) {
|
|
128
|
+
while (node.up && !node.queue.length && !node.kids?.size) {
|
|
129
|
+
node.up.kids?.delete(node.name);
|
|
130
|
+
node = node.up;
|
|
162
131
|
}
|
|
163
132
|
}
|
|
164
133
|
this.#running.delete(fn);
|
|
165
|
-
|
|
166
|
-
|
|
134
|
+
this.#reservations.delete(fn);
|
|
135
|
+
for (const f of next)
|
|
136
|
+
this.#run(f);
|
|
167
137
|
}
|
|
168
138
|
}
|
|
169
139
|
exports.PathReservations = PathReservations;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Resolve `.` and `..` parts, and remove repeated slashes. */
|
|
2
|
+
export declare const normalize: (path: string) => string;
|
|
3
|
+
/** Join the parts with a slash, then normalize the result. */
|
|
4
|
+
export declare const join: (...parts: string[]) => string;
|
|
5
|
+
/** The path without its last part. */
|
|
6
|
+
export declare const dirname: (path: string) => string;
|
|
7
|
+
/** The last part of the path. */
|
|
8
|
+
export declare const basename: (path: string) => string;
|
|
9
|
+
/** True if the path starts with a slash. */
|
|
10
|
+
export declare const isAbsolute: (path: string) => boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Resolve the parts from right to left, up to the first absolute
|
|
13
|
+
* part. There is no working directory here: if no part is absolute,
|
|
14
|
+
* the result is a relative path.
|
|
15
|
+
*/
|
|
16
|
+
export declare const resolve: (...parts: string[]) => string;
|
|
17
|
+
/** The relative path from `from` to `to`. */
|
|
18
|
+
export declare const relative: (from: string, to: string) => string;
|
|
19
|
+
//# sourceMappingURL=path.d.ts.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// The POSIX path functions that tar paths need. Each one gives the
|
|
3
|
+
// same result as the function of the same name in `path.posix`.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.relative = exports.resolve = exports.isAbsolute = exports.basename = exports.dirname = exports.join = exports.normalize = void 0;
|
|
6
|
+
/** Resolve `.` and `..` parts, and remove repeated slashes. */
|
|
7
|
+
const normalize = (path) => {
|
|
8
|
+
const absolute = path.charCodeAt(0) === 47;
|
|
9
|
+
const out = [];
|
|
10
|
+
for (const part of path.split('/')) {
|
|
11
|
+
if (part === '' || part === '.')
|
|
12
|
+
continue;
|
|
13
|
+
if (part !== '..')
|
|
14
|
+
out.push(part);
|
|
15
|
+
else if (out.length && out[out.length - 1] !== '..')
|
|
16
|
+
out.pop();
|
|
17
|
+
else if (!absolute)
|
|
18
|
+
out.push(part);
|
|
19
|
+
}
|
|
20
|
+
const trail = out.length && path.charCodeAt(path.length - 1) === 47;
|
|
21
|
+
const res = out.join('/') + (trail ? '/' : '');
|
|
22
|
+
if (absolute)
|
|
23
|
+
return '/' + res;
|
|
24
|
+
return res || (path.endsWith('/') ? './' : '.');
|
|
25
|
+
};
|
|
26
|
+
exports.normalize = normalize;
|
|
27
|
+
/** Join the parts with a slash, then normalize the result. */
|
|
28
|
+
const join = (...parts) => (0, exports.normalize)(parts.filter(p => p).join('/'));
|
|
29
|
+
exports.join = join;
|
|
30
|
+
/** The path without its last part. */
|
|
31
|
+
const dirname = (path) => {
|
|
32
|
+
let end = path.length;
|
|
33
|
+
while (end > 1 && path.charCodeAt(end - 1) === 47)
|
|
34
|
+
end--;
|
|
35
|
+
const slash = path.lastIndexOf('/', end - 1);
|
|
36
|
+
if (slash === -1)
|
|
37
|
+
return '.';
|
|
38
|
+
if (slash === 0)
|
|
39
|
+
return '/';
|
|
40
|
+
if (slash === 1 && path.charCodeAt(0) === 47)
|
|
41
|
+
return '//';
|
|
42
|
+
return path.slice(0, slash);
|
|
43
|
+
};
|
|
44
|
+
exports.dirname = dirname;
|
|
45
|
+
/** The last part of the path. */
|
|
46
|
+
const basename = (path) => {
|
|
47
|
+
let end = path.length;
|
|
48
|
+
while (end > 0 && path.charCodeAt(end - 1) === 47)
|
|
49
|
+
end--;
|
|
50
|
+
return path.slice(path.lastIndexOf('/', end - 1) + 1, end);
|
|
51
|
+
};
|
|
52
|
+
exports.basename = basename;
|
|
53
|
+
/** True if the path starts with a slash. */
|
|
54
|
+
const isAbsolute = (path) => path.charCodeAt(0) === 47;
|
|
55
|
+
exports.isAbsolute = isAbsolute;
|
|
56
|
+
/**
|
|
57
|
+
* Resolve the parts from right to left, up to the first absolute
|
|
58
|
+
* part. There is no working directory here: if no part is absolute,
|
|
59
|
+
* the result is a relative path.
|
|
60
|
+
*/
|
|
61
|
+
const resolve = (...parts) => {
|
|
62
|
+
let path = '';
|
|
63
|
+
for (let i = parts.length - 1; i >= 0 && !(0, exports.isAbsolute)(path); i--) {
|
|
64
|
+
const part = parts[i];
|
|
65
|
+
if (part)
|
|
66
|
+
path = path ? part + '/' + path : part;
|
|
67
|
+
}
|
|
68
|
+
const res = (0, exports.normalize)(path);
|
|
69
|
+
return res.length > 1 && res.endsWith('/') ? res.slice(0, -1) : res;
|
|
70
|
+
};
|
|
71
|
+
exports.resolve = resolve;
|
|
72
|
+
/** The relative path from `from` to `to`. */
|
|
73
|
+
const relative = (from, to) => {
|
|
74
|
+
const f = (0, exports.resolve)(from).split('/');
|
|
75
|
+
const t = (0, exports.resolve)(to).split('/');
|
|
76
|
+
// The root gives an empty last part.
|
|
77
|
+
if (!f[f.length - 1])
|
|
78
|
+
f.pop();
|
|
79
|
+
if (!t[t.length - 1])
|
|
80
|
+
t.pop();
|
|
81
|
+
let same = 0;
|
|
82
|
+
while (same < f.length && same < t.length && f[same] === t[same])
|
|
83
|
+
same++;
|
|
84
|
+
return [
|
|
85
|
+
...Array.from({ length: f.length - same }, () => '..'),
|
|
86
|
+
...t.slice(same),
|
|
87
|
+
].join('/');
|
|
88
|
+
};
|
|
89
|
+
exports.relative = relative;
|
|
90
|
+
//# sourceMappingURL=path.js.map
|
|
@@ -18,9 +18,11 @@ export declare class Pax implements HeaderData {
|
|
|
18
18
|
mode?: number;
|
|
19
19
|
global: boolean;
|
|
20
20
|
constructor(obj: HeaderData, global?: boolean);
|
|
21
|
-
encode():
|
|
21
|
+
encode(): Uint8Array<ArrayBuffer>;
|
|
22
22
|
encodeBody(): string;
|
|
23
23
|
encodeField(field: keyof Pax): string;
|
|
24
24
|
static parse(str: string, ex?: HeaderData, g?: boolean): Pax;
|
|
25
|
+
/** Parse the body of a PAX header entry. */
|
|
26
|
+
static parseBytes(buf: Uint8Array, ex?: HeaderData, g?: boolean): Pax;
|
|
25
27
|
}
|
|
26
28
|
//# sourceMappingURL=pax.d.ts.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Pax = void 0;
|
|
4
|
-
const node_path_1 = require("node:path");
|
|
5
4
|
const header_js_1 = require("./header.js");
|
|
5
|
+
const bytes_js_1 = require("./bytes.js");
|
|
6
|
+
const path_js_1 = require("./path.js");
|
|
7
|
+
const SIMPLE_NUMBER = /^\d+$/;
|
|
6
8
|
class Pax {
|
|
7
9
|
atime;
|
|
8
10
|
mtime;
|
|
@@ -42,24 +44,18 @@ class Pax {
|
|
|
42
44
|
encode() {
|
|
43
45
|
const body = this.encodeBody();
|
|
44
46
|
if (body === '') {
|
|
45
|
-
return
|
|
47
|
+
return new Uint8Array(0);
|
|
46
48
|
}
|
|
47
|
-
const bodyLen =
|
|
49
|
+
const bodyLen = (0, bytes_js_1.utf8Length)(body);
|
|
48
50
|
// round up to 512 bytes
|
|
49
51
|
// add 512 for header
|
|
50
52
|
const bufLen = 512 * Math.ceil(1 + bodyLen / 512);
|
|
51
|
-
const buf =
|
|
52
|
-
// 0-fill the header section, it might not hit every field
|
|
53
|
-
for (let i = 0; i < 512; i++) {
|
|
54
|
-
buf[i] = 0;
|
|
55
|
-
}
|
|
53
|
+
const buf = new Uint8Array(bufLen);
|
|
56
54
|
new header_js_1.Header({
|
|
57
55
|
// XXX split the path
|
|
58
56
|
// then the path should be PaxHeader + basename, but less than 99,
|
|
59
57
|
// prepend with the dirname
|
|
60
|
-
|
|
61
|
-
path: ('PaxHeader/' + (0, node_path_1.basename)(this.path ?? '')).slice(0, 99),
|
|
62
|
-
/* c8 ignore stop */
|
|
58
|
+
path: ('PaxHeader/' + (0, path_js_1.basename)(this.path ?? '')).slice(0, 99),
|
|
63
59
|
mode: this.mode || 0o644,
|
|
64
60
|
uid: this.uid,
|
|
65
61
|
gid: this.gid,
|
|
@@ -74,11 +70,7 @@ class Pax {
|
|
|
74
70
|
atime: this.atime,
|
|
75
71
|
ctime: this.ctime,
|
|
76
72
|
}).encode(buf);
|
|
77
|
-
|
|
78
|
-
// null pad after the body
|
|
79
|
-
for (let i = bodyLen + 512; i < buf.length; i++) {
|
|
80
|
-
buf[i] = 0;
|
|
81
|
-
}
|
|
73
|
+
(0, bytes_js_1.encodeUtf8Into)(body, buf, 512, bodyLen);
|
|
82
74
|
return buf;
|
|
83
75
|
}
|
|
84
76
|
encodeBody() {
|
|
@@ -103,7 +95,7 @@ class Pax {
|
|
|
103
95
|
return '';
|
|
104
96
|
}
|
|
105
97
|
const r = this[field];
|
|
106
|
-
const v = r
|
|
98
|
+
const v = typeof r === 'object' ? r.getTime() / 1000 : r;
|
|
107
99
|
const s = ' ' +
|
|
108
100
|
(field === 'dev' || field === 'ino' || field === 'nlink' ?
|
|
109
101
|
'SCHILY.'
|
|
@@ -112,7 +104,7 @@ class Pax {
|
|
|
112
104
|
'=' +
|
|
113
105
|
v +
|
|
114
106
|
'\n';
|
|
115
|
-
const byteLen =
|
|
107
|
+
const byteLen = (0, bytes_js_1.utf8Length)(s);
|
|
116
108
|
// the digits includes the length of the digits in ascii base-10
|
|
117
109
|
// so if it's 9 characters, then adding 1 for the 9 makes it 10
|
|
118
110
|
// which makes it 11 chars.
|
|
@@ -124,30 +116,57 @@ class Pax {
|
|
|
124
116
|
return len + s;
|
|
125
117
|
}
|
|
126
118
|
static parse(str, ex, g = false) {
|
|
127
|
-
return new
|
|
119
|
+
return Pax.parseBytes(new TextEncoder().encode(str), ex, g);
|
|
120
|
+
}
|
|
121
|
+
/** Parse the body of a PAX header entry. */
|
|
122
|
+
static parseBytes(buf, ex, g = false) {
|
|
123
|
+
return new Pax(merge(parseKV(buf), ex), g);
|
|
128
124
|
}
|
|
129
125
|
}
|
|
130
126
|
exports.Pax = Pax;
|
|
131
127
|
const merge = (a, b) => b ? Object.assign({}, b, a) : a;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
128
|
+
// Each record is "<len> <key>=<value>\n". <len> is the byte length of
|
|
129
|
+
// the whole record. A value can contain a newline, so use the length
|
|
130
|
+
// to find the end of the record. A NUL where a record starts is the
|
|
131
|
+
// end of the records, as it is for GNU tar and Python. A record that
|
|
132
|
+
// is not valid is an error, because the records after it can set the
|
|
133
|
+
// size or the name of the entry.
|
|
134
|
+
const parseKV = (buf) => {
|
|
135
|
+
const set = Object.create(null);
|
|
136
|
+
let pos = 0;
|
|
137
|
+
while (pos < buf.length && buf[pos] !== 0) {
|
|
138
|
+
let sp = pos;
|
|
139
|
+
while (sp < buf.length &&
|
|
140
|
+
buf[sp] >= 0x30 &&
|
|
141
|
+
buf[sp] <= 0x39) {
|
|
142
|
+
sp++;
|
|
143
|
+
}
|
|
144
|
+
const end = pos + Number((0, bytes_js_1.decodeUtf8)(buf, pos, sp));
|
|
145
|
+
if (sp === pos ||
|
|
146
|
+
buf[sp] !== 0x20 ||
|
|
147
|
+
end <= sp + 1 ||
|
|
148
|
+
end > buf.length ||
|
|
149
|
+
buf[end - 1] !== 0x0a) {
|
|
150
|
+
throw new Error('invalid PAX record');
|
|
151
|
+
}
|
|
152
|
+
parseKVLine(set, (0, bytes_js_1.decodeUtf8)(buf, sp + 1, end - 1));
|
|
153
|
+
pos = end;
|
|
142
154
|
}
|
|
143
|
-
|
|
155
|
+
return set;
|
|
156
|
+
};
|
|
157
|
+
const parseKVLine = (set, line) => {
|
|
144
158
|
const kv = line.split('=');
|
|
159
|
+
if (kv.length === 1)
|
|
160
|
+
throw new Error('invalid PAX record');
|
|
145
161
|
const r = kv.shift();
|
|
146
162
|
if (!r) {
|
|
147
163
|
return set;
|
|
148
164
|
}
|
|
149
165
|
const k = r.replace(/^SCHILY\.(dev|ino|nlink)/, '$1');
|
|
150
|
-
|
|
166
|
+
// The value ends at the first NUL.
|
|
167
|
+
const joined = kv.join('=');
|
|
168
|
+
const nul = joined.indexOf('\0');
|
|
169
|
+
const v = nul === -1 ? joined : joined.slice(0, nul);
|
|
151
170
|
switch (k) {
|
|
152
171
|
case 'path':
|
|
153
172
|
case 'linkpath':
|
|
@@ -161,12 +180,18 @@ const parseKVLine = (set, line) => {
|
|
|
161
180
|
case 'ctime':
|
|
162
181
|
case 'atime':
|
|
163
182
|
case 'mtime':
|
|
164
|
-
|
|
183
|
+
const d = new Date(Number(v) * 1000);
|
|
184
|
+
if (!isNaN(d.getTime()))
|
|
185
|
+
set[k] = d;
|
|
165
186
|
break;
|
|
166
187
|
case 'size':
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
188
|
+
// The size sets where the next header is. Other tar programs
|
|
189
|
+
// read a value that is not only decimal digits in different
|
|
190
|
+
// ways, so it is an error.
|
|
191
|
+
if (!SIMPLE_NUMBER.test(joined) || !Number.isSafeInteger(+joined)) {
|
|
192
|
+
throw new Error('invalid PAX size');
|
|
193
|
+
}
|
|
194
|
+
set[k] = +joined;
|
|
170
195
|
break;
|
|
171
196
|
case 'gid':
|
|
172
197
|
case 'uid':
|
|
@@ -174,7 +199,13 @@ const parseKVLine = (set, line) => {
|
|
|
174
199
|
case 'ino':
|
|
175
200
|
case 'nlink':
|
|
176
201
|
case 'mode':
|
|
177
|
-
|
|
202
|
+
// value must be a string of decimal digits
|
|
203
|
+
if (!SIMPLE_NUMBER.test(v.trim()))
|
|
204
|
+
break;
|
|
205
|
+
const s = +v;
|
|
206
|
+
if (!Number.isSafeInteger(s))
|
|
207
|
+
break;
|
|
208
|
+
set[k] = s;
|
|
178
209
|
break;
|
|
179
210
|
}
|
|
180
211
|
return set;
|