@vibesdotdev/infra-deploy 0.0.1 → 1.0.0-rc.4

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 (662) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +79 -118
  3. package/dist/cli/alerts/infra-alerts-create.cli-command.descriptor.d.ts +48 -35
  4. package/dist/cli/alerts/infra-alerts-create.cli-command.descriptor.d.ts.map +1 -1
  5. package/dist/cli/alerts/infra-alerts-create.cli-command.descriptor.js +1 -1
  6. package/dist/cli/alerts/infra-alerts-create.cli-command.descriptor.js.map +1 -1
  7. package/dist/cli/alerts/infra-alerts-create.cli-command.impl.d.ts +2 -1
  8. package/dist/cli/alerts/infra-alerts-create.cli-command.impl.d.ts.map +1 -1
  9. package/dist/cli/alerts/infra-alerts-create.cli-command.impl.js +31 -21
  10. package/dist/cli/alerts/infra-alerts-create.cli-command.impl.js.map +1 -1
  11. package/dist/cli/alerts/infra-alerts-delete.cli-command.descriptor.d.ts +26 -27
  12. package/dist/cli/alerts/infra-alerts-delete.cli-command.descriptor.d.ts.map +1 -1
  13. package/dist/cli/alerts/infra-alerts-delete.cli-command.descriptor.js +1 -1
  14. package/dist/cli/alerts/infra-alerts-delete.cli-command.descriptor.js.map +1 -1
  15. package/dist/cli/alerts/infra-alerts-delete.cli-command.impl.d.ts +2 -1
  16. package/dist/cli/alerts/infra-alerts-delete.cli-command.impl.d.ts.map +1 -1
  17. package/dist/cli/alerts/infra-alerts-delete.cli-command.impl.js +11 -11
  18. package/dist/cli/alerts/infra-alerts-delete.cli-command.impl.js.map +1 -1
  19. package/dist/cli/alerts/infra-alerts-list.cli-command.descriptor.d.ts +19 -17
  20. package/dist/cli/alerts/infra-alerts-list.cli-command.descriptor.d.ts.map +1 -1
  21. package/dist/cli/alerts/infra-alerts-list.cli-command.descriptor.js +1 -1
  22. package/dist/cli/alerts/infra-alerts-list.cli-command.descriptor.js.map +1 -1
  23. package/dist/cli/alerts/infra-alerts-list.cli-command.impl.d.ts +2 -1
  24. package/dist/cli/alerts/infra-alerts-list.cli-command.impl.d.ts.map +1 -1
  25. package/dist/cli/alerts/infra-alerts-list.cli-command.impl.js +15 -14
  26. package/dist/cli/alerts/infra-alerts-list.cli-command.impl.js.map +1 -1
  27. package/dist/cli/alerts/infra-alerts.cli-group.descriptor.d.ts +8 -8
  28. package/dist/cli/alerts/infra-alerts.cli-group.descriptor.js +1 -1
  29. package/dist/cli/alerts/infra-alerts.cli-group.descriptor.js.map +1 -1
  30. package/dist/cli/audit/infra-audit.cli-command.descriptor.d.ts +24 -17
  31. package/dist/cli/audit/infra-audit.cli-command.descriptor.d.ts.map +1 -1
  32. package/dist/cli/audit/infra-audit.cli-command.descriptor.js +8 -3
  33. package/dist/cli/audit/infra-audit.cli-command.descriptor.js.map +1 -1
  34. package/dist/cli/audit/infra-audit.cli-command.impl.d.ts +164 -1
  35. package/dist/cli/audit/infra-audit.cli-command.impl.d.ts.map +1 -1
  36. package/dist/cli/audit/infra-audit.cli-command.impl.js +557 -76
  37. package/dist/cli/audit/infra-audit.cli-command.impl.js.map +1 -1
  38. package/dist/cli/db/infra-db.cli-command.descriptor.d.ts +49 -0
  39. package/dist/cli/db/infra-db.cli-command.descriptor.d.ts.map +1 -0
  40. package/dist/cli/db/infra-db.cli-command.descriptor.js +60 -0
  41. package/dist/cli/db/infra-db.cli-command.descriptor.js.map +1 -0
  42. package/dist/cli/db/infra-db.cli-command.impl.d.ts +30 -0
  43. package/dist/cli/db/infra-db.cli-command.impl.d.ts.map +1 -0
  44. package/dist/cli/db/infra-db.cli-command.impl.js +167 -0
  45. package/dist/cli/db/infra-db.cli-command.impl.js.map +1 -0
  46. package/dist/cli/dns/infra-dns-activate.cli-command.impl.d.ts +6 -0
  47. package/dist/cli/dns/infra-dns-activate.cli-command.impl.d.ts.map +1 -0
  48. package/dist/cli/dns/infra-dns-activate.cli-command.impl.js +53 -0
  49. package/dist/cli/dns/infra-dns-activate.cli-command.impl.js.map +1 -0
  50. package/dist/cli/dns/infra-dns-delete.cli-command.descriptor.d.ts +41 -0
  51. package/dist/cli/dns/infra-dns-delete.cli-command.descriptor.d.ts.map +1 -0
  52. package/dist/cli/dns/infra-dns-delete.cli-command.descriptor.js +50 -0
  53. package/dist/cli/dns/infra-dns-delete.cli-command.descriptor.js.map +1 -0
  54. package/dist/cli/dns/infra-dns-delete.cli-command.impl.d.ts +12 -0
  55. package/dist/cli/dns/infra-dns-delete.cli-command.impl.d.ts.map +1 -0
  56. package/dist/cli/dns/infra-dns-delete.cli-command.impl.js +70 -0
  57. package/dist/cli/dns/infra-dns-delete.cli-command.impl.js.map +1 -0
  58. package/dist/cli/dns/infra-dns-list.cli-command.descriptor.d.ts +32 -0
  59. package/dist/cli/dns/infra-dns-list.cli-command.descriptor.d.ts.map +1 -0
  60. package/dist/cli/dns/infra-dns-list.cli-command.descriptor.js +39 -0
  61. package/dist/cli/dns/infra-dns-list.cli-command.descriptor.js.map +1 -0
  62. package/dist/cli/dns/infra-dns-list.cli-command.impl.d.ts +17 -0
  63. package/dist/cli/dns/infra-dns-list.cli-command.impl.d.ts.map +1 -0
  64. package/dist/cli/dns/infra-dns-list.cli-command.impl.js +66 -0
  65. package/dist/cli/dns/infra-dns-list.cli-command.impl.js.map +1 -0
  66. package/dist/cli/dns/infra-dns-set.cli-command.descriptor.d.ts +58 -0
  67. package/dist/cli/dns/infra-dns-set.cli-command.descriptor.d.ts.map +1 -0
  68. package/dist/cli/dns/infra-dns-set.cli-command.descriptor.js +72 -0
  69. package/dist/cli/dns/infra-dns-set.cli-command.descriptor.js.map +1 -0
  70. package/dist/cli/dns/infra-dns-set.cli-command.impl.d.ts +14 -0
  71. package/dist/cli/dns/infra-dns-set.cli-command.impl.d.ts.map +1 -0
  72. package/dist/cli/dns/infra-dns-set.cli-command.impl.js +110 -0
  73. package/dist/cli/dns/infra-dns-set.cli-command.impl.js.map +1 -0
  74. package/dist/cli/dns/infra-dns.cli-group.descriptor.d.ts +41 -0
  75. package/dist/cli/dns/infra-dns.cli-group.descriptor.d.ts.map +1 -0
  76. package/dist/cli/dns/infra-dns.cli-group.descriptor.js +47 -0
  77. package/dist/cli/dns/infra-dns.cli-group.descriptor.js.map +1 -0
  78. package/dist/cli/dns/resolve-dns-provider.d.ts +24 -0
  79. package/dist/cli/dns/resolve-dns-provider.d.ts.map +1 -0
  80. package/dist/cli/dns/resolve-dns-provider.js +62 -0
  81. package/dist/cli/dns/resolve-dns-provider.js.map +1 -0
  82. package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.descriptor.d.ts +37 -0
  83. package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.descriptor.d.ts.map +1 -0
  84. package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.descriptor.js +45 -0
  85. package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.descriptor.js.map +1 -0
  86. package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.impl.d.ts +15 -0
  87. package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.impl.d.ts.map +1 -0
  88. package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.impl.js +78 -0
  89. package/dist/cli/edge-tls/infra-edge-tls-delete.cli-command.impl.js.map +1 -0
  90. package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.descriptor.d.ts +29 -0
  91. package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.descriptor.d.ts.map +1 -0
  92. package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.descriptor.js +35 -0
  93. package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.descriptor.js.map +1 -0
  94. package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.impl.d.ts +19 -0
  95. package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.impl.d.ts.map +1 -0
  96. package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.impl.js +73 -0
  97. package/dist/cli/edge-tls/infra-edge-tls-list.cli-command.impl.js.map +1 -0
  98. package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.descriptor.d.ts +41 -0
  99. package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.descriptor.d.ts.map +1 -0
  100. package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.descriptor.js +50 -0
  101. package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.descriptor.js.map +1 -0
  102. package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.impl.d.ts +16 -0
  103. package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.impl.d.ts.map +1 -0
  104. package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.impl.js +81 -0
  105. package/dist/cli/edge-tls/infra-edge-tls-set-zone-default.cli-command.impl.js.map +1 -0
  106. package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.descriptor.d.ts +40 -0
  107. package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.descriptor.d.ts.map +1 -0
  108. package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.descriptor.js +49 -0
  109. package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.descriptor.js.map +1 -0
  110. package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.impl.d.ts +14 -0
  111. package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.impl.d.ts.map +1 -0
  112. package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.impl.js +78 -0
  113. package/dist/cli/edge-tls/infra-edge-tls-set.cli-command.impl.js.map +1 -0
  114. package/dist/cli/edge-tls/infra-edge-tls.cli-group.descriptor.d.ts +12 -0
  115. package/dist/cli/edge-tls/infra-edge-tls.cli-group.descriptor.d.ts.map +1 -0
  116. package/dist/cli/edge-tls/infra-edge-tls.cli-group.descriptor.js +12 -0
  117. package/dist/cli/edge-tls/infra-edge-tls.cli-group.descriptor.js.map +1 -0
  118. package/dist/cli/edge-tls/resolve-edge-tls-provider.d.ts +25 -0
  119. package/dist/cli/edge-tls/resolve-edge-tls-provider.d.ts.map +1 -0
  120. package/dist/cli/edge-tls/resolve-edge-tls-provider.js +74 -0
  121. package/dist/cli/edge-tls/resolve-edge-tls-provider.js.map +1 -0
  122. package/dist/cli/infra-deploy.cli-group.descriptor.d.ts +8 -8
  123. package/dist/cli/infra-deploy.cli-group.descriptor.js +1 -1
  124. package/dist/cli/infra-deploy.cli-group.descriptor.js.map +1 -1
  125. package/dist/cli/infra.cli-group.descriptor.d.ts +7 -7
  126. package/dist/cli/infra.cli-group.descriptor.js +1 -1
  127. package/dist/cli/infra.cli-group.descriptor.js.map +1 -1
  128. package/dist/cli/inventory/infra-inventory.cli-command.descriptor.d.ts +26 -0
  129. package/dist/cli/inventory/infra-inventory.cli-command.descriptor.d.ts.map +1 -0
  130. package/dist/cli/inventory/infra-inventory.cli-command.descriptor.js +18 -0
  131. package/dist/cli/inventory/infra-inventory.cli-command.descriptor.js.map +1 -0
  132. package/dist/cli/inventory/infra-inventory.cli-command.impl.d.ts +18 -0
  133. package/dist/cli/inventory/infra-inventory.cli-command.impl.d.ts.map +1 -0
  134. package/dist/cli/inventory/infra-inventory.cli-command.impl.js +204 -0
  135. package/dist/cli/inventory/infra-inventory.cli-command.impl.js.map +1 -0
  136. package/dist/cli/list/infra-deploy.list.cli-command.descriptor.d.ts +40 -30
  137. package/dist/cli/list/infra-deploy.list.cli-command.descriptor.d.ts.map +1 -1
  138. package/dist/cli/list/infra-deploy.list.cli-command.descriptor.js +7 -3
  139. package/dist/cli/list/infra-deploy.list.cli-command.descriptor.js.map +1 -1
  140. package/dist/cli/list/infra-deploy.list.cli-command.impl.d.ts +35 -1
  141. package/dist/cli/list/infra-deploy.list.cli-command.impl.d.ts.map +1 -1
  142. package/dist/cli/list/infra-deploy.list.cli-command.impl.js +202 -20
  143. package/dist/cli/list/infra-deploy.list.cli-command.impl.js.map +1 -1
  144. package/dist/cli/logs/infra-logs.cli-command.descriptor.d.ts +113 -35
  145. package/dist/cli/logs/infra-logs.cli-command.descriptor.d.ts.map +1 -1
  146. package/dist/cli/logs/infra-logs.cli-command.descriptor.js +87 -3
  147. package/dist/cli/logs/infra-logs.cli-command.descriptor.js.map +1 -1
  148. package/dist/cli/logs/infra-logs.cli-command.impl.d.ts +61 -1
  149. package/dist/cli/logs/infra-logs.cli-command.impl.d.ts.map +1 -1
  150. package/dist/cli/logs/infra-logs.cli-command.impl.js +1161 -108
  151. package/dist/cli/logs/infra-logs.cli-command.impl.js.map +1 -1
  152. package/dist/cli/logs/stream-worker-tail.d.ts +7 -2
  153. package/dist/cli/logs/stream-worker-tail.d.ts.map +1 -1
  154. package/dist/cli/logs/stream-worker-tail.js +280 -113
  155. package/dist/cli/logs/stream-worker-tail.js.map +1 -1
  156. package/dist/cli/migrate/infra-deploy.migrate.cli-command.descriptor.d.ts +62 -0
  157. package/dist/cli/migrate/infra-deploy.migrate.cli-command.descriptor.d.ts.map +1 -0
  158. package/dist/cli/migrate/infra-deploy.migrate.cli-command.descriptor.js +79 -0
  159. package/dist/cli/migrate/infra-deploy.migrate.cli-command.descriptor.js.map +1 -0
  160. package/dist/cli/migrate/infra-deploy.migrate.cli-command.impl.d.ts +8 -0
  161. package/dist/cli/migrate/infra-deploy.migrate.cli-command.impl.d.ts.map +1 -0
  162. package/dist/cli/migrate/infra-deploy.migrate.cli-command.impl.js +105 -0
  163. package/dist/cli/migrate/infra-deploy.migrate.cli-command.impl.js.map +1 -0
  164. package/dist/cli/npm/infra-npm-mirror.cli-command.descriptor.d.ts +34 -0
  165. package/dist/cli/npm/infra-npm-mirror.cli-command.descriptor.d.ts.map +1 -0
  166. package/dist/cli/npm/infra-npm-mirror.cli-command.descriptor.js +42 -0
  167. package/dist/cli/npm/infra-npm-mirror.cli-command.descriptor.js.map +1 -0
  168. package/dist/cli/npm/infra-npm-mirror.cli-command.impl.d.ts +13 -0
  169. package/dist/cli/npm/infra-npm-mirror.cli-command.impl.d.ts.map +1 -0
  170. package/dist/cli/npm/infra-npm-mirror.cli-command.impl.js +82 -0
  171. package/dist/cli/npm/infra-npm-mirror.cli-command.impl.js.map +1 -0
  172. package/dist/cli/npm/infra-npm-publish.cli-command.descriptor.d.ts +80 -23
  173. package/dist/cli/npm/infra-npm-publish.cli-command.descriptor.d.ts.map +1 -1
  174. package/dist/cli/npm/infra-npm-publish.cli-command.descriptor.js +48 -16
  175. package/dist/cli/npm/infra-npm-publish.cli-command.descriptor.js.map +1 -1
  176. package/dist/cli/npm/infra-npm-publish.cli-command.impl.d.ts +47 -1
  177. package/dist/cli/npm/infra-npm-publish.cli-command.impl.d.ts.map +1 -1
  178. package/dist/cli/npm/infra-npm-publish.cli-command.impl.js +532 -351
  179. package/dist/cli/npm/infra-npm-publish.cli-command.impl.js.map +1 -1
  180. package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.descriptor.d.ts +28 -0
  181. package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.descriptor.d.ts.map +1 -0
  182. package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.descriptor.js +34 -0
  183. package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.descriptor.js.map +1 -0
  184. package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.impl.d.ts +12 -0
  185. package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.impl.d.ts.map +1 -0
  186. package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.impl.js +134 -0
  187. package/dist/cli/npm/infra-npm-reconcile-latest.cli-command.impl.js.map +1 -0
  188. package/dist/cli/npm/infra-npm.cli-group.descriptor.d.ts +8 -8
  189. package/dist/cli/npm/infra-npm.cli-group.descriptor.js +1 -1
  190. package/dist/cli/npm/infra-npm.cli-group.descriptor.js.map +1 -1
  191. package/dist/cli/npm/mirror-registry-artifacts.d.ts +64 -0
  192. package/dist/cli/npm/mirror-registry-artifacts.d.ts.map +1 -0
  193. package/dist/cli/npm/mirror-registry-artifacts.js +114 -0
  194. package/dist/cli/npm/mirror-registry-artifacts.js.map +1 -0
  195. package/dist/cli/npm/publish/command-options.d.ts +24 -0
  196. package/dist/cli/npm/publish/command-options.d.ts.map +1 -0
  197. package/dist/cli/npm/publish/command-options.js +85 -0
  198. package/dist/cli/npm/publish/command-options.js.map +1 -0
  199. package/dist/cli/npm/publish/concurrency.d.ts +19 -0
  200. package/dist/cli/npm/publish/concurrency.d.ts.map +1 -0
  201. package/dist/cli/npm/publish/concurrency.js +60 -0
  202. package/dist/cli/npm/publish/concurrency.js.map +1 -0
  203. package/dist/cli/npm/publish/consumer-smoke.d.ts +83 -0
  204. package/dist/cli/npm/publish/consumer-smoke.d.ts.map +1 -0
  205. package/dist/cli/npm/publish/consumer-smoke.js +371 -0
  206. package/dist/cli/npm/publish/consumer-smoke.js.map +1 -0
  207. package/dist/cli/npm/publish/consumer-surfaces.d.ts +81 -0
  208. package/dist/cli/npm/publish/consumer-surfaces.d.ts.map +1 -0
  209. package/dist/cli/npm/publish/consumer-surfaces.js +199 -0
  210. package/dist/cli/npm/publish/consumer-surfaces.js.map +1 -0
  211. package/dist/cli/npm/publish/external-requirements.d.ts +171 -0
  212. package/dist/cli/npm/publish/external-requirements.d.ts.map +1 -0
  213. package/dist/cli/npm/publish/external-requirements.js +365 -0
  214. package/dist/cli/npm/publish/external-requirements.js.map +1 -0
  215. package/dist/cli/npm/publish/forge-source-identity.d.ts +64 -0
  216. package/dist/cli/npm/publish/forge-source-identity.d.ts.map +1 -0
  217. package/dist/cli/npm/publish/forge-source-identity.js +201 -0
  218. package/dist/cli/npm/publish/forge-source-identity.js.map +1 -0
  219. package/dist/cli/npm/publish/fs-paths.d.ts +25 -0
  220. package/dist/cli/npm/publish/fs-paths.d.ts.map +1 -0
  221. package/dist/cli/npm/publish/fs-paths.js +87 -0
  222. package/dist/cli/npm/publish/fs-paths.js.map +1 -0
  223. package/dist/cli/npm/publish/lease-preflight-answer.d.ts +17 -0
  224. package/dist/cli/npm/publish/lease-preflight-answer.d.ts.map +1 -0
  225. package/dist/cli/npm/publish/lease-preflight-answer.js +35 -0
  226. package/dist/cli/npm/publish/lease-preflight-answer.js.map +1 -0
  227. package/dist/cli/npm/publish/lease-preflight.d.ts +92 -0
  228. package/dist/cli/npm/publish/lease-preflight.d.ts.map +1 -0
  229. package/dist/cli/npm/publish/lease-preflight.js +205 -0
  230. package/dist/cli/npm/publish/lease-preflight.js.map +1 -0
  231. package/dist/cli/npm/publish/managed-lease.d.ts +110 -0
  232. package/dist/cli/npm/publish/managed-lease.d.ts.map +1 -0
  233. package/dist/cli/npm/publish/managed-lease.js +191 -0
  234. package/dist/cli/npm/publish/managed-lease.js.map +1 -0
  235. package/dist/cli/npm/publish/npm-exec.d.ts +148 -0
  236. package/dist/cli/npm/publish/npm-exec.d.ts.map +1 -0
  237. package/dist/cli/npm/publish/npm-exec.js +311 -0
  238. package/dist/cli/npm/publish/npm-exec.js.map +1 -0
  239. package/dist/cli/npm/publish/package-artifact.d.ts +107 -0
  240. package/dist/cli/npm/publish/package-artifact.d.ts.map +1 -0
  241. package/dist/cli/npm/publish/package-artifact.js +418 -0
  242. package/dist/cli/npm/publish/package-artifact.js.map +1 -0
  243. package/dist/cli/npm/publish/platform-registry.d.ts +76 -0
  244. package/dist/cli/npm/publish/platform-registry.d.ts.map +1 -0
  245. package/dist/cli/npm/publish/platform-registry.js +324 -0
  246. package/dist/cli/npm/publish/platform-registry.js.map +1 -0
  247. package/dist/cli/npm/publish/proof-external-closure.d.ts +139 -0
  248. package/dist/cli/npm/publish/proof-external-closure.d.ts.map +1 -0
  249. package/dist/cli/npm/publish/proof-external-closure.js +339 -0
  250. package/dist/cli/npm/publish/proof-external-closure.js.map +1 -0
  251. package/dist/cli/npm/publish/proof-installed-graph.d.ts +26 -0
  252. package/dist/cli/npm/publish/proof-installed-graph.d.ts.map +1 -0
  253. package/dist/cli/npm/publish/proof-installed-graph.js +229 -0
  254. package/dist/cli/npm/publish/proof-installed-graph.js.map +1 -0
  255. package/dist/cli/npm/publish/proof-registry.d.ts +74 -0
  256. package/dist/cli/npm/publish/proof-registry.d.ts.map +1 -0
  257. package/dist/cli/npm/publish/proof-registry.js +335 -0
  258. package/dist/cli/npm/publish/proof-registry.js.map +1 -0
  259. package/dist/cli/npm/publish/proof-source-credentials.d.ts +42 -0
  260. package/dist/cli/npm/publish/proof-source-credentials.d.ts.map +1 -0
  261. package/dist/cli/npm/publish/proof-source-credentials.js +129 -0
  262. package/dist/cli/npm/publish/proof-source-credentials.js.map +1 -0
  263. package/dist/cli/npm/publish/publish-package.d.ts +66 -0
  264. package/dist/cli/npm/publish/publish-package.d.ts.map +1 -0
  265. package/dist/cli/npm/publish/publish-package.js +544 -0
  266. package/dist/cli/npm/publish/publish-package.js.map +1 -0
  267. package/dist/cli/npm/publish/publisher-manifest.d.ts +173 -0
  268. package/dist/cli/npm/publish/publisher-manifest.d.ts.map +1 -0
  269. package/dist/cli/npm/publish/publisher-manifest.js +79 -0
  270. package/dist/cli/npm/publish/publisher-manifest.js.map +1 -0
  271. package/dist/cli/npm/publish/rc-major-exception.d.ts +20 -0
  272. package/dist/cli/npm/publish/rc-major-exception.d.ts.map +1 -0
  273. package/dist/cli/npm/publish/rc-major-exception.js +46 -0
  274. package/dist/cli/npm/publish/rc-major-exception.js.map +1 -0
  275. package/dist/cli/npm/publish/registry-availability.d.ts +150 -0
  276. package/dist/cli/npm/publish/registry-availability.d.ts.map +1 -0
  277. package/dist/cli/npm/publish/registry-availability.js +570 -0
  278. package/dist/cli/npm/publish/registry-availability.js.map +1 -0
  279. package/dist/cli/npm/publish/registry-credentials.d.ts +108 -0
  280. package/dist/cli/npm/publish/registry-credentials.d.ts.map +1 -0
  281. package/dist/cli/npm/publish/registry-credentials.js +290 -0
  282. package/dist/cli/npm/publish/registry-credentials.js.map +1 -0
  283. package/dist/cli/npm/publish/registry-reads.d.ts +42 -0
  284. package/dist/cli/npm/publish/registry-reads.d.ts.map +1 -0
  285. package/dist/cli/npm/publish/registry-reads.js +164 -0
  286. package/dist/cli/npm/publish/registry-reads.js.map +1 -0
  287. package/dist/cli/npm/publish/release-build.d.ts +46 -0
  288. package/dist/cli/npm/publish/release-build.d.ts.map +1 -0
  289. package/dist/cli/npm/publish/release-build.js +140 -0
  290. package/dist/cli/npm/publish/release-build.js.map +1 -0
  291. package/dist/cli/npm/publish/release-consumer-proof.d.ts +70 -0
  292. package/dist/cli/npm/publish/release-consumer-proof.d.ts.map +1 -0
  293. package/dist/cli/npm/publish/release-consumer-proof.js +397 -0
  294. package/dist/cli/npm/publish/release-consumer-proof.js.map +1 -0
  295. package/dist/cli/npm/publish/release-executor.d.ts +46 -0
  296. package/dist/cli/npm/publish/release-executor.d.ts.map +1 -0
  297. package/dist/cli/npm/publish/release-executor.js +181 -0
  298. package/dist/cli/npm/publish/release-executor.js.map +1 -0
  299. package/dist/cli/npm/publish/release-grants.client.impl.d.ts +10 -0
  300. package/dist/cli/npm/publish/release-grants.client.impl.d.ts.map +1 -0
  301. package/dist/cli/npm/publish/release-grants.client.impl.js +63 -0
  302. package/dist/cli/npm/publish/release-grants.client.impl.js.map +1 -0
  303. package/dist/cli/npm/publish/release-jobs.client.d.ts +39 -0
  304. package/dist/cli/npm/publish/release-jobs.client.d.ts.map +1 -0
  305. package/dist/cli/npm/publish/release-jobs.client.js +124 -0
  306. package/dist/cli/npm/publish/release-jobs.client.js.map +1 -0
  307. package/dist/cli/npm/publish/release-jobs.consumer.plugin.d.ts +20 -0
  308. package/dist/cli/npm/publish/release-jobs.consumer.plugin.d.ts.map +1 -0
  309. package/dist/cli/npm/publish/release-jobs.consumer.plugin.js +82 -0
  310. package/dist/cli/npm/publish/release-jobs.consumer.plugin.js.map +1 -0
  311. package/dist/cli/npm/publish/release-jobs.impl.d.ts +15 -0
  312. package/dist/cli/npm/publish/release-jobs.impl.d.ts.map +1 -0
  313. package/dist/cli/npm/publish/release-jobs.impl.js +42 -0
  314. package/dist/cli/npm/publish/release-jobs.impl.js.map +1 -0
  315. package/dist/cli/npm/publish/release-lock.d.ts +143 -0
  316. package/dist/cli/npm/publish/release-lock.d.ts.map +1 -0
  317. package/dist/cli/npm/publish/release-lock.js +371 -0
  318. package/dist/cli/npm/publish/release-lock.js.map +1 -0
  319. package/dist/cli/npm/publish/release-phases.d.ts +93 -0
  320. package/dist/cli/npm/publish/release-phases.d.ts.map +1 -0
  321. package/dist/cli/npm/publish/release-phases.js +175 -0
  322. package/dist/cli/npm/publish/release-phases.js.map +1 -0
  323. package/dist/cli/npm/publish/release-plan.d.ts +65 -0
  324. package/dist/cli/npm/publish/release-plan.d.ts.map +1 -0
  325. package/dist/cli/npm/publish/release-plan.js +178 -0
  326. package/dist/cli/npm/publish/release-plan.js.map +1 -0
  327. package/dist/cli/npm/publish/release-preflight.job.impl.d.ts +16 -0
  328. package/dist/cli/npm/publish/release-preflight.job.impl.d.ts.map +1 -0
  329. package/dist/cli/npm/publish/release-preflight.job.impl.js +71 -0
  330. package/dist/cli/npm/publish/release-preflight.job.impl.js.map +1 -0
  331. package/dist/cli/npm/publish/release-publish.job.impl.d.ts +18 -0
  332. package/dist/cli/npm/publish/release-publish.job.impl.d.ts.map +1 -0
  333. package/dist/cli/npm/publish/release-publish.job.impl.js +295 -0
  334. package/dist/cli/npm/publish/release-publish.job.impl.js.map +1 -0
  335. package/dist/cli/npm/publish/release-workspace.d.ts +95 -0
  336. package/dist/cli/npm/publish/release-workspace.d.ts.map +1 -0
  337. package/dist/cli/npm/publish/release-workspace.js +243 -0
  338. package/dist/cli/npm/publish/release-workspace.js.map +1 -0
  339. package/dist/cli/npm/publish/sensitive-temp.d.ts +90 -0
  340. package/dist/cli/npm/publish/sensitive-temp.d.ts.map +1 -0
  341. package/dist/cli/npm/publish/sensitive-temp.js +351 -0
  342. package/dist/cli/npm/publish/sensitive-temp.js.map +1 -0
  343. package/dist/cli/npm/publish/source-snapshot.d.ts +91 -0
  344. package/dist/cli/npm/publish/source-snapshot.d.ts.map +1 -0
  345. package/dist/cli/npm/publish/source-snapshot.js +245 -0
  346. package/dist/cli/npm/publish/source-snapshot.js.map +1 -0
  347. package/dist/cli/npm/publish/types.d.ts +69 -0
  348. package/dist/cli/npm/publish/types.d.ts.map +1 -0
  349. package/dist/cli/npm/publish/types.js +2 -0
  350. package/dist/cli/npm/publish/types.js.map +1 -0
  351. package/dist/cli/npm/publish/workspace-discovery.d.ts +48 -0
  352. package/dist/cli/npm/publish/workspace-discovery.d.ts.map +1 -0
  353. package/dist/cli/npm/publish/workspace-discovery.js +313 -0
  354. package/dist/cli/npm/publish/workspace-discovery.js.map +1 -0
  355. package/dist/cli/npm/put-attested-packument.d.ts +96 -0
  356. package/dist/cli/npm/put-attested-packument.d.ts.map +1 -0
  357. package/dist/cli/npm/put-attested-packument.js +240 -0
  358. package/dist/cli/npm/put-attested-packument.js.map +1 -0
  359. package/dist/cli/npm/reconcile-latest.d.ts +55 -0
  360. package/dist/cli/npm/reconcile-latest.d.ts.map +1 -0
  361. package/dist/cli/npm/reconcile-latest.js +59 -0
  362. package/dist/cli/npm/reconcile-latest.js.map +1 -0
  363. package/dist/cli/observability/blind-spots.d.ts +10 -0
  364. package/dist/cli/observability/blind-spots.d.ts.map +1 -0
  365. package/dist/cli/observability/blind-spots.js +19 -0
  366. package/dist/cli/observability/blind-spots.js.map +1 -0
  367. package/dist/cli/observability/infra-observability-exports-list.cli-command.impl.d.ts +6 -0
  368. package/dist/cli/observability/infra-observability-exports-list.cli-command.impl.d.ts.map +1 -0
  369. package/dist/cli/observability/infra-observability-exports-list.cli-command.impl.js +75 -0
  370. package/dist/cli/observability/infra-observability-exports-list.cli-command.impl.js.map +1 -0
  371. package/dist/cli/observability/infra-observability-set.cli-command.descriptor.d.ts +42 -21
  372. package/dist/cli/observability/infra-observability-set.cli-command.descriptor.d.ts.map +1 -1
  373. package/dist/cli/observability/infra-observability-set.cli-command.descriptor.js +3 -3
  374. package/dist/cli/observability/infra-observability-set.cli-command.descriptor.js.map +1 -1
  375. package/dist/cli/observability/infra-observability-set.cli-command.impl.d.ts +3 -2
  376. package/dist/cli/observability/infra-observability-set.cli-command.impl.d.ts.map +1 -1
  377. package/dist/cli/observability/infra-observability-set.cli-command.impl.js +14 -14
  378. package/dist/cli/observability/infra-observability-set.cli-command.impl.js.map +1 -1
  379. package/dist/cli/observability/infra-observability-status.cli-command.descriptor.d.ts +25 -17
  380. package/dist/cli/observability/infra-observability-status.cli-command.descriptor.d.ts.map +1 -1
  381. package/dist/cli/observability/infra-observability-status.cli-command.descriptor.js +1 -1
  382. package/dist/cli/observability/infra-observability-status.cli-command.descriptor.js.map +1 -1
  383. package/dist/cli/observability/infra-observability-status.cli-command.impl.d.ts +2 -1
  384. package/dist/cli/observability/infra-observability-status.cli-command.impl.d.ts.map +1 -1
  385. package/dist/cli/observability/infra-observability-status.cli-command.impl.js +30 -23
  386. package/dist/cli/observability/infra-observability-status.cli-command.impl.js.map +1 -1
  387. package/dist/cli/observability/infra-observability.cli-group.descriptor.d.ts +8 -8
  388. package/dist/cli/observability/infra-observability.cli-group.descriptor.js +1 -1
  389. package/dist/cli/observability/infra-observability.cli-group.descriptor.js.map +1 -1
  390. package/dist/cli/plugin.d.ts +3 -0
  391. package/dist/cli/plugin.d.ts.map +1 -0
  392. package/dist/cli/plugin.js +45 -0
  393. package/dist/cli/plugin.js.map +1 -0
  394. package/dist/cli/readiness/infra-deploy.readiness.cli-command.descriptor.d.ts +38 -0
  395. package/dist/cli/readiness/infra-deploy.readiness.cli-command.descriptor.d.ts.map +1 -0
  396. package/dist/cli/readiness/infra-deploy.readiness.cli-command.descriptor.js +43 -0
  397. package/dist/cli/readiness/infra-deploy.readiness.cli-command.descriptor.js.map +1 -0
  398. package/dist/cli/readiness/infra-deploy.readiness.cli-command.impl.d.ts +117 -0
  399. package/dist/cli/readiness/infra-deploy.readiness.cli-command.impl.d.ts.map +1 -0
  400. package/dist/cli/readiness/infra-deploy.readiness.cli-command.impl.js +678 -0
  401. package/dist/cli/readiness/infra-deploy.readiness.cli-command.impl.js.map +1 -0
  402. package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.descriptor.d.ts +37 -23
  403. package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.descriptor.d.ts.map +1 -1
  404. package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.descriptor.js +7 -1
  405. package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.descriptor.js.map +1 -1
  406. package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.impl.d.ts +2 -1
  407. package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.impl.d.ts.map +1 -1
  408. package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.impl.js +100 -25
  409. package/dist/cli/regenerate/infra-deploy.regenerate.cli-command.impl.js.map +1 -1
  410. package/dist/cli/release/cli/latest-manifest.d.ts +148 -0
  411. package/dist/cli/release/cli/latest-manifest.d.ts.map +1 -0
  412. package/dist/cli/release/cli/latest-manifest.js +152 -0
  413. package/dist/cli/release/cli/latest-manifest.js.map +1 -0
  414. package/dist/cli/rollback/infra-deploy.rollback.cli-command.descriptor.d.ts +41 -0
  415. package/dist/cli/rollback/infra-deploy.rollback.cli-command.descriptor.d.ts.map +1 -0
  416. package/dist/cli/rollback/infra-deploy.rollback.cli-command.descriptor.js +49 -0
  417. package/dist/cli/rollback/infra-deploy.rollback.cli-command.descriptor.js.map +1 -0
  418. package/dist/cli/rollback/infra-deploy.rollback.cli-command.impl.d.ts +16 -0
  419. package/dist/cli/rollback/infra-deploy.rollback.cli-command.impl.d.ts.map +1 -0
  420. package/dist/cli/rollback/infra-deploy.rollback.cli-command.impl.js +52 -0
  421. package/dist/cli/rollback/infra-deploy.rollback.cli-command.impl.js.map +1 -0
  422. package/dist/cli/rum/infra-rum-status.cli-command.descriptor.d.ts +19 -17
  423. package/dist/cli/rum/infra-rum-status.cli-command.descriptor.d.ts.map +1 -1
  424. package/dist/cli/rum/infra-rum-status.cli-command.descriptor.js +1 -1
  425. package/dist/cli/rum/infra-rum-status.cli-command.descriptor.js.map +1 -1
  426. package/dist/cli/rum/infra-rum-status.cli-command.impl.d.ts +2 -1
  427. package/dist/cli/rum/infra-rum-status.cli-command.impl.d.ts.map +1 -1
  428. package/dist/cli/rum/infra-rum-status.cli-command.impl.js +21 -15
  429. package/dist/cli/rum/infra-rum-status.cli-command.impl.js.map +1 -1
  430. package/dist/cli/rum/infra-rum.cli-group.descriptor.d.ts +8 -8
  431. package/dist/cli/rum/infra-rum.cli-group.descriptor.js +1 -1
  432. package/dist/cli/rum/infra-rum.cli-group.descriptor.js.map +1 -1
  433. package/dist/cli/run/deploy-smoke.d.ts +57 -0
  434. package/dist/cli/run/deploy-smoke.d.ts.map +1 -0
  435. package/dist/cli/run/deploy-smoke.js +251 -0
  436. package/dist/cli/run/deploy-smoke.js.map +1 -0
  437. package/dist/cli/run/deployment-marker.d.ts +74 -0
  438. package/dist/cli/run/deployment-marker.d.ts.map +1 -0
  439. package/dist/cli/run/deployment-marker.js +237 -0
  440. package/dist/cli/run/deployment-marker.js.map +1 -0
  441. package/dist/cli/run/deployment-provider.d.ts +56 -0
  442. package/dist/cli/run/deployment-provider.d.ts.map +1 -0
  443. package/dist/cli/run/deployment-provider.js +295 -0
  444. package/dist/cli/run/deployment-provider.js.map +1 -0
  445. package/dist/cli/run/deployment-run-ledger.d.ts +72 -0
  446. package/dist/cli/run/deployment-run-ledger.d.ts.map +1 -0
  447. package/dist/cli/run/deployment-run-ledger.js +164 -0
  448. package/dist/cli/run/deployment-run-ledger.js.map +1 -0
  449. package/dist/cli/run/git-source-identity.d.ts +21 -0
  450. package/dist/cli/run/git-source-identity.d.ts.map +1 -0
  451. package/dist/cli/run/git-source-identity.js +73 -0
  452. package/dist/cli/run/git-source-identity.js.map +1 -0
  453. package/dist/cli/run/immutable-deployment-release.program.d.ts +403 -0
  454. package/dist/cli/run/immutable-deployment-release.program.d.ts.map +1 -0
  455. package/dist/cli/run/immutable-deployment-release.program.js +589 -0
  456. package/dist/cli/run/immutable-deployment-release.program.js.map +1 -0
  457. package/dist/cli/run/immutable-deployment-workspace.d.ts +39 -0
  458. package/dist/cli/run/immutable-deployment-workspace.d.ts.map +1 -0
  459. package/dist/cli/run/immutable-deployment-workspace.js +525 -0
  460. package/dist/cli/run/immutable-deployment-workspace.js.map +1 -0
  461. package/dist/cli/run/infra-deploy.run.cli-command.descriptor.d.ts +80 -23
  462. package/dist/cli/run/infra-deploy.run.cli-command.descriptor.d.ts.map +1 -1
  463. package/dist/cli/run/infra-deploy.run.cli-command.descriptor.js +50 -8
  464. package/dist/cli/run/infra-deploy.run.cli-command.descriptor.js.map +1 -1
  465. package/dist/cli/run/infra-deploy.run.cli-command.impl.d.ts +46 -1
  466. package/dist/cli/run/infra-deploy.run.cli-command.impl.d.ts.map +1 -1
  467. package/dist/cli/run/infra-deploy.run.cli-command.impl.js +464 -226
  468. package/dist/cli/run/infra-deploy.run.cli-command.impl.js.map +1 -1
  469. package/dist/cli/shared/build-workspace-artifacts.d.ts +147 -0
  470. package/dist/cli/shared/build-workspace-artifacts.d.ts.map +1 -0
  471. package/dist/cli/shared/build-workspace-artifacts.js +2013 -0
  472. package/dist/cli/shared/build-workspace-artifacts.js.map +1 -0
  473. package/dist/cli/shared/credential-source.d.ts +3 -0
  474. package/dist/cli/shared/credential-source.d.ts.map +1 -0
  475. package/dist/cli/shared/credential-source.js +19 -0
  476. package/dist/cli/shared/credential-source.js.map +1 -0
  477. package/dist/cli/shared/discover-deployments.d.ts +46 -5
  478. package/dist/cli/shared/discover-deployments.d.ts.map +1 -1
  479. package/dist/cli/shared/discover-deployments.js +167 -41
  480. package/dist/cli/shared/discover-deployments.js.map +1 -1
  481. package/dist/cli/shared/infer-apex-zone.d.ts +18 -0
  482. package/dist/cli/shared/infer-apex-zone.d.ts.map +1 -0
  483. package/dist/cli/shared/infer-apex-zone.js +75 -0
  484. package/dist/cli/shared/infer-apex-zone.js.map +1 -0
  485. package/dist/cli/shared/option-strings.d.ts +2 -0
  486. package/dist/cli/shared/option-strings.d.ts.map +1 -0
  487. package/dist/cli/shared/option-strings.js +13 -0
  488. package/dist/cli/shared/option-strings.js.map +1 -0
  489. package/dist/cli/shared/repository-collection.d.ts +42 -0
  490. package/dist/cli/shared/repository-collection.d.ts.map +1 -0
  491. package/dist/cli/shared/repository-collection.js +111 -0
  492. package/dist/cli/shared/repository-collection.js.map +1 -0
  493. package/dist/cli/shared/runtime-execution.d.ts +78 -0
  494. package/dist/cli/shared/runtime-execution.d.ts.map +1 -0
  495. package/dist/cli/shared/runtime-execution.js +182 -0
  496. package/dist/cli/shared/runtime-execution.js.map +1 -0
  497. package/dist/cli/shared/workspace-artifact-lock.d.ts +17 -0
  498. package/dist/cli/shared/workspace-artifact-lock.d.ts.map +1 -0
  499. package/dist/cli/shared/workspace-artifact-lock.js +37 -0
  500. package/dist/cli/shared/workspace-artifact-lock.js.map +1 -0
  501. package/dist/cli/workers/doks-worker-runtime.d.ts +238 -0
  502. package/dist/cli/workers/doks-worker-runtime.d.ts.map +1 -0
  503. package/dist/cli/workers/doks-worker-runtime.js +410 -0
  504. package/dist/cli/workers/doks-worker-runtime.js.map +1 -0
  505. package/dist/cli/workers/infra-workers-apply.cli-command.descriptor.d.ts +28 -0
  506. package/dist/cli/workers/infra-workers-apply.cli-command.descriptor.d.ts.map +1 -0
  507. package/dist/cli/workers/infra-workers-apply.cli-command.descriptor.js +28 -0
  508. package/dist/cli/workers/infra-workers-apply.cli-command.descriptor.js.map +1 -0
  509. package/dist/cli/workers/infra-workers-apply.cli-command.impl.d.ts +6 -0
  510. package/dist/cli/workers/infra-workers-apply.cli-command.impl.d.ts.map +1 -0
  511. package/dist/cli/workers/infra-workers-apply.cli-command.impl.js +75 -0
  512. package/dist/cli/workers/infra-workers-apply.cli-command.impl.js.map +1 -0
  513. package/dist/cli/workers/infra-workers-build.cli-command.descriptor.d.ts +31 -0
  514. package/dist/cli/workers/infra-workers-build.cli-command.descriptor.d.ts.map +1 -0
  515. package/dist/cli/workers/infra-workers-build.cli-command.descriptor.js +32 -0
  516. package/dist/cli/workers/infra-workers-build.cli-command.descriptor.js.map +1 -0
  517. package/dist/cli/workers/infra-workers-build.cli-command.impl.d.ts +6 -0
  518. package/dist/cli/workers/infra-workers-build.cli-command.impl.d.ts.map +1 -0
  519. package/dist/cli/workers/infra-workers-build.cli-command.impl.js +67 -0
  520. package/dist/cli/workers/infra-workers-build.cli-command.impl.js.map +1 -0
  521. package/dist/cli/workers/infra-workers-logs.cli-command.descriptor.d.ts +48 -0
  522. package/dist/cli/workers/infra-workers-logs.cli-command.descriptor.d.ts.map +1 -0
  523. package/dist/cli/workers/infra-workers-logs.cli-command.descriptor.js +60 -0
  524. package/dist/cli/workers/infra-workers-logs.cli-command.descriptor.js.map +1 -0
  525. package/dist/cli/workers/infra-workers-logs.cli-command.impl.d.ts +6 -0
  526. package/dist/cli/workers/infra-workers-logs.cli-command.impl.d.ts.map +1 -0
  527. package/dist/cli/workers/infra-workers-logs.cli-command.impl.js +74 -0
  528. package/dist/cli/workers/infra-workers-logs.cli-command.impl.js.map +1 -0
  529. package/dist/cli/workers/infra-workers.cli-group.descriptor.d.ts +12 -0
  530. package/dist/cli/workers/infra-workers.cli-group.descriptor.d.ts.map +1 -0
  531. package/dist/cli/workers/infra-workers.cli-group.descriptor.js +12 -0
  532. package/dist/cli/workers/infra-workers.cli-group.descriptor.js.map +1 -0
  533. package/dist/config-loader.d.ts +60 -13
  534. package/dist/config-loader.d.ts.map +1 -1
  535. package/dist/config-loader.js +371 -104
  536. package/dist/config-loader.js.map +1 -1
  537. package/dist/declared-provider.d.ts +27 -0
  538. package/dist/declared-provider.d.ts.map +1 -0
  539. package/dist/declared-provider.js +46 -0
  540. package/dist/declared-provider.js.map +1 -0
  541. package/dist/deployment-collisions.d.ts +55 -0
  542. package/dist/deployment-collisions.d.ts.map +1 -0
  543. package/dist/deployment-collisions.js +70 -0
  544. package/dist/deployment-collisions.js.map +1 -0
  545. package/dist/deployment-environment.d.ts +57 -0
  546. package/dist/deployment-environment.d.ts.map +1 -0
  547. package/dist/deployment-environment.js +198 -0
  548. package/dist/deployment-environment.js.map +1 -0
  549. package/dist/deployment-settings.d.ts +27 -0
  550. package/dist/deployment-settings.d.ts.map +1 -0
  551. package/dist/deployment-settings.js +52 -0
  552. package/dist/deployment-settings.js.map +1 -0
  553. package/dist/deployment.config.descriptor.d.ts +59 -0
  554. package/dist/deployment.config.descriptor.d.ts.map +1 -0
  555. package/dist/deployment.config.descriptor.js +54 -0
  556. package/dist/deployment.config.descriptor.js.map +1 -0
  557. package/dist/descriptors/observability/infra-observability-exports-list.cli-command.descriptor.d.ts +29 -0
  558. package/dist/descriptors/observability/infra-observability-exports-list.cli-command.descriptor.d.ts.map +1 -0
  559. package/dist/descriptors/observability/infra-observability-exports-list.cli-command.descriptor.js +35 -0
  560. package/dist/descriptors/observability/infra-observability-exports-list.cli-command.descriptor.js.map +1 -0
  561. package/dist/descriptors/observability/infra-observability-exports.cli-group.descriptor.d.ts +12 -0
  562. package/dist/descriptors/observability/infra-observability-exports.cli-group.descriptor.d.ts.map +1 -0
  563. package/dist/descriptors/observability/infra-observability-exports.cli-group.descriptor.js +12 -0
  564. package/dist/descriptors/observability/infra-observability-exports.cli-group.descriptor.js.map +1 -0
  565. package/dist/index.d.ts +11 -3
  566. package/dist/index.d.ts.map +1 -1
  567. package/dist/index.js +11 -3
  568. package/dist/index.js.map +1 -1
  569. package/dist/infra-deploy.plugin.d.ts +2 -2
  570. package/dist/infra-deploy.plugin.d.ts.map +1 -1
  571. package/dist/infra-deploy.plugin.js +63 -20
  572. package/dist/infra-deploy.plugin.js.map +1 -1
  573. package/dist/logger.d.ts +10 -0
  574. package/dist/logger.d.ts.map +1 -0
  575. package/dist/logger.js +11 -0
  576. package/dist/logger.js.map +1 -0
  577. package/dist/migrations/migrate-workspace.d.ts +21 -0
  578. package/dist/migrations/migrate-workspace.d.ts.map +1 -0
  579. package/dist/migrations/migrate-workspace.js +83 -0
  580. package/dist/migrations/migrate-workspace.js.map +1 -0
  581. package/dist/migrations/run-migrate.d.ts +15 -0
  582. package/dist/migrations/run-migrate.d.ts.map +1 -0
  583. package/dist/migrations/run-migrate.js +314 -0
  584. package/dist/migrations/run-migrate.js.map +1 -0
  585. package/dist/regenerate.d.ts +52 -30
  586. package/dist/regenerate.d.ts.map +1 -1
  587. package/dist/regenerate.js +176 -148
  588. package/dist/regenerate.js.map +1 -1
  589. package/dist/runtime-execution.d.ts +5 -0
  590. package/dist/runtime-execution.d.ts.map +1 -0
  591. package/dist/runtime-execution.js +12 -0
  592. package/dist/runtime-execution.js.map +1 -0
  593. package/dist/schemas/migrate.d.ts +110 -0
  594. package/dist/schemas/migrate.d.ts.map +1 -0
  595. package/dist/schemas/migrate.js +55 -0
  596. package/dist/schemas/migrate.js.map +1 -0
  597. package/dist/schemas/proof-registry.d.ts +25 -0
  598. package/dist/schemas/proof-registry.d.ts.map +1 -0
  599. package/dist/schemas/proof-registry.js +24 -0
  600. package/dist/schemas/proof-registry.js.map +1 -0
  601. package/dist/schemas/release-grants.d.ts +7 -0
  602. package/dist/schemas/release-grants.d.ts.map +1 -0
  603. package/dist/schemas/release-grants.js +6 -0
  604. package/dist/schemas/release-grants.js.map +1 -0
  605. package/dist/schemas/release-jobs.d.ts +444 -0
  606. package/dist/schemas/release-jobs.d.ts.map +1 -0
  607. package/dist/schemas/release-jobs.js +204 -0
  608. package/dist/schemas/release-jobs.js.map +1 -0
  609. package/dist/schemas/service-release.d.ts +15 -0
  610. package/dist/schemas/service-release.d.ts.map +1 -0
  611. package/dist/schemas/service-release.js +13 -0
  612. package/dist/schemas/service-release.js.map +1 -0
  613. package/dist/schemas/worker-logs.d.ts +42 -0
  614. package/dist/schemas/worker-logs.d.ts.map +1 -0
  615. package/dist/schemas/worker-logs.js +29 -0
  616. package/dist/schemas/worker-logs.js.map +1 -0
  617. package/dist/storage/deployment-runs.schema.d.ts +199 -0
  618. package/dist/storage/deployment-runs.schema.d.ts.map +1 -0
  619. package/dist/storage/deployment-runs.schema.js +61 -0
  620. package/dist/storage/deployment-runs.schema.js.map +1 -0
  621. package/dist/storage/deployment-runs.storage.descriptor.d.ts +4 -0
  622. package/dist/storage/deployment-runs.storage.descriptor.d.ts.map +1 -0
  623. package/dist/storage/deployment-runs.storage.descriptor.js +36 -0
  624. package/dist/storage/deployment-runs.storage.descriptor.js.map +1 -0
  625. package/package.json +110 -42
  626. package/SPEC.md +0 -181
  627. package/src/cli/alerts/infra-alerts-create.cli-command.descriptor.ts +0 -61
  628. package/src/cli/alerts/infra-alerts-create.cli-command.impl.ts +0 -131
  629. package/src/cli/alerts/infra-alerts-delete.cli-command.descriptor.ts +0 -36
  630. package/src/cli/alerts/infra-alerts-delete.cli-command.impl.ts +0 -75
  631. package/src/cli/alerts/infra-alerts-list.cli-command.descriptor.ts +0 -27
  632. package/src/cli/alerts/infra-alerts-list.cli-command.impl.ts +0 -88
  633. package/src/cli/alerts/infra-alerts.cli-group.descriptor.ts +0 -12
  634. package/src/cli/audit/infra-audit.cli-command.descriptor.ts +0 -28
  635. package/src/cli/audit/infra-audit.cli-command.impl.ts +0 -293
  636. package/src/cli/infra-deploy.cli-group.descriptor.ts +0 -12
  637. package/src/cli/infra.cli-group.descriptor.ts +0 -11
  638. package/src/cli/list/infra-deploy.list.cli-command.descriptor.ts +0 -29
  639. package/src/cli/list/infra-deploy.list.cli-command.impl.ts +0 -125
  640. package/src/cli/logs/infra-logs.cli-command.descriptor.ts +0 -65
  641. package/src/cli/logs/infra-logs.cli-command.impl.ts +0 -354
  642. package/src/cli/logs/stream-worker-tail.ts +0 -202
  643. package/src/cli/npm/infra-npm-publish.cli-command.descriptor.ts +0 -75
  644. package/src/cli/npm/infra-npm-publish.cli-command.impl.ts +0 -474
  645. package/src/cli/npm/infra-npm.cli-group.descriptor.ts +0 -12
  646. package/src/cli/observability/infra-observability-set.cli-command.descriptor.ts +0 -57
  647. package/src/cli/observability/infra-observability-set.cli-command.impl.ts +0 -173
  648. package/src/cli/observability/infra-observability-status.cli-command.descriptor.ts +0 -35
  649. package/src/cli/observability/infra-observability-status.cli-command.impl.ts +0 -124
  650. package/src/cli/observability/infra-observability.cli-group.descriptor.ts +0 -12
  651. package/src/cli/regenerate/infra-deploy.regenerate.cli-command.descriptor.ts +0 -36
  652. package/src/cli/regenerate/infra-deploy.regenerate.cli-command.impl.ts +0 -103
  653. package/src/cli/rum/infra-rum-status.cli-command.descriptor.ts +0 -27
  654. package/src/cli/rum/infra-rum-status.cli-command.impl.ts +0 -112
  655. package/src/cli/rum/infra-rum.cli-group.descriptor.ts +0 -12
  656. package/src/cli/run/infra-deploy.run.cli-command.descriptor.ts +0 -49
  657. package/src/cli/run/infra-deploy.run.cli-command.impl.ts +0 -330
  658. package/src/cli/shared/discover-deployments.ts +0 -127
  659. package/src/config-loader.ts +0 -179
  660. package/src/index.ts +0 -11
  661. package/src/infra-deploy.plugin.ts +0 -83
  662. package/src/regenerate.ts +0 -230
@@ -0,0 +1,74 @@
1
+ /**
2
+ * The local proof registry the installed release proof installs from: sealed
3
+ * artifacts served verbatim, optional upstream proxying, and source npmrc files.
4
+ */
5
+ import type { ChildEnvRuntime } from "../../shared/runtime-execution.ts";
6
+ import type { RuntimeExecution } from "@vibesdotdev/kernel/execution";
7
+ import type { PackageJson, RegistryReleasePublishTarget } from "./types.ts";
8
+ /** Node resolution of `name` from `fromDir`, bounded by `workspaceRoot`. */
9
+ export declare function resolveInstalledPackageDirectory(options: {
10
+ runtime: ChildEnvRuntime;
11
+ workspaceRoot: string;
12
+ fromDir: string;
13
+ name: string;
14
+ }): Promise<string | null>;
15
+ /**
16
+ * Where the proof fetches external packages from: a default registry, scoped
17
+ * registries, and each origin's read token and renewer.
18
+ */
19
+ export type ReleaseConsumerSourceRegistry = {
20
+ defaultRegistry: string;
21
+ scopedRegistries?: Readonly<Record<string, string>>;
22
+ tokensByRegistry?: Readonly<Record<string, string | undefined>>;
23
+ renewSessionTokensByRegistry?: Readonly<Record<string, () => Promise<string | null | undefined>>>;
24
+ };
25
+ /**
26
+ * The source registries of a release's targets; one registry per scope and at
27
+ * most one authenticated origin per run.
28
+ */
29
+ export declare function buildReleaseConsumerSourceRegistry(options: {
30
+ targets: readonly RegistryReleasePublishTarget[];
31
+ readToken?: string;
32
+ renewReadToken?: () => Promise<string | null | undefined>;
33
+ }): ReleaseConsumerSourceRegistry;
34
+ /** The source registry a package is fetched from. */
35
+ export declare function registryForProofPackage(name: string, source: ReleaseConsumerSourceRegistry): string;
36
+ /** The npmrc that reads every source registry with its token. */
37
+ export declare function releaseConsumerSourceNpmrc(source: ReleaseConsumerSourceRegistry): string;
38
+ /** Atomically write the source-registry npmrc (mode 0600). */
39
+ export declare function writeReleaseConsumerSourceNpmrc(npmrcPath: string, source: ReleaseConsumerSourceRegistry,
40
+ /** The runtime whose logger reports a scratch file a failed write could not scrub. */
41
+ runtime: ChildEnvRuntime): Promise<void>;
42
+ /**
43
+ * Serve sealed artifacts verbatim from a local registry for the proof install,
44
+ * optionally proxying misses upstream and withholding named packages.
45
+ */
46
+ export declare function startProofLocalRegistry(runtime: ChildEnvRuntime, artifacts: readonly {
47
+ manifest: PackageJson & {
48
+ name: string;
49
+ version: string;
50
+ };
51
+ tarball: string;
52
+ }[], options?: {
53
+ /**
54
+ * When set, packument misses proxy to this upstream registry so consumer
55
+ * install can resolve unsealed public transitive dependencies. Sealed
56
+ * artifacts always win. Omit for withhold proofs that must fail closed.
57
+ */
58
+ upstreamRegistry?: string;
59
+ /**
60
+ * Packages the proof must fail without. Their packuments and tarballs are
61
+ * never proxied upstream, so an install that needs one fails on it rather
62
+ * than on an unsealed public transitive.
63
+ */
64
+ withhold?: ReadonlySet<string>;
65
+ }): Promise<{
66
+ origin: string;
67
+ close(): Promise<void>;
68
+ }>;
69
+ /** The package.json inside a proof artifact tarball. */
70
+ export declare function readProofArtifactManifest(execution: RuntimeExecution, runtime: ChildEnvRuntime, tarball: string): Promise<PackageJson & {
71
+ name: string;
72
+ version: string;
73
+ }>;
74
+ //# sourceMappingURL=proof-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proof-registry.d.ts","sourceRoot":"","sources":["../../../../src/cli/npm/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,iEAAiE;AACjE,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,6BAA6B,GACpC,MAAM,CAwBR;AAED,8DAA8D;AAC9D,wBAAsB,+BAA+B,CACnD,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,6BAA6B;AACrC,sFAAsF;AACtF,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,IAAI,CAAC,CAMf;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,eAAe,EACxB,SAAS,EAAE,SAAS;IAClB,QAAQ,EAAE,WAAW,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1D,OAAO,EAAE,MAAM,CAAC;CACjB,EAAE,EACH,OAAO,GAAE;IACP;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC3B,GACL,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,CAuMrD;AAED,wDAAwD;AACxD,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAwD1D"}
@@ -0,0 +1,335 @@
1
+ import { hashBase64, hashHex } from "@vibesdotdev/crypto";
2
+ import { resolveFileSystemAdapter } from "@vibesdotdev/filesystem";
3
+ import { getRuntimePath } from "@vibesdotdev/paths";
4
+ import { getRuntimeHttpListener, valueFreeFailure, settle, CapabilityError } from "@vibesdotdev/kernel";
5
+ import { proofRegistryPackumentSchema } from "../../../schemas/proof-registry.js";
6
+ import { z } from "zod/v4";
7
+ import { rcompare, satisfies, valid } from "semver";
8
+ import { runRuntimeCommand } from "../../shared/runtime-execution.js";
9
+ import { pathExists } from "./fs-paths.js";
10
+ import { authConfigLine } from "./npm-exec.js";
11
+ import { normalizeRegistryUrl, PUBLIC_NPM_REGISTRY, } from "./registry-credentials.js";
12
+ import { writeSensitiveNpmrcAtomically } from "./sensitive-temp.js";
13
+ import { parsePublisherManifest } from "./publisher-manifest.js";
14
+ /** Node resolution of `name` from `fromDir`, bounded by `workspaceRoot`. */
15
+ export async function resolveInstalledPackageDirectory(options) {
16
+ const paths = await getRuntimePath(options.runtime);
17
+ let cursor = options.fromDir;
18
+ while (true) {
19
+ const position = paths.relative(options.workspaceRoot, cursor);
20
+ if (position.startsWith("../") || position.startsWith("..\\") || paths.isAbsolute(position)) {
21
+ return null;
22
+ }
23
+ const candidate = paths.join(cursor, "node_modules", ...options.name.split("/"));
24
+ if (await pathExists(options.runtime, paths.join(candidate, "package.json"), { binding: false })) {
25
+ return candidate;
26
+ }
27
+ if (cursor === options.workspaceRoot)
28
+ return null;
29
+ const parent = paths.dirname(cursor);
30
+ if (parent === cursor)
31
+ return null;
32
+ cursor = parent;
33
+ }
34
+ }
35
+ function packageScope(name) {
36
+ if (!name.startsWith("@"))
37
+ return undefined;
38
+ const slash = name.indexOf("/");
39
+ return slash > 1 ? name.slice(0, slash) : undefined;
40
+ }
41
+ /**
42
+ * The source registries of a release's targets; one registry per scope and at
43
+ * most one authenticated origin per run.
44
+ */
45
+ export function buildReleaseConsumerSourceRegistry(options) {
46
+ const scopedRegistries = {};
47
+ const registries = new Set();
48
+ for (const target of options.targets) {
49
+ const registry = normalizeRegistryUrl(target.registry);
50
+ registries.add(registry);
51
+ const scope = packageScope(target.name);
52
+ if (!scope)
53
+ continue;
54
+ const prior = scopedRegistries[scope];
55
+ if (prior && prior !== registry) {
56
+ throw new Error(`Release consumer proof scope ${scope} maps to multiple registries: ${prior}, ${registry}`);
57
+ }
58
+ scopedRegistries[scope] = registry;
59
+ }
60
+ const uniqueRegistries = [...registries];
61
+ if ((options.readToken || options.renewReadToken) &&
62
+ uniqueRegistries.length !== 1) {
63
+ throw new Error("External proof authentication requires one registry per run; one token is never shared across origins");
64
+ }
65
+ if (options.renewReadToken && !options.readToken) {
66
+ throw new Error("External proof session renewal requires an initial Registry read credential");
67
+ }
68
+ const source = {
69
+ defaultRegistry: PUBLIC_NPM_REGISTRY,
70
+ scopedRegistries,
71
+ tokensByRegistry: options.readToken
72
+ ? { [uniqueRegistries[0]]: options.readToken }
73
+ : undefined,
74
+ };
75
+ if (options.renewReadToken) {
76
+ source.renewSessionTokensByRegistry = {
77
+ [uniqueRegistries[0]]: options.renewReadToken,
78
+ };
79
+ }
80
+ return source;
81
+ }
82
+ /** The source registry a package is fetched from. */
83
+ export function registryForProofPackage(name, source) {
84
+ const scope = packageScope(name);
85
+ return normalizeRegistryUrl((scope ? source.scopedRegistries?.[scope] : undefined) ??
86
+ source.defaultRegistry);
87
+ }
88
+ /** The npmrc that reads every source registry with its token. */
89
+ export function releaseConsumerSourceNpmrc(source) {
90
+ const defaultRegistry = normalizeRegistryUrl(source.defaultRegistry);
91
+ const scoped = Object.entries(source.scopedRegistries ?? {})
92
+ .map(([scope, registry]) => [
93
+ scope.startsWith("@") ? scope : `@${scope}`,
94
+ normalizeRegistryUrl(registry),
95
+ ])
96
+ .sort(([left], [right]) => left.localeCompare(right));
97
+ const registries = new Set([
98
+ defaultRegistry,
99
+ ...scoped.map(([, registry]) => registry),
100
+ ]);
101
+ const lines = [
102
+ `registry=${defaultRegistry}`,
103
+ ...scoped.map(([scope, registry]) => `${scope}:registry=${registry}`),
104
+ ...[...registries].sort().flatMap((registry) => {
105
+ const token = source.tokensByRegistry?.[registry];
106
+ return token ? [`${authConfigLine(registry)}=${token}`] : [];
107
+ }),
108
+ ];
109
+ return `${lines.join("\n")}\n`;
110
+ }
111
+ /** Atomically write the source-registry npmrc (mode 0600). */
112
+ export async function writeReleaseConsumerSourceNpmrc(npmrcPath, source,
113
+ /** The runtime whose logger reports a scratch file a failed write could not scrub. */
114
+ runtime) {
115
+ await writeSensitiveNpmrcAtomically(npmrcPath, releaseConsumerSourceNpmrc(source), runtime);
116
+ }
117
+ /**
118
+ * Serve sealed artifacts verbatim from a local registry for the proof install,
119
+ * optionally proxying misses upstream and withholding named packages.
120
+ */
121
+ export async function startProofLocalRegistry(runtime, artifacts, options = {}) {
122
+ const byPackage = new Map();
123
+ for (const artifact of artifacts) {
124
+ const files = await resolveFileSystemAdapter(runtime, { binding: false });
125
+ const bytes = z.instanceof(Uint8Array).parse(await files.readFile(artifact.tarball));
126
+ const versions = byPackage.get(artifact.manifest.name) ?? new Map();
127
+ const identity = {
128
+ manifest: artifact.manifest,
129
+ tarball: artifact.tarball,
130
+ integrity: `sha512-${await hashBase64(runtime, "sha512", bytes)}`,
131
+ shasum: await hashHex(runtime, "sha1", bytes),
132
+ };
133
+ const existing = versions.get(artifact.manifest.version);
134
+ if (existing && existing.integrity !== identity.integrity) {
135
+ throw new Error(`Proof-local Registry found conflicting bytes for ${artifact.manifest.name}@${artifact.manifest.version}`);
136
+ }
137
+ versions.set(artifact.manifest.version, identity);
138
+ byPackage.set(artifact.manifest.name, versions);
139
+ }
140
+ let origin = "";
141
+ const listener = await getRuntimeHttpListener(runtime);
142
+ const binding = await listener.listen({
143
+ hostname: "127.0.0.1",
144
+ port: 0,
145
+ fetch: async (request) => {
146
+ const response = await settle(async () => {
147
+ const pathname = decodeURIComponent(new URL(request.url).pathname.slice(1));
148
+ if (pathname.startsWith("__tarball/")) {
149
+ const [encodedName, version] = pathname
150
+ .slice("__tarball/".length)
151
+ .split("/");
152
+ const name = Buffer.from(encodedName ?? "", "base64url").toString("utf8");
153
+ const artifact = version
154
+ ? byPackage.get(name)?.get(version)
155
+ : undefined;
156
+ if (!artifact) {
157
+ return new Response("missing sealed artifact", { status: 404 });
158
+ }
159
+ return new Response(z.instanceof(Uint8Array).parse(await (await resolveFileSystemAdapter(runtime, { binding: false })).readFile(artifact.tarball)), {
160
+ status: 200,
161
+ headers: { "content-type": "application/octet-stream" },
162
+ });
163
+ }
164
+ const withheldName = [...(options.withhold ?? [])].find((name) => pathname === name || pathname.startsWith(`${name}/-/`));
165
+ if (withheldName) {
166
+ return new Response(JSON.stringify({
167
+ error: `package withheld from proof registry: ${withheldName}`,
168
+ }), { status: 404, headers: { "content-type": "application/json" } });
169
+ }
170
+ const versions = byPackage.get(pathname);
171
+ // Merge public versions without allowing a sealed caret range to select
172
+ // newer upstream bytes. Exact older pins and incompatible majors stay usable.
173
+ const upstream = options.upstreamRegistry
174
+ ? normalizeRegistryUrl(options.upstreamRegistry)
175
+ : undefined;
176
+ let upstreamPackument;
177
+ // Proxy whatever upstream returns byte-for-byte on the miss path: npm
178
+ // rewrites verified npmjs tarball hosts to the configured registry, so a
179
+ // miss is often a tarball request, not a packument. Only JSON parses are
180
+ // considered for the sealed merge below.
181
+ let upstreamBody;
182
+ if (upstream) {
183
+ const upstreamUrl = `${upstream.replace(/\/$/, "")}/${pathname}`;
184
+ const fetched = await settle(async () => {
185
+ const response = await fetch(upstreamUrl, {
186
+ headers: { accept: "application/json" },
187
+ redirect: "follow",
188
+ });
189
+ // Do not read error payloads; their status is the useful evidence.
190
+ const body = response.ok
191
+ ? new Uint8Array(await response.arrayBuffer())
192
+ : undefined;
193
+ if (!response.ok)
194
+ await response.body?.cancel();
195
+ return { response, body };
196
+ });
197
+ if (!fetched.ok) {
198
+ return Response.json({
199
+ error: "proof registry upstream transport failed",
200
+ reason: "proof-upstream-transport-failed",
201
+ cause: valueFreeFailure(fetched.cause),
202
+ }, { status: 502 });
203
+ }
204
+ const { response: upstreamResponse, body } = fetched.value;
205
+ if (upstreamResponse.status !== 404) {
206
+ if (!upstreamResponse.ok || body === undefined) {
207
+ return Response.json({
208
+ error: "proof registry upstream request failed",
209
+ reason: "proof-upstream-http-failed",
210
+ upstreamStatus: upstreamResponse.status,
211
+ }, { status: 502 });
212
+ }
213
+ const contentType = upstreamResponse.headers.get("content-type") ?? "application/octet-stream";
214
+ upstreamBody = { status: upstreamResponse.status, contentType, body };
215
+ // Tarballs are opaque. Package documents cross the metadata boundary.
216
+ if (!pathname.includes("/-/")) {
217
+ const parsed = await settle(() => proofRegistryPackumentSchema.parse(JSON.parse(new TextDecoder().decode(body))));
218
+ if (!parsed.ok) {
219
+ return Response.json({
220
+ error: "proof registry upstream metadata is unreadable",
221
+ reason: "proof-upstream-metadata-invalid",
222
+ cause: valueFreeFailure(parsed.cause),
223
+ }, { status: 502 });
224
+ }
225
+ upstreamPackument = parsed.value;
226
+ if (upstreamPackument.name !== pathname) {
227
+ return Response.json({
228
+ error: "proof registry upstream metadata identity mismatch",
229
+ reason: "proof-upstream-identity-invalid",
230
+ }, { status: 502 });
231
+ }
232
+ }
233
+ }
234
+ }
235
+ if (!versions) {
236
+ if (upstreamBody) {
237
+ return new Response(new Uint8Array(upstreamBody.body), {
238
+ status: upstreamBody.status,
239
+ headers: { "content-type": upstreamBody.contentType },
240
+ });
241
+ }
242
+ return new Response(JSON.stringify({
243
+ error: "package absent from sealed proof registry",
244
+ }), { status: 404, headers: { "content-type": "application/json" } });
245
+ }
246
+ const versionRecords = Object.fromEntries([...versions.entries()].map(([version, artifact]) => [
247
+ version,
248
+ {
249
+ ...artifact.manifest,
250
+ dist: {
251
+ integrity: artifact.integrity,
252
+ shasum: artifact.shasum,
253
+ tarball: `${origin}/__tarball/${Buffer.from(pathname).toString("base64url")}/${version}`,
254
+ },
255
+ },
256
+ ]));
257
+ const latest = [...versions.keys()].sort(rcompare)[0];
258
+ if (latest === undefined) {
259
+ throw new Error(`Proof-local Registry has no sealed version for ${pathname}`);
260
+ }
261
+ for (const [version, record] of Object.entries(upstreamPackument?.versions ?? {})) {
262
+ if (versions.has(version))
263
+ continue;
264
+ if (!valid(version))
265
+ continue;
266
+ if ([...versions.keys()].some((sealed) => rcompare(version, sealed) < 0 &&
267
+ satisfies(version, `^${sealed}`)))
268
+ continue;
269
+ versionRecords[version] = record;
270
+ }
271
+ return new Response(JSON.stringify({
272
+ name: pathname,
273
+ "dist-tags": { latest },
274
+ versions: versionRecords,
275
+ }), { status: 200, headers: { "content-type": "application/json" } });
276
+ });
277
+ if (response.ok)
278
+ return response.value;
279
+ return Response.json({
280
+ error: "proof registry request failed",
281
+ cause: valueFreeFailure(response.cause),
282
+ }, { status: 500 });
283
+ },
284
+ });
285
+ origin = binding.origin;
286
+ return { origin, close: () => binding.stop() };
287
+ }
288
+ /** The package.json inside a proof artifact tarball. */
289
+ export async function readProofArtifactManifest(execution, runtime, tarball) {
290
+ const listed = await runRuntimeCommand({
291
+ runtime,
292
+ execution,
293
+ command: "tar",
294
+ args: ["-tzf", tarball],
295
+ cwd: (await getRuntimePath(runtime)).dirname(tarball),
296
+ });
297
+ if (listed.code !== 0) {
298
+ throw new Error(`Release proof cannot list ${tarball}: ${listed.stderr}`);
299
+ }
300
+ const manifestPaths = listed.stdout
301
+ .split(/\r?\n/)
302
+ .map((entry) => entry.trim())
303
+ .filter(Boolean)
304
+ .filter((entry) => {
305
+ const parts = entry.replace(/^\.\/+/, "").split("/");
306
+ return (parts.length === 2 && parts[0] !== ".." && parts[1] === "package.json");
307
+ });
308
+ if (manifestPaths.length !== 1) {
309
+ throw new Error(`Release proof artifact ${tarball} must contain exactly one top-level package.json; found ${manifestPaths.length}`);
310
+ }
311
+ const extracted = await runRuntimeCommand({
312
+ runtime,
313
+ execution,
314
+ command: "tar",
315
+ args: ["-xOf", tarball, "--", manifestPaths[0]],
316
+ cwd: (await getRuntimePath(runtime)).dirname(tarball),
317
+ });
318
+ if (extracted.code !== 0) {
319
+ throw new Error(`Release proof cannot read ${tarball}: ${extracted.stderr}`);
320
+ }
321
+ let manifest;
322
+ try {
323
+ manifest = parsePublisherManifest(JSON.parse(extracted.stdout));
324
+ }
325
+ catch (error) {
326
+ throw new CapabilityError(`Release proof artifact ${tarball} has malformed package.json`, "INVALID_INPUT", { reason: "proof-artifact-manifest-invalid", cause: error });
327
+ }
328
+ if (!manifest.name || !manifest.version) {
329
+ throw new Error(`Release proof artifact ${tarball} has no package name or version`);
330
+ }
331
+ const name = manifest.name;
332
+ const version = manifest.version;
333
+ return { ...manifest, name, version };
334
+ }
335
+ //# sourceMappingURL=proof-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proof-registry.js","sourceRoot":"","sources":["../../../../src/cli/npm/publish/proof-registry.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACxG,OAAO,EAAE,4BAA4B,EAA6B,MAAM,oCAAoC,CAAC;AAC7G,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAGjE,4EAA4E;AAC5E,MAAM,CAAC,KAAK,UAAU,gCAAgC,CAAC,OAKtD;IACC,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACpD,IAAI,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAC7B,OAAO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AAK,EAAE,KAAK,EAAE,CAC5D,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CACb,0BAA0B,OAAO,iCAAiC,CACnE,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;IAC3B,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;IACjC,OAAO,EAAE,GAAG,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACxC,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Read credentials for the release proof's source registries: one token per
3
+ * configured origin, renewed from the caller's session when it nears expiry or
4
+ * a concealed 404 suggests it went stale. Every token ever held is tracked so
5
+ * cleanup and npm output can redact it.
6
+ */
7
+ import { type RuntimeRef } from "@vibesdotdev/kernel";
8
+ import { type ReleaseConsumerSourceRegistry } from "./proof-registry.ts";
9
+ /** The proof's source-registry credentials. */
10
+ export type ProofSourceCredentials = {
11
+ /** Every token held during the proof (initial and renewed), for redaction. */
12
+ readonly redactValues: string[];
13
+ /** The source registry with the current token of each origin. */
14
+ sourceRegistryWithCurrentTokens(override?: readonly [registry: string, token: string][]): ReleaseConsumerSourceRegistry;
15
+ /**
16
+ * Renew `registry`'s token when it nears expiry (or, with `force`, when the
17
+ * caller saw a concealed 404). Rewrites the proof npmrc; true when renewed.
18
+ */
19
+ ensureFresh(registry: string, refreshOptions?: {
20
+ force?: boolean;
21
+ }): Promise<boolean>;
22
+ };
23
+ /**
24
+ * Validate the source registry's tokens and renewers against its configured
25
+ * origins, and return the renewable credential set the proof reads through.
26
+ */
27
+ export declare function createProofSourceCredentials(options: {
28
+ /** The runtime whose logger reports a token that does not decode or a scratch file a write could not scrub. */
29
+ runtime: RuntimeRef;
30
+ sourceRegistry: ReleaseConsumerSourceRegistry;
31
+ /** The proof npmrc a renewal rewrites; resolved lazily, after validation. */
32
+ npmrcPath: () => string;
33
+ now?: () => number;
34
+ }): ProofSourceCredentials;
35
+ /**
36
+ * Write a consumer's source-registry npmrc with each session read credential
37
+ * renewed first when it nears expiry. A release reaches its consumer installs
38
+ * long after it resolved the credential, and the Registry answers an expired
39
+ * one with a concealed 404 for every package.
40
+ */
41
+ export declare function writeFreshReleaseConsumerSourceNpmrc(npmrcPath: string, sourceRegistry: ReleaseConsumerSourceRegistry, runtime: RuntimeRef, now?: () => number): Promise<void>;
42
+ //# sourceMappingURL=proof-source-credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proof-source-credentials.d.ts","sourceRoot":"","sources":["../../../../src/cli/npm/publish/proof-source-credentials.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEhF,OAAO,EACL,KAAK,6BAA6B,EAEnC,MAAM,qBAAqB,CAAC;AAS7B,+CAA+C;AAC/C,MAAM,MAAM,sBAAsB,GAAG;IACnC,8EAA8E;IAC9E,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAChC,iEAAiE;IACjE,+BAA+B,CAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,GACtD,6BAA6B,CAAC;IACjC;;;OAGG;IACH,WAAW,CACT,QAAQ,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GACnC,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE;IACpD,+GAA+G;IAC/G,OAAO,EAAE,UAAU,CAAC;IACpB,cAAc,EAAE,6BAA6B,CAAC;IAC9C,6EAA6E;IAC7E,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB,GAAG,sBAAsB,CA6IzB;AAED;;;;;GAKG;AACH,wBAAsB,oCAAoC,CACxD,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,6BAA6B,EAC7C,OAAO,EAAE,UAAU,EACnB,GAAG,CAAC,EAAE,MAAM,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAgBf"}
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Read credentials for the release proof's source registries: one token per
3
+ * configured origin, renewed from the caller's session when it nears expiry or
4
+ * a concealed 404 suggests it went stale. Every token ever held is tracked so
5
+ * cleanup and npm output can redact it.
6
+ */
7
+ import { settle, valueFreeFailure } from "@vibesdotdev/kernel";
8
+ import { readString } from "./command-options.js";
9
+ import { writeReleaseConsumerSourceNpmrc, } from "./proof-registry.js";
10
+ import { normalizeRegistryUrl, REGISTRY_SESSION_JWT_MIN_LIFETIME_MS, registryReadCredentialRenewalError, registrySessionJwtClaims, registrySessionJwtContinuityMatches, } from "./registry-credentials.js";
11
+ /**
12
+ * Validate the source registry's tokens and renewers against its configured
13
+ * origins, and return the renewable credential set the proof reads through.
14
+ */
15
+ export function createProofSourceCredentials(options) {
16
+ const { sourceRegistry } = options;
17
+ const configuredSourceRegistries = new Set([
18
+ normalizeRegistryUrl(sourceRegistry.defaultRegistry),
19
+ ...Object.values(sourceRegistry.scopedRegistries ?? {}).map(normalizeRegistryUrl),
20
+ ]);
21
+ const sourceTokens = new Map();
22
+ for (const [registry, rawToken] of Object.entries(sourceRegistry.tokensByRegistry ?? {})) {
23
+ const token = readString(rawToken);
24
+ if (!token)
25
+ continue;
26
+ const normalizedRegistry = normalizeRegistryUrl(registry);
27
+ if (!configuredSourceRegistries.has(normalizedRegistry)) {
28
+ throw new Error(`Release consumer proof refused a read credential for unconfigured Registry origin ${normalizedRegistry}`);
29
+ }
30
+ const prior = sourceTokens.get(normalizedRegistry);
31
+ if (prior && prior !== token) {
32
+ throw new Error(`Release consumer proof received multiple read credentials for Registry origin ${normalizedRegistry}`);
33
+ }
34
+ sourceTokens.set(normalizedRegistry, token);
35
+ }
36
+ const sourceRenewers = new Map();
37
+ const managerMintedSourceTokens = new Map();
38
+ for (const [registry, renew] of Object.entries(sourceRegistry.renewSessionTokensByRegistry ?? {})) {
39
+ const normalizedRegistry = normalizeRegistryUrl(registry);
40
+ if (!configuredSourceRegistries.has(normalizedRegistry)) {
41
+ throw new Error(`Release consumer proof refused session renewal for unconfigured Registry origin ${normalizedRegistry}`);
42
+ }
43
+ if (!sourceTokens.has(normalizedRegistry)) {
44
+ throw new Error(`Release consumer proof session renewal for ${normalizedRegistry} has no initial read credential`);
45
+ }
46
+ sourceRenewers.set(normalizedRegistry, renew);
47
+ }
48
+ const redactValues = [...new Set(sourceTokens.values())];
49
+ const sourceRegistryWithCurrentTokens = (override) => {
50
+ const current = {
51
+ defaultRegistry: sourceRegistry.defaultRegistry,
52
+ tokensByRegistry: Object.fromEntries(override ? new Map([...sourceTokens, ...override]) : sourceTokens),
53
+ };
54
+ if (sourceRegistry.scopedRegistries) {
55
+ current.scopedRegistries = sourceRegistry.scopedRegistries;
56
+ }
57
+ return current;
58
+ };
59
+ const ensureFresh = async (registry, refreshOptions = {}) => {
60
+ const normalizedRegistry = normalizeRegistryUrl(registry);
61
+ const renew = sourceRenewers.get(normalizedRegistry);
62
+ if (!renew)
63
+ return false;
64
+ const currentToken = sourceTokens.get(normalizedRegistry);
65
+ const currentClaims = currentToken
66
+ ? registrySessionJwtClaims(currentToken, options.runtime)
67
+ : undefined;
68
+ if (!currentToken || !currentClaims) {
69
+ throw registryReadCredentialRenewalError(normalizedRegistry, "cannot identify the current session JWT");
70
+ }
71
+ const nowMs = (options.now ?? Date.now)();
72
+ if (refreshOptions.force &&
73
+ managerMintedSourceTokens.get(normalizedRegistry) === currentToken &&
74
+ currentClaims.expiresAtMs > nowMs + REGISTRY_SESSION_JWT_MIN_LIFETIME_MS) {
75
+ return false;
76
+ }
77
+ if (!refreshOptions.force &&
78
+ currentClaims.expiresAtMs > nowMs + REGISTRY_SESSION_JWT_MIN_LIFETIME_MS) {
79
+ return false;
80
+ }
81
+ const renewed = await settle(renew);
82
+ if (!renewed.ok) {
83
+ throw registryReadCredentialRenewalError(normalizedRegistry, "failed", valueFreeFailure(renewed.cause));
84
+ }
85
+ const renewedToken = readString(renewed.value);
86
+ if (renewedToken && !redactValues.includes(renewedToken)) {
87
+ redactValues.push(renewedToken);
88
+ }
89
+ const renewedClaims = renewedToken
90
+ ? registrySessionJwtClaims(renewedToken, options.runtime)
91
+ : undefined;
92
+ if (!renewedToken || !renewedClaims) {
93
+ throw registryReadCredentialRenewalError(normalizedRegistry, "returned no signed JWT");
94
+ }
95
+ if (!registrySessionJwtContinuityMatches(currentClaims, renewedClaims)) {
96
+ throw registryReadCredentialRenewalError(normalizedRegistry, "returned different session authority");
97
+ }
98
+ if (renewedClaims.expiresAtMs <=
99
+ nowMs + REGISTRY_SESSION_JWT_MIN_LIFETIME_MS) {
100
+ throw registryReadCredentialRenewalError(normalizedRegistry, "returned another stale JWT");
101
+ }
102
+ await writeReleaseConsumerSourceNpmrc(options.npmrcPath(), sourceRegistryWithCurrentTokens([[normalizedRegistry, renewedToken]]), options.runtime);
103
+ sourceTokens.set(normalizedRegistry, renewedToken);
104
+ managerMintedSourceTokens.set(normalizedRegistry, renewedToken);
105
+ return true;
106
+ };
107
+ return { redactValues, sourceRegistryWithCurrentTokens, ensureFresh };
108
+ }
109
+ /**
110
+ * Write a consumer's source-registry npmrc with each session read credential
111
+ * renewed first when it nears expiry. A release reaches its consumer installs
112
+ * long after it resolved the credential, and the Registry answers an expired
113
+ * one with a concealed 404 for every package.
114
+ */
115
+ export async function writeFreshReleaseConsumerSourceNpmrc(npmrcPath, sourceRegistry, runtime, now) {
116
+ const options = {
117
+ runtime,
118
+ sourceRegistry,
119
+ npmrcPath: () => npmrcPath,
120
+ };
121
+ if (now)
122
+ options.now = now;
123
+ const credentials = createProofSourceCredentials(options);
124
+ for (const registry of Object.keys(sourceRegistry.tokensByRegistry ?? {})) {
125
+ await credentials.ensureFresh(registry);
126
+ }
127
+ await writeReleaseConsumerSourceNpmrc(npmrcPath, credentials.sourceRegistryWithCurrentTokens(), runtime);
128
+ }
129
+ //# sourceMappingURL=proof-source-credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proof-source-credentials.js","sourceRoot":"","sources":["../../../../src/cli/npm/publish/proof-source-credentials.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAEL,+BAA+B,GAChC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,oCAAoC,EACpC,kCAAkC,EAClC,wBAAwB,EACxB,mCAAmC,GACpC,MAAM,2BAA2B,CAAC;AAoBnC;;;GAGG;AACH,MAAM,UAAU,4BAA4B,CAAC,OAO5C;IACC,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;IACnC,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;QACzC,oBAAoB,CAAC,cAAc,CAAC,eAAe,CAAC;QACpD,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC,GAAG,CACzD,oBAAoB,CACrB;KACF,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC/C,KAAK,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAC/C,cAAc,CAAC,gBAAgB,IAAI,EAAE,CACtC,EAAE,CAAC;QACF,MAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;QACnC,IAAI,CAAC,KAAK;YAAE,SAAS;QACrB,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QAC1D,IAAI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