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
package/dist/cli/cli.js
ADDED
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// cli.ts
|
|
4
|
+
import "tsx";
|
|
5
|
+
import "tsconfig-paths/register.js";
|
|
6
|
+
import fs from "fs";
|
|
7
|
+
import path from "path";
|
|
8
|
+
import chokidar from "chokidar";
|
|
9
|
+
function kebabToCamel(str) {
|
|
10
|
+
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
11
|
+
}
|
|
12
|
+
function kebabToPascal(kebab) {
|
|
13
|
+
return kebab.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
14
|
+
}
|
|
15
|
+
async function generateConfigFile(configDir, monoriseOutputDir) {
|
|
16
|
+
const configOutputPath = path.join(monoriseOutputDir, "config.ts");
|
|
17
|
+
const initialConfigContent = `
|
|
18
|
+
export enum Entity {}
|
|
19
|
+
`;
|
|
20
|
+
fs.writeFileSync(configOutputPath, initialConfigContent);
|
|
21
|
+
const files = fs.readdirSync(configDir).filter((file) => file.endsWith(".ts") && file !== "index.ts");
|
|
22
|
+
const names = /* @__PURE__ */ new Set();
|
|
23
|
+
const nameRegex = /^[a-z]+(-[a-z]+)*$/;
|
|
24
|
+
const imports = [];
|
|
25
|
+
const enumEntries = [];
|
|
26
|
+
const typeEntries = [];
|
|
27
|
+
const schemaMapEntries = [];
|
|
28
|
+
const configEntries = [];
|
|
29
|
+
const schemaEntries = [];
|
|
30
|
+
const allowedEntityEntries = [];
|
|
31
|
+
const entityWithEmailAuthEntries = [];
|
|
32
|
+
const relativePathToConfigDir = path.relative(monoriseOutputDir, configDir);
|
|
33
|
+
const importPathPrefix = relativePathToConfigDir ? `${relativePathToConfigDir}/` : "./";
|
|
34
|
+
for (const file of files) {
|
|
35
|
+
const fullPath = path.join(configDir, file);
|
|
36
|
+
const module = await import(fullPath);
|
|
37
|
+
const config = module.default;
|
|
38
|
+
if (!nameRegex.test(config.name)) {
|
|
39
|
+
throw new Error(
|
|
40
|
+
`Invalid name format: ${config.name} in ${file}. Must be kebab-case.`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
if (names.has(config.name)) {
|
|
44
|
+
throw new Error(`Duplicate name found: ${config.name} in ${file}`);
|
|
45
|
+
}
|
|
46
|
+
names.add(config.name);
|
|
47
|
+
const fileName = file.replace(/\.ts$/, "");
|
|
48
|
+
const variableName = kebabToCamel(fileName);
|
|
49
|
+
imports.push(
|
|
50
|
+
`import ${variableName} from '${importPathPrefix}${fileName}';`
|
|
51
|
+
);
|
|
52
|
+
const enumKey = config.name.toUpperCase().replace(/-/g, "_");
|
|
53
|
+
enumEntries.push(`${enumKey} = '${config.name}'`);
|
|
54
|
+
typeEntries.push(
|
|
55
|
+
`export type ${kebabToPascal(config.name)}Type = z.infer<(typeof ${variableName})['finalSchema']>;`
|
|
56
|
+
);
|
|
57
|
+
schemaMapEntries.push(
|
|
58
|
+
`[Entity.${enumKey}]: ${kebabToPascal(config.name)}Type;`
|
|
59
|
+
);
|
|
60
|
+
configEntries.push(`[Entity.${enumKey}]: ${kebabToCamel(config.name)},`);
|
|
61
|
+
schemaEntries.push(
|
|
62
|
+
`[Entity.${enumKey}]: ${kebabToCamel(config.name)}.finalSchema,`
|
|
63
|
+
);
|
|
64
|
+
allowedEntityEntries.push(`Entity.${enumKey}`);
|
|
65
|
+
if (config.authMethod?.email) {
|
|
66
|
+
entityWithEmailAuthEntries.push(`Entity.${enumKey}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const configOutputContent = `
|
|
70
|
+
import type { z } from 'zod';
|
|
71
|
+
${imports.join("\n")}
|
|
72
|
+
|
|
73
|
+
export enum Entity {
|
|
74
|
+
${enumEntries.join(",\n ")}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
${typeEntries.join("\n")}
|
|
78
|
+
|
|
79
|
+
export interface EntitySchemaMap {
|
|
80
|
+
${schemaMapEntries.join("\n ")}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const EntityConfig = {
|
|
84
|
+
${configEntries.join("\n ")}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const FormSchema = {
|
|
88
|
+
${schemaEntries.join("\n ")}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const AllowedEntityTypes = [
|
|
92
|
+
${allowedEntityEntries.join(",\n ")}
|
|
93
|
+
];
|
|
94
|
+
|
|
95
|
+
const EmailAuthEnabledEntities: Entity[] = [${entityWithEmailAuthEntries.join(", ")}];
|
|
96
|
+
|
|
97
|
+
export {
|
|
98
|
+
EntityConfig,
|
|
99
|
+
FormSchema,
|
|
100
|
+
AllowedEntityTypes,
|
|
101
|
+
EmailAuthEnabledEntities,
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const config = {
|
|
105
|
+
EntityConfig,
|
|
106
|
+
FormSchema,
|
|
107
|
+
AllowedEntityTypes,
|
|
108
|
+
EmailAuthEnabledEntities,
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export default config;
|
|
112
|
+
|
|
113
|
+
declare module '@monorise/base' {
|
|
114
|
+
export enum Entity {
|
|
115
|
+
${enumEntries.join(",\n ")}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
${typeEntries.join("\n ")}
|
|
119
|
+
|
|
120
|
+
export interface EntitySchemaMap {
|
|
121
|
+
${schemaMapEntries.join("\n ")}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
`;
|
|
125
|
+
fs.writeFileSync(configOutputPath, configOutputContent);
|
|
126
|
+
console.log("Successfully generated config.ts!");
|
|
127
|
+
return configOutputPath;
|
|
128
|
+
}
|
|
129
|
+
async function generateHandleFile(monoriseConfig, projectRoot, monoriseOutputDir) {
|
|
130
|
+
const handleOutputPath = path.join(monoriseOutputDir, "handle.ts");
|
|
131
|
+
const customRoutesPath = monoriseConfig.customRoutes;
|
|
132
|
+
let routesImportLine = "";
|
|
133
|
+
let appHandlerPayload = "{}";
|
|
134
|
+
if (customRoutesPath) {
|
|
135
|
+
const absoluteCustomRoutesPath = path.resolve(
|
|
136
|
+
projectRoot,
|
|
137
|
+
customRoutesPath
|
|
138
|
+
);
|
|
139
|
+
if (!fs.existsSync(absoluteCustomRoutesPath) && !fs.existsSync(`${absoluteCustomRoutesPath}.ts`) && !fs.existsSync(`${absoluteCustomRoutesPath}.js`)) {
|
|
140
|
+
throw new Error(
|
|
141
|
+
`Custom routes file not found: '${absoluteCustomRoutesPath}'. Please ensure 'customRoutes' in monorise.config.ts points to a valid file.`
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
let routesModule;
|
|
145
|
+
try {
|
|
146
|
+
routesModule = await import(absoluteCustomRoutesPath);
|
|
147
|
+
} catch (e) {
|
|
148
|
+
throw new Error(
|
|
149
|
+
`Failed to load custom routes file at '${absoluteCustomRoutesPath}'. Ensure it's a valid JavaScript/TypeScript module. Error: ${e.message}`
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
const routesExport = routesModule.default;
|
|
153
|
+
if (!routesExport || routesExport === null || typeof routesExport === "object" && !("get" in routesExport && "post" in routesExport && "use" in routesExport)) {
|
|
154
|
+
throw new Error(
|
|
155
|
+
`Custom routes file at '${absoluteCustomRoutesPath}' must default export an instance of Hono (or an object with .get, .post, .use methods). Or a function that consume the dependency container provided by route handler.`
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
let relativePathToRoutes = path.relative(
|
|
159
|
+
monoriseOutputDir,
|
|
160
|
+
absoluteCustomRoutesPath
|
|
161
|
+
);
|
|
162
|
+
relativePathToRoutes = relativePathToRoutes.replace(
|
|
163
|
+
/\.(ts|js|mjs|cjs)$/,
|
|
164
|
+
""
|
|
165
|
+
);
|
|
166
|
+
routesImportLine = `import routes from '${relativePathToRoutes}';`;
|
|
167
|
+
appHandlerPayload = "{ routes }";
|
|
168
|
+
}
|
|
169
|
+
const combinedContent = `
|
|
170
|
+
import CoreFactory from 'monorise/core';
|
|
171
|
+
import config from './config';
|
|
172
|
+
${routesImportLine ? `${routesImportLine}
|
|
173
|
+
` : ""}const coreFactory = new CoreFactory(config);
|
|
174
|
+
|
|
175
|
+
export const replicationHandler = coreFactory.replicationProcessor;
|
|
176
|
+
export const mutualHandler = coreFactory.mutualProcessor;
|
|
177
|
+
export const tagHandler = coreFactory.tagProcessor;
|
|
178
|
+
export const treeHandler = coreFactory.prejoinProcessor;
|
|
179
|
+
export const appHandler = coreFactory.appHandler(${appHandlerPayload});
|
|
180
|
+
`;
|
|
181
|
+
fs.writeFileSync(handleOutputPath, combinedContent);
|
|
182
|
+
console.log("Successfully generated handle.ts!");
|
|
183
|
+
return handleOutputPath;
|
|
184
|
+
}
|
|
185
|
+
async function generateFiles(rootPath) {
|
|
186
|
+
const baseDir = rootPath ? path.resolve(rootPath) : process.cwd();
|
|
187
|
+
const configFilePathTS = path.join(baseDir, "monorise.config.ts");
|
|
188
|
+
const configFilePathJS = path.join(baseDir, "monorise.config.js");
|
|
189
|
+
let configFilePath;
|
|
190
|
+
if (fs.existsSync(configFilePathTS)) {
|
|
191
|
+
configFilePath = configFilePathTS;
|
|
192
|
+
} else if (fs.existsSync(configFilePathJS)) {
|
|
193
|
+
configFilePath = configFilePathJS;
|
|
194
|
+
} else {
|
|
195
|
+
throw new Error(
|
|
196
|
+
"Neither monorise.config.ts nor monorise.config.js found in the root of the project."
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
const projectRoot = path.dirname(configFilePath);
|
|
200
|
+
const monoriseConfigModule = await import(configFilePath);
|
|
201
|
+
const monoriseConfig = monoriseConfigModule.default;
|
|
202
|
+
const configDir = path.resolve(projectRoot, monoriseConfig.configDir);
|
|
203
|
+
const monoriseOutputDir = path.join(projectRoot, ".monorise");
|
|
204
|
+
fs.mkdirSync(monoriseOutputDir, { recursive: true });
|
|
205
|
+
await generateConfigFile(configDir, monoriseOutputDir);
|
|
206
|
+
await generateHandleFile(monoriseConfig, projectRoot, monoriseOutputDir);
|
|
207
|
+
return configDir;
|
|
208
|
+
}
|
|
209
|
+
var MONORISE_LOGO = `
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
\u2591\u2591\u2591\u2591\u2591\u2591\u2591
|
|
214
|
+
\u2591\u2591\u2592\u2592\u2592\u2591\u2591\u2591\u2591\u2591\u2591\u2592\u2592\u2592\u2591
|
|
215
|
+
\u2591\u2592\u2592\u2591 \u2591\u2592\u2592\u2591
|
|
216
|
+
\u2591\u2592\u2592\u2591 \u2591\u2592\u2592\u2591
|
|
217
|
+
\u2591\u2592\u2591 \u2591\u2592\u2592\u2591
|
|
218
|
+
\u2591\u2592\u2592\u2591 \u2592\u2592\u2592\u2591
|
|
219
|
+
\u2591\u2592\u2591\u2591\u2591\u2592\u2591 \u2591\u2592\u2591\u2591\u2592\u2592\u2591
|
|
220
|
+
\u2591\u2592\u2592\u2591 \u2591\u2592\u2592\u2592\u2591 \u2591\u2592\u2592\u2591 \u2591\u2592\u2591\u2591
|
|
221
|
+
\u2591\u2592\u2592 \u2591\u2592\u2592\u2591 \u2591\u2592\u2592\u2591 \u2591\u2592\u2591 \u2591\u2592\u2591 \u2591\u2592\u2591
|
|
222
|
+
\u2591\u2592\u2592\u2591 \u2591\u2592\u2591 \u2591\u2592\u2591\u2591\u2592\u2592\u2591\u2591\u2591 \u2591\u2591\u2592\u2592\u2591\u2591\u2592\u2591 \u2591\u2592\u2592 \u2591\u2592\u2591
|
|
223
|
+
\u2591\u2591\u2592\u2591 \u2591\u2592\u2591 \u2591\u2592\u2591 \u2591\u2592\u2592\u2591\u2591\u2592\u2592\u2592\u2592\u2592\u2592\u2591\u2591\u2592\u2591 \u2591\u2592\u2591\u2591 \u2591\u2592\u2591 \u2591\u2592\u2591
|
|
224
|
+
\u2591\u2592\u2591 \u2591\u2591\u2592\u2591 \u2591\u2592\u2591 \u2591\u2591\u2591 \u2591\u2592\u2591 \u2591\u2591 \u2591\u2592\u2591 \u2591\u2592\u2591 \u2591\u2592\u2591\u2591 \u2591\u2591\u2592\u2591
|
|
225
|
+
\u2591\u2592\u2591 \u2591\u2592\u2591 \u2591\u2592\u2591 \u2591\u2592 \u2591\u2591 \u2591\u2592\u2591 \u2591\u2592\u2591 \u2591\u2592\u2591 \u2591\u2592\u2591 \u2591\u2591\u2591\u2591
|
|
226
|
+
\u2591\u2591\u2591 \u2591\u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591 \u2592\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591\u2591
|
|
227
|
+
\u2591\u2591\u2591 \u2591\u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591\u2591
|
|
228
|
+
\u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591 \u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591
|
|
229
|
+
\u2591\u2591\u2591 \u2591\u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591 \u2591\u2591\u2591 \u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591
|
|
230
|
+
\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591
|
|
231
|
+
\u2591\u2591 \u2591\u2591 \u2591\u2591 \u2591\u2591 \u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591\u2591 \u2591\u2591\u2591
|
|
232
|
+
\u2591\u2591\u2591 \u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591
|
|
233
|
+
\u2591\u2591\u2591\u2591\u2591\u2592\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2592\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591 \u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591
|
|
234
|
+
\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591 \u2591\u2591\u2591
|
|
235
|
+
\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2592\u2591\u2591\u2591\u2591\u2591\u2591\u2592\u2591\u2591\u2591\u2591
|
|
236
|
+
\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591
|
|
237
|
+
\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591 \u2591\u2592\u2591
|
|
238
|
+
\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591
|
|
239
|
+
\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591
|
|
240
|
+
\u2591\u2592\u2592\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2592\u2592\u2591\u2591 \u2591\u2591\u2592\u2592\u2592\u2591\u2591 \u2591\u2592\u2592\u2591\u2591 \u2591\u2591\u2591\u2591
|
|
241
|
+
\u2591\u2592\u2591 \u2591\u2591\u2592\u2592\u2591 \u2591\u2592\u2591 \u2591\u2592\u2592\u2591 \u2591\u2591\u2592\u2591
|
|
242
|
+
\u2591\u2592\u2591 \u2591\u2591\u2591\u2591\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2591\u2591 \u2591\u2592\u2591 \u2592\u2592\u2591 \u2591\u2591\u2592\u2592\u2592\u2591
|
|
243
|
+
\u2591\u2592\u2592\u2592\u2592\u2592\u2591\u2591\u2591 \u2591\u2591\u2591\u2592\u2592\u2592\u2592\u2592\u2591 \u2592\u2592\u2591 \u2591\u2592\u2592\u2592\u2592\u2592\u2592\u2591
|
|
244
|
+
\u2591\u2592\u2592\u2591 \u2591\u2592\u2592\u2592\u2592 \u2592\u2592\u2592 \u2592\u2592\u2592
|
|
245
|
+
\u2591\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2591\u2591 \u2591\u2592\u2592\u2592\u2592\u2592\u2591 \u2591\u2592\u2592
|
|
246
|
+
\u2592\u2592\u2592 \u2591\u2591\u2592\u2592\u2592\u2592\u2592\u2592\u2591 \u2592\u2592\u2592 \u2591\u2592\u2592
|
|
247
|
+
\u2592\u2592\u2592 \u2591\u2592\u2592\u2592\u2592 \u2591\u2592\u2592\u2592\u2591
|
|
248
|
+
\u2592\u2593\u2593\u2593\u2592\u2592\u2592\u2593\u2593\u2592\u2592\u2592\u2591 \u2592\u2592\u2592\u2591\u2591\u2592\u2592\u2591
|
|
249
|
+
\u2592\u2593\u2591 \u2591\u2592\u2592\u2593\u2593\u2592\u2591 \u2592\u2593\u2593\u2591
|
|
250
|
+
\u2591\u2592\u2593\u2591 \u2591\u2592\u2593\u2592\u2591\u2592\u2593\u2592
|
|
251
|
+
\u2591\u2592\u2593\u2592\u2591 \u2591\u2592\u2593\u2593\u2592
|
|
252
|
+
\u2591\u2592\u2592\u2593\u2593\u2593\u2593\u2593\u2593\u2592\u2592\u2591
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
`;
|
|
257
|
+
async function runInitCommand(rootPath) {
|
|
258
|
+
const projectRoot = rootPath ? path.resolve(rootPath) : process.cwd();
|
|
259
|
+
console.log(MONORISE_LOGO);
|
|
260
|
+
console.log(`Initializing Monorise project in ${projectRoot}...`);
|
|
261
|
+
const monoriseConfigTsPath = path.join(projectRoot, "monorise.config.ts");
|
|
262
|
+
const monoriseConfigContent = `
|
|
263
|
+
const config = {
|
|
264
|
+
configDir: './monorise/entities',
|
|
265
|
+
// custom route file should export default an Hono object.
|
|
266
|
+
// customRoutes: './path/to/custom/routes.ts'
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export default config;
|
|
270
|
+
`;
|
|
271
|
+
if (!fs.existsSync(monoriseConfigTsPath)) {
|
|
272
|
+
fs.writeFileSync(monoriseConfigTsPath, monoriseConfigContent.trimStart());
|
|
273
|
+
console.log(`Created ${path.relative(projectRoot, monoriseConfigTsPath)}`);
|
|
274
|
+
} else {
|
|
275
|
+
console.log(
|
|
276
|
+
`${path.relative(projectRoot, monoriseConfigTsPath)} already exists. Skipping.`
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
const monoriseEntitiesDir = path.join(projectRoot, "monorise", "entities");
|
|
280
|
+
fs.mkdirSync(monoriseEntitiesDir, { recursive: true });
|
|
281
|
+
const userEntityTsPath = path.join(monoriseEntitiesDir, "user.ts");
|
|
282
|
+
const userEntityContent = `
|
|
283
|
+
import { createEntityConfig } from 'monorise/base';
|
|
284
|
+
import { z } from 'zod';
|
|
285
|
+
|
|
286
|
+
const baseSchema = z
|
|
287
|
+
.object({
|
|
288
|
+
displayName: z
|
|
289
|
+
.string()
|
|
290
|
+
.min(1, 'Please provide a name for this user account'),
|
|
291
|
+
firstName: z.string().min(1, 'Please provide first name'),
|
|
292
|
+
lastName: z.string().min(1, 'Please provide last name'),
|
|
293
|
+
jobTitle: z.string(),
|
|
294
|
+
})
|
|
295
|
+
.partial();
|
|
296
|
+
|
|
297
|
+
const config = createEntityConfig({
|
|
298
|
+
name: 'user',
|
|
299
|
+
baseSchema,
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
export default config;
|
|
303
|
+
`;
|
|
304
|
+
if (!fs.existsSync(userEntityTsPath)) {
|
|
305
|
+
fs.writeFileSync(userEntityTsPath, userEntityContent.trimStart());
|
|
306
|
+
console.log(`Created ${path.relative(projectRoot, userEntityTsPath)}`);
|
|
307
|
+
} else {
|
|
308
|
+
console.log(
|
|
309
|
+
`${path.relative(projectRoot, userEntityTsPath)} already exists. Skipping.`
|
|
310
|
+
);
|
|
311
|
+
}
|
|
312
|
+
const packageJsonPath = path.join(projectRoot, "package.json");
|
|
313
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
314
|
+
try {
|
|
315
|
+
const packageJsonContent = fs.readFileSync(packageJsonPath, "utf8");
|
|
316
|
+
const packageJson = JSON.parse(packageJsonContent);
|
|
317
|
+
if (packageJson.type !== "module") {
|
|
318
|
+
packageJson.type = "module";
|
|
319
|
+
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
320
|
+
console.log(
|
|
321
|
+
`Updated 'type' to 'module' in ${path.relative(projectRoot, packageJsonPath)}`
|
|
322
|
+
);
|
|
323
|
+
} else {
|
|
324
|
+
console.log(
|
|
325
|
+
`'type: "module"' already set in ${path.relative(projectRoot, packageJsonPath)}. Skipping.`
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
} catch (error) {
|
|
329
|
+
console.error(
|
|
330
|
+
`Error reading or parsing ${path.relative(projectRoot, packageJsonPath)}:`,
|
|
331
|
+
error
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
} else {
|
|
335
|
+
console.warn(
|
|
336
|
+
`Warning: ${path.relative(projectRoot, packageJsonPath)} not found. Cannot update 'type'.`
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
const tsconfigPath = path.join(projectRoot, "tsconfig.json");
|
|
340
|
+
if (fs.existsSync(tsconfigPath)) {
|
|
341
|
+
try {
|
|
342
|
+
const tsconfigContent = fs.readFileSync(tsconfigPath, "utf8");
|
|
343
|
+
const tsconfig = JSON.parse(tsconfigContent);
|
|
344
|
+
if (!tsconfig.compilerOptions) {
|
|
345
|
+
tsconfig.compilerOptions = {};
|
|
346
|
+
}
|
|
347
|
+
if (!tsconfig.compilerOptions.paths) {
|
|
348
|
+
tsconfig.compilerOptions.paths = {};
|
|
349
|
+
}
|
|
350
|
+
const pathKey = "#/monorise/*";
|
|
351
|
+
const pathValue = ["./.monorise/*"];
|
|
352
|
+
if (!tsconfig.compilerOptions.paths[pathKey]) {
|
|
353
|
+
tsconfig.compilerOptions.paths[pathKey] = pathValue;
|
|
354
|
+
fs.writeFileSync(tsconfigPath, JSON.stringify(tsconfig, null, 2));
|
|
355
|
+
console.log(
|
|
356
|
+
`Added '${pathKey}' path alias in ${path.relative(projectRoot, tsconfigPath)}`
|
|
357
|
+
);
|
|
358
|
+
} else {
|
|
359
|
+
console.log(
|
|
360
|
+
`'${pathKey}' path alias already set in ${path.relative(projectRoot, tsconfigPath)}. Skipping.`
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
} catch (error) {
|
|
364
|
+
console.error(
|
|
365
|
+
`Error updating ${path.relative(projectRoot, tsconfigPath)}:`,
|
|
366
|
+
error
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
} else {
|
|
370
|
+
console.warn(
|
|
371
|
+
`Warning: ${path.relative(projectRoot, tsconfigPath)} not found. Cannot add path alias.`
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
console.log("Monorise initialization complete!");
|
|
375
|
+
}
|
|
376
|
+
async function runDevCommand(configDir, rootPath) {
|
|
377
|
+
console.log(MONORISE_LOGO);
|
|
378
|
+
console.log(`Watching for changes in ${configDir}...`);
|
|
379
|
+
const watcher = chokidar.watch(configDir, {
|
|
380
|
+
ignored: (watchedPath) => {
|
|
381
|
+
const fileName = path.basename(watchedPath);
|
|
382
|
+
return fileName === "index.ts" || // Old name, still ignore in case it exists
|
|
383
|
+
fileName === "config.ts" || // Generated config file
|
|
384
|
+
fileName === "processors.ts" || // Generated processors file
|
|
385
|
+
fileName === "app.ts" || // Generated app file
|
|
386
|
+
fileName.startsWith(".") || watchedPath.endsWith(".js") || watchedPath.endsWith(".jsx") || watchedPath.endsWith(".d.ts");
|
|
387
|
+
},
|
|
388
|
+
persistent: true,
|
|
389
|
+
ignoreInitial: true
|
|
390
|
+
});
|
|
391
|
+
watcher.on("add", async (filePath) => {
|
|
392
|
+
console.log(`File ${filePath} has been added. Regenerating...`);
|
|
393
|
+
try {
|
|
394
|
+
await generateFiles(rootPath);
|
|
395
|
+
} catch (err) {
|
|
396
|
+
console.error("Regeneration failed:", err);
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
watcher.on("change", async (filePath) => {
|
|
400
|
+
console.log(`File ${filePath} has been changed. Regenerating...`);
|
|
401
|
+
try {
|
|
402
|
+
await generateFiles(rootPath);
|
|
403
|
+
} catch (err) {
|
|
404
|
+
console.error("Regeneration failed:", err);
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
watcher.on("unlink", async (filePath) => {
|
|
408
|
+
console.log(`File ${filePath} has been removed. Regenerating...`);
|
|
409
|
+
try {
|
|
410
|
+
await generateFiles(rootPath);
|
|
411
|
+
} catch (err) {
|
|
412
|
+
console.error("Regeneration failed:", err);
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
process.on("SIGINT", () => {
|
|
416
|
+
console.log("Monorise dev terminated. Closing watcher and sst dev...");
|
|
417
|
+
watcher.close();
|
|
418
|
+
process.exit(0);
|
|
419
|
+
});
|
|
420
|
+
process.on("SIGTERM", () => {
|
|
421
|
+
console.log("Monorise dev terminated. Closing watcher and sst dev...");
|
|
422
|
+
watcher.close();
|
|
423
|
+
process.exit(0);
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
async function runBuildCommand(rootPath) {
|
|
427
|
+
console.log("Starting sst build...");
|
|
428
|
+
await generateFiles(rootPath);
|
|
429
|
+
}
|
|
430
|
+
async function main() {
|
|
431
|
+
const args = process.argv.slice(2);
|
|
432
|
+
const command = args[0];
|
|
433
|
+
let rootPath;
|
|
434
|
+
const rootFlagIndex = args.indexOf("--config-root");
|
|
435
|
+
if (rootFlagIndex > -1 && args[rootFlagIndex + 1]) {
|
|
436
|
+
rootPath = args[rootFlagIndex + 1];
|
|
437
|
+
}
|
|
438
|
+
try {
|
|
439
|
+
if (command === "dev") {
|
|
440
|
+
const configDir = await generateFiles(rootPath);
|
|
441
|
+
await runDevCommand(configDir, rootPath);
|
|
442
|
+
} else if (command === "build") {
|
|
443
|
+
await runBuildCommand(rootPath);
|
|
444
|
+
} else if (command === "init") {
|
|
445
|
+
await runInitCommand(rootPath);
|
|
446
|
+
} else {
|
|
447
|
+
console.error(
|
|
448
|
+
"Unknown command. Usage: monorise [dev|build|init] [--config-root <path>]"
|
|
449
|
+
);
|
|
450
|
+
process.exit(1);
|
|
451
|
+
}
|
|
452
|
+
} catch (err) {
|
|
453
|
+
console.error("Monorise process failed:", err);
|
|
454
|
+
process.exit(1);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
main().catch((err) => {
|
|
458
|
+
console.error("Monorise encountered an unhandled error:", err);
|
|
459
|
+
process.exit(1);
|
|
460
|
+
});
|
|
461
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../cli.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport 'tsx';\nimport 'tsconfig-paths/register.js';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport chokidar from 'chokidar';\n\nfunction kebabToCamel(str: string): string {\n return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());\n}\n\nfunction kebabToPascal(kebab: string): string {\n return kebab\n .split('-')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join('');\n}\n\nasync function generateConfigFile(\n configDir: string,\n monoriseOutputDir: string,\n): Promise<string> {\n const configOutputPath = path.join(monoriseOutputDir, 'config.ts');\n const initialConfigContent = `\nexport enum Entity {}\n`;\n fs.writeFileSync(configOutputPath, initialConfigContent);\n\n const files = fs\n .readdirSync(configDir)\n .filter((file) => file.endsWith('.ts') && file !== 'index.ts');\n\n const names = new Set<string>();\n const nameRegex = /^[a-z]+(-[a-z]+)*$/;\n const imports: string[] = [];\n\n const enumEntries: string[] = [];\n const typeEntries: string[] = [];\n const schemaMapEntries: string[] = [];\n const configEntries: string[] = [];\n const schemaEntries: string[] = [];\n const allowedEntityEntries: string[] = [];\n const entityWithEmailAuthEntries: string[] = [];\n\n const relativePathToConfigDir = path.relative(monoriseOutputDir, configDir);\n const importPathPrefix = relativePathToConfigDir\n ? `${relativePathToConfigDir}/`\n : './';\n\n for (const file of files) {\n const fullPath = path.join(configDir, file);\n const module = await import(fullPath);\n const config = module.default;\n\n if (!nameRegex.test(config.name)) {\n throw new Error(\n `Invalid name format: ${config.name} in ${file}. Must be kebab-case.`,\n );\n }\n\n if (names.has(config.name)) {\n throw new Error(`Duplicate name found: ${config.name} in ${file}`);\n }\n names.add(config.name);\n\n const fileName = file.replace(/\\.ts$/, '');\n const variableName = kebabToCamel(fileName);\n imports.push(\n `import ${variableName} from '${importPathPrefix}${fileName}';`,\n );\n\n const enumKey = config.name.toUpperCase().replace(/-/g, '_');\n enumEntries.push(`${enumKey} = '${config.name}'`);\n typeEntries.push(\n `export type ${kebabToPascal(config.name)}Type = z.infer<(typeof ${variableName})['finalSchema']>;`,\n );\n schemaMapEntries.push(\n `[Entity.${enumKey}]: ${kebabToPascal(config.name)}Type;`,\n );\n\n configEntries.push(`[Entity.${enumKey}]: ${kebabToCamel(config.name)},`);\n schemaEntries.push(\n `[Entity.${enumKey}]: ${kebabToCamel(config.name)}.finalSchema,`,\n );\n\n allowedEntityEntries.push(`Entity.${enumKey}`);\n\n if (config.authMethod?.email) {\n entityWithEmailAuthEntries.push(`Entity.${enumKey}`);\n }\n }\n\n const configOutputContent = `\nimport type { z } from 'zod';\n${imports.join('\\n')}\n\nexport enum Entity {\n ${enumEntries.join(',\\n ')}\n}\n\n${typeEntries.join('\\n')}\n\nexport interface EntitySchemaMap {\n ${schemaMapEntries.join('\\n ')}\n}\n\nconst EntityConfig = {\n ${configEntries.join('\\n ')}\n};\n\nconst FormSchema = {\n ${schemaEntries.join('\\n ')}\n};\n\nconst AllowedEntityTypes = [\n ${allowedEntityEntries.join(',\\n ')}\n];\n\nconst EmailAuthEnabledEntities: Entity[] = [${entityWithEmailAuthEntries.join(', ')}];\n\nexport {\n EntityConfig,\n FormSchema,\n AllowedEntityTypes,\n EmailAuthEnabledEntities,\n};\n\nconst config = {\n EntityConfig,\n FormSchema,\n AllowedEntityTypes,\n EmailAuthEnabledEntities,\n};\n\nexport default config;\n\ndeclare module '@monorise/base' {\n export enum Entity {\n ${enumEntries.join(',\\n ')}\n }\n\n ${typeEntries.join('\\n ')}\n\n export interface EntitySchemaMap {\n ${schemaMapEntries.join('\\n ')}\n }\n}\n`;\n\n fs.writeFileSync(configOutputPath, configOutputContent);\n console.log('Successfully generated config.ts!');\n return configOutputPath;\n}\n\nasync function generateHandleFile(\n monoriseConfig: { customRoutes?: string; configDir: string },\n projectRoot: string,\n monoriseOutputDir: string,\n): Promise<string> {\n const handleOutputPath = path.join(monoriseOutputDir, 'handle.ts');\n const customRoutesPath = monoriseConfig.customRoutes;\n\n let routesImportLine = '';\n let appHandlerPayload = '{}'; // Default to an empty object for appHandler if no custom routes\n\n if (customRoutesPath) {\n const absoluteCustomRoutesPath = path.resolve(\n projectRoot,\n customRoutesPath,\n );\n\n if (\n !fs.existsSync(absoluteCustomRoutesPath) &&\n !fs.existsSync(`${absoluteCustomRoutesPath}.ts`) &&\n !fs.existsSync(`${absoluteCustomRoutesPath}.js`)\n ) {\n throw new Error(\n `Custom routes file not found: '${absoluteCustomRoutesPath}'. Please ensure 'customRoutes' in monorise.config.ts points to a valid file.`,\n );\n }\n\n let routesModule;\n try {\n routesModule = await import(absoluteCustomRoutesPath);\n } catch (e: any) {\n throw new Error(\n `Failed to load custom routes file at '${absoluteCustomRoutesPath}'. Ensure it's a valid JavaScript/TypeScript module. Error: ${e.message}`,\n );\n }\n\n const routesExport = routesModule.default;\n\n if (\n !routesExport ||\n routesExport === null ||\n (typeof routesExport === 'object' &&\n !(\n 'get' in routesExport &&\n 'post' in routesExport &&\n 'use' in routesExport\n ))\n ) {\n throw new Error(\n `Custom routes file at '${absoluteCustomRoutesPath}' must default export an instance of Hono (or an object with .get, .post, .use methods). Or a function that consume the dependency container provided by route handler.`,\n );\n }\n\n let relativePathToRoutes = path.relative(\n monoriseOutputDir,\n absoluteCustomRoutesPath,\n );\n relativePathToRoutes = relativePathToRoutes.replace(\n /\\.(ts|js|mjs|cjs)$/,\n '',\n );\n\n // If custom routes are provided, include the import statement and pass 'routes' to appHandler\n routesImportLine = `import routes from '${relativePathToRoutes}';`;\n appHandlerPayload = '{ routes }';\n }\n // If customRoutesPath is not provided, routesImportLine remains empty and appHandlerPayload remains `{}`\n\n const combinedContent = `\nimport CoreFactory from 'monorise/core';\nimport config from './config';\n${routesImportLine ? `${routesImportLine}\\n` : ''}const coreFactory = new CoreFactory(config);\n\nexport const replicationHandler = coreFactory.replicationProcessor;\nexport const mutualHandler = coreFactory.mutualProcessor;\nexport const tagHandler = coreFactory.tagProcessor;\nexport const treeHandler = coreFactory.prejoinProcessor;\nexport const appHandler = coreFactory.appHandler(${appHandlerPayload});\n`;\n fs.writeFileSync(handleOutputPath, combinedContent);\n console.log('Successfully generated handle.ts!');\n\n return handleOutputPath;\n}\n\nasync function generateFiles(rootPath?: string): Promise<string> {\n const baseDir = rootPath ? path.resolve(rootPath) : process.cwd();\n const configFilePathTS = path.join(baseDir, 'monorise.config.ts');\n const configFilePathJS = path.join(baseDir, 'monorise.config.js');\n\n let configFilePath: string;\n if (fs.existsSync(configFilePathTS)) {\n configFilePath = configFilePathTS;\n } else if (fs.existsSync(configFilePathJS)) {\n configFilePath = configFilePathJS;\n } else {\n throw new Error(\n 'Neither monorise.config.ts nor monorise.config.js found in the root of the project.',\n );\n }\n\n const projectRoot = path.dirname(configFilePath);\n const monoriseConfigModule = await import(configFilePath);\n const monoriseConfig = monoriseConfigModule.default;\n\n const configDir = path.resolve(projectRoot, monoriseConfig.configDir);\n const monoriseOutputDir = path.join(projectRoot, '.monorise');\n\n fs.mkdirSync(monoriseOutputDir, { recursive: true });\n\n await generateConfigFile(configDir, monoriseOutputDir);\n await generateHandleFile(monoriseConfig, projectRoot, monoriseOutputDir);\n\n return configDir;\n}\n\nconst MONORISE_LOGO = `\n\n\n\n ░░░░░░░\n ░░▒▒▒░░░░░░▒▒▒░\n ░▒▒░ ░▒▒░\n ░▒▒░ ░▒▒░\n ░▒░ ░▒▒░\n ░▒▒░ ▒▒▒░\n ░▒░░░▒░ ░▒░░▒▒░\n ░▒▒░ ░▒▒▒░ ░▒▒░ ░▒░░\n ░▒▒ ░▒▒░ ░▒▒░ ░▒░ ░▒░ ░▒░\n ░▒▒░ ░▒░ ░▒░░▒▒░░░ ░░▒▒░░▒░ ░▒▒ ░▒░\n ░░▒░ ░▒░ ░▒░ ░▒▒░░▒▒▒▒▒▒░░▒░ ░▒░░ ░▒░ ░▒░\n ░▒░ ░░▒░ ░▒░ ░░░ ░▒░ ░░ ░▒░ ░▒░ ░▒░░ ░░▒░\n ░▒░ ░▒░ ░▒░ ░▒ ░░ ░▒░ ░▒░ ░▒░ ░▒░ ░░░░\n ░░░ ░░░░ ░░░ ░░ ▒░ ░░░ ░░░ ░░░ ░░░ ░░░░\n ░░░ ░░░░ ░░░ ░░░ ░░░ ░░ ░░░ ░░░ ░░░ ░░░░\n ░░░ ░░░ ░░░ ░░░ ░░ ░░ ░░░ ░░░ ░░░ ░░░\n ░░░ ░░░░ ░░░ ░░░ ░░ ░░░ ░░ ░░░ ░░░ ░░░\n ░░ ░░░ ░░░ ░░░ ░░░ ░░ ░░░ ░░░ ░░░ ░░░\n ░░ ░░ ░░ ░░ ░░ ░░░ ░░░ ░░░ ░░░░ ░░░\n ░░░ ░░ ░░░ ░░░ ░░░\n ░░░░░▒░░░░░░░░░▒░░░░░░░░░ ░ ░░ ░░░ ░░░ ░░\n ░░░ ░░░░░░░░░ ░░░ ░░░\n ░░░ ░░░░░░ ░░ ░░░░░▒░░░░░░▒░░░░\n ░░░░░░░░░░░░░░░░░ ░░░░░ ░░░░░░░░ ░░\n ░░░░░░░ ░░░░░░░░░░░░░░ ░░░░ ░░░░░ ░▒░\n ░░░ ░░░░░░░ ░░░░░░ ░░░░░░░░\n ░░░░░░░░░░░░ ░░░░░░ ░░░░ ░░░░░░░░░░░░░\n ░▒▒░░░░░░░░░░░▒▒░░ ░░▒▒▒░░ ░▒▒░░ ░░░░\n ░▒░ ░░▒▒░ ░▒░ ░▒▒░ ░░▒░\n ░▒░ ░░░░▒▒▒▒▒▒▒▒▒▒░░ ░▒░ ▒▒░ ░░▒▒▒░\n ░▒▒▒▒▒░░░ ░░░▒▒▒▒▒░ ▒▒░ ░▒▒▒▒▒▒░\n ░▒▒░ ░▒▒▒▒ ▒▒▒ ▒▒▒\n ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░ ░▒▒▒▒▒░ ░▒▒\n ▒▒▒ ░░▒▒▒▒▒▒░ ▒▒▒ ░▒▒\n ▒▒▒ ░▒▒▒▒ ░▒▒▒░\n ▒▓▓▓▒▒▒▓▓▒▒▒░ ▒▒▒░░▒▒░\n ▒▓░ ░▒▒▓▓▒░ ▒▓▓░\n ░▒▓░ ░▒▓▒░▒▓▒\n ░▒▓▒░ ░▒▓▓▒\n ░▒▒▓▓▓▓▓▓▒▒░\n\n\n\n`;\n\nasync function runInitCommand(rootPath?: string) {\n const projectRoot = rootPath ? path.resolve(rootPath) : process.cwd();\n console.log(MONORISE_LOGO);\n console.log(`Initializing Monorise project in ${projectRoot}...`);\n\n // 1. Create monorise.config.ts\n const monoriseConfigTsPath = path.join(projectRoot, 'monorise.config.ts');\n const monoriseConfigContent = `\nconst config = {\n configDir: './monorise/entities',\n // custom route file should export default an Hono object.\n // customRoutes: './path/to/custom/routes.ts'\n};\n\nexport default config;\n`;\n if (!fs.existsSync(monoriseConfigTsPath)) {\n fs.writeFileSync(monoriseConfigTsPath, monoriseConfigContent.trimStart());\n console.log(`Created ${path.relative(projectRoot, monoriseConfigTsPath)}`);\n } else {\n console.log(\n `${path.relative(projectRoot, monoriseConfigTsPath)} already exists. Skipping.`,\n );\n }\n\n // 2. Create ./monorise/entities/user.ts\n const monoriseEntitiesDir = path.join(projectRoot, 'monorise', 'entities');\n fs.mkdirSync(monoriseEntitiesDir, { recursive: true });\n\n const userEntityTsPath = path.join(monoriseEntitiesDir, 'user.ts');\n const userEntityContent = `\nimport { createEntityConfig } from 'monorise/base';\nimport { z } from 'zod';\n\nconst baseSchema = z\n .object({\n displayName: z\n .string()\n .min(1, 'Please provide a name for this user account'),\n firstName: z.string().min(1, 'Please provide first name'),\n lastName: z.string().min(1, 'Please provide last name'),\n jobTitle: z.string(),\n })\n .partial();\n\nconst config = createEntityConfig({\n name: 'user',\n baseSchema,\n});\n\nexport default config;\n`;\n if (!fs.existsSync(userEntityTsPath)) {\n fs.writeFileSync(userEntityTsPath, userEntityContent.trimStart());\n console.log(`Created ${path.relative(projectRoot, userEntityTsPath)}`);\n } else {\n console.log(\n `${path.relative(projectRoot, userEntityTsPath)} already exists. Skipping.`,\n );\n }\n\n // 3. Update package.json\n const packageJsonPath = path.join(projectRoot, 'package.json');\n if (fs.existsSync(packageJsonPath)) {\n try {\n const packageJsonContent = fs.readFileSync(packageJsonPath, 'utf8');\n const packageJson = JSON.parse(packageJsonContent);\n\n if (packageJson.type !== 'module') {\n packageJson.type = 'module';\n fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));\n console.log(\n `Updated 'type' to 'module' in ${path.relative(projectRoot, packageJsonPath)}`,\n );\n } else {\n console.log(\n `'type: \"module\"' already set in ${path.relative(projectRoot, packageJsonPath)}. Skipping.`,\n );\n }\n } catch (error) {\n console.error(\n `Error reading or parsing ${path.relative(projectRoot, packageJsonPath)}:`,\n error,\n );\n }\n } else {\n console.warn(\n `Warning: ${path.relative(projectRoot, packageJsonPath)} not found. Cannot update 'type'.`,\n );\n }\n\n // 4. Add tsconfig path alias for .monorise directory\n const tsconfigPath = path.join(projectRoot, 'tsconfig.json');\n if (fs.existsSync(tsconfigPath)) {\n try {\n const tsconfigContent = fs.readFileSync(tsconfigPath, 'utf8');\n const tsconfig = JSON.parse(tsconfigContent);\n\n if (!tsconfig.compilerOptions) {\n tsconfig.compilerOptions = {};\n }\n if (!tsconfig.compilerOptions.paths) {\n tsconfig.compilerOptions.paths = {};\n }\n\n const pathKey = '#/monorise/*';\n const pathValue = ['./.monorise/*'];\n\n if (!tsconfig.compilerOptions.paths[pathKey]) {\n tsconfig.compilerOptions.paths[pathKey] = pathValue;\n fs.writeFileSync(tsconfigPath, JSON.stringify(tsconfig, null, 2));\n console.log(\n `Added '${pathKey}' path alias in ${path.relative(projectRoot, tsconfigPath)}`,\n );\n } else {\n console.log(\n `'${pathKey}' path alias already set in ${path.relative(projectRoot, tsconfigPath)}. Skipping.`,\n );\n }\n } catch (error) {\n console.error(\n `Error updating ${path.relative(projectRoot, tsconfigPath)}:`,\n error,\n );\n }\n } else {\n console.warn(\n `Warning: ${path.relative(projectRoot, tsconfigPath)} not found. Cannot add path alias.`,\n );\n }\n\n console.log('Monorise initialization complete!');\n}\n\nasync function runDevCommand(configDir: string, rootPath?: string) {\n console.log(MONORISE_LOGO);\n console.log(`Watching for changes in ${configDir}...`);\n const watcher = chokidar.watch(configDir, {\n ignored: (watchedPath: string) => {\n const fileName = path.basename(watchedPath);\n return (\n fileName === 'index.ts' || // Old name, still ignore in case it exists\n fileName === 'config.ts' || // Generated config file\n fileName === 'processors.ts' || // Generated processors file\n fileName === 'app.ts' || // Generated app file\n fileName.startsWith('.') ||\n watchedPath.endsWith('.js') ||\n watchedPath.endsWith('.jsx') ||\n watchedPath.endsWith('.d.ts')\n );\n },\n persistent: true,\n ignoreInitial: true,\n });\n\n watcher.on('add', async (filePath) => {\n console.log(`File ${filePath} has been added. Regenerating...`);\n try {\n await generateFiles(rootPath);\n } catch (err) {\n console.error('Regeneration failed:', err);\n }\n });\n\n watcher.on('change', async (filePath) => {\n console.log(`File ${filePath} has been changed. Regenerating...`);\n try {\n await generateFiles(rootPath);\n } catch (err) {\n console.error('Regeneration failed:', err);\n }\n });\n\n watcher.on('unlink', async (filePath) => {\n console.log(`File ${filePath} has been removed. Regenerating...`);\n try {\n await generateFiles(rootPath);\n } catch (err) {\n console.error('Regeneration failed:', err);\n }\n });\n\n process.on('SIGINT', () => {\n console.log('Monorise dev terminated. Closing watcher and sst dev...');\n watcher.close();\n process.exit(0);\n });\n process.on('SIGTERM', () => {\n console.log('Monorise dev terminated. Closing watcher and sst dev...');\n watcher.close();\n process.exit(0);\n });\n}\n\nasync function runBuildCommand(rootPath?: string) {\n console.log('Starting sst build...');\n await generateFiles(rootPath);\n}\n\nasync function main() {\n const args = process.argv.slice(2);\n const command = args[0];\n\n let rootPath: string | undefined;\n const rootFlagIndex = args.indexOf('--config-root');\n if (rootFlagIndex > -1 && args[rootFlagIndex + 1]) {\n rootPath = args[rootFlagIndex + 1];\n }\n\n try {\n if (command === 'dev') {\n const configDir = await generateFiles(rootPath);\n await runDevCommand(configDir, rootPath);\n } else if (command === 'build') {\n await runBuildCommand(rootPath);\n } else if (command === 'init') {\n await runInitCommand(rootPath);\n } else {\n console.error(\n 'Unknown command. Usage: monorise [dev|build|init] [--config-root <path>]',\n );\n process.exit(1);\n }\n } catch (err) {\n console.error('Monorise process failed:', err);\n process.exit(1);\n }\n}\n\nmain().catch((err) => {\n console.error('Monorise encountered an unhandled error:', err);\n process.exit(1);\n});\n"],"mappings":";;;AAEA,OAAO;AACP,OAAO;AACP,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,OAAO,cAAc;AAErB,SAAS,aAAa,KAAqB;AACzC,SAAO,IAAI,QAAQ,aAAa,CAAC,GAAG,WAAW,OAAO,YAAY,CAAC;AACrE;AAEA,SAAS,cAAc,OAAuB;AAC5C,SAAO,MACJ,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC,EAAE,YAAY,IAAI,KAAK,MAAM,CAAC,CAAC,EAC1D,KAAK,EAAE;AACZ;AAEA,eAAe,mBACb,WACA,mBACiB;AACjB,QAAM,mBAAmB,KAAK,KAAK,mBAAmB,WAAW;AACjE,QAAM,uBAAuB;AAAA;AAAA;AAG7B,KAAG,cAAc,kBAAkB,oBAAoB;AAEvD,QAAM,QAAQ,GACX,YAAY,SAAS,EACrB,OAAO,CAAC,SAAS,KA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