@monorise/sst 1.0.0-dev.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/dist/.sst/platform/src/components/aws/analog.d.ts +423 -0
- package/dist/.sst/platform/src/components/aws/analog.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/analog.js +118 -0
- package/dist/.sst/platform/src/components/aws/analog.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts +74 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket-route.js +110 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket.d.ts +542 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket.js +409 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-api-key.d.ts +48 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-api-key.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-api-key.js +55 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-api-key.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-authorizer.d.ts +55 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-authorizer.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-authorizer.js +110 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-authorizer.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-base-route.d.ts +36 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-base-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-base-route.js +34 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-base-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-integration-route.d.ts +39 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-integration-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-integration-route.js +49 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-integration-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts +53 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-lambda-route.js +85 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-lambda-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-usage-plan.d.ts +53 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-usage-plan.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-usage-plan.js +66 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-usage-plan.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1.d.ts +1002 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1.js +749 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-authorizer.d.ts +54 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-authorizer.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-authorizer.js +98 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-authorizer.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-base-route.d.ts +28 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-base-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-base-route.js +28 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-base-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts +59 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-lambda-route.js +84 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-lambda-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-private-route.d.ts +54 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-private-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-private-route.js +55 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-private-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-url-route.d.ts +44 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-url-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-url-route.js +53 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-url-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2.d.ts +933 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2.js +648 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync-data-source.d.ts +52 -0
- package/dist/.sst/platform/src/components/aws/app-sync-data-source.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync-data-source.js +208 -0
- package/dist/.sst/platform/src/components/aws/app-sync-data-source.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync-function.d.ts +33 -0
- package/dist/.sst/platform/src/components/aws/app-sync-function.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync-function.js +52 -0
- package/dist/.sst/platform/src/components/aws/app-sync-function.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync-resolver.d.ts +41 -0
- package/dist/.sst/platform/src/components/aws/app-sync-resolver.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync-resolver.js +70 -0
- package/dist/.sst/platform/src/components/aws/app-sync-resolver.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync.d.ts +638 -0
- package/dist/.sst/platform/src/components/aws/app-sync.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync.js +330 -0
- package/dist/.sst/platform/src/components/aws/app-sync.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/astro.d.ts +421 -0
- package/dist/.sst/platform/src/components/aws/astro.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/astro.js +156 -0
- package/dist/.sst/platform/src/components/aws/astro.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/aurora.d.ts +702 -0
- package/dist/.sst/platform/src/components/aws/aurora.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/aurora.js +678 -0
- package/dist/.sst/platform/src/components/aws/aurora.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/auth-v1.d.ts +26 -0
- package/dist/.sst/platform/src/components/aws/auth-v1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/auth-v1.js +36 -0
- package/dist/.sst/platform/src/components/aws/auth-v1.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/auth.d.ts +260 -0
- package/dist/.sst/platform/src/components/aws/auth.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/auth.js +209 -0
- package/dist/.sst/platform/src/components/aws/auth.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts +61 -0
- package/dist/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-lambda-subscriber.js +99 -0
- package/dist/.sst/platform/src/components/aws/bucket-lambda-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-notification.d.ts +47 -0
- package/dist/.sst/platform/src/components/aws/bucket-notification.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-notification.js +170 -0
- package/dist/.sst/platform/src/components/aws/bucket-notification.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-queue-subscriber.d.ts +55 -0
- package/dist/.sst/platform/src/components/aws/bucket-queue-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-queue-subscriber.js +77 -0
- package/dist/.sst/platform/src/components/aws/bucket-queue-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-topic-subscriber.d.ts +55 -0
- package/dist/.sst/platform/src/components/aws/bucket-topic-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-topic-subscriber.js +99 -0
- package/dist/.sst/platform/src/components/aws/bucket-topic-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket.d.ts +1115 -0
- package/dist/.sst/platform/src/components/aws/bucket.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket.js +754 -0
- package/dist/.sst/platform/src/components/aws/bucket.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus-base-subscriber.d.ts +20 -0
- package/dist/.sst/platform/src/components/aws/bus-base-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus-base-subscriber.js +19 -0
- package/dist/.sst/platform/src/components/aws/bus-base-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts +49 -0
- package/dist/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus-lambda-subscriber.js +81 -0
- package/dist/.sst/platform/src/components/aws/bus-lambda-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus-queue-subscriber.d.ts +44 -0
- package/dist/.sst/platform/src/components/aws/bus-queue-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus-queue-subscriber.js +63 -0
- package/dist/.sst/platform/src/components/aws/bus-queue-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus.d.ts +403 -0
- package/dist/.sst/platform/src/components/aws/bus.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus.js +350 -0
- package/dist/.sst/platform/src/components/aws/bus.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cdn.d.ts +299 -0
- package/dist/.sst/platform/src/components/aws/cdn.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cdn.js +234 -0
- package/dist/.sst/platform/src/components/aws/cdn.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cluster-v1.d.ts +882 -0
- package/dist/.sst/platform/src/components/aws/cluster-v1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cluster-v1.js +245 -0
- package/dist/.sst/platform/src/components/aws/cluster-v1.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cluster.d.ts +308 -0
- package/dist/.sst/platform/src/components/aws/cluster.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cluster.js +321 -0
- package/dist/.sst/platform/src/components/aws/cluster.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-pool.d.ts +194 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-pool.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-pool.js +263 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-pool.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-provider.d.ts +38 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-provider.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-provider.js +67 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-provider.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool-client.d.ts +50 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool-client.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool-client.js +81 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool-client.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool.d.ts +599 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool.js +368 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cron.d.ts +250 -0
- package/dist/.sst/platform/src/components/aws/cron.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cron.js +200 -0
- package/dist/.sst/platform/src/components/aws/cron.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/dns-validated-certificate.d.ts +27 -0
- package/dist/.sst/platform/src/components/aws/dns-validated-certificate.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/dns-validated-certificate.js +55 -0
- package/dist/.sst/platform/src/components/aws/dns-validated-certificate.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/dns.d.ts +94 -0
- package/dist/.sst/platform/src/components/aws/dns.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/dns.js +121 -0
- package/dist/.sst/platform/src/components/aws/dns.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts +55 -0
- package/dist/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/dynamo-lambda-subscriber.js +79 -0
- package/dist/.sst/platform/src/components/aws/dynamo-lambda-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/dynamo.d.ts +569 -0
- package/dist/.sst/platform/src/components/aws/dynamo.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/dynamo.js +291 -0
- package/dist/.sst/platform/src/components/aws/dynamo.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/efs.d.ts +217 -0
- package/dist/.sst/platform/src/components/aws/efs.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/efs.js +241 -0
- package/dist/.sst/platform/src/components/aws/efs.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/email.d.ts +291 -0
- package/dist/.sst/platform/src/components/aws/email.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/email.js +276 -0
- package/dist/.sst/platform/src/components/aws/email.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/fargate.d.ts +769 -0
- package/dist/.sst/platform/src/components/aws/fargate.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/fargate.js +434 -0
- package/dist/.sst/platform/src/components/aws/fargate.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/function.d.ts +1631 -0
- package/dist/.sst/platform/src/components/aws/function.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/function.js +1041 -0
- package/dist/.sst/platform/src/components/aws/function.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigateway-account.d.ts +3 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigateway-account.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigateway-account.js +31 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigateway-account.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.d.ts +144 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.js +2 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/arn.d.ts +35 -0
- package/dist/.sst/platform/src/components/aws/helpers/arn.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/arn.js +86 -0
- package/dist/.sst/platform/src/components/aws/helpers/arn.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/bootstrap.d.ts +13 -0
- package/dist/.sst/platform/src/components/aws/helpers/bootstrap.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/bootstrap.js +7 -0
- package/dist/.sst/platform/src/components/aws/helpers/bootstrap.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/container-builder.d.ts +4 -0
- package/dist/.sst/platform/src/components/aws/helpers/container-builder.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/container-builder.js +27 -0
- package/dist/.sst/platform/src/components/aws/helpers/container-builder.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/function-builder.d.ts +10 -0
- package/dist/.sst/platform/src/components/aws/helpers/function-builder.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/function-builder.js +51 -0
- package/dist/.sst/platform/src/components/aws/helpers/function-builder.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/provider.d.ts +3 -0
- package/dist/.sst/platform/src/components/aws/helpers/provider.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/provider.js +34 -0
- package/dist/.sst/platform/src/components/aws/helpers/provider.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/quota.d.ts +7 -0
- package/dist/.sst/platform/src/components/aws/helpers/quota.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/quota.js +20 -0
- package/dist/.sst/platform/src/components/aws/helpers/quota.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/site-builder.d.ts +4 -0
- package/dist/.sst/platform/src/components/aws/helpers/site-builder.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/site-builder.js +36 -0
- package/dist/.sst/platform/src/components/aws/helpers/site-builder.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/subscriber.d.ts +6 -0
- package/dist/.sst/platform/src/components/aws/helpers/subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/subscriber.js +13 -0
- package/dist/.sst/platform/src/components/aws/helpers/subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/https-redirect.d.ts +38 -0
- package/dist/.sst/platform/src/components/aws/https-redirect.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/https-redirect.js +124 -0
- package/dist/.sst/platform/src/components/aws/https-redirect.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/iam-edit.d.ts +39 -0
- package/dist/.sst/platform/src/components/aws/iam-edit.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/iam-edit.js +40 -0
- package/dist/.sst/platform/src/components/aws/iam-edit.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/index.d.ts +48 -0
- package/dist/.sst/platform/src/components/aws/index.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/index.js +49 -0
- package/dist/.sst/platform/src/components/aws/index.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.d.ts +48 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.js +82 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream.d.ts +249 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream.js +134 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/linkable.d.ts +17 -0
- package/dist/.sst/platform/src/components/aws/linkable.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/linkable.js +25 -0
- package/dist/.sst/platform/src/components/aws/linkable.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/logging.d.ts +26 -0
- package/dist/.sst/platform/src/components/aws/logging.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/logging.js +26 -0
- package/dist/.sst/platform/src/components/aws/logging.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/mysql.d.ts +496 -0
- package/dist/.sst/platform/src/components/aws/mysql.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/mysql.js +514 -0
- package/dist/.sst/platform/src/components/aws/mysql.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/nextjs.d.ts +517 -0
- package/dist/.sst/platform/src/components/aws/nextjs.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/nextjs.js +444 -0
- package/dist/.sst/platform/src/components/aws/nextjs.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/nuxt.d.ts +495 -0
- package/dist/.sst/platform/src/components/aws/nuxt.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/nuxt.js +113 -0
- package/dist/.sst/platform/src/components/aws/nuxt.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/open-search.d.ts +295 -0
- package/dist/.sst/platform/src/components/aws/open-search.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/open-search.js +365 -0
- package/dist/.sst/platform/src/components/aws/open-search.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/opencontrol.d.ts +165 -0
- package/dist/.sst/platform/src/components/aws/opencontrol.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/opencontrol.js +164 -0
- package/dist/.sst/platform/src/components/aws/opencontrol.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/permission.d.ts +27 -0
- package/dist/.sst/platform/src/components/aws/permission.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/permission.js +19 -0
- package/dist/.sst/platform/src/components/aws/permission.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/postgres-v1.d.ts +317 -0
- package/dist/.sst/platform/src/components/aws/postgres-v1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/postgres-v1.js +304 -0
- package/dist/.sst/platform/src/components/aws/postgres-v1.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/postgres.d.ts +500 -0
- package/dist/.sst/platform/src/components/aws/postgres.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/postgres.js +532 -0
- package/dist/.sst/platform/src/components/aws/postgres.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/bucket-files.d.ts +18 -0
- package/dist/.sst/platform/src/components/aws/providers/bucket-files.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/bucket-files.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/bucket-files.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.d.ts +13 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-invalidation.d.ts +11 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-invalidation.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-invalidation.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-invalidation.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/function-environment-update.d.ts +29 -0
- package/dist/.sst/platform/src/components/aws/providers/function-environment-update.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/function-environment-update.js +18 -0
- package/dist/.sst/platform/src/components/aws/providers/function-environment-update.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/hosted-zone-lookup.d.ts +11 -0
- package/dist/.sst/platform/src/components/aws/providers/hosted-zone-lookup.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/hosted-zone-lookup.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/hosted-zone-lookup.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-keys.d.ts +11 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-keys.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-keys.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-keys.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-routes-update.d.ts +11 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-routes-update.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-routes-update.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-routes-update.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/origin-access-control.d.ts +8 -0
- package/dist/.sst/platform/src/components/aws/providers/origin-access-control.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/origin-access-control.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/origin-access-control.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/rds-role-lookup.d.ts +8 -0
- package/dist/.sst/platform/src/components/aws/providers/rds-role-lookup.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/rds-role-lookup.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/rds-role-lookup.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/vector-table.d.ts +12 -0
- package/dist/.sst/platform/src/components/aws/providers/vector-table.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/vector-table.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/vector-table.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts +48 -0
- package/dist/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/queue-lambda-subscriber.js +81 -0
- package/dist/.sst/platform/src/components/aws/queue-lambda-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/queue.d.ts +485 -0
- package/dist/.sst/platform/src/components/aws/queue.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/queue.js +322 -0
- package/dist/.sst/platform/src/components/aws/queue.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/react.d.ts +416 -0
- package/dist/.sst/platform/src/components/aws/react.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/react.js +157 -0
- package/dist/.sst/platform/src/components/aws/react.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts +53 -0
- package/dist/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/realtime-lambda-subscriber.js +78 -0
- package/dist/.sst/platform/src/components/aws/realtime-lambda-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/realtime.d.ts +226 -0
- package/dist/.sst/platform/src/components/aws/realtime.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/realtime.js +221 -0
- package/dist/.sst/platform/src/components/aws/realtime.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/redis-v1.d.ts +338 -0
- package/dist/.sst/platform/src/components/aws/redis-v1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/redis-v1.js +335 -0
- package/dist/.sst/platform/src/components/aws/redis-v1.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/redis.d.ts +364 -0
- package/dist/.sst/platform/src/components/aws/redis.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/redis.js +382 -0
- package/dist/.sst/platform/src/components/aws/redis.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/remix.d.ts +423 -0
- package/dist/.sst/platform/src/components/aws/remix.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/remix.js +212 -0
- package/dist/.sst/platform/src/components/aws/remix.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/router-base-route.d.ts +28 -0
- package/dist/.sst/platform/src/components/aws/router-base-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/router-base-route.js +40 -0
- package/dist/.sst/platform/src/components/aws/router-base-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/router-bucket-route.d.ts +29 -0
- package/dist/.sst/platform/src/components/aws/router-bucket-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/router-bucket-route.js +40 -0
- package/dist/.sst/platform/src/components/aws/router-bucket-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/router-url-route.d.ts +28 -0
- package/dist/.sst/platform/src/components/aws/router-url-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/router-url-route.js +51 -0
- package/dist/.sst/platform/src/components/aws/router-url-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/router.d.ts +1266 -0
- package/dist/.sst/platform/src/components/aws/router.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/router.js +1156 -0
- package/dist/.sst/platform/src/components/aws/router.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/service-v1.d.ts +78 -0
- package/dist/.sst/platform/src/components/aws/service-v1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/service-v1.js +606 -0
- package/dist/.sst/platform/src/components/aws/service-v1.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/service.d.ts +1599 -0
- package/dist/.sst/platform/src/components/aws/service.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/service.js +924 -0
- package/dist/.sst/platform/src/components/aws/service.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts +53 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.js +75 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-queue-subscriber.d.ts +55 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-queue-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-queue-subscriber.js +59 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-queue-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/sns-topic.d.ts +389 -0
- package/dist/.sst/platform/src/components/aws/sns-topic.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/sns-topic.js +233 -0
- package/dist/.sst/platform/src/components/aws/sns-topic.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/solid-start.d.ts +414 -0
- package/dist/.sst/platform/src/components/aws/solid-start.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/solid-start.js +120 -0
- package/dist/.sst/platform/src/components/aws/solid-start.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/ssr-site.d.ts +494 -0
- package/dist/.sst/platform/src/components/aws/ssr-site.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/ssr-site.js +792 -0
- package/dist/.sst/platform/src/components/aws/ssr-site.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/static-site.d.ts +736 -0
- package/dist/.sst/platform/src/components/aws/static-site.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/static-site.js +583 -0
- package/dist/.sst/platform/src/components/aws/static-site.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/choice.d.ts +73 -0
- package/dist/.sst/platform/src/components/aws/step-functions/choice.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/choice.js +98 -0
- package/dist/.sst/platform/src/components/aws/step-functions/choice.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/fail.d.ts +63 -0
- package/dist/.sst/platform/src/components/aws/step-functions/fail.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/fail.js +25 -0
- package/dist/.sst/platform/src/components/aws/step-functions/fail.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/map.d.ts +236 -0
- package/dist/.sst/platform/src/components/aws/step-functions/map.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/map.js +108 -0
- package/dist/.sst/platform/src/components/aws/step-functions/map.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/parallel.d.ts +127 -0
- package/dist/.sst/platform/src/components/aws/step-functions/parallel.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/parallel.js +129 -0
- package/dist/.sst/platform/src/components/aws/step-functions/parallel.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/pass.d.ts +39 -0
- package/dist/.sst/platform/src/components/aws/step-functions/pass.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/pass.js +41 -0
- package/dist/.sst/platform/src/components/aws/step-functions/pass.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/state.d.ts +197 -0
- package/dist/.sst/platform/src/components/aws/step-functions/state.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/state.js +134 -0
- package/dist/.sst/platform/src/components/aws/step-functions/state.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/succeed.d.ts +26 -0
- package/dist/.sst/platform/src/components/aws/step-functions/succeed.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/succeed.js +25 -0
- package/dist/.sst/platform/src/components/aws/step-functions/succeed.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/task.d.ts +477 -0
- package/dist/.sst/platform/src/components/aws/step-functions/task.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/task.js +116 -0
- package/dist/.sst/platform/src/components/aws/step-functions/task.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/wait.d.ts +91 -0
- package/dist/.sst/platform/src/components/aws/step-functions/wait.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/wait.js +46 -0
- package/dist/.sst/platform/src/components/aws/step-functions/wait.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions.d.ts +473 -0
- package/dist/.sst/platform/src/components/aws/step-functions.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions.js +576 -0
- package/dist/.sst/platform/src/components/aws/step-functions.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/svelte-kit.d.ts +417 -0
- package/dist/.sst/platform/src/components/aws/svelte-kit.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/svelte-kit.js +144 -0
- package/dist/.sst/platform/src/components/aws/svelte-kit.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/tan-stack-start.d.ts +354 -0
- package/dist/.sst/platform/src/components/aws/tan-stack-start.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/tan-stack-start.js +143 -0
- package/dist/.sst/platform/src/components/aws/tan-stack-start.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/task.d.ts +322 -0
- package/dist/.sst/platform/src/components/aws/task.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/task.js +311 -0
- package/dist/.sst/platform/src/components/aws/task.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/vector.d.ts +150 -0
- package/dist/.sst/platform/src/components/aws/vector.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/vector.js +224 -0
- package/dist/.sst/platform/src/components/aws/vector.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/vpc-v1.d.ts +208 -0
- package/dist/.sst/platform/src/components/aws/vpc-v1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/vpc-v1.js +355 -0
- package/dist/.sst/platform/src/components/aws/vpc-v1.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/vpc.d.ts +444 -0
- package/dist/.sst/platform/src/components/aws/vpc.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/vpc.js +834 -0
- package/dist/.sst/platform/src/components/aws/vpc.js.map +1 -0
- package/dist/.sst/platform/src/components/base/base-site.d.ts +53 -0
- package/dist/.sst/platform/src/components/base/base-site.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/base/base-site.js +47 -0
- package/dist/.sst/platform/src/components/base/base-site.js.map +1 -0
- package/dist/.sst/platform/src/components/base/base-ssr-site.d.ts +111 -0
- package/dist/.sst/platform/src/components/base/base-ssr-site.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/base/base-ssr-site.js +72 -0
- package/dist/.sst/platform/src/components/base/base-ssr-site.js.map +1 -0
- package/dist/.sst/platform/src/components/base/base-static-site.d.ts +199 -0
- package/dist/.sst/platform/src/components/base/base-static-site.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/base/base-static-site.js +87 -0
- package/dist/.sst/platform/src/components/base/base-static-site.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/account-id.d.ts +2 -0
- package/dist/.sst/platform/src/components/cloudflare/account-id.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/account-id.js +2 -0
- package/dist/.sst/platform/src/components/cloudflare/account-id.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/auth.d.ts +22 -0
- package/dist/.sst/platform/src/components/cloudflare/auth.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/auth.js +37 -0
- package/dist/.sst/platform/src/components/cloudflare/auth.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/binding.d.ts +69 -0
- package/dist/.sst/platform/src/components/cloudflare/binding.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/binding.js +25 -0
- package/dist/.sst/platform/src/components/cloudflare/binding.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/bucket.d.ts +101 -0
- package/dist/.sst/platform/src/components/cloudflare/bucket.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/bucket.js +98 -0
- package/dist/.sst/platform/src/components/cloudflare/bucket.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/cron.d.ts +121 -0
- package/dist/.sst/platform/src/components/cloudflare/cron.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/cron.js +86 -0
- package/dist/.sst/platform/src/components/cloudflare/cron.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/d1.d.ts +107 -0
- package/dist/.sst/platform/src/components/cloudflare/d1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/d1.js +104 -0
- package/dist/.sst/platform/src/components/cloudflare/d1.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/dns.d.ts +94 -0
- package/dist/.sst/platform/src/components/cloudflare/dns.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/dns.js +138 -0
- package/dist/.sst/platform/src/components/cloudflare/dns.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/fetch.d.ts +19 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/fetch.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/fetch.js +39 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/fetch.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/worker-builder.d.ts +10 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/worker-builder.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/worker-builder.js +25 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/worker-builder.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/index.d.ts +13 -0
- package/dist/.sst/platform/src/components/cloudflare/index.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/index.js +13 -0
- package/dist/.sst/platform/src/components/cloudflare/index.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/kv.d.ts +101 -0
- package/dist/.sst/platform/src/components/cloudflare/kv.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/kv.js +98 -0
- package/dist/.sst/platform/src/components/cloudflare/kv.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/dns-record.d.ts +20 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/dns-record.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/dns-record.js +11 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/dns-record.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/kv-data.d.ts +23 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/kv-data.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/kv-data.js +63 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/kv-data.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/worker-url.d.ts +22 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/worker-url.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/worker-url.js +83 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/worker-url.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/zone-lookup.d.ts +22 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/zone-lookup.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/zone-lookup.js +54 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/zone-lookup.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/queue.d.ts +60 -0
- package/dist/.sst/platform/src/components/cloudflare/queue.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/queue.js +57 -0
- package/dist/.sst/platform/src/components/cloudflare/queue.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/remix.d.ts +223 -0
- package/dist/.sst/platform/src/components/cloudflare/remix.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/remix.js +291 -0
- package/dist/.sst/platform/src/components/cloudflare/remix.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/ssr-site.d.ts +59 -0
- package/dist/.sst/platform/src/components/cloudflare/ssr-site.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/ssr-site.js +177 -0
- package/dist/.sst/platform/src/components/cloudflare/ssr-site.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/static-site.d.ts +262 -0
- package/dist/.sst/platform/src/components/cloudflare/static-site.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/static-site.js +315 -0
- package/dist/.sst/platform/src/components/cloudflare/static-site.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/worker.d.ts +273 -0
- package/dist/.sst/platform/src/components/cloudflare/worker.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/worker.js +326 -0
- package/dist/.sst/platform/src/components/cloudflare/worker.js.map +1 -0
- package/dist/.sst/platform/src/components/component.d.ts +37 -0
- package/dist/.sst/platform/src/components/component.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/component.js +395 -0
- package/dist/.sst/platform/src/components/component.js.map +1 -0
- package/dist/.sst/platform/src/components/cpu.d.ts +3 -0
- package/dist/.sst/platform/src/components/cpu.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cpu.js +9 -0
- package/dist/.sst/platform/src/components/cpu.js.map +1 -0
- package/dist/.sst/platform/src/components/dns.d.ts +59 -0
- package/dist/.sst/platform/src/components/dns.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/dns.js +7 -0
- package/dist/.sst/platform/src/components/dns.js.map +1 -0
- package/dist/.sst/platform/src/components/duration.d.ts +6 -0
- package/dist/.sst/platform/src/components/duration.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/duration.js +19 -0
- package/dist/.sst/platform/src/components/duration.js.map +1 -0
- package/dist/.sst/platform/src/components/error.d.ts +4 -0
- package/dist/.sst/platform/src/components/error.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/error.js +6 -0
- package/dist/.sst/platform/src/components/error.js.map +1 -0
- package/dist/.sst/platform/src/components/experimental/dev-command.d.ts +99 -0
- package/dist/.sst/platform/src/components/experimental/dev-command.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/experimental/dev-command.js +59 -0
- package/dist/.sst/platform/src/components/experimental/dev-command.js.map +1 -0
- package/dist/.sst/platform/src/components/experimental/index.d.ts +2 -0
- package/dist/.sst/platform/src/components/experimental/index.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/experimental/index.js +2 -0
- package/dist/.sst/platform/src/components/experimental/index.js.map +1 -0
- package/dist/.sst/platform/src/components/hint.d.ts +7 -0
- package/dist/.sst/platform/src/components/hint.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/hint.js +20 -0
- package/dist/.sst/platform/src/components/hint.js.map +1 -0
- package/dist/.sst/platform/src/components/index.d.ts +16 -0
- package/dist/.sst/platform/src/components/index.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/index.js +16 -0
- package/dist/.sst/platform/src/components/index.js.map +1 -0
- package/dist/.sst/platform/src/components/input.d.ts +3 -0
- package/dist/.sst/platform/src/components/input.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/input.js +2 -0
- package/dist/.sst/platform/src/components/input.js.map +1 -0
- package/dist/.sst/platform/src/components/link.d.ts +41 -0
- package/dist/.sst/platform/src/components/link.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/link.js +138 -0
- package/dist/.sst/platform/src/components/link.js.map +1 -0
- package/dist/.sst/platform/src/components/linkable.d.ts +271 -0
- package/dist/.sst/platform/src/components/linkable.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/linkable.js +244 -0
- package/dist/.sst/platform/src/components/linkable.js.map +1 -0
- package/dist/.sst/platform/src/components/naming.d.ts +7 -0
- package/dist/.sst/platform/src/components/naming.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/naming.js +58 -0
- package/dist/.sst/platform/src/components/naming.js.map +1 -0
- package/dist/.sst/platform/src/components/path.d.ts +2 -0
- package/dist/.sst/platform/src/components/path.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/path.js +5 -0
- package/dist/.sst/platform/src/components/path.js.map +1 -0
- package/dist/.sst/platform/src/components/rpc/rpc.d.ts +18 -0
- package/dist/.sst/platform/src/components/rpc/rpc.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/rpc/rpc.js +120 -0
- package/dist/.sst/platform/src/components/rpc/rpc.js.map +1 -0
- package/dist/.sst/platform/src/components/secret.d.ts +125 -0
- package/dist/.sst/platform/src/components/secret.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/secret.js +143 -0
- package/dist/.sst/platform/src/components/secret.js.map +1 -0
- package/dist/.sst/platform/src/components/size.d.ts +5 -0
- package/dist/.sst/platform/src/components/size.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/size.js +29 -0
- package/dist/.sst/platform/src/components/size.js.map +1 -0
- package/dist/.sst/platform/src/components/vercel/account-id.d.ts +2 -0
- package/dist/.sst/platform/src/components/vercel/account-id.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/vercel/account-id.js +2 -0
- package/dist/.sst/platform/src/components/vercel/account-id.js.map +1 -0
- package/dist/.sst/platform/src/components/vercel/dns.d.ts +73 -0
- package/dist/.sst/platform/src/components/vercel/dns.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/vercel/dns.js +104 -0
- package/dist/.sst/platform/src/components/vercel/dns.js.map +1 -0
- package/dist/.sst/platform/src/components/vercel/index.d.ts +3 -0
- package/dist/.sst/platform/src/components/vercel/index.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/vercel/index.js +3 -0
- package/dist/.sst/platform/src/components/vercel/index.js.map +1 -0
- package/dist/.sst/platform/src/components/vercel/providers/dns-record.d.ts +14 -0
- package/dist/.sst/platform/src/components/vercel/providers/dns-record.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/vercel/providers/dns-record.js +8 -0
- package/dist/.sst/platform/src/components/vercel/providers/dns-record.js.map +1 -0
- package/dist/.sst/platform/src/config.d.ts +1243 -0
- package/dist/.sst/platform/src/config.d.ts.map +1 -0
- package/dist/.sst/platform/src/config.js +5 -0
- package/dist/.sst/platform/src/config.js.map +1 -0
- package/dist/.sst/platform/src/util/compare-semver.d.ts +4 -0
- package/dist/.sst/platform/src/util/compare-semver.d.ts.map +1 -0
- package/dist/.sst/platform/src/util/compare-semver.js +24 -0
- package/dist/.sst/platform/src/util/compare-semver.js.map +1 -0
- package/dist/.sst/platform/src/util/lazy.d.ts +2 -0
- package/dist/.sst/platform/src/util/lazy.d.ts.map +1 -0
- package/dist/.sst/platform/src/util/lazy.js +12 -0
- package/dist/.sst/platform/src/util/lazy.js.map +1 -0
- package/dist/.sst/platform/src/util/path-to-regex.d.ts +128 -0
- package/dist/.sst/platform/src/util/path-to-regex.d.ts.map +1 -0
- package/dist/.sst/platform/src/util/path-to-regex.js +392 -0
- package/dist/.sst/platform/src/util/path-to-regex.js.map +1 -0
- package/dist/.sst/platform/src/util/semaphore.d.ts +9 -0
- package/dist/.sst/platform/src/util/semaphore.d.ts.map +1 -0
- package/dist/.sst/platform/src/util/semaphore.js +36 -0
- package/dist/.sst/platform/src/util/semaphore.js.map +1 -0
- package/dist/.sst/platform/src/util/warn.d.ts +2 -0
- package/dist/.sst/platform/src/util/warn.d.ts.map +1 -0
- package/dist/.sst/platform/src/util/warn.js +8 -0
- package/dist/.sst/platform/src/util/warn.js.map +1 -0
- package/dist/components/monorise-core.d.ts +17 -0
- package/dist/components/monorise-core.d.ts.map +1 -0
- package/dist/components/monorise-core.js +134 -0
- package/dist/components/monorise-core.js.map +1 -0
- package/dist/components/q-function.d.ts +17 -0
- package/dist/components/q-function.d.ts.map +1 -0
- package/dist/components/q-function.js +53 -0
- package/dist/components/q-function.js.map +1 -0
- package/dist/components/single-table.d.ts +12 -0
- package/dist/components/single-table.d.ts.map +1 -0
- package/dist/components/single-table.js +71 -0
- package/dist/components/single-table.js.map +1 -0
- package/dist/constants/event.d.ts +73 -0
- package/dist/constants/event.d.ts.map +1 -0
- package/dist/constants/event.js +74 -0
- package/dist/constants/event.js.map +1 -0
- package/dist/constants/table.d.ts +3 -0
- package/dist/constants/table.d.ts.map +1 -0
- package/dist/constants/table.js +3 -0
- package/dist/constants/table.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/sst.config.d.ts +3 -0
- package/dist/sst.config.d.ts.map +1 -0
- package/dist/sst.config.js +24 -0
- package/dist/sst.config.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +25 -0
|
@@ -0,0 +1,792 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import path from "path";
|
|
11
|
+
import fs from "fs";
|
|
12
|
+
import { globSync } from "glob";
|
|
13
|
+
import crypto from "crypto";
|
|
14
|
+
import { output, all, interpolate, } from "@pulumi/pulumi";
|
|
15
|
+
import { Cdn } from "./cdn.js";
|
|
16
|
+
import { Function } from "./function.js";
|
|
17
|
+
import { Bucket } from "./bucket.js";
|
|
18
|
+
import { BucketFiles } from "./providers/bucket-files.js";
|
|
19
|
+
import { logicalName } from "../naming.js";
|
|
20
|
+
import { Component, transform, } from "../component.js";
|
|
21
|
+
import { VisibleError } from "../error.js";
|
|
22
|
+
import { Cron } from "./cron.js";
|
|
23
|
+
import { getContentType } from "../base/base-site.js";
|
|
24
|
+
import { buildApp } from "../base/base-ssr-site.js";
|
|
25
|
+
import { cloudfront, getRegionOutput, lambda, Region } from "@pulumi/aws";
|
|
26
|
+
import { KvKeys } from "./providers/kv-keys.js";
|
|
27
|
+
import { useProvider } from "./helpers/provider.js";
|
|
28
|
+
import { Link } from "../link.js";
|
|
29
|
+
import { URL_UNAVAILABLE } from "./linkable.js";
|
|
30
|
+
import { CF_ROUTER_INJECTION, CF_BLOCK_CLOUDFRONT_URL_INJECTION, normalizeRouteArgs, } from "./router.js";
|
|
31
|
+
import { DistributionInvalidation } from "./providers/distribution-invalidation.js";
|
|
32
|
+
import { toSeconds } from "../duration.js";
|
|
33
|
+
import { KvRoutesUpdate } from "./providers/kv-routes-update.js";
|
|
34
|
+
import { CONSOLE_URL, getQuota } from "./helpers/quota.js";
|
|
35
|
+
import { toPosix } from "../path.js";
|
|
36
|
+
const supportedRegions = {
|
|
37
|
+
"af-south-1": { lat: -33.9249, lon: 18.4241 }, // Cape Town, South Africa
|
|
38
|
+
"ap-east-1": { lat: 22.3193, lon: 114.1694 }, // Hong Kong
|
|
39
|
+
"ap-northeast-1": { lat: 35.6895, lon: 139.6917 }, // Tokyo, Japan
|
|
40
|
+
"ap-northeast-2": { lat: 37.5665, lon: 126.978 }, // Seoul, South Korea
|
|
41
|
+
"ap-northeast-3": { lat: 34.6937, lon: 135.5023 }, // Osaka, Japan
|
|
42
|
+
"ap-southeast-1": { lat: 1.3521, lon: 103.8198 }, // Singapore
|
|
43
|
+
"ap-southeast-2": { lat: -33.8688, lon: 151.2093 }, // Sydney, Australia
|
|
44
|
+
"ap-southeast-3": { lat: -6.2088, lon: 106.8456 }, // Jakarta, Indonesia
|
|
45
|
+
"ap-southeast-4": { lat: -37.8136, lon: 144.9631 }, // Melbourne, Australia
|
|
46
|
+
"ap-southeast-5": { lat: 3.139, lon: 101.6869 }, // Kuala Lumpur, Malaysia
|
|
47
|
+
"ap-southeast-7": { lat: 13.7563, lon: 100.5018 }, // Bangkok, Thailand
|
|
48
|
+
"ap-south-1": { lat: 19.076, lon: 72.8777 }, // Mumbai, India
|
|
49
|
+
"ap-south-2": { lat: 17.385, lon: 78.4867 }, // Hyderabad, India
|
|
50
|
+
"ca-central-1": { lat: 45.5017, lon: -73.5673 }, // Montreal, Canada
|
|
51
|
+
"ca-west-1": { lat: 51.0447, lon: -114.0719 }, // Calgary, Canada
|
|
52
|
+
"cn-north-1": { lat: 39.9042, lon: 116.4074 }, // Beijing, China
|
|
53
|
+
"cn-northwest-1": { lat: 38.4872, lon: 106.2309 }, // Yinchuan, Ningxia
|
|
54
|
+
"eu-central-1": { lat: 50.1109, lon: 8.6821 }, // Frankfurt, Germany
|
|
55
|
+
"eu-central-2": { lat: 47.3769, lon: 8.5417 }, // Zurich, Switzerland
|
|
56
|
+
"eu-north-1": { lat: 59.3293, lon: 18.0686 }, // Stockholm, Sweden
|
|
57
|
+
"eu-south-1": { lat: 45.4642, lon: 9.19 }, // Milan, Italy
|
|
58
|
+
"eu-south-2": { lat: 40.4168, lon: -3.7038 }, // Madrid, Spain
|
|
59
|
+
"eu-west-1": { lat: 53.3498, lon: -6.2603 }, // Dublin, Ireland
|
|
60
|
+
"eu-west-2": { lat: 51.5074, lon: -0.1278 }, // London, UK
|
|
61
|
+
"eu-west-3": { lat: 48.8566, lon: 2.3522 }, // Paris, France
|
|
62
|
+
"il-central-1": { lat: 32.0853, lon: 34.7818 }, // Tel Aviv, Israel
|
|
63
|
+
"me-central-1": { lat: 25.2048, lon: 55.2708 }, // Dubai, UAE
|
|
64
|
+
"me-south-1": { lat: 26.0667, lon: 50.5577 }, // Manama, Bahrain
|
|
65
|
+
"mx-central-1": { lat: 19.4326, lon: -99.1332 }, // Mexico City, Mexico
|
|
66
|
+
"sa-east-1": { lat: -23.5505, lon: -46.6333 }, // São Paulo, Brazil
|
|
67
|
+
"us-east-1": { lat: 39.0438, lon: -77.4874 }, // Ashburn, VA
|
|
68
|
+
"us-east-2": { lat: 39.9612, lon: -82.9988 }, // Columbus, OH
|
|
69
|
+
"us-gov-east-1": { lat: 38.9696, lon: -77.3861 }, // Herndon, VA
|
|
70
|
+
"us-gov-west-1": { lat: 34.0522, lon: -118.2437 }, // Los Angeles, CA
|
|
71
|
+
"us-west-1": { lat: 37.7749, lon: -122.4194 }, // San Francisco, CA
|
|
72
|
+
"us-west-2": { lat: 45.5122, lon: -122.6587 }, // Portland, OR
|
|
73
|
+
};
|
|
74
|
+
export class SsrSite extends Component {
|
|
75
|
+
constructor(type, name, args = {}, opts = {}) {
|
|
76
|
+
super(type, name, args, opts);
|
|
77
|
+
const self = this;
|
|
78
|
+
validateDeprecatedProps();
|
|
79
|
+
const regions = normalizeRegions();
|
|
80
|
+
const route = normalizeRoute();
|
|
81
|
+
const edge = normalizeEdge();
|
|
82
|
+
const serverTimeout = normalizeServerTimeout();
|
|
83
|
+
const buildCommand = this.normalizeBuildCommand(args);
|
|
84
|
+
const sitePath = regions.apply(() => normalizeSitePath());
|
|
85
|
+
const dev = normalizeDev();
|
|
86
|
+
const purge = output(args.assets).apply((assets) => { var _a; return (_a = assets === null || assets === void 0 ? void 0 : assets.purge) !== null && _a !== void 0 ? _a : false; });
|
|
87
|
+
if (dev.enabled) {
|
|
88
|
+
const server = createDevServer();
|
|
89
|
+
this.devUrl = dev.url;
|
|
90
|
+
this.registerOutputs({
|
|
91
|
+
_metadata: {
|
|
92
|
+
mode: "placeholder",
|
|
93
|
+
path: sitePath,
|
|
94
|
+
server: server.arn,
|
|
95
|
+
},
|
|
96
|
+
_dev: Object.assign(Object.assign({}, dev.outputs), { aws: { role: server.nodes.role.arn } }),
|
|
97
|
+
});
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const outputPath = buildApp(self, name, args, sitePath, buildCommand !== null && buildCommand !== void 0 ? buildCommand : undefined);
|
|
101
|
+
const bucket = createS3Bucket();
|
|
102
|
+
const plan = validatePlan(this.buildPlan(outputPath, name, args, { bucket }));
|
|
103
|
+
const timeout = all([serverTimeout, plan.server]).apply(([argsTimeout, plan]) => { var _a; return (_a = argsTimeout !== null && argsTimeout !== void 0 ? argsTimeout : plan === null || plan === void 0 ? void 0 : plan.timeout) !== null && _a !== void 0 ? _a : "20 seconds"; });
|
|
104
|
+
const servers = createServers();
|
|
105
|
+
const imageOptimizer = createImageOptimizer();
|
|
106
|
+
const assetsUploaded = uploadAssets();
|
|
107
|
+
const kvNamespace = buildKvNamespace();
|
|
108
|
+
let distribution;
|
|
109
|
+
let distributionId;
|
|
110
|
+
let kvStoreArn;
|
|
111
|
+
let invalidationDependsOn = [];
|
|
112
|
+
let prodUrl;
|
|
113
|
+
if (route) {
|
|
114
|
+
kvStoreArn = route.routerKvStoreArn;
|
|
115
|
+
distributionId = route.routerDistributionId;
|
|
116
|
+
invalidationDependsOn = [updateRouterKvRoutes()];
|
|
117
|
+
prodUrl = route.routerUrl;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
kvStoreArn = createRequestKvStore();
|
|
121
|
+
distribution = createDistribution();
|
|
122
|
+
distributionId = distribution.nodes.distribution.id;
|
|
123
|
+
prodUrl = distribution.domainUrl.apply((domainUrl) => output(domainUrl !== null && domainUrl !== void 0 ? domainUrl : distribution.url));
|
|
124
|
+
}
|
|
125
|
+
function createCachePolicy() {
|
|
126
|
+
return new cloudfront.CachePolicy(`${name}ServerCachePolicy`, {
|
|
127
|
+
comment: "SST server response cache policy",
|
|
128
|
+
defaultTtl: 0,
|
|
129
|
+
maxTtl: 31536000, // 1 year
|
|
130
|
+
minTtl: 0,
|
|
131
|
+
parametersInCacheKeyAndForwardedToOrigin: {
|
|
132
|
+
cookiesConfig: {
|
|
133
|
+
cookieBehavior: "none",
|
|
134
|
+
},
|
|
135
|
+
headersConfig: {
|
|
136
|
+
headerBehavior: "whitelist",
|
|
137
|
+
headers: {
|
|
138
|
+
items: ["x-open-next-cache-key"],
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
queryStringsConfig: {
|
|
142
|
+
queryStringBehavior: "all",
|
|
143
|
+
},
|
|
144
|
+
enableAcceptEncodingBrotli: true,
|
|
145
|
+
enableAcceptEncodingGzip: true,
|
|
146
|
+
},
|
|
147
|
+
}, { parent: self });
|
|
148
|
+
}
|
|
149
|
+
function createRequestKvStore() {
|
|
150
|
+
return edge.apply((edge) => {
|
|
151
|
+
const viewerRequest = edge === null || edge === void 0 ? void 0 : edge.viewerRequest;
|
|
152
|
+
if (viewerRequest === null || viewerRequest === void 0 ? void 0 : viewerRequest.kvStore)
|
|
153
|
+
return output(viewerRequest === null || viewerRequest === void 0 ? void 0 : viewerRequest.kvStore);
|
|
154
|
+
return new cloudfront.KeyValueStore(`${name}KvStore`, {}, { parent: self }).arn;
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
function createRequestFunction() {
|
|
158
|
+
return edge.apply((edge) => {
|
|
159
|
+
var _a, _b;
|
|
160
|
+
const userInjection = (_b = (_a = edge === null || edge === void 0 ? void 0 : edge.viewerRequest) === null || _a === void 0 ? void 0 : _a.injection) !== null && _b !== void 0 ? _b : "";
|
|
161
|
+
const blockCloudfrontUrlInjection = args.domain
|
|
162
|
+
? CF_BLOCK_CLOUDFRONT_URL_INJECTION
|
|
163
|
+
: "";
|
|
164
|
+
return new cloudfront.Function(`${name}CloudfrontFunctionRequest`, {
|
|
165
|
+
runtime: "cloudfront-js-2.0",
|
|
166
|
+
keyValueStoreAssociations: kvStoreArn ? [kvStoreArn] : [],
|
|
167
|
+
code: interpolate `
|
|
168
|
+
import cf from "cloudfront";
|
|
169
|
+
async function handler(event) {
|
|
170
|
+
${userInjection}
|
|
171
|
+
${blockCloudfrontUrlInjection}
|
|
172
|
+
${CF_ROUTER_INJECTION}
|
|
173
|
+
|
|
174
|
+
const kvNamespace = "${kvNamespace}";
|
|
175
|
+
|
|
176
|
+
// Load metadata
|
|
177
|
+
let metadata;
|
|
178
|
+
try {
|
|
179
|
+
const v = await cf.kvs().get(kvNamespace + ":metadata");
|
|
180
|
+
metadata = JSON.parse(v);
|
|
181
|
+
} catch (e) {}
|
|
182
|
+
|
|
183
|
+
await routeSite(kvNamespace, metadata);
|
|
184
|
+
return event.request;
|
|
185
|
+
}`,
|
|
186
|
+
}, { parent: self });
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
function createResponseFunction() {
|
|
190
|
+
return edge.apply((edge) => {
|
|
191
|
+
const userConfig = edge === null || edge === void 0 ? void 0 : edge.viewerResponse;
|
|
192
|
+
const userInjection = userConfig === null || userConfig === void 0 ? void 0 : userConfig.injection;
|
|
193
|
+
const kvStoreArn = userConfig === null || userConfig === void 0 ? void 0 : userConfig.kvStore;
|
|
194
|
+
if (!userInjection)
|
|
195
|
+
return;
|
|
196
|
+
return new cloudfront.Function(`${name}CloudfrontFunctionResponse`, {
|
|
197
|
+
runtime: "cloudfront-js-2.0",
|
|
198
|
+
keyValueStoreAssociations: kvStoreArn ? [kvStoreArn] : [],
|
|
199
|
+
code: `
|
|
200
|
+
import cf from "cloudfront";
|
|
201
|
+
async function handler(event) {
|
|
202
|
+
${userInjection}
|
|
203
|
+
return event.response;
|
|
204
|
+
}`,
|
|
205
|
+
}, { parent: self });
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
function createDistribution() {
|
|
209
|
+
var _a, _b;
|
|
210
|
+
return new Cdn(...transform((_a = args.transform) === null || _a === void 0 ? void 0 : _a.cdn, `${name}Cdn`, {
|
|
211
|
+
comment: `${name} app`,
|
|
212
|
+
domain: args.domain,
|
|
213
|
+
origins: [
|
|
214
|
+
{
|
|
215
|
+
originId: "default",
|
|
216
|
+
domainName: "placeholder.sst.dev",
|
|
217
|
+
customOriginConfig: {
|
|
218
|
+
httpPort: 80,
|
|
219
|
+
httpsPort: 443,
|
|
220
|
+
originProtocolPolicy: "http-only",
|
|
221
|
+
originReadTimeout: 20,
|
|
222
|
+
originSslProtocols: ["TLSv1.2"],
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
],
|
|
226
|
+
defaultCacheBehavior: {
|
|
227
|
+
targetOriginId: "default",
|
|
228
|
+
viewerProtocolPolicy: "redirect-to-https",
|
|
229
|
+
allowedMethods: [
|
|
230
|
+
"DELETE",
|
|
231
|
+
"GET",
|
|
232
|
+
"HEAD",
|
|
233
|
+
"OPTIONS",
|
|
234
|
+
"PATCH",
|
|
235
|
+
"POST",
|
|
236
|
+
"PUT",
|
|
237
|
+
],
|
|
238
|
+
cachedMethods: ["GET", "HEAD"],
|
|
239
|
+
compress: true,
|
|
240
|
+
cachePolicyId: (_b = args.cachePolicy) !== null && _b !== void 0 ? _b : createCachePolicy().id,
|
|
241
|
+
// CloudFront's Managed-AllViewerExceptHostHeader policy
|
|
242
|
+
originRequestPolicyId: "b689b0a8-53d0-40ab-baf2-68738e2966ac",
|
|
243
|
+
functionAssociations: all([
|
|
244
|
+
createRequestFunction(),
|
|
245
|
+
createResponseFunction(),
|
|
246
|
+
]).apply(([reqFn, resFn]) => [
|
|
247
|
+
{ eventType: "viewer-request", functionArn: reqFn.arn },
|
|
248
|
+
...(resFn
|
|
249
|
+
? [{ eventType: "viewer-response", functionArn: resFn.arn }]
|
|
250
|
+
: []),
|
|
251
|
+
]),
|
|
252
|
+
},
|
|
253
|
+
}, { parent: self }));
|
|
254
|
+
}
|
|
255
|
+
const kvUpdated = createKvEntries();
|
|
256
|
+
createInvalidation();
|
|
257
|
+
const server = servers.apply((servers) => { var _a; return (_a = servers[0]) === null || _a === void 0 ? void 0 : _a.server; });
|
|
258
|
+
this.bucket = bucket;
|
|
259
|
+
this.cdn = distribution;
|
|
260
|
+
this.server = server;
|
|
261
|
+
this.prodUrl = prodUrl;
|
|
262
|
+
this.registerOutputs({
|
|
263
|
+
_hint: this.url,
|
|
264
|
+
_metadata: {
|
|
265
|
+
mode: "deployed",
|
|
266
|
+
path: sitePath,
|
|
267
|
+
url: this.url,
|
|
268
|
+
edge: false,
|
|
269
|
+
server: server.arn,
|
|
270
|
+
},
|
|
271
|
+
_dev: Object.assign(Object.assign({}, dev.outputs), { aws: { role: server.nodes.role.arn } }),
|
|
272
|
+
});
|
|
273
|
+
function validateDeprecatedProps() {
|
|
274
|
+
if (args.cdn !== undefined)
|
|
275
|
+
throw new VisibleError(`"cdn" prop is deprecated. Use the "route.router" prop instead to use an existing "Router" component to serve your site.`);
|
|
276
|
+
}
|
|
277
|
+
function normalizeDev() {
|
|
278
|
+
var _a, _b, _c, _d;
|
|
279
|
+
const enabled = $dev && args.dev !== false;
|
|
280
|
+
const devArgs = args.dev || {};
|
|
281
|
+
return {
|
|
282
|
+
enabled,
|
|
283
|
+
url: output((_a = devArgs.url) !== null && _a !== void 0 ? _a : URL_UNAVAILABLE),
|
|
284
|
+
outputs: {
|
|
285
|
+
title: devArgs.title,
|
|
286
|
+
command: output((_b = devArgs.command) !== null && _b !== void 0 ? _b : "npm run dev"),
|
|
287
|
+
autostart: output((_c = devArgs.autostart) !== null && _c !== void 0 ? _c : true),
|
|
288
|
+
directory: output((_d = devArgs.directory) !== null && _d !== void 0 ? _d : sitePath),
|
|
289
|
+
environment: args.environment,
|
|
290
|
+
links: output(args.link || [])
|
|
291
|
+
.apply(Link.build)
|
|
292
|
+
.apply((links) => links.map((link) => link.name)),
|
|
293
|
+
},
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
function normalizeSitePath() {
|
|
297
|
+
return output(args.path).apply((sitePath) => {
|
|
298
|
+
if (!sitePath)
|
|
299
|
+
return ".";
|
|
300
|
+
if (!fs.existsSync(sitePath)) {
|
|
301
|
+
throw new VisibleError(`Site directory not found at "${path.resolve(sitePath)}". Please check the path setting in your configuration.`);
|
|
302
|
+
}
|
|
303
|
+
return sitePath;
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
function normalizeRegions() {
|
|
307
|
+
var _a;
|
|
308
|
+
return output((_a = args.regions) !== null && _a !== void 0 ? _a : [getRegionOutput(undefined, { parent: self }).name]).apply((regions) => {
|
|
309
|
+
if (regions.length === 0)
|
|
310
|
+
throw new VisibleError("No deployment regions specified. Please specify at least one region in the 'regions' property.");
|
|
311
|
+
return regions.map((region) => {
|
|
312
|
+
if ([
|
|
313
|
+
"ap-south-2",
|
|
314
|
+
"ap-southeast-4",
|
|
315
|
+
"ap-southeast-5",
|
|
316
|
+
"ca-west-1",
|
|
317
|
+
"eu-south-2",
|
|
318
|
+
"eu-central-2",
|
|
319
|
+
"il-central-1",
|
|
320
|
+
"me-central-1",
|
|
321
|
+
].includes(region))
|
|
322
|
+
throw new VisibleError(`Region ${region} is not supported by this component. Please select a different AWS region.`);
|
|
323
|
+
if (!Object.values(Region).includes(region))
|
|
324
|
+
throw new VisibleError(`Invalid AWS region: "${region}". Please specify a valid AWS region.`);
|
|
325
|
+
return region;
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
function normalizeRoute() {
|
|
330
|
+
const route = normalizeRouteArgs(args.router, args.route);
|
|
331
|
+
if (route) {
|
|
332
|
+
if (args.domain)
|
|
333
|
+
throw new VisibleError(`Cannot provide both "domain" and "route". Use the "domain" prop on the "Router" component when serving your site through a Router.`);
|
|
334
|
+
if (args.edge)
|
|
335
|
+
throw new VisibleError(`Cannot provide both "edge" and "route". Use the "edge" prop on the "Router" component when serving your site through a Router.`);
|
|
336
|
+
}
|
|
337
|
+
return route;
|
|
338
|
+
}
|
|
339
|
+
function normalizeEdge() {
|
|
340
|
+
var _a;
|
|
341
|
+
return output([args.edge, (_a = args.server) === null || _a === void 0 ? void 0 : _a.edge]).apply(([edge, serverEdge]) => {
|
|
342
|
+
if (serverEdge)
|
|
343
|
+
throw new VisibleError(`The "server.edge" prop is deprecated. Use the "edge" prop on the top level instead.`);
|
|
344
|
+
if (!edge)
|
|
345
|
+
return edge;
|
|
346
|
+
return edge;
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
function normalizeServerTimeout() {
|
|
350
|
+
var _a;
|
|
351
|
+
return output((_a = args.server) === null || _a === void 0 ? void 0 : _a.timeout).apply((v) => {
|
|
352
|
+
if (!v)
|
|
353
|
+
return v;
|
|
354
|
+
const seconds = toSeconds(v);
|
|
355
|
+
if (seconds > 60) {
|
|
356
|
+
getQuota("cloudfront-response-timeout").apply((quota) => {
|
|
357
|
+
if (seconds > quota)
|
|
358
|
+
throw new VisibleError(`Server timeout for "${name}" is longer than the allowed CloudFront response timeout of ${quota} seconds. You can contact AWS Support to increase the timeout - ${CONSOLE_URL}`);
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
return v;
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
function createDevServer() {
|
|
365
|
+
var _a;
|
|
366
|
+
return new Function(...transform((_a = args.transform) === null || _a === void 0 ? void 0 : _a.server, `${name}DevServer`, {
|
|
367
|
+
description: `${name} dev server`,
|
|
368
|
+
runtime: "nodejs20.x",
|
|
369
|
+
timeout: "20 seconds",
|
|
370
|
+
memory: "128 MB",
|
|
371
|
+
bundle: path.join($cli.paths.platform, "functions", "empty-function"),
|
|
372
|
+
handler: "index.handler",
|
|
373
|
+
environment: args.environment,
|
|
374
|
+
permissions: args.permissions,
|
|
375
|
+
link: args.link,
|
|
376
|
+
dev: false,
|
|
377
|
+
}, { parent: self }));
|
|
378
|
+
}
|
|
379
|
+
function validatePlan(plan) {
|
|
380
|
+
return all([plan, route]).apply(([plan, route]) => {
|
|
381
|
+
if (plan.base) {
|
|
382
|
+
// starts with /
|
|
383
|
+
plan.base = !plan.base.startsWith("/") ? `/${plan.base}` : plan.base;
|
|
384
|
+
// does not end with /
|
|
385
|
+
plan.base = plan.base.replace(/\/$/, "");
|
|
386
|
+
}
|
|
387
|
+
if ((route === null || route === void 0 ? void 0 : route.pathPrefix) && route.pathPrefix !== "/") {
|
|
388
|
+
if (!plan.base)
|
|
389
|
+
throw new VisibleError(`No base path found for site. You must configure the base path to match the route path prefix "${route.pathPrefix}".`);
|
|
390
|
+
if (!plan.base.startsWith(route.pathPrefix))
|
|
391
|
+
throw new VisibleError(`The site base path "${plan.base}" must start with the route path prefix "${route.pathPrefix}".`);
|
|
392
|
+
}
|
|
393
|
+
// if copy.to has a leading slash, files will be uploaded to `/` folder in bucket
|
|
394
|
+
plan.assets.forEach((copy) => {
|
|
395
|
+
copy.to = copy.to.replace(/^\/|\/$/g, "");
|
|
396
|
+
});
|
|
397
|
+
if (plan.isrCache) {
|
|
398
|
+
plan.isrCache.to = plan.isrCache.to.replace(/^\/|\/$/g, "");
|
|
399
|
+
}
|
|
400
|
+
return plan;
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
function createS3Bucket() {
|
|
404
|
+
var _a;
|
|
405
|
+
return new Bucket(...transform((_a = args.transform) === null || _a === void 0 ? void 0 : _a.assets, `${name}Assets`, { access: "cloudfront" }, { parent: self, retainOnDelete: false }));
|
|
406
|
+
}
|
|
407
|
+
function createServers() {
|
|
408
|
+
return all([regions, plan.server]).apply(([regions, planServer]) => {
|
|
409
|
+
if (!planServer)
|
|
410
|
+
return [];
|
|
411
|
+
return regions.map((region) => {
|
|
412
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
413
|
+
const provider = useProvider(region);
|
|
414
|
+
const server = new Function(...transform((_a = args.transform) === null || _a === void 0 ? void 0 : _a.server, `${name}Server${logicalName(region)}`, Object.assign(Object.assign({}, planServer), { description: (_b = planServer.description) !== null && _b !== void 0 ? _b : `${name} server`, runtime: output((_c = args.server) === null || _c === void 0 ? void 0 : _c.runtime).apply((v) => { var _a; return (_a = v !== null && v !== void 0 ? v : planServer.runtime) !== null && _a !== void 0 ? _a : "nodejs20.x"; }), timeout, memory: output((_d = args.server) === null || _d === void 0 ? void 0 : _d.memory).apply((v) => { var _a; return (_a = v !== null && v !== void 0 ? v : planServer.memory) !== null && _a !== void 0 ? _a : "1024 MB"; }), architecture: output((_e = args.server) === null || _e === void 0 ? void 0 : _e.architecture).apply((v) => { var _a; return (_a = v !== null && v !== void 0 ? v : planServer.architecture) !== null && _a !== void 0 ? _a : "x86_64"; }), vpc: args.vpc, nodejs: Object.assign({ format: "esm", install: (_f = args.server) === null || _f === void 0 ? void 0 : _f.install, loader: (_g = args.server) === null || _g === void 0 ? void 0 : _g.loader }, planServer.nodejs), environment: output(args.environment).apply((environment) => (Object.assign(Object.assign({}, environment), planServer.environment))), permissions: output(args.permissions).apply((permissions) => {
|
|
415
|
+
var _a;
|
|
416
|
+
return [
|
|
417
|
+
{
|
|
418
|
+
actions: ["cloudfront:CreateInvalidation"],
|
|
419
|
+
resources: ["*"],
|
|
420
|
+
},
|
|
421
|
+
...(permissions !== null && permissions !== void 0 ? permissions : []),
|
|
422
|
+
...((_a = planServer.permissions) !== null && _a !== void 0 ? _a : []),
|
|
423
|
+
];
|
|
424
|
+
}), injections: [
|
|
425
|
+
...(args.warm
|
|
426
|
+
? [useServerWarmingInjection(planServer.streaming)]
|
|
427
|
+
: []),
|
|
428
|
+
...(planServer.injections || []),
|
|
429
|
+
], link: output(args.link).apply((link) => {
|
|
430
|
+
var _a;
|
|
431
|
+
return [
|
|
432
|
+
...((_a = planServer.link) !== null && _a !== void 0 ? _a : []),
|
|
433
|
+
...(link !== null && link !== void 0 ? link : []),
|
|
434
|
+
];
|
|
435
|
+
}), layers: output((_h = args.server) === null || _h === void 0 ? void 0 : _h.layers).apply((layers) => {
|
|
436
|
+
var _a;
|
|
437
|
+
return [
|
|
438
|
+
...((_a = planServer.layers) !== null && _a !== void 0 ? _a : []),
|
|
439
|
+
...(layers !== null && layers !== void 0 ? layers : []),
|
|
440
|
+
];
|
|
441
|
+
}), url: true, dev: false, _skipHint: true }), { provider, parent: self }));
|
|
442
|
+
if (args.warm) {
|
|
443
|
+
// Create cron job
|
|
444
|
+
const cron = new Cron(`${name}Warmer${logicalName(region)}`, {
|
|
445
|
+
schedule: "rate(5 minutes)",
|
|
446
|
+
job: {
|
|
447
|
+
description: `${name} warmer`,
|
|
448
|
+
bundle: path.join($cli.paths.platform, "dist", "ssr-warmer"),
|
|
449
|
+
runtime: "nodejs20.x",
|
|
450
|
+
handler: "index.handler",
|
|
451
|
+
timeout: "900 seconds",
|
|
452
|
+
memory: "128 MB",
|
|
453
|
+
dev: false,
|
|
454
|
+
environment: {
|
|
455
|
+
FUNCTION_NAME: server.nodes.function.name,
|
|
456
|
+
CONCURRENCY: output(args.warm).apply((warm) => warm.toString()),
|
|
457
|
+
},
|
|
458
|
+
link: [server],
|
|
459
|
+
_skipMetadata: true,
|
|
460
|
+
},
|
|
461
|
+
transform: {
|
|
462
|
+
target: (args) => {
|
|
463
|
+
args.retryPolicy = {
|
|
464
|
+
maximumRetryAttempts: 0,
|
|
465
|
+
maximumEventAgeInSeconds: 60,
|
|
466
|
+
};
|
|
467
|
+
},
|
|
468
|
+
},
|
|
469
|
+
}, { provider, parent: self });
|
|
470
|
+
// Prewarm on deploy
|
|
471
|
+
new lambda.Invocation(`${name}Prewarm${logicalName(region)}`, {
|
|
472
|
+
functionName: cron.nodes.job.name,
|
|
473
|
+
triggers: {
|
|
474
|
+
version: Date.now().toString(),
|
|
475
|
+
},
|
|
476
|
+
input: JSON.stringify({}),
|
|
477
|
+
}, { provider, parent: self });
|
|
478
|
+
}
|
|
479
|
+
return { region, server };
|
|
480
|
+
});
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
function createImageOptimizer() {
|
|
484
|
+
return output(plan.imageOptimizer).apply((imageOptimizer) => {
|
|
485
|
+
if (!imageOptimizer)
|
|
486
|
+
return;
|
|
487
|
+
return new Function(`${name}ImageOptimizer`, Object.assign(Object.assign({ timeout: "25 seconds", logging: {
|
|
488
|
+
retention: "3 days",
|
|
489
|
+
}, permissions: [
|
|
490
|
+
{
|
|
491
|
+
actions: ["s3:GetObject"],
|
|
492
|
+
resources: [interpolate `${bucket.arn}/*`],
|
|
493
|
+
},
|
|
494
|
+
] }, imageOptimizer.function), { url: true, dev: false, _skipMetadata: true, _skipHint: true }), { parent: self });
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
function useServerWarmingInjection(streaming) {
|
|
498
|
+
return [
|
|
499
|
+
`if (event.type === "warmer") {`,
|
|
500
|
+
` const p = new Promise((resolve) => {`,
|
|
501
|
+
` setTimeout(() => {`,
|
|
502
|
+
` resolve({ serverId: "server-" + Math.random().toString(36).slice(2, 8) });`,
|
|
503
|
+
` }, event.delay);`,
|
|
504
|
+
` });`,
|
|
505
|
+
...(streaming
|
|
506
|
+
? [
|
|
507
|
+
` const response = await p;`,
|
|
508
|
+
` responseStream.write(JSON.stringify(response));`,
|
|
509
|
+
` responseStream.end();`,
|
|
510
|
+
` return;`,
|
|
511
|
+
]
|
|
512
|
+
: [` return p;`]),
|
|
513
|
+
`}`,
|
|
514
|
+
].join("\n");
|
|
515
|
+
}
|
|
516
|
+
function uploadAssets() {
|
|
517
|
+
return all([args.assets, route, plan, outputPath]).apply((_a) => __awaiter(this, [_a], void 0, function* ([assets, route, plan, outputPath]) {
|
|
518
|
+
var _b, _c, _d;
|
|
519
|
+
// Define content headers
|
|
520
|
+
const versionedFilesTTL = 31536000; // 1 year
|
|
521
|
+
const nonVersionedFilesTTL = 86400; // 1 day
|
|
522
|
+
const bucketFiles = [];
|
|
523
|
+
// Handle each copy source
|
|
524
|
+
for (const copy of [
|
|
525
|
+
...plan.assets,
|
|
526
|
+
...(plan.isrCache
|
|
527
|
+
? [Object.assign(Object.assign({}, plan.isrCache), { versionedSubDir: undefined })]
|
|
528
|
+
: []),
|
|
529
|
+
]) {
|
|
530
|
+
// Build fileOptions
|
|
531
|
+
const fileOptions = [
|
|
532
|
+
// unversioned files
|
|
533
|
+
{
|
|
534
|
+
files: "**",
|
|
535
|
+
ignore: copy.versionedSubDir
|
|
536
|
+
? toPosix(path.join(copy.versionedSubDir, "**"))
|
|
537
|
+
: undefined,
|
|
538
|
+
cacheControl: (_b = assets === null || assets === void 0 ? void 0 : assets.nonVersionedFilesCacheHeader) !== null && _b !== void 0 ? _b : `public,max-age=0,s-maxage=${nonVersionedFilesTTL},stale-while-revalidate=${nonVersionedFilesTTL}`,
|
|
539
|
+
},
|
|
540
|
+
// versioned files
|
|
541
|
+
...(copy.versionedSubDir
|
|
542
|
+
? [
|
|
543
|
+
{
|
|
544
|
+
files: toPosix(path.join(copy.versionedSubDir, "**")),
|
|
545
|
+
cacheControl: (_c = assets === null || assets === void 0 ? void 0 : assets.versionedFilesCacheHeader) !== null && _c !== void 0 ? _c : `public,max-age=${versionedFilesTTL},immutable`,
|
|
546
|
+
},
|
|
547
|
+
]
|
|
548
|
+
: []),
|
|
549
|
+
...((_d = assets === null || assets === void 0 ? void 0 : assets.fileOptions) !== null && _d !== void 0 ? _d : []),
|
|
550
|
+
];
|
|
551
|
+
// Upload files based on fileOptions
|
|
552
|
+
const filesUploaded = [];
|
|
553
|
+
for (const fileOption of fileOptions.reverse()) {
|
|
554
|
+
const files = globSync(fileOption.files, {
|
|
555
|
+
cwd: path.resolve(outputPath, copy.from),
|
|
556
|
+
nodir: true,
|
|
557
|
+
dot: true,
|
|
558
|
+
ignore: fileOption.ignore,
|
|
559
|
+
}).filter((file) => !filesUploaded.includes(file));
|
|
560
|
+
bucketFiles.push(...(yield Promise.all(files.map((file) => __awaiter(this, void 0, void 0, function* () {
|
|
561
|
+
var _a, _b, _c;
|
|
562
|
+
const source = path.resolve(outputPath, copy.from, file);
|
|
563
|
+
const content = yield fs.promises.readFile(source, "utf-8");
|
|
564
|
+
const hash = crypto
|
|
565
|
+
.createHash("sha256")
|
|
566
|
+
.update(content)
|
|
567
|
+
.digest("hex");
|
|
568
|
+
return {
|
|
569
|
+
source,
|
|
570
|
+
key: toPosix(path.join(copy.to, (_b = (_a = route === null || route === void 0 ? void 0 : route.pathPrefix) === null || _a === void 0 ? void 0 : _a.replace(/^\//, "")) !== null && _b !== void 0 ? _b : "", file)),
|
|
571
|
+
hash,
|
|
572
|
+
cacheControl: fileOption.cacheControl,
|
|
573
|
+
contentType: (_c = fileOption.contentType) !== null && _c !== void 0 ? _c : getContentType(file, "UTF-8"),
|
|
574
|
+
};
|
|
575
|
+
})))));
|
|
576
|
+
filesUploaded.push(...files);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
return new BucketFiles(`${name}AssetFiles`, {
|
|
580
|
+
bucketName: bucket.name,
|
|
581
|
+
files: bucketFiles,
|
|
582
|
+
purge,
|
|
583
|
+
region: getRegionOutput(undefined, { parent: self }).name,
|
|
584
|
+
}, { parent: self });
|
|
585
|
+
}));
|
|
586
|
+
}
|
|
587
|
+
function buildKvNamespace() {
|
|
588
|
+
// In the case multiple sites use the same kv store, we need to namespace the keys
|
|
589
|
+
return crypto
|
|
590
|
+
.createHash("md5")
|
|
591
|
+
.update(`${$app.name}-${$app.stage}-${name}`)
|
|
592
|
+
.digest("hex")
|
|
593
|
+
.substring(0, 4);
|
|
594
|
+
}
|
|
595
|
+
function createKvEntries() {
|
|
596
|
+
const entries = all([
|
|
597
|
+
servers,
|
|
598
|
+
imageOptimizer,
|
|
599
|
+
outputPath,
|
|
600
|
+
plan,
|
|
601
|
+
bucket.nodes.bucket.bucketRegionalDomainName,
|
|
602
|
+
timeout,
|
|
603
|
+
]).apply(([servers, imageOptimizer, outputPath, plan, bucketDomain, timeout]) => all([
|
|
604
|
+
servers.map((s) => ({ region: s.region, url: s.server.url })),
|
|
605
|
+
imageOptimizer === null || imageOptimizer === void 0 ? void 0 : imageOptimizer.url,
|
|
606
|
+
]).apply(([servers, imageOptimizerUrl]) => {
|
|
607
|
+
const kvEntries = {};
|
|
608
|
+
const dirs = [];
|
|
609
|
+
plan.assets.forEach((copy) => {
|
|
610
|
+
fs.readdirSync(path.join(outputPath, copy.from), {
|
|
611
|
+
withFileTypes: true,
|
|
612
|
+
}).forEach((item) => {
|
|
613
|
+
if (item.isFile()) {
|
|
614
|
+
kvEntries[toPosix(path.join("/", item.name))] = "s3";
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
// Handle deep routes
|
|
618
|
+
// In Next.js, asset requests are prefixed with is /_next/static, and
|
|
619
|
+
// image optimization requests are prefixed with /_next/image. We cannot
|
|
620
|
+
// route by 1 level of subdirs (ie. /_next/`), so we need to route by 2
|
|
621
|
+
// levels of subdirs.
|
|
622
|
+
if (item.name !== copy.deepRoute) {
|
|
623
|
+
dirs.push(toPosix(path.join("/", item.name)));
|
|
624
|
+
return;
|
|
625
|
+
}
|
|
626
|
+
fs.readdirSync(path.join(outputPath, copy.from, item.name), {
|
|
627
|
+
withFileTypes: true,
|
|
628
|
+
}).forEach((subItem) => {
|
|
629
|
+
if (subItem.isFile()) {
|
|
630
|
+
kvEntries[toPosix(path.join("/", item.name, subItem.name))] = "s3";
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
dirs.push(toPosix(path.join("/", item.name, subItem.name)));
|
|
634
|
+
});
|
|
635
|
+
});
|
|
636
|
+
});
|
|
637
|
+
kvEntries["metadata"] = JSON.stringify({
|
|
638
|
+
base: plan.base,
|
|
639
|
+
custom404: plan.custom404,
|
|
640
|
+
s3: {
|
|
641
|
+
domain: bucketDomain,
|
|
642
|
+
dir: plan.assets[0].to ? "/" + plan.assets[0].to : "",
|
|
643
|
+
routes: dirs,
|
|
644
|
+
},
|
|
645
|
+
image: imageOptimizerUrl
|
|
646
|
+
? {
|
|
647
|
+
host: new URL(imageOptimizerUrl).host,
|
|
648
|
+
route: plan.imageOptimizer.prefix,
|
|
649
|
+
}
|
|
650
|
+
: undefined,
|
|
651
|
+
servers: servers.map((s) => [
|
|
652
|
+
new URL(s.url).host,
|
|
653
|
+
supportedRegions[s.region].lat,
|
|
654
|
+
supportedRegions[s.region].lon,
|
|
655
|
+
]),
|
|
656
|
+
origin: {
|
|
657
|
+
timeouts: {
|
|
658
|
+
readTimeout: toSeconds(timeout),
|
|
659
|
+
},
|
|
660
|
+
},
|
|
661
|
+
});
|
|
662
|
+
return kvEntries;
|
|
663
|
+
}));
|
|
664
|
+
return new KvKeys(`${name}KvKeys`, {
|
|
665
|
+
store: kvStoreArn,
|
|
666
|
+
namespace: kvNamespace,
|
|
667
|
+
entries,
|
|
668
|
+
purge,
|
|
669
|
+
}, { parent: self });
|
|
670
|
+
}
|
|
671
|
+
function updateRouterKvRoutes() {
|
|
672
|
+
return new KvRoutesUpdate(`${name}RoutesUpdate`, {
|
|
673
|
+
store: route.routerKvStoreArn,
|
|
674
|
+
namespace: route.routerKvNamespace,
|
|
675
|
+
key: "routes",
|
|
676
|
+
entry: route.apply((route) => ["site", kvNamespace, route.hostPattern, route.pathPrefix].join(",")),
|
|
677
|
+
}, { parent: self });
|
|
678
|
+
}
|
|
679
|
+
function createInvalidation() {
|
|
680
|
+
all([args.invalidation, outputPath, plan]).apply(([invalidationRaw, outputPath, plan]) => {
|
|
681
|
+
// Normalize invalidation
|
|
682
|
+
if (invalidationRaw === false)
|
|
683
|
+
return;
|
|
684
|
+
const invalidation = Object.assign({ wait: false, paths: "all" }, invalidationRaw);
|
|
685
|
+
// We will generate a hash based on the contents of the S3 files with cache enabled.
|
|
686
|
+
// This will be used to determine if we need to invalidate our CloudFront cache.
|
|
687
|
+
const s3Origin = plan.assets;
|
|
688
|
+
const cachedS3Files = s3Origin.filter((file) => file.cached);
|
|
689
|
+
if (cachedS3Files.length === 0)
|
|
690
|
+
return;
|
|
691
|
+
// Build invalidation paths
|
|
692
|
+
const invalidationPaths = [];
|
|
693
|
+
if (invalidation.paths === "all") {
|
|
694
|
+
invalidationPaths.push("/*");
|
|
695
|
+
}
|
|
696
|
+
else if (invalidation.paths === "versioned") {
|
|
697
|
+
cachedS3Files.forEach((item) => {
|
|
698
|
+
if (!item.versionedSubDir)
|
|
699
|
+
return;
|
|
700
|
+
invalidationPaths.push(toPosix(path.join("/", item.to, item.versionedSubDir, "*")));
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
else {
|
|
704
|
+
invalidationPaths.push(...((invalidation === null || invalidation === void 0 ? void 0 : invalidation.paths) || []));
|
|
705
|
+
}
|
|
706
|
+
if (invalidationPaths.length === 0)
|
|
707
|
+
return;
|
|
708
|
+
// Build build ID
|
|
709
|
+
let invalidationBuildId;
|
|
710
|
+
if (plan.buildId) {
|
|
711
|
+
invalidationBuildId = plan.buildId;
|
|
712
|
+
}
|
|
713
|
+
else {
|
|
714
|
+
const hash = crypto.createHash("md5");
|
|
715
|
+
cachedS3Files.forEach((item) => {
|
|
716
|
+
// The below options are needed to support following symlinks when building zip files:
|
|
717
|
+
// - nodir: This will prevent symlinks themselves from being copied into the zip.
|
|
718
|
+
// - follow: This will follow symlinks and copy the files within.
|
|
719
|
+
// For versioned files, use file path for digest since file version in name should change on content change
|
|
720
|
+
if (item.versionedSubDir) {
|
|
721
|
+
globSync("**", {
|
|
722
|
+
dot: true,
|
|
723
|
+
nodir: true,
|
|
724
|
+
follow: true,
|
|
725
|
+
cwd: path.resolve(outputPath, item.from, item.versionedSubDir),
|
|
726
|
+
}).forEach((filePath) => hash.update(filePath));
|
|
727
|
+
}
|
|
728
|
+
// For non-versioned files, use file content for digest
|
|
729
|
+
if (invalidation.paths !== "versioned") {
|
|
730
|
+
globSync("**", {
|
|
731
|
+
ignore: item.versionedSubDir
|
|
732
|
+
? [toPosix(path.join(item.versionedSubDir, "**"))]
|
|
733
|
+
: undefined,
|
|
734
|
+
dot: true,
|
|
735
|
+
nodir: true,
|
|
736
|
+
follow: true,
|
|
737
|
+
cwd: path.resolve(outputPath, item.from),
|
|
738
|
+
}).forEach((filePath) => hash.update(fs.readFileSync(path.resolve(outputPath, item.from, filePath), "utf-8")));
|
|
739
|
+
}
|
|
740
|
+
});
|
|
741
|
+
invalidationBuildId = hash.digest("hex");
|
|
742
|
+
}
|
|
743
|
+
new DistributionInvalidation(`${name}Invalidation`, {
|
|
744
|
+
distributionId,
|
|
745
|
+
paths: invalidationPaths,
|
|
746
|
+
version: invalidationBuildId,
|
|
747
|
+
wait: invalidation.wait,
|
|
748
|
+
}, {
|
|
749
|
+
parent: self,
|
|
750
|
+
dependsOn: [assetsUploaded, kvUpdated, ...invalidationDependsOn],
|
|
751
|
+
});
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* The URL of the Astro site.
|
|
757
|
+
*
|
|
758
|
+
* If the `domain` is set, this is the URL with the custom domain.
|
|
759
|
+
* Otherwise, it's the auto-generated CloudFront URL.
|
|
760
|
+
*/
|
|
761
|
+
get url() {
|
|
762
|
+
return all([this.prodUrl, this.devUrl]).apply(([prodUrl, devUrl]) => (prodUrl !== null && prodUrl !== void 0 ? prodUrl : devUrl));
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* The underlying [resources](/docs/components/#nodes) this component creates.
|
|
766
|
+
*/
|
|
767
|
+
get nodes() {
|
|
768
|
+
return {
|
|
769
|
+
/**
|
|
770
|
+
* The AWS Lambda server function that renders the site.
|
|
771
|
+
*/
|
|
772
|
+
server: this.server,
|
|
773
|
+
/**
|
|
774
|
+
* The Amazon S3 Bucket that stores the assets.
|
|
775
|
+
*/
|
|
776
|
+
assets: this.bucket,
|
|
777
|
+
/**
|
|
778
|
+
* The Amazon CloudFront CDN that serves the site.
|
|
779
|
+
*/
|
|
780
|
+
cdn: this.cdn,
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
/** @internal */
|
|
784
|
+
getSSTLink() {
|
|
785
|
+
return {
|
|
786
|
+
properties: {
|
|
787
|
+
url: this.url,
|
|
788
|
+
},
|
|
789
|
+
};
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
//# sourceMappingURL=ssr-site.js.map
|