@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.
- package/node_modules/@hono/node-server/README.md +2 -0
- package/node_modules/@hono/node-server/dist/index.cjs +1 -1
- package/node_modules/@hono/node-server/dist/index.mjs +1 -1
- package/node_modules/@hono/node-server/dist/serve-static.cjs +2 -1
- package/node_modules/@hono/node-server/dist/serve-static.mjs +2 -1
- package/node_modules/@hono/node-server/package.json +1 -1
- package/node_modules/@posthog/core/dist/metrics/index.d.ts +9 -0
- package/node_modules/@posthog/core/dist/metrics/index.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/metrics/index.js +38 -3
- package/node_modules/@posthog/core/dist/metrics/index.mjs +38 -3
- package/node_modules/@posthog/core/dist/metrics/types.d.ts +7 -2
- package/node_modules/@posthog/core/dist/metrics/types.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/traces/ids.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/traces/ids.js +2 -2
- package/node_modules/@posthog/core/dist/traces/ids.mjs +2 -2
- package/node_modules/@posthog/core/package.json +2 -2
- package/node_modules/@posthog/core/src/metrics/index.spec.ts +75 -0
- package/node_modules/@posthog/core/src/metrics/index.ts +60 -0
- package/node_modules/@posthog/core/src/metrics/types.ts +7 -1
- package/node_modules/@posthog/core/src/traces/ids.ts +4 -2
- package/node_modules/@posthog/types/dist/capture-metric.d.ts +10 -0
- package/node_modules/@posthog/types/dist/capture-metric.d.ts.map +1 -1
- package/node_modules/@posthog/types/dist/index.d.ts +1 -1
- package/node_modules/@posthog/types/dist/index.d.ts.map +1 -1
- package/node_modules/@posthog/types/package.json +1 -1
- package/node_modules/@posthog/types/src/capture-metric.ts +11 -0
- package/node_modules/@posthog/types/src/index.ts +1 -0
- package/node_modules/@zuplo/core/customer.cli.minified.js +80 -80
- package/node_modules/@zuplo/core/index.minified.js +85 -85
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +5 -2
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-YJ2BHVUH.js → chunk-CDEAY3VY.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/chunk-LVSZ3WTO.js +37 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-LVSZ3WTO.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-VTO3F6DK.js → chunk-NUVXDVLJ.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/{chunk-6YPRGG62.js → chunk-TPYCFLC7.js} +109 -109
- package/node_modules/@zuplo/runtime/out/esm/chunk-TPYCFLC7.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/internal/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +43 -43
- package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +14 -0
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/package.json +15 -12
- package/dist/__tests__/archive-utils.test.d.ts +0 -2
- package/dist/__tests__/archive-utils.test.d.ts.map +0 -1
- package/dist/__tests__/archive-utils.test.js +0 -50
- package/dist/__tests__/archive-utils.test.js.map +0 -1
- package/dist/__tests__/import-openapi.test.d.ts +0 -2
- package/dist/__tests__/import-openapi.test.d.ts.map +0 -1
- package/dist/__tests__/import-openapi.test.js +0 -251
- package/dist/__tests__/import-openapi.test.js.map +0 -1
- package/dist/__tests__/integration/confirm-linked-config.integration.test.d.ts +0 -2
- package/dist/__tests__/integration/confirm-linked-config.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/confirm-linked-config.integration.test.js +0 -202
- package/dist/__tests__/integration/confirm-linked-config.integration.test.js.map +0 -1
- package/dist/__tests__/integration/confirm-production-deploy.integration.test.d.ts +0 -2
- package/dist/__tests__/integration/confirm-production-deploy.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/confirm-production-deploy.integration.test.js +0 -184
- package/dist/__tests__/integration/confirm-production-deploy.integration.test.js.map +0 -1
- package/dist/__tests__/integration/custom-domain.integration.test.d.ts +0 -2
- package/dist/__tests__/integration/custom-domain.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/custom-domain.integration.test.js +0 -563
- package/dist/__tests__/integration/custom-domain.integration.test.js.map +0 -1
- package/dist/__tests__/integration/delete.integration.test.d.ts +0 -2
- package/dist/__tests__/integration/delete.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/delete.integration.test.js +0 -262
- package/dist/__tests__/integration/delete.integration.test.js.map +0 -1
- package/dist/__tests__/integration/deploy.integration.test.d.ts +0 -2
- package/dist/__tests__/integration/deploy.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/deploy.integration.test.js +0 -519
- package/dist/__tests__/integration/deploy.integration.test.js.map +0 -1
- package/dist/__tests__/integration/get-project-param.integration.test.d.ts +0 -2
- package/dist/__tests__/integration/get-project-param.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/get-project-param.integration.test.js +0 -305
- package/dist/__tests__/integration/get-project-param.integration.test.js.map +0 -1
- package/dist/__tests__/integration/info.integration.test.d.ts +0 -2
- package/dist/__tests__/integration/info.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/info.integration.test.js +0 -293
- package/dist/__tests__/integration/info.integration.test.js.map +0 -1
- package/dist/__tests__/integration/jest-mocks-setup.d.ts +0 -2
- package/dist/__tests__/integration/jest-mocks-setup.d.ts.map +0 -1
- package/dist/__tests__/integration/jest-mocks-setup.js +0 -104
- package/dist/__tests__/integration/jest-mocks-setup.js.map +0 -1
- package/dist/__tests__/integration/jest-setup.d.ts +0 -2
- package/dist/__tests__/integration/jest-setup.d.ts.map +0 -1
- package/dist/__tests__/integration/jest-setup.js +0 -12
- package/dist/__tests__/integration/jest-setup.js.map +0 -1
- package/dist/__tests__/integration/link.integration.test.d.ts +0 -2
- package/dist/__tests__/integration/link.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/link.integration.test.js +0 -395
- package/dist/__tests__/integration/link.integration.test.js.map +0 -1
- package/dist/__tests__/integration/linked-config-cascade.integration.test.d.ts +0 -2
- package/dist/__tests__/integration/linked-config-cascade.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/linked-config-cascade.integration.test.js +0 -179
- package/dist/__tests__/integration/linked-config-cascade.integration.test.js.map +0 -1
- package/dist/__tests__/integration/list.integration.test.d.ts +0 -2
- package/dist/__tests__/integration/list.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/list.integration.test.js +0 -300
- package/dist/__tests__/integration/list.integration.test.js.map +0 -1
- package/dist/__tests__/integration/source-upgrade.integration.test.d.ts +0 -2
- package/dist/__tests__/integration/source-upgrade.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/source-upgrade.integration.test.js +0 -100
- package/dist/__tests__/integration/source-upgrade.integration.test.js.map +0 -1
- package/dist/__tests__/integration/test-utils.d.ts +0 -30
- package/dist/__tests__/integration/test-utils.d.ts.map +0 -1
- package/dist/__tests__/integration/test-utils.js +0 -82
- package/dist/__tests__/integration/test-utils.js.map +0 -1
- package/dist/__tests__/integration/tunnel.integration.test.d.ts +0 -2
- package/dist/__tests__/integration/tunnel.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/tunnel.integration.test.js +0 -486
- package/dist/__tests__/integration/tunnel.integration.test.js.map +0 -1
- package/dist/__tests__/integration/variable.integration.test.d.ts +0 -2
- package/dist/__tests__/integration/variable.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/variable.integration.test.js +0 -258
- package/dist/__tests__/integration/variable.integration.test.js.map +0 -1
- package/dist/__tests__/integration/whoami.integration.test.d.ts +0 -2
- package/dist/__tests__/integration/whoami.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/whoami.integration.test.js +0 -116
- package/dist/__tests__/integration/whoami.integration.test.js.map +0 -1
- package/dist/__tests__/outdated.test.d.ts +0 -2
- package/dist/__tests__/outdated.test.d.ts.map +0 -1
- package/dist/__tests__/outdated.test.js +0 -67
- package/dist/__tests__/outdated.test.js.map +0 -1
- package/dist/__tests__/populate.test.d.ts +0 -2
- package/dist/__tests__/populate.test.d.ts.map +0 -1
- package/dist/__tests__/populate.test.js +0 -445
- package/dist/__tests__/populate.test.js.map +0 -1
- package/dist/__tests__/tsconfig-upgrader.test.d.ts +0 -2
- package/dist/__tests__/tsconfig-upgrader.test.d.ts.map +0 -1
- package/dist/__tests__/tsconfig-upgrader.test.js +0 -31
- package/dist/__tests__/tsconfig-upgrader.test.js.map +0 -1
- package/dist/ca-certificate/validation.test.d.ts +0 -2
- package/dist/ca-certificate/validation.test.d.ts.map +0 -1
- package/dist/ca-certificate/validation.test.js +0 -131
- package/dist/ca-certificate/validation.test.js.map +0 -1
- package/dist/common/analytics/cli-invocation.test.d.ts +0 -2
- package/dist/common/analytics/cli-invocation.test.d.ts.map +0 -1
- package/dist/common/analytics/cli-invocation.test.js +0 -51
- package/dist/common/analytics/cli-invocation.test.js.map +0 -1
- package/dist/common/analytics/package-manager.test.d.ts +0 -2
- package/dist/common/analytics/package-manager.test.d.ts.map +0 -1
- package/dist/common/analytics/package-manager.test.js +0 -163
- package/dist/common/analytics/package-manager.test.js.map +0 -1
- package/dist/common/cli-dispatcher.test.d.ts +0 -2
- package/dist/common/cli-dispatcher.test.d.ts.map +0 -1
- package/dist/common/cli-dispatcher.test.js +0 -80
- package/dist/common/cli-dispatcher.test.js.map +0 -1
- package/dist/common/middleware/check-pnpm-lifecycle.test.d.ts +0 -2
- package/dist/common/middleware/check-pnpm-lifecycle.test.d.ts.map +0 -1
- package/dist/common/middleware/check-pnpm-lifecycle.test.js +0 -125
- package/dist/common/middleware/check-pnpm-lifecycle.test.js.map +0 -1
- package/dist/common/middleware/get-environment-param.test.d.ts +0 -2
- package/dist/common/middleware/get-environment-param.test.d.ts.map +0 -1
- package/dist/common/middleware/get-environment-param.test.js +0 -57
- package/dist/common/middleware/get-environment-param.test.js.map +0 -1
- package/dist/common/read-linked-config.test.d.ts +0 -2
- package/dist/common/read-linked-config.test.d.ts.map +0 -1
- package/dist/common/read-linked-config.test.js +0 -363
- package/dist/common/read-linked-config.test.js.map +0 -1
- package/dist/common/terminal.test.d.ts +0 -2
- package/dist/common/terminal.test.d.ts.map +0 -1
- package/dist/common/terminal.test.js +0 -101
- package/dist/common/terminal.test.js.map +0 -1
- package/dist/common/utils/build-environment-prompt-choices.test.d.ts +0 -2
- package/dist/common/utils/build-environment-prompt-choices.test.d.ts.map +0 -1
- package/dist/common/utils/build-environment-prompt-choices.test.js +0 -97
- package/dist/common/utils/build-environment-prompt-choices.test.js.map +0 -1
- package/dist/common/utils/format-environment-type.test.d.ts +0 -2
- package/dist/common/utils/format-environment-type.test.d.ts.map +0 -1
- package/dist/common/utils/format-environment-type.test.js +0 -32
- package/dist/common/utils/format-environment-type.test.js.map +0 -1
- package/dist/common/utils/pnpm-lifecycle.test.d.ts +0 -2
- package/dist/common/utils/pnpm-lifecycle.test.d.ts.map +0 -1
- package/dist/common/utils/pnpm-lifecycle.test.js +0 -196
- package/dist/common/utils/pnpm-lifecycle.test.js.map +0 -1
- package/dist/common/utils/pretty-print-environment-prompt.test.d.ts +0 -2
- package/dist/common/utils/pretty-print-environment-prompt.test.d.ts.map +0 -1
- package/dist/common/utils/pretty-print-environment-prompt.test.js +0 -42
- package/dist/common/utils/pretty-print-environment-prompt.test.js.map +0 -1
- package/dist/common/utils/sort-environments-for-prompt.test.d.ts +0 -2
- package/dist/common/utils/sort-environments-for-prompt.test.d.ts.map +0 -1
- package/dist/common/utils/sort-environments-for-prompt.test.js +0 -82
- package/dist/common/utils/sort-environments-for-prompt.test.js.map +0 -1
- package/dist/common/utils/stringify-config.test.d.ts +0 -2
- package/dist/common/utils/stringify-config.test.d.ts.map +0 -1
- package/dist/common/utils/stringify-config.test.js +0 -80
- package/dist/common/utils/stringify-config.test.js.map +0 -1
- package/dist/common/validators/argument-validators.spec.d.ts +0 -2
- package/dist/common/validators/argument-validators.spec.d.ts.map +0 -1
- package/dist/common/validators/argument-validators.spec.js +0 -181
- package/dist/common/validators/argument-validators.spec.js.map +0 -1
- package/dist/common/worker-output.test.d.ts +0 -2
- package/dist/common/worker-output.test.d.ts.map +0 -1
- package/dist/common/worker-output.test.js +0 -32
- package/dist/common/worker-output.test.js.map +0 -1
- package/dist/deploy/archive.local-registry.test.d.ts +0 -2
- package/dist/deploy/archive.local-registry.test.d.ts.map +0 -1
- package/dist/deploy/archive.local-registry.test.js +0 -100
- package/dist/deploy/archive.local-registry.test.js.map +0 -1
- package/dist/deploy/archive.test.d.ts +0 -2
- package/dist/deploy/archive.test.d.ts.map +0 -1
- package/dist/deploy/archive.test.js +0 -248
- package/dist/deploy/archive.test.js.map +0 -1
- package/dist/deploy/classify-build-probe.test.d.ts +0 -2
- package/dist/deploy/classify-build-probe.test.d.ts.map +0 -1
- package/dist/deploy/classify-build-probe.test.js +0 -51
- package/dist/deploy/classify-build-probe.test.js.map +0 -1
- package/dist/deploy/poll-deployment.test.d.ts +0 -2
- package/dist/deploy/poll-deployment.test.d.ts.map +0 -1
- package/dist/deploy/poll-deployment.test.js +0 -158
- package/dist/deploy/poll-deployment.test.js.map +0 -1
- package/dist/dev/zuplo-local-gitignore.test.d.ts +0 -2
- package/dist/dev/zuplo-local-gitignore.test.d.ts.map +0 -1
- package/dist/dev/zuplo-local-gitignore.test.js +0 -58
- package/dist/dev/zuplo-local-gitignore.test.js.map +0 -1
- package/dist/editor/e2e/editor.spec.d.ts +0 -2
- package/dist/editor/e2e/editor.spec.d.ts.map +0 -1
- package/dist/editor/e2e/editor.spec.js +0 -44
- package/dist/editor/e2e/editor.spec.js.map +0 -1
- package/dist/link/project-type.test.d.ts +0 -2
- package/dist/link/project-type.test.d.ts.map +0 -1
- package/dist/link/project-type.test.js +0 -225
- package/dist/link/project-type.test.js.map +0 -1
- package/dist/lint/resolve-binary.test.d.ts +0 -2
- package/dist/lint/resolve-binary.test.d.ts.map +0 -1
- package/dist/lint/resolve-binary.test.js +0 -155
- package/dist/lint/resolve-binary.test.js.map +0 -1
- package/dist/open-api/convert/handler.spec.d.ts +0 -2
- package/dist/open-api/convert/handler.spec.d.ts.map +0 -1
- package/dist/open-api/convert/handler.spec.js +0 -301
- package/dist/open-api/convert/handler.spec.js.map +0 -1
- package/dist/open-api/merge/handler.spec.d.ts +0 -2
- package/dist/open-api/merge/handler.spec.d.ts.map +0 -1
- package/dist/open-api/merge/handler.spec.js +0 -673
- package/dist/open-api/merge/handler.spec.js.map +0 -1
- package/dist/open-api/overlay/handler.spec.d.ts +0 -2
- package/dist/open-api/overlay/handler.spec.d.ts.map +0 -1
- package/dist/open-api/overlay/handler.spec.js +0 -346
- package/dist/open-api/overlay/handler.spec.js.map +0 -1
- package/dist/source/ai-gateway/files.test.d.ts +0 -2
- package/dist/source/ai-gateway/files.test.d.ts.map +0 -1
- package/dist/source/ai-gateway/files.test.js +0 -135
- package/dist/source/ai-gateway/files.test.js.map +0 -1
- package/dist/source/ai-gateway/handler.test.d.ts +0 -2
- package/dist/source/ai-gateway/handler.test.d.ts.map +0 -1
- package/dist/source/ai-gateway/handler.test.js +0 -113
- package/dist/source/ai-gateway/handler.test.js.map +0 -1
- package/dist/source/ai-gateway/package.test.d.ts +0 -2
- package/dist/source/ai-gateway/package.test.d.ts.map +0 -1
- package/dist/source/ai-gateway/package.test.js +0 -30
- package/dist/source/ai-gateway/package.test.js.map +0 -1
- package/dist/source/ai-gateway/planner.test.d.ts +0 -2
- package/dist/source/ai-gateway/planner.test.d.ts.map +0 -1
- package/dist/source/ai-gateway/planner.test.js +0 -330
- package/dist/source/ai-gateway/planner.test.js.map +0 -1
- package/dist/source/ai-gateway/release.test.d.ts +0 -2
- package/dist/source/ai-gateway/release.test.d.ts.map +0 -1
- package/dist/source/ai-gateway/release.test.js +0 -62
- package/dist/source/ai-gateway/release.test.js.map +0 -1
- package/dist/test/invoke-test.test.d.ts +0 -2
- package/dist/test/invoke-test.test.d.ts.map +0 -1
- package/dist/test/invoke-test.test.js +0 -150
- package/dist/test/invoke-test.test.js.map +0 -1
- package/dist/test/test-files.test.d.ts +0 -2
- package/dist/test/test-files.test.d.ts.map +0 -1
- package/dist/test/test-files.test.js +0 -57
- package/dist/test/test-files.test.js.map +0 -1
- package/node_modules/@zuplo/openapi-tools/dist/file-format.spec.d.ts +0 -2
- package/node_modules/@zuplo/openapi-tools/dist/file-format.spec.d.ts.map +0 -1
- package/node_modules/@zuplo/openapi-tools/dist/file-format.spec.js +0 -289
- package/node_modules/@zuplo/openapi-tools/dist/file-format.spec.js.map +0 -1
- package/node_modules/@zuplo/openapi-tools/dist/merge-fixtures.spec.d.ts +0 -2
- package/node_modules/@zuplo/openapi-tools/dist/merge-fixtures.spec.d.ts.map +0 -1
- package/node_modules/@zuplo/openapi-tools/dist/merge-fixtures.spec.js +0 -181
- package/node_modules/@zuplo/openapi-tools/dist/merge-fixtures.spec.js.map +0 -1
- package/node_modules/@zuplo/openapi-tools/dist/merge.spec.d.ts +0 -2
- package/node_modules/@zuplo/openapi-tools/dist/merge.spec.d.ts.map +0 -1
- package/node_modules/@zuplo/openapi-tools/dist/merge.spec.js +0 -399
- package/node_modules/@zuplo/openapi-tools/dist/merge.spec.js.map +0 -1
- package/node_modules/@zuplo/openapi-tools/dist/overlay.spec.d.ts +0 -2
- package/node_modules/@zuplo/openapi-tools/dist/overlay.spec.d.ts.map +0 -1
- package/node_modules/@zuplo/openapi-tools/dist/overlay.spec.js +0 -779
- package/node_modules/@zuplo/openapi-tools/dist/overlay.spec.js.map +0 -1
- package/node_modules/@zuplo/openapi-tools/dist/path-transform.spec.d.ts +0 -2
- package/node_modules/@zuplo/openapi-tools/dist/path-transform.spec.d.ts.map +0 -1
- package/node_modules/@zuplo/openapi-tools/dist/path-transform.spec.js +0 -269
- package/node_modules/@zuplo/openapi-tools/dist/path-transform.spec.js.map +0 -1
- package/node_modules/@zuplo/openapi-tools/dist/url-utils.spec.d.ts +0 -2
- package/node_modules/@zuplo/openapi-tools/dist/url-utils.spec.d.ts.map +0 -1
- package/node_modules/@zuplo/openapi-tools/dist/url-utils.spec.js +0 -93
- package/node_modules/@zuplo/openapi-tools/dist/url-utils.spec.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-6YPRGG62.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-PBDT4FDO.js +0 -37
- package/node_modules/@zuplo/runtime/out/esm/chunk-PBDT4FDO.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-YJ2BHVUH.js.map → chunk-CDEAY3VY.js.map} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-PBDT4FDO.js.LEGAL.txt → chunk-LVSZ3WTO.js.LEGAL.txt} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-VTO3F6DK.js.map → chunk-NUVXDVLJ.js.map} +0 -0
- /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-
|
|
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-
|
|
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
|
|
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
|
|
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
|
|
655
|
+
* Options for metering AI Gateway usage and declaring budget rules.
|
|
660
656
|
* @public
|
|
661
657
|
*/
|
|
662
658
|
declare interface AIGatewayMeteringInboundPolicyOptions {
|
|
663
659
|
/**
|
|
664
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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.
|
|
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
|
-
|
|
3830
|
+
dialect?: ClassifierAppDialect;
|
|
3831
|
+
adapter?: ClassifierAppAdapterDeprecated;
|
|
3855
3832
|
}
|
|
3856
3833
|
|
|
3857
3834
|
/**
|
|
3858
|
-
*
|
|
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
|
|
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`
|
|
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`
|
|
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 `
|
|
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/cli",
|
|
3
|
-
"version": "7.11.
|
|
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.
|
|
34
|
+
"@zuplo/core": "7.11.3",
|
|
32
35
|
"@zuplo/editor": "1.0.33162667821",
|
|
33
|
-
"@zuplo/openapi-tools": "7.11.
|
|
34
|
-
"@zuplo/runtime": "7.11.
|
|
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.
|
|
66
|
-
"@zuplo/otel": "7.11.
|
|
68
|
+
"@zuplo/graphql": "7.11.3",
|
|
69
|
+
"@zuplo/otel": "7.11.3"
|
|
67
70
|
},
|
|
68
71
|
"optionalDependencies": {
|
|
69
|
-
"@zuplo/lint-darwin-arm64": "7.11.
|
|
70
|
-
"@zuplo/lint-darwin-x64": "7.11.
|
|
71
|
-
"@zuplo/lint-linux-x64": "7.11.
|
|
72
|
-
"@zuplo/lint-linux-arm64": "7.11.
|
|
73
|
-
"@zuplo/lint-win32-x64": "7.11.
|
|
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 +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 +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
|