@warlock.js/core 4.8.1 → 4.9.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/CHANGELOG.md +25 -0
- package/esm/application/app.d.mts +1 -1
- package/esm/application/app.d.mts.map +1 -1
- package/esm/application/app.mjs +1 -1
- package/esm/application/app.mjs.map +1 -1
- package/esm/application/application-config-types.d.mts +1 -1
- package/esm/application/application-config-types.d.mts.map +1 -1
- package/esm/application/application.d.mts +1 -1
- package/esm/application/application.d.mts.map +1 -1
- package/esm/application/application.mjs +1 -1
- package/esm/application/application.mjs.map +1 -1
- package/esm/benchmark/benchmark-snapshots.d.mts +1 -1
- package/esm/benchmark/benchmark-snapshots.d.mts.map +1 -1
- package/esm/benchmark/benchmark-snapshots.mjs +1 -1
- package/esm/benchmark/benchmark-snapshots.mjs.map +1 -1
- package/esm/benchmark/benchmark.d.mts +1 -1
- package/esm/benchmark/benchmark.d.mts.map +1 -1
- package/esm/benchmark/benchmark.mjs +1 -1
- package/esm/benchmark/benchmark.mjs.map +1 -1
- package/esm/benchmark/channels/console.channel.d.mts +1 -1
- package/esm/benchmark/channels/console.channel.d.mts.map +1 -1
- package/esm/benchmark/channels/console.channel.mjs +1 -1
- package/esm/benchmark/channels/console.channel.mjs.map +1 -1
- package/esm/benchmark/channels/noop.channel.d.mts +1 -1
- package/esm/benchmark/channels/noop.channel.d.mts.map +1 -1
- package/esm/benchmark/channels/noop.channel.mjs +1 -1
- package/esm/benchmark/channels/noop.channel.mjs.map +1 -1
- package/esm/benchmark/profiler.d.mts +1 -1
- package/esm/benchmark/profiler.d.mts.map +1 -1
- package/esm/benchmark/profiler.mjs +1 -1
- package/esm/benchmark/profiler.mjs.map +1 -1
- package/esm/benchmark/types.d.mts +1 -1
- package/esm/benchmark/types.d.mts.map +1 -1
- package/esm/bootstrap/setup.d.mts +1 -1
- package/esm/bootstrap/setup.d.mts.map +1 -1
- package/esm/bootstrap/setup.mjs +1 -1
- package/esm/bootstrap/setup.mjs.map +1 -1
- package/esm/bootstrap.d.mts +1 -1
- package/esm/bootstrap.d.mts.map +1 -1
- package/esm/bootstrap.mjs +1 -1
- package/esm/bootstrap.mjs.map +1 -1
- package/esm/cache/database-cache-driver.d.mts +1 -1
- package/esm/cache/database-cache-driver.d.mts.map +1 -1
- package/esm/cache/database-cache-driver.mjs +1 -1
- package/esm/cache/database-cache-driver.mjs.map +1 -1
- package/esm/cache/index.mjs +1 -1
- package/esm/cache/index.mjs.map +1 -1
- package/esm/cli/cli-command.d.mts +1 -1
- package/esm/cli/cli-command.d.mts.map +1 -1
- package/esm/cli/cli-command.mjs +1 -1
- package/esm/cli/cli-command.mjs.map +1 -1
- package/esm/cli/cli-commands.manager.mjs +1 -1
- package/esm/cli/cli-commands.manager.mjs.map +1 -1
- package/esm/cli/cli-commands.utils.mjs +1 -1
- package/esm/cli/cli-commands.utils.mjs.map +1 -1
- package/esm/cli/commands/add.command.mjs +1 -1
- package/esm/cli/commands/add.command.mjs.map +1 -1
- package/esm/cli/commands/build.command.mjs +1 -1
- package/esm/cli/commands/build.command.mjs.map +1 -1
- package/esm/cli/commands/create-database.command.mjs +1 -1
- package/esm/cli/commands/create-database.command.mjs.map +1 -1
- package/esm/cli/commands/dev-server.command.mjs +5 -4
- package/esm/cli/commands/dev-server.command.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/config.check.mjs +1 -1
- package/esm/cli/commands/doctor/checks/config.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/connectors.check.mjs +1 -1
- package/esm/cli/commands/doctor/checks/connectors.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/health.check.mjs +1 -1
- package/esm/cli/commands/doctor/checks/health.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/index.mjs +1 -1
- package/esm/cli/commands/doctor/checks/index.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/optional-peers.check.mjs +1 -1
- package/esm/cli/commands/doctor/checks/optional-peers.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/release-hygiene.check.mjs +1 -1
- package/esm/cli/commands/doctor/checks/release-hygiene.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/routes.check.mjs +1 -1
- package/esm/cli/commands/doctor/checks/routes.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/doctor-command.action.mjs +1 -1
- package/esm/cli/commands/doctor/doctor-command.action.mjs.map +1 -1
- package/esm/cli/commands/doctor/format-report.mjs +1 -1
- package/esm/cli/commands/doctor/format-report.mjs.map +1 -1
- package/esm/cli/commands/doctor/run-checks.mjs +1 -1
- package/esm/cli/commands/doctor/run-checks.mjs.map +1 -1
- package/esm/cli/commands/doctor.command.mjs +1 -1
- package/esm/cli/commands/doctor.command.mjs.map +1 -1
- package/esm/cli/commands/drop-tables.command.mjs +1 -1
- package/esm/cli/commands/drop-tables.command.mjs.map +1 -1
- package/esm/cli/commands/generate/generate.command.mjs +1 -1
- package/esm/cli/commands/generate/generate.command.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/column-dsl-parser.mjs +1 -1
- package/esm/cli/commands/generate/generators/column-dsl-parser.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/controller.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/controller.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/migration.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/migration.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/model.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/model.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/module.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/module.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/repository.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/repository.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/resource.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/resource.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/service.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/service.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/templates/stubs.mjs +1 -1
- package/esm/cli/commands/generate/templates/stubs.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/name-parser.mjs +1 -1
- package/esm/cli/commands/generate/utils/name-parser.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/path-resolver.mjs +1 -1
- package/esm/cli/commands/generate/utils/path-resolver.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/prompt.mjs +1 -1
- package/esm/cli/commands/generate/utils/prompt.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/writer.mjs +1 -1
- package/esm/cli/commands/generate/utils/writer.mjs.map +1 -1
- package/esm/cli/commands/migrate.command.mjs +1 -1
- package/esm/cli/commands/migrate.command.mjs.map +1 -1
- package/esm/cli/commands/routes/format-routes-table.mjs +1 -1
- package/esm/cli/commands/routes/format-routes-table.mjs.map +1 -1
- package/esm/cli/commands/routes/route-row.mjs +1 -1
- package/esm/cli/commands/routes/route-row.mjs.map +1 -1
- package/esm/cli/commands/routes/routes-command.action.mjs +1 -1
- package/esm/cli/commands/routes/routes-command.action.mjs.map +1 -1
- package/esm/cli/commands/routes.command.mjs +1 -1
- package/esm/cli/commands/routes.command.mjs.map +1 -1
- package/esm/cli/commands/seed.command.mjs +1 -1
- package/esm/cli/commands/seed.command.mjs.map +1 -1
- package/esm/cli/commands/start-production.command.mjs +2 -2
- package/esm/cli/commands/start-production.command.mjs.map +1 -1
- package/esm/cli/commands/storage-put.action.mjs +1 -1
- package/esm/cli/commands/storage-put.action.mjs.map +1 -1
- package/esm/cli/commands/storage-put.command.mjs +1 -1
- package/esm/cli/commands/storage-put.command.mjs.map +1 -1
- package/esm/cli/commands/typings-generator.command.mjs +1 -1
- package/esm/cli/commands/typings-generator.command.mjs.map +1 -1
- package/esm/cli/commands/update.command.mjs +30 -7
- package/esm/cli/commands/update.command.mjs.map +1 -1
- package/esm/cli/commands-loader.mjs +1 -1
- package/esm/cli/commands-loader.mjs.map +1 -1
- package/esm/cli/framework-cli-commands.mjs +1 -1
- package/esm/cli/framework-cli-commands.mjs.map +1 -1
- package/esm/cli/parse-cli-args.mjs +1 -1
- package/esm/cli/parse-cli-args.mjs.map +1 -1
- package/esm/cli/start.mjs +1 -1
- package/esm/cli/start.mjs.map +1 -1
- package/esm/cli/string-similarity.mjs +1 -1
- package/esm/cli/string-similarity.mjs.map +1 -1
- package/esm/cli/types.d.mts +1 -1
- package/esm/cli/types.d.mts.map +1 -1
- package/esm/config/config-getter.d.mts +1 -1
- package/esm/config/config-getter.d.mts.map +1 -1
- package/esm/config/config-getter.mjs +1 -1
- package/esm/config/config-getter.mjs.map +1 -1
- package/esm/config/config-handlers.d.mts +1 -1
- package/esm/config/config-handlers.d.mts.map +1 -1
- package/esm/config/config-handlers.mjs +1 -1
- package/esm/config/config-handlers.mjs.map +1 -1
- package/esm/config/config-loader.d.mts +1 -1
- package/esm/config/config-loader.d.mts.map +1 -1
- package/esm/config/config-loader.mjs +1 -1
- package/esm/config/config-loader.mjs.map +1 -1
- package/esm/config/config-manager.mjs +1 -1
- package/esm/config/config-manager.mjs.map +1 -1
- package/esm/config/config-special-handlers.d.mts +1 -1
- package/esm/config/config-special-handlers.d.mts.map +1 -1
- package/esm/config/config-special-handlers.mjs +1 -1
- package/esm/config/config-special-handlers.mjs.map +1 -1
- package/esm/config/load-config-files.mjs +1 -1
- package/esm/config/load-config-files.mjs.map +1 -1
- package/esm/config/types.d.mts +1 -1
- package/esm/config/types.d.mts.map +1 -1
- package/esm/connectors/access-connector.d.mts +1 -1
- package/esm/connectors/access-connector.d.mts.map +1 -1
- package/esm/connectors/access-connector.mjs +1 -1
- package/esm/connectors/access-connector.mjs.map +1 -1
- package/esm/connectors/ai-connector.d.mts +1 -1
- package/esm/connectors/ai-connector.d.mts.map +1 -1
- package/esm/connectors/ai-connector.mjs +1 -1
- package/esm/connectors/ai-connector.mjs.map +1 -1
- package/esm/connectors/base-connector.d.mts +1 -1
- package/esm/connectors/base-connector.d.mts.map +1 -1
- package/esm/connectors/base-connector.mjs +1 -1
- package/esm/connectors/base-connector.mjs.map +1 -1
- package/esm/connectors/cache-connector.d.mts +1 -1
- package/esm/connectors/cache-connector.d.mts.map +1 -1
- package/esm/connectors/cache-connector.mjs +1 -1
- package/esm/connectors/cache-connector.mjs.map +1 -1
- package/esm/connectors/connectors-manager.d.mts +1 -1
- package/esm/connectors/connectors-manager.d.mts.map +1 -1
- package/esm/connectors/connectors-manager.mjs +1 -1
- package/esm/connectors/connectors-manager.mjs.map +1 -1
- package/esm/connectors/database-connector.d.mts +1 -1
- package/esm/connectors/database-connector.d.mts.map +1 -1
- package/esm/connectors/database-connector.mjs +1 -1
- package/esm/connectors/database-connector.mjs.map +1 -1
- package/esm/connectors/herald-connector.d.mts +1 -1
- package/esm/connectors/herald-connector.d.mts.map +1 -1
- package/esm/connectors/herald-connector.mjs +1 -1
- package/esm/connectors/herald-connector.mjs.map +1 -1
- package/esm/connectors/http-connector.d.mts +1 -1
- package/esm/connectors/http-connector.d.mts.map +1 -1
- package/esm/connectors/http-connector.mjs +1 -1
- package/esm/connectors/http-connector.mjs.map +1 -1
- package/esm/connectors/logger-connector.d.mts +1 -1
- package/esm/connectors/logger-connector.d.mts.map +1 -1
- package/esm/connectors/logger-connector.mjs +1 -1
- package/esm/connectors/logger-connector.mjs.map +1 -1
- package/esm/connectors/mail-connector.d.mts +1 -1
- package/esm/connectors/mail-connector.d.mts.map +1 -1
- package/esm/connectors/mail-connector.mjs +1 -1
- package/esm/connectors/mail-connector.mjs.map +1 -1
- package/esm/connectors/notifications-connector.d.mts +1 -1
- package/esm/connectors/notifications-connector.d.mts.map +1 -1
- package/esm/connectors/notifications-connector.mjs +1 -1
- package/esm/connectors/notifications-connector.mjs.map +1 -1
- package/esm/connectors/socket-connector.d.mts +1 -1
- package/esm/connectors/socket-connector.d.mts.map +1 -1
- package/esm/connectors/socket-connector.mjs +1 -1
- package/esm/connectors/socket-connector.mjs.map +1 -1
- package/esm/connectors/storage.connector.d.mts +1 -1
- package/esm/connectors/storage.connector.d.mts.map +1 -1
- package/esm/connectors/storage.connector.mjs +1 -1
- package/esm/connectors/storage.connector.mjs.map +1 -1
- package/esm/connectors/types.d.mts +1 -1
- package/esm/connectors/types.d.mts.map +1 -1
- package/esm/connectors/types.mjs +1 -1
- package/esm/connectors/types.mjs.map +1 -1
- package/esm/container/index.d.mts +1 -1
- package/esm/container/index.d.mts.map +1 -1
- package/esm/container/index.mjs +1 -1
- package/esm/container/index.mjs.map +1 -1
- package/esm/database/create-database-action.mjs +1 -1
- package/esm/database/create-database-action.mjs.map +1 -1
- package/esm/database/drop-tables-action.mjs +1 -1
- package/esm/database/drop-tables-action.mjs.map +1 -1
- package/esm/database/migrate-action.mjs +1 -1
- package/esm/database/migrate-action.mjs.map +1 -1
- package/esm/database/models/database-log/database-log.d.mts +1 -1
- package/esm/database/models/database-log/database-log.d.mts.map +1 -1
- package/esm/database/models/database-log/database-log.mjs +1 -1
- package/esm/database/models/database-log/database-log.mjs.map +1 -1
- package/esm/database/seed-command-action.mjs +1 -1
- package/esm/database/seed-command-action.mjs.map +1 -1
- package/esm/database/seeds/seed-records-table-migration.mjs +1 -1
- package/esm/database/seeds/seed-records-table-migration.mjs.map +1 -1
- package/esm/database/seeds/seeder.d.mts +1 -1
- package/esm/database/seeds/seeder.d.mts.map +1 -1
- package/esm/database/seeds/seeder.errors.d.mts +1 -1
- package/esm/database/seeds/seeder.errors.d.mts.map +1 -1
- package/esm/database/seeds/seeder.errors.mjs +1 -1
- package/esm/database/seeds/seeder.errors.mjs.map +1 -1
- package/esm/database/seeds/seeder.mjs +1 -1
- package/esm/database/seeds/seeder.mjs.map +1 -1
- package/esm/database/seeds/seeders.manager.mjs +1 -1
- package/esm/database/seeds/seeders.manager.mjs.map +1 -1
- package/esm/database/seeds/seeds-table-migration.mjs +1 -1
- package/esm/database/seeds/seeds-table-migration.mjs.map +1 -1
- package/esm/database/seeds/types.d.mts +1 -1
- package/esm/database/seeds/types.d.mts.map +1 -1
- package/esm/database/seeds/utils.mjs +1 -1
- package/esm/database/seeds/utils.mjs.map +1 -1
- package/esm/database/utils.d.mts +1 -1
- package/esm/database/utils.d.mts.map +1 -1
- package/esm/database/utils.mjs +1 -1
- package/esm/database/utils.mjs.map +1 -1
- package/esm/dev-server/check-for-updates.mjs +91 -8
- package/esm/dev-server/check-for-updates.mjs.map +1 -1
- package/esm/dev-server/create-worker.mjs +1 -1
- package/esm/dev-server/create-worker.mjs.map +1 -1
- package/esm/dev-server/dependency-graph.d.mts +1 -1
- package/esm/dev-server/dependency-graph.d.mts.map +1 -1
- package/esm/dev-server/dependency-graph.mjs +1 -1
- package/esm/dev-server/dependency-graph.mjs.map +1 -1
- package/esm/dev-server/dev-logger.mjs +1 -1
- package/esm/dev-server/dev-logger.mjs.map +1 -1
- package/esm/dev-server/development-server.mjs +32 -3
- package/esm/dev-server/development-server.mjs.map +1 -1
- package/esm/dev-server/events.mjs +1 -1
- package/esm/dev-server/events.mjs.map +1 -1
- package/esm/dev-server/file-event-handler.mjs +1 -1
- package/esm/dev-server/file-event-handler.mjs.map +1 -1
- package/esm/dev-server/file-manager.d.mts +1 -1
- package/esm/dev-server/file-manager.d.mts.map +1 -1
- package/esm/dev-server/file-manager.mjs +1 -1
- package/esm/dev-server/file-manager.mjs.map +1 -1
- package/esm/dev-server/file-operations.d.mts +1 -1
- package/esm/dev-server/file-operations.d.mts.map +1 -1
- package/esm/dev-server/file-operations.mjs +1 -1
- package/esm/dev-server/file-operations.mjs.map +1 -1
- package/esm/dev-server/files-orchestrator.d.mts +1 -1
- package/esm/dev-server/files-orchestrator.d.mts.map +1 -1
- package/esm/dev-server/files-orchestrator.mjs +1 -1
- package/esm/dev-server/files-orchestrator.mjs.map +1 -1
- package/esm/dev-server/files-watcher.d.mts +1 -1
- package/esm/dev-server/files-watcher.d.mts.map +1 -1
- package/esm/dev-server/files-watcher.mjs +1 -1
- package/esm/dev-server/files-watcher.mjs.map +1 -1
- package/esm/dev-server/flags.mjs +1 -1
- package/esm/dev-server/flags.mjs.map +1 -1
- package/esm/dev-server/health-checker/checkers/base-health-checker.d.mts +1 -1
- package/esm/dev-server/health-checker/checkers/base-health-checker.d.mts.map +1 -1
- package/esm/dev-server/health-checker/checkers/base-health-checker.mjs +1 -1
- package/esm/dev-server/health-checker/checkers/base-health-checker.mjs.map +1 -1
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.d.mts +1 -1
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.d.mts.map +1 -1
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.mjs +1 -1
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.mjs.map +1 -1
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.d.mts +1 -1
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.d.mts.map +1 -1
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.mjs +1 -1
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.mjs.map +1 -1
- package/esm/dev-server/health-checker/file-health-checker.contract.d.mts +1 -1
- package/esm/dev-server/health-checker/file-health-checker.contract.d.mts.map +1 -1
- package/esm/dev-server/health-checker/file-health-result.d.mts +1 -1
- package/esm/dev-server/health-checker/file-health-result.d.mts.map +1 -1
- package/esm/dev-server/health-checker/file-health-result.mjs +1 -1
- package/esm/dev-server/health-checker/file-health-result.mjs.map +1 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.d.mts +1 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.d.mts.map +1 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs +1 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs.map +1 -1
- package/esm/dev-server/health-checker/workers/eslint-health.worker.mjs +1 -1
- package/esm/dev-server/health-checker/workers/eslint-health.worker.mjs.map +1 -1
- package/esm/dev-server/health-checker/workers/ts-health.worker.mjs +1 -1
- package/esm/dev-server/health-checker/workers/ts-health.worker.mjs.map +1 -1
- package/esm/dev-server/layer-executor.mjs +1 -1
- package/esm/dev-server/layer-executor.mjs.map +1 -1
- package/esm/dev-server/loader/build-transpile-init.mjs +1 -1
- package/esm/dev-server/loader/build-transpile-init.mjs.map +1 -1
- package/esm/dev-server/loader/hook-thread.d.mts +1 -1
- package/esm/dev-server/loader/hook-thread.d.mts.map +1 -1
- package/esm/dev-server/loader/hook-thread.mjs +1 -1
- package/esm/dev-server/loader/hook-thread.mjs.map +1 -1
- package/esm/dev-server/loader/load-hook.d.mts +1 -1
- package/esm/dev-server/loader/load-hook.d.mts.map +1 -1
- package/esm/dev-server/loader/load-hook.mjs +1 -1
- package/esm/dev-server/loader/load-hook.mjs.map +1 -1
- package/esm/dev-server/loader/own-resolver.mjs +1 -1
- package/esm/dev-server/loader/own-resolver.mjs.map +1 -1
- package/esm/dev-server/loader/register-loader.mjs +1 -1
- package/esm/dev-server/loader/register-loader.mjs.map +1 -1
- package/esm/dev-server/loader/resolve-capture.mjs +1 -1
- package/esm/dev-server/loader/resolve-capture.mjs.map +1 -1
- package/esm/dev-server/loader/resolve-hook.d.mts +1 -1
- package/esm/dev-server/loader/resolve-hook.d.mts.map +1 -1
- package/esm/dev-server/loader/resolve-hook.mjs +1 -1
- package/esm/dev-server/loader/resolve-hook.mjs.map +1 -1
- package/esm/dev-server/loader/source-slug.mjs +1 -1
- package/esm/dev-server/loader/source-slug.mjs.map +1 -1
- package/esm/dev-server/loader/transpile-cache.mjs +1 -1
- package/esm/dev-server/loader/transpile-cache.mjs.map +1 -1
- package/esm/dev-server/loader/version-registry.mjs +1 -1
- package/esm/dev-server/loader/version-registry.mjs.map +1 -1
- package/esm/dev-server/manifest-manager.d.mts +1 -1
- package/esm/dev-server/manifest-manager.d.mts.map +1 -1
- package/esm/dev-server/manifest-manager.mjs +1 -1
- package/esm/dev-server/manifest-manager.mjs.map +1 -1
- package/esm/dev-server/module-loader.d.mts +1 -1
- package/esm/dev-server/module-loader.d.mts.map +1 -1
- package/esm/dev-server/module-loader.mjs +1 -1
- package/esm/dev-server/module-loader.mjs.map +1 -1
- package/esm/dev-server/package-json-manager.mjs +1 -1
- package/esm/dev-server/package-json-manager.mjs.map +1 -1
- package/esm/dev-server/parse-imports.mjs +1 -1
- package/esm/dev-server/parse-imports.mjs.map +1 -1
- package/esm/dev-server/path.mjs +1 -1
- package/esm/dev-server/path.mjs.map +1 -1
- package/esm/dev-server/register-dev-shortcuts.mjs +70 -0
- package/esm/dev-server/register-dev-shortcuts.mjs.map +1 -0
- package/esm/dev-server/restart-dev-server.mjs +36 -0
- package/esm/dev-server/restart-dev-server.mjs.map +1 -0
- package/esm/dev-server/shortcuts.mjs +121 -0
- package/esm/dev-server/shortcuts.mjs.map +1 -0
- package/esm/dev-server/special-files-collector.d.mts +1 -1
- package/esm/dev-server/special-files-collector.d.mts.map +1 -1
- package/esm/dev-server/special-files-collector.mjs +1 -1
- package/esm/dev-server/special-files-collector.mjs.map +1 -1
- package/esm/dev-server/start-development-server.mjs +3 -1
- package/esm/dev-server/start-development-server.mjs.map +1 -1
- package/esm/dev-server/supervisor.mjs +141 -0
- package/esm/dev-server/supervisor.mjs.map +1 -0
- package/esm/dev-server/tsconfig-manager.mjs +1 -1
- package/esm/dev-server/tsconfig-manager.mjs.map +1 -1
- package/esm/dev-server/type-generator.mjs +1 -1
- package/esm/dev-server/type-generator.mjs.map +1 -1
- package/esm/dev-server/types.d.mts +1 -1
- package/esm/dev-server/types.d.mts.map +1 -1
- package/esm/dev-server/update-check-cache.mjs +53 -0
- package/esm/dev-server/update-check-cache.mjs.map +1 -0
- package/esm/dev-server/utils.mjs +1 -1
- package/esm/dev-server/utils.mjs.map +1 -1
- package/esm/encryption/encrypt.d.mts +1 -1
- package/esm/encryption/encrypt.d.mts.map +1 -1
- package/esm/encryption/encrypt.mjs +1 -1
- package/esm/encryption/encrypt.mjs.map +1 -1
- package/esm/encryption/hash.d.mts +1 -1
- package/esm/encryption/hash.d.mts.map +1 -1
- package/esm/encryption/hash.mjs +1 -1
- package/esm/encryption/hash.mjs.map +1 -1
- package/esm/encryption/password.d.mts +1 -1
- package/esm/encryption/password.d.mts.map +1 -1
- package/esm/encryption/password.mjs +1 -1
- package/esm/encryption/password.mjs.map +1 -1
- package/esm/encryption/types.d.mts +1 -1
- package/esm/encryption/types.d.mts.map +1 -1
- package/esm/generations/add-command.action.mjs +3 -13
- package/esm/generations/add-command.action.mjs.map +1 -1
- package/esm/generations/stubs.mjs +1 -1
- package/esm/generations/stubs.mjs.map +1 -1
- package/esm/http/config.d.mts +1 -1
- package/esm/http/config.d.mts.map +1 -1
- package/esm/http/config.mjs +1 -1
- package/esm/http/config.mjs.map +1 -1
- package/esm/http/context/request-context.d.mts +1 -1
- package/esm/http/context/request-context.d.mts.map +1 -1
- package/esm/http/context/request-context.mjs +1 -1
- package/esm/http/context/request-context.mjs.map +1 -1
- package/esm/http/createHttpApplication.d.mts +1 -1
- package/esm/http/createHttpApplication.d.mts.map +1 -1
- package/esm/http/createHttpApplication.mjs +1 -1
- package/esm/http/createHttpApplication.mjs.map +1 -1
- package/esm/http/database/RequestLog.d.mts +1 -1
- package/esm/http/database/RequestLog.d.mts.map +1 -1
- package/esm/http/database/RequestLog.mjs +1 -1
- package/esm/http/database/RequestLog.mjs.map +1 -1
- package/esm/http/error-codes.d.mts +1 -1
- package/esm/http/error-codes.d.mts.map +1 -1
- package/esm/http/error-codes.mjs +1 -1
- package/esm/http/error-codes.mjs.map +1 -1
- package/esm/http/errors/errors.d.mts +1 -1
- package/esm/http/errors/errors.d.mts.map +1 -1
- package/esm/http/errors/errors.mjs +1 -1
- package/esm/http/errors/errors.mjs.map +1 -1
- package/esm/http/events.d.mts +1 -1
- package/esm/http/events.d.mts.map +1 -1
- package/esm/http/events.mjs +1 -1
- package/esm/http/events.mjs.map +1 -1
- package/esm/http/health.d.mts +1 -1
- package/esm/http/health.d.mts.map +1 -1
- package/esm/http/health.mjs +1 -1
- package/esm/http/health.mjs.map +1 -1
- package/esm/http/middleware/cache-response-middleware.d.mts +1 -1
- package/esm/http/middleware/cache-response-middleware.d.mts.map +1 -1
- package/esm/http/middleware/cache-response-middleware.mjs +1 -1
- package/esm/http/middleware/cache-response-middleware.mjs.map +1 -1
- package/esm/http/middleware/concurrency-limit.middleware.d.mts +1 -1
- package/esm/http/middleware/concurrency-limit.middleware.d.mts.map +1 -1
- package/esm/http/middleware/concurrency-limit.middleware.mjs +1 -1
- package/esm/http/middleware/concurrency-limit.middleware.mjs.map +1 -1
- package/esm/http/middleware/idempotency.middleware.d.mts +1 -1
- package/esm/http/middleware/idempotency.middleware.d.mts.map +1 -1
- package/esm/http/middleware/idempotency.middleware.mjs +1 -1
- package/esm/http/middleware/idempotency.middleware.mjs.map +1 -1
- package/esm/http/middleware/inject-request-context.d.mts +1 -1
- package/esm/http/middleware/inject-request-context.d.mts.map +1 -1
- package/esm/http/middleware/inject-request-context.mjs +1 -1
- package/esm/http/middleware/inject-request-context.mjs.map +1 -1
- package/esm/http/middleware/ip-filter.middleware.d.mts +1 -1
- package/esm/http/middleware/ip-filter.middleware.d.mts.map +1 -1
- package/esm/http/middleware/ip-filter.middleware.mjs +1 -1
- package/esm/http/middleware/ip-filter.middleware.mjs.map +1 -1
- package/esm/http/middleware/maintenance.middleware.d.mts +1 -1
- package/esm/http/middleware/maintenance.middleware.d.mts.map +1 -1
- package/esm/http/middleware/maintenance.middleware.mjs +1 -1
- package/esm/http/middleware/maintenance.middleware.mjs.map +1 -1
- package/esm/http/middleware/max-body-size.middleware.d.mts +1 -1
- package/esm/http/middleware/max-body-size.middleware.d.mts.map +1 -1
- package/esm/http/middleware/max-body-size.middleware.mjs +1 -1
- package/esm/http/middleware/max-body-size.middleware.mjs.map +1 -1
- package/esm/http/middleware/middleware-list.d.mts +1 -1
- package/esm/http/middleware/middleware-list.d.mts.map +1 -1
- package/esm/http/middleware/middleware-list.mjs +1 -1
- package/esm/http/middleware/middleware-list.mjs.map +1 -1
- package/esm/http/middleware/rate-limit.middleware.d.mts +1 -1
- package/esm/http/middleware/rate-limit.middleware.d.mts.map +1 -1
- package/esm/http/middleware/rate-limit.middleware.mjs +1 -1
- package/esm/http/middleware/rate-limit.middleware.mjs.map +1 -1
- package/esm/http/middleware/utils/cidr-match.d.mts +1 -1
- package/esm/http/middleware/utils/cidr-match.d.mts.map +1 -1
- package/esm/http/middleware/utils/cidr-match.mjs +1 -1
- package/esm/http/middleware/utils/cidr-match.mjs.map +1 -1
- package/esm/http/middleware/utils/idempotency-key.d.mts +1 -1
- package/esm/http/middleware/utils/idempotency-key.d.mts.map +1 -1
- package/esm/http/middleware/utils/idempotency-key.mjs +1 -1
- package/esm/http/middleware/utils/idempotency-key.mjs.map +1 -1
- package/esm/http/middleware/utils/parse-size.d.mts +1 -1
- package/esm/http/middleware/utils/parse-size.d.mts.map +1 -1
- package/esm/http/middleware/utils/parse-size.mjs +1 -1
- package/esm/http/middleware/utils/parse-size.mjs.map +1 -1
- package/esm/http/plugins.d.mts +1 -1
- package/esm/http/plugins.d.mts.map +1 -1
- package/esm/http/plugins.mjs +1 -1
- package/esm/http/plugins.mjs.map +1 -1
- package/esm/http/request-controller.d.mts +1 -1
- package/esm/http/request-controller.d.mts.map +1 -1
- package/esm/http/request-controller.mjs +1 -1
- package/esm/http/request-controller.mjs.map +1 -1
- package/esm/http/request.d.mts +1 -1
- package/esm/http/request.d.mts.map +1 -1
- package/esm/http/request.mjs +1 -1
- package/esm/http/request.mjs.map +1 -1
- package/esm/http/response.d.mts +1 -1
- package/esm/http/response.d.mts.map +1 -1
- package/esm/http/response.mjs +1 -1
- package/esm/http/response.mjs.map +1 -1
- package/esm/http/server.d.mts +1 -1
- package/esm/http/server.d.mts.map +1 -1
- package/esm/http/server.mjs +1 -1
- package/esm/http/server.mjs.map +1 -1
- package/esm/http/types.d.mts +1 -1
- package/esm/http/types.d.mts.map +1 -1
- package/esm/http/uploaded-file.d.mts +1 -1
- package/esm/http/uploaded-file.d.mts.map +1 -1
- package/esm/http/uploaded-file.mjs +1 -1
- package/esm/http/uploaded-file.mjs.map +1 -1
- package/esm/http/uploads-config.d.mts +1 -1
- package/esm/http/uploads-config.d.mts.map +1 -1
- package/esm/http/uploads-config.mjs +1 -1
- package/esm/http/uploads-config.mjs.map +1 -1
- package/esm/http/uploads-types.d.mts +1 -1
- package/esm/http/uploads-types.d.mts.map +1 -1
- package/esm/image/image.d.mts +1 -1
- package/esm/image/image.d.mts.map +1 -1
- package/esm/image/image.mjs +1 -1
- package/esm/image/image.mjs.map +1 -1
- package/esm/logger/logger.d.mts +1 -1
- package/esm/logger/logger.d.mts.map +1 -1
- package/esm/logger/logger.mjs +1 -1
- package/esm/logger/logger.mjs.map +1 -1
- package/esm/logger/types.d.mts +1 -1
- package/esm/logger/types.d.mts.map +1 -1
- package/esm/mail/config.d.mts +1 -1
- package/esm/mail/config.d.mts.map +1 -1
- package/esm/mail/config.mjs +1 -1
- package/esm/mail/config.mjs.map +1 -1
- package/esm/mail/events.d.mts +1 -1
- package/esm/mail/events.d.mts.map +1 -1
- package/esm/mail/events.mjs +1 -1
- package/esm/mail/events.mjs.map +1 -1
- package/esm/mail/mail.d.mts +1 -1
- package/esm/mail/mail.d.mts.map +1 -1
- package/esm/mail/mail.mjs +1 -1
- package/esm/mail/mail.mjs.map +1 -1
- package/esm/mail/mailer-pool.d.mts +1 -1
- package/esm/mail/mailer-pool.d.mts.map +1 -1
- package/esm/mail/mailer-pool.mjs +1 -1
- package/esm/mail/mailer-pool.mjs.map +1 -1
- package/esm/mail/react-mail.d.mts +1 -1
- package/esm/mail/react-mail.d.mts.map +1 -1
- package/esm/mail/react-mail.mjs +1 -1
- package/esm/mail/react-mail.mjs.map +1 -1
- package/esm/mail/send-mail.d.mts +1 -1
- package/esm/mail/send-mail.d.mts.map +1 -1
- package/esm/mail/send-mail.mjs +1 -1
- package/esm/mail/send-mail.mjs.map +1 -1
- package/esm/mail/test-mailbox.d.mts +1 -1
- package/esm/mail/test-mailbox.d.mts.map +1 -1
- package/esm/mail/test-mailbox.mjs +1 -1
- package/esm/mail/test-mailbox.mjs.map +1 -1
- package/esm/mail/types.d.mts +1 -1
- package/esm/mail/types.d.mts.map +1 -1
- package/esm/mail/types.mjs +1 -1
- package/esm/mail/types.mjs.map +1 -1
- package/esm/manifest/manifest-manager.mjs +1 -1
- package/esm/manifest/manifest-manager.mjs.map +1 -1
- package/esm/production/build-app-production.mjs +1 -1
- package/esm/production/build-app-production.mjs.map +1 -1
- package/esm/production/esbuild-plugins.mjs +1 -1
- package/esm/production/esbuild-plugins.mjs.map +1 -1
- package/esm/production/production-builder.mjs +1 -1
- package/esm/production/production-builder.mjs.map +1 -1
- package/esm/production/resolve-build-config.mjs +3 -2
- package/esm/production/resolve-build-config.mjs.map +1 -1
- package/esm/react/index.d.mts +1 -1
- package/esm/react/index.d.mts.map +1 -1
- package/esm/react/index.mjs +1 -1
- package/esm/react/index.mjs.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.d.mts +1 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.d.mts.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.mjs +1 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.mjs.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.mts +1 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.mts.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.mjs +1 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.mjs.map +1 -1
- package/esm/repositories/adapters/cascade/filter-applicator.mjs +1 -1
- package/esm/repositories/adapters/cascade/filter-applicator.mjs.map +1 -1
- package/esm/repositories/contracts/query-builder.contract.d.mts +1 -1
- package/esm/repositories/contracts/query-builder.contract.d.mts.map +1 -1
- package/esm/repositories/contracts/repository-adapter.contract.d.mts +1 -1
- package/esm/repositories/contracts/repository-adapter.contract.d.mts.map +1 -1
- package/esm/repositories/contracts/types.d.mts +1 -1
- package/esm/repositories/contracts/types.d.mts.map +1 -1
- package/esm/repositories/repository.manager.d.mts +1 -1
- package/esm/repositories/repository.manager.d.mts.map +1 -1
- package/esm/repositories/repository.manager.mjs +1 -1
- package/esm/repositories/repository.manager.mjs.map +1 -1
- package/esm/resource/define-resource.d.mts +1 -1
- package/esm/resource/define-resource.d.mts.map +1 -1
- package/esm/resource/define-resource.mjs +1 -1
- package/esm/resource/define-resource.mjs.map +1 -1
- package/esm/resource/register-resource.d.mts +1 -1
- package/esm/resource/register-resource.d.mts.map +1 -1
- package/esm/resource/register-resource.mjs +1 -1
- package/esm/resource/register-resource.mjs.map +1 -1
- package/esm/resource/resource-field-builder.d.mts +1 -1
- package/esm/resource/resource-field-builder.d.mts.map +1 -1
- package/esm/resource/resource-field-builder.mjs +1 -1
- package/esm/resource/resource-field-builder.mjs.map +1 -1
- package/esm/resource/resource.d.mts +1 -1
- package/esm/resource/resource.d.mts.map +1 -1
- package/esm/resource/resource.mjs +1 -1
- package/esm/resource/resource.mjs.map +1 -1
- package/esm/resource/types.d.mts +1 -1
- package/esm/resource/types.d.mts.map +1 -1
- package/esm/restful/restful.d.mts +1 -1
- package/esm/restful/restful.d.mts.map +1 -1
- package/esm/restful/restful.mjs +1 -1
- package/esm/restful/restful.mjs.map +1 -1
- package/esm/router/route-builder.d.mts +1 -1
- package/esm/router/route-builder.d.mts.map +1 -1
- package/esm/router/route-builder.mjs +1 -1
- package/esm/router/route-builder.mjs.map +1 -1
- package/esm/router/route-registry.mjs +1 -1
- package/esm/router/route-registry.mjs.map +1 -1
- package/esm/router/router.d.mts +1 -1
- package/esm/router/router.d.mts.map +1 -1
- package/esm/router/router.mjs +1 -1
- package/esm/router/router.mjs.map +1 -1
- package/esm/router/types.d.mts +1 -1
- package/esm/router/types.d.mts.map +1 -1
- package/esm/socket/types.d.mts +1 -1
- package/esm/socket/types.d.mts.map +1 -1
- package/esm/socket/utils.d.mts +1 -1
- package/esm/socket/utils.d.mts.map +1 -1
- package/esm/socket/utils.mjs +1 -1
- package/esm/socket/utils.mjs.map +1 -1
- package/esm/storage/config.d.mts +1 -1
- package/esm/storage/config.d.mts.map +1 -1
- package/esm/storage/config.mjs +1 -1
- package/esm/storage/config.mjs.map +1 -1
- package/esm/storage/context/storage-driver-context.d.mts +1 -1
- package/esm/storage/context/storage-driver-context.d.mts.map +1 -1
- package/esm/storage/context/storage-driver-context.mjs +1 -1
- package/esm/storage/context/storage-driver-context.mjs.map +1 -1
- package/esm/storage/drivers/cloud-driver.d.mts +1 -1
- package/esm/storage/drivers/cloud-driver.d.mts.map +1 -1
- package/esm/storage/drivers/cloud-driver.mjs +1 -1
- package/esm/storage/drivers/cloud-driver.mjs.map +1 -1
- package/esm/storage/drivers/do-spaces-driver.d.mts +1 -1
- package/esm/storage/drivers/do-spaces-driver.d.mts.map +1 -1
- package/esm/storage/drivers/do-spaces-driver.mjs +1 -1
- package/esm/storage/drivers/do-spaces-driver.mjs.map +1 -1
- package/esm/storage/drivers/local-driver.d.mts +1 -1
- package/esm/storage/drivers/local-driver.d.mts.map +1 -1
- package/esm/storage/drivers/local-driver.mjs +1 -1
- package/esm/storage/drivers/local-driver.mjs.map +1 -1
- package/esm/storage/drivers/r2-driver.d.mts +1 -1
- package/esm/storage/drivers/r2-driver.d.mts.map +1 -1
- package/esm/storage/drivers/r2-driver.mjs +1 -1
- package/esm/storage/drivers/r2-driver.mjs.map +1 -1
- package/esm/storage/drivers/s3-driver.d.mts +1 -1
- package/esm/storage/drivers/s3-driver.d.mts.map +1 -1
- package/esm/storage/drivers/s3-driver.mjs +1 -1
- package/esm/storage/drivers/s3-driver.mjs.map +1 -1
- package/esm/storage/scoped-storage.d.mts +1 -1
- package/esm/storage/scoped-storage.d.mts.map +1 -1
- package/esm/storage/scoped-storage.mjs +1 -1
- package/esm/storage/scoped-storage.mjs.map +1 -1
- package/esm/storage/storage-file.d.mts +1 -1
- package/esm/storage/storage-file.d.mts.map +1 -1
- package/esm/storage/storage-file.mjs +1 -1
- package/esm/storage/storage-file.mjs.map +1 -1
- package/esm/storage/storage.d.mts +1 -1
- package/esm/storage/storage.d.mts.map +1 -1
- package/esm/storage/storage.mjs +1 -1
- package/esm/storage/storage.mjs.map +1 -1
- package/esm/storage/types.d.mts +1 -1
- package/esm/storage/types.d.mts.map +1 -1
- package/esm/storage/utils/contain-path.d.mts +1 -1
- package/esm/storage/utils/contain-path.d.mts.map +1 -1
- package/esm/storage/utils/contain-path.mjs +1 -1
- package/esm/storage/utils/contain-path.mjs.map +1 -1
- package/esm/storage/utils/mime.d.mts +1 -1
- package/esm/storage/utils/mime.d.mts.map +1 -1
- package/esm/storage/utils/mime.mjs +1 -1
- package/esm/storage/utils/mime.mjs.map +1 -1
- package/esm/storage/utils/safe-fetch.d.mts +1 -1
- package/esm/storage/utils/safe-fetch.d.mts.map +1 -1
- package/esm/storage/utils/safe-fetch.mjs +1 -1
- package/esm/storage/utils/safe-fetch.mjs.map +1 -1
- package/esm/storage/utils/storage-error.d.mts +1 -1
- package/esm/storage/utils/storage-error.d.mts.map +1 -1
- package/esm/storage/utils/storage-error.mjs +1 -1
- package/esm/storage/utils/storage-error.mjs.map +1 -1
- package/esm/tests/start-http-development-server.d.mts +1 -1
- package/esm/tests/start-http-development-server.d.mts.map +1 -1
- package/esm/tests/start-http-development-server.mjs +1 -1
- package/esm/tests/start-http-development-server.mjs.map +1 -1
- package/esm/tests/test-helpers.d.mts +1 -1
- package/esm/tests/test-helpers.d.mts.map +1 -1
- package/esm/tests/test-helpers.mjs +1 -1
- package/esm/tests/test-helpers.mjs.map +1 -1
- package/esm/tests/vitest-setup.d.mts +1 -1
- package/esm/tests/vitest-setup.d.mts.map +1 -1
- package/esm/tests/vitest-setup.mjs +1 -1
- package/esm/tests/vitest-setup.mjs.map +1 -1
- package/esm/updater/package-manager.mjs +47 -7
- package/esm/updater/package-manager.mjs.map +1 -1
- package/esm/updater/update-warlock-packages.mjs +63 -10
- package/esm/updater/update-warlock-packages.mjs.map +1 -1
- package/esm/use-cases/types.d.mts +1 -1
- package/esm/use-cases/types.d.mts.map +1 -1
- package/esm/use-cases/use-case-broadcast.d.mts +1 -1
- package/esm/use-cases/use-case-broadcast.d.mts.map +1 -1
- package/esm/use-cases/use-case-broadcast.mjs +1 -1
- package/esm/use-cases/use-case-broadcast.mjs.map +1 -1
- package/esm/use-cases/use-case-events.d.mts +1 -1
- package/esm/use-cases/use-case-events.d.mts.map +1 -1
- package/esm/use-cases/use-case-events.mjs +1 -1
- package/esm/use-cases/use-case-events.mjs.map +1 -1
- package/esm/use-cases/use-case-pipeline.d.mts +1 -1
- package/esm/use-cases/use-case-pipeline.d.mts.map +1 -1
- package/esm/use-cases/use-case-pipeline.mjs +1 -1
- package/esm/use-cases/use-case-pipeline.mjs.map +1 -1
- package/esm/use-cases/use-case.d.mts +1 -1
- package/esm/use-cases/use-case.d.mts.map +1 -1
- package/esm/use-cases/use-case.errors.d.mts +1 -1
- package/esm/use-cases/use-case.errors.d.mts.map +1 -1
- package/esm/use-cases/use-case.errors.mjs +1 -1
- package/esm/use-cases/use-case.errors.mjs.map +1 -1
- package/esm/use-cases/use-case.mjs +1 -1
- package/esm/use-cases/use-case.mjs.map +1 -1
- package/esm/use-cases/use-cases-registry.d.mts +1 -1
- package/esm/use-cases/use-cases-registry.d.mts.map +1 -1
- package/esm/use-cases/use-cases-registry.mjs +1 -1
- package/esm/use-cases/use-cases-registry.mjs.map +1 -1
- package/esm/utils/app-log.d.mts +1 -1
- package/esm/utils/app-log.d.mts.map +1 -1
- package/esm/utils/app-log.mjs +1 -1
- package/esm/utils/app-log.mjs.map +1 -1
- package/esm/utils/database-log.d.mts +1 -1
- package/esm/utils/database-log.d.mts.map +1 -1
- package/esm/utils/database-log.mjs +1 -1
- package/esm/utils/database-log.mjs.map +1 -1
- package/esm/utils/environment.d.mts +1 -1
- package/esm/utils/environment.d.mts.map +1 -1
- package/esm/utils/environment.mjs +1 -1
- package/esm/utils/environment.mjs.map +1 -1
- package/esm/utils/framework-vesion.mjs +1 -1
- package/esm/utils/framework-vesion.mjs.map +1 -1
- package/esm/utils/get-localized.d.mts +1 -1
- package/esm/utils/get-localized.d.mts.map +1 -1
- package/esm/utils/get-localized.mjs +1 -1
- package/esm/utils/get-localized.mjs.map +1 -1
- package/esm/utils/npm-registry.d.mts +1 -1
- package/esm/utils/npm-registry.d.mts.map +1 -1
- package/esm/utils/npm-registry.mjs +1 -1
- package/esm/utils/npm-registry.mjs.map +1 -1
- package/esm/utils/paths.d.mts +1 -1
- package/esm/utils/paths.d.mts.map +1 -1
- package/esm/utils/paths.mjs +1 -1
- package/esm/utils/paths.mjs.map +1 -1
- package/esm/utils/promise-all-object.d.mts +1 -1
- package/esm/utils/promise-all-object.d.mts.map +1 -1
- package/esm/utils/promise-all-object.mjs +1 -1
- package/esm/utils/promise-all-object.mjs.map +1 -1
- package/esm/utils/queue.d.mts +1 -1
- package/esm/utils/queue.d.mts.map +1 -1
- package/esm/utils/queue.mjs +1 -1
- package/esm/utils/queue.mjs.map +1 -1
- package/esm/utils/sleep.d.mts +1 -1
- package/esm/utils/sleep.d.mts.map +1 -1
- package/esm/utils/sleep.mjs +1 -1
- package/esm/utils/sleep.mjs.map +1 -1
- package/esm/utils/sluggable.d.mts +1 -1
- package/esm/utils/sluggable.d.mts.map +1 -1
- package/esm/utils/sluggable.mjs +1 -1
- package/esm/utils/sluggable.mjs.map +1 -1
- package/esm/utils/to-json.d.mts +1 -1
- package/esm/utils/to-json.d.mts.map +1 -1
- package/esm/utils/to-json.mjs +1 -1
- package/esm/utils/to-json.mjs.map +1 -1
- package/esm/utils/types.d.mts +1 -1
- package/esm/utils/types.d.mts.map +1 -1
- package/esm/utils/urls.d.mts +1 -1
- package/esm/utils/urls.d.mts.map +1 -1
- package/esm/utils/urls.mjs +1 -1
- package/esm/utils/urls.mjs.map +1 -1
- package/esm/utils/version-compare.d.mts +1 -1
- package/esm/utils/version-compare.d.mts.map +1 -1
- package/esm/utils/version-compare.mjs +1 -1
- package/esm/utils/version-compare.mjs.map +1 -1
- package/esm/validation/database/exists-except-current-id.d.mts +1 -1
- package/esm/validation/database/exists-except-current-id.d.mts.map +1 -1
- package/esm/validation/database/exists-except-current-id.mjs +1 -1
- package/esm/validation/database/exists-except-current-id.mjs.map +1 -1
- package/esm/validation/database/exists-except-current-user.d.mts +1 -1
- package/esm/validation/database/exists-except-current-user.d.mts.map +1 -1
- package/esm/validation/database/exists-except-current-user.mjs +1 -1
- package/esm/validation/database/exists-except-current-user.mjs.map +1 -1
- package/esm/validation/database/types.d.mts +1 -1
- package/esm/validation/database/types.d.mts.map +1 -1
- package/esm/validation/database/unique-except-current-id.d.mts +1 -1
- package/esm/validation/database/unique-except-current-id.d.mts.map +1 -1
- package/esm/validation/database/unique-except-current-id.mjs +1 -1
- package/esm/validation/database/unique-except-current-id.mjs.map +1 -1
- package/esm/validation/database/unique-except-current-user.d.mts +1 -1
- package/esm/validation/database/unique-except-current-user.d.mts.map +1 -1
- package/esm/validation/database/unique-except-current-user.mjs +1 -1
- package/esm/validation/database/unique-except-current-user.mjs.map +1 -1
- package/esm/validation/file/file.d.mts +1 -1
- package/esm/validation/file/file.d.mts.map +1 -1
- package/esm/validation/file/file.mjs +1 -1
- package/esm/validation/file/file.mjs.map +1 -1
- package/esm/validation/init.mjs +1 -1
- package/esm/validation/init.mjs.map +1 -1
- package/esm/validation/plugins/database-plugin.mjs +1 -1
- package/esm/validation/plugins/database-plugin.mjs.map +1 -1
- package/esm/validation/plugins/file-plugin.mjs +1 -1
- package/esm/validation/plugins/file-plugin.mjs.map +1 -1
- package/esm/validation/plugins/localized-plugin.mjs +1 -1
- package/esm/validation/plugins/localized-plugin.mjs.map +1 -1
- package/esm/validation/types.d.mts +1 -1
- package/esm/validation/types.d.mts.map +1 -1
- package/esm/validation/validateAll.mjs +1 -1
- package/esm/validation/validateAll.mjs.map +1 -1
- package/esm/validation/validators/file-validator.d.mts +1 -1
- package/esm/validation/validators/file-validator.d.mts.map +1 -1
- package/esm/validation/validators/file-validator.mjs +1 -1
- package/esm/validation/validators/file-validator.mjs.map +1 -1
- package/esm/vite/lower-stage3-decorators.d.mts +1 -1
- package/esm/vite/lower-stage3-decorators.d.mts.map +1 -1
- package/esm/vite/lower-stage3-decorators.mjs +1 -1
- package/esm/vite/lower-stage3-decorators.mjs.map +1 -1
- package/esm/warlock-config/default-configurations.mjs +1 -1
- package/esm/warlock-config/default-configurations.mjs.map +1 -1
- package/esm/warlock-config/define-config.d.mts +1 -1
- package/esm/warlock-config/define-config.d.mts.map +1 -1
- package/esm/warlock-config/define-config.mjs +6 -2
- package/esm/warlock-config/define-config.mjs.map +1 -1
- package/esm/warlock-config/normalize-build-config.mjs +24 -0
- package/esm/warlock-config/normalize-build-config.mjs.map +1 -0
- package/esm/warlock-config/types.d.mts +21 -1
- package/esm/warlock-config/types.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.d.mts +1 -1
- package/esm/warlock-config/warlock-config.manager.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.mjs +1 -1
- package/esm/warlock-config/warlock-config.manager.mjs.map +1 -1
- package/llms-full.txt +131 -13
- package/llms.txt +2 -2
- package/package.json +12 -12
- package/skills/run-app/SKILL.md +70 -7
- package/skills/update-packages/SKILL.md +61 -6
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { devLogError, devServeLog } from "./dev-logger.mjs";
|
|
2
|
+
import { isDevWorker } from "./supervisor.mjs";
|
|
3
|
+
import { colors } from "@mongez/copper";
|
|
4
|
+
|
|
5
|
+
//#region ../core/src/dev-server/restart-dev-server.ts
|
|
6
|
+
/**
|
|
7
|
+
* Restart `warlock dev`.
|
|
8
|
+
*
|
|
9
|
+
* There is no way to un-load an ES module graph, so a restart is a fresh
|
|
10
|
+
* process. This one doesn't create it: the supervisor that launched us does.
|
|
11
|
+
* We shut down cleanly — which frees the http port before the replacement
|
|
12
|
+
* binds it — and exit with {@link RESTART_EXIT_CODE}, which the supervisor
|
|
13
|
+
* reads as "spawn me again".
|
|
14
|
+
*
|
|
15
|
+
* Never returns on the happy path. Returns `false` when a restart isn't
|
|
16
|
+
* possible — no supervisor (a programmatic `startDevelopmentServer` call), or
|
|
17
|
+
* a shutdown that failed — so the caller can carry on with the server it has.
|
|
18
|
+
*/
|
|
19
|
+
async function restartDevServer(devServer) {
|
|
20
|
+
if (!isDevWorker()) {
|
|
21
|
+
devLogError("Restart is unavailable — this server was not started by `warlock dev`.");
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
devServeLog(colors.cyanBright("Restarting the development server…"));
|
|
25
|
+
try {
|
|
26
|
+
await devServer.shutdown();
|
|
27
|
+
} catch (error) {
|
|
28
|
+
devLogError(`Shutdown before restart failed: ${error.message}`);
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
process.exit(75);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { restartDevServer };
|
|
36
|
+
//# sourceMappingURL=restart-dev-server.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restart-dev-server.mjs","names":[],"sources":["../../../../../../../core/src/dev-server/restart-dev-server.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\nimport { devLogError, devServeLog } from \"./dev-logger\";\nimport type { DevelopmentServer } from \"./development-server\";\nimport { isDevWorker, RESTART_EXIT_CODE } from \"./supervisor\";\n\n/**\n * Restart `warlock dev`.\n *\n * There is no way to un-load an ES module graph, so a restart is a fresh\n * process. This one doesn't create it: the supervisor that launched us does.\n * We shut down cleanly — which frees the http port before the replacement\n * binds it — and exit with {@link RESTART_EXIT_CODE}, which the supervisor\n * reads as \"spawn me again\".\n *\n * Never returns on the happy path. Returns `false` when a restart isn't\n * possible — no supervisor (a programmatic `startDevelopmentServer` call), or\n * a shutdown that failed — so the caller can carry on with the server it has.\n */\nexport async function restartDevServer(devServer: DevelopmentServer): Promise<boolean> {\n if (!isDevWorker()) {\n devLogError(\"Restart is unavailable — this server was not started by `warlock dev`.\");\n return false;\n }\n\n devServeLog(colors.cyanBright(\"Restarting the development server…\"));\n\n try {\n await devServer.shutdown();\n } catch (error) {\n devLogError(`Shutdown before restart failed: ${(error as Error).message}`);\n return false;\n }\n\n process.exit(RESTART_EXIT_CODE);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,eAAsB,iBAAiB,WAAgD;CACrF,IAAI,CAAC,YAAY,GAAG;EAClB,YAAY,wEAAwE;EACpF,OAAO;CACT;CAEA,YAAY,OAAO,WAAW,oCAAoC,CAAC;CAEnE,IAAI;EACF,MAAM,UAAU,SAAS;CAC3B,SAAS,OAAO;EACd,YAAY,mCAAoC,MAAgB,SAAS;EACzE,OAAO;CACT;CAEA,QAAQ,OAAsB;AAChC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import readline from "node:readline";
|
|
2
|
+
|
|
3
|
+
//#region ../core/src/dev-server/shortcuts.ts
|
|
4
|
+
/**
|
|
5
|
+
* Single-keypress shortcuts for the dev server (`press u to update`, …).
|
|
6
|
+
*
|
|
7
|
+
* Reading one key at a time requires putting stdin into raw mode, which
|
|
8
|
+
* means this process — not the terminal driver — becomes responsible for
|
|
9
|
+
* `Ctrl+C`. The manager therefore re-raises `SIGINT` itself so the existing
|
|
10
|
+
* graceful-shutdown handlers keep working exactly as before.
|
|
11
|
+
*
|
|
12
|
+
* Everything is opt-in and self-guarding: with no TTY (piped output, CI,
|
|
13
|
+
* a supervisor) `register()` reports `false` and stdin is never touched, so
|
|
14
|
+
* callers can fall back to printing a plain "run `npx warlock update`" hint.
|
|
15
|
+
*/
|
|
16
|
+
var DevServerShortcuts = class {
|
|
17
|
+
/**
|
|
18
|
+
* @param input The stream to read keys from. Defaults to the process's
|
|
19
|
+
* own stdin; tests pass a fake TTY instead.
|
|
20
|
+
* @param onInterrupt What `Ctrl+C` does once raw mode has taken it away from
|
|
21
|
+
* the terminal driver. Defaults to re-raising `SIGINT`.
|
|
22
|
+
*/
|
|
23
|
+
constructor(input = process.stdin, onInterrupt = raiseInterrupt) {
|
|
24
|
+
this.input = input;
|
|
25
|
+
this.onInterrupt = onInterrupt;
|
|
26
|
+
this.shortcuts = /* @__PURE__ */ new Map();
|
|
27
|
+
this.listening = false;
|
|
28
|
+
this.busy = false;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Whether the current terminal can deliver individual keypresses. False in
|
|
32
|
+
* CI, when stdin is a pipe, and in any non-interactive shell.
|
|
33
|
+
*/
|
|
34
|
+
isSupported() {
|
|
35
|
+
return Boolean(this.input.isTTY && typeof this.input.setRawMode === "function");
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Offer a shortcut. Returns whether it was actually registered — `false`
|
|
39
|
+
* means the terminal can't support keypresses and the caller should print
|
|
40
|
+
* a copy-and-paste command instead.
|
|
41
|
+
*/
|
|
42
|
+
register(shortcut) {
|
|
43
|
+
if (!this.isSupported()) return false;
|
|
44
|
+
this.shortcuts.set(shortcut.key.toLowerCase(), shortcut);
|
|
45
|
+
this.listen();
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
/** Every armed shortcut, in the order it was registered. */
|
|
49
|
+
list() {
|
|
50
|
+
return [...this.shortcuts.values()];
|
|
51
|
+
}
|
|
52
|
+
/** Drop a shortcut, releasing the terminal once none are left. */
|
|
53
|
+
unregister(key) {
|
|
54
|
+
this.shortcuts.delete(key.toLowerCase());
|
|
55
|
+
if (this.shortcuts.size === 0) this.release();
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Hand the terminal back: leave raw mode and stop listening. Call this
|
|
59
|
+
* before spawning a child process that needs stdin (the package manager
|
|
60
|
+
* install), and on shutdown. Registered shortcuts are kept, so `register()`
|
|
61
|
+
* (or `resume()`) can take the terminal again afterwards.
|
|
62
|
+
*/
|
|
63
|
+
release() {
|
|
64
|
+
if (!this.listening) return;
|
|
65
|
+
this.listening = false;
|
|
66
|
+
if (this.keypressListener) {
|
|
67
|
+
this.input.off("keypress", this.keypressListener);
|
|
68
|
+
this.keypressListener = void 0;
|
|
69
|
+
}
|
|
70
|
+
if (this.input.isTTY) this.input.setRawMode(false);
|
|
71
|
+
this.input.pause();
|
|
72
|
+
}
|
|
73
|
+
/** Re-take the terminal after a {@link release}, if shortcuts remain. */
|
|
74
|
+
resume() {
|
|
75
|
+
if (this.shortcuts.size > 0) this.listen();
|
|
76
|
+
}
|
|
77
|
+
/** Start (or keep) listening for keypresses. */
|
|
78
|
+
listen() {
|
|
79
|
+
if (this.listening || !this.isSupported()) return;
|
|
80
|
+
this.listening = true;
|
|
81
|
+
readline.emitKeypressEvents(this.input);
|
|
82
|
+
this.input.setRawMode(true);
|
|
83
|
+
this.input.resume();
|
|
84
|
+
this.keypressListener = (_character, key) => {
|
|
85
|
+
this.handleKeypress(key);
|
|
86
|
+
};
|
|
87
|
+
this.input.on("keypress", this.keypressListener);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Route a keypress to its shortcut. In raw mode the terminal no longer
|
|
91
|
+
* turns `Ctrl+C` into a signal for us, so we translate it back into a
|
|
92
|
+
* `SIGINT` and let the dev server's shutdown handlers take it from there.
|
|
93
|
+
*/
|
|
94
|
+
async handleKeypress(key) {
|
|
95
|
+
if (!key) return;
|
|
96
|
+
if (key.ctrl && (key.name === "c" || key.name === "d")) {
|
|
97
|
+
this.release();
|
|
98
|
+
this.onInterrupt();
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (this.busy) return;
|
|
102
|
+
const shortcut = key.name ? this.shortcuts.get(key.name.toLowerCase()) : void 0;
|
|
103
|
+
if (!shortcut) return;
|
|
104
|
+
this.busy = true;
|
|
105
|
+
try {
|
|
106
|
+
await shortcut.handler();
|
|
107
|
+
} catch {} finally {
|
|
108
|
+
this.busy = false;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
/** Re-raise the interrupt the terminal would have sent outside raw mode. */
|
|
113
|
+
function raiseInterrupt() {
|
|
114
|
+
process.kill(process.pid, "SIGINT");
|
|
115
|
+
}
|
|
116
|
+
/** Process-wide shortcuts for the running dev server. */
|
|
117
|
+
const devServerShortcuts = new DevServerShortcuts();
|
|
118
|
+
|
|
119
|
+
//#endregion
|
|
120
|
+
export { devServerShortcuts };
|
|
121
|
+
//# sourceMappingURL=shortcuts.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortcuts.mjs","names":[],"sources":["../../../../../../../core/src/dev-server/shortcuts.ts"],"sourcesContent":["import readline from \"node:readline\";\n\n/**\n * A single-keypress shortcut offered by the dev server while it runs.\n */\nexport type DevServerShortcut = {\n /** The key that triggers it, e.g. `\"u\"`. Matched case-insensitively. */\n key: string;\n /** Short human label, used when we print the available shortcuts. */\n description: string;\n /** What to run when the key is pressed. Rejections are swallowed. */\n handler: () => void | Promise<void>;\n};\n\n/**\n * Single-keypress shortcuts for the dev server (`press u to update`, …).\n *\n * Reading one key at a time requires putting stdin into raw mode, which\n * means this process — not the terminal driver — becomes responsible for\n * `Ctrl+C`. The manager therefore re-raises `SIGINT` itself so the existing\n * graceful-shutdown handlers keep working exactly as before.\n *\n * Everything is opt-in and self-guarding: with no TTY (piped output, CI,\n * a supervisor) `register()` reports `false` and stdin is never touched, so\n * callers can fall back to printing a plain \"run `npx warlock update`\" hint.\n */\nexport class DevServerShortcuts {\n private readonly shortcuts = new Map<string, DevServerShortcut>();\n\n /** Whether we currently hold stdin in raw mode. */\n private listening = false;\n\n /** Set while a handler runs, so a second keypress can't re-enter it. */\n private busy = false;\n\n private keypressListener?: (character: string, key: KeypressEvent) => void;\n\n /**\n * @param input The stream to read keys from. Defaults to the process's\n * own stdin; tests pass a fake TTY instead.\n * @param onInterrupt What `Ctrl+C` does once raw mode has taken it away from\n * the terminal driver. Defaults to re-raising `SIGINT`.\n */\n public constructor(\n private readonly input: NodeJS.ReadStream = process.stdin,\n private readonly onInterrupt: () => void = raiseInterrupt,\n ) {}\n\n /**\n * Whether the current terminal can deliver individual keypresses. False in\n * CI, when stdin is a pipe, and in any non-interactive shell.\n */\n public isSupported(): boolean {\n return Boolean(this.input.isTTY && typeof this.input.setRawMode === \"function\");\n }\n\n /**\n * Offer a shortcut. Returns whether it was actually registered — `false`\n * means the terminal can't support keypresses and the caller should print\n * a copy-and-paste command instead.\n */\n public register(shortcut: DevServerShortcut): boolean {\n if (!this.isSupported()) {\n return false;\n }\n\n this.shortcuts.set(shortcut.key.toLowerCase(), shortcut);\n this.listen();\n\n return true;\n }\n\n /** Every armed shortcut, in the order it was registered. */\n public list(): DevServerShortcut[] {\n return [...this.shortcuts.values()];\n }\n\n /** Drop a shortcut, releasing the terminal once none are left. */\n public unregister(key: string): void {\n this.shortcuts.delete(key.toLowerCase());\n\n if (this.shortcuts.size === 0) {\n this.release();\n }\n }\n\n /**\n * Hand the terminal back: leave raw mode and stop listening. Call this\n * before spawning a child process that needs stdin (the package manager\n * install), and on shutdown. Registered shortcuts are kept, so `register()`\n * (or `resume()`) can take the terminal again afterwards.\n */\n public release(): void {\n if (!this.listening) {\n return;\n }\n\n this.listening = false;\n\n if (this.keypressListener) {\n this.input.off(\"keypress\", this.keypressListener);\n this.keypressListener = undefined;\n }\n\n if (this.input.isTTY) {\n this.input.setRawMode(false);\n }\n\n this.input.pause();\n }\n\n /** Re-take the terminal after a {@link release}, if shortcuts remain. */\n public resume(): void {\n if (this.shortcuts.size > 0) {\n this.listen();\n }\n }\n\n /** Start (or keep) listening for keypresses. */\n private listen(): void {\n if (this.listening || !this.isSupported()) {\n return;\n }\n\n this.listening = true;\n\n readline.emitKeypressEvents(this.input);\n this.input.setRawMode(true);\n this.input.resume();\n\n this.keypressListener = (_character, key) => {\n void this.handleKeypress(key);\n };\n\n this.input.on(\"keypress\", this.keypressListener);\n }\n\n /**\n * Route a keypress to its shortcut. In raw mode the terminal no longer\n * turns `Ctrl+C` into a signal for us, so we translate it back into a\n * `SIGINT` and let the dev server's shutdown handlers take it from there.\n */\n private async handleKeypress(key: KeypressEvent | undefined): Promise<void> {\n if (!key) {\n return;\n }\n\n if (key.ctrl && (key.name === \"c\" || key.name === \"d\")) {\n this.release();\n this.onInterrupt();\n return;\n }\n\n if (this.busy) {\n return;\n }\n\n const shortcut = key.name ? this.shortcuts.get(key.name.toLowerCase()) : undefined;\n\n if (!shortcut) {\n return;\n }\n\n this.busy = true;\n\n try {\n await shortcut.handler();\n } catch {\n // A shortcut is a convenience — never let it take the dev server down.\n } finally {\n this.busy = false;\n }\n }\n}\n\n/** Re-raise the interrupt the terminal would have sent outside raw mode. */\nfunction raiseInterrupt(): void {\n process.kill(process.pid, \"SIGINT\");\n}\n\n/** The keypress shape emitted by `readline.emitKeypressEvents`. */\ntype KeypressEvent = {\n name?: string;\n ctrl?: boolean;\n meta?: boolean;\n shift?: boolean;\n};\n\n/** Process-wide shortcuts for the running dev server. */\nexport const devServerShortcuts = new DevServerShortcuts();\n"],"mappings":";;;;;;;;;;;;;;;AA0BA,IAAa,qBAAb,MAAgC;;;;;;;CAiB9B,AAAO,YACL,AAAiB,QAA2B,QAAQ,OACpD,AAAiB,cAA0B,gBAC3C;EAFiB;EACA;mCAlBU,IAAI,IAA+B;mBAG5C;cAGL;CAaZ;;;;;CAMH,AAAO,cAAuB;EAC5B,OAAO,QAAQ,KAAK,MAAM,SAAS,OAAO,KAAK,MAAM,eAAe,UAAU;CAChF;;;;;;CAOA,AAAO,SAAS,UAAsC;EACpD,IAAI,CAAC,KAAK,YAAY,GACpB,OAAO;EAGT,KAAK,UAAU,IAAI,SAAS,IAAI,YAAY,GAAG,QAAQ;EACvD,KAAK,OAAO;EAEZ,OAAO;CACT;;CAGA,AAAO,OAA4B;EACjC,OAAO,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC;CACpC;;CAGA,AAAO,WAAW,KAAmB;EACnC,KAAK,UAAU,OAAO,IAAI,YAAY,CAAC;EAEvC,IAAI,KAAK,UAAU,SAAS,GAC1B,KAAK,QAAQ;CAEjB;;;;;;;CAQA,AAAO,UAAgB;EACrB,IAAI,CAAC,KAAK,WACR;EAGF,KAAK,YAAY;EAEjB,IAAI,KAAK,kBAAkB;GACzB,KAAK,MAAM,IAAI,YAAY,KAAK,gBAAgB;GAChD,KAAK,mBAAmB;EAC1B;EAEA,IAAI,KAAK,MAAM,OACb,KAAK,MAAM,WAAW,KAAK;EAG7B,KAAK,MAAM,MAAM;CACnB;;CAGA,AAAO,SAAe;EACpB,IAAI,KAAK,UAAU,OAAO,GACxB,KAAK,OAAO;CAEhB;;CAGA,AAAQ,SAAe;EACrB,IAAI,KAAK,aAAa,CAAC,KAAK,YAAY,GACtC;EAGF,KAAK,YAAY;EAEjB,SAAS,mBAAmB,KAAK,KAAK;EACtC,KAAK,MAAM,WAAW,IAAI;EAC1B,KAAK,MAAM,OAAO;EAElB,KAAK,oBAAoB,YAAY,QAAQ;GAC3C,AAAK,KAAK,eAAe,GAAG;EAC9B;EAEA,KAAK,MAAM,GAAG,YAAY,KAAK,gBAAgB;CACjD;;;;;;CAOA,MAAc,eAAe,KAA+C;EAC1E,IAAI,CAAC,KACH;EAGF,IAAI,IAAI,SAAS,IAAI,SAAS,OAAO,IAAI,SAAS,MAAM;GACtD,KAAK,QAAQ;GACb,KAAK,YAAY;GACjB;EACF;EAEA,IAAI,KAAK,MACP;EAGF,MAAM,WAAW,IAAI,OAAO,KAAK,UAAU,IAAI,IAAI,KAAK,YAAY,CAAC,IAAI;EAEzE,IAAI,CAAC,UACH;EAGF,KAAK,OAAO;EAEZ,IAAI;GACF,MAAM,SAAS,QAAQ;EACzB,QAAQ,CAER,UAAU;GACR,KAAK,OAAO;EACd;CACF;AACF;;AAGA,SAAS,iBAAuB;CAC9B,QAAQ,KAAK,QAAQ,KAAK,QAAQ;AACpC;;AAWA,MAAa,qBAAqB,IAAI,mBAAmB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FileManager } from "./file-manager.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../core/src/dev-server/special-files-collector.d.ts
|
|
4
4
|
type SpecialFileType = "config" | "main" | "route" | "event" | "locale";
|
|
5
5
|
/**
|
|
6
6
|
* Categorises files into the kinds the dev server treats specially
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"special-files-collector.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"special-files-collector.d.mts","names":[],"sources":["../../../../../../../core/src/dev-server/special-files-collector.ts"],"mappings":";;;KAEY,eAAA;;AAAZ;;;cAMa,qBAAA;EAAA,iBACM,OAAA;EAQV,OAAA,CAAQ,KAAA,EAAO,GAAA,SAAY,WAAA;EAO3B,OAAA,CAAQ,WAAA,EAAa,WAAA;EAIrB,UAAA,CAAW,YAAA;EAIX,UAAA,CAAW,WAAA,EAAa,WAAA;EAKxB,WAAA,CAAY,YAAA,WAAuB,eAAA;EAUnC,cAAA,CAAe,IAAA,EAAM,eAAA,GAAkB,WAAA;EAUvC,QAAA,IAAY,MAAA,CAAO,eAAA;EAUnB,KAAA;EAAA,QAIC,UAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region ../core/src/dev-server/special-files-collector.ts
|
|
2
2
|
/**
|
|
3
3
|
* Categorises files into the kinds the dev server treats specially
|
|
4
4
|
* (config / main / route / event / locale) and exposes typed accessors.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"special-files-collector.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"special-files-collector.mjs","names":[],"sources":["../../../../../../../core/src/dev-server/special-files-collector.ts"],"sourcesContent":["import { FileManager } from \"./file-manager\";\r\n\r\nexport type SpecialFileType = \"config\" | \"main\" | \"route\" | \"event\" | \"locale\";\r\n\r\n/**\r\n * Categorises files into the kinds the dev server treats specially\r\n * (config / main / route / event / locale) and exposes typed accessors.\r\n */\r\nexport class SpecialFilesCollector {\r\n private readonly buckets: Record<SpecialFileType, Map<string, FileManager>> = {\r\n config: new Map(),\r\n main: new Map(),\r\n route: new Map(),\r\n event: new Map(),\r\n locale: new Map(),\r\n };\r\n\r\n public collect(files: Map<string, FileManager>): void {\r\n for (const bucket of Object.values(this.buckets)) bucket.clear();\r\n for (const [relativePath, fileManager] of files) {\r\n this.categorise(relativePath, fileManager);\r\n }\r\n }\r\n\r\n public addFile(fileManager: FileManager): void {\r\n this.categorise(fileManager.relativePath, fileManager);\r\n }\r\n\r\n public removeFile(relativePath: string): void {\r\n for (const bucket of Object.values(this.buckets)) bucket.delete(relativePath);\r\n }\r\n\r\n public updateFile(fileManager: FileManager): void {\r\n this.removeFile(fileManager.relativePath);\r\n this.categorise(fileManager.relativePath, fileManager);\r\n }\r\n\r\n public getFileType(relativePath: string): SpecialFileType | null {\r\n for (const [type, bucket] of Object.entries(this.buckets) as [\r\n SpecialFileType,\r\n Map<string, FileManager>,\r\n ][]) {\r\n if (bucket.has(relativePath)) return type;\r\n }\r\n return null;\r\n }\r\n\r\n public getFilesByType(type: SpecialFileType): FileManager[] {\r\n const files = Array.from(this.buckets[type].values());\r\n // Routes are loaded sequentially in alphabetical order so registration\r\n // is deterministic across runs.\r\n if (type === \"route\") {\r\n files.sort((a, b) => a.relativePath.localeCompare(b.relativePath));\r\n }\r\n return files;\r\n }\r\n\r\n public getStats(): Record<SpecialFileType, number> {\r\n return {\r\n config: this.buckets.config.size,\r\n main: this.buckets.main.size,\r\n route: this.buckets.route.size,\r\n event: this.buckets.event.size,\r\n locale: this.buckets.locale.size,\r\n };\r\n }\r\n\r\n public clear(): void {\r\n for (const bucket of Object.values(this.buckets)) bucket.clear();\r\n }\r\n\r\n private categorise(relativePath: string, fileManager: FileManager): void {\r\n if (isConfigFile(relativePath)) {\r\n this.buckets.config.set(relativePath, fileManager);\r\n } else if (isMainFile(relativePath)) {\r\n this.buckets.main.set(relativePath, fileManager);\r\n } else if (isRouteFile(relativePath)) {\r\n this.buckets.route.set(relativePath, fileManager);\r\n } else if (isEventFile(relativePath)) {\r\n this.buckets.event.set(relativePath, fileManager);\r\n } else if (isLocaleFile(relativePath)) {\r\n this.buckets.locale.set(relativePath, fileManager);\r\n }\r\n }\r\n}\r\n\r\nconst isConfigFile = (path: string) => /^src\\/config\\/.*\\.(ts|tsx)$/.test(path);\r\nconst isMainFile = (path: string) =>\r\n /^src\\/app\\/[^/]+\\/main\\.(ts|tsx)$/.test(path) ||\r\n path === \"src/app/main.ts\" ||\r\n path === \"src/app/main.tsx\";\r\nconst isRouteFile = (path: string) => /^src\\/app\\/[^/]+\\/routes\\.(ts|tsx)$/.test(path);\r\nconst isEventFile = (path: string) => /^src\\/app\\/[^/]+\\/events\\/[^/]+\\.(ts|tsx)$/.test(path);\r\nconst isLocaleFile = (path: string) => /^src\\/app\\/[^/]+\\/utils\\/locales\\.(ts|tsx)$/.test(path);\r\n"],"mappings":";;;;;AAQA,IAAa,wBAAb,MAAmC;;iBAC6C;GAC5E,wBAAQ,IAAI,IAAI;GAChB,sBAAM,IAAI,IAAI;GACd,uBAAO,IAAI,IAAI;GACf,uBAAO,IAAI,IAAI;GACf,wBAAQ,IAAI,IAAI;EAClB;;CAEA,AAAO,QAAQ,OAAuC;EACpD,KAAK,MAAM,UAAU,OAAO,OAAO,KAAK,OAAO,GAAG,OAAO,MAAM;EAC/D,KAAK,MAAM,CAAC,cAAc,gBAAgB,OACxC,KAAK,WAAW,cAAc,WAAW;CAE7C;CAEA,AAAO,QAAQ,aAAgC;EAC7C,KAAK,WAAW,YAAY,cAAc,WAAW;CACvD;CAEA,AAAO,WAAW,cAA4B;EAC5C,KAAK,MAAM,UAAU,OAAO,OAAO,KAAK,OAAO,GAAG,OAAO,OAAO,YAAY;CAC9E;CAEA,AAAO,WAAW,aAAgC;EAChD,KAAK,WAAW,YAAY,YAAY;EACxC,KAAK,WAAW,YAAY,cAAc,WAAW;CACvD;CAEA,AAAO,YAAY,cAA8C;EAC/D,KAAK,MAAM,CAAC,MAAM,WAAW,OAAO,QAAQ,KAAK,OAAO,GAItD,IAAI,OAAO,IAAI,YAAY,GAAG,OAAO;EAEvC,OAAO;CACT;CAEA,AAAO,eAAe,MAAsC;EAC1D,MAAM,QAAQ,MAAM,KAAK,KAAK,QAAQ,KAAK,CAAC,OAAO,CAAC;EAGpD,IAAI,SAAS,SACX,MAAM,MAAM,GAAG,MAAM,EAAE,aAAa,cAAc,EAAE,YAAY,CAAC;EAEnE,OAAO;CACT;CAEA,AAAO,WAA4C;EACjD,OAAO;GACL,QAAQ,KAAK,QAAQ,OAAO;GAC5B,MAAM,KAAK,QAAQ,KAAK;GACxB,OAAO,KAAK,QAAQ,MAAM;GAC1B,OAAO,KAAK,QAAQ,MAAM;GAC1B,QAAQ,KAAK,QAAQ,OAAO;EAC9B;CACF;CAEA,AAAO,QAAc;EACnB,KAAK,MAAM,UAAU,OAAO,OAAO,KAAK,OAAO,GAAG,OAAO,MAAM;CACjE;CAEA,AAAQ,WAAW,cAAsB,aAAgC;EACvE,IAAI,aAAa,YAAY,GAC3B,KAAK,QAAQ,OAAO,IAAI,cAAc,WAAW;OAC5C,IAAI,WAAW,YAAY,GAChC,KAAK,QAAQ,KAAK,IAAI,cAAc,WAAW;OAC1C,IAAI,YAAY,YAAY,GACjC,KAAK,QAAQ,MAAM,IAAI,cAAc,WAAW;OAC3C,IAAI,YAAY,YAAY,GACjC,KAAK,QAAQ,MAAM,IAAI,cAAc,WAAW;OAC3C,IAAI,aAAa,YAAY,GAClC,KAAK,QAAQ,OAAO,IAAI,cAAc,WAAW;CAErD;AACF;AAEA,MAAM,gBAAgB,SAAiB,8BAA8B,KAAK,IAAI;AAC9E,MAAM,cAAc,SAClB,oCAAoC,KAAK,IAAI,KAC7C,SAAS,qBACT,SAAS;AACX,MAAM,eAAe,SAAiB,sCAAsC,KAAK,IAAI;AACrF,MAAM,eAAe,SAAiB,6CAA6C,KAAK,IAAI;AAC5F,MAAM,gBAAgB,SAAiB,8CAA8C,KAAK,IAAI"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { devLogError, devServeLog } from "./dev-logger.mjs";
|
|
2
2
|
import { DevelopmentServer } from "./development-server.mjs";
|
|
3
|
+
import { registerDevShortcuts } from "./register-dev-shortcuts.mjs";
|
|
3
4
|
import { colors } from "@mongez/copper";
|
|
4
5
|
|
|
5
|
-
//#region
|
|
6
|
+
//#region ../core/src/dev-server/start-development-server.ts
|
|
6
7
|
let handlersRegistered = false;
|
|
7
8
|
/**
|
|
8
9
|
* Start the development server.
|
|
@@ -25,6 +26,7 @@ async function startDevelopmentServer(options = {}) {
|
|
|
25
26
|
await safeShutdown(devServer);
|
|
26
27
|
process.exit(1);
|
|
27
28
|
}
|
|
29
|
+
registerDevShortcuts(devServer);
|
|
28
30
|
return devServer;
|
|
29
31
|
}
|
|
30
32
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-development-server.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"start-development-server.mjs","names":[],"sources":["../../../../../../../core/src/dev-server/start-development-server.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\nimport { devLogError, devServeLog } from \"./dev-logger\";\nimport { DevelopmentServer } from \"./development-server\";\nimport { registerDevShortcuts } from \"./register-dev-shortcuts\";\n\nlet handlersRegistered = false;\n\n/**\n * Options accepted by `startDevelopmentServer`. CLI flags translate to\n * these; programmatic callers (tests, scripts) can pass them directly.\n *\n * `undefined` for any field means \"fall through to `warlock.config.ts >\n * devServer.*` defaults.\" Pass an explicit value only to override.\n */\nexport type StartDevServerOptions = {\n /**\n * Delete `.warlock/manifest.json` before starting — forces every file\n * to be re-parsed from disk instead of restored from the cached graph.\n */\n fresh?: boolean;\n /** Run background type generation. Default from devServer config (true). */\n generateTypings?: boolean;\n /** Run file health checkers. Default from devServer config (true). */\n healthCheckers?: boolean;\n};\n\n/**\n * Start the development server.\n *\n * Boots the file orchestrator, loads app modules, starts late-phase\n * connectors, then wires graceful shutdown for SIGINT/SIGTERM (plus\n * SIGHUP on Windows where Ctrl+C in spawned children lands as SIGHUP).\n *\n * If startup throws, shuts down cleanly and exits 1 — dev should die\n * loudly rather than hang with a half-initialized state.\n */\nexport async function startDevelopmentServer(\n options: StartDevServerOptions = {},\n): Promise<DevelopmentServer> {\n // V8 honours inline source maps embedded by the transpile cache (and\n // tsx's own maps in passthrough mode), so thrown-error stack frames point\n // at the original `src/**.ts` line/column instead of transpiled output.\n process.setSourceMapsEnabled(true);\n\n const devServer = new DevelopmentServer(options);\n\n registerShutdownHandlers(devServer);\n\n try {\n await devServer.start();\n } catch (error) {\n devLogError(`Failed to start Development Server: ${(error as Error).message}`);\n await safeShutdown(devServer);\n process.exit(1);\n }\n\n // Only once the server is actually up — a half-started process has nothing\n // worth restarting, and taking raw mode before then would swallow the\n // Ctrl+C of a developer trying to escape a slow boot.\n registerDevShortcuts(devServer);\n\n return devServer;\n}\n\n/**\n * Register signal handlers once per process. Guards against handler\n * accumulation if `startDevelopmentServer` is invoked more than once\n * (tests, programmatic restart).\n */\nfunction registerShutdownHandlers(devServer: DevelopmentServer): void {\n if (handlersRegistered) return;\n handlersRegistered = true;\n\n const onSignal = (signal: NodeJS.Signals) => async () => {\n devServeLog(colors.yellow(`📡 Received ${signal}`));\n const ok = await safeShutdown(devServer);\n process.exit(ok ? 0 : 1);\n };\n\n process.on(\"SIGINT\", onSignal(\"SIGINT\"));\n process.on(\"SIGTERM\", onSignal(\"SIGTERM\"));\n // Ctrl+C in spawned Windows children lands as SIGHUP, not SIGINT.\n if (process.platform === \"win32\") {\n process.on(\"SIGHUP\", onSignal(\"SIGHUP\"));\n }\n}\n\n/**\n * Shut down the dev server without swallowing async errors. Returns\n * whether shutdown completed cleanly so the caller picks the exit code.\n */\nasync function safeShutdown(devServer: DevelopmentServer): Promise<boolean> {\n try {\n await devServer.shutdown();\n return true;\n } catch (error) {\n devLogError(`Shutdown failed: ${(error as Error).message}`);\n return false;\n }\n}\n"],"mappings":";;;;;;AAKA,IAAI,qBAAqB;;;;;;;;;;;AA+BzB,eAAsB,uBACpB,UAAiC,CAAC,GACN;CAI5B,QAAQ,qBAAqB,IAAI;CAEjC,MAAM,YAAY,IAAI,kBAAkB,OAAO;CAE/C,yBAAyB,SAAS;CAElC,IAAI;EACF,MAAM,UAAU,MAAM;CACxB,SAAS,OAAO;EACd,YAAY,uCAAwC,MAAgB,SAAS;EAC7E,MAAM,aAAa,SAAS;EAC5B,QAAQ,KAAK,CAAC;CAChB;CAKA,qBAAqB,SAAS;CAE9B,OAAO;AACT;;;;;;AAOA,SAAS,yBAAyB,WAAoC;CACpE,IAAI,oBAAoB;CACxB,qBAAqB;CAErB,MAAM,YAAY,WAA2B,YAAY;EACvD,YAAY,OAAO,OAAO,eAAe,QAAQ,CAAC;EAClD,MAAM,KAAK,MAAM,aAAa,SAAS;EACvC,QAAQ,KAAK,KAAK,IAAI,CAAC;CACzB;CAEA,QAAQ,GAAG,UAAU,SAAS,QAAQ,CAAC;CACvC,QAAQ,GAAG,WAAW,SAAS,SAAS,CAAC;CAEzC,IAAI,QAAQ,aAAa,SACvB,QAAQ,GAAG,UAAU,SAAS,QAAQ,CAAC;AAE3C;;;;;AAMA,eAAe,aAAa,WAAgD;CAC1E,IAAI;EACF,MAAM,UAAU,SAAS;EACzB,OAAO;CACT,SAAS,OAAO;EACd,YAAY,oBAAqB,MAAgB,SAAS;EAC1D,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { devLogError, devLogWarn } from "./dev-logger.mjs";
|
|
2
|
+
import { spawn } from "node:child_process";
|
|
3
|
+
|
|
4
|
+
//#region ../core/src/dev-server/supervisor.ts
|
|
5
|
+
/**
|
|
6
|
+
* Set on the worker process so it knows it was launched by a supervisor —
|
|
7
|
+
* and so `warlock dev` inside the worker runs the server instead of
|
|
8
|
+
* supervising a third process.
|
|
9
|
+
*/
|
|
10
|
+
const WORKER_ENV_FLAG = "WARLOCK_DEV_WORKER";
|
|
11
|
+
/**
|
|
12
|
+
* Exit code a worker uses to ask for a fresh process. Chosen as EX_TEMPFAIL,
|
|
13
|
+
* whose conventional meaning ("temporary failure, retry") is close enough that
|
|
14
|
+
* a stray supervisor-less exit reads sensibly in a shell.
|
|
15
|
+
*/
|
|
16
|
+
const RESTART_EXIT_CODE = 75;
|
|
17
|
+
/** Signals the supervisor must hand to the worker rather than act on itself. */
|
|
18
|
+
const FORWARDED_SIGNALS = ["SIGTERM", "SIGHUP"];
|
|
19
|
+
/**
|
|
20
|
+
* How long a worker must survive before an abnormal exit counts as a crash
|
|
21
|
+
* worth recovering from rather than a failed boot worth reporting once.
|
|
22
|
+
*/
|
|
23
|
+
const HEALTHY_UPTIME_MS = 5e3;
|
|
24
|
+
/** Crashes allowed inside {@link CRASH_WINDOW_MS} before we stop restarting. */
|
|
25
|
+
const CRASH_RESTART_LIMIT = 3;
|
|
26
|
+
/** The rolling window flapping is measured over. */
|
|
27
|
+
const CRASH_WINDOW_MS = 6e4;
|
|
28
|
+
/** Whether this process is the worker (i.e. a supervisor already exists). */
|
|
29
|
+
function isDevWorker() {
|
|
30
|
+
return process.env[WORKER_ENV_FLAG] === "1";
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Run `warlock dev` as a supervised pair: a thin parent that owns the terminal
|
|
34
|
+
* and a disposable child that is the actual dev server.
|
|
35
|
+
*
|
|
36
|
+
* The child asks to be replaced by exiting {@link RESTART_EXIT_CODE}; the
|
|
37
|
+
* supervisor spawns a fresh one in its place. Because the parent is never
|
|
38
|
+
* itself replaced, the process tree stays exactly two deep no matter how many
|
|
39
|
+
* restarts happen — the previous design re-exec'd itself and left one idle
|
|
40
|
+
* waiter behind per restart.
|
|
41
|
+
*
|
|
42
|
+
* The supervisor deliberately loads no config, no connectors, and no
|
|
43
|
+
* application code, so a worker that wedges or dies can always be replaced by
|
|
44
|
+
* a process that is known-good.
|
|
45
|
+
*
|
|
46
|
+
* Never resolves: the returned promise is a deliberate dead end so callers can
|
|
47
|
+
* `return` it to stop everything downstream (notably the command's preloaders,
|
|
48
|
+
* which must only ever run in the worker). The process ends with the last
|
|
49
|
+
* worker, not with this promise.
|
|
50
|
+
*/
|
|
51
|
+
function superviseDevServer(now = Date.now) {
|
|
52
|
+
let worker;
|
|
53
|
+
let shuttingDown = false;
|
|
54
|
+
let startedAt = 0;
|
|
55
|
+
/** Timestamps of recent crash-restarts, used to detect flapping. */
|
|
56
|
+
let crashes = [];
|
|
57
|
+
const spawnWorker = () => {
|
|
58
|
+
startedAt = now();
|
|
59
|
+
worker = spawn(process.execPath, [...process.execArgv, ...process.argv.slice(1)], {
|
|
60
|
+
cwd: process.cwd(),
|
|
61
|
+
env: {
|
|
62
|
+
...process.env,
|
|
63
|
+
[WORKER_ENV_FLAG]: "1"
|
|
64
|
+
},
|
|
65
|
+
stdio: "inherit",
|
|
66
|
+
windowsHide: false
|
|
67
|
+
});
|
|
68
|
+
worker.on("error", (error) => {
|
|
69
|
+
shuttingDown = true;
|
|
70
|
+
devLogError(`Could not start the development server: ${error.message}`);
|
|
71
|
+
process.exit(1);
|
|
72
|
+
});
|
|
73
|
+
worker.on("exit", (code, signal) => {
|
|
74
|
+
releaseTerminal();
|
|
75
|
+
if (shuttingDown) {
|
|
76
|
+
process.exit(signal ? 1 : code ?? 0);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (code === 75) {
|
|
80
|
+
spawnWorker();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if ((signal !== null || (code ?? 0) !== 0) && shouldRecoverFromCrash(now() - startedAt)) {
|
|
84
|
+
devLogWarn(`Development server ${signal ? `was killed by ${signal}` : `exited with code ${code}`} — restarting.`);
|
|
85
|
+
spawnWorker();
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
process.exit(signal ? 1 : code ?? 0);
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Whether a worker that died on its own should be replaced.
|
|
93
|
+
*
|
|
94
|
+
* The rule is minimum healthy uptime, not a bare retry count. A worker that
|
|
95
|
+
* dies almost immediately failed to *boot* — a broken config, a port already
|
|
96
|
+
* taken — and it has already printed why; respawning would just reprint the
|
|
97
|
+
* same error and bury it. A worker that ran fine for a while and then died
|
|
98
|
+
* (OOM, a native crash, a dead loader thread) is the case worth recovering,
|
|
99
|
+
* because the state that killed it is usually not reproduced on a fresh boot.
|
|
100
|
+
*
|
|
101
|
+
* Flapping is still capped: enough crashes inside one window and we stop and
|
|
102
|
+
* say so, rather than restarting forever behind the developer's back.
|
|
103
|
+
*/
|
|
104
|
+
function shouldRecoverFromCrash(uptimeMs) {
|
|
105
|
+
if (uptimeMs < HEALTHY_UPTIME_MS) return false;
|
|
106
|
+
const at = now();
|
|
107
|
+
crashes = [...crashes.filter((time) => at - time < CRASH_WINDOW_MS), at];
|
|
108
|
+
if (crashes.length > CRASH_RESTART_LIMIT) {
|
|
109
|
+
devLogError(`Development server crashed ${crashes.length} times in ${Math.round(CRASH_WINDOW_MS / 1e3)}s — not restarting again. Fix the cause and run \`warlock dev\` when you're ready.`);
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
process.on("SIGINT", () => {
|
|
115
|
+
shuttingDown = true;
|
|
116
|
+
});
|
|
117
|
+
for (const signal of FORWARDED_SIGNALS) process.on(signal, () => {
|
|
118
|
+
shuttingDown = true;
|
|
119
|
+
worker?.kill(signal);
|
|
120
|
+
});
|
|
121
|
+
spawnWorker();
|
|
122
|
+
return new Promise(() => {});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Put the shared TTY back into a sane state after a worker exits.
|
|
126
|
+
*
|
|
127
|
+
* The worker takes stdin into raw mode for its keyboard shortcuts and releases
|
|
128
|
+
* it on shutdown — but a worker that was killed outright never got the chance,
|
|
129
|
+
* and the mode belongs to the terminal, not the process that set it. Without
|
|
130
|
+
* this, the next worker (or the user's shell) inherits a stdin with no line
|
|
131
|
+
* editing and no Ctrl+C.
|
|
132
|
+
*/
|
|
133
|
+
function releaseTerminal() {
|
|
134
|
+
try {
|
|
135
|
+
if (process.stdin.isTTY) process.stdin.setRawMode(false);
|
|
136
|
+
} catch {}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
//#endregion
|
|
140
|
+
export { isDevWorker, superviseDevServer };
|
|
141
|
+
//# sourceMappingURL=supervisor.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supervisor.mjs","names":[],"sources":["../../../../../../../core/src/dev-server/supervisor.ts"],"sourcesContent":["import { spawn, type ChildProcess } from \"node:child_process\";\nimport { devLogError, devLogWarn } from \"./dev-logger\";\n\n/**\n * Set on the worker process so it knows it was launched by a supervisor —\n * and so `warlock dev` inside the worker runs the server instead of\n * supervising a third process.\n */\nexport const WORKER_ENV_FLAG = \"WARLOCK_DEV_WORKER\";\n\n/**\n * Exit code a worker uses to ask for a fresh process. Chosen as EX_TEMPFAIL,\n * whose conventional meaning (\"temporary failure, retry\") is close enough that\n * a stray supervisor-less exit reads sensibly in a shell.\n */\nexport const RESTART_EXIT_CODE = 75;\n\n/** Signals the supervisor must hand to the worker rather than act on itself. */\nconst FORWARDED_SIGNALS: NodeJS.Signals[] = [\"SIGTERM\", \"SIGHUP\"];\n\n/**\n * How long a worker must survive before an abnormal exit counts as a crash\n * worth recovering from rather than a failed boot worth reporting once.\n */\nconst HEALTHY_UPTIME_MS = 5_000;\n\n/** Crashes allowed inside {@link CRASH_WINDOW_MS} before we stop restarting. */\nconst CRASH_RESTART_LIMIT = 3;\n\n/** The rolling window flapping is measured over. */\nconst CRASH_WINDOW_MS = 60_000;\n\n/** Whether this process is the worker (i.e. a supervisor already exists). */\nexport function isDevWorker(): boolean {\n return process.env[WORKER_ENV_FLAG] === \"1\";\n}\n\n/**\n * Run `warlock dev` as a supervised pair: a thin parent that owns the terminal\n * and a disposable child that is the actual dev server.\n *\n * The child asks to be replaced by exiting {@link RESTART_EXIT_CODE}; the\n * supervisor spawns a fresh one in its place. Because the parent is never\n * itself replaced, the process tree stays exactly two deep no matter how many\n * restarts happen — the previous design re-exec'd itself and left one idle\n * waiter behind per restart.\n *\n * The supervisor deliberately loads no config, no connectors, and no\n * application code, so a worker that wedges or dies can always be replaced by\n * a process that is known-good.\n *\n * Never resolves: the returned promise is a deliberate dead end so callers can\n * `return` it to stop everything downstream (notably the command's preloaders,\n * which must only ever run in the worker). The process ends with the last\n * worker, not with this promise.\n */\nexport function superviseDevServer(now: () => number = Date.now): Promise<never> {\n let worker: ChildProcess | undefined;\n let shuttingDown = false;\n let startedAt = 0;\n\n /** Timestamps of recent crash-restarts, used to detect flapping. */\n let crashes: number[] = [];\n\n const spawnWorker = (): void => {\n startedAt = now();\n\n worker = spawn(process.execPath, [...process.execArgv, ...process.argv.slice(1)], {\n cwd: process.cwd(),\n env: { ...process.env, [WORKER_ENV_FLAG]: \"1\" },\n stdio: \"inherit\",\n windowsHide: false,\n });\n\n worker.on(\"error\", (error) => {\n shuttingDown = true;\n devLogError(`Could not start the development server: ${error.message}`);\n process.exit(1);\n });\n\n worker.on(\"exit\", (code, signal) => {\n releaseTerminal();\n\n // `return` after every exit deliberately: `process.exit` is typed\n // `never`, but treating it as control flow means anything that stubs it\n // out turns \"we are shutting down\" into \"spawn another worker\".\n if (shuttingDown) {\n process.exit(signal ? 1 : (code ?? 0));\n return;\n }\n\n if (code === RESTART_EXIT_CODE) {\n spawnWorker();\n return;\n }\n\n const crashed = signal !== null || (code ?? 0) !== 0;\n\n if (crashed && shouldRecoverFromCrash(now() - startedAt)) {\n devLogWarn(\n `Development server ${signal ? `was killed by ${signal}` : `exited with code ${code}`} — restarting.`,\n );\n spawnWorker();\n return;\n }\n\n // The worker owns its own error reporting; the supervisor only mirrors\n // the outcome so `npm run dev` and CI see the code they expect.\n process.exit(signal ? 1 : (code ?? 0));\n });\n };\n\n /**\n * Whether a worker that died on its own should be replaced.\n *\n * The rule is minimum healthy uptime, not a bare retry count. A worker that\n * dies almost immediately failed to *boot* — a broken config, a port already\n * taken — and it has already printed why; respawning would just reprint the\n * same error and bury it. A worker that ran fine for a while and then died\n * (OOM, a native crash, a dead loader thread) is the case worth recovering,\n * because the state that killed it is usually not reproduced on a fresh boot.\n *\n * Flapping is still capped: enough crashes inside one window and we stop and\n * say so, rather than restarting forever behind the developer's back.\n */\n function shouldRecoverFromCrash(uptimeMs: number): boolean {\n if (uptimeMs < HEALTHY_UPTIME_MS) {\n return false;\n }\n\n const at = now();\n\n crashes = [...crashes.filter((time) => at - time < CRASH_WINDOW_MS), at];\n\n if (crashes.length > CRASH_RESTART_LIMIT) {\n devLogError(\n `Development server crashed ${crashes.length} times in ` +\n `${Math.round(CRASH_WINDOW_MS / 1000)}s — not restarting again. ` +\n `Fix the cause and run \\`warlock dev\\` when you're ready.`,\n );\n return false;\n }\n\n return true;\n }\n\n // SIGINT reaches the worker directly from the terminal (same process group),\n // so the supervisor must NOT act on it — exiting here would orphan a server\n // that is still draining. It only notes that the next exit is final.\n process.on(\"SIGINT\", () => {\n shuttingDown = true;\n });\n\n for (const signal of FORWARDED_SIGNALS) {\n process.on(signal, () => {\n shuttingDown = true;\n worker?.kill(signal);\n });\n }\n\n spawnWorker();\n\n return new Promise<never>(() => {\n // Intentionally never settles — see the doc comment.\n });\n}\n\n/**\n * Put the shared TTY back into a sane state after a worker exits.\n *\n * The worker takes stdin into raw mode for its keyboard shortcuts and releases\n * it on shutdown — but a worker that was killed outright never got the chance,\n * and the mode belongs to the terminal, not the process that set it. Without\n * this, the next worker (or the user's shell) inherits a stdin with no line\n * editing and no Ctrl+C.\n */\nfunction releaseTerminal(): void {\n try {\n if (process.stdin.isTTY) {\n process.stdin.setRawMode(false);\n }\n } catch {\n // Nothing to recover if the terminal is already gone.\n }\n}\n"],"mappings":";;;;;;;;;AAQA,MAAa,kBAAkB;;;;;;AAO/B,MAAa,oBAAoB;;AAGjC,MAAM,oBAAsC,CAAC,WAAW,QAAQ;;;;;AAMhE,MAAM,oBAAoB;;AAG1B,MAAM,sBAAsB;;AAG5B,MAAM,kBAAkB;;AAGxB,SAAgB,cAAuB;CACrC,OAAO,QAAQ,IAAI,qBAAqB;AAC1C;;;;;;;;;;;;;;;;;;;;AAqBA,SAAgB,mBAAmB,MAAoB,KAAK,KAAqB;CAC/E,IAAI;CACJ,IAAI,eAAe;CACnB,IAAI,YAAY;;CAGhB,IAAI,UAAoB,CAAC;CAEzB,MAAM,oBAA0B;EAC9B,YAAY,IAAI;EAEhB,SAAS,MAAM,QAAQ,UAAU,CAAC,GAAG,QAAQ,UAAU,GAAG,QAAQ,KAAK,MAAM,CAAC,CAAC,GAAG;GAChF,KAAK,QAAQ,IAAI;GACjB,KAAK;IAAE,GAAG,QAAQ;KAAM,kBAAkB;GAAI;GAC9C,OAAO;GACP,aAAa;EACf,CAAC;EAED,OAAO,GAAG,UAAU,UAAU;GAC5B,eAAe;GACf,YAAY,2CAA2C,MAAM,SAAS;GACtE,QAAQ,KAAK,CAAC;EAChB,CAAC;EAED,OAAO,GAAG,SAAS,MAAM,WAAW;GAClC,gBAAgB;GAKhB,IAAI,cAAc;IAChB,QAAQ,KAAK,SAAS,IAAK,QAAQ,CAAE;IACrC;GACF;GAEA,IAAI,aAA4B;IAC9B,YAAY;IACZ;GACF;GAIA,KAFgB,WAAW,SAAS,QAAQ,OAAO,MAEpC,uBAAuB,IAAI,IAAI,SAAS,GAAG;IACxD,WACE,sBAAsB,SAAS,iBAAiB,WAAW,oBAAoB,OAAO,eACxF;IACA,YAAY;IACZ;GACF;GAIA,QAAQ,KAAK,SAAS,IAAK,QAAQ,CAAE;EACvC,CAAC;CACH;;;;;;;;;;;;;;CAeA,SAAS,uBAAuB,UAA2B;EACzD,IAAI,WAAW,mBACb,OAAO;EAGT,MAAM,KAAK,IAAI;EAEf,UAAU,CAAC,GAAG,QAAQ,QAAQ,SAAS,KAAK,OAAO,eAAe,GAAG,EAAE;EAEvE,IAAI,QAAQ,SAAS,qBAAqB;GACxC,YACE,8BAA8B,QAAQ,OAAO,YACxC,KAAK,MAAM,kBAAkB,GAAI,EAAE,mFAE1C;GACA,OAAO;EACT;EAEA,OAAO;CACT;CAKA,QAAQ,GAAG,gBAAgB;EACzB,eAAe;CACjB,CAAC;CAED,KAAK,MAAM,UAAU,mBACnB,QAAQ,GAAG,cAAc;EACvB,eAAe;EACf,QAAQ,KAAK,MAAM;CACrB,CAAC;CAGH,YAAY;CAEZ,OAAO,IAAI,cAAqB,CAEhC,CAAC;AACH;;;;;;;;;;AAWA,SAAS,kBAAwB;CAC/B,IAAI;EACF,IAAI,QAAQ,MAAM,OAChB,QAAQ,MAAM,WAAW,KAAK;CAElC,QAAQ,CAER;AACF"}
|
|
@@ -2,7 +2,7 @@ import { Path } from "./path.mjs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import ts from "typescript";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../core/src/dev-server/tsconfig-manager.ts
|
|
6
6
|
var TSConfigManager = class {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.aliases = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsconfig-manager.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"tsconfig-manager.mjs","names":[],"sources":["../../../../../../../core/src/dev-server/tsconfig-manager.ts"],"sourcesContent":["import path from \"node:path\";\nimport ts from \"typescript\";\nimport { Path } from \"./path\";\n\nexport class TSConfigManager {\n /**\n * Aliases list (from tsconfig paths)\n */\n public aliases: Record<string, string[]> = {};\n\n /**\n * Base URL for resolving paths\n */\n public baseUrl: string = \".\";\n\n /**\n * TSConfig\n */\n public tsconfig: any;\n\n public init() {\n if (this.tsconfig) return;\n\n // use typescript to load the tsconfig.json file\n const output = ts.readConfigFile(Path.toAbsolute(\"tsconfig.json\"), ts.sys.readFile);\n\n this.tsconfig = output.config!;\n\n this.aliases = output.config?.compilerOptions?.paths || {};\n\n this.baseUrl = output.config?.compilerOptions?.baseUrl || \".\";\n }\n\n /**\n * Check if the given path is an alias\n * This checks if it's a REAL path alias (not an external package alias)\n *\n * Real aliases map to local paths (e.g., app/* -> src/app/*, src/* -> src/*)\n * External package aliases map to themselves with @ prefix (e.g., @warlock.js/core -> @warlock.js/core)\n */\n public isAlias(path: string) {\n if (!this.tsconfig) {\n this.init();\n }\n\n return Object.keys(this.aliases).some((alias) => {\n // Remove /* from alias pattern for matching\n const aliasPattern = alias.replace(\"/*\", \"\");\n\n if (!path.startsWith(aliasPattern)) {\n return false;\n }\n\n // Check if this is a real alias or just an external package mapping\n const aliasTargets = this.aliases[alias];\n if (!Array.isArray(aliasTargets) || aliasTargets.length === 0) {\n return false;\n }\n\n // If the alias starts with @, it's likely an external package alias\n // Example: \"@warlock.js/core\" -> \"@warlock.js/core\" (external package)\n if (aliasPattern.startsWith(\"@\")) {\n return false;\n }\n\n // Otherwise, it's a real path alias (including self-referencing ones like src/* -> src/*)\n // Example: \"app/*\" -> \"src/app/*\" (real alias)\n // Example: \"src/*\" -> \"src/*\" (self-referencing alias, still valid)\n return true;\n });\n }\n\n /**\n * Get the alias key that matches the given import path\n */\n public getMatchingAlias(path: string): string | null {\n const aliasKey = Object.keys(this.aliases).find((alias) => {\n const aliasPattern = alias.replace(\"/*\", \"\");\n return path.startsWith(aliasPattern);\n });\n\n return aliasKey || null;\n }\n\n /**\n * Resolve an alias import path to a relative path based on tsconfig paths\n * Example: \"app/users/services/get-users.service\" -> \"src/app/users/services/get-users.service\"\n *\n * @param path - The import path with alias (e.g., \"app/users/services/get-users.service\")\n * @returns The resolved relative path or null if alias not found\n */\n public resolveAliasPath(checkingPath: string): string | null {\n // Find matching alias from tsconfig paths\n const aliasKey = this.getMatchingAlias(checkingPath);\n\n if (!aliasKey) return null;\n\n const aliasTargets = this.aliases[aliasKey];\n if (!Array.isArray(aliasTargets) || aliasTargets.length === 0) {\n return null;\n }\n\n // Get the first target path (usually there's only one)\n const targetPattern = aliasTargets[0];\n\n // Replace alias pattern with target pattern\n const aliasPattern = aliasKey.replace(\"/*\", \"\");\n const targetBase = targetPattern.replace(\"/*\", \"\");\n // Remove any leading slash so path.join does not drop the base\n const relativePart = checkingPath.substring(aliasPattern.length).replace(/^[/\\\\]/, \"\");\n\n // Join the target base with the relative part\n const resolvedPath = path.join(targetBase, relativePart);\n\n return Path.normalize(resolvedPath);\n }\n\n /**\n * Resolve an alias import path to an absolute path\n * Example: \"app/users/services/get-users.service\" -> \"/absolute/path/to/src/app/users/services/get-users.service\"\n *\n * @param path - The import path with alias\n * @returns The resolved absolute path or null if alias not found\n */\n public resolveAliasToAbsolute(path: string): string | null {\n const relativePath = this.resolveAliasPath(path);\n\n if (!relativePath) return null;\n\n return Path.normalize(Path.toAbsolute(relativePath));\n }\n}\n\nexport const tsconfigManager = new TSConfigManager();\n"],"mappings":";;;;;AAIA,IAAa,kBAAb,MAA6B;;iBAIgB,CAAC;iBAKnB;;CAOzB,AAAO,OAAO;EACZ,IAAI,KAAK,UAAU;EAGnB,MAAM,SAAS,GAAG,eAAe,KAAK,WAAW,eAAe,GAAG,GAAG,IAAI,QAAQ;EAElF,KAAK,WAAW,OAAO;EAEvB,KAAK,UAAU,OAAO,QAAQ,iBAAiB,SAAS,CAAC;EAEzD,KAAK,UAAU,OAAO,QAAQ,iBAAiB,WAAW;CAC5D;;;;;;;;CASA,AAAO,QAAQ,MAAc;EAC3B,IAAI,CAAC,KAAK,UACR,KAAK,KAAK;EAGZ,OAAO,OAAO,KAAK,KAAK,OAAO,CAAC,CAAC,MAAM,UAAU;GAE/C,MAAM,eAAe,MAAM,QAAQ,MAAM,EAAE;GAE3C,IAAI,CAAC,KAAK,WAAW,YAAY,GAC/B,OAAO;GAIT,MAAM,eAAe,KAAK,QAAQ;GAClC,IAAI,CAAC,MAAM,QAAQ,YAAY,KAAK,aAAa,WAAW,GAC1D,OAAO;GAKT,IAAI,aAAa,WAAW,GAAG,GAC7B,OAAO;GAMT,OAAO;EACT,CAAC;CACH;;;;CAKA,AAAO,iBAAiB,MAA6B;EAMnD,OALiB,OAAO,KAAK,KAAK,OAAO,CAAC,CAAC,MAAM,UAAU;GACzD,MAAM,eAAe,MAAM,QAAQ,MAAM,EAAE;GAC3C,OAAO,KAAK,WAAW,YAAY;EACrC,CAEc,KAAK;CACrB;;;;;;;;CASA,AAAO,iBAAiB,cAAqC;EAE3D,MAAM,WAAW,KAAK,iBAAiB,YAAY;EAEnD,IAAI,CAAC,UAAU,OAAO;EAEtB,MAAM,eAAe,KAAK,QAAQ;EAClC,IAAI,CAAC,MAAM,QAAQ,YAAY,KAAK,aAAa,WAAW,GAC1D,OAAO;EAIT,MAAM,gBAAgB,aAAa;EAGnC,MAAM,eAAe,SAAS,QAAQ,MAAM,EAAE;EAC9C,MAAM,aAAa,cAAc,QAAQ,MAAM,EAAE;EAEjD,MAAM,eAAe,aAAa,UAAU,aAAa,MAAM,CAAC,CAAC,QAAQ,UAAU,EAAE;EAGrF,MAAM,eAAe,KAAK,KAAK,YAAY,YAAY;EAEvD,OAAO,KAAK,UAAU,YAAY;CACpC;;;;;;;;CASA,AAAO,uBAAuB,MAA6B;EACzD,MAAM,eAAe,KAAK,iBAAiB,IAAI;EAE/C,IAAI,CAAC,cAAc,OAAO;EAE1B,OAAO,KAAK,UAAU,KAAK,WAAW,YAAY,CAAC;CACrD;AACF;AAEA,MAAa,kBAAkB,IAAI,gBAAgB"}
|
|
@@ -11,7 +11,7 @@ import { access, readFile, writeFile } from "fs/promises";
|
|
|
11
11
|
import ts from "typescript";
|
|
12
12
|
import { spawn } from "child_process";
|
|
13
13
|
|
|
14
|
-
//#region
|
|
14
|
+
//#region ../core/src/dev-server/type-generator.ts
|
|
15
15
|
/**
|
|
16
16
|
* TypeGenerator - Generates TypeScript type definitions from config files
|
|
17
17
|
*
|