@warlock.js/core 5.0.2 → 5.2.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 +190 -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/application/boot-signal.d.mts +1 -1
- package/esm/application/boot-signal.d.mts.map +1 -1
- package/esm/application/boot-signal.mjs +1 -1
- package/esm/application/boot-signal.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-commands.manager.mjs +37 -2
- package/esm/cli/cli-commands.manager.mjs.map +1 -1
- package/esm/cli/cli-commands.utils.mjs +17 -11
- 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 +2 -2
- package/esm/cli/commands/dev-server.command.mjs.map +1 -1
- package/esm/cli/commands/doctor/boot-for-diagnostics.mjs +207 -0
- package/esm/cli/commands/doctor/boot-for-diagnostics.mjs.map +1 -0
- package/esm/cli/commands/doctor/checks/config.check.mjs +6 -3
- package/esm/cli/commands/doctor/checks/config.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/connectors.check.mjs +39 -13
- package/esm/cli/commands/doctor/checks/connectors.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/handler-signature.check.mjs +9 -5
- package/esm/cli/commands/doctor/checks/handler-signature.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/health.check.mjs +78 -12
- package/esm/cli/commands/doctor/checks/health.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/index.mjs +6 -1
- package/esm/cli/commands/doctor/checks/index.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/optional-peers.check.mjs +117 -54
- package/esm/cli/commands/doctor/checks/optional-peers.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/release-hygiene.check.mjs +28 -10
- package/esm/cli/commands/doctor/checks/release-hygiene.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/routes.check.mjs +52 -13
- package/esm/cli/commands/doctor/checks/routes.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/doctor-command.action.mjs +17 -7
- 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 +16 -7
- package/esm/cli/commands/doctor/run-checks.mjs.map +1 -1
- package/esm/cli/commands/doctor.command.mjs +18 -10
- 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/diff-page-routes.mjs +84 -0
- package/esm/cli/commands/routes/diff-page-routes.mjs.map +1 -0
- 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/routes-diff.action.mjs +84 -0
- package/esm/cli/commands/routes/routes-diff.action.mjs.map +1 -0
- package/esm/cli/commands/routes.command.mjs +16 -2
- 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 +9 -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 +1 -1
- 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 +3 -2
- 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/commands/cli-command.d.mts +1 -1
- package/esm/commands/cli-command.d.mts.map +1 -1
- package/esm/commands/cli-command.mjs +1 -1
- package/esm/commands/cli-command.mjs.map +1 -1
- package/esm/commands/types.d.mts +1 -1
- package/esm/commands/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 +2 -2
- 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-setter.d.mts +1 -1
- package/esm/config/config-setter.d.mts.map +1 -1
- package/esm/config/config-setter.mjs +1 -1
- package/esm/config/config-setter.mjs.map +1 -1
- package/esm/config/config-special-handlers.d.mts +2 -2
- 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/locale-configuration.mjs +1 -1
- package/esm/config/locale-configuration.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/assert-no-reserved-connector-names.d.mts +1 -1
- package/esm/connectors/assert-no-reserved-connector-names.d.mts.map +1 -1
- package/esm/connectors/assert-no-reserved-connector-names.mjs +1 -1
- package/esm/connectors/assert-no-reserved-connector-names.mjs.map +1 -1
- package/esm/connectors/assert-unique-connector-names.d.mts +1 -1
- package/esm/connectors/assert-unique-connector-names.d.mts.map +1 -1
- package/esm/connectors/assert-unique-connector-names.mjs +1 -1
- package/esm/connectors/assert-unique-connector-names.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/describe-server-address.mjs +108 -8
- package/esm/connectors/describe-server-address.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 +19 -1
- package/esm/connectors/http-connector.d.mts.map +1 -1
- package/esm/connectors/http-connector.mjs +42 -5
- 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/register-configured-connectors.d.mts +1 -1
- package/esm/connectors/register-configured-connectors.d.mts.map +1 -1
- package/esm/connectors/register-configured-connectors.mjs +1 -1
- package/esm/connectors/register-configured-connectors.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/pending-exit-code.mjs +1 -1
- package/esm/database/pending-exit-code.mjs.map +1 -1
- package/esm/database/resolve-pending-migrations.mjs +1 -1
- package/esm/database/resolve-pending-migrations.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 +2 -2
- 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 +2 -2
- 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 +1 -1
- 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 +2 -5
- package/esm/dev-server/dev-logger.mjs.map +1 -1
- package/esm/dev-server/development-server.mjs +4 -8
- 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.mjs +1 -1
- package/esm/dev-server/files-orchestrator.mjs.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.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.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.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.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 +11 -4
- 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 +13 -4
- 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.mjs +2 -2
- 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/read-config-ast.mjs +1 -1
- package/esm/dev-server/read-config-ast.mjs.map +1 -1
- package/esm/dev-server/ready-block.mjs +62 -0
- package/esm/dev-server/ready-block.mjs.map +1 -0
- package/esm/dev-server/register-dev-shortcuts.mjs +1 -1
- package/esm/dev-server/register-dev-shortcuts.mjs.map +1 -1
- package/esm/dev-server/restart-dev-server.mjs +1 -1
- package/esm/dev-server/restart-dev-server.mjs.map +1 -1
- package/esm/dev-server/run-typings-generation.mjs +1 -1
- package/esm/dev-server/run-typings-generation.mjs.map +1 -1
- package/esm/dev-server/shortcuts.mjs +1 -1
- package/esm/dev-server/shortcuts.mjs.map +1 -1
- 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 +1 -1
- package/esm/dev-server/start-development-server.mjs.map +1 -1
- package/esm/dev-server/supervisor.mjs +10 -7
- package/esm/dev-server/supervisor.mjs.map +1 -1
- 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 +1 -1
- package/esm/dev-server/update-check-cache.mjs.map +1 -1
- 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 +12 -578
- package/esm/generations/add-command.action.mjs.map +1 -1
- package/esm/generations/features/access.feature.mjs +77 -0
- package/esm/generations/features/access.feature.mjs.map +1 -0
- package/esm/generations/features/ai-anthropic.feature.mjs +12 -0
- package/esm/generations/features/ai-anthropic.feature.mjs.map +1 -0
- package/esm/generations/features/ai-bedrock.feature.mjs +12 -0
- package/esm/generations/features/ai-bedrock.feature.mjs.map +1 -0
- package/esm/generations/features/ai-google.feature.mjs +12 -0
- package/esm/generations/features/ai-google.feature.mjs.map +1 -0
- package/esm/generations/features/ai-ollama.feature.mjs +12 -0
- package/esm/generations/features/ai-ollama.feature.mjs.map +1 -0
- package/esm/generations/features/ai-openai.feature.mjs +12 -0
- package/esm/generations/features/ai-openai.feature.mjs.map +1 -0
- package/esm/generations/features/ai-panoptic.feature.mjs +14 -0
- package/esm/generations/features/ai-panoptic.feature.mjs.map +1 -0
- package/esm/generations/features/ai-tools.feature.mjs +14 -0
- package/esm/generations/features/ai-tools.feature.mjs.map +1 -0
- package/esm/generations/features/ai-workspace.feature.mjs +14 -0
- package/esm/generations/features/ai-workspace.feature.mjs.map +1 -0
- package/esm/generations/features/ai.feature.mjs +16 -0
- package/esm/generations/features/ai.feature.mjs.map +1 -0
- package/esm/generations/features/herald.feature.mjs +20 -0
- package/esm/generations/features/herald.feature.mjs.map +1 -0
- package/esm/generations/features/image.feature.mjs +9 -0
- package/esm/generations/features/image.feature.mjs.map +1 -0
- package/esm/generations/features/index.mjs +72 -0
- package/esm/generations/features/index.mjs.map +1 -0
- package/esm/generations/features/mail.feature.mjs +10 -0
- package/esm/generations/features/mail.feature.mjs.map +1 -0
- package/esm/generations/features/mongodb.feature.mjs +9 -0
- package/esm/generations/features/mongodb.feature.mjs.map +1 -0
- package/esm/generations/features/mysql.feature.mjs +9 -0
- package/esm/generations/features/mysql.feature.mjs.map +1 -0
- package/esm/generations/features/notifications.feature.mjs +44 -0
- package/esm/generations/features/notifications.feature.mjs.map +1 -0
- package/esm/generations/features/postgres.feature.mjs +9 -0
- package/esm/generations/features/postgres.feature.mjs.map +1 -0
- package/esm/generations/features/react-email.feature.mjs +70 -0
- package/esm/generations/features/react-email.feature.mjs.map +1 -0
- package/esm/generations/features/react.feature.mjs +16 -0
- package/esm/generations/features/react.feature.mjs.map +1 -0
- package/esm/generations/features/redis.feature.mjs +9 -0
- package/esm/generations/features/redis.feature.mjs.map +1 -0
- package/esm/generations/features/s3.feature.mjs +13 -0
- package/esm/generations/features/s3.feature.mjs.map +1 -0
- package/esm/generations/features/scheduler.feature.mjs +11 -0
- package/esm/generations/features/scheduler.feature.mjs.map +1 -0
- package/esm/generations/features/ses.feature.mjs +9 -0
- package/esm/generations/features/ses.feature.mjs.map +1 -0
- package/esm/generations/features/shadcn.feature.mjs +397 -0
- package/esm/generations/features/shadcn.feature.mjs.map +1 -0
- package/esm/generations/features/shared/link-ai-package-import.mjs +37 -0
- package/esm/generations/features/shared/link-ai-package-import.mjs.map +1 -0
- package/esm/generations/features/shared/migration-timestamp.mjs +17 -0
- package/esm/generations/features/shared/migration-timestamp.mjs.map +1 -0
- package/esm/generations/features/socket.feature.mjs +15 -0
- package/esm/generations/features/socket.feature.mjs.map +1 -0
- package/esm/generations/features/tailwind.feature.mjs +174 -0
- package/esm/generations/features/tailwind.feature.mjs.map +1 -0
- package/esm/generations/features/test.feature.mjs +96 -0
- package/esm/generations/features/test.feature.mjs.map +1 -0
- package/esm/generations/features/types.mjs +14 -0
- package/esm/generations/features/types.mjs.map +1 -0
- package/esm/generations/features/web.feature.mjs +187 -0
- package/esm/generations/features/web.feature.mjs.map +1 -0
- package/esm/generations/stubs.mjs +238 -10
- package/esm/generations/stubs.mjs.map +1 -1
- package/esm/http/boot-port-preflight.d.mts +46 -0
- package/esm/http/boot-port-preflight.d.mts.map +1 -0
- package/esm/http/boot-port-preflight.mjs +87 -0
- package/esm/http/boot-port-preflight.mjs.map +1 -0
- package/esm/http/build-cors-options.mjs +1 -1
- package/esm/http/build-cors-options.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/context/request-memo.d.mts +1 -1
- package/esm/http/context/request-memo.d.mts.map +1 -1
- package/esm/http/context/request-memo.mjs +1 -1
- package/esm/http/context/request-memo.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/index.d.mts +2 -0
- package/esm/http/index.mjs +2 -0
- 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 +2 -2
- package/esm/http/middleware/ip-filter.middleware.d.mts.map +1 -1
- package/esm/http/middleware/ip-filter.middleware.mjs +2 -2
- 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/port-preflight.d.mts +9 -1
- package/esm/http/port-preflight.d.mts.map +1 -1
- package/esm/http/port-preflight.mjs +9 -2
- package/esm/http/port-preflight.mjs.map +1 -1
- package/esm/http/ready-report.d.mts +56 -0
- package/esm/http/ready-report.d.mts.map +1 -0
- package/esm/http/ready-report.mjs +24 -0
- package/esm/http/ready-report.mjs.map +1 -0
- 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 +15 -3
- package/esm/http/request.d.mts.map +1 -1
- package/esm/http/request.mjs +17 -3
- package/esm/http/request.mjs.map +1 -1
- package/esm/http/response.d.mts +4 -4
- 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 +27 -3
- package/esm/http/server.mjs.map +1 -1
- package/esm/http/types.d.mts +2 -4
- 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/index.d.mts +7 -1
- package/esm/index.mjs +7 -1
- package/esm/logger/fatal-visibility.d.mts +25 -0
- package/esm/logger/fatal-visibility.d.mts.map +1 -0
- package/esm/logger/fatal-visibility.mjs +31 -0
- package/esm/logger/fatal-visibility.mjs.map +1 -0
- package/esm/logger/index.d.mts +1 -0
- package/esm/logger/index.mjs +1 -0
- 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 +3 -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/assert-dist-ready-to-start.mjs +24 -0
- package/esm/production/assert-dist-ready-to-start.mjs.map +1 -0
- package/esm/production/assert-generated-imports.mjs +1 -1
- package/esm/production/assert-generated-imports.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/build-contributions.mjs +1 -1
- package/esm/production/build-contributions.mjs.map +1 -1
- package/esm/production/dist-build-manifest.mjs +47 -0
- package/esm/production/dist-build-manifest.mjs.map +1 -0
- package/esm/production/esbuild-plugins.mjs +1 -1
- package/esm/production/esbuild-plugins.mjs.map +1 -1
- package/esm/production/production-builder.mjs +69 -14
- package/esm/production/production-builder.mjs.map +1 -1
- package/esm/production/production-supervisor.mjs +22 -10
- package/esm/production/production-supervisor.mjs.map +1 -1
- package/esm/production/promote-dist.mjs +115 -0
- package/esm/production/promote-dist.mjs.map +1 -0
- package/esm/production/resolve-build-config.d.mts +1 -1
- package/esm/production/resolve-build-config.d.mts.map +1 -1
- package/esm/production/resolve-build-config.mjs +1 -1
- 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/describe-route-for-log.mjs +1 -1
- package/esm/router/describe-route-for-log.mjs.map +1 -1
- package/esm/router/index.d.mts +3 -0
- package/esm/router/index.mjs +3 -0
- package/esm/router/log-request-lifecycle.mjs +1 -1
- package/esm/router/log-request-lifecycle.mjs.map +1 -1
- package/esm/router/normalize-request-path.d.mts +14 -0
- package/esm/router/normalize-request-path.d.mts.map +1 -0
- package/esm/router/normalize-request-path.mjs +18 -0
- package/esm/router/normalize-request-path.mjs.map +1 -0
- package/esm/router/normalize-route-path.d.mts +28 -0
- package/esm/router/normalize-route-path.d.mts.map +1 -0
- package/esm/router/normalize-route-path.mjs +33 -0
- package/esm/router/normalize-route-path.mjs.map +1 -0
- package/esm/router/positional-handler-diagnostics.d.mts +1 -1
- package/esm/router/positional-handler-diagnostics.d.mts.map +1 -1
- package/esm/router/positional-handler-diagnostics.mjs +1 -1
- package/esm/router/positional-handler-diagnostics.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-name-method-suffix.d.mts +33 -0
- package/esm/router/route-name-method-suffix.d.mts.map +1 -0
- package/esm/router/route-name-method-suffix.mjs +39 -0
- package/esm/router/route-name-method-suffix.mjs.map +1 -0
- package/esm/router/route-registry.d.mts +1 -1
- package/esm/router/route-registry.d.mts.map +1 -1
- package/esm/router/route-registry.mjs +4 -3
- package/esm/router/route-registry.mjs.map +1 -1
- package/esm/router/router.d.mts +15 -1
- package/esm/router/router.d.mts.map +1 -1
- package/esm/router/router.mjs +51 -12
- 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 +15 -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 +3 -2
- package/esm/tests/start-http-development-server.mjs.map +1 -1
- package/esm/tests/test-connectors-selection.d.mts +1 -1
- package/esm/tests/test-connectors-selection.d.mts.map +1 -1
- package/esm/tests/test-connectors-selection.mjs +1 -1
- package/esm/tests/test-connectors-selection.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/test-lifecycle-state.mjs +1 -1
- package/esm/tests/test-lifecycle-state.mjs.map +1 -1
- package/esm/tests/test-server-port-channel.mjs +1 -1
- package/esm/tests/test-server-port-channel.mjs.map +1 -1
- package/esm/tests/test-setup-timeout.mjs +1 -1
- package/esm/tests/test-setup-timeout.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 +1 -1
- package/esm/updater/package-manager.mjs.map +1 -1
- package/esm/updater/update-warlock-packages.mjs +1 -1
- 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/load-environment.mjs +1 -1
- package/esm/utils/load-environment.mjs.map +1 -1
- package/esm/utils/normalized-path.d.mts +1 -1
- package/esm/utils/normalized-path.d.mts.map +1 -1
- package/esm/utils/normalized-path.mjs +1 -1
- package/esm/utils/normalized-path.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 +1 -1
- package/esm/warlock-config/define-config.mjs.map +1 -1
- package/esm/warlock-config/normalize-build-config.mjs +1 -1
- package/esm/warlock-config/normalize-build-config.mjs.map +1 -1
- package/esm/warlock-config/types.d.mts +1 -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 +527 -91
- package/llms.txt +7 -5
- package/package.json +12 -12
- package/skills/add-connector/SKILL.md +35 -28
- package/skills/create-controller/SKILL.md +1 -1
- package/skills/create-module/SKILL.md +12 -12
- package/skills/hash-password/SKILL.md +4 -4
- package/skills/run-app/SKILL.md +77 -16
- package/skills/send-mail/SKILL.md +2 -2
- package/skills/use-middleware/SKILL.md +13 -4
- package/skills/use-model-transformers/SKILL.md +2 -2
- package/skills/use-repository/SKILL.md +1 -1
- package/skills/use-request-locals/SKILL.md +24 -1
- package/skills/validate-input/SKILL.md +1 -1
- package/skills/warlock-conventions/SKILL.md +6 -2
- package/skills/warlock-doctor/SKILL.md +3 -3
- package/skills/warlock-routes/SKILL.md +47 -9
- package/skills/write-cli-command/SKILL.md +1 -1
- package/skills/write-seeder/SKILL.md +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.command.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"add.command.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/add.command.ts"],"sourcesContent":["import { addCommandAction } from \"../../generations/add-command.action\";\r\nimport { command } from \"../../commands/cli-command\";\r\n\r\nexport const addCommand = command({\r\n name: \"add <features...>\",\r\n description: \"Add new feature(s) to the project\",\r\n action: addCommandAction,\r\n options: [\r\n {\r\n text: \"--package-manager -pm\",\r\n description: \"Package manager to use, if not passed, it will be detected automatically\",\r\n },\r\n {\r\n text: \"--list, -l\",\r\n description: \"List available features\",\r\n type: \"boolean\",\r\n },\r\n {\r\n text: \"--no-install\",\r\n description:\r\n \"Record dependencies in package.json without installing them — still ejects configs, adds scripts, and runs setup hooks. Used by scaffolders that run a single install afterwards.\",\r\n type: \"boolean\",\r\n },\r\n ],\r\n});\r\n"],"mappings":";;;;AAGA,MAAa,aAAa,QAAQ;CAChC,MAAM;CACN,aAAa;CACb,QAAQ;CACR,SAAS;EACP;GACE,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aACE;GACF,MAAM;EACR;CACF;AACF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { command } from "../../commands/cli-command.mjs";
|
|
2
2
|
import { buildAppProduction } from "../../production/build-app-production.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region core/src/cli/commands/build.command.ts
|
|
5
5
|
const buildCommand = command({
|
|
6
6
|
name: "build",
|
|
7
7
|
description: "Build the project for production",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.command.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"build.command.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/build.command.ts"],"sourcesContent":["import { buildAppProduction } from \"../../production/build-app-production\";\r\nimport { command } from \"../../commands/cli-command\";\r\n\r\nexport const buildCommand = command({\r\n name: \"build\",\r\n description: \"Build the project for production\",\r\n action: buildAppProduction,\r\n preload: {\r\n warlockConfig: true,\r\n },\r\n});\r\n"],"mappings":";;;;AAGA,MAAa,eAAe,QAAQ;CAClC,MAAM;CACN,aAAa;CACb,QAAQ;CACR,SAAS,EACP,eAAe,KACjB;AACF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { command } from "../../commands/cli-command.mjs";
|
|
2
2
|
import { createDatabaseAction } from "../../database/create-database-action.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region core/src/cli/commands/create-database.command.ts
|
|
5
5
|
const createDatabaseCommand = command({
|
|
6
6
|
name: "create-database <name>",
|
|
7
7
|
alias: "cdb",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-database.command.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"create-database.command.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/create-database.command.ts"],"sourcesContent":["import { createDatabaseAction } from \"../../database/create-database-action\";\r\nimport { command } from \"../../commands/cli-command\";\r\n\r\nexport const createDatabaseCommand = command({\r\n name: \"create-database <name>\",\r\n alias: \"cdb\",\r\n description: \"Create a new database\",\r\n action: createDatabaseAction,\r\n preload: {\r\n config: [\"database\", \"log\"],\r\n env: true,\r\n connectors: [\"database\"],\r\n },\r\n options: [\r\n {\r\n text: \"--connection, -c\",\r\n description: \"Database connection name\",\r\n defaultValue: \"default\",\r\n },\r\n ],\r\n});\r\n"],"mappings":";;;;AAGA,MAAa,wBAAwB,QAAQ;CAC3C,MAAM;CACN,OAAO;CACP,aAAa;CACb,QAAQ;CACR,SAAS;EACP,QAAQ,CAAC,YAAY,KAAK;EAC1B,KAAK;EACL,YAAY,CAAC,UAAU;CACzB;CACA,SAAS,CACP;EACE,MAAM;EACN,aAAa;EACb,cAAc;CAChB,CACF;AACF,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { command } from "../../commands/cli-command.mjs";
|
|
2
|
-
import { displayStartupBanner } from "../cli-commands.utils.mjs";
|
|
3
2
|
import { isDevWorker, superviseDevServer } from "../../dev-server/supervisor.mjs";
|
|
3
|
+
import { displayStartupBanner } from "../cli-commands.utils.mjs";
|
|
4
4
|
import { checkForFrameworkUpdate } from "../../dev-server/check-for-updates.mjs";
|
|
5
5
|
import { startDevelopmentServer } from "../../dev-server/start-development-server.mjs";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region core/src/cli/commands/dev-server.command.ts
|
|
8
8
|
const devServerCommand = command({
|
|
9
9
|
name: "dev",
|
|
10
10
|
description: "Start development server (HMR, type-gen, health checks)",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-server.command.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"dev-server.command.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/dev-server.command.ts"],"sourcesContent":["import { checkForFrameworkUpdate } from \"../../dev-server/check-for-updates\";\r\nimport { startDevelopmentServer } from \"../../dev-server/start-development-server\";\r\nimport { isDevWorker, superviseDevServer } from \"../../dev-server/supervisor\";\r\nimport { command } from \"../../commands/cli-command\";\r\nimport { displayStartupBanner } from \"../cli-commands.utils\";\r\n\r\nexport const devServerCommand = command({\r\n name: \"dev\",\r\n description: \"Start development server (HMR, type-gen, health checks)\",\r\n persistent: true,\r\n preload: {\r\n runtimeStrategy: \"development\",\r\n // Overrides whatever NODE_ENV the shell exported. A shell with\r\n // NODE_ENV=production made Vite's dep optimiser pre-bundle the PRODUCTION\r\n // build of React, which silently suppresses hydration-mismatch warnings —\r\n // the dev server was hiding the exact class of bug it exists to surface.\r\n // Set here, in preload, because preloaders run before the action, and the\r\n // action is what eventually reaches Vite's `createServer`.\r\n environment: \"development\",\r\n config: true, // load all config\r\n bootstrap: true,\r\n prestart: true, // load prestart file (if exists)\r\n // Only the Early lifecycle phase starts here; the Late phase\r\n // (http, socket) starts after app modules load — see\r\n // development-server.ts STEP 8.5.\r\n connectors: true,\r\n },\r\n preAction: async () => {\r\n // Two roles share this command. The first `warlock dev` becomes a thin\r\n // supervisor that owns the terminal and (re)spawns the real server; the\r\n // process it spawns carries WARLOCK_DEV_WORKER and falls through to the\r\n // server itself. See supervisor.ts for why the split exists.\r\n //\r\n // This branch has to sit in `preAction`, which runs BEFORE the command's\r\n // preloaders: the supervisor must never load config or start connectors,\r\n // or it would hold a second database connection open for the whole\r\n // session. `superviseDevServer()` never resolves, so nothing below it —\r\n // preload included — runs in the supervisor.\r\n if (!isDevWorker()) {\r\n return superviseDevServer();\r\n }\r\n\r\n await displayStartupBanner({ environment: \"development\" });\r\n },\r\n action: async (data) => {\r\n const devServer = await startDevelopmentServer({\r\n fresh: Boolean(data.options.fresh),\r\n // Pass `false` only when the CLI flag is explicitly set; `undefined`\r\n // lets `warlock.config.ts > devServer.*` defaults apply.\r\n generateTypings: data.options.skipTypings ? false : undefined,\r\n healthCheckers: data.options.skipHealth ? false : undefined,\r\n });\r\n\r\n // Fire-and-forget: once the server is ready, surface a one-line notice if\r\n // a newer @warlock.js/core has been published, and arm the `u` shortcut\r\n // that updates + restarts. Fully self-guarded — it never blocks startup\r\n // nor breaks dev if the registry is unreachable.\r\n void checkForFrameworkUpdate(devServer);\r\n },\r\n options: [\r\n {\r\n text: \"--fresh, -f\",\r\n description: \"Delete .warlock/manifest.json before start (force full re-parse from disk)\",\r\n type: \"boolean\",\r\n },\r\n {\r\n text: \"--skip-typings, -st\",\r\n description: \"Skip background type generation for this run\",\r\n type: \"boolean\",\r\n },\r\n {\r\n text: \"--skip-health, -sh\",\r\n description: \"Skip file health checkers for this run\",\r\n type: \"boolean\",\r\n },\r\n ],\r\n});\r\n"],"mappings":";;;;;;;AAMA,MAAa,mBAAmB,QAAQ;CACtC,MAAM;CACN,aAAa;CACb,YAAY;CACZ,SAAS;EACP,iBAAiB;EAOjB,aAAa;EACb,QAAQ;EACR,WAAW;EACX,UAAU;EAIV,YAAY;CACd;CACA,WAAW,YAAY;EAWrB,IAAI,CAAC,YAAY,GACf,OAAO,mBAAmB;EAG5B,MAAM,qBAAqB,EAAE,aAAa,cAAc,CAAC;CAC3D;CACA,QAAQ,OAAO,SAAS;EAatB,AAAK,wBAAwB,MAZL,uBAAuB;GAC7C,OAAO,QAAQ,KAAK,QAAQ,KAAK;GAGjC,iBAAiB,KAAK,QAAQ,cAAc,QAAQ;GACpD,gBAAgB,KAAK,QAAQ,aAAa,QAAQ;EACpD,CAAC,CAMqC;CACxC;CACA,SAAS;EACP;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;CACF;AACF,CAAC"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import "../../../config/config-getter.mjs";
|
|
2
|
+
import { container } from "../../../container/index.mjs";
|
|
3
|
+
import { router } from "../../../router/router.mjs";
|
|
4
|
+
import { ConnectorLifecyclePhase } from "../../../connectors/types.mjs";
|
|
5
|
+
import { connectorsManager } from "../../../connectors/connectors-manager.mjs";
|
|
6
|
+
import { registerConfiguredConnectors } from "../../../connectors/register-configured-connectors.mjs";
|
|
7
|
+
import { ModuleLoadError } from "../../../dev-server/module-loader.mjs";
|
|
8
|
+
import { filesOrchestrator } from "../../../dev-server/files-orchestrator.mjs";
|
|
9
|
+
|
|
10
|
+
//#region core/src/cli/commands/doctor/boot-for-diagnostics.ts
|
|
11
|
+
/**
|
|
12
|
+
* @fileoverview The boot pass `warlock doctor` runs before its checks.
|
|
13
|
+
*
|
|
14
|
+
* THE RULE: **doctor boots, it never starts.**
|
|
15
|
+
*
|
|
16
|
+
* The connector contract already splits the two things doctor needs to keep
|
|
17
|
+
* apart. `boot()` is where a connector REGISTERS — the HTTP connector builds a
|
|
18
|
+
* Fastify instance and adds `/health` + `/ready` to it, the web connector
|
|
19
|
+
* installs one route per page on the app router — and `start()` is where it
|
|
20
|
+
* CONNECTS: opens the database, dials the cache, binds the port. Doctor runs
|
|
21
|
+
* every `boot()` and no `start()`, so it sees the exact surface a served app
|
|
22
|
+
* would have while opening no connection and binding no port.
|
|
23
|
+
*
|
|
24
|
+
* That seam is what makes the checks true. Before it existed here, doctor
|
|
25
|
+
* preloaded config and framework bootstrap only: no app module was ever
|
|
26
|
+
* imported, so no route module ever ran, so `routes` reported `0` on an app
|
|
27
|
+
* `warlock dev` served 14 routes for — while `health` reported the endpoints as
|
|
28
|
+
* "registered" from a config flag alone. Two checks, one app, contradictory
|
|
29
|
+
* answers, and the wrong one was the one users acted on.
|
|
30
|
+
*
|
|
31
|
+
* ORDERING mirrors `DevelopmentServer.start()` exactly, because the route
|
|
32
|
+
* surface is order-dependent: early connectors boot, then models (decorator
|
|
33
|
+
* registries the route modules resolve against), then locales/events/mains/
|
|
34
|
+
* routes, then late connectors — which is where `web` turns pages into routes.
|
|
35
|
+
* Get the order wrong and the count is wrong, which is the defect this replaces.
|
|
36
|
+
*
|
|
37
|
+
* NOT read-only in one narrow sense: it imports the app's own modules, so
|
|
38
|
+
* whatever a module does at import time happens. That is unavoidable — routes
|
|
39
|
+
* only exist as the side effect of importing the file that declares them — and
|
|
40
|
+
* it is the same import the dev server performs. It also refreshes
|
|
41
|
+
* `.warlock/manifest.json`, the framework's own file cache. Nothing in the
|
|
42
|
+
* app's data, and no network, is touched.
|
|
43
|
+
*/
|
|
44
|
+
/**
|
|
45
|
+
* The one connector whose `boot()` can bind a port. See {@link shouldSkipBoot}.
|
|
46
|
+
*/
|
|
47
|
+
const SOCKET_CONNECTOR = "socket";
|
|
48
|
+
/**
|
|
49
|
+
* Normalize anything thrown into a one-line message.
|
|
50
|
+
*/
|
|
51
|
+
function messageOf(error) {
|
|
52
|
+
return error instanceof Error ? error.message : String(error);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Whether doctor must refuse to boot this connector, and why.
|
|
56
|
+
*
|
|
57
|
+
* Exactly one case, and it is not a taste call: `SocketConnector.boot()` shares
|
|
58
|
+
* the HTTP connector's raw server when there is one, and CREATES its own —
|
|
59
|
+
* `server.listen(socketConfig.port)` — when there is not. The HTTP connector
|
|
60
|
+
* boots first (lower priority number), so the shared path is what normally
|
|
61
|
+
* happens; an app that configures `socket` without `http` is the exception, and
|
|
62
|
+
* for that app booting socket would make a diagnostic command open a listening
|
|
63
|
+
* port. Detected by asking the container what HTTP actually left behind rather
|
|
64
|
+
* than by re-deriving the condition from config.
|
|
65
|
+
*/
|
|
66
|
+
function shouldSkipBoot(name) {
|
|
67
|
+
if (name === SOCKET_CONNECTOR && !container.has("http.server")) return "no http connector to share a server with — booting it would bind a port";
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Boot every registered connector in one lifecycle phase, isolating failures.
|
|
71
|
+
*
|
|
72
|
+
* A connector that throws on boot is recorded and the loop continues: one bad
|
|
73
|
+
* connector must not hide the rest of the report, and "which connector failed
|
|
74
|
+
* to boot" is itself a finding worth printing.
|
|
75
|
+
*/
|
|
76
|
+
async function bootPhase(phase, connectors) {
|
|
77
|
+
for (const connector of connectorsManager.list()) {
|
|
78
|
+
if (connector.lifecyclePhase !== phase) continue;
|
|
79
|
+
const skipReason = shouldSkipBoot(connector.name);
|
|
80
|
+
if (skipReason) {
|
|
81
|
+
connectors.skipped.push({
|
|
82
|
+
name: connector.name,
|
|
83
|
+
reason: skipReason
|
|
84
|
+
});
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
try {
|
|
88
|
+
await connector.boot();
|
|
89
|
+
connectors.booted.push(connector.name);
|
|
90
|
+
} catch (error) {
|
|
91
|
+
connectors.failures.push({
|
|
92
|
+
name: connector.name,
|
|
93
|
+
message: messageOf(error)
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Import every app module the dev server imports at boot, collecting failures
|
|
100
|
+
* instead of letting the first one abort the pass.
|
|
101
|
+
*
|
|
102
|
+
* `loadAll()` is deliberately reused rather than reimplemented: it owns the
|
|
103
|
+
* canonical order (locale → event → main → route) and the `withSourceFile`
|
|
104
|
+
* scoping that gives each route its origin file. It aggregates its failures and
|
|
105
|
+
* throws them at the end, which is exactly the shape needed here — every module
|
|
106
|
+
* is attempted, and one broken route file cannot mask another.
|
|
107
|
+
*/
|
|
108
|
+
async function loadAppModules() {
|
|
109
|
+
try {
|
|
110
|
+
await filesOrchestrator.moduleLoader.loadAll();
|
|
111
|
+
return [];
|
|
112
|
+
} catch (error) {
|
|
113
|
+
if (error instanceof AggregateError) return error.errors.map((failure) => {
|
|
114
|
+
return failure instanceof ModuleLoadError ? {
|
|
115
|
+
file: failure.file.relativePath,
|
|
116
|
+
message: messageOf(failure.cause)
|
|
117
|
+
} : {
|
|
118
|
+
file: "unknown",
|
|
119
|
+
message: messageOf(failure)
|
|
120
|
+
};
|
|
121
|
+
});
|
|
122
|
+
return [{
|
|
123
|
+
file: "unknown",
|
|
124
|
+
message: messageOf(error)
|
|
125
|
+
}];
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Eagerly import model files so the decorator-driven registries the route
|
|
130
|
+
* modules resolve names against are populated first — the same reason
|
|
131
|
+
* `DevelopmentServer.autoDiscoverFiles()` exists, and it must keep the same
|
|
132
|
+
* position in the sequence.
|
|
133
|
+
*/
|
|
134
|
+
async function discoverModels() {
|
|
135
|
+
const failures = [];
|
|
136
|
+
for (const file of filesOrchestrator.files.values()) {
|
|
137
|
+
if (file.type !== "model") continue;
|
|
138
|
+
try {
|
|
139
|
+
await filesOrchestrator.moduleLoader.loadModule(file, "model");
|
|
140
|
+
} catch (error) {
|
|
141
|
+
failures.push({
|
|
142
|
+
file: file.relativePath,
|
|
143
|
+
message: error instanceof ModuleLoadError ? messageOf(error.cause) : messageOf(error)
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return failures;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Run the boot pass and report what it found.
|
|
151
|
+
*
|
|
152
|
+
* Never throws. Every failure mode — a connector array the config manager
|
|
153
|
+
* refuses, a connector that throws on boot, a route module that fails to
|
|
154
|
+
* import — becomes a field on the returned context, which the checks turn into
|
|
155
|
+
* a printed verdict. A diagnostic command that crashes while diagnosing tells
|
|
156
|
+
* the user nothing.
|
|
157
|
+
*/
|
|
158
|
+
async function bootForDiagnostics() {
|
|
159
|
+
const connectors = {
|
|
160
|
+
registered: [],
|
|
161
|
+
configured: [],
|
|
162
|
+
booted: [],
|
|
163
|
+
skipped: [],
|
|
164
|
+
failures: []
|
|
165
|
+
};
|
|
166
|
+
const context = {
|
|
167
|
+
booted: false,
|
|
168
|
+
routeModules: 0,
|
|
169
|
+
appRoutes: 0,
|
|
170
|
+
totalRoutes: 0,
|
|
171
|
+
moduleFailures: [],
|
|
172
|
+
connectors
|
|
173
|
+
};
|
|
174
|
+
try {
|
|
175
|
+
await filesOrchestrator.init();
|
|
176
|
+
await filesOrchestrator.initializeAll();
|
|
177
|
+
filesOrchestrator.specialFilesCollector.collect(filesOrchestrator.getFiles());
|
|
178
|
+
context.routeModules = filesOrchestrator.specialFilesCollector.getFilesByType("route").length;
|
|
179
|
+
} catch (error) {
|
|
180
|
+
context.moduleFailures.push({
|
|
181
|
+
file: "src/",
|
|
182
|
+
message: messageOf(error)
|
|
183
|
+
});
|
|
184
|
+
return context;
|
|
185
|
+
}
|
|
186
|
+
try {
|
|
187
|
+
registerConfiguredConnectors();
|
|
188
|
+
} catch (error) {
|
|
189
|
+
connectors.registrationError = messageOf(error);
|
|
190
|
+
}
|
|
191
|
+
connectors.registered = connectorsManager.list().map((connector) => connector.name);
|
|
192
|
+
connectors.configured = connectors.registered.filter((name) => {
|
|
193
|
+
return !connectorsManager.isBuiltInName(name);
|
|
194
|
+
});
|
|
195
|
+
await bootPhase("early", connectors);
|
|
196
|
+
context.moduleFailures.push(...await discoverModels());
|
|
197
|
+
context.moduleFailures.push(...await loadAppModules());
|
|
198
|
+
context.appRoutes = router.routeCount();
|
|
199
|
+
await bootPhase("late", connectors);
|
|
200
|
+
context.totalRoutes = router.routeCount();
|
|
201
|
+
context.booted = true;
|
|
202
|
+
return context;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
//#endregion
|
|
206
|
+
export { bootForDiagnostics };
|
|
207
|
+
//# sourceMappingURL=boot-for-diagnostics.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boot-for-diagnostics.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/doctor/boot-for-diagnostics.ts"],"sourcesContent":["import { config } from \"../../../config/config-getter\";\r\nimport { connectorsManager } from \"../../../connectors/connectors-manager\";\r\nimport { registerConfiguredConnectors } from \"../../../connectors/register-configured-connectors\";\r\nimport { ConnectorLifecyclePhase } from \"../../../connectors/types\";\r\nimport { container } from \"../../../container\";\r\nimport { filesOrchestrator } from \"../../../dev-server/files-orchestrator\";\r\nimport { ModuleLoadError } from \"../../../dev-server/module-loader\";\r\nimport { router } from \"../../../router/router\";\r\nimport type { DoctorBootContext, ModuleFailure } from \"./check.types\";\r\n\r\n/**\r\n * @fileoverview The boot pass `warlock doctor` runs before its checks.\r\n *\r\n * THE RULE: **doctor boots, it never starts.**\r\n *\r\n * The connector contract already splits the two things doctor needs to keep\r\n * apart. `boot()` is where a connector REGISTERS — the HTTP connector builds a\r\n * Fastify instance and adds `/health` + `/ready` to it, the web connector\r\n * installs one route per page on the app router — and `start()` is where it\r\n * CONNECTS: opens the database, dials the cache, binds the port. Doctor runs\r\n * every `boot()` and no `start()`, so it sees the exact surface a served app\r\n * would have while opening no connection and binding no port.\r\n *\r\n * That seam is what makes the checks true. Before it existed here, doctor\r\n * preloaded config and framework bootstrap only: no app module was ever\r\n * imported, so no route module ever ran, so `routes` reported `0` on an app\r\n * `warlock dev` served 14 routes for — while `health` reported the endpoints as\r\n * \"registered\" from a config flag alone. Two checks, one app, contradictory\r\n * answers, and the wrong one was the one users acted on.\r\n *\r\n * ORDERING mirrors `DevelopmentServer.start()` exactly, because the route\r\n * surface is order-dependent: early connectors boot, then models (decorator\r\n * registries the route modules resolve against), then locales/events/mains/\r\n * routes, then late connectors — which is where `web` turns pages into routes.\r\n * Get the order wrong and the count is wrong, which is the defect this replaces.\r\n *\r\n * NOT read-only in one narrow sense: it imports the app's own modules, so\r\n * whatever a module does at import time happens. That is unavoidable — routes\r\n * only exist as the side effect of importing the file that declares them — and\r\n * it is the same import the dev server performs. It also refreshes\r\n * `.warlock/manifest.json`, the framework's own file cache. Nothing in the\r\n * app's data, and no network, is touched.\r\n */\r\n\r\n/**\r\n * The one connector whose `boot()` can bind a port. See {@link shouldSkipBoot}.\r\n */\r\nconst SOCKET_CONNECTOR = \"socket\";\r\n\r\n/**\r\n * Normalize anything thrown into a one-line message.\r\n */\r\nfunction messageOf(error: unknown): string {\r\n return error instanceof Error ? error.message : String(error);\r\n}\r\n\r\n/**\r\n * Whether doctor must refuse to boot this connector, and why.\r\n *\r\n * Exactly one case, and it is not a taste call: `SocketConnector.boot()` shares\r\n * the HTTP connector's raw server when there is one, and CREATES its own —\r\n * `server.listen(socketConfig.port)` — when there is not. The HTTP connector\r\n * boots first (lower priority number), so the shared path is what normally\r\n * happens; an app that configures `socket` without `http` is the exception, and\r\n * for that app booting socket would make a diagnostic command open a listening\r\n * port. Detected by asking the container what HTTP actually left behind rather\r\n * than by re-deriving the condition from config.\r\n */\r\nfunction shouldSkipBoot(name: string): string | undefined {\r\n if (name === SOCKET_CONNECTOR && !container.has(\"http.server\")) {\r\n return \"no http connector to share a server with — booting it would bind a port\";\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\n/**\r\n * Boot every registered connector in one lifecycle phase, isolating failures.\r\n *\r\n * A connector that throws on boot is recorded and the loop continues: one bad\r\n * connector must not hide the rest of the report, and \"which connector failed\r\n * to boot\" is itself a finding worth printing.\r\n */\r\nasync function bootPhase(\r\n phase: ConnectorLifecyclePhase,\r\n connectors: DoctorBootContext[\"connectors\"],\r\n): Promise<void> {\r\n for (const connector of connectorsManager.list()) {\r\n if (connector.lifecyclePhase !== phase) continue;\r\n\r\n const skipReason = shouldSkipBoot(connector.name);\r\n\r\n if (skipReason) {\r\n connectors.skipped.push({ name: connector.name, reason: skipReason });\r\n continue;\r\n }\r\n\r\n try {\r\n await connector.boot();\r\n connectors.booted.push(connector.name);\r\n } catch (error) {\r\n connectors.failures.push({ name: connector.name, message: messageOf(error) });\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Import every app module the dev server imports at boot, collecting failures\r\n * instead of letting the first one abort the pass.\r\n *\r\n * `loadAll()` is deliberately reused rather than reimplemented: it owns the\r\n * canonical order (locale → event → main → route) and the `withSourceFile`\r\n * scoping that gives each route its origin file. It aggregates its failures and\r\n * throws them at the end, which is exactly the shape needed here — every module\r\n * is attempted, and one broken route file cannot mask another.\r\n */\r\nasync function loadAppModules(): Promise<ModuleFailure[]> {\r\n try {\r\n await filesOrchestrator.moduleLoader.loadAll();\r\n return [];\r\n } catch (error) {\r\n if (error instanceof AggregateError) {\r\n return (error.errors as unknown[]).map((failure) => {\r\n return failure instanceof ModuleLoadError\r\n ? { file: failure.file.relativePath, message: messageOf(failure.cause) }\r\n : { file: \"unknown\", message: messageOf(failure) };\r\n });\r\n }\r\n\r\n return [{ file: \"unknown\", message: messageOf(error) }];\r\n }\r\n}\r\n\r\n/**\r\n * Eagerly import model files so the decorator-driven registries the route\r\n * modules resolve names against are populated first — the same reason\r\n * `DevelopmentServer.autoDiscoverFiles()` exists, and it must keep the same\r\n * position in the sequence.\r\n */\r\nasync function discoverModels(): Promise<ModuleFailure[]> {\r\n const failures: ModuleFailure[] = [];\r\n\r\n for (const file of filesOrchestrator.files.values()) {\r\n if (file.type !== \"model\") continue;\r\n\r\n try {\r\n await filesOrchestrator.moduleLoader.loadModule(file, \"model\");\r\n } catch (error) {\r\n failures.push({\r\n file: file.relativePath,\r\n message: error instanceof ModuleLoadError ? messageOf(error.cause) : messageOf(error),\r\n });\r\n }\r\n }\r\n\r\n return failures;\r\n}\r\n\r\n/**\r\n * Run the boot pass and report what it found.\r\n *\r\n * Never throws. Every failure mode — a connector array the config manager\r\n * refuses, a connector that throws on boot, a route module that fails to\r\n * import — becomes a field on the returned context, which the checks turn into\r\n * a printed verdict. A diagnostic command that crashes while diagnosing tells\r\n * the user nothing.\r\n */\r\nexport async function bootForDiagnostics(): Promise<DoctorBootContext> {\r\n const connectors: DoctorBootContext[\"connectors\"] = {\r\n registered: [],\r\n configured: [],\r\n booted: [],\r\n skipped: [],\r\n failures: [],\r\n };\r\n\r\n const context: DoctorBootContext = {\r\n booted: false,\r\n routeModules: 0,\r\n appRoutes: 0,\r\n totalRoutes: 0,\r\n moduleFailures: [],\r\n connectors,\r\n };\r\n\r\n try {\r\n // `init()` is idempotent and the preloader already ran it; calling it again\r\n // costs nothing and keeps this function honest on its own.\r\n await filesOrchestrator.init();\r\n await filesOrchestrator.initializeAll();\r\n\r\n filesOrchestrator.specialFilesCollector.collect(filesOrchestrator.getFiles());\r\n\r\n context.routeModules = filesOrchestrator.specialFilesCollector.getFilesByType(\"route\").length;\r\n } catch (error) {\r\n context.moduleFailures.push({ file: \"src/\", message: messageOf(error) });\r\n\r\n return context;\r\n }\r\n\r\n // The app's own connectors (`warlock.config.ts > connectors`) must be\r\n // registered before any phase boots, exactly as the dev preloader does it —\r\n // otherwise doctor would report on the eleven built-ins alone and miss the\r\n // connector the app actually configured. This is also the call that refuses a\r\n // duplicate or reserved connector name, so a config that would crash the next\r\n // real boot is caught here instead.\r\n try {\r\n registerConfiguredConnectors();\r\n } catch (error) {\r\n connectors.registrationError = messageOf(error);\r\n }\r\n\r\n connectors.registered = connectorsManager.list().map((connector) => connector.name);\r\n connectors.configured = connectors.registered.filter((name) => {\r\n return !connectorsManager.isBuiltInName(name);\r\n });\r\n\r\n await bootPhase(ConnectorLifecyclePhase.Early, connectors);\r\n\r\n context.moduleFailures.push(...(await discoverModels()));\r\n context.moduleFailures.push(...(await loadAppModules()));\r\n\r\n // Snapshot BEFORE the late phase: everything the app's own route modules\r\n // registered. The difference between this and the total is what connectors\r\n // contributed (pages, for `web`), and reporting the two separately is what\r\n // lets a user reconcile doctor's number with the dev server's.\r\n context.appRoutes = router.routeCount();\r\n\r\n await bootPhase(ConnectorLifecyclePhase.Late, connectors);\r\n\r\n context.totalRoutes = router.routeCount();\r\n\r\n context.booted = true;\r\n\r\n return context;\r\n}\r\n\r\n/**\r\n * Whether the app declares an HTTP surface at all. Checks that only make sense\r\n * for a served app use this to opt out instead of inventing a verdict.\r\n */\r\nexport function hasHttpConfig(): boolean {\r\n return Boolean(config.get(\"http\"));\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,MAAM,mBAAmB;;;;AAKzB,SAAS,UAAU,OAAwB;CACzC,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC9D;;;;;;;;;;;;;AAcA,SAAS,eAAe,MAAkC;CACxD,IAAI,SAAS,oBAAoB,CAAC,UAAU,IAAI,aAAa,GAC3D,OAAO;AAIX;;;;;;;;AASA,eAAe,UACb,OACA,YACe;CACf,KAAK,MAAM,aAAa,kBAAkB,KAAK,GAAG;EAChD,IAAI,UAAU,mBAAmB,OAAO;EAExC,MAAM,aAAa,eAAe,UAAU,IAAI;EAEhD,IAAI,YAAY;GACd,WAAW,QAAQ,KAAK;IAAE,MAAM,UAAU;IAAM,QAAQ;GAAW,CAAC;GACpE;EACF;EAEA,IAAI;GACF,MAAM,UAAU,KAAK;GACrB,WAAW,OAAO,KAAK,UAAU,IAAI;EACvC,SAAS,OAAO;GACd,WAAW,SAAS,KAAK;IAAE,MAAM,UAAU;IAAM,SAAS,UAAU,KAAK;GAAE,CAAC;EAC9E;CACF;AACF;;;;;;;;;;;AAYA,eAAe,iBAA2C;CACxD,IAAI;EACF,MAAM,kBAAkB,aAAa,QAAQ;EAC7C,OAAO,CAAC;CACV,SAAS,OAAO;EACd,IAAI,iBAAiB,gBACnB,OAAQ,MAAM,OAAqB,KAAK,YAAY;GAClD,OAAO,mBAAmB,kBACtB;IAAE,MAAM,QAAQ,KAAK;IAAc,SAAS,UAAU,QAAQ,KAAK;GAAE,IACrE;IAAE,MAAM;IAAW,SAAS,UAAU,OAAO;GAAE;EACrD,CAAC;EAGH,OAAO,CAAC;GAAE,MAAM;GAAW,SAAS,UAAU,KAAK;EAAE,CAAC;CACxD;AACF;;;;;;;AAQA,eAAe,iBAA2C;CACxD,MAAM,WAA4B,CAAC;CAEnC,KAAK,MAAM,QAAQ,kBAAkB,MAAM,OAAO,GAAG;EACnD,IAAI,KAAK,SAAS,SAAS;EAE3B,IAAI;GACF,MAAM,kBAAkB,aAAa,WAAW,MAAM,OAAO;EAC/D,SAAS,OAAO;GACd,SAAS,KAAK;IACZ,MAAM,KAAK;IACX,SAAS,iBAAiB,kBAAkB,UAAU,MAAM,KAAK,IAAI,UAAU,KAAK;GACtF,CAAC;EACH;CACF;CAEA,OAAO;AACT;;;;;;;;;;AAWA,eAAsB,qBAAiD;CACrE,MAAM,aAA8C;EAClD,YAAY,CAAC;EACb,YAAY,CAAC;EACb,QAAQ,CAAC;EACT,SAAS,CAAC;EACV,UAAU,CAAC;CACb;CAEA,MAAM,UAA6B;EACjC,QAAQ;EACR,cAAc;EACd,WAAW;EACX,aAAa;EACb,gBAAgB,CAAC;EACjB;CACF;CAEA,IAAI;EAGF,MAAM,kBAAkB,KAAK;EAC7B,MAAM,kBAAkB,cAAc;EAEtC,kBAAkB,sBAAsB,QAAQ,kBAAkB,SAAS,CAAC;EAE5E,QAAQ,eAAe,kBAAkB,sBAAsB,eAAe,OAAO,EAAE;CACzF,SAAS,OAAO;EACd,QAAQ,eAAe,KAAK;GAAE,MAAM;GAAQ,SAAS,UAAU,KAAK;EAAE,CAAC;EAEvE,OAAO;CACT;CAQA,IAAI;EACF,6BAA6B;CAC/B,SAAS,OAAO;EACd,WAAW,oBAAoB,UAAU,KAAK;CAChD;CAEA,WAAW,aAAa,kBAAkB,KAAK,EAAE,KAAK,cAAc,UAAU,IAAI;CAClF,WAAW,aAAa,WAAW,WAAW,QAAQ,SAAS;EAC7D,OAAO,CAAC,kBAAkB,cAAc,IAAI;CAC9C,CAAC;CAED,MAAM,mBAAyC,UAAU;CAEzD,QAAQ,eAAe,KAAK,GAAI,MAAM,eAAe,CAAE;CACvD,QAAQ,eAAe,KAAK,GAAI,MAAM,eAAe,CAAE;CAMvD,QAAQ,YAAY,OAAO,WAAW;CAEtC,MAAM,kBAAwC,UAAU;CAExD,QAAQ,cAAc,OAAO,WAAW;CAExC,QAAQ,SAAS;CAEjB,OAAO;AACT"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { config } from "../../../../config/config-getter.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region core/src/cli/commands/doctor/checks/config.check.ts
|
|
4
4
|
/**
|
|
5
5
|
* Config sections that a typical Warlock HTTP application is expected to
|
|
6
6
|
* register. A missing section here is release/runtime-blocking, so absence is
|
|
@@ -15,8 +15,11 @@ function isPresent(value) {
|
|
|
15
15
|
return value !== null && value !== void 0;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* Verifies that the required top-level config sections are present.
|
|
19
|
-
*
|
|
18
|
+
* Verifies that the required top-level config sections are present.
|
|
19
|
+
*
|
|
20
|
+
* NEEDS NO BOOTED APP — config files are loaded by the command's preloaders,
|
|
21
|
+
* before the boot pass. Reads each section via `config.get` only; never mutates
|
|
22
|
+
* configuration.
|
|
20
23
|
*/
|
|
21
24
|
const configCheck = {
|
|
22
25
|
name: "config",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.check.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"config.check.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/doctor/checks/config.check.ts"],"sourcesContent":["import { config } from \"../../../../config/config-getter\";\nimport type { DoctorCheck } from \"../check.types\";\n\n/**\n * Config sections that a typical Warlock HTTP application is expected to\n * register. A missing section here is release/runtime-blocking, so absence is\n * a `fail` rather than a warning.\n */\nconst REQUIRED_CONFIG_SECTIONS = [\"app\", \"http\"] as const;\n\n/**\n * `@mongez/config` returns `null` (not `undefined`) for an unregistered key,\n * so treat both nullish values as \"missing\".\n */\nfunction isPresent(value: unknown): boolean {\n return value !== null && value !== undefined;\n}\n\n/**\n * Verifies that the required top-level config sections are present.\n *\n * NEEDS NO BOOTED APP — config files are loaded by the command's preloaders,\n * before the boot pass. Reads each section via `config.get` only; never mutates\n * configuration.\n */\nexport const configCheck: DoctorCheck = {\n name: \"config\",\n run: () => {\n const missing = REQUIRED_CONFIG_SECTIONS.filter((section) => {\n return !isPresent(config.get(section));\n });\n\n if (missing.length > 0) {\n return {\n name: \"config\",\n status: \"fail\",\n detail: `missing required config section(s): ${missing.join(\", \")}`,\n };\n }\n\n return {\n name: \"config\",\n status: \"ok\",\n detail: `required sections present (${REQUIRED_CONFIG_SECTIONS.join(\", \")})`,\n };\n },\n};\n"],"mappings":";;;;;;;;AAQA,MAAM,2BAA2B,CAAC,OAAO,MAAM;;;;;AAM/C,SAAS,UAAU,OAAyB;CAC1C,OAAO,UAAU,QAAQ,UAAU;AACrC;;;;;;;;AASA,MAAa,cAA2B;CACtC,MAAM;CACN,WAAW;EACT,MAAM,UAAU,yBAAyB,QAAQ,YAAY;GAC3D,OAAO,CAAC,UAAU,OAAO,IAAI,OAAO,CAAC;EACvC,CAAC;EAED,IAAI,QAAQ,SAAS,GACnB,OAAO;GACL,MAAM;GACN,QAAQ;GACR,QAAQ,uCAAuC,QAAQ,KAAK,IAAI;EAClE;EAGF,OAAO;GACL,MAAM;GACN,QAAQ;GACR,QAAQ,8BAA8B,yBAAyB,KAAK,IAAI,EAAE;EAC5E;CACF;AACF"}
|
|
@@ -1,24 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//#region ../core/src/cli/commands/doctor/checks/connectors.check.ts
|
|
1
|
+
//#region core/src/cli/commands/doctor/checks/connectors.check.ts
|
|
4
2
|
/**
|
|
5
|
-
* Reports
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
3
|
+
* Reports whether the app's connectors survive boot.
|
|
4
|
+
*
|
|
5
|
+
* NEEDS A BOOTED APP: the boot pass runs every connector's `boot()` and no
|
|
6
|
+
* `start()`, and this check reads the outcome.
|
|
7
|
+
*
|
|
8
|
+
* WHAT THIS REPLACED, AND WHY: the previous version printed
|
|
9
|
+
* `11 registered, none active`. Both halves were tautologies. Eleven is the
|
|
10
|
+
* number of built-in connectors the manager constructs when its module is
|
|
11
|
+
* imported — it is the same on every project that has ever existed and says
|
|
12
|
+
* nothing about the app. And "none active" was guaranteed, because `active` is
|
|
13
|
+
* set by `start()` and doctor deliberately never starts anything: the warning
|
|
14
|
+
* could not be absent from a healthy app, so it could not mean anything on a
|
|
15
|
+
* broken one.
|
|
16
|
+
*
|
|
17
|
+
* What is reported instead is a fact that varies with the project and can be
|
|
18
|
+
* wrong: the connectors the app itself configured, and whether each of them
|
|
19
|
+
* boots. A connector that throws on boot is a boot-time crash the user has not
|
|
20
|
+
* hit yet.
|
|
9
21
|
*
|
|
10
|
-
*
|
|
11
|
-
* `
|
|
22
|
+
* Verdicts:
|
|
23
|
+
* - `warlock.config.ts > connectors` refused (duplicate or reserved name) →
|
|
24
|
+
* `fail`. The next real boot would throw the same error;
|
|
25
|
+
* - a connector's `boot()` threw → `fail`, named, with the message;
|
|
26
|
+
* - otherwise → `ok`, listing what booted.
|
|
12
27
|
*/
|
|
13
28
|
const connectorsCheck = {
|
|
14
29
|
name: "connectors",
|
|
15
|
-
run: () => {
|
|
16
|
-
const connectors =
|
|
17
|
-
|
|
30
|
+
run: (context) => {
|
|
31
|
+
const { connectors } = context;
|
|
32
|
+
if (connectors.registrationError) return {
|
|
33
|
+
name: "connectors",
|
|
34
|
+
status: "fail",
|
|
35
|
+
detail: `warlock.config.ts > connectors was refused: ${connectors.registrationError}`
|
|
36
|
+
};
|
|
37
|
+
if (connectors.failures.length > 0) return {
|
|
38
|
+
name: "connectors",
|
|
39
|
+
status: "fail",
|
|
40
|
+
detail: `${connectors.failures.length} connector(s) failed to boot:\n` + connectors.failures.map((failure) => ` - ${failure.name}: ${failure.message}`).join("\n")
|
|
41
|
+
};
|
|
42
|
+
if (!context.booted) return;
|
|
43
|
+
const skipped = connectors.skipped.map((entry) => `; skipped ${entry.name} (${entry.reason})`).join("");
|
|
18
44
|
return {
|
|
19
45
|
name: "connectors",
|
|
20
46
|
status: "ok",
|
|
21
|
-
detail:
|
|
47
|
+
detail: `all booted without error (${connectors.configured.length > 0 ? `${connectors.configured.join(", ")} from warlock.config.ts + ${connectors.registered.length - connectors.configured.length} built-in` : `${connectors.registered.length} built-in, none configured in warlock.config.ts`})${skipped}`
|
|
22
48
|
};
|
|
23
49
|
}
|
|
24
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectors.check.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"connectors.check.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/doctor/checks/connectors.check.ts"],"sourcesContent":["import type { DoctorCheck } from \"../check.types\";\n\n/**\n * Reports whether the app's connectors survive boot.\n *\n * NEEDS A BOOTED APP: the boot pass runs every connector's `boot()` and no\n * `start()`, and this check reads the outcome.\n *\n * WHAT THIS REPLACED, AND WHY: the previous version printed\n * `11 registered, none active`. Both halves were tautologies. Eleven is the\n * number of built-in connectors the manager constructs when its module is\n * imported — it is the same on every project that has ever existed and says\n * nothing about the app. And \"none active\" was guaranteed, because `active` is\n * set by `start()` and doctor deliberately never starts anything: the warning\n * could not be absent from a healthy app, so it could not mean anything on a\n * broken one.\n *\n * What is reported instead is a fact that varies with the project and can be\n * wrong: the connectors the app itself configured, and whether each of them\n * boots. A connector that throws on boot is a boot-time crash the user has not\n * hit yet.\n *\n * Verdicts:\n * - `warlock.config.ts > connectors` refused (duplicate or reserved name) →\n * `fail`. The next real boot would throw the same error;\n * - a connector's `boot()` threw → `fail`, named, with the message;\n * - otherwise → `ok`, listing what booted.\n */\nexport const connectorsCheck: DoctorCheck = {\n name: \"connectors\",\n run: (context) => {\n const { connectors } = context;\n\n if (connectors.registrationError) {\n return {\n name: \"connectors\",\n status: \"fail\",\n detail: `warlock.config.ts > connectors was refused: ${connectors.registrationError}`,\n };\n }\n\n if (connectors.failures.length > 0) {\n return {\n name: \"connectors\",\n status: \"fail\",\n detail:\n `${connectors.failures.length} connector(s) failed to boot:\\n` +\n connectors.failures\n .map((failure) => ` - ${failure.name}: ${failure.message}`)\n .join(\"\\n\"),\n };\n }\n\n if (!context.booted) {\n return undefined;\n }\n\n const skipped = connectors.skipped\n .map((entry) => `; skipped ${entry.name} (${entry.reason})`)\n .join(\"\");\n\n const configured =\n connectors.configured.length > 0\n ? `${connectors.configured.join(\", \")} from warlock.config.ts + ` +\n `${connectors.registered.length - connectors.configured.length} built-in`\n : `${connectors.registered.length} built-in, none configured in warlock.config.ts`;\n\n return {\n name: \"connectors\",\n status: \"ok\",\n detail: `all booted without error (${configured})${skipped}`,\n };\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAa,kBAA+B;CAC1C,MAAM;CACN,MAAM,YAAY;EAChB,MAAM,EAAE,eAAe;EAEvB,IAAI,WAAW,mBACb,OAAO;GACL,MAAM;GACN,QAAQ;GACR,QAAQ,+CAA+C,WAAW;EACpE;EAGF,IAAI,WAAW,SAAS,SAAS,GAC/B,OAAO;GACL,MAAM;GACN,QAAQ;GACR,QACE,GAAG,WAAW,SAAS,OAAO,mCAC9B,WAAW,SACR,KAAK,YAAY,OAAO,QAAQ,KAAK,IAAI,QAAQ,SAAS,EAC1D,KAAK,IAAI;EAChB;EAGF,IAAI,CAAC,QAAQ,QACX;EAGF,MAAM,UAAU,WAAW,QACxB,KAAK,UAAU,aAAa,MAAM,KAAK,IAAI,MAAM,OAAO,EAAE,EAC1D,KAAK,EAAE;EAQV,OAAO;GACL,MAAM;GACN,QAAQ;GACR,QAAQ,6BARR,WAAW,WAAW,SAAS,IAC3B,GAAG,WAAW,WAAW,KAAK,IAAI,EAAE,4BACjC,WAAW,WAAW,SAAS,WAAW,WAAW,OAAO,aAC/D,GAAG,WAAW,WAAW,OAAO,iDAKY,GAAG;EACrD;CACF;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describePositionalHandlerSuspect, listPositionalHandlerSuspects } from "../../../../router/positional-handler-diagnostics.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region core/src/cli/commands/doctor/checks/handler-signature.check.ts
|
|
4
4
|
/**
|
|
5
5
|
* Surfaces route handlers still written against the v4 positional signature,
|
|
6
6
|
* `(request, response)`. v5 calls a handler with a single context object, so
|
|
@@ -14,13 +14,17 @@ import { describePositionalHandlerSuspect, listPositionalHandlerSuspects } from
|
|
|
14
14
|
* `warn`, never `fail`: the detection is a heuristic on the handler's declared
|
|
15
15
|
* parameters, so a false positive is possible and must not break a build.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* NEEDS A BOOTED APP: the router collects suspects as routes register, so this
|
|
18
|
+
* reads a list the boot pass filled. Before that pass existed the list was
|
|
19
|
+
* always empty and this check always passed — it was green because it had
|
|
20
|
+
* nothing to look at, which is indistinguishable from green because the app is
|
|
21
|
+
* fine. It stays silent when there are no routes for the same reason: a check
|
|
22
|
+
* with no input reports nothing rather than a clean bill of health.
|
|
20
23
|
*/
|
|
21
24
|
const handlerSignatureCheck = {
|
|
22
25
|
name: "handler-signature",
|
|
23
|
-
run: () => {
|
|
26
|
+
run: (context) => {
|
|
27
|
+
if (context.totalRoutes === 0) return;
|
|
24
28
|
const suspects = listPositionalHandlerSuspects();
|
|
25
29
|
if (suspects.length === 0) return {
|
|
26
30
|
name: "handler-signature",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler-signature.check.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"handler-signature.check.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/doctor/checks/handler-signature.check.ts"],"sourcesContent":["import {\n describePositionalHandlerSuspect,\n listPositionalHandlerSuspects,\n} from \"../../../../router/positional-handler-diagnostics\";\nimport type { DoctorCheck } from \"../check.types\";\n\n/**\n * Surfaces route handlers still written against the v4 positional signature,\n * `(request, response)`. v5 calls a handler with a single context object, so\n * the second parameter is always `undefined` and the route fails on its first\n * request with a `TypeError` that names nothing.\n *\n * Verdicts:\n * - one or more suspects → `warn`;\n * - otherwise → `ok`.\n *\n * `warn`, never `fail`: the detection is a heuristic on the handler's declared\n * parameters, so a false positive is possible and must not break a build.\n *\n * NEEDS A BOOTED APP: the router collects suspects as routes register, so this\n * reads a list the boot pass filled. Before that pass existed the list was\n * always empty and this check always passed — it was green because it had\n * nothing to look at, which is indistinguishable from green because the app is\n * fine. It stays silent when there are no routes for the same reason: a check\n * with no input reports nothing rather than a clean bill of health.\n */\nexport const handlerSignatureCheck: DoctorCheck = {\n name: \"handler-signature\",\n run: (context) => {\n if (context.totalRoutes === 0) {\n return undefined;\n }\n\n const suspects = listPositionalHandlerSuspects();\n\n if (suspects.length === 0) {\n return {\n name: \"handler-signature\",\n status: \"ok\",\n detail: \"no handlers look like the v4 positional signature\",\n };\n }\n\n const headline =\n suspects.length === 1\n ? \"1 handler looks like the v4 positional signature\"\n : `${suspects.length} handlers look like the v4 positional signature`;\n\n return {\n name: \"handler-signature\",\n status: \"warn\",\n detail:\n `${headline}:\\n` +\n suspects.map((suspect) => ` - ${describePositionalHandlerSuspect(suspect)}`).join(\"\\n\"),\n };\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAa,wBAAqC;CAChD,MAAM;CACN,MAAM,YAAY;EAChB,IAAI,QAAQ,gBAAgB,GAC1B;EAGF,MAAM,WAAW,8BAA8B;EAE/C,IAAI,SAAS,WAAW,GACtB,OAAO;GACL,MAAM;GACN,QAAQ;GACR,QAAQ;EACV;EAQF,OAAO;GACL,MAAM;GACN,QAAQ;GACR,QACE,GARF,SAAS,WAAW,IAChB,qDACA,GAAG,SAAS,OAAO,iDAMT,OACZ,SAAS,KAAK,YAAY,OAAO,iCAAiC,OAAO,GAAG,EAAE,KAAK,IAAI;EAC3F;CACF;AACF"}
|
|
@@ -1,31 +1,97 @@
|
|
|
1
1
|
import { config } from "../../../../config/config-getter.mjs";
|
|
2
|
+
import { container } from "../../../../container/index.mjs";
|
|
3
|
+
import { router } from "../../../../router/router.mjs";
|
|
2
4
|
|
|
3
|
-
//#region
|
|
5
|
+
//#region core/src/cli/commands/doctor/checks/health.check.ts
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
6
|
-
* endpoints will be exposed. The HTTP connector registers them automatically
|
|
7
|
-
* unless `http.health.enabled` is explicitly `false`, so this check reads that
|
|
8
|
-
* config flag and the (overridable) paths.
|
|
7
|
+
* Ask the booted Fastify instance whether a GET route exists at this path.
|
|
9
8
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* `hasRoute` is the instance's own answer, not a re-derivation of the config
|
|
10
|
+
* that was supposed to produce it — which is the entire point of asking it.
|
|
11
|
+
* Guarded because it is the one part of this check that depends on a Fastify
|
|
12
|
+
* API: if the instance cannot answer, the check says so instead of inventing a
|
|
13
|
+
* verdict from the config flag it is meant to be verifying.
|
|
14
|
+
*/
|
|
15
|
+
function fastifyHasGet(path) {
|
|
16
|
+
const http = container.has("http.server") ? container.get("http.server") : void 0;
|
|
17
|
+
if (!http || typeof http.hasRoute !== "function") return void 0;
|
|
18
|
+
try {
|
|
19
|
+
return Boolean(http.hasRoute({
|
|
20
|
+
method: "GET",
|
|
21
|
+
url: path
|
|
22
|
+
}));
|
|
23
|
+
} catch {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Whether an app route already claims this path. The HTTP connector puts the
|
|
29
|
+
* probes on the Fastify instance directly and the router scans app routes onto
|
|
30
|
+
* the same instance at `start()`, so a collision is a duplicate registration:
|
|
31
|
+
* Fastify refuses it and the server does not start.
|
|
32
|
+
*/
|
|
33
|
+
function appRouteClaims(path) {
|
|
34
|
+
return router.list().some((route) => {
|
|
35
|
+
const method = String(route.method).toUpperCase();
|
|
36
|
+
return route.path === path && (method === "GET" || method === "ALL");
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Confirms the liveness (`/health`) and readiness (`/ready`) endpoints are
|
|
41
|
+
* really there.
|
|
42
|
+
*
|
|
43
|
+
* NEEDS A BOOTED APP: the HTTP connector registers the probes during `boot()`,
|
|
44
|
+
* which the boot pass runs. Previously this check read `http.health.enabled`
|
|
45
|
+
* and reported the endpoints as "registered" on that basis alone — in the same
|
|
46
|
+
* report where `routes` said zero, because nothing had been booted at all. It
|
|
47
|
+
* was reporting an intention as a fact, and the two lines contradicted each
|
|
48
|
+
* other in the owner's own run.
|
|
13
49
|
*
|
|
14
|
-
*
|
|
50
|
+
* Verdicts:
|
|
51
|
+
* - no `http` config → not applicable, no line;
|
|
52
|
+
* - `http.health.enabled = false` → `ok`. Turning the probes off is a supported
|
|
53
|
+
* choice, and a warning that fires on a deliberate setting every single run
|
|
54
|
+
* is not read by the time it matters;
|
|
55
|
+
* - an app route already claims a probe's path → `fail`: Fastify will refuse
|
|
56
|
+
* the duplicate and the server will not start;
|
|
57
|
+
* - the instance says the route is absent → `fail`;
|
|
58
|
+
* - otherwise → `ok`, with the paths that are actually registered.
|
|
15
59
|
*/
|
|
16
60
|
const healthCheck = {
|
|
17
61
|
name: "health",
|
|
18
|
-
run: () => {
|
|
62
|
+
run: (context) => {
|
|
63
|
+
if (!config.get("http")) return;
|
|
19
64
|
const healthConfig = config.get("http.health");
|
|
20
65
|
if (healthConfig?.enabled === false) return {
|
|
66
|
+
name: "health",
|
|
67
|
+
status: "ok",
|
|
68
|
+
detail: "probes disabled by config (http.health.enabled = false)"
|
|
69
|
+
};
|
|
70
|
+
const livenessPath = healthConfig?.path ?? "/health";
|
|
71
|
+
const readinessPath = healthConfig?.readinessPath ?? "/ready";
|
|
72
|
+
const collisions = [livenessPath, readinessPath].filter(appRouteClaims);
|
|
73
|
+
if (collisions.length > 0) return {
|
|
74
|
+
name: "health",
|
|
75
|
+
status: "fail",
|
|
76
|
+
detail: `an app route already claims ${collisions.join(" and ")} — Fastify refuses the duplicate registration and the server will not start. Move the app route, or rename the probe via http.health.path / http.health.readinessPath`
|
|
77
|
+
};
|
|
78
|
+
if (!context.connectors.booted.includes("http")) return;
|
|
79
|
+
const registered = [livenessPath, readinessPath].map(fastifyHasGet);
|
|
80
|
+
if (registered.some((answer) => answer === void 0)) return {
|
|
21
81
|
name: "health",
|
|
22
82
|
status: "warn",
|
|
23
|
-
detail:
|
|
83
|
+
detail: `could not read the http server's route table — ${livenessPath} + ${readinessPath} unverified`
|
|
84
|
+
};
|
|
85
|
+
const missing = [livenessPath, readinessPath].filter((_path, index) => !registered[index]);
|
|
86
|
+
if (missing.length > 0) return {
|
|
87
|
+
name: "health",
|
|
88
|
+
status: "fail",
|
|
89
|
+
detail: `enabled in config but not registered on the http server: ${missing.join(", ")}`
|
|
24
90
|
};
|
|
25
91
|
return {
|
|
26
92
|
name: "health",
|
|
27
93
|
status: "ok",
|
|
28
|
-
detail: `liveness ${
|
|
94
|
+
detail: `liveness ${livenessPath} + readiness ${readinessPath} registered`
|
|
29
95
|
};
|
|
30
96
|
}
|
|
31
97
|
};
|