@microwiseai/snapshot 0.9.1 → 0.9.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 (477) hide show
  1. package/dist/build-info.json +1 -1
  2. package/dist/commands/install.d.ts.map +1 -1
  3. package/dist/commands/install.js +22 -15
  4. package/dist/commands/install.js.map +1 -1
  5. package/dist/commands/publish.d.ts.map +1 -1
  6. package/dist/commands/publish.js +7 -0
  7. package/dist/commands/publish.js.map +1 -1
  8. package/dist/lib/prerequisites.d.ts.map +1 -1
  9. package/dist/lib/prerequisites.js +2 -1
  10. package/dist/lib/prerequisites.js.map +1 -1
  11. package/dist/lib/proxy-index-refresh.d.ts +40 -0
  12. package/dist/lib/proxy-index-refresh.d.ts.map +1 -0
  13. package/dist/lib/proxy-index-refresh.js +66 -0
  14. package/dist/lib/proxy-index-refresh.js.map +1 -0
  15. package/dist/lib/skit-adapter.d.ts +14 -5
  16. package/dist/lib/skit-adapter.d.ts.map +1 -1
  17. package/dist/lib/skit-adapter.js +118 -177
  18. package/dist/lib/skit-adapter.js.map +1 -1
  19. package/node_modules/@microwiseai/skit/LICENSE +21 -0
  20. package/node_modules/@microwiseai/skit/README.md +137 -93
  21. package/node_modules/@microwiseai/skit/dist/__tests__/setup/hermetic-config.d.ts +2 -0
  22. package/node_modules/@microwiseai/skit/dist/__tests__/setup/hermetic-config.d.ts.map +1 -0
  23. package/node_modules/@microwiseai/skit/dist/commands/browse.d.ts +47 -3
  24. package/node_modules/@microwiseai/skit/dist/commands/browse.d.ts.map +1 -1
  25. package/node_modules/@microwiseai/skit/dist/commands/config.d.ts +5 -0
  26. package/node_modules/@microwiseai/skit/dist/commands/config.d.ts.map +1 -0
  27. package/node_modules/@microwiseai/skit/dist/commands/install.d.ts +14 -2
  28. package/node_modules/@microwiseai/skit/dist/commands/install.d.ts.map +1 -1
  29. package/node_modules/@microwiseai/skit/dist/commands/orphans.d.ts +16 -0
  30. package/node_modules/@microwiseai/skit/dist/commands/orphans.d.ts.map +1 -0
  31. package/node_modules/@microwiseai/skit/dist/commands/pack.d.ts.map +1 -1
  32. package/node_modules/@microwiseai/skit/dist/commands/prompt.d.ts +25 -0
  33. package/node_modules/@microwiseai/skit/dist/commands/prompt.d.ts.map +1 -0
  34. package/node_modules/@microwiseai/skit/dist/commands/publish.d.ts.map +1 -1
  35. package/node_modules/@microwiseai/skit/dist/commands/uninstall.d.ts.map +1 -1
  36. package/node_modules/@microwiseai/skit/dist/distkit/install-directive.d.ts +48 -0
  37. package/node_modules/@microwiseai/skit/dist/distkit/install-directive.d.ts.map +1 -0
  38. package/node_modules/@microwiseai/skit/dist/distkit/kit-executor.d.ts +46 -0
  39. package/node_modules/@microwiseai/skit/dist/distkit/kit-executor.d.ts.map +1 -0
  40. package/node_modules/@microwiseai/skit/dist/distkit/resolve-from.d.ts +37 -0
  41. package/node_modules/@microwiseai/skit/dist/distkit/resolve-from.d.ts.map +1 -0
  42. package/node_modules/@microwiseai/skit/dist/index.d.ts +0 -1
  43. package/node_modules/@microwiseai/skit/dist/index.js +52519 -68
  44. package/node_modules/@microwiseai/skit/dist/lib.d.ts +657 -5
  45. package/node_modules/@microwiseai/skit/dist/lib.d.ts.map +1 -1
  46. package/node_modules/@microwiseai/skit/dist/lib.js +48417 -554
  47. package/node_modules/@microwiseai/skit/dist/types/skit.d.ts +189 -12
  48. package/node_modules/@microwiseai/skit/dist/types/skit.d.ts.map +1 -1
  49. package/node_modules/@microwiseai/skit/dist/utils/dep-plan.d.ts +150 -0
  50. package/node_modules/@microwiseai/skit/dist/utils/dep-plan.d.ts.map +1 -0
  51. package/node_modules/@microwiseai/skit/dist/utils/file-copy.d.ts +10 -5
  52. package/node_modules/@microwiseai/skit/dist/utils/file-copy.d.ts.map +1 -1
  53. package/node_modules/@microwiseai/skit/dist/utils/gitlab-registry.d.ts +91 -0
  54. package/node_modules/@microwiseai/skit/dist/utils/gitlab-registry.d.ts.map +1 -0
  55. package/node_modules/@microwiseai/skit/dist/utils/installed-registry.d.ts +59 -3
  56. package/node_modules/@microwiseai/skit/dist/utils/installed-registry.d.ts.map +1 -1
  57. package/node_modules/@microwiseai/skit/dist/utils/npm-auth.d.ts +99 -0
  58. package/node_modules/@microwiseai/skit/dist/utils/npm-auth.d.ts.map +1 -0
  59. package/node_modules/@microwiseai/skit/dist/utils/profile-permissions.d.ts +54 -0
  60. package/node_modules/@microwiseai/skit/dist/utils/profile-permissions.d.ts.map +1 -0
  61. package/node_modules/@microwiseai/skit/dist/utils/skit-config.d.ts +41 -0
  62. package/node_modules/@microwiseai/skit/dist/utils/skit-config.d.ts.map +1 -0
  63. package/node_modules/@microwiseai/skit/dist/utils/skit-parser.d.ts +5 -0
  64. package/node_modules/@microwiseai/skit/dist/utils/skit-parser.d.ts.map +1 -1
  65. package/node_modules/@microwiseai/skit/dist/utils/temp-npmrc.d.ts +70 -0
  66. package/node_modules/@microwiseai/skit/dist/utils/temp-npmrc.d.ts.map +1 -0
  67. package/node_modules/@microwiseai/skit/package.json +40 -10
  68. package/package.json +2 -2
  69. package/node_modules/@isaacs/fs-minipass/LICENSE +0 -15
  70. package/node_modules/@isaacs/fs-minipass/README.md +0 -71
  71. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts +0 -118
  72. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map +0 -1
  73. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +0 -430
  74. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map +0 -1
  75. package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +0 -3
  76. package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts +0 -118
  77. package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map +0 -1
  78. package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +0 -420
  79. package/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map +0 -1
  80. package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +0 -3
  81. package/node_modules/@isaacs/fs-minipass/package.json +0 -72
  82. package/node_modules/@ist/registry-config/dist/index.d.ts +0 -3
  83. package/node_modules/@ist/registry-config/dist/index.js +0 -3
  84. package/node_modules/@ist/registry-config/dist/registry-url.d.ts +0 -1
  85. package/node_modules/@ist/registry-config/dist/registry-url.js +0 -1
  86. package/node_modules/@ist/registry-config/dist/scope-mapping.d.ts +0 -6
  87. package/node_modules/@ist/registry-config/dist/scope-mapping.js +0 -7
  88. package/node_modules/@ist/registry-config/dist/types.d.ts +0 -4
  89. package/node_modules/@ist/registry-config/dist/types.js +0 -1
  90. package/node_modules/@ist/registry-config/package.json +0 -32
  91. package/node_modules/@microwiseai/skit/dist/commands/browse.js +0 -127
  92. package/node_modules/@microwiseai/skit/dist/commands/browse.js.map +0 -1
  93. package/node_modules/@microwiseai/skit/dist/commands/gitignore.js +0 -59
  94. package/node_modules/@microwiseai/skit/dist/commands/gitignore.js.map +0 -1
  95. package/node_modules/@microwiseai/skit/dist/commands/info.js +0 -80
  96. package/node_modules/@microwiseai/skit/dist/commands/info.js.map +0 -1
  97. package/node_modules/@microwiseai/skit/dist/commands/install.js +0 -150
  98. package/node_modules/@microwiseai/skit/dist/commands/install.js.map +0 -1
  99. package/node_modules/@microwiseai/skit/dist/commands/licenses.d.ts +0 -9
  100. package/node_modules/@microwiseai/skit/dist/commands/licenses.d.ts.map +0 -1
  101. package/node_modules/@microwiseai/skit/dist/commands/licenses.js +0 -125
  102. package/node_modules/@microwiseai/skit/dist/commands/licenses.js.map +0 -1
  103. package/node_modules/@microwiseai/skit/dist/commands/list.js +0 -41
  104. package/node_modules/@microwiseai/skit/dist/commands/list.js.map +0 -1
  105. package/node_modules/@microwiseai/skit/dist/commands/login.d.ts +0 -10
  106. package/node_modules/@microwiseai/skit/dist/commands/login.d.ts.map +0 -1
  107. package/node_modules/@microwiseai/skit/dist/commands/login.js +0 -112
  108. package/node_modules/@microwiseai/skit/dist/commands/login.js.map +0 -1
  109. package/node_modules/@microwiseai/skit/dist/commands/logout.d.ts +0 -5
  110. package/node_modules/@microwiseai/skit/dist/commands/logout.d.ts.map +0 -1
  111. package/node_modules/@microwiseai/skit/dist/commands/logout.js +0 -30
  112. package/node_modules/@microwiseai/skit/dist/commands/logout.js.map +0 -1
  113. package/node_modules/@microwiseai/skit/dist/commands/pack.js +0 -185
  114. package/node_modules/@microwiseai/skit/dist/commands/pack.js.map +0 -1
  115. package/node_modules/@microwiseai/skit/dist/commands/publish.js +0 -108
  116. package/node_modules/@microwiseai/skit/dist/commands/publish.js.map +0 -1
  117. package/node_modules/@microwiseai/skit/dist/commands/purchase.d.ts +0 -9
  118. package/node_modules/@microwiseai/skit/dist/commands/purchase.d.ts.map +0 -1
  119. package/node_modules/@microwiseai/skit/dist/commands/purchase.js +0 -160
  120. package/node_modules/@microwiseai/skit/dist/commands/purchase.js.map +0 -1
  121. package/node_modules/@microwiseai/skit/dist/commands/register.d.ts +0 -10
  122. package/node_modules/@microwiseai/skit/dist/commands/register.d.ts.map +0 -1
  123. package/node_modules/@microwiseai/skit/dist/commands/register.js +0 -121
  124. package/node_modules/@microwiseai/skit/dist/commands/register.js.map +0 -1
  125. package/node_modules/@microwiseai/skit/dist/commands/uninstall.js +0 -138
  126. package/node_modules/@microwiseai/skit/dist/commands/uninstall.js.map +0 -1
  127. package/node_modules/@microwiseai/skit/dist/commands/whoami.d.ts +0 -9
  128. package/node_modules/@microwiseai/skit/dist/commands/whoami.d.ts.map +0 -1
  129. package/node_modules/@microwiseai/skit/dist/commands/whoami.js +0 -79
  130. package/node_modules/@microwiseai/skit/dist/commands/whoami.js.map +0 -1
  131. package/node_modules/@microwiseai/skit/dist/index.js.map +0 -1
  132. package/node_modules/@microwiseai/skit/dist/lib.js.map +0 -1
  133. package/node_modules/@microwiseai/skit/dist/types/skit.js +0 -20
  134. package/node_modules/@microwiseai/skit/dist/types/skit.js.map +0 -1
  135. package/node_modules/@microwiseai/skit/dist/utils/api.d.ts +0 -18
  136. package/node_modules/@microwiseai/skit/dist/utils/api.d.ts.map +0 -1
  137. package/node_modules/@microwiseai/skit/dist/utils/api.js +0 -26
  138. package/node_modules/@microwiseai/skit/dist/utils/api.js.map +0 -1
  139. package/node_modules/@microwiseai/skit/dist/utils/auth.d.ts +0 -62
  140. package/node_modules/@microwiseai/skit/dist/utils/auth.d.ts.map +0 -1
  141. package/node_modules/@microwiseai/skit/dist/utils/auth.js +0 -172
  142. package/node_modules/@microwiseai/skit/dist/utils/auth.js.map +0 -1
  143. package/node_modules/@microwiseai/skit/dist/utils/file-copy.js +0 -219
  144. package/node_modules/@microwiseai/skit/dist/utils/file-copy.js.map +0 -1
  145. package/node_modules/@microwiseai/skit/dist/utils/hook-installer.js +0 -98
  146. package/node_modules/@microwiseai/skit/dist/utils/hook-installer.js.map +0 -1
  147. package/node_modules/@microwiseai/skit/dist/utils/installed-registry.js +0 -108
  148. package/node_modules/@microwiseai/skit/dist/utils/installed-registry.js.map +0 -1
  149. package/node_modules/@microwiseai/skit/dist/utils/skit-parser.js +0 -52
  150. package/node_modules/@microwiseai/skit/dist/utils/skit-parser.js.map +0 -1
  151. package/node_modules/@microwiseai/skit/dist/utils/wrapper-generator.d.ts +0 -74
  152. package/node_modules/@microwiseai/skit/dist/utils/wrapper-generator.d.ts.map +0 -1
  153. package/node_modules/@microwiseai/skit/dist/utils/wrapper-generator.js +0 -280
  154. package/node_modules/@microwiseai/skit/dist/utils/wrapper-generator.js.map +0 -1
  155. package/node_modules/chownr/LICENSE.md +0 -63
  156. package/node_modules/chownr/README.md +0 -3
  157. package/node_modules/chownr/dist/commonjs/index.d.ts +0 -3
  158. package/node_modules/chownr/dist/commonjs/index.d.ts.map +0 -1
  159. package/node_modules/chownr/dist/commonjs/index.js +0 -93
  160. package/node_modules/chownr/dist/commonjs/index.js.map +0 -1
  161. package/node_modules/chownr/dist/commonjs/package.json +0 -3
  162. package/node_modules/chownr/dist/esm/index.d.ts +0 -3
  163. package/node_modules/chownr/dist/esm/index.d.ts.map +0 -1
  164. package/node_modules/chownr/dist/esm/index.js +0 -85
  165. package/node_modules/chownr/dist/esm/index.js.map +0 -1
  166. package/node_modules/chownr/dist/esm/package.json +0 -3
  167. package/node_modules/chownr/package.json +0 -69
  168. package/node_modules/commander/LICENSE +0 -22
  169. package/node_modules/commander/Readme.md +0 -1157
  170. package/node_modules/commander/esm.mjs +0 -16
  171. package/node_modules/commander/index.js +0 -24
  172. package/node_modules/commander/lib/argument.js +0 -149
  173. package/node_modules/commander/lib/command.js +0 -2509
  174. package/node_modules/commander/lib/error.js +0 -39
  175. package/node_modules/commander/lib/help.js +0 -520
  176. package/node_modules/commander/lib/option.js +0 -330
  177. package/node_modules/commander/lib/suggestSimilar.js +0 -101
  178. package/node_modules/commander/package-support.json +0 -16
  179. package/node_modules/commander/package.json +0 -84
  180. package/node_modules/commander/typings/esm.d.mts +0 -3
  181. package/node_modules/commander/typings/index.d.ts +0 -969
  182. package/node_modules/minipass/LICENSE.md +0 -55
  183. package/node_modules/minipass/README.md +0 -825
  184. package/node_modules/minipass/dist/commonjs/index.d.ts +0 -545
  185. package/node_modules/minipass/dist/commonjs/index.d.ts.map +0 -1
  186. package/node_modules/minipass/dist/commonjs/index.js +0 -1038
  187. package/node_modules/minipass/dist/commonjs/index.js.map +0 -1
  188. package/node_modules/minipass/dist/commonjs/package.json +0 -3
  189. package/node_modules/minipass/dist/esm/index.d.ts +0 -545
  190. package/node_modules/minipass/dist/esm/index.d.ts.map +0 -1
  191. package/node_modules/minipass/dist/esm/index.js +0 -1020
  192. package/node_modules/minipass/dist/esm/index.js.map +0 -1
  193. package/node_modules/minipass/dist/esm/package.json +0 -3
  194. package/node_modules/minipass/package.json +0 -77
  195. package/node_modules/minizlib/LICENSE +0 -26
  196. package/node_modules/minizlib/README.md +0 -64
  197. package/node_modules/minizlib/dist/commonjs/constants.d.ts +0 -2
  198. package/node_modules/minizlib/dist/commonjs/constants.d.ts.map +0 -1
  199. package/node_modules/minizlib/dist/commonjs/constants.js +0 -123
  200. package/node_modules/minizlib/dist/commonjs/constants.js.map +0 -1
  201. package/node_modules/minizlib/dist/commonjs/index.d.ts +0 -99
  202. package/node_modules/minizlib/dist/commonjs/index.d.ts.map +0 -1
  203. package/node_modules/minizlib/dist/commonjs/index.js +0 -416
  204. package/node_modules/minizlib/dist/commonjs/index.js.map +0 -1
  205. package/node_modules/minizlib/dist/commonjs/package.json +0 -3
  206. package/node_modules/minizlib/dist/esm/constants.d.ts +0 -2
  207. package/node_modules/minizlib/dist/esm/constants.d.ts.map +0 -1
  208. package/node_modules/minizlib/dist/esm/constants.js +0 -117
  209. package/node_modules/minizlib/dist/esm/constants.js.map +0 -1
  210. package/node_modules/minizlib/dist/esm/index.d.ts +0 -99
  211. package/node_modules/minizlib/dist/esm/index.d.ts.map +0 -1
  212. package/node_modules/minizlib/dist/esm/index.js +0 -363
  213. package/node_modules/minizlib/dist/esm/index.js.map +0 -1
  214. package/node_modules/minizlib/dist/esm/package.json +0 -3
  215. package/node_modules/minizlib/package.json +0 -80
  216. package/node_modules/tar/LICENSE.md +0 -55
  217. package/node_modules/tar/README.md +0 -1224
  218. package/node_modules/tar/dist/commonjs/create.d.ts +0 -3
  219. package/node_modules/tar/dist/commonjs/create.d.ts.map +0 -1
  220. package/node_modules/tar/dist/commonjs/create.js +0 -82
  221. package/node_modules/tar/dist/commonjs/create.js.map +0 -1
  222. package/node_modules/tar/dist/commonjs/cwd-error.d.ts +0 -8
  223. package/node_modules/tar/dist/commonjs/cwd-error.d.ts.map +0 -1
  224. package/node_modules/tar/dist/commonjs/cwd-error.js +0 -18
  225. package/node_modules/tar/dist/commonjs/cwd-error.js.map +0 -1
  226. package/node_modules/tar/dist/commonjs/extract.d.ts +0 -3
  227. package/node_modules/tar/dist/commonjs/extract.d.ts.map +0 -1
  228. package/node_modules/tar/dist/commonjs/extract.js +0 -88
  229. package/node_modules/tar/dist/commonjs/extract.js.map +0 -1
  230. package/node_modules/tar/dist/commonjs/get-write-flag.d.ts +0 -2
  231. package/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map +0 -1
  232. package/node_modules/tar/dist/commonjs/get-write-flag.js +0 -32
  233. package/node_modules/tar/dist/commonjs/get-write-flag.js.map +0 -1
  234. package/node_modules/tar/dist/commonjs/header.d.ts +0 -53
  235. package/node_modules/tar/dist/commonjs/header.d.ts.map +0 -1
  236. package/node_modules/tar/dist/commonjs/header.js +0 -312
  237. package/node_modules/tar/dist/commonjs/header.js.map +0 -1
  238. package/node_modules/tar/dist/commonjs/index.d.ts +0 -20
  239. package/node_modules/tar/dist/commonjs/index.d.ts.map +0 -1
  240. package/node_modules/tar/dist/commonjs/index.js +0 -64
  241. package/node_modules/tar/dist/commonjs/index.js.map +0 -1
  242. package/node_modules/tar/dist/commonjs/index.min.js +0 -4
  243. package/node_modules/tar/dist/commonjs/index.min.js.map +0 -7
  244. package/node_modules/tar/dist/commonjs/large-numbers.d.ts +0 -3
  245. package/node_modules/tar/dist/commonjs/large-numbers.d.ts.map +0 -1
  246. package/node_modules/tar/dist/commonjs/large-numbers.js +0 -99
  247. package/node_modules/tar/dist/commonjs/large-numbers.js.map +0 -1
  248. package/node_modules/tar/dist/commonjs/list.d.ts +0 -7
  249. package/node_modules/tar/dist/commonjs/list.d.ts.map +0 -1
  250. package/node_modules/tar/dist/commonjs/list.js +0 -145
  251. package/node_modules/tar/dist/commonjs/list.js.map +0 -1
  252. package/node_modules/tar/dist/commonjs/make-command.d.ts +0 -49
  253. package/node_modules/tar/dist/commonjs/make-command.d.ts.map +0 -1
  254. package/node_modules/tar/dist/commonjs/make-command.js +0 -52
  255. package/node_modules/tar/dist/commonjs/make-command.js.map +0 -1
  256. package/node_modules/tar/dist/commonjs/mkdir.d.ts +0 -25
  257. package/node_modules/tar/dist/commonjs/mkdir.d.ts.map +0 -1
  258. package/node_modules/tar/dist/commonjs/mkdir.js +0 -187
  259. package/node_modules/tar/dist/commonjs/mkdir.js.map +0 -1
  260. package/node_modules/tar/dist/commonjs/mode-fix.d.ts +0 -2
  261. package/node_modules/tar/dist/commonjs/mode-fix.d.ts.map +0 -1
  262. package/node_modules/tar/dist/commonjs/mode-fix.js +0 -29
  263. package/node_modules/tar/dist/commonjs/mode-fix.js.map +0 -1
  264. package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts +0 -2
  265. package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map +0 -1
  266. package/node_modules/tar/dist/commonjs/normalize-unicode.js +0 -38
  267. package/node_modules/tar/dist/commonjs/normalize-unicode.js.map +0 -1
  268. package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +0 -2
  269. package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map +0 -1
  270. package/node_modules/tar/dist/commonjs/normalize-windows-path.js +0 -12
  271. package/node_modules/tar/dist/commonjs/normalize-windows-path.js.map +0 -1
  272. package/node_modules/tar/dist/commonjs/options.d.ts +0 -596
  273. package/node_modules/tar/dist/commonjs/options.d.ts.map +0 -1
  274. package/node_modules/tar/dist/commonjs/options.js +0 -66
  275. package/node_modules/tar/dist/commonjs/options.js.map +0 -1
  276. package/node_modules/tar/dist/commonjs/pack.d.ts +0 -102
  277. package/node_modules/tar/dist/commonjs/pack.d.ts.map +0 -1
  278. package/node_modules/tar/dist/commonjs/pack.js +0 -511
  279. package/node_modules/tar/dist/commonjs/pack.js.map +0 -1
  280. package/node_modules/tar/dist/commonjs/package.json +0 -3
  281. package/node_modules/tar/dist/commonjs/parse.d.ts +0 -85
  282. package/node_modules/tar/dist/commonjs/parse.d.ts.map +0 -1
  283. package/node_modules/tar/dist/commonjs/parse.js +0 -610
  284. package/node_modules/tar/dist/commonjs/parse.js.map +0 -1
  285. package/node_modules/tar/dist/commonjs/path-reservations.d.ts +0 -11
  286. package/node_modules/tar/dist/commonjs/path-reservations.d.ts.map +0 -1
  287. package/node_modules/tar/dist/commonjs/path-reservations.js +0 -170
  288. package/node_modules/tar/dist/commonjs/path-reservations.js.map +0 -1
  289. package/node_modules/tar/dist/commonjs/pax.d.ts +0 -26
  290. package/node_modules/tar/dist/commonjs/pax.d.ts.map +0 -1
  291. package/node_modules/tar/dist/commonjs/pax.js +0 -158
  292. package/node_modules/tar/dist/commonjs/pax.js.map +0 -1
  293. package/node_modules/tar/dist/commonjs/process-umask.d.ts +0 -2
  294. package/node_modules/tar/dist/commonjs/process-umask.d.ts.map +0 -1
  295. package/node_modules/tar/dist/commonjs/process-umask.js +0 -7
  296. package/node_modules/tar/dist/commonjs/process-umask.js.map +0 -1
  297. package/node_modules/tar/dist/commonjs/read-entry.d.ts +0 -36
  298. package/node_modules/tar/dist/commonjs/read-entry.d.ts.map +0 -1
  299. package/node_modules/tar/dist/commonjs/read-entry.js +0 -136
  300. package/node_modules/tar/dist/commonjs/read-entry.js.map +0 -1
  301. package/node_modules/tar/dist/commonjs/replace.d.ts +0 -2
  302. package/node_modules/tar/dist/commonjs/replace.d.ts.map +0 -1
  303. package/node_modules/tar/dist/commonjs/replace.js +0 -227
  304. package/node_modules/tar/dist/commonjs/replace.js.map +0 -1
  305. package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +0 -2
  306. package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map +0 -1
  307. package/node_modules/tar/dist/commonjs/strip-absolute-path.js +0 -29
  308. package/node_modules/tar/dist/commonjs/strip-absolute-path.js.map +0 -1
  309. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts +0 -2
  310. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map +0 -1
  311. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +0 -18
  312. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map +0 -1
  313. package/node_modules/tar/dist/commonjs/symlink-error.d.ts +0 -9
  314. package/node_modules/tar/dist/commonjs/symlink-error.d.ts.map +0 -1
  315. package/node_modules/tar/dist/commonjs/symlink-error.js +0 -19
  316. package/node_modules/tar/dist/commonjs/symlink-error.js.map +0 -1
  317. package/node_modules/tar/dist/commonjs/types.d.ts +0 -7
  318. package/node_modules/tar/dist/commonjs/types.d.ts.map +0 -1
  319. package/node_modules/tar/dist/commonjs/types.js +0 -50
  320. package/node_modules/tar/dist/commonjs/types.js.map +0 -1
  321. package/node_modules/tar/dist/commonjs/unpack.d.ts +0 -101
  322. package/node_modules/tar/dist/commonjs/unpack.d.ts.map +0 -1
  323. package/node_modules/tar/dist/commonjs/unpack.js +0 -932
  324. package/node_modules/tar/dist/commonjs/unpack.js.map +0 -1
  325. package/node_modules/tar/dist/commonjs/update.d.ts +0 -2
  326. package/node_modules/tar/dist/commonjs/update.d.ts.map +0 -1
  327. package/node_modules/tar/dist/commonjs/update.js +0 -33
  328. package/node_modules/tar/dist/commonjs/update.js.map +0 -1
  329. package/node_modules/tar/dist/commonjs/warn-method.d.ts +0 -24
  330. package/node_modules/tar/dist/commonjs/warn-method.d.ts.map +0 -1
  331. package/node_modules/tar/dist/commonjs/warn-method.js +0 -31
  332. package/node_modules/tar/dist/commonjs/warn-method.js.map +0 -1
  333. package/node_modules/tar/dist/commonjs/winchars.d.ts +0 -3
  334. package/node_modules/tar/dist/commonjs/winchars.d.ts.map +0 -1
  335. package/node_modules/tar/dist/commonjs/winchars.js +0 -14
  336. package/node_modules/tar/dist/commonjs/winchars.js.map +0 -1
  337. package/node_modules/tar/dist/commonjs/write-entry.d.ts +0 -129
  338. package/node_modules/tar/dist/commonjs/write-entry.d.ts.map +0 -1
  339. package/node_modules/tar/dist/commonjs/write-entry.js +0 -698
  340. package/node_modules/tar/dist/commonjs/write-entry.js.map +0 -1
  341. package/node_modules/tar/dist/esm/create.d.ts +0 -3
  342. package/node_modules/tar/dist/esm/create.d.ts.map +0 -1
  343. package/node_modules/tar/dist/esm/create.js +0 -76
  344. package/node_modules/tar/dist/esm/create.js.map +0 -1
  345. package/node_modules/tar/dist/esm/cwd-error.d.ts +0 -8
  346. package/node_modules/tar/dist/esm/cwd-error.d.ts.map +0 -1
  347. package/node_modules/tar/dist/esm/cwd-error.js +0 -14
  348. package/node_modules/tar/dist/esm/cwd-error.js.map +0 -1
  349. package/node_modules/tar/dist/esm/extract.d.ts +0 -3
  350. package/node_modules/tar/dist/esm/extract.d.ts.map +0 -1
  351. package/node_modules/tar/dist/esm/extract.js +0 -49
  352. package/node_modules/tar/dist/esm/extract.js.map +0 -1
  353. package/node_modules/tar/dist/esm/get-write-flag.d.ts +0 -2
  354. package/node_modules/tar/dist/esm/get-write-flag.d.ts.map +0 -1
  355. package/node_modules/tar/dist/esm/get-write-flag.js +0 -26
  356. package/node_modules/tar/dist/esm/get-write-flag.js.map +0 -1
  357. package/node_modules/tar/dist/esm/header.d.ts +0 -53
  358. package/node_modules/tar/dist/esm/header.d.ts.map +0 -1
  359. package/node_modules/tar/dist/esm/header.js +0 -275
  360. package/node_modules/tar/dist/esm/header.js.map +0 -1
  361. package/node_modules/tar/dist/esm/index.d.ts +0 -20
  362. package/node_modules/tar/dist/esm/index.d.ts.map +0 -1
  363. package/node_modules/tar/dist/esm/index.js +0 -20
  364. package/node_modules/tar/dist/esm/index.js.map +0 -1
  365. package/node_modules/tar/dist/esm/index.min.js +0 -4
  366. package/node_modules/tar/dist/esm/index.min.js.map +0 -7
  367. package/node_modules/tar/dist/esm/large-numbers.d.ts +0 -3
  368. package/node_modules/tar/dist/esm/large-numbers.d.ts.map +0 -1
  369. package/node_modules/tar/dist/esm/large-numbers.js +0 -94
  370. package/node_modules/tar/dist/esm/large-numbers.js.map +0 -1
  371. package/node_modules/tar/dist/esm/list.d.ts +0 -7
  372. package/node_modules/tar/dist/esm/list.d.ts.map +0 -1
  373. package/node_modules/tar/dist/esm/list.js +0 -105
  374. package/node_modules/tar/dist/esm/list.js.map +0 -1
  375. package/node_modules/tar/dist/esm/make-command.d.ts +0 -49
  376. package/node_modules/tar/dist/esm/make-command.d.ts.map +0 -1
  377. package/node_modules/tar/dist/esm/make-command.js +0 -48
  378. package/node_modules/tar/dist/esm/make-command.js.map +0 -1
  379. package/node_modules/tar/dist/esm/mkdir.d.ts +0 -25
  380. package/node_modules/tar/dist/esm/mkdir.d.ts.map +0 -1
  381. package/node_modules/tar/dist/esm/mkdir.js +0 -179
  382. package/node_modules/tar/dist/esm/mkdir.js.map +0 -1
  383. package/node_modules/tar/dist/esm/mode-fix.d.ts +0 -2
  384. package/node_modules/tar/dist/esm/mode-fix.d.ts.map +0 -1
  385. package/node_modules/tar/dist/esm/mode-fix.js +0 -25
  386. package/node_modules/tar/dist/esm/mode-fix.js.map +0 -1
  387. package/node_modules/tar/dist/esm/normalize-unicode.d.ts +0 -2
  388. package/node_modules/tar/dist/esm/normalize-unicode.d.ts.map +0 -1
  389. package/node_modules/tar/dist/esm/normalize-unicode.js +0 -34
  390. package/node_modules/tar/dist/esm/normalize-unicode.js.map +0 -1
  391. package/node_modules/tar/dist/esm/normalize-windows-path.d.ts +0 -2
  392. package/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map +0 -1
  393. package/node_modules/tar/dist/esm/normalize-windows-path.js +0 -9
  394. package/node_modules/tar/dist/esm/normalize-windows-path.js.map +0 -1
  395. package/node_modules/tar/dist/esm/options.d.ts +0 -596
  396. package/node_modules/tar/dist/esm/options.d.ts.map +0 -1
  397. package/node_modules/tar/dist/esm/options.js +0 -54
  398. package/node_modules/tar/dist/esm/options.js.map +0 -1
  399. package/node_modules/tar/dist/esm/pack.d.ts +0 -102
  400. package/node_modules/tar/dist/esm/pack.d.ts.map +0 -1
  401. package/node_modules/tar/dist/esm/pack.js +0 -469
  402. package/node_modules/tar/dist/esm/pack.js.map +0 -1
  403. package/node_modules/tar/dist/esm/package.json +0 -3
  404. package/node_modules/tar/dist/esm/parse.d.ts +0 -85
  405. package/node_modules/tar/dist/esm/parse.d.ts.map +0 -1
  406. package/node_modules/tar/dist/esm/parse.js +0 -606
  407. package/node_modules/tar/dist/esm/parse.js.map +0 -1
  408. package/node_modules/tar/dist/esm/path-reservations.d.ts +0 -11
  409. package/node_modules/tar/dist/esm/path-reservations.d.ts.map +0 -1
  410. package/node_modules/tar/dist/esm/path-reservations.js +0 -166
  411. package/node_modules/tar/dist/esm/path-reservations.js.map +0 -1
  412. package/node_modules/tar/dist/esm/pax.d.ts +0 -26
  413. package/node_modules/tar/dist/esm/pax.d.ts.map +0 -1
  414. package/node_modules/tar/dist/esm/pax.js +0 -154
  415. package/node_modules/tar/dist/esm/pax.js.map +0 -1
  416. package/node_modules/tar/dist/esm/process-umask.d.ts +0 -2
  417. package/node_modules/tar/dist/esm/process-umask.d.ts.map +0 -1
  418. package/node_modules/tar/dist/esm/process-umask.js +0 -3
  419. package/node_modules/tar/dist/esm/process-umask.js.map +0 -1
  420. package/node_modules/tar/dist/esm/read-entry.d.ts +0 -36
  421. package/node_modules/tar/dist/esm/read-entry.d.ts.map +0 -1
  422. package/node_modules/tar/dist/esm/read-entry.js +0 -132
  423. package/node_modules/tar/dist/esm/read-entry.js.map +0 -1
  424. package/node_modules/tar/dist/esm/replace.d.ts +0 -2
  425. package/node_modules/tar/dist/esm/replace.d.ts.map +0 -1
  426. package/node_modules/tar/dist/esm/replace.js +0 -221
  427. package/node_modules/tar/dist/esm/replace.js.map +0 -1
  428. package/node_modules/tar/dist/esm/strip-absolute-path.d.ts +0 -2
  429. package/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map +0 -1
  430. package/node_modules/tar/dist/esm/strip-absolute-path.js +0 -25
  431. package/node_modules/tar/dist/esm/strip-absolute-path.js.map +0 -1
  432. package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts +0 -2
  433. package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map +0 -1
  434. package/node_modules/tar/dist/esm/strip-trailing-slashes.js +0 -14
  435. package/node_modules/tar/dist/esm/strip-trailing-slashes.js.map +0 -1
  436. package/node_modules/tar/dist/esm/symlink-error.d.ts +0 -9
  437. package/node_modules/tar/dist/esm/symlink-error.d.ts.map +0 -1
  438. package/node_modules/tar/dist/esm/symlink-error.js +0 -15
  439. package/node_modules/tar/dist/esm/symlink-error.js.map +0 -1
  440. package/node_modules/tar/dist/esm/types.d.ts +0 -7
  441. package/node_modules/tar/dist/esm/types.d.ts.map +0 -1
  442. package/node_modules/tar/dist/esm/types.js +0 -45
  443. package/node_modules/tar/dist/esm/types.js.map +0 -1
  444. package/node_modules/tar/dist/esm/unpack.d.ts +0 -101
  445. package/node_modules/tar/dist/esm/unpack.d.ts.map +0 -1
  446. package/node_modules/tar/dist/esm/unpack.js +0 -891
  447. package/node_modules/tar/dist/esm/unpack.js.map +0 -1
  448. package/node_modules/tar/dist/esm/update.d.ts +0 -2
  449. package/node_modules/tar/dist/esm/update.d.ts.map +0 -1
  450. package/node_modules/tar/dist/esm/update.js +0 -30
  451. package/node_modules/tar/dist/esm/update.js.map +0 -1
  452. package/node_modules/tar/dist/esm/warn-method.d.ts +0 -24
  453. package/node_modules/tar/dist/esm/warn-method.d.ts.map +0 -1
  454. package/node_modules/tar/dist/esm/warn-method.js +0 -27
  455. package/node_modules/tar/dist/esm/warn-method.js.map +0 -1
  456. package/node_modules/tar/dist/esm/winchars.d.ts +0 -3
  457. package/node_modules/tar/dist/esm/winchars.d.ts.map +0 -1
  458. package/node_modules/tar/dist/esm/winchars.js +0 -9
  459. package/node_modules/tar/dist/esm/winchars.js.map +0 -1
  460. package/node_modules/tar/dist/esm/write-entry.d.ts +0 -129
  461. package/node_modules/tar/dist/esm/write-entry.d.ts.map +0 -1
  462. package/node_modules/tar/dist/esm/write-entry.js +0 -656
  463. package/node_modules/tar/dist/esm/write-entry.js.map +0 -1
  464. package/node_modules/tar/package.json +0 -297
  465. package/node_modules/yallist/LICENSE.md +0 -63
  466. package/node_modules/yallist/README.md +0 -205
  467. package/node_modules/yallist/dist/commonjs/index.d.ts +0 -39
  468. package/node_modules/yallist/dist/commonjs/index.d.ts.map +0 -1
  469. package/node_modules/yallist/dist/commonjs/index.js +0 -384
  470. package/node_modules/yallist/dist/commonjs/index.js.map +0 -1
  471. package/node_modules/yallist/dist/commonjs/package.json +0 -3
  472. package/node_modules/yallist/dist/esm/index.d.ts +0 -39
  473. package/node_modules/yallist/dist/esm/index.d.ts.map +0 -1
  474. package/node_modules/yallist/dist/esm/index.js +0 -379
  475. package/node_modules/yallist/dist/esm/index.js.map +0 -1
  476. package/node_modules/yallist/dist/esm/package.json +0 -3
  477. package/node_modules/yallist/package.json +0 -68
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,sEAAsE;AACtE,gEAAgE;AAChE,EAAE;AACF,6DAA6D;AAC7D,qEAAqE;AACrE,sEAAsE;AACtE,EAAE;AACF,oEAAoE;AACpE,sEAAsE;AACtE,qCAAqC;AACrC,EAAE;AACF,uEAAuE;AACvE,4BAA4B;AAC5B,EAAE;AACF,uEAAuE;AACvE,kDAAkD;AAClD,EAAE;AACF,6DAA6D;AAE7D,OAAO,EAAE,YAAY,IAAI,EAAE,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,UAAU,EAA8B,MAAM,kBAAkB,CAAA;AAEzE,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAAA;AACpC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAC5C,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AACxD,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;AAEr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I,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAA;YACnB,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAA;gBAClB,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;oBACtD,KAAK,GAAG,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;gBAClC,IAAI,KAAK;oBAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;gBAC5B,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAA;YAClB,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF","sourcesContent":["// this[BUFFER] is the remainder of a chunk if we're waiting for\n// the full 512 bytes of a header to come in. We will Buffer.concat()\n// it to the next write(), which is a mem copy, but a small one.\n//\n// this[QUEUE] is a list of entries that haven't been emitted\n// yet this can only get filled up if the user keeps write()ing after\n// a write() returns false, or does a write() with more than one entry\n//\n// We don't buffer chunks, we always parse them and either create an\n// entry, or push it into the active entry. The ReadEntry class knows\n// to throw data away if .ignore=true\n//\n// Shift entry off the buffer when it emits 'end', and emit 'entry' for\n// the next one in the list.\n//\n// At any time, we're pushing body chunks into the entry at WRITEENTRY,\n// and waiting for 'end' on the entry at READENTRY\n//\n// ignored entries get .resume() called on them straight away\n\nimport { EventEmitter as EE } from 'events'\nimport { BrotliDecompress, Unzip, ZstdDecompress } from 'minizlib'\nimport { Header } from './header.js'\nimport type { TarOptions } from './options.js'\nimport { Pax } from './pax.js'\nimport { ReadEntry } from './read-entry.js'\nimport { warnMethod, type WarnData, type Warner } from './warn-method.js'\n\nconst maxMetaEntrySize = 1024 * 1024\nconst gzipHeader = Buffer.from([0x1f, 0x8b])\nconst zstdHeader = Buffer.from([0x28, 0xb5, 0x2f, 0xfd])\nconst ZIP_HEADER_LEN = Math.max(gzipHeader.length, zstdHeader.length)\n\nconst STATE = Symbol('state')\nconst WRITEENTRY = Symbol('writeEntry')\nconst READENTRY = Symbol('readEntry')\nconst NEXTENTRY = Symbol('nextEntry')\nconst PROCESSENTRY = Symbol('processEntry')\nconst EX = Symbol('extendedHeader')\nconst GEX = Symbol('globalExtendedHeader')\nconst META = Symbol('meta')\nconst EMITMETA = Symbol('emitMeta')\nconst BUFFER = Symbol('buffer')\nconst QUEUE = Symbol('queue')\nconst ENDED = Symbol('ended')\nconst EMITTEDEND = Symbol('emittedEnd')\nconst EMIT = Symbol('emit')\nconst UNZIP = Symbol('unzip')\nconst CONSUMECHUNK = Symbol('consumeChunk')\nconst CONSUMECHUNKSUB = Symbol('consumeChunkSub')\nconst CONSUMEBODY = Symbol('consumeBody')\nconst CONSUMEMETA = Symbol('consumeMeta')\nconst CONSUMEHEADER = Symbol('consumeHeader')\nconst CONSUMING = Symbol('consuming')\nconst BUFFERCONCAT = Symbol('bufferConcat')\nconst MAYBEEND = Symbol('maybeEnd')\nconst WRITING = Symbol('writing')\nconst ABORTED = Symbol('aborted')\nconst DONE = Symbol('onDone')\nconst SAW_VALID_ENTRY = Symbol('sawValidEntry')\nconst SAW_NULL_BLOCK = Symbol('sawNullBlock')\nconst SAW_EOF = Symbol('sawEOF')\nconst CLOSESTREAM = Symbol('closeStream')\n\nconst noop = () => true\n\nexport type State = 'begin' | 'header' | 'ignore' | 'meta' | 'body'\n\nexport class Parser extends EE implements Warner {\n file: string\n strict: boolean\n maxMetaEntrySize: number\n filter: Exclude<TarOptions['filter'], undefined>\n brotli?: TarOptions['brotli']\n zstd?: TarOptions['zstd']\n\n writable: true = true\n readable: false = false;\n\n [QUEUE]: (ReadEntry | [string | symbol, unknown, unknown])[] = [];\n [BUFFER]?: Buffer;\n [READENTRY]?: ReadEntry;\n [WRITEENTRY]?: ReadEntry;\n [STATE]: State = 'begin';\n [META]: string = '';\n [EX]?: Pax;\n [GEX]?: Pax;\n [ENDED]: boolean = false;\n [UNZIP]?: false | Unzip | BrotliDecompress | ZstdDecompress;\n [ABORTED]: boolean = false;\n [SAW_VALID_ENTRY]?: boolean;\n [SAW_NULL_BLOCK]: boolean = false;\n [SAW_EOF]: boolean = false;\n [WRITING]: boolean = false;\n [CONSUMING]: boolean = false;\n [EMITTEDEND]: boolean = false\n\n constructor(opt: TarOptions = {}) {\n super()\n\n this.file = opt.file || ''\n\n // these BADARCHIVE errors can't be detected early. listen on DONE.\n this.on(DONE, () => {\n if (this[STATE] === 'begin' || this[SAW_VALID_ENTRY] === false) {\n // either less than 1 block of data, or all entries were invalid.\n // Either way, probably not even a tarball.\n this.warn('TAR_BAD_ARCHIVE', 'Unrecognized archive format')\n }\n })\n\n if (opt.ondone) {\n this.on(DONE, opt.ondone)\n } else {\n this.on(DONE, () => {\n this.emit('prefinish')\n this.emit('finish')\n this.emit('end')\n })\n }\n\n this.strict = !!opt.strict\n this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize\n this.filter = typeof opt.filter === 'function' ? opt.filter : noop\n // Unlike gzip, brotli doesn't have any magic bytes to identify it\n // Users need to explicitly tell us they're extracting a brotli file\n // Or we infer from the file extension\n const isTBR =\n opt.file &&\n (opt.file.endsWith('.tar.br') || opt.file.endsWith('.tbr'))\n // if it's a tbr file it MIGHT be brotli, but we don't know until\n // we look at it and verify it's not a valid tar file.\n this.brotli =\n !(opt.gzip || opt.zstd) && opt.brotli !== undefined ? opt.brotli\n : isTBR ? undefined\n : false\n\n // zstd has magic bytes to identify it, but we also support explicit options\n // and file extension detection\n const isTZST =\n opt.file &&\n (opt.file.endsWith('.tar.zst') || opt.file.endsWith('.tzst'))\n this.zstd =\n !(opt.gzip || opt.brotli) && opt.zstd !== undefined ? opt.zstd\n : isTZST ? true\n : undefined\n\n // have to set this so that streams are ok piping into it\n this.on('end', () => this[CLOSESTREAM]())\n\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n if (typeof opt.onReadEntry === 'function') {\n this.on('entry', opt.onReadEntry)\n }\n }\n\n warn(code: string, message: string | Error, data: WarnData = {}): void {\n warnMethod(this, code, message, data)\n }\n\n [CONSUMEHEADER](chunk: Buffer, position: number) {\n if (this[SAW_VALID_ENTRY] === undefined) {\n this[SAW_VALID_ENTRY] = false\n }\n let header\n try {\n header = new Header(chunk, position, this[EX], this[GEX])\n } catch (er) {\n return this.warn('TAR_ENTRY_INVALID', er as Error)\n }\n\n if (header.nullBlock) {\n if (this[SAW_NULL_BLOCK]) {\n this[SAW_EOF] = true\n // ending an archive with no entries. pointless, but legal.\n if (this[STATE] === 'begin') {\n this[STATE] = 'header'\n }\n this[EMIT]('eof')\n } else {\n this[SAW_NULL_BLOCK] = true\n this[EMIT]('nullBlock')\n }\n } else {\n this[SAW_NULL_BLOCK] = false\n if (!header.cksumValid) {\n this.warn('TAR_ENTRY_INVALID', 'checksum failure', { header })\n } else if (!header.path) {\n this.warn('TAR_ENTRY_INVALID', 'path is required', { header })\n } else {\n const type = header.type\n if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) {\n this.warn('TAR_ENTRY_INVALID', 'linkpath required', {\n header,\n })\n } else if (\n !/^(Symbolic)?Link$/.test(type) &&\n !/^(Global)?ExtendedHeader$/.test(type) &&\n header.linkpath\n ) {\n this.warn('TAR_ENTRY_INVALID', 'linkpath forbidden', {\n header,\n })\n } else {\n const entry = (this[WRITEENTRY] = new ReadEntry(\n header,\n this[EX],\n this[GEX],\n ))\n\n // we do this for meta & ignored entries as well, because they\n // are still valid tar, or else we wouldn't know to ignore them\n if (!this[SAW_VALID_ENTRY]) {\n if (entry.remain) {\n // this might be the one!\n const onend = () => {\n if (!entry.invalid) {\n this[SAW_VALID_ENTRY] = true\n }\n }\n entry.on('end', onend)\n } else {\n this[SAW_VALID_ENTRY] = true\n }\n }\n\n if (entry.meta) {\n if (entry.size > this.maxMetaEntrySize) {\n entry.ignore = true\n this[EMIT]('ignoredEntry', entry)\n this[STATE] = 'ignore'\n entry.resume()\n } else if (entry.size > 0) {\n this[META] = ''\n entry.on('data', c => (this[META] += c))\n this[STATE] = 'meta'\n }\n } else {\n this[EX] = undefined\n entry.ignore = entry.ignore || !this.filter(entry.path, entry)\n\n if (entry.ignore) {\n // probably valid, just not something we care about\n this[EMIT]('ignoredEntry', entry)\n this[STATE] = entry.remain ? 'ignore' : 'header'\n entry.resume()\n } else {\n if (entry.remain) {\n this[STATE] = 'body'\n } else {\n this[STATE] = 'header'\n entry.end()\n }\n\n if (!this[READENTRY]) {\n this[QUEUE].push(entry)\n this[NEXTENTRY]()\n } else {\n this[QUEUE].push(entry)\n }\n }\n }\n }\n }\n }\n }\n\n [CLOSESTREAM]() {\n queueMicrotask(() => this.emit('close'))\n }\n\n [PROCESSENTRY](entry?: ReadEntry | [string | symbol, unknown, unknown]) {\n let go = true\n\n if (!entry) {\n this[READENTRY] = undefined\n go = false\n } else if (Array.isArray(entry)) {\n const [ev, ...args]: [string | symbol, unknown, unknown] = entry\n this.emit(ev, ...args)\n } else {\n this[READENTRY] = entry\n this.emit('entry', entry)\n if (!entry.emittedEnd) {\n entry.on('end', () => this[NEXTENTRY]())\n go = false\n }\n }\n\n return go\n }\n\n [NEXTENTRY]() {\n do {} while (this[PROCESSENTRY](this[QUEUE].shift()))\n\n if (this[QUEUE].length === 0) {\n // At this point, there's nothing in the queue, but we may have an\n // entry which is being consumed (readEntry).\n // If we don't, then we definitely can handle more data.\n // If we do, and either it's flowing, or it has never had any data\n // written to it, then it needs more.\n // The only other possibility is that it has returned false from a\n // write() call, so we wait for the next drain to continue.\n const re = this[READENTRY]\n const drainNow = !re || re.flowing || re.size === re.remain\n if (drainNow) {\n if (!this[WRITING]) {\n this.emit('drain')\n }\n } else {\n re.once('drain', () => this.emit('drain'))\n }\n }\n }\n\n [CONSUMEBODY](chunk: Buffer, position: number) {\n // write up to but no more than writeEntry.blockRemain\n const entry = this[WRITEENTRY]\n /* c8 ignore start */\n if (!entry) {\n throw new Error('attempt to consume body without entry??')\n }\n const br = entry.blockRemain ?? 0\n /* c8 ignore stop */\n const c =\n br >= chunk.length && position === 0 ?\n chunk\n : chunk.subarray(position, position + br)\n\n entry.write(c)\n\n if (!entry.blockRemain) {\n this[STATE] = 'header'\n this[WRITEENTRY] = undefined\n entry.end()\n }\n\n return c.length\n }\n\n [CONSUMEMETA](chunk: Buffer, position: number) {\n const entry = this[WRITEENTRY]\n const ret = this[CONSUMEBODY](chunk, position)\n\n // if we finished, then the entry is reset\n if (!this[WRITEENTRY] && entry) {\n this[EMITMETA](entry)\n }\n\n return ret\n }\n\n [EMIT](ev: string | symbol, data?: unknown, extra?: unknown) {\n if (this[QUEUE].length === 0 && !this[READENTRY]) {\n this.emit(ev, data, extra)\n } else {\n this[QUEUE].push([ev, data, extra])\n }\n }\n\n [EMITMETA](entry: ReadEntry) {\n this[EMIT]('meta', this[META])\n switch (entry.type) {\n case 'ExtendedHeader':\n case 'OldExtendedHeader':\n this[EX] = Pax.parse(this[META], this[EX], false)\n break\n\n case 'GlobalExtendedHeader':\n this[GEX] = Pax.parse(this[META], this[GEX], true)\n break\n\n case 'NextFileHasLongPath':\n case 'OldGnuLongPath': {\n const ex = this[EX] ?? Object.create(null)\n this[EX] = ex\n ex.path = this[META].replace(/\\0.*/, '')\n break\n }\n\n case 'NextFileHasLongLinkpath': {\n const ex = this[EX] || Object.create(null)\n this[EX] = ex\n ex.linkpath = this[META].replace(/\\0.*/, '')\n break\n }\n\n /* c8 ignore start */\n default:\n throw new Error('unknown meta: ' + entry.type)\n /* c8 ignore stop */\n }\n }\n\n abort(error: Error) {\n this[ABORTED] = true\n this.emit('abort', error)\n // always throws, even in non-strict mode\n this.warn('TAR_ABORT', error, { recoverable: false })\n }\n\n write(\n buffer: Uint8Array | string,\n cb?: (err?: Error | null) => void,\n ): boolean\n write(\n str: string,\n encoding?: BufferEncoding,\n cb?: (err?: Error | null) => void,\n ): boolean\n write(\n chunk: Buffer | string,\n encoding?: BufferEncoding | (() => unknown),\n cb?: () => unknown,\n ): boolean {\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(\n chunk,\n /* c8 ignore next */\n typeof encoding === 'string' ? encoding : 'utf8',\n )\n }\n if (this[ABORTED]) {\n /* c8 ignore next */\n cb?.()\n return false\n }\n\n // first write, might be gzipped, zstd, or brotli compressed\n const needSniff =\n this[UNZIP] === undefined ||\n (this.brotli === undefined && this[UNZIP] === false)\n if (needSniff && chunk) {\n if (this[BUFFER]) {\n chunk = Buffer.concat([this[BUFFER], chunk])\n this[BUFFER] = undefined\n }\n if (chunk.length < ZIP_HEADER_LEN) {\n this[BUFFER] = chunk\n /* c8 ignore next */\n cb?.()\n return true\n }\n\n // look for gzip header\n for (\n let i = 0;\n this[UNZIP] === undefined && i < gzipHeader.length;\n i++\n ) {\n if (chunk[i] !== gzipHeader[i]) {\n this[UNZIP] = false\n }\n }\n\n // look for zstd header if gzip header not found\n let isZstd = false\n if (this[UNZIP] === false && this.zstd !== false) {\n isZstd = true\n for (let i = 0; i < zstdHeader.length; i++) {\n if (chunk[i] !== zstdHeader[i]) {\n isZstd = false\n break\n }\n }\n }\n\n const maybeBrotli = this.brotli === undefined && !isZstd\n if (this[UNZIP] === false && maybeBrotli) {\n // read the first header to see if it's a valid tar file. If so,\n // we can safely assume that it's not actually brotli, despite the\n // .tbr or .tar.br file extension.\n // if we ended before getting a full chunk, yes, def brotli\n if (chunk.length < 512) {\n if (this[ENDED]) {\n this.brotli = true\n } else {\n this[BUFFER] = chunk\n /* c8 ignore next */\n cb?.()\n return true\n }\n } else {\n // if it's tar, it's pretty reliably not brotli, chances of\n // that happening are astronomical.\n try {\n new Header(chunk.subarray(0, 512))\n this.brotli = false\n } catch (_) {\n this.brotli = true\n }\n }\n }\n\n if (\n this[UNZIP] === undefined ||\n (this[UNZIP] === false && (this.brotli || isZstd))\n ) {\n const ended = this[ENDED]\n this[ENDED] = false\n this[UNZIP] =\n this[UNZIP] === undefined ? new Unzip({})\n : isZstd ? new ZstdDecompress({})\n : new BrotliDecompress({})\n this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk))\n this[UNZIP].on('error', er => this.abort(er as Error))\n this[UNZIP].on('end', () => {\n this[ENDED] = true\n this[CONSUMECHUNK]()\n })\n this[WRITING] = true\n const ret = !!this[UNZIP][ended ? 'end' : 'write'](chunk)\n this[WRITING] = false\n cb?.()\n return ret\n }\n }\n\n this[WRITING] = true\n if (this[UNZIP]) {\n this[UNZIP].write(chunk)\n } else {\n this[CONSUMECHUNK](chunk)\n }\n this[WRITING] = false\n\n // return false if there's a queue, or if the current entry isn't flowing\n const ret =\n this[QUEUE].length > 0 ? false\n : this[READENTRY] ? this[READENTRY].flowing\n : true\n\n // if we have no queue, then that means a clogged READENTRY\n if (!ret && this[QUEUE].length === 0) {\n this[READENTRY]?.once('drain', () => this.emit('drain'))\n }\n\n /* c8 ignore next */\n cb?.()\n return ret\n }\n\n [BUFFERCONCAT](c: Buffer) {\n if (c && !this[ABORTED]) {\n this[BUFFER] = this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c\n }\n }\n\n [MAYBEEND]() {\n if (\n this[ENDED] &&\n !this[EMITTEDEND] &&\n !this[ABORTED] &&\n !this[CONSUMING]\n ) {\n this[EMITTEDEND] = true\n const entry = this[WRITEENTRY]\n if (entry && entry.blockRemain) {\n // truncated, likely a damaged file\n const have = this[BUFFER] ? this[BUFFER].length : 0\n this.warn(\n 'TAR_BAD_ARCHIVE',\n `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`,\n { entry },\n )\n if (this[BUFFER]) {\n entry.write(this[BUFFER])\n }\n entry.end()\n }\n this[EMIT](DONE)\n }\n }\n\n [CONSUMECHUNK](chunk?: Buffer) {\n if (this[CONSUMING] && chunk) {\n this[BUFFERCONCAT](chunk)\n } else if (!chunk && !this[BUFFER]) {\n this[MAYBEEND]()\n } else if (chunk) {\n this[CONSUMING] = true\n if (this[BUFFER]) {\n this[BUFFERCONCAT](chunk)\n const c = this[BUFFER]\n this[BUFFER] = undefined\n this[CONSUMECHUNKSUB](c)\n } else {\n this[CONSUMECHUNKSUB](chunk)\n }\n\n while (\n this[BUFFER] &&\n (this[BUFFER] as Buffer)?.length >= 512 &&\n !this[ABORTED] &&\n !this[SAW_EOF]\n ) {\n const c = this[BUFFER]\n this[BUFFER] = undefined\n this[CONSUMECHUNKSUB](c)\n }\n this[CONSUMING] = false\n }\n\n if (!this[BUFFER] || this[ENDED]) {\n this[MAYBEEND]()\n }\n }\n\n [CONSUMECHUNKSUB](chunk: Buffer) {\n // we know that we are in CONSUMING mode, so anything written goes into\n // the buffer. Advance the position and put any remainder in the buffer.\n let position = 0\n const length = chunk.length\n while (position + 512 <= length && !this[ABORTED] && !this[SAW_EOF]) {\n switch (this[STATE]) {\n case 'begin':\n case 'header':\n this[CONSUMEHEADER](chunk, position)\n position += 512\n break\n\n case 'ignore':\n case 'body':\n position += this[CONSUMEBODY](chunk, position)\n break\n\n case 'meta':\n position += this[CONSUMEMETA](chunk, position)\n break\n\n /* c8 ignore start */\n default:\n throw new Error('invalid state: ' + this[STATE])\n /* c8 ignore stop */\n }\n }\n\n if (position < length) {\n this[BUFFER] =\n this[BUFFER] ?\n Buffer.concat([chunk.subarray(position), this[BUFFER]])\n : chunk.subarray(position)\n }\n }\n\n end(cb?: () => void): this\n end(data: string | Buffer, cb?: () => void): this\n end(str: string, encoding?: BufferEncoding, cb?: () => void): this\n end(\n chunk?: string | Buffer | (() => void),\n encoding?: BufferEncoding | (() => void),\n cb?: () => void,\n ) {\n if (typeof chunk === 'function') {\n cb = chunk\n encoding = undefined\n chunk = undefined\n }\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding)\n }\n if (cb) this.once('finish', cb)\n if (!this[ABORTED]) {\n if (this[UNZIP]) {\n /* c8 ignore start */\n if (chunk) this[UNZIP].write(chunk)\n /* c8 ignore stop */\n this[UNZIP].end()\n } else {\n this[ENDED] = true\n if (this.brotli === undefined || this.zstd === undefined)\n chunk = chunk || Buffer.alloc(0)\n if (chunk) this.write(chunk)\n this[MAYBEEND]()\n }\n }\n return this\n }\n}\n"]}
@@ -1,11 +0,0 @@
1
- export type Reservation = {
2
- paths: string[];
3
- dirs: Set<string>;
4
- };
5
- export type Handler = (clear: () => void) => void;
6
- export declare class PathReservations {
7
- #private;
8
- reserve(paths: string[], fn: Handler): boolean;
9
- check(fn: Handler): boolean;
10
- }
11
- //# sourceMappingURL=path-reservations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"path-reservations.d.ts","sourceRoot":"","sources":["../../src/path-reservations.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;AAmBjD,qBAAa,gBAAgB;;IAY3B,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO;IA8DpC,KAAK,CAAC,EAAE,EAAE,OAAO;CA8ElB"}
@@ -1,166 +0,0 @@
1
- // A path exclusive reservation system
2
- // reserve([list, of, paths], fn)
3
- // When the fn is first in line for all its paths, it
4
- // is called with a cb that clears the reservation.
5
- //
6
- // Used by async unpack to avoid clobbering paths in use,
7
- // while still allowing maximal safe parallelization.
8
- import { join } from 'node:path';
9
- import { normalizeUnicode } from './normalize-unicode.js';
10
- import { stripTrailingSlashes } from './strip-trailing-slashes.js';
11
- const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
12
- const isWindows = platform === 'win32';
13
- // return a set of parent dirs for a given path
14
- // '/a/b/c/d' -> ['/', '/a', '/a/b', '/a/b/c', '/a/b/c/d']
15
- const getDirs = (path) => {
16
- const dirs = path
17
- .split('/')
18
- .slice(0, -1)
19
- .reduce((set, path) => {
20
- const s = set.at(-1);
21
- if (s !== undefined) {
22
- path = join(s, path);
23
- }
24
- set.push(path || '/');
25
- return set;
26
- }, []);
27
- return dirs;
28
- };
29
- export class PathReservations {
30
- // path => [function or Set]
31
- // A Set object means a directory reservation
32
- // A fn is a direct reservation on that path
33
- #queues = new Map();
34
- // fn => {paths:[path,...], dirs:[path, ...]}
35
- #reservations = new Map();
36
- // functions currently running
37
- #running = new Set();
38
- reserve(paths, fn) {
39
- paths =
40
- isWindows ?
41
- ['win32 parallelization disabled']
42
- : paths.map(p => {
43
- // don't need normPath, because we skip this entirely for windows
44
- return stripTrailingSlashes(join(normalizeUnicode(p)));
45
- });
46
- const dirs = new Set(paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b)));
47
- this.#reservations.set(fn, { dirs, paths });
48
- for (const p of paths) {
49
- const q = this.#queues.get(p);
50
- if (!q) {
51
- this.#queues.set(p, [fn]);
52
- }
53
- else {
54
- q.push(fn);
55
- }
56
- }
57
- for (const dir of dirs) {
58
- const q = this.#queues.get(dir);
59
- if (!q) {
60
- this.#queues.set(dir, [new Set([fn])]);
61
- }
62
- else {
63
- const l = q.at(-1);
64
- if (l instanceof Set) {
65
- l.add(fn);
66
- }
67
- else {
68
- q.push(new Set([fn]));
69
- }
70
- }
71
- }
72
- return this.#run(fn);
73
- }
74
- // return the queues for each path the function cares about
75
- // fn => {paths, dirs}
76
- #getQueues(fn) {
77
- const res = this.#reservations.get(fn);
78
- /* c8 ignore start */
79
- if (!res) {
80
- throw new Error('function does not have any path reservations');
81
- }
82
- /* c8 ignore stop */
83
- return {
84
- paths: res.paths.map((path) => this.#queues.get(path)),
85
- dirs: [...res.dirs].map(path => this.#queues.get(path)),
86
- };
87
- }
88
- // check if fn is first in line for all its paths, and is
89
- // included in the first set for all its dir queues
90
- check(fn) {
91
- const { paths, dirs } = this.#getQueues(fn);
92
- return (paths.every(q => q && q[0] === fn) &&
93
- dirs.every(q => q && q[0] instanceof Set && q[0].has(fn)));
94
- }
95
- // run the function if it's first in line and not already running
96
- #run(fn) {
97
- if (this.#running.has(fn) || !this.check(fn)) {
98
- return false;
99
- }
100
- this.#running.add(fn);
101
- fn(() => this.#clear(fn));
102
- return true;
103
- }
104
- #clear(fn) {
105
- if (!this.#running.has(fn)) {
106
- return false;
107
- }
108
- const res = this.#reservations.get(fn);
109
- /* c8 ignore start */
110
- if (!res) {
111
- throw new Error('invalid reservation');
112
- }
113
- /* c8 ignore stop */
114
- const { paths, dirs } = res;
115
- const next = new Set();
116
- for (const path of paths) {
117
- const q = this.#queues.get(path);
118
- /* c8 ignore start */
119
- if (!q || q?.[0] !== fn) {
120
- continue;
121
- }
122
- /* c8 ignore stop */
123
- const q0 = q[1];
124
- if (!q0) {
125
- this.#queues.delete(path);
126
- continue;
127
- }
128
- q.shift();
129
- if (typeof q0 === 'function') {
130
- next.add(q0);
131
- }
132
- else {
133
- for (const f of q0) {
134
- next.add(f);
135
- }
136
- }
137
- }
138
- for (const dir of dirs) {
139
- const q = this.#queues.get(dir);
140
- const q0 = q?.[0];
141
- /* c8 ignore next - type safety only */
142
- if (!q || !(q0 instanceof Set))
143
- continue;
144
- if (q0.size === 1 && q.length === 1) {
145
- this.#queues.delete(dir);
146
- continue;
147
- }
148
- else if (q0.size === 1) {
149
- q.shift();
150
- // next one must be a function,
151
- // or else the Set would've been reused
152
- const n = q[0];
153
- if (typeof n === 'function') {
154
- next.add(n);
155
- }
156
- }
157
- else {
158
- q0.delete(fn);
159
- }
160
- }
161
- this.#running.delete(fn);
162
- next.forEach(fn => this.#run(fn));
163
- return true;
164
- }
165
- }
166
- //# sourceMappingURL=path-reservations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"path-reservations.js","sourceRoot":"","sources":["../../src/path-reservations.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;AACjC,qDAAqD;AACrD,mDAAmD;AACnD,EAAE;AACF,yDAAyD;AACzD,qDAAqD;AAErD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AA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CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;QACxB,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;QACjC,OAAO,IAAI,CAAA;IACb,CAAC;CACF","sourcesContent":["// A path exclusive reservation system\n// reserve([list, of, paths], fn)\n// When the fn is first in line for all its paths, it\n// is called with a cb that clears the reservation.\n//\n// Used by async unpack to avoid clobbering paths in use,\n// while still allowing maximal safe parallelization.\n\nimport { join } from 'node:path'\nimport { normalizeUnicode } from './normalize-unicode.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\n\nconst platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform\nconst isWindows = platform === 'win32'\n\nexport type Reservation = {\n paths: string[]\n dirs: Set<string>\n}\n\nexport type Handler = (clear: () => void) => void\n\n// return a set of parent dirs for a given path\n// '/a/b/c/d' -> ['/', '/a', '/a/b', '/a/b/c', '/a/b/c/d']\nconst getDirs = (path: string) => {\n const dirs = path\n .split('/')\n .slice(0, -1)\n .reduce((set: string[], path) => {\n const s = set.at(-1)\n if (s !== undefined) {\n path = join(s, path)\n }\n set.push(path || '/')\n return set\n }, [])\n return dirs\n}\n\nexport class PathReservations {\n // path => [function or Set]\n // A Set object means a directory reservation\n // A fn is a direct reservation on that path\n #queues = new Map<string, (Handler | Set<Handler>)[]>()\n\n // fn => {paths:[path,...], dirs:[path, ...]}\n #reservations = new Map<Handler, Reservation>()\n\n // functions currently running\n #running = new Set<Handler>()\n\n reserve(paths: string[], fn: Handler) {\n paths =\n isWindows ?\n ['win32 parallelization disabled']\n : paths.map(p => {\n // don't need normPath, because we skip this entirely for windows\n return stripTrailingSlashes(join(normalizeUnicode(p)))\n })\n\n const dirs = new Set<string>(\n paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b)),\n )\n this.#reservations.set(fn, { dirs, paths })\n for (const p of paths) {\n const q = this.#queues.get(p)\n if (!q) {\n this.#queues.set(p, [fn])\n } else {\n q.push(fn)\n }\n }\n for (const dir of dirs) {\n const q = this.#queues.get(dir)\n if (!q) {\n this.#queues.set(dir, [new Set([fn])])\n } else {\n const l = q.at(-1)\n if (l instanceof Set) {\n l.add(fn)\n } else {\n q.push(new Set([fn]))\n }\n }\n }\n return this.#run(fn)\n }\n\n // return the queues for each path the function cares about\n // fn => {paths, dirs}\n #getQueues(fn: Handler): {\n paths: Handler[][]\n dirs: (Handler | Set<Handler>)[][]\n } {\n const res = this.#reservations.get(fn)\n /* c8 ignore start */\n if (!res) {\n throw new Error('function does not have any path reservations')\n }\n /* c8 ignore stop */\n return {\n paths: res.paths.map((path: string) =>\n this.#queues.get(path),\n ) as Handler[][],\n dirs: [...res.dirs].map(path => this.#queues.get(path)) as (\n | Handler\n | Set<Handler>\n )[][],\n }\n }\n\n // check if fn is first in line for all its paths, and is\n // included in the first set for all its dir queues\n check(fn: Handler) {\n const { paths, dirs } = this.#getQueues(fn)\n return (\n paths.every(q => q && q[0] === fn) &&\n dirs.every(q => q && q[0] instanceof Set && q[0].has(fn))\n )\n }\n\n // run the function if it's first in line and not already running\n #run(fn: Handler) {\n if (this.#running.has(fn) || !this.check(fn)) {\n return false\n }\n this.#running.add(fn)\n fn(() => this.#clear(fn))\n return true\n }\n\n #clear(fn: Handler) {\n if (!this.#running.has(fn)) {\n return false\n }\n const res = this.#reservations.get(fn)\n /* c8 ignore start */\n if (!res) {\n throw new Error('invalid reservation')\n }\n /* c8 ignore stop */\n const { paths, dirs } = res\n\n const next = new Set<Handler>()\n for (const path of paths) {\n const q = this.#queues.get(path)\n /* c8 ignore start */\n if (!q || q?.[0] !== fn) {\n continue\n }\n /* c8 ignore stop */\n const q0 = q[1]\n if (!q0) {\n this.#queues.delete(path)\n continue\n }\n q.shift()\n if (typeof q0 === 'function') {\n next.add(q0)\n } else {\n for (const f of q0) {\n next.add(f)\n }\n }\n }\n\n for (const dir of dirs) {\n const q = this.#queues.get(dir)\n const q0 = q?.[0]\n /* c8 ignore next - type safety only */\n if (!q || !(q0 instanceof Set)) continue\n if (q0.size === 1 && q.length === 1) {\n this.#queues.delete(dir)\n continue\n } else if (q0.size === 1) {\n q.shift()\n // next one must be a function,\n // or else the Set would've been reused\n const n = q[0]\n if (typeof n === 'function') {\n next.add(n)\n }\n } else {\n q0.delete(fn)\n }\n }\n\n this.#running.delete(fn)\n next.forEach(fn => this.#run(fn))\n return true\n }\n}\n"]}
@@ -1,26 +0,0 @@
1
- import type { HeaderData } from './header.js';
2
- export declare class Pax implements HeaderData {
3
- atime?: Date;
4
- mtime?: Date;
5
- ctime?: Date;
6
- charset?: string;
7
- comment?: string;
8
- gid?: number;
9
- uid?: number;
10
- gname?: string;
11
- uname?: string;
12
- linkpath?: string;
13
- dev?: number;
14
- ino?: number;
15
- nlink?: number;
16
- path?: string;
17
- size?: number;
18
- mode?: number;
19
- global: boolean;
20
- constructor(obj: HeaderData, global?: boolean);
21
- encode(): Buffer<ArrayBuffer>;
22
- encodeBody(): string;
23
- encodeField(field: keyof Pax): string;
24
- static parse(str: string, ex?: HeaderData, g?: boolean): Pax;
25
- }
26
- //# sourceMappingURL=pax.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pax.d.ts","sourceRoot":"","sources":["../../src/pax.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAG7C,qBAAa,GAAI,YAAW,UAAU;IACpC,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IAEZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,MAAM,EAAE,OAAO,CAAA;gBAEH,GAAG,EAAE,UAAU,EAAE,MAAM,GAAE,OAAe;IAmBpD,MAAM;IAiDN,UAAU;IAoBV,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,MAAM;IA2BrC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,GAAE,OAAe;CAG9D"}
@@ -1,154 +0,0 @@
1
- import { basename } from 'node:path';
2
- import { Header } from './header.js';
3
- export class Pax {
4
- atime;
5
- mtime;
6
- ctime;
7
- charset;
8
- comment;
9
- gid;
10
- uid;
11
- gname;
12
- uname;
13
- linkpath;
14
- dev;
15
- ino;
16
- nlink;
17
- path;
18
- size;
19
- mode;
20
- global;
21
- constructor(obj, global = false) {
22
- this.atime = obj.atime;
23
- this.charset = obj.charset;
24
- this.comment = obj.comment;
25
- this.ctime = obj.ctime;
26
- this.dev = obj.dev;
27
- this.gid = obj.gid;
28
- this.global = global;
29
- this.gname = obj.gname;
30
- this.ino = obj.ino;
31
- this.linkpath = obj.linkpath;
32
- this.mtime = obj.mtime;
33
- this.nlink = obj.nlink;
34
- this.path = obj.path;
35
- this.size = obj.size;
36
- this.uid = obj.uid;
37
- this.uname = obj.uname;
38
- }
39
- encode() {
40
- const body = this.encodeBody();
41
- if (body === '') {
42
- return Buffer.allocUnsafe(0);
43
- }
44
- const bodyLen = Buffer.byteLength(body);
45
- // round up to 512 bytes
46
- // add 512 for header
47
- const bufLen = 512 * Math.ceil(1 + bodyLen / 512);
48
- const buf = Buffer.allocUnsafe(bufLen);
49
- // 0-fill the header section, it might not hit every field
50
- for (let i = 0; i < 512; i++) {
51
- buf[i] = 0;
52
- }
53
- new Header({
54
- // XXX split the path
55
- // then the path should be PaxHeader + basename, but less than 99,
56
- // prepend with the dirname
57
- /* c8 ignore start */
58
- path: ('PaxHeader/' + basename(this.path ?? '')).slice(0, 99),
59
- /* c8 ignore stop */
60
- mode: this.mode || 0o644,
61
- uid: this.uid,
62
- gid: this.gid,
63
- size: bodyLen,
64
- mtime: this.mtime,
65
- type: this.global ? 'GlobalExtendedHeader' : 'ExtendedHeader',
66
- linkpath: '',
67
- uname: this.uname || '',
68
- gname: this.gname || '',
69
- devmaj: 0,
70
- devmin: 0,
71
- atime: this.atime,
72
- ctime: this.ctime,
73
- }).encode(buf);
74
- buf.write(body, 512, bodyLen, 'utf8');
75
- // null pad after the body
76
- for (let i = bodyLen + 512; i < buf.length; i++) {
77
- buf[i] = 0;
78
- }
79
- return buf;
80
- }
81
- encodeBody() {
82
- return (this.encodeField('path') +
83
- this.encodeField('ctime') +
84
- this.encodeField('atime') +
85
- this.encodeField('dev') +
86
- this.encodeField('ino') +
87
- this.encodeField('nlink') +
88
- this.encodeField('charset') +
89
- this.encodeField('comment') +
90
- this.encodeField('gid') +
91
- this.encodeField('gname') +
92
- this.encodeField('linkpath') +
93
- this.encodeField('mtime') +
94
- this.encodeField('size') +
95
- this.encodeField('uid') +
96
- this.encodeField('uname'));
97
- }
98
- encodeField(field) {
99
- if (this[field] === undefined) {
100
- return '';
101
- }
102
- const r = this[field];
103
- const v = r instanceof Date ? r.getTime() / 1000 : r;
104
- const s = ' ' +
105
- (field === 'dev' || field === 'ino' || field === 'nlink' ?
106
- 'SCHILY.'
107
- : '') +
108
- field +
109
- '=' +
110
- v +
111
- '\n';
112
- const byteLen = Buffer.byteLength(s);
113
- // the digits includes the length of the digits in ascii base-10
114
- // so if it's 9 characters, then adding 1 for the 9 makes it 10
115
- // which makes it 11 chars.
116
- let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1;
117
- if (byteLen + digits >= Math.pow(10, digits)) {
118
- digits += 1;
119
- }
120
- const len = digits + byteLen;
121
- return len + s;
122
- }
123
- static parse(str, ex, g = false) {
124
- return new Pax(merge(parseKV(str), ex), g);
125
- }
126
- }
127
- const merge = (a, b) => b ? Object.assign({}, b, a) : a;
128
- const parseKV = (str) => str
129
- .replace(/\n$/, '')
130
- .split('\n')
131
- .reduce(parseKVLine, Object.create(null));
132
- const parseKVLine = (set, line) => {
133
- const n = parseInt(line, 10);
134
- // XXX Values with \n in them will fail this.
135
- // Refactor to not be a naive line-by-line parse.
136
- if (n !== Buffer.byteLength(line) + 1) {
137
- return set;
138
- }
139
- line = line.slice((n + ' ').length);
140
- const kv = line.split('=');
141
- const r = kv.shift();
142
- if (!r) {
143
- return set;
144
- }
145
- const k = r.replace(/^SCHILY\.(dev|ino|nlink)/, '$1');
146
- const v = kv.join('=');
147
- set[k] =
148
- /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k) ?
149
- new Date(Number(v) * 1000)
150
- : /^[0-9]+$/.test(v) ? +v
151
- : v;
152
- return set;
153
- };
154
- //# sourceMappingURL=pax.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pax.js","sourceRoot":"","sources":["../../src/pax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,MAAM,OAAO,GAAG;IACd,KAAK,CAAO;IACZ,KAAK,CAAO;IACZ,KAAK,CAAO;IAEZ,OAAO,CAAS;IAChB,OAAO,CAAS;IAEhB,GAAG,CAAS;IACZ,GAAG,CAAS;IAEZ,KAAK,CAAS;IACd,KAAK,CAAS;IACd,QAAQ,CAAS;IACjB,GAAG,CAAS;IACZ,GAAG,CAAS;IACZ,KAAK,CAAS;IACd,IAAI,CAAS;IACb,IAAI,CAAS;IACb,IAAI,CAAS;IAEb,MAAM,CAAS;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AY,EAAE,EAAE;IACjE,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;IAE5B,6CAA6C;IAC7C,iDAAiD;IACjD,IAAI,CAAC,KAAK,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACtC,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,CAAA;IACnC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC1B,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAA;IAEpB,IAAI,CAAC,CAAC,EAAE,CAAC;QACP,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,0BAA0B,EAAE,IAAI,CAAC,CAAA;IAErD,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACtB,GAAG,CAAC,CAAC,CAAC;QACJ,yCAAyC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YACjD,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;YAC5B,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACzB,CAAC,CAAC,CAAC,CAAA;IACL,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA","sourcesContent":["import { basename } from 'node:path'\nimport type { HeaderData } from './header.js'\nimport { Header } from './header.js'\n\nexport class Pax implements HeaderData {\n atime?: Date\n mtime?: Date\n ctime?: Date\n\n charset?: string\n comment?: string\n\n gid?: number\n uid?: number\n\n gname?: string\n uname?: string\n linkpath?: string\n dev?: number\n ino?: number\n nlink?: number\n path?: string\n size?: number\n mode?: number\n\n global: boolean\n\n constructor(obj: HeaderData, global: boolean = false) {\n this.atime = obj.atime\n this.charset = obj.charset\n this.comment = obj.comment\n this.ctime = obj.ctime\n this.dev = obj.dev\n this.gid = obj.gid\n this.global = global\n this.gname = obj.gname\n this.ino = obj.ino\n this.linkpath = obj.linkpath\n this.mtime = obj.mtime\n this.nlink = obj.nlink\n this.path = obj.path\n this.size = obj.size\n this.uid = obj.uid\n this.uname = obj.uname\n }\n\n encode() {\n const body = this.encodeBody()\n if (body === '') {\n return Buffer.allocUnsafe(0)\n }\n\n const bodyLen = Buffer.byteLength(body)\n // round up to 512 bytes\n // add 512 for header\n const bufLen = 512 * Math.ceil(1 + bodyLen / 512)\n const buf = Buffer.allocUnsafe(bufLen)\n\n // 0-fill the header section, it might not hit every field\n for (let i = 0; i < 512; i++) {\n buf[i] = 0\n }\n\n new Header({\n // XXX split the path\n // then the path should be PaxHeader + basename, but less than 99,\n // prepend with the dirname\n /* c8 ignore start */\n path: ('PaxHeader/' + basename(this.path ?? '')).slice(0, 99),\n /* c8 ignore stop */\n mode: this.mode || 0o644,\n uid: this.uid,\n gid: this.gid,\n size: bodyLen,\n mtime: this.mtime,\n type: this.global ? 'GlobalExtendedHeader' : 'ExtendedHeader',\n linkpath: '',\n uname: this.uname || '',\n gname: this.gname || '',\n devmaj: 0,\n devmin: 0,\n atime: this.atime,\n ctime: this.ctime,\n }).encode(buf)\n\n buf.write(body, 512, bodyLen, 'utf8')\n\n // null pad after the body\n for (let i = bodyLen + 512; i < buf.length; i++) {\n buf[i] = 0\n }\n\n return buf\n }\n\n encodeBody() {\n return (\n this.encodeField('path') +\n this.encodeField('ctime') +\n this.encodeField('atime') +\n this.encodeField('dev') +\n this.encodeField('ino') +\n this.encodeField('nlink') +\n this.encodeField('charset') +\n this.encodeField('comment') +\n this.encodeField('gid') +\n this.encodeField('gname') +\n this.encodeField('linkpath') +\n this.encodeField('mtime') +\n this.encodeField('size') +\n this.encodeField('uid') +\n this.encodeField('uname')\n )\n }\n\n encodeField(field: keyof Pax): string {\n if (this[field] === undefined) {\n return ''\n }\n const r = this[field]\n const v = r instanceof Date ? r.getTime() / 1000 : r\n const s =\n ' ' +\n (field === 'dev' || field === 'ino' || field === 'nlink' ?\n 'SCHILY.'\n : '') +\n field +\n '=' +\n v +\n '\\n'\n const byteLen = Buffer.byteLength(s)\n // the digits includes the length of the digits in ascii base-10\n // so if it's 9 characters, then adding 1 for the 9 makes it 10\n // which makes it 11 chars.\n let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1\n if (byteLen + digits >= Math.pow(10, digits)) {\n digits += 1\n }\n const len = digits + byteLen\n return len + s\n }\n\n static parse(str: string, ex?: HeaderData, g: boolean = false) {\n return new Pax(merge(parseKV(str), ex), g)\n }\n}\n\nconst merge = (a: HeaderData, b?: HeaderData) =>\n b ? Object.assign({}, b, a) : a\n\nconst parseKV = (str: string) =>\n str\n .replace(/\\n$/, '')\n .split('\\n')\n .reduce(parseKVLine, Object.create(null))\n\nconst parseKVLine = (set: Record<string, unknown>, line: string) => {\n const n = parseInt(line, 10)\n\n // XXX Values with \\n in them will fail this.\n // Refactor to not be a naive line-by-line parse.\n if (n !== Buffer.byteLength(line) + 1) {\n return set\n }\n\n line = line.slice((n + ' ').length)\n const kv = line.split('=')\n const r = kv.shift()\n\n if (!r) {\n return set\n }\n\n const k = r.replace(/^SCHILY\\.(dev|ino|nlink)/, '$1')\n\n const v = kv.join('=')\n set[k] =\n /^([A-Z]+\\.)?([mac]|birth|creation)time$/.test(k) ?\n new Date(Number(v) * 1000)\n : /^[0-9]+$/.test(v) ? +v\n : v\n return set\n}\n"]}
@@ -1,2 +0,0 @@
1
- export declare const umask: () => number;
2
- //# sourceMappingURL=process-umask.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"process-umask.d.ts","sourceRoot":"","sources":["../../src/process-umask.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,KAAK,cAAwB,CAAA"}
@@ -1,3 +0,0 @@
1
- // separate file so I stop getting nagged in vim about deprecated API.
2
- export const umask = () => process.umask();
3
- //# sourceMappingURL=process-umask.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"process-umask.js","sourceRoot":"","sources":["../../src/process-umask.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA","sourcesContent":["// separate file so I stop getting nagged in vim about deprecated API.\nexport const umask = () => process.umask()\n"]}
@@ -1,36 +0,0 @@
1
- import { Minipass } from 'minipass';
2
- import type { Header } from './header.js';
3
- import type { Pax } from './pax.js';
4
- import type { EntryTypeName } from './types.js';
5
- export declare class ReadEntry extends Minipass<Buffer, Buffer> {
6
- #private;
7
- extended?: Pax;
8
- globalExtended?: Pax;
9
- header: Header;
10
- startBlockSize: number;
11
- blockRemain: number;
12
- remain: number;
13
- type: EntryTypeName;
14
- meta: boolean;
15
- ignore: boolean;
16
- path: string;
17
- mode?: number;
18
- uid?: number;
19
- gid?: number;
20
- uname?: string;
21
- gname?: string;
22
- size: number;
23
- mtime?: Date;
24
- atime?: Date;
25
- ctime?: Date;
26
- linkpath?: string;
27
- dev?: number;
28
- ino?: number;
29
- nlink?: number;
30
- invalid: boolean;
31
- absolute?: string;
32
- unsupported: boolean;
33
- constructor(header: Header, ex?: Pax, gex?: Pax);
34
- write(data: Buffer): boolean;
35
- }
36
- //# sourceMappingURL=read-entry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"read-entry.d.ts","sourceRoot":"","sources":["../../src/read-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,qBAAa,SAAU,SAAQ,QAAQ,CAA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