@kensio/yulin 1.6.1 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -0
- package/dist/cli/sim-cli.d.ts +20 -0
- package/dist/cli/sim-cli.d.ts.map +1 -0
- package/dist/cli/sim-cli.js +46 -0
- package/dist/cli/sim-cli.js.map +1 -0
- package/dist/cli/watch/sim-watch-arguments.d.ts +31 -0
- package/dist/cli/watch/sim-watch-arguments.d.ts.map +1 -0
- package/dist/cli/watch/sim-watch-arguments.js +95 -0
- package/dist/cli/watch/sim-watch-arguments.js.map +1 -0
- package/dist/cli/watch/sim-watch-child-environment.d.ts +30 -0
- package/dist/cli/watch/sim-watch-child-environment.d.ts.map +1 -0
- package/dist/cli/watch/sim-watch-child-environment.js +51 -0
- package/dist/cli/watch/sim-watch-child-environment.js.map +1 -0
- package/dist/cli/watch/sim-watch-child-message.d.ts +19 -0
- package/dist/cli/watch/sim-watch-child-message.d.ts.map +1 -0
- package/dist/cli/watch/sim-watch-child-message.js +42 -0
- package/dist/cli/watch/sim-watch-child-message.js.map +1 -0
- package/dist/cli/watch/sim-watch-child-process.d.ts +22 -0
- package/dist/cli/watch/sim-watch-child-process.d.ts.map +1 -0
- package/dist/cli/watch/sim-watch-child-process.js +33 -0
- package/dist/cli/watch/sim-watch-child-process.js.map +1 -0
- package/dist/cli/watch/sim-watch-child-shutdown.d.ts +28 -0
- package/dist/cli/watch/sim-watch-child-shutdown.d.ts.map +1 -0
- package/dist/cli/watch/sim-watch-child-shutdown.js +59 -0
- package/dist/cli/watch/sim-watch-child-shutdown.js.map +1 -0
- package/dist/cli/watch/sim-watch-child.d.ts +42 -0
- package/dist/cli/watch/sim-watch-child.d.ts.map +1 -0
- package/dist/cli/watch/sim-watch-child.js +62 -0
- package/dist/cli/watch/sim-watch-child.js.map +1 -0
- package/dist/cli/watch/sim-watch-command.d.ts +22 -0
- package/dist/cli/watch/sim-watch-command.d.ts.map +1 -0
- package/dist/cli/watch/sim-watch-command.js +41 -0
- package/dist/cli/watch/sim-watch-command.js.map +1 -0
- package/dist/cli/watch/sim-watch-event-path.d.ts +27 -0
- package/dist/cli/watch/sim-watch-event-path.d.ts.map +1 -0
- package/dist/cli/watch/sim-watch-event-path.js +48 -0
- package/dist/cli/watch/sim-watch-event-path.js.map +1 -0
- package/dist/cli/watch/sim-watch-ignore.d.ts +15 -0
- package/dist/cli/watch/sim-watch-ignore.d.ts.map +1 -0
- package/dist/cli/watch/sim-watch-ignore.js +64 -0
- package/dist/cli/watch/sim-watch-ignore.js.map +1 -0
- package/dist/cli/watch/sim-watch-loop-guard.d.ts +35 -0
- package/dist/cli/watch/sim-watch-loop-guard.d.ts.map +1 -0
- package/dist/cli/watch/sim-watch-loop-guard.js +51 -0
- package/dist/cli/watch/sim-watch-loop-guard.js.map +1 -0
- package/dist/cli/watch/sim-watch-reporter.d.ts +38 -0
- package/dist/cli/watch/sim-watch-reporter.d.ts.map +1 -0
- package/dist/cli/watch/sim-watch-reporter.js +65 -0
- package/dist/cli/watch/sim-watch-reporter.js.map +1 -0
- package/dist/cli/watch/sim-watch-restarts.d.ts +30 -0
- package/dist/cli/watch/sim-watch-restarts.d.ts.map +1 -0
- package/dist/cli/watch/sim-watch-restarts.js +62 -0
- package/dist/cli/watch/sim-watch-restarts.js.map +1 -0
- package/dist/cli/watch/sim-watch-supervisor.d.ts +52 -0
- package/dist/cli/watch/sim-watch-supervisor.d.ts.map +1 -0
- package/dist/cli/watch/sim-watch-supervisor.js +128 -0
- package/dist/cli/watch/sim-watch-supervisor.js.map +1 -0
- package/dist/cli/watch/sim-watch-watcher.d.ts +69 -0
- package/dist/cli/watch/sim-watch-watcher.d.ts.map +1 -0
- package/dist/cli/watch/sim-watch-watcher.js +148 -0
- package/dist/cli/watch/sim-watch-watcher.js.map +1 -0
- package/dist/cli/yulin.d.ts +3 -0
- package/dist/cli/yulin.d.ts.map +1 -0
- package/dist/cli/yulin.js +14 -0
- package/dist/cli/yulin.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/serve/http/live-reload/sim-live-reload-client.d.ts +44 -0
- package/dist/serve/http/live-reload/sim-live-reload-client.d.ts.map +1 -0
- package/dist/serve/http/live-reload/sim-live-reload-client.js +86 -0
- package/dist/serve/http/live-reload/sim-live-reload-client.js.map +1 -0
- package/dist/serve/http/live-reload/sim-live-reload-injectable.d.ts +47 -0
- package/dist/serve/http/live-reload/sim-live-reload-injectable.d.ts.map +1 -0
- package/dist/serve/http/live-reload/sim-live-reload-injectable.js +86 -0
- package/dist/serve/http/live-reload/sim-live-reload-injectable.js.map +1 -0
- package/dist/serve/http/live-reload/sim-live-reload-injector.d.ts +22 -0
- package/dist/serve/http/live-reload/sim-live-reload-injector.d.ts.map +1 -0
- package/dist/serve/http/live-reload/sim-live-reload-injector.js +72 -0
- package/dist/serve/http/live-reload/sim-live-reload-injector.js.map +1 -0
- package/dist/serve/http/live-reload/sim-live-reload-report.d.ts +18 -0
- package/dist/serve/http/live-reload/sim-live-reload-report.d.ts.map +1 -0
- package/dist/serve/http/live-reload/sim-live-reload-report.js +27 -0
- package/dist/serve/http/live-reload/sim-live-reload-report.js.map +1 -0
- package/dist/serve/http/live-reload/sim-live-reload-script.d.ts +20 -0
- package/dist/serve/http/live-reload/sim-live-reload-script.d.ts.map +1 -0
- package/dist/serve/http/live-reload/sim-live-reload-script.js +45 -0
- package/dist/serve/http/live-reload/sim-live-reload-script.js.map +1 -0
- package/dist/serve/http/live-reload/sim-live-reload.config.d.ts +13 -0
- package/dist/serve/http/live-reload/sim-live-reload.config.d.ts.map +1 -0
- package/dist/serve/http/live-reload/sim-live-reload.config.js +25 -0
- package/dist/serve/http/live-reload/sim-live-reload.config.js.map +1 -0
- package/dist/serve/http/live-reload/sim-live-reload.d.ts +55 -0
- package/dist/serve/http/live-reload/sim-live-reload.d.ts.map +1 -0
- package/dist/serve/http/live-reload/sim-live-reload.js +84 -0
- package/dist/serve/http/live-reload/sim-live-reload.js.map +1 -0
- package/dist/serve/http/live-reload/sim-local-live-reload.d.ts +55 -0
- package/dist/serve/http/live-reload/sim-local-live-reload.d.ts.map +1 -0
- package/dist/serve/http/live-reload/sim-local-live-reload.js +80 -0
- package/dist/serve/http/live-reload/sim-local-live-reload.js.map +1 -0
- package/dist/serve/http/local-server/node-server-port-binder.d.ts +39 -0
- package/dist/serve/http/local-server/node-server-port-binder.d.ts.map +1 -0
- package/dist/serve/http/local-server/node-server-port-binder.js +71 -0
- package/dist/serve/http/local-server/node-server-port-binder.js.map +1 -0
- package/dist/serve/http/local-server/node-server-port.d.ts +10 -0
- package/dist/serve/http/local-server/node-server-port.d.ts.map +1 -0
- package/dist/serve/http/local-server/node-server-port.js +19 -0
- package/dist/serve/http/local-server/node-server-port.js.map +1 -0
- package/dist/serve/http/local-server/sim-aws-local-port.error.d.ts +13 -0
- package/dist/serve/http/local-server/sim-aws-local-port.error.d.ts.map +1 -0
- package/dist/serve/http/local-server/sim-aws-local-port.error.js +16 -0
- package/dist/serve/http/local-server/sim-aws-local-port.error.js.map +1 -0
- package/dist/serve/http/local-server/sim-aws-local-request-handler.d.ts +14 -1
- package/dist/serve/http/local-server/sim-aws-local-request-handler.d.ts.map +1 -1
- package/dist/serve/http/local-server/sim-aws-local-request-handler.js +20 -2
- package/dist/serve/http/local-server/sim-aws-local-request-handler.js.map +1 -1
- package/dist/serve/http/local-server/sim-aws-local-server.d.ts +66 -1
- package/dist/serve/http/local-server/sim-aws-local-server.d.ts.map +1 -1
- package/dist/serve/http/local-server/sim-aws-local-server.js +92 -17
- package/dist/serve/http/local-server/sim-aws-local-server.js.map +1 -1
- package/dist/serve/http/local-server/sim-aws-local.config.d.ts +2 -0
- package/dist/serve/http/local-server/sim-aws-local.config.d.ts.map +1 -1
- package/dist/serve/http/local-server/sim-aws-local.config.js +6 -0
- package/dist/serve/http/local-server/sim-aws-local.config.js.map +1 -1
- package/dist/serve/index.d.ts +4 -0
- package/dist/serve/index.d.ts.map +1 -1
- package/dist/serve/index.js +3 -0
- package/dist/serve/index.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +2 -2
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js.map +1 -1
- package/dist/service/aws/scope/sim-aws-scope-registry.d.ts +9 -0
- package/dist/service/aws/scope/sim-aws-scope-registry.d.ts.map +1 -1
- package/dist/service/aws/scope/sim-aws-scope-registry.js +13 -0
- package/dist/service/aws/scope/sim-aws-scope-registry.js.map +1 -1
- package/dist/service/aws/sim-aws-account-id.d.ts +27 -0
- package/dist/service/aws/sim-aws-account-id.d.ts.map +1 -0
- package/dist/service/aws/sim-aws-account-id.js +34 -0
- package/dist/service/aws/sim-aws-account-id.js.map +1 -0
- package/dist/service/aws/sim-aws-account-region-scope.d.ts +10 -0
- package/dist/service/aws/sim-aws-account-region-scope.d.ts.map +1 -1
- package/dist/service/aws/sim-aws-account-region-scope.js +18 -0
- package/dist/service/aws/sim-aws-account-region-scope.js.map +1 -1
- package/dist/service/aws/sim-aws-account.d.ts +5 -7
- package/dist/service/aws/sim-aws-account.d.ts.map +1 -1
- package/dist/service/aws/sim-aws-account.js +9 -8
- package/dist/service/aws/sim-aws-account.js.map +1 -1
- package/dist/service/aws/sim-aws-closing.d.ts +24 -0
- package/dist/service/aws/sim-aws-closing.d.ts.map +1 -0
- package/dist/service/aws/sim-aws-closing.js +7 -0
- package/dist/service/aws/sim-aws-closing.js.map +1 -0
- package/dist/service/aws/sim-aws.d.ts +34 -0
- package/dist/service/aws/sim-aws.d.ts.map +1 -1
- package/dist/service/aws/sim-aws.js +40 -0
- package/dist/service/aws/sim-aws.js.map +1 -1
- package/dist/service/cloudformation/authorize/sim-cloudformation-authorization.d.ts +44 -0
- package/dist/service/cloudformation/authorize/sim-cloudformation-authorization.d.ts.map +1 -0
- package/dist/service/cloudformation/authorize/sim-cloudformation-authorization.js +53 -0
- package/dist/service/cloudformation/authorize/sim-cloudformation-authorization.js.map +1 -0
- package/dist/service/cloudformation/command/update-stack/update-stack.handler.d.ts +7 -0
- package/dist/service/cloudformation/command/update-stack/update-stack.handler.d.ts.map +1 -1
- package/dist/service/cloudformation/command/update-stack/update-stack.handler.js +3 -1
- package/dist/service/cloudformation/command/update-stack/update-stack.handler.js.map +1 -1
- package/dist/service/cloudformation/deploy/sim-cfn-template-deployer.d.ts +19 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-deployer.d.ts.map +1 -1
- package/dist/service/cloudformation/deploy/sim-cfn-template-deployer.js +40 -1
- package/dist/service/cloudformation/deploy/sim-cfn-template-deployer.js.map +1 -1
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-deployment.d.ts +10 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-deployment.d.ts.map +1 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-deployment.js +14 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-deployment.js.map +1 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.d.ts +29 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.d.ts.map +1 -1
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.js +13 -7
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.js.map +1 -1
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-transform.d.ts +18 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-transform.d.ts.map +1 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-transform.js +23 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-transform.js.map +1 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-updater.d.ts +49 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-updater.d.ts.map +1 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-updater.js +59 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-updater.js.map +1 -0
- package/dist/service/cloudformation/index.d.ts +3 -0
- package/dist/service/cloudformation/index.d.ts.map +1 -1
- package/dist/service/cloudformation/sim-cloudformation.d.ts +39 -5
- package/dist/service/cloudformation/sim-cloudformation.d.ts.map +1 -1
- package/dist/service/cloudformation/sim-cloudformation.js +56 -14
- package/dist/service/cloudformation/sim-cloudformation.js.map +1 -1
- package/dist/service/cloudformation/stack/sim-cfn-stack-resource-operations.d.ts +10 -1
- package/dist/service/cloudformation/stack/sim-cfn-stack-resource-operations.d.ts.map +1 -1
- package/dist/service/cloudformation/stack/sim-cfn-stack-resource-operations.js +12 -1
- package/dist/service/cloudformation/stack/sim-cfn-stack-resource-operations.js.map +1 -1
- package/dist/service/cloudformation/stack/sim-cfn-stack.d.ts +14 -1
- package/dist/service/cloudformation/stack/sim-cfn-stack.d.ts.map +1 -1
- package/dist/service/cloudformation/stack/sim-cfn-stack.js +10 -1
- package/dist/service/cloudformation/stack/sim-cfn-stack.js.map +1 -1
- package/dist/service/cloudformation/stack/update/sim-cfn-stack-updater.d.ts +8 -0
- package/dist/service/cloudformation/stack/update/sim-cfn-stack-updater.d.ts.map +1 -1
- package/dist/service/cloudformation/stack/update/sim-cfn-stack-updater.js +9 -1
- package/dist/service/cloudformation/stack/update/sim-cfn-stack-updater.js.map +1 -1
- package/dist/service/cloudformation/watch/sim-cfn-template-file-events.d.ts +30 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-file-events.d.ts.map +1 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-file-events.js +51 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-file-events.js.map +1 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-file-watch.d.ts +39 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-file-watch.d.ts.map +1 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-file-watch.js +74 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-file-watch.js.map +1 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-file-watches.d.ts +51 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-file-watches.d.ts.map +1 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-file-watches.js +0 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-file-watches.js.map +1 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-watch-report.d.ts +27 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-watch-report.d.ts.map +1 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-watch-report.js +37 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-watch-report.js.map +1 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-watch-update.d.ts +45 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-watch-update.d.ts.map +1 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-watch-update.js +84 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-watch-update.js.map +1 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-watch.type.d.ts +58 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-watch.type.d.ts.map +1 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-watch.type.js +2 -0
- package/dist/service/cloudformation/watch/sim-cfn-template-watch.type.js.map +1 -0
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-admin-create-user-config.d.ts +29 -0
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-admin-create-user-config.d.ts.map +1 -0
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-admin-create-user-config.js +47 -0
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-admin-create-user-config.js.map +1 -0
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-user-pool-properties.d.ts.map +1 -1
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-user-pool-properties.js +26 -8
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-user-pool-properties.js.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-admin-initiate-auth.d.ts +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-admin-initiate-auth.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-admin-initiate-auth.js +3 -2
- package/dist/service/cognito/command/auth/sim-cognito-admin-initiate-auth.js.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-admin-respond-to-challenge.d.ts +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-admin-respond-to-challenge.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-admin-respond-to-challenge.js +3 -2
- package/dist/service/cognito/command/auth/sim-cognito-admin-respond-to-challenge.js.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-auth-commands.d.ts +11 -4
- package/dist/service/cognito/command/auth/sim-cognito-auth-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-auth-commands.js +11 -8
- package/dist/service/cognito/command/auth/sim-cognito-auth-commands.js.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-auth-flow-runner.d.ts +5 -1
- package/dist/service/cognito/command/auth/sim-cognito-auth-flow-runner.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-auth-flow-runner.js +7 -3
- package/dist/service/cognito/command/auth/sim-cognito-auth-flow-runner.js.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-initiate-auth.d.ts +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-initiate-auth.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-initiate-auth.js +3 -2
- package/dist/service/cognito/command/auth/sim-cognito-initiate-auth.js.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-new-password-response.d.ts +11 -1
- package/dist/service/cognito/command/auth/sim-cognito-new-password-response.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-new-password-response.js +30 -4
- package/dist/service/cognito/command/auth/sim-cognito-new-password-response.js.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.d.ts +19 -1
- package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.js +40 -5
- package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.js.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-refresh-sign-in.d.ts +5 -1
- package/dist/service/cognito/command/auth/sim-cognito-refresh-sign-in.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-refresh-sign-in.js +15 -2
- package/dist/service/cognito/command/auth/sim-cognito-refresh-sign-in.js.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-respond-to-challenge.d.ts +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-respond-to-challenge.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-respond-to-challenge.js +3 -2
- package/dist/service/cognito/command/auth/sim-cognito-respond-to-challenge.js.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-unsimulated-auth-options.d.ts +5 -0
- package/dist/service/cognito/command/auth/sim-cognito-unsimulated-auth-options.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-unsimulated-auth-options.js +5 -1
- package/dist/service/cognito/command/auth/sim-cognito-unsimulated-auth-options.js.map +1 -1
- package/dist/service/cognito/command/client/sim-cognito-unsimulated-client-options.d.ts +6 -4
- package/dist/service/cognito/command/client/sim-cognito-unsimulated-client-options.d.ts.map +1 -1
- package/dist/service/cognito/command/client/sim-cognito-unsimulated-client-options.js +9 -4
- package/dist/service/cognito/command/client/sim-cognito-unsimulated-client-options.js.map +1 -1
- package/dist/service/cognito/command/client/sim-cognito-unsimulated-managed-login.d.ts +3 -2
- package/dist/service/cognito/command/client/sim-cognito-unsimulated-managed-login.d.ts.map +1 -1
- package/dist/service/cognito/command/client/sim-cognito-unsimulated-managed-login.js +6 -6
- package/dist/service/cognito/command/client/sim-cognito-unsimulated-managed-login.js.map +1 -1
- package/dist/service/cognito/command/client/sim-cognito-user-pool-client-commands.d.ts +23 -3
- package/dist/service/cognito/command/client/sim-cognito-user-pool-client-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/client/sim-cognito-user-pool-client-commands.js +35 -8
- package/dist/service/cognito/command/client/sim-cognito-user-pool-client-commands.js.map +1 -1
- package/dist/service/cognito/command/client/sim-cognito-user-pool-client-view.d.ts +2 -2
- package/dist/service/cognito/command/client/sim-cognito-user-pool-client-view.js +2 -2
- package/dist/service/cognito/command/client/user-pool-client.command.d.ts +37 -5
- package/dist/service/cognito/command/client/user-pool-client.command.d.ts.map +1 -1
- package/dist/service/cognito/command/sim-cognito-command.types.d.ts +3 -2
- package/dist/service/cognito/command/sim-cognito-command.types.d.ts.map +1 -1
- package/dist/service/cognito/command/sim-cognito-commands.d.ts +4 -0
- package/dist/service/cognito/command/sim-cognito-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/sim-cognito-commands.js +33 -3
- package/dist/service/cognito/command/sim-cognito-commands.js.map +1 -1
- package/dist/service/cognito/command/sim-cognito-unsimulated-input.d.ts +5 -1
- package/dist/service/cognito/command/sim-cognito-unsimulated-input.d.ts.map +1 -1
- package/dist/service/cognito/command/sim-cognito-unsimulated-input.js +4 -0
- package/dist/service/cognito/command/sim-cognito-unsimulated-input.js.map +1 -1
- package/dist/service/cognito/command/sim-cognito-validation-data.d.ts +14 -0
- package/dist/service/cognito/command/sim-cognito-validation-data.d.ts.map +1 -0
- package/dist/service/cognito/command/sim-cognito-validation-data.js +29 -0
- package/dist/service/cognito/command/sim-cognito-validation-data.js.map +1 -0
- package/dist/service/cognito/command/user/sign-up.command.d.ts +104 -0
- package/dist/service/cognito/command/user/sign-up.command.d.ts.map +1 -0
- package/dist/service/cognito/command/user/sign-up.command.js +2 -0
- package/dist/service/cognito/command/user/sign-up.command.js.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.d.ts +104 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.d.ts.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js +186 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-sign-up-options.d.ts +38 -0
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-sign-up-options.d.ts.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-sign-up-options.js +49 -0
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-sign-up-options.js.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-user-options.d.ts +15 -5
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-user-options.d.ts.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-user-options.js +17 -9
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-user-options.js.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-user-commands.d.ts +25 -12
- package/dist/service/cognito/command/user/sim-cognito-user-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-user-commands.js +42 -19
- package/dist/service/cognito/command/user/sim-cognito-user-commands.js.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-user-update-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-user-update-commands.js +1 -1
- package/dist/service/cognito/command/user/sim-cognito-user-update-commands.js.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-features.d.ts +16 -5
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-features.d.ts.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-features.js +21 -24
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-features.js.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-identity.d.ts +28 -0
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-identity.d.ts.map +1 -0
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-identity.js +42 -0
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-identity.js.map +1 -0
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-messaging.d.ts +21 -12
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-messaging.d.ts.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-messaging.js +28 -36
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-messaging.js.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-options.d.ts +8 -14
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-options.d.ts.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-options.js +13 -25
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-options.js.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-updates.d.ts +21 -0
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-updates.d.ts.map +1 -0
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-updates.js +25 -0
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-updates.js.map +1 -0
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-commands.d.ts +17 -2
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-commands.js +35 -10
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-commands.js.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-view.d.ts +10 -2
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-view.d.ts.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-view.js +17 -5
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-view.js.map +1 -1
- package/dist/service/cognito/command/user-pool/user-pool.command.d.ts +56 -23
- package/dist/service/cognito/command/user-pool/user-pool.command.d.ts.map +1 -1
- package/dist/service/cognito/error/sim-cognito-trigger.error.d.ts +39 -0
- package/dist/service/cognito/error/sim-cognito-trigger.error.d.ts.map +1 -0
- package/dist/service/cognito/error/sim-cognito-trigger.error.js +45 -0
- package/dist/service/cognito/error/sim-cognito-trigger.error.js.map +1 -0
- package/dist/service/cognito/error/sim-cognito.error.d.ts +22 -0
- package/dist/service/cognito/error/sim-cognito.error.d.ts.map +1 -1
- package/dist/service/cognito/error/sim-cognito.error.js +26 -0
- package/dist/service/cognito/error/sim-cognito.error.js.map +1 -1
- package/dist/service/cognito/index.d.ts +8 -1
- package/dist/service/cognito/index.d.ts.map +1 -1
- package/dist/service/cognito/index.js +7 -1
- package/dist/service/cognito/index.js.map +1 -1
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.d.ts +6 -0
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.d.ts.map +1 -1
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.js +22 -0
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.js.map +1 -1
- package/dist/service/cognito/sdk/sim-cognito-sdk-pool-routes.d.ts.map +1 -1
- package/dist/service/cognito/sdk/sim-cognito-sdk-pool-routes.js +8 -0
- package/dist/service/cognito/sdk/sim-cognito-sdk-pool-routes.js.map +1 -1
- package/dist/service/cognito/serve/sim-cognito-controller.d.ts +10 -1
- package/dist/service/cognito/serve/sim-cognito-controller.d.ts.map +1 -1
- package/dist/service/cognito/serve/sim-cognito-controller.js +48 -8
- package/dist/service/cognito/serve/sim-cognito-controller.js.map +1 -1
- package/dist/service/cognito/serve/sim-cognito-endpoint-response.d.ts +1 -1
- package/dist/service/cognito/serve/sim-cognito-endpoint-response.d.ts.map +1 -1
- package/dist/service/cognito/serve/sim-cognito-endpoint-response.js +3 -2
- package/dist/service/cognito/serve/sim-cognito-endpoint-response.js.map +1 -1
- package/dist/service/cognito/sim-cognito-identity-provider.d.ts +20 -0
- package/dist/service/cognito/sim-cognito-identity-provider.d.ts.map +1 -1
- package/dist/service/cognito/sim-cognito-identity-provider.js +17 -1
- package/dist/service/cognito/sim-cognito-identity-provider.js.map +1 -1
- package/dist/service/cognito/sim-cognito-user-directory.d.ts +16 -0
- package/dist/service/cognito/sim-cognito-user-directory.d.ts.map +1 -1
- package/dist/service/cognito/sim-cognito-user-directory.js +28 -0
- package/dist/service/cognito/sim-cognito-user-directory.js.map +1 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.d.ts +9 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.js +14 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.js.map +1 -1
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-factory.d.ts +2 -11
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-factory.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-factory.js +2 -14
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-factory.js.map +1 -1
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.d.ts +38 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.js +36 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.js.map +1 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client.d.ts +40 -20
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client.js +54 -20
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client.js.map +1 -1
- package/dist/service/cognito/user-pool/message/sim-cognito-message-delivery.d.ts +32 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-delivery.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-delivery.js +52 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-delivery.js.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.d.ts +13 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.js +2 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.js.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-placeholders.d.ts +49 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-placeholders.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-placeholders.js +58 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-placeholders.js.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-wording.d.ts +41 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-wording.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-wording.js +39 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-wording.js.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-occasion-wording.d.ts +13 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-occasion-wording.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-occasion-wording.js +32 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-occasion-wording.js.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.d.ts +53 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.js +62 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.js.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-sent-message-store.d.ts +19 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-sent-message-store.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-sent-message-store.js +22 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-sent-message-store.js.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-sent-message.d.ts +65 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-sent-message.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-sent-message.js +52 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-sent-message.js.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-verification-messages.d.ts +68 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-verification-messages.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-verification-messages.js +91 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-verification-messages.js.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-verification-wording.d.ts +18 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-verification-wording.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-verification-wording.js +31 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-verification-wording.js.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-admin-create-user-config.d.ts +41 -0
- package/dist/service/cognito/user-pool/sim-cognito-admin-create-user-config.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-admin-create-user-config.js +41 -0
- package/dist/service/cognito/user-pool/sim-cognito-admin-create-user-config.js.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-auto-verified-attributes.d.ts +35 -0
- package/dist/service/cognito/user-pool/sim-cognito-auto-verified-attributes.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-auto-verified-attributes.js +60 -0
- package/dist/service/cognito/user-pool/sim-cognito-auto-verified-attributes.js.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-unsimulated-pool-settings.d.ts +10 -15
- package/dist/service/cognito/user-pool/sim-cognito-unsimulated-pool-settings.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-unsimulated-pool-settings.js +10 -25
- package/dist/service/cognito/user-pool/sim-cognito-unsimulated-pool-settings.js.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-arn.d.ts +8 -0
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-arn.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-arn.js +9 -0
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-arn.js.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-factory.d.ts +3 -7
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-factory.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-factory.js +6 -7
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-factory.js.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-id.d.ts +24 -0
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-id.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-id.js +32 -0
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-id.js.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-settings.d.ts +65 -0
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-settings.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-settings.js +52 -0
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-settings.js.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-user-pool.d.ts +41 -28
- package/dist/service/cognito/user-pool/sim-cognito-user-pool.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool.js +55 -27
- package/dist/service/cognito/user-pool/sim-cognito-user-pool.js.map +1 -1
- package/dist/service/cognito/user-pool/token/sim-cognito-claims-override-reader.d.ts +29 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-claims-override-reader.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-claims-override-reader.js +80 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-claims-override-reader.js.map +1 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-claims-override-values.d.ts +21 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-claims-override-values.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-claims-override-values.js +45 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-claims-override-values.js.map +1 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-claims-override.d.ts +54 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-claims-override.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-claims-override.js +72 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-claims-override.js.map +1 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-group-override.d.ts +10 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-group-override.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-group-override.js +54 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-group-override.js.map +1 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-reserved-claims.d.ts +23 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-reserved-claims.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-reserved-claims.js +82 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-reserved-claims.js.map +1 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-token-issuer.d.ts +26 -2
- package/dist/service/cognito/user-pool/token/sim-cognito-token-issuer.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/token/sim-cognito-token-issuer.js +32 -7
- package/dist/service/cognito/user-pool/token/sim-cognito-token-issuer.js.map +1 -1
- package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.d.ts +55 -0
- package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.js +101 -0
- package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.js.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-custom-message.d.ts +31 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-custom-message.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-custom-message.js +73 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-custom-message.js.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-lambda-config.d.ts +58 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-lambda-config.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-lambda-config.js +77 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-lambda-config.js.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-pre-sign-up-response.d.ts +28 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-pre-sign-up-response.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-pre-sign-up-response.js +68 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-pre-sign-up-response.js.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-context.d.ts +36 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-context.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-context.js +2 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-context.js.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-event.d.ts +27 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-event.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-event.js +69 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-event.js.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-functions.d.ts +59 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-functions.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-functions.js +25 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-functions.js.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-invocation.d.ts +33 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-invocation.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-invocation.js +61 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-invocation.js.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-name.d.ts +20 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-name.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-name.js +46 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-name.js.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts +89 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js +102 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-request.d.ts +75 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-request.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-request.js +162 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-request.js.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-response.d.ts +19 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-response.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-response.js +38 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-response.js.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.d.ts +81 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.js +90 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.js.map +1 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-confirmation-code.d.ts +29 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-confirmation-code.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-confirmation-code.js +40 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-confirmation-code.js.map +1 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-attributes.d.ts +8 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-attributes.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-attributes.js +12 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-attributes.js.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.d.ts +36 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.js +51 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.js.map +1 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-factory.d.ts +31 -2
- package/dist/service/cognito/user-pool/user/sim-cognito-user-factory.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-factory.js +31 -4
- package/dist/service/cognito/user-pool/user/sim-cognito-user-factory.js.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.d.ts +39 -8
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.js +50 -7
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.js.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user.d.ts +55 -3
- package/dist/service/cognito/user-pool/user/sim-cognito-user.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user.js +74 -5
- package/dist/service/cognito/user-pool/user/sim-cognito-user.js.map +1 -1
- package/dist/service/lambda/function/invoke/sim-lambda-handler-runner.d.ts.map +1 -1
- package/dist/service/lambda/function/invoke/sim-lambda-handler-runner.js +22 -1
- package/dist/service/lambda/function/invoke/sim-lambda-handler-runner.js.map +1 -1
- package/dist/service/lambda/function/sim-lambda-function-arn-parts.d.ts +30 -0
- package/dist/service/lambda/function/sim-lambda-function-arn-parts.d.ts.map +1 -0
- package/dist/service/lambda/function/sim-lambda-function-arn-parts.js +32 -0
- package/dist/service/lambda/function/sim-lambda-function-arn-parts.js.map +1 -0
- package/dist/service/route53/cfn/record-set/build/sim-cfn-r53-record-set-builder.d.ts +5 -0
- package/dist/service/route53/cfn/record-set/build/sim-cfn-r53-record-set-builder.d.ts.map +1 -1
- package/dist/service/route53/cfn/record-set/build/sim-cfn-r53-record-set-builder.js +13 -3
- package/dist/service/route53/cfn/record-set/build/sim-cfn-r53-record-set-builder.js.map +1 -1
- package/dist/service/route53/cfn/record-set/build/sim-cfn-r53-record-type-skip.d.ts +26 -0
- package/dist/service/route53/cfn/record-set/build/sim-cfn-r53-record-type-skip.d.ts.map +1 -0
- package/dist/service/route53/cfn/record-set/build/sim-cfn-r53-record-type-skip.js +36 -0
- package/dist/service/route53/cfn/record-set/build/sim-cfn-r53-record-type-skip.js.map +1 -0
- package/dist/service/route53/dns/answer/dns-answerer-test-query.d.ts +6 -3
- package/dist/service/route53/dns/answer/dns-answerer-test-query.d.ts.map +1 -1
- package/dist/service/route53/dns/answer/dns-answerer-test-query.js +5 -2
- package/dist/service/route53/dns/answer/dns-answerer-test-query.js.map +1 -1
- package/dist/service/route53/dns/answer/sim-route53-dns-record-answer.d.ts.map +1 -1
- package/dist/service/route53/dns/answer/sim-route53-dns-record-answer.js +9 -3
- package/dist/service/route53/dns/answer/sim-route53-dns-record-answer.js.map +1 -1
- package/dist/service/route53/dns/dns-record-type.d.ts +24 -7
- package/dist/service/route53/dns/dns-record-type.d.ts.map +1 -1
- package/dist/service/route53/dns/dns-record-type.js +16 -7
- package/dist/service/route53/dns/dns-record-type.js.map +1 -1
- package/dist/service/route53/dns/rdata/dns-rdata.d.ts +2 -2
- package/dist/service/route53/dns/rdata/dns-rdata.d.ts.map +1 -1
- package/dist/service/route53/dns/rdata/dns-rdata.js.map +1 -1
- package/dist/service/route53/hosted-zone/register-sim-route53-hosted-zone.d.ts +34 -0
- package/dist/service/route53/hosted-zone/register-sim-route53-hosted-zone.d.ts.map +1 -0
- package/dist/service/route53/hosted-zone/register-sim-route53-hosted-zone.js +35 -0
- package/dist/service/route53/hosted-zone/register-sim-route53-hosted-zone.js.map +1 -0
- package/dist/service/route53/hosted-zone/sim-route53-hosted-zone-records.d.ts.map +1 -1
- package/dist/service/route53/hosted-zone/sim-route53-hosted-zone-records.js +2 -4
- package/dist/service/route53/hosted-zone/sim-route53-hosted-zone-records.js.map +1 -1
- package/dist/service/route53/hosted-zone/sim-route53-hosted-zone.d.ts +7 -0
- package/dist/service/route53/hosted-zone/sim-route53-hosted-zone.d.ts.map +1 -1
- package/dist/service/route53/hosted-zone/sim-route53-hosted-zone.js +10 -1
- package/dist/service/route53/hosted-zone/sim-route53-hosted-zone.js.map +1 -1
- package/dist/service/route53/index.d.ts +1 -0
- package/dist/service/route53/index.d.ts.map +1 -1
- package/dist/service/route53/index.js +1 -0
- package/dist/service/route53/index.js.map +1 -1
- package/dist/service/route53/record/sim-route53-record-type.d.ts +1 -1
- package/dist/service/route53/record/sim-route53-record-type.d.ts.map +1 -1
- package/dist/service/route53/record/sim-route53-record-type.js +3 -2
- package/dist/service/route53/record/sim-route53-record-type.js.map +1 -1
- package/dist/service/route53/record/sim-route53-record-value.d.ts +9 -0
- package/dist/service/route53/record/sim-route53-record-value.d.ts.map +1 -0
- package/dist/service/route53/record/sim-route53-record-value.js +26 -0
- package/dist/service/route53/record/sim-route53-record-value.js.map +1 -0
- package/dist/service/route53/record/sim-route53-record.d.ts +15 -1
- package/dist/service/route53/record/sim-route53-record.d.ts.map +1 -1
- package/dist/service/route53/record/sim-route53-record.js +21 -1
- package/dist/service/route53/record/sim-route53-record.js.map +1 -1
- package/dist/service/route53/sim-route53.d.ts +14 -0
- package/dist/service/route53/sim-route53.d.ts.map +1 -1
- package/dist/service/route53/sim-route53.js +19 -0
- package/dist/service/route53/sim-route53.js.map +1 -1
- package/dist/service/s3/bucket/sim-s3-bucket-access.d.ts +17 -1
- package/dist/service/s3/bucket/sim-s3-bucket-access.d.ts.map +1 -1
- package/dist/service/s3/bucket/sim-s3-bucket-access.js +22 -1
- package/dist/service/s3/bucket/sim-s3-bucket-access.js.map +1 -1
- package/dist/service/s3/index.d.ts +1 -0
- package/dist/service/s3/index.d.ts.map +1 -1
- package/dist/service/s3/mount/sim-s3-mount-directory-events.d.ts +40 -0
- package/dist/service/s3/mount/sim-s3-mount-directory-events.d.ts.map +1 -0
- package/dist/service/s3/mount/sim-s3-mount-directory-events.js +64 -0
- package/dist/service/s3/mount/sim-s3-mount-directory-events.js.map +1 -0
- package/dist/service/s3/mount/sim-s3-mount-watch.d.ts +36 -0
- package/dist/service/s3/mount/sim-s3-mount-watch.d.ts.map +1 -0
- package/dist/service/s3/mount/sim-s3-mount-watch.js +57 -0
- package/dist/service/s3/mount/sim-s3-mount-watch.js.map +1 -0
- package/dist/service/s3/mount/sim-s3-mount-watches.d.ts +42 -0
- package/dist/service/s3/mount/sim-s3-mount-watches.d.ts.map +1 -0
- package/dist/service/s3/mount/sim-s3-mount-watches.js +69 -0
- package/dist/service/s3/mount/sim-s3-mount-watches.js.map +1 -0
- package/dist/service/s3/mount/sim-s3-mount.type.d.ts +31 -0
- package/dist/service/s3/mount/sim-s3-mount.type.d.ts.map +1 -0
- package/dist/service/s3/mount/sim-s3-mount.type.js +2 -0
- package/dist/service/s3/mount/sim-s3-mount.type.js.map +1 -0
- package/dist/service/s3/notification/destination/lambda/sim-s3-notification-function-arn.d.ts +3 -3
- package/dist/service/s3/notification/destination/lambda/sim-s3-notification-function-arn.d.ts.map +1 -1
- package/dist/service/s3/notification/destination/lambda/sim-s3-notification-function-arn.js +8 -14
- package/dist/service/s3/notification/destination/lambda/sim-s3-notification-function-arn.js.map +1 -1
- package/dist/service/s3/sim-s3.d.ts +49 -64
- package/dist/service/s3/sim-s3.d.ts.map +1 -1
- package/dist/service/s3/sim-s3.js +56 -66
- package/dist/service/s3/sim-s3.js.map +1 -1
- package/dist/util/filesystem/path.d.ts +4 -0
- package/dist/util/filesystem/path.d.ts.map +1 -1
- package/dist/util/filesystem/path.js +8 -3
- package/dist/util/filesystem/path.js.map +1 -1
- package/dist/util/memo/memo.d.ts +8 -0
- package/dist/util/memo/memo.d.ts.map +1 -1
- package/dist/util/memo/memo.js +10 -0
- package/dist/util/memo/memo.js.map +1 -1
- package/dist/util/process/close-on-signal.d.ts +16 -0
- package/dist/util/process/close-on-signal.d.ts.map +1 -0
- package/dist/util/process/close-on-signal.js +54 -0
- package/dist/util/process/close-on-signal.js.map +1 -0
- package/dist/watch/index.d.ts +3 -0
- package/dist/watch/index.d.ts.map +1 -0
- package/dist/watch/index.js +2 -0
- package/dist/watch/index.js.map +1 -0
- package/dist/watch/sim-watch-runtime.d.ts +76 -0
- package/dist/watch/sim-watch-runtime.d.ts.map +1 -0
- package/dist/watch/sim-watch-runtime.js +124 -0
- package/dist/watch/sim-watch-runtime.js.map +1 -0
- package/dist/watch/sim-watch-settle.d.ts +45 -0
- package/dist/watch/sim-watch-settle.d.ts.map +1 -0
- package/dist/watch/sim-watch-settle.js +65 -0
- package/dist/watch/sim-watch-settle.js.map +1 -0
- package/dist/watch/sim-watch.config.d.ts +23 -0
- package/dist/watch/sim-watch.config.d.ts.map +1 -0
- package/dist/watch/sim-watch.config.js +59 -0
- package/dist/watch/sim-watch.config.js.map +1 -0
- package/package.json +32 -24
package/README.md
CHANGED
|
@@ -38,6 +38,7 @@ npm i -D @kensio/yulin
|
|
|
38
38
|
## Feature specific docs
|
|
39
39
|
|
|
40
40
|
- [AWS SDK interception](./docs/sdk "Simulated AWS SDK docs")
|
|
41
|
+
- [Serving on localhost](./docs/serve "Serving simulated AWS on localhost docs")
|
|
41
42
|
- [Simulated time](./docs/time "Simulated time docs")
|
|
42
43
|
|
|
43
44
|
## Usage
|
|
@@ -123,6 +124,17 @@ await simAws.account("111111111111").region("eu-west-2").dynamoDb().createTable(
|
|
|
123
124
|
AWS state is simulated internally, so you can test realistic interactions with multiple AWS
|
|
124
125
|
services.
|
|
125
126
|
|
|
127
|
+
An Account ID is a plain string wherever one is accepted. Code that wants to name the type can get a
|
|
128
|
+
`SimAwsAccountId` from `simAwsAccountId(...)`, which refuses anything that is not a 12-digit AWS
|
|
129
|
+
Account ID, or from `makeSimAwsAccountId()` when a test just needs an arbitrary one.
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
import { makeSimAwsAccountId, simAwsAccountId } from "@kensio/yulin";
|
|
133
|
+
|
|
134
|
+
const accountId = simAwsAccountId("111111111111");
|
|
135
|
+
const someOtherAccountId = makeSimAwsAccountId();
|
|
136
|
+
```
|
|
137
|
+
|
|
126
138
|
Each instance of `SimAws` is cheap and encapsulated so you can create them wherever you need them.
|
|
127
139
|
It's fine to create a new instance of `SimAws` in every test case or in shared test setup.
|
|
128
140
|
|
|
@@ -185,6 +197,77 @@ console.log(bucketWebsiteUrl.toString());
|
|
|
185
197
|
const res = await fetch(new URL("/foo/", bucketWebsiteUrl));
|
|
186
198
|
```
|
|
187
199
|
|
|
200
|
+
#### Restarting a served environment
|
|
201
|
+
|
|
202
|
+
A served environment takes an available port by default, so the URL changes every time the process
|
|
203
|
+
starts. Pin a port to keep the URL the same across restarts:
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
const srv = await serveSimAws({ simAws, port: 4599 });
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Closing the server ends the connections it is holding, so the process can exit rather than being
|
|
210
|
+
kept alive by a browser tab. Yulin does not install signal handlers, so call `close()` from your
|
|
211
|
+
own:
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
process.on("SIGTERM", () => {
|
|
215
|
+
srv.close();
|
|
216
|
+
});
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
A restart usually overlaps the process it is replacing. `listen` waits a couple of seconds for a
|
|
220
|
+
pinned port that is still held, then throws `SimAwsLocalPortInUse` naming the port, which means
|
|
221
|
+
something other than the outgoing process owns it.
|
|
222
|
+
|
|
223
|
+
#### Reload the browser on a restart
|
|
224
|
+
|
|
225
|
+
Yulin is the only thing in the response path of a page it serves, so it can tell the browser to
|
|
226
|
+
reload. Turning `liveReload` on puts a small script into the HTML pages served to browsers, and the
|
|
227
|
+
page reloads itself when the process restarts:
|
|
228
|
+
|
|
229
|
+
```typescript
|
|
230
|
+
const srv = await serveSimAws({ simAws, port: 4599, liveReload: true });
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
`srv.reload()` reloads connected browsers for a change that needs no restart. Live reload is off by
|
|
234
|
+
default, since an injected page is not byte for byte what the real service returns.
|
|
235
|
+
|
|
236
|
+
Run the dev script through `yulin watch` and a save is the whole loop, with the process restarted and
|
|
237
|
+
the page refreshed:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
yulin watch -- tsx dev.ts
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
It watches the working directory, plus the paths Yulin is holding that a module graph never mentions:
|
|
244
|
+
a directory mounted into a Bucket, and a synthesized template. See the
|
|
245
|
+
[serving docs](./docs/serve "Serving simulated AWS on localhost docs") for what gets the script, what
|
|
246
|
+
is watched, and what is not.
|
|
247
|
+
|
|
248
|
+
#### Update a stack when its template changes
|
|
249
|
+
|
|
250
|
+
A synthesized template is data rather than code, so a change to one does not need the process
|
|
251
|
+
restarted. Deploy it with `watch` and Yulin applies the file again whenever it changes, updating the
|
|
252
|
+
stack in place:
|
|
253
|
+
|
|
254
|
+
```typescript
|
|
255
|
+
await simAws.cloudFormation().deployTemplateFile({
|
|
256
|
+
templatePath: "cdk.out/SiteStack.template.json",
|
|
257
|
+
watch: {
|
|
258
|
+
onUpdated: () => {
|
|
259
|
+
srv.reload();
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
});
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Resources the change left alone keep what they hold, so simulated S3, DynamoDB and SQS survive a
|
|
266
|
+
`cdk synth`. Under `yulin watch` the template is left to the process watching it rather than being a
|
|
267
|
+
reason to restart. See the
|
|
268
|
+
[CloudFormation docs](./docs/services/cloudformation "Simulated CloudFormation docs") for what an
|
|
269
|
+
update does to each resource.
|
|
270
|
+
|
|
188
271
|
### Control simulated time
|
|
189
272
|
|
|
190
273
|
Each simulated AWS has its own clock, which you can freeze, set, or advance. This lets a test
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thrown for a command the CLI does not have.
|
|
3
|
+
*/
|
|
4
|
+
export declare class SimCliUnknownCommand extends Error {
|
|
5
|
+
readonly name = "SimCliUnknownCommand";
|
|
6
|
+
constructor(command: string);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The `yulin` command line.
|
|
10
|
+
*
|
|
11
|
+
* One command so far. It exists because a local dev loop needs a process
|
|
12
|
+
* outside the one being restarted, which is not something a library can be.
|
|
13
|
+
*/
|
|
14
|
+
export declare class SimCli {
|
|
15
|
+
/**
|
|
16
|
+
* Run the CLI, and report the exit code it should leave behind.
|
|
17
|
+
*/
|
|
18
|
+
run(argv: readonly string[]): Promise<number>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=sim-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cli.d.ts","sourceRoot":"","sources":["../../src/cli/sim-cli.ts"],"names":[],"mappings":"AAYA;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,SAAyB,IAAI,0BAA0B;IAEvD,YAAY,OAAO,EAAE,MAAM,EAE1B;CACF;AAED;;;;;GAKG;AACH,qBAAa,MAAM;IACjB;;OAEG;IACG,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBlD;CACF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { SimWatchCommand } from "./watch/sim-watch-command.js";
|
|
2
|
+
const usage = `Usage: yulin <command>
|
|
3
|
+
|
|
4
|
+
Commands:
|
|
5
|
+
watch [options] -- <command> Run a command, and run it again when project files change
|
|
6
|
+
|
|
7
|
+
Watch options:
|
|
8
|
+
--inspect[=port] Run the command with an inspector, for a debugger to attach to
|
|
9
|
+
--settle=ms How long writes have to stop for before they count as one change
|
|
10
|
+
`;
|
|
11
|
+
/**
|
|
12
|
+
* Thrown for a command the CLI does not have.
|
|
13
|
+
*/
|
|
14
|
+
export class SimCliUnknownCommand extends Error {
|
|
15
|
+
name = "SimCliUnknownCommand";
|
|
16
|
+
constructor(command) {
|
|
17
|
+
super(`Unknown command ${command}.\n\n${usage}`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The `yulin` command line.
|
|
22
|
+
*
|
|
23
|
+
* One command so far. It exists because a local dev loop needs a process
|
|
24
|
+
* outside the one being restarted, which is not something a library can be.
|
|
25
|
+
*/
|
|
26
|
+
export class SimCli {
|
|
27
|
+
/**
|
|
28
|
+
* Run the CLI, and report the exit code it should leave behind.
|
|
29
|
+
*/
|
|
30
|
+
async run(argv) {
|
|
31
|
+
const [command, ...rest] = argv;
|
|
32
|
+
if (command === undefined) {
|
|
33
|
+
process.stdout.write(usage);
|
|
34
|
+
return 1;
|
|
35
|
+
}
|
|
36
|
+
if (["--help", "-h", "help"].includes(command)) {
|
|
37
|
+
process.stdout.write(usage);
|
|
38
|
+
return 0;
|
|
39
|
+
}
|
|
40
|
+
if (command !== "watch") {
|
|
41
|
+
throw new SimCliUnknownCommand(command);
|
|
42
|
+
}
|
|
43
|
+
return await new SimWatchCommand().run(rest);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=sim-cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cli.js","sourceRoot":"","sources":["../../src/cli/sim-cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,KAAK,GAAG;;;;;;;;CAQb,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IACpB,IAAI,GAAG,sBAAsB,CAAC;IAEvD,YAAY,OAAe;QACzB,KAAK,CAAC,mBAAmB,OAAO,QAAQ,KAAK,EAAE,CAAC,CAAC;IACnD,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,OAAO,MAAM;IACjB;;OAEG;IACH,KAAK,CAAC,GAAG,CAAC,IAAuB;QAC/B,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;QAEhC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC5B,OAAO,CAAC,CAAC;QACX,CAAC;QAED,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC5B,OAAO,CAAC,CAAC;QACX,CAAC;QAED,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;YACxB,MAAM,IAAI,oBAAoB,CAAC,OAAO,CAAC,CAAC;QAC1C,CAAC;QAED,OAAO,MAAM,IAAI,eAAe,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thrown when `yulin watch` was not given something to run.
|
|
3
|
+
*/
|
|
4
|
+
export declare class SimWatchUsageError extends Error {
|
|
5
|
+
readonly name = "SimWatchUsageError";
|
|
6
|
+
constructor(message: string);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* What `yulin watch` was asked to do.
|
|
10
|
+
*
|
|
11
|
+
* Everything after `--` is the command, passed through untouched. The CLI does
|
|
12
|
+
* not import the command, look for an exported setup function, or care whether
|
|
13
|
+
* the simulation it builds came from SDK commands, a template, or several
|
|
14
|
+
* `SimAws` instances at once. It runs it and runs it again.
|
|
15
|
+
*/
|
|
16
|
+
export declare class SimWatchArguments {
|
|
17
|
+
readonly command: string;
|
|
18
|
+
readonly commandArguments: readonly string[];
|
|
19
|
+
readonly inspect: string | undefined;
|
|
20
|
+
readonly settleMs: number | undefined;
|
|
21
|
+
private constructor();
|
|
22
|
+
/**
|
|
23
|
+
* Read the arguments given after `yulin watch`.
|
|
24
|
+
*/
|
|
25
|
+
static parse(argv: readonly string[]): SimWatchArguments;
|
|
26
|
+
/**
|
|
27
|
+
* The command as it was written, for reporting.
|
|
28
|
+
*/
|
|
29
|
+
describe(): string;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=sim-watch-arguments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-watch-arguments.d.ts","sourceRoot":"","sources":["../../../src/cli/watch/sim-watch-arguments.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,SAAyB,IAAI,wBAAwB;IAErD,YAAY,OAAO,EAAE,MAAM,EAI1B;CACF;AAED;;;;;;;GAOG;AACH,qBAAa,iBAAiB;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAEtC,OAAO,eASN;IAED;;OAEG;IACH,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,iBAAiB,CAoBvD;IAED;;OAEG;IACH,QAAQ,IAAI,MAAM,CAEjB;CACF"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
const inspectorFlags = new Set([
|
|
2
|
+
"--inspect",
|
|
3
|
+
"--inspect-brk",
|
|
4
|
+
"--inspect-wait",
|
|
5
|
+
]);
|
|
6
|
+
const settleFlag = "--settle";
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when `yulin watch` was not given something to run.
|
|
9
|
+
*/
|
|
10
|
+
export class SimWatchUsageError extends Error {
|
|
11
|
+
name = "SimWatchUsageError";
|
|
12
|
+
constructor(message) {
|
|
13
|
+
super(`${message}\n\nUsage: yulin watch [--inspect[=port]] [--settle=ms] -- <command>`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* What `yulin watch` was asked to do.
|
|
18
|
+
*
|
|
19
|
+
* Everything after `--` is the command, passed through untouched. The CLI does
|
|
20
|
+
* not import the command, look for an exported setup function, or care whether
|
|
21
|
+
* the simulation it builds came from SDK commands, a template, or several
|
|
22
|
+
* `SimAws` instances at once. It runs it and runs it again.
|
|
23
|
+
*/
|
|
24
|
+
export class SimWatchArguments {
|
|
25
|
+
command;
|
|
26
|
+
commandArguments;
|
|
27
|
+
inspect;
|
|
28
|
+
settleMs;
|
|
29
|
+
constructor(command, commandArguments, options) {
|
|
30
|
+
this.command = command;
|
|
31
|
+
this.commandArguments = commandArguments;
|
|
32
|
+
this.inspect = options.inspect;
|
|
33
|
+
this.settleMs = options.settleMs;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Read the arguments given after `yulin watch`.
|
|
37
|
+
*/
|
|
38
|
+
static parse(argv) {
|
|
39
|
+
const separator = argv.indexOf("--");
|
|
40
|
+
if (separator === -1) {
|
|
41
|
+
throw new SimWatchUsageError("No command given. Put the command to run after --, so that its own options are not read as options to watch.");
|
|
42
|
+
}
|
|
43
|
+
const [command, ...rest] = argv.slice(separator + 1);
|
|
44
|
+
if (command === undefined) {
|
|
45
|
+
throw new SimWatchUsageError("No command given after --.");
|
|
46
|
+
}
|
|
47
|
+
return new SimWatchArguments(command, rest, optionsIn(argv.slice(0, separator)));
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The command as it was written, for reporting.
|
|
51
|
+
*/
|
|
52
|
+
describe() {
|
|
53
|
+
return [this.command, ...this.commandArguments].join(" ");
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The options written before the separator, which are the only ones watch reads
|
|
58
|
+
* itself.
|
|
59
|
+
*/
|
|
60
|
+
function optionsIn(given) {
|
|
61
|
+
let inspect;
|
|
62
|
+
let settleMs;
|
|
63
|
+
for (const option of given) {
|
|
64
|
+
const flag = flagOf(option);
|
|
65
|
+
if (inspectorFlags.has(flag)) {
|
|
66
|
+
inspect = option;
|
|
67
|
+
}
|
|
68
|
+
else if (flag === settleFlag) {
|
|
69
|
+
settleMs = settleValue(option);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
throw new SimWatchUsageError(`Unknown option ${option}.`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return { inspect, settleMs };
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* How long a burst of writes has to go quiet, for a project whose build the
|
|
79
|
+
* default window does not suit.
|
|
80
|
+
*/
|
|
81
|
+
function settleValue(option) {
|
|
82
|
+
const [, value] = option.split("=");
|
|
83
|
+
const milliseconds = Number(value);
|
|
84
|
+
if (value === undefined ||
|
|
85
|
+
!Number.isSafeInteger(milliseconds) ||
|
|
86
|
+
milliseconds < 1) {
|
|
87
|
+
throw new SimWatchUsageError(`${settleFlag} takes a number of milliseconds, written as ${settleFlag}=250.`);
|
|
88
|
+
}
|
|
89
|
+
return milliseconds;
|
|
90
|
+
}
|
|
91
|
+
function flagOf(option) {
|
|
92
|
+
const [flag = ""] = option.split("=");
|
|
93
|
+
return flag;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=sim-watch-arguments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-watch-arguments.js","sourceRoot":"","sources":["../../../src/cli/watch/sim-watch-arguments.ts"],"names":[],"mappings":"AAAA,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;IAC7B,WAAW;IACX,eAAe;IACf,gBAAgB;CACjB,CAAC,CAAC;AACH,MAAM,UAAU,GAAG,UAAU,CAAC;AAE9B;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAClB,IAAI,GAAG,oBAAoB,CAAC;IAErD,YAAY,OAAe;QACzB,KAAK,CACH,GAAG,OAAO,sEAAsE,CACjF,CAAC;IACJ,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,OAAO,iBAAiB;IACnB,OAAO,CAAS;IAChB,gBAAgB,CAAoB;IACpC,OAAO,CAAqB;IAC5B,QAAQ,CAAqB;IAEtC,YACE,OAAe,EACf,gBAAmC,EACnC,OAAwB;QAExB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAK,CAAC,IAAuB;QAClC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAErC,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,CAAC;YACrB,MAAM,IAAI,kBAAkB,CAC1B,8GAA8G,CAC/G,CAAC;QACJ,CAAC;QAED,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;QAErD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,MAAM,IAAI,kBAAkB,CAAC,4BAA4B,CAAC,CAAC;QAC7D,CAAC;QAED,OAAO,IAAI,iBAAiB,CAC1B,OAAO,EACP,IAAI,EACJ,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CACpC,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5D,CAAC;CACF;AAOD;;;GAGG;AACH,SAAS,SAAS,CAAC,KAAwB;IACzC,IAAI,OAA2B,CAAC;IAChC,IAAI,QAA4B,CAAC;IAEjC,KAAK,MAAM,MAAM,IAAI,KAAK,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAE5B,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7B,OAAO,GAAG,MAAM,CAAC;QACnB,CAAC;aAAM,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;YAC/B,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,kBAAkB,CAAC,kBAAkB,MAAM,GAAG,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC/B,CAAC;AAED;;;GAGG;AACH,SAAS,WAAW,CAAC,MAAc;IACjC,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpC,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAEnC,IACE,KAAK,KAAK,SAAS;QACnB,CAAC,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC;QACnC,YAAY,GAAG,CAAC,EAChB,CAAC;QACD,MAAM,IAAI,kBAAkB,CAC1B,GAAG,UAAU,+CAA+C,UAAU,OAAO,CAC9E,CAAC;IACJ,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,MAAM,CAAC,MAAc;IAC5B,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEtC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
interface SimWatchChildEnvironmentProperties {
|
|
2
|
+
readonly cwd: string;
|
|
3
|
+
readonly inspect?: string | undefined;
|
|
4
|
+
readonly environment?: NodeJS.ProcessEnv;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The environment a supervised process runs in.
|
|
8
|
+
*
|
|
9
|
+
* Three things are added to the environment the supervisor was given. The
|
|
10
|
+
* project's own `node_modules/.bin` goes on `PATH`, so `yulin watch -- tsx
|
|
11
|
+
* dev.ts` works from a plain shell as well as from a package script. A marker
|
|
12
|
+
* says a supervisor is listening, which is what makes the runtime in the child
|
|
13
|
+
* report paths at all. An inspector flag goes through `NODE_OPTIONS` rather
|
|
14
|
+
* than on the command line, because the command being run is often not `node`
|
|
15
|
+
* itself.
|
|
16
|
+
*/
|
|
17
|
+
export declare class SimWatchChildEnvironment {
|
|
18
|
+
private readonly cwd;
|
|
19
|
+
private readonly inspect;
|
|
20
|
+
private readonly environment;
|
|
21
|
+
constructor(properties: SimWatchChildEnvironmentProperties);
|
|
22
|
+
/**
|
|
23
|
+
* Build the environment for one run of the supervised command.
|
|
24
|
+
*/
|
|
25
|
+
build(): NodeJS.ProcessEnv;
|
|
26
|
+
private pathWithLocalBin;
|
|
27
|
+
private nodeOptionsWithInspector;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=sim-watch-child-environment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-watch-child-environment.d.ts","sourceRoot":"","sources":["../../../src/cli/watch/sim-watch-child-environment.ts"],"names":[],"mappings":"AAKA,UAAU,kCAAkC;IAC1C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CAC1C;AAED;;;;;;;;;;GAUG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAoB;IAEhD,YAAY,UAAU,EAAE,kCAAkC,EAKzD;IAED;;OAEG;IACH,KAAK,IAAI,MAAM,CAAC,UAAU,CAUzB;IAED,OAAO,CAAC,gBAAgB;IAWxB,OAAO,CAAC,wBAAwB;CAKjC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { simWatchConfig } from "../../watch/sim-watch.config.js";
|
|
3
|
+
const nodeOptionsName = "NODE_OPTIONS";
|
|
4
|
+
/**
|
|
5
|
+
* The environment a supervised process runs in.
|
|
6
|
+
*
|
|
7
|
+
* Three things are added to the environment the supervisor was given. The
|
|
8
|
+
* project's own `node_modules/.bin` goes on `PATH`, so `yulin watch -- tsx
|
|
9
|
+
* dev.ts` works from a plain shell as well as from a package script. A marker
|
|
10
|
+
* says a supervisor is listening, which is what makes the runtime in the child
|
|
11
|
+
* report paths at all. An inspector flag goes through `NODE_OPTIONS` rather
|
|
12
|
+
* than on the command line, because the command being run is often not `node`
|
|
13
|
+
* itself.
|
|
14
|
+
*/
|
|
15
|
+
export class SimWatchChildEnvironment {
|
|
16
|
+
cwd;
|
|
17
|
+
inspect;
|
|
18
|
+
environment;
|
|
19
|
+
constructor(properties) {
|
|
20
|
+
const { cwd, inspect, environment = process.env } = properties;
|
|
21
|
+
this.cwd = cwd;
|
|
22
|
+
this.inspect = inspect;
|
|
23
|
+
this.environment = environment;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Build the environment for one run of the supervised command.
|
|
27
|
+
*/
|
|
28
|
+
build() {
|
|
29
|
+
return {
|
|
30
|
+
...this.environment,
|
|
31
|
+
PATH: this.pathWithLocalBin(),
|
|
32
|
+
[simWatchConfig.environmentVariableName]: simWatchConfig.environmentVariableValue,
|
|
33
|
+
...(this.inspect !== undefined && {
|
|
34
|
+
[nodeOptionsName]: this.nodeOptionsWithInspector(this.inspect),
|
|
35
|
+
}),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
pathWithLocalBin() {
|
|
39
|
+
const localBin = path.join(this.cwd, "node_modules", ".bin");
|
|
40
|
+
const existing = this.environment["PATH"] ?? "";
|
|
41
|
+
if (existing.split(path.delimiter).includes(localBin)) {
|
|
42
|
+
return existing;
|
|
43
|
+
}
|
|
44
|
+
return `${localBin}${path.delimiter}${existing}`;
|
|
45
|
+
}
|
|
46
|
+
nodeOptionsWithInspector(inspect) {
|
|
47
|
+
const existing = this.environment["NODE_OPTIONS"] ?? "";
|
|
48
|
+
return `${existing} ${inspect}`.trim();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=sim-watch-child-environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-watch-child-environment.js","sourceRoot":"","sources":["../../../src/cli/watch/sim-watch-child-environment.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,MAAM,eAAe,GAAG,cAAc,CAAC;AAQvC;;;;;;;;;;GAUG;AACH,MAAM,OAAO,wBAAwB;IAClB,GAAG,CAAS;IACZ,OAAO,CAAqB;IAC5B,WAAW,CAAoB;IAEhD,YAAY,UAA8C;QACxD,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC;QAC/D,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO;YACL,GAAG,IAAI,CAAC,WAAW;YACnB,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE;YAC7B,CAAC,cAAc,CAAC,uBAAuB,CAAC,EACtC,cAAc,CAAC,wBAAwB;YACzC,GAAG,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI;gBAChC,CAAC,eAAe,CAAC,EAAE,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC;aAC/D,CAAC;SACH,CAAC;IACJ,CAAC;IAEO,gBAAgB;QACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;QAC7D,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAEhD,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;YACtD,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAC,SAAS,GAAG,QAAQ,EAAE,CAAC;IACnD,CAAC;IAEO,wBAAwB,CAAC,OAAe;QAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;QAExD,OAAO,GAAG,QAAQ,IAAI,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;IACzC,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ChildProcess } from "node:child_process";
|
|
2
|
+
/**
|
|
3
|
+
* Whether an IPC message is one of the kind named.
|
|
4
|
+
*/
|
|
5
|
+
export declare function isWatchMessage(message: unknown, type: string): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Whether an IPC message names a path to watch.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isWatchPathMessage(message: unknown, type: string): message is {
|
|
10
|
+
readonly path: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Wait for a process to send a message of one kind, and give up after a while.
|
|
14
|
+
*
|
|
15
|
+
* A process not running Yulin's runtime never answers, so this is a short wait
|
|
16
|
+
* rather than a requirement.
|
|
17
|
+
*/
|
|
18
|
+
export declare function waitWatchMessage(childProcess: ChildProcess, type: string, withinMs: number): Promise<void>;
|
|
19
|
+
//# sourceMappingURL=sim-watch-child-message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-watch-child-message.d.ts","sourceRoot":"","sources":["../../../src/cli/watch/sim-watch-child-message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAOtE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,GACX,OAAO,IAAI;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAQtC;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAkBf"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether an IPC message is one of the kind named.
|
|
3
|
+
*/
|
|
4
|
+
export function isWatchMessage(message, type) {
|
|
5
|
+
return (typeof message === "object" &&
|
|
6
|
+
message !== null &&
|
|
7
|
+
"type" in message &&
|
|
8
|
+
message.type === type);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Whether an IPC message names a path to watch.
|
|
12
|
+
*/
|
|
13
|
+
export function isWatchPathMessage(message, type) {
|
|
14
|
+
return (isWatchMessage(message, type) &&
|
|
15
|
+
typeof message === "object" &&
|
|
16
|
+
message !== null &&
|
|
17
|
+
"path" in message &&
|
|
18
|
+
typeof message.path === "string");
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Wait for a process to send a message of one kind, and give up after a while.
|
|
22
|
+
*
|
|
23
|
+
* A process not running Yulin's runtime never answers, so this is a short wait
|
|
24
|
+
* rather than a requirement.
|
|
25
|
+
*/
|
|
26
|
+
export async function waitWatchMessage(childProcess, type, withinMs) {
|
|
27
|
+
await new Promise((resolve) => {
|
|
28
|
+
const done = () => {
|
|
29
|
+
clearTimeout(timer);
|
|
30
|
+
childProcess.off("message", onMessage);
|
|
31
|
+
resolve();
|
|
32
|
+
};
|
|
33
|
+
const onMessage = (message) => {
|
|
34
|
+
if (isWatchMessage(message, type)) {
|
|
35
|
+
done();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const timer = setTimeout(done, withinMs);
|
|
39
|
+
childProcess.on("message", onMessage);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=sim-watch-child-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-watch-child-message.js","sourceRoot":"","sources":["../../../src/cli/watch/sim-watch-child-message.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,OAAgB,EAAE,IAAY;IAC3D,OAAO,CACL,OAAO,OAAO,KAAK,QAAQ;QAC3B,OAAO,KAAK,IAAI;QAChB,MAAM,IAAI,OAAO;QACjB,OAAO,CAAC,IAAI,KAAK,IAAI,CACtB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAgB,EAChB,IAAY;IAEZ,OAAO,CACL,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC;QAC7B,OAAO,OAAO,KAAK,QAAQ;QAC3B,OAAO,KAAK,IAAI;QAChB,MAAM,IAAI,OAAO;QACjB,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,CACjC,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,YAA0B,EAC1B,IAAY,EACZ,QAAgB;IAEhB,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QAClC,MAAM,IAAI,GAAG,GAAS,EAAE;YACtB,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,YAAY,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YACvC,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;QAEF,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAQ,EAAE;YAC3C,IAAI,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC;gBAClC,IAAI,EAAE,CAAC;YACT,CAAC;QACH,CAAC,CAAC;QAEF,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAEzC,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ChildProcess } from "node:child_process";
|
|
2
|
+
interface SimWatchChildProcessProperties {
|
|
3
|
+
readonly command: string;
|
|
4
|
+
readonly args: readonly string[];
|
|
5
|
+
readonly cwd: string;
|
|
6
|
+
readonly env: NodeJS.ProcessEnv;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A spawned command, and the two moments in its life a supervisor waits on.
|
|
10
|
+
*
|
|
11
|
+
* Standard input, output and error are the supervisor's own, so the process
|
|
12
|
+
* being watched prints where it would have printed if it had been started by
|
|
13
|
+
* hand. The fourth channel is what the runtime inside it reports paths over.
|
|
14
|
+
*/
|
|
15
|
+
export declare class SimWatchChildProcess {
|
|
16
|
+
readonly process: ChildProcess;
|
|
17
|
+
readonly spawned: Promise<void>;
|
|
18
|
+
readonly finished: Promise<void>;
|
|
19
|
+
constructor(properties: SimWatchChildProcessProperties);
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=sim-watch-child-process.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-watch-child-process.d.ts","sourceRoot":"","sources":["../../../src/cli/watch/sim-watch-child-process.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAS,MAAM,oBAAoB,CAAC;AAE9D,UAAU,8BAA8B;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;CACjC;AAED;;;;;;GAMG;AACH,qBAAa,oBAAoB;IAC/B,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjC,YAAY,UAAU,EAAE,8BAA8B,EAqBrD;CACF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
/**
|
|
3
|
+
* A spawned command, and the two moments in its life a supervisor waits on.
|
|
4
|
+
*
|
|
5
|
+
* Standard input, output and error are the supervisor's own, so the process
|
|
6
|
+
* being watched prints where it would have printed if it had been started by
|
|
7
|
+
* hand. The fourth channel is what the runtime inside it reports paths over.
|
|
8
|
+
*/
|
|
9
|
+
export class SimWatchChildProcess {
|
|
10
|
+
process;
|
|
11
|
+
spawned;
|
|
12
|
+
finished;
|
|
13
|
+
constructor(properties) {
|
|
14
|
+
const { command, args, cwd, env } = properties;
|
|
15
|
+
this.process = spawn(command, [...args], {
|
|
16
|
+
cwd,
|
|
17
|
+
env,
|
|
18
|
+
stdio: ["inherit", "inherit", "inherit", "ipc"],
|
|
19
|
+
});
|
|
20
|
+
this.spawned = new Promise((resolve, reject) => {
|
|
21
|
+
this.process.once("spawn", resolve);
|
|
22
|
+
this.process.once("error", (error) => {
|
|
23
|
+
reject(new Error(`Could not run ${command}: ${error.message}`));
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
this.finished = new Promise((resolve) => {
|
|
27
|
+
this.process.once("exit", () => {
|
|
28
|
+
resolve();
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=sim-watch-child-process.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-watch-child-process.js","sourceRoot":"","sources":["../../../src/cli/watch/sim-watch-child-process.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAS9D;;;;;;GAMG;AACH,MAAM,OAAO,oBAAoB;IACtB,OAAO,CAAe;IACtB,OAAO,CAAgB;IACvB,QAAQ,CAAgB;IAEjC,YAAY,UAA0C;QACpD,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,UAAU,CAAC;QAE/C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE;YACvC,GAAG;YACH,GAAG;YACH,KAAK,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC;SAChD,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACpC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAY,EAAE,EAAE;gBAC1C,MAAM,CAAC,IAAI,KAAK,CAAC,iBAAiB,OAAO,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YAClE,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YAC5C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;gBAC7B,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ChildProcess } from "node:child_process";
|
|
2
|
+
interface SimWatchChildShutdownProperties {
|
|
3
|
+
readonly process: ChildProcess;
|
|
4
|
+
readonly finished: Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Takes a supervised process down, in the order that lets it say goodbye.
|
|
8
|
+
*
|
|
9
|
+
* A process running Yulin's runtime is warned first, so a served page hears
|
|
10
|
+
* that a reload is coming rather than only seeing its connection go, and is
|
|
11
|
+
* killed as soon as it says it has passed that on. One that does not answer,
|
|
12
|
+
* because it is serving nothing or is not a Yulin process at all, is killed
|
|
13
|
+
* when the short wait runs out. Either way it is killed, and killed harder if
|
|
14
|
+
* it will not go, because the port has to be free for the process replacing it.
|
|
15
|
+
*/
|
|
16
|
+
export declare class SimWatchChildShutdown {
|
|
17
|
+
private readonly process;
|
|
18
|
+
private readonly finished;
|
|
19
|
+
constructor(properties: SimWatchChildShutdownProperties);
|
|
20
|
+
/**
|
|
21
|
+
* Stop the process, and wait until it has gone.
|
|
22
|
+
*/
|
|
23
|
+
stop(): Promise<void>;
|
|
24
|
+
private warn;
|
|
25
|
+
private gone;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=sim-watch-child-shutdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-watch-child-shutdown.d.ts","sourceRoot":"","sources":["../../../src/cli/watch/sim-watch-child-shutdown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAOvD,UAAU,+BAA+B;IACvC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC;AAED;;;;;;;;;GASG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IACvC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgB;IAEzC,YAAY,UAAU,EAAE,+BAA+B,EAItD;IAED;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAI1B;YAEa,IAAI;YA0BJ,IAAI;CAWnB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { simWatchConfig, simWatchMessages, } from "../../watch/sim-watch.config.js";
|
|
2
|
+
import { waitWatchMessage } from "./sim-watch-child-message.js";
|
|
3
|
+
/**
|
|
4
|
+
* Takes a supervised process down, in the order that lets it say goodbye.
|
|
5
|
+
*
|
|
6
|
+
* A process running Yulin's runtime is warned first, so a served page hears
|
|
7
|
+
* that a reload is coming rather than only seeing its connection go, and is
|
|
8
|
+
* killed as soon as it says it has passed that on. One that does not answer,
|
|
9
|
+
* because it is serving nothing or is not a Yulin process at all, is killed
|
|
10
|
+
* when the short wait runs out. Either way it is killed, and killed harder if
|
|
11
|
+
* it will not go, because the port has to be free for the process replacing it.
|
|
12
|
+
*/
|
|
13
|
+
export class SimWatchChildShutdown {
|
|
14
|
+
process;
|
|
15
|
+
finished;
|
|
16
|
+
constructor(properties) {
|
|
17
|
+
const { process: childProcess, finished } = properties;
|
|
18
|
+
this.process = childProcess;
|
|
19
|
+
this.finished = finished;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Stop the process, and wait until it has gone.
|
|
23
|
+
*/
|
|
24
|
+
async stop() {
|
|
25
|
+
await this.warn();
|
|
26
|
+
this.process.kill("SIGTERM");
|
|
27
|
+
await this.gone();
|
|
28
|
+
}
|
|
29
|
+
async warn() {
|
|
30
|
+
if (!this.process.connected) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const acknowledged = Promise.race([
|
|
34
|
+
this.finished,
|
|
35
|
+
waitWatchMessage(this.process, simWatchMessages.stopped, simWatchConfig.stoppingMs),
|
|
36
|
+
]);
|
|
37
|
+
// The channel can close between being asked whether it is open and being
|
|
38
|
+
// written to, because the process is free to exit in between. The callback
|
|
39
|
+
// is where that failure goes; without one it reaches the process as an
|
|
40
|
+
// error event, and a warning that could not be delivered is not a reason to
|
|
41
|
+
// stop taking the process down.
|
|
42
|
+
this.process.send({ type: simWatchMessages.stopping }, () => {
|
|
43
|
+
// Nothing to do about a process that has already gone.
|
|
44
|
+
});
|
|
45
|
+
await acknowledged;
|
|
46
|
+
}
|
|
47
|
+
async gone() {
|
|
48
|
+
const timer = setTimeout(() => {
|
|
49
|
+
this.process.kill("SIGKILL");
|
|
50
|
+
}, simWatchConfig.exitMs);
|
|
51
|
+
try {
|
|
52
|
+
await this.finished;
|
|
53
|
+
}
|
|
54
|
+
finally {
|
|
55
|
+
clearTimeout(timer);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=sim-watch-child-shutdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-watch-child-shutdown.js","sourceRoot":"","sources":["../../../src/cli/watch/sim-watch-child-shutdown.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,gBAAgB,GACjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAOhE;;;;;;;;;GASG;AACH,MAAM,OAAO,qBAAqB;IACf,OAAO,CAAe;IACtB,QAAQ,CAAgB;IAEzC,YAAY,UAA2C;QACrD,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC;QACvD,IAAI,CAAC,OAAO,GAAG,YAAY,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAI;QACR,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7B,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;IAEO,KAAK,CAAC,IAAI;QAChB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;YAC5B,OAAO;QACT,CAAC;QAED,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;YAChC,IAAI,CAAC,QAAQ;YACb,gBAAgB,CACd,IAAI,CAAC,OAAO,EACZ,gBAAgB,CAAC,OAAO,EACxB,cAAc,CAAC,UAAU,CAC1B;SACF,CAAC,CAAC;QAEH,yEAAyE;QACzE,2EAA2E;QAC3E,uEAAuE;QACvE,4EAA4E;QAC5E,gCAAgC;QAChC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,QAAQ,EAAE,EAAE,GAAG,EAAE;YAC1D,uDAAuD;QACzD,CAAC,CAAC,CAAC;QAEH,MAAM,YAAY,CAAC;IACrB,CAAC;IAEO,KAAK,CAAC,IAAI;QAChB,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC/B,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;QAE1B,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,QAAQ,CAAC;QACtB,CAAC;gBAAS,CAAC;YACT,YAAY,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;CACF"}
|