@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.
Files changed (376) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/cli/commander-usage.js +4 -4
  3. package/dist/cli/expected-revisions.js +1 -1
  4. package/dist/cli/extension-command-help.js +4 -4
  5. package/dist/cli/main.js +5 -5
  6. package/dist/cli/runtime/invocation-rewrites.js +1 -1
  7. package/dist/cli/runtime-field-commands.js +2 -0
  8. package/dist/cli-bundle/bundle-manifest.json +1 -1
  9. package/dist/cli-bundle/chunks/chunk-3ESBFEQC.js +2 -0
  10. package/dist/cli-bundle/chunks/chunk-46AZP5QW.js +2 -0
  11. package/dist/cli-bundle/chunks/{chunk-OBPO6V7H.js → chunk-5WTBF4M4.js} +2 -2
  12. package/dist/cli-bundle/chunks/{chunk-3KEMIPKG.js → chunk-6TOZQ5BQ.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-4YYFY33T.js → chunk-AHVOEE7F.js} +2 -2
  14. package/dist/cli-bundle/chunks/chunk-CQHB3ZZH.js +2 -0
  15. package/dist/cli-bundle/chunks/chunk-DZPOS3YT.js +2 -0
  16. package/dist/cli-bundle/chunks/{chunk-OKEJ4U2I.js → chunk-E5ADC3HT.js} +65 -65
  17. package/dist/cli-bundle/chunks/{chunk-SY5C3U32.js → chunk-E5HO7HWP.js} +2 -2
  18. package/dist/cli-bundle/chunks/{chunk-3HKPVOAN.js → chunk-EDJ3KR2H.js} +2 -2
  19. package/dist/cli-bundle/chunks/{chunk-XME6GIFQ.js → chunk-FWQNWPIV.js} +2 -2
  20. package/dist/cli-bundle/chunks/{chunk-CWPR234D.js → chunk-H4U3LEOD.js} +2 -2
  21. package/dist/cli-bundle/chunks/{chunk-MZZ4ZJ5Z.js → chunk-HNMED75Y.js} +2 -2
  22. package/dist/cli-bundle/chunks/{chunk-U7RBJGLF.js → chunk-HPCMM74Q.js} +22 -22
  23. package/dist/cli-bundle/chunks/{chunk-WSEIEDEK.js → chunk-ITM4AMVM.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-Q6K7HWZ7.js → chunk-IW4A3I4N.js} +2 -2
  25. package/dist/cli-bundle/chunks/{chunk-4YQMQOUO.js → chunk-JJ73G5UT.js} +52 -52
  26. package/dist/cli-bundle/chunks/chunk-L4HMFRHB.js +2 -0
  27. package/dist/cli-bundle/chunks/{chunk-YSVOXCYH.js → chunk-LTQWPQ7H.js} +2 -2
  28. package/dist/cli-bundle/chunks/{chunk-Q6GLSAJY.js → chunk-MRT3ADO4.js} +2 -2
  29. package/dist/cli-bundle/chunks/{chunk-ZL6J6JYT.js → chunk-PBMLIV74.js} +2 -2
  30. package/dist/cli-bundle/chunks/{chunk-NA6D75V5.js → chunk-PJMGWJKU.js} +2 -2
  31. package/dist/cli-bundle/chunks/chunk-Q2HMDV56.js +9 -0
  32. package/dist/cli-bundle/chunks/{chunk-OXC5KBIQ.js → chunk-RRBNCL63.js} +2 -2
  33. package/dist/cli-bundle/chunks/{chunk-CBUC4X7Q.js → chunk-TDOF7BKO.js} +3 -3
  34. package/dist/cli-bundle/chunks/chunk-UXEZXGAD.js +113 -0
  35. package/dist/cli-bundle/chunks/{chunk-PCDTWL6V.js → chunk-W7HA65EO.js} +2 -2
  36. package/dist/cli-bundle/chunks/{chunk-I4SPJQQI.js → chunk-XGNUDSCG.js} +3 -3
  37. package/dist/cli-bundle/chunks/{chunk-AHV3CSQG.js → chunk-XKJ5NWQ7.js} +2 -2
  38. package/dist/cli-bundle/chunks/{field-option-collisions-BBGTV7AD.js → field-option-collisions-DXKTKW6J.js} +2 -2
  39. package/dist/cli-bundle/chunks/item-revision-DXEF4XBU.js +2 -0
  40. package/dist/cli-bundle/chunks/item-transaction-EANA7V4W.js +2 -0
  41. package/dist/cli-bundle/chunks/{linked-resource-value-list-E2DX52LY.js → linked-resource-value-list-5JRGUDUB.js} +2 -2
  42. package/dist/cli-bundle/chunks/{mutation-actor-NHN33ITJ.js → mutation-actor-S5G7FMNG.js} +2 -2
  43. package/dist/cli-bundle/chunks/{mutation-admission-PGKJTCG6.js → mutation-admission-HQVNPOXV.js} +2 -2
  44. package/dist/cli-bundle/chunks/{register-list-query-7S5QWDTI.js → register-list-query-SQF5PSJ4.js} +2 -2
  45. package/dist/cli-bundle/chunks/{register-mutation-2F6JUBST.js → register-mutation-4AQ4CEBL.js} +2 -2
  46. package/dist/cli-bundle/chunks/{register-operations-ET3UKPYK.js → register-operations-76P7OM4P.js} +2 -2
  47. package/dist/cli-bundle/chunks/{register-setup-I63QTFCU.js → register-setup-T6OEOZK3.js} +2 -2
  48. package/dist/cli-bundle/chunks/{stage-4ZCF74G4.js → stage-KUICZHSF.js} +2 -2
  49. package/dist/cli-bundle/focused-chunks/{chunk-4SCFAWAW.js → chunk-3LHBKFPD.js} +2 -2
  50. package/dist/cli-bundle/focused-chunks/chunk-4DDXERKN.js +2 -0
  51. package/dist/cli-bundle/focused-chunks/{chunk-JPZGC3W4.js → chunk-4YU75CWI.js} +2 -2
  52. package/dist/cli-bundle/focused-chunks/{chunk-TXTPAFHJ.js → chunk-5JQVPQMN.js} +2 -2
  53. package/dist/cli-bundle/focused-chunks/{chunk-KNBGHCIP.js → chunk-5Z4DXYBZ.js} +2 -2
  54. package/dist/cli-bundle/focused-chunks/chunk-7DOP5HEZ.js +44 -0
  55. package/dist/cli-bundle/focused-chunks/{chunk-TR22GU7M.js → chunk-AX4RBJ7B.js} +2 -2
  56. package/dist/cli-bundle/focused-chunks/{chunk-7A6SEZEY.js → chunk-BEHQCHQV.js} +2 -2
  57. package/dist/cli-bundle/focused-chunks/chunk-BUIF6CMZ.js +2 -0
  58. package/dist/cli-bundle/focused-chunks/chunk-E2IWEJL5.js +3 -0
  59. package/dist/cli-bundle/focused-chunks/chunk-GBU7GKNJ.js +2 -0
  60. package/dist/cli-bundle/focused-chunks/{chunk-EQCQTYKO.js → chunk-K35KTBDZ.js} +2 -2
  61. package/dist/cli-bundle/focused-chunks/{chunk-VQIC3UZB.js → chunk-KNST4PGF.js} +2 -2
  62. package/dist/cli-bundle/focused-chunks/{chunk-P2H3GTJK.js → chunk-L2XJB5PK.js} +2 -2
  63. package/dist/cli-bundle/focused-chunks/chunk-L6NOGC4N.js +100 -0
  64. package/dist/cli-bundle/focused-chunks/{chunk-VK3IE3TS.js → chunk-LWIIDPAV.js} +2 -2
  65. package/dist/cli-bundle/focused-chunks/{chunk-6IY5CVGJ.js → chunk-M54BMYG4.js} +2 -2
  66. package/dist/cli-bundle/focused-chunks/{chunk-6BKT6XQN.js → chunk-NEK7RX3N.js} +2 -2
  67. package/dist/cli-bundle/focused-chunks/{chunk-BHNBPCHP.js → chunk-OKGWIW6C.js} +2 -2
  68. package/dist/cli-bundle/focused-chunks/{chunk-2DGKVXFT.js → chunk-RFDSSOTZ.js} +2 -2
  69. package/dist/cli-bundle/focused-chunks/chunk-SSX5YBDC.js +2 -0
  70. package/dist/cli-bundle/focused-chunks/{chunk-OG57ESZK.js → chunk-TIEQVIFN.js} +2 -2
  71. package/dist/cli-bundle/focused-chunks/{chunk-SQ72CVUH.js → chunk-VEUBDQDP.js} +54 -54
  72. package/dist/cli-bundle/focused-chunks/{chunk-2UWKU2BQ.js → chunk-WDHNPNHX.js} +3 -3
  73. package/dist/cli-bundle/focused-chunks/{field-option-collisions-2C6DLUC4.js → field-option-collisions-32X7FP3H.js} +2 -2
  74. package/dist/cli-bundle/focused-chunks/item-revision-GUYSVVQD.js +2 -0
  75. package/dist/cli-bundle/focused-chunks/{item-transaction-2K4SFLJ7.js → item-transaction-MLKHZPL7.js} +2 -2
  76. package/dist/cli-bundle/focused-chunks/{mutation-actor-DJMZUIZI.js → mutation-actor-RDZJTRW2.js} +2 -2
  77. package/dist/cli-bundle/focused-chunks/{mutation-admission-SDWQVVHN.js → mutation-admission-IQB6XL75.js} +2 -2
  78. package/dist/cli-bundle/focused-chunks/{stage-QBZIK3T5.js → stage-AA7LORZ2.js} +2 -2
  79. package/dist/cli-bundle/main.js +27 -27
  80. package/dist/cli-bundle/sdk-authoring.js +1 -1
  81. package/dist/cli-bundle/sdk-contracts.js +1 -1
  82. package/dist/cli-bundle/sdk-core.js +1 -1
  83. package/dist/cli-bundle/sdk-governance.js +1 -1
  84. package/dist/cli-bundle/sdk-graph.js +1 -1
  85. package/dist/cli-bundle/sdk-merge.js +63 -63
  86. package/dist/cli-bundle/sdk-query.js +1 -1
  87. package/dist/cli-bundle/sdk-runtime.js +1 -1
  88. package/dist/cli-bundle/sdk-testing.js +1 -1
  89. package/dist/cli-bundle/sdk.js +9 -9
  90. package/dist/core/extensions/loader.d.ts +8 -0
  91. package/dist/core/extensions/loader.js +1 -1
  92. package/dist/core/item/actionability.js +1 -1
  93. package/dist/core/output/output.js +16 -16
  94. package/dist/mcp/server.js +1 -1
  95. package/dist/sdk/cli-contracts/enum-contracts.d.ts +25 -1
  96. package/dist/sdk/cli-contracts/enum-contracts.js +1 -1
  97. package/dist/sdk/cli-contracts/flag-contracts.d.ts +1 -1
  98. package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
  99. package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
  100. package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
  101. package/dist/sdk/cli-contracts/tool-schema.js +1 -1
  102. package/dist/sdk/context-intent-contracts.js +1 -1
  103. package/dist/sdk/extension/install-sources.d.ts +2 -2
  104. package/dist/sdk/extension/install-sources.js +5 -5
  105. package/dist/sdk/lifecycle/expect-hash-admission.d.ts +27 -8
  106. package/dist/sdk/lifecycle/expect-hash-admission.js +1 -1
  107. package/dist/sdk/lifecycle/item-revision.d.ts +12 -4
  108. package/dist/sdk/lifecycle/item-revision.js +1 -1
  109. package/dist/sdk/output-projection.d.ts +1 -1
  110. package/dist/sdk/output-projection.js +1 -1
  111. package/dist/sdk/public-surface.json +1 -1
  112. package/dist/sdk/read-output/surfaces.js +1 -1
  113. package/dist/sdk/runtime/schema.js +1 -1
  114. package/dist/sdk/runtime-input.d.ts +6 -0
  115. package/dist/sdk/runtime-input.js +1 -1
  116. package/dist/sdk/runtime-primitives.d.ts +1 -1
  117. package/dist/sdk/runtime-primitives.js +1 -1
  118. package/dist/sdk/runtime.js +1 -1
  119. package/docs/COMMANDS.md +23 -5
  120. package/docs/EXTENSIONS.md +1 -1
  121. package/docs/SDK.md +15 -2
  122. package/marketplace.json +1 -1
  123. package/node_modules/tar/README.md +1792 -1147
  124. package/node_modules/tar/dist/commonjs/bytes.d.ts +21 -0
  125. package/node_modules/tar/dist/commonjs/bytes.js +83 -0
  126. package/node_modules/tar/dist/commonjs/codec.d.ts +53 -0
  127. package/node_modules/tar/dist/commonjs/codec.js +35 -0
  128. package/node_modules/tar/dist/commonjs/concat.d.ts +3 -0
  129. package/node_modules/tar/dist/commonjs/concat.js +20 -0
  130. package/node_modules/tar/dist/commonjs/create.d.ts +39 -2
  131. package/node_modules/tar/dist/commonjs/create.js +150 -64
  132. package/node_modules/tar/dist/commonjs/dealias.d.ts +79 -0
  133. package/node_modules/tar/dist/commonjs/dealias.js +50 -0
  134. package/node_modules/tar/dist/commonjs/delete.d.ts +19 -0
  135. package/node_modules/tar/dist/commonjs/delete.js +121 -0
  136. package/node_modules/tar/dist/commonjs/entries.d.ts +82 -0
  137. package/node_modules/tar/dist/commonjs/entries.js +398 -0
  138. package/node_modules/tar/dist/commonjs/extract.d.ts +14 -2
  139. package/node_modules/tar/dist/commonjs/extract.js +40 -81
  140. package/node_modules/tar/dist/commonjs/fs.d.ts +201 -0
  141. package/node_modules/tar/dist/commonjs/fs.js +5 -0
  142. package/node_modules/tar/dist/commonjs/header.d.ts +4 -4
  143. package/node_modules/tar/dist/commonjs/header.js +71 -53
  144. package/node_modules/tar/dist/commonjs/index.d.ts +25 -18
  145. package/node_modules/tar/dist/commonjs/index.js +46 -18
  146. package/node_modules/tar/dist/commonjs/index.min.js +2 -3
  147. package/node_modules/tar/dist/commonjs/large-numbers.d.ts +2 -2
  148. package/node_modules/tar/dist/commonjs/large-numbers.js +4 -4
  149. package/node_modules/tar/dist/commonjs/list.d.ts +23 -6
  150. package/node_modules/tar/dist/commonjs/list.js +99 -138
  151. package/node_modules/tar/dist/commonjs/mkdir.d.ts +16 -11
  152. package/node_modules/tar/dist/commonjs/mkdir.js +121 -159
  153. package/node_modules/tar/dist/commonjs/normalize-unicode.js +9 -0
  154. package/node_modules/tar/dist/commonjs/options.d.ts +284 -513
  155. package/node_modules/tar/dist/commonjs/options.js +20 -61
  156. package/node_modules/tar/dist/commonjs/pack.d.ts +150 -96
  157. package/node_modules/tar/dist/commonjs/pack.js +752 -445
  158. package/node_modules/tar/dist/commonjs/parser.d.ts +98 -0
  159. package/node_modules/tar/dist/commonjs/parser.js +452 -0
  160. package/node_modules/tar/dist/commonjs/path-reservations.d.ts +17 -7
  161. package/node_modules/tar/dist/commonjs/path-reservations.js +110 -140
  162. package/node_modules/tar/dist/commonjs/path.d.ts +19 -0
  163. package/node_modules/tar/dist/commonjs/path.js +90 -0
  164. package/node_modules/tar/dist/commonjs/pax.d.ts +3 -1
  165. package/node_modules/tar/dist/commonjs/pax.js +67 -36
  166. package/node_modules/tar/dist/commonjs/read-entry.d.ts +97 -11
  167. package/node_modules/tar/dist/commonjs/read-entry.js +251 -97
  168. package/node_modules/tar/dist/commonjs/read-file.d.ts +22 -0
  169. package/node_modules/tar/dist/commonjs/read-file.js +104 -0
  170. package/node_modules/tar/dist/commonjs/replace.d.ts +45 -1
  171. package/node_modules/tar/dist/commonjs/replace.js +164 -211
  172. package/node_modules/tar/dist/commonjs/server/codecs.d.ts +38 -0
  173. package/node_modules/tar/dist/commonjs/server/codecs.js +252 -0
  174. package/node_modules/tar/dist/commonjs/server/index.d.ts +115 -0
  175. package/node_modules/tar/dist/commonjs/server/index.js +166 -0
  176. package/node_modules/tar/dist/commonjs/server/index.min.js +3 -0
  177. package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +8 -0
  178. package/node_modules/tar/dist/commonjs/strip-absolute-path.js +17 -20
  179. package/node_modules/tar/dist/commonjs/to-stream.d.ts +7 -0
  180. package/node_modules/tar/dist/commonjs/to-stream.js +22 -0
  181. package/node_modules/tar/dist/commonjs/types.d.ts +4 -3
  182. package/node_modules/tar/dist/commonjs/types.js +4 -3
  183. package/node_modules/tar/dist/commonjs/unpack.d.ts +143 -89
  184. package/node_modules/tar/dist/commonjs/unpack.js +780 -725
  185. package/node_modules/tar/dist/commonjs/update.d.ts +11 -1
  186. package/node_modules/tar/dist/commonjs/update.js +37 -28
  187. package/node_modules/tar/dist/commonjs/warn.d.ts +27 -0
  188. package/node_modules/tar/dist/commonjs/warn.js +36 -0
  189. package/node_modules/tar/dist/commonjs/win32-path.d.ts +16 -0
  190. package/node_modules/tar/dist/commonjs/win32-path.js +67 -0
  191. package/node_modules/tar/dist/commonjs/write-entry.d.ts +64 -111
  192. package/node_modules/tar/dist/commonjs/write-entry.js +108 -672
  193. package/node_modules/tar/dist/commonjs/write-flag.d.ts +18 -0
  194. package/node_modules/tar/dist/commonjs/write-flag.js +29 -0
  195. package/node_modules/tar/dist/esm/bytes.d.ts +21 -0
  196. package/node_modules/tar/dist/esm/bytes.js +72 -0
  197. package/node_modules/tar/dist/esm/codec.d.ts +53 -0
  198. package/node_modules/tar/dist/esm/codec.js +32 -0
  199. package/node_modules/tar/dist/esm/concat.d.ts +3 -0
  200. package/node_modules/tar/dist/esm/concat.js +16 -0
  201. package/node_modules/tar/dist/esm/create.d.ts +39 -2
  202. package/node_modules/tar/dist/esm/create.js +144 -61
  203. package/node_modules/tar/dist/esm/dealias.d.ts +79 -0
  204. package/node_modules/tar/dist/esm/dealias.js +46 -0
  205. package/node_modules/tar/dist/esm/delete.d.ts +19 -0
  206. package/node_modules/tar/dist/esm/delete.js +117 -0
  207. package/node_modules/tar/dist/esm/entries.d.ts +82 -0
  208. package/node_modules/tar/dist/esm/entries.js +388 -0
  209. package/node_modules/tar/dist/esm/extract.d.ts +14 -2
  210. package/node_modules/tar/dist/esm/extract.js +37 -44
  211. package/node_modules/tar/dist/esm/fs.d.ts +201 -0
  212. package/node_modules/tar/dist/esm/fs.js +4 -0
  213. package/node_modules/tar/dist/esm/header.d.ts +4 -4
  214. package/node_modules/tar/dist/esm/header.js +71 -53
  215. package/node_modules/tar/dist/esm/index.d.ts +25 -18
  216. package/node_modules/tar/dist/esm/index.js +23 -18
  217. package/node_modules/tar/dist/esm/index.min.js +2 -3
  218. package/node_modules/tar/dist/esm/large-numbers.d.ts +2 -2
  219. package/node_modules/tar/dist/esm/large-numbers.js +4 -4
  220. package/node_modules/tar/dist/esm/list.d.ts +23 -6
  221. package/node_modules/tar/dist/esm/list.js +96 -101
  222. package/node_modules/tar/dist/esm/mkdir.d.ts +16 -11
  223. package/node_modules/tar/dist/esm/mkdir.js +119 -154
  224. package/node_modules/tar/dist/esm/normalize-unicode.js +9 -0
  225. package/node_modules/tar/dist/esm/options.d.ts +284 -513
  226. package/node_modules/tar/dist/esm/options.js +17 -51
  227. package/node_modules/tar/dist/esm/pack.d.ts +150 -96
  228. package/node_modules/tar/dist/esm/pack.js +750 -441
  229. package/node_modules/tar/dist/esm/parser.d.ts +98 -0
  230. package/node_modules/tar/dist/esm/parser.js +448 -0
  231. package/node_modules/tar/dist/esm/path-reservations.d.ts +17 -7
  232. package/node_modules/tar/dist/esm/path-reservations.js +110 -140
  233. package/node_modules/tar/dist/esm/path.d.ts +19 -0
  234. package/node_modules/tar/dist/esm/path.js +80 -0
  235. package/node_modules/tar/dist/esm/pax.d.ts +3 -1
  236. package/node_modules/tar/dist/esm/pax.js +66 -35
  237. package/node_modules/tar/dist/esm/read-entry.d.ts +97 -11
  238. package/node_modules/tar/dist/esm/read-entry.js +248 -96
  239. package/node_modules/tar/dist/esm/read-file.d.ts +22 -0
  240. package/node_modules/tar/dist/esm/read-file.js +99 -0
  241. package/node_modules/tar/dist/esm/replace.d.ts +45 -1
  242. package/node_modules/tar/dist/esm/replace.js +160 -207
  243. package/node_modules/tar/dist/esm/server/codecs.d.ts +38 -0
  244. package/node_modules/tar/dist/esm/server/codecs.js +214 -0
  245. package/node_modules/tar/dist/esm/server/index.d.ts +115 -0
  246. package/node_modules/tar/dist/esm/server/index.js +102 -0
  247. package/node_modules/tar/dist/esm/server/index.min.js +3 -0
  248. package/node_modules/tar/dist/esm/strip-absolute-path.d.ts +8 -0
  249. package/node_modules/tar/dist/esm/strip-absolute-path.js +17 -20
  250. package/node_modules/tar/dist/esm/to-stream.d.ts +7 -0
  251. package/node_modules/tar/dist/esm/to-stream.js +18 -0
  252. package/node_modules/tar/dist/esm/types.d.ts +4 -3
  253. package/node_modules/tar/dist/esm/types.js +4 -3
  254. package/node_modules/tar/dist/esm/unpack.d.ts +143 -89
  255. package/node_modules/tar/dist/esm/unpack.js +776 -719
  256. package/node_modules/tar/dist/esm/update.d.ts +11 -1
  257. package/node_modules/tar/dist/esm/update.js +35 -28
  258. package/node_modules/tar/dist/esm/warn.d.ts +27 -0
  259. package/node_modules/tar/dist/esm/warn.js +31 -0
  260. package/node_modules/tar/dist/esm/win32-path.d.ts +16 -0
  261. package/node_modules/tar/dist/esm/win32-path.js +60 -0
  262. package/node_modules/tar/dist/esm/write-entry.d.ts +64 -111
  263. package/node_modules/tar/dist/esm/write-entry.js +107 -633
  264. package/node_modules/tar/dist/esm/write-flag.d.ts +18 -0
  265. package/node_modules/tar/dist/esm/write-flag.js +25 -0
  266. package/node_modules/tar/package.json +68 -224
  267. package/package.json +2 -2
  268. package/packages/pm-beads/package.json +1 -1
  269. package/packages/pm-calendar/package.json +1 -1
  270. package/packages/pm-command-kit/package.json +1 -1
  271. package/packages/pm-digital-twin/package.json +1 -1
  272. package/packages/pm-governance-audit/package.json +1 -1
  273. package/packages/pm-guide-shell/package.json +1 -1
  274. package/packages/pm-kanban/package.json +1 -1
  275. package/packages/pm-lifecycle-hooks/package.json +1 -1
  276. package/packages/pm-linked-test-adapters/package.json +1 -1
  277. package/packages/pm-search-advanced/package.json +1 -1
  278. package/packages/pm-templates/package.json +1 -1
  279. package/packages/pm-todos/package.json +1 -1
  280. package/packages/pm-vcs/package.json +1 -1
  281. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  282. package/plugins/pm-claude/package.json +1 -1
  283. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  284. package/plugins/pm-codex/package.json +1 -1
  285. package/plugins/pm-codex/plugin.json +1 -1
  286. package/runtime-dependencies.json +1 -1
  287. package/dist/cli-bundle/chunks/chunk-A5ZEMOVR.js +0 -2
  288. package/dist/cli-bundle/chunks/chunk-AJLU6KLW.js +0 -2
  289. package/dist/cli-bundle/chunks/chunk-C6WM6ZN4.js +0 -9
  290. package/dist/cli-bundle/chunks/chunk-HZZLSBIJ.js +0 -2
  291. package/dist/cli-bundle/chunks/chunk-L2ZSSMYY.js +0 -2
  292. package/dist/cli-bundle/chunks/chunk-NRQCBUYD.js +0 -113
  293. package/dist/cli-bundle/chunks/chunk-QDV7S2QS.js +0 -2
  294. package/dist/cli-bundle/chunks/item-revision-3LENTXYF.js +0 -2
  295. package/dist/cli-bundle/chunks/item-transaction-66RDV7PH.js +0 -2
  296. package/dist/cli-bundle/focused-chunks/chunk-HTDYNY4L.js +0 -2
  297. package/dist/cli-bundle/focused-chunks/chunk-N64AC5G6.js +0 -100
  298. package/dist/cli-bundle/focused-chunks/chunk-PT7RT3T6.js +0 -44
  299. package/dist/cli-bundle/focused-chunks/chunk-QZRYGYTI.js +0 -2
  300. package/dist/cli-bundle/focused-chunks/chunk-SQMOF65W.js +0 -2
  301. package/dist/cli-bundle/focused-chunks/chunk-T3ILWAEV.js +0 -2
  302. package/dist/cli-bundle/focused-chunks/chunk-W4JMV7GF.js +0 -3
  303. package/dist/cli-bundle/focused-chunks/item-revision-723XCQPS.js +0 -2
  304. package/node_modules/@isaacs/fs-minipass/LICENSE +0 -15
  305. package/node_modules/@isaacs/fs-minipass/README.md +0 -71
  306. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts +0 -118
  307. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +0 -430
  308. package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +0 -3
  309. package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts +0 -118
  310. package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +0 -420
  311. package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +0 -3
  312. package/node_modules/@isaacs/fs-minipass/package.json +0 -72
  313. package/node_modules/chownr/LICENSE.md +0 -63
  314. package/node_modules/chownr/README.md +0 -3
  315. package/node_modules/chownr/dist/commonjs/index.d.ts +0 -3
  316. package/node_modules/chownr/dist/commonjs/index.js +0 -93
  317. package/node_modules/chownr/dist/commonjs/package.json +0 -3
  318. package/node_modules/chownr/dist/esm/index.d.ts +0 -3
  319. package/node_modules/chownr/dist/esm/index.js +0 -85
  320. package/node_modules/chownr/dist/esm/package.json +0 -3
  321. package/node_modules/chownr/package.json +0 -69
  322. package/node_modules/minipass/LICENSE.md +0 -55
  323. package/node_modules/minipass/README.md +0 -825
  324. package/node_modules/minipass/dist/commonjs/index.d.ts +0 -545
  325. package/node_modules/minipass/dist/commonjs/index.js +0 -1038
  326. package/node_modules/minipass/dist/commonjs/package.json +0 -3
  327. package/node_modules/minipass/dist/esm/index.d.ts +0 -545
  328. package/node_modules/minipass/dist/esm/index.js +0 -1020
  329. package/node_modules/minipass/dist/esm/package.json +0 -3
  330. package/node_modules/minipass/package.json +0 -77
  331. package/node_modules/minizlib/LICENSE +0 -26
  332. package/node_modules/minizlib/README.md +0 -64
  333. package/node_modules/minizlib/dist/commonjs/constants.d.ts +0 -2
  334. package/node_modules/minizlib/dist/commonjs/constants.js +0 -123
  335. package/node_modules/minizlib/dist/commonjs/index.d.ts +0 -99
  336. package/node_modules/minizlib/dist/commonjs/index.js +0 -416
  337. package/node_modules/minizlib/dist/commonjs/package.json +0 -3
  338. package/node_modules/minizlib/dist/esm/constants.d.ts +0 -2
  339. package/node_modules/minizlib/dist/esm/constants.js +0 -117
  340. package/node_modules/minizlib/dist/esm/index.d.ts +0 -99
  341. package/node_modules/minizlib/dist/esm/index.js +0 -363
  342. package/node_modules/minizlib/dist/esm/package.json +0 -3
  343. package/node_modules/minizlib/package.json +0 -80
  344. package/node_modules/tar/dist/commonjs/get-write-flag.d.ts +0 -2
  345. package/node_modules/tar/dist/commonjs/get-write-flag.js +0 -32
  346. package/node_modules/tar/dist/commonjs/make-command.d.ts +0 -49
  347. package/node_modules/tar/dist/commonjs/make-command.js +0 -52
  348. package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +0 -2
  349. package/node_modules/tar/dist/commonjs/normalize-windows-path.js +0 -12
  350. package/node_modules/tar/dist/commonjs/parse.d.ts +0 -92
  351. package/node_modules/tar/dist/commonjs/parse.js +0 -655
  352. package/node_modules/tar/dist/commonjs/process-umask.d.ts +0 -2
  353. package/node_modules/tar/dist/commonjs/process-umask.js +0 -7
  354. package/node_modules/tar/dist/commonjs/warn-method.d.ts +0 -24
  355. package/node_modules/tar/dist/commonjs/warn-method.js +0 -31
  356. package/node_modules/tar/dist/esm/get-write-flag.d.ts +0 -2
  357. package/node_modules/tar/dist/esm/get-write-flag.js +0 -26
  358. package/node_modules/tar/dist/esm/make-command.d.ts +0 -49
  359. package/node_modules/tar/dist/esm/make-command.js +0 -48
  360. package/node_modules/tar/dist/esm/normalize-windows-path.d.ts +0 -2
  361. package/node_modules/tar/dist/esm/normalize-windows-path.js +0 -9
  362. package/node_modules/tar/dist/esm/parse.d.ts +0 -92
  363. package/node_modules/tar/dist/esm/parse.js +0 -651
  364. package/node_modules/tar/dist/esm/process-umask.d.ts +0 -2
  365. package/node_modules/tar/dist/esm/process-umask.js +0 -3
  366. package/node_modules/tar/dist/esm/warn-method.d.ts +0 -24
  367. package/node_modules/tar/dist/esm/warn-method.js +0 -27
  368. package/node_modules/yallist/LICENSE.md +0 -63
  369. package/node_modules/yallist/README.md +0 -205
  370. package/node_modules/yallist/dist/commonjs/index.d.ts +0 -39
  371. package/node_modules/yallist/dist/commonjs/index.js +0 -384
  372. package/node_modules/yallist/dist/commonjs/package.json +0 -3
  373. package/node_modules/yallist/dist/esm/index.d.ts +0 -39
  374. package/node_modules/yallist/dist/esm/index.js +0 -379
  375. package/node_modules/yallist/dist/esm/package.json +0 -3
  376. 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
@@ -0,0 +1,4 @@
1
+ // The file system functions that this package calls. `node:fs/promises`
2
+ // fits `TarFS`, and `node:fs` fits `TarFSSync`.
3
+ export {};
4
+ //# sourceMappingURL=fs.js.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?: Buffer;
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?: Buffer | HeaderData, off?: number, ex?: HeaderData, gex?: HeaderData);
47
- decode(buf: Buffer, off: number, ex?: HeaderData, gex?: HeaderData): void;
48
- encode(buf?: Buffer, off?: number): boolean;
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 { posix as pathModule } from 'node:path';
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 (Buffer.isBuffer(data)) {
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 header)
47
- // up front so we can tell whether THIS block is itself an intermediary
48
- // extension header (PAX `x`/`g`, GNU long-name `L`, GNU long-link `K`).
49
- // Per POSIX pax, a PAX extended header describes the *next file entry*, not
50
- // the extension headers that may sit between it and that file. Applying the
51
- // pending PAX overrides (notably `size`) to an intervening `L`/`K`/`x`/`g`
52
- // header desynchronizes the stream relative to other tar implementations
53
- // and enables tar interpretation-conflict / file-smuggling attacks.
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 isNormalFS = types.normalFsTypes.has(t);
56
- const exForFields = isNormalFS ? ex : undefined;
57
- const gexForFields = isNormalFS ? gex : undefined;
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(exForFields?.size ??
68
- gexForFields?.size ??
69
- decNumber(buf, off + 124, 12));
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.subarray(off + 257, off + 265).toString() === 'ustar\u000000') {
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
- // we slurp in everything except for the path attribute in
151
- // a global extended header, because that's weird. Also, any
152
- // null/undefined values are ignored.
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 = Buffer.alloc(512);
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
- buf.write('ustar\u000000', off + 257, 8);
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 = pathModule.parse(p).root || '.';
245
- if (Buffer.byteLength(pp) < pathSize) {
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 = pathModule.dirname(pp);
251
- pp = pathModule.basename(pp);
249
+ prefix = dirname(pp);
250
+ pp = basename(pp);
252
251
  do {
253
- if (Buffer.byteLength(pp) <= pathSize &&
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 (Buffer.byteLength(pp) > pathSize &&
259
- Buffer.byteLength(prefix) <= prefixSize) {
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 = pathModule.join(pathModule.basename(prefix), pp);
266
- prefix = pathModule.dirname(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
- const decString = (buf, off, size) => buf
277
- .subarray(off, off + size)
278
- .toString('utf8')
279
- .replace(/\0.*/, '');
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
- large.parse(buf.subarray(off, off + size))
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) => buf.write(octalString(num, size), off, size, 'ascii');
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
- : new Array(size - str.length - 1).join('0') + str + ' ') + '\0';
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 : ((buf.write(str + NULLS, off, size, 'utf8'),
310
- str.length !== Buffer.byteLength(str) || str.length > size));
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 { type TarOptionsWithAliasesAsync, type TarOptionsWithAliasesAsyncFile, type TarOptionsWithAliasesAsyncNoFile, type TarOptionsWithAliasesSyncNoFile, type TarOptionsWithAliases, type TarOptionsWithAliasesFile, type TarOptionsWithAliasesSync, type TarOptionsWithAliasesSyncFile, } from './options.js';
2
- export * from './create.js';
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 * from './unpack.js';
17
- export * from './update.js';
18
- export { update as u } from './update.js';
19
- export * from './write-entry.js';
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
- export * from './create.js';
2
- export { create as c } from './create.js';
3
- export * from './extract.js';
4
- export { extract as x } from './extract.js';
5
- export * from './header.js';
6
- export * from './list.js';
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 * from './unpack.js';
17
- export * from './update.js';
18
- export { update as u } from './update.js';
19
- export * from './write-entry.js';
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