packtory 0.0.95 → 0.0.97

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 (673) hide show
  1. package/artifacts/artifacts-builder.d.ts +28 -0
  2. package/artifacts/artifacts-builder.d.ts.map +1 -0
  3. package/artifacts/artifacts-builder.js +37 -4
  4. package/artifacts/artifacts-builder.js.map +1 -1
  5. package/artifacts/content-collection.js +59 -2
  6. package/artifacts/content-collection.js.map +1 -1
  7. package/artifacts/folder-writer.js +25 -2
  8. package/artifacts/folder-writer.js.map +1 -1
  9. package/bundle-emitter/emitter.d.ts +8 -0
  10. package/bundle-emitter/emitter.d.ts.map +1 -1
  11. package/bundle-emitter/emitter.js +137 -6
  12. package/bundle-emitter/emitter.js.map +1 -1
  13. package/bundle-emitter/extract-package-tarball.js +13 -2
  14. package/bundle-emitter/extract-package-tarball.js.map +1 -1
  15. package/bundle-emitter/fetch-published-artifacts.d.ts +2 -0
  16. package/bundle-emitter/fetch-published-artifacts.d.ts.map +1 -1
  17. package/bundle-emitter/fetch-published-artifacts.js +19 -2
  18. package/bundle-emitter/fetch-published-artifacts.js.map +1 -1
  19. package/bundle-emitter/publication-outcome.d.ts +3 -0
  20. package/bundle-emitter/publication-outcome.d.ts.map +1 -1
  21. package/bundle-emitter/publication-outcome.js +5 -0
  22. package/bundle-emitter/publication-outcome.js.map +1 -1
  23. package/bundle-emitter/publish-error/auto-mode-error-matching.js +28 -2
  24. package/bundle-emitter/publish-error/auto-mode-error-matching.js.map +1 -1
  25. package/bundle-emitter/publish-error/error-shape-helpers.js +9 -0
  26. package/bundle-emitter/publish-error/error-shape-helpers.js.map +1 -1
  27. package/bundle-emitter/publish-error/file-mode-error-matching.js +33 -2
  28. package/bundle-emitter/publish-error/file-mode-error-matching.js.map +1 -1
  29. package/bundle-emitter/publish-error/publish-error-messages.js +24 -0
  30. package/bundle-emitter/publish-error/publish-error-messages.js.map +1 -1
  31. package/bundle-emitter/registry/metadata-auth-retry.js +24 -1
  32. package/bundle-emitter/registry/metadata-auth-retry.js.map +1 -1
  33. package/bundle-emitter/registry/oidc-token-exchange.js +68 -3
  34. package/bundle-emitter/registry/oidc-token-exchange.js.map +1 -1
  35. package/bundle-emitter/registry/package-metadata-fetcher.d.ts +14 -0
  36. package/bundle-emitter/registry/package-metadata-fetcher.d.ts.map +1 -1
  37. package/bundle-emitter/registry/package-metadata-fetcher.js +210 -7
  38. package/bundle-emitter/registry/package-metadata-fetcher.js.map +1 -1
  39. package/bundle-emitter/registry/publish-settings-bridge.js +34 -3
  40. package/bundle-emitter/registry/publish-settings-bridge.js.map +1 -1
  41. package/bundle-emitter/registry/registry-auth-config.d.ts +17 -0
  42. package/bundle-emitter/registry/registry-auth-config.d.ts.map +1 -0
  43. package/bundle-emitter/registry/registry-auth-config.js +106 -0
  44. package/bundle-emitter/registry/registry-auth-config.js.map +1 -1
  45. package/bundle-emitter/registry/registry-client.d.ts +13 -1
  46. package/bundle-emitter/registry/registry-client.d.ts.map +1 -1
  47. package/bundle-emitter/registry/registry-client.js +74 -4
  48. package/bundle-emitter/registry/registry-client.js.map +1 -1
  49. package/bundle-emitter/registry/registry-package-path.js +3 -0
  50. package/bundle-emitter/registry/registry-package-path.js.map +1 -1
  51. package/bundle-emitter/registry/registry-response-schemas.js +50 -2
  52. package/bundle-emitter/registry/registry-response-schemas.js.map +1 -1
  53. package/bundle-emitter/registry/tarball-integrity.d.ts +1 -0
  54. package/bundle-emitter/registry/tarball-integrity.d.ts.map +1 -1
  55. package/bundle-emitter/registry/tarball-integrity.js +31 -1
  56. package/bundle-emitter/registry/tarball-integrity.js.map +1 -1
  57. package/bundle-emitter/registry/validate-tarball-host.js +26 -1
  58. package/bundle-emitter/registry/validate-tarball-host.js.map +1 -1
  59. package/bundle-emitter/release-artifact-canonicalizer.js +31 -5
  60. package/bundle-emitter/release-artifact-canonicalizer.js.map +1 -1
  61. package/checks/check-runner.d.ts +18 -0
  62. package/checks/check-runner.d.ts.map +1 -0
  63. package/checks/check-runner.js +8 -0
  64. package/checks/check-runner.js.map +1 -1
  65. package/checks/rule.d.ts +42 -0
  66. package/checks/rule.d.ts.map +1 -0
  67. package/checks/rule.js +12 -2
  68. package/checks/rule.js.map +1 -1
  69. package/checks/rules/duplicate-detection.js +23 -1
  70. package/checks/rules/duplicate-detection.js.map +1 -1
  71. package/checks/rules/duplicate-messages.js +22 -0
  72. package/checks/rules/duplicate-messages.js.map +1 -1
  73. package/checks/rules/file-ownership.js +15 -0
  74. package/checks/rules/file-ownership.js.map +1 -1
  75. package/checks/rules/max-bundle-size.d.ts +13 -0
  76. package/checks/rules/max-bundle-size.d.ts.map +1 -0
  77. package/checks/rules/max-bundle-size.js +55 -1
  78. package/checks/rules/max-bundle-size.js.map +1 -1
  79. package/checks/rules/no-dev-dependency-imports.d.ts +11 -0
  80. package/checks/rules/no-dev-dependency-imports.d.ts.map +1 -0
  81. package/checks/rules/no-dev-dependency-imports.js +51 -1
  82. package/checks/rules/no-dev-dependency-imports.js.map +1 -1
  83. package/checks/rules/no-duplicated-files.d.ts +11 -0
  84. package/checks/rules/no-duplicated-files.d.ts.map +1 -0
  85. package/checks/rules/no-duplicated-files.js +53 -3
  86. package/checks/rules/no-duplicated-files.js.map +1 -1
  87. package/checks/rules/no-side-effects.d.ts +15 -0
  88. package/checks/rules/no-side-effects.d.ts.map +1 -0
  89. package/checks/rules/no-side-effects.js +50 -1
  90. package/checks/rules/no-side-effects.js.map +1 -1
  91. package/checks/rules/no-unexposed-executables.d.ts +8 -0
  92. package/checks/rules/no-unexposed-executables.d.ts.map +1 -0
  93. package/checks/rules/no-unexposed-executables.js +43 -2
  94. package/checks/rules/no-unexposed-executables.js.map +1 -1
  95. package/checks/rules/no-unused-bundle-dependencies.d.ts +8 -0
  96. package/checks/rules/no-unused-bundle-dependencies.d.ts.map +1 -0
  97. package/checks/rules/no-unused-bundle-dependencies.js +30 -2
  98. package/checks/rules/no-unused-bundle-dependencies.js.map +1 -1
  99. package/checks/rules/registry.d.ts +23 -0
  100. package/checks/rules/registry.d.ts.map +1 -0
  101. package/checks/rules/registry.js +22 -9
  102. package/checks/rules/registry.js.map +1 -1
  103. package/checks/rules/required-files.d.ts +15 -0
  104. package/checks/rules/required-files.d.ts.map +1 -0
  105. package/checks/rules/required-files.js +41 -3
  106. package/checks/rules/required-files.js.map +1 -1
  107. package/checks/rules/type-script-declaration-integrity.d.ts +9 -0
  108. package/checks/rules/type-script-declaration-integrity.d.ts.map +1 -0
  109. package/checks/rules/type-script-declaration-integrity.js +81 -3
  110. package/checks/rules/type-script-declaration-integrity.js.map +1 -1
  111. package/checks/rules/type-script-declaration-paths.js +55 -1
  112. package/checks/rules/type-script-declaration-paths.js.map +1 -1
  113. package/checks/rules/type-script-declaration-project.d.ts +29 -0
  114. package/checks/rules/type-script-declaration-project.d.ts.map +1 -0
  115. package/checks/rules/type-script-declaration-project.js +202 -3
  116. package/checks/rules/type-script-declaration-project.js.map +1 -1
  117. package/checks/rules/type-script-declaration-reachability.js +38 -2
  118. package/checks/rules/type-script-declaration-reachability.js.map +1 -1
  119. package/checks/rules/type-script-declaration-roots.js +29 -0
  120. package/checks/rules/type-script-declaration-roots.js.map +1 -1
  121. package/checks/rules/type-script-integrity.d.ts +24 -0
  122. package/checks/rules/type-script-integrity.d.ts.map +1 -0
  123. package/checks/rules/type-script-integrity.js +72 -2
  124. package/checks/rules/type-script-integrity.js.map +1 -1
  125. package/checks/rules/type-script-package-resolution.d.ts +29 -0
  126. package/checks/rules/type-script-package-resolution.d.ts.map +1 -0
  127. package/checks/rules/type-script-package-resolution.js +42 -1
  128. package/checks/rules/type-script-package-resolution.js.map +1 -1
  129. package/checks/rules/type-script-resolution-summary.js +53 -0
  130. package/checks/rules/type-script-resolution-summary.js.map +1 -1
  131. package/checks/rules/unique-target-paths.d.ts +8 -0
  132. package/checks/rules/unique-target-paths.d.ts.map +1 -0
  133. package/checks/rules/unique-target-paths.js +34 -2
  134. package/checks/rules/unique-target-paths.js.map +1 -1
  135. package/common/bundled-dependency-groups.js +27 -0
  136. package/common/bundled-dependency-groups.js.map +1 -1
  137. package/common/code-files.js +28 -0
  138. package/common/code-files.js.map +1 -1
  139. package/common/declaration-companion-paths.js +24 -0
  140. package/common/declaration-companion-paths.js.map +1 -1
  141. package/common/package-name-map.js +7 -0
  142. package/common/package-name-map.js.map +1 -1
  143. package/common/stable-json.js +42 -2
  144. package/common/stable-json.js.map +1 -1
  145. package/common/worklist.js +22 -0
  146. package/common/worklist.js.map +1 -1
  147. package/config/additional-files.d.ts +1 -1
  148. package/config/additional-files.js +6 -2
  149. package/config/additional-files.js.map +1 -1
  150. package/config/additional-package-json-attributes-schema.js +6 -2
  151. package/config/additional-package-json-attributes-schema.js.map +1 -1
  152. package/config/automatic-versioning-settings.js +6 -2
  153. package/config/automatic-versioning-settings.js.map +1 -1
  154. package/config/changelog-settings.d.ts +44 -0
  155. package/config/changelog-settings.d.ts.map +1 -1
  156. package/config/changelog-settings.js +120 -3
  157. package/config/changelog-settings.js.map +1 -1
  158. package/config/common-package-settings-schemas.js +19 -3
  159. package/config/common-package-settings-schemas.js.map +1 -1
  160. package/config/config.d.ts +6 -1
  161. package/config/config.d.ts.map +1 -1
  162. package/config/config.js +3 -1
  163. package/config/config.js.map +1 -1
  164. package/config/cross-package-validation.js +17 -0
  165. package/config/cross-package-validation.js.map +1 -1
  166. package/config/dead-code-elimination-settings.d.ts +1 -0
  167. package/config/dead-code-elimination-settings.d.ts.map +1 -1
  168. package/config/dead-code-elimination-settings.js +36 -2
  169. package/config/dead-code-elimination-settings.js.map +1 -1
  170. package/config/dependency-existence-validation.js +19 -1
  171. package/config/dependency-existence-validation.js.map +1 -1
  172. package/config/dependency-policy.js +5 -2
  173. package/config/dependency-policy.js.map +1 -1
  174. package/config/main-package-json-schema.js +13 -2
  175. package/config/main-package-json-schema.js.map +1 -1
  176. package/config/manual-versioning-settings.d.ts +12 -0
  177. package/config/manual-versioning-settings.d.ts.map +1 -1
  178. package/config/manual-versioning-settings.js +29 -2
  179. package/config/manual-versioning-settings.js.map +1 -1
  180. package/config/optional-package-settings-schema.js +16 -7
  181. package/config/optional-package-settings-schema.js.map +1 -1
  182. package/config/package-config.d.ts +4 -0
  183. package/config/package-config.d.ts.map +1 -1
  184. package/config/package-config.js +2 -1
  185. package/config/package-config.js.map +1 -1
  186. package/config/package-graph-builder.js +14 -2
  187. package/config/package-graph-builder.js.map +1 -1
  188. package/config/package-interface.js +25 -2
  189. package/config/package-interface.js.map +1 -1
  190. package/config/package-json.d.ts +2 -0
  191. package/config/package-json.d.ts.map +1 -1
  192. package/config/package-json.js +16 -0
  193. package/config/package-json.js.map +1 -1
  194. package/config/packtory-config-schema.d.ts +12 -12
  195. package/config/packtory-config-without-registry-schema.js +6 -0
  196. package/config/packtory-config-without-registry-schema.js.map +1 -1
  197. package/config/per-package-settings-schema.js +22 -6
  198. package/config/per-package-settings-schema.js.map +1 -1
  199. package/config/pre-graph-validation.js +20 -5
  200. package/config/pre-graph-validation.js.map +1 -1
  201. package/config/publish-settings.d.ts +3 -0
  202. package/config/publish-settings.d.ts.map +1 -1
  203. package/config/publish-settings.js +25 -3
  204. package/config/publish-settings.js.map +1 -1
  205. package/config/publish-settings.report.js +17 -1
  206. package/config/publish-settings.report.js.map +1 -1
  207. package/config/registry-settings.d.ts +41 -0
  208. package/config/registry-settings.d.ts.map +1 -1
  209. package/config/registry-settings.js +40 -2
  210. package/config/registry-settings.js.map +1 -1
  211. package/config/registry-settings.report.js +46 -0
  212. package/config/registry-settings.report.js.map +1 -1
  213. package/config/root-config-validation.js +141 -0
  214. package/config/root-config-validation.js.map +1 -1
  215. package/config/root.js +6 -2
  216. package/config/root.js.map +1 -1
  217. package/config/sbom-settings.js +4 -1
  218. package/config/sbom-settings.js.map +1 -1
  219. package/config/settings-validation.js +28 -0
  220. package/config/settings-validation.js.map +1 -1
  221. package/config/validation.d.ts.map +1 -1
  222. package/config/validation.js +35 -1
  223. package/config/validation.js.map +1 -1
  224. package/config/versioning-settings.d.ts +18 -1
  225. package/config/versioning-settings.d.ts.map +1 -1
  226. package/config/versioning-settings.js +10 -3
  227. package/config/versioning-settings.js.map +1 -1
  228. package/dead-code-eliminator/analyzed-bundle.d.ts +11 -0
  229. package/dead-code-eliminator/analyzed-bundle.d.ts.map +1 -1
  230. package/dead-code-eliminator/analyzed-bundle.js +7 -0
  231. package/dead-code-eliminator/analyzed-bundle.js.map +1 -1
  232. package/dead-code-eliminator/bundle-analysis.js +38 -5
  233. package/dead-code-eliminator/bundle-analysis.js.map +1 -1
  234. package/dead-code-eliminator/class-purity.js +48 -2
  235. package/dead-code-eliminator/class-purity.js.map +1 -1
  236. package/dead-code-eliminator/code-file-analyzer.js +68 -4
  237. package/dead-code-eliminator/code-file-analyzer.js.map +1 -1
  238. package/dead-code-eliminator/cross-bundle/bundle-index.js +10 -1
  239. package/dead-code-eliminator/cross-bundle/bundle-index.js.map +1 -1
  240. package/dead-code-eliminator/cross-bundle/cross-bundle-seeds.js +22 -3
  241. package/dead-code-eliminator/cross-bundle/cross-bundle-seeds.js.map +1 -1
  242. package/dead-code-eliminator/cross-bundle/import-export-walker.js +164 -4
  243. package/dead-code-eliminator/cross-bundle/import-export-walker.js.map +1 -1
  244. package/dead-code-eliminator/cross-bundle/seed-store.js +10 -0
  245. package/dead-code-eliminator/cross-bundle/seed-store.js.map +1 -1
  246. package/dead-code-eliminator/dependency-metadata.js +172 -3
  247. package/dead-code-eliminator/dependency-metadata.js.map +1 -1
  248. package/dead-code-eliminator/elimination-emitter.js +52 -0
  249. package/dead-code-eliminator/elimination-emitter.js.map +1 -1
  250. package/dead-code-eliminator/eliminator.js +22 -4
  251. package/dead-code-eliminator/eliminator.js.map +1 -1
  252. package/dead-code-eliminator/expression-unwrapping.js +16 -1
  253. package/dead-code-eliminator/expression-unwrapping.js.map +1 -1
  254. package/dead-code-eliminator/imported-expression-origin.js +101 -2
  255. package/dead-code-eliminator/imported-expression-origin.js.map +1 -1
  256. package/dead-code-eliminator/liveness/asset-side-effects.js +9 -1
  257. package/dead-code-eliminator/liveness/asset-side-effects.js.map +1 -1
  258. package/dead-code-eliminator/liveness/boolean-facts.js +98 -2
  259. package/dead-code-eliminator/liveness/boolean-facts.js.map +1 -1
  260. package/dead-code-eliminator/liveness/external-module-resolution.js +172 -2
  261. package/dead-code-eliminator/liveness/external-module-resolution.js.map +1 -1
  262. package/dead-code-eliminator/liveness/external-purity-summary.js +294 -3
  263. package/dead-code-eliminator/liveness/external-purity-summary.js.map +1 -1
  264. package/dead-code-eliminator/liveness/external-purity.js +39 -3
  265. package/dead-code-eliminator/liveness/external-purity.js.map +1 -1
  266. package/dead-code-eliminator/liveness/module-analysis.js +27 -2
  267. package/dead-code-eliminator/liveness/module-analysis.js.map +1 -1
  268. package/dead-code-eliminator/liveness/resource-retention.js +91 -1
  269. package/dead-code-eliminator/liveness/resource-retention.js.map +1 -1
  270. package/dead-code-eliminator/liveness/runtime-code.js +15 -1
  271. package/dead-code-eliminator/liveness/runtime-code.js.map +1 -1
  272. package/dead-code-eliminator/load-bundle.js +86 -5
  273. package/dead-code-eliminator/load-bundle.js.map +1 -1
  274. package/dead-code-eliminator/pure-expression.js +178 -5
  275. package/dead-code-eliminator/pure-expression.js.map +1 -1
  276. package/dead-code-eliminator/reachability/bfs-closure.js +53 -0
  277. package/dead-code-eliminator/reachability/bfs-closure.js.map +1 -1
  278. package/dead-code-eliminator/reachability/binding-extractor.js +100 -2
  279. package/dead-code-eliminator/reachability/binding-extractor.js.map +1 -1
  280. package/dead-code-eliminator/reachability/binding-id.js +106 -1
  281. package/dead-code-eliminator/reachability/binding-id.js.map +1 -1
  282. package/dead-code-eliminator/reachability/identifier-target-collector.js +96 -2
  283. package/dead-code-eliminator/reachability/identifier-target-collector.js.map +1 -1
  284. package/dead-code-eliminator/reachability/impure-statements.js +11 -2
  285. package/dead-code-eliminator/reachability/impure-statements.js.map +1 -1
  286. package/dead-code-eliminator/reachability/local-seed-gathering.js +91 -4
  287. package/dead-code-eliminator/reachability/local-seed-gathering.js.map +1 -1
  288. package/dead-code-eliminator/reachability/reachability.js +65 -4
  289. package/dead-code-eliminator/reachability/reachability.js.map +1 -1
  290. package/dead-code-eliminator/side-effect-classifier.js +39 -4
  291. package/dead-code-eliminator/side-effect-classifier.js.map +1 -1
  292. package/dead-code-eliminator/side-effects-field.js +23 -1
  293. package/dead-code-eliminator/side-effects-field.js.map +1 -1
  294. package/dead-code-eliminator/source-map-recomposition.js +29 -2
  295. package/dead-code-eliminator/source-map-recomposition.js.map +1 -1
  296. package/dead-code-eliminator/statement-classifiers.js +94 -4
  297. package/dead-code-eliminator/statement-classifiers.js.map +1 -1
  298. package/dead-code-eliminator/syntax-kind-sets.js +16 -0
  299. package/dead-code-eliminator/syntax-kind-sets.js.map +1 -1
  300. package/dead-code-eliminator/transform/atom-translator.d.ts +8 -0
  301. package/dead-code-eliminator/transform/atom-translator.d.ts.map +1 -1
  302. package/dead-code-eliminator/transform/atom-translator.js +57 -2
  303. package/dead-code-eliminator/transform/atom-translator.js.map +1 -1
  304. package/dead-code-eliminator/transform/declaration-removal.js +183 -5
  305. package/dead-code-eliminator/transform/declaration-removal.js.map +1 -1
  306. package/dead-code-eliminator/transform/declaration-remover.js +17 -2
  307. package/dead-code-eliminator/transform/declaration-remover.js.map +1 -1
  308. package/dead-code-eliminator/transform/line-index.d.ts +7 -0
  309. package/dead-code-eliminator/transform/line-index.d.ts.map +1 -1
  310. package/dead-code-eliminator/transform/line-index.js +20 -0
  311. package/dead-code-eliminator/transform/line-index.js.map +1 -1
  312. package/dead-code-eliminator/transform/named-declaration-kinds.js +3 -0
  313. package/dead-code-eliminator/transform/named-declaration-kinds.js.map +1 -1
  314. package/dead-code-eliminator/transform/source-map-composer.js +84 -3
  315. package/dead-code-eliminator/transform/source-map-composer.js.map +1 -1
  316. package/dead-code-eliminator/variable-declaration-bindings.js +25 -1
  317. package/dead-code-eliminator/variable-declaration-bindings.js.map +1 -1
  318. package/dependency-scanner/dependency-graph.d.ts +41 -0
  319. package/dependency-scanner/dependency-graph.d.ts.map +1 -0
  320. package/dependency-scanner/dependency-graph.js +77 -3
  321. package/dependency-scanner/dependency-graph.js.map +1 -1
  322. package/dependency-scanner/external-dependencies.d.ts +10 -1
  323. package/dependency-scanner/external-dependencies.d.ts.map +1 -1
  324. package/dependency-scanner/external-dependencies.js +55 -1
  325. package/dependency-scanner/external-dependencies.js.map +1 -1
  326. package/dependency-scanner/file-host-predicates.js +9 -0
  327. package/dependency-scanner/file-host-predicates.js.map +1 -1
  328. package/dependency-scanner/host-method-binding.js +18 -0
  329. package/dependency-scanner/host-method-binding.js.map +1 -1
  330. package/dependency-scanner/injected-dynamic-imports.js +232 -1
  331. package/dependency-scanner/injected-dynamic-imports.js.map +1 -1
  332. package/dependency-scanner/node-modules-manifest-synthesizer.js +52 -4
  333. package/dependency-scanner/node-modules-manifest-synthesizer.js.map +1 -1
  334. package/dependency-scanner/package-owned-asset-file-path.js +9 -1
  335. package/dependency-scanner/package-owned-asset-file-path.js.map +1 -1
  336. package/dependency-scanner/scanner.d.ts +20 -0
  337. package/dependency-scanner/scanner.d.ts.map +1 -0
  338. package/dependency-scanner/scanner.js +109 -4
  339. package/dependency-scanner/scanner.js.map +1 -1
  340. package/dependency-scanner/source-file-references.d.ts +37 -0
  341. package/dependency-scanner/source-file-references.d.ts.map +1 -0
  342. package/dependency-scanner/source-file-references.js +181 -6
  343. package/dependency-scanner/source-file-references.js.map +1 -1
  344. package/dependency-scanner/source-map-file-locator.d.ts +10 -0
  345. package/dependency-scanner/source-map-file-locator.d.ts.map +1 -0
  346. package/dependency-scanner/source-map-file-locator.js +66 -2
  347. package/dependency-scanner/source-map-file-locator.js.map +1 -1
  348. package/dependency-scanner/typescript-compiler-options.d.ts +8 -0
  349. package/dependency-scanner/typescript-compiler-options.d.ts.map +1 -0
  350. package/dependency-scanner/typescript-compiler-options.js +21 -1
  351. package/dependency-scanner/typescript-compiler-options.js.map +1 -1
  352. package/dependency-scanner/typescript-file-host.d.ts +12 -0
  353. package/dependency-scanner/typescript-file-host.d.ts.map +1 -0
  354. package/dependency-scanner/typescript-file-host.js +49 -5
  355. package/dependency-scanner/typescript-file-host.js.map +1 -1
  356. package/dependency-scanner/typescript-project-analyzer.d.ts +19 -0
  357. package/dependency-scanner/typescript-project-analyzer.d.ts.map +1 -0
  358. package/dependency-scanner/typescript-project-analyzer.js +35 -3
  359. package/dependency-scanner/typescript-project-analyzer.js.map +1 -1
  360. package/dependency-scanner/virtual-package-json-host.js +45 -4
  361. package/dependency-scanner/virtual-package-json-host.js.map +1 -1
  362. package/directed-graph/graph.d.ts +1 -0
  363. package/directed-graph/graph.d.ts.map +1 -1
  364. package/directed-graph/graph.js +240 -1
  365. package/directed-graph/graph.js.map +1 -1
  366. package/file-manager/compare.js +23 -2
  367. package/file-manager/compare.js.map +1 -1
  368. package/file-manager/equal.js +5 -0
  369. package/file-manager/equal.js.map +1 -1
  370. package/file-manager/file-description.d.ts +2 -1
  371. package/file-manager/file-description.d.ts.map +1 -1
  372. package/file-manager/file-description.js +3 -0
  373. package/file-manager/file-description.js.map +1 -1
  374. package/file-manager/file-manager.d.ts +1 -1
  375. package/file-manager/file-manager.d.ts.map +1 -1
  376. package/file-manager/file-manager.js +4 -4
  377. package/file-manager/file-manager.js.map +1 -1
  378. package/file-manager/permissions.js +28 -1
  379. package/file-manager/permissions.js.map +1 -1
  380. package/git/current-git-head.d.ts +12 -0
  381. package/git/current-git-head.d.ts.map +1 -0
  382. package/git/current-git-head.js +24 -0
  383. package/git/current-git-head.js.map +1 -1
  384. package/git/git-command.js +49 -1
  385. package/git/git-command.js.map +1 -1
  386. package/linker/linked-bundle.d.ts +19 -2
  387. package/linker/linked-bundle.d.ts.map +1 -1
  388. package/linker/linked-bundle.js +5 -0
  389. package/linker/linked-bundle.js.map +1 -1
  390. package/linker/linker.d.ts +13 -0
  391. package/linker/linker.d.ts.map +1 -0
  392. package/linker/linker.js +51 -5
  393. package/linker/linker.js.map +1 -1
  394. package/linker/replacement-lookup.js +297 -8
  395. package/linker/replacement-lookup.js.map +1 -1
  396. package/linker/resource-graph.js +65 -2
  397. package/linker/resource-graph.js.map +1 -1
  398. package/linker/source-modifier/import-paths.js +76 -3
  399. package/linker/source-modifier/import-paths.js.map +1 -1
  400. package/linker/substitute-bundles.js +166 -3
  401. package/linker/substitute-bundles.js.map +1 -1
  402. package/linker/substituted-resource-graph.js +111 -2
  403. package/linker/substituted-resource-graph.js.map +1 -1
  404. package/npm-oidc-id-token-resolver.js +82 -0
  405. package/npm-oidc-id-token-resolver.js.map +1 -1
  406. package/pack-emitter/pack-emitter.d.ts +20 -0
  407. package/pack-emitter/pack-emitter.d.ts.map +1 -1
  408. package/pack-emitter/pack-emitter.js +27 -0
  409. package/pack-emitter/pack-emitter.js.map +1 -1
  410. package/package-surface/bin-field.js +8 -2
  411. package/package-surface/bin-field.js.map +1 -1
  412. package/package-surface/explicit-bin.js +24 -2
  413. package/package-surface/explicit-bin.js.map +1 -1
  414. package/package-surface/explicit-exports.js +26 -3
  415. package/package-surface/explicit-exports.js.map +1 -1
  416. package/package-surface/export-map.js +9 -2
  417. package/package-surface/export-map.js.map +1 -1
  418. package/package-surface/implicit-bin.js +25 -1
  419. package/package-surface/implicit-bin.js.map +1 -1
  420. package/package-surface/implicit-exports.js +10 -3
  421. package/package-surface/implicit-exports.js.map +1 -1
  422. package/package-surface/implicit-root-exports.js +13 -2
  423. package/package-surface/implicit-root-exports.js.map +1 -1
  424. package/package-surface/package-json-export.js +9 -0
  425. package/package-surface/package-json-export.js.map +1 -1
  426. package/package-surface/package-shape.js +10 -1
  427. package/package-surface/package-shape.js.map +1 -1
  428. package/package-surface/package-surface-index.js +165 -3
  429. package/package-surface/package-surface-index.js.map +1 -1
  430. package/package-surface/public-module-usage.js +46 -3
  431. package/package-surface/public-module-usage.js.map +1 -1
  432. package/package-surface/public-specifiers.js +7 -1
  433. package/package-surface/public-specifiers.js.map +1 -1
  434. package/package-surface/root-registry.js +26 -0
  435. package/package-surface/root-registry.js.map +1 -1
  436. package/package-surface/specifier-syntax.js +4 -0
  437. package/package-surface/specifier-syntax.js.map +1 -1
  438. package/package-surface/substitution-exports.js +101 -3
  439. package/package-surface/substitution-exports.js.map +1 -1
  440. package/package-surface/surface.d.ts +2 -0
  441. package/package-surface/surface.d.ts.map +1 -1
  442. package/package-surface/surface.js +12 -0
  443. package/package-surface/surface.js.map +1 -1
  444. package/package.json +1 -1
  445. package/packages/package-processor.composition.d.ts +22 -0
  446. package/packages/package-processor.composition.d.ts.map +1 -1
  447. package/packages/package-processor.composition.js +161 -34
  448. package/packages/package-processor.composition.js.map +1 -1
  449. package/packtory/changelog-source-attribution.js +16 -16
  450. package/packtory/changelog-source-attribution.js.map +1 -1
  451. package/packtory/map-config.d.ts +11 -1
  452. package/packtory/map-config.d.ts.map +1 -1
  453. package/packtory/map-config.js +35 -4
  454. package/packtory/map-config.js.map +1 -1
  455. package/packtory/normalize-paths.js +25 -1
  456. package/packtory/normalize-paths.js.map +1 -1
  457. package/packtory/options/bundle-dependency-resolution.js +17 -1
  458. package/packtory/options/bundle-dependency-resolution.js.map +1 -1
  459. package/packtory/options/dead-code-elimination-resolution.js +10 -1
  460. package/packtory/options/dead-code-elimination-resolution.js.map +1 -1
  461. package/packtory/options/prepare-package-options.d.ts +13 -1
  462. package/packtory/options/prepare-package-options.d.ts.map +1 -1
  463. package/packtory/options/prepare-package-options.js +46 -5
  464. package/packtory/options/prepare-package-options.js.map +1 -1
  465. package/packtory/options/required-value-helpers.js +17 -0
  466. package/packtory/options/required-value-helpers.js.map +1 -1
  467. package/packtory/options/setting-resolvers.d.ts +17 -1
  468. package/packtory/options/setting-resolvers.d.ts.map +1 -1
  469. package/packtory/options/setting-resolvers.js +47 -3
  470. package/packtory/options/setting-resolvers.js.map +1 -1
  471. package/packtory/options/surface-resolution.js +15 -2
  472. package/packtory/options/surface-resolution.js.map +1 -1
  473. package/packtory/options/version-provider-context.js +24 -2
  474. package/packtory/options/version-provider-context.js.map +1 -1
  475. package/packtory/options/version-trigger.js +39 -2
  476. package/packtory/options/version-trigger.js.map +1 -1
  477. package/packtory/pack-output-preflight.js +60 -3
  478. package/packtory/pack-output-preflight.js.map +1 -1
  479. package/packtory/package-processor-build.js +97 -3
  480. package/packtory/package-processor-build.js.map +1 -1
  481. package/packtory/package-processor-publish-result.d.ts +3 -0
  482. package/packtory/package-processor-publish-result.d.ts.map +1 -1
  483. package/packtory/package-processor-publish.d.ts +2 -0
  484. package/packtory/package-processor-publish.d.ts.map +1 -1
  485. package/packtory/package-processor-publish.js +297 -6
  486. package/packtory/package-processor-publish.js.map +1 -1
  487. package/packtory/package-processor.d.ts +34 -0
  488. package/packtory/package-processor.d.ts.map +1 -1
  489. package/packtory/package-processor.js +10 -2
  490. package/packtory/package-processor.js.map +1 -1
  491. package/packtory/packtory-pack.js +298 -10
  492. package/packtory/packtory-pack.js.map +1 -1
  493. package/packtory/packtory-package-dependencies.js +116 -3
  494. package/packtory/packtory-package-dependencies.js.map +1 -1
  495. package/packtory/packtory-package-inspection.js +26 -5
  496. package/packtory/packtory-package-inspection.js.map +1 -1
  497. package/packtory/packtory-package-side-effects.js +64 -3
  498. package/packtory/packtory-package-side-effects.js.map +1 -1
  499. package/packtory/packtory-package-tree.js +43 -4
  500. package/packtory/packtory-package-tree.js.map +1 -1
  501. package/packtory/packtory-publish.js +17 -4
  502. package/packtory/packtory-publish.js.map +1 -1
  503. package/packtory/packtory-release-analysis.js +64 -6
  504. package/packtory/packtory-release-analysis.js.map +1 -1
  505. package/packtory/packtory-release-diff.js +48 -5
  506. package/packtory/packtory-release-diff.js.map +1 -1
  507. package/packtory/packtory-release-plan.js +87 -6
  508. package/packtory/packtory-release-plan.js.map +1 -1
  509. package/packtory/packtory-resolve.js +16 -5
  510. package/packtory/packtory-resolve.js.map +1 -1
  511. package/packtory/packtory.d.ts +28 -1
  512. package/packtory/packtory.d.ts.map +1 -1
  513. package/packtory/packtory.js +242 -13
  514. package/packtory/packtory.js.map +1 -1
  515. package/packtory/publish-failure-mapping.js +6 -0
  516. package/packtory/publish-failure-mapping.js.map +1 -1
  517. package/packtory/publish-target-preflight.js +25 -3
  518. package/packtory/publish-target-preflight.js.map +1 -1
  519. package/packtory/published-release-state.d.ts +19 -0
  520. package/packtory/published-release-state.d.ts.map +1 -1
  521. package/packtory/published-release-state.js +11 -0
  522. package/packtory/published-release-state.js.map +1 -1
  523. package/packtory/release-analysis.js +153 -5
  524. package/packtory/release-analysis.js.map +1 -1
  525. package/packtory/release-diff-failure-mapping.js +6 -0
  526. package/packtory/release-diff-failure-mapping.js.map +1 -1
  527. package/packtory/release-plan.js +135 -7
  528. package/packtory/release-plan.js.map +1 -1
  529. package/packtory/report-attachment.js +35 -2
  530. package/packtory/report-attachment.js.map +1 -1
  531. package/packtory/resolved-package.d.ts +11 -0
  532. package/packtory/resolved-package.d.ts.map +1 -1
  533. package/packtory/resolved-package.js +97 -3
  534. package/packtory/resolved-package.js.map +1 -1
  535. package/packtory/scheduler.d.ts +47 -0
  536. package/packtory/scheduler.d.ts.map +1 -1
  537. package/packtory/scheduler.js +99 -1
  538. package/packtory/scheduler.js.map +1 -1
  539. package/packtory/stages/package-analysis-stage.js +50 -2
  540. package/packtory/stages/package-analysis-stage.js.map +1 -1
  541. package/packtory/stages/package-resolution-stage.js +80 -5
  542. package/packtory/stages/package-resolution-stage.js.map +1 -1
  543. package/packtory/stages/publish-stage.js +125 -4
  544. package/packtory/stages/publish-stage.js.map +1 -1
  545. package/packtory/stages/release-diff-stage.js +84 -5
  546. package/packtory/stages/release-diff-stage.js.map +1 -1
  547. package/progress/progress-broadcaster.d.ts +1 -0
  548. package/progress/progress-broadcaster.d.ts.map +1 -1
  549. package/progress/progress-broadcaster.js +45 -0
  550. package/progress/progress-broadcaster.js.map +1 -1
  551. package/published-package/published-package.d.ts +2 -0
  552. package/published-package/published-package.d.ts.map +1 -1
  553. package/published-package/published-package.js +12 -1
  554. package/published-package/published-package.js.map +1 -1
  555. package/report/aggregator/artifact-entry-merger.js +20 -0
  556. package/report/aggregator/artifact-entry-merger.js.map +1 -1
  557. package/report/aggregator/package-report-materialization.js +75 -2
  558. package/report/aggregator/package-report-materialization.js.map +1 -1
  559. package/report/aggregator/report-aggregator.js +37 -2
  560. package/report/aggregator/report-aggregator.js.map +1 -1
  561. package/report/aggregator/report-event-handlers.js +141 -2
  562. package/report/aggregator/report-event-handlers.js.map +1 -1
  563. package/report/aggregator/report-types.d.ts +21 -0
  564. package/report/aggregator/report-types.d.ts.map +1 -1
  565. package/report/aggregator/report-types.js +3 -0
  566. package/report/aggregator/report-types.js.map +1 -1
  567. package/report/config-redactor.js +29 -3
  568. package/report/config-redactor.js.map +1 -1
  569. package/report/decorators.js +85 -0
  570. package/report/decorators.js.map +1 -1
  571. package/report/inspectors/inspect-artifact-sizes.js +34 -1
  572. package/report/inspectors/inspect-artifact-sizes.js.map +1 -1
  573. package/report/inspectors/inspect-linker-rewrites.js +14 -1
  574. package/report/inspectors/inspect-linker-rewrites.js.map +1 -1
  575. package/report/inspectors/inspect-package-json-provenance.js +15 -0
  576. package/report/inspectors/inspect-package-json-provenance.js.map +1 -1
  577. package/report/inspectors/inspect-scan-results.js +15 -0
  578. package/report/inspectors/inspect-scan-results.js.map +1 -1
  579. package/report/release-diff/release-version-transition.js +18 -0
  580. package/report/release-diff/release-version-transition.js.map +1 -1
  581. package/resource-resolver/bundle-resource-lookup.js +25 -0
  582. package/resource-resolver/bundle-resource-lookup.js.map +1 -1
  583. package/resource-resolver/content.js +136 -3
  584. package/resource-resolver/content.js.map +1 -1
  585. package/resource-resolver/dependency-resolution-walker.js +73 -2
  586. package/resource-resolver/dependency-resolution-walker.js.map +1 -1
  587. package/resource-resolver/resolved-bundle.d.ts +54 -0
  588. package/resource-resolver/resolved-bundle.d.ts.map +1 -1
  589. package/resource-resolver/resolved-bundle.js +3 -0
  590. package/resource-resolver/resolved-bundle.js.map +1 -1
  591. package/resource-resolver/resource-resolve-options.d.ts +5 -0
  592. package/resource-resolver/resource-resolve-options.d.ts.map +1 -1
  593. package/resource-resolver/resource-resolve-options.js +13 -1
  594. package/resource-resolver/resource-resolve-options.js.map +1 -1
  595. package/resource-resolver/resource-resolver.d.ts +15 -0
  596. package/resource-resolver/resource-resolver.d.ts.map +1 -0
  597. package/resource-resolver/resource-resolver.js +128 -5
  598. package/resource-resolver/resource-resolver.js.map +1 -1
  599. package/sbom/extract-license.js +11 -1
  600. package/sbom/extract-license.js.map +1 -1
  601. package/sbom/license-resolver.d.ts +14 -0
  602. package/sbom/license-resolver.d.ts.map +1 -0
  603. package/sbom/license-resolver.js +23 -2
  604. package/sbom/license-resolver.js.map +1 -1
  605. package/sbom/sbom-builder.js +57 -2
  606. package/sbom/sbom-builder.js.map +1 -1
  607. package/sbom/sbom-canonicalizer.js +45 -3
  608. package/sbom/sbom-canonicalizer.js.map +1 -1
  609. package/sbom/sbom-file.d.ts +10 -0
  610. package/sbom/sbom-file.d.ts.map +1 -1
  611. package/sbom/sbom-file.js +54 -5
  612. package/sbom/sbom-file.js.map +1 -1
  613. package/sbom/sbom-serializer.d.ts +8 -0
  614. package/sbom/sbom-serializer.d.ts.map +1 -0
  615. package/sbom/sbom-serializer.js +14 -1
  616. package/sbom/sbom-serializer.js.map +1 -1
  617. package/sbom/tool-version.js +49 -1
  618. package/sbom/tool-version.js.map +1 -1
  619. package/sbom.cdx.json +5 -5
  620. package/tar/extract-tar.js +83 -3
  621. package/tar/extract-tar.js.map +1 -1
  622. package/tar/gzipped-pack.js +20 -0
  623. package/tar/gzipped-pack.js.map +1 -1
  624. package/tar/tarball-builder.d.ts +14 -0
  625. package/tar/tarball-builder.d.ts.map +1 -0
  626. package/tar/tarball-builder.js +44 -4
  627. package/tar/tarball-builder.js.map +1 -1
  628. package/vendor-materializer/vendor-entry.d.ts +12 -0
  629. package/vendor-materializer/vendor-entry.d.ts.map +1 -0
  630. package/vendor-materializer/vendor-entry.js +20 -1
  631. package/vendor-materializer/vendor-entry.js.map +1 -1
  632. package/vendor-materializer/vendor-materializer.d.ts +55 -0
  633. package/vendor-materializer/vendor-materializer.d.ts.map +1 -0
  634. package/vendor-materializer/vendor-materializer.js +240 -8
  635. package/vendor-materializer/vendor-materializer.js.map +1 -1
  636. package/version-manager/dependencies/bundle-dependency-grouping.js +32 -2
  637. package/version-manager/dependencies/bundle-dependency-grouping.js.map +1 -1
  638. package/version-manager/dependencies/dependency-groups.js +11 -1
  639. package/version-manager/dependencies/dependency-groups.js.map +1 -1
  640. package/version-manager/dependencies/external-dependency-classification.js +82 -3
  641. package/version-manager/dependencies/external-dependency-classification.js.map +1 -1
  642. package/version-manager/dependencies/versioned-bundle-dependencies.js +8 -3
  643. package/version-manager/dependencies/versioned-bundle-dependencies.js.map +1 -1
  644. package/version-manager/imports/hash-import-scanner.js +20 -2
  645. package/version-manager/imports/hash-import-scanner.js.map +1 -1
  646. package/version-manager/imports/imports-key-matcher.js +22 -0
  647. package/version-manager/imports/imports-key-matcher.js.map +1 -1
  648. package/version-manager/imports/versioned-bundle-imports.js +44 -2
  649. package/version-manager/imports/versioned-bundle-imports.js.map +1 -1
  650. package/version-manager/manager.d.ts +5 -0
  651. package/version-manager/manager.d.ts.map +1 -1
  652. package/version-manager/manager.js +46 -6
  653. package/version-manager/manager.js.map +1 -1
  654. package/version-manager/manifest/builder.js +51 -1
  655. package/version-manager/manifest/builder.js.map +1 -1
  656. package/version-manager/manifest/serialize.js +8 -1
  657. package/version-manager/manifest/serialize.js.map +1 -1
  658. package/version-manager/optional-bundle-fields.js +5 -1
  659. package/version-manager/optional-bundle-fields.js.map +1 -1
  660. package/version-manager/representative-root.js +9 -1
  661. package/version-manager/representative-root.js.map +1 -1
  662. package/version-manager/specifier-classifier.js +42 -2
  663. package/version-manager/specifier-classifier.js.map +1 -1
  664. package/version-manager/specifier-errors.js +58 -0
  665. package/version-manager/specifier-errors.js.map +1 -1
  666. package/version-manager/versioned-bundle.d.ts +3 -1
  667. package/version-manager/versioned-bundle.d.ts.map +1 -1
  668. package/version-manager/versioned-bundle.js +31 -6
  669. package/version-manager/versioned-bundle.js.map +1 -1
  670. package/zip/zip-builder.d.ts +22 -0
  671. package/zip/zip-builder.d.ts.map +1 -0
  672. package/zip/zip-builder.js +81 -2
  673. package/zip/zip-builder.js.map +1 -1
@@ -1,4 +1,30 @@
1
- import 'remeda';
2
- import "../config/publish-settings.report.js";
3
- import "../config/registry-settings.report.js";
1
+ import { isDefined, pickBy } from 'remeda';
2
+ import { redactPublishSettings } from "../config/publish-settings.report.js";
3
+ import { redactRegistrySettings } from "../config/registry-settings.report.js";
4
+ function findPackageConfig(config, packageName) {
5
+ return config.packages.find(function (entry) {
6
+ return entry.name === packageName;
7
+ });
8
+ }
9
+ function resolvePublishSettings(config, packageName) {
10
+ const packageConfig = findPackageConfig(config, packageName);
11
+ const resolved = packageConfig?.publishSettings ?? config.commonPackageSettings?.publishSettings;
12
+ return resolved === undefined ? undefined : redactPublishSettings(resolved);
13
+ }
14
+ function resolveSourcesFolder(config, packageName) {
15
+ const packageConfig = findPackageConfig(config, packageName);
16
+ return packageConfig?.sourcesFolder ?? config.commonPackageSettings?.sourcesFolder;
17
+ }
18
+ export function redactConfigForPackage(config, packageName) {
19
+ const publishSettings = resolvePublishSettings(config, packageName);
20
+ const sourcesFolder = resolveSourcesFolder(config, packageName);
21
+ return pickBy({
22
+ name: packageName,
23
+ registrySettings: config.registrySettings === undefined
24
+ ? undefined
25
+ : redactRegistrySettings(config.registrySettings),
26
+ publishSettings,
27
+ sourcesFolder
28
+ }, isDefined);
29
+ }
4
30
  //# sourceMappingURL=config-redactor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-redactor.js","sourceRoot":"","sources":["../../../../source/report/config-redactor.ts"],"names":[],"mappings":"AAAA,OAAkC,QAAQ,CAAC;AAE3C,OAAoE,sCAAsC,CAAC;AAC3G,OAAsE,uCAAuC,CAAC"}
1
+ {"version":3,"file":"config-redactor.js","sourceRoot":"","sources":["../../../../source/report/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CAAC,CAAC,sBAAsB,CAAC,MAAM,CAAC,gBAAgB,CAAC;QACrD,eAAe;QACf,aAAa;KAChB,EACD,SAAS,CACZ,CAAC;AACN,CAAC"}
@@ -1 +1,86 @@
1
+ function emitTiming(progressBroadcaster, packageName, stage, start) {
2
+ if (!progressBroadcaster.hasSubscribers('stageTimed')) {
3
+ return;
4
+ }
5
+ progressBroadcaster.emit('stageTimed', {
6
+ packageName,
7
+ stage,
8
+ durationMs: performance.now() - start
9
+ });
10
+ }
11
+ export function withFailureCapture(progressBroadcaster, stage, execute) {
12
+ return async function (options) {
13
+ try {
14
+ return await execute(options);
15
+ }
16
+ catch (error) {
17
+ if (progressBroadcaster.hasSubscribers('packageFailed')) {
18
+ progressBroadcaster.emit('packageFailed', {
19
+ packageName: options.name,
20
+ stage,
21
+ message: error instanceof Error ? error.message : String(error)
22
+ });
23
+ }
24
+ throw error;
25
+ }
26
+ };
27
+ }
28
+ export function withStageTimings(processor, progressBroadcaster) {
29
+ return {
30
+ async resolveAndLink(options) {
31
+ const start = performance.now();
32
+ try {
33
+ return await processor.resolveAndLink(options);
34
+ }
35
+ finally {
36
+ emitTiming(progressBroadcaster, options.name, 'resolveAndLink', start);
37
+ }
38
+ },
39
+ async resolveAndLinkWithPromotedDeclarationCompanions(options, substitutedInputFilePaths) {
40
+ const start = performance.now();
41
+ try {
42
+ return await processor.resolveAndLinkWithPromotedDeclarationCompanions(options, substitutedInputFilePaths);
43
+ }
44
+ finally {
45
+ emitTiming(progressBroadcaster, options.name, 'resolveAndLink', start);
46
+ }
47
+ },
48
+ async build(options) {
49
+ const start = performance.now();
50
+ try {
51
+ return await processor.build(options);
52
+ }
53
+ finally {
54
+ emitTiming(progressBroadcaster, options.name, 'build', start);
55
+ }
56
+ },
57
+ async buildAndPublish(options) {
58
+ const start = performance.now();
59
+ try {
60
+ return await processor.buildAndPublish(options);
61
+ }
62
+ finally {
63
+ emitTiming(progressBroadcaster, options.buildOptions.name, 'publish', start);
64
+ }
65
+ },
66
+ async publishPreparedPackage(options, result) {
67
+ const start = performance.now();
68
+ try {
69
+ return await processor.publishPreparedPackage(options, result);
70
+ }
71
+ finally {
72
+ emitTiming(progressBroadcaster, options.buildOptions.name, 'publish', start);
73
+ }
74
+ },
75
+ async tryBuildAndPublish(options) {
76
+ const start = performance.now();
77
+ try {
78
+ return await processor.tryBuildAndPublish(options);
79
+ }
80
+ finally {
81
+ emitTiming(progressBroadcaster, options.buildOptions.name, 'tryPublish', start);
82
+ }
83
+ }
84
+ };
85
+ }
1
86
  //# sourceMappingURL=decorators.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../../source/report/decorators.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../../source/report/decorators.ts"],"names":[],"mappings":"AAKA,SAAS,UAAU,CACf,mBAA8C,EAC9C,WAAmB,EACnB,KAAgB,EAChB,KAAa;IAEb,IAAI,CAAC,mBAAmB,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,CAAC;QACpD,OAAO;IACX,CAAC;IACD,mBAAmB,CAAC,IAAI,CAAC,YAAY,EAAE;QACnC,WAAW;QACX,KAAK;QACL,UAAU,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK;KACxC,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,kBAAkB,CAC9B,mBAA8C,EAC9C,KAAgB,EAChB,OAAgD;IAEhD,OAAO,KAAK,WAAW,OAAiB;QACpC,IAAI,CAAC;YACD,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACtB,IAAI,mBAAmB,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,CAAC;gBACtD,mBAAmB,CAAC,IAAI,CAAC,eAAe,EAAE;oBACtC,WAAW,EAAE,OAAO,CAAC,IAAI;oBACzB,KAAK;oBACL,OAAO,EAAE,KAAK,YAAY,KAAK,CA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AK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;YAChC,IAAI,CAAC;gBACD,OAAO,MAAM,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YACpD,CAAC;oBAAS,CAAC;gBACP,UAAU,CAAC,mBAAmB,EAAE,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;YACjF,CAAC;QACL,CAAC;QACD,KAAK,CAAC,sBAAsB,CAAC,OAAO,EAAE,MAAM;YACxC,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;YAChC,IAAI,CAAC;gBACD,OAAO,MAAM,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YACnE,CAAC;oBAAS,CAAC;gBACP,UAAU,CAAC,mBAAmB,EAAE,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;YACjF,CAAC;QACL,CAAC;QACD,KAAK,CAAC,kBAAkB,CAAC,OAAO;YAC5B,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;YAChC,IAAI,CAAC;gBACD,OAAO,MAAM,SAAS,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;YACvD,CAAC;oBAAS,CAAC;gBACP,UAAU,CAAC,mBAAmB,EAAE,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;YACpF,CAAC;QACL,CAAC;KACJ,CAAC;AACN,CAAC"}
@@ -1,2 +1,35 @@
1
- import "../../common/package-layout.js";
1
+ import { isPackageManifestPath } from "../../common/package-layout.js";
2
+ function inferArtifactKind(filePath) {
3
+ if (isPackageManifestPath(filePath)) {
4
+ return 'manifest';
5
+ }
6
+ if (filePath.endsWith('.sbom.json') || filePath.endsWith('.cdx.json')) {
7
+ return 'sbom';
8
+ }
9
+ if (/\.(?:cjs|d\.[cm]ts|jsx?|map|mjs|tsx?)$/.test(filePath)) {
10
+ return 'source';
11
+ }
12
+ return 'additional';
13
+ }
14
+ export function inspectArtifactSizes(contents) {
15
+ return contents.map(function (entry) {
16
+ const sourcePath = Object.hasOwn(entry, 'inputFilePath') ? entry.inputFilePath : undefined;
17
+ const rewritten = entry.isSubstituted === true;
18
+ let status = 'unchanged';
19
+ if (sourcePath === undefined) {
20
+ status = 'generated';
21
+ }
22
+ else if (rewritten) {
23
+ status = 'changed';
24
+ }
25
+ return {
26
+ path: entry.filePath,
27
+ sizeBytes: Buffer.byteLength(entry.content),
28
+ kind: inferArtifactKind(entry.filePath),
29
+ status,
30
+ badges: rewritten ? ['import-path-rewrite'] : [],
31
+ ...sourcePath === undefined ? {} : { sourcePath }
32
+ };
33
+ });
34
+ }
2
35
  //# sourceMappingURL=inspect-artifact-sizes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inspect-artifact-sizes.js","sourceRoot":"","sources":["../../../../../source/report/inspectors/inspect-artifact-sizes.ts"],"names":[],"mappings":"AAAA,OAAsC,gCAAgC,CAAC;AAW/D"}
1
+ {"version":3,"file":"inspect-artifact-sizes.js","sourceRoot":"","sources":["../../../../../source/report/inspectors/inspect-artifact-sizes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAIvE,SAAS,iBAAiB,CAAC,QAAgB;IACvC,IAAI,qBAAqB,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClC,OAAO,UAAU,CAAC;IACtB,CAAC;IACD,IAAI,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QACpE,OAAO,MAAM,CAAC;IAClB,CAAC;IACD,IAAI,wCAAwC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1D,OAAO,QAAQ,CAAC;IACpB,CAAC;IACD,OAAO,YAAY,CAAC;AACxB,CAAC;AAOD,MAAM,UAAU,oBAAoB,CAAC,QAAuC;IACxE,OAAO,QAAQ,CAAC,GAAG,CAAC,UAAU,KAAK;QAC/B,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;QAC3F,MAAM,SAAS,GAAG,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;QAC/C,IAAI,MAAM,GAA4B,WAAW,CAAC;QAClD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,GAAG,WAAW,CAAC;QACzB,CAAC;aAAM,IAAI,SAAS,EAAE,CAAC;YACnB,MAAM,GAAG,SAAS,CAAC;QACvB,CAAC;QACD,OAAO;YACH,IAAI,EAAE,KAAK,CAAC,QAAQ;YACpB,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC;YAC3C,IAAI,EAAE,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC;YACvC,MAAM;YACN,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAE,qBAAqB,CAAE,CAAC,CAAC,CAAC,EAAE;YAClD,GAAG,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE;SACpD,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,2 +1,15 @@
1
- import "../../linker/linked-bundle.js";
1
+ import { getSubstitutedResources } from "../../linker/linked-bundle.js";
2
+ export function inspectLinkerRewrites(bundle) {
3
+ const linkedBundleNames = Array.from(bundle.linkedBundleDependencies.keys());
4
+ return getSubstitutedResources(bundle).flatMap(function (resource) {
5
+ return linkedBundleNames.map(function (targetBundle) {
6
+ return {
7
+ file: resource.fileDescription.inputFilePath,
8
+ fromSpecifier: resource.fileDescription.inputFilePath,
9
+ toSpecifier: targetBundle,
10
+ targetBundle
11
+ };
12
+ });
13
+ });
14
+ }
2
15
  //# sourceMappingURL=inspect-linker-rewrites.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inspect-linker-rewrites.js","sourceRoot":"","sources":["../../../../../source/report/inspectors/inspect-linker-rewrites.ts"],"names":[],"mappings":"AAAA,OAAwC,+BAA+B,CAAC"}
1
+ {"version":3,"file":"inspect-linker-rewrites.js","sourceRoot":"","sources":["../../../../../source/report/inspectors/inspect-linker-rewrites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAWxE,MAAM,UAAU,qBAAqB,CAAC,MAAwB;IAC1D,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,wBAAwB,CAAC,IAAI,EAAE,CAAC,CAAC;IAC7E,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,UAAU,QAAQ;QAC7D,OAAO,iBAAiB,CAAC,GAAG,CAAC,UAAU,YAAY;YAC/C,OAAO;gBACH,IAAI,EAAE,QAAQ,CAAC,eAAe,CAAC,aAAa;gBAC5C,aAAa,EAAE,QAAQ,CAAC,eAAe,CAAC,aAAa;gBACrD,WAAW,EAAE,YAAY;gBACzB,YAAY;aACf,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1 +1,16 @@
1
+ export function inspectPackageJsonProvenance(assembled, mainPackageJson, additionalAttributes) {
2
+ const result = {};
3
+ for (const key of Object.keys(assembled)) {
4
+ if (additionalAttributes !== undefined && Object.hasOwn(additionalAttributes, key)) {
5
+ result[key] = { source: 'additionalAttributes' };
6
+ }
7
+ else if (Object.hasOwn(mainPackageJson, key)) {
8
+ result[key] = { source: 'mainPackageJson' };
9
+ }
10
+ else {
11
+ result[key] = { source: 'derived' };
12
+ }
13
+ }
14
+ return result;
15
+ }
1
16
  //# sourceMappingURL=inspect-package-json-provenance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inspect-package-json-provenance.js","sourceRoot":"","sources":["../../../../../source/report/inspectors/inspect-package-json-provenance.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"inspect-package-json-provenance.js","sourceRoot":"","sources":["../../../../../source/report/inspectors/inspect-package-json-provenance.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,4BAA4B,CACxC,SAA4C,EAC5C,eAAkD,EAClD,oBAAmE;IAEnE,MAAM,MAAM,GAAoC,EAAE,CAAC;IACnD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QACvC,IAAI,oBAAoB,KAAK,SAAS,IAAI,MAAM,CAAC,MAAM,CAAC,oBAAoB,EAAE,GAAG,CAAC,EAAE,CAAC;YACjF,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,sBAAsB,EAAE,CAAC;QACrD,CAAC;aAAM,IAAI,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,GAAG,CAAC,EAAE,CAAC;YAC7C,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC;QAChD,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QACxC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
@@ -1 +1,16 @@
1
+ export function inspectScanResults(bundle) {
2
+ const included = bundle.contents.map(function (entry) {
3
+ return {
4
+ path: entry.fileDescription.inputFilePath,
5
+ reason: 'reachable-from-entry'
6
+ };
7
+ });
8
+ const excluded = Array.from(bundle.externalDependencies.keys(), function (specifier) {
9
+ return {
10
+ specifier,
11
+ reason: 'external-module'
12
+ };
13
+ });
14
+ return { included, excluded };
15
+ }
1
16
  //# sourceMappingURL=inspect-scan-results.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inspect-scan-results.js","sourceRoot":"","sources":["../../../../../source/report/inspectors/inspect-scan-results.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"inspect-scan-results.js","sourceRoot":"","sources":["../../../../../source/report/inspectors/inspect-scan-results.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,kBAAkB,CAAC,MAA2B;IAC1D,MAAM,QAAQ,GAAmB,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,KAAK;QAChE,OAAO;YACH,IAAI,EAAE,KAAK,CAAC,eAAe,CAAC,aAAa;YACzC,MAAM,EAAE,sBAAsB;SACjC,CAAC;IACN,CAAC,CAAC,CAAC;IACH,MAAM,QAAQ,GAAmB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,EAAE,EAAE,UAAU,SAAS;QAC/F,OAAO;YACH,SAAS;YACT,MAAM,EAAE,iBAAiB;SAC5B,CAAC;IACN,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AAClC,CAAC"}
@@ -1 +1,19 @@
1
+ function unpublishedLabel() {
2
+ return '(unpublished)';
3
+ }
4
+ export function buildReleaseVersionTransition(fields) {
5
+ if (fields.chosenVersion === undefined) {
6
+ return unpublishedLabel();
7
+ }
8
+ if (fields.previousVersion === undefined) {
9
+ return `${unpublishedLabel()} -> ${fields.chosenVersion}`;
10
+ }
11
+ return `${fields.previousVersion} -> ${fields.chosenVersion}`;
12
+ }
13
+ export function buildReleaseVersionLabel(fields) {
14
+ if (fields.previousVersion === undefined) {
15
+ return unpublishedLabel();
16
+ }
17
+ return fields.previousVersion;
18
+ }
1
19
  //# sourceMappingURL=release-version-transition.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"release-version-transition.js","sourceRoot":"","sources":["../../../../../source/report/release-diff/release-version-transition.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"release-version-transition.js","sourceRoot":"","sources":["../../../../../source/report/release-diff/release-version-transition.ts"],"names":[],"mappings":"AAKA,SAAS,gBAAgB;IACrB,OAAO,eAAe,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,MAA4B;IACtE,IAAI,MAAM,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;QACrC,OAAO,gBAAgB,EAAE,CAAC;IAC9B,CAAC;IACD,IAAI,MAAM,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;QACvC,OAAO,GAAG,gBAAgB,EAAE,OAAO,MAAM,CAAC,aAAa,EAAE,CAAC;IAC9D,CAAC;IACD,OAAO,GAAG,MAAM,CAAC,eAAe,OAAO,MAAM,CAAC,aAAa,EAAE,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,MAAqD;IAC1F,IAAI,MAAM,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;QACvC,OAAO,gBAAgB,EAAE,CAAC;IAC9B,CAAC;IACD,OAAO,MAAM,CAAC,eAAe,CAAC;AAClC,CAAC"}
@@ -1 +1,26 @@
1
+ function requireFileDescriptionBySourcePath(filePath, resources) {
2
+ const matchingResource = resources.find(function (resource) {
3
+ return resource.fileDescription.inputFilePath === filePath;
4
+ });
5
+ if (matchingResource === undefined) {
6
+ throw new Error(`Failed to resolve resource for root ${filePath}`);
7
+ }
8
+ return matchingResource.fileDescription;
9
+ }
10
+ function resolveDeclarationFileResource(declarationFilePath, contents) {
11
+ return contents
12
+ .find(function (resource) {
13
+ return resource.fileDescription.inputFilePath === declarationFilePath;
14
+ })
15
+ ?.fileDescription;
16
+ }
17
+ export function buildResolvedRoots(normalized, contents) {
18
+ const resolvedRoots = {};
19
+ for (const [rootId, root] of Object.entries(normalized.roots)) {
20
+ const jsResource = requireFileDescriptionBySourcePath(root.js, contents);
21
+ const declarationFile = resolveDeclarationFileResource(root.declarationFile, contents);
22
+ resolvedRoots[rootId] = { js: jsResource, declarationFile };
23
+ }
24
+ return resolvedRoots;
25
+ }
1
26
  //# sourceMappingURL=bundle-resource-lookup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bundle-resource-lookup.js","sourceRoot":"","sources":["../../../../source/resource-resolver/bundle-resource-lookup.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"bundle-resource-lookup.js","sourceRoot":"","sources":["../../../../source/resource-resolver/bundle-resource-lookup.ts"],"names":[],"mappings":"AAIA,SAAS,kCAAkC,CACvC,QAAgB,EAChB,SAAoC;IAEpC,MAAM,gBAAgB,GAAG,SAAS,CAAC,IAAI,CAAC,UAAU,QAAQ;QACtD,OAAO,QAAQ,CAAC,eAAe,CAAC,aAAa,KAAK,QAAQ,CAAC;IAC/D,CAAC,CAAC,CAAC;IACH,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,uCAAuC,QAAQ,EAAE,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,gBAAgB,CAAC,eAAe,CAAC;AAC5C,CAAC;AAED,SAAS,8BAA8B,CACnC,mBAAuC,EACvC,QAAmC;IAEnC,OAAO,QAAQ;SACV,IAAI,CAAC,UAAU,QAAQ;QACpB,OAAO,QAAQ,CAAC,eAAe,CAAC,aAAa,KAAK,mBAAmB,CAAC;IAC1E,CAAC,CAAC;QACF,EAAE,eAAe,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,kBAAkB,CAC9B,UAAmC,EACnC,QAAmC;IAEnC,MAAM,aAAa,GAGf,EAAE,CAAC;IACP,KAAK,MAAM,CAAE,MAAM,EAAE,IAAI,CAAE,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9D,MAAM,UAAU,GAAG,kCAAkC,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;QACzE,MAAM,eAAe,GAAG,8BAA8B,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;QACvF,aAAa,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC;IAChE,CAAC;IAED,OAAO,aAAa,CAAC;AACzB,CAAC"}
@@ -1,4 +1,137 @@
1
- import 'node:path';
2
- import "../common/code-files.js";
3
- import "../common/package-layout.js";
1
+ import path from 'node:path';
2
+ import { isCodeFile } from "../common/code-files.js";
3
+ import { packageManifestFilePath } from "../common/package-layout.js";
4
+ import { moduleReferenceKind } from "../dependency-scanner/source-file-references.js";
5
+ function prependSourcesFolderIfNecessary(sourcesFolder, filePath) {
6
+ if (!path.isAbsolute(filePath)) {
7
+ return path.join(sourcesFolder, filePath);
8
+ }
9
+ return filePath;
10
+ }
11
+ function rejectCodeFile(targetFilePath) {
12
+ if (isCodeFile(targetFilePath)) {
13
+ const errorMessage = [
14
+ `additionalFiles must not include code files; received "${targetFilePath}".`,
15
+ 'Code that should ship in the bundle must be reachable from a root so',
16
+ 'dependency, side-effect and dead-code analyses can run on it.',
17
+ 'If you intend to ship code as a static asset (e.g. a template),',
18
+ 'use a non-code extension like .txt.'
19
+ ]
20
+ .join(' ');
21
+ throw new Error(errorMessage);
22
+ }
23
+ }
24
+ function rejectGeneratedManifestTarget(targetFilePath) {
25
+ if (targetFilePath === packageManifestFilePath) {
26
+ throw new Error(`additionalFiles must not target generated package manifest "${packageManifestFilePath}".`);
27
+ }
28
+ }
29
+ function rejectAdditionalFileTarget(targetFilePath) {
30
+ rejectGeneratedManifestTarget(targetFilePath);
31
+ rejectCodeFile(targetFilePath);
32
+ }
33
+ function toSourceRelativeTargetPath(sourcesFolder, filePath) {
34
+ const targetFilePath = path.relative(sourcesFolder, filePath);
35
+ if (targetFilePath === packageManifestFilePath ||
36
+ targetFilePath.startsWith('..') ||
37
+ path.isAbsolute(targetFilePath) ||
38
+ targetFilePath.length === 0) {
39
+ throw new Error(`Local file "${filePath}" must resolve to a valid bundle target inside "${sourcesFolder}"`);
40
+ }
41
+ return targetFilePath;
42
+ }
43
+ function targetPathForLocalFile(sourcesFolder, localFile) {
44
+ return localFile.isGeneratedManifest
45
+ ? packageManifestFilePath
46
+ : toSourceRelativeTargetPath(sourcesFolder, localFile.filePath);
47
+ }
48
+ function targetPathByInputPathFor(sourcesFolder, localDependencies) {
49
+ return new Map(localDependencies.map(function (localFile) {
50
+ return [localFile.filePath, targetPathForLocalFile(sourcesFolder, localFile)];
51
+ }));
52
+ }
53
+ function requireTargetPath(targetPathByInputPath, inputFilePath) {
54
+ const targetFilePath = targetPathByInputPath.get(inputFilePath);
55
+ if (targetFilePath === undefined) {
56
+ throw new Error(`Resolved local reference "${inputFilePath}" is missing from bundle contents`);
57
+ }
58
+ return targetFilePath;
59
+ }
60
+ function localArtifactReference(type, reference, targetPathByInputPath) {
61
+ return {
62
+ type,
63
+ sourceSpecifier: reference.sourceSpecifier,
64
+ emittedSpecifier: reference.emittedSpecifier,
65
+ targetFilePath: requireTargetPath(targetPathByInputPath, reference.filePath)
66
+ };
67
+ }
68
+ function artifactModuleReference(reference, targetPathByInputPath) {
69
+ if (reference.kind === moduleReferenceKind.externalPackage) {
70
+ return {
71
+ type: 'external-package',
72
+ sourceSpecifier: reference.sourceSpecifier,
73
+ emittedSpecifier: reference.emittedSpecifier,
74
+ packageName: reference.packageName
75
+ };
76
+ }
77
+ if (reference.kind === moduleReferenceKind.generatedManifest) {
78
+ return localArtifactReference('generated-manifest', reference, targetPathByInputPath);
79
+ }
80
+ if (reference.kind === moduleReferenceKind.localAsset) {
81
+ return localArtifactReference('local-asset', reference, targetPathByInputPath);
82
+ }
83
+ return localArtifactReference('local-code', reference, targetPathByInputPath);
84
+ }
85
+ function artifactModuleReferences(references, targetPathByInputPath) {
86
+ return references.map(function (reference) {
87
+ return artifactModuleReference(reference, targetPathByInputPath);
88
+ });
89
+ }
90
+ function directDependencyTargets(localFile, targetPathByInputPath) {
91
+ return new Set(Array.from(localFile.directDependencies, function (inputFilePath) {
92
+ return requireTargetPath(targetPathByInputPath, inputFilePath);
93
+ }));
94
+ }
95
+ export function combineAllBundleFiles(sourcesFolder, localDependencies, additionalFiles) {
96
+ const targetPathByInputPath = targetPathByInputPathFor(sourcesFolder, localDependencies);
97
+ const resolvedLocalFiles = localDependencies.map(function (localFile) {
98
+ const targetFilePath = targetPathForLocalFile(sourcesFolder, localFile);
99
+ const resolvedBundleFile = {
100
+ inputFilePath: localFile.filePath,
101
+ targetFilePath,
102
+ directDependencies: directDependencyTargets(localFile, targetPathByInputPath),
103
+ moduleReferences: artifactModuleReferences(localFile.moduleReferences, targetPathByInputPath),
104
+ ...localFile.project === undefined ? {} : { project: localFile.project },
105
+ isExplicitlyIncluded: false,
106
+ ...localFile.isGeneratedManifest ? { isGeneratedManifest: true } : {}
107
+ };
108
+ return resolvedBundleFile;
109
+ });
110
+ const additionalContents = additionalFiles.map(function (additionalFile) {
111
+ if (typeof additionalFile === 'string') {
112
+ rejectAdditionalFileTarget(additionalFile);
113
+ const inputFilePath = path.join(sourcesFolder, additionalFile);
114
+ const targetFilePath = additionalFile;
115
+ return {
116
+ inputFilePath,
117
+ targetFilePath,
118
+ directDependencies: new Set(),
119
+ moduleReferences: [],
120
+ isExplicitlyIncluded: true
121
+ };
122
+ }
123
+ if (path.isAbsolute(additionalFile.targetFilePath)) {
124
+ throw new Error('The targetFilePath must be relative');
125
+ }
126
+ rejectAdditionalFileTarget(additionalFile.targetFilePath);
127
+ return {
128
+ inputFilePath: prependSourcesFolderIfNecessary(sourcesFolder, additionalFile.inputFilePath),
129
+ targetFilePath: additionalFile.targetFilePath,
130
+ directDependencies: new Set(),
131
+ moduleReferences: [],
132
+ isExplicitlyIncluded: true
133
+ };
134
+ });
135
+ return [...resolvedLocalFiles, ...additionalContents];
136
+ }
4
137
  //# sourceMappingURL=content.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.js","sourceRoot":"","sources":["../../../../source/resource-resolver/content.ts"],"names":[],"mappings":"AAAA,OAAiB,WAAW,CAAC;AAE7B,OAA2B,yBAAyB,CAAC;AACrD,OAAwC,6BAA6B,CAAC"}
1
+ {"version":3,"file":"content.js","sourceRoot":"","sources":["../../../../source/resource-resolver/content.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI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AC;QAE1D,OAAO;YACH,aAAa,EAAE,+BAA+B,CAAC,aAAa,EAAE,cAAc,CAAC,aAAa,CAAC;YAC3F,cAAc,EAAE,cAAc,CAAC,cAAc;YAC7C,kBAAkB,EAAE,IAAI,GAAG,EAAE;YAC7B,gBAAgB,EAAE,EAAE;YACpB,oBAAoB,EAAE,IAAI;SAC7B,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,OAAO,CAAE,GAAG,kBAAkB,EAAE,GAAG,kBAAkB,CAAE,CAAC;AAC5D,CAAC"}
@@ -1,3 +1,74 @@
1
- import "../dependency-scanner/dependency-graph.js";
2
- import "./resource-resolve-options.js";
1
+ import { mergeDependencyFiles } from "../dependency-scanner/dependency-graph.js";
2
+ import { resolveRootsAndSurface } from "./resource-resolve-options.js";
3
+ function emptyDependencyFiles() {
4
+ return { externalDependencies: new Map(), localFiles: [] };
5
+ }
6
+ async function scanDeclarationGraph(dependencies, options, entryFiles, scannedDeclarationFiles) {
7
+ const pendingEntryFiles = entryFiles.filter(function (entryFile) {
8
+ return !scannedDeclarationFiles.has(entryFile);
9
+ });
10
+ if (pendingEntryFiles.length === 0) {
11
+ return emptyDependencyFiles();
12
+ }
13
+ pendingEntryFiles.forEach(function (entryFile) {
14
+ scannedDeclarationFiles.record(entryFile);
15
+ });
16
+ const declarationDependencyGraph = await dependencies.dependencyScanner.scanEntries(pendingEntryFiles, options.sourcesFolder, {
17
+ includeSourceMapFiles: options.includeSourceMapFiles,
18
+ resolveDeclarationFiles: true,
19
+ mainPackageJson: options.mainPackageJson
20
+ });
21
+ return pendingEntryFiles.reduce(function (result, entryFile) {
22
+ return mergeDependencyFiles(result, declarationDependencyGraph.flatten(entryFile));
23
+ }, emptyDependencyFiles());
24
+ }
25
+ function createDeclarationScanTracker() {
26
+ const scannedDeclarationFiles = new Set();
27
+ return {
28
+ has(filePath) {
29
+ return scannedDeclarationFiles.has(filePath);
30
+ },
31
+ record(filePath) {
32
+ scannedDeclarationFiles.add(filePath);
33
+ }
34
+ };
35
+ }
36
+ async function resolveJsDependencies(context, root) {
37
+ const { dependencies, options } = context;
38
+ const { sourcesFolder, includeSourceMapFiles, mainPackageJson } = options;
39
+ const jsDependencyGraph = await dependencies.dependencyScanner.scan(root.js, sourcesFolder, {
40
+ includeSourceMapFiles,
41
+ resolveDeclarationFiles: false,
42
+ mainPackageJson
43
+ });
44
+ return jsDependencyGraph.flatten(root.js);
45
+ }
46
+ async function resolveRootDeclarationDependencies(context, root) {
47
+ const entryFiles = [];
48
+ if (root.declarationFile !== undefined) {
49
+ entryFiles.push(root.declarationFile);
50
+ }
51
+ return scanDeclarationGraph(context.dependencies, context.options, entryFiles, context.scannedDeclarationFiles);
52
+ }
53
+ async function resolveDependenciesForRoot(context, root) {
54
+ const jsDependencies = await resolveJsDependencies(context, root);
55
+ const declarationDependencies = await resolveRootDeclarationDependencies(context, root);
56
+ return mergeDependencyFiles(jsDependencies, declarationDependencies);
57
+ }
58
+ export async function resolveDependenciesForAllRoots(dependencies, options, promotedDeclarationEntryFiles) {
59
+ const { roots } = resolveRootsAndSurface(options);
60
+ const rootValues = Object.values(roots);
61
+ const context = {
62
+ dependencies,
63
+ options,
64
+ scannedDeclarationFiles: createDeclarationScanTracker()
65
+ };
66
+ let dependencyFiles = emptyDependencyFiles();
67
+ for (const root of rootValues) {
68
+ dependencyFiles = mergeDependencyFiles(dependencyFiles, await resolveDependenciesForRoot(context, root));
69
+ }
70
+ const promotedDeclarationDependencies = await scanDeclarationGraph(dependencies, options, promotedDeclarationEntryFiles, context.scannedDeclarationFiles);
71
+ dependencyFiles = mergeDependencyFiles(dependencyFiles, promotedDeclarationDependencies);
72
+ return dependencyFiles;
73
+ }
3
74
  //# sourceMappingURL=dependency-resolution-walker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dependency-resolution-walker.js","sourceRoot":"","sources":["../../../../source/resource-resolver/dependency-resolution-walker.ts"],"names":[],"mappings":"AAAA,OAA2D,2CAA2C,CAAC;AAGvG,OAIO,+BAA+B,CAAC"}
1
+ {"version":3,"file":"dependency-resolution-walker.js","sourceRoot":"","sources":["../../../../source/resource-resolver/dependency-resolution-walker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAwB,MAAM,2CAA2C,CAAC;AAGvG,OAAO,EAEH,sBAAsB,EAEzB,MAAM,+BAA+B,CAAC;AAiBvC,SAAS,oBAAoB;IACzB,OAAO,EAAE,oBAAoB,EAAE,IAAI,GAAG,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;AAC/D,CAAC;AAED,KAAK,UAAU,oBAAoB,CAC/B,YAA8C,EAC9C,OAA+B,EAC/B,UAA6B,EAC7B,uBAA+C;IAE/C,MAAM,iBAAiB,GAAG,UAAU,CAAC,MAAM,CAAC,UAAU,SAAS;QAC3D,OAAO,CAAC,uBAAuB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;IACH,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjC,OAAO,oBAAoB,EAAE,CAAC;IAClC,CAAC;IACD,iBAAiB,CAAC,OAAO,CAAC,UAAU,SAAS;QACzC,uBAAuB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,MAAM,0BAA0B,GAAG,MAAM,YAAY,CAAC,iBAAiB,CAAC,WAAW,CAC/E,iBAAiB,EACjB,OAAO,CAAC,aAAa,EACrB;QACI,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;QACpD,uBAAuB,EAAE,IAAI;QAC7B,eAAe,EAAE,OAAO,CAAC,eAAe;KAC3C,CACJ,CAAC;IACF,OAAO,iBAAiB,CAAC,MAAM,CAAC,UAAU,MAAM,EAAE,SAAS;QACvD,OAAO,oBAAoB,CAAC,MAAM,EAAE,0BAA0B,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;IACvF,CAAC,EAAE,oBAAoB,EAAE,CAAC,CAAC;AAC/B,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AuB,GAAG,MAAM,kCAAkC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACxF,OAAO,oBAAoB,CAAC,cAAc,EAAE,uBAAuB,CAAC,CAAC;AACzE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAChD,YAA8C,EAC9C,OAA+B,EAC/B,6BAAgD;IAEhD,MAAM,EAAE,KAAK,EAAE,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACxC,MAAM,OAAO,GAA0B;QACnC,YAAY;QACZ,OAAO;QACP,uBAAuB,EAAE,4BAA4B,EAAE;KAC1D,CAAC;IACF,IAAI,eAAe,GAAG,oBAAoB,EAAE,CAAC;IAE7C,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;QAC5B,eAAe,GAAG,oBAAoB,CAAC,eAAe,EAAE,MAAM,0BAA0B,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IAC7G,CAAC;IAED,MAAM,+BAA+B,GAAG,MAAM,oBAAoB,CAC9D,YAAY,EACZ,OAAO,EACP,6BAA6B,EAC7B,OAAO,CAAC,uBAAuB,CAClC,CAAC;IAEF,eAAe,GAAG,oBAAoB,CAAC,eAAe,EAAE,+BAA+B,CAAC,CAAC;IAEzF,OAAO,eAAe,CAAC;AAC3B,CAAC"}
@@ -1,12 +1,66 @@
1
+ import type { Project } from 'ts-morph';
2
+ import type { ExternalDependencies } from '../dependency-scanner/external-dependencies.ts';
1
3
  import type { TransferableFileDescription } from '../file-manager/file-description.ts';
4
+ import type { PackageSurface } from '../package-surface/surface.ts';
5
+ type ExternalPackageArtifactModuleReference = {
6
+ readonly type: 'external-package';
7
+ readonly sourceSpecifier: string;
8
+ readonly emittedSpecifier: string;
9
+ readonly packageName: string;
10
+ };
11
+ type GeneratedManifestArtifactModuleReference = {
12
+ readonly type: 'generated-manifest';
13
+ readonly sourceSpecifier: string;
14
+ readonly emittedSpecifier: string;
15
+ readonly targetFilePath: string;
16
+ };
17
+ type LinkedCodeArtifactModuleReference = {
18
+ readonly type: 'linked-code';
19
+ readonly sourceSpecifier: string;
20
+ readonly emittedSpecifier: string;
21
+ readonly packageName: string;
22
+ readonly targetFilePath: string;
23
+ };
24
+ type LocalAssetArtifactModuleReference = {
25
+ readonly type: 'local-asset';
26
+ readonly sourceSpecifier: string;
27
+ readonly emittedSpecifier: string;
28
+ readonly targetFilePath: string;
29
+ };
30
+ type LocalCodeArtifactModuleReference = {
31
+ readonly type: 'local-code';
32
+ readonly sourceSpecifier: string;
33
+ readonly emittedSpecifier: string;
34
+ readonly targetFilePath: string;
35
+ };
36
+ type PackageArtifactModuleReference = ExternalPackageArtifactModuleReference | LinkedCodeArtifactModuleReference;
37
+ type LocalFileArtifactModuleReference = LocalAssetArtifactModuleReference | LocalCodeArtifactModuleReference;
38
+ type LocalArtifactModuleReference = GeneratedManifestArtifactModuleReference | LocalFileArtifactModuleReference;
39
+ export type ArtifactModuleReference = LocalArtifactModuleReference | PackageArtifactModuleReference;
2
40
  export type BundleResource = {
3
41
  readonly fileDescription: TransferableFileDescription;
4
42
  readonly directDependencies: ReadonlySet<string>;
43
+ readonly moduleReferences: readonly ArtifactModuleReference[];
5
44
  readonly isExplicitlyIncluded: boolean;
6
45
  readonly isGeneratedManifest?: true | undefined;
7
46
  };
47
+ export type ResolvedContent = BundleResource & {
48
+ readonly project?: Project | undefined;
49
+ };
8
50
  export type RootFileDescription = {
9
51
  readonly js: TransferableFileDescription;
10
52
  readonly declarationFile?: TransferableFileDescription | undefined;
11
53
  };
54
+ export type ResolvedBundle = {
55
+ readonly contents: readonly ResolvedContent[];
56
+ readonly roots: Readonly<Record<string, RootFileDescription>>;
57
+ readonly surface: PackageSurface;
58
+ readonly name: string;
59
+ readonly exportPackageJson?: true | undefined;
60
+ readonly externalDependencies: ExternalDependencies;
61
+ };
62
+ export declare function rootHasDeclarationFile(root: RootFileDescription): root is RootFileDescription & {
63
+ readonly declarationFile: TransferableFileDescription;
64
+ };
65
+ export {};
12
66
  //# sourceMappingURL=resolved-bundle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolved-bundle.d.ts","sourceRoot":"","sources":["../../../../source/resource-resolver/resolved-bundle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;MAGjF,MAAM,cAAc,GAAG;IACzB,QAAQ,CAAC,eAAe,EAAE,2BAA2B,CAAC;IACtD,QAAQ,CAAC,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACvC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,mBAImB,GAAG;IAC9B,QAAQ,CAAC,EAAE,EAAE,2BAA2B,CAAC;IACzC,QAAQ,CAAC,eAAe,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;CACtE,CAAC"}
1
+ {"version":3,"file":"resolved-bundle.d.ts","sourceRoot":"","sources":["../../../../source/resource-resolver/resolved-bundle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,KAAK,sCAAsC,GAAG;IAC1C,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,KAAK,wCAAwC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AAW,CAAC,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,gBAAgB,EAAE,SAAS,uBAAuB,EAAE,CAAC;IAC9D,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACvC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG;IAC3C,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAC9B,QAAQ,CAAC,EAAE,EAAE,2BAA2B,CAAC;IACzC,QAAQ,CAAC,eAAe,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;CACtE,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAC;IAC9C,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,iBAAiB,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC9C,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;CACvD,CAAC;AAEF,wBAAgB,sBAAsB,CAClC,IAAI,EAAE,mBAAmB,GAC1B,IAAI,IAAI,mBAAmB,GAAG;IAAE,QAAQ,CAAC,eAAe,EAAE,2BAA2B,CAAC;CAAE,CAE1F"}
@@ -1 +1,4 @@
1
+ export function rootHasDeclarationFile(root) {
2
+ return root.declarationFile !== undefined;
3
+ }
1
4
  //# sourceMappingURL=resolved-bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolved-bundle.js","sourceRoot":"","sources":["../../../../source/resource-resolver/resolved-bundle.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"resolved-bundle.js","sourceRoot":"","sources":["../../../../source/resource-resolver/resolved-bundle.ts"],"names":[],"mappings":"AA2EA,MAAM,UAAU,sBAAsB,CAClC,IAAyB;IAEzB,OAAO,IAAI,CAAC,eAAe,KAAK,SAAS,CAAC;AAC9C,CAAC"}