@sst-community/sst 4.21.1 → 5.0.0-alpha.2
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/README.md +86 -52
- package/package.json +35 -11
- package/platform/js/chunks/chunk-HIZZCEDS.js +328 -0
- package/platform/js/chunks/chunk-HIZZCEDS.js.map +6 -0
- package/platform/js/chunks/chunk-KOKHGKJ2.js +639 -0
- package/platform/js/chunks/chunk-KOKHGKJ2.js.map +6 -0
- package/platform/js/chunks/chunk-MR4XM5XA.js +473 -0
- package/platform/js/chunks/chunk-MR4XM5XA.js.map +6 -0
- package/platform/js/chunks/chunk-ONNI4XNK.js +367 -0
- package/platform/js/chunks/chunk-ONNI4XNK.js.map +6 -0
- package/platform/js/chunks/chunk-VIFHC73J.js +108 -0
- package/platform/js/chunks/chunk-VIFHC73J.js.map +6 -0
- package/platform/js/chunks/chunk-WJ6BVA46.js +10 -0
- package/platform/js/chunks/chunk-WJ6BVA46.js.map +6 -0
- package/platform/js/chunks/component-32FCLIRK.js +26 -0
- package/platform/js/chunks/component-32FCLIRK.js.map +6 -0
- package/platform/js/chunks/config-CRGKEDQW.js +10 -0
- package/platform/js/chunks/config-CRGKEDQW.js.map +6 -0
- package/platform/js/chunks/link-OJ3RNGQ3.js +9 -0
- package/platform/js/chunks/link-OJ3RNGQ3.js.map +6 -0
- package/platform/js/components/aws/index.js +35399 -0
- package/platform/js/components/aws/index.js.map +6 -0
- package/platform/js/components/cloudflare/index.js +3246 -0
- package/platform/js/components/cloudflare/index.js.map +6 -0
- package/platform/js/components/core.js +114 -0
- package/platform/js/components/core.js.map +6 -0
- package/platform/js/components/vercel/index.js +120 -0
- package/platform/js/components/vercel/index.js.map +6 -0
- package/platform/js/testing/index.js +569 -0
- package/platform/js/testing/index.js.map +6 -0
- package/platform/package.json +25 -0
- package/platform/src/ast/add.mjs +190 -0
- package/platform/src/auto/run.ts +109 -0
- package/platform/src/components/README.md +652 -0
- package/platform/src/components/args.ts +133 -0
- package/platform/src/components/aws/alb.ts +577 -0
- package/platform/src/components/aws/analog.ts +462 -0
- package/platform/src/components/aws/apigateway-websocket-route.ts +206 -0
- package/platform/src/components/aws/apigateway-websocket.ts +894 -0
- package/platform/src/components/aws/apigatewayv1-api-key.ts +90 -0
- package/platform/src/components/aws/apigatewayv1-authorizer.ts +178 -0
- package/platform/src/components/aws/apigatewayv1-base-route.ts +78 -0
- package/platform/src/components/aws/apigatewayv1-integration-route.ts +92 -0
- package/platform/src/components/aws/apigatewayv1-lambda-route.ts +152 -0
- package/platform/src/components/aws/apigatewayv1-usage-plan.ts +109 -0
- package/platform/src/components/aws/apigatewayv1.ts +1691 -0
- package/platform/src/components/aws/apigatewayv2-authorizer.ts +199 -0
- package/platform/src/components/aws/apigatewayv2-base-route.ts +69 -0
- package/platform/src/components/aws/apigatewayv2-lambda-route.ts +141 -0
- package/platform/src/components/aws/apigatewayv2-private-route.ts +101 -0
- package/platform/src/components/aws/apigatewayv2-url-route.ts +90 -0
- package/platform/src/components/aws/apigatewayv2.ts +1439 -0
- package/platform/src/components/aws/app-sync-data-source.ts +264 -0
- package/platform/src/components/aws/app-sync-function.ts +79 -0
- package/platform/src/components/aws/app-sync-resolver.ts +110 -0
- package/platform/src/components/aws/app-sync.ts +849 -0
- package/platform/src/components/aws/astro.ts +580 -0
- package/platform/src/components/aws/aurora.ts +1356 -0
- package/platform/src/components/aws/auth-v1.ts +69 -0
- package/platform/src/components/aws/auth.ts +417 -0
- package/platform/src/components/aws/bucket-lambda-subscriber.ts +162 -0
- package/platform/src/components/aws/bucket-notification.ts +254 -0
- package/platform/src/components/aws/bucket-queue-subscriber.ts +122 -0
- package/platform/src/components/aws/bucket-topic-subscriber.ts +144 -0
- package/platform/src/components/aws/bucket.ts +2046 -0
- package/platform/src/components/aws/bus-base-subscriber.ts +52 -0
- package/platform/src/components/aws/bus-lambda-subscriber.ts +125 -0
- package/platform/src/components/aws/bus-queue-subscriber.ts +88 -0
- package/platform/src/components/aws/bus.ts +630 -0
- package/platform/src/components/aws/cdn.ts +561 -0
- package/platform/src/components/aws/cluster-v1.ts +932 -0
- package/platform/src/components/aws/cluster.ts +584 -0
- package/platform/src/components/aws/cognito-identity-pool.ts +433 -0
- package/platform/src/components/aws/cognito-identity-provider.ts +96 -0
- package/platform/src/components/aws/cognito-user-pool-client.ts +114 -0
- package/platform/src/components/aws/cognito-user-pool.ts +1089 -0
- package/platform/src/components/aws/cron-v2.ts +555 -0
- package/platform/src/components/aws/cron.ts +435 -0
- package/platform/src/components/aws/dns-validated-certificate.ts +108 -0
- package/platform/src/components/aws/dns.ts +221 -0
- package/platform/src/components/aws/dsql.ts +741 -0
- package/platform/src/components/aws/dynamo-lambda-subscriber.ts +124 -0
- package/platform/src/components/aws/dynamo.ts +929 -0
- package/platform/src/components/aws/efs.ts +410 -0
- package/platform/src/components/aws/email.ts +673 -0
- package/platform/src/components/aws/fargate.ts +1279 -0
- package/platform/src/components/aws/function.ts +3280 -0
- package/platform/src/components/aws/helpers/apigateway-account.ts +78 -0
- package/platform/src/components/aws/helpers/apigatewayv2-domain.ts +144 -0
- package/platform/src/components/aws/helpers/arn.ts +182 -0
- package/platform/src/components/aws/helpers/bootstrap.ts +16 -0
- package/platform/src/components/aws/helpers/client.ts +76 -0
- package/platform/src/components/aws/helpers/container-builder.ts +33 -0
- package/platform/src/components/aws/helpers/custom-domain.ts +128 -0
- package/platform/src/components/aws/helpers/event-source.ts +41 -0
- package/platform/src/components/aws/helpers/fargate.ts +727 -0
- package/platform/src/components/aws/helpers/function-builder.ts +133 -0
- package/platform/src/components/aws/helpers/function-code.ts +224 -0
- package/platform/src/components/aws/helpers/function-part.ts +212 -0
- package/platform/src/components/aws/helpers/function-permission.ts +29 -0
- package/platform/src/components/aws/helpers/load-balancer-args.ts +88 -0
- package/platform/src/components/aws/helpers/load-balancer.ts +17 -0
- package/platform/src/components/aws/helpers/provider.ts +36 -0
- package/platform/src/components/aws/helpers/queue-policy.ts +33 -0
- package/platform/src/components/aws/helpers/rds.ts +212 -0
- package/platform/src/components/aws/helpers/site-builder.ts +41 -0
- package/platform/src/components/aws/helpers/subscriber.ts +23 -0
- package/platform/src/components/aws/helpers/vpc.ts +27 -0
- package/platform/src/components/aws/https-redirect.ts +216 -0
- package/platform/src/components/aws/iam-edit.ts +50 -0
- package/platform/src/components/aws/index.ts +61 -0
- package/platform/src/components/aws/kinesis-stream-lambda-subscriber.ts +122 -0
- package/platform/src/components/aws/kinesis-stream.ts +416 -0
- package/platform/src/components/aws/linkable.ts +32 -0
- package/platform/src/components/aws/logging.ts +25 -0
- package/platform/src/components/aws/microvm.ts +988 -0
- package/platform/src/components/aws/mysql.ts +1050 -0
- package/platform/src/components/aws/nextjs.ts +1052 -0
- package/platform/src/components/aws/nuxt.ts +527 -0
- package/platform/src/components/aws/open-search.ts +603 -0
- package/platform/src/components/aws/opencontrol.ts +235 -0
- package/platform/src/components/aws/permission.ts +80 -0
- package/platform/src/components/aws/postgres-v1.ts +537 -0
- package/platform/src/components/aws/postgres.ts +1074 -0
- package/platform/src/components/aws/providers/bucket-files.ts +32 -0
- package/platform/src/components/aws/providers/distribution-deployment-waiter.ts +27 -0
- package/platform/src/components/aws/providers/distribution-invalidation.ts +24 -0
- package/platform/src/components/aws/providers/function-environment-update.ts +46 -0
- package/platform/src/components/aws/providers/hosted-zone-lookup.ts +25 -0
- package/platform/src/components/aws/providers/kv-keys.ts +15 -0
- package/platform/src/components/aws/providers/kv-routes-update.ts +24 -0
- package/platform/src/components/aws/providers/microvm-image-prune.ts +48 -0
- package/platform/src/components/aws/providers/origin-access-control.ts +21 -0
- package/platform/src/components/aws/providers/rds-role-lookup.ts +21 -0
- package/platform/src/components/aws/providers/vector-table.ts +25 -0
- package/platform/src/components/aws/queue-lambda-subscriber.ts +135 -0
- package/platform/src/components/aws/queue.ts +712 -0
- package/platform/src/components/aws/react.ts +510 -0
- package/platform/src/components/aws/realtime-lambda-subscriber.ts +129 -0
- package/platform/src/components/aws/realtime.ts +345 -0
- package/platform/src/components/aws/redis-v1.ts +595 -0
- package/platform/src/components/aws/redis.ts +1078 -0
- package/platform/src/components/aws/remix.ts +576 -0
- package/platform/src/components/aws/router-base-route.ts +83 -0
- package/platform/src/components/aws/router-bucket-route.ts +63 -0
- package/platform/src/components/aws/router-url-route.ts +75 -0
- package/platform/src/components/aws/router.ts +3294 -0
- package/platform/src/components/aws/service-v1.ts +876 -0
- package/platform/src/components/aws/service.ts +2994 -0
- package/platform/src/components/aws/sns-topic-lambda-subscriber.ts +127 -0
- package/platform/src/components/aws/sns-topic-queue-subscriber.ts +105 -0
- package/platform/src/components/aws/sns-topic.ts +700 -0
- package/platform/src/components/aws/solid-start.ts +467 -0
- package/platform/src/components/aws/ssr-site.ts +2204 -0
- package/platform/src/components/aws/static-site.ts +1389 -0
- package/platform/src/components/aws/step-functions/choice.ts +123 -0
- package/platform/src/components/aws/step-functions/fail.ts +69 -0
- package/platform/src/components/aws/step-functions/map.ts +264 -0
- package/platform/src/components/aws/step-functions/parallel.ts +170 -0
- package/platform/src/components/aws/step-functions/pass.ts +48 -0
- package/platform/src/components/aws/step-functions/state.ts +376 -0
- package/platform/src/components/aws/step-functions/succeed.ts +31 -0
- package/platform/src/components/aws/step-functions/task.ts +538 -0
- package/platform/src/components/aws/step-functions/wait.ts +105 -0
- package/platform/src/components/aws/step-functions.ts +804 -0
- package/platform/src/components/aws/svelte-kit.ts +563 -0
- package/platform/src/components/aws/takeover/alb.ts +9 -0
- package/platform/src/components/aws/takeover/apigatewayv2.ts +43 -0
- package/platform/src/components/aws/takeover/app-sync.ts +45 -0
- package/platform/src/components/aws/takeover/aurora.ts +19 -0
- package/platform/src/components/aws/takeover/bucket.ts +94 -0
- package/platform/src/components/aws/takeover/bus.ts +43 -0
- package/platform/src/components/aws/takeover/cognito-user-pool.ts +21 -0
- package/platform/src/components/aws/takeover/cron-v2.ts +9 -0
- package/platform/src/components/aws/takeover/dsql.ts +12 -0
- package/platform/src/components/aws/takeover/dynamo.ts +31 -0
- package/platform/src/components/aws/takeover/efs.ts +9 -0
- package/platform/src/components/aws/takeover/function.ts +21 -0
- package/platform/src/components/aws/takeover/helpers.ts +26 -0
- package/platform/src/components/aws/takeover/index.ts +27 -0
- package/platform/src/components/aws/takeover/mysql.ts +17 -0
- package/platform/src/components/aws/takeover/postgres.ts +17 -0
- package/platform/src/components/aws/takeover/queue.ts +21 -0
- package/platform/src/components/aws/takeover/redis.ts +10 -0
- package/platform/src/components/aws/takeover/service.ts +22 -0
- package/platform/src/components/aws/takeover/sns-topic.ts +27 -0
- package/platform/src/components/aws/takeover/task.ts +13 -0
- package/platform/src/components/aws/tan-stack-start.ts +479 -0
- package/platform/src/components/aws/task.ts +571 -0
- package/platform/src/components/aws/v5/alb.ts +310 -0
- package/platform/src/components/aws/v5/apigatewayv2.ts +845 -0
- package/platform/src/components/aws/v5/app-sync.ts +673 -0
- package/platform/src/components/aws/v5/aurora.ts +855 -0
- package/platform/src/components/aws/v5/bucket.ts +1001 -0
- package/platform/src/components/aws/v5/bus.ts +321 -0
- package/platform/src/components/aws/v5/cluster.ts +230 -0
- package/platform/src/components/aws/v5/cognito-user-pool-client.ts +100 -0
- package/platform/src/components/aws/v5/cognito-user-pool.ts +693 -0
- package/platform/src/components/aws/v5/cron-v2.ts +316 -0
- package/platform/src/components/aws/v5/dsql.ts +665 -0
- package/platform/src/components/aws/v5/dynamo.ts +477 -0
- package/platform/src/components/aws/v5/efs.ts +311 -0
- package/platform/src/components/aws/v5/function.ts +1546 -0
- package/platform/src/components/aws/v5/index.ts +26 -0
- package/platform/src/components/aws/v5/mysql.ts +604 -0
- package/platform/src/components/aws/v5/postgres.ts +612 -0
- package/platform/src/components/aws/v5/queue.ts +271 -0
- package/platform/src/components/aws/v5/redis.ts +550 -0
- package/platform/src/components/aws/v5/service.ts +2209 -0
- package/platform/src/components/aws/v5/sns-topic.ts +284 -0
- package/platform/src/components/aws/v5/task.ts +549 -0
- package/platform/src/components/aws/vector.ts +316 -0
- package/platform/src/components/aws/vpc-v1.ts +580 -0
- package/platform/src/components/aws/vpc.ts +1641 -0
- package/platform/src/components/aws/workflow.ts +421 -0
- package/platform/src/components/base/base-site.ts +101 -0
- package/platform/src/components/base/base-ssr-site.ts +120 -0
- package/platform/src/components/base/base-static-site.ts +314 -0
- package/platform/src/components/cloudflare/account-id.ts +1 -0
- package/platform/src/components/cloudflare/ai.ts +77 -0
- package/platform/src/components/cloudflare/astro.ts +355 -0
- package/platform/src/components/cloudflare/auth.ts +69 -0
- package/platform/src/components/cloudflare/binding.ts +132 -0
- package/platform/src/components/cloudflare/bucket.ts +142 -0
- package/platform/src/components/cloudflare/cron.ts +207 -0
- package/platform/src/components/cloudflare/d1.ts +230 -0
- package/platform/src/components/cloudflare/dns.ts +253 -0
- package/platform/src/components/cloudflare/durable-object.ts +144 -0
- package/platform/src/components/cloudflare/experimental/index.ts +3 -0
- package/platform/src/components/cloudflare/experimental/solid-start.ts +288 -0
- package/platform/src/components/cloudflare/experimental/static-site.ts +4 -0
- package/platform/src/components/cloudflare/helpers/compatibility.ts +44 -0
- package/platform/src/components/cloudflare/helpers/fetch.ts +81 -0
- package/platform/src/components/cloudflare/helpers/validation.ts +74 -0
- package/platform/src/components/cloudflare/helpers/worker-builder.ts +57 -0
- package/platform/src/components/cloudflare/helpers/wrangler.ts +222 -0
- package/platform/src/components/cloudflare/hyperdrive.ts +402 -0
- package/platform/src/components/cloudflare/index.ts +25 -0
- package/platform/src/components/cloudflare/kv.ts +218 -0
- package/platform/src/components/cloudflare/providers/dns-record.ts +43 -0
- package/platform/src/components/cloudflare/providers/kv-data.ts +107 -0
- package/platform/src/components/cloudflare/providers/worker-assets.ts +41 -0
- package/platform/src/components/cloudflare/providers/worker-placement.ts +93 -0
- package/platform/src/components/cloudflare/providers/worker-script.ts +47 -0
- package/platform/src/components/cloudflare/providers/worker-url.ts +109 -0
- package/platform/src/components/cloudflare/providers/zone-lookup.ts +85 -0
- package/platform/src/components/cloudflare/queue-worker-subscriber.ts +192 -0
- package/platform/src/components/cloudflare/queue.ts +310 -0
- package/platform/src/components/cloudflare/rate-limit.ts +178 -0
- package/platform/src/components/cloudflare/react-router.ts +322 -0
- package/platform/src/components/cloudflare/ssr-site.ts +293 -0
- package/platform/src/components/cloudflare/static-site-v2.ts +428 -0
- package/platform/src/components/cloudflare/static-site.ts +470 -0
- package/platform/src/components/cloudflare/tan-stack-start.ts +408 -0
- package/platform/src/components/cloudflare/worker.ts +1080 -0
- package/platform/src/components/cloudflare/workflow.ts +319 -0
- package/platform/src/components/component.ts +242 -0
- package/platform/src/components/core.ts +43 -0
- package/platform/src/components/cpu.ts +10 -0
- package/platform/src/components/dns.ts +82 -0
- package/platform/src/components/duration.ts +67 -0
- package/platform/src/components/error.ts +5 -0
- package/platform/src/components/esbuild.ts +15 -0
- package/platform/src/components/experimental/dev-command.ts +127 -0
- package/platform/src/components/experimental/index.ts +1 -0
- package/platform/src/components/groups.ts +9 -0
- package/platform/src/components/index.ts +9 -0
- package/platform/src/components/input.ts +2 -0
- package/platform/src/components/link.ts +201 -0
- package/platform/src/components/linkable.ts +360 -0
- package/platform/src/components/naming-rules.ts +299 -0
- package/platform/src/components/naming.ts +189 -0
- package/platform/src/components/parts-component.ts +662 -0
- package/platform/src/components/parts.ts +299 -0
- package/platform/src/components/path.ts +5 -0
- package/platform/src/components/rpc/rpc.ts +110 -0
- package/platform/src/components/secret.ts +159 -0
- package/platform/src/components/size.ts +28 -0
- package/platform/src/components/takeover.ts +131 -0
- package/platform/src/components/transform.ts +107 -0
- package/platform/src/components/vercel/account-id.ts +1 -0
- package/platform/src/components/vercel/dns.ts +171 -0
- package/platform/src/components/vercel/index.ts +2 -0
- package/platform/src/components/vercel/providers/dns-record.ts +34 -0
- package/platform/src/config.ts +1463 -0
- package/platform/src/global-aliases.d.ts +37 -0
- package/platform/src/global.d.ts +374 -0
- package/platform/src/internal.d.ts +18 -0
- package/platform/src/runtime/worker/unenv.d.ts +14 -0
- package/platform/src/runtime/worker/unenv.mjs +26 -0
- package/platform/src/shim/run.js +25 -0
- package/platform/src/testing/global.ts +83 -0
- package/platform/src/testing/index.ts +103 -0
- package/platform/src/testing/mock.ts +646 -0
- package/platform/src/testing/vitest.ts +36 -0
- package/platform/src/util/compare-semver.ts +23 -0
- package/platform/src/util/fs.ts +49 -0
- package/platform/src/util/lazy.ts +12 -0
- package/platform/src/util/minify.ts +10 -0
- package/platform/src/util/package.ts +29 -0
- package/platform/src/util/semaphore.ts +29 -0
- package/platform/src/util/warn.ts +7 -0
- package/platform/types/auto/run.d.ts +9 -0
- package/platform/types/auto/run.d.ts.map +1 -0
- package/platform/types/components/args.d.ts +77 -0
- package/platform/types/components/args.d.ts.map +1 -0
- package/platform/types/components/aws/alb.d.ts +283 -0
- package/platform/types/components/aws/alb.d.ts.map +1 -0
- package/platform/types/components/aws/analog.d.ts +408 -0
- package/platform/types/components/aws/analog.d.ts.map +1 -0
- package/platform/types/components/aws/apigateway-websocket-route.d.ts +74 -0
- package/platform/types/components/aws/apigateway-websocket-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigateway-websocket.d.ts +560 -0
- package/platform/types/components/aws/apigateway-websocket.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-api-key.d.ts +48 -0
- package/platform/types/components/aws/apigatewayv1-api-key.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-authorizer.d.ts +55 -0
- package/platform/types/components/aws/apigatewayv1-authorizer.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-base-route.d.ts +36 -0
- package/platform/types/components/aws/apigatewayv1-base-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-integration-route.d.ts +39 -0
- package/platform/types/components/aws/apigatewayv1-integration-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-lambda-route.d.ts +53 -0
- package/platform/types/components/aws/apigatewayv1-lambda-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-usage-plan.d.ts +53 -0
- package/platform/types/components/aws/apigatewayv1-usage-plan.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1.d.ts +1028 -0
- package/platform/types/components/aws/apigatewayv1.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2-authorizer.d.ts +54 -0
- package/platform/types/components/aws/apigatewayv2-authorizer.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2-base-route.d.ts +28 -0
- package/platform/types/components/aws/apigatewayv2-base-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2-lambda-route.d.ts +59 -0
- package/platform/types/components/aws/apigatewayv2-lambda-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2-private-route.d.ts +54 -0
- package/platform/types/components/aws/apigatewayv2-private-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2-url-route.d.ts +44 -0
- package/platform/types/components/aws/apigatewayv2-url-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2.d.ts +955 -0
- package/platform/types/components/aws/apigatewayv2.d.ts.map +1 -0
- package/platform/types/components/aws/app-sync-data-source.d.ts +52 -0
- package/platform/types/components/aws/app-sync-data-source.d.ts.map +1 -0
- package/platform/types/components/aws/app-sync-function.d.ts +33 -0
- package/platform/types/components/aws/app-sync-function.d.ts.map +1 -0
- package/platform/types/components/aws/app-sync-resolver.d.ts +41 -0
- package/platform/types/components/aws/app-sync-resolver.d.ts.map +1 -0
- package/platform/types/components/aws/app-sync.d.ts +638 -0
- package/platform/types/components/aws/app-sync.d.ts.map +1 -0
- package/platform/types/components/aws/astro.d.ts +409 -0
- package/platform/types/components/aws/astro.d.ts.map +1 -0
- package/platform/types/components/aws/aurora.d.ts +720 -0
- package/platform/types/components/aws/aurora.d.ts.map +1 -0
- package/platform/types/components/aws/auth-v1.d.ts +26 -0
- package/platform/types/components/aws/auth-v1.d.ts.map +1 -0
- package/platform/types/components/aws/auth.d.ts +295 -0
- package/platform/types/components/aws/auth.d.ts.map +1 -0
- package/platform/types/components/aws/bucket-lambda-subscriber.d.ts +61 -0
- package/platform/types/components/aws/bucket-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bucket-notification.d.ts +47 -0
- package/platform/types/components/aws/bucket-notification.d.ts.map +1 -0
- package/platform/types/components/aws/bucket-queue-subscriber.d.ts +55 -0
- package/platform/types/components/aws/bucket-queue-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bucket-topic-subscriber.d.ts +55 -0
- package/platform/types/components/aws/bucket-topic-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bucket.d.ts +1356 -0
- package/platform/types/components/aws/bucket.d.ts.map +1 -0
- package/platform/types/components/aws/bus-base-subscriber.d.ts +20 -0
- package/platform/types/components/aws/bus-base-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bus-lambda-subscriber.d.ts +50 -0
- package/platform/types/components/aws/bus-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bus-queue-subscriber.d.ts +44 -0
- package/platform/types/components/aws/bus-queue-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bus.d.ts +447 -0
- package/platform/types/components/aws/bus.d.ts.map +1 -0
- package/platform/types/components/aws/cdn.d.ts +310 -0
- package/platform/types/components/aws/cdn.d.ts.map +1 -0
- package/platform/types/components/aws/cluster-v1.d.ts +885 -0
- package/platform/types/components/aws/cluster-v1.d.ts.map +1 -0
- package/platform/types/components/aws/cluster.d.ts +364 -0
- package/platform/types/components/aws/cluster.d.ts.map +1 -0
- package/platform/types/components/aws/cognito-identity-pool.d.ts +199 -0
- package/platform/types/components/aws/cognito-identity-pool.d.ts.map +1 -0
- package/platform/types/components/aws/cognito-identity-provider.d.ts +38 -0
- package/platform/types/components/aws/cognito-identity-provider.d.ts.map +1 -0
- package/platform/types/components/aws/cognito-user-pool-client.d.ts +50 -0
- package/platform/types/components/aws/cognito-user-pool-client.d.ts.map +1 -0
- package/platform/types/components/aws/cognito-user-pool.d.ts +703 -0
- package/platform/types/components/aws/cognito-user-pool.d.ts.map +1 -0
- package/platform/types/components/aws/cron-v2.d.ts +325 -0
- package/platform/types/components/aws/cron-v2.d.ts.map +1 -0
- package/platform/types/components/aws/cron.d.ts +259 -0
- package/platform/types/components/aws/cron.d.ts.map +1 -0
- package/platform/types/components/aws/dns-validated-certificate.d.ts +27 -0
- package/platform/types/components/aws/dns-validated-certificate.d.ts.map +1 -0
- package/platform/types/components/aws/dns.d.ts +94 -0
- package/platform/types/components/aws/dns.d.ts.map +1 -0
- package/platform/types/components/aws/dsql.d.ts +369 -0
- package/platform/types/components/aws/dsql.d.ts.map +1 -0
- package/platform/types/components/aws/dynamo-lambda-subscriber.d.ts +55 -0
- package/platform/types/components/aws/dynamo-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/dynamo.d.ts +628 -0
- package/platform/types/components/aws/dynamo.d.ts.map +1 -0
- package/platform/types/components/aws/efs.d.ts +217 -0
- package/platform/types/components/aws/efs.d.ts.map +1 -0
- package/platform/types/components/aws/email.d.ts +370 -0
- package/platform/types/components/aws/email.d.ts.map +1 -0
- package/platform/types/components/aws/fargate.d.ts +894 -0
- package/platform/types/components/aws/fargate.d.ts.map +1 -0
- package/platform/types/components/aws/function.d.ts +1780 -0
- package/platform/types/components/aws/function.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/apigateway-account.d.ts +3 -0
- package/platform/types/components/aws/helpers/apigateway-account.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/apigatewayv2-domain.d.ts +144 -0
- package/platform/types/components/aws/helpers/apigatewayv2-domain.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/arn.d.ts +51 -0
- package/platform/types/components/aws/helpers/arn.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/bootstrap.d.ts +13 -0
- package/platform/types/components/aws/helpers/bootstrap.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/client.d.ts +7 -0
- package/platform/types/components/aws/helpers/client.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/container-builder.d.ts +4 -0
- package/platform/types/components/aws/helpers/container-builder.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/custom-domain.d.ts +111 -0
- package/platform/types/components/aws/helpers/custom-domain.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/event-source.d.ts +26 -0
- package/platform/types/components/aws/helpers/event-source.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/fargate.d.ts +225 -0
- package/platform/types/components/aws/helpers/fargate.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/function-builder.d.ts +14 -0
- package/platform/types/components/aws/helpers/function-builder.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/function-code.d.ts +80 -0
- package/platform/types/components/aws/helpers/function-code.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/function-part.d.ts +61 -0
- package/platform/types/components/aws/helpers/function-part.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/function-permission.d.ts +17 -0
- package/platform/types/components/aws/helpers/function-permission.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/load-balancer-args.d.ts +40 -0
- package/platform/types/components/aws/helpers/load-balancer-args.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/load-balancer.d.ts +9 -0
- package/platform/types/components/aws/helpers/load-balancer.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/provider.d.ts +3 -0
- package/platform/types/components/aws/helpers/provider.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/queue-policy.d.ts +11 -0
- package/platform/types/components/aws/helpers/queue-policy.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/rds.d.ts +98 -0
- package/platform/types/components/aws/helpers/rds.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/site-builder.d.ts +4 -0
- package/platform/types/components/aws/helpers/site-builder.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/subscriber.d.ts +6 -0
- package/platform/types/components/aws/helpers/subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/vpc.d.ts +14 -0
- package/platform/types/components/aws/helpers/vpc.d.ts.map +1 -0
- package/platform/types/components/aws/https-redirect.d.ts +38 -0
- package/platform/types/components/aws/https-redirect.d.ts.map +1 -0
- package/platform/types/components/aws/iam-edit.d.ts +39 -0
- package/platform/types/components/aws/iam-edit.d.ts.map +1 -0
- package/platform/types/components/aws/index.d.ts +56 -0
- package/platform/types/components/aws/index.d.ts.map +1 -0
- package/platform/types/components/aws/kinesis-stream-lambda-subscriber.d.ts +49 -0
- package/platform/types/components/aws/kinesis-stream-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/kinesis-stream.d.ts +254 -0
- package/platform/types/components/aws/kinesis-stream.d.ts.map +1 -0
- package/platform/types/components/aws/linkable.d.ts +17 -0
- package/platform/types/components/aws/linkable.d.ts.map +1 -0
- package/platform/types/components/aws/logging.d.ts +26 -0
- package/platform/types/components/aws/logging.d.ts.map +1 -0
- package/platform/types/components/aws/microvm.d.ts +439 -0
- package/platform/types/components/aws/microvm.d.ts.map +1 -0
- package/platform/types/components/aws/mysql.d.ts +528 -0
- package/platform/types/components/aws/mysql.d.ts.map +1 -0
- package/platform/types/components/aws/nextjs.d.ts +534 -0
- package/platform/types/components/aws/nextjs.d.ts.map +1 -0
- package/platform/types/components/aws/nuxt.d.ts +480 -0
- package/platform/types/components/aws/nuxt.d.ts.map +1 -0
- package/platform/types/components/aws/open-search.d.ts +306 -0
- package/platform/types/components/aws/open-search.d.ts.map +1 -0
- package/platform/types/components/aws/opencontrol.d.ts +169 -0
- package/platform/types/components/aws/opencontrol.d.ts.map +1 -0
- package/platform/types/components/aws/permission.d.ts +80 -0
- package/platform/types/components/aws/permission.d.ts.map +1 -0
- package/platform/types/components/aws/postgres-v1.d.ts +328 -0
- package/platform/types/components/aws/postgres-v1.d.ts.map +1 -0
- package/platform/types/components/aws/postgres.d.ts +529 -0
- package/platform/types/components/aws/postgres.d.ts.map +1 -0
- package/platform/types/components/aws/providers/bucket-files.d.ts +18 -0
- package/platform/types/components/aws/providers/bucket-files.d.ts.map +1 -0
- package/platform/types/components/aws/providers/distribution-deployment-waiter.d.ts +13 -0
- package/platform/types/components/aws/providers/distribution-deployment-waiter.d.ts.map +1 -0
- package/platform/types/components/aws/providers/distribution-invalidation.d.ts +11 -0
- package/platform/types/components/aws/providers/distribution-invalidation.d.ts.map +1 -0
- package/platform/types/components/aws/providers/function-environment-update.d.ts +33 -0
- package/platform/types/components/aws/providers/function-environment-update.d.ts.map +1 -0
- package/platform/types/components/aws/providers/hosted-zone-lookup.d.ts +11 -0
- package/platform/types/components/aws/providers/hosted-zone-lookup.d.ts.map +1 -0
- package/platform/types/components/aws/providers/kv-keys.d.ts +11 -0
- package/platform/types/components/aws/providers/kv-keys.d.ts.map +1 -0
- package/platform/types/components/aws/providers/kv-routes-update.d.ts +11 -0
- package/platform/types/components/aws/providers/kv-routes-update.d.ts.map +1 -0
- package/platform/types/components/aws/providers/microvm-image-prune.d.ts +35 -0
- package/platform/types/components/aws/providers/microvm-image-prune.d.ts.map +1 -0
- package/platform/types/components/aws/providers/origin-access-control.d.ts +8 -0
- package/platform/types/components/aws/providers/origin-access-control.d.ts.map +1 -0
- package/platform/types/components/aws/providers/rds-role-lookup.d.ts +8 -0
- package/platform/types/components/aws/providers/rds-role-lookup.d.ts.map +1 -0
- package/platform/types/components/aws/providers/vector-table.d.ts +12 -0
- package/platform/types/components/aws/providers/vector-table.d.ts.map +1 -0
- package/platform/types/components/aws/queue-lambda-subscriber.d.ts +53 -0
- package/platform/types/components/aws/queue-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/queue.d.ts +494 -0
- package/platform/types/components/aws/queue.d.ts.map +1 -0
- package/platform/types/components/aws/react.d.ts +407 -0
- package/platform/types/components/aws/react.d.ts.map +1 -0
- package/platform/types/components/aws/realtime-lambda-subscriber.d.ts +53 -0
- package/platform/types/components/aws/realtime-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/realtime.d.ts +237 -0
- package/platform/types/components/aws/realtime.d.ts.map +1 -0
- package/platform/types/components/aws/redis-v1.d.ts +348 -0
- package/platform/types/components/aws/redis-v1.d.ts.map +1 -0
- package/platform/types/components/aws/redis.d.ts +545 -0
- package/platform/types/components/aws/redis.d.ts.map +1 -0
- package/platform/types/components/aws/remix.d.ts +408 -0
- package/platform/types/components/aws/remix.d.ts.map +1 -0
- package/platform/types/components/aws/router-base-route.d.ts +28 -0
- package/platform/types/components/aws/router-base-route.d.ts.map +1 -0
- package/platform/types/components/aws/router-bucket-route.d.ts +29 -0
- package/platform/types/components/aws/router-bucket-route.d.ts.map +1 -0
- package/platform/types/components/aws/router-url-route.d.ts +28 -0
- package/platform/types/components/aws/router-url-route.d.ts.map +1 -0
- package/platform/types/components/aws/router.d.ts +1767 -0
- package/platform/types/components/aws/router.d.ts.map +1 -0
- package/platform/types/components/aws/service-v1.d.ts +78 -0
- package/platform/types/components/aws/service-v1.d.ts.map +1 -0
- package/platform/types/components/aws/service.d.ts +1756 -0
- package/platform/types/components/aws/service.d.ts.map +1 -0
- package/platform/types/components/aws/sns-topic-lambda-subscriber.d.ts +53 -0
- package/platform/types/components/aws/sns-topic-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/sns-topic-queue-subscriber.d.ts +55 -0
- package/platform/types/components/aws/sns-topic-queue-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/sns-topic.d.ts +394 -0
- package/platform/types/components/aws/sns-topic.d.ts.map +1 -0
- package/platform/types/components/aws/solid-start.d.ts +399 -0
- package/platform/types/components/aws/solid-start.d.ts.map +1 -0
- package/platform/types/components/aws/ssr-site.d.ts +895 -0
- package/platform/types/components/aws/ssr-site.d.ts.map +1 -0
- package/platform/types/components/aws/static-site.d.ts +744 -0
- package/platform/types/components/aws/static-site.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/choice.d.ts +73 -0
- package/platform/types/components/aws/step-functions/choice.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/fail.d.ts +63 -0
- package/platform/types/components/aws/step-functions/fail.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/map.d.ts +236 -0
- package/platform/types/components/aws/step-functions/map.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/parallel.d.ts +127 -0
- package/platform/types/components/aws/step-functions/parallel.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/pass.d.ts +39 -0
- package/platform/types/components/aws/step-functions/pass.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/state.d.ts +231 -0
- package/platform/types/components/aws/step-functions/state.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/succeed.d.ts +26 -0
- package/platform/types/components/aws/step-functions/succeed.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/task.d.ts +485 -0
- package/platform/types/components/aws/step-functions/task.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/wait.d.ts +91 -0
- package/platform/types/components/aws/step-functions/wait.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions.d.ts +478 -0
- package/platform/types/components/aws/step-functions.d.ts.map +1 -0
- package/platform/types/components/aws/svelte-kit.d.ts +456 -0
- package/platform/types/components/aws/svelte-kit.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/alb.d.ts +2 -0
- package/platform/types/components/aws/takeover/alb.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/apigatewayv2.d.ts +2 -0
- package/platform/types/components/aws/takeover/apigatewayv2.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/app-sync.d.ts +2 -0
- package/platform/types/components/aws/takeover/app-sync.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/aurora.d.ts +2 -0
- package/platform/types/components/aws/takeover/aurora.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/bucket.d.ts +2 -0
- package/platform/types/components/aws/takeover/bucket.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/bus.d.ts +2 -0
- package/platform/types/components/aws/takeover/bus.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/cognito-user-pool.d.ts +2 -0
- package/platform/types/components/aws/takeover/cognito-user-pool.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/cron-v2.d.ts +2 -0
- package/platform/types/components/aws/takeover/cron-v2.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/dsql.d.ts +2 -0
- package/platform/types/components/aws/takeover/dsql.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/dynamo.d.ts +2 -0
- package/platform/types/components/aws/takeover/dynamo.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/efs.d.ts +2 -0
- package/platform/types/components/aws/takeover/efs.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/function.d.ts +2 -0
- package/platform/types/components/aws/takeover/function.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/helpers.d.ts +16 -0
- package/platform/types/components/aws/takeover/helpers.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/index.d.ts +28 -0
- package/platform/types/components/aws/takeover/index.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/mysql.d.ts +2 -0
- package/platform/types/components/aws/takeover/mysql.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/postgres.d.ts +2 -0
- package/platform/types/components/aws/takeover/postgres.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/queue.d.ts +2 -0
- package/platform/types/components/aws/takeover/queue.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/redis.d.ts +2 -0
- package/platform/types/components/aws/takeover/redis.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/service.d.ts +2 -0
- package/platform/types/components/aws/takeover/service.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/sns-topic.d.ts +2 -0
- package/platform/types/components/aws/takeover/sns-topic.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/task.d.ts +2 -0
- package/platform/types/components/aws/takeover/task.d.ts.map +1 -0
- package/platform/types/components/aws/tan-stack-start.d.ts +359 -0
- package/platform/types/components/aws/tan-stack-start.d.ts.map +1 -0
- package/platform/types/components/aws/task.d.ts +342 -0
- package/platform/types/components/aws/task.d.ts.map +1 -0
- package/platform/types/components/aws/v5/alb.d.ts +177 -0
- package/platform/types/components/aws/v5/alb.d.ts.map +1 -0
- package/platform/types/components/aws/v5/apigatewayv2.d.ts +482 -0
- package/platform/types/components/aws/v5/apigatewayv2.d.ts.map +1 -0
- package/platform/types/components/aws/v5/app-sync.d.ts +424 -0
- package/platform/types/components/aws/v5/app-sync.d.ts.map +1 -0
- package/platform/types/components/aws/v5/aurora.d.ts +459 -0
- package/platform/types/components/aws/v5/aurora.d.ts.map +1 -0
- package/platform/types/components/aws/v5/bucket.d.ts +578 -0
- package/platform/types/components/aws/v5/bucket.d.ts.map +1 -0
- package/platform/types/components/aws/v5/bus.d.ts +255 -0
- package/platform/types/components/aws/v5/bus.d.ts.map +1 -0
- package/platform/types/components/aws/v5/cluster.d.ts +167 -0
- package/platform/types/components/aws/v5/cluster.d.ts.map +1 -0
- package/platform/types/components/aws/v5/cognito-user-pool-client.d.ts +69 -0
- package/platform/types/components/aws/v5/cognito-user-pool-client.d.ts.map +1 -0
- package/platform/types/components/aws/v5/cognito-user-pool.d.ts +396 -0
- package/platform/types/components/aws/v5/cognito-user-pool.d.ts.map +1 -0
- package/platform/types/components/aws/v5/cron-v2.d.ts +206 -0
- package/platform/types/components/aws/v5/cron-v2.d.ts.map +1 -0
- package/platform/types/components/aws/v5/dsql.d.ts +453 -0
- package/platform/types/components/aws/v5/dsql.d.ts.map +1 -0
- package/platform/types/components/aws/v5/dynamo.d.ts +328 -0
- package/platform/types/components/aws/v5/dynamo.d.ts.map +1 -0
- package/platform/types/components/aws/v5/efs.d.ts +178 -0
- package/platform/types/components/aws/v5/efs.d.ts.map +1 -0
- package/platform/types/components/aws/v5/function.d.ts +586 -0
- package/platform/types/components/aws/v5/function.d.ts.map +1 -0
- package/platform/types/components/aws/v5/index.d.ts +27 -0
- package/platform/types/components/aws/v5/index.d.ts.map +1 -0
- package/platform/types/components/aws/v5/mysql.d.ts +347 -0
- package/platform/types/components/aws/v5/mysql.d.ts.map +1 -0
- package/platform/types/components/aws/v5/postgres.d.ts +348 -0
- package/platform/types/components/aws/v5/postgres.d.ts.map +1 -0
- package/platform/types/components/aws/v5/queue.d.ts +190 -0
- package/platform/types/components/aws/v5/queue.d.ts.map +1 -0
- package/platform/types/components/aws/v5/redis.d.ts +214 -0
- package/platform/types/components/aws/v5/redis.d.ts.map +1 -0
- package/platform/types/components/aws/v5/service.d.ts +1347 -0
- package/platform/types/components/aws/v5/service.d.ts.map +1 -0
- package/platform/types/components/aws/v5/sns-topic.d.ts +226 -0
- package/platform/types/components/aws/v5/sns-topic.d.ts.map +1 -0
- package/platform/types/components/aws/v5/task.d.ts +346 -0
- package/platform/types/components/aws/v5/task.d.ts.map +1 -0
- package/platform/types/components/aws/vector.d.ts +163 -0
- package/platform/types/components/aws/vector.d.ts.map +1 -0
- package/platform/types/components/aws/vpc-v1.d.ts +208 -0
- package/platform/types/components/aws/vpc-v1.d.ts.map +1 -0
- package/platform/types/components/aws/vpc.d.ts +491 -0
- package/platform/types/components/aws/vpc.d.ts.map +1 -0
- package/platform/types/components/aws/workflow.d.ts +331 -0
- package/platform/types/components/aws/workflow.d.ts.map +1 -0
- package/platform/types/components/base/base-site.d.ts +53 -0
- package/platform/types/components/base/base-site.d.ts.map +1 -0
- package/platform/types/components/base/base-ssr-site.d.ts +13 -0
- package/platform/types/components/base/base-ssr-site.d.ts.map +1 -0
- package/platform/types/components/base/base-static-site.d.ts +199 -0
- package/platform/types/components/base/base-static-site.d.ts.map +1 -0
- package/platform/types/components/cloudflare/account-id.d.ts +2 -0
- package/platform/types/components/cloudflare/account-id.d.ts.map +1 -0
- package/platform/types/components/cloudflare/ai.d.ts +68 -0
- package/platform/types/components/cloudflare/ai.d.ts.map +1 -0
- package/platform/types/components/cloudflare/astro.d.ts +249 -0
- package/platform/types/components/cloudflare/astro.d.ts.map +1 -0
- package/platform/types/components/cloudflare/auth.d.ts +22 -0
- package/platform/types/components/cloudflare/auth.d.ts.map +1 -0
- package/platform/types/components/cloudflare/binding.d.ts +109 -0
- package/platform/types/components/cloudflare/binding.d.ts.map +1 -0
- package/platform/types/components/cloudflare/bucket.d.ts +98 -0
- package/platform/types/components/cloudflare/bucket.d.ts.map +1 -0
- package/platform/types/components/cloudflare/cron.d.ts +151 -0
- package/platform/types/components/cloudflare/cron.d.ts.map +1 -0
- package/platform/types/components/cloudflare/d1.d.ts +142 -0
- package/platform/types/components/cloudflare/d1.d.ts.map +1 -0
- package/platform/types/components/cloudflare/dns.d.ts +100 -0
- package/platform/types/components/cloudflare/dns.d.ts.map +1 -0
- package/platform/types/components/cloudflare/durable-object.d.ts +125 -0
- package/platform/types/components/cloudflare/durable-object.d.ts.map +1 -0
- package/platform/types/components/cloudflare/experimental/index.d.ts +4 -0
- package/platform/types/components/cloudflare/experimental/index.d.ts.map +1 -0
- package/platform/types/components/cloudflare/experimental/solid-start.d.ts +219 -0
- package/platform/types/components/cloudflare/experimental/solid-start.d.ts.map +1 -0
- package/platform/types/components/cloudflare/experimental/static-site.d.ts +3 -0
- package/platform/types/components/cloudflare/experimental/static-site.d.ts.map +1 -0
- package/platform/types/components/cloudflare/helpers/compatibility.d.ts +21 -0
- package/platform/types/components/cloudflare/helpers/compatibility.d.ts.map +1 -0
- package/platform/types/components/cloudflare/helpers/fetch.d.ts +19 -0
- package/platform/types/components/cloudflare/helpers/fetch.d.ts.map +1 -0
- package/platform/types/components/cloudflare/helpers/validation.d.ts +15 -0
- package/platform/types/components/cloudflare/helpers/validation.d.ts.map +1 -0
- package/platform/types/components/cloudflare/helpers/worker-builder.d.ts +10 -0
- package/platform/types/components/cloudflare/helpers/worker-builder.d.ts.map +1 -0
- package/platform/types/components/cloudflare/helpers/wrangler.d.ts +31 -0
- package/platform/types/components/cloudflare/helpers/wrangler.d.ts.map +1 -0
- package/platform/types/components/cloudflare/hyperdrive.d.ts +302 -0
- package/platform/types/components/cloudflare/hyperdrive.d.ts.map +1 -0
- package/platform/types/components/cloudflare/index.d.ts +25 -0
- package/platform/types/components/cloudflare/index.d.ts.map +1 -0
- package/platform/types/components/cloudflare/kv.d.ts +140 -0
- package/platform/types/components/cloudflare/kv.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/dns-record.d.ts +21 -0
- package/platform/types/components/cloudflare/providers/dns-record.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/kv-data.d.ts +23 -0
- package/platform/types/components/cloudflare/providers/kv-data.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/worker-assets.d.ts +19 -0
- package/platform/types/components/cloudflare/providers/worker-assets.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/worker-placement.d.ts +27 -0
- package/platform/types/components/cloudflare/providers/worker-placement.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/worker-script.d.ts +23 -0
- package/platform/types/components/cloudflare/providers/worker-script.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/worker-url.d.ts +24 -0
- package/platform/types/components/cloudflare/providers/worker-url.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/zone-lookup.d.ts +22 -0
- package/platform/types/components/cloudflare/providers/zone-lookup.d.ts.map +1 -0
- package/platform/types/components/cloudflare/queue-worker-subscriber.d.ts +122 -0
- package/platform/types/components/cloudflare/queue-worker-subscriber.d.ts.map +1 -0
- package/platform/types/components/cloudflare/queue.d.ts +235 -0
- package/platform/types/components/cloudflare/queue.d.ts.map +1 -0
- package/platform/types/components/cloudflare/rate-limit.d.ts +117 -0
- package/platform/types/components/cloudflare/rate-limit.d.ts.map +1 -0
- package/platform/types/components/cloudflare/react-router.d.ts +262 -0
- package/platform/types/components/cloudflare/react-router.d.ts.map +1 -0
- package/platform/types/components/cloudflare/ssr-site.d.ts +60 -0
- package/platform/types/components/cloudflare/ssr-site.d.ts.map +1 -0
- package/platform/types/components/cloudflare/static-site-v2.d.ts +302 -0
- package/platform/types/components/cloudflare/static-site-v2.d.ts.map +1 -0
- package/platform/types/components/cloudflare/static-site.d.ts +270 -0
- package/platform/types/components/cloudflare/static-site.d.ts.map +1 -0
- package/platform/types/components/cloudflare/tan-stack-start.d.ts +259 -0
- package/platform/types/components/cloudflare/tan-stack-start.d.ts.map +1 -0
- package/platform/types/components/cloudflare/worker.d.ts +483 -0
- package/platform/types/components/cloudflare/worker.d.ts.map +1 -0
- package/platform/types/components/cloudflare/workflow.d.ts +248 -0
- package/platform/types/components/cloudflare/workflow.d.ts.map +1 -0
- package/platform/types/components/component.d.ts +67 -0
- package/platform/types/components/component.d.ts.map +1 -0
- package/platform/types/components/core.d.ts +16 -0
- package/platform/types/components/core.d.ts.map +1 -0
- package/platform/types/components/cpu.d.ts +3 -0
- package/platform/types/components/cpu.d.ts.map +1 -0
- package/platform/types/components/dns.d.ts +63 -0
- package/platform/types/components/dns.d.ts.map +1 -0
- package/platform/types/components/duration.d.ts +9 -0
- package/platform/types/components/duration.d.ts.map +1 -0
- package/platform/types/components/error.d.ts +4 -0
- package/platform/types/components/error.d.ts.map +1 -0
- package/platform/types/components/esbuild.d.ts +3 -0
- package/platform/types/components/esbuild.d.ts.map +1 -0
- package/platform/types/components/experimental/dev-command.d.ts +99 -0
- package/platform/types/components/experimental/dev-command.d.ts.map +1 -0
- package/platform/types/components/experimental/index.d.ts +2 -0
- package/platform/types/components/experimental/index.d.ts.map +1 -0
- package/platform/types/components/groups.d.ts +6 -0
- package/platform/types/components/groups.d.ts.map +1 -0
- package/platform/types/components/index.d.ts +5 -0
- package/platform/types/components/index.d.ts.map +1 -0
- package/platform/types/components/input.d.ts +3 -0
- package/platform/types/components/input.d.ts.map +1 -0
- package/platform/types/components/link.d.ts +41 -0
- package/platform/types/components/link.d.ts.map +1 -0
- package/platform/types/components/linkable.d.ts +301 -0
- package/platform/types/components/linkable.d.ts.map +1 -0
- package/platform/types/components/naming-rules.d.ts +32 -0
- package/platform/types/components/naming-rules.d.ts.map +1 -0
- package/platform/types/components/naming.d.ts +21 -0
- package/platform/types/components/naming.d.ts.map +1 -0
- package/platform/types/components/parts-component.d.ts +242 -0
- package/platform/types/components/parts-component.d.ts.map +1 -0
- package/platform/types/components/parts.d.ts +194 -0
- package/platform/types/components/parts.d.ts.map +1 -0
- package/platform/types/components/path.d.ts +2 -0
- package/platform/types/components/path.d.ts.map +1 -0
- package/platform/types/components/rpc/rpc.d.ts +19 -0
- package/platform/types/components/rpc/rpc.d.ts.map +1 -0
- package/platform/types/components/secret.d.ts +123 -0
- package/platform/types/components/secret.d.ts.map +1 -0
- package/platform/types/components/size.d.ts +5 -0
- package/platform/types/components/size.d.ts.map +1 -0
- package/platform/types/components/takeover.d.ts +88 -0
- package/platform/types/components/takeover.d.ts.map +1 -0
- package/platform/types/components/transform.d.ts +34 -0
- package/platform/types/components/transform.d.ts.map +1 -0
- package/platform/types/components/vercel/account-id.d.ts +2 -0
- package/platform/types/components/vercel/account-id.d.ts.map +1 -0
- package/platform/types/components/vercel/dns.d.ts +73 -0
- package/platform/types/components/vercel/dns.d.ts.map +1 -0
- package/platform/types/components/vercel/index.d.ts +3 -0
- package/platform/types/components/vercel/index.d.ts.map +1 -0
- package/platform/types/components/vercel/providers/dns-record.d.ts +15 -0
- package/platform/types/components/vercel/providers/dns-record.d.ts.map +1 -0
- package/platform/types/config.d.ts +1440 -0
- package/platform/types/config.d.ts.map +1 -0
- package/platform/types/global-aliases.d.ts +37 -0
- package/platform/types/global.d.ts +374 -0
- package/platform/types/internal.d.ts +18 -0
- package/platform/types/runtime/worker/unenv.d.ts +14 -0
- package/platform/types/testing/global.d.ts +11 -0
- package/platform/types/testing/global.d.ts.map +1 -0
- package/platform/types/testing/index.d.ts +80 -0
- package/platform/types/testing/index.d.ts.map +1 -0
- package/platform/types/testing/mock.d.ts +136 -0
- package/platform/types/testing/mock.d.ts.map +1 -0
- package/platform/types/testing/vitest.d.ts +19 -0
- package/platform/types/testing/vitest.d.ts.map +1 -0
- package/platform/types/util/compare-semver.d.ts +4 -0
- package/platform/types/util/compare-semver.d.ts.map +1 -0
- package/platform/types/util/fs.d.ts +5 -0
- package/platform/types/util/fs.d.ts.map +1 -0
- package/platform/types/util/lazy.d.ts +2 -0
- package/platform/types/util/lazy.d.ts.map +1 -0
- package/platform/types/util/minify.d.ts +2 -0
- package/platform/types/util/minify.d.ts.map +1 -0
- package/platform/types/util/package.d.ts +10 -0
- package/platform/types/util/package.d.ts.map +1 -0
- package/platform/types/util/semaphore.d.ts +9 -0
- package/platform/types/util/semaphore.d.ts.map +1 -0
- package/platform/types/util/warn.d.ts +2 -0
- package/platform/types/util/warn.d.ts.map +1 -0
|
@@ -0,0 +1,646 @@
|
|
|
1
|
+
import crypto from "crypto";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import os from "os";
|
|
4
|
+
import path from "path";
|
|
5
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
6
|
+
import { rpc } from "../components/rpc/rpc";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A resource a component registered, with what decides whether a deployed
|
|
10
|
+
* app would see a change: its inputs, its parent, and options like aliases,
|
|
11
|
+
* `ignoreChanges` and `retainOnDelete`.
|
|
12
|
+
*
|
|
13
|
+
* A difference between two of these is a difference `sst diff` would show on
|
|
14
|
+
* a deployed stage.
|
|
15
|
+
*/
|
|
16
|
+
export interface RecordedResource {
|
|
17
|
+
kind: "register" | "read";
|
|
18
|
+
type: string;
|
|
19
|
+
name: string;
|
|
20
|
+
parent: string;
|
|
21
|
+
custom: boolean;
|
|
22
|
+
inputs: Record<string, any>;
|
|
23
|
+
options: Record<string, any>;
|
|
24
|
+
/** What a component registered as its outputs. The CLI reads some of them. */
|
|
25
|
+
outputs?: Record<string, any>;
|
|
26
|
+
/**
|
|
27
|
+
* What the CLI was given to build a function's code from: its handler,
|
|
28
|
+
* runtime and links. The links go into the code, so they aren't in any
|
|
29
|
+
* resource's inputs.
|
|
30
|
+
*/
|
|
31
|
+
build?: Record<string, any>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Suppress Pulumi "Trace events are unavailable" errors in test environment
|
|
35
|
+
process.on("unhandledRejection", (err: any) => {
|
|
36
|
+
if (err?.code === "ERR_TRACE_EVENTS_UNAVAILABLE") return;
|
|
37
|
+
throw err;
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export interface MockInput {
|
|
41
|
+
/** The app's name. Defaults to "app". */
|
|
42
|
+
app?: string;
|
|
43
|
+
/** The stage. Defaults to "test". */
|
|
44
|
+
stage?: string;
|
|
45
|
+
/** The root of the app, which paths like a function's handler are relative to. */
|
|
46
|
+
root?: string;
|
|
47
|
+
/**
|
|
48
|
+
* For the platform's own takeover tests: the components a 4.x component
|
|
49
|
+
* wraps things in, which go when its V5 component takes over.
|
|
50
|
+
*/
|
|
51
|
+
wrappers?: RegExp;
|
|
52
|
+
/** Extra state for a resource, on top of its inputs. */
|
|
53
|
+
state?: (args: pulumi.runtime.MockResourceArgs) => Record<string, any>;
|
|
54
|
+
/** The result of a provider function call, like a data source lookup. */
|
|
55
|
+
call?: (args: pulumi.runtime.MockCallArgs) => Record<string, any> | undefined;
|
|
56
|
+
/** The source maps the build of a function writes, by the function's name. */
|
|
57
|
+
sourcemaps?: (functionID: string) => string[];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Stands in for the Pulumi engine and for the CLI, and records what's
|
|
62
|
+
* registered. Nothing is deployed: a resource comes back with the inputs it
|
|
63
|
+
* was given, and an id and ARN made from its name.
|
|
64
|
+
*
|
|
65
|
+
* This is the part of `mock()` that needs nothing loaded. It sets the
|
|
66
|
+
* globals the components read, and not the ones a config has, like `sst`.
|
|
67
|
+
*/
|
|
68
|
+
export function mockPulumi(input?: MockInput) {
|
|
69
|
+
const resources: RecordedResource[] = [];
|
|
70
|
+
// Counts what's sent to the engine, to tell when a deploy has gone quiet
|
|
71
|
+
let activity = 0;
|
|
72
|
+
|
|
73
|
+
// Generated names end in random characters. A deployed resource keeps the
|
|
74
|
+
// name it has, so give every run the same ones.
|
|
75
|
+
(crypto as any).randomBytes = (size: number) => Buffer.alloc(size, 7);
|
|
76
|
+
|
|
77
|
+
// Building a function calls the CLI, which isn't running here. Stand in
|
|
78
|
+
// for it with an empty bundle, so a function is created in full, and so is
|
|
79
|
+
// whatever waits for it.
|
|
80
|
+
const work = fs.mkdtempSync(path.join(os.tmpdir(), "sst-test-"));
|
|
81
|
+
const bundle = path.join(work, "bundle");
|
|
82
|
+
fs.mkdirSync(bundle);
|
|
83
|
+
fs.writeFileSync(
|
|
84
|
+
path.join(bundle, "index.mjs"),
|
|
85
|
+
"export const handler = async () => {};\n",
|
|
86
|
+
);
|
|
87
|
+
// In `sst dev` a stub is deployed in place of a function's code. The CLI
|
|
88
|
+
// ships it; here it's a file.
|
|
89
|
+
const platform = path.join(work, "platform");
|
|
90
|
+
for (const stub of ["bridge", "nodejs-bridge"]) {
|
|
91
|
+
fs.mkdirSync(path.join(platform, "dist", stub), { recursive: true });
|
|
92
|
+
fs.writeFileSync(path.join(platform, "dist", stub, "bootstrap"), stub);
|
|
93
|
+
}
|
|
94
|
+
// What the CLI builds each function from, by the function's name. The
|
|
95
|
+
// name, the app's key and the mode are left out: they aren't the
|
|
96
|
+
// function's own.
|
|
97
|
+
const builds = new Map<string, Record<string, any>>();
|
|
98
|
+
const built = ({ functionID, encryptionKey, dev, logGroup, ...build }: any) =>
|
|
99
|
+
builds.set(functionID, build);
|
|
100
|
+
const buildOf = (r: RecordedResource) =>
|
|
101
|
+
!r.custom && r.type === "sst:aws:Function" ? builds.get(r.name) : undefined;
|
|
102
|
+
rpc.call = (async (method: string, args: any) => {
|
|
103
|
+
if (method === "Runtime.Build" || method === "Runtime.AddTarget")
|
|
104
|
+
built(args);
|
|
105
|
+
if (method === "Runtime.Build")
|
|
106
|
+
return {
|
|
107
|
+
handler: "index.handler",
|
|
108
|
+
out: bundle,
|
|
109
|
+
errors: [],
|
|
110
|
+
sourcemaps: input?.sourcemaps?.(args.functionID) ?? [],
|
|
111
|
+
};
|
|
112
|
+
if (method === "Runtime.AddTarget") return {};
|
|
113
|
+
if (method === "Provider.Aws.Appsync")
|
|
114
|
+
return {
|
|
115
|
+
http: "appsync.example.com",
|
|
116
|
+
realtime: "appsync-realtime.example.com",
|
|
117
|
+
};
|
|
118
|
+
if (method === "Provider.Aws.Bootstrap")
|
|
119
|
+
return {
|
|
120
|
+
asset: "sst-asset-bucket",
|
|
121
|
+
assetEcrRegistryId: "123456789012",
|
|
122
|
+
assetEcrUrl: "123456789012.dkr.ecr.us-east-1.amazonaws.com/sst-asset",
|
|
123
|
+
state: "sst-state-bucket",
|
|
124
|
+
appsyncHttp: "appsync.example.com",
|
|
125
|
+
appsyncRealtime: "appsync-realtime.example.com",
|
|
126
|
+
};
|
|
127
|
+
return new Promise(() => {});
|
|
128
|
+
}) as typeof rpc.call;
|
|
129
|
+
|
|
130
|
+
// @ts-ignore
|
|
131
|
+
global.$app = { name: input?.app ?? "app", stage: input?.stage ?? "test" };
|
|
132
|
+
// @ts-ignore
|
|
133
|
+
global.$util = pulumi;
|
|
134
|
+
// @ts-ignore
|
|
135
|
+
global.$interpolate = pulumi.interpolate;
|
|
136
|
+
// @ts-ignore
|
|
137
|
+
global.$jsonParse = pulumi.jsonParse;
|
|
138
|
+
// @ts-ignore
|
|
139
|
+
global.$jsonStringify = pulumi.jsonStringify;
|
|
140
|
+
// @ts-ignore
|
|
141
|
+
global.$dev = false;
|
|
142
|
+
// @ts-ignore
|
|
143
|
+
global.$cli = {
|
|
144
|
+
state: { version: {} },
|
|
145
|
+
paths: { root: input?.root ?? "/", work, platform },
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
pulumi.runtime.setMocks(
|
|
149
|
+
{
|
|
150
|
+
newResource(args: pulumi.runtime.MockResourceArgs) {
|
|
151
|
+
return {
|
|
152
|
+
id: `${args.name}_id`,
|
|
153
|
+
state: {
|
|
154
|
+
...args.inputs,
|
|
155
|
+
arn: `arn:aws:mock:us-east-1:123456789012:${args.name}`,
|
|
156
|
+
url: `https://mock.example.com/123456789012/${args.name}`,
|
|
157
|
+
...input?.state?.(args),
|
|
158
|
+
},
|
|
159
|
+
};
|
|
160
|
+
},
|
|
161
|
+
call(args: pulumi.runtime.MockCallArgs) {
|
|
162
|
+
return (
|
|
163
|
+
input?.call?.(args) ??
|
|
164
|
+
lookups[args.token]?.(args.inputs) ??
|
|
165
|
+
args.inputs
|
|
166
|
+
);
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
"project",
|
|
170
|
+
"stack",
|
|
171
|
+
false,
|
|
172
|
+
);
|
|
173
|
+
|
|
174
|
+
// The mocks above are not told about a resource's parent or options, so
|
|
175
|
+
// read them off the registration request itself.
|
|
176
|
+
const monitor = (pulumi.runtime as any).getMonitor() as any;
|
|
177
|
+
// Pulumi's mock makes a resource's URN from its type and its parent's. The
|
|
178
|
+
// engine uses the type of every component it's inside, and so does what
|
|
179
|
+
// works out old addresses here. Without this, what's inside a component
|
|
180
|
+
// inside a component inside a component has a parent nothing answers to.
|
|
181
|
+
monitor.newUrn = (parent: string, type: string, name: string) =>
|
|
182
|
+
urn(type, name, parent);
|
|
183
|
+
const registerResource = monitor.registerResource.bind(monitor);
|
|
184
|
+
monitor.registerResource = (req: any, callback: any) => {
|
|
185
|
+
activity++;
|
|
186
|
+
resources.push({
|
|
187
|
+
kind: "register",
|
|
188
|
+
type: req.getType(),
|
|
189
|
+
name: req.getName(),
|
|
190
|
+
parent: req.getParent(),
|
|
191
|
+
custom: req.getCustom(),
|
|
192
|
+
inputs: req.getObject()?.toJavaScript() ?? {},
|
|
193
|
+
options: compact({
|
|
194
|
+
protect: req.getProtect(),
|
|
195
|
+
retainOnDelete: req.getRetainondelete(),
|
|
196
|
+
deleteBeforeReplace: req.getDeletebeforereplace(),
|
|
197
|
+
ignoreChanges: req.getIgnorechangesList(),
|
|
198
|
+
replaceOnChanges: req.getReplaceonchangesList(),
|
|
199
|
+
additionalSecretOutputs: req.getAdditionalsecretoutputsList(),
|
|
200
|
+
aliases: [
|
|
201
|
+
...req.getAliasurnsList(),
|
|
202
|
+
...req.getAliasesList().map((a: any) => a.toObject()),
|
|
203
|
+
],
|
|
204
|
+
importId: req.getImportid(),
|
|
205
|
+
deletedWith: req.getDeletedwith(),
|
|
206
|
+
provider: req.getProvider(),
|
|
207
|
+
// A component is given its providers by package
|
|
208
|
+
providers: Object.fromEntries(req.getProvidersMap().toArray()),
|
|
209
|
+
dependencies: [...req.getDependenciesList()].sort(),
|
|
210
|
+
}),
|
|
211
|
+
});
|
|
212
|
+
return registerResource(req, callback);
|
|
213
|
+
};
|
|
214
|
+
const readResource = monitor.readResource.bind(monitor);
|
|
215
|
+
monitor.readResource = (req: any, callback: any) => {
|
|
216
|
+
activity++;
|
|
217
|
+
resources.push({
|
|
218
|
+
kind: "read",
|
|
219
|
+
type: req.getType(),
|
|
220
|
+
name: req.getName(),
|
|
221
|
+
parent: req.getParent(),
|
|
222
|
+
custom: true,
|
|
223
|
+
inputs: req.getProperties()?.toJavaScript() ?? {},
|
|
224
|
+
options: compact({ id: req.getId(), provider: req.getProvider() }),
|
|
225
|
+
});
|
|
226
|
+
return readResource(req, callback);
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
// What a component registers as its outputs, by its URN. The CLI reads
|
|
230
|
+
// some of them, like the command `sst dev` runs for a task.
|
|
231
|
+
const registered = new Map<string, Record<string, any>>();
|
|
232
|
+
const registerResourceOutputs = monitor.registerResourceOutputs.bind(monitor);
|
|
233
|
+
monitor.registerResourceOutputs = (req: any, callback: any) => {
|
|
234
|
+
activity++;
|
|
235
|
+
registered.set(req.getUrn(), req.getOutputs()?.toJavaScript() ?? {});
|
|
236
|
+
return registerResourceOutputs(req, callback);
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
const outputsOf = (r: RecordedResource): Record<string, any> =>
|
|
240
|
+
registered.get(urn(r.type, r.name, r.parent)) ?? {};
|
|
241
|
+
// What a deploy leaves in the state. Some things are created once per app,
|
|
242
|
+
// by whatever needs them first, so only the first of two deploys creates
|
|
243
|
+
// them: the key functions encrypt their links with, and a provider for
|
|
244
|
+
// another region.
|
|
245
|
+
const deployed = (graph: RecordedResource[]) =>
|
|
246
|
+
graph.filter(
|
|
247
|
+
(r) =>
|
|
248
|
+
r.name !== "LambdaEncryptionKey" &&
|
|
249
|
+
!r.type.startsWith("pulumi:providers:"),
|
|
250
|
+
);
|
|
251
|
+
|
|
252
|
+
return {
|
|
253
|
+
resources,
|
|
254
|
+
/** What the mock was created with. */
|
|
255
|
+
input,
|
|
256
|
+
/** What a deploy leaves in the state, of a `graph()`. */
|
|
257
|
+
deployed,
|
|
258
|
+
/** Empties the list, so each test sees only its own resources. */
|
|
259
|
+
reset() {
|
|
260
|
+
resources.length = 0;
|
|
261
|
+
registered.clear();
|
|
262
|
+
builds.clear();
|
|
263
|
+
},
|
|
264
|
+
/** The outputs a component registered, by the component's name. */
|
|
265
|
+
outputsOf(name: string) {
|
|
266
|
+
const component = resources.find((r) => r.name === name && !r.custom);
|
|
267
|
+
return component
|
|
268
|
+
? registered.get(urn(component.type, component.name, component.parent))
|
|
269
|
+
: undefined;
|
|
270
|
+
},
|
|
271
|
+
/**
|
|
272
|
+
* Lets pending `.apply()` chains and registrations finish: waits until
|
|
273
|
+
* nothing new has been registered for a few rounds, resources or a
|
|
274
|
+
* component's outputs, and nothing is being read or written on disk.
|
|
275
|
+
*/
|
|
276
|
+
async settle() {
|
|
277
|
+
// A function's code is zipped on disk, which takes real time, and more
|
|
278
|
+
// of it when other test files run alongside. What's registered after
|
|
279
|
+
// the zip would otherwise be missed.
|
|
280
|
+
const onDisk = () =>
|
|
281
|
+
process
|
|
282
|
+
.getActiveResourcesInfo()
|
|
283
|
+
.some((resource) => /^(FSReq|FileHandle|Zlib)/i.test(resource));
|
|
284
|
+
for (let quiet = 0, seen = -1; quiet < 3; ) {
|
|
285
|
+
for (let i = 0; i < 50; i++)
|
|
286
|
+
await new Promise((resolve) => setImmediate(resolve));
|
|
287
|
+
await new Promise((resolve) => setTimeout(resolve, 2));
|
|
288
|
+
quiet = activity === seen && !onDisk() ? quiet + 1 : 0;
|
|
289
|
+
seen = activity;
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
/** The value of an output, or of anything holding outputs. */
|
|
293
|
+
resolve<T>(value: T) {
|
|
294
|
+
return new Promise<any>((done) =>
|
|
295
|
+
pulumi.all([value]).apply(([v]) => done(v)),
|
|
296
|
+
);
|
|
297
|
+
},
|
|
298
|
+
/**
|
|
299
|
+
* Whether a resource depends on another, directly or through what it
|
|
300
|
+
* depends on. A deploy removes resources in the reverse of that order,
|
|
301
|
+
* so it's also whether the first is removed before the second.
|
|
302
|
+
*
|
|
303
|
+
* @param from The name of the resource.
|
|
304
|
+
* @param to The name of what it should depend on, or a pattern for it.
|
|
305
|
+
*/
|
|
306
|
+
dependsOn(from: string, to: string | RegExp) {
|
|
307
|
+
const start = resources.find((r) => r.name === from);
|
|
308
|
+
if (!start) throw new Error(`Nothing named "${from}" was created`);
|
|
309
|
+
const seen = new Set<string>();
|
|
310
|
+
const reaches = (r: RecordedResource | undefined): boolean =>
|
|
311
|
+
((r?.options.dependencies ?? []) as string[]).some((dependency) => {
|
|
312
|
+
if (seen.has(dependency)) return false;
|
|
313
|
+
seen.add(dependency);
|
|
314
|
+
const name = nameOf(dependency);
|
|
315
|
+
return (
|
|
316
|
+
(typeof to === "string" ? name === to : to.test(name)) ||
|
|
317
|
+
reaches(
|
|
318
|
+
resources.find(
|
|
319
|
+
(r) => urn(r.type, r.name, r.parent) === dependency,
|
|
320
|
+
),
|
|
321
|
+
)
|
|
322
|
+
);
|
|
323
|
+
});
|
|
324
|
+
return reaches(start);
|
|
325
|
+
},
|
|
326
|
+
/** The recorded graph in a stable order, ready to compare. */
|
|
327
|
+
graph() {
|
|
328
|
+
return resources
|
|
329
|
+
.map((r) => ({
|
|
330
|
+
...r,
|
|
331
|
+
inputs: stable(r.inputs),
|
|
332
|
+
...(r.custom ? {} : { outputs: outputsOf(r) }),
|
|
333
|
+
...(buildOf(r) ? { build: buildOf(r) } : {}),
|
|
334
|
+
}))
|
|
335
|
+
.sort((a, b) =>
|
|
336
|
+
`${a.type}::${a.name}`.localeCompare(`${b.type}::${b.name}`),
|
|
337
|
+
);
|
|
338
|
+
},
|
|
339
|
+
/**
|
|
340
|
+
* Deploys a component, then what replaces it, and checks the second
|
|
341
|
+
* against the first with `takeover()`: a V5 component against the one it
|
|
342
|
+
* takes over from, or a component against how it was before a change.
|
|
343
|
+
*
|
|
344
|
+
* @param original Creates the component that's deployed.
|
|
345
|
+
* @param v5 Creates the same thing with what replaces it.
|
|
346
|
+
*/
|
|
347
|
+
async takesOver(original: () => unknown, v5: () => unknown) {
|
|
348
|
+
this.reset();
|
|
349
|
+
original();
|
|
350
|
+
await this.settle();
|
|
351
|
+
const before = deployed(this.graph());
|
|
352
|
+
if (before.length === 0) throw new Error("The original created nothing");
|
|
353
|
+
|
|
354
|
+
this.reset();
|
|
355
|
+
v5();
|
|
356
|
+
await this.settle();
|
|
357
|
+
return this.takeover(before);
|
|
358
|
+
},
|
|
359
|
+
/**
|
|
360
|
+
* Checks that what's registered now takes over from an original graph:
|
|
361
|
+
* each original resource has to be claimed by one resource registered
|
|
362
|
+
* now, under the same address or through an alias, and with the same
|
|
363
|
+
* inputs.
|
|
364
|
+
*
|
|
365
|
+
* A resource claimed this way is kept on deploy. One that isn't claimed
|
|
366
|
+
* is deleted, and one whose inputs changed is updated or replaced.
|
|
367
|
+
* `unordered` lists what the original removed in order and this doesn't:
|
|
368
|
+
* "MyService before MyNamespace".
|
|
369
|
+
*
|
|
370
|
+
* @param original The `graph()` of what's deployed: taken a moment ago,
|
|
371
|
+
* or saved to a file and read back.
|
|
372
|
+
*/
|
|
373
|
+
takeover(original: RecordedResource[]) {
|
|
374
|
+
// Every address each resource answers to: its own, its aliases, and
|
|
375
|
+
// the ones it inherits from its parent's aliases, as Pulumi works
|
|
376
|
+
// them out.
|
|
377
|
+
const claims = new Map<string, Set<string>>();
|
|
378
|
+
for (const r of resources) {
|
|
379
|
+
const own = urn(r.type, r.name, r.parent);
|
|
380
|
+
const aliases = ((r.options.aliases ?? []) as any[]).map((alias) =>
|
|
381
|
+
typeof alias === "string"
|
|
382
|
+
? alias
|
|
383
|
+
: urn(
|
|
384
|
+
alias.spec.type || r.type,
|
|
385
|
+
alias.spec.name || r.name,
|
|
386
|
+
alias.spec.noparent ? "" : alias.spec.parenturn || r.parent,
|
|
387
|
+
),
|
|
388
|
+
);
|
|
389
|
+
// Under each address its parent had, the resource answers to its own
|
|
390
|
+
// name and type, and to the name and type of each of its aliases.
|
|
391
|
+
const inherited: string[] = [];
|
|
392
|
+
const parentName = nameOf(r.parent);
|
|
393
|
+
for (const parentAlias of claims.get(r.parent) ?? []) {
|
|
394
|
+
if (parentAlias === r.parent) continue;
|
|
395
|
+
for (const [type, name] of [
|
|
396
|
+
[r.type, r.name],
|
|
397
|
+
...aliases.map((alias) => [typeOf(alias), nameOf(alias)]),
|
|
398
|
+
]) {
|
|
399
|
+
const aliasName = name.startsWith(parentName)
|
|
400
|
+
? nameOf(parentAlias) + name.substring(parentName.length)
|
|
401
|
+
: name;
|
|
402
|
+
inherited.push(urn(type, aliasName, parentAlias));
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
claims.set(own, new Set([own, ...aliases, ...inherited]));
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
const unclaimed: string[] = [];
|
|
409
|
+
const pairs: [RecordedResource, RecordedResource][] = [];
|
|
410
|
+
for (const before of original) {
|
|
411
|
+
const address = urn(before.type, before.name, before.parent);
|
|
412
|
+
const claimants = resources.filter((r) =>
|
|
413
|
+
claims.get(urn(r.type, r.name, r.parent))!.has(address),
|
|
414
|
+
);
|
|
415
|
+
if (claimants.length > 1)
|
|
416
|
+
throw new Error(
|
|
417
|
+
`${before.name} is claimed by ${claimants
|
|
418
|
+
.map((r) => r.name)
|
|
419
|
+
.join(" and ")}`,
|
|
420
|
+
);
|
|
421
|
+
if (claimants.length === 0)
|
|
422
|
+
unclaimed.push(`${before.type}::${before.name}`);
|
|
423
|
+
else pairs.push([before, claimants[0]]);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// Mock ids and ARNs are made from resource names, so write the names
|
|
427
|
+
// used now as the original ones before comparing inputs.
|
|
428
|
+
const renames = pairs
|
|
429
|
+
.filter(([before, now]) => before.name !== now.name)
|
|
430
|
+
.map(([before, now]) => [now.name, before.name] as const)
|
|
431
|
+
.sort((a, b) => b[0].length - a[0].length);
|
|
432
|
+
// A resource keeps the deployed value of an input it ignores changes
|
|
433
|
+
// to, like a generated name. Whatever reads that value from it gets
|
|
434
|
+
// the deployed one too.
|
|
435
|
+
const keptValues = pairs
|
|
436
|
+
.flatMap(([before, now]) =>
|
|
437
|
+
((now.options.ignoreChanges ?? []) as string[]).map(
|
|
438
|
+
(key) => [now.inputs[key], before.inputs[key]] as const,
|
|
439
|
+
),
|
|
440
|
+
)
|
|
441
|
+
.filter(
|
|
442
|
+
([now, before]) =>
|
|
443
|
+
typeof now === "string" &&
|
|
444
|
+
typeof before === "string" &&
|
|
445
|
+
now !== before,
|
|
446
|
+
)
|
|
447
|
+
.sort((a, b) => b[0].length - a[0].length);
|
|
448
|
+
// A resource can't read its own id or ARN, so its own name in its
|
|
449
|
+
// inputs is the name SST gave it, and that one is left as it is: a
|
|
450
|
+
// `Name` tag made from a new logical name is a real change.
|
|
451
|
+
const asOriginal = (own: string) => (value: string) =>
|
|
452
|
+
renames
|
|
453
|
+
.filter(([now]) => now !== own)
|
|
454
|
+
.reduce(
|
|
455
|
+
(v, [now, before]) =>
|
|
456
|
+
v.replace(new RegExp(`\\b${now}(?=\\b|_)`, "g"), before),
|
|
457
|
+
keptValues.reduce(
|
|
458
|
+
(v, [now, before]) => v.split(now).join(before),
|
|
459
|
+
value,
|
|
460
|
+
),
|
|
461
|
+
);
|
|
462
|
+
// An input the resource ignores changes to, like a generated name,
|
|
463
|
+
// keeps its deployed value.
|
|
464
|
+
const kept = (r: RecordedResource, ignore: string[]) =>
|
|
465
|
+
Object.fromEntries(
|
|
466
|
+
Object.entries(r.inputs).filter(([key]) => !ignore.includes(key)),
|
|
467
|
+
);
|
|
468
|
+
const changed = pairs
|
|
469
|
+
.map(([before, now]) => {
|
|
470
|
+
// A resource that's looked up isn't written to. What matters is
|
|
471
|
+
// that the same one is looked up.
|
|
472
|
+
if (before.kind === "read" || now.kind === "read")
|
|
473
|
+
return {
|
|
474
|
+
name: before.name,
|
|
475
|
+
original: { kind: before.kind, id: before.options.id },
|
|
476
|
+
now: { kind: now.kind, id: now.options.id },
|
|
477
|
+
};
|
|
478
|
+
const ignore: string[] = now.options.ignoreChanges ?? [];
|
|
479
|
+
// What a component registers as its outputs is kept in the state
|
|
480
|
+
// too, and the CLI reads it
|
|
481
|
+
const registers = !before.custom || !now.custom;
|
|
482
|
+
// What a function's code is built from ends up in the code
|
|
483
|
+
const builds = before.build || buildOf(now);
|
|
484
|
+
return {
|
|
485
|
+
name: before.name,
|
|
486
|
+
original: {
|
|
487
|
+
...stable(kept(before, ignore)),
|
|
488
|
+
...deployOptions(before),
|
|
489
|
+
...(registers ? { outputs: stable(before.outputs ?? {}) } : {}),
|
|
490
|
+
...(builds ? { build: stable(before.build ?? {}) } : {}),
|
|
491
|
+
},
|
|
492
|
+
now: {
|
|
493
|
+
...stable(kept(now, ignore), asOriginal(now.name)),
|
|
494
|
+
...deployOptions(now),
|
|
495
|
+
...(registers
|
|
496
|
+
? { outputs: stable(outputsOf(now), asOriginal(now.name)) }
|
|
497
|
+
: {}),
|
|
498
|
+
...(builds
|
|
499
|
+
? { build: stable(buildOf(now) ?? {}, asOriginal(now.name)) }
|
|
500
|
+
: {}),
|
|
501
|
+
},
|
|
502
|
+
};
|
|
503
|
+
})
|
|
504
|
+
.filter(
|
|
505
|
+
(pair) => JSON.stringify(pair.original) !== JSON.stringify(pair.now),
|
|
506
|
+
)
|
|
507
|
+
// Which inputs differ, to say what a deploy would update
|
|
508
|
+
.map((pair) => ({
|
|
509
|
+
...pair,
|
|
510
|
+
fields: Object.keys({ ...pair.original, ...pair.now }).filter(
|
|
511
|
+
(key) =>
|
|
512
|
+
JSON.stringify((pair.original as any)[key]) !==
|
|
513
|
+
JSON.stringify((pair.now as any)[key]),
|
|
514
|
+
),
|
|
515
|
+
}));
|
|
516
|
+
|
|
517
|
+
// A deploy removes resources in the reverse of the order they depend
|
|
518
|
+
// on each other, so a dependency is also a promise about teardown:
|
|
519
|
+
// what depends on a resource is removed before it. Each one the
|
|
520
|
+
// original graph had has to be there now, directly or through
|
|
521
|
+
// something in between. Without it the two are removed in any order,
|
|
522
|
+
// and AWS refuses to delete what's still in use.
|
|
523
|
+
const dependsOn = (graph: RecordedResource[]) => {
|
|
524
|
+
const byUrn = new Map(
|
|
525
|
+
graph.map((r) => [urn(r.type, r.name, r.parent), r] as const),
|
|
526
|
+
);
|
|
527
|
+
return (from: RecordedResource, to: RecordedResource) => {
|
|
528
|
+
const target = urn(to.type, to.name, to.parent);
|
|
529
|
+
const seen = new Set<RecordedResource>();
|
|
530
|
+
const reaches = (r: RecordedResource | undefined): boolean => {
|
|
531
|
+
if (!r || seen.has(r)) return false;
|
|
532
|
+
seen.add(r);
|
|
533
|
+
return ((r.options.dependencies ?? []) as string[]).some(
|
|
534
|
+
(dependency) =>
|
|
535
|
+
dependency === target || reaches(byUrn.get(dependency)),
|
|
536
|
+
);
|
|
537
|
+
};
|
|
538
|
+
return reaches(from);
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
const before = new Map(
|
|
542
|
+
pairs.map(([before, now]) => [
|
|
543
|
+
urn(before.type, before.name, before.parent),
|
|
544
|
+
now,
|
|
545
|
+
]),
|
|
546
|
+
);
|
|
547
|
+
const ordered = dependsOn(resources);
|
|
548
|
+
const unordered = pairs.flatMap(([original, now]) =>
|
|
549
|
+
((original.options.dependencies ?? []) as string[])
|
|
550
|
+
.map((dependency) => before.get(dependency))
|
|
551
|
+
.filter(
|
|
552
|
+
(dependency): dependency is RecordedResource =>
|
|
553
|
+
!!dependency && dependency !== now && !ordered(now, dependency),
|
|
554
|
+
)
|
|
555
|
+
.map((dependency) => `${now.name} before ${dependency.name}`),
|
|
556
|
+
);
|
|
557
|
+
|
|
558
|
+
return { unclaimed, changed, unordered };
|
|
559
|
+
},
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
// The options that change what a deploy does to a resource that's already
|
|
564
|
+
// there, as `options.<name>` next to its inputs. Losing `ignoreChanges` on a
|
|
565
|
+
// database's engine version, or `retainOnDelete` on a bucket, is as much a
|
|
566
|
+
// change as a different input.
|
|
567
|
+
function deployOptions(r: RecordedResource) {
|
|
568
|
+
const options = [
|
|
569
|
+
"protect",
|
|
570
|
+
"retainOnDelete",
|
|
571
|
+
"deleteBeforeReplace",
|
|
572
|
+
"ignoreChanges",
|
|
573
|
+
"replaceOnChanges",
|
|
574
|
+
"additionalSecretOutputs",
|
|
575
|
+
"provider",
|
|
576
|
+
];
|
|
577
|
+
return Object.fromEntries(
|
|
578
|
+
options
|
|
579
|
+
.filter((option) => r.options[option] !== undefined)
|
|
580
|
+
.map((option) => {
|
|
581
|
+
const value = r.options[option];
|
|
582
|
+
return [
|
|
583
|
+
`options.${option}`,
|
|
584
|
+
Array.isArray(value) ? [...value].sort() : value,
|
|
585
|
+
];
|
|
586
|
+
}),
|
|
587
|
+
);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
// What the lookups nearly every component makes return. Without these a
|
|
591
|
+
// region is `undefined`, and an IAM policy is empty whatever it's given, so
|
|
592
|
+
// two policies would always compare as the same.
|
|
593
|
+
const lookups: Record<string, (inputs: any) => Record<string, any>> = {
|
|
594
|
+
"aws:index/getRegion:getRegion": () => ({
|
|
595
|
+
name: "us-east-1",
|
|
596
|
+
region: "us-east-1",
|
|
597
|
+
}),
|
|
598
|
+
"aws:index/getPartition:getPartition": () => ({ partition: "aws" }),
|
|
599
|
+
"aws:index/getCallerIdentity:getCallerIdentity": () => ({
|
|
600
|
+
accountId: "123456789012",
|
|
601
|
+
}),
|
|
602
|
+
"aws:iam/getPolicyDocument:getPolicyDocument": (inputs) => ({
|
|
603
|
+
...inputs,
|
|
604
|
+
json: JSON.stringify(inputs),
|
|
605
|
+
}),
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
function urn(type: string, name: string, parent: string) {
|
|
609
|
+
if (!parent) return `urn:pulumi:stack::project::${type}::${name}`;
|
|
610
|
+
const [prefix, project, types] = parent.split("::");
|
|
611
|
+
return `${prefix}::${project}::${types}$${type}::${name}`;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
function nameOf(urn: string) {
|
|
615
|
+
return urn.substring(urn.lastIndexOf("::") + 2);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
// A resource's own type: the last in the chain of its parents' types
|
|
619
|
+
function typeOf(urn: string) {
|
|
620
|
+
return urn.split("::")[2].split("$").at(-1)!;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
function compact(options: Record<string, any>) {
|
|
624
|
+
return Object.fromEntries(
|
|
625
|
+
Object.entries(options).filter(([, v]) =>
|
|
626
|
+
Array.isArray(v)
|
|
627
|
+
? v.length > 0
|
|
628
|
+
: v && typeof v === "object"
|
|
629
|
+
? Object.keys(v).length > 0
|
|
630
|
+
: v !== "" && v !== false && v != null,
|
|
631
|
+
),
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
// Sorts keys so two sets of inputs compare, whatever order they were given in.
|
|
636
|
+
function stable(value: any, rename: (v: string) => string = (v) => v): any {
|
|
637
|
+
if (typeof value === "string") return rename(value);
|
|
638
|
+
if (Array.isArray(value)) return value.map((v) => stable(v, rename));
|
|
639
|
+
if (value && typeof value === "object")
|
|
640
|
+
return Object.fromEntries(
|
|
641
|
+
Object.keys(value)
|
|
642
|
+
.sort()
|
|
643
|
+
.map((k) => [k, stable(value[k], rename)]),
|
|
644
|
+
);
|
|
645
|
+
return value;
|
|
646
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { fileURLToPath } from "url";
|
|
2
|
+
|
|
3
|
+
const platform = fileURLToPath(new URL("../../", import.meta.url));
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* What a vitest config needs to test a component the way an app loads it.
|
|
7
|
+
* `sst/components`, its groups like `sst/components/aws`, `sst/testing` and
|
|
8
|
+
* the providers come from the app's platform, in `.sst/platform`, so a test
|
|
9
|
+
* and a deploy use the same ones.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts title="vitest.config.ts"
|
|
13
|
+
* import { defineConfig } from "vitest/config";
|
|
14
|
+
* import { alias } from "./.sst/platform/src/testing/vitest";
|
|
15
|
+
*
|
|
16
|
+
* export default defineConfig({ resolve: { alias } });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export const alias = [
|
|
20
|
+
// What SST's components share, and the components of each provider. The
|
|
21
|
+
// groups are named here rather than read from groups.ts, which would bring
|
|
22
|
+
// every component into the vitest config's bundle. A test checks they agree.
|
|
23
|
+
{
|
|
24
|
+
find: /^sst\/components$/,
|
|
25
|
+
replacement: `${platform}src/components/core.ts`,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
find: /^sst\/components\/(aws|cloudflare|vercel)$/,
|
|
29
|
+
replacement: `${platform}src/components/$1/index.ts`,
|
|
30
|
+
},
|
|
31
|
+
{ find: /^sst\/testing$/, replacement: `${platform}src/testing/index.ts` },
|
|
32
|
+
{
|
|
33
|
+
find: /^(@pulumi|@pulumiverse|@sst-provider)\/(.*)$/,
|
|
34
|
+
replacement: `${platform}node_modules/$1/$2`,
|
|
35
|
+
},
|
|
36
|
+
];
|