@unbrained/pm-cli 2026.12.1 → 2026.12.3
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 +4 -4
- package/dist/cli/expected-revisions.js +1 -1
- package/dist/cli/extension-command-help.js +4 -4
- package/dist/cli/main.js +5 -5
- package/dist/cli/runtime/invocation-rewrites.js +1 -1
- package/dist/cli/runtime-field-commands.js +2 -0
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/chunk-3ESBFEQC.js +2 -0
- package/dist/cli-bundle/chunks/chunk-46AZP5QW.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-OBPO6V7H.js → chunk-5WTBF4M4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3KEMIPKG.js → chunk-6TOZQ5BQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4YYFY33T.js → chunk-AHVOEE7F.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-CQHB3ZZH.js +2 -0
- package/dist/cli-bundle/chunks/chunk-DZPOS3YT.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-OKEJ4U2I.js → chunk-E5ADC3HT.js} +65 -65
- package/dist/cli-bundle/chunks/{chunk-SY5C3U32.js → chunk-E5HO7HWP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3HKPVOAN.js → chunk-EDJ3KR2H.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XME6GIFQ.js → chunk-FWQNWPIV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CWPR234D.js → chunk-H4U3LEOD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MZZ4ZJ5Z.js → chunk-HNMED75Y.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-U7RBJGLF.js → chunk-HPCMM74Q.js} +22 -22
- package/dist/cli-bundle/chunks/{chunk-WSEIEDEK.js → chunk-ITM4AMVM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q6K7HWZ7.js → chunk-IW4A3I4N.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4YQMQOUO.js → chunk-JJ73G5UT.js} +52 -52
- package/dist/cli-bundle/chunks/chunk-L4HMFRHB.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-YSVOXCYH.js → chunk-LTQWPQ7H.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q6GLSAJY.js → chunk-MRT3ADO4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZL6J6JYT.js → chunk-PBMLIV74.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NA6D75V5.js → chunk-PJMGWJKU.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-Q2HMDV56.js +9 -0
- package/dist/cli-bundle/chunks/{chunk-OXC5KBIQ.js → chunk-RRBNCL63.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CBUC4X7Q.js → chunk-TDOF7BKO.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-UXEZXGAD.js +113 -0
- package/dist/cli-bundle/chunks/{chunk-PCDTWL6V.js → chunk-W7HA65EO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-I4SPJQQI.js → chunk-XGNUDSCG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-AHV3CSQG.js → chunk-XKJ5NWQ7.js} +2 -2
- package/dist/cli-bundle/chunks/{field-option-collisions-BBGTV7AD.js → field-option-collisions-DXKTKW6J.js} +2 -2
- package/dist/cli-bundle/chunks/item-revision-DXEF4XBU.js +2 -0
- package/dist/cli-bundle/chunks/item-transaction-EANA7V4W.js +2 -0
- package/dist/cli-bundle/chunks/{linked-resource-value-list-E2DX52LY.js → linked-resource-value-list-5JRGUDUB.js} +2 -2
- package/dist/cli-bundle/chunks/{mutation-actor-NHN33ITJ.js → mutation-actor-S5G7FMNG.js} +2 -2
- package/dist/cli-bundle/chunks/{mutation-admission-PGKJTCG6.js → mutation-admission-HQVNPOXV.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-7S5QWDTI.js → register-list-query-SQF5PSJ4.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-2F6JUBST.js → register-mutation-4AQ4CEBL.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-ET3UKPYK.js → register-operations-76P7OM4P.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-I63QTFCU.js → register-setup-T6OEOZK3.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-4ZCF74G4.js → stage-KUICZHSF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-4SCFAWAW.js → chunk-3LHBKFPD.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-4DDXERKN.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-JPZGC3W4.js → chunk-4YU75CWI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-TXTPAFHJ.js → chunk-5JQVPQMN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-KNBGHCIP.js → chunk-5Z4DXYBZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-7DOP5HEZ.js +44 -0
- package/dist/cli-bundle/focused-chunks/{chunk-TR22GU7M.js → chunk-AX4RBJ7B.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-7A6SEZEY.js → chunk-BEHQCHQV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-BUIF6CMZ.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-E2IWEJL5.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-GBU7GKNJ.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-EQCQTYKO.js → chunk-K35KTBDZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-VQIC3UZB.js → chunk-KNST4PGF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-P2H3GTJK.js → chunk-L2XJB5PK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-L6NOGC4N.js +100 -0
- package/dist/cli-bundle/focused-chunks/{chunk-VK3IE3TS.js → chunk-LWIIDPAV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-6IY5CVGJ.js → chunk-M54BMYG4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-6BKT6XQN.js → chunk-NEK7RX3N.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-BHNBPCHP.js → chunk-OKGWIW6C.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-2DGKVXFT.js → chunk-RFDSSOTZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-SSX5YBDC.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-OG57ESZK.js → chunk-TIEQVIFN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SQ72CVUH.js → chunk-VEUBDQDP.js} +54 -54
- package/dist/cli-bundle/focused-chunks/{chunk-2UWKU2BQ.js → chunk-WDHNPNHX.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{field-option-collisions-2C6DLUC4.js → field-option-collisions-32X7FP3H.js} +2 -2
- package/dist/cli-bundle/focused-chunks/item-revision-GUYSVVQD.js +2 -0
- package/dist/cli-bundle/focused-chunks/{item-transaction-2K4SFLJ7.js → item-transaction-MLKHZPL7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-actor-DJMZUIZI.js → mutation-actor-RDZJTRW2.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-admission-SDWQVVHN.js → mutation-admission-IQB6XL75.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-QBZIK3T5.js → stage-AA7LORZ2.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 +63 -63
- 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 +9 -9
- package/dist/core/extensions/loader.d.ts +8 -0
- package/dist/core/extensions/loader.js +1 -1
- package/dist/core/item/actionability.js +1 -1
- package/dist/core/output/output.js +16 -16
- package/dist/mcp/server.js +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +25 -1
- package/dist/sdk/cli-contracts/enum-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
- package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +1 -1
- package/dist/sdk/context-intent-contracts.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 +27 -8
- package/dist/sdk/lifecycle/expect-hash-admission.js +1 -1
- package/dist/sdk/lifecycle/item-revision.d.ts +12 -4
- package/dist/sdk/lifecycle/item-revision.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/read-output/surfaces.js +1 -1
- package/dist/sdk/runtime/schema.js +1 -1
- package/dist/sdk/runtime-input.d.ts +6 -0
- package/dist/sdk/runtime-input.js +1 -1
- package/dist/sdk/runtime-primitives.d.ts +1 -1
- package/dist/sdk/runtime-primitives.js +1 -1
- package/dist/sdk/runtime.js +1 -1
- package/docs/COMMANDS.md +23 -5
- package/docs/EXTENSIONS.md +1 -1
- package/docs/SDK.md +15 -2
- 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-A5ZEMOVR.js +0 -2
- package/dist/cli-bundle/chunks/chunk-AJLU6KLW.js +0 -2
- package/dist/cli-bundle/chunks/chunk-C6WM6ZN4.js +0 -9
- package/dist/cli-bundle/chunks/chunk-HZZLSBIJ.js +0 -2
- package/dist/cli-bundle/chunks/chunk-L2ZSSMYY.js +0 -2
- package/dist/cli-bundle/chunks/chunk-NRQCBUYD.js +0 -113
- package/dist/cli-bundle/chunks/chunk-QDV7S2QS.js +0 -2
- package/dist/cli-bundle/chunks/item-revision-3LENTXYF.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-66RDV7PH.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HTDYNY4L.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-N64AC5G6.js +0 -100
- package/dist/cli-bundle/focused-chunks/chunk-PT7RT3T6.js +0 -44
- package/dist/cli-bundle/focused-chunks/chunk-QZRYGYTI.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-SQMOF65W.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-T3ILWAEV.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-W4JMV7GF.js +0 -3
- package/dist/cli-bundle/focused-chunks/item-revision-723XCQPS.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
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import type { OpenConstants } from './write-flag.js';
|
|
2
|
+
/** The subset of a `node:fs/promises` `FileHandle` that the code uses. */
|
|
3
|
+
export type TarFileHandle = {
|
|
4
|
+
read(buffer: Uint8Array, offset: number, length: number, position: number): Promise<{
|
|
5
|
+
bytesRead: number;
|
|
6
|
+
}>;
|
|
7
|
+
stat(): Promise<{
|
|
8
|
+
size: number;
|
|
9
|
+
}>;
|
|
10
|
+
close(): Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
/** The subset of `node:fs/promises` that the code uses. */
|
|
13
|
+
export type TarFS = {
|
|
14
|
+
open(path: string, flags: string): Promise<TarFileHandle>;
|
|
15
|
+
};
|
|
16
|
+
/** The subset of `node:fs` that the sync code uses. */
|
|
17
|
+
export type TarFSSync = {
|
|
18
|
+
openSync(path: string, flags: string): number;
|
|
19
|
+
fstatSync(fd: number): {
|
|
20
|
+
size: number;
|
|
21
|
+
};
|
|
22
|
+
readSync(fd: number, buffer: Uint8Array, offset: number, length: number, position: number): number;
|
|
23
|
+
closeSync(fd: number): void;
|
|
24
|
+
};
|
|
25
|
+
/** The subset of the `Stats` of `lstat` that the extraction uses. */
|
|
26
|
+
export type ExtractStats = {
|
|
27
|
+
isDirectory(): boolean;
|
|
28
|
+
isFile(): boolean;
|
|
29
|
+
isSymbolicLink(): boolean;
|
|
30
|
+
nlink: number;
|
|
31
|
+
mode: number;
|
|
32
|
+
mtime: Date;
|
|
33
|
+
};
|
|
34
|
+
/** The subset of a `FileHandle` that the extraction uses. */
|
|
35
|
+
export type ExtractFileHandle = {
|
|
36
|
+
write(data: Uint8Array): Promise<unknown>;
|
|
37
|
+
utimes(atime: Date, mtime: Date): Promise<void>;
|
|
38
|
+
chown(uid: number, gid: number): Promise<void>;
|
|
39
|
+
close(): Promise<void>;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* The subset of `node:fs/promises` that the extraction uses. To read
|
|
43
|
+
* the archive from a file, it also uses `TarFS`.
|
|
44
|
+
*/
|
|
45
|
+
export type ExtractFS = {
|
|
46
|
+
/** Without it, the flag of `open` is `'w'`. */
|
|
47
|
+
constants?: OpenConstants;
|
|
48
|
+
open(path: string, flags: string | number, mode: number): Promise<ExtractFileHandle>;
|
|
49
|
+
stat(path: string): Promise<{
|
|
50
|
+
isDirectory(): boolean;
|
|
51
|
+
}>;
|
|
52
|
+
lstat(path: string): Promise<ExtractStats>;
|
|
53
|
+
mkdir(path: string, options: {
|
|
54
|
+
mode: number;
|
|
55
|
+
recursive?: boolean;
|
|
56
|
+
}): Promise<string | undefined>;
|
|
57
|
+
chmod(path: string, mode: number): Promise<void>;
|
|
58
|
+
chown(path: string, uid: number, gid: number): Promise<void>;
|
|
59
|
+
lchown(path: string, uid: number, gid: number): Promise<void>;
|
|
60
|
+
utimes(path: string, atime: Date, mtime: Date): Promise<void>;
|
|
61
|
+
lutimes(path: string, atime: Date, mtime: Date): Promise<void>;
|
|
62
|
+
rmdir(path: string): Promise<void>;
|
|
63
|
+
unlink(path: string): Promise<void>;
|
|
64
|
+
rename(from: string, to: string): Promise<void>;
|
|
65
|
+
link(target: string, path: string): Promise<void>;
|
|
66
|
+
symlink(target: string, path: string): Promise<void>;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* The subset of `node:fs` that the sync extraction uses. To read the
|
|
70
|
+
* archive from a file, it also uses `TarFSSync`.
|
|
71
|
+
*/
|
|
72
|
+
export type ExtractFSSync = {
|
|
73
|
+
/** Without it, the flag of `openSync` is `'w'`. */
|
|
74
|
+
constants?: OpenConstants;
|
|
75
|
+
openSync(path: string, flags: string | number, mode: number): number;
|
|
76
|
+
writeSync(fd: number, data: Uint8Array): number;
|
|
77
|
+
futimesSync(fd: number, atime: Date, mtime: Date): void;
|
|
78
|
+
fchownSync(fd: number, uid: number, gid: number): void;
|
|
79
|
+
closeSync(fd: number): void;
|
|
80
|
+
statSync(path: string): {
|
|
81
|
+
isDirectory(): boolean;
|
|
82
|
+
};
|
|
83
|
+
lstatSync(path: string): ExtractStats;
|
|
84
|
+
mkdirSync(path: string, options: {
|
|
85
|
+
mode: number;
|
|
86
|
+
recursive?: boolean;
|
|
87
|
+
}): string | undefined;
|
|
88
|
+
chmodSync(path: string, mode: number): void;
|
|
89
|
+
chownSync(path: string, uid: number, gid: number): void;
|
|
90
|
+
lchownSync(path: string, uid: number, gid: number): void;
|
|
91
|
+
utimesSync(path: string, atime: Date, mtime: Date): void;
|
|
92
|
+
lutimesSync(path: string, atime: Date, mtime: Date): void;
|
|
93
|
+
rmdirSync(path: string): void;
|
|
94
|
+
unlinkSync(path: string): void;
|
|
95
|
+
renameSync(from: string, to: string): void;
|
|
96
|
+
linkSync(target: string, path: string): void;
|
|
97
|
+
symlinkSync(target: string, path: string): void;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* The device number and the inode number of a file. With the option
|
|
101
|
+
* `bigint: true`, `node:fs` gives them as `bigint` values, which are
|
|
102
|
+
* exact. A `number` larger than `Number.MAX_SAFE_INTEGER` is not
|
|
103
|
+
* exact: two files can have the same value.
|
|
104
|
+
*/
|
|
105
|
+
export type FileId = {
|
|
106
|
+
dev: number | bigint;
|
|
107
|
+
ino: number | bigint;
|
|
108
|
+
};
|
|
109
|
+
/** The option that asks for the exact `FileId` of a file. */
|
|
110
|
+
export type BigIntOption = {
|
|
111
|
+
bigint: true;
|
|
112
|
+
};
|
|
113
|
+
/** The subset of the `Stats` of `lstat` that the creation uses. */
|
|
114
|
+
export type CreateStats = {
|
|
115
|
+
isFile(): boolean;
|
|
116
|
+
isDirectory(): boolean;
|
|
117
|
+
isSymbolicLink(): boolean;
|
|
118
|
+
dev: number;
|
|
119
|
+
ino: number;
|
|
120
|
+
nlink: number;
|
|
121
|
+
mode: number;
|
|
122
|
+
uid: number;
|
|
123
|
+
gid: number;
|
|
124
|
+
size: number;
|
|
125
|
+
mtime: Date;
|
|
126
|
+
atime: Date;
|
|
127
|
+
ctime: Date;
|
|
128
|
+
};
|
|
129
|
+
/** The subset of a `FileHandle` that the creation uses. */
|
|
130
|
+
export type CreateFileHandle = {
|
|
131
|
+
read(buffer: Uint8Array, offset: number, length: number, position: number): Promise<{
|
|
132
|
+
bytesRead: number;
|
|
133
|
+
}>;
|
|
134
|
+
write(buffer: Uint8Array, offset: number, length: number, position: number): Promise<{
|
|
135
|
+
bytesWritten: number;
|
|
136
|
+
}>;
|
|
137
|
+
stat(): Promise<{
|
|
138
|
+
size: number;
|
|
139
|
+
dev: number;
|
|
140
|
+
ino: number;
|
|
141
|
+
}>;
|
|
142
|
+
close(): Promise<void>;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* The subset of `node:fs/promises` that the creation uses. It also
|
|
146
|
+
* fits `TarFS`, which reads an `@archive` operand.
|
|
147
|
+
*
|
|
148
|
+
* The creation calls `lstat` (`stat` with `follow`) a second time,
|
|
149
|
+
* with the option `bigint: true`, only when the `dev` or `ino` number
|
|
150
|
+
* is not a safe integer, and only for a file with more than one link,
|
|
151
|
+
* or with `follow` for a directory. A function can ignore the option
|
|
152
|
+
* and return numbers.
|
|
153
|
+
*/
|
|
154
|
+
export type CreateFS = {
|
|
155
|
+
open(path: string, flags: string, mode?: number): Promise<CreateFileHandle>;
|
|
156
|
+
lstat(path: string): Promise<CreateStats>;
|
|
157
|
+
lstat(path: string, options: BigIntOption): Promise<FileId>;
|
|
158
|
+
stat(path: string): Promise<CreateStats>;
|
|
159
|
+
stat(path: string, options: BigIntOption): Promise<FileId>;
|
|
160
|
+
readdir(path: string): Promise<string[]>;
|
|
161
|
+
readlink(path: string): Promise<string>;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* The subset of `node:fs` that the sync creation uses. It also fits
|
|
165
|
+
* `TarFSSync`, which reads an `@archive` operand. The `bigint` option
|
|
166
|
+
* is used as in `CreateFS`.
|
|
167
|
+
*/
|
|
168
|
+
export type CreateFSSync = {
|
|
169
|
+
openSync(path: string, flags: string, mode?: number): number;
|
|
170
|
+
fstatSync(fd: number): {
|
|
171
|
+
size: number;
|
|
172
|
+
dev: number;
|
|
173
|
+
ino: number;
|
|
174
|
+
};
|
|
175
|
+
readSync(fd: number, buffer: Uint8Array, offset: number, length: number, position: number): number;
|
|
176
|
+
writeSync(fd: number, buffer: Uint8Array, offset: number, length: number, position: number): number;
|
|
177
|
+
closeSync(fd: number): void;
|
|
178
|
+
lstatSync(path: string): CreateStats;
|
|
179
|
+
lstatSync(path: string, options: BigIntOption): FileId;
|
|
180
|
+
statSync(path: string): CreateStats;
|
|
181
|
+
statSync(path: string, options: BigIntOption): FileId;
|
|
182
|
+
readdirSync(path: string): string[];
|
|
183
|
+
readlinkSync(path: string): string;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* The subset of `node:fs/promises` that `replace` and `update` use:
|
|
187
|
+
* `open` with the flags `'r+'`, `'w+'`, and `'r'`, the functions of a
|
|
188
|
+
* file handle, and the functions that read the files to add.
|
|
189
|
+
*/
|
|
190
|
+
export type ReplaceFS = CreateFS;
|
|
191
|
+
/** The subset of `node:fs` that `replaceSync` and `updateSync` use. */
|
|
192
|
+
export type ReplaceFSSync = CreateFSSync;
|
|
193
|
+
/**
|
|
194
|
+
* The subset of `node:fs/promises` that `delete` uses: the functions
|
|
195
|
+
* that read and write an archive file, `stat`, `rename`, and
|
|
196
|
+
* `unlink`.
|
|
197
|
+
*/
|
|
198
|
+
export type DeleteFS = TarFS & CreateFS & Pick<ExtractFS, 'rename' | 'unlink'>;
|
|
199
|
+
/** The subset of `node:fs` that `deleteSync` uses. */
|
|
200
|
+
export type DeleteFSSync = TarFSSync & CreateFSSync & Pick<ExtractFSSync, 'renameSync' | 'unlinkSync'>;
|
|
201
|
+
//# sourceMappingURL=fs.d.ts.map
|
|
@@ -26,7 +26,7 @@ export declare class Header implements HeaderData {
|
|
|
26
26
|
cksumValid: boolean;
|
|
27
27
|
needPax: boolean;
|
|
28
28
|
nullBlock: boolean;
|
|
29
|
-
block?:
|
|
29
|
+
block?: Uint8Array;
|
|
30
30
|
path?: string;
|
|
31
31
|
mode?: number;
|
|
32
32
|
uid?: number;
|
|
@@ -43,9 +43,9 @@ export declare class Header implements HeaderData {
|
|
|
43
43
|
mtime?: Date;
|
|
44
44
|
charset?: string;
|
|
45
45
|
comment?: string;
|
|
46
|
-
constructor(data?:
|
|
47
|
-
decode(buf:
|
|
48
|
-
encode(buf?:
|
|
46
|
+
constructor(data?: Uint8Array | HeaderData, off?: number, ex?: HeaderData, gex?: HeaderData);
|
|
47
|
+
decode(buf: Uint8Array, off: number, ex?: HeaderData, gex?: HeaderData): void;
|
|
48
|
+
encode(buf?: Uint8Array, off?: number): boolean;
|
|
49
49
|
get type(): EntryTypeName;
|
|
50
50
|
get typeKey(): EntryTypeCode | 'Unsupported';
|
|
51
51
|
set type(type: EntryTypeCode | EntryTypeName | 'Unsupported');
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// encode returns `true` if a pax extended header is needed, because
|
|
3
3
|
// the data could not be faithfully encoded in a simple header.
|
|
4
4
|
// (Also, check header.needPax to see if it needs a pax header.)
|
|
5
|
-
import {
|
|
5
|
+
import { decodeUtf8, encodeUtf8Into, isUint8Array, utf8Length, writeAscii, } from './bytes.js';
|
|
6
6
|
import * as large from './large-numbers.js';
|
|
7
|
+
import { basename, dirname, join } from './path.js';
|
|
7
8
|
import * as types from './types.js';
|
|
8
9
|
const notNegative = (n) => n === undefined || n < 0 ? undefined : n;
|
|
9
10
|
export class Header {
|
|
@@ -29,7 +30,7 @@ export class Header {
|
|
|
29
30
|
charset;
|
|
30
31
|
comment;
|
|
31
32
|
constructor(data, off = 0, ex, gex) {
|
|
32
|
-
if (
|
|
33
|
+
if (isUint8Array(data)) {
|
|
33
34
|
this.decode(data, off || 0, ex, gex);
|
|
34
35
|
}
|
|
35
36
|
else if (data) {
|
|
@@ -43,18 +44,20 @@ export class Header {
|
|
|
43
44
|
if (!buf || !(buf.length >= off + 512)) {
|
|
44
45
|
throw new Error('need 512 bytes for header');
|
|
45
46
|
}
|
|
46
|
-
// Decode the typeflag (independent of any pending PAX/GNU extended
|
|
47
|
-
// up front so we can tell whether THIS block is itself an
|
|
48
|
-
// extension header (PAX `x`/`g`, GNU long-name `L`,
|
|
49
|
-
// Per POSIX pax, a PAX extended header
|
|
50
|
-
// the
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
47
|
+
// Decode the typeflag (independent of any pending PAX/GNU extended
|
|
48
|
+
// header) up front so we can tell whether THIS block is itself an
|
|
49
|
+
// intermediary extension header (PAX `x`/`g`, GNU long-name `L`,
|
|
50
|
+
// GNU long-link `K`). Per POSIX pax, a PAX extended header
|
|
51
|
+
// describes the *next file entry*, not the extension headers that
|
|
52
|
+
// may sit between it and that file. Applying the pending PAX
|
|
53
|
+
// overrides (notably `size`) to an intervening `L`/`K`/`x`/`g`
|
|
54
|
+
// header desynchronizes the stream relative to other tar
|
|
55
|
+
// implementations and enables tar interpretation-conflict /
|
|
56
|
+
// file-smuggling attacks.
|
|
54
57
|
const t = decString(buf, off + 156, 1);
|
|
55
|
-
const
|
|
56
|
-
const exForFields =
|
|
57
|
-
const gexForFields =
|
|
58
|
+
const isMeta = /^[xgXLK]$/.test(t);
|
|
59
|
+
const exForFields = isMeta ? undefined : ex;
|
|
60
|
+
const gexForFields = isMeta ? undefined : gex;
|
|
58
61
|
this.path = exForFields?.path ?? decString(buf, off, 100);
|
|
59
62
|
this.mode =
|
|
60
63
|
exForFields?.mode ??
|
|
@@ -64,9 +67,9 @@ export class Header {
|
|
|
64
67
|
exForFields?.uid ?? gexForFields?.uid ?? decNumber(buf, off + 108, 8);
|
|
65
68
|
this.gid =
|
|
66
69
|
exForFields?.gid ?? gexForFields?.gid ?? decNumber(buf, off + 116, 8);
|
|
67
|
-
this.size = notNegative(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
this.size = notNegative(
|
|
71
|
+
// A global header does not set a size.
|
|
72
|
+
exForFields?.size ?? decSize(buf, off + 124));
|
|
70
73
|
this.mtime =
|
|
71
74
|
exForFields?.mtime ??
|
|
72
75
|
gexForFields?.mtime ??
|
|
@@ -96,8 +99,7 @@ export class Header {
|
|
|
96
99
|
this.size = 0;
|
|
97
100
|
}
|
|
98
101
|
this.linkpath = decString(buf, off + 157, 100);
|
|
99
|
-
if (buf
|
|
100
|
-
/* c8 ignore start */
|
|
102
|
+
if (decodeUtf8(buf, off + 257, off + 265) === 'ustar\u000000') {
|
|
101
103
|
this.uname =
|
|
102
104
|
exForFields?.uname ??
|
|
103
105
|
gexForFields?.uname ??
|
|
@@ -116,7 +118,6 @@ export class Header {
|
|
|
116
118
|
gexForFields?.devmin ??
|
|
117
119
|
decNumber(buf, off + 337, 8) ??
|
|
118
120
|
0;
|
|
119
|
-
/* c8 ignore stop */
|
|
120
121
|
if (buf[off + 475] !== 0) {
|
|
121
122
|
// definitely a prefix, definitely >130 chars.
|
|
122
123
|
const prefix = decString(buf, off + 345, 155);
|
|
@@ -127,10 +128,8 @@ export class Header {
|
|
|
127
128
|
if (prefix) {
|
|
128
129
|
this.path = prefix + '/' + this.path;
|
|
129
130
|
}
|
|
130
|
-
/* c8 ignore start */
|
|
131
131
|
this.atime = ex?.atime ?? gex?.atime ?? decDate(buf, off + 476, 12);
|
|
132
132
|
this.ctime = ex?.ctime ?? gex?.ctime ?? decDate(buf, off + 488, 12);
|
|
133
|
-
/* c8 ignore stop */
|
|
134
133
|
}
|
|
135
134
|
}
|
|
136
135
|
let sum = 8 * 0x20;
|
|
@@ -147,12 +146,12 @@ export class Header {
|
|
|
147
146
|
}
|
|
148
147
|
#slurp(ex, gex = false) {
|
|
149
148
|
Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => {
|
|
150
|
-
//
|
|
151
|
-
//
|
|
152
|
-
//
|
|
149
|
+
// A global extended header does not set a path, a
|
|
150
|
+
// linkpath, or a size. Also, any null/undefined values are
|
|
151
|
+
// ignored.
|
|
153
152
|
return !(v === null ||
|
|
154
153
|
v === undefined ||
|
|
155
|
-
(k === 'size' && Number(v) < 0) ||
|
|
154
|
+
(k === 'size' && (gex || Number(v) < 0)) ||
|
|
156
155
|
(k === 'path' && gex) ||
|
|
157
156
|
(k === 'linkpath' && gex) ||
|
|
158
157
|
k === 'global');
|
|
@@ -160,7 +159,7 @@ export class Header {
|
|
|
160
159
|
}
|
|
161
160
|
encode(buf, off = 0) {
|
|
162
161
|
if (!buf) {
|
|
163
|
-
buf = this.block =
|
|
162
|
+
buf = this.block = new Uint8Array(512);
|
|
164
163
|
}
|
|
165
164
|
if (this.#type === 'Unsupported') {
|
|
166
165
|
this.#type = '0';
|
|
@@ -182,7 +181,7 @@ export class Header {
|
|
|
182
181
|
buf[off + 156] = Number(this.#type.codePointAt(0));
|
|
183
182
|
this.needPax =
|
|
184
183
|
encString(buf, off + 157, 100, this.linkpath) || this.needPax;
|
|
185
|
-
|
|
184
|
+
writeAscii('ustar\u000000', buf, off + 257);
|
|
186
185
|
this.needPax =
|
|
187
186
|
encString(buf, off + 265, 32, this.uname) || this.needPax;
|
|
188
187
|
this.needPax =
|
|
@@ -241,29 +240,28 @@ const splitPrefix = (p, prefixSize) => {
|
|
|
241
240
|
let pp = p;
|
|
242
241
|
let prefix = '';
|
|
243
242
|
let ret = undefined;
|
|
244
|
-
const root =
|
|
245
|
-
if (
|
|
243
|
+
const root = p.charAt(0) === '/' ? '/' : '.';
|
|
244
|
+
if (utf8Length(pp) < pathSize) {
|
|
246
245
|
ret = [pp, prefix, false];
|
|
247
246
|
}
|
|
248
247
|
else {
|
|
249
248
|
// first set prefix to the dir, and path to the base
|
|
250
|
-
prefix =
|
|
251
|
-
pp =
|
|
249
|
+
prefix = dirname(pp);
|
|
250
|
+
pp = basename(pp);
|
|
252
251
|
do {
|
|
253
|
-
if (
|
|
254
|
-
Buffer.byteLength(prefix) <= prefixSize) {
|
|
252
|
+
if (utf8Length(pp) <= pathSize && utf8Length(prefix) <= prefixSize) {
|
|
255
253
|
// both fit!
|
|
256
254
|
ret = [pp, prefix, false];
|
|
257
255
|
}
|
|
258
|
-
else if (
|
|
259
|
-
|
|
256
|
+
else if (utf8Length(pp) > pathSize &&
|
|
257
|
+
utf8Length(prefix) <= prefixSize) {
|
|
260
258
|
// prefix fits in prefix, but path doesn't fit in path
|
|
261
259
|
ret = [pp.slice(0, pathSize - 1), prefix, true];
|
|
262
260
|
}
|
|
263
261
|
else {
|
|
264
262
|
// make path take a bit from prefix
|
|
265
|
-
pp =
|
|
266
|
-
prefix =
|
|
263
|
+
pp = join(basename(prefix), pp);
|
|
264
|
+
prefix = dirname(prefix);
|
|
267
265
|
}
|
|
268
266
|
} while (prefix !== root && ret === undefined);
|
|
269
267
|
// at this point, found no resolution, just truncate
|
|
@@ -273,21 +271,43 @@ const splitPrefix = (p, prefixSize) => {
|
|
|
273
271
|
}
|
|
274
272
|
return ret;
|
|
275
273
|
};
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
.
|
|
274
|
+
// The string ends at the first NUL, or at the end of the field.
|
|
275
|
+
const decString = (buf, off, size) => {
|
|
276
|
+
let end = off;
|
|
277
|
+
const max = Math.min(off + size, buf.length);
|
|
278
|
+
while (end < max && buf[end] !== 0)
|
|
279
|
+
end++;
|
|
280
|
+
return decodeUtf8(buf, off, end);
|
|
281
|
+
};
|
|
280
282
|
const decDate = (buf, off, size) => numToDate(decNumber(buf, off, size));
|
|
281
283
|
const numToDate = (num) => num === undefined ? undefined : new Date(num * 1000);
|
|
282
284
|
const decNumber = (buf, off, size) => Number(buf[off]) & 0x80 ?
|
|
283
|
-
|
|
285
|
+
decLarge(buf.subarray(off, off + size))
|
|
284
286
|
: decSmallNumber(buf, off, size);
|
|
287
|
+
// A base-256 field that is not valid has no value.
|
|
288
|
+
const decLarge = (buf) => {
|
|
289
|
+
try {
|
|
290
|
+
return large.parse(buf);
|
|
291
|
+
}
|
|
292
|
+
catch {
|
|
293
|
+
return undefined;
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
// The size sets where the next header is. Other tar programs read a
|
|
297
|
+
// field that is not only octal digits in different ways, so such a
|
|
298
|
+
// field has no value. A field with no digits is 0.
|
|
299
|
+
const decSize = (buf, off) => {
|
|
300
|
+
if (Number(buf[off]) & 0x80)
|
|
301
|
+
return decNumber(buf, off, 12);
|
|
302
|
+
const s = decString(buf, off, 12);
|
|
303
|
+
// No byte after the first NUL has a value.
|
|
304
|
+
return (/^ *[0-7]* *$/.test(s) &&
|
|
305
|
+
buf.subarray(off + s.length, off + 12).every(b => b === 0)) ?
|
|
306
|
+
parseInt(s, 8) || 0
|
|
307
|
+
: undefined;
|
|
308
|
+
};
|
|
285
309
|
const nanUndef = (value) => (isNaN(value) ? undefined : value);
|
|
286
|
-
const decSmallNumber = (buf, off, size) => nanUndef(parseInt(buf
|
|
287
|
-
.subarray(off, off + size)
|
|
288
|
-
.toString('utf8')
|
|
289
|
-
.replace(/\0.*$/, '')
|
|
290
|
-
.trim(), 8));
|
|
310
|
+
const decSmallNumber = (buf, off, size) => nanUndef(parseInt(decString(buf, off, size).trim(), 8));
|
|
291
311
|
// the maximum encodable as a null-terminated octal, by field size
|
|
292
312
|
const MAXNUM = {
|
|
293
313
|
12: 0o77777777777,
|
|
@@ -297,15 +317,13 @@ const encNumber = (buf, off, size, num) => num === undefined ? false
|
|
|
297
317
|
: num > MAXNUM[size] || num < 0 ?
|
|
298
318
|
(large.encode(num, buf.subarray(off, off + size)), true)
|
|
299
319
|
: (encSmallNumber(buf, off, size, num), false);
|
|
300
|
-
const encSmallNumber = (buf, off, size, num) =>
|
|
320
|
+
const encSmallNumber = (buf, off, size, num) => writeAscii(octalString(num, size), buf, off);
|
|
301
321
|
const octalString = (num, size) => padOctal(Math.floor(num).toString(8), size);
|
|
302
322
|
const padOctal = (str, size) => (str.length === size - 1 ?
|
|
303
323
|
str
|
|
304
|
-
:
|
|
324
|
+
: '0'.repeat(size - str.length - 2) + str + ' ') + '\0';
|
|
305
325
|
const encDate = (buf, off, size, date) => date === undefined ? false : (encNumber(buf, off, size, date.getTime() / 1000));
|
|
306
|
-
// enough to fill the longest string we've got
|
|
307
|
-
const NULLS = new Array(156).join('\0');
|
|
308
326
|
// pad with nulls, return true if it's longer or non-ascii
|
|
309
|
-
const encString = (buf, off, size, str) => str === undefined ? false : ((
|
|
310
|
-
str.length !==
|
|
327
|
+
const encString = (buf, off, size, str) => str === undefined ? false : ((encodeUtf8Into(str, buf, off, size),
|
|
328
|
+
str.length !== utf8Length(str) || str.length > size));
|
|
311
329
|
//# sourceMappingURL=header.js.map
|
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
3
|
-
export { create as c } from './create.js';
|
|
4
|
-
export * from './extract.js';
|
|
5
|
-
export { extract as x } from './extract.js';
|
|
6
|
-
export * from './header.js';
|
|
7
|
-
export * from './list.js';
|
|
8
|
-
export { list as t } from './list.js';
|
|
9
|
-
export * from './pack.js';
|
|
10
|
-
export * from './parse.js';
|
|
11
|
-
export * from './pax.js';
|
|
12
|
-
export * from './read-entry.js';
|
|
13
|
-
export * from './replace.js';
|
|
14
|
-
export { replace as r } from './replace.js';
|
|
1
|
+
export { Header, type HeaderData } from './header.js';
|
|
2
|
+
export { Pax } from './pax.js';
|
|
15
3
|
export * as types from './types.js';
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export {
|
|
19
|
-
export
|
|
4
|
+
export { gzip, type Codec, type CodecStream } from './codec.js';
|
|
5
|
+
export { create, create as c } from './create.js';
|
|
6
|
+
export { delete } from './delete.js';
|
|
7
|
+
export { CwdError } from './cwd-error.js';
|
|
8
|
+
export { aliases } from './dealias.js';
|
|
9
|
+
export type { Aliased, Aliases, AliasOf, FileOption, NoFileOption, RequiredOption, WithAliases, } from './dealias.js';
|
|
10
|
+
export { entries, EntryCursor, TarReader } from './entries.js';
|
|
11
|
+
export { extract, extract as x } from './extract.js';
|
|
12
|
+
export type * from './fs.js';
|
|
13
|
+
export { list, list as t } from './list.js';
|
|
14
|
+
export type { MkdirOptions } from './mkdir.js';
|
|
15
|
+
export type * from './options.js';
|
|
16
|
+
export { Pack, PackBase, PackJob, type Ancestor, type QueueNode, type PackInput, type PackInputSync, type PackLoad, } from './pack.js';
|
|
17
|
+
export { Parser, type CreateEntry, type ParseEvent } from './parser.js';
|
|
18
|
+
export { PathReservations } from './path-reservations.js';
|
|
19
|
+
export { EntryData, ReadEntry, type BodySource, type BodySourceSync, } from './read-entry.js';
|
|
20
|
+
export { AppendScan, replace, replace as r } from './replace.js';
|
|
21
|
+
export { SymlinkError } from './symlink-error.js';
|
|
22
|
+
export { Unpack, UnpackBase, type UnpackBaseOptions } from './unpack.js';
|
|
23
|
+
export { update, update as u } from './update.js';
|
|
24
|
+
export type { TarError, WarnData, WarnOptions } from './warn.js';
|
|
25
|
+
export { WriteEntry, type EncodeOptions, type WriteBody, type WriteEntryData, } from './write-entry.js';
|
|
26
|
+
export type { OpenConstants } from './write-flag.js';
|
|
20
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export { list as t } from './list.js';
|
|
8
|
-
// classes
|
|
9
|
-
export * from './pack.js';
|
|
10
|
-
export * from './parse.js';
|
|
11
|
-
export * from './pax.js';
|
|
12
|
-
export * from './read-entry.js';
|
|
13
|
-
export * from './replace.js';
|
|
14
|
-
export { replace as r } from './replace.js';
|
|
1
|
+
// The entry point for each runtime. It reads no file system and no
|
|
2
|
+
// process state: the caller gives them in the options. The entry
|
|
3
|
+
// point `server/index.ts` fills in those options, and adds the sync
|
|
4
|
+
// commands.
|
|
5
|
+
export { Header } from './header.js';
|
|
6
|
+
export { Pax } from './pax.js';
|
|
15
7
|
export * as types from './types.js';
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export {
|
|
19
|
-
export
|
|
8
|
+
export { gzip } from './codec.js';
|
|
9
|
+
export { create, create as c } from './create.js';
|
|
10
|
+
export { delete } from './delete.js';
|
|
11
|
+
export { CwdError } from './cwd-error.js';
|
|
12
|
+
export { aliases } from './dealias.js';
|
|
13
|
+
export { entries, EntryCursor, TarReader } from './entries.js';
|
|
14
|
+
export { extract, extract as x } from './extract.js';
|
|
15
|
+
export { list, list as t } from './list.js';
|
|
16
|
+
export { Pack, PackBase, PackJob, } from './pack.js';
|
|
17
|
+
export { Parser } from './parser.js';
|
|
18
|
+
export { PathReservations } from './path-reservations.js';
|
|
19
|
+
export { EntryData, ReadEntry, } from './read-entry.js';
|
|
20
|
+
export { AppendScan, replace, replace as r } from './replace.js';
|
|
21
|
+
export { SymlinkError } from './symlink-error.js';
|
|
22
|
+
export { Unpack, UnpackBase } from './unpack.js';
|
|
23
|
+
export { update, update as u } from './update.js';
|
|
24
|
+
export { WriteEntry, } from './write-entry.js';
|
|
20
25
|
//# sourceMappingURL=index.js.map
|