alchemy 0.12.2 → 0.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ai/ark.d.ts +1 -0
- package/lib/ai/ark.d.ts.map +1 -0
- package/lib/ai/ark.js +1 -0
- package/lib/ai/ark.js.map +1 -0
- package/lib/ai/astro-file.d.ts +5 -4
- package/lib/ai/astro-file.d.ts.map +1 -0
- package/lib/ai/astro-file.js +4 -3
- package/lib/ai/astro-file.js.map +1 -0
- package/lib/ai/client.d.ts +2 -1
- package/lib/ai/client.d.ts.map +1 -0
- package/lib/ai/client.js +1 -0
- package/lib/ai/client.js.map +1 -0
- package/lib/ai/css-file.d.ts +5 -4
- package/lib/ai/css-file.d.ts.map +1 -0
- package/lib/ai/css-file.js +4 -3
- package/lib/ai/css-file.js.map +1 -0
- package/lib/ai/data.d.ts +5 -4
- package/lib/ai/data.d.ts.map +1 -0
- package/lib/ai/data.js +4 -3
- package/lib/ai/data.js.map +1 -0
- package/lib/ai/document.d.ts +6 -5
- package/lib/ai/document.d.ts.map +1 -0
- package/lib/ai/document.js +4 -3
- package/lib/ai/document.js.map +1 -0
- package/lib/ai/html-file.d.ts +5 -4
- package/lib/ai/html-file.d.ts.map +1 -0
- package/lib/ai/html-file.js +4 -3
- package/lib/ai/html-file.js.map +1 -0
- package/lib/ai/index.d.ts +11 -10
- package/lib/ai/index.d.ts.map +1 -0
- package/lib/ai/index.js +11 -10
- package/lib/ai/index.js.map +1 -0
- package/lib/ai/json-file.d.ts +5 -4
- package/lib/ai/json-file.d.ts.map +1 -0
- package/lib/ai/json-file.js +5 -4
- package/lib/ai/json-file.js.map +1 -0
- package/lib/ai/typescript-file.d.ts +5 -4
- package/lib/ai/typescript-file.d.ts.map +1 -0
- package/lib/ai/typescript-file.js +4 -3
- package/lib/ai/typescript-file.js.map +1 -0
- package/lib/ai/vue-file.d.ts +5 -4
- package/lib/ai/vue-file.d.ts.map +1 -0
- package/lib/ai/vue-file.js +4 -3
- package/lib/ai/vue-file.js.map +1 -0
- package/lib/ai/yaml-file.d.ts +5 -4
- package/lib/ai/yaml-file.d.ts.map +1 -0
- package/lib/ai/yaml-file.js +5 -4
- package/lib/ai/yaml-file.js.map +1 -0
- package/lib/alchemy.d.ts +6 -5
- package/lib/alchemy.d.ts.map +1 -0
- package/lib/alchemy.js +5 -4
- package/lib/alchemy.js.map +1 -0
- package/lib/apply.d.ts +2 -1
- package/lib/apply.d.ts.map +1 -0
- package/lib/apply.js +5 -4
- package/lib/apply.js.map +1 -0
- package/lib/aws/account-id.d.ts +1 -0
- package/lib/aws/account-id.d.ts.map +1 -0
- package/lib/aws/account-id.js +1 -0
- package/lib/aws/account-id.js.map +1 -0
- package/lib/aws/bucket.d.ts +3 -2
- package/lib/aws/bucket.d.ts.map +1 -0
- package/lib/aws/bucket.js +3 -2
- package/lib/aws/bucket.js.map +1 -0
- package/lib/aws/credentials.d.ts +2 -1
- package/lib/aws/credentials.d.ts.map +1 -0
- package/lib/aws/credentials.js +1 -0
- package/lib/aws/credentials.js.map +1 -0
- package/lib/aws/function.d.ts +4 -3
- package/lib/aws/function.d.ts.map +1 -0
- package/lib/aws/function.js +3 -2
- package/lib/aws/function.js.map +1 -0
- package/lib/aws/index.d.ts +10 -9
- package/lib/aws/index.d.ts.map +1 -0
- package/lib/aws/index.js +10 -9
- package/lib/aws/index.js.map +1 -0
- package/lib/aws/oidc/github-oidc-provider.d.ts +2 -1
- package/lib/aws/oidc/github-oidc-provider.d.ts.map +1 -0
- package/lib/aws/oidc/github-oidc-provider.js +2 -1
- package/lib/aws/oidc/github-oidc-provider.js.map +1 -0
- package/lib/aws/oidc/index.d.ts +3 -2
- package/lib/aws/oidc/index.d.ts.map +1 -0
- package/lib/aws/oidc/index.js +3 -2
- package/lib/aws/oidc/index.js.map +1 -0
- package/lib/aws/oidc/oidc-provider.d.ts +3 -2
- package/lib/aws/oidc/oidc-provider.d.ts.map +1 -0
- package/lib/aws/oidc/oidc-provider.js +3 -2
- package/lib/aws/oidc/oidc-provider.js.map +1 -0
- package/lib/aws/policy-attachment.d.ts +3 -2
- package/lib/aws/policy-attachment.d.ts.map +1 -0
- package/lib/aws/policy-attachment.js +3 -2
- package/lib/aws/policy-attachment.js.map +1 -0
- package/lib/aws/policy.d.ts +3 -2
- package/lib/aws/policy.d.ts.map +1 -0
- package/lib/aws/policy.js +2 -1
- package/lib/aws/policy.js.map +1 -0
- package/lib/aws/queue.d.ts +3 -2
- package/lib/aws/queue.d.ts.map +1 -0
- package/lib/aws/queue.js +2 -1
- package/lib/aws/queue.js.map +1 -0
- package/lib/aws/role.d.ts +4 -3
- package/lib/aws/role.d.ts.map +1 -0
- package/lib/aws/role.js +3 -2
- package/lib/aws/role.js.map +1 -0
- package/lib/aws/ses.d.ts +3 -2
- package/lib/aws/ses.d.ts.map +1 -0
- package/lib/aws/ses.js +3 -2
- package/lib/aws/ses.js.map +1 -0
- package/lib/aws/table.d.ts +3 -2
- package/lib/aws/table.d.ts.map +1 -0
- package/lib/aws/table.js +4 -3
- package/lib/aws/table.js.map +1 -0
- package/lib/cloudflare/account-api-token.d.ts +5 -4
- package/lib/cloudflare/account-api-token.d.ts.map +1 -0
- package/lib/cloudflare/account-api-token.js +6 -5
- package/lib/cloudflare/account-api-token.js.map +1 -0
- package/lib/cloudflare/account-id.d.ts +2 -1
- package/lib/cloudflare/account-id.d.ts.map +1 -0
- package/lib/cloudflare/account-id.js +2 -1
- package/lib/cloudflare/account-id.js.map +1 -0
- package/lib/cloudflare/api-error.d.ts +1 -0
- package/lib/cloudflare/api-error.d.ts.map +1 -0
- package/lib/cloudflare/api-error.js +1 -0
- package/lib/cloudflare/api-error.js.map +1 -0
- package/lib/cloudflare/api.d.ts +2 -1
- package/lib/cloudflare/api.d.ts.map +1 -0
- package/lib/cloudflare/api.js +3 -2
- package/lib/cloudflare/api.js.map +1 -0
- package/lib/cloudflare/asset-manifest.d.ts +1 -0
- package/lib/cloudflare/asset-manifest.d.ts.map +1 -0
- package/lib/cloudflare/asset-manifest.js +1 -0
- package/lib/cloudflare/asset-manifest.js.map +1 -0
- package/lib/cloudflare/assets.d.ts +3 -2
- package/lib/cloudflare/assets.d.ts.map +1 -0
- package/lib/cloudflare/assets.js +3 -2
- package/lib/cloudflare/assets.js.map +1 -0
- package/lib/cloudflare/auth.d.ts +3 -2
- package/lib/cloudflare/auth.d.ts.map +1 -0
- package/lib/cloudflare/auth.js +3 -2
- package/lib/cloudflare/auth.js.map +1 -0
- package/lib/cloudflare/bindings.d.ts +12 -11
- package/lib/cloudflare/bindings.d.ts.map +1 -0
- package/lib/cloudflare/bindings.js +1 -0
- package/lib/cloudflare/bindings.js.map +1 -0
- package/lib/cloudflare/bound.d.ts +13 -12
- package/lib/cloudflare/bound.d.ts.map +1 -0
- package/lib/cloudflare/bound.js +1 -0
- package/lib/cloudflare/bound.js.map +1 -0
- package/lib/cloudflare/bucket.d.ts +5 -4
- package/lib/cloudflare/bucket.d.ts.map +1 -0
- package/lib/cloudflare/bucket.js +4 -3
- package/lib/cloudflare/bucket.js.map +1 -0
- package/lib/cloudflare/custom-domain.d.ts +4 -3
- package/lib/cloudflare/custom-domain.d.ts.map +1 -0
- package/lib/cloudflare/custom-domain.js +4 -3
- package/lib/cloudflare/custom-domain.js.map +1 -0
- package/lib/cloudflare/d1-database.d.ts +6 -5
- package/lib/cloudflare/d1-database.d.ts.map +1 -0
- package/lib/cloudflare/d1-database.js +6 -5
- package/lib/cloudflare/d1-database.js.map +1 -0
- package/lib/cloudflare/d1-migrations.d.ts +2 -1
- package/lib/cloudflare/d1-migrations.d.ts.map +1 -0
- package/lib/cloudflare/d1-migrations.js +4 -3
- package/lib/cloudflare/d1-migrations.js.map +1 -0
- package/lib/cloudflare/dns-records.d.ts +5 -4
- package/lib/cloudflare/dns-records.d.ts.map +1 -0
- package/lib/cloudflare/dns-records.js +3 -2
- package/lib/cloudflare/dns-records.js.map +1 -0
- package/lib/cloudflare/durable-object-namespace.d.ts +1 -0
- package/lib/cloudflare/durable-object-namespace.d.ts.map +1 -0
- package/lib/cloudflare/durable-object-namespace.js +1 -0
- package/lib/cloudflare/durable-object-namespace.js.map +1 -0
- package/lib/cloudflare/index.d.ts +28 -25
- package/lib/cloudflare/index.d.ts.map +1 -0
- package/lib/cloudflare/index.js +28 -25
- package/lib/cloudflare/index.js.map +1 -0
- package/lib/cloudflare/kv-namespace.d.ts +4 -3
- package/lib/cloudflare/kv-namespace.d.ts.map +1 -0
- package/lib/cloudflare/kv-namespace.js +5 -4
- package/lib/cloudflare/kv-namespace.js.map +1 -0
- package/lib/cloudflare/local-dev-cloudflare-shim.d.ts +1 -0
- package/lib/cloudflare/local-dev-cloudflare-shim.d.ts.map +1 -0
- package/lib/cloudflare/local-dev-cloudflare-shim.js +1 -0
- package/lib/cloudflare/local-dev-cloudflare-shim.js.map +1 -0
- package/lib/cloudflare/nuxt.d.ts +49 -0
- package/lib/cloudflare/nuxt.d.ts.map +1 -0
- package/lib/cloudflare/nuxt.js +45 -0
- package/lib/cloudflare/nuxt.js.map +1 -0
- package/lib/cloudflare/permission-groups.d.ts +4 -3
- package/lib/cloudflare/permission-groups.d.ts.map +1 -0
- package/lib/cloudflare/permission-groups.js +3 -2
- package/lib/cloudflare/permission-groups.js.map +1 -0
- package/lib/cloudflare/pipeline.d.ts +5 -4
- package/lib/cloudflare/pipeline.d.ts.map +1 -0
- package/lib/cloudflare/pipeline.js +4 -3
- package/lib/cloudflare/pipeline.js.map +1 -0
- package/lib/cloudflare/queue.d.ts +4 -3
- package/lib/cloudflare/queue.d.ts.map +1 -0
- package/lib/cloudflare/queue.js +4 -3
- package/lib/cloudflare/queue.js.map +1 -0
- package/lib/cloudflare/r2-rest-state-store.d.ts +4 -3
- package/lib/cloudflare/r2-rest-state-store.d.ts.map +1 -0
- package/lib/cloudflare/r2-rest-state-store.js +5 -4
- package/lib/cloudflare/r2-rest-state-store.js.map +1 -0
- package/lib/cloudflare/redwood.d.ts +71 -0
- package/lib/cloudflare/redwood.d.ts.map +1 -0
- package/lib/cloudflare/redwood.js +83 -0
- package/lib/cloudflare/redwood.js.map +1 -0
- package/lib/cloudflare/response.d.ts +1 -0
- package/lib/cloudflare/response.d.ts.map +1 -0
- package/lib/cloudflare/response.js +1 -0
- package/lib/cloudflare/response.js.map +1 -0
- package/lib/cloudflare/tanstack-start.d.ts +5 -4
- package/lib/cloudflare/tanstack-start.d.ts.map +1 -0
- package/lib/cloudflare/tanstack-start.js +2 -1
- package/lib/cloudflare/tanstack-start.js.map +1 -0
- package/lib/cloudflare/types.d.ts +1 -0
- package/lib/cloudflare/types.d.ts.map +1 -0
- package/lib/cloudflare/types.js +1 -0
- package/lib/cloudflare/types.js.map +1 -0
- package/lib/cloudflare/vectorize-index.d.ts +4 -3
- package/lib/cloudflare/vectorize-index.d.ts.map +1 -0
- package/lib/cloudflare/vectorize-index.js +4 -3
- package/lib/cloudflare/vectorize-index.js.map +1 -0
- package/lib/cloudflare/vectorize-metadata-index.d.ts +5 -4
- package/lib/cloudflare/vectorize-metadata-index.d.ts.map +1 -0
- package/lib/cloudflare/vectorize-metadata-index.js +5 -4
- package/lib/cloudflare/vectorize-metadata-index.js.map +1 -0
- package/lib/cloudflare/vite.d.ts +5 -4
- package/lib/cloudflare/vite.d.ts.map +1 -0
- package/lib/cloudflare/vite.js +2 -1
- package/lib/cloudflare/vite.js.map +1 -0
- package/lib/cloudflare/website.d.ts +4 -3
- package/lib/cloudflare/website.d.ts.map +1 -0
- package/lib/cloudflare/website.js +6 -5
- package/lib/cloudflare/website.js.map +1 -0
- package/lib/cloudflare/worker-metadata.d.ts +1 -0
- package/lib/cloudflare/worker-metadata.d.ts.map +1 -0
- package/lib/cloudflare/worker-metadata.js +1 -0
- package/lib/cloudflare/worker-metadata.js.map +1 -0
- package/lib/cloudflare/worker-migration.d.ts +1 -0
- package/lib/cloudflare/worker-migration.d.ts.map +1 -0
- package/lib/cloudflare/worker-migration.js +1 -0
- package/lib/cloudflare/worker-migration.js.map +1 -0
- package/lib/cloudflare/worker.d.ts +16 -7
- package/lib/cloudflare/worker.d.ts.map +1 -0
- package/lib/cloudflare/worker.js +21 -12
- package/lib/cloudflare/worker.js.map +1 -0
- package/lib/cloudflare/workflow.d.ts +2 -1
- package/lib/cloudflare/workflow.d.ts.map +1 -0
- package/lib/cloudflare/workflow.js +2 -1
- package/lib/cloudflare/workflow.js.map +1 -0
- package/lib/cloudflare/wrangler.json.d.ts +4 -3
- package/lib/cloudflare/wrangler.json.d.ts.map +1 -0
- package/lib/cloudflare/wrangler.json.js +5 -3
- package/lib/cloudflare/wrangler.json.js.map +1 -0
- package/lib/cloudflare/zone-settings.d.ts +1 -0
- package/lib/cloudflare/zone-settings.d.ts.map +1 -0
- package/lib/cloudflare/zone-settings.js +1 -0
- package/lib/cloudflare/zone-settings.js.map +1 -0
- package/lib/cloudflare/zone.d.ts +5 -4
- package/lib/cloudflare/zone.d.ts.map +1 -0
- package/lib/cloudflare/zone.js +3 -2
- package/lib/cloudflare/zone.js.map +1 -0
- package/lib/context.d.ts +4 -3
- package/lib/context.d.ts.map +1 -0
- package/lib/context.js +2 -1
- package/lib/context.js.map +1 -0
- package/lib/destroy.d.ts +3 -2
- package/lib/destroy.d.ts.map +1 -0
- package/lib/destroy.js +5 -4
- package/lib/destroy.js.map +1 -0
- package/lib/dns/godaddy.d.ts +1 -0
- package/lib/dns/godaddy.d.ts.map +1 -0
- package/lib/dns/godaddy.js +1 -0
- package/lib/dns/godaddy.js.map +1 -0
- package/lib/dns/import-dns.d.ts +4 -3
- package/lib/dns/import-dns.d.ts.map +1 -0
- package/lib/dns/import-dns.js +3 -2
- package/lib/dns/import-dns.js.map +1 -0
- package/lib/dns/index.d.ts +3 -2
- package/lib/dns/index.d.ts.map +1 -0
- package/lib/dns/index.js +3 -2
- package/lib/dns/index.js.map +1 -0
- package/lib/dns/record.d.ts +1 -0
- package/lib/dns/record.d.ts.map +1 -0
- package/lib/dns/record.js +1 -0
- package/lib/dns/record.js.map +1 -0
- package/lib/encrypt.d.ts +1 -0
- package/lib/encrypt.d.ts.map +1 -0
- package/lib/encrypt.js +1 -0
- package/lib/encrypt.js.map +1 -0
- package/lib/env.d.ts +1 -0
- package/lib/env.d.ts.map +1 -0
- package/lib/env.js +1 -0
- package/lib/env.js.map +1 -0
- package/lib/esbuild/bundle.d.ts +3 -2
- package/lib/esbuild/bundle.d.ts.map +1 -0
- package/lib/esbuild/bundle.js +3 -2
- package/lib/esbuild/bundle.js.map +1 -0
- package/lib/esbuild/index.d.ts +2 -1
- package/lib/esbuild/index.d.ts.map +1 -0
- package/lib/esbuild/index.js +2 -1
- package/lib/esbuild/index.js.map +1 -0
- package/lib/fs/copy-file.d.ts +3 -2
- package/lib/fs/copy-file.d.ts.map +1 -0
- package/lib/fs/copy-file.js +3 -2
- package/lib/fs/copy-file.js.map +1 -0
- package/lib/fs/file-collection.d.ts +1 -0
- package/lib/fs/file-collection.d.ts.map +1 -0
- package/lib/fs/file-collection.js +1 -0
- package/lib/fs/file-collection.js.map +1 -0
- package/lib/fs/file-ref.d.ts +1 -0
- package/lib/fs/file-ref.d.ts.map +1 -0
- package/lib/fs/file-ref.js +1 -0
- package/lib/fs/file-ref.js.map +1 -0
- package/lib/fs/file-system-state-store.d.ts +3 -2
- package/lib/fs/file-system-state-store.d.ts.map +1 -0
- package/lib/fs/file-system-state-store.js +3 -2
- package/lib/fs/file-system-state-store.js.map +1 -0
- package/lib/fs/file.d.ts +5 -4
- package/lib/fs/file.d.ts.map +1 -0
- package/lib/fs/file.js +4 -3
- package/lib/fs/file.js.map +1 -0
- package/lib/fs/folder.d.ts +3 -2
- package/lib/fs/folder.d.ts.map +1 -0
- package/lib/fs/folder.js +3 -2
- package/lib/fs/folder.js.map +1 -0
- package/lib/fs/index.d.ts +15 -14
- package/lib/fs/index.d.ts.map +1 -0
- package/lib/fs/index.js +15 -14
- package/lib/fs/index.js.map +1 -0
- package/lib/fs/static-astro-file.d.ts +2 -1
- package/lib/fs/static-astro-file.d.ts.map +1 -0
- package/lib/fs/static-astro-file.js +2 -1
- package/lib/fs/static-astro-file.js.map +1 -0
- package/lib/fs/static-css-file.d.ts +2 -1
- package/lib/fs/static-css-file.d.ts.map +1 -0
- package/lib/fs/static-css-file.js +2 -1
- package/lib/fs/static-css-file.js.map +1 -0
- package/lib/fs/static-html-file.d.ts +2 -1
- package/lib/fs/static-html-file.d.ts.map +1 -0
- package/lib/fs/static-html-file.js +2 -1
- package/lib/fs/static-html-file.js.map +1 -0
- package/lib/fs/static-json-file.d.ts +2 -1
- package/lib/fs/static-json-file.d.ts.map +1 -0
- package/lib/fs/static-json-file.js +2 -1
- package/lib/fs/static-json-file.js.map +1 -0
- package/lib/fs/static-text-file.d.ts +2 -1
- package/lib/fs/static-text-file.d.ts.map +1 -0
- package/lib/fs/static-text-file.js +2 -1
- package/lib/fs/static-text-file.js.map +1 -0
- package/lib/fs/static-typescript-file.d.ts +2 -1
- package/lib/fs/static-typescript-file.d.ts.map +1 -0
- package/lib/fs/static-typescript-file.js +2 -1
- package/lib/fs/static-typescript-file.js.map +1 -0
- package/lib/fs/static-vue-file.d.ts +2 -1
- package/lib/fs/static-vue-file.d.ts.map +1 -0
- package/lib/fs/static-vue-file.js +2 -1
- package/lib/fs/static-vue-file.js.map +1 -0
- package/lib/fs/static-yaml-file.d.ts +2 -1
- package/lib/fs/static-yaml-file.d.ts.map +1 -0
- package/lib/fs/static-yaml-file.js +2 -1
- package/lib/fs/static-yaml-file.js.map +1 -0
- package/lib/github/client.d.ts +1 -0
- package/lib/github/client.d.ts.map +1 -0
- package/lib/github/client.js +3 -2
- package/lib/github/client.js.map +1 -0
- package/lib/github/index.d.ts +3 -2
- package/lib/github/index.d.ts.map +1 -0
- package/lib/github/index.js +3 -2
- package/lib/github/index.js.map +1 -0
- package/lib/github/repository-environment.d.ts +3 -2
- package/lib/github/repository-environment.d.ts.map +1 -0
- package/lib/github/repository-environment.js +3 -2
- package/lib/github/repository-environment.js.map +1 -0
- package/lib/github/secret.d.ts +4 -3
- package/lib/github/secret.d.ts.map +1 -0
- package/lib/github/secret.js +3 -2
- package/lib/github/secret.js.map +1 -0
- package/lib/index.d.ts +8 -7
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +6 -5
- package/lib/index.js.map +1 -0
- package/lib/internal/docs/providers.d.ts +3 -2
- package/lib/internal/docs/providers.d.ts.map +1 -0
- package/lib/internal/docs/providers.js +5 -4
- package/lib/internal/docs/providers.js.map +1 -0
- package/lib/os/exec.d.ts +3 -2
- package/lib/os/exec.d.ts.map +1 -0
- package/lib/os/exec.js +4 -3
- package/lib/os/exec.js.map +1 -0
- package/lib/os/index.d.ts +2 -1
- package/lib/os/index.d.ts.map +1 -0
- package/lib/os/index.js +2 -1
- package/lib/os/index.js.map +1 -0
- package/lib/resource.d.ts +3 -2
- package/lib/resource.d.ts.map +1 -0
- package/lib/resource.js +3 -2
- package/lib/resource.js.map +1 -0
- package/lib/scope.d.ts +3 -2
- package/lib/scope.d.ts.map +1 -0
- package/lib/scope.js +3 -2
- package/lib/scope.js.map +1 -0
- package/lib/secret.d.ts +1 -0
- package/lib/secret.d.ts.map +1 -0
- package/lib/secret.js +2 -1
- package/lib/secret.js.map +1 -0
- package/lib/serde.d.ts +2 -1
- package/lib/serde.d.ts.map +1 -0
- package/lib/serde.js +4 -3
- package/lib/serde.js.map +1 -0
- package/lib/state.d.ts +3 -2
- package/lib/state.d.ts.map +1 -0
- package/lib/state.js +1 -0
- package/lib/state.js.map +1 -0
- package/lib/stripe/index.d.ts +4 -3
- package/lib/stripe/index.d.ts.map +1 -0
- package/lib/stripe/index.js +4 -3
- package/lib/stripe/index.js.map +1 -0
- package/lib/stripe/price.d.ts +3 -2
- package/lib/stripe/price.d.ts.map +1 -0
- package/lib/stripe/price.js +2 -1
- package/lib/stripe/price.js.map +1 -0
- package/lib/stripe/product.d.ts +3 -2
- package/lib/stripe/product.d.ts.map +1 -0
- package/lib/stripe/product.js +2 -1
- package/lib/stripe/product.js.map +1 -0
- package/lib/stripe/webhook.d.ts +3 -2
- package/lib/stripe/webhook.d.ts.map +1 -0
- package/lib/stripe/webhook.js +2 -1
- package/lib/stripe/webhook.js.map +1 -0
- package/lib/test/bun.d.ts +3 -2
- package/lib/test/bun.d.ts.map +1 -0
- package/lib/test/bun.js +4 -3
- package/lib/test/bun.js.map +1 -0
- package/lib/test/prune.d.ts +1 -0
- package/lib/test/prune.d.ts.map +1 -0
- package/lib/test/prune.js +3 -3
- package/lib/test/prune.js.map +1 -0
- package/lib/util/content-type.d.ts +1 -0
- package/lib/util/content-type.d.ts.map +1 -0
- package/lib/util/content-type.js +1 -0
- package/lib/util/content-type.js.map +1 -0
- package/lib/util/ignore.d.ts +1 -0
- package/lib/util/ignore.d.ts.map +1 -0
- package/lib/util/ignore.js +1 -0
- package/lib/util/ignore.js.map +1 -0
- package/lib/util/retry.d.ts +1 -0
- package/lib/util/retry.d.ts.map +1 -0
- package/lib/util/retry.js +1 -0
- package/lib/util/retry.js.map +1 -0
- package/lib/util/rm.d.ts +1 -0
- package/lib/util/rm.d.ts.map +1 -0
- package/lib/util/rm.js +1 -0
- package/lib/util/rm.js.map +1 -0
- package/lib/util/sha256.d.ts +1 -0
- package/lib/util/sha256.d.ts.map +1 -0
- package/lib/util/sha256.js +1 -0
- package/lib/util/sha256.js.map +1 -0
- package/lib/util/slugify.d.ts +1 -0
- package/lib/util/slugify.d.ts.map +1 -0
- package/lib/util/slugify.js +1 -0
- package/lib/util/slugify.js.map +1 -0
- package/lib/web/astro.d.ts +3 -2
- package/lib/web/astro.d.ts.map +1 -0
- package/lib/web/astro.js +9 -8
- package/lib/web/astro.js.map +1 -0
- package/lib/web/shadcn-component.d.ts +3 -2
- package/lib/web/shadcn-component.d.ts.map +1 -0
- package/lib/web/shadcn-component.js +5 -4
- package/lib/web/shadcn-component.js.map +1 -0
- package/lib/web/shadcn.d.ts +4 -3
- package/lib/web/shadcn.d.ts.map +1 -0
- package/lib/web/shadcn.js +7 -6
- package/lib/web/shadcn.js.map +1 -0
- package/lib/web/tailwind.d.ts +3 -2
- package/lib/web/tailwind.d.ts.map +1 -0
- package/lib/web/tailwind.js +6 -5
- package/lib/web/tailwind.js.map +1 -0
- package/lib/web/vite.d.ts +3 -2
- package/lib/web/vite.d.ts.map +1 -0
- package/lib/web/vite.js +10 -9
- package/lib/web/vite.js.map +1 -0
- package/lib/web/vitepress/config.d.ts +2 -1
- package/lib/web/vitepress/config.d.ts.map +1 -0
- package/lib/web/vitepress/config.js +2 -1
- package/lib/web/vitepress/config.js.map +1 -0
- package/lib/web/vitepress/custom-theme.d.ts +5 -4
- package/lib/web/vitepress/custom-theme.d.ts.map +1 -0
- package/lib/web/vitepress/custom-theme.js +8 -7
- package/lib/web/vitepress/custom-theme.js.map +1 -0
- package/lib/web/vitepress/dependencies.d.ts +3 -2
- package/lib/web/vitepress/dependencies.d.ts.map +1 -0
- package/lib/web/vitepress/dependencies.js +4 -3
- package/lib/web/vitepress/dependencies.js.map +1 -0
- package/lib/web/vitepress/home-page.d.ts +4 -3
- package/lib/web/vitepress/home-page.d.ts.map +1 -0
- package/lib/web/vitepress/home-page.js +4 -3
- package/lib/web/vitepress/home-page.js.map +1 -0
- package/lib/web/vitepress/index.d.ts +6 -5
- package/lib/web/vitepress/index.d.ts.map +1 -0
- package/lib/web/vitepress/index.js +6 -5
- package/lib/web/vitepress/index.js.map +1 -0
- package/lib/web/vitepress/process-front-matter-files.d.ts +1 -0
- package/lib/web/vitepress/process-front-matter-files.d.ts.map +1 -0
- package/lib/web/vitepress/process-front-matter-files.js +1 -0
- package/lib/web/vitepress/process-front-matter-files.js.map +1 -0
- package/lib/web/vitepress/vitepress.d.ts +3 -2
- package/lib/web/vitepress/vitepress.d.ts.map +1 -0
- package/lib/web/vitepress/vitepress.js +8 -7
- package/lib/web/vitepress/vitepress.js.map +1 -0
- 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/api.ts +3 -3
- package/src/cloudflare/assets.ts +3 -3
- package/src/cloudflare/auth.ts +8 -8
- package/src/cloudflare/bindings.ts +11 -11
- package/src/cloudflare/bound.ts +12 -12
- package/src/cloudflare/bucket.ts +5 -5
- package/src/cloudflare/custom-domain.ts +4 -4
- package/src/cloudflare/d1-database.ts +32 -33
- package/src/cloudflare/d1-migrations.ts +3 -3
- package/src/cloudflare/dns-records.ts +5 -5
- package/src/cloudflare/index.ts +27 -25
- package/src/cloudflare/kv-namespace.ts +5 -5
- package/src/cloudflare/nuxt.ts +66 -0
- 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 +96 -0
- 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 +39 -17
- package/src/cloudflare/workflow.ts +2 -2
- package/src/cloudflare/wrangler.json.ts +8 -7
- 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
|
@@ -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
|
|
@@ -82,40 +82,39 @@ export interface D1DatabaseProps extends CloudflareApiOptions {
|
|
|
82
82
|
/**
|
|
83
83
|
* Output returned after D1 Database creation/update
|
|
84
84
|
*/
|
|
85
|
-
export
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
id: string;
|
|
85
|
+
export type D1Database = Resource<"cloudflare::D1Database"> &
|
|
86
|
+
D1DatabaseProps & {
|
|
87
|
+
type: "d1";
|
|
88
|
+
/**
|
|
89
|
+
* The unique ID of the database (UUID)
|
|
90
|
+
*/
|
|
91
|
+
id: string;
|
|
93
92
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
/**
|
|
94
|
+
* File size of the database
|
|
95
|
+
*/
|
|
96
|
+
fileSize: number;
|
|
98
97
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
/**
|
|
99
|
+
* Number of tables in the database
|
|
100
|
+
*/
|
|
101
|
+
numTables: number;
|
|
103
102
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
/**
|
|
104
|
+
* Version of the database
|
|
105
|
+
*/
|
|
106
|
+
version: string;
|
|
108
107
|
|
|
109
|
-
/**
|
|
110
|
-
* Read replication configuration
|
|
111
|
-
*/
|
|
112
|
-
readReplication?: {
|
|
113
108
|
/**
|
|
114
|
-
* Read replication
|
|
109
|
+
* Read replication configuration
|
|
115
110
|
*/
|
|
116
|
-
|
|
111
|
+
readReplication?: {
|
|
112
|
+
/**
|
|
113
|
+
* Read replication mode
|
|
114
|
+
*/
|
|
115
|
+
mode: "auto" | "disabled";
|
|
116
|
+
};
|
|
117
117
|
};
|
|
118
|
-
}
|
|
119
118
|
|
|
120
119
|
export async function D1Database(
|
|
121
120
|
id: string,
|
|
@@ -278,7 +277,7 @@ export const D1DatabaseResource = Resource(
|
|
|
278
277
|
readReplication: dbData.result.read_replication,
|
|
279
278
|
primaryLocationHint: props.primaryLocationHint,
|
|
280
279
|
accountId: api.accountId,
|
|
281
|
-
migrationsDir: props.migrationsDir
|
|
280
|
+
migrationsDir: props.migrationsDir,
|
|
282
281
|
});
|
|
283
282
|
}
|
|
284
283
|
}
|
|
@@ -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,25 +1,27 @@
|
|
|
1
|
-
export * from "./account-api-token";
|
|
2
|
-
export * from "./api";
|
|
3
|
-
export * from "./api
|
|
4
|
-
export * from "./assets";
|
|
5
|
-
export * from "./bindings";
|
|
6
|
-
export * from "./bucket";
|
|
7
|
-
export * from "./custom-domain";
|
|
8
|
-
export * from "./d1-database";
|
|
9
|
-
export * from "./dns-records";
|
|
10
|
-
export * from "./durable-object-namespace";
|
|
11
|
-
export * from "./kv-namespace";
|
|
12
|
-
export * from "./local-dev-cloudflare-shim";
|
|
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 "./
|
|
22
|
-
export * from "./
|
|
23
|
-
export
|
|
24
|
-
export * from "./
|
|
25
|
-
export
|
|
1
|
+
export * from "./account-api-token.js";
|
|
2
|
+
export * from "./api-error.js";
|
|
3
|
+
export * from "./api.js";
|
|
4
|
+
export * from "./assets.js";
|
|
5
|
+
export * from "./bindings.js";
|
|
6
|
+
export * from "./bucket.js";
|
|
7
|
+
export * from "./custom-domain.js";
|
|
8
|
+
export * from "./d1-database.js";
|
|
9
|
+
export * from "./dns-records.js";
|
|
10
|
+
export * from "./durable-object-namespace.js";
|
|
11
|
+
export * from "./kv-namespace.js";
|
|
12
|
+
export * from "./local-dev-cloudflare-shim.js";
|
|
13
|
+
export * from "./nuxt.js";
|
|
14
|
+
export * from "./permission-groups.js";
|
|
15
|
+
export * from "./pipeline.js";
|
|
16
|
+
export * from "./queue.js";
|
|
17
|
+
export * from "./r2-rest-state-store.js";
|
|
18
|
+
export * from "./redwood.js";
|
|
19
|
+
export * from "./tanstack-start.js";
|
|
20
|
+
export * from "./vectorize-index.js";
|
|
21
|
+
export * from "./vectorize-metadata-index.js";
|
|
22
|
+
export * from "./vite.js";
|
|
23
|
+
export * from "./website.js";
|
|
24
|
+
export * from "./worker.js";
|
|
25
|
+
export { Workflow } from "./workflow.js";
|
|
26
|
+
export * from "./wrangler.json.js";
|
|
27
|
+
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
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Properties for creating a Nuxt resource.
|
|
8
|
+
* Extends WebsiteProps, allowing customization of the underlying Website.
|
|
9
|
+
*/
|
|
10
|
+
export interface NuxtProps<B extends Bindings> extends WebsiteProps<B> {}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Represents the output of a Nuxt resource deployment.
|
|
14
|
+
* It resolves to the underlying Cloudflare Worker type, ensuring type safety.
|
|
15
|
+
* Prevents overriding the internal ASSETS binding.
|
|
16
|
+
*/
|
|
17
|
+
export type Nuxt<B extends Bindings> = B extends { ASSETS: any }
|
|
18
|
+
? never
|
|
19
|
+
: Worker<B & { ASSETS: Assets }>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Creates and deploys a Nuxt application using the Cloudflare Workers preset.
|
|
23
|
+
*
|
|
24
|
+
* This resource simplifies deploying Nuxt applications by providing sensible
|
|
25
|
+
* defaults for the build command, main entrypoint, and assets directory
|
|
26
|
+
* based on the `cloudflare-module` preset output.
|
|
27
|
+
*
|
|
28
|
+
* It wraps the underlying `Website` resource.
|
|
29
|
+
*
|
|
30
|
+
* @param id A unique identifier for the resource.
|
|
31
|
+
* @param props Configuration options for the Nuxt deployment, overriding defaults.
|
|
32
|
+
* @returns A promise that resolves to the deployed Cloudflare Worker details.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* // Deploy a basic Nuxt site with default settings
|
|
36
|
+
* const nuxtSite = await Nuxt("my-nuxt-app");
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* // Deploy with custom bindings and build command
|
|
40
|
+
* const db = await D1Database("my-db");
|
|
41
|
+
* const nuxtSiteWithDb = await Nuxt("my-nuxt-app-with-db", {
|
|
42
|
+
* command: "npm run build:cloudflare", // Specify a custom build command
|
|
43
|
+
* bindings: {
|
|
44
|
+
* DB: db, // Add custom bindings
|
|
45
|
+
* },
|
|
46
|
+
* });
|
|
47
|
+
*/
|
|
48
|
+
export async function Nuxt<B extends Bindings>(
|
|
49
|
+
id: string,
|
|
50
|
+
props?: Partial<NuxtProps<B>>
|
|
51
|
+
): Promise<Nuxt<B>> {
|
|
52
|
+
// Call the underlying Website resource with Nuxt defaults
|
|
53
|
+
return Website(id, {
|
|
54
|
+
...props,
|
|
55
|
+
// Default build command, can be overridden by props.command
|
|
56
|
+
command: props?.command ?? "bun run build",
|
|
57
|
+
// Default entry point for cloudflare-module preset
|
|
58
|
+
main: props?.main ?? "./index.ts",
|
|
59
|
+
// Default static assets directory for cloudflare-module preset
|
|
60
|
+
assets: props?.assets ?? "./.output/public",
|
|
61
|
+
// Ensure nodejs_compat flag is included for Nuxt compatibility
|
|
62
|
+
compatibilityFlags: ["nodejs_compat", ...(props?.compatibilityFlags ?? [])],
|
|
63
|
+
// Enable wrangler by default, common for Nuxt/Cloudflare deployments
|
|
64
|
+
wrangler: props?.wrangler ?? true,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
@@ -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
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { Context } from "../context";
|
|
2
|
-
import { Resource } from "../resource";
|
|
3
|
-
import type { Secret } from "../secret";
|
|
1
|
+
import type { Context } from "../context.js";
|
|
2
|
+
import { Resource } from "../resource.js";
|
|
3
|
+
import type { Secret } from "../secret.js";
|
|
4
|
+
import { CloudflareApiError, handleApiError } from "./api-error.js";
|
|
4
5
|
import {
|
|
5
6
|
CloudflareApi,
|
|
6
7
|
createCloudflareApi,
|
|
7
8
|
type CloudflareApiOptions,
|
|
8
|
-
} from "./api";
|
|
9
|
-
import { CloudflareApiError, handleApiError } from "./api-error";
|
|
9
|
+
} from "./api.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Settings for compression of pipeline output
|
package/src/cloudflare/queue.ts
CHANGED
|
@@ -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 { CloudflareApiError, handleApiError } from "./api-error.js";
|
|
3
4
|
import {
|
|
4
5
|
CloudflareApi,
|
|
5
6
|
createCloudflareApi,
|
|
6
7
|
type CloudflareApiOptions,
|
|
7
|
-
} from "./api";
|
|
8
|
-
import { CloudflareApiError, handleApiError } from "./api-error";
|
|
8
|
+
} from "./api.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Settings for a Cloudflare Queue
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { Scope } from "../scope";
|
|
2
|
-
import { deserialize, serialize } from "../serde";
|
|
3
|
-
import type { State, StateStore } from "../state";
|
|
4
|
-
import { withExponentialBackoff } from "../util/retry";
|
|
1
|
+
import type { Scope } from "../scope.js";
|
|
2
|
+
import { deserialize, serialize } from "../serde.js";
|
|
3
|
+
import type { State, StateStore } from "../state.js";
|
|
4
|
+
import { withExponentialBackoff } from "../util/retry.js";
|
|
5
|
+
import { CloudflareApiError, handleApiError } from "./api-error.js";
|
|
5
6
|
import {
|
|
6
7
|
type CloudflareApi,
|
|
7
8
|
type CloudflareApiOptions,
|
|
8
9
|
createCloudflareApi,
|
|
9
|
-
} from "./api";
|
|
10
|
-
import { CloudflareApiError, handleApiError } from "./api-error";
|
|
10
|
+
} from "./api.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Options for CloudflareR2StateStore
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import type { Assets } from "./assets.js";
|
|
3
|
+
import type { Bindings } from "./bindings.js";
|
|
4
|
+
import { Website, type WebsiteProps } from "./website.js";
|
|
5
|
+
import type { Worker } from "./worker.js";
|
|
6
|
+
|
|
7
|
+
export interface RedwoodProps<B extends Bindings> extends WebsiteProps<B> {}
|
|
8
|
+
|
|
9
|
+
// don't allow the ASSETS to be overridden
|
|
10
|
+
export type Redwood<B extends Bindings> = B extends { ASSETS: any }
|
|
11
|
+
? never
|
|
12
|
+
: Worker<B & { ASSETS: Assets }>;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Deploy a RedwoodJS application to Cloudflare Pages with automatically configured defaults.
|
|
16
|
+
*
|
|
17
|
+
* This resource handles the deployment of RedwoodJS applications with optimized settings for
|
|
18
|
+
* Cloudflare Workers, including proper build commands and compatibility flags.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // Deploy a basic RedwoodJS application with default settings
|
|
22
|
+
* const redwoodApp = await Redwood("my-redwood-app");
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // Deploy with a database binding
|
|
26
|
+
* import { D1Database } from "../cloudflare/d1-database";
|
|
27
|
+
*
|
|
28
|
+
* const database = await D1Database("redwood-db");
|
|
29
|
+
*
|
|
30
|
+
* const redwoodApp = await Redwood("redwood-with-db", {
|
|
31
|
+
* bindings: {
|
|
32
|
+
* DB: database
|
|
33
|
+
* }
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* // Deploy with custom build command and environment variables
|
|
38
|
+
* const redwoodApp = await Redwood("custom-redwood", {
|
|
39
|
+
* command: "bun run test && RWSDK_DEPLOY=1 bun run build:production",
|
|
40
|
+
* bindings: {
|
|
41
|
+
* API_KEY: alchemy.secret("api-key-secret")
|
|
42
|
+
* },
|
|
43
|
+
* vars: {
|
|
44
|
+
* NODE_ENV: "production",
|
|
45
|
+
* APP_ENV: "staging"
|
|
46
|
+
* }
|
|
47
|
+
* });
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* // Deploy with custom paths and additional compatibility flags
|
|
51
|
+
* const redwoodApp = await Redwood("redwood-custom-paths", {
|
|
52
|
+
* main: "custom/worker.js",
|
|
53
|
+
* assets: "custom/static",
|
|
54
|
+
* compatibilityFlags: ["nodejs_compat", "fetch_refused_to_set_cookies"]
|
|
55
|
+
* });
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* // Deploy with custom bundle configuration
|
|
59
|
+
* const redwoodApp = await Redwood("redwood-custom-bundle", {
|
|
60
|
+
* bundle: {
|
|
61
|
+
* options: {
|
|
62
|
+
* external: ["node:events", "node:stream", "node:crypto"],
|
|
63
|
+
* format: "esm"
|
|
64
|
+
* }
|
|
65
|
+
* }
|
|
66
|
+
* });
|
|
67
|
+
*
|
|
68
|
+
* @param id - Unique identifier for the RedwoodJS application
|
|
69
|
+
* @param props - Configuration properties for the RedwoodJS deployment
|
|
70
|
+
* @returns A Cloudflare Worker resource representing the deployed RedwoodJS application
|
|
71
|
+
*/
|
|
72
|
+
export async function Redwood<B extends Bindings>(
|
|
73
|
+
id: string,
|
|
74
|
+
props?: Partial<RedwoodProps<B>>
|
|
75
|
+
): Promise<Redwood<B>> {
|
|
76
|
+
return Website(id, {
|
|
77
|
+
...props,
|
|
78
|
+
command: props?.command ?? "bun run clean && RWSDK_DEPLOY=1 bun run build",
|
|
79
|
+
wrangler: props?.wrangler ?? true,
|
|
80
|
+
main: props?.main ?? path.join("src", "worker.tsx"),
|
|
81
|
+
assets: props?.assets ?? path.join("dist", "client"),
|
|
82
|
+
compatibilityFlags: ["nodejs_compat", ...(props?.compatibilityFlags ?? [])],
|
|
83
|
+
compatibilityDate: props?.compatibilityDate ?? "2025-04-02",
|
|
84
|
+
bundle: {
|
|
85
|
+
...props?.bundle,
|
|
86
|
+
options: {
|
|
87
|
+
...props?.bundle?.options,
|
|
88
|
+
external: [
|
|
89
|
+
"node:events",
|
|
90
|
+
"node:stream",
|
|
91
|
+
...(props?.bundle?.options?.external ?? []),
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
}
|
|
@@ -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
|
export interface TanStackStartProps<B extends Bindings>
|
|
7
7
|
extends WebsiteProps<B> {}
|
|
@@ -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 { CloudflareApiError, handleApiError } from "./api-error.js";
|
|
3
4
|
import {
|
|
4
|
-
CloudflareApi,
|
|
5
5
|
createCloudflareApi,
|
|
6
|
+
type CloudflareApi,
|
|
6
7
|
type CloudflareApiOptions,
|
|
7
|
-
} from "./api";
|
|
8
|
-
import { CloudflareApiError, handleApiError } from "./api-error";
|
|
8
|
+
} from "./api.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Properties for creating or updating a Vectorize Index
|
|
@@ -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
|
-
CloudflareApi,
|
|
5
5
|
createCloudflareApi,
|
|
6
|
+
type CloudflareApi,
|
|
6
7
|
type CloudflareApiOptions,
|
|
7
|
-
} from "./api";
|
|
8
|
-
import {
|
|
9
|
-
import { VectorizeIndex } from "./vectorize-index";
|
|
8
|
+
} from "./api.js";
|
|
9
|
+
import { VectorizeIndex } from "./vectorize-index.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Properties for creating or deleting a Vectorize Metadata Index
|
package/src/cloudflare/vite.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import type { Assets } from "./assets";
|
|
4
|
-
import type { Bindings } from "./bindings";
|
|
5
|
-
import { Website, type WebsiteProps } from "./website";
|
|
6
|
-
import type { Worker } from "./worker";
|
|
3
|
+
import type { Assets } from "./assets.js";
|
|
4
|
+
import type { Bindings } from "./bindings.js";
|
|
5
|
+
import { Website, type WebsiteProps } from "./website.js";
|
|
6
|
+
import type { Worker } from "./worker.js";
|
|
7
7
|
|
|
8
8
|
export interface ViteProps<B extends Bindings> extends WebsiteProps<B> {}
|
|
9
9
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { alchemy } from "../alchemy";
|
|
4
|
-
import { Exec } from "../os";
|
|
5
|
-
import { Assets } from "./assets";
|
|
6
|
-
import type { Bindings } from "./bindings";
|
|
7
|
-
import { Worker, type AssetsConfig, type WorkerProps } from "./worker";
|
|
8
|
-
import { WranglerJson } from "./wrangler.json";
|
|
3
|
+
import { alchemy } from "../alchemy.js";
|
|
4
|
+
import { Exec } from "../os/exec.js";
|
|
5
|
+
import { Assets } from "./assets.js";
|
|
6
|
+
import type { Bindings } from "./bindings.js";
|
|
7
|
+
import { Worker, type AssetsConfig, type WorkerProps } from "./worker.js";
|
|
8
|
+
import { WranglerJson } from "./wrangler.json.js";
|
|
9
9
|
|
|
10
10
|
export interface WebsiteProps<B extends Bindings>
|
|
11
11
|
extends Omit<WorkerProps<B>, "name" | "assets" | "entrypoint"> {
|
package/src/cloudflare/worker.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import * as crypto from "node:crypto";
|
|
2
2
|
import * as fs from "node:fs/promises";
|
|
3
|
-
import type { Context } from "../context";
|
|
4
|
-
import { Bundle, type BundleProps } from "../esbuild/bundle";
|
|
5
|
-
import { Resource } from "../resource";
|
|
6
|
-
import { getContentType } from "../util/content-type";
|
|
7
|
-
import { withExponentialBackoff } from "../util/retry";
|
|
8
|
-
import { slugify } from "../util/slugify";
|
|
3
|
+
import type { Context } from "../context.js";
|
|
4
|
+
import { Bundle, type BundleProps } from "../esbuild/bundle.js";
|
|
5
|
+
import { Resource } from "../resource.js";
|
|
6
|
+
import { getContentType } from "../util/content-type.js";
|
|
7
|
+
import { withExponentialBackoff } from "../util/retry.js";
|
|
8
|
+
import { slugify } from "../util/slugify.js";
|
|
9
9
|
import {
|
|
10
10
|
createCloudflareApi,
|
|
11
11
|
type CloudflareApi,
|
|
12
12
|
type CloudflareApiOptions,
|
|
13
|
-
} from "./api";
|
|
14
|
-
import { type Assets } from "./assets";
|
|
15
|
-
import { type Bindings, type WorkerBindingSpec } from "./bindings";
|
|
16
|
-
import type { Bound } from "./bound";
|
|
17
|
-
import { type DurableObjectNamespace } from "./durable-object-namespace";
|
|
18
|
-
import type { WorkerScriptMetadata } from "./worker-metadata";
|
|
19
|
-
import type { SingleStepMigration } from "./worker-migration";
|
|
20
|
-
import { upsertWorkflow, type Workflow } from "./workflow";
|
|
13
|
+
} from "./api.js";
|
|
14
|
+
import { type Assets } from "./assets.js";
|
|
15
|
+
import { type Bindings, type WorkerBindingSpec } from "./bindings.js";
|
|
16
|
+
import type { Bound } from "./bound.js";
|
|
17
|
+
import { type DurableObjectNamespace } from "./durable-object-namespace.js";
|
|
18
|
+
import type { WorkerScriptMetadata } from "./worker-metadata.js";
|
|
19
|
+
import type { SingleStepMigration } from "./worker-migration.js";
|
|
20
|
+
import { upsertWorkflow, type Workflow } from "./workflow.js";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Configuration options for static assets
|
|
@@ -204,6 +204,16 @@ export interface Worker<B extends Bindings = Bindings>
|
|
|
204
204
|
Env: {
|
|
205
205
|
[bindingName in keyof B]: Bound<B[bindingName]>;
|
|
206
206
|
};
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The compatibility date for the worker
|
|
210
|
+
*/
|
|
211
|
+
compatibilityDate: string;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* The compatibility flags for the worker
|
|
215
|
+
*/
|
|
216
|
+
compatibilityFlags: string[];
|
|
207
217
|
}
|
|
208
218
|
|
|
209
219
|
/**
|
|
@@ -350,11 +360,18 @@ export const Worker = Resource(
|
|
|
350
360
|
);
|
|
351
361
|
}
|
|
352
362
|
|
|
363
|
+
const compatibilityDate = props.compatibilityDate ?? "2024-09-09";
|
|
364
|
+
const compatibilityFlags = props.compatibilityFlags ?? [];
|
|
365
|
+
|
|
353
366
|
// Prepare metadata with bindings
|
|
354
367
|
const scriptMetadata = await prepareWorkerMetadata(
|
|
355
368
|
this,
|
|
356
369
|
oldBindings,
|
|
357
|
-
|
|
370
|
+
{
|
|
371
|
+
...props,
|
|
372
|
+
compatibilityDate,
|
|
373
|
+
compatibilityFlags,
|
|
374
|
+
},
|
|
358
375
|
assetUploadResult
|
|
359
376
|
);
|
|
360
377
|
|
|
@@ -389,6 +406,8 @@ export const Worker = Resource(
|
|
|
389
406
|
id,
|
|
390
407
|
entrypoint: props.entrypoint,
|
|
391
408
|
name: workerName,
|
|
409
|
+
compatibilityDate,
|
|
410
|
+
compatibilityFlags,
|
|
392
411
|
script: scriptContent,
|
|
393
412
|
format: props.format || "esm", // Include format in the output
|
|
394
413
|
bindings: props.bindings ?? ({} as B),
|
|
@@ -586,12 +605,15 @@ function createAssetConfig(config?: AssetsConfig): AssetsConfig {
|
|
|
586
605
|
async function prepareWorkerMetadata<B extends Bindings>(
|
|
587
606
|
ctx: Context<Worker<B>>,
|
|
588
607
|
oldBindings: Bindings | undefined,
|
|
589
|
-
props: WorkerProps
|
|
608
|
+
props: WorkerProps & {
|
|
609
|
+
compatibilityDate: string;
|
|
610
|
+
compatibilityFlags: string[];
|
|
611
|
+
},
|
|
590
612
|
assetUploadResult?: AssetUploadResult
|
|
591
613
|
): Promise<WorkerMetadata> {
|
|
592
614
|
// Prepare metadata with bindings
|
|
593
615
|
const meta: WorkerMetadata = {
|
|
594
|
-
compatibility_date: props.compatibilityDate
|
|
616
|
+
compatibility_date: props.compatibilityDate,
|
|
595
617
|
compatibility_flags: props.compatibilityFlags,
|
|
596
618
|
bindings: [],
|
|
597
619
|
observability: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Context } from "../context";
|
|
2
|
-
import { StaticJsonFile } from "../fs/static-json-file";
|
|
3
|
-
import { Resource } from "../resource";
|
|
4
|
-
import type { Bindings } from "./bindings";
|
|
5
|
-
import type { DurableObjectNamespace } from "./durable-object-namespace";
|
|
6
|
-
import type { Worker } from "./worker";
|
|
1
|
+
import type { Context } from "../context.js";
|
|
2
|
+
import { StaticJsonFile } from "../fs/static-json-file.js";
|
|
3
|
+
import { Resource } from "../resource.js";
|
|
4
|
+
import type { Bindings } from "./bindings.js";
|
|
5
|
+
import type { DurableObjectNamespace } from "./durable-object-namespace.js";
|
|
6
|
+
import type { Worker } from "./worker.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Properties for wrangler.json configuration file
|
|
@@ -74,7 +74,8 @@ export const WranglerJson = Resource(
|
|
|
74
74
|
// Use entrypoint as main if it exists
|
|
75
75
|
main: worker.entrypoint,
|
|
76
76
|
// see: https://developers.cloudflare.com/workers/configuration/compatibility-dates/
|
|
77
|
-
compatibility_date:
|
|
77
|
+
compatibility_date: worker.compatibilityDate,
|
|
78
|
+
compatibility_flags: props.worker.compatibilityFlags,
|
|
78
79
|
};
|
|
79
80
|
|
|
80
81
|
// Process bindings if they exist
|