@zuplo/cli 7.11.0 → 7.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/node_modules/@hono/node-server/README.md +2 -0
  2. package/node_modules/@hono/node-server/dist/index.cjs +1 -1
  3. package/node_modules/@hono/node-server/dist/index.mjs +1 -1
  4. package/node_modules/@hono/node-server/dist/serve-static.cjs +2 -1
  5. package/node_modules/@hono/node-server/dist/serve-static.mjs +2 -1
  6. package/node_modules/@hono/node-server/package.json +1 -1
  7. package/node_modules/@posthog/core/dist/metrics/index.d.ts +9 -0
  8. package/node_modules/@posthog/core/dist/metrics/index.d.ts.map +1 -1
  9. package/node_modules/@posthog/core/dist/metrics/index.js +38 -3
  10. package/node_modules/@posthog/core/dist/metrics/index.mjs +38 -3
  11. package/node_modules/@posthog/core/dist/metrics/types.d.ts +7 -2
  12. package/node_modules/@posthog/core/dist/metrics/types.d.ts.map +1 -1
  13. package/node_modules/@posthog/core/dist/traces/ids.d.ts.map +1 -1
  14. package/node_modules/@posthog/core/dist/traces/ids.js +2 -2
  15. package/node_modules/@posthog/core/dist/traces/ids.mjs +2 -2
  16. package/node_modules/@posthog/core/package.json +2 -2
  17. package/node_modules/@posthog/core/src/metrics/index.spec.ts +75 -0
  18. package/node_modules/@posthog/core/src/metrics/index.ts +60 -0
  19. package/node_modules/@posthog/core/src/metrics/types.ts +7 -1
  20. package/node_modules/@posthog/core/src/traces/ids.ts +4 -2
  21. package/node_modules/@posthog/types/dist/capture-metric.d.ts +10 -0
  22. package/node_modules/@posthog/types/dist/capture-metric.d.ts.map +1 -1
  23. package/node_modules/@posthog/types/dist/index.d.ts +1 -1
  24. package/node_modules/@posthog/types/dist/index.d.ts.map +1 -1
  25. package/node_modules/@posthog/types/package.json +1 -1
  26. package/node_modules/@posthog/types/src/capture-metric.ts +11 -0
  27. package/node_modules/@posthog/types/src/index.ts +1 -0
  28. package/node_modules/@zuplo/core/customer.cli.minified.js +80 -80
  29. package/node_modules/@zuplo/core/index.minified.js +85 -85
  30. package/node_modules/@zuplo/core/package.json +1 -1
  31. package/node_modules/@zuplo/graphql/package.json +1 -1
  32. package/node_modules/@zuplo/openapi-tools/package.json +5 -2
  33. package/node_modules/@zuplo/otel/package.json +1 -1
  34. package/node_modules/@zuplo/runtime/out/esm/{chunk-YJ2BHVUH.js → chunk-CDEAY3VY.js} +2 -2
  35. package/node_modules/@zuplo/runtime/out/esm/chunk-LVSZ3WTO.js +37 -0
  36. package/node_modules/@zuplo/runtime/out/esm/chunk-LVSZ3WTO.js.map +1 -0
  37. package/node_modules/@zuplo/runtime/out/esm/{chunk-VTO3F6DK.js → chunk-NUVXDVLJ.js} +2 -2
  38. package/node_modules/@zuplo/runtime/out/esm/{chunk-6YPRGG62.js → chunk-TPYCFLC7.js} +109 -109
  39. package/node_modules/@zuplo/runtime/out/esm/chunk-TPYCFLC7.js.map +1 -0
  40. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  41. package/node_modules/@zuplo/runtime/out/esm/internal/index.js +1 -1
  42. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
  43. package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
  44. package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +1 -1
  45. package/node_modules/@zuplo/runtime/out/types/index.d.ts +43 -43
  46. package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +14 -0
  47. package/node_modules/@zuplo/runtime/package.json +1 -1
  48. package/package.json +15 -12
  49. package/dist/__tests__/archive-utils.test.d.ts +0 -2
  50. package/dist/__tests__/archive-utils.test.d.ts.map +0 -1
  51. package/dist/__tests__/archive-utils.test.js +0 -50
  52. package/dist/__tests__/archive-utils.test.js.map +0 -1
  53. package/dist/__tests__/import-openapi.test.d.ts +0 -2
  54. package/dist/__tests__/import-openapi.test.d.ts.map +0 -1
  55. package/dist/__tests__/import-openapi.test.js +0 -251
  56. package/dist/__tests__/import-openapi.test.js.map +0 -1
  57. package/dist/__tests__/integration/confirm-linked-config.integration.test.d.ts +0 -2
  58. package/dist/__tests__/integration/confirm-linked-config.integration.test.d.ts.map +0 -1
  59. package/dist/__tests__/integration/confirm-linked-config.integration.test.js +0 -202
  60. package/dist/__tests__/integration/confirm-linked-config.integration.test.js.map +0 -1
  61. package/dist/__tests__/integration/confirm-production-deploy.integration.test.d.ts +0 -2
  62. package/dist/__tests__/integration/confirm-production-deploy.integration.test.d.ts.map +0 -1
  63. package/dist/__tests__/integration/confirm-production-deploy.integration.test.js +0 -184
  64. package/dist/__tests__/integration/confirm-production-deploy.integration.test.js.map +0 -1
  65. package/dist/__tests__/integration/custom-domain.integration.test.d.ts +0 -2
  66. package/dist/__tests__/integration/custom-domain.integration.test.d.ts.map +0 -1
  67. package/dist/__tests__/integration/custom-domain.integration.test.js +0 -563
  68. package/dist/__tests__/integration/custom-domain.integration.test.js.map +0 -1
  69. package/dist/__tests__/integration/delete.integration.test.d.ts +0 -2
  70. package/dist/__tests__/integration/delete.integration.test.d.ts.map +0 -1
  71. package/dist/__tests__/integration/delete.integration.test.js +0 -262
  72. package/dist/__tests__/integration/delete.integration.test.js.map +0 -1
  73. package/dist/__tests__/integration/deploy.integration.test.d.ts +0 -2
  74. package/dist/__tests__/integration/deploy.integration.test.d.ts.map +0 -1
  75. package/dist/__tests__/integration/deploy.integration.test.js +0 -519
  76. package/dist/__tests__/integration/deploy.integration.test.js.map +0 -1
  77. package/dist/__tests__/integration/get-project-param.integration.test.d.ts +0 -2
  78. package/dist/__tests__/integration/get-project-param.integration.test.d.ts.map +0 -1
  79. package/dist/__tests__/integration/get-project-param.integration.test.js +0 -305
  80. package/dist/__tests__/integration/get-project-param.integration.test.js.map +0 -1
  81. package/dist/__tests__/integration/info.integration.test.d.ts +0 -2
  82. package/dist/__tests__/integration/info.integration.test.d.ts.map +0 -1
  83. package/dist/__tests__/integration/info.integration.test.js +0 -293
  84. package/dist/__tests__/integration/info.integration.test.js.map +0 -1
  85. package/dist/__tests__/integration/jest-mocks-setup.d.ts +0 -2
  86. package/dist/__tests__/integration/jest-mocks-setup.d.ts.map +0 -1
  87. package/dist/__tests__/integration/jest-mocks-setup.js +0 -104
  88. package/dist/__tests__/integration/jest-mocks-setup.js.map +0 -1
  89. package/dist/__tests__/integration/jest-setup.d.ts +0 -2
  90. package/dist/__tests__/integration/jest-setup.d.ts.map +0 -1
  91. package/dist/__tests__/integration/jest-setup.js +0 -12
  92. package/dist/__tests__/integration/jest-setup.js.map +0 -1
  93. package/dist/__tests__/integration/link.integration.test.d.ts +0 -2
  94. package/dist/__tests__/integration/link.integration.test.d.ts.map +0 -1
  95. package/dist/__tests__/integration/link.integration.test.js +0 -395
  96. package/dist/__tests__/integration/link.integration.test.js.map +0 -1
  97. package/dist/__tests__/integration/linked-config-cascade.integration.test.d.ts +0 -2
  98. package/dist/__tests__/integration/linked-config-cascade.integration.test.d.ts.map +0 -1
  99. package/dist/__tests__/integration/linked-config-cascade.integration.test.js +0 -179
  100. package/dist/__tests__/integration/linked-config-cascade.integration.test.js.map +0 -1
  101. package/dist/__tests__/integration/list.integration.test.d.ts +0 -2
  102. package/dist/__tests__/integration/list.integration.test.d.ts.map +0 -1
  103. package/dist/__tests__/integration/list.integration.test.js +0 -300
  104. package/dist/__tests__/integration/list.integration.test.js.map +0 -1
  105. package/dist/__tests__/integration/source-upgrade.integration.test.d.ts +0 -2
  106. package/dist/__tests__/integration/source-upgrade.integration.test.d.ts.map +0 -1
  107. package/dist/__tests__/integration/source-upgrade.integration.test.js +0 -100
  108. package/dist/__tests__/integration/source-upgrade.integration.test.js.map +0 -1
  109. package/dist/__tests__/integration/test-utils.d.ts +0 -30
  110. package/dist/__tests__/integration/test-utils.d.ts.map +0 -1
  111. package/dist/__tests__/integration/test-utils.js +0 -82
  112. package/dist/__tests__/integration/test-utils.js.map +0 -1
  113. package/dist/__tests__/integration/tunnel.integration.test.d.ts +0 -2
  114. package/dist/__tests__/integration/tunnel.integration.test.d.ts.map +0 -1
  115. package/dist/__tests__/integration/tunnel.integration.test.js +0 -486
  116. package/dist/__tests__/integration/tunnel.integration.test.js.map +0 -1
  117. package/dist/__tests__/integration/variable.integration.test.d.ts +0 -2
  118. package/dist/__tests__/integration/variable.integration.test.d.ts.map +0 -1
  119. package/dist/__tests__/integration/variable.integration.test.js +0 -258
  120. package/dist/__tests__/integration/variable.integration.test.js.map +0 -1
  121. package/dist/__tests__/integration/whoami.integration.test.d.ts +0 -2
  122. package/dist/__tests__/integration/whoami.integration.test.d.ts.map +0 -1
  123. package/dist/__tests__/integration/whoami.integration.test.js +0 -116
  124. package/dist/__tests__/integration/whoami.integration.test.js.map +0 -1
  125. package/dist/__tests__/outdated.test.d.ts +0 -2
  126. package/dist/__tests__/outdated.test.d.ts.map +0 -1
  127. package/dist/__tests__/outdated.test.js +0 -67
  128. package/dist/__tests__/outdated.test.js.map +0 -1
  129. package/dist/__tests__/populate.test.d.ts +0 -2
  130. package/dist/__tests__/populate.test.d.ts.map +0 -1
  131. package/dist/__tests__/populate.test.js +0 -445
  132. package/dist/__tests__/populate.test.js.map +0 -1
  133. package/dist/__tests__/tsconfig-upgrader.test.d.ts +0 -2
  134. package/dist/__tests__/tsconfig-upgrader.test.d.ts.map +0 -1
  135. package/dist/__tests__/tsconfig-upgrader.test.js +0 -31
  136. package/dist/__tests__/tsconfig-upgrader.test.js.map +0 -1
  137. package/dist/ca-certificate/validation.test.d.ts +0 -2
  138. package/dist/ca-certificate/validation.test.d.ts.map +0 -1
  139. package/dist/ca-certificate/validation.test.js +0 -131
  140. package/dist/ca-certificate/validation.test.js.map +0 -1
  141. package/dist/common/analytics/cli-invocation.test.d.ts +0 -2
  142. package/dist/common/analytics/cli-invocation.test.d.ts.map +0 -1
  143. package/dist/common/analytics/cli-invocation.test.js +0 -51
  144. package/dist/common/analytics/cli-invocation.test.js.map +0 -1
  145. package/dist/common/analytics/package-manager.test.d.ts +0 -2
  146. package/dist/common/analytics/package-manager.test.d.ts.map +0 -1
  147. package/dist/common/analytics/package-manager.test.js +0 -163
  148. package/dist/common/analytics/package-manager.test.js.map +0 -1
  149. package/dist/common/cli-dispatcher.test.d.ts +0 -2
  150. package/dist/common/cli-dispatcher.test.d.ts.map +0 -1
  151. package/dist/common/cli-dispatcher.test.js +0 -80
  152. package/dist/common/cli-dispatcher.test.js.map +0 -1
  153. package/dist/common/middleware/check-pnpm-lifecycle.test.d.ts +0 -2
  154. package/dist/common/middleware/check-pnpm-lifecycle.test.d.ts.map +0 -1
  155. package/dist/common/middleware/check-pnpm-lifecycle.test.js +0 -125
  156. package/dist/common/middleware/check-pnpm-lifecycle.test.js.map +0 -1
  157. package/dist/common/middleware/get-environment-param.test.d.ts +0 -2
  158. package/dist/common/middleware/get-environment-param.test.d.ts.map +0 -1
  159. package/dist/common/middleware/get-environment-param.test.js +0 -57
  160. package/dist/common/middleware/get-environment-param.test.js.map +0 -1
  161. package/dist/common/read-linked-config.test.d.ts +0 -2
  162. package/dist/common/read-linked-config.test.d.ts.map +0 -1
  163. package/dist/common/read-linked-config.test.js +0 -363
  164. package/dist/common/read-linked-config.test.js.map +0 -1
  165. package/dist/common/terminal.test.d.ts +0 -2
  166. package/dist/common/terminal.test.d.ts.map +0 -1
  167. package/dist/common/terminal.test.js +0 -101
  168. package/dist/common/terminal.test.js.map +0 -1
  169. package/dist/common/utils/build-environment-prompt-choices.test.d.ts +0 -2
  170. package/dist/common/utils/build-environment-prompt-choices.test.d.ts.map +0 -1
  171. package/dist/common/utils/build-environment-prompt-choices.test.js +0 -97
  172. package/dist/common/utils/build-environment-prompt-choices.test.js.map +0 -1
  173. package/dist/common/utils/format-environment-type.test.d.ts +0 -2
  174. package/dist/common/utils/format-environment-type.test.d.ts.map +0 -1
  175. package/dist/common/utils/format-environment-type.test.js +0 -32
  176. package/dist/common/utils/format-environment-type.test.js.map +0 -1
  177. package/dist/common/utils/pnpm-lifecycle.test.d.ts +0 -2
  178. package/dist/common/utils/pnpm-lifecycle.test.d.ts.map +0 -1
  179. package/dist/common/utils/pnpm-lifecycle.test.js +0 -196
  180. package/dist/common/utils/pnpm-lifecycle.test.js.map +0 -1
  181. package/dist/common/utils/pretty-print-environment-prompt.test.d.ts +0 -2
  182. package/dist/common/utils/pretty-print-environment-prompt.test.d.ts.map +0 -1
  183. package/dist/common/utils/pretty-print-environment-prompt.test.js +0 -42
  184. package/dist/common/utils/pretty-print-environment-prompt.test.js.map +0 -1
  185. package/dist/common/utils/sort-environments-for-prompt.test.d.ts +0 -2
  186. package/dist/common/utils/sort-environments-for-prompt.test.d.ts.map +0 -1
  187. package/dist/common/utils/sort-environments-for-prompt.test.js +0 -82
  188. package/dist/common/utils/sort-environments-for-prompt.test.js.map +0 -1
  189. package/dist/common/utils/stringify-config.test.d.ts +0 -2
  190. package/dist/common/utils/stringify-config.test.d.ts.map +0 -1
  191. package/dist/common/utils/stringify-config.test.js +0 -80
  192. package/dist/common/utils/stringify-config.test.js.map +0 -1
  193. package/dist/common/validators/argument-validators.spec.d.ts +0 -2
  194. package/dist/common/validators/argument-validators.spec.d.ts.map +0 -1
  195. package/dist/common/validators/argument-validators.spec.js +0 -181
  196. package/dist/common/validators/argument-validators.spec.js.map +0 -1
  197. package/dist/common/worker-output.test.d.ts +0 -2
  198. package/dist/common/worker-output.test.d.ts.map +0 -1
  199. package/dist/common/worker-output.test.js +0 -32
  200. package/dist/common/worker-output.test.js.map +0 -1
  201. package/dist/deploy/archive.local-registry.test.d.ts +0 -2
  202. package/dist/deploy/archive.local-registry.test.d.ts.map +0 -1
  203. package/dist/deploy/archive.local-registry.test.js +0 -100
  204. package/dist/deploy/archive.local-registry.test.js.map +0 -1
  205. package/dist/deploy/archive.test.d.ts +0 -2
  206. package/dist/deploy/archive.test.d.ts.map +0 -1
  207. package/dist/deploy/archive.test.js +0 -248
  208. package/dist/deploy/archive.test.js.map +0 -1
  209. package/dist/deploy/classify-build-probe.test.d.ts +0 -2
  210. package/dist/deploy/classify-build-probe.test.d.ts.map +0 -1
  211. package/dist/deploy/classify-build-probe.test.js +0 -51
  212. package/dist/deploy/classify-build-probe.test.js.map +0 -1
  213. package/dist/deploy/poll-deployment.test.d.ts +0 -2
  214. package/dist/deploy/poll-deployment.test.d.ts.map +0 -1
  215. package/dist/deploy/poll-deployment.test.js +0 -158
  216. package/dist/deploy/poll-deployment.test.js.map +0 -1
  217. package/dist/dev/zuplo-local-gitignore.test.d.ts +0 -2
  218. package/dist/dev/zuplo-local-gitignore.test.d.ts.map +0 -1
  219. package/dist/dev/zuplo-local-gitignore.test.js +0 -58
  220. package/dist/dev/zuplo-local-gitignore.test.js.map +0 -1
  221. package/dist/editor/e2e/editor.spec.d.ts +0 -2
  222. package/dist/editor/e2e/editor.spec.d.ts.map +0 -1
  223. package/dist/editor/e2e/editor.spec.js +0 -44
  224. package/dist/editor/e2e/editor.spec.js.map +0 -1
  225. package/dist/link/project-type.test.d.ts +0 -2
  226. package/dist/link/project-type.test.d.ts.map +0 -1
  227. package/dist/link/project-type.test.js +0 -225
  228. package/dist/link/project-type.test.js.map +0 -1
  229. package/dist/lint/resolve-binary.test.d.ts +0 -2
  230. package/dist/lint/resolve-binary.test.d.ts.map +0 -1
  231. package/dist/lint/resolve-binary.test.js +0 -155
  232. package/dist/lint/resolve-binary.test.js.map +0 -1
  233. package/dist/open-api/convert/handler.spec.d.ts +0 -2
  234. package/dist/open-api/convert/handler.spec.d.ts.map +0 -1
  235. package/dist/open-api/convert/handler.spec.js +0 -301
  236. package/dist/open-api/convert/handler.spec.js.map +0 -1
  237. package/dist/open-api/merge/handler.spec.d.ts +0 -2
  238. package/dist/open-api/merge/handler.spec.d.ts.map +0 -1
  239. package/dist/open-api/merge/handler.spec.js +0 -673
  240. package/dist/open-api/merge/handler.spec.js.map +0 -1
  241. package/dist/open-api/overlay/handler.spec.d.ts +0 -2
  242. package/dist/open-api/overlay/handler.spec.d.ts.map +0 -1
  243. package/dist/open-api/overlay/handler.spec.js +0 -346
  244. package/dist/open-api/overlay/handler.spec.js.map +0 -1
  245. package/dist/source/ai-gateway/files.test.d.ts +0 -2
  246. package/dist/source/ai-gateway/files.test.d.ts.map +0 -1
  247. package/dist/source/ai-gateway/files.test.js +0 -135
  248. package/dist/source/ai-gateway/files.test.js.map +0 -1
  249. package/dist/source/ai-gateway/handler.test.d.ts +0 -2
  250. package/dist/source/ai-gateway/handler.test.d.ts.map +0 -1
  251. package/dist/source/ai-gateway/handler.test.js +0 -113
  252. package/dist/source/ai-gateway/handler.test.js.map +0 -1
  253. package/dist/source/ai-gateway/package.test.d.ts +0 -2
  254. package/dist/source/ai-gateway/package.test.d.ts.map +0 -1
  255. package/dist/source/ai-gateway/package.test.js +0 -30
  256. package/dist/source/ai-gateway/package.test.js.map +0 -1
  257. package/dist/source/ai-gateway/planner.test.d.ts +0 -2
  258. package/dist/source/ai-gateway/planner.test.d.ts.map +0 -1
  259. package/dist/source/ai-gateway/planner.test.js +0 -330
  260. package/dist/source/ai-gateway/planner.test.js.map +0 -1
  261. package/dist/source/ai-gateway/release.test.d.ts +0 -2
  262. package/dist/source/ai-gateway/release.test.d.ts.map +0 -1
  263. package/dist/source/ai-gateway/release.test.js +0 -62
  264. package/dist/source/ai-gateway/release.test.js.map +0 -1
  265. package/dist/test/invoke-test.test.d.ts +0 -2
  266. package/dist/test/invoke-test.test.d.ts.map +0 -1
  267. package/dist/test/invoke-test.test.js +0 -150
  268. package/dist/test/invoke-test.test.js.map +0 -1
  269. package/dist/test/test-files.test.d.ts +0 -2
  270. package/dist/test/test-files.test.d.ts.map +0 -1
  271. package/dist/test/test-files.test.js +0 -57
  272. package/dist/test/test-files.test.js.map +0 -1
  273. package/node_modules/@zuplo/openapi-tools/dist/file-format.spec.d.ts +0 -2
  274. package/node_modules/@zuplo/openapi-tools/dist/file-format.spec.d.ts.map +0 -1
  275. package/node_modules/@zuplo/openapi-tools/dist/file-format.spec.js +0 -289
  276. package/node_modules/@zuplo/openapi-tools/dist/file-format.spec.js.map +0 -1
  277. package/node_modules/@zuplo/openapi-tools/dist/merge-fixtures.spec.d.ts +0 -2
  278. package/node_modules/@zuplo/openapi-tools/dist/merge-fixtures.spec.d.ts.map +0 -1
  279. package/node_modules/@zuplo/openapi-tools/dist/merge-fixtures.spec.js +0 -181
  280. package/node_modules/@zuplo/openapi-tools/dist/merge-fixtures.spec.js.map +0 -1
  281. package/node_modules/@zuplo/openapi-tools/dist/merge.spec.d.ts +0 -2
  282. package/node_modules/@zuplo/openapi-tools/dist/merge.spec.d.ts.map +0 -1
  283. package/node_modules/@zuplo/openapi-tools/dist/merge.spec.js +0 -399
  284. package/node_modules/@zuplo/openapi-tools/dist/merge.spec.js.map +0 -1
  285. package/node_modules/@zuplo/openapi-tools/dist/overlay.spec.d.ts +0 -2
  286. package/node_modules/@zuplo/openapi-tools/dist/overlay.spec.d.ts.map +0 -1
  287. package/node_modules/@zuplo/openapi-tools/dist/overlay.spec.js +0 -779
  288. package/node_modules/@zuplo/openapi-tools/dist/overlay.spec.js.map +0 -1
  289. package/node_modules/@zuplo/openapi-tools/dist/path-transform.spec.d.ts +0 -2
  290. package/node_modules/@zuplo/openapi-tools/dist/path-transform.spec.d.ts.map +0 -1
  291. package/node_modules/@zuplo/openapi-tools/dist/path-transform.spec.js +0 -269
  292. package/node_modules/@zuplo/openapi-tools/dist/path-transform.spec.js.map +0 -1
  293. package/node_modules/@zuplo/openapi-tools/dist/url-utils.spec.d.ts +0 -2
  294. package/node_modules/@zuplo/openapi-tools/dist/url-utils.spec.d.ts.map +0 -1
  295. package/node_modules/@zuplo/openapi-tools/dist/url-utils.spec.js +0 -93
  296. package/node_modules/@zuplo/openapi-tools/dist/url-utils.spec.js.map +0 -1
  297. package/node_modules/@zuplo/runtime/out/esm/chunk-6YPRGG62.js.map +0 -1
  298. package/node_modules/@zuplo/runtime/out/esm/chunk-PBDT4FDO.js +0 -37
  299. package/node_modules/@zuplo/runtime/out/esm/chunk-PBDT4FDO.js.map +0 -1
  300. /package/node_modules/@zuplo/runtime/out/esm/{chunk-YJ2BHVUH.js.map → chunk-CDEAY3VY.js.map} +0 -0
  301. /package/node_modules/@zuplo/runtime/out/esm/{chunk-PBDT4FDO.js.LEGAL.txt → chunk-LVSZ3WTO.js.LEGAL.txt} +0 -0
  302. /package/node_modules/@zuplo/runtime/out/esm/{chunk-VTO3F6DK.js.map → chunk-NUVXDVLJ.js.map} +0 -0
  303. /package/node_modules/@zuplo/runtime/out/esm/{chunk-6YPRGG62.js.LEGAL.txt → chunk-TPYCFLC7.js.LEGAL.txt} +0 -0
@@ -1,100 +0,0 @@
1
- import assert from "node:assert";
2
- import fs from "node:fs/promises";
3
- import os from "node:os";
4
- import path from "node:path";
5
- import { afterEach, beforeEach, describe, it } from "node:test";
6
- import { packageLockHasLocalRegistryUrls } from "./archive.js";
7
- describe("packageLockHasLocalRegistryUrls", () => {
8
- let tmpDir;
9
- beforeEach(async () => {
10
- tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "archive-spec-"));
11
- });
12
- afterEach(async () => {
13
- await fs.rm(tmpDir, { recursive: true, force: true });
14
- });
15
- it("returns false for a non-existent file", () => {
16
- const result = packageLockHasLocalRegistryUrls(path.join(tmpDir, "does-not-exist.json"));
17
- assert.strictEqual(result, false);
18
- });
19
- it("returns false for a lock file with only public registry URLs", async () => {
20
- const content = JSON.stringify({
21
- packages: {
22
- "node_modules/foo": {
23
- resolved: "https://registry.npmjs.org/foo/-/foo-1.0.0.tgz",
24
- },
25
- },
26
- });
27
- const filePath = path.join(tmpDir, "package-lock.json");
28
- await fs.writeFile(filePath, content, "utf-8");
29
- assert.strictEqual(packageLockHasLocalRegistryUrls(filePath), false);
30
- });
31
- it("returns true for a lock file with a localhost URL", async () => {
32
- const content = JSON.stringify({
33
- packages: {
34
- "node_modules/foo": {
35
- resolved: "http://localhost:4873/foo/-/foo-1.0.0.tgz",
36
- },
37
- },
38
- });
39
- const filePath = path.join(tmpDir, "package-lock.json");
40
- await fs.writeFile(filePath, content, "utf-8");
41
- assert.strictEqual(packageLockHasLocalRegistryUrls(filePath), true);
42
- });
43
- it("returns true for a lock file with a 127.0.0.1 URL", async () => {
44
- const content = JSON.stringify({
45
- packages: {
46
- "node_modules/bar": {
47
- resolved: "http://127.0.0.1:4873/bar/-/bar-2.0.0.tgz",
48
- },
49
- },
50
- });
51
- const filePath = path.join(tmpDir, "package-lock.json");
52
- await fs.writeFile(filePath, content, "utf-8");
53
- assert.strictEqual(packageLockHasLocalRegistryUrls(filePath), true);
54
- });
55
- it("returns true for https local URLs", async () => {
56
- const content = JSON.stringify({
57
- packages: {
58
- "node_modules/baz": {
59
- resolved: "https://localhost/baz/-/baz-1.0.0.tgz",
60
- },
61
- },
62
- });
63
- const filePath = path.join(tmpDir, "package-lock.json");
64
- await fs.writeFile(filePath, content, "utf-8");
65
- assert.strictEqual(packageLockHasLocalRegistryUrls(filePath), true);
66
- });
67
- it("returns true when only some packages have local URLs", async () => {
68
- const content = JSON.stringify({
69
- packages: {
70
- "node_modules/public-pkg": {
71
- resolved: "https://registry.npmjs.org/public-pkg/-/public-pkg-1.0.0.tgz",
72
- },
73
- "node_modules/local-pkg": {
74
- resolved: "http://localhost:4873/local-pkg/-/local-pkg-0.1.0.tgz",
75
- },
76
- },
77
- });
78
- const filePath = path.join(tmpDir, "package-lock.json");
79
- await fs.writeFile(filePath, content, "utf-8");
80
- assert.strictEqual(packageLockHasLocalRegistryUrls(filePath), true);
81
- });
82
- it("returns false for an empty file", async () => {
83
- const filePath = path.join(tmpDir, "package-lock.json");
84
- await fs.writeFile(filePath, "", "utf-8");
85
- assert.strictEqual(packageLockHasLocalRegistryUrls(filePath), false);
86
- });
87
- it("returns false when resolved URL contains localhost in a non-host position", async () => {
88
- const content = JSON.stringify({
89
- packages: {
90
- "node_modules/localhost-utils": {
91
- resolved: "https://registry.npmjs.org/localhost-utils/-/localhost-utils-1.0.0.tgz",
92
- },
93
- },
94
- });
95
- const filePath = path.join(tmpDir, "package-lock.json");
96
- await fs.writeFile(filePath, content, "utf-8");
97
- assert.strictEqual(packageLockHasLocalRegistryUrls(filePath), false);
98
- });
99
- });
100
- //# sourceMappingURL=archive.local-registry.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"archive.local-registry.test.js","sourceRoot":"","sources":["../../src/deploy/archive.local-registry.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,MAAM,cAAc,CAAC;AAE/D,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC/C,IAAI,MAAc,CAAC;IAEnB,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,eAAe,CAAC,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,KAAK,IAAI,EAAE;QACnB,MAAM,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,MAAM,GAAG,+BAA+B,CAC5C,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,qBAAqB,CAAC,CACzC,CAAC;QACF,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8DAA8D,EAAE,KAAK,IAAI,EAAE;QAC5E,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAA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,EAAE,EAAE,OAAO,CAAC,CAAC;QAE1C,MAAM,CAAC,WAAW,CAAC,+BAA+B,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2EAA2E,EAAE,KAAK,IAAI,EAAE;QAEzF,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC;YAC7B,QAAQ,EAAE;gBACR,8BAA8B,EAAE;oBAC9B,QAAQ,EACN,wEAAwE;iBAC3E;aACF;SACF,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;QACxD,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAE/C,MAAM,CAAC,WAAW,CAAC,+BAA+B,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import assert from \"node:assert\";\nimport fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { afterEach, beforeEach, describe, it } from \"node:test\";\nimport { packageLockHasLocalRegistryUrls } from \"./archive.js\";\n\ndescribe(\"packageLockHasLocalRegistryUrls\", () => {\n let tmpDir: string;\n\n beforeEach(async () => {\n tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), \"archive-spec-\"));\n });\n\n afterEach(async () => {\n await fs.rm(tmpDir, { recursive: true, force: true });\n });\n\n it(\"returns false for a non-existent file\", () => {\n const result = packageLockHasLocalRegistryUrls(\n path.join(tmpDir, \"does-not-exist.json\")\n );\n assert.strictEqual(result, false);\n });\n\n it(\"returns false for a lock file with only public registry URLs\", async () => {\n const content = JSON.stringify({\n packages: {\n \"node_modules/foo\": {\n resolved: \"https://registry.npmjs.org/foo/-/foo-1.0.0.tgz\",\n },\n },\n });\n const filePath = path.join(tmpDir, \"package-lock.json\");\n await fs.writeFile(filePath, content, \"utf-8\");\n\n assert.strictEqual(packageLockHasLocalRegistryUrls(filePath), false);\n });\n\n it(\"returns true for a lock file with a localhost URL\", async () => {\n const content = JSON.stringify({\n packages: {\n \"node_modules/foo\": {\n resolved: \"http://localhost:4873/foo/-/foo-1.0.0.tgz\",\n },\n },\n });\n const filePath = path.join(tmpDir, \"package-lock.json\");\n await fs.writeFile(filePath, content, \"utf-8\");\n\n assert.strictEqual(packageLockHasLocalRegistryUrls(filePath), true);\n });\n\n it(\"returns true for a lock file with a 127.0.0.1 URL\", async () => {\n const content = JSON.stringify({\n packages: {\n \"node_modules/bar\": {\n resolved: \"http://127.0.0.1:4873/bar/-/bar-2.0.0.tgz\",\n },\n },\n });\n const filePath = path.join(tmpDir, \"package-lock.json\");\n await fs.writeFile(filePath, content, \"utf-8\");\n\n assert.strictEqual(packageLockHasLocalRegistryUrls(filePath), true);\n });\n\n it(\"returns true for https local URLs\", async () => {\n const content = JSON.stringify({\n packages: {\n \"node_modules/baz\": {\n resolved: \"https://localhost/baz/-/baz-1.0.0.tgz\",\n },\n },\n });\n const filePath = path.join(tmpDir, \"package-lock.json\");\n await fs.writeFile(filePath, content, \"utf-8\");\n\n assert.strictEqual(packageLockHasLocalRegistryUrls(filePath), true);\n });\n\n it(\"returns true when only some packages have local URLs\", async () => {\n const content = JSON.stringify({\n packages: {\n \"node_modules/public-pkg\": {\n resolved:\n \"https://registry.npmjs.org/public-pkg/-/public-pkg-1.0.0.tgz\",\n },\n \"node_modules/local-pkg\": {\n resolved: \"http://localhost:4873/local-pkg/-/local-pkg-0.1.0.tgz\",\n },\n },\n });\n const filePath = path.join(tmpDir, \"package-lock.json\");\n await fs.writeFile(filePath, content, \"utf-8\");\n\n assert.strictEqual(packageLockHasLocalRegistryUrls(filePath), true);\n });\n\n it(\"returns false for an empty file\", async () => {\n const filePath = path.join(tmpDir, \"package-lock.json\");\n await fs.writeFile(filePath, \"\", \"utf-8\");\n\n assert.strictEqual(packageLockHasLocalRegistryUrls(filePath), false);\n });\n\n it(\"returns false when resolved URL contains localhost in a non-host position\", async () => {\n // e.g. a package named 'localhost-utils' published on the public registry\n const content = JSON.stringify({\n packages: {\n \"node_modules/localhost-utils\": {\n resolved:\n \"https://registry.npmjs.org/localhost-utils/-/localhost-utils-1.0.0.tgz\",\n },\n },\n });\n const filePath = path.join(tmpDir, \"package-lock.json\");\n await fs.writeFile(filePath, content, \"utf-8\");\n\n assert.strictEqual(packageLockHasLocalRegistryUrls(filePath), false);\n });\n});\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=archive.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"archive.test.d.ts","sourceRoot":"","sources":["../../src/deploy/archive.test.ts"],"names":[],"mappings":""}
@@ -1,248 +0,0 @@
1
- import assert from "node:assert";
2
- import fs from "node:fs/promises";
3
- import os from "node:os";
4
- import path from "node:path";
5
- import { afterEach, beforeEach, describe, it } from "node:test";
6
- import { fileURLToPath } from "node:url";
7
- import * as tar from "tar";
8
- import { archive, createIgnoreFunction, generateMetadata } from "./archive.js";
9
- const __filename = fileURLToPath(import.meta.url);
10
- const __dirname = path.dirname(__filename);
11
- const testTmpPath = path.join(__dirname, "..", "__tests__", "test-tmp", "archive");
12
- describe("Archive Path Handling", () => {
13
- let originalCwd;
14
- beforeEach(async () => {
15
- originalCwd = process.cwd();
16
- await fs.mkdir(testTmpPath, { recursive: true });
17
- await fs.writeFile(path.join(testTmpPath, "zuplo.jsonc"), JSON.stringify({ name: "test-project" }, null, 2));
18
- await fs.writeFile(path.join(testTmpPath, ".gitignore"), "node_modules/\n.env\n");
19
- const { simpleGit } = await import("simple-git");
20
- const git = simpleGit({ baseDir: testTmpPath });
21
- await git.init();
22
- await git.addConfig("user.name", "Test User");
23
- await git.addConfig("user.email", "test@example.com");
24
- await git.add(".");
25
- await git.commit("Initial commit");
26
- });
27
- afterEach(async () => {
28
- process.chdir(originalCwd);
29
- try {
30
- await fs.rm(testTmpPath, { recursive: true, force: true });
31
- }
32
- catch {
33
- }
34
- });
35
- describe("archive with various --dir formats", () => {
36
- it("should work with --dir=. (current directory)", async () => {
37
- process.chdir(testTmpPath);
38
- const result = await archive({
39
- dir: ".",
40
- account: "test-account",
41
- project: "test-project",
42
- authToken: "test-token",
43
- });
44
- assert.ok(result.tarball);
45
- assert.ok(result.metadata);
46
- assert.ok(result.metadata.branch === "main" || result.metadata.branch === "master");
47
- await fs.unlink(result.tarball);
48
- });
49
- it("should work with --dir without argument (defaults to .)", async () => {
50
- process.chdir(testTmpPath);
51
- const result = await archive({
52
- dir: ".",
53
- account: "test-account",
54
- project: "test-project",
55
- authToken: "test-token",
56
- });
57
- assert.ok(result.tarball);
58
- assert.ok(result.metadata);
59
- await fs.unlink(result.tarball);
60
- });
61
- it("should work with absolute path", async () => {
62
- const absolutePath = path.resolve(testTmpPath);
63
- const result = await archive({
64
- dir: absolutePath,
65
- account: "test-account",
66
- project: "test-project",
67
- authToken: "test-token",
68
- });
69
- assert.ok(result.tarball);
70
- assert.ok(result.metadata);
71
- await fs.unlink(result.tarball);
72
- });
73
- it("should work with relative path from parent", async () => {
74
- const parentDir = path.dirname(testTmpPath);
75
- const relativePath = path.relative(parentDir, testTmpPath);
76
- process.chdir(parentDir);
77
- const result = await archive({
78
- dir: relativePath,
79
- account: "test-account",
80
- project: "test-project",
81
- authToken: "test-token",
82
- });
83
- assert.ok(result.tarball);
84
- assert.ok(result.metadata);
85
- await fs.unlink(result.tarball);
86
- });
87
- it("should work with ./relative/path format", async () => {
88
- const parentDir = path.dirname(testTmpPath);
89
- const baseName = path.basename(testTmpPath);
90
- process.chdir(parentDir);
91
- const result = await archive({
92
- dir: `./${baseName}`,
93
- account: "test-account",
94
- project: "test-project",
95
- authToken: "test-token",
96
- });
97
- assert.ok(result.tarball);
98
- assert.ok(result.metadata);
99
- await fs.unlink(result.tarball);
100
- });
101
- });
102
- describe("createIgnoreFunction with various path formats", () => {
103
- it("should read .gitignore with absolute path", async () => {
104
- const absolutePath = path.resolve(testTmpPath);
105
- const ignoreFn = createIgnoreFunction(absolutePath);
106
- assert.strictEqual(ignoreFn.ignores("node_modules/"), true);
107
- assert.strictEqual(ignoreFn.ignores("src/index.ts"), false);
108
- });
109
- it("should read .gitignore with relative path from cwd", async () => {
110
- const parentDir = path.dirname(testTmpPath);
111
- const relativePath = path.relative(parentDir, testTmpPath);
112
- process.chdir(parentDir);
113
- const absolutePath = path.resolve(relativePath);
114
- const ignoreFn = createIgnoreFunction(absolutePath);
115
- assert.strictEqual(ignoreFn.ignores("node_modules/"), true);
116
- assert.strictEqual(ignoreFn.ignores(".git/"), true);
117
- });
118
- it("should read .gitignore with . as directory", async () => {
119
- process.chdir(testTmpPath);
120
- const absolutePath = path.resolve(".");
121
- const ignoreFn = createIgnoreFunction(absolutePath);
122
- assert.strictEqual(ignoreFn.ignores("node_modules/"), true);
123
- assert.strictEqual(ignoreFn.ignores(".env"), true);
124
- });
125
- it("should prefer .zupignore over .gitignore", async () => {
126
- await fs.writeFile(path.join(testTmpPath, ".zupignore"), "dist/\n*.log\n");
127
- const absolutePath = path.resolve(testTmpPath);
128
- const ignoreFn = createIgnoreFunction(absolutePath);
129
- assert.strictEqual(ignoreFn.ignores("dist/"), true);
130
- assert.strictEqual(ignoreFn.ignores("test.log"), true);
131
- assert.strictEqual(ignoreFn.ignores(".git/"), true);
132
- });
133
- it("should always ignore .git directory", async () => {
134
- await fs.unlink(path.join(testTmpPath, ".gitignore"));
135
- const absolutePath = path.resolve(testTmpPath);
136
- const ignoreFn = createIgnoreFunction(absolutePath);
137
- assert.strictEqual(ignoreFn.ignores(".git/"), true);
138
- assert.strictEqual(ignoreFn.ignores("node_modules/"), true);
139
- });
140
- });
141
- describe("generateMetadata with various path formats", () => {
142
- it("should generate metadata with absolute path", async () => {
143
- const absolutePath = path.resolve(testTmpPath);
144
- const metadata = await generateMetadata({
145
- dir: absolutePath,
146
- account: "test-account",
147
- project: "test-project",
148
- authToken: "test-token",
149
- });
150
- assert.ok(metadata.branch);
151
- assert.ok(metadata.sha);
152
- assert.ok(metadata.branch === "main" || metadata.branch === "master");
153
- });
154
- it("should generate metadata with . as directory", async () => {
155
- process.chdir(testTmpPath);
156
- const metadata = await generateMetadata({
157
- dir: ".",
158
- account: "test-account",
159
- project: "test-project",
160
- authToken: "test-token",
161
- });
162
- assert.ok(metadata.branch);
163
- assert.ok(metadata.sha);
164
- });
165
- it("should generate metadata with relative path", async () => {
166
- const parentDir = path.dirname(testTmpPath);
167
- const relativePath = path.relative(parentDir, testTmpPath);
168
- process.chdir(parentDir);
169
- const metadata = await generateMetadata({
170
- dir: relativePath,
171
- account: "test-account",
172
- project: "test-project",
173
- authToken: "test-token",
174
- });
175
- assert.ok(metadata.branch);
176
- assert.ok(metadata.sha);
177
- });
178
- it("should use --environment flag over git branch", async () => {
179
- const metadata = await generateMetadata({
180
- dir: testTmpPath,
181
- environment: "production",
182
- account: "test-account",
183
- project: "test-project",
184
- authToken: "test-token",
185
- });
186
- assert.strictEqual(metadata.branch, "production");
187
- assert.ok(metadata.sha);
188
- });
189
- });
190
- describe("archive structure validation", () => {
191
- it("should create archive with relative paths, not absolute paths", async () => {
192
- process.chdir(testTmpPath);
193
- await fs.mkdir(path.join(testTmpPath, "config"), { recursive: true });
194
- await fs.writeFile(path.join(testTmpPath, "config", "routes.json"), JSON.stringify({ routes: [] }));
195
- const result = await archive({
196
- dir: ".",
197
- account: "test-account",
198
- project: "test-project",
199
- authToken: "test-token",
200
- });
201
- assert.ok(result.tarball);
202
- const files = [];
203
- await tar.list({
204
- file: result.tarball,
205
- onentry: (entry) => {
206
- files.push(entry.path);
207
- },
208
- });
209
- assert.ok(files.some((f) => f === "config/routes.json" || f === "./config/routes.json"), `Expected to find config/routes.json in archive, but got: ${files.join(", ")}`);
210
- const hasAbsolutePath = files.some((f) => f.includes(testTmpPath));
211
- assert.strictEqual(hasAbsolutePath, false, `Archive should not contain absolute paths, but found: ${files.filter((f) => f.includes(testTmpPath)).join(", ")}`);
212
- await fs.unlink(result.tarball);
213
- });
214
- });
215
- describe("cross-platform path handling", () => {
216
- it("should normalize Windows-style paths on Windows", async (t) => {
217
- if (os.platform() !== "win32") {
218
- t.skip("Requires a real Windows kernel: archive() does filesystem I/O, " +
219
- "and backslash-separated paths are only directory separators on " +
220
- "Windows. Not emulable by stubbing process.platform.");
221
- return;
222
- }
223
- const windowsPath = testTmpPath.replace(/\//g, "\\");
224
- const result = await archive({
225
- dir: windowsPath,
226
- account: "test-account",
227
- project: "test-project",
228
- authToken: "test-token",
229
- });
230
- assert.ok(result.tarball);
231
- assert.ok(result.metadata);
232
- await fs.unlink(result.tarball);
233
- });
234
- it("should handle forward slashes on all platforms", async () => {
235
- const unixStylePath = testTmpPath.replace(/\\/g, "/");
236
- const result = await archive({
237
- dir: unixStylePath,
238
- account: "test-account",
239
- project: "test-project",
240
- authToken: "test-token",
241
- });
242
- assert.ok(result.tarball);
243
- assert.ok(result.metadata);
244
- await fs.unlink(result.tarball);
245
- });
246
- });
247
- });
248
- //# sourceMappingURL=archive.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"archive.test.js","sourceRoot":"","sources":["../../src/deploy/archive.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAE/E,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAA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,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAG3B,MAAM,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,gDAAgD,EAAE,KAAK,IAAI,EAAE;YAC9D,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YAEtD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC;gBAC3B,GAAG,EAAE,aAAa;gBAClB,OAAO,EAAE,cAAc;gBACvB,OAAO,EAAE,cAAc;gBACvB,SAAS,EAAE,YAAY;aACxB,CAAC,CAAC;YAEH,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC1B,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAG3B,MAAM,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import assert from \"node:assert\";\nimport fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { afterEach, beforeEach, describe, it } from \"node:test\";\nimport { fileURLToPath } from \"node:url\";\nimport * as tar from \"tar\";\nimport { archive, createIgnoreFunction, generateMetadata } from \"./archive.js\";\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nconst testTmpPath = path.join(\n __dirname,\n \"..\",\n \"__tests__\",\n \"test-tmp\",\n \"archive\"\n);\n\ndescribe(\"Archive Path Handling\", () => {\n let originalCwd: string;\n\n beforeEach(async () => {\n // Save original cwd\n originalCwd = process.cwd();\n\n // Ensure test-tmp directory exists\n await fs.mkdir(testTmpPath, { recursive: true });\n\n // Create a minimal zuplo project structure\n await fs.writeFile(\n path.join(testTmpPath, \"zuplo.jsonc\"),\n JSON.stringify({ name: \"test-project\" }, null, 2)\n );\n\n // Create a .gitignore file\n await fs.writeFile(\n path.join(testTmpPath, \".gitignore\"),\n \"node_modules/\\n.env\\n\"\n );\n\n // Initialize a git repo (needed for generateMetadata)\n const { simpleGit } = await import(\"simple-git\");\n const git = simpleGit({ baseDir: testTmpPath });\n await git.init();\n await git.addConfig(\"user.name\", \"Test User\");\n await git.addConfig(\"user.email\", \"test@example.com\");\n await git.add(\".\");\n await git.commit(\"Initial commit\");\n });\n\n afterEach(async () => {\n // Restore original cwd\n process.chdir(originalCwd);\n\n // Clean up test files\n try {\n await fs.rm(testTmpPath, { recursive: true, force: true });\n } catch {\n // Ignore cleanup errors\n }\n });\n\n describe(\"archive with various --dir formats\", () => {\n it(\"should work with --dir=. (current directory)\", async () => {\n // Change to test directory\n process.chdir(testTmpPath);\n\n const result = await archive({\n dir: \".\",\n account: \"test-account\",\n project: \"test-project\",\n authToken: \"test-token\",\n });\n\n assert.ok(result.tarball);\n assert.ok(result.metadata);\n // Branch name can be \"main\" or \"master\" depending on git configuration\n assert.ok(\n result.metadata.branch === \"main\" || result.metadata.branch === \"master\"\n );\n\n // Cleanup tarball\n await fs.unlink(result.tarball);\n });\n\n it(\"should work with --dir without argument (defaults to .)\", async () => {\n // Change to test directory\n process.chdir(testTmpPath);\n\n const result = await archive({\n dir: \".\",\n account: \"test-account\",\n project: \"test-project\",\n authToken: \"test-token\",\n });\n\n assert.ok(result.tarball);\n assert.ok(result.metadata);\n\n // Cleanup tarball\n await fs.unlink(result.tarball);\n });\n\n it(\"should work with absolute path\", async () => {\n const absolutePath = path.resolve(testTmpPath);\n\n const result = await archive({\n dir: absolutePath,\n account: \"test-account\",\n project: \"test-project\",\n authToken: \"test-token\",\n });\n\n assert.ok(result.tarball);\n assert.ok(result.metadata);\n\n // Cleanup tarball\n await fs.unlink(result.tarball);\n });\n\n it(\"should work with relative path from parent\", async () => {\n const parentDir = path.dirname(testTmpPath);\n const relativePath = path.relative(parentDir, testTmpPath);\n\n // Change to parent directory\n process.chdir(parentDir);\n\n const result = await archive({\n dir: relativePath,\n account: \"test-account\",\n project: \"test-project\",\n authToken: \"test-token\",\n });\n\n assert.ok(result.tarball);\n assert.ok(result.metadata);\n\n // Cleanup tarball\n await fs.unlink(result.tarball);\n });\n\n it(\"should work with ./relative/path format\", async () => {\n const parentDir = path.dirname(testTmpPath);\n const baseName = path.basename(testTmpPath);\n\n // Change to parent directory\n process.chdir(parentDir);\n\n const result = await archive({\n dir: `./${baseName}`,\n account: \"test-account\",\n project: \"test-project\",\n authToken: \"test-token\",\n });\n\n assert.ok(result.tarball);\n assert.ok(result.metadata);\n\n // Cleanup tarball\n await fs.unlink(result.tarball);\n });\n });\n\n describe(\"createIgnoreFunction with various path formats\", () => {\n it(\"should read .gitignore with absolute path\", async () => {\n const absolutePath = path.resolve(testTmpPath);\n const ignoreFn = createIgnoreFunction(absolutePath);\n\n assert.strictEqual(ignoreFn.ignores(\"node_modules/\"), true);\n assert.strictEqual(ignoreFn.ignores(\"src/index.ts\"), false);\n });\n\n it(\"should read .gitignore with relative path from cwd\", async () => {\n const parentDir = path.dirname(testTmpPath);\n const relativePath = path.relative(parentDir, testTmpPath);\n\n process.chdir(parentDir);\n\n const absolutePath = path.resolve(relativePath);\n const ignoreFn = createIgnoreFunction(absolutePath);\n\n assert.strictEqual(ignoreFn.ignores(\"node_modules/\"), true);\n assert.strictEqual(ignoreFn.ignores(\".git/\"), true);\n });\n\n it(\"should read .gitignore with . as directory\", async () => {\n process.chdir(testTmpPath);\n\n const absolutePath = path.resolve(\".\");\n const ignoreFn = createIgnoreFunction(absolutePath);\n\n assert.strictEqual(ignoreFn.ignores(\"node_modules/\"), true);\n assert.strictEqual(ignoreFn.ignores(\".env\"), true);\n });\n\n it(\"should prefer .zupignore over .gitignore\", async () => {\n await fs.writeFile(\n path.join(testTmpPath, \".zupignore\"),\n \"dist/\\n*.log\\n\"\n );\n\n const absolutePath = path.resolve(testTmpPath);\n const ignoreFn = createIgnoreFunction(absolutePath);\n\n assert.strictEqual(ignoreFn.ignores(\"dist/\"), true);\n assert.strictEqual(ignoreFn.ignores(\"test.log\"), true);\n // .zupignore doesn't have node_modules, but it should still ignore .git\n assert.strictEqual(ignoreFn.ignores(\".git/\"), true);\n });\n\n it(\"should always ignore .git directory\", async () => {\n // Remove .gitignore to test default behavior\n await fs.unlink(path.join(testTmpPath, \".gitignore\"));\n\n const absolutePath = path.resolve(testTmpPath);\n const ignoreFn = createIgnoreFunction(absolutePath);\n\n assert.strictEqual(ignoreFn.ignores(\".git/\"), true);\n assert.strictEqual(ignoreFn.ignores(\"node_modules/\"), true);\n });\n });\n\n describe(\"generateMetadata with various path formats\", () => {\n it(\"should generate metadata with absolute path\", async () => {\n const absolutePath = path.resolve(testTmpPath);\n\n const metadata = await generateMetadata({\n dir: absolutePath,\n account: \"test-account\",\n project: \"test-project\",\n authToken: \"test-token\",\n });\n\n assert.ok(metadata.branch);\n assert.ok(metadata.sha);\n // Branch name can be \"main\" or \"master\" depending on git configuration\n assert.ok(metadata.branch === \"main\" || metadata.branch === \"master\");\n });\n\n it(\"should generate metadata with . as directory\", async () => {\n process.chdir(testTmpPath);\n\n const metadata = await generateMetadata({\n dir: \".\",\n account: \"test-account\",\n project: \"test-project\",\n authToken: \"test-token\",\n });\n\n assert.ok(metadata.branch);\n assert.ok(metadata.sha);\n });\n\n it(\"should generate metadata with relative path\", async () => {\n const parentDir = path.dirname(testTmpPath);\n const relativePath = path.relative(parentDir, testTmpPath);\n\n process.chdir(parentDir);\n\n const metadata = await generateMetadata({\n dir: relativePath,\n account: \"test-account\",\n project: \"test-project\",\n authToken: \"test-token\",\n });\n\n assert.ok(metadata.branch);\n assert.ok(metadata.sha);\n });\n\n it(\"should use --environment flag over git branch\", async () => {\n const metadata = await generateMetadata({\n dir: testTmpPath,\n environment: \"production\",\n account: \"test-account\",\n project: \"test-project\",\n authToken: \"test-token\",\n });\n\n assert.strictEqual(metadata.branch, \"production\");\n assert.ok(metadata.sha);\n });\n });\n\n describe(\"archive structure validation\", () => {\n it(\"should create archive with relative paths, not absolute paths\", async () => {\n process.chdir(testTmpPath);\n\n // Create some test files\n await fs.mkdir(path.join(testTmpPath, \"config\"), { recursive: true });\n await fs.writeFile(\n path.join(testTmpPath, \"config\", \"routes.json\"),\n JSON.stringify({ routes: [] })\n );\n\n const result = await archive({\n dir: \".\",\n account: \"test-account\",\n project: \"test-project\",\n authToken: \"test-token\",\n });\n\n assert.ok(result.tarball);\n\n // Extract and verify the tar contents\n const files: string[] = [];\n\n await tar.list({\n file: result.tarball,\n onentry: (entry: tar.ReadEntry) => {\n files.push(entry.path);\n },\n });\n\n // Archive should contain relative paths like \"config/routes.json\"\n // NOT absolute paths like \"/Users/ntotten/.../config/routes.json\"\n assert.ok(\n files.some(\n (f) => f === \"config/routes.json\" || f === \"./config/routes.json\"\n ),\n `Expected to find config/routes.json in archive, but got: ${files.join(\", \")}`\n );\n\n // Verify paths don't contain the full testTmpPath\n const hasAbsolutePath = files.some((f) => f.includes(testTmpPath));\n assert.strictEqual(\n hasAbsolutePath,\n false,\n `Archive should not contain absolute paths, but found: ${files.filter((f) => f.includes(testTmpPath)).join(\", \")}`\n );\n\n // Cleanup\n await fs.unlink(result.tarball);\n });\n });\n\n describe(\"cross-platform path handling\", () => {\n // WINDOWS-ONLY, AND IT HAS TO STAY THAT WAY.\n //\n // Unlike the path-string tests elsewhere in the repo (xfs `safePath`,\n // codegen `toFileSystemPath`, cli `findTestFiles`), this one cannot be\n // made to run on Linux by stubbing `process.platform`. It asserts nothing\n // about string handling: `archive()` immediately does real I/O against the\n // real kernel — `resolve()` then `simpleGit({ baseDir })`, `mkdirSync`,\n // `readFileSync` and `tar.create({ cwd })`. Whether \"C:\\dir\\sub\" names a\n // directory is a question for the filesystem, and on Linux the answer is\n // no: a backslash is an ordinary, legal character in a filename, so the\n // path below resolves to one nonexistent entry and git/tar fail on it.\n // Stubbing `process.platform` would not change that — it does not change\n // what the kernel does with a backslash.\n //\n // So this stays gated on a real Windows runner. It reports as SKIPPED\n // rather than silently returning (which read as a pass), so the gap is\n // visible in the test output instead of inflating the green count.\n it(\"should normalize Windows-style paths on Windows\", async (t) => {\n if (os.platform() !== \"win32\") {\n t.skip(\n \"Requires a real Windows kernel: archive() does filesystem I/O, \" +\n \"and backslash-separated paths are only directory separators on \" +\n \"Windows. Not emulable by stubbing process.platform.\"\n );\n return;\n }\n\n // Windows path with backslashes\n const windowsPath = testTmpPath.replace(/\\//g, \"\\\\\");\n\n const result = await archive({\n dir: windowsPath,\n account: \"test-account\",\n project: \"test-project\",\n authToken: \"test-token\",\n });\n\n assert.ok(result.tarball);\n assert.ok(result.metadata);\n\n // Cleanup tarball\n await fs.unlink(result.tarball);\n });\n\n it(\"should handle forward slashes on all platforms\", async () => {\n const unixStylePath = testTmpPath.replace(/\\\\/g, \"/\");\n\n const result = await archive({\n dir: unixStylePath,\n account: \"test-account\",\n project: \"test-project\",\n authToken: \"test-token\",\n });\n\n assert.ok(result.tarball);\n assert.ok(result.metadata);\n\n // Cleanup tarball\n await fs.unlink(result.tarball);\n });\n });\n});\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=classify-build-probe.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"classify-build-probe.test.d.ts","sourceRoot":"","sources":["../../src/deploy/classify-build-probe.test.ts"],"names":[],"mappings":""}
@@ -1,51 +0,0 @@
1
- import { describe, it } from "node:test";
2
- import { assert } from "chai";
3
- import { classifyBuildProbeResponse } from "./classify-build-probe.js";
4
- const FALLBACK_INIT_ERROR_DETAIL = "The gateway failed to initialize after deployment. Check the deployment logs for details.";
5
- function initErrorBody(overrides = {}) {
6
- return JSON.stringify({
7
- status: 500,
8
- title: "Gateway Initialization Error",
9
- type: "https://httpproblems.com/http-status/500",
10
- detail: "Value of 'allowedOrigins' on custom cors policies is invalid.",
11
- trace: { timestamp: 0, buildId: "build-new" },
12
- ...overrides,
13
- });
14
- }
15
- describe("classifyBuildProbeResponse", () => {
16
- it("classifies a gateway initialization error with its build ID and detail", () => {
17
- assert.deepEqual(classifyBuildProbeResponse(500, initErrorBody()), {
18
- type: "init-error",
19
- buildId: "build-new",
20
- detail: "Value of 'allowedOrigins' on custom cors policies is invalid.",
21
- });
22
- });
23
- it("uses a fallback detail when the problem omits detail", () => {
24
- assert.deepEqual(classifyBuildProbeResponse(500, initErrorBody({ detail: undefined })), {
25
- type: "init-error",
26
- buildId: "build-new",
27
- detail: FALLBACK_INIT_ERROR_DETAIL,
28
- });
29
- });
30
- it("returns an undefined build ID when the trace omits it", () => {
31
- assert.deepEqual(classifyBuildProbeResponse(500, initErrorBody({ trace: {} })), {
32
- type: "init-error",
33
- buildId: undefined,
34
- detail: "Value of 'allowedOrigins' on custom cors policies is invalid.",
35
- });
36
- });
37
- for (const [name, status, body] of [
38
- ["a different error title", 500, initErrorBody({ title: "Other Error" })],
39
- ["a non-500 response", 503, initErrorBody()],
40
- ["non-JSON HTML", 500, "<html>unavailable</html>"],
41
- ["an empty body", 500, ""],
42
- ["an undefined body", 500, undefined],
43
- ]) {
44
- it(`treats ${name} as inconclusive`, () => {
45
- assert.deepEqual(classifyBuildProbeResponse(status, body), {
46
- type: "inconclusive",
47
- });
48
- });
49
- }
50
- });
51
- //# sourceMappingURL=classify-build-probe.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"classify-build-probe.test.js","sourceRoot":"","sources":["../../src/deploy/classify-build-probe.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,MAAM,0BAA0B,GAC9B,2FAA2F,CAAC;AAE9F,SAAS,aAAa,CAAC,YAAqC,EAAE;IAC5D,OAAO,IAAI,CAAC,SAAS,CAAC;QACpB,MAAM,EAAE,GAAG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E,aAAa,EAAE,CAAC;QAC5C,CAAC,eAAe,EAAE,GAAG,EAAE,0BAA0B,CAAC;QAClD,CAAC,eAAe,EAAE,GAAG,EAAE,EAAE,CAAC;QAC1B,CAAC,mBAAmB,EAAE,GAAG,EAAE,SAAS,CAAC;KAC7B,EAAE,CAAC;QACX,EAAE,CAAC,UAAU,IAAI,kBAAkB,EAAE,GAAG,EAAE;YACxC,MAAM,CAAC,SAAS,CAAC,0BAA0B,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;gBACzD,IAAI,EAAE,cAAc;aACrB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC","sourcesContent":["import { describe, it } from \"node:test\";\nimport { assert } from \"chai\";\nimport { classifyBuildProbeResponse } from \"./classify-build-probe.js\";\n\nconst FALLBACK_INIT_ERROR_DETAIL =\n \"The gateway failed to initialize after deployment. Check the deployment logs for details.\";\n\nfunction initErrorBody(overrides: Record<string, unknown> = {}): string {\n return JSON.stringify({\n status: 500,\n title: \"Gateway Initialization Error\",\n type: \"https://httpproblems.com/http-status/500\",\n detail: \"Value of 'allowedOrigins' on custom cors policies is invalid.\",\n trace: { timestamp: 0, buildId: \"build-new\" },\n ...overrides,\n });\n}\n\ndescribe(\"classifyBuildProbeResponse\", () => {\n it(\"classifies a gateway initialization error with its build ID and detail\", () => {\n assert.deepEqual(classifyBuildProbeResponse(500, initErrorBody()), {\n type: \"init-error\",\n buildId: \"build-new\",\n detail: \"Value of 'allowedOrigins' on custom cors policies is invalid.\",\n });\n });\n\n it(\"uses a fallback detail when the problem omits detail\", () => {\n assert.deepEqual(\n classifyBuildProbeResponse(500, initErrorBody({ detail: undefined })),\n {\n type: \"init-error\",\n buildId: \"build-new\",\n detail: FALLBACK_INIT_ERROR_DETAIL,\n }\n );\n });\n\n it(\"returns an undefined build ID when the trace omits it\", () => {\n assert.deepEqual(\n classifyBuildProbeResponse(500, initErrorBody({ trace: {} })),\n {\n type: \"init-error\",\n buildId: undefined,\n detail: \"Value of 'allowedOrigins' on custom cors policies is invalid.\",\n }\n );\n });\n\n for (const [name, status, body] of [\n [\"a different error title\", 500, initErrorBody({ title: \"Other Error\" })],\n [\"a non-500 response\", 503, initErrorBody()],\n [\"non-JSON HTML\", 500, \"<html>unavailable</html>\"],\n [\"an empty body\", 500, \"\"],\n [\"an undefined body\", 500, undefined],\n ] as const) {\n it(`treats ${name} as inconclusive`, () => {\n assert.deepEqual(classifyBuildProbeResponse(status, body), {\n type: \"inconclusive\",\n });\n });\n }\n});\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=poll-deployment.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"poll-deployment.test.d.ts","sourceRoot":"","sources":["../../src/deploy/poll-deployment.test.ts"],"names":[],"mappings":""}