monorise 0.0.1
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/base/index.d.ts +254 -0
- package/dist/base/index.js +44 -0
- package/dist/base/index.js.map +1 -0
- package/dist/cli/cli.d.ts +1 -0
- package/dist/cli/cli.js +461 -0
- package/dist/cli/cli.js.map +1 -0
- package/dist/core/index.d.ts +4767 -0
- package/dist/core/index.js +7941 -0
- package/dist/core/index.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +11 -0
- package/dist/react/actions/app.action.d.ts +46 -0
- package/dist/react/actions/app.action.d.ts.map +1 -0
- package/dist/react/actions/auth.action.d.ts +24 -0
- package/dist/react/actions/auth.action.d.ts.map +1 -0
- package/dist/react/actions/config.action.d.ts +10 -0
- package/dist/react/actions/config.action.d.ts.map +1 -0
- package/dist/react/actions/core.action.d.ts +219 -0
- package/dist/react/actions/core.action.d.ts.map +1 -0
- package/dist/react/index.d.ts +1093 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +2344 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/lib/api.d.ts +38 -0
- package/dist/react/lib/api.d.ts.map +1 -0
- package/dist/react/lib/constant.d.ts +2 -0
- package/dist/react/lib/constant.d.ts.map +1 -0
- package/dist/react/lib/entity.d.ts +10 -0
- package/dist/react/lib/entity.d.ts.map +1 -0
- package/dist/react/lib/utils.d.ts +10 -0
- package/dist/react/lib/utils.d.ts.map +1 -0
- package/dist/react/services/auth.service.d.ts +21 -0
- package/dist/react/services/auth.service.d.ts.map +1 -0
- package/dist/react/services/core.service.d.ts +76 -0
- package/dist/react/services/core.service.d.ts.map +1 -0
- package/dist/react/services/filestore.service.d.ts +22 -0
- package/dist/react/services/filestore.service.d.ts.map +1 -0
- package/dist/react/store/monorise.store.d.ts +169 -0
- package/dist/react/store/monorise.store.d.ts.map +1 -0
- package/dist/react/tsup.config.d.ts +3 -0
- package/dist/react/tsup.config.d.ts.map +1 -0
- package/dist/react/types/api.type.d.ts +30 -0
- package/dist/react/types/api.type.d.ts.map +1 -0
- package/dist/react/types/axios.type.d.ts +13 -0
- package/dist/react/types/axios.type.d.ts.map +1 -0
- package/dist/react/types/monorise.type.d.ts +8 -0
- package/dist/react/types/monorise.type.d.ts.map +1 -0
- package/dist/react/types/mutual.type.d.ts +21 -0
- package/dist/react/types/mutual.type.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/analog.d.ts +423 -0
- package/dist/sst/.sst/platform/src/components/aws/analog.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts +74 -0
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket.d.ts +542 -0
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-api-key.d.ts +48 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-api-key.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-authorizer.d.ts +55 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-authorizer.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-base-route.d.ts +36 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-base-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-integration-route.d.ts +39 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-integration-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts +53 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-usage-plan.d.ts +53 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-usage-plan.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1.d.ts +1002 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-authorizer.d.ts +54 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-authorizer.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-base-route.d.ts +28 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-base-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts +59 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-private-route.d.ts +54 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-private-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-url-route.d.ts +44 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-url-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2.d.ts +931 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-data-source.d.ts +52 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-data-source.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-function.d.ts +33 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-function.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-resolver.d.ts +41 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-resolver.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync.d.ts +638 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/astro.d.ts +421 -0
- package/dist/sst/.sst/platform/src/components/aws/astro.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/aurora.d.ts +702 -0
- package/dist/sst/.sst/platform/src/components/aws/aurora.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/auth-v1.d.ts +26 -0
- package/dist/sst/.sst/platform/src/components/aws/auth-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/auth.d.ts +295 -0
- package/dist/sst/.sst/platform/src/components/aws/auth.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts +61 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-notification.d.ts +47 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-notification.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-queue-subscriber.d.ts +55 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-queue-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-topic-subscriber.d.ts +55 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-topic-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket.d.ts +1216 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-base-subscriber.d.ts +20 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-base-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts +49 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-queue-subscriber.d.ts +44 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-queue-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bus.d.ts +403 -0
- package/dist/sst/.sst/platform/src/components/aws/bus.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cdn.d.ts +299 -0
- package/dist/sst/.sst/platform/src/components/aws/cdn.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cluster-v1.d.ts +882 -0
- package/dist/sst/.sst/platform/src/components/aws/cluster-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cluster.d.ts +306 -0
- package/dist/sst/.sst/platform/src/components/aws/cluster.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-pool.d.ts +194 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-pool.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-provider.d.ts +38 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-provider.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool-client.d.ts +50 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool-client.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool.d.ts +603 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cron.d.ts +250 -0
- package/dist/sst/.sst/platform/src/components/aws/cron.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/dns-validated-certificate.d.ts +27 -0
- package/dist/sst/.sst/platform/src/components/aws/dns-validated-certificate.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/dns.d.ts +94 -0
- package/dist/sst/.sst/platform/src/components/aws/dns.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts +55 -0
- package/dist/sst/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/dynamo.d.ts +568 -0
- package/dist/sst/.sst/platform/src/components/aws/dynamo.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/efs.d.ts +217 -0
- package/dist/sst/.sst/platform/src/components/aws/efs.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/email.d.ts +291 -0
- package/dist/sst/.sst/platform/src/components/aws/email.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/fargate.d.ts +803 -0
- package/dist/sst/.sst/platform/src/components/aws/fargate.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/function.d.ts +1629 -0
- package/dist/sst/.sst/platform/src/components/aws/function.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/apigateway-account.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/apigateway-account.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.d.ts +144 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/arn.d.ts +40 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/arn.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/bootstrap.d.ts +13 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/bootstrap.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/container-builder.d.ts +4 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/container-builder.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/function-builder.d.ts +10 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/function-builder.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/provider.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/provider.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/quota.d.ts +7 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/quota.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/site-builder.d.ts +4 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/site-builder.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/subscriber.d.ts +6 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/https-redirect.d.ts +38 -0
- package/dist/sst/.sst/platform/src/components/aws/https-redirect.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/iam-edit.d.ts +39 -0
- package/dist/sst/.sst/platform/src/components/aws/iam-edit.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/index.d.ts +48 -0
- package/dist/sst/.sst/platform/src/components/aws/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.d.ts +48 -0
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream.d.ts +249 -0
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/linkable.d.ts +17 -0
- package/dist/sst/.sst/platform/src/components/aws/linkable.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/logging.d.ts +26 -0
- package/dist/sst/.sst/platform/src/components/aws/logging.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/mysql.d.ts +496 -0
- package/dist/sst/.sst/platform/src/components/aws/mysql.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/nextjs.d.ts +517 -0
- package/dist/sst/.sst/platform/src/components/aws/nextjs.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/nuxt.d.ts +495 -0
- package/dist/sst/.sst/platform/src/components/aws/nuxt.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/open-search.d.ts +295 -0
- package/dist/sst/.sst/platform/src/components/aws/open-search.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/opencontrol.d.ts +165 -0
- package/dist/sst/.sst/platform/src/components/aws/opencontrol.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/permission.d.ts +40 -0
- package/dist/sst/.sst/platform/src/components/aws/permission.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/postgres-v1.d.ts +317 -0
- package/dist/sst/.sst/platform/src/components/aws/postgres-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/postgres.d.ts +500 -0
- package/dist/sst/.sst/platform/src/components/aws/postgres.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/bucket-files.d.ts +18 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/bucket-files.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.d.ts +13 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/distribution-invalidation.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/distribution-invalidation.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/function-environment-update.d.ts +29 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/function-environment-update.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/hosted-zone-lookup.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/hosted-zone-lookup.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/kv-keys.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/kv-keys.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/kv-routes-update.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/kv-routes-update.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/origin-access-control.d.ts +8 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/origin-access-control.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/rds-role-lookup.d.ts +8 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/rds-role-lookup.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/vector-table.d.ts +12 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/vector-table.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts +48 -0
- package/dist/sst/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/queue.d.ts +485 -0
- package/dist/sst/.sst/platform/src/components/aws/queue.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/react.d.ts +416 -0
- package/dist/sst/.sst/platform/src/components/aws/react.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts +53 -0
- package/dist/sst/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/realtime.d.ts +232 -0
- package/dist/sst/.sst/platform/src/components/aws/realtime.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/redis-v1.d.ts +338 -0
- package/dist/sst/.sst/platform/src/components/aws/redis-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/redis.d.ts +364 -0
- package/dist/sst/.sst/platform/src/components/aws/redis.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/remix.d.ts +423 -0
- package/dist/sst/.sst/platform/src/components/aws/remix.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/router-base-route.d.ts +28 -0
- package/dist/sst/.sst/platform/src/components/aws/router-base-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/router-bucket-route.d.ts +29 -0
- package/dist/sst/.sst/platform/src/components/aws/router-bucket-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/router-url-route.d.ts +28 -0
- package/dist/sst/.sst/platform/src/components/aws/router-url-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/router.d.ts +1272 -0
- package/dist/sst/.sst/platform/src/components/aws/router.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/service-v1.d.ts +78 -0
- package/dist/sst/.sst/platform/src/components/aws/service-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/service.d.ts +1625 -0
- package/dist/sst/.sst/platform/src/components/aws/service.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts +53 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-queue-subscriber.d.ts +55 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-queue-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic.d.ts +389 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/solid-start.d.ts +414 -0
- package/dist/sst/.sst/platform/src/components/aws/solid-start.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/ssr-site.d.ts +685 -0
- package/dist/sst/.sst/platform/src/components/aws/ssr-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/static-site.d.ts +736 -0
- package/dist/sst/.sst/platform/src/components/aws/static-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/choice.d.ts +73 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/choice.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/fail.d.ts +63 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/fail.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/map.d.ts +236 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/map.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/parallel.d.ts +127 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/parallel.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/pass.d.ts +39 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/pass.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/state.d.ts +231 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/state.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/succeed.d.ts +26 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/succeed.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/task.d.ts +477 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/task.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/wait.d.ts +91 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/wait.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions.d.ts +473 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/svelte-kit.d.ts +417 -0
- package/dist/sst/.sst/platform/src/components/aws/svelte-kit.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/tan-stack-start.d.ts +354 -0
- package/dist/sst/.sst/platform/src/components/aws/tan-stack-start.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/task.d.ts +322 -0
- package/dist/sst/.sst/platform/src/components/aws/task.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/vector.d.ts +150 -0
- package/dist/sst/.sst/platform/src/components/aws/vector.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/vpc-v1.d.ts +208 -0
- package/dist/sst/.sst/platform/src/components/aws/vpc-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/vpc.d.ts +444 -0
- package/dist/sst/.sst/platform/src/components/aws/vpc.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/base/base-site.d.ts +53 -0
- package/dist/sst/.sst/platform/src/components/base/base-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/base/base-ssr-site.d.ts +13 -0
- package/dist/sst/.sst/platform/src/components/base/base-ssr-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/base/base-static-site.d.ts +199 -0
- package/dist/sst/.sst/platform/src/components/base/base-static-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/account-id.d.ts +2 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/account-id.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/auth.d.ts +22 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/auth.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/binding.d.ts +69 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/binding.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/bucket.d.ts +103 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/bucket.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/cron.d.ts +121 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/cron.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/d1.d.ts +107 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/d1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/dns.d.ts +94 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/dns.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/astro.d.ts +186 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/astro.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/index.d.ts +4 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/solid-start.d.ts +171 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/solid-start.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/static-site.d.ts +222 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/static-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/helpers/fetch.d.ts +19 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/helpers/fetch.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/helpers/worker-builder.d.ts +10 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/helpers/worker-builder.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/index.d.ts +16 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/kv.d.ts +107 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/kv.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/dns-record.d.ts +20 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/dns-record.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/kv-data.d.ts +23 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/kv-data.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-assets.d.ts +18 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-assets.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-url.d.ts +22 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-url.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/zone-lookup.d.ts +22 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/zone-lookup.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/queue.d.ts +60 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/queue.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/ssr-site.d.ts +51 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/ssr-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/static-site.d.ts +262 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/static-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/worker.d.ts +295 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/worker.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/component.d.ts +37 -0
- package/dist/sst/.sst/platform/src/components/component.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cpu.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/cpu.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/dns.d.ts +59 -0
- package/dist/sst/.sst/platform/src/components/dns.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/duration.d.ts +7 -0
- package/dist/sst/.sst/platform/src/components/duration.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/error.d.ts +4 -0
- package/dist/sst/.sst/platform/src/components/error.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/experimental/dev-command.d.ts +99 -0
- package/dist/sst/.sst/platform/src/components/experimental/dev-command.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/experimental/index.d.ts +2 -0
- package/dist/sst/.sst/platform/src/components/experimental/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/index.d.ts +16 -0
- package/dist/sst/.sst/platform/src/components/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/input.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/input.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/link.d.ts +41 -0
- package/dist/sst/.sst/platform/src/components/link.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/linkable.d.ts +271 -0
- package/dist/sst/.sst/platform/src/components/linkable.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/naming.d.ts +7 -0
- package/dist/sst/.sst/platform/src/components/naming.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/path.d.ts +2 -0
- package/dist/sst/.sst/platform/src/components/path.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/rpc/rpc.d.ts +19 -0
- package/dist/sst/.sst/platform/src/components/rpc/rpc.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/secret.d.ts +125 -0
- package/dist/sst/.sst/platform/src/components/secret.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/size.d.ts +5 -0
- package/dist/sst/.sst/platform/src/components/size.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/vercel/account-id.d.ts +2 -0
- package/dist/sst/.sst/platform/src/components/vercel/account-id.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/vercel/dns.d.ts +73 -0
- package/dist/sst/.sst/platform/src/components/vercel/dns.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/vercel/index.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/vercel/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/vercel/providers/dns-record.d.ts +14 -0
- package/dist/sst/.sst/platform/src/components/vercel/providers/dns-record.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/config.d.ts +1258 -0
- package/dist/sst/.sst/platform/src/config.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/util/compare-semver.d.ts +4 -0
- package/dist/sst/.sst/platform/src/util/compare-semver.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/util/fs.d.ts +5 -0
- package/dist/sst/.sst/platform/src/util/fs.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/util/lazy.d.ts +2 -0
- package/dist/sst/.sst/platform/src/util/lazy.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/util/semaphore.d.ts +9 -0
- package/dist/sst/.sst/platform/src/util/semaphore.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/util/warn.d.ts +2 -0
- package/dist/sst/.sst/platform/src/util/warn.d.ts.map +1 -0
- package/dist/sst/components/dashboard.d.ts +2 -0
- package/dist/sst/components/dashboard.d.ts.map +1 -0
- package/dist/sst/components/monorise-core.d.ts +18 -0
- package/dist/sst/components/monorise-core.d.ts.map +1 -0
- package/dist/sst/components/q-function.d.ts +17 -0
- package/dist/sst/components/q-function.d.ts.map +1 -0
- package/dist/sst/components/single-table.d.ts +14 -0
- package/dist/sst/components/single-table.d.ts.map +1 -0
- package/dist/sst/constants/event.d.ts +73 -0
- package/dist/sst/constants/event.d.ts.map +1 -0
- package/dist/sst/constants/table.d.ts +3 -0
- package/dist/sst/constants/table.d.ts.map +1 -0
- package/dist/sst/index.d.ts +11 -0
- package/dist/sst/index.d.ts.map +1 -0
- package/dist/sst/index.js +609 -0
- package/dist/sst/index.js.map +1 -0
- package/dist/sst/sst.config.d.ts +3 -0
- package/dist/sst/sst.config.d.ts.map +1 -0
- package/dist/sst/tsup.config.d.ts +3 -0
- package/dist/sst/tsup.config.d.ts.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
import { ComponentResourceOptions, Output } from "@pulumi/pulumi";
|
|
2
|
+
import { Plan, SsrSite, SsrSiteArgs } from "./ssr-site.js";
|
|
3
|
+
export interface ReactArgs extends SsrSiteArgs {
|
|
4
|
+
/**
|
|
5
|
+
* Configure how this component works in `sst dev`.
|
|
6
|
+
*
|
|
7
|
+
* :::note
|
|
8
|
+
* In `sst dev` your React app is run in dev mode; it's not deployed.
|
|
9
|
+
* :::
|
|
10
|
+
*
|
|
11
|
+
* Instead of deploying your React app, this starts it in dev mode. It's run
|
|
12
|
+
* as a separate process in the `sst dev` multiplexer. Read more about
|
|
13
|
+
* [`sst dev`](/docs/reference/cli/#dev).
|
|
14
|
+
*
|
|
15
|
+
* To disable dev mode, pass in `false`.
|
|
16
|
+
*/
|
|
17
|
+
dev?: SsrSiteArgs["dev"];
|
|
18
|
+
/**
|
|
19
|
+
* Permissions and the resources that the [server function](#nodes-server) in your React app needs to access. These permissions are used to create the function's IAM role.
|
|
20
|
+
*
|
|
21
|
+
* :::tip
|
|
22
|
+
* If you `link` the function to a resource, the permissions to access it are
|
|
23
|
+
* automatically added.
|
|
24
|
+
* :::
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* Allow reading and writing to an S3 bucket called `my-bucket`.
|
|
28
|
+
* ```js
|
|
29
|
+
* {
|
|
30
|
+
* permissions: [
|
|
31
|
+
* {
|
|
32
|
+
* actions: ["s3:GetObject", "s3:PutObject"],
|
|
33
|
+
* resources: ["arn:aws:s3:::my-bucket/*"]
|
|
34
|
+
* },
|
|
35
|
+
* ]
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* Perform all actions on an S3 bucket called `my-bucket`.
|
|
40
|
+
*
|
|
41
|
+
* ```js
|
|
42
|
+
* {
|
|
43
|
+
* permissions: [
|
|
44
|
+
* {
|
|
45
|
+
* actions: ["s3:*"],
|
|
46
|
+
* resources: ["arn:aws:s3:::my-bucket/*"]
|
|
47
|
+
* },
|
|
48
|
+
* ]
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* Grant permissions to access all resources.
|
|
53
|
+
*
|
|
54
|
+
* ```js
|
|
55
|
+
* {
|
|
56
|
+
* permissions: [
|
|
57
|
+
* {
|
|
58
|
+
* actions: ["*"],
|
|
59
|
+
* resources: ["*"]
|
|
60
|
+
* },
|
|
61
|
+
* ]
|
|
62
|
+
* }
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
permissions?: SsrSiteArgs["permissions"];
|
|
66
|
+
/**
|
|
67
|
+
* Path to the directory where your React app is located. This path is relative to your `sst.config.ts`.
|
|
68
|
+
*
|
|
69
|
+
* By default it assumes your React app is in the root of your SST app.
|
|
70
|
+
* @default `"."`
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
*
|
|
74
|
+
* If your React app is in a package in your monorepo.
|
|
75
|
+
*
|
|
76
|
+
* ```js
|
|
77
|
+
* {
|
|
78
|
+
* path: "packages/web"
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
path?: SsrSiteArgs["path"];
|
|
83
|
+
/**
|
|
84
|
+
* [Link resources](/docs/linking/) to your React app. This will:
|
|
85
|
+
*
|
|
86
|
+
* 1. Grant the permissions needed to access the resources.
|
|
87
|
+
* 2. Allow you to access it in your site using the [SDK](/docs/reference/sdk/).
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
*
|
|
91
|
+
* Takes a list of resources to link to the function.
|
|
92
|
+
*
|
|
93
|
+
* ```js
|
|
94
|
+
* {
|
|
95
|
+
* link: [bucket, stripeKey]
|
|
96
|
+
* }
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
link?: SsrSiteArgs["link"];
|
|
100
|
+
/**
|
|
101
|
+
* Configure how the CloudFront cache invalidations are handled. This is run after your React app has been deployed.
|
|
102
|
+
* :::tip
|
|
103
|
+
* You get 1000 free invalidations per month. After that you pay $0.005 per invalidation path. [Read more here](https://aws.amazon.com/cloudfront/pricing/).
|
|
104
|
+
* :::
|
|
105
|
+
* @default `{paths: "all", wait: false}`
|
|
106
|
+
* @example
|
|
107
|
+
* Wait for all paths to be invalidated.
|
|
108
|
+
* ```js
|
|
109
|
+
* {
|
|
110
|
+
* invalidation: {
|
|
111
|
+
* paths: "all",
|
|
112
|
+
* wait: true
|
|
113
|
+
* }
|
|
114
|
+
* }
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
invalidation?: SsrSiteArgs["invalidation"];
|
|
118
|
+
/**
|
|
119
|
+
* Set [environment variables](https://vitejs.dev/guide/env-and-mode) in your React app. These are made available:
|
|
120
|
+
*
|
|
121
|
+
* 1. In `react-router build`, they are loaded into `process.env`.
|
|
122
|
+
* 2. Locally while running `react-router dev` through `sst dev`.
|
|
123
|
+
*
|
|
124
|
+
* :::tip
|
|
125
|
+
* You can also `link` resources to your React app and access them in a type-safe way with the [SDK](/docs/reference/sdk/). We recommend linking since it's more secure.
|
|
126
|
+
* :::
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* ```js
|
|
130
|
+
* {
|
|
131
|
+
* environment: {
|
|
132
|
+
* API_URL: api.url,
|
|
133
|
+
* STRIPE_PUBLISHABLE_KEY: "pk_test_123"
|
|
134
|
+
* }
|
|
135
|
+
* }
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
138
|
+
environment?: SsrSiteArgs["environment"];
|
|
139
|
+
/**
|
|
140
|
+
* Set a custom domain for your React app.
|
|
141
|
+
*
|
|
142
|
+
* Automatically manages domains hosted on AWS Route 53, Cloudflare, and Vercel. For other
|
|
143
|
+
* providers, you'll need to pass in a `cert` that validates domain ownership and add the
|
|
144
|
+
* DNS records.
|
|
145
|
+
*
|
|
146
|
+
* :::tip
|
|
147
|
+
* Built-in support for AWS Route 53, Cloudflare, and Vercel. And manual setup for other
|
|
148
|
+
* providers.
|
|
149
|
+
* :::
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
*
|
|
153
|
+
* By default this assumes the domain is hosted on Route 53.
|
|
154
|
+
*
|
|
155
|
+
* ```js
|
|
156
|
+
* {
|
|
157
|
+
* domain: "example.com"
|
|
158
|
+
* }
|
|
159
|
+
* ```
|
|
160
|
+
*
|
|
161
|
+
* For domains hosted on Cloudflare.
|
|
162
|
+
*
|
|
163
|
+
* ```js
|
|
164
|
+
* {
|
|
165
|
+
* domain: {
|
|
166
|
+
* name: "example.com",
|
|
167
|
+
* dns: sst.cloudflare.dns()
|
|
168
|
+
* }
|
|
169
|
+
* }
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
172
|
+
* Specify a `www.` version of the custom domain.
|
|
173
|
+
*
|
|
174
|
+
* ```js
|
|
175
|
+
* {
|
|
176
|
+
* domain: {
|
|
177
|
+
* name: "domain.com",
|
|
178
|
+
* redirects: ["www.domain.com"]
|
|
179
|
+
* }
|
|
180
|
+
* }
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
domain?: SsrSiteArgs["domain"];
|
|
184
|
+
/**
|
|
185
|
+
* Serve your React app through a `Router` instead of a standalone CloudFront
|
|
186
|
+
* distribution.
|
|
187
|
+
*
|
|
188
|
+
* By default, this component creates a new CloudFront distribution. But you might
|
|
189
|
+
* want to serve it through the distribution of your `Router` as a:
|
|
190
|
+
*
|
|
191
|
+
* - A path like `/docs`
|
|
192
|
+
* - A subdomain like `docs.example.com`
|
|
193
|
+
* - Or a combined pattern like `dev.example.com/docs`
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
*
|
|
197
|
+
* To serve your React app **from a path**, you'll need to configure the root domain
|
|
198
|
+
* in your `Router` component.
|
|
199
|
+
*
|
|
200
|
+
* ```ts title="sst.config.ts" {2}
|
|
201
|
+
* const router = new sst.aws.Router("Router", {
|
|
202
|
+
* domain: "example.com"
|
|
203
|
+
* });
|
|
204
|
+
* ```
|
|
205
|
+
*
|
|
206
|
+
* Now set the `router` and the `path`.
|
|
207
|
+
*
|
|
208
|
+
* ```ts {3,4}
|
|
209
|
+
* {
|
|
210
|
+
* router: {
|
|
211
|
+
* instance: router,
|
|
212
|
+
* path: "/docs"
|
|
213
|
+
* }
|
|
214
|
+
* }
|
|
215
|
+
* ```
|
|
216
|
+
*
|
|
217
|
+
* You also need to set the `base` property in your `vite.config.ts`.
|
|
218
|
+
*
|
|
219
|
+
* :::caution
|
|
220
|
+
* If routing to a path, you need to set that as the base path in your
|
|
221
|
+
* `vite.config.ts` and `reac-router.config.ts` as well.
|
|
222
|
+
* :::
|
|
223
|
+
*
|
|
224
|
+
* ```js title="vite.config.ts" {3}
|
|
225
|
+
* export default defineConfig({
|
|
226
|
+
* plugins: [tailwindcss(), reactRouter(), tsconfigPaths()],
|
|
227
|
+
* base: "/docs/"
|
|
228
|
+
* });
|
|
229
|
+
* ```
|
|
230
|
+
*
|
|
231
|
+
* And the `basename` in your React Router configuration.
|
|
232
|
+
*
|
|
233
|
+
* ```jsx title="react-router.config.ts" {2}
|
|
234
|
+
* export const routerConfig = {
|
|
235
|
+
* basename: "/docs"
|
|
236
|
+
* };
|
|
237
|
+
* ```
|
|
238
|
+
*
|
|
239
|
+
* To serve your React app **from a subdomain**, you'll need to configure the
|
|
240
|
+
* domain in your `Router` component to match both the root and the subdomain.
|
|
241
|
+
*
|
|
242
|
+
* ```ts title="sst.config.ts" {3,4}
|
|
243
|
+
* const router = new sst.aws.Router("Router", {
|
|
244
|
+
* domain: {
|
|
245
|
+
* name: "example.com",
|
|
246
|
+
* aliases: ["*.example.com"]
|
|
247
|
+
* }
|
|
248
|
+
* });
|
|
249
|
+
* ```
|
|
250
|
+
*
|
|
251
|
+
* Now set the `domain` in the `router` prop.
|
|
252
|
+
*
|
|
253
|
+
* ```ts {4}
|
|
254
|
+
* {
|
|
255
|
+
* router: {
|
|
256
|
+
* instance: router,
|
|
257
|
+
* domain: "docs.example.com"
|
|
258
|
+
* }
|
|
259
|
+
* }
|
|
260
|
+
* ```
|
|
261
|
+
*
|
|
262
|
+
* Finally, to serve your React app **from a combined pattern** like
|
|
263
|
+
* `dev.example.com/docs`, you'll need to configure the domain in your `Router` to
|
|
264
|
+
* match the subdomain.
|
|
265
|
+
*
|
|
266
|
+
* ```ts title="sst.config.ts" {3,4}
|
|
267
|
+
* const router = new sst.aws.Router("Router", {
|
|
268
|
+
* domain: {
|
|
269
|
+
* name: "example.com",
|
|
270
|
+
* aliases: ["*.example.com"]
|
|
271
|
+
* }
|
|
272
|
+
* });
|
|
273
|
+
* ```
|
|
274
|
+
*
|
|
275
|
+
* And set the `domain` and the `path`.
|
|
276
|
+
*
|
|
277
|
+
* ```ts {4,5}
|
|
278
|
+
* {
|
|
279
|
+
* router: {
|
|
280
|
+
* instance: router,
|
|
281
|
+
* domain: "dev.example.com",
|
|
282
|
+
* path: "/docs"
|
|
283
|
+
* }
|
|
284
|
+
* }
|
|
285
|
+
* ```
|
|
286
|
+
*
|
|
287
|
+
* Also, make sure to set the base path in your `vite.config.ts` and `basename`
|
|
288
|
+
* in your `react-router.config.ts`, like above.
|
|
289
|
+
*/
|
|
290
|
+
router?: SsrSiteArgs["router"];
|
|
291
|
+
/**
|
|
292
|
+
* The command used internally to build your React app.
|
|
293
|
+
*
|
|
294
|
+
* @default `"npm run build"`
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
*
|
|
298
|
+
* If you want to use a different build command.
|
|
299
|
+
* ```js
|
|
300
|
+
* {
|
|
301
|
+
* buildCommand: "yarn build"
|
|
302
|
+
* }
|
|
303
|
+
* ```
|
|
304
|
+
*/
|
|
305
|
+
buildCommand?: SsrSiteArgs["buildCommand"];
|
|
306
|
+
/**
|
|
307
|
+
* Configure how the React app assets are uploaded to S3.
|
|
308
|
+
*
|
|
309
|
+
* By default, this is set to the following. Read more about these options below.
|
|
310
|
+
* ```js
|
|
311
|
+
* {
|
|
312
|
+
* assets: {
|
|
313
|
+
* textEncoding: "utf-8",
|
|
314
|
+
* versionedFilesCacheHeader: "public,max-age=31536000,immutable",
|
|
315
|
+
* nonVersionedFilesCacheHeader: "public,max-age=0,s-maxage=86400,stale-while-revalidate=8640"
|
|
316
|
+
* }
|
|
317
|
+
* }
|
|
318
|
+
* ```
|
|
319
|
+
*/
|
|
320
|
+
assets?: SsrSiteArgs["assets"];
|
|
321
|
+
/**
|
|
322
|
+
* Configure the React app to use an existing CloudFront cache policy. By default,
|
|
323
|
+
* a new cache policy is created. Note that CloudFront has a limit of 20 cache
|
|
324
|
+
* policies per account. This allows you to reuse an existing policy instead of
|
|
325
|
+
* creating a new one.
|
|
326
|
+
* @default A new cache policy is created
|
|
327
|
+
* @example
|
|
328
|
+
* ```js
|
|
329
|
+
* {
|
|
330
|
+
* cachePolicy: "658327ea-f89d-4fab-a63d-7e88639e58f6"
|
|
331
|
+
* }
|
|
332
|
+
* ```
|
|
333
|
+
*/
|
|
334
|
+
cachePolicy?: SsrSiteArgs["cachePolicy"];
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* The `React` component lets you deploy a React app built with [React Router](https://reactrouter.com/) app to AWS.
|
|
338
|
+
*
|
|
339
|
+
* @example
|
|
340
|
+
*
|
|
341
|
+
* #### Minimal example
|
|
342
|
+
*
|
|
343
|
+
* Deploy a React app that's in the project root.
|
|
344
|
+
*
|
|
345
|
+
* ```js
|
|
346
|
+
* new sst.aws.React("MyWeb");
|
|
347
|
+
* ```
|
|
348
|
+
*
|
|
349
|
+
* #### Change the path
|
|
350
|
+
*
|
|
351
|
+
* Deploys the React app in the `my-react-app/` directory.
|
|
352
|
+
*
|
|
353
|
+
* ```js {2}
|
|
354
|
+
* new sst.aws.React("MyWeb", {
|
|
355
|
+
* path: "my-react-app/"
|
|
356
|
+
* });
|
|
357
|
+
* ```
|
|
358
|
+
*
|
|
359
|
+
* #### Add a custom domain
|
|
360
|
+
*
|
|
361
|
+
* Set a custom domain for your React app.
|
|
362
|
+
*
|
|
363
|
+
* ```js {2}
|
|
364
|
+
* new sst.aws.React("MyWeb", {
|
|
365
|
+
* domain: "my-app.com"
|
|
366
|
+
* });
|
|
367
|
+
* ```
|
|
368
|
+
*
|
|
369
|
+
* #### Redirect www to apex domain
|
|
370
|
+
*
|
|
371
|
+
* Redirect `www.my-app.com` to `my-app.com`.
|
|
372
|
+
*
|
|
373
|
+
* ```js {4}
|
|
374
|
+
* new sst.aws.React("MyWeb", {
|
|
375
|
+
* domain: {
|
|
376
|
+
* name: "my-app.com",
|
|
377
|
+
* redirects: ["www.my-app.com"]
|
|
378
|
+
* }
|
|
379
|
+
* });
|
|
380
|
+
* ```
|
|
381
|
+
*
|
|
382
|
+
* #### Link resources
|
|
383
|
+
*
|
|
384
|
+
* [Link resources](/docs/linking/) to your React app. This will grant permissions
|
|
385
|
+
* to the resources and allow you to access it in your app.
|
|
386
|
+
*
|
|
387
|
+
* ```ts {4}
|
|
388
|
+
* const bucket = new sst.aws.Bucket("MyBucket");
|
|
389
|
+
*
|
|
390
|
+
* new sst.aws.React("MyWeb", {
|
|
391
|
+
* link: [bucket]
|
|
392
|
+
* });
|
|
393
|
+
* ```
|
|
394
|
+
*
|
|
395
|
+
* You can use the [SDK](/docs/reference/sdk/) to access the linked resources
|
|
396
|
+
* in your React app.
|
|
397
|
+
*
|
|
398
|
+
* ```ts title="app/root.tsx"
|
|
399
|
+
* import { Resource } from "sst";
|
|
400
|
+
*
|
|
401
|
+
* console.log(Resource.MyBucket.name);
|
|
402
|
+
* ```
|
|
403
|
+
*/
|
|
404
|
+
export declare class React extends SsrSite {
|
|
405
|
+
constructor(name: string, args?: ReactArgs, opts?: ComponentResourceOptions);
|
|
406
|
+
protected normalizeBuildCommand(): void;
|
|
407
|
+
protected buildPlan(outputPath: Output<string>): Output<Plan>;
|
|
408
|
+
/**
|
|
409
|
+
* The URL of the React app.
|
|
410
|
+
*
|
|
411
|
+
* If the `domain` is set, this is the URL with the custom domain.
|
|
412
|
+
* Otherwise, it's the auto-generated CloudFront URL.
|
|
413
|
+
*/
|
|
414
|
+
get url(): Output<string>;
|
|
415
|
+
}
|
|
416
|
+
//# sourceMappingURL=react.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../../../../.sst/platform/src/components/aws/react.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,EAAU,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE3D,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C;;;;;;;;;;;;OAYG;IACH,GAAG,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;IACzC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B;;;;;;;;;;;;;;;;OAgBG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;IAC3C;;;;;;;;;;;;;;;;;;;OAmBG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;IACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2CG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC/B;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;IAC3C;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC/B;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;CAC1C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,qBAAa,KAAM,SAAQ,OAAO;gBAE9B,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,SAAc,EACpB,IAAI,GAAE,wBAA6B;IAKrC,SAAS,CAAC,qBAAqB;IAE/B,SAAS,CAAC,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC;IAuF7D;;;;;OAKG;IACH,IAAW,GAAG,mBAEb;CACF"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ComponentResourceOptions, Input, Output } from "@pulumi/pulumi";
|
|
2
|
+
import { Component } from "../component";
|
|
3
|
+
import { Function, FunctionArgs } from "./function";
|
|
4
|
+
import { RealtimeSubscriberArgs } from "./realtime";
|
|
5
|
+
export interface Args extends RealtimeSubscriberArgs {
|
|
6
|
+
/**
|
|
7
|
+
* The IoT WebSocket server to use.
|
|
8
|
+
*/
|
|
9
|
+
iot: Input<{
|
|
10
|
+
/**
|
|
11
|
+
* The name of the Realtime component.
|
|
12
|
+
*/
|
|
13
|
+
name: Input<string>;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* The subscriber function.
|
|
17
|
+
*/
|
|
18
|
+
subscriber: Input<string | FunctionArgs>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The `RealtimeLambdaSubscriber` component is internally used by the `Realtime` component
|
|
22
|
+
* to add subscriptions to the [AWS IoT endpoint](https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html).
|
|
23
|
+
*
|
|
24
|
+
* :::note
|
|
25
|
+
* This component is not intended to be created directly.
|
|
26
|
+
* :::
|
|
27
|
+
*
|
|
28
|
+
* You'll find this component returned by the `subscribe` method of the `Realtime` component.
|
|
29
|
+
*/
|
|
30
|
+
export declare class RealtimeLambdaSubscriber extends Component {
|
|
31
|
+
private readonly fn;
|
|
32
|
+
private readonly permission;
|
|
33
|
+
private readonly rule;
|
|
34
|
+
constructor(name: string, args: Args, opts?: ComponentResourceOptions);
|
|
35
|
+
/**
|
|
36
|
+
* The underlying [resources](/docs/components/#nodes) this component creates.
|
|
37
|
+
*/
|
|
38
|
+
get nodes(): {
|
|
39
|
+
/**
|
|
40
|
+
* The Lambda function that'll be notified.
|
|
41
|
+
*/
|
|
42
|
+
readonly function: Output<Function>;
|
|
43
|
+
/**
|
|
44
|
+
* The Lambda permission.
|
|
45
|
+
*/
|
|
46
|
+
permission: import("@pulumi/aws/lambda/permission").Permission;
|
|
47
|
+
/**
|
|
48
|
+
* The IoT Topic rule.
|
|
49
|
+
*/
|
|
50
|
+
rule: import("@pulumi/aws/iot/topicRule").TopicRule;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=realtime-lambda-subscriber.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime-lambda-subscriber.d.ts","sourceRoot":"","sources":["../../../../../../.sst/platform/src/components/aws/realtime-lambda-subscriber.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,EACL,MAAM,EAGP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAa,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAMpD,MAAM,WAAW,IAAK,SAAQ,sBAAsB;IAClD;;OAEG;IACH,GAAG,EAAE,KAAK,CAAC;QACT;;WAEG;QACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;KACrB,CAAC,CAAC;IACH;;OAEG;IACH,UAAU,EAAE,KAAK,CAAC,MAAM,GAAG,YAAY,CAAC,CAAC;CAC1C;AAED;;;;;;;;;GASG;AACH,qBAAa,wBAAyB,SAAQ,SAAS;IACrD,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAkB;IACrC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoB;IAC/C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAgB;gBAEzB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,wBAAwB;IAwDrE;;OAEG;IACH,IAAW,KAAK;QAGZ;;WAEG;;QAIH;;WAEG;;QAEH;;WAEG;;MAGN;CACF"}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { ComponentResourceOptions, Output } from "@pulumi/pulumi";
|
|
2
|
+
import { Component, Transform } from "../component";
|
|
3
|
+
import { Link } from "../link";
|
|
4
|
+
import type { Input } from "../input";
|
|
5
|
+
import { Function, FunctionArgs, FunctionArn } from "./function";
|
|
6
|
+
import { RealtimeLambdaSubscriber } from "./realtime-lambda-subscriber";
|
|
7
|
+
import { iot } from "@pulumi/aws";
|
|
8
|
+
export interface RealtimeArgs {
|
|
9
|
+
/**
|
|
10
|
+
* The Lambda function that'll be used to authorize the client on connection.
|
|
11
|
+
* @example
|
|
12
|
+
* ```js
|
|
13
|
+
* {
|
|
14
|
+
* authorizer: "src/authorizer.handler"
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
authorizer: Input<string | FunctionArgs>;
|
|
19
|
+
/**
|
|
20
|
+
* [Transform](/docs/components#transform) how this subscription creates its underlying
|
|
21
|
+
* resources.
|
|
22
|
+
*/
|
|
23
|
+
transform?: {
|
|
24
|
+
/**
|
|
25
|
+
* Transform the IoT authorizer resource.
|
|
26
|
+
*/
|
|
27
|
+
authorizer?: Transform<iot.AuthorizerArgs>;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface RealtimeSubscriberArgs {
|
|
31
|
+
/**
|
|
32
|
+
* Filter the topics that'll be processed by the subscriber.
|
|
33
|
+
*
|
|
34
|
+
* :::tip
|
|
35
|
+
* Learn more about [topic filters](https://docs.aws.amazon.com/iot/latest/developerguide/topics.html#topicfilters).
|
|
36
|
+
* :::
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* Subscribe to a specific topic.
|
|
40
|
+
* ```js
|
|
41
|
+
* {
|
|
42
|
+
* filter: `${$app.name}/${$app.stage}/chat/room1`
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* Subscribe to all topics under a prefix.
|
|
47
|
+
* ```js
|
|
48
|
+
* {
|
|
49
|
+
* filter: `${$app.name}/${$app.stage}/chat/#`
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
filter: Input<string>;
|
|
54
|
+
/**
|
|
55
|
+
* [Transform](/docs/components#transform) how this subscription creates its underlying
|
|
56
|
+
* resources.
|
|
57
|
+
*/
|
|
58
|
+
transform?: {
|
|
59
|
+
/**
|
|
60
|
+
* Transform the IoT Topic rule resource.
|
|
61
|
+
*/
|
|
62
|
+
topicRule?: Transform<iot.TopicRuleArgs>;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The `Realtime` component lets you publish and subscribe to messages in realtime.
|
|
67
|
+
*
|
|
68
|
+
* It offers a **topic-based** messaging network using [AWS IoT](https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html). Letting you publish and subscribe to messages using
|
|
69
|
+
* a WebSocket in the browser and your server.
|
|
70
|
+
*
|
|
71
|
+
* Also, provides an [SDK](#sdk) to authorize clients, grant permissions to subscribe, and
|
|
72
|
+
* publish to topics.
|
|
73
|
+
*
|
|
74
|
+
* :::note
|
|
75
|
+
* IoT is shared across all apps and stages in your AWS account. So you need to prefix the
|
|
76
|
+
* topics by the app and stage name.
|
|
77
|
+
* :::
|
|
78
|
+
*
|
|
79
|
+
* There is **only 1 IoT endpoint** per region per AWS account. Messages from all apps and
|
|
80
|
+
* stages are published to the same IoT endpoint. Make sure to prefix the topics by the
|
|
81
|
+
* app and stage name.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
*
|
|
85
|
+
* #### Create a realtime endpoint
|
|
86
|
+
*
|
|
87
|
+
* ```ts title="sst.config.ts"
|
|
88
|
+
* const server = new sst.aws.Realtime("MyServer", {
|
|
89
|
+
* authorizer: "src/authorizer.handler"
|
|
90
|
+
* });
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* #### Authorize the client
|
|
94
|
+
*
|
|
95
|
+
* ```ts title="src/authorizer.ts" "realtime.authorizer"
|
|
96
|
+
* import { Resource } from "sst/aws";
|
|
97
|
+
* import { realtime } from "sst/aws/realtime";
|
|
98
|
+
*
|
|
99
|
+
* export const handler = realtime.authorizer(async (token) => {
|
|
100
|
+
* // Validate the token
|
|
101
|
+
*
|
|
102
|
+
* // Return the topics to subscribe and publish
|
|
103
|
+
* return {
|
|
104
|
+
* subscribe: [`${Resource.App.name}/${Resource.App.stage}/chat/room1`],
|
|
105
|
+
* publish: [`${Resource.App.name}/${Resource.App.stage}/chat/room1`],
|
|
106
|
+
* };
|
|
107
|
+
* });
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* #### Publish and receive messages in your frontend
|
|
111
|
+
*
|
|
112
|
+
* ```ts title="app/page.tsx"
|
|
113
|
+
* import { Resource } from "sst/aws";
|
|
114
|
+
*
|
|
115
|
+
* const client = new mqtt.MqttClient();
|
|
116
|
+
* // Configure with
|
|
117
|
+
* // - Resource.Realtime.endpoint
|
|
118
|
+
* // - Resource.Realtime.authorizer
|
|
119
|
+
* const connection = client.new_connection(config);
|
|
120
|
+
*
|
|
121
|
+
* // Subscribe messages
|
|
122
|
+
* connection.on("message", (topic, payload) => {
|
|
123
|
+
* // Handle the message
|
|
124
|
+
* });
|
|
125
|
+
*
|
|
126
|
+
* // Publish messages
|
|
127
|
+
* connection.publish(topic, payload, mqtt.QoS.AtLeastOnce);
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* #### Subscribe messages in your backend
|
|
131
|
+
*
|
|
132
|
+
* ```ts title="sst.config.ts"
|
|
133
|
+
* server.subscribe("src/subscriber.handler", {
|
|
134
|
+
* filter: `${$app.name}/${$app.stage}/chat/room1`
|
|
135
|
+
* });
|
|
136
|
+
* ```
|
|
137
|
+
*
|
|
138
|
+
* #### Publish message from your backend
|
|
139
|
+
*
|
|
140
|
+
* ```ts title="src/lambda.ts"
|
|
141
|
+
* import { IoTDataPlaneClient, PublishCommand } from "@aws-sdk/client-iot-data-plane";
|
|
142
|
+
* const data = new IoTDataPlaneClient();
|
|
143
|
+
* await data.send(
|
|
144
|
+
* new PublishCommand({
|
|
145
|
+
* payload: Buffer.from(
|
|
146
|
+
* JSON.stringify({ message: "Hello world" })
|
|
147
|
+
* ),
|
|
148
|
+
* topic: `${Resource.App.name}/${Resource.App.stage}/chat/room1`,
|
|
149
|
+
* })
|
|
150
|
+
* );
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
export declare class Realtime extends Component implements Link.Linkable {
|
|
154
|
+
private readonly constructorName;
|
|
155
|
+
private constructorOpts;
|
|
156
|
+
private readonly authHadler;
|
|
157
|
+
private readonly iotAuthorizer;
|
|
158
|
+
private readonly iotEndpoint;
|
|
159
|
+
constructor(name: string, args: RealtimeArgs, opts?: ComponentResourceOptions);
|
|
160
|
+
/**
|
|
161
|
+
* The IoT endpoint.
|
|
162
|
+
*/
|
|
163
|
+
get endpoint(): Output<string>;
|
|
164
|
+
/**
|
|
165
|
+
* The name of the IoT authorizer.
|
|
166
|
+
*/
|
|
167
|
+
get authorizer(): Output<string>;
|
|
168
|
+
/**
|
|
169
|
+
* The underlying [resources](/docs/components/#nodes) this component creates.
|
|
170
|
+
*/
|
|
171
|
+
get nodes(): {
|
|
172
|
+
/**
|
|
173
|
+
* The IoT authorizer resource.
|
|
174
|
+
*/
|
|
175
|
+
authorizer: import("@pulumi/aws/iot/authorizer").Authorizer;
|
|
176
|
+
/**
|
|
177
|
+
* The IoT authorizer function resource.
|
|
178
|
+
*/
|
|
179
|
+
authHandler: Output<Function>;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Subscribe to this Realtime server.
|
|
183
|
+
*
|
|
184
|
+
* @param subscriber The function that'll be notified.
|
|
185
|
+
* @param args Configure the subscription.
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
*
|
|
189
|
+
* ```js title="sst.config.ts"
|
|
190
|
+
* server.subscribe("src/subscriber.handler", {
|
|
191
|
+
* filter: `${$app.name}/${$app.stage}/chat/room1`
|
|
192
|
+
* });
|
|
193
|
+
* ```
|
|
194
|
+
*
|
|
195
|
+
* Customize the subscriber function.
|
|
196
|
+
*
|
|
197
|
+
* ```js title="sst.config.ts"
|
|
198
|
+
* server.subscribe(
|
|
199
|
+
* {
|
|
200
|
+
* handler: "src/subscriber.handler",
|
|
201
|
+
* timeout: "60 seconds"
|
|
202
|
+
* },
|
|
203
|
+
* {
|
|
204
|
+
* filter: `${$app.name}/${$app.stage}/chat/room1`
|
|
205
|
+
* }
|
|
206
|
+
* );
|
|
207
|
+
* ```
|
|
208
|
+
*
|
|
209
|
+
* Or pass in the ARN of an existing Lambda function.
|
|
210
|
+
*
|
|
211
|
+
* ```js title="sst.config.ts"
|
|
212
|
+
* server.subscribe("arn:aws:lambda:us-east-1:123456789012:function:my-function", {
|
|
213
|
+
* filter: `${$app.name}/${$app.stage}/chat/room1`
|
|
214
|
+
* });
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
subscribe(subscriber: Input<string | FunctionArgs | FunctionArn>, args: RealtimeSubscriberArgs): Output<RealtimeLambdaSubscriber>;
|
|
218
|
+
/** @internal */
|
|
219
|
+
getSSTLink(): {
|
|
220
|
+
properties: {
|
|
221
|
+
endpoint: Output<string>;
|
|
222
|
+
authorizer: Output<string>;
|
|
223
|
+
};
|
|
224
|
+
include: {
|
|
225
|
+
effect?: "allow" | "deny" | undefined;
|
|
226
|
+
actions: string[];
|
|
227
|
+
resources: Input<Input<string>[]>;
|
|
228
|
+
type: "aws.permission";
|
|
229
|
+
}[];
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
//# sourceMappingURL=realtime.d.ts.map
|