alchemy 0.12.3 → 0.12.5
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/lib/ai/astro-file.d.ts +4 -4
- package/lib/ai/astro-file.d.ts.map +1 -1
- package/lib/ai/astro-file.js +3 -3
- package/lib/ai/astro-file.js.map +1 -1
- package/lib/ai/client.d.ts +1 -1
- package/lib/ai/client.d.ts.map +1 -1
- package/lib/ai/css-file.d.ts +4 -4
- package/lib/ai/css-file.d.ts.map +1 -1
- package/lib/ai/css-file.js +3 -3
- package/lib/ai/css-file.js.map +1 -1
- package/lib/ai/data.d.ts +4 -4
- package/lib/ai/data.d.ts.map +1 -1
- package/lib/ai/data.js +3 -3
- package/lib/ai/data.js.map +1 -1
- package/lib/ai/document.d.ts +5 -5
- package/lib/ai/document.d.ts.map +1 -1
- package/lib/ai/document.js +3 -3
- package/lib/ai/document.js.map +1 -1
- package/lib/ai/html-file.d.ts +4 -4
- package/lib/ai/html-file.d.ts.map +1 -1
- package/lib/ai/html-file.js +3 -3
- package/lib/ai/html-file.js.map +1 -1
- package/lib/ai/index.d.ts +10 -10
- package/lib/ai/index.d.ts.map +1 -1
- package/lib/ai/index.js +10 -10
- package/lib/ai/index.js.map +1 -1
- package/lib/ai/json-file.d.ts +4 -4
- package/lib/ai/json-file.d.ts.map +1 -1
- package/lib/ai/json-file.js +4 -4
- package/lib/ai/json-file.js.map +1 -1
- package/lib/ai/typescript-file.d.ts +4 -4
- package/lib/ai/typescript-file.d.ts.map +1 -1
- package/lib/ai/typescript-file.js +3 -3
- package/lib/ai/typescript-file.js.map +1 -1
- package/lib/ai/vue-file.d.ts +4 -4
- package/lib/ai/vue-file.d.ts.map +1 -1
- package/lib/ai/vue-file.js +3 -3
- package/lib/ai/vue-file.js.map +1 -1
- package/lib/ai/yaml-file.d.ts +4 -4
- package/lib/ai/yaml-file.d.ts.map +1 -1
- package/lib/ai/yaml-file.js +4 -4
- package/lib/ai/yaml-file.js.map +1 -1
- package/lib/alchemy.d.ts +5 -5
- package/lib/alchemy.d.ts.map +1 -1
- package/lib/alchemy.js +4 -4
- package/lib/alchemy.js.map +1 -1
- package/lib/apply.d.ts +1 -1
- package/lib/apply.d.ts.map +1 -1
- package/lib/apply.js +4 -4
- package/lib/apply.js.map +1 -1
- package/lib/aws/bucket.d.ts +2 -2
- package/lib/aws/bucket.d.ts.map +1 -1
- package/lib/aws/bucket.js +2 -2
- package/lib/aws/bucket.js.map +1 -1
- package/lib/aws/credentials.d.ts +1 -1
- package/lib/aws/credentials.d.ts.map +1 -1
- package/lib/aws/function.d.ts +3 -3
- package/lib/aws/function.d.ts.map +1 -1
- package/lib/aws/function.js +2 -2
- package/lib/aws/function.js.map +1 -1
- package/lib/aws/index.d.ts +9 -9
- package/lib/aws/index.d.ts.map +1 -1
- package/lib/aws/index.js +9 -9
- package/lib/aws/index.js.map +1 -1
- package/lib/aws/oidc/github-oidc-provider.d.ts +1 -1
- package/lib/aws/oidc/github-oidc-provider.d.ts.map +1 -1
- package/lib/aws/oidc/github-oidc-provider.js +1 -1
- package/lib/aws/oidc/github-oidc-provider.js.map +1 -1
- package/lib/aws/oidc/index.d.ts +2 -2
- package/lib/aws/oidc/index.d.ts.map +1 -1
- package/lib/aws/oidc/index.js +2 -2
- package/lib/aws/oidc/index.js.map +1 -1
- package/lib/aws/oidc/oidc-provider.d.ts +2 -2
- package/lib/aws/oidc/oidc-provider.d.ts.map +1 -1
- package/lib/aws/oidc/oidc-provider.js +2 -2
- package/lib/aws/oidc/oidc-provider.js.map +1 -1
- package/lib/aws/policy-attachment.d.ts +2 -2
- package/lib/aws/policy-attachment.d.ts.map +1 -1
- package/lib/aws/policy-attachment.js +2 -2
- package/lib/aws/policy-attachment.js.map +1 -1
- package/lib/aws/policy.d.ts +2 -2
- package/lib/aws/policy.d.ts.map +1 -1
- package/lib/aws/policy.js +1 -1
- package/lib/aws/policy.js.map +1 -1
- package/lib/aws/queue.d.ts +2 -2
- package/lib/aws/queue.d.ts.map +1 -1
- package/lib/aws/queue.js +1 -1
- package/lib/aws/queue.js.map +1 -1
- package/lib/aws/role.d.ts +3 -3
- package/lib/aws/role.d.ts.map +1 -1
- package/lib/aws/role.js +2 -2
- package/lib/aws/role.js.map +1 -1
- package/lib/aws/ses.d.ts +2 -2
- package/lib/aws/ses.d.ts.map +1 -1
- package/lib/aws/ses.js +2 -2
- package/lib/aws/ses.js.map +1 -1
- package/lib/aws/table.d.ts +2 -2
- package/lib/aws/table.d.ts.map +1 -1
- package/lib/aws/table.js +3 -3
- package/lib/aws/table.js.map +1 -1
- package/lib/cloudflare/account-api-token.d.ts +4 -4
- package/lib/cloudflare/account-api-token.d.ts.map +1 -1
- package/lib/cloudflare/account-api-token.js +5 -5
- package/lib/cloudflare/account-api-token.js.map +1 -1
- package/lib/cloudflare/account-id.d.ts +1 -1
- package/lib/cloudflare/account-id.d.ts.map +1 -1
- package/lib/cloudflare/account-id.js +1 -1
- package/lib/cloudflare/account-id.js.map +1 -1
- package/lib/cloudflare/ai-gateway.d.ts +131 -0
- package/lib/cloudflare/ai-gateway.d.ts.map +1 -0
- package/lib/cloudflare/ai-gateway.js +160 -0
- package/lib/cloudflare/ai-gateway.js.map +1 -0
- package/lib/cloudflare/api.d.ts +1 -1
- package/lib/cloudflare/api.d.ts.map +1 -1
- package/lib/cloudflare/api.js +2 -2
- package/lib/cloudflare/api.js.map +1 -1
- package/lib/cloudflare/assets.d.ts +2 -2
- package/lib/cloudflare/assets.d.ts.map +1 -1
- package/lib/cloudflare/assets.js +2 -2
- package/lib/cloudflare/assets.js.map +1 -1
- package/lib/cloudflare/auth.d.ts +2 -2
- package/lib/cloudflare/auth.d.ts.map +1 -1
- package/lib/cloudflare/auth.js +2 -2
- package/lib/cloudflare/auth.js.map +1 -1
- package/lib/cloudflare/bindings.d.ts +13 -12
- package/lib/cloudflare/bindings.d.ts.map +1 -1
- package/lib/cloudflare/bound.d.ts +14 -13
- package/lib/cloudflare/bound.d.ts.map +1 -1
- package/lib/cloudflare/bucket.d.ts +4 -4
- package/lib/cloudflare/bucket.d.ts.map +1 -1
- package/lib/cloudflare/bucket.js +3 -3
- package/lib/cloudflare/bucket.js.map +1 -1
- package/lib/cloudflare/custom-domain.d.ts +3 -3
- package/lib/cloudflare/custom-domain.d.ts.map +1 -1
- package/lib/cloudflare/custom-domain.js +3 -3
- package/lib/cloudflare/custom-domain.js.map +1 -1
- package/lib/cloudflare/d1-database.d.ts +3 -3
- package/lib/cloudflare/d1-database.d.ts.map +1 -1
- package/lib/cloudflare/d1-database.js +4 -4
- package/lib/cloudflare/d1-database.js.map +1 -1
- package/lib/cloudflare/d1-migrations.d.ts +1 -1
- package/lib/cloudflare/d1-migrations.d.ts.map +1 -1
- package/lib/cloudflare/d1-migrations.js +3 -3
- package/lib/cloudflare/d1-migrations.js.map +1 -1
- package/lib/cloudflare/dns-records.d.ts +4 -4
- package/lib/cloudflare/dns-records.d.ts.map +1 -1
- package/lib/cloudflare/dns-records.js +2 -2
- package/lib/cloudflare/dns-records.js.map +1 -1
- package/lib/cloudflare/index.d.ts +28 -27
- package/lib/cloudflare/index.d.ts.map +1 -1
- package/lib/cloudflare/index.js +28 -27
- package/lib/cloudflare/index.js.map +1 -1
- package/lib/cloudflare/kv-namespace.d.ts +3 -3
- package/lib/cloudflare/kv-namespace.d.ts.map +1 -1
- package/lib/cloudflare/kv-namespace.js +4 -4
- package/lib/cloudflare/kv-namespace.js.map +1 -1
- package/lib/cloudflare/nuxt.d.ts +4 -4
- package/lib/cloudflare/nuxt.d.ts.map +1 -1
- package/lib/cloudflare/nuxt.js +1 -1
- package/lib/cloudflare/nuxt.js.map +1 -1
- package/lib/cloudflare/permission-groups.d.ts +3 -3
- package/lib/cloudflare/permission-groups.d.ts.map +1 -1
- package/lib/cloudflare/permission-groups.js +2 -2
- package/lib/cloudflare/permission-groups.js.map +1 -1
- package/lib/cloudflare/pipeline.d.ts +4 -4
- package/lib/cloudflare/pipeline.d.ts.map +1 -1
- package/lib/cloudflare/pipeline.js +3 -3
- package/lib/cloudflare/pipeline.js.map +1 -1
- package/lib/cloudflare/queue.d.ts +3 -3
- package/lib/cloudflare/queue.d.ts.map +1 -1
- package/lib/cloudflare/queue.js +3 -3
- package/lib/cloudflare/queue.js.map +1 -1
- package/lib/cloudflare/r2-rest-state-store.d.ts +3 -3
- package/lib/cloudflare/r2-rest-state-store.d.ts.map +1 -1
- package/lib/cloudflare/r2-rest-state-store.js +4 -4
- package/lib/cloudflare/r2-rest-state-store.js.map +1 -1
- package/lib/cloudflare/redwood.d.ts +4 -4
- package/lib/cloudflare/redwood.d.ts.map +1 -1
- package/lib/cloudflare/redwood.js +1 -1
- package/lib/cloudflare/redwood.js.map +1 -1
- package/lib/cloudflare/tanstack-start.d.ts +4 -4
- package/lib/cloudflare/tanstack-start.d.ts.map +1 -1
- package/lib/cloudflare/tanstack-start.js +1 -1
- package/lib/cloudflare/tanstack-start.js.map +1 -1
- package/lib/cloudflare/vectorize-index.d.ts +3 -3
- package/lib/cloudflare/vectorize-index.d.ts.map +1 -1
- package/lib/cloudflare/vectorize-index.js +3 -3
- package/lib/cloudflare/vectorize-index.js.map +1 -1
- package/lib/cloudflare/vectorize-metadata-index.d.ts +4 -4
- package/lib/cloudflare/vectorize-metadata-index.d.ts.map +1 -1
- package/lib/cloudflare/vectorize-metadata-index.js +4 -4
- package/lib/cloudflare/vectorize-metadata-index.js.map +1 -1
- package/lib/cloudflare/vite.d.ts +4 -4
- package/lib/cloudflare/vite.d.ts.map +1 -1
- package/lib/cloudflare/vite.js +1 -1
- package/lib/cloudflare/vite.js.map +1 -1
- package/lib/cloudflare/website.d.ts +3 -3
- package/lib/cloudflare/website.d.ts.map +1 -1
- package/lib/cloudflare/website.js +5 -5
- package/lib/cloudflare/website.js.map +1 -1
- package/lib/cloudflare/worker.d.ts +7 -7
- package/lib/cloudflare/worker.d.ts.map +1 -1
- package/lib/cloudflare/worker.js +17 -10
- package/lib/cloudflare/worker.js.map +1 -1
- package/lib/cloudflare/workflow.d.ts +1 -1
- package/lib/cloudflare/workflow.d.ts.map +1 -1
- package/lib/cloudflare/workflow.js +1 -1
- package/lib/cloudflare/workflow.js.map +1 -1
- package/lib/cloudflare/wrangler.json.d.ts +3 -3
- package/lib/cloudflare/wrangler.json.d.ts.map +1 -1
- package/lib/cloudflare/wrangler.json.js +2 -2
- package/lib/cloudflare/wrangler.json.js.map +1 -1
- package/lib/cloudflare/zone.d.ts +4 -4
- package/lib/cloudflare/zone.d.ts.map +1 -1
- package/lib/cloudflare/zone.js +2 -2
- package/lib/cloudflare/zone.js.map +1 -1
- package/lib/context.d.ts +3 -3
- package/lib/context.d.ts.map +1 -1
- package/lib/context.js +1 -1
- package/lib/context.js.map +1 -1
- package/lib/destroy.d.ts +2 -2
- package/lib/destroy.d.ts.map +1 -1
- package/lib/destroy.js +4 -4
- package/lib/destroy.js.map +1 -1
- package/lib/dns/import-dns.d.ts +3 -3
- package/lib/dns/import-dns.d.ts.map +1 -1
- package/lib/dns/import-dns.js +2 -2
- package/lib/dns/import-dns.js.map +1 -1
- package/lib/dns/index.d.ts +2 -2
- package/lib/dns/index.d.ts.map +1 -1
- package/lib/dns/index.js +2 -2
- package/lib/dns/index.js.map +1 -1
- package/lib/esbuild/bundle.d.ts +2 -2
- package/lib/esbuild/bundle.d.ts.map +1 -1
- package/lib/esbuild/bundle.js +2 -2
- package/lib/esbuild/bundle.js.map +1 -1
- package/lib/esbuild/index.d.ts +1 -1
- package/lib/esbuild/index.d.ts.map +1 -1
- package/lib/esbuild/index.js +1 -1
- package/lib/esbuild/index.js.map +1 -1
- package/lib/fs/copy-file.d.ts +2 -2
- package/lib/fs/copy-file.d.ts.map +1 -1
- package/lib/fs/copy-file.js +2 -2
- package/lib/fs/copy-file.js.map +1 -1
- package/lib/fs/file-system-state-store.d.ts +2 -2
- package/lib/fs/file-system-state-store.d.ts.map +1 -1
- package/lib/fs/file-system-state-store.js +2 -2
- package/lib/fs/file-system-state-store.js.map +1 -1
- package/lib/fs/file.d.ts +4 -4
- package/lib/fs/file.d.ts.map +1 -1
- package/lib/fs/file.js +3 -3
- package/lib/fs/file.js.map +1 -1
- package/lib/fs/folder.d.ts +2 -2
- package/lib/fs/folder.d.ts.map +1 -1
- package/lib/fs/folder.js +2 -2
- package/lib/fs/folder.js.map +1 -1
- package/lib/fs/index.d.ts +14 -14
- package/lib/fs/index.d.ts.map +1 -1
- package/lib/fs/index.js +14 -14
- package/lib/fs/index.js.map +1 -1
- package/lib/fs/static-astro-file.d.ts +1 -1
- package/lib/fs/static-astro-file.d.ts.map +1 -1
- package/lib/fs/static-astro-file.js +1 -1
- package/lib/fs/static-astro-file.js.map +1 -1
- package/lib/fs/static-css-file.d.ts +1 -1
- package/lib/fs/static-css-file.d.ts.map +1 -1
- package/lib/fs/static-css-file.js +1 -1
- package/lib/fs/static-css-file.js.map +1 -1
- package/lib/fs/static-html-file.d.ts +1 -1
- package/lib/fs/static-html-file.d.ts.map +1 -1
- package/lib/fs/static-html-file.js +1 -1
- package/lib/fs/static-html-file.js.map +1 -1
- package/lib/fs/static-json-file.d.ts +1 -1
- package/lib/fs/static-json-file.d.ts.map +1 -1
- package/lib/fs/static-json-file.js +1 -1
- package/lib/fs/static-json-file.js.map +1 -1
- package/lib/fs/static-text-file.d.ts +1 -1
- package/lib/fs/static-text-file.d.ts.map +1 -1
- package/lib/fs/static-text-file.js +1 -1
- package/lib/fs/static-text-file.js.map +1 -1
- package/lib/fs/static-typescript-file.d.ts +1 -1
- package/lib/fs/static-typescript-file.d.ts.map +1 -1
- package/lib/fs/static-typescript-file.js +1 -1
- package/lib/fs/static-typescript-file.js.map +1 -1
- package/lib/fs/static-vue-file.d.ts +1 -1
- package/lib/fs/static-vue-file.d.ts.map +1 -1
- package/lib/fs/static-vue-file.js +1 -1
- package/lib/fs/static-vue-file.js.map +1 -1
- package/lib/fs/static-yaml-file.d.ts +1 -1
- package/lib/fs/static-yaml-file.d.ts.map +1 -1
- package/lib/fs/static-yaml-file.js +1 -1
- package/lib/fs/static-yaml-file.js.map +1 -1
- package/lib/github/client.js +2 -2
- package/lib/github/client.js.map +1 -1
- package/lib/github/index.d.ts +2 -2
- package/lib/github/index.d.ts.map +1 -1
- package/lib/github/index.js +2 -2
- package/lib/github/index.js.map +1 -1
- package/lib/github/repository-environment.d.ts +2 -2
- package/lib/github/repository-environment.d.ts.map +1 -1
- package/lib/github/repository-environment.js +2 -2
- package/lib/github/repository-environment.js.map +1 -1
- package/lib/github/secret.d.ts +3 -3
- package/lib/github/secret.d.ts.map +1 -1
- package/lib/github/secret.js +2 -2
- package/lib/github/secret.js.map +1 -1
- package/lib/index.d.ts +7 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -5
- package/lib/index.js.map +1 -1
- package/lib/internal/docs/providers.d.ts +2 -2
- package/lib/internal/docs/providers.d.ts.map +1 -1
- package/lib/internal/docs/providers.js +4 -4
- package/lib/internal/docs/providers.js.map +1 -1
- package/lib/os/exec.d.ts +2 -2
- package/lib/os/exec.d.ts.map +1 -1
- package/lib/os/exec.js +3 -3
- package/lib/os/exec.js.map +1 -1
- package/lib/os/index.d.ts +1 -1
- package/lib/os/index.d.ts.map +1 -1
- package/lib/os/index.js +1 -1
- package/lib/os/index.js.map +1 -1
- package/lib/resource.d.ts +2 -2
- package/lib/resource.d.ts.map +1 -1
- package/lib/resource.js +2 -2
- package/lib/resource.js.map +1 -1
- package/lib/scope.d.ts +2 -2
- package/lib/scope.d.ts.map +1 -1
- package/lib/scope.js +2 -2
- package/lib/scope.js.map +1 -1
- package/lib/secret.js +1 -1
- package/lib/secret.js.map +1 -1
- package/lib/serde.d.ts +1 -1
- package/lib/serde.d.ts.map +1 -1
- package/lib/serde.js +3 -3
- package/lib/serde.js.map +1 -1
- package/lib/state.d.ts +2 -2
- package/lib/state.d.ts.map +1 -1
- package/lib/stripe/index.d.ts +3 -3
- package/lib/stripe/index.d.ts.map +1 -1
- package/lib/stripe/index.js +3 -3
- package/lib/stripe/index.js.map +1 -1
- package/lib/stripe/price.d.ts +2 -2
- package/lib/stripe/price.d.ts.map +1 -1
- package/lib/stripe/price.js +1 -1
- package/lib/stripe/price.js.map +1 -1
- package/lib/stripe/product.d.ts +2 -2
- package/lib/stripe/product.d.ts.map +1 -1
- package/lib/stripe/product.js +1 -1
- package/lib/stripe/product.js.map +1 -1
- package/lib/stripe/webhook.d.ts +2 -2
- package/lib/stripe/webhook.d.ts.map +1 -1
- package/lib/stripe/webhook.js +1 -1
- package/lib/stripe/webhook.js.map +1 -1
- package/lib/test/bun.d.ts +2 -2
- package/lib/test/bun.d.ts.map +1 -1
- package/lib/test/bun.js +3 -3
- package/lib/test/bun.js.map +1 -1
- package/lib/test/prune.d.ts.map +1 -1
- package/lib/test/prune.js +2 -3
- package/lib/test/prune.js.map +1 -1
- package/lib/web/astro.d.ts +2 -2
- package/lib/web/astro.d.ts.map +1 -1
- package/lib/web/astro.js +8 -8
- package/lib/web/astro.js.map +1 -1
- package/lib/web/shadcn-component.d.ts +2 -2
- package/lib/web/shadcn-component.d.ts.map +1 -1
- package/lib/web/shadcn-component.js +4 -4
- package/lib/web/shadcn-component.js.map +1 -1
- package/lib/web/shadcn.d.ts +3 -3
- package/lib/web/shadcn.d.ts.map +1 -1
- package/lib/web/shadcn.js +6 -6
- package/lib/web/shadcn.js.map +1 -1
- package/lib/web/tailwind.d.ts +2 -2
- package/lib/web/tailwind.d.ts.map +1 -1
- package/lib/web/tailwind.js +5 -5
- package/lib/web/tailwind.js.map +1 -1
- package/lib/web/vite.d.ts +2 -2
- package/lib/web/vite.d.ts.map +1 -1
- package/lib/web/vite.js +9 -9
- package/lib/web/vite.js.map +1 -1
- package/lib/web/vitepress/config.d.ts +1 -1
- package/lib/web/vitepress/config.d.ts.map +1 -1
- package/lib/web/vitepress/config.js +1 -1
- package/lib/web/vitepress/config.js.map +1 -1
- package/lib/web/vitepress/custom-theme.d.ts +4 -4
- package/lib/web/vitepress/custom-theme.d.ts.map +1 -1
- package/lib/web/vitepress/custom-theme.js +7 -7
- package/lib/web/vitepress/custom-theme.js.map +1 -1
- package/lib/web/vitepress/dependencies.d.ts +2 -2
- package/lib/web/vitepress/dependencies.d.ts.map +1 -1
- package/lib/web/vitepress/dependencies.js +3 -3
- package/lib/web/vitepress/dependencies.js.map +1 -1
- package/lib/web/vitepress/home-page.d.ts +3 -3
- package/lib/web/vitepress/home-page.d.ts.map +1 -1
- package/lib/web/vitepress/home-page.js +3 -3
- package/lib/web/vitepress/home-page.js.map +1 -1
- package/lib/web/vitepress/index.d.ts +5 -5
- package/lib/web/vitepress/index.d.ts.map +1 -1
- package/lib/web/vitepress/index.js +5 -5
- package/lib/web/vitepress/index.js.map +1 -1
- package/lib/web/vitepress/vitepress.d.ts +2 -2
- package/lib/web/vitepress/vitepress.d.ts.map +1 -1
- package/lib/web/vitepress/vitepress.js +7 -7
- package/lib/web/vitepress/vitepress.js.map +1 -1
- package/package.json +1 -1
- package/src/ai/astro-file.ts +5 -5
- package/src/ai/client.ts +1 -1
- package/src/ai/css-file.ts +5 -5
- package/src/ai/data.ts +5 -5
- package/src/ai/document.ts +5 -5
- package/src/ai/html-file.ts +5 -5
- package/src/ai/index.ts +10 -10
- package/src/ai/json-file.ts +6 -6
- package/src/ai/typescript-file.ts +5 -5
- package/src/ai/vue-file.ts +5 -5
- package/src/ai/yaml-file.ts +6 -6
- package/src/alchemy.ts +6 -6
- package/src/apply.ts +5 -5
- package/src/aws/bucket.ts +13 -13
- package/src/aws/credentials.ts +1 -1
- package/src/aws/function.ts +4 -4
- package/src/aws/index.ts +9 -9
- package/src/aws/oidc/github-oidc-provider.ts +2 -2
- package/src/aws/oidc/index.ts +2 -2
- package/src/aws/oidc/oidc-provider.ts +3 -3
- package/src/aws/policy-attachment.ts +8 -8
- package/src/aws/policy.ts +16 -16
- package/src/aws/queue.ts +14 -14
- package/src/aws/role.ts +4 -4
- package/src/aws/ses.ts +20 -20
- package/src/aws/table.ts +4 -4
- package/src/cloudflare/account-api-token.ts +6 -6
- package/src/cloudflare/account-id.ts +1 -1
- package/src/cloudflare/ai-gateway.ts +299 -0
- package/src/cloudflare/api.ts +3 -3
- package/src/cloudflare/assets.ts +3 -3
- package/src/cloudflare/auth.ts +8 -8
- package/src/cloudflare/bindings.ts +14 -12
- package/src/cloudflare/bound.ts +32 -29
- package/src/cloudflare/bucket.ts +5 -5
- package/src/cloudflare/custom-domain.ts +4 -4
- package/src/cloudflare/d1-database.ts +5 -5
- package/src/cloudflare/d1-migrations.ts +3 -3
- package/src/cloudflare/dns-records.ts +5 -5
- package/src/cloudflare/index.ts +28 -27
- package/src/cloudflare/kv-namespace.ts +5 -5
- package/src/cloudflare/nuxt.ts +4 -4
- package/src/cloudflare/permission-groups.ts +3 -3
- package/src/cloudflare/pipeline.ts +5 -5
- package/src/cloudflare/queue.ts +4 -4
- package/src/cloudflare/r2-rest-state-store.ts +6 -6
- package/src/cloudflare/redwood.ts +4 -4
- package/src/cloudflare/tanstack-start.ts +4 -4
- package/src/cloudflare/vectorize-index.ts +5 -5
- package/src/cloudflare/vectorize-metadata-index.ts +6 -6
- package/src/cloudflare/vite.ts +4 -4
- package/src/cloudflare/website.ts +6 -6
- package/src/cloudflare/worker.ts +20 -14
- package/src/cloudflare/workflow.ts +2 -2
- package/src/cloudflare/wrangler.json.ts +6 -6
- package/src/cloudflare/zone.ts +4 -4
- package/src/context.ts +4 -4
- package/src/destroy.ts +4 -4
- package/src/dns/import-dns.ts +3 -3
- package/src/dns/index.ts +2 -2
- package/src/esbuild/bundle.ts +3 -3
- package/src/esbuild/index.ts +1 -1
- package/src/fs/copy-file.ts +3 -3
- package/src/fs/file-system-state-store.ts +4 -4
- package/src/fs/file.ts +6 -6
- package/src/fs/folder.ts +7 -7
- package/src/fs/index.ts +14 -14
- package/src/fs/static-astro-file.ts +1 -1
- package/src/fs/static-css-file.ts +1 -1
- package/src/fs/static-html-file.ts +1 -1
- package/src/fs/static-json-file.ts +1 -1
- package/src/fs/static-text-file.ts +2 -4
- package/src/fs/static-typescript-file.ts +1 -1
- package/src/fs/static-vue-file.ts +1 -1
- package/src/fs/static-yaml-file.ts +1 -1
- package/src/github/client.ts +12 -12
- package/src/github/index.ts +2 -2
- package/src/github/repository-environment.ts +3 -3
- package/src/github/secret.ts +4 -4
- package/src/index.ts +7 -7
- package/src/internal/docs/providers.ts +4 -4
- package/src/os/exec.ts +4 -4
- package/src/os/index.ts +1 -1
- package/src/resource.ts +6 -6
- package/src/scope.ts +4 -4
- package/src/secret.ts +1 -1
- package/src/serde.ts +3 -3
- package/src/state.ts +2 -2
- package/src/stripe/index.ts +3 -3
- package/src/stripe/price.ts +4 -4
- package/src/stripe/product.ts +4 -4
- package/src/stripe/webhook.ts +5 -5
- package/src/test/bun.ts +4 -4
- package/src/test/prune.ts +2 -3
- package/src/web/astro.ts +9 -9
- package/src/web/shadcn-component.ts +5 -5
- package/src/web/shadcn.ts +7 -7
- package/src/web/tailwind.ts +6 -6
- package/src/web/vite.ts +10 -10
- package/src/web/vitepress/config.ts +1 -1
- package/src/web/vitepress/custom-theme.ts +10 -10
- package/src/web/vitepress/dependencies.ts +8 -8
- package/src/web/vitepress/home-page.ts +4 -4
- package/src/web/vitepress/index.ts +5 -5
- package/src/web/vitepress/vitepress.ts +8 -8
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import type { Context } from "../context.js";
|
|
2
|
+
import { Resource } from "../resource.js";
|
|
3
|
+
import { handleApiError } from "./api-error.js";
|
|
4
|
+
import { createCloudflareApi, type CloudflareApiOptions } from "./api.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Properties for creating or updating a Cloudflare AI Gateway.
|
|
8
|
+
*/
|
|
9
|
+
export interface AiGatewayProps extends CloudflareApiOptions {
|
|
10
|
+
/**
|
|
11
|
+
* Invalidate cache on update.
|
|
12
|
+
* @default true
|
|
13
|
+
*/
|
|
14
|
+
cacheInvalidateOnUpdate?: boolean;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Cache TTL in seconds. Set to 0 to disable caching.
|
|
18
|
+
* @default 0
|
|
19
|
+
* @minimum 0
|
|
20
|
+
*/
|
|
21
|
+
cacheTtl?: number;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Collect logs for the gateway.
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
collectLogs?: boolean;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Rate limiting interval in seconds. Set to 0 to disable rate limiting.
|
|
31
|
+
* @default 0
|
|
32
|
+
* @minimum 0
|
|
33
|
+
*/
|
|
34
|
+
rateLimitingInterval?: number;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Rate limiting limit per interval. Set to 0 to disable rate limiting.
|
|
38
|
+
* @default 0
|
|
39
|
+
* @minimum 0
|
|
40
|
+
*/
|
|
41
|
+
rateLimitingLimit?: number;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Rate limiting technique.
|
|
45
|
+
* @default "fixed"
|
|
46
|
+
*/
|
|
47
|
+
rateLimitingTechnique?: "fixed" | "sliding";
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Enable authentication for the gateway.
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
authentication?: boolean;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Log retention limit in requests.
|
|
57
|
+
* @default undefined
|
|
58
|
+
* @minimum 10000
|
|
59
|
+
* @maximum 10000000
|
|
60
|
+
*/
|
|
61
|
+
logManagement?: number;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Strategy for handling log limits.
|
|
65
|
+
* @default undefined
|
|
66
|
+
*/
|
|
67
|
+
logManagementStrategy?: "STOP_INSERTING" | "DELETE_OLDEST";
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Enable logpush for the gateway.
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
logpush?: boolean;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Public key for logpush encryption.
|
|
77
|
+
* @default undefined
|
|
78
|
+
* @minLength 16
|
|
79
|
+
* @maxLength 1024
|
|
80
|
+
*/
|
|
81
|
+
logpushPublicKey?: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Output returned after Cloudflare AI Gateway creation/update.
|
|
86
|
+
* IMPORTANT: The interface name MUST match the exported resource name.
|
|
87
|
+
*/
|
|
88
|
+
export interface AiGateway
|
|
89
|
+
extends Resource<"cloudflare::AiGateway">,
|
|
90
|
+
AiGatewayProps {
|
|
91
|
+
/**
|
|
92
|
+
* The ID (name) of the gateway.
|
|
93
|
+
*/
|
|
94
|
+
id: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Cloudflare account ID associated with the gateway.
|
|
98
|
+
*/
|
|
99
|
+
accountId: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Cloudflare account tag associated with the gateway.
|
|
103
|
+
*/
|
|
104
|
+
accountTag: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Time at which the gateway was created (ISO 8601 format).
|
|
108
|
+
*/
|
|
109
|
+
createdAt: string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The internal UUID of the gateway.
|
|
113
|
+
*/
|
|
114
|
+
internalId: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Time at which the gateway was last modified (ISO 8601 format).
|
|
118
|
+
*/
|
|
119
|
+
modifiedAt: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Resource type identifier for binding.
|
|
123
|
+
* @internal
|
|
124
|
+
*/
|
|
125
|
+
type: "ai_gateway";
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Represents a Cloudflare AI Gateway.
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* // Create a basic AI Gateway with default settings:
|
|
133
|
+
* const basicGateway = await AiGateway("my-ai-gateway", {});
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* // Create an AI Gateway with authentication and rate limiting:
|
|
137
|
+
* const secureGateway = await AiGateway("secure-ai-gateway", {
|
|
138
|
+
* authentication: true,
|
|
139
|
+
* rateLimitingInterval: 60, // 60 seconds
|
|
140
|
+
* rateLimitingLimit: 100, // 100 requests
|
|
141
|
+
* rateLimitingTechnique: "sliding"
|
|
142
|
+
* });
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* // Create an AI Gateway with logging enabled and logpush:
|
|
146
|
+
* const loggingGateway = await AiGateway("logging-ai-gateway", {
|
|
147
|
+
* collectLogs: true,
|
|
148
|
+
* logpush: true,
|
|
149
|
+
* logpushPublicKey: "mypublickey..." // Replace with actual public key
|
|
150
|
+
* });
|
|
151
|
+
*/
|
|
152
|
+
export const AiGateway = Resource(
|
|
153
|
+
"cloudflare::AiGateway",
|
|
154
|
+
{ alwaysUpdate: true }, // AI Gateway PUT updates, so always run update logic
|
|
155
|
+
async function (
|
|
156
|
+
this: Context<AiGateway>,
|
|
157
|
+
id: string,
|
|
158
|
+
props: AiGatewayProps = {}
|
|
159
|
+
): Promise<AiGateway> {
|
|
160
|
+
const api = await createCloudflareApi(props);
|
|
161
|
+
const gatewayPath = `/accounts/${api.accountId}/ai-gateway/gateways/${id}`;
|
|
162
|
+
const gatewaysPath = `/accounts/${api.accountId}/ai-gateway/gateways`;
|
|
163
|
+
|
|
164
|
+
if (this.phase === "delete") {
|
|
165
|
+
try {
|
|
166
|
+
const deleteResponse = await api.delete(gatewayPath);
|
|
167
|
+
// Only swallow 404 Not Found errors, all other errors should be handled
|
|
168
|
+
if (!deleteResponse.ok && deleteResponse.status !== 404) {
|
|
169
|
+
await handleApiError(deleteResponse, "delete", "ai gateway", id);
|
|
170
|
+
}
|
|
171
|
+
} catch (error) {
|
|
172
|
+
console.error(`Error deleting AI Gateway ${id}:`, error);
|
|
173
|
+
throw error;
|
|
174
|
+
}
|
|
175
|
+
return this.destroy();
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Default values as per Cloudflare documentation examples
|
|
179
|
+
const mergedProps: AiGatewayProps = {
|
|
180
|
+
cacheInvalidateOnUpdate: true,
|
|
181
|
+
cacheTtl: 0,
|
|
182
|
+
collectLogs: true,
|
|
183
|
+
rateLimitingInterval: 0,
|
|
184
|
+
rateLimitingLimit: 0,
|
|
185
|
+
rateLimitingTechnique: "fixed",
|
|
186
|
+
...props, // User props override defaults
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
let response: Response | undefined;
|
|
190
|
+
let apiResource: any;
|
|
191
|
+
|
|
192
|
+
try {
|
|
193
|
+
if (this.phase === "update") {
|
|
194
|
+
// Update existing gateway (PUT request)
|
|
195
|
+
const requestBody = mapPropsToApi(id, mergedProps, false);
|
|
196
|
+
response = await api.put(gatewayPath, requestBody);
|
|
197
|
+
} else {
|
|
198
|
+
// Check if gateway exists before creating (to avoid conflict)
|
|
199
|
+
const getResponse = await api.get(gatewayPath);
|
|
200
|
+
if (getResponse.status === 200) {
|
|
201
|
+
// Gateway exists, treat as update (PUT)
|
|
202
|
+
console.log(
|
|
203
|
+
`AI Gateway '${id}' already exists. Updating existing resource.`
|
|
204
|
+
);
|
|
205
|
+
const requestBody = mapPropsToApi(id, mergedProps, false);
|
|
206
|
+
response = await api.put(gatewayPath, requestBody);
|
|
207
|
+
} else if (getResponse.status === 404) {
|
|
208
|
+
// Gateway doesn't exist, create new (POST request)
|
|
209
|
+
const requestBody = mapPropsToApi(id, mergedProps, true); // Include 'id' in POST body
|
|
210
|
+
response = await api.post(gatewaysPath, requestBody);
|
|
211
|
+
} else {
|
|
212
|
+
// Unexpected error during GET check
|
|
213
|
+
await handleApiError(getResponse, "get", "ai gateway", id);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if (!response?.ok) {
|
|
218
|
+
const action = this.phase === "update" ? "update" : "create";
|
|
219
|
+
await handleApiError(response!, action, "ai gateway", id);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
const data: { result: Record<string, any> } = await response!.json();
|
|
223
|
+
apiResource = data.result;
|
|
224
|
+
} catch (error) {
|
|
225
|
+
console.error(`Error ${this.phase} AI Gateway '${id}':`, error);
|
|
226
|
+
throw error; // Re-throw the error to fail the deployment
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Construct the output object from API response and merged props
|
|
230
|
+
return this({
|
|
231
|
+
...mergedProps, // Start with the input props (including defaults)
|
|
232
|
+
id: apiResource.id,
|
|
233
|
+
accountId: apiResource.account_id,
|
|
234
|
+
accountTag: apiResource.account_tag,
|
|
235
|
+
createdAt: apiResource.created_at,
|
|
236
|
+
internalId: apiResource.internal_id,
|
|
237
|
+
modifiedAt: apiResource.modified_at,
|
|
238
|
+
// Update props based on the actual response from the API (Cloudflare might set defaults)
|
|
239
|
+
cacheInvalidateOnUpdate: apiResource.cache_invalidate_on_update,
|
|
240
|
+
cacheTtl: apiResource.cache_ttl,
|
|
241
|
+
collectLogs: apiResource.collect_logs,
|
|
242
|
+
rateLimitingInterval: apiResource.rate_limiting_interval,
|
|
243
|
+
rateLimitingLimit: apiResource.rate_limiting_limit,
|
|
244
|
+
rateLimitingTechnique: apiResource.rate_limiting_technique,
|
|
245
|
+
authentication: apiResource.authentication,
|
|
246
|
+
logManagement: apiResource.log_management,
|
|
247
|
+
logManagementStrategy: apiResource.log_management_strategy,
|
|
248
|
+
logpush: apiResource.logpush,
|
|
249
|
+
logpushPublicKey: apiResource.logpush_public_key,
|
|
250
|
+
type: "ai_gateway",
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
);
|
|
254
|
+
|
|
255
|
+
// Helper function to map props to the API request body format
|
|
256
|
+
function mapPropsToApi(
|
|
257
|
+
id: string,
|
|
258
|
+
props: AiGatewayProps,
|
|
259
|
+
includeIdInBody: boolean = false
|
|
260
|
+
): Record<string, any> {
|
|
261
|
+
const body: Record<string, any> = {};
|
|
262
|
+
if (includeIdInBody) {
|
|
263
|
+
body.id = id;
|
|
264
|
+
}
|
|
265
|
+
if (props.cacheInvalidateOnUpdate !== undefined) {
|
|
266
|
+
body.cache_invalidate_on_update = props.cacheInvalidateOnUpdate;
|
|
267
|
+
}
|
|
268
|
+
if (props.cacheTtl !== undefined) {
|
|
269
|
+
body.cache_ttl = props.cacheTtl;
|
|
270
|
+
}
|
|
271
|
+
if (props.collectLogs !== undefined) {
|
|
272
|
+
body.collect_logs = props.collectLogs;
|
|
273
|
+
}
|
|
274
|
+
if (props.rateLimitingInterval !== undefined) {
|
|
275
|
+
body.rate_limiting_interval = props.rateLimitingInterval;
|
|
276
|
+
}
|
|
277
|
+
if (props.rateLimitingLimit !== undefined) {
|
|
278
|
+
body.rate_limiting_limit = props.rateLimitingLimit;
|
|
279
|
+
}
|
|
280
|
+
if (props.rateLimitingTechnique !== undefined) {
|
|
281
|
+
body.rate_limiting_technique = props.rateLimitingTechnique;
|
|
282
|
+
}
|
|
283
|
+
if (props.authentication !== undefined) {
|
|
284
|
+
body.authentication = props.authentication;
|
|
285
|
+
}
|
|
286
|
+
if (props.logManagement !== undefined) {
|
|
287
|
+
body.log_management = props.logManagement;
|
|
288
|
+
}
|
|
289
|
+
if (props.logManagementStrategy !== undefined) {
|
|
290
|
+
body.log_management_strategy = props.logManagementStrategy;
|
|
291
|
+
}
|
|
292
|
+
if (props.logpush !== undefined) {
|
|
293
|
+
body.logpush = props.logpush;
|
|
294
|
+
}
|
|
295
|
+
if (props.logpushPublicKey !== undefined) {
|
|
296
|
+
body.logpush_public_key = props.logpushPublicKey;
|
|
297
|
+
}
|
|
298
|
+
return body;
|
|
299
|
+
}
|
package/src/cloudflare/api.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Secret } from "../secret";
|
|
2
|
-
import { withExponentialBackoff } from "../util/retry";
|
|
3
|
-
import { getCloudflareAuthHeaders, getCloudflareUserInfo } from "./auth";
|
|
1
|
+
import type { Secret } from "../secret.js";
|
|
2
|
+
import { withExponentialBackoff } from "../util/retry.js";
|
|
3
|
+
import { getCloudflareAuthHeaders, getCloudflareUserInfo } from "./auth.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Options for Cloudflare API requests
|
package/src/cloudflare/assets.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as fs from "node:fs/promises";
|
|
2
2
|
import * as path from "node:path";
|
|
3
|
-
import type { Context } from "../context";
|
|
4
|
-
import { Resource } from "../resource";
|
|
5
|
-
import { getContentType } from "../util/content-type";
|
|
3
|
+
import type { Context } from "../context.js";
|
|
4
|
+
import { Resource } from "../resource.js";
|
|
5
|
+
import { getContentType } from "../util/content-type.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Properties for creating or updating Assets
|
package/src/cloudflare/auth.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import type { Secret } from "../secret";
|
|
5
|
-
import type { CloudflareAccountId } from "./account-id";
|
|
6
|
-
import { handleApiError } from "./api-error";
|
|
4
|
+
import type { Secret } from "../secret.js";
|
|
5
|
+
import type { CloudflareAccountId } from "./account-id.js";
|
|
6
|
+
import { handleApiError } from "./api-error.js";
|
|
7
7
|
/**
|
|
8
8
|
* Authentication options for Cloudflare API
|
|
9
9
|
*/
|
|
@@ -260,7 +260,7 @@ async function getRefreshedAuthConfig(): Promise<WranglerConfig> {
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
async function writeWranglerConfig(config: WranglerConfig) {
|
|
263
|
-
if (config.exists === false) return
|
|
263
|
+
if (config.exists === false) return;
|
|
264
264
|
|
|
265
265
|
const TOML = await import("@iarna/toml");
|
|
266
266
|
const configPath = await findWranglerConfig();
|
|
@@ -284,17 +284,17 @@ async function readWranglerConfig(): Promise<WranglerConfig> {
|
|
|
284
284
|
));
|
|
285
285
|
config.path = configPath;
|
|
286
286
|
|
|
287
|
-
return config
|
|
287
|
+
return config;
|
|
288
288
|
} catch (e: any) {
|
|
289
289
|
if (e.code === "ENOENT") {
|
|
290
290
|
// The config doesn't exist
|
|
291
291
|
return {
|
|
292
292
|
path: configPath,
|
|
293
|
-
exists: false
|
|
294
|
-
}
|
|
293
|
+
exists: false,
|
|
294
|
+
};
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
throw e
|
|
297
|
+
throw e;
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
|
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
* Based on Cloudflare API documentation:
|
|
4
4
|
* https://developers.cloudflare.com/api/resources/workers/subresources/scripts/methods/update/
|
|
5
5
|
*/
|
|
6
|
-
import type { Secret } from "../secret";
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
14
|
-
import type {
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
6
|
+
import type { Secret } from "../secret.js";
|
|
7
|
+
import type { AiGateway } from "./ai-gateway.js";
|
|
8
|
+
import type { Assets } from "./assets.js";
|
|
9
|
+
import type { R2Bucket } from "./bucket.js";
|
|
10
|
+
import type { D1Database } from "./d1-database.js";
|
|
11
|
+
import type { DurableObjectNamespace } from "./durable-object-namespace.js";
|
|
12
|
+
import type { KVNamespace } from "./kv-namespace.js";
|
|
13
|
+
import type { Pipeline } from "./pipeline.js";
|
|
14
|
+
import type { Queue } from "./queue.js";
|
|
15
|
+
import type { VectorizeIndex } from "./vectorize-index.js";
|
|
16
|
+
import type { Worker } from "./worker.js";
|
|
17
|
+
import type { Workflow } from "./workflow.js";
|
|
17
18
|
|
|
18
19
|
export type Bindings = {
|
|
19
20
|
[bindingName: string]: Binding;
|
|
@@ -34,7 +35,8 @@ export type Binding =
|
|
|
34
35
|
| string
|
|
35
36
|
| VectorizeIndex
|
|
36
37
|
| Worker
|
|
37
|
-
| Workflow
|
|
38
|
+
| Workflow
|
|
39
|
+
| AiGateway;
|
|
38
40
|
|
|
39
41
|
/**
|
|
40
42
|
* Union type for all Worker binding types (API spec)
|
package/src/cloudflare/bound.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import type { Pipeline } from "cloudflare:pipelines";
|
|
2
|
-
import type { Secret } from "../secret";
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
2
|
+
import type { Secret } from "../secret.js";
|
|
3
|
+
import type { AiGateway as _AiGateway } from "./ai-gateway.js";
|
|
4
|
+
import type { Assets } from "./assets.js";
|
|
5
|
+
import type { Binding } from "./bindings.js";
|
|
6
|
+
import type { R2Bucket as _R2Bucket } from "./bucket.js";
|
|
7
|
+
import type { D1Database as _D1Database } from "./d1-database.js";
|
|
8
|
+
import type { DurableObjectNamespace as _DurableObjectNamespace } from "./durable-object-namespace.js";
|
|
9
|
+
import type { KVNamespace as _KVNamespace } from "./kv-namespace.js";
|
|
10
|
+
import type { Pipeline as _Pipeline } from "./pipeline.js";
|
|
11
|
+
import type { Queue as _Queue } from "./queue.js";
|
|
12
|
+
import type { VectorizeIndex as _VectorizeIndex } from "./vectorize-index.js";
|
|
13
|
+
import type { Worker as _Worker } from "./worker.js";
|
|
14
|
+
import type { Workflow as _Workflow } from "./workflow.js";
|
|
14
15
|
|
|
15
16
|
export type Bound<T extends Binding> = T extends _DurableObjectNamespace
|
|
16
17
|
? DurableObjectNamespace
|
|
@@ -20,20 +21,22 @@ export type Bound<T extends Binding> = T extends _DurableObjectNamespace
|
|
|
20
21
|
? Worker
|
|
21
22
|
: T extends _R2Bucket
|
|
22
23
|
? R2Bucket
|
|
23
|
-
: T extends
|
|
24
|
-
?
|
|
25
|
-
: T extends
|
|
26
|
-
?
|
|
27
|
-
: T extends
|
|
28
|
-
?
|
|
29
|
-
: T extends
|
|
30
|
-
?
|
|
31
|
-
: T extends
|
|
32
|
-
?
|
|
33
|
-
: T extends
|
|
34
|
-
?
|
|
35
|
-
: T extends
|
|
36
|
-
?
|
|
37
|
-
: T extends
|
|
38
|
-
?
|
|
39
|
-
:
|
|
24
|
+
: T extends _AiGateway
|
|
25
|
+
? AiGateway
|
|
26
|
+
: T extends Secret
|
|
27
|
+
? string
|
|
28
|
+
: T extends Assets
|
|
29
|
+
? Service
|
|
30
|
+
: T extends _Workflow<infer P>
|
|
31
|
+
? Workflow<P>
|
|
32
|
+
: T extends _D1Database
|
|
33
|
+
? D1Database
|
|
34
|
+
: T extends _VectorizeIndex
|
|
35
|
+
? VectorizeIndex
|
|
36
|
+
: T extends _Queue
|
|
37
|
+
? Queue
|
|
38
|
+
: T extends _Pipeline<infer R>
|
|
39
|
+
? Pipeline<R>
|
|
40
|
+
: T extends string
|
|
41
|
+
? string
|
|
42
|
+
: Service;
|
package/src/cloudflare/bucket.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AwsClient } from "aws4fetch";
|
|
2
|
-
import type { Context } from "../context";
|
|
3
|
-
import { Resource } from "../resource";
|
|
4
|
-
import type { Secret } from "../secret";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import type { Context } from "../context.js";
|
|
3
|
+
import { Resource } from "../resource.js";
|
|
4
|
+
import type { Secret } from "../secret.js";
|
|
5
|
+
import { CloudflareApiError, handleApiError } from "./api-error.js";
|
|
6
|
+
import { CloudflareApi, createCloudflareApi } from "./api.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Properties for creating or updating an R2 Bucket
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { Context } from "../context";
|
|
2
|
-
import { Resource } from "../resource";
|
|
1
|
+
import type { Context } from "../context.js";
|
|
2
|
+
import { Resource } from "../resource.js";
|
|
3
|
+
import { handleApiError } from "./api-error.js";
|
|
3
4
|
import {
|
|
4
5
|
CloudflareApi,
|
|
5
6
|
createCloudflareApi,
|
|
6
7
|
type CloudflareApiOptions,
|
|
7
|
-
} from "./api";
|
|
8
|
-
import { handleApiError } from "./api-error";
|
|
8
|
+
} from "./api.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Properties for creating or updating a CustomDomain
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { Context } from "../context";
|
|
2
|
-
import { Resource } from "../resource";
|
|
1
|
+
import type { Context } from "../context.js";
|
|
2
|
+
import { Resource } from "../resource.js";
|
|
3
|
+
import { CloudflareApiError, handleApiError } from "./api-error.js";
|
|
3
4
|
import {
|
|
4
5
|
CloudflareApi,
|
|
5
6
|
createCloudflareApi,
|
|
6
7
|
type CloudflareApiOptions,
|
|
7
|
-
} from "./api";
|
|
8
|
-
import {
|
|
9
|
-
import { applyMigrations, listMigrationsFiles } from "./d1-migrations";
|
|
8
|
+
} from "./api.js";
|
|
9
|
+
import { applyMigrations, listMigrationsFiles } from "./d1-migrations.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Properties for creating or updating a D1 Database
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as fs from "fs/promises";
|
|
1
|
+
import * as fs from "node:fs/promises";
|
|
2
2
|
import * as path from "node:path";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { handleApiError } from "./api-error.js";
|
|
4
|
+
import { CloudflareApi } from "./api.js";
|
|
5
5
|
|
|
6
6
|
export interface D1MigrationOptions {
|
|
7
7
|
migrationsFiles: Array<{ id: string; sql: string }>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { Context } from "../context";
|
|
1
|
+
import type { Context } from "../context.js";
|
|
2
2
|
import type {
|
|
3
3
|
DnsRecord as BaseDnsRecord,
|
|
4
4
|
DnsRecordType,
|
|
5
5
|
DnsRecordWithMetadata,
|
|
6
|
-
} from "../dns/record";
|
|
7
|
-
import { Resource } from "../resource";
|
|
6
|
+
} from "../dns/record.js";
|
|
7
|
+
import { Resource } from "../resource.js";
|
|
8
8
|
import {
|
|
9
9
|
type CloudflareApi,
|
|
10
10
|
type CloudflareApiOptions,
|
|
11
11
|
createCloudflareApi,
|
|
12
|
-
} from "./api";
|
|
13
|
-
import type { CloudflareResponse } from "./response";
|
|
12
|
+
} from "./api.js";
|
|
13
|
+
import type { CloudflareResponse } from "./response.js";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Cloudflare DNS Record response format
|
package/src/cloudflare/index.ts
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
export * from "./account-api-token";
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./api-error";
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
11
|
-
export * from "./
|
|
12
|
-
export * from "./
|
|
13
|
-
export * from "./
|
|
14
|
-
export * from "./
|
|
15
|
-
export * from "./
|
|
16
|
-
export * from "./
|
|
17
|
-
export * from "./
|
|
18
|
-
export * from "./
|
|
19
|
-
export * from "./
|
|
20
|
-
export * from "./
|
|
21
|
-
export * from "./vectorize-
|
|
22
|
-
export * from "./
|
|
23
|
-
export * from "./
|
|
24
|
-
export * from "./
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export * from "./
|
|
1
|
+
export * from "./account-api-token.js";
|
|
2
|
+
export * from "./ai-gateway.js";
|
|
3
|
+
export * from "./api-error.js";
|
|
4
|
+
export * from "./api.js";
|
|
5
|
+
export * from "./assets.js";
|
|
6
|
+
export * from "./bindings.js";
|
|
7
|
+
export * from "./bucket.js";
|
|
8
|
+
export * from "./custom-domain.js";
|
|
9
|
+
export * from "./d1-database.js";
|
|
10
|
+
export * from "./dns-records.js";
|
|
11
|
+
export * from "./durable-object-namespace.js";
|
|
12
|
+
export * from "./kv-namespace.js";
|
|
13
|
+
export * from "./local-dev-cloudflare-shim.js";
|
|
14
|
+
export * from "./nuxt.js";
|
|
15
|
+
export * from "./permission-groups.js";
|
|
16
|
+
export * from "./pipeline.js";
|
|
17
|
+
export * from "./queue.js";
|
|
18
|
+
export * from "./r2-rest-state-store.js";
|
|
19
|
+
export * from "./redwood.js";
|
|
20
|
+
export * from "./tanstack-start.js";
|
|
21
|
+
export * from "./vectorize-index.js";
|
|
22
|
+
export * from "./vectorize-metadata-index.js";
|
|
23
|
+
export * from "./vite.js";
|
|
24
|
+
export * from "./website.js";
|
|
25
|
+
export * from "./worker.js";
|
|
26
|
+
export { Workflow } from "./workflow.js";
|
|
27
|
+
export * from "./wrangler.json.js";
|
|
28
|
+
export * from "./zone.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { Context } from "../context";
|
|
2
|
-
import { Resource } from "../resource";
|
|
3
|
-
import { withExponentialBackoff } from "../util/retry";
|
|
1
|
+
import type { Context } from "../context.js";
|
|
2
|
+
import { Resource } from "../resource.js";
|
|
3
|
+
import { withExponentialBackoff } from "../util/retry.js";
|
|
4
|
+
import { handleApiError } from "./api-error.js";
|
|
4
5
|
import {
|
|
5
6
|
CloudflareApi,
|
|
6
7
|
createCloudflareApi,
|
|
7
8
|
type CloudflareApiOptions,
|
|
8
|
-
} from "./api";
|
|
9
|
-
import { handleApiError } from "./api-error";
|
|
9
|
+
} from "./api.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Properties for creating or updating a KV Namespace
|
package/src/cloudflare/nuxt.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Assets } from "./assets";
|
|
2
|
-
import type { Bindings } from "./bindings";
|
|
3
|
-
import { Website, type WebsiteProps } from "./website";
|
|
4
|
-
import type { Worker } from "./worker";
|
|
1
|
+
import type { Assets } from "./assets.js";
|
|
2
|
+
import type { Bindings } from "./bindings.js";
|
|
3
|
+
import { Website, type WebsiteProps } from "./website.js";
|
|
4
|
+
import type { Worker } from "./worker.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Properties for creating a Nuxt resource.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Context } from "../context";
|
|
2
|
-
import { Resource } from "../resource";
|
|
3
|
-
import { createCloudflareApi, type CloudflareApiOptions } from "./api";
|
|
1
|
+
import type { Context } from "../context.js";
|
|
2
|
+
import { Resource } from "../resource.js";
|
|
3
|
+
import { createCloudflareApi, type CloudflareApiOptions } from "./api.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Cloudflare permission group as returned by the API
|