alchemy 0.67.0 → 0.68.0
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/bin/alchemy.js +25563 -26265
- package/bin/alchemy.ts +6 -2
- package/bin/commands/configure.ts +194 -0
- package/bin/commands/login.ts +99 -55
- package/bin/commands/logout.ts +66 -0
- package/bin/trpc.ts +27 -2
- package/lib/apply.d.ts +2 -2
- package/lib/apply.d.ts.map +1 -1
- package/lib/apply.js +18 -15
- package/lib/apply.js.map +1 -1
- package/lib/auth.d.ts +72 -0
- package/lib/auth.d.ts.map +1 -0
- package/lib/auth.js +163 -0
- package/lib/auth.js.map +1 -0
- package/lib/aws/bucket.d.ts +12 -3
- 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/control/resource.d.ts +34 -3
- package/lib/aws/control/resource.d.ts.map +1 -1
- package/lib/aws/control/resource.js +3 -3
- package/lib/aws/control/resource.js.map +1 -1
- package/lib/aws/ec2/internet-gateway-attachment.d.ts +1 -2
- package/lib/aws/ec2/internet-gateway-attachment.d.ts.map +1 -1
- package/lib/aws/ec2/internet-gateway-attachment.js +4 -4
- package/lib/aws/ec2/internet-gateway-attachment.js.map +1 -1
- package/lib/aws/ec2/internet-gateway.d.ts +1 -2
- package/lib/aws/ec2/internet-gateway.d.ts.map +1 -1
- package/lib/aws/ec2/internet-gateway.js +2 -2
- package/lib/aws/ec2/internet-gateway.js.map +1 -1
- package/lib/aws/ec2/nat-gateway.d.ts +1 -2
- package/lib/aws/ec2/nat-gateway.d.ts.map +1 -1
- package/lib/aws/ec2/nat-gateway.js +2 -2
- package/lib/aws/ec2/nat-gateway.js.map +1 -1
- package/lib/aws/ec2/route-table-association.d.ts +1 -2
- package/lib/aws/ec2/route-table-association.d.ts.map +1 -1
- package/lib/aws/ec2/route-table-association.js +2 -2
- package/lib/aws/ec2/route-table-association.js.map +1 -1
- package/lib/aws/ec2/route-table.d.ts +1 -2
- package/lib/aws/ec2/route-table.d.ts.map +1 -1
- package/lib/aws/ec2/route-table.js +2 -2
- package/lib/aws/ec2/route-table.js.map +1 -1
- package/lib/aws/ec2/route.d.ts +1 -2
- package/lib/aws/ec2/route.d.ts.map +1 -1
- package/lib/aws/ec2/route.js +2 -2
- package/lib/aws/ec2/route.js.map +1 -1
- package/lib/aws/ec2/security-group-rule.d.ts +1 -2
- package/lib/aws/ec2/security-group-rule.d.ts.map +1 -1
- package/lib/aws/ec2/security-group-rule.js +2 -2
- package/lib/aws/ec2/security-group-rule.js.map +1 -1
- package/lib/aws/ec2/security-group.d.ts +1 -2
- package/lib/aws/ec2/security-group.d.ts.map +1 -1
- package/lib/aws/ec2/security-group.js +2 -2
- package/lib/aws/ec2/security-group.js.map +1 -1
- package/lib/aws/ec2/subnet.d.ts +1 -2
- package/lib/aws/ec2/subnet.d.ts.map +1 -1
- package/lib/aws/ec2/subnet.js +2 -2
- package/lib/aws/ec2/subnet.js.map +1 -1
- package/lib/aws/ec2/vpc.d.ts +1 -2
- package/lib/aws/ec2/vpc.d.ts.map +1 -1
- package/lib/aws/ec2/vpc.js +2 -2
- package/lib/aws/ec2/vpc.js.map +1 -1
- package/lib/aws/function.d.ts +116 -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/oidc/github-oidc-provider.d.ts +13 -2
- package/lib/aws/oidc/github-oidc-provider.d.ts.map +1 -1
- package/lib/aws/oidc/oidc-provider.d.ts +48 -3
- 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 -3
- package/lib/aws/policy-attachment.d.ts.map +1 -1
- package/lib/aws/policy-attachment.js +1 -1
- package/lib/aws/policy-attachment.js.map +1 -1
- package/lib/aws/policy.d.ts +1 -2
- package/lib/aws/policy.d.ts.map +1 -1
- package/lib/aws/policy.js +4 -4
- package/lib/aws/policy.js.map +1 -1
- package/lib/aws/queue.d.ts +1 -2
- package/lib/aws/queue.d.ts.map +1 -1
- package/lib/aws/queue.js +4 -4
- package/lib/aws/queue.js.map +1 -1
- package/lib/aws/role.d.ts +1 -2
- 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 +1 -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/ssm-parameter.d.ts +1 -2
- package/lib/aws/ssm-parameter.d.ts.map +1 -1
- package/lib/aws/ssm-parameter.js +2 -2
- package/lib/aws/ssm-parameter.js.map +1 -1
- package/lib/aws/table.d.ts +1 -2
- package/lib/aws/table.d.ts.map +1 -1
- package/lib/aws/table.js +2 -2
- package/lib/aws/table.js.map +1 -1
- package/lib/cloudflare/account-api-token.d.ts +1 -2
- package/lib/cloudflare/account-api-token.d.ts.map +1 -1
- package/lib/cloudflare/account-api-token.js +2 -2
- package/lib/cloudflare/account-api-token.js.map +1 -1
- package/lib/cloudflare/ai-gateway.d.ts +1 -2
- package/lib/cloudflare/ai-gateway.d.ts.map +1 -1
- package/lib/cloudflare/ai-gateway.js +2 -2
- package/lib/cloudflare/ai-gateway.js.map +1 -1
- package/lib/cloudflare/api-gateway-operation.d.ts +1 -2
- package/lib/cloudflare/api-gateway-operation.d.ts.map +1 -1
- package/lib/cloudflare/api-gateway-operation.js +2 -2
- package/lib/cloudflare/api-gateway-operation.js.map +1 -1
- package/lib/cloudflare/api-schema.d.ts +1 -2
- package/lib/cloudflare/api-schema.d.ts.map +1 -1
- package/lib/cloudflare/api-schema.js +2 -2
- package/lib/cloudflare/api-schema.js.map +1 -1
- package/lib/cloudflare/api-shield.d.ts +1 -2
- package/lib/cloudflare/api-shield.d.ts.map +1 -1
- package/lib/cloudflare/api-shield.js +2 -2
- package/lib/cloudflare/api-shield.js.map +1 -1
- package/lib/cloudflare/api.d.ts +18 -10
- package/lib/cloudflare/api.d.ts.map +1 -1
- package/lib/cloudflare/api.js +93 -38
- package/lib/cloudflare/api.js.map +1 -1
- package/lib/cloudflare/assets.d.ts +21 -43
- package/lib/cloudflare/assets.d.ts.map +1 -1
- package/lib/cloudflare/assets.js +78 -70
- package/lib/cloudflare/assets.js.map +1 -1
- package/lib/cloudflare/auth.d.ts +91 -17
- package/lib/cloudflare/auth.d.ts.map +1 -1
- package/lib/cloudflare/auth.js +141 -62
- package/lib/cloudflare/auth.js.map +1 -1
- package/lib/cloudflare/bound.d.ts +1 -1
- package/lib/cloudflare/bound.d.ts.map +1 -1
- package/lib/cloudflare/bucket.d.ts +60 -8
- package/lib/cloudflare/bucket.d.ts.map +1 -1
- package/lib/cloudflare/bucket.js +161 -18
- package/lib/cloudflare/bucket.js.map +1 -1
- package/lib/cloudflare/bundle/plugin-wasm.js +4 -2
- package/lib/cloudflare/bundle/plugin-wasm.js.map +1 -1
- package/lib/cloudflare/certificate-pack.d.ts +1 -2
- package/lib/cloudflare/certificate-pack.d.ts.map +1 -1
- package/lib/cloudflare/certificate-pack.js +4 -4
- package/lib/cloudflare/certificate-pack.js.map +1 -1
- package/lib/cloudflare/compatibility-date.gen.d.ts +1 -1
- package/lib/cloudflare/compatibility-date.gen.js +1 -1
- package/lib/cloudflare/container.d.ts +1 -2
- package/lib/cloudflare/container.d.ts.map +1 -1
- package/lib/cloudflare/container.js +6 -6
- package/lib/cloudflare/container.js.map +1 -1
- package/lib/cloudflare/custom-domain.d.ts +1 -2
- package/lib/cloudflare/custom-domain.d.ts.map +1 -1
- package/lib/cloudflare/custom-domain.js +2 -2
- package/lib/cloudflare/custom-domain.js.map +1 -1
- package/lib/cloudflare/d1-database.d.ts +2 -3
- package/lib/cloudflare/d1-database.d.ts.map +1 -1
- package/lib/cloudflare/d1-database.js +5 -5
- package/lib/cloudflare/d1-database.js.map +1 -1
- package/lib/cloudflare/dispatch-namespace.d.ts +2 -3
- package/lib/cloudflare/dispatch-namespace.d.ts.map +1 -1
- package/lib/cloudflare/dispatch-namespace.js +3 -3
- package/lib/cloudflare/dispatch-namespace.js.map +1 -1
- package/lib/cloudflare/dns-records.d.ts +1 -2
- package/lib/cloudflare/dns-records.d.ts.map +1 -1
- package/lib/cloudflare/dns-records.js +4 -4
- package/lib/cloudflare/dns-records.js.map +1 -1
- package/lib/cloudflare/email-address.d.ts +1 -2
- package/lib/cloudflare/email-address.d.ts.map +1 -1
- package/lib/cloudflare/email-address.js +6 -6
- package/lib/cloudflare/email-address.js.map +1 -1
- package/lib/cloudflare/email-catch-all.d.ts +1 -2
- package/lib/cloudflare/email-catch-all.d.ts.map +1 -1
- package/lib/cloudflare/email-catch-all.js +4 -4
- package/lib/cloudflare/email-catch-all.js.map +1 -1
- package/lib/cloudflare/email-routing.d.ts +1 -2
- package/lib/cloudflare/email-routing.d.ts.map +1 -1
- package/lib/cloudflare/email-routing.js +4 -4
- package/lib/cloudflare/email-routing.js.map +1 -1
- package/lib/cloudflare/email-rule.d.ts +1 -2
- package/lib/cloudflare/email-rule.d.ts.map +1 -1
- package/lib/cloudflare/email-rule.js +4 -4
- package/lib/cloudflare/email-rule.js.map +1 -1
- package/lib/cloudflare/hyperdrive.d.ts +1 -2
- package/lib/cloudflare/hyperdrive.d.ts.map +1 -1
- package/lib/cloudflare/hyperdrive.js +4 -4
- package/lib/cloudflare/hyperdrive.js.map +1 -1
- package/lib/cloudflare/kv-namespace.d.ts +2 -3
- package/lib/cloudflare/kv-namespace.d.ts.map +1 -1
- package/lib/cloudflare/kv-namespace.js +5 -5
- package/lib/cloudflare/kv-namespace.js.map +1 -1
- package/lib/cloudflare/miniflare/delete.js +1 -1
- package/lib/cloudflare/miniflare/delete.js.map +1 -1
- package/lib/cloudflare/miniflare/miniflare-worker-proxy.d.ts.map +1 -1
- package/lib/cloudflare/miniflare/miniflare-worker-proxy.js +2 -7
- package/lib/cloudflare/miniflare/miniflare-worker-proxy.js.map +1 -1
- package/lib/cloudflare/miniflare/remote-binding-proxy.d.ts.map +1 -1
- package/lib/cloudflare/miniflare/remote-binding-proxy.js +15 -4
- package/lib/cloudflare/miniflare/remote-binding-proxy.js.map +1 -1
- package/lib/cloudflare/permission-groups.d.ts +1 -2
- package/lib/cloudflare/permission-groups.d.ts.map +1 -1
- package/lib/cloudflare/permission-groups.js +1 -1
- package/lib/cloudflare/permission-groups.js.map +1 -1
- package/lib/cloudflare/pipeline.d.ts +2 -3
- package/lib/cloudflare/pipeline.d.ts.map +1 -1
- package/lib/cloudflare/pipeline.js +5 -5
- package/lib/cloudflare/pipeline.js.map +1 -1
- package/lib/cloudflare/queue-consumer.d.ts +1 -2
- package/lib/cloudflare/queue-consumer.d.ts.map +1 -1
- package/lib/cloudflare/queue-consumer.js +4 -4
- package/lib/cloudflare/queue-consumer.js.map +1 -1
- package/lib/cloudflare/queue.d.ts +1 -2
- package/lib/cloudflare/queue.d.ts.map +1 -1
- package/lib/cloudflare/queue.js +4 -4
- package/lib/cloudflare/queue.js.map +1 -1
- package/lib/cloudflare/react-router/plugin.d.ts.map +1 -1
- package/lib/cloudflare/react-router/plugin.js +13 -0
- package/lib/cloudflare/react-router/plugin.js.map +1 -1
- package/lib/cloudflare/redirect-rule.d.ts +1 -2
- package/lib/cloudflare/redirect-rule.d.ts.map +1 -1
- package/lib/cloudflare/redirect-rule.js +4 -4
- package/lib/cloudflare/redirect-rule.js.map +1 -1
- package/lib/cloudflare/route.d.ts +1 -2
- package/lib/cloudflare/route.d.ts.map +1 -1
- package/lib/cloudflare/route.js +4 -4
- package/lib/cloudflare/route.js.map +1 -1
- package/lib/cloudflare/ruleset.d.ts +1 -2
- package/lib/cloudflare/ruleset.d.ts.map +1 -1
- package/lib/cloudflare/ruleset.js +2 -2
- package/lib/cloudflare/ruleset.js.map +1 -1
- package/lib/cloudflare/secret.d.ts +2 -3
- package/lib/cloudflare/secret.d.ts.map +1 -1
- package/lib/cloudflare/secret.js +3 -3
- package/lib/cloudflare/secret.js.map +1 -1
- package/lib/cloudflare/secrets-store.d.ts +2 -3
- package/lib/cloudflare/secrets-store.d.ts.map +1 -1
- package/lib/cloudflare/secrets-store.js +3 -3
- package/lib/cloudflare/secrets-store.js.map +1 -1
- package/lib/cloudflare/tunnel.d.ts +2 -3
- package/lib/cloudflare/tunnel.d.ts.map +1 -1
- package/lib/cloudflare/tunnel.js +3 -3
- package/lib/cloudflare/tunnel.js.map +1 -1
- package/lib/cloudflare/user.d.ts +3 -2
- package/lib/cloudflare/user.d.ts.map +1 -1
- package/lib/cloudflare/user.js +7 -5
- package/lib/cloudflare/user.js.map +1 -1
- package/lib/cloudflare/vectorize-index.d.ts +2 -3
- package/lib/cloudflare/vectorize-index.d.ts.map +1 -1
- package/lib/cloudflare/vectorize-index.js +6 -6
- package/lib/cloudflare/vectorize-index.js.map +1 -1
- package/lib/cloudflare/vectorize-metadata-index.d.ts +2 -3
- 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/website.js +1 -1
- package/lib/cloudflare/website.js.map +1 -1
- package/lib/cloudflare/worker-assets.d.ts +1 -29
- package/lib/cloudflare/worker-assets.d.ts.map +1 -1
- package/lib/cloudflare/worker-assets.js +9 -42
- package/lib/cloudflare/worker-assets.js.map +1 -1
- package/lib/cloudflare/worker-stub.d.ts +2 -3
- package/lib/cloudflare/worker-stub.d.ts.map +1 -1
- package/lib/cloudflare/worker-stub.js +3 -3
- package/lib/cloudflare/worker-stub.js.map +1 -1
- package/lib/cloudflare/worker-subdomain.d.ts +4 -3
- package/lib/cloudflare/worker-subdomain.d.ts.map +1 -1
- package/lib/cloudflare/worker-subdomain.js +5 -5
- package/lib/cloudflare/worker-subdomain.js.map +1 -1
- package/lib/cloudflare/worker.d.ts +3 -4
- package/lib/cloudflare/worker.d.ts.map +1 -1
- package/lib/cloudflare/worker.js +6 -5
- package/lib/cloudflare/worker.js.map +1 -1
- package/lib/cloudflare/zone.d.ts +1 -2
- 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 +8 -8
- package/lib/context.d.ts.map +1 -1
- package/lib/context.js.map +1 -1
- package/lib/destroy.d.ts +1 -1
- package/lib/destroy.d.ts.map +1 -1
- package/lib/destroy.js.map +1 -1
- package/lib/dns/import-dns.d.ts +1 -2
- 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/docker/container.d.ts +1 -2
- package/lib/docker/container.d.ts.map +1 -1
- package/lib/docker/container.js +2 -3
- package/lib/docker/container.js.map +1 -1
- package/lib/docker/image.d.ts +1 -2
- package/lib/docker/image.d.ts.map +1 -1
- package/lib/docker/image.js +9 -9
- package/lib/docker/image.js.map +1 -1
- package/lib/docker/network.d.ts +1 -2
- package/lib/docker/network.d.ts.map +1 -1
- package/lib/docker/network.js +2 -3
- package/lib/docker/network.js.map +1 -1
- package/lib/docker/remote-image.d.ts +1 -2
- package/lib/docker/remote-image.d.ts.map +1 -1
- package/lib/docker/remote-image.js +2 -3
- package/lib/docker/remote-image.js.map +1 -1
- package/lib/docker/volume.d.ts +1 -2
- package/lib/docker/volume.d.ts.map +1 -1
- package/lib/docker/volume.js +2 -3
- package/lib/docker/volume.js.map +1 -1
- package/lib/esbuild/bundle.d.ts +1 -2
- package/lib/esbuild/bundle.d.ts.map +1 -1
- package/lib/esbuild/bundle.js +4 -4
- package/lib/esbuild/bundle.js.map +1 -1
- package/lib/fs/copy-file.d.ts +1 -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.d.ts +1 -2
- package/lib/fs/file.d.ts.map +1 -1
- package/lib/fs/file.js +2 -2
- package/lib/fs/file.js.map +1 -1
- package/lib/fs/folder.d.ts +1 -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/github/comment.d.ts +1 -2
- package/lib/github/comment.d.ts.map +1 -1
- package/lib/github/comment.js +4 -4
- package/lib/github/comment.js.map +1 -1
- package/lib/github/repository-environment.d.ts +1 -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/repository-webhook.d.ts +1 -2
- package/lib/github/repository-webhook.d.ts.map +1 -1
- package/lib/github/repository-webhook.js +2 -2
- package/lib/github/repository-webhook.js.map +1 -1
- package/lib/github/secret.d.ts +1 -2
- 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/neon/api/client.gen.d.ts +13 -0
- package/lib/neon/api/client.gen.d.ts.map +1 -0
- package/lib/neon/api/client.gen.js +7 -0
- package/lib/neon/api/client.gen.js.map +1 -0
- package/lib/neon/api/sdk.gen.d.ts +880 -0
- package/lib/neon/api/sdk.gen.d.ts.map +1 -0
- package/lib/neon/api/sdk.gen.js +1527 -0
- package/lib/neon/api/sdk.gen.js.map +1 -0
- package/lib/neon/api/types.gen.d.ts +7250 -0
- package/lib/neon/api/types.gen.d.ts.map +1 -0
- package/lib/neon/api/types.gen.js +2 -0
- package/lib/neon/api/types.gen.js.map +1 -0
- package/lib/neon/api.d.ts +14 -49
- package/lib/neon/api.d.ts.map +1 -1
- package/lib/neon/api.js +36 -114
- package/lib/neon/api.js.map +1 -1
- package/lib/neon/branch.d.ts +141 -0
- package/lib/neon/branch.d.ts.map +1 -0
- package/lib/neon/branch.js +112 -0
- package/lib/neon/branch.js.map +1 -0
- package/lib/neon/index.d.ts +1 -1
- package/lib/neon/index.d.ts.map +1 -1
- package/lib/neon/index.js +1 -1
- package/lib/neon/index.js.map +1 -1
- package/lib/neon/project.d.ts +32 -242
- package/lib/neon/project.d.ts.map +1 -1
- package/lib/neon/project.js +90 -269
- package/lib/neon/project.js.map +1 -1
- package/lib/neon/utils.d.ts +49 -0
- package/lib/neon/utils.d.ts.map +1 -0
- package/lib/neon/utils.js +44 -0
- package/lib/neon/utils.js.map +1 -0
- package/lib/os/exec.d.ts +1 -2
- package/lib/os/exec.d.ts.map +1 -1
- package/lib/os/exec.js +2 -2
- package/lib/os/exec.js.map +1 -1
- package/lib/planetscale/api/client.gen.d.ts +12 -1749
- package/lib/planetscale/api/client.gen.d.ts.map +1 -1
- package/lib/planetscale/api/client.gen.js +6 -2400
- package/lib/planetscale/api/client.gen.js.map +1 -1
- package/lib/planetscale/api/sdk.gen.d.ts +1582 -0
- package/lib/planetscale/api/sdk.gen.d.ts.map +1 -0
- package/lib/planetscale/api/sdk.gen.js +2219 -0
- package/lib/planetscale/api/sdk.gen.js.map +1 -0
- package/lib/planetscale/api/types.gen.d.ts +594 -449
- package/lib/planetscale/api/types.gen.d.ts.map +1 -1
- package/lib/planetscale/api.d.ts +43 -0
- package/lib/planetscale/api.d.ts.map +1 -0
- package/lib/planetscale/api.js +53 -0
- package/lib/planetscale/api.js.map +1 -0
- package/lib/planetscale/branch.d.ts +2 -3
- package/lib/planetscale/branch.d.ts.map +1 -1
- package/lib/planetscale/branch.js +17 -15
- package/lib/planetscale/branch.js.map +1 -1
- package/lib/planetscale/database.d.ts +2 -3
- package/lib/planetscale/database.d.ts.map +1 -1
- package/lib/planetscale/database.js +34 -34
- package/lib/planetscale/database.js.map +1 -1
- package/lib/planetscale/index.d.ts +1 -1
- package/lib/planetscale/index.d.ts.map +1 -1
- package/lib/planetscale/index.js +1 -1
- package/lib/planetscale/index.js.map +1 -1
- package/lib/planetscale/password.d.ts +2 -3
- package/lib/planetscale/password.d.ts.map +1 -1
- package/lib/planetscale/password.js +11 -11
- package/lib/planetscale/password.js.map +1 -1
- package/lib/planetscale/role.d.ts +2 -3
- package/lib/planetscale/role.d.ts.map +1 -1
- package/lib/planetscale/role.js +18 -18
- package/lib/planetscale/role.js.map +1 -1
- package/lib/planetscale/utils.d.ts +1 -1
- package/lib/planetscale/utils.d.ts.map +1 -1
- package/lib/planetscale/utils.js +17 -33
- package/lib/planetscale/utils.js.map +1 -1
- package/lib/random/random-string.d.ts +1 -2
- package/lib/random/random-string.d.ts.map +1 -1
- package/lib/random/random-string.js +3 -3
- package/lib/random/random-string.js.map +1 -1
- package/lib/resource.d.ts +4 -1
- package/lib/resource.d.ts.map +1 -1
- package/lib/resource.js.map +1 -1
- package/lib/sentry/client-key.d.ts +1 -2
- package/lib/sentry/client-key.d.ts.map +1 -1
- package/lib/sentry/client-key.js +2 -2
- package/lib/sentry/client-key.js.map +1 -1
- package/lib/sentry/project.d.ts +1 -2
- package/lib/sentry/project.d.ts.map +1 -1
- package/lib/sentry/project.js +2 -2
- package/lib/sentry/project.js.map +1 -1
- package/lib/sentry/team.d.ts +1 -2
- package/lib/sentry/team.d.ts.map +1 -1
- package/lib/sentry/team.js +2 -2
- package/lib/sentry/team.js.map +1 -1
- package/lib/state/r2-rest-state-store.d.ts +1 -0
- package/lib/state/r2-rest-state-store.d.ts.map +1 -1
- package/lib/state/r2-rest-state-store.js +15 -34
- package/lib/state/r2-rest-state-store.js.map +1 -1
- package/lib/stripe/card.d.ts +1 -2
- package/lib/stripe/card.d.ts.map +1 -1
- package/lib/stripe/card.js +2 -2
- package/lib/stripe/card.js.map +1 -1
- package/lib/stripe/coupon.d.ts +1 -2
- package/lib/stripe/coupon.d.ts.map +1 -1
- package/lib/stripe/coupon.js +2 -2
- package/lib/stripe/coupon.js.map +1 -1
- package/lib/stripe/customer.d.ts +1 -2
- package/lib/stripe/customer.d.ts.map +1 -1
- package/lib/stripe/customer.js +2 -2
- package/lib/stripe/customer.js.map +1 -1
- package/lib/stripe/entitlements-feature.d.ts +1 -2
- package/lib/stripe/entitlements-feature.d.ts.map +1 -1
- package/lib/stripe/entitlements-feature.js +2 -2
- package/lib/stripe/entitlements-feature.js.map +1 -1
- package/lib/stripe/file.d.ts +1 -2
- package/lib/stripe/file.d.ts.map +1 -1
- package/lib/stripe/file.js +2 -2
- package/lib/stripe/file.js.map +1 -1
- package/lib/stripe/meter.d.ts +1 -2
- package/lib/stripe/meter.d.ts.map +1 -1
- package/lib/stripe/meter.js +1 -1
- package/lib/stripe/meter.js.map +1 -1
- package/lib/stripe/portal-configuration.d.ts +1 -2
- package/lib/stripe/portal-configuration.d.ts.map +1 -1
- package/lib/stripe/portal-configuration.js +2 -2
- package/lib/stripe/portal-configuration.js.map +1 -1
- package/lib/stripe/price.d.ts +1 -2
- package/lib/stripe/price.d.ts.map +1 -1
- package/lib/stripe/price.js +2 -2
- package/lib/stripe/price.js.map +1 -1
- package/lib/stripe/product-feature.d.ts +1 -2
- package/lib/stripe/product-feature.d.ts.map +1 -1
- package/lib/stripe/product-feature.js +2 -2
- package/lib/stripe/product-feature.js.map +1 -1
- package/lib/stripe/product.d.ts +1 -2
- package/lib/stripe/product.d.ts.map +1 -1
- package/lib/stripe/product.js +2 -2
- package/lib/stripe/product.js.map +1 -1
- package/lib/stripe/promotion-code.d.ts +1 -2
- package/lib/stripe/promotion-code.d.ts.map +1 -1
- package/lib/stripe/promotion-code.js +2 -2
- package/lib/stripe/promotion-code.js.map +1 -1
- package/lib/stripe/shipping-rate.d.ts +1 -2
- package/lib/stripe/shipping-rate.d.ts.map +1 -1
- package/lib/stripe/shipping-rate.js +2 -2
- package/lib/stripe/shipping-rate.js.map +1 -1
- package/lib/stripe/tax-rate.d.ts +1 -2
- package/lib/stripe/tax-rate.d.ts.map +1 -1
- package/lib/stripe/tax-rate.js +2 -2
- package/lib/stripe/tax-rate.js.map +1 -1
- package/lib/stripe/webhook.d.ts +16 -3
- package/lib/stripe/webhook.d.ts.map +1 -1
- package/lib/stripe/webhook.js +2 -2
- package/lib/stripe/webhook.js.map +1 -1
- package/lib/test/bun.d.ts.map +1 -1
- package/lib/test/bun.js +1 -0
- package/lib/test/bun.js.map +1 -1
- package/lib/test/options.d.ts +5 -0
- package/lib/test/options.d.ts.map +1 -1
- package/lib/test/vitest.d.ts.map +1 -1
- package/lib/test/vitest.js +1 -0
- package/lib/test/vitest.js.map +1 -1
- package/lib/upstash/redis.d.ts +1 -2
- package/lib/upstash/redis.d.ts.map +1 -1
- package/lib/upstash/redis.js.map +1 -1
- package/lib/util/api/client/client.gen.d.ts +3 -0
- package/lib/util/api/client/client.gen.d.ts.map +1 -0
- package/lib/util/api/client/client.gen.js +205 -0
- package/lib/util/api/client/client.gen.js.map +1 -0
- package/lib/util/api/client/index.d.ts +8 -0
- package/lib/util/api/client/index.d.ts.map +1 -0
- package/lib/util/api/client/index.js +6 -0
- package/lib/util/api/client/index.js.map +1 -0
- package/lib/util/api/client/types.gen.d.ts +125 -0
- package/lib/util/api/client/types.gen.d.ts.map +1 -0
- package/lib/util/api/client/types.gen.js +2 -0
- package/lib/util/api/client/types.gen.js.map +1 -0
- package/lib/util/api/client/utils.gen.d.ts +34 -0
- package/lib/util/api/client/utils.gen.d.ts.map +1 -0
- package/lib/util/api/client/utils.gen.js +231 -0
- package/lib/util/api/client/utils.gen.js.map +1 -0
- package/lib/util/api/core/auth.gen.d.ts +19 -0
- package/lib/util/api/core/auth.gen.d.ts.map +1 -0
- package/lib/util/api/core/auth.gen.js +15 -0
- package/lib/util/api/core/auth.gen.js.map +1 -0
- package/lib/util/api/core/bodySerializer.gen.d.ts +18 -0
- package/lib/util/api/core/bodySerializer.gen.d.ts.map +1 -0
- package/lib/util/api/core/bodySerializer.gen.js +58 -0
- package/lib/util/api/core/bodySerializer.gen.js.map +1 -0
- package/lib/util/api/core/params.gen.d.ts +34 -0
- package/lib/util/api/core/params.gen.d.ts.map +1 -0
- package/lib/util/api/core/params.gen.js +89 -0
- package/lib/util/api/core/params.gen.js.map +1 -0
- package/lib/util/api/core/pathSerializer.gen.d.ts +34 -0
- package/lib/util/api/core/pathSerializer.gen.d.ts.map +1 -0
- package/lib/util/api/core/pathSerializer.gen.js +115 -0
- package/lib/util/api/core/pathSerializer.gen.js.map +1 -0
- package/lib/util/api/core/serverSentEvents.gen.d.ts +72 -0
- package/lib/util/api/core/serverSentEvents.gen.d.ts.map +1 -0
- package/lib/util/api/core/serverSentEvents.gen.js +136 -0
- package/lib/util/api/core/serverSentEvents.gen.js.map +1 -0
- package/lib/util/api/core/types.gen.d.ts +79 -0
- package/lib/util/api/core/types.gen.d.ts.map +1 -0
- package/lib/util/api/core/types.gen.js +2 -0
- package/lib/util/api/core/types.gen.js.map +1 -0
- package/lib/util/api/core/utils.gen.d.ts +20 -0
- package/lib/util/api/core/utils.gen.d.ts.map +1 -0
- package/lib/util/api/core/utils.gen.js +88 -0
- package/lib/util/api/core/utils.gen.js.map +1 -0
- package/lib/util/http.d.ts +7 -2
- package/lib/util/http.d.ts.map +1 -1
- package/lib/util/http.js +29 -11
- package/lib/util/http.js.map +1 -1
- package/lib/util/lock.d.ts +20 -0
- package/lib/util/lock.d.ts.map +1 -0
- package/lib/util/lock.js +45 -0
- package/lib/util/lock.js.map +1 -0
- package/lib/util/memoize.d.ts +6 -0
- package/lib/util/memoize.d.ts.map +1 -1
- package/lib/util/memoize.js +23 -0
- package/lib/util/memoize.js.map +1 -1
- package/lib/util/oauth-client.d.ts +71 -0
- package/lib/util/oauth-client.d.ts.map +1 -0
- package/lib/util/oauth-client.js +188 -0
- package/lib/util/oauth-client.js.map +1 -0
- package/lib/util/poll.d.ts +33 -0
- package/lib/util/poll.d.ts.map +1 -0
- package/lib/util/poll.js +19 -0
- package/lib/util/poll.js.map +1 -0
- package/lib/vercel/project-domain.d.ts +1 -2
- package/lib/vercel/project-domain.d.ts.map +1 -1
- package/lib/vercel/project-domain.js.map +1 -1
- package/lib/vercel/project.d.ts +1 -2
- package/lib/vercel/project.d.ts.map +1 -1
- package/lib/vercel/project.js +2 -2
- package/lib/vercel/project.js.map +1 -1
- package/package.json +5 -1
- package/src/apply.ts +32 -29
- package/src/auth.ts +253 -0
- package/src/aws/bucket.ts +3 -3
- package/src/aws/control/resource.ts +4 -6
- package/src/aws/ec2/internet-gateway-attachment.ts +5 -6
- package/src/aws/ec2/internet-gateway.ts +3 -5
- package/src/aws/ec2/nat-gateway.ts +3 -5
- package/src/aws/ec2/route-table-association.ts +3 -5
- package/src/aws/ec2/route-table.ts +3 -5
- package/src/aws/ec2/route.ts +3 -3
- package/src/aws/ec2/security-group-rule.ts +3 -5
- package/src/aws/ec2/security-group.ts +3 -5
- package/src/aws/ec2/subnet.ts +3 -3
- package/src/aws/ec2/vpc.ts +3 -3
- package/src/aws/function.ts +3 -3
- package/src/aws/oidc/oidc-provider.ts +3 -5
- package/src/aws/policy-attachment.ts +2 -4
- package/src/aws/policy.ts +5 -5
- package/src/aws/queue.ts +5 -5
- package/src/aws/role.ts +3 -3
- package/src/aws/ses.ts +3 -3
- package/src/aws/ssm-parameter.ts +3 -3
- package/src/aws/table.ts +3 -3
- package/src/cloudflare/account-api-token.ts +3 -4
- package/src/cloudflare/ai-gateway.ts +3 -5
- package/src/cloudflare/api-gateway-operation.ts +3 -4
- package/src/cloudflare/api-schema.ts +25 -26
- package/src/cloudflare/api-shield.ts +3 -4
- package/src/cloudflare/api.ts +122 -57
- package/src/cloudflare/assets.ts +95 -136
- package/src/cloudflare/auth.ts +160 -95
- package/src/cloudflare/bound.ts +1 -1
- package/src/cloudflare/bucket.ts +321 -58
- package/src/cloudflare/bundle/plugin-wasm.ts +5 -5
- package/src/cloudflare/certificate-pack.ts +5 -6
- package/src/cloudflare/compatibility-date.gen.ts +1 -1
- package/src/cloudflare/container.ts +7 -8
- package/src/cloudflare/custom-domain.ts +3 -5
- package/src/cloudflare/d1-database.ts +33 -34
- package/src/cloudflare/dispatch-namespace.ts +5 -6
- package/src/cloudflare/dns-records.ts +5 -5
- package/src/cloudflare/email-address.ts +7 -7
- package/src/cloudflare/email-catch-all.ts +6 -6
- package/src/cloudflare/email-routing.ts +5 -5
- package/src/cloudflare/email-rule.ts +5 -5
- package/src/cloudflare/hyperdrive.ts +35 -36
- package/src/cloudflare/kv-namespace.ts +31 -32
- package/src/cloudflare/miniflare/delete.ts +1 -1
- package/src/cloudflare/miniflare/miniflare-worker-proxy.ts +2 -7
- package/src/cloudflare/miniflare/remote-binding-proxy.ts +16 -4
- package/src/cloudflare/permission-groups.ts +4 -6
- package/src/cloudflare/pipeline.ts +29 -30
- package/src/cloudflare/queue-consumer.ts +5 -7
- package/src/cloudflare/queue.ts +42 -43
- package/src/cloudflare/react-router/plugin.ts +20 -0
- package/src/cloudflare/redirect-rule.ts +5 -5
- package/src/cloudflare/route.ts +5 -5
- package/src/cloudflare/ruleset.ts +3 -4
- package/src/cloudflare/secret.ts +35 -36
- package/src/cloudflare/secrets-store.ts +5 -8
- package/src/cloudflare/tunnel.ts +5 -7
- package/src/cloudflare/user.ts +12 -9
- package/src/cloudflare/vectorize-index.ts +8 -12
- package/src/cloudflare/vectorize-metadata-index.ts +6 -8
- package/src/cloudflare/website.ts +1 -1
- package/src/cloudflare/worker-assets.ts +10 -56
- package/src/cloudflare/worker-stub.ts +5 -5
- package/src/cloudflare/worker-subdomain.ts +6 -7
- package/src/cloudflare/worker.ts +91 -91
- package/src/cloudflare/zone.ts +3 -3
- package/src/context.ts +9 -7
- package/src/destroy.ts +2 -2
- package/src/dns/import-dns.ts +3 -5
- package/src/docker/container.ts +3 -6
- package/src/docker/image.ts +13 -13
- package/src/docker/network.ts +3 -4
- package/src/docker/remote-image.ts +3 -6
- package/src/docker/volume.ts +3 -4
- package/src/esbuild/bundle.ts +10 -8
- package/src/fs/copy-file.ts +3 -3
- package/src/fs/file.ts +3 -3
- package/src/fs/folder.ts +3 -3
- package/src/github/comment.ts +5 -7
- package/src/github/repository-environment.ts +3 -5
- package/src/github/repository-webhook.ts +3 -5
- package/src/github/secret.ts +3 -5
- package/src/neon/api/client.gen.ts +28 -0
- package/src/neon/api/sdk.gen.ts +2596 -0
- package/src/neon/api/types.gen.ts +8287 -0
- package/src/neon/api.ts +51 -147
- package/src/neon/branch.ts +278 -0
- package/src/neon/index.ts +1 -1
- package/src/neon/project.ts +136 -721
- package/src/neon/utils.ts +105 -0
- package/src/os/exec.ts +3 -3
- package/src/planetscale/api/client.gen.ts +28 -2882
- package/src/planetscale/api/sdk.gen.ts +3336 -0
- package/src/planetscale/api/types.gen.ts +778 -450
- package/src/planetscale/api.ts +101 -0
- package/src/planetscale/branch.ts +20 -19
- package/src/planetscale/database.ts +69 -70
- package/src/planetscale/index.ts +1 -1
- package/src/planetscale/password.ts +18 -22
- package/src/planetscale/role.ts +21 -21
- package/src/planetscale/utils.ts +20 -74
- package/src/random/random-string.ts +4 -4
- package/src/resource.ts +6 -2
- package/src/sentry/client-key.ts +3 -5
- package/src/sentry/project.ts +3 -5
- package/src/sentry/team.ts +3 -3
- package/src/state/r2-rest-state-store.ts +15 -57
- package/src/stripe/card.ts +3 -3
- package/src/stripe/coupon.ts +3 -3
- package/src/stripe/customer.ts +3 -3
- package/src/stripe/entitlements-feature.ts +3 -5
- package/src/stripe/file.ts +3 -3
- package/src/stripe/meter.ts +3 -3
- package/src/stripe/portal-configuration.ts +3 -5
- package/src/stripe/price.ts +3 -3
- package/src/stripe/product-feature.ts +3 -5
- package/src/stripe/product.ts +3 -3
- package/src/stripe/promotion-code.ts +3 -5
- package/src/stripe/shipping-rate.ts +3 -5
- package/src/stripe/tax-rate.ts +3 -3
- package/src/stripe/webhook.ts +3 -5
- package/src/test/bun.ts +1 -0
- package/src/test/options.ts +6 -0
- package/src/test/vitest.ts +1 -0
- package/src/upstash/redis.ts +1 -3
- package/src/util/api/client/client.gen.ts +268 -0
- package/src/util/api/client/index.ts +25 -0
- package/src/util/api/client/types.gen.ts +268 -0
- package/src/util/api/client/utils.gen.ts +331 -0
- package/src/util/api/core/auth.gen.ts +42 -0
- package/src/util/api/core/bodySerializer.gen.ts +92 -0
- package/src/util/api/core/params.gen.ts +153 -0
- package/src/util/api/core/pathSerializer.gen.ts +181 -0
- package/src/util/api/core/serverSentEvents.gen.ts +264 -0
- package/src/util/api/core/types.gen.ts +118 -0
- package/src/util/api/core/utils.gen.ts +143 -0
- package/src/util/http.ts +38 -11
- package/src/util/lock.ts +48 -0
- package/src/util/memoize.ts +26 -0
- package/src/util/oauth-client.ts +238 -0
- package/src/util/poll.ts +55 -0
- package/src/vercel/project-domain.ts +1 -3
- package/src/vercel/project.ts +3 -3
- package/workers/cloudflare-state-store.js +8 -5619
- package/workers/dofs-state-store.js +2 -802
- package/workers/remote-binding-proxy.js +3 -39
- package/workers/remote-binding-proxy.ts +126 -35
- package/workers/tunnel-proxy.js +6 -73
- package/lib/cloudflare/asset-manifest.d.ts +0 -15
- package/lib/cloudflare/asset-manifest.d.ts.map +0 -1
- package/lib/cloudflare/asset-manifest.js +0 -1
- package/lib/cloudflare/asset-manifest.js.map +0 -1
- package/lib/cloudflare/oauth.d.ts +0 -22
- package/lib/cloudflare/oauth.d.ts.map +0 -1
- package/lib/cloudflare/oauth.js +0 -214
- package/lib/cloudflare/oauth.js.map +0 -1
- package/lib/neon/api-error.d.ts +0 -31
- package/lib/neon/api-error.d.ts.map +0 -1
- package/lib/neon/api-error.js +0 -73
- package/lib/neon/api-error.js.map +0 -1
- package/lib/planetscale/api/index.d.ts +0 -3
- package/lib/planetscale/api/index.d.ts.map +0 -1
- package/lib/planetscale/api/index.js +0 -4
- package/lib/planetscale/api/index.js.map +0 -1
- package/lib/util/neverthrow.d.ts +0 -16
- package/lib/util/neverthrow.d.ts.map +0 -1
- package/lib/util/neverthrow.js +0 -46
- package/lib/util/neverthrow.js.map +0 -1
- package/src/cloudflare/asset-manifest.ts +0 -16
- package/src/cloudflare/oauth.ts +0 -301
- package/src/neon/api-error.ts +0 -81
- package/src/planetscale/api/index.ts +0 -4
- package/src/util/neverthrow.ts +0 -64
package/src/apply.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
type PendingResource,
|
|
12
12
|
type Provider,
|
|
13
13
|
type Resource,
|
|
14
|
+
type ResourceAttributes,
|
|
14
15
|
type ResourceProps,
|
|
15
16
|
} from "./resource.ts";
|
|
16
17
|
import type { PendingDeletions } from "./scope.ts";
|
|
@@ -26,11 +27,11 @@ export interface ApplyOptions {
|
|
|
26
27
|
noop?: boolean;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
export function apply<Out extends
|
|
30
|
+
export function apply<Out extends ResourceAttributes>(
|
|
30
31
|
resource: PendingResource<Out>,
|
|
31
32
|
props: ResourceProps | undefined,
|
|
32
33
|
options?: ApplyOptions,
|
|
33
|
-
): Promise<Awaited<Out
|
|
34
|
+
): Promise<Awaited<Out> & Resource> {
|
|
34
35
|
return _apply(resource, props, options);
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -48,11 +49,11 @@ export class ReplacedSignal extends Error {
|
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
async function _apply<Out extends
|
|
52
|
+
async function _apply<Out extends ResourceAttributes>(
|
|
52
53
|
resource: PendingResource<Out>,
|
|
53
54
|
props: ResourceProps | undefined,
|
|
54
55
|
options?: ApplyOptions,
|
|
55
|
-
): Promise<Awaited<Out
|
|
56
|
+
): Promise<Awaited<Out> & Resource> {
|
|
56
57
|
const scope = resource[ResourceScope];
|
|
57
58
|
const start = performance.now();
|
|
58
59
|
try {
|
|
@@ -86,7 +87,7 @@ async function _apply<Out extends Resource>(
|
|
|
86
87
|
event: "resource.read",
|
|
87
88
|
resource: resource[ResourceKind],
|
|
88
89
|
});
|
|
89
|
-
return state.output as Awaited<Out
|
|
90
|
+
return state.output as Awaited<Out> & Resource;
|
|
90
91
|
|
|
91
92
|
// -> poll until it does not (i.e. when the owner process applies the change and updates the state store)
|
|
92
93
|
async function waitForConsistentState() {
|
|
@@ -116,7 +117,7 @@ async function _apply<Out extends Resource>(
|
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
async function inputsAreEqual(
|
|
119
|
-
state: State<string, ResourceProps | undefined, Resource
|
|
120
|
+
state: State<string, ResourceProps | undefined, Resource>,
|
|
120
121
|
) {
|
|
121
122
|
const oldProps = await serialize(scope, state.props, {
|
|
122
123
|
encrypt: false,
|
|
@@ -183,7 +184,7 @@ async function _apply<Out extends Resource>(
|
|
|
183
184
|
resource: resource[ResourceKind],
|
|
184
185
|
status: state.status,
|
|
185
186
|
});
|
|
186
|
-
return state.output as Awaited<Out
|
|
187
|
+
return state.output as Awaited<Out> & Resource;
|
|
187
188
|
}
|
|
188
189
|
}
|
|
189
190
|
|
|
@@ -238,7 +239,7 @@ async function _apply<Out extends Resource>(
|
|
|
238
239
|
},
|
|
239
240
|
});
|
|
240
241
|
|
|
241
|
-
let output:
|
|
242
|
+
let output: any;
|
|
242
243
|
try {
|
|
243
244
|
output = await alchemy.run(
|
|
244
245
|
resource[ResourceID],
|
|
@@ -249,7 +250,7 @@ async function _apply<Out extends Resource>(
|
|
|
249
250
|
noop: options?.noop,
|
|
250
251
|
},
|
|
251
252
|
async () =>
|
|
252
|
-
await provider.handler.bind(ctx)(resource[ResourceID], props),
|
|
253
|
+
ctx(await provider.handler.bind(ctx)(resource[ResourceID], props)),
|
|
253
254
|
);
|
|
254
255
|
} catch (error) {
|
|
255
256
|
if (error instanceof ReplacedSignal) {
|
|
@@ -287,25 +288,27 @@ async function _apply<Out extends Resource>(
|
|
|
287
288
|
parent: scope,
|
|
288
289
|
noop: options?.noop,
|
|
289
290
|
},
|
|
290
|
-
async () =>
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
291
|
+
async () => {
|
|
292
|
+
const ctx = context({
|
|
293
|
+
scope,
|
|
294
|
+
phase: "create",
|
|
295
|
+
kind: resource[ResourceKind],
|
|
296
|
+
id: resource[ResourceID],
|
|
297
|
+
fqn: resource[ResourceFQN],
|
|
298
|
+
seq: resource[ResourceSeq],
|
|
299
|
+
props: state!.props,
|
|
300
|
+
state: state!,
|
|
301
|
+
isReplacement: true,
|
|
302
|
+
replace: () => {
|
|
303
|
+
throw new Error(
|
|
304
|
+
`Resource ${resource[ResourceKind]} ${resource[ResourceFQN]} cannot be replaced in create phase.`,
|
|
305
|
+
);
|
|
306
|
+
},
|
|
307
|
+
});
|
|
308
|
+
return ctx(
|
|
309
|
+
await provider.handler.bind(ctx)(resource[ResourceID], props),
|
|
310
|
+
);
|
|
311
|
+
},
|
|
309
312
|
);
|
|
310
313
|
} else {
|
|
311
314
|
throw error;
|
|
@@ -342,7 +345,7 @@ async function _apply<Out extends Resource>(
|
|
|
342
345
|
output,
|
|
343
346
|
props,
|
|
344
347
|
});
|
|
345
|
-
return output as
|
|
348
|
+
return output as Awaited<Out> & Resource;
|
|
346
349
|
} catch (error) {
|
|
347
350
|
scope.telemetryClient.record({
|
|
348
351
|
event: "resource.error",
|
package/src/auth.ts
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { Lock } from "./util/lock.ts";
|
|
5
|
+
import { singleFlight } from "./util/memoize.ts";
|
|
6
|
+
|
|
7
|
+
namespace Path {
|
|
8
|
+
export const rootDir = path.join(os.homedir(), ".alchemy");
|
|
9
|
+
export const configFile = path.join(rootDir, "config.json");
|
|
10
|
+
export const credentialsDir = path.join(rootDir, "credentials");
|
|
11
|
+
export const credentialsFile = (provider: string, profile: string) =>
|
|
12
|
+
path.join(credentialsDir, profile, `${provider}.json`);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface Props {
|
|
16
|
+
profile: string;
|
|
17
|
+
provider: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface Config {
|
|
21
|
+
version: 1;
|
|
22
|
+
profiles: {
|
|
23
|
+
[profile: string]: Profile;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
namespace Config {
|
|
28
|
+
export const read = async () => {
|
|
29
|
+
const config = await FS.readJSON<Config>(Path.configFile);
|
|
30
|
+
return config ?? { version: 1, profiles: {} };
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const patch = async (updater: (config: Config) => Config) => {
|
|
34
|
+
const config = await read();
|
|
35
|
+
const updated = updater(config);
|
|
36
|
+
await FS.writeJSON<Config>(Path.configFile, updated);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface Profile {
|
|
41
|
+
[provider: string]: Provider;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export namespace Profile {
|
|
45
|
+
export const get = async (name: string): Promise<Profile | undefined> => {
|
|
46
|
+
const config = await Config.read();
|
|
47
|
+
return config.profiles[name];
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface Provider<
|
|
52
|
+
Metadata extends Record<string, string> = Record<string, string>,
|
|
53
|
+
> {
|
|
54
|
+
metadata: Metadata;
|
|
55
|
+
method: "api-key" | "api-token" | "oauth";
|
|
56
|
+
scopes?: string[];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export namespace Provider {
|
|
60
|
+
export const get = async <
|
|
61
|
+
Metadata extends Record<string, string> = Record<string, string>,
|
|
62
|
+
>(
|
|
63
|
+
props: Props,
|
|
64
|
+
) => {
|
|
65
|
+
const profile = await Profile.get(props.profile);
|
|
66
|
+
return profile?.[props.provider] as Provider<Metadata> | undefined;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const getWithCredentials = async <
|
|
70
|
+
Metadata extends Record<string, string> = Record<string, string>,
|
|
71
|
+
>(
|
|
72
|
+
props: Props,
|
|
73
|
+
) => {
|
|
74
|
+
const [provider, credentials] = await Promise.all([
|
|
75
|
+
Provider.get<Metadata>(props),
|
|
76
|
+
Credentials.get(props),
|
|
77
|
+
]);
|
|
78
|
+
const suffix = props.profile !== "default" ? ` -p ${props.profile}` : "";
|
|
79
|
+
if (!provider) {
|
|
80
|
+
throw new Error(
|
|
81
|
+
`Provider "${props.provider}" not found in profile "${props.profile}". Please run \`alchemy configure${suffix}\` to configure this provider.`,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
if (!credentials) {
|
|
85
|
+
throw new Error(
|
|
86
|
+
`Credentials not found for provider "${props.provider}" and profile "${props.profile}". Please run \`alchemy login ${props.provider}${suffix}\` to login to this provider.`,
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
return { provider, credentials };
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const set = async <
|
|
93
|
+
Metadata extends Record<string, string> = Record<string, string>,
|
|
94
|
+
>(
|
|
95
|
+
props: Props,
|
|
96
|
+
provider: Provider<Metadata>,
|
|
97
|
+
) => {
|
|
98
|
+
await Config.patch((config) => {
|
|
99
|
+
config.profiles[props.profile] ??= {};
|
|
100
|
+
config.profiles[props.profile][props.provider] = provider;
|
|
101
|
+
return config;
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export const del = async (props: Props) => {
|
|
106
|
+
await Config.patch((config) => {
|
|
107
|
+
if (config.profiles[props.profile]) {
|
|
108
|
+
delete config.profiles[props.profile][props.provider];
|
|
109
|
+
}
|
|
110
|
+
if (Object.keys(config.profiles[props.profile]).length === 0) {
|
|
111
|
+
delete config.profiles[props.profile];
|
|
112
|
+
}
|
|
113
|
+
return config;
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export type Credentials =
|
|
119
|
+
| Credentials.ApiKey
|
|
120
|
+
| Credentials.ApiToken
|
|
121
|
+
| Credentials.OAuth;
|
|
122
|
+
|
|
123
|
+
export namespace Credentials {
|
|
124
|
+
export interface ApiKey {
|
|
125
|
+
type: "api-key";
|
|
126
|
+
apiKey: string;
|
|
127
|
+
email: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface ApiToken {
|
|
131
|
+
type: "api-token";
|
|
132
|
+
apiToken: string;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface OAuth {
|
|
136
|
+
type: "oauth";
|
|
137
|
+
access: string;
|
|
138
|
+
refresh: string;
|
|
139
|
+
expires: number;
|
|
140
|
+
scopes: string[];
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Gets the credentials file.
|
|
145
|
+
* @param props The profile and provider of the credentials.
|
|
146
|
+
*/
|
|
147
|
+
export const get = async (props: Props) => {
|
|
148
|
+
return await FS.readJSON<Credentials>(
|
|
149
|
+
Path.credentialsFile(props.provider, props.profile),
|
|
150
|
+
);
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Sets the credentials file.
|
|
155
|
+
* @param props The profile and provider of the credentials.
|
|
156
|
+
* @param credentials The credentials to set.
|
|
157
|
+
*/
|
|
158
|
+
export const set = async (props: Props, credentials: Credentials) => {
|
|
159
|
+
await FS.writeJSON<Credentials>(
|
|
160
|
+
Path.credentialsFile(props.provider, props.profile),
|
|
161
|
+
credentials,
|
|
162
|
+
);
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Deletes the credentials file.
|
|
167
|
+
* @param props The profile and provider of the credentials.
|
|
168
|
+
*/
|
|
169
|
+
export const del = async (props: Props) => {
|
|
170
|
+
await fs.unlink(Path.credentialsFile(props.provider, props.profile));
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Internal function to fetch and refresh credentials.
|
|
175
|
+
* Uses a lock so the `refresh` function is called by only one process at a time.
|
|
176
|
+
* If another process is refreshing the credentials, this function will wait for the
|
|
177
|
+
* other process to release the lock before calling itself recursively to retrieve the updated credentials.
|
|
178
|
+
*/
|
|
179
|
+
const getRefreshedInternal = async (
|
|
180
|
+
props: Props,
|
|
181
|
+
refresh: (credentials: Credentials.OAuth) => Promise<Credentials.OAuth>,
|
|
182
|
+
): Promise<Credentials> => {
|
|
183
|
+
// 1. Get credentials
|
|
184
|
+
const credentials = await Credentials.get(props);
|
|
185
|
+
if (!credentials) {
|
|
186
|
+
throw new Error(
|
|
187
|
+
`Credentials for provider "${props.provider}" not found in profile "${props.profile}"`,
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
// 2. Return credentials if they are not expired
|
|
191
|
+
if (!Credentials.isOAuthExpired(credentials)) {
|
|
192
|
+
return credentials;
|
|
193
|
+
}
|
|
194
|
+
// 3. Refresh credentials with lock for thread safety
|
|
195
|
+
const lock = new Lock(`${props.provider}-${props.profile}`);
|
|
196
|
+
const release = await lock.acquire();
|
|
197
|
+
if (release) {
|
|
198
|
+
try {
|
|
199
|
+
const refreshed = await refresh(credentials);
|
|
200
|
+
await Credentials.set(props, refreshed);
|
|
201
|
+
return refreshed;
|
|
202
|
+
} finally {
|
|
203
|
+
await release();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
// 4. Another process has the lock, so wait for it to be released
|
|
207
|
+
await lock.wait();
|
|
208
|
+
// 5. Call this function again, bypassing the single flight mechanism to avoid a deadlock
|
|
209
|
+
return await getRefreshedInternal(props, refresh);
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Fetches OAuth credentials for the given provider and profile, refreshing them if they are expired.
|
|
214
|
+
* @param props The properties of the credentials.
|
|
215
|
+
* @param refresh The function to refresh the credentials.
|
|
216
|
+
* @returns The refreshed credentials.
|
|
217
|
+
*/
|
|
218
|
+
export const getRefreshed = singleFlight(
|
|
219
|
+
// The locking mechanism works within the same process, but since the lock uses IO and polling,
|
|
220
|
+
// wrapping it with `singleFlight` makes it more efficient.
|
|
221
|
+
getRefreshedInternal,
|
|
222
|
+
(props) => `${props.provider}-${props.profile}`,
|
|
223
|
+
);
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Returns true if the given credentials are OAuth and expired.
|
|
227
|
+
*/
|
|
228
|
+
export const isOAuthExpired = (
|
|
229
|
+
credentials: Credentials,
|
|
230
|
+
tolerance = 1000 * 10,
|
|
231
|
+
): credentials is Credentials.OAuth => {
|
|
232
|
+
return (
|
|
233
|
+
credentials.type === "oauth" &&
|
|
234
|
+
credentials.expires < Date.now() + tolerance
|
|
235
|
+
);
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
namespace FS {
|
|
240
|
+
export const readJSON = async <T>(path: string): Promise<T | undefined> => {
|
|
241
|
+
try {
|
|
242
|
+
const data = await fs.readFile(path, "utf-8");
|
|
243
|
+
return JSON.parse(data) as T;
|
|
244
|
+
} catch {
|
|
245
|
+
return undefined;
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
export const writeJSON = async <T>(name: string, data: T) => {
|
|
250
|
+
await fs.mkdir(path.dirname(name), { recursive: true });
|
|
251
|
+
await fs.writeFile(name, JSON.stringify(data, null, 2), { mode: 0o600 });
|
|
252
|
+
};
|
|
253
|
+
}
|
package/src/aws/bucket.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface BucketProps {
|
|
|
26
26
|
/**
|
|
27
27
|
* Output returned after S3 bucket creation/update
|
|
28
28
|
*/
|
|
29
|
-
export interface Bucket extends
|
|
29
|
+
export interface Bucket extends BucketProps {
|
|
30
30
|
/**
|
|
31
31
|
* The ARN (Amazon Resource Name) of the bucket
|
|
32
32
|
* Format: arn:aws:s3:::bucket-name
|
|
@@ -244,7 +244,7 @@ export const Bucket = Resource(
|
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
return
|
|
247
|
+
return {
|
|
248
248
|
bucketName: bucketName,
|
|
249
249
|
arn: `arn:aws:s3:::${bucketName}`,
|
|
250
250
|
bucketDomainName: `${bucketName}.s3.amazonaws.com`,
|
|
@@ -254,7 +254,7 @@ export const Bucket = Resource(
|
|
|
254
254
|
versioningEnabled: versioningResponse.Status === "Enabled",
|
|
255
255
|
acl: aclResponse.Grants?.[0]?.Permission?.toLowerCase(),
|
|
256
256
|
...(tags && { tags }),
|
|
257
|
-
}
|
|
257
|
+
};
|
|
258
258
|
},
|
|
259
259
|
);
|
|
260
260
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import jsonpatch from "fast-json-patch";
|
|
2
|
-
const compare = jsonpatch.compare;
|
|
3
2
|
import type { Context } from "../../context.ts";
|
|
4
3
|
import {
|
|
5
4
|
registerDynamicResource,
|
|
@@ -15,6 +14,7 @@ import {
|
|
|
15
14
|
UpdateFailedError,
|
|
16
15
|
} from "./error.ts";
|
|
17
16
|
import readOnlyPropertiesMap from "./properties.ts";
|
|
17
|
+
const compare = jsonpatch.compare;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Properties for creating or updating a Cloud Control resource
|
|
@@ -60,9 +60,7 @@ export interface CloudControlResourceProps {
|
|
|
60
60
|
/**
|
|
61
61
|
* Output returned after Cloud Control resource creation/update
|
|
62
62
|
*/
|
|
63
|
-
export interface CloudControlResource
|
|
64
|
-
extends Resource<"aws::CloudControlResource">,
|
|
65
|
-
CloudControlResourceProps {
|
|
63
|
+
export interface CloudControlResource extends CloudControlResourceProps {
|
|
66
64
|
/**
|
|
67
65
|
* The identifier of the resource
|
|
68
66
|
*/
|
|
@@ -337,12 +335,12 @@ async function CloudControlLifecycle(
|
|
|
337
335
|
);
|
|
338
336
|
}
|
|
339
337
|
|
|
340
|
-
return
|
|
338
|
+
return {
|
|
341
339
|
...props,
|
|
342
340
|
id: response.Identifier!,
|
|
343
341
|
createdAt: Date.now(),
|
|
344
342
|
...(await client.getResource(props.typeName, response.Identifier!)),
|
|
345
|
-
}
|
|
343
|
+
};
|
|
346
344
|
}
|
|
347
345
|
|
|
348
346
|
async function updateResourceWithPatch(
|
|
@@ -38,8 +38,7 @@ export interface InternetGatewayAttachmentProps extends AwsClientProps {
|
|
|
38
38
|
* Output returned after Internet Gateway Attachment creation/update
|
|
39
39
|
*/
|
|
40
40
|
export interface InternetGatewayAttachment
|
|
41
|
-
extends
|
|
42
|
-
InternetGatewayAttachmentProps {
|
|
41
|
+
extends InternetGatewayAttachmentProps {
|
|
43
42
|
/**
|
|
44
43
|
* The ID of the Internet Gateway
|
|
45
44
|
*/
|
|
@@ -277,12 +276,12 @@ export const InternetGatewayAttachment = Resource(
|
|
|
277
276
|
const attachment = igw?.Attachments?.find((att) => att.VpcId === vpcId);
|
|
278
277
|
|
|
279
278
|
if (attachment) {
|
|
280
|
-
return
|
|
279
|
+
return {
|
|
281
280
|
internetGatewayId,
|
|
282
281
|
vpcId,
|
|
283
282
|
state: "attached",
|
|
284
283
|
...props,
|
|
285
|
-
}
|
|
284
|
+
};
|
|
286
285
|
}
|
|
287
286
|
}
|
|
288
287
|
|
|
@@ -353,12 +352,12 @@ export const InternetGatewayAttachment = Resource(
|
|
|
353
352
|
"to be attached",
|
|
354
353
|
);
|
|
355
354
|
|
|
356
|
-
return
|
|
355
|
+
return {
|
|
357
356
|
internetGatewayId,
|
|
358
357
|
vpcId,
|
|
359
358
|
state: "attached",
|
|
360
359
|
...props,
|
|
361
|
-
}
|
|
360
|
+
};
|
|
362
361
|
},
|
|
363
362
|
);
|
|
364
363
|
|
|
@@ -31,9 +31,7 @@ export interface InternetGatewayProps extends AwsClientProps {
|
|
|
31
31
|
/**
|
|
32
32
|
* Output returned after Internet Gateway creation/update
|
|
33
33
|
*/
|
|
34
|
-
export interface InternetGateway
|
|
35
|
-
extends Resource<"aws::InternetGateway">,
|
|
36
|
-
InternetGatewayProps {
|
|
34
|
+
export interface InternetGateway extends InternetGatewayProps {
|
|
37
35
|
/**
|
|
38
36
|
* The ID of the Internet Gateway
|
|
39
37
|
*/
|
|
@@ -358,7 +356,7 @@ export const InternetGateway = Resource(
|
|
|
358
356
|
);
|
|
359
357
|
}
|
|
360
358
|
|
|
361
|
-
return
|
|
359
|
+
return {
|
|
362
360
|
internetGatewayId: internetGateway.InternetGatewayId!,
|
|
363
361
|
state: "available",
|
|
364
362
|
attachments: internetGateway.Attachments?.map((att) => ({
|
|
@@ -367,7 +365,7 @@ export const InternetGateway = Resource(
|
|
|
367
365
|
})),
|
|
368
366
|
ownerId: internetGateway.OwnerId,
|
|
369
367
|
...props,
|
|
370
|
-
}
|
|
368
|
+
};
|
|
371
369
|
},
|
|
372
370
|
);
|
|
373
371
|
|
|
@@ -48,9 +48,7 @@ export interface NatGatewayProps extends AwsClientProps {
|
|
|
48
48
|
/**
|
|
49
49
|
* Output returned after NAT Gateway creation/update
|
|
50
50
|
*/
|
|
51
|
-
export interface NatGateway
|
|
52
|
-
extends Resource<"aws::NatGateway">,
|
|
53
|
-
NatGatewayProps {
|
|
51
|
+
export interface NatGateway extends NatGatewayProps {
|
|
54
52
|
/**
|
|
55
53
|
* The ID of the NAT Gateway
|
|
56
54
|
*/
|
|
@@ -423,7 +421,7 @@ export const NatGateway = Resource(
|
|
|
423
421
|
);
|
|
424
422
|
}
|
|
425
423
|
|
|
426
|
-
const result =
|
|
424
|
+
const result = {
|
|
427
425
|
natGatewayId: natGateway.NatGatewayId!,
|
|
428
426
|
subnetId: natGateway.SubnetId!,
|
|
429
427
|
vpcId: natGateway.VpcId!,
|
|
@@ -434,7 +432,7 @@ export const NatGateway = Resource(
|
|
|
434
432
|
createdElasticIp,
|
|
435
433
|
...props,
|
|
436
434
|
subnet: subnetId,
|
|
437
|
-
}
|
|
435
|
+
};
|
|
438
436
|
return result;
|
|
439
437
|
},
|
|
440
438
|
);
|
|
@@ -44,9 +44,7 @@ export interface RouteTableAssociationProps {
|
|
|
44
44
|
/**
|
|
45
45
|
* Output returned after Route Table Association creation/update
|
|
46
46
|
*/
|
|
47
|
-
export interface RouteTableAssociation
|
|
48
|
-
extends Resource<"aws::RouteTableAssociation">,
|
|
49
|
-
RouteTableAssociationProps {
|
|
47
|
+
export interface RouteTableAssociation extends RouteTableAssociationProps {
|
|
50
48
|
/**
|
|
51
49
|
* The ID of the route table association
|
|
52
50
|
*/
|
|
@@ -418,7 +416,7 @@ export const RouteTableAssociation = Resource(
|
|
|
418
416
|
}
|
|
419
417
|
}
|
|
420
418
|
|
|
421
|
-
return
|
|
419
|
+
return {
|
|
422
420
|
associationId,
|
|
423
421
|
routeTableId,
|
|
424
422
|
subnetId,
|
|
@@ -429,7 +427,7 @@ export const RouteTableAssociation = Resource(
|
|
|
429
427
|
routeTable: routeTableId,
|
|
430
428
|
subnet: subnetId,
|
|
431
429
|
gateway: gatewayId,
|
|
432
|
-
}
|
|
430
|
+
};
|
|
433
431
|
},
|
|
434
432
|
);
|
|
435
433
|
|
|
@@ -37,9 +37,7 @@ export interface RouteTableProps extends AwsClientProps {
|
|
|
37
37
|
/**
|
|
38
38
|
* Output returned after Route Table creation/update
|
|
39
39
|
*/
|
|
40
|
-
export interface RouteTable
|
|
41
|
-
extends Resource<"aws::RouteTable">,
|
|
42
|
-
RouteTableProps {
|
|
40
|
+
export interface RouteTable extends RouteTableProps {
|
|
43
41
|
/**
|
|
44
42
|
* The ID of the route table
|
|
45
43
|
*/
|
|
@@ -272,12 +270,12 @@ export const RouteTable = Resource(
|
|
|
272
270
|
logger.log(` ✅ Route Table ${routeTable.RouteTableId} created`);
|
|
273
271
|
}
|
|
274
272
|
|
|
275
|
-
return
|
|
273
|
+
return {
|
|
276
274
|
routeTableId: routeTable.RouteTableId!,
|
|
277
275
|
vpcId: routeTable.VpcId!,
|
|
278
276
|
...props,
|
|
279
277
|
vpc: vpcId,
|
|
280
|
-
}
|
|
278
|
+
};
|
|
281
279
|
},
|
|
282
280
|
);
|
|
283
281
|
|
package/src/aws/ec2/route.ts
CHANGED
|
@@ -52,7 +52,7 @@ export interface RouteProps extends AwsClientProps {
|
|
|
52
52
|
/**
|
|
53
53
|
* Output returned after Route creation/update
|
|
54
54
|
*/
|
|
55
|
-
export interface Route extends
|
|
55
|
+
export interface Route extends RouteProps {
|
|
56
56
|
/**
|
|
57
57
|
* The ID of the route table
|
|
58
58
|
*/
|
|
@@ -333,7 +333,7 @@ export const Route = Resource(
|
|
|
333
333
|
throw new Error("Failed to find created route");
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
return
|
|
336
|
+
return {
|
|
337
337
|
routeTableId,
|
|
338
338
|
state: route.State as "active" | "blackhole",
|
|
339
339
|
origin: route.Origin as
|
|
@@ -342,7 +342,7 @@ export const Route = Resource(
|
|
|
342
342
|
| "EnableVgwRoutePropagation",
|
|
343
343
|
...props,
|
|
344
344
|
routeTable: routeTableId,
|
|
345
|
-
}
|
|
345
|
+
};
|
|
346
346
|
},
|
|
347
347
|
);
|
|
348
348
|
|
|
@@ -56,9 +56,7 @@ export interface SecurityGroupRuleProps {
|
|
|
56
56
|
/**
|
|
57
57
|
* Output returned after Security Group Rule creation/update
|
|
58
58
|
*/
|
|
59
|
-
export interface SecurityGroupRule
|
|
60
|
-
extends Resource<"aws::SecurityGroupRule">,
|
|
61
|
-
SecurityGroupRuleProps {
|
|
59
|
+
export interface SecurityGroupRule extends SecurityGroupRuleProps {
|
|
62
60
|
/**
|
|
63
61
|
* A unique identifier for the rule resource.
|
|
64
62
|
*/
|
|
@@ -156,10 +154,10 @@ export const SecurityGroupRule = Resource(
|
|
|
156
154
|
authorizeParams,
|
|
157
155
|
);
|
|
158
156
|
|
|
159
|
-
return
|
|
157
|
+
return {
|
|
160
158
|
ruleId,
|
|
161
159
|
...props,
|
|
162
|
-
}
|
|
160
|
+
};
|
|
163
161
|
},
|
|
164
162
|
);
|
|
165
163
|
|
|
@@ -56,9 +56,7 @@ export interface SecurityGroupProps extends AwsClientProps {
|
|
|
56
56
|
/**
|
|
57
57
|
* Output returned after Security Group creation/update
|
|
58
58
|
*/
|
|
59
|
-
export interface SecurityGroup
|
|
60
|
-
extends Resource<"aws::SecurityGroup">,
|
|
61
|
-
SecurityGroupProps {
|
|
59
|
+
export interface SecurityGroup extends SecurityGroupProps {
|
|
62
60
|
/**
|
|
63
61
|
* The ID of the security group.
|
|
64
62
|
*/
|
|
@@ -322,14 +320,14 @@ export const SecurityGroup = Resource(
|
|
|
322
320
|
securityGroup = sgResponse.SecurityGroups[0];
|
|
323
321
|
}
|
|
324
322
|
|
|
325
|
-
return
|
|
323
|
+
return {
|
|
326
324
|
groupId: securityGroup.GroupId,
|
|
327
325
|
groupName,
|
|
328
326
|
vpcId: securityGroup.VpcId,
|
|
329
327
|
ownerId: securityGroup.OwnerId,
|
|
330
328
|
...props,
|
|
331
329
|
vpc: vpcId,
|
|
332
|
-
}
|
|
330
|
+
};
|
|
333
331
|
},
|
|
334
332
|
);
|
|
335
333
|
|