@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
@@ -22,5 +22,5 @@
22
22
  * DEALINGS IN THE SOFTWARE.
23
23
  *--------------------------------------------------------------------------------------------*/
24
24
 
25
- import{E as p,J as c,M as u}from"../chunk-6YPRGG62.js";import"../chunk-VTO3F6DK.js";import{a as d}from"../chunk-QGAJTUPE.js";import"../chunk-A3QGJZO7.js";import"../chunk-YJ2BHVUH.js";import{aa as i}from"../chunk-PBDT4FDO.js";import{a as o}from"../chunk-TYV53J3B.js";function w(l={request:new Request("https://api.example.com")}){let e=[];function t(s){e.push(Promise.resolve(s))}return o(t,"waitUntil"),{context:new a({event:{waitUntil:t},route:l.route,originalRequest:l.request}),invokeResponse:o(async()=>{await Promise.all(e)},"invokeResponse")}}o(w,"createMockContext");var g={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:o(()=>({}),"raw")},a=class extends EventTarget{static{o(this,"MockZuploContext")}#e;#t;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:t=g,parentContext:n,originalRequest:r}){super(),this.requestId=crypto.randomUUID(),this.contextId=crypto.randomUUID(),this.log={info:i.console.info,log:i.console.log,debug:i.console.debug,warn:i.console.warn,error:i.console.error,setLogProperties:o(()=>{},"setLogProperties")},this.custom={},this.route=t,this.incomingRequestProperties={ip:"203.0.113.7",asn:1234,asOrganization:"ORGANIZATION",city:"Seattle",region:"Washington",regionCode:"WA",colo:"SEA",continent:"NA",country:"US",postalCode:"98004",metroCode:"SEA",latitude:void 0,longitude:void 0,timezone:void 0,httpProtocol:void 0,clientCert:void 0,clientMtlsVerificationStatus:void 0,clientMtlsVerificationReason:void 0,clientCertFingerprintSha256:void 0,clientCertNotBefore:void 0,clientCertNotAfter:void 0,clientCertIssuerDn:void 0,clientCertSubjectDn:void 0},this.parentContext=n,this.#e=e,this.#t=r,this.analyticsContext=new c(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,t){throw new Error("Not implemented")}invokeOutboundPolicy(e,t,n){throw new Error("Not implemented")}invokeRoute(e,t){throw new Error("Not implemented")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addPreRequestHandler(e,t){let n;try{n=u.getContextExtensions(this)}catch{n=u.initialize(this,new d(this.#t??new Request("https://api.example.com")))}n.preRequestPhase??="active",p(this,n,e,t)}get preRequestHandlers(){let e;try{e=u.getContextExtensions(this)}catch{return[]}return(e.preRequestState?.entries??[]).map(t=>({policyName:t.policyName,name:t.name}))}addEventListener(e,t,n){let r=o(s=>{try{typeof t=="function"?t(s):t.handleEvent(s)}catch(m){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),m}},"wrapped");super.addEventListener(e,r,n)}};export{a as MockZuploContext,w as createMockContext};
25
+ import{E as p,J as c,M as u}from"../chunk-TPYCFLC7.js";import"../chunk-NUVXDVLJ.js";import{a as d}from"../chunk-QGAJTUPE.js";import"../chunk-A3QGJZO7.js";import"../chunk-CDEAY3VY.js";import{aa as i}from"../chunk-LVSZ3WTO.js";import{a as o}from"../chunk-TYV53J3B.js";function w(l={request:new Request("https://api.example.com")}){let e=[];function t(s){e.push(Promise.resolve(s))}return o(t,"waitUntil"),{context:new a({event:{waitUntil:t},route:l.route,originalRequest:l.request}),invokeResponse:o(async()=>{await Promise.all(e)},"invokeResponse")}}o(w,"createMockContext");var g={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:o(()=>({}),"raw")},a=class extends EventTarget{static{o(this,"MockZuploContext")}#e;#t;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:t=g,parentContext:n,originalRequest:r}){super(),this.requestId=crypto.randomUUID(),this.contextId=crypto.randomUUID(),this.log={info:i.console.info,log:i.console.log,debug:i.console.debug,warn:i.console.warn,error:i.console.error,setLogProperties:o(()=>{},"setLogProperties")},this.custom={},this.route=t,this.incomingRequestProperties={ip:"203.0.113.7",asn:1234,asOrganization:"ORGANIZATION",city:"Seattle",region:"Washington",regionCode:"WA",colo:"SEA",continent:"NA",country:"US",postalCode:"98004",metroCode:"SEA",latitude:void 0,longitude:void 0,timezone:void 0,httpProtocol:void 0,clientCert:void 0,clientMtlsVerificationStatus:void 0,clientMtlsVerificationReason:void 0,clientCertFingerprintSha256:void 0,clientCertNotBefore:void 0,clientCertNotAfter:void 0,clientCertIssuerDn:void 0,clientCertSubjectDn:void 0},this.parentContext=n,this.#e=e,this.#t=r,this.analyticsContext=new c(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,t){throw new Error("Not implemented")}invokeOutboundPolicy(e,t,n){throw new Error("Not implemented")}invokeRoute(e,t){throw new Error("Not implemented")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addPreRequestHandler(e,t){let n;try{n=u.getContextExtensions(this)}catch{n=u.initialize(this,new d(this.#t??new Request("https://api.example.com")))}n.preRequestPhase??="active",p(this,n,e,t)}get preRequestHandlers(){let e;try{e=u.getContextExtensions(this)}catch{return[]}return(e.preRequestState?.entries??[]).map(t=>({policyName:t.policyName,name:t.name}))}addEventListener(e,t,n){let r=o(s=>{try{typeof t=="function"?t(s):t.handleEvent(s)}catch(m){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),m}},"wrapped");super.addEventListener(e,r,n)}};export{a as MockZuploContext,w as createMockContext};
26
26
  //# sourceMappingURL=index.js.map
@@ -22,5 +22,5 @@
22
22
  * DEALINGS IN THE SOFTWARE.
23
23
  *--------------------------------------------------------------------------------------------*/
24
24
 
25
- import{H as a,I as l,J as c,K as o,N as p,O as y,P as m}from"../../chunk-YJ2BHVUH.js";import"../../chunk-PBDT4FDO.js";import{a as i}from"../../chunk-TYV53J3B.js";async function g(r,e){let t=typeof e.credentials=="function"?await e.credentials():e.credentials,n=r.method,d=n!=="GET"&&n!=="HEAD"&&r.body!=null?await r.arrayBuffer():null,s=await new o({method:n,url:r.url,headers:r.headers,body:d,accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,sessionToken:t.sessionToken,service:e.service,region:e.region,signQuery:e.signQuery}).sign();return new Request(s.url.toString(),{method:s.method,headers:s.headers,body:s.body})}i(g,"signRequest");export{c as AwsClient,o as AwsV4Signer,p as fromTemporaryCredentials,y as fromWebToken,m as fromZuploIdentity,l as getAwsCredentialProvider,a as setAwsCredentialProvider,g as signRequest};
25
+ import{H as a,I as l,J as c,K as o,N as p,O as y,P as m}from"../../chunk-CDEAY3VY.js";import"../../chunk-LVSZ3WTO.js";import{a as i}from"../../chunk-TYV53J3B.js";async function g(r,e){let t=typeof e.credentials=="function"?await e.credentials():e.credentials,n=r.method,d=n!=="GET"&&n!=="HEAD"&&r.body!=null?await r.arrayBuffer():null,s=await new o({method:n,url:r.url,headers:r.headers,body:d,accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,sessionToken:t.sessionToken,service:e.service,region:e.region,signQuery:e.signQuery}).sign();return new Request(s.url.toString(),{method:s.method,headers:s.headers,body:s.body})}i(g,"signRequest");export{c as AwsClient,o as AwsV4Signer,p as fromTemporaryCredentials,y as fromWebToken,m as fromZuploIdentity,l as getAwsCredentialProvider,a as setAwsCredentialProvider,g as signRequest};
26
26
  //# sourceMappingURL=index.js.map
@@ -598,10 +598,11 @@ export declare interface AIGatewayLoadBalancingInboundPolicyOptions {
598
598
  /* Excluded from this release type: AIGatewayMeterIncrements */
599
599
 
600
600
  /**
601
- * Meters AI Gateway usage and enforces limits configured by the application.
601
+ * Meters AI Gateway usage for the application.
602
602
  *
603
603
  * The authentication policy must run before this policy so the app
604
- * configuration id is available for meter storage and analytics.
604
+ * configuration id is available for meter storage and analytics. Budgets are
605
+ * declared with `budgetRules` and enforced by the configuration executor.
605
606
  *
606
607
  * @title AI Gateway Metering
607
608
  * @product ai-gateway
@@ -610,7 +611,7 @@ export declare interface AIGatewayLoadBalancingInboundPolicyOptions {
610
611
  * @param context - The ZuploContext
611
612
  * @param options - The policy options set in policies.json
612
613
  * @param policyName - The name of the policy as set in policies.json
613
- * @returns The request, or a 429 response when a limit is exceeded
614
+ * @returns The request
614
615
  */
615
616
  declare class AIGatewayMeteringInboundPolicy extends InboundPolicy<AIGatewayMeteringInboundPolicyOptions> {
616
617
  #private;
@@ -646,22 +647,17 @@ declare class AIGatewayMeteringInboundPolicy extends InboundPolicy<AIGatewayMete
646
647
  context: ZuploContext
647
648
  ): Promise<ZuploRequest | Response>;
648
649
  private resolveConfiguration;
649
- private fetchCurrentMeters;
650
- private checkWarnings;
651
- private hasWarning;
652
- private findViolation;
653
- private createQuotaExceededResponse;
654
650
  }
655
651
  export { AIGatewayMeteringInboundPolicy };
656
652
  export { AIGatewayMeteringInboundPolicy as AIGatewayMeteringV2InboundPolicy };
657
653
 
658
654
  /**
659
- * Options for metering AI Gateway usage and enforcing request-time limits.
655
+ * Options for metering AI Gateway usage and declaring budget rules.
660
656
  * @public
661
657
  */
662
658
  declare interface AIGatewayMeteringInboundPolicyOptions {
663
659
  /**
664
- * Throw when the metering service is unavailable instead of failing open.
660
+ * Fail the request instead of logging the error when recording usage with the metering service fails.
665
661
  */
666
662
  throwOnFailure?: boolean;
667
663
  /**
@@ -689,7 +685,7 @@ declare interface AIGatewayMeteringInboundPolicyOptions {
689
685
  ];
690
686
  /**
691
687
  * @deprecated
692
- * Usage limits grouped by meter.
688
+ * Deprecated and not enforced. Declare budgets with budgetRules.
693
689
  */
694
690
  limits?: {
695
691
  costs?: QuotaLimit;
@@ -701,7 +697,10 @@ export { AIGatewayMeteringInboundPolicyOptions };
701
697
  export { AIGatewayMeteringInboundPolicyOptions as AIGatewayMeteringV2InboundPolicyOptions };
702
698
 
703
699
  /**
704
- * Usage-limit settings accepted by the `options.limits` policy option.
700
+ * Shape of the deprecated `options.limits` policy option. It is not enforced;
701
+ * declare budgets with `budgetRules`.
702
+ *
703
+ * @deprecated Use `budgetRules`.
705
704
  */
706
705
  declare interface AIGatewayMeteringLimitOverrides {
707
706
  costs?: AIGatewayMeteringMeterLimitOverrides;
@@ -1310,15 +1309,6 @@ export declare interface AIGatewaySmartRouterResult {
1310
1309
  profile: AIGatewaySmartRouterProfile;
1311
1310
  usage: AIGatewaySmartRouterTokenUsage;
1312
1311
  classifierModel: string;
1313
- /**
1314
- * Classifier cost in USD, separate from the routed model's cost. An unpriced
1315
- * zero means unknown, not free. Optional for results written by older code.
1316
- */
1317
- cost?: {
1318
- costUsd: number;
1319
- source: "provider" | "catalog" | "unpriced";
1320
- accuracy: "exact" | "estimated" | "unpriced";
1321
- };
1322
1312
  routing: AIGatewaySmartRouterRoutingDecision;
1323
1313
  durationMs: number;
1324
1314
  promptSource: AIGatewaySmartRouterPromptSource;
@@ -1343,9 +1333,7 @@ export declare interface AIGatewaySmartRouterRoutingDecision {
1343
1333
  }
1344
1334
 
1345
1335
  /**
1346
- * Classifier token usage from gateway accounting for app classifiers. Missing
1347
- * accounting headers produce zero counts, without a provider-body fallback.
1348
- * Deprecated direct classifiers retain the provider-reported counts; for Jev,
1336
+ * Classifier token usage reported in the classifier response body. For Jev,
1349
1337
  * input and output tokens map directly to these fields.
1350
1338
  *
1351
1339
  * @public
@@ -1354,18 +1342,6 @@ export declare interface AIGatewaySmartRouterTokenUsage {
1354
1342
  inputTokens: number;
1355
1343
  outputTokens: number;
1356
1344
  totalTokens: number;
1357
- /** Disjoint accounting categories already included in the totals above. */
1358
- breakdown?: {
1359
- uncachedInputTokens: number;
1360
- cacheReadInputTokens?: number;
1361
- /** Cache writes grouped by TTL when accounting reports that detail. */
1362
- cacheWriteInput?: Array<{
1363
- tokens: number;
1364
- cacheTtl?: "5m" | "1h";
1365
- }>;
1366
- visibleOutputTokens: number;
1367
- reasoningOutputTokens?: number;
1368
- };
1369
1345
  }
1370
1346
 
1371
1347
  /**
@@ -3834,7 +3810,7 @@ declare type Claim = string;
3834
3810
  declare type ClaimCheck = EqualsRule | InRule | StartsWithRule;
3835
3811
 
3836
3812
  /**
3837
- * Where the prompt is classified. Set `app.adapter` to select the API that classifier app exposes.
3813
+ * Where the prompt is classified. Set `app.dialect` to select the API that classifier app exposes.
3838
3814
  * @public
3839
3815
  */
3840
3816
  declare interface Classifier {
@@ -3851,14 +3827,15 @@ declare interface ClassifierApp {
3851
3827
  appId: ClassifierAppID_2;
3852
3828
  model: ClassifierModel_2;
3853
3829
  apiKey?: ClassifierAppAPIKey;
3854
- adapter?: ClassifierAppAdapter;
3830
+ dialect?: ClassifierAppDialect;
3831
+ adapter?: ClassifierAppAdapterDeprecated;
3855
3832
  }
3856
3833
 
3857
3834
  /**
3858
- * API contract exposed by the classifier app. `chat-completions` calls /v1/chat/completions; `messages` calls /v1/messages for Claude models that support structured outputs (`output_config.format`), such as `claude-haiku-4-5`, on a provider whose Messages endpoint accepts them (not Amazon Bedrock Mantle); `system-one` calls /v1/systemone for models such as Jev. The app owns provider credentials, pricing, metering and analytics.
3835
+ * **Deprecated**: use `classifier.app.dialect` instead. Still honored when `dialect` is not set; setting both is a configuration error.
3859
3836
  * @public
3860
3837
  */
3861
- declare type ClassifierAppAdapter =
3838
+ declare type ClassifierAppAdapterDeprecated =
3862
3839
  | "chat-completions"
3863
3840
  | "messages"
3864
3841
  | "system-one";
@@ -3875,6 +3852,15 @@ declare type ClassifierAppAPIKey = string;
3875
3852
  */
3876
3853
  declare type ClassifierAppAPIKeyDeprecated = string;
3877
3854
 
3855
+ /**
3856
+ * API contract exposed by the classifier app. `chat-completions` calls /v1/chat/completions; `messages` calls /v1/messages for Claude models that support structured outputs (`output_config.format`), such as `claude-haiku-4-5`, on a provider whose Messages endpoint accepts them (not Amazon Bedrock Mantle); `system-one` calls /v1/systemone for models such as Jev. The app owns provider credentials, pricing, metering and analytics.
3857
+ * @public
3858
+ */
3859
+ declare type ClassifierAppDialect =
3860
+ | "chat-completions"
3861
+ | "messages"
3862
+ | "system-one";
3863
+
3878
3864
  /**
3879
3865
  * Run the classifier on another AI Gateway app instead of calling an external API directly. The gateway invokes that app in-process — no outbound HTTP hop — so the classifier inherits its provider credentials, model routing, fallbacks and quotas, and provider keys stay on one app. Give that app the Internal Only policy and `apiKey` is not needed at all. When set, `model` must name a routed model as `provider/model` and `baseUrl` must not be set. The target app must not itself run this policy: it would be asked to classify its own classification request, which is rejected as a configuration error rather than silently skipped. Omit to call `baseUrl` directly.
3880
3866
  * @public
@@ -3900,7 +3886,7 @@ declare type ClassifierAppIDDeprecated = string;
3900
3886
  declare type ClassifierModel = string;
3901
3887
 
3902
3888
  /**
3903
- * The model (`providerName/model`) the classifier app uses to evaluate the user's request. `providerName` is the name of the provider as configured on the classifier app, not a fixed vendor id. E.g. `openai/gpt-4o-mini`, `anthropic/claude-haiku-4-5` with the `messages` adapter, or `jev/jev-latest` when the Jev provider is named `jev`.
3889
+ * The model (`providerName/model`) the classifier app uses to evaluate the user's request. `providerName` is the name of the provider as configured on the classifier app, not a fixed vendor id. E.g. `openai/gpt-4o-mini`, `anthropic/claude-haiku-4-5` with the `messages` dialect, or `jev/jev-latest` when the Jev provider is named `jev`.
3904
3890
  * @public
3905
3891
  */
3906
3892
  declare type ClassifierModel_2 = string;
@@ -3918,7 +3904,7 @@ declare type ClassifierModelDeprecated = string;
3918
3904
  declare type ClassifierPrompt = string | [string, ...string[]];
3919
3905
 
3920
3906
  /**
3921
- * Prompt for classifier.app (its default `chat-completions` adapter or the `messages` adapter, where it is sent as the system prompt) and classifier.chatCompletions. Omit to use the built-in prompt. classifier.app.adapter `system-one` and classifier.jev take no prompt; combining them with classifierPrompt is a configuration error.
3907
+ * Prompt for classifier.app (its default `chat-completions` dialect or the `messages` dialect, where it is sent as the system prompt) and classifier.chatCompletions. Omit to use the built-in prompt. classifier.app.dialect `system-one` and classifier.jev take no prompt; combining them with classifierPrompt is a configuration error.
3922
3908
  * @public
3923
3909
  */
3924
3910
  declare type ClassifierPrompt_2 = string | [string, ...string[]];
@@ -4195,6 +4181,20 @@ declare interface CompatibilityFlags {
4195
4181
  * discover tools with `tools/list`, as the MCP spec defines.
4196
4182
  */
4197
4183
  removeMcpToolsCapabilityExtension: boolean;
4184
+ /**
4185
+ * Whether the MCP server handler reports a `tools/call` whose arguments fail
4186
+ * the tool's `inputSchema` as a tool result with `isError: true`, as
4187
+ * MCP 2025-11-25 specifies for input validation errors.
4188
+ *
4189
+ * Before this flag: Invalid arguments return a JSON-RPC `-32602` error.
4190
+ *
4191
+ * After this flag: When the request's `MCP-Protocol-Version` header is
4192
+ * `2025-11-25` or later, invalid arguments return a result with
4193
+ * `isError: true` and the validation message as text content, and the tool
4194
+ * is not called. Earlier or missing protocol versions still return
4195
+ * `-32602`. Unknown tools and malformed requests return `-32602` either way.
4196
+ */
4197
+ returnMcpToolInputErrorsAsToolResults: boolean;
4198
4198
  /**
4199
4199
  * Whether OpenAPI schema combinators (`allOf`, `oneOf`, `anyOf`, `not`) are
4200
4200
  * applied with JSON Schema semantics when an operation's schemas are turned
@@ -8346,7 +8346,7 @@ declare type JevModel = string;
8346
8346
 
8347
8347
  /**
8348
8348
  * @deprecated
8349
- * Deprecated: use `classifier.app` with `adapter` `system-one` instead. Classify with Jev, TypeSafe's classification model, by calling a System One API directly: TypeSafe's by default, or another host such as OpenRouter through `baseUrl`. Jev answers typed questions instead of generating text, so it takes no `classifierPrompt`.
8349
+ * Deprecated: use `classifier.app` with `dialect` `system-one` instead. Classify with Jev, TypeSafe's classification model, by calling a System One API directly: TypeSafe's by default, or another host such as OpenRouter through `baseUrl`. Jev answers typed questions instead of generating text, so it takes no `classifierPrompt`.
8350
8350
  * @public
8351
8351
  */
8352
8352
  declare interface JevTypeSafe {
@@ -154,6 +154,20 @@ declare interface CompatibilityFlags {
154
154
  * discover tools with `tools/list`, as the MCP spec defines.
155
155
  */
156
156
  removeMcpToolsCapabilityExtension: boolean;
157
+ /**
158
+ * Whether the MCP server handler reports a `tools/call` whose arguments fail
159
+ * the tool's `inputSchema` as a tool result with `isError: true`, as
160
+ * MCP 2025-11-25 specifies for input validation errors.
161
+ *
162
+ * Before this flag: Invalid arguments return a JSON-RPC `-32602` error.
163
+ *
164
+ * After this flag: When the request's `MCP-Protocol-Version` header is
165
+ * `2025-11-25` or later, invalid arguments return a result with
166
+ * `isError: true` and the validation message as text content, and the tool
167
+ * is not called. Earlier or missing protocol versions still return
168
+ * `-32602`. Unknown tools and malformed requests return `-32602` either way.
169
+ */
170
+ returnMcpToolInputErrorsAsToolResults: boolean;
157
171
  /**
158
172
  * Whether OpenAPI schema combinators (`allOf`, `oneOf`, `anyOf`, `not`) are
159
173
  * applied with JSON Schema semantics when an operation's schemas are turned
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "7.11.0",
4
+ "version": "7.11.3",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/cli",
3
- "version": "7.11.0",
3
+ "version": "7.11.3",
4
4
  "repository": "https://github.com/zuplo/zuplo",
5
5
  "author": "Zuplo, Inc.",
6
6
  "type": "module",
@@ -18,7 +18,10 @@
18
18
  "LICENSE.txt",
19
19
  "dist/**",
20
20
  "*.js",
21
- "*.d.ts"
21
+ "*.d.ts",
22
+ "!dist/**/*.test.*",
23
+ "!dist/**/*.spec.*",
24
+ "!dist/**/__tests__/**"
22
25
  ],
23
26
  "bin": {
24
27
  "zup": "zup.js"
@@ -28,10 +31,10 @@
28
31
  "@opentelemetry/api": "1.9.0",
29
32
  "@opentelemetry/api-logs": "0.220.0",
30
33
  "@swc/core": "1.10.18",
31
- "@zuplo/core": "7.11.0",
34
+ "@zuplo/core": "7.11.3",
32
35
  "@zuplo/editor": "1.0.33162667821",
33
- "@zuplo/openapi-tools": "7.11.0",
34
- "@zuplo/runtime": "7.11.0",
36
+ "@zuplo/openapi-tools": "7.11.3",
37
+ "@zuplo/runtime": "7.11.3",
35
38
  "chalk": "5.4.1",
36
39
  "chokidar": "3.5.3",
37
40
  "cookie": "1.0.2",
@@ -62,15 +65,15 @@
62
65
  "workerd": "1.20261002.1",
63
66
  "yargs": "17.7.2",
64
67
  "zod": "4.4.3",
65
- "@zuplo/graphql": "7.11.0",
66
- "@zuplo/otel": "7.11.0"
68
+ "@zuplo/graphql": "7.11.3",
69
+ "@zuplo/otel": "7.11.3"
67
70
  },
68
71
  "optionalDependencies": {
69
- "@zuplo/lint-darwin-arm64": "7.11.0",
70
- "@zuplo/lint-darwin-x64": "7.11.0",
71
- "@zuplo/lint-linux-x64": "7.11.0",
72
- "@zuplo/lint-linux-arm64": "7.11.0",
73
- "@zuplo/lint-win32-x64": "7.11.0"
72
+ "@zuplo/lint-darwin-arm64": "7.11.3",
73
+ "@zuplo/lint-darwin-x64": "7.11.3",
74
+ "@zuplo/lint-linux-x64": "7.11.3",
75
+ "@zuplo/lint-linux-arm64": "7.11.3",
76
+ "@zuplo/lint-win32-x64": "7.11.3"
74
77
  },
75
78
  "bundleDependencies": [
76
79
  "@inquirer/prompts",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=archive-utils.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"archive-utils.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/archive-utils.test.ts"],"names":[],"mappings":""}
@@ -1,50 +0,0 @@
1
- import path from "node:path";
2
- import { describe, it } from "node:test";
3
- import { fileURLToPath } from "node:url";
4
- import { expect } from "chai";
5
- import ignore from "ignore";
6
- import { createIgnoreFunction, generateMetadata } from "../deploy/archive.js";
7
- const __filename = fileURLToPath(import.meta.url);
8
- const __dirname = path.dirname(__filename);
9
- const basicTestsPath = path.join(__dirname, "..", "..", "..", "..", "test-fixtures", "basic");
10
- describe("Archive utils", async function () {
11
- it("should not ignore .zuplo using gitignore", function () {
12
- const ignores = createIgnoreFunction(basicTestsPath);
13
- const expectedRules = ignore().add(".git/");
14
- expectedRules.add(".cache/");
15
- expectedRules.add("dist/");
16
- expectedRules.add("node_modules/");
17
- expectedRules.add(".env");
18
- expectedRules.add(".DS_Store");
19
- expect(ignores._rules).to.deep.equal(expectedRules._rules);
20
- });
21
- it("should return default metadata values", async function () {
22
- const results = await generateMetadata({
23
- account: "zuplo-test",
24
- project: "basic",
25
- dir: basicTestsPath,
26
- environment: "basic-1234",
27
- authToken: "",
28
- });
29
- expect(results).to.not.be.empty;
30
- expect(results.branch).to.equal("basic-1234");
31
- expect(results.repoUrl).to.not.be.null;
32
- expect(results.sha).to.not.be.null;
33
- });
34
- it("should allow metadata value override on repo url", async function () {
35
- const results = await generateMetadata({
36
- account: "zuplo-test",
37
- project: "basic",
38
- dir: basicTestsPath,
39
- environment: "basic-1234",
40
- authToken: "",
41
- "override-repo-url": "https://github.com/zuplo/test-override",
42
- });
43
- expect(results).to.not.be.empty;
44
- expect(results.branch).to.equal("basic-1234");
45
- expect(results.repoUrl).to.not.be.null;
46
- expect(results.repoUrl).to.equal("https://github.com/zuplo/test-override");
47
- expect(results.sha).to.not.be.null;
48
- });
49
- });
50
- //# sourceMappingURL=archive-utils.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"archive-utils.test.js","sourceRoot":"","sources":["../../src/__tests__/archive-utils.test.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE9E,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAE3C,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAC9B,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,eAAe,EACf,OAAO,CACR,CAAC;AAEF,QAAQ,CAAC,eAAe,EAAE,KAAK;IAC7B,EAAE,CAAC,0CAA0C,EAAE;QAC7C,MAAM,OAAO,GAAG,oBAAoB,CAAC,cAAc,CAAC,CAAC;QACrD,MAAM,aAAa,GAAI,MAAc,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACrD,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC7B,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3B,aAAa,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QACnC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC1B,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAE/B,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,KAAK;QAC/C,MAAM,OAAO,GAAG,MAAM,gBAAgB,CAAC;YACrC,OAAO,EAAE,YAAY;YACrB,OAAO,EAAE,OAAO;YAChB,GAAG,EAAE,cAAc;YACnB,WAAW,EAAE,YAAY;YACzB,SAAS,EAAE,EAAE;SACd,CAAC,CAAC;QAEH,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC;QAChC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC9C,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;QACvC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kDAAkD,EAAE,KAAK;QAC1D,MAAM,OAAO,GAAG,MAAM,gBAAgB,CAAC;YACrC,OAAO,EAAE,YAAY;YACrB,OAAO,EAAE,OAAO;YAChB,GAAG,EAAE,cAAc;YACnB,WAAW,EAAE,YAAY;YACzB,SAAS,EAAE,EAAE;YACb,mBAAmB,EAAE,wCAAwC;SAC9D,CAAC,CAAC;QAEH,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC;QAChC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC9C,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;QACvC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC3E,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import path from \"node:path\";\nimport { describe, it } from \"node:test\";\nimport { fileURLToPath } from \"node:url\";\nimport { expect } from \"chai\";\nimport ignore from \"ignore\";\nimport { createIgnoreFunction, generateMetadata } from \"../deploy/archive.js\";\n\nconst __filename = fileURLToPath(import.meta.url); // get the resolved path to the file\nconst __dirname = path.dirname(__filename); // get the name of the directory\n\nconst basicTestsPath = path.join(\n __dirname,\n \"..\",\n \"..\",\n \"..\",\n \"..\",\n \"test-fixtures\",\n \"basic\"\n);\n\ndescribe(\"Archive utils\", async function () {\n it(\"should not ignore .zuplo using gitignore\", function () {\n const ignores = createIgnoreFunction(basicTestsPath);\n const expectedRules = (ignore as any)().add(\".git/\");\n expectedRules.add(\".cache/\");\n expectedRules.add(\"dist/\");\n expectedRules.add(\"node_modules/\");\n expectedRules.add(\".env\");\n expectedRules.add(\".DS_Store\");\n\n expect(ignores._rules).to.deep.equal(expectedRules._rules);\n });\n\n it(\"should return default metadata values\", async function () {\n const results = await generateMetadata({\n account: \"zuplo-test\",\n project: \"basic\",\n dir: basicTestsPath,\n environment: \"basic-1234\",\n authToken: \"\",\n });\n\n expect(results).to.not.be.empty;\n expect(results.branch).to.equal(\"basic-1234\");\n expect(results.repoUrl).to.not.be.null;\n expect(results.sha).to.not.be.null;\n });\n\n it(\"should allow metadata value override on repo url\", async function () {\n const results = await generateMetadata({\n account: \"zuplo-test\",\n project: \"basic\",\n dir: basicTestsPath,\n environment: \"basic-1234\",\n authToken: \"\",\n \"override-repo-url\": \"https://github.com/zuplo/test-override\",\n });\n\n expect(results).to.not.be.empty;\n expect(results.branch).to.equal(\"basic-1234\");\n expect(results.repoUrl).to.not.be.null;\n expect(results.repoUrl).to.equal(\"https://github.com/zuplo/test-override\");\n expect(results.sha).to.not.be.null;\n });\n});\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=import-openapi.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"import-openapi.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/import-openapi.test.ts"],"names":[],"mappings":""}
@@ -1,251 +0,0 @@
1
- import fs from "node:fs/promises";
2
- import path from "node:path";
3
- import { afterEach, beforeEach, describe, it } from "node:test";
4
- import { fileURLToPath } from "node:url";
5
- import { expect } from "chai";
6
- import { createSandbox } from "sinon";
7
- import { importOpenApi } from "../open-api/merge/handler.js";
8
- const baseRoutesFileOnImportTests = {
9
- info: {
10
- version: "v2",
11
- title: "Zuplo test API V2",
12
- description: "Test api v2",
13
- contact: {
14
- name: "Zuplo test",
15
- url: "www.zuplo.com",
16
- },
17
- },
18
- openapi: "3.1.0",
19
- components: {
20
- parameters: {
21
- userUid: {
22
- name: "userUid",
23
- in: "path",
24
- description: "Unique UUID of the user.",
25
- required: true,
26
- schema: {
27
- type: "string",
28
- format: "uuid",
29
- },
30
- },
31
- },
32
- securitySchemes: {
33
- authorization: {
34
- type: "http",
35
- description: "Firebase JWT auth token",
36
- scheme: "bearer",
37
- },
38
- },
39
- },
40
- servers: [
41
- {
42
- url: "https://api.stage.example.com",
43
- description: "Stage",
44
- },
45
- {
46
- url: "https://api.example.com",
47
- description: "Prod",
48
- },
49
- ],
50
- security: [{}],
51
- tags: [],
52
- paths: {
53
- "/v1/second/{userUid}/nature": {
54
- post: {
55
- summary: "Test route",
56
- operationId: "12345",
57
- parameters: [
58
- {
59
- $ref: "#/components/parameters/userUid",
60
- },
61
- ],
62
- responses: {
63
- "200": {
64
- description: "",
65
- },
66
- },
67
- security: [{}],
68
- servers: [
69
- {
70
- url: "https://api.stage.example.com",
71
- description: "stage",
72
- },
73
- {
74
- url: "https://api.example.com",
75
- description: "production",
76
- },
77
- ],
78
- },
79
- },
80
- "/v2/second/{userUid}/nature": {
81
- post: {
82
- operationId: "67920",
83
- summary: "Test route v2",
84
- parameters: [
85
- {
86
- $ref: "#/components/parameters/userUid",
87
- },
88
- ],
89
- responses: {
90
- "200": {
91
- description: "",
92
- },
93
- },
94
- },
95
- },
96
- },
97
- };
98
- const __filename = fileURLToPath(import.meta.url);
99
- const __dirname = path.dirname(__filename);
100
- const testAssetsPath = path.join(__dirname, "..", "..", "src", "__tests__", "test-assets");
101
- const testTmpPath = path.join(__dirname, "..", "..", "src", "__tests__", "test-tmp");
102
- async function createOASFile(content, destinationPath) {
103
- try {
104
- const dir = path.dirname(destinationPath);
105
- await fs.mkdir(dir, { recursive: true });
106
- await fs.writeFile(destinationPath, content, "utf8");
107
- console.log(`File created successfully at ${destinationPath}`);
108
- }
109
- catch (error) {
110
- console.error(`Error creating file at ${destinationPath}:`, error);
111
- }
112
- }
113
- let sandbox;
114
- describe("Import open api file", async function () {
115
- let printExit;
116
- beforeEach(async function () {
117
- sandbox = createSandbox();
118
- printExit = sandbox.stub(process, "exit");
119
- });
120
- afterEach(() => {
121
- sandbox.restore();
122
- });
123
- it("should merge two existing files correctly", async function () {
124
- const destinationPath = path.join(testTmpPath, "config", "routes-test-one.oas.json");
125
- await createOASFile(JSON.stringify(baseRoutesFileOnImportTests), destinationPath);
126
- await importOpenApi({
127
- prompt: false,
128
- source: path.join(testAssetsPath, "toimport.oas.json"),
129
- destination: destinationPath,
130
- });
131
- const mergedContent = await fs.readFile(destinationPath, "utf-8");
132
- const jsonContent = JSON.parse(mergedContent);
133
- expect(jsonContent.paths).to.deep.equals({
134
- "/v1/second/{userUid}/nature": {
135
- post: {
136
- summary: "Test route",
137
- operationId: "12345",
138
- parameters: [
139
- {
140
- $ref: "#/components/parameters/userUid",
141
- },
142
- ],
143
- responses: {
144
- "200": {
145
- description: "",
146
- },
147
- },
148
- security: [{}],
149
- servers: [
150
- {
151
- url: "https://api.stage.example.com",
152
- description: "stage",
153
- },
154
- {
155
- url: "https://api.example.com",
156
- description: "production",
157
- },
158
- ],
159
- },
160
- },
161
- "/v2/second/{userUid}/nature": {
162
- post: {
163
- operationId: "67920",
164
- summary: "Test route v2",
165
- parameters: [
166
- {
167
- $ref: "#/components/parameters/userUid",
168
- },
169
- ],
170
- responses: {
171
- "200": {
172
- description: "",
173
- },
174
- },
175
- },
176
- },
177
- });
178
- });
179
- it("should import a file into a fs destination that does not yet exist", async function () {
180
- const destinationPath = path.join(testTmpPath, "routes-test-two.oas.json");
181
- await importOpenApi({
182
- prompt: false,
183
- source: path.join(testAssetsPath, "toimport.oas.json"),
184
- destination: destinationPath,
185
- });
186
- const mergedContent = await fs.readFile(destinationPath, "utf-8");
187
- const jsonContent = JSON.parse(mergedContent);
188
- expect(jsonContent.info).to.deep.equals({
189
- version: "v2",
190
- title: "Zuplo test API V2",
191
- description: "Test api v2",
192
- contact: {
193
- name: "Zuplo test",
194
- url: "www.zuplo.com",
195
- },
196
- });
197
- expect(jsonContent.openapi).to.equal("3.1.0");
198
- expect(jsonContent.components).to.deep.equals({
199
- parameters: {
200
- userUid: {
201
- name: "userUid",
202
- in: "path",
203
- description: "Unique UUID of the user.",
204
- required: true,
205
- schema: {
206
- type: "string",
207
- format: "uuid",
208
- },
209
- },
210
- },
211
- securitySchemes: {
212
- authorization: {
213
- type: "http",
214
- description: "Firebase JWT auth token",
215
- scheme: "bearer",
216
- },
217
- },
218
- });
219
- expect(jsonContent.servers).to.deep.equals([
220
- {
221
- url: "https://api.stage.example.com",
222
- description: "Stage",
223
- },
224
- {
225
- url: "https://api.example.com",
226
- description: "Prod",
227
- },
228
- ]);
229
- expect(jsonContent.security).to.deep.equals([{}]);
230
- expect(jsonContent.tags).to.deep.equals([]);
231
- expect(jsonContent.paths).to.deep.equals({
232
- "/v2/second/{userUid}/nature": {
233
- post: {
234
- summary: "Test route v2",
235
- operationId: "67920",
236
- parameters: [
237
- {
238
- $ref: "#/components/parameters/userUid",
239
- },
240
- ],
241
- responses: {
242
- "200": {
243
- description: "",
244
- },
245
- },
246
- },
247
- },
248
- });
249
- });
250
- });
251
- //# sourceMappingURL=import-openapi.test.js.map