@warlock.js/core 5.30.0 → 5.32.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 +165 -36
- package/README.md +28 -23
- package/bin/source-load-hook.mjs +63 -0
- package/bin/warlock.js +102 -42
- package/esm/application/app.d.mts +3 -3
- package/esm/application/app.d.mts.map +1 -1
- package/esm/application/application-config-types.d.mts +1 -2
- package/esm/application/application-config-types.d.mts.map +1 -1
- package/esm/application/application.d.mts +5 -7
- package/esm/application/application.d.mts.map +1 -1
- package/esm/application/application.mjs +3 -1
- package/esm/application/application.mjs.map +1 -1
- package/esm/application/boot-signal.d.mts +14 -12
- package/esm/application/boot-signal.d.mts.map +1 -1
- package/esm/application/index.d.mts +2 -1
- package/esm/application/index.mjs +1 -1
- package/esm/application/public-url.d.mts +1 -2
- package/esm/application/public-url.d.mts.map +1 -1
- package/esm/application/roles.d.mts +10 -11
- package/esm/application/roles.d.mts.map +1 -1
- package/esm/benchmark/benchmark-snapshots.d.mts +1 -3
- package/esm/benchmark/benchmark-snapshots.d.mts.map +1 -1
- package/esm/benchmark/benchmark.d.mts +1 -3
- package/esm/benchmark/benchmark.d.mts.map +1 -1
- package/esm/benchmark/channels/console.channel.d.mts +1 -3
- package/esm/benchmark/channels/console.channel.d.mts.map +1 -1
- package/esm/benchmark/channels/noop.channel.d.mts +1 -3
- package/esm/benchmark/channels/noop.channel.d.mts.map +1 -1
- package/esm/benchmark/index.mjs +1 -1
- package/esm/benchmark/profiler.d.mts +1 -3
- package/esm/benchmark/profiler.d.mts.map +1 -1
- package/esm/benchmark/profiler.mjs +2 -1
- package/esm/benchmark/profiler.mjs.map +1 -1
- package/esm/benchmark/types.d.mts +22 -17
- package/esm/benchmark/types.d.mts.map +1 -1
- package/esm/bootstrap/setup.d.mts +1 -2
- package/esm/bootstrap/setup.d.mts.map +1 -1
- package/esm/bootstrap.d.mts +1 -2
- package/esm/bootstrap.d.mts.map +1 -1
- package/esm/cache/database-cache-driver.d.mts +3 -5
- package/esm/cache/database-cache-driver.d.mts.map +1 -1
- package/esm/cache/database-cache-driver.mjs +1 -1
- package/esm/cache/index.d.mts +2 -1
- package/esm/cache/index.mjs +1 -1
- package/esm/cli/cli-commands.manager.mjs +6 -3
- package/esm/cli/cli-commands.manager.mjs.map +1 -1
- package/esm/cli/commands/add.command.mjs +4 -2
- package/esm/cli/commands/add.command.mjs.map +1 -1
- package/esm/cli/commands/agents-md/agents-md-command.action.mjs +70 -0
- package/esm/cli/commands/agents-md/agents-md-command.action.mjs.map +1 -0
- package/esm/cli/commands/agents-md.command.mjs +38 -0
- package/esm/cli/commands/agents-md.command.mjs.map +1 -0
- package/esm/cli/commands/board/board-command.action.mjs +279 -0
- package/esm/cli/commands/board/board-command.action.mjs.map +1 -0
- package/esm/cli/commands/board.command.mjs +78 -0
- package/esm/cli/commands/board.command.mjs.map +1 -0
- package/esm/cli/commands/build.command.mjs +6 -1
- package/esm/cli/commands/build.command.mjs.map +1 -1
- package/esm/cli/commands/check/check-command.action.mjs +57 -0
- package/esm/cli/commands/check/check-command.action.mjs.map +1 -0
- package/esm/cli/commands/check/child-typecheck.mjs +66 -0
- package/esm/cli/commands/check/child-typecheck.mjs.map +1 -0
- package/esm/cli/commands/check/format-problems.mjs +43 -0
- package/esm/cli/commands/check/format-problems.mjs.map +1 -0
- package/esm/cli/commands/check/typecheck-command.action.mjs +61 -0
- package/esm/cli/commands/check/typecheck-command.action.mjs.map +1 -0
- package/esm/cli/commands/check.command.mjs +50 -0
- package/esm/cli/commands/check.command.mjs.map +1 -0
- package/esm/cli/commands/dev-server.command.mjs +12 -3
- package/esm/cli/commands/dev-server.command.mjs.map +1 -1
- package/esm/cli/commands/doctor/boot-for-diagnostics.mjs +8 -3
- package/esm/cli/commands/doctor/boot-for-diagnostics.mjs.map +1 -1
- package/esm/cli/commands/doctor/check.types.d.mts +89 -0
- package/esm/cli/commands/doctor/check.types.d.mts.map +1 -0
- package/esm/cli/commands/doctor/checks/config.check.mjs +1 -0
- package/esm/cli/commands/doctor/checks/config.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/connectors.check.mjs +2 -0
- package/esm/cli/commands/doctor/checks/connectors.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/handler-signature.check.mjs +1 -0
- package/esm/cli/commands/doctor/checks/handler-signature.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/health.check.mjs +3 -0
- package/esm/cli/commands/doctor/checks/health.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/jwt-secret.check.mjs +1 -0
- package/esm/cli/commands/doctor/checks/jwt-secret.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/locales-ts-deprecated.check.mjs +23 -27
- package/esm/cli/commands/doctor/checks/locales-ts-deprecated.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/optional-peers.check.mjs +1 -0
- package/esm/cli/commands/doctor/checks/optional-peers.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/release-hygiene.check.mjs +4 -0
- package/esm/cli/commands/doctor/checks/release-hygiene.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/routes.check.mjs +3 -0
- package/esm/cli/commands/doctor/checks/routes.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/doctor-command.action.mjs +15 -6
- package/esm/cli/commands/doctor/doctor-command.action.mjs.map +1 -1
- package/esm/cli/commands/doctor/format-report.mjs +30 -2
- package/esm/cli/commands/doctor/format-report.mjs.map +1 -1
- package/esm/cli/commands/doctor.command.mjs +4 -0
- package/esm/cli/commands/doctor.command.mjs.map +1 -1
- package/esm/cli/commands/explain/explain-command.action.mjs +64 -0
- package/esm/cli/commands/explain/explain-command.action.mjs.map +1 -0
- package/esm/cli/commands/explain.command.mjs +23 -0
- package/esm/cli/commands/explain.command.mjs.map +1 -0
- package/esm/cli/commands/generate/generate.command.mjs +124 -124
- package/esm/cli/commands/generate/generate.command.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/controller.generator.mjs +5 -2
- package/esm/cli/commands/generate/generators/controller.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/endpoint.generator.mjs +313 -0
- package/esm/cli/commands/generate/generators/endpoint.generator.mjs.map +1 -0
- 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 +4 -3
- package/esm/cli/commands/generate/generators/model.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/repository.generator.mjs +3 -1
- package/esm/cli/commands/generate/generators/repository.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/resource.generator.mjs +3 -1
- package/esm/cli/commands/generate/generators/resource.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/service.generator.mjs +3 -1
- package/esm/cli/commands/generate/generators/service.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/templates/endpoint-stubs.mjs +341 -0
- package/esm/cli/commands/generate/templates/endpoint-stubs.mjs.map +1 -0
- package/esm/cli/commands/generate/templates/stubs.mjs +19 -6
- package/esm/cli/commands/generate/templates/stubs.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/endpoint-schema.mjs +136 -0
- package/esm/cli/commands/generate/utils/endpoint-schema.mjs.map +1 -0
- package/esm/cli/commands/generate/utils/name-parser.mjs +2 -2
- 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/prompt.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/writer.mjs +38 -13
- package/esm/cli/commands/generate/utils/writer.mjs.map +1 -1
- package/esm/cli/commands/inspect/inspect-command.action.mjs +73 -0
- package/esm/cli/commands/inspect/inspect-command.action.mjs.map +1 -0
- package/esm/cli/commands/inspect.command.mjs +39 -0
- package/esm/cli/commands/inspect.command.mjs.map +1 -0
- package/esm/cli/commands/issue/collect-environment.mjs +187 -0
- package/esm/cli/commands/issue/collect-environment.mjs.map +1 -0
- package/esm/cli/commands/issue/issue-command.action.mjs +70 -0
- package/esm/cli/commands/issue/issue-command.action.mjs.map +1 -0
- package/esm/cli/commands/issue.command.mjs +31 -0
- package/esm/cli/commands/issue.command.mjs.map +1 -0
- package/esm/cli/commands/mcp/mcp-command.action.mjs +104 -0
- package/esm/cli/commands/mcp/mcp-command.action.mjs.map +1 -0
- package/esm/cli/commands/mcp.command.mjs +76 -0
- package/esm/cli/commands/mcp.command.mjs.map +1 -0
- package/esm/cli/commands/openapi-generator.action.mjs +1 -1
- package/esm/cli/commands/openapi-generator.action.mjs.map +1 -1
- package/esm/cli/commands/openapi-generator.command.mjs.map +1 -1
- package/esm/cli/commands/postman-generator.action.mjs +1 -1
- package/esm/cli/commands/postman-generator.action.mjs.map +1 -1
- package/esm/cli/commands/postman-generator.command.mjs.map +1 -1
- package/esm/cli/commands/routes/format-routes-table.mjs +1 -1
- package/esm/cli/commands/routes/route-row.mjs +1 -1
- package/esm/cli/commands/routes/routes-diff.action.mjs +3 -3
- package/esm/cli/commands/routes/routes-diff.action.mjs.map +1 -1
- package/esm/cli/commands/test.command.mjs +131 -0
- package/esm/cli/commands/test.command.mjs.map +1 -0
- package/esm/cli/commands/trace/trace-command.action.mjs +145 -0
- package/esm/cli/commands/trace/trace-command.action.mjs.map +1 -0
- package/esm/cli/commands/trace.command.mjs +60 -0
- package/esm/cli/commands/trace.command.mjs.map +1 -0
- package/esm/cli/commands/typecheck.command.mjs +40 -0
- package/esm/cli/commands/typecheck.command.mjs.map +1 -0
- package/esm/cli/commands/upgrade.command.mjs +46 -0
- package/esm/cli/commands/upgrade.command.mjs.map +1 -0
- package/esm/cli/commands-loader.mjs +1 -1
- package/esm/cli/flush-and-exit.mjs +34 -0
- package/esm/cli/flush-and-exit.mjs.map +1 -0
- package/esm/cli/framework-cli-commands.mjs +25 -1
- package/esm/cli/framework-cli-commands.mjs.map +1 -1
- package/esm/cli/parse-cli-args.mjs +3 -2
- package/esm/cli/parse-cli-args.mjs.map +1 -1
- package/esm/cli/start.d.mts +1 -1
- package/esm/cli/string-similarity.mjs +1 -1
- package/esm/commands/cli-command.d.mts +2 -4
- package/esm/commands/cli-command.d.mts.map +1 -1
- package/esm/commands/index.d.mts +2 -1
- package/esm/commands/index.mjs +1 -1
- package/esm/commands/types.d.mts +8 -8
- package/esm/commands/types.d.mts.map +1 -1
- package/esm/config/config-getter.d.mts +2 -3
- package/esm/config/config-getter.d.mts.map +1 -1
- package/esm/config/config-getter.mjs +5 -5
- package/esm/config/config-getter.mjs.map +1 -1
- package/esm/config/config-handlers.d.mts +1 -3
- package/esm/config/config-handlers.d.mts.map +1 -1
- package/esm/config/config-loader.d.mts +1 -2
- package/esm/config/config-loader.d.mts.map +1 -1
- package/esm/config/config-loader.mjs +35 -14
- package/esm/config/config-loader.mjs.map +1 -1
- package/esm/config/config-manager.mjs +1 -1
- package/esm/config/config-schema.d.mts +70 -0
- package/esm/config/config-schema.d.mts.map +1 -0
- package/esm/config/config-schema.mjs +77 -0
- package/esm/config/config-schema.mjs.map +1 -0
- package/esm/config/config-setter.d.mts +2 -4
- package/esm/config/config-setter.d.mts.map +1 -1
- package/esm/config/config-setter.mjs +2 -2
- package/esm/config/config-setter.mjs.map +1 -1
- package/esm/config/config-special-handlers.d.mts +2 -4
- package/esm/config/config-special-handlers.d.mts.map +1 -1
- package/esm/config/index.d.mts +7 -0
- package/esm/config/index.mjs +2 -1
- package/esm/config/types.d.mts +4 -5
- package/esm/config/types.d.mts.map +1 -1
- package/esm/connectors/access-connector.d.mts +1 -3
- package/esm/connectors/access-connector.d.mts.map +1 -1
- package/esm/connectors/access-connector.mjs +2 -2
- package/esm/connectors/access-connector.mjs.map +1 -1
- package/esm/connectors/ai-connector.d.mts +1 -3
- package/esm/connectors/ai-connector.d.mts.map +1 -1
- package/esm/connectors/ai-connector.mjs +2 -2
- package/esm/connectors/ai-connector.mjs.map +1 -1
- package/esm/connectors/assert-no-reserved-connector-names.d.mts +1 -3
- package/esm/connectors/assert-no-reserved-connector-names.d.mts.map +1 -1
- package/esm/connectors/assert-no-reserved-connector-names.mjs +2 -1
- package/esm/connectors/assert-no-reserved-connector-names.mjs.map +1 -1
- package/esm/connectors/assert-unique-connector-names.d.mts +1 -3
- package/esm/connectors/assert-unique-connector-names.d.mts.map +1 -1
- package/esm/connectors/assert-unique-connector-names.mjs +26 -1
- package/esm/connectors/assert-unique-connector-names.mjs.map +1 -1
- package/esm/connectors/base-connector.d.mts +1 -3
- package/esm/connectors/base-connector.d.mts.map +1 -1
- package/esm/connectors/cache-connector.d.mts +1 -3
- package/esm/connectors/cache-connector.d.mts.map +1 -1
- package/esm/connectors/cache-connector.mjs +3 -3
- package/esm/connectors/cache-connector.mjs.map +1 -1
- package/esm/connectors/connectors-manager.d.mts +2 -4
- package/esm/connectors/connectors-manager.d.mts.map +1 -1
- package/esm/connectors/connectors-manager.mjs +2 -2
- package/esm/connectors/connectors-manager.mjs.map +1 -1
- package/esm/connectors/database-connector.d.mts +1 -3
- package/esm/connectors/database-connector.d.mts.map +1 -1
- package/esm/connectors/database-connector.mjs +2 -2
- package/esm/connectors/database-connector.mjs.map +1 -1
- package/esm/connectors/describe-server-address.mjs +4 -4
- package/esm/connectors/describe-server-address.mjs.map +1 -1
- package/esm/connectors/herald-connector.d.mts +1 -3
- package/esm/connectors/herald-connector.d.mts.map +1 -1
- package/esm/connectors/herald-connector.mjs +2 -2
- package/esm/connectors/herald-connector.mjs.map +1 -1
- package/esm/connectors/http-connector.d.mts +1 -3
- package/esm/connectors/http-connector.d.mts.map +1 -1
- package/esm/connectors/http-connector.mjs +11 -9
- package/esm/connectors/http-connector.mjs.map +1 -1
- package/esm/connectors/index.d.mts +2 -1
- package/esm/connectors/index.mjs +1 -1
- package/esm/connectors/logger-connector.d.mts +1 -3
- package/esm/connectors/logger-connector.d.mts.map +1 -1
- package/esm/connectors/logger-connector.mjs +2 -2
- package/esm/connectors/logger-connector.mjs.map +1 -1
- package/esm/connectors/mail-connector.d.mts +1 -3
- package/esm/connectors/mail-connector.d.mts.map +1 -1
- package/esm/connectors/mail-connector.mjs +2 -2
- package/esm/connectors/mail-connector.mjs.map +1 -1
- package/esm/connectors/notifications-connector.d.mts +1 -3
- package/esm/connectors/notifications-connector.d.mts.map +1 -1
- package/esm/connectors/notifications-connector.mjs +2 -2
- package/esm/connectors/notifications-connector.mjs.map +1 -1
- package/esm/connectors/register-configured-connectors.d.mts +2 -4
- package/esm/connectors/register-configured-connectors.d.mts.map +1 -1
- package/esm/connectors/single-server-warnings.mjs.map +1 -1
- package/esm/connectors/socket-connector.d.mts +1 -3
- package/esm/connectors/socket-connector.d.mts.map +1 -1
- package/esm/connectors/socket-connector.mjs +12 -10
- package/esm/connectors/socket-connector.mjs.map +1 -1
- package/esm/connectors/storage.connector.d.mts +1 -3
- package/esm/connectors/storage.connector.d.mts.map +1 -1
- package/esm/connectors/storage.connector.mjs +2 -2
- package/esm/connectors/storage.connector.mjs.map +1 -1
- package/esm/connectors/types.d.mts +17 -14
- package/esm/connectors/types.d.mts.map +1 -1
- package/esm/container/container-instance-registry.mjs.map +1 -1
- package/esm/container/development-app-modules.d.mts +7 -5
- package/esm/container/development-app-modules.d.mts.map +1 -1
- package/esm/container/development-model-modules.d.mts +6 -5
- package/esm/container/development-model-modules.d.mts.map +1 -1
- package/esm/container/index.d.mts +4 -4
- package/esm/container/index.d.mts.map +1 -1
- package/esm/container/index.mjs.map +1 -1
- package/esm/database/index.d.mts +3 -1
- package/esm/database/index.mjs +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 +2 -31
- package/esm/database/models/database-log/database-log.d.mts.map +1 -1
- package/esm/database/models/database-log/index.d.mts +2 -1
- package/esm/database/models/database-log/index.mjs +1 -1
- package/esm/database/seed-command-action.mjs +1 -1
- package/esm/database/seeds/seeder.d.mts +2 -4
- package/esm/database/seeds/seeder.d.mts.map +1 -1
- package/esm/database/seeds/seeder.errors.d.mts +6 -3
- package/esm/database/seeds/seeder.errors.d.mts.map +1 -1
- package/esm/database/seeds/seeder.errors.mjs +2 -0
- package/esm/database/seeds/seeder.errors.mjs.map +1 -1
- package/esm/database/seeds/seeders.manager.mjs +2 -1
- package/esm/database/seeds/seeders.manager.mjs.map +1 -1
- package/esm/database/seeds/types.d.mts +7 -8
- package/esm/database/seeds/types.d.mts.map +1 -1
- package/esm/database/utils.d.mts +4 -5
- package/esm/database/utils.d.mts.map +1 -1
- package/esm/dev-server/app-module-registry.mjs +1 -1
- package/esm/dev-server/boot-precondition-error.mjs +1 -0
- package/esm/dev-server/boot-precondition-error.mjs.map +1 -1
- package/esm/dev-server/create-worker.mjs +17 -9
- package/esm/dev-server/create-worker.mjs.map +1 -1
- package/esm/dev-server/dependency-graph.d.mts +1 -3
- 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-agent-tooling.mjs +135 -0
- package/esm/dev-server/dev-agent-tooling.mjs.map +1 -0
- package/esm/dev-server/dev-logger.mjs.map +1 -1
- package/esm/dev-server/development-server.mjs +8 -0
- package/esm/dev-server/development-server.mjs.map +1 -1
- package/esm/dev-server/extract-translation-keys.mjs +16 -17
- package/esm/dev-server/extract-translation-keys.mjs.map +1 -1
- package/esm/dev-server/file-manager.d.mts +3 -7
- package/esm/dev-server/file-manager.d.mts.map +1 -1
- package/esm/dev-server/file-operations.d.mts +1 -3
- package/esm/dev-server/file-operations.d.mts.map +1 -1
- package/esm/dev-server/files-orchestrator.mjs +4 -5
- package/esm/dev-server/files-orchestrator.mjs.map +1 -1
- package/esm/dev-server/files-watcher.mjs +12 -11
- package/esm/dev-server/files-watcher.mjs.map +1 -1
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.mjs +2 -3
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.mjs.map +1 -1
- package/esm/dev-server/health-checker/checkers/oxlint-health-checker.mjs +33 -0
- package/esm/dev-server/health-checker/checkers/oxlint-health-checker.mjs.map +1 -0
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.mjs +36 -115
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.mjs.map +1 -1
- package/esm/dev-server/health-checker/default-health-checkers.mjs +31 -0
- package/esm/dev-server/health-checker/default-health-checkers.mjs.map +1 -0
- package/esm/dev-server/health-checker/file-health-checker.contract.d.mts +12 -6
- 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 +2 -2
- package/esm/dev-server/health-checker/file-health-result.d.mts.map +1 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs +16 -4
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs.map +1 -1
- package/esm/dev-server/health-checker/oxlint-runner.mjs +303 -0
- package/esm/dev-server/health-checker/oxlint-runner.mjs.map +1 -0
- package/esm/dev-server/health-checker/workers/eslint-health.worker.d.mts +1 -1
- package/esm/dev-server/health-checker/workers/oxlint-health.worker.d.mts +1 -0
- package/esm/dev-server/health-checker/workers/oxlint-health.worker.mjs +42 -0
- package/esm/dev-server/health-checker/workers/oxlint-health.worker.mjs.map +1 -0
- package/esm/dev-server/health-checker/workers/ts-health.worker.d.mts +1 -1
- package/esm/dev-server/health-checker/workers/ts-health.worker.mjs +40 -174
- package/esm/dev-server/health-checker/workers/ts-health.worker.mjs.map +1 -1
- package/esm/dev-server/loader/hook-thread.d.mts +4 -8
- package/esm/dev-server/loader/hook-thread.d.mts.map +1 -1
- package/esm/dev-server/loader/load-hook.d.mts +10 -6
- package/esm/dev-server/loader/load-hook.d.mts.map +1 -1
- package/esm/dev-server/loader/load-hook.mjs +4 -3
- package/esm/dev-server/loader/load-hook.mjs.map +1 -1
- package/esm/dev-server/loader/loader-port-acks.mjs +1 -1
- package/esm/dev-server/loader/loader-port-acks.mjs.map +1 -1
- package/esm/dev-server/loader/own-resolver.mjs +1 -1
- package/esm/dev-server/loader/register-loader.mjs +4 -3
- package/esm/dev-server/loader/register-loader.mjs.map +1 -1
- package/esm/dev-server/loader/resolve-hook.d.mts +2 -2
- package/esm/dev-server/loader/resolve-hook.d.mts.map +1 -1
- package/esm/dev-server/loader/resolve-hook.mjs +3 -2
- package/esm/dev-server/loader/resolve-hook.mjs.map +1 -1
- package/esm/dev-server/loader/transpile-cache.mjs +3 -2
- package/esm/dev-server/loader/transpile-cache.mjs.map +1 -1
- package/esm/dev-server/manifest-manager.d.mts +1 -3
- package/esm/dev-server/manifest-manager.d.mts.map +1 -1
- package/esm/dev-server/model-module-registry.mjs +3 -3
- package/esm/dev-server/model-module-registry.mjs.map +1 -1
- package/esm/dev-server/model-resource-typings.mjs +40 -47
- package/esm/dev-server/model-resource-typings.mjs.map +1 -1
- package/esm/dev-server/module-loader.mjs +3 -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/parse-imports.mjs +7 -39
- package/esm/dev-server/parse-imports.mjs.map +1 -1
- package/esm/dev-server/read-config-ast.mjs +3 -33
- package/esm/dev-server/read-config-ast.mjs.map +1 -1
- package/esm/dev-server/ready-block.mjs +1 -1
- package/esm/dev-server/route-types-publisher.mjs +1 -1
- package/esm/dev-server/shortcuts.mjs +1 -1
- package/esm/dev-server/special-files-collector.d.mts +2 -4
- package/esm/dev-server/special-files-collector.d.mts.map +1 -1
- package/esm/dev-server/start-development-server.mjs.map +1 -1
- package/esm/dev-server/supervisor.mjs +1 -1
- package/esm/dev-server/translation-keys-sources.mjs +1 -1
- package/esm/dev-server/translation-keys-sources.mjs.map +1 -1
- package/esm/dev-server/tsconfig-manager.mjs +3 -3
- package/esm/dev-server/tsconfig-manager.mjs.map +1 -1
- package/esm/dev-server/type-generator.mjs +31 -38
- package/esm/dev-server/type-generator.mjs.map +1 -1
- package/esm/dev-server/types.d.mts +3 -4
- package/esm/dev-server/types.d.mts.map +1 -1
- package/esm/dev-server/update-check-cache.mjs +2 -2
- package/esm/dev-server/update-check-cache.mjs.map +1 -1
- package/esm/encryption/encrypt.d.mts +2 -3
- package/esm/encryption/encrypt.d.mts.map +1 -1
- package/esm/encryption/hash.d.mts +1 -2
- package/esm/encryption/hash.d.mts.map +1 -1
- package/esm/encryption/index.mjs +1 -1
- package/esm/encryption/password.d.mts +2 -3
- package/esm/encryption/password.d.mts.map +1 -1
- package/esm/encryption/types.d.mts +2 -3
- package/esm/encryption/types.d.mts.map +1 -1
- package/esm/errors/container-key-missing-error.mjs +1 -0
- package/esm/errors/container-key-missing-error.mjs.map +1 -1
- package/esm/errors/error-codes.d.mts +660 -0
- package/esm/errors/error-codes.d.mts.map +1 -0
- package/esm/errors/error-codes.mjs +634 -0
- package/esm/errors/error-codes.mjs.map +1 -0
- package/esm/errors/esbuild-binary-missing-error.mjs +1 -0
- package/esm/errors/esbuild-binary-missing-error.mjs.map +1 -1
- package/esm/errors/index.d.mts +3 -1
- package/esm/errors/index.mjs +3 -1
- package/esm/errors/unknown-locale-error.mjs +1 -0
- package/esm/errors/unknown-locale-error.mjs.map +1 -1
- package/esm/errors/warlock-error.d.mts +21 -0
- package/esm/errors/warlock-error.d.mts.map +1 -0
- package/esm/errors/warlock-error.mjs +22 -0
- package/esm/errors/warlock-error.mjs.map +1 -0
- package/esm/generations/add-command.action.mjs +22 -5
- package/esm/generations/add-command.action.mjs.map +1 -1
- package/esm/generations/features/access.feature.mjs +1 -1
- package/esm/generations/features/access.feature.mjs.map +1 -1
- package/esm/generations/features/bull-board.feature.mjs +3 -2
- package/esm/generations/features/bull-board.feature.mjs.map +1 -1
- package/esm/generations/features/mysql.feature.mjs.map +1 -1
- package/esm/generations/features/notifications.feature.mjs +7 -3
- package/esm/generations/features/notifications.feature.mjs.map +1 -1
- package/esm/generations/features/queue.feature.mjs +1 -1
- package/esm/generations/features/queue.feature.mjs.map +1 -1
- package/esm/generations/features/react-email.feature.mjs +1 -1
- package/esm/generations/features/react-email.feature.mjs.map +1 -1
- package/esm/generations/features/shadcn.feature.mjs +1 -1
- package/esm/generations/features/shadcn.feature.mjs.map +1 -1
- package/esm/generations/features/shared/link-ai-package-import.mjs +1 -1
- package/esm/generations/features/shared/link-ai-package-import.mjs.map +1 -1
- package/esm/generations/features/shared/merge-web-sitemap-config.mjs +16 -23
- package/esm/generations/features/shared/merge-web-sitemap-config.mjs.map +1 -1
- package/esm/generations/features/shared/patch-tsconfig-include.mjs +2 -2
- package/esm/generations/features/shared/patch-tsconfig-include.mjs.map +1 -1
- package/esm/generations/features/shared/relocate-conflicting-home-route.mjs +2 -2
- package/esm/generations/features/shared/relocate-conflicting-home-route.mjs.map +1 -1
- package/esm/generations/features/sitemap.feature.mjs +3 -2
- package/esm/generations/features/sitemap.feature.mjs.map +1 -1
- package/esm/generations/features/tailwind.feature.mjs +1 -1
- package/esm/generations/features/tailwind.feature.mjs.map +1 -1
- package/esm/generations/features/test.feature.mjs +11 -6
- package/esm/generations/features/test.feature.mjs.map +1 -1
- package/esm/generations/features/web.feature.mjs +1 -1
- package/esm/generations/features/web.feature.mjs.map +1 -1
- package/esm/generations/generation-fs.mjs +73 -0
- package/esm/generations/generation-fs.mjs.map +1 -0
- package/esm/generations/generation-run.mjs +185 -0
- package/esm/generations/generation-run.mjs.map +1 -0
- package/esm/generations/stubs.mjs +156 -14
- package/esm/generations/stubs.mjs.map +1 -1
- package/esm/http/boot-port-preflight.d.mts +4 -5
- package/esm/http/boot-port-preflight.d.mts.map +1 -1
- package/esm/http/boot-port-preflight.mjs +2 -2
- package/esm/http/boot-port-preflight.mjs.map +1 -1
- package/esm/http/bounded-stream-queue.d.mts +10 -0
- package/esm/http/bounded-stream-queue.d.mts.map +1 -0
- package/esm/http/bounded-stream-queue.mjs +97 -0
- package/esm/http/bounded-stream-queue.mjs.map +1 -0
- package/esm/http/build-cors-options.mjs +2 -2
- package/esm/http/build-cors-options.mjs.map +1 -1
- package/esm/http/build-rate-limit-options.d.mts +15 -3
- package/esm/http/build-rate-limit-options.d.mts.map +1 -1
- package/esm/http/build-rate-limit-options.mjs +1 -1
- package/esm/http/build-rate-limit-options.mjs.map +1 -1
- package/esm/http/conditional-request.d.mts +87 -0
- package/esm/http/conditional-request.d.mts.map +1 -0
- package/esm/http/conditional-request.mjs +121 -0
- package/esm/http/conditional-request.mjs.map +1 -0
- package/esm/http/config.d.mts +2 -4
- package/esm/http/config.d.mts.map +1 -1
- package/esm/http/config.mjs +2 -2
- package/esm/http/config.mjs.map +1 -1
- package/esm/http/context/request-context.d.mts +6 -7
- package/esm/http/context/request-context.d.mts.map +1 -1
- package/esm/http/context/request-memo.d.mts +1 -2
- package/esm/http/context/request-memo.d.mts.map +1 -1
- package/esm/http/createHttpApplication.d.mts +2 -3
- package/esm/http/createHttpApplication.d.mts.map +1 -1
- package/esm/http/createHttpApplication.mjs +2 -2
- package/esm/http/createHttpApplication.mjs.map +1 -1
- package/esm/http/csp.d.mts +12 -12
- package/esm/http/csp.d.mts.map +1 -1
- package/esm/http/csp.mjs +3 -2
- package/esm/http/csp.mjs.map +1 -1
- package/esm/http/csrf-default-guard.d.mts +2 -4
- package/esm/http/csrf-default-guard.d.mts.map +1 -1
- package/esm/http/csrf-default-guard.mjs +1 -1
- package/esm/http/csrf-default-guard.mjs.map +1 -1
- package/esm/http/csrf-origin-policy.d.mts +7 -9
- package/esm/http/csrf-origin-policy.d.mts.map +1 -1
- package/esm/http/csrf-origin-policy.mjs +2 -2
- package/esm/http/csrf-origin-policy.mjs.map +1 -1
- package/esm/http/database/RequestLog.d.mts +26 -87
- package/esm/http/database/RequestLog.d.mts.map +1 -1
- package/esm/http/error-codes.d.mts +1 -2
- package/esm/http/error-codes.d.mts.map +1 -1
- package/esm/http/error-mapper.d.mts +2 -4
- package/esm/http/error-mapper.d.mts.map +1 -1
- package/esm/http/error-mapper.mjs +2 -2
- package/esm/http/error-mapper.mjs.map +1 -1
- package/esm/http/errors/errors.d.mts +30 -29
- package/esm/http/errors/errors.d.mts.map +1 -1
- package/esm/http/errors/errors.mjs +1 -0
- package/esm/http/errors/errors.mjs.map +1 -1
- package/esm/http/escape-header-value.d.mts +17 -0
- package/esm/http/escape-header-value.d.mts.map +1 -0
- package/esm/http/escape-header-value.mjs +27 -0
- package/esm/http/escape-header-value.mjs.map +1 -0
- package/esm/http/events.d.mts +2 -4
- package/esm/http/events.d.mts.map +1 -1
- package/esm/http/flush-pending-cookies.mjs.map +1 -1
- package/esm/http/health.d.mts +4 -4
- package/esm/http/health.d.mts.map +1 -1
- package/esm/http/index.d.mts +9 -3
- package/esm/http/index.mjs +5 -2
- package/esm/http/lazy-static.mjs +194 -0
- package/esm/http/lazy-static.mjs.map +1 -0
- package/esm/http/middleware/cache-response-middleware.d.mts +2 -4
- package/esm/http/middleware/cache-response-middleware.d.mts.map +1 -1
- package/esm/http/middleware/concurrency-limit.middleware.d.mts +3 -3
- package/esm/http/middleware/concurrency-limit.middleware.d.mts.map +1 -1
- package/esm/http/middleware/idempotency.middleware.d.mts +3 -3
- package/esm/http/middleware/idempotency.middleware.d.mts.map +1 -1
- package/esm/http/middleware/idempotency.middleware.mjs +6 -6
- package/esm/http/middleware/idempotency.middleware.mjs.map +1 -1
- package/esm/http/middleware/index.d.mts +3 -1
- package/esm/http/middleware/index.mjs +1 -1
- package/esm/http/middleware/inject-request-context.d.mts +2 -4
- package/esm/http/middleware/inject-request-context.d.mts.map +1 -1
- package/esm/http/middleware/inject-request-context.mjs +3 -3
- package/esm/http/middleware/inject-request-context.mjs.map +1 -1
- package/esm/http/middleware/ip-filter.middleware.d.mts +3 -3
- package/esm/http/middleware/ip-filter.middleware.d.mts.map +1 -1
- package/esm/http/middleware/maintenance.middleware.d.mts +3 -3
- package/esm/http/middleware/maintenance.middleware.d.mts.map +1 -1
- package/esm/http/middleware/maintenance.middleware.mjs +4 -4
- package/esm/http/middleware/maintenance.middleware.mjs.map +1 -1
- package/esm/http/middleware/max-body-size.middleware.d.mts +2 -2
- package/esm/http/middleware/max-body-size.middleware.d.mts.map +1 -1
- package/esm/http/middleware/middleware-list.d.mts +1 -3
- package/esm/http/middleware/middleware-list.d.mts.map +1 -1
- package/esm/http/middleware/rate-limit.middleware.d.mts +3 -3
- package/esm/http/middleware/rate-limit.middleware.d.mts.map +1 -1
- package/esm/http/middleware/rate-limit.middleware.mjs +2 -2
- package/esm/http/middleware/rate-limit.middleware.mjs.map +1 -1
- package/esm/http/middleware/utils/cidr-match.d.mts +2 -3
- package/esm/http/middleware/utils/cidr-match.d.mts.map +1 -1
- package/esm/http/middleware/utils/idempotency-key.d.mts +3 -5
- package/esm/http/middleware/utils/idempotency-key.d.mts.map +1 -1
- package/esm/http/middleware/utils/index.d.mts +2 -1
- package/esm/http/middleware/utils/parse-size.d.mts +1 -2
- package/esm/http/middleware/utils/parse-size.d.mts.map +1 -1
- package/esm/http/middleware/utils/parse-size.mjs +2 -2
- package/esm/http/middleware/utils/parse-size.mjs.map +1 -1
- package/esm/http/plugins.d.mts +2 -4
- package/esm/http/plugins.d.mts.map +1 -1
- package/esm/http/plugins.mjs +17 -14
- package/esm/http/plugins.mjs.map +1 -1
- package/esm/http/port-preflight.d.mts +3 -4
- package/esm/http/port-preflight.d.mts.map +1 -1
- package/esm/http/rate-limit-cache-store.mjs +6 -4
- package/esm/http/rate-limit-cache-store.mjs.map +1 -1
- package/esm/http/ready-report.d.mts +15 -10
- package/esm/http/ready-report.d.mts.map +1 -1
- package/esm/http/request-controller.d.mts +1 -3
- package/esm/http/request-controller.d.mts.map +1 -1
- package/esm/http/request-log-snapshot.d.mts +26 -15
- package/esm/http/request-log-snapshot.d.mts.map +1 -1
- package/esm/http/request-log-snapshot.mjs +85 -6
- package/esm/http/request-log-snapshot.mjs.map +1 -1
- package/esm/http/request.d.mts +6 -5
- package/esm/http/request.d.mts.map +1 -1
- package/esm/http/request.mjs +13 -11
- package/esm/http/request.mjs.map +1 -1
- package/esm/http/response.d.mts +23 -12
- package/esm/http/response.d.mts.map +1 -1
- package/esm/http/response.mjs +169 -81
- package/esm/http/response.mjs.map +1 -1
- package/esm/http/safe-redirect.d.mts +50 -0
- package/esm/http/safe-redirect.d.mts.map +1 -0
- package/esm/http/safe-redirect.mjs +80 -0
- package/esm/http/safe-redirect.mjs.map +1 -0
- package/esm/http/serialized.d.mts +12 -13
- package/esm/http/serialized.d.mts.map +1 -1
- package/esm/http/server-rebuilt.d.mts +3 -5
- package/esm/http/server-rebuilt.d.mts.map +1 -1
- package/esm/http/server.d.mts +11 -9
- package/esm/http/server.d.mts.map +1 -1
- package/esm/http/server.mjs +17 -7
- package/esm/http/server.mjs.map +1 -1
- package/esm/http/stream-react-response.d.mts +7 -7
- package/esm/http/stream-react-response.d.mts.map +1 -1
- package/esm/http/stream-transport.mjs +4 -2
- package/esm/http/stream-transport.mjs.map +1 -1
- package/esm/http/tracing/index.mjs +1 -1
- package/esm/http/tracing/trace-id.d.mts +2 -3
- package/esm/http/tracing/trace-id.d.mts.map +1 -1
- package/esm/http/tracing/tracing-dispatcher.d.mts +10 -11
- package/esm/http/tracing/tracing-dispatcher.d.mts.map +1 -1
- package/esm/http/tracing/tracing-dispatcher.mjs +2 -2
- package/esm/http/tracing/tracing-dispatcher.mjs.map +1 -1
- package/esm/http/tracing/tracing.type.d.mts +11 -9
- package/esm/http/tracing/tracing.type.d.mts.map +1 -1
- package/esm/http/types.d.mts +78 -39
- package/esm/http/types.d.mts.map +1 -1
- package/esm/http/uploaded-file.d.mts +6 -5
- package/esm/http/uploaded-file.d.mts.map +1 -1
- package/esm/http/uploads/generate-image-variant.mjs +1 -1
- package/esm/http/uploads/generate-image-variants.d.mts +13 -10
- package/esm/http/uploads/generate-image-variants.d.mts.map +1 -1
- package/esm/http/uploads/generate-image-variants.mjs +62 -25
- package/esm/http/uploads/generate-image-variants.mjs.map +1 -1
- package/esm/http/uploads/image-variant-cache-entries.mjs +78 -0
- package/esm/http/uploads/image-variant-cache-entries.mjs.map +1 -0
- package/esm/http/uploads/image-variant-cache.mjs +72 -30
- package/esm/http/uploads/image-variant-cache.mjs.map +1 -1
- package/esm/http/uploads/image-variant-types.d.mts +9 -9
- package/esm/http/uploads/image-variant-types.d.mts.map +1 -1
- package/esm/http/uploads/image-variants-config-error.d.mts +4 -3
- package/esm/http/uploads/image-variants-config-error.d.mts.map +1 -1
- package/esm/http/uploads/image-variants-config-error.mjs +3 -2
- package/esm/http/uploads/image-variants-config-error.mjs.map +1 -1
- package/esm/http/uploads/index.d.mts +2 -1
- package/esm/http/uploads/index.mjs +1 -1
- package/esm/http/uploads/load-variant-source.mjs +1 -1
- package/esm/http/uploads/load-variant-source.mjs.map +1 -1
- package/esm/http/uploads/parse-uploaded-file-query.mjs +1 -1
- package/esm/http/uploads/parse-uploaded-file-query.mjs.map +1 -1
- package/esm/http/uploads/purge-image-variants.d.mts +9 -6
- package/esm/http/uploads/purge-image-variants.d.mts.map +1 -1
- package/esm/http/uploads/purge-image-variants.mjs +16 -16
- package/esm/http/uploads/purge-image-variants.mjs.map +1 -1
- package/esm/http/uploads/remote-variant-source.mjs +115 -0
- package/esm/http/uploads/remote-variant-source.mjs.map +1 -0
- package/esm/http/uploads/resolve-image-variant.d.mts +6 -9
- package/esm/http/uploads/resolve-image-variant.d.mts.map +1 -1
- package/esm/http/uploads/resolve-image-variant.mjs +10 -18
- package/esm/http/uploads/resolve-image-variant.mjs.map +1 -1
- package/esm/http/uploads/resolve-image-variants-config.mjs +7 -5
- package/esm/http/uploads/resolve-image-variants-config.mjs.map +1 -1
- package/esm/http/uploads/resolve-original-content-type.mjs +1 -1
- package/esm/http/uploads/resolve-original-content-type.mjs.map +1 -1
- package/esm/http/uploads/resolve-remote-image-variant.mjs +89 -0
- package/esm/http/uploads/resolve-remote-image-variant.mjs.map +1 -0
- package/esm/http/uploads/trim-image-variant-cache.mjs +193 -0
- package/esm/http/uploads/trim-image-variant-cache.mjs.map +1 -0
- package/esm/http/uploads/uploaded-file.controller.d.mts +9 -6
- package/esm/http/uploads/uploaded-file.controller.d.mts.map +1 -1
- package/esm/http/uploads/uploaded-file.controller.mjs +18 -9
- package/esm/http/uploads/uploaded-file.controller.mjs.map +1 -1
- package/esm/http/uploads/variant-cache-key.mjs +2 -2
- package/esm/http/uploads-config.d.mts +2 -4
- package/esm/http/uploads-config.d.mts.map +1 -1
- package/esm/http/uploads-types.d.mts +22 -16
- package/esm/http/uploads-types.d.mts.map +1 -1
- package/esm/http/xmlable.d.mts +1 -2
- package/esm/http/xmlable.d.mts.map +1 -1
- package/esm/image/image.d.mts +6 -7
- package/esm/image/image.d.mts.map +1 -1
- package/esm/image/image.mjs.map +1 -1
- package/esm/image/index.d.mts +2 -1
- package/esm/image/index.mjs +1 -1
- package/esm/index.d.mts +38 -6
- package/esm/index.mjs +14 -3
- package/esm/loader/app-module-importer.d.mts +1 -2
- package/esm/loader/app-module-importer.d.mts.map +1 -1
- package/esm/localization/index.mjs +1 -1
- package/esm/localization/parse-locale-dictionary.d.mts +6 -5
- package/esm/localization/parse-locale-dictionary.d.mts.map +1 -1
- package/esm/localization/parse-locale-dictionary.mjs +2 -1
- package/esm/localization/parse-locale-dictionary.mjs.map +1 -1
- package/esm/localization/register-locale-dictionary.d.mts +3 -4
- package/esm/localization/register-locale-dictionary.d.mts.map +1 -1
- package/esm/localization/register-locale-dictionary.mjs +2 -2
- package/esm/localization/register-locale-dictionary.mjs.map +1 -1
- package/esm/logger/fatal-visibility.d.mts +1 -2
- package/esm/logger/fatal-visibility.d.mts.map +1 -1
- package/esm/logger/index.d.mts +2 -1
- package/esm/logger/index.mjs +1 -1
- package/esm/logger/logger.d.mts +1 -3
- package/esm/logger/logger.d.mts.map +1 -1
- package/esm/logger/types.d.mts +2 -3
- package/esm/logger/types.d.mts.map +1 -1
- package/esm/mail/config.d.mts +21 -12
- package/esm/mail/config.d.mts.map +1 -1
- package/esm/mail/config.mjs +16 -1
- package/esm/mail/config.mjs.map +1 -1
- package/esm/mail/events.d.mts +4 -6
- package/esm/mail/events.d.mts.map +1 -1
- package/esm/mail/index.d.mts +3 -2
- package/esm/mail/index.mjs +2 -2
- package/esm/mail/mail.d.mts +1 -3
- package/esm/mail/mail.d.mts.map +1 -1
- package/esm/mail/mailer-pool.d.mts +5 -7
- package/esm/mail/mailer-pool.d.mts.map +1 -1
- package/esm/mail/react-mail.d.mts +1 -3
- package/esm/mail/react-mail.d.mts.map +1 -1
- package/esm/mail/send-mail.d.mts +1 -3
- package/esm/mail/send-mail.d.mts.map +1 -1
- package/esm/mail/send-mail.mjs +2 -1
- package/esm/mail/send-mail.mjs.map +1 -1
- package/esm/mail/test-mailbox.d.mts +11 -13
- package/esm/mail/test-mailbox.d.mts.map +1 -1
- package/esm/mail/types.d.mts +17 -18
- package/esm/mail/types.d.mts.map +1 -1
- package/esm/manifest/manifest-manager.mjs +1 -1
- package/esm/net/index.d.mts +2 -0
- package/esm/net/index.mjs +3 -0
- package/esm/openapi/build-openapi-document.d.mts +2 -4
- package/esm/openapi/build-openapi-document.d.mts.map +1 -1
- package/esm/openapi/build-openapi-document.mjs +8 -5
- package/esm/openapi/build-openapi-document.mjs.map +1 -1
- package/esm/openapi/cast-schema.mjs +1 -1
- package/esm/openapi/development-openapi-provider.d.mts +5 -6
- package/esm/openapi/development-openapi-provider.d.mts.map +1 -1
- package/esm/openapi/error-responses.mjs +28 -2
- package/esm/openapi/error-responses.mjs.map +1 -1
- package/esm/openapi/index.d.mts +3 -1
- package/esm/openapi/index.mjs +1 -1
- package/esm/openapi/openapi-child-output.mjs +2 -2
- package/esm/openapi/openapi-child-output.mjs.map +1 -1
- package/esm/openapi/postman/build-request-body.mjs.map +1 -1
- package/esm/openapi/postman/build-request-url.mjs +1 -1
- package/esm/openapi/postman/build-request-url.mjs.map +1 -1
- package/esm/openapi/postman/build-saved-responses.mjs.map +1 -1
- package/esm/openapi/postman/example-from-schema.d.mts +1 -3
- package/esm/openapi/postman/example-from-schema.d.mts.map +1 -1
- package/esm/openapi/postman/example-from-schema.mjs.map +1 -1
- package/esm/openapi/postman/index.d.mts +2 -1
- package/esm/openapi/postman/openapi-to-postman-collection.d.mts +3 -5
- package/esm/openapi/postman/openapi-to-postman-collection.d.mts.map +1 -1
- package/esm/openapi/postman/openapi-to-postman-collection.mjs.map +1 -1
- package/esm/openapi/postman/postman-types.d.mts +19 -18
- package/esm/openapi/postman/postman-types.d.mts.map +1 -1
- package/esm/openapi/postman/schema-refs.d.mts +1 -3
- package/esm/openapi/postman/schema-refs.d.mts.map +1 -1
- package/esm/openapi/postman/schema-refs.mjs.map +1 -1
- package/esm/openapi/postman/uuid-v5.mjs +1 -1
- package/esm/openapi/postman/uuid-v5.mjs.map +1 -1
- package/esm/openapi/request-schemas.mjs.map +1 -1
- package/esm/openapi/response-schemas.mjs.map +1 -1
- package/esm/openapi/schema-registry.d.mts +1 -0
- package/esm/openapi/schema-registry.mjs.map +1 -1
- package/esm/openapi/security.mjs +1 -1
- package/esm/openapi/security.mjs.map +1 -1
- package/esm/openapi/types.d.mts +23 -20
- package/esm/openapi/types.d.mts.map +1 -1
- package/esm/production/assert-generated-imports.mjs +2 -1
- package/esm/production/assert-generated-imports.mjs.map +1 -1
- package/esm/production/build-contributions.mjs +1 -1
- package/esm/production/bundle-framework-dependencies.mjs +1 -1
- package/esm/production/dist-build-manifest.mjs +1 -1
- package/esm/production/esbuild-plugins.mjs.map +1 -1
- package/esm/production/esbuild-preflight.mjs +1 -1
- package/esm/production/production-builder.mjs +14 -5
- package/esm/production/production-builder.mjs.map +1 -1
- package/esm/production/production-supervisor.mjs +1 -1
- package/esm/production/registration-child-runner.mjs +4 -3
- package/esm/production/registration-child-runner.mjs.map +1 -1
- package/esm/production/resolve-build-config.d.mts +4 -4
- package/esm/production/resolve-build-config.d.mts.map +1 -1
- package/esm/production/resolve-build-config.mjs +2 -1
- package/esm/production/resolve-build-config.mjs.map +1 -1
- package/esm/production/route-registration-child.d.mts +1 -1
- package/esm/production/route-registration-child.mjs +8 -7
- package/esm/production/route-registration-child.mjs.map +1 -1
- package/esm/production/route-registration-snapshot.mjs.map +1 -1
- package/esm/production/tsconfig-path-aliases.mjs +1 -1
- package/esm/react/index.d.mts +1 -3
- package/esm/react/index.d.mts.map +1 -1
- package/esm/react/index.mjs.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.d.mts +3 -4
- package/esm/repositories/adapters/cascade/cascade-adapter.d.mts.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.mts +2 -3
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.mts.map +1 -1
- package/esm/repositories/adapters/cascade/filter-applicator.mjs +10 -9
- package/esm/repositories/adapters/cascade/filter-applicator.mjs.map +1 -1
- package/esm/repositories/adapters/cascade/index.d.mts +2 -1
- package/esm/repositories/adapters/cascade/index.mjs +1 -1
- package/esm/repositories/contracts/index.d.mts +2 -1
- package/esm/repositories/contracts/query-builder.contract.d.mts +4 -6
- package/esm/repositories/contracts/query-builder.contract.d.mts.map +1 -1
- package/esm/repositories/contracts/repository-adapter.contract.d.mts +1 -3
- package/esm/repositories/contracts/repository-adapter.contract.d.mts.map +1 -1
- package/esm/repositories/contracts/types.d.mts +23 -25
- package/esm/repositories/contracts/types.d.mts.map +1 -1
- package/esm/repositories/index.d.mts +4 -1
- package/esm/repositories/index.mjs +1 -1
- package/esm/repositories/repository.manager.d.mts +2 -3
- package/esm/repositories/repository.manager.d.mts.map +1 -1
- package/esm/repositories/repository.manager.mjs +2 -2
- package/esm/repositories/repository.manager.mjs.map +1 -1
- package/esm/resource/define-resource.d.mts +3 -5
- package/esm/resource/define-resource.d.mts.map +1 -1
- package/esm/resource/index.d.mts +2 -1
- package/esm/resource/index.mjs +1 -1
- package/esm/resource/nullable-resource.d.mts +5 -7
- package/esm/resource/nullable-resource.d.mts.map +1 -1
- package/esm/resource/register-resource.d.mts +1 -3
- package/esm/resource/register-resource.d.mts.map +1 -1
- package/esm/resource/resource-field-builder.d.mts +1 -3
- package/esm/resource/resource-field-builder.d.mts.map +1 -1
- package/esm/resource/resource.d.mts +3 -5
- package/esm/resource/resource.d.mts.map +1 -1
- package/esm/resource/resource.mjs +4 -2
- package/esm/resource/resource.mjs.map +1 -1
- package/esm/resource/types.d.mts +21 -21
- package/esm/resource/types.d.mts.map +1 -1
- package/esm/restful/index.d.mts +2 -1
- package/esm/restful/index.mjs +1 -1
- package/esm/restful/restful.d.mts +11 -31
- package/esm/restful/restful.d.mts.map +1 -1
- package/esm/restful/restful.mjs.map +1 -1
- package/esm/router/build-route-rate-limit.mjs.map +1 -1
- package/esm/router/dev-dispatch.mjs +31 -12
- package/esm/router/dev-dispatch.mjs.map +1 -1
- package/esm/router/index.d.mts +5 -2
- package/esm/router/index.mjs +3 -1
- package/esm/router/log-request-lifecycle.mjs.map +1 -1
- package/esm/router/named-api-routes-with-responses.mjs +2 -1
- package/esm/router/named-api-routes-with-responses.mjs.map +1 -1
- package/esm/router/normalize-request-path.d.mts +1 -2
- package/esm/router/normalize-request-path.d.mts.map +1 -1
- package/esm/router/normalize-route-path.d.mts +1 -2
- package/esm/router/normalize-route-path.d.mts.map +1 -1
- package/esm/router/positional-handler-diagnostics.d.mts +15 -13
- package/esm/router/positional-handler-diagnostics.d.mts.map +1 -1
- package/esm/router/positional-handler-diagnostics.mjs.map +1 -1
- package/esm/router/resolve-route-rate-limit.mjs +47 -0
- package/esm/router/resolve-route-rate-limit.mjs.map +1 -0
- package/esm/router/resolve-route-validation.mjs +19 -0
- package/esm/router/resolve-route-validation.mjs.map +1 -0
- package/esm/router/route-builder.d.mts +1 -3
- package/esm/router/route-builder.d.mts.map +1 -1
- package/esm/router/route-guard-names.mjs +30 -0
- package/esm/router/route-guard-names.mjs.map +1 -0
- package/esm/router/route-name-method-suffix.d.mts +2 -3
- package/esm/router/route-name-method-suffix.d.mts.map +1 -1
- package/esm/router/route-name-taken-error.d.mts +12 -0
- package/esm/router/route-name-taken-error.d.mts.map +1 -0
- package/esm/router/route-name-taken-error.mjs +18 -0
- package/esm/router/route-name-taken-error.mjs.map +1 -0
- package/esm/router/route-registry.d.mts +1 -3
- package/esm/router/route-registry.d.mts.map +1 -1
- package/esm/router/router.d.mts +34 -17
- package/esm/router/router.d.mts.map +1 -1
- package/esm/router/router.mjs +74 -39
- package/esm/router/router.mjs.map +1 -1
- package/esm/router/types.d.mts +156 -37
- package/esm/router/types.d.mts.map +1 -1
- package/esm/router/unguarded-route-diagnostics.d.mts +38 -0
- package/esm/router/unguarded-route-diagnostics.d.mts.map +1 -0
- package/esm/router/unguarded-route-diagnostics.mjs +95 -0
- package/esm/router/unguarded-route-diagnostics.mjs.map +1 -0
- package/esm/socket/index.d.mts +2 -1
- package/esm/socket/index.mjs +1 -1
- package/esm/socket/types.d.mts +2 -4
- package/esm/socket/types.d.mts.map +1 -1
- package/esm/socket/utils.d.mts +1 -3
- package/esm/socket/utils.d.mts.map +1 -1
- package/esm/storage/config.d.mts +4 -6
- package/esm/storage/config.d.mts.map +1 -1
- package/esm/storage/context/storage-driver-context.d.mts +3 -4
- package/esm/storage/context/storage-driver-context.d.mts.map +1 -1
- package/esm/storage/drivers/cloud-driver.d.mts +2 -4
- package/esm/storage/drivers/cloud-driver.d.mts.map +1 -1
- package/esm/storage/drivers/cloud-driver.mjs.map +1 -1
- package/esm/storage/drivers/do-spaces-driver.d.mts +1 -3
- package/esm/storage/drivers/do-spaces-driver.d.mts.map +1 -1
- package/esm/storage/drivers/local-driver.d.mts +2 -3
- package/esm/storage/drivers/local-driver.d.mts.map +1 -1
- package/esm/storage/drivers/local-driver.mjs +8 -3
- package/esm/storage/drivers/local-driver.mjs.map +1 -1
- package/esm/storage/drivers/r2-driver.d.mts +1 -3
- package/esm/storage/drivers/r2-driver.d.mts.map +1 -1
- package/esm/storage/drivers/s3-driver.d.mts +1 -3
- package/esm/storage/drivers/s3-driver.d.mts.map +1 -1
- package/esm/storage/index.d.mts +2 -1
- package/esm/storage/index.mjs +1 -1
- package/esm/storage/local-disk-roots.mjs +24 -0
- package/esm/storage/local-disk-roots.mjs.map +1 -0
- package/esm/storage/scoped-storage.d.mts +2 -3
- package/esm/storage/scoped-storage.d.mts.map +1 -1
- package/esm/storage/storage-file.d.mts +1 -3
- package/esm/storage/storage-file.d.mts.map +1 -1
- package/esm/storage/storage.d.mts +17 -4
- package/esm/storage/storage.d.mts.map +1 -1
- package/esm/storage/storage.mjs +22 -0
- package/esm/storage/storage.mjs.map +1 -1
- package/esm/storage/types.d.mts +36 -36
- package/esm/storage/types.d.mts.map +1 -1
- package/esm/storage/utils/classify-ip-address.d.mts +1 -2
- package/esm/storage/utils/classify-ip-address.d.mts.map +1 -1
- package/esm/storage/utils/contain-path.d.mts +1 -2
- package/esm/storage/utils/contain-path.d.mts.map +1 -1
- package/esm/storage/utils/mime.d.mts +2 -3
- package/esm/storage/utils/mime.d.mts.map +1 -1
- package/esm/storage/utils/safe-fetch.d.mts +6 -6
- package/esm/storage/utils/safe-fetch.d.mts.map +1 -1
- package/esm/storage/utils/safe-fetch.mjs +3 -3
- package/esm/storage/utils/safe-fetch.mjs.map +1 -1
- package/esm/storage/utils/storage-capability-error.d.mts +1 -3
- package/esm/storage/utils/storage-capability-error.d.mts.map +1 -1
- package/esm/storage/utils/storage-error.d.mts +2 -3
- package/esm/storage/utils/storage-error.d.mts.map +1 -1
- package/esm/storage/utils/storage-not-initialized-error.d.mts +3 -2
- package/esm/storage/utils/storage-not-initialized-error.d.mts.map +1 -1
- package/esm/storage/utils/storage-not-initialized-error.mjs +1 -0
- package/esm/storage/utils/storage-not-initialized-error.mjs.map +1 -1
- package/esm/tests/authenticated-test-client.d.mts +31 -0
- package/esm/tests/authenticated-test-client.d.mts.map +1 -0
- package/esm/tests/authenticated-test-client.mjs +40 -0
- package/esm/tests/authenticated-test-client.mjs.map +1 -0
- package/esm/tests/factories.d.mts +74 -0
- package/esm/tests/factories.d.mts.map +1 -0
- package/esm/tests/factories.mjs +105 -0
- package/esm/tests/factories.mjs.map +1 -0
- package/esm/tests/fakes/cache-fake.d.mts +34 -0
- package/esm/tests/fakes/cache-fake.d.mts.map +1 -0
- package/esm/tests/fakes/cache-fake.mjs +79 -0
- package/esm/tests/fakes/cache-fake.mjs.map +1 -0
- package/esm/tests/fakes/clock-fake.d.mts +37 -0
- package/esm/tests/fakes/clock-fake.d.mts.map +1 -0
- package/esm/tests/fakes/clock-fake.mjs +69 -0
- package/esm/tests/fakes/clock-fake.mjs.map +1 -0
- package/esm/tests/fakes/fake-assertion-error.d.mts +12 -0
- package/esm/tests/fakes/fake-assertion-error.d.mts.map +1 -0
- package/esm/tests/fakes/fake-assertion-error.mjs +20 -0
- package/esm/tests/fakes/fake-assertion-error.mjs.map +1 -0
- package/esm/tests/fakes/ids-fake.d.mts +23 -0
- package/esm/tests/fakes/ids-fake.d.mts.map +1 -0
- package/esm/tests/fakes/ids-fake.mjs +57 -0
- package/esm/tests/fakes/ids-fake.mjs.map +1 -0
- package/esm/tests/fakes/index.d.mts +9 -0
- package/esm/tests/fakes/index.mjs +10 -0
- package/esm/tests/fakes/mail-fake.d.mts +49 -0
- package/esm/tests/fakes/mail-fake.d.mts.map +1 -0
- package/esm/tests/fakes/mail-fake.mjs +111 -0
- package/esm/tests/fakes/mail-fake.mjs.map +1 -0
- package/esm/tests/fakes/queue-fake.d.mts +56 -0
- package/esm/tests/fakes/queue-fake.d.mts.map +1 -0
- package/esm/tests/fakes/queue-fake.mjs +134 -0
- package/esm/tests/fakes/queue-fake.mjs.map +1 -0
- package/esm/tests/fakes/storage-fake.d.mts +35 -0
- package/esm/tests/fakes/storage-fake.d.mts.map +1 -0
- package/esm/tests/fakes/storage-fake.mjs +122 -0
- package/esm/tests/fakes/storage-fake.mjs.map +1 -0
- package/esm/tests/fakes/test-fakes.d.mts +38 -0
- package/esm/tests/fakes/test-fakes.d.mts.map +1 -0
- package/esm/tests/fakes/test-fakes.mjs +90 -0
- package/esm/tests/fakes/test-fakes.mjs.map +1 -0
- package/esm/tests/index.d.mts +15 -2
- package/esm/tests/index.mjs +15 -2
- package/esm/tests/snapshot-response.d.mts +33 -0
- package/esm/tests/snapshot-response.d.mts.map +1 -0
- package/esm/tests/snapshot-response.mjs +42 -0
- package/esm/tests/snapshot-response.mjs.map +1 -0
- package/esm/tests/start-http-development-server.d.mts +25 -5
- package/esm/tests/start-http-development-server.d.mts.map +1 -1
- package/esm/tests/start-http-development-server.mjs +41 -8
- package/esm/tests/start-http-development-server.mjs.map +1 -1
- package/esm/tests/test-connectors-selection.d.mts +2 -2
- package/esm/tests/test-connectors-selection.d.mts.map +1 -1
- package/esm/tests/test-connectors-selection.mjs +1 -1
- package/esm/tests/test-helpers.d.mts +28 -10
- package/esm/tests/test-helpers.d.mts.map +1 -1
- package/esm/tests/test-helpers.mjs +40 -27
- package/esm/tests/test-helpers.mjs.map +1 -1
- package/esm/tests/test-http-server.d.mts +66 -0
- package/esm/tests/test-http-server.d.mts.map +1 -0
- package/esm/tests/test-http-server.mjs +119 -0
- package/esm/tests/test-http-server.mjs.map +1 -0
- package/esm/tests/test-lifecycle-state.mjs +1 -1
- package/esm/tests/vitest-setup.d.mts +17 -7
- package/esm/tests/vitest-setup.d.mts.map +1 -1
- package/esm/tests/vitest-setup.mjs +12 -4
- package/esm/tests/vitest-setup.mjs.map +1 -1
- package/esm/tooling/agents-md/agents-md-markers.d.mts +26 -0
- package/esm/tooling/agents-md/agents-md-markers.d.mts.map +1 -0
- package/esm/tooling/agents-md/agents-md-markers.mjs +60 -0
- package/esm/tooling/agents-md/agents-md-markers.mjs.map +1 -0
- package/esm/tooling/agents-md/agents-md-refresher.d.mts +43 -0
- package/esm/tooling/agents-md/agents-md-refresher.d.mts.map +1 -0
- package/esm/tooling/agents-md/agents-md-refresher.mjs +72 -0
- package/esm/tooling/agents-md/agents-md-refresher.mjs.map +1 -0
- package/esm/tooling/agents-md/index.mjs +7 -0
- package/esm/tooling/agents-md/installed-skills.d.mts +34 -0
- package/esm/tooling/agents-md/installed-skills.d.mts.map +1 -0
- package/esm/tooling/agents-md/installed-skills.mjs +74 -0
- package/esm/tooling/agents-md/installed-skills.mjs.map +1 -0
- package/esm/tooling/agents-md/render-agents-md.d.mts +34 -0
- package/esm/tooling/agents-md/render-agents-md.d.mts.map +1 -0
- package/esm/tooling/agents-md/render-agents-md.mjs +195 -0
- package/esm/tooling/agents-md/render-agents-md.mjs.map +1 -0
- package/esm/tooling/agents-md/write-agents-md.d.mts +38 -0
- package/esm/tooling/agents-md/write-agents-md.d.mts.map +1 -0
- package/esm/tooling/agents-md/write-agents-md.mjs +49 -0
- package/esm/tooling/agents-md/write-agents-md.mjs.map +1 -0
- package/esm/tooling/board/board-message.d.mts +29 -0
- package/esm/tooling/board/board-message.d.mts.map +1 -0
- package/esm/tooling/board/board-message.mjs +86 -0
- package/esm/tooling/board/board-message.mjs.map +1 -0
- package/esm/tooling/board/board.d.mts +121 -0
- package/esm/tooling/board/board.d.mts.map +1 -0
- package/esm/tooling/board/board.mjs +407 -0
- package/esm/tooling/board/board.mjs.map +1 -0
- package/esm/tooling/board/board.types.d.mts +81 -0
- package/esm/tooling/board/board.types.d.mts.map +1 -0
- package/esm/tooling/board/board.types.mjs +54 -0
- package/esm/tooling/board/board.types.mjs.map +1 -0
- package/esm/tooling/check/changed-files.d.mts +31 -0
- package/esm/tooling/check/changed-files.d.mts.map +1 -0
- package/esm/tooling/check/changed-files.mjs +73 -0
- package/esm/tooling/check/changed-files.mjs.map +1 -0
- package/esm/tooling/check/check-report.types.d.mts +67 -0
- package/esm/tooling/check/check-report.types.d.mts.map +1 -0
- package/esm/tooling/check/check-report.types.mjs +37 -0
- package/esm/tooling/check/check-report.types.mjs.map +1 -0
- package/esm/tooling/check/code-style-conventions.mjs +106 -0
- package/esm/tooling/check/code-style-conventions.mjs.map +1 -0
- package/esm/tooling/check/conventions-step.d.mts +32 -0
- package/esm/tooling/check/conventions-step.d.mts.map +1 -0
- package/esm/tooling/check/conventions-step.mjs +173 -0
- package/esm/tooling/check/conventions-step.mjs.map +1 -0
- package/esm/tooling/check/environment-step.d.mts +16 -0
- package/esm/tooling/check/environment-step.d.mts.map +1 -0
- package/esm/tooling/check/environment-step.mjs +78 -0
- package/esm/tooling/check/environment-step.mjs.map +1 -0
- package/esm/tooling/check/index.mjs +10 -0
- package/esm/tooling/check/lint-step.d.mts +18 -0
- package/esm/tooling/check/lint-step.d.mts.map +1 -0
- package/esm/tooling/check/lint-step.mjs +112 -0
- package/esm/tooling/check/lint-step.mjs.map +1 -0
- package/esm/tooling/check/request-input.mjs +132 -0
- package/esm/tooling/check/request-input.mjs.map +1 -0
- package/esm/tooling/check/run-check.d.mts +43 -0
- package/esm/tooling/check/run-check.d.mts.map +1 -0
- package/esm/tooling/check/run-check.mjs +192 -0
- package/esm/tooling/check/run-check.mjs.map +1 -0
- package/esm/tooling/check/run-tests.d.mts +55 -0
- package/esm/tooling/check/run-tests.d.mts.map +1 -0
- package/esm/tooling/check/run-tests.mjs +93 -0
- package/esm/tooling/check/run-tests.mjs.map +1 -0
- package/esm/tooling/check/security-conventions.mjs +650 -0
- package/esm/tooling/check/security-conventions.mjs.map +1 -0
- package/esm/tooling/check/source-ast.mjs +155 -0
- package/esm/tooling/check/source-ast.mjs.map +1 -0
- package/esm/tooling/check/source-files.mjs +27 -0
- package/esm/tooling/check/source-files.mjs.map +1 -0
- package/esm/tooling/check/tests-step.d.mts +33 -0
- package/esm/tooling/check/tests-step.d.mts.map +1 -0
- package/esm/tooling/check/tests-step.mjs +177 -0
- package/esm/tooling/check/tests-step.mjs.map +1 -0
- package/esm/tooling/dev-state/dev-server-state.d.mts +43 -0
- package/esm/tooling/dev-state/dev-server-state.d.mts.map +1 -0
- package/esm/tooling/dev-state/dev-server-state.mjs +67 -0
- package/esm/tooling/dev-state/dev-server-state.mjs.map +1 -0
- package/esm/tooling/devtools/devtools-client.d.mts +100 -0
- package/esm/tooling/devtools/devtools-client.d.mts.map +1 -0
- package/esm/tooling/devtools/devtools-client.mjs +155 -0
- package/esm/tooling/devtools/devtools-client.mjs.map +1 -0
- package/esm/tooling/generate/generation.d.mts +90 -0
- package/esm/tooling/generate/generation.d.mts.map +1 -0
- package/esm/tooling/generate/generation.mjs +127 -0
- package/esm/tooling/generate/generation.mjs.map +1 -0
- package/esm/tooling/generate/generator-spec.d.mts +57 -0
- package/esm/tooling/generate/generator-spec.d.mts.map +1 -0
- package/esm/tooling/generate/generator-spec.mjs +102 -0
- package/esm/tooling/generate/generator-spec.mjs.map +1 -0
- package/esm/tooling/generate/index.mjs +6 -0
- package/esm/tooling/generate/project-files.mjs +121 -0
- package/esm/tooling/generate/project-files.mjs.map +1 -0
- package/esm/tooling/generate/run-cli.d.mts +43 -0
- package/esm/tooling/generate/run-cli.d.mts.map +1 -0
- package/esm/tooling/generate/run-cli.mjs +93 -0
- package/esm/tooling/generate/run-cli.mjs.map +1 -0
- package/esm/tooling/generate/unified-diff.d.mts +40 -0
- package/esm/tooling/generate/unified-diff.d.mts.map +1 -0
- package/esm/tooling/generate/unified-diff.mjs +161 -0
- package/esm/tooling/generate/unified-diff.mjs.map +1 -0
- package/esm/tooling/index.d.mts +42 -0
- package/esm/tooling/index.mjs +45 -0
- package/esm/tooling/inspect/boot-for-inspect.d.mts +23 -0
- package/esm/tooling/inspect/boot-for-inspect.d.mts.map +1 -0
- package/esm/tooling/inspect/boot-for-inspect.mjs +63 -0
- package/esm/tooling/inspect/boot-for-inspect.mjs.map +1 -0
- package/esm/tooling/inspect/collect-config.mjs +77 -0
- package/esm/tooling/inspect/collect-config.mjs.map +1 -0
- package/esm/tooling/inspect/collect-models.d.mts +10 -0
- package/esm/tooling/inspect/collect-models.d.mts.map +1 -0
- package/esm/tooling/inspect/collect-models.mjs +154 -0
- package/esm/tooling/inspect/collect-models.mjs.map +1 -0
- package/esm/tooling/inspect/collect-packages.d.mts +9 -0
- package/esm/tooling/inspect/collect-packages.d.mts.map +1 -0
- package/esm/tooling/inspect/collect-packages.mjs +157 -0
- package/esm/tooling/inspect/collect-packages.mjs.map +1 -0
- package/esm/tooling/inspect/collect-pages.mjs +108 -0
- package/esm/tooling/inspect/collect-pages.mjs.map +1 -0
- package/esm/tooling/inspect/collect-routes.mjs +168 -0
- package/esm/tooling/inspect/collect-routes.mjs.map +1 -0
- package/esm/tooling/inspect/event-recorder.d.mts +37 -0
- package/esm/tooling/inspect/event-recorder.d.mts.map +1 -0
- package/esm/tooling/inspect/event-recorder.mjs +91 -0
- package/esm/tooling/inspect/event-recorder.mjs.map +1 -0
- package/esm/tooling/inspect/index.d.mts +8 -0
- package/esm/tooling/inspect/index.mjs +7 -0
- package/esm/tooling/inspect/inspect-app.d.mts +62 -0
- package/esm/tooling/inspect/inspect-app.d.mts.map +1 -0
- package/esm/tooling/inspect/inspect-app.mjs +92 -0
- package/esm/tooling/inspect/inspect-app.mjs.map +1 -0
- package/esm/tooling/inspect/inspect-report.schema.d.mts +14 -0
- package/esm/tooling/inspect/inspect-report.schema.d.mts.map +1 -0
- package/esm/tooling/inspect/inspect-report.schema.mjs +463 -0
- package/esm/tooling/inspect/inspect-report.schema.mjs.map +1 -0
- package/esm/tooling/inspect/inspect-report.types.d.mts +228 -0
- package/esm/tooling/inspect/inspect-report.types.d.mts.map +1 -0
- package/esm/tooling/inspect/inspect-report.types.mjs +33 -0
- package/esm/tooling/inspect/inspect-report.types.mjs.map +1 -0
- package/esm/tooling/mcp/create-mcp-context.d.mts +29 -0
- package/esm/tooling/mcp/create-mcp-context.d.mts.map +1 -0
- package/esm/tooling/mcp/create-mcp-context.mjs +75 -0
- package/esm/tooling/mcp/create-mcp-context.mjs.map +1 -0
- package/esm/tooling/mcp/db-schema.d.mts +50 -0
- package/esm/tooling/mcp/db-schema.d.mts.map +1 -0
- package/esm/tooling/mcp/db-schema.mjs +56 -0
- package/esm/tooling/mcp/db-schema.mjs.map +1 -0
- package/esm/tooling/mcp/docs-search.d.mts +77 -0
- package/esm/tooling/mcp/docs-search.d.mts.map +1 -0
- package/esm/tooling/mcp/docs-search.mjs +178 -0
- package/esm/tooling/mcp/docs-search.mjs.map +1 -0
- package/esm/tooling/mcp/index.mjs +9 -0
- package/esm/tooling/mcp/load-ai-tools.d.mts +61 -0
- package/esm/tooling/mcp/load-ai-tools.d.mts.map +1 -0
- package/esm/tooling/mcp/load-ai-tools.mjs +45 -0
- package/esm/tooling/mcp/load-ai-tools.mjs.map +1 -0
- package/esm/tooling/mcp/mcp-tools.d.mts +70 -0
- package/esm/tooling/mcp/mcp-tools.d.mts.map +1 -0
- package/esm/tooling/mcp/mcp-tools.mjs +514 -0
- package/esm/tooling/mcp/mcp-tools.mjs.map +1 -0
- package/esm/tooling/mcp/start-mcp-server.d.mts +63 -0
- package/esm/tooling/mcp/start-mcp-server.d.mts.map +1 -0
- package/esm/tooling/mcp/start-mcp-server.mjs +126 -0
- package/esm/tooling/mcp/start-mcp-server.mjs.map +1 -0
- package/esm/tooling/mcp/tool-input.d.mts +75 -0
- package/esm/tooling/mcp/tool-input.d.mts.map +1 -0
- package/esm/tooling/mcp/tool-input.mjs +72 -0
- package/esm/tooling/mcp/tool-input.mjs.map +1 -0
- package/esm/tooling/problem.d.mts +55 -0
- package/esm/tooling/problem.d.mts.map +1 -0
- package/esm/tooling/problem.mjs +28 -0
- package/esm/tooling/problem.mjs.map +1 -0
- package/esm/tooling/syntax/ast.mjs +230 -0
- package/esm/tooling/syntax/ast.mjs.map +1 -0
- package/esm/tooling/syntax/imports.mjs +34 -0
- package/esm/tooling/syntax/imports.mjs.map +1 -0
- package/esm/tooling/trace/trace-report.types.d.mts +85 -0
- package/esm/tooling/trace/trace-report.types.d.mts.map +1 -0
- package/esm/tooling/trace/trace-report.types.mjs +7 -0
- package/esm/tooling/trace/trace-report.types.mjs.map +1 -0
- package/esm/tooling/trace/trace-request.d.mts +90 -0
- package/esm/tooling/trace/trace-request.d.mts.map +1 -0
- package/esm/tooling/trace/trace-request.mjs +241 -0
- package/esm/tooling/trace/trace-request.mjs.map +1 -0
- package/esm/tooling/typecheck/index.mjs +3 -0
- package/esm/tooling/typecheck/run-typecheck.d.mts +26 -0
- package/esm/tooling/typecheck/run-typecheck.d.mts.map +1 -0
- package/esm/tooling/typecheck/run-typecheck.mjs +90 -0
- package/esm/tooling/typecheck/run-typecheck.mjs.map +1 -0
- package/esm/tooling/typescript/compiler.d.mts +31 -0
- package/esm/tooling/typescript/compiler.d.mts.map +1 -0
- package/esm/tooling/typescript/compiler.mjs +120 -0
- package/esm/tooling/typescript/compiler.mjs.map +1 -0
- package/esm/updater/update-warlock-packages.mjs +3 -2
- package/esm/updater/update-warlock-packages.mjs.map +1 -1
- package/esm/upgrade/codemods/head-viewport.mjs +46 -0
- package/esm/upgrade/codemods/head-viewport.mjs.map +1 -0
- package/esm/upgrade/codemods/helpers.mjs +81 -0
- package/esm/upgrade/codemods/helpers.mjs.map +1 -0
- package/esm/upgrade/codemods/index.mjs +34 -0
- package/esm/upgrade/codemods/index.mjs.map +1 -0
- package/esm/upgrade/codemods/logger-sync-calls.mjs +57 -0
- package/esm/upgrade/codemods/logger-sync-calls.mjs.map +1 -0
- package/esm/upgrade/codemods/package-json.mjs +122 -0
- package/esm/upgrade/codemods/package-json.mjs.map +1 -0
- package/esm/upgrade/codemods/request-log-snapshot.mjs +82 -0
- package/esm/upgrade/codemods/request-log-snapshot.mjs.map +1 -0
- package/esm/upgrade/codemods/review-sites.mjs +262 -0
- package/esm/upgrade/codemods/review-sites.mjs.map +1 -0
- package/esm/upgrade/diff.mjs +119 -0
- package/esm/upgrade/diff.mjs.map +1 -0
- package/esm/upgrade/format-upgrade-report.mjs +32 -0
- package/esm/upgrade/format-upgrade-report.mjs.map +1 -0
- package/esm/upgrade/load-ts-morph.mjs +49 -0
- package/esm/upgrade/load-ts-morph.mjs.map +1 -0
- package/esm/upgrade/notes.mjs +16 -0
- package/esm/upgrade/notes.mjs.map +1 -0
- package/esm/upgrade/run-upgrade.mjs +246 -0
- package/esm/upgrade/run-upgrade.mjs.map +1 -0
- package/esm/upgrade/upgrade-command.action.mjs +37 -0
- package/esm/upgrade/upgrade-command.action.mjs.map +1 -0
- package/esm/upgrade/version.mjs +39 -0
- package/esm/upgrade/version.mjs.map +1 -0
- package/esm/use-cases/index.d.mts +2 -1
- package/esm/use-cases/index.mjs +1 -1
- package/esm/use-cases/types.d.mts +116 -63
- package/esm/use-cases/types.d.mts.map +1 -1
- package/esm/use-cases/use-case-broadcast.d.mts +1 -3
- package/esm/use-cases/use-case-broadcast.d.mts.map +1 -1
- package/esm/use-cases/use-case-events.d.mts +3 -5
- package/esm/use-cases/use-case-events.d.mts.map +1 -1
- package/esm/use-cases/use-case-pipeline.d.mts +6 -6
- package/esm/use-cases/use-case-pipeline.d.mts.map +1 -1
- package/esm/use-cases/use-case.d.mts +2 -4
- package/esm/use-cases/use-case.d.mts.map +1 -1
- package/esm/use-cases/use-case.errors.d.mts +1 -3
- package/esm/use-cases/use-case.errors.d.mts.map +1 -1
- package/esm/use-cases/use-cases-registry.d.mts +8 -10
- package/esm/use-cases/use-cases-registry.d.mts.map +1 -1
- package/esm/use-cases/use-cases-registry.mjs.map +1 -1
- package/esm/utils/app-log.d.mts +1 -2
- package/esm/utils/app-log.d.mts.map +1 -1
- package/esm/utils/clock.d.mts +35 -0
- package/esm/utils/clock.d.mts.map +1 -0
- package/esm/utils/clock.mjs +27 -0
- package/esm/utils/clock.mjs.map +1 -0
- package/esm/utils/database-log.d.mts +3 -4
- package/esm/utils/database-log.d.mts.map +1 -1
- package/esm/utils/environment.d.mts +4 -5
- package/esm/utils/environment.d.mts.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 +2 -3
- package/esm/utils/get-localized.d.mts.map +1 -1
- package/esm/utils/ids.d.mts +35 -0
- package/esm/utils/ids.d.mts.map +1 -0
- package/esm/utils/ids.mjs +33 -0
- package/esm/utils/ids.mjs.map +1 -0
- package/esm/utils/index.d.mts +5 -1
- package/esm/utils/index.mjs +4 -1
- package/esm/utils/normalized-path.d.mts +1 -2
- package/esm/utils/normalized-path.d.mts.map +1 -1
- package/esm/utils/npm-registry.d.mts +1 -2
- package/esm/utils/npm-registry.d.mts.map +1 -1
- package/esm/utils/paths.d.mts +13 -14
- package/esm/utils/paths.d.mts.map +1 -1
- package/esm/utils/paths.mjs +2 -2
- package/esm/utils/paths.mjs.map +1 -1
- package/esm/utils/promise-all-object.d.mts +1 -2
- package/esm/utils/promise-all-object.d.mts.map +1 -1
- package/esm/utils/queue.d.mts +1 -2
- package/esm/utils/queue.d.mts.map +1 -1
- package/esm/utils/runtime.d.mts +60 -0
- package/esm/utils/runtime.d.mts.map +1 -0
- package/esm/utils/runtime.mjs +85 -0
- package/esm/utils/runtime.mjs.map +1 -0
- package/esm/utils/sleep.d.mts +1 -2
- package/esm/utils/sleep.d.mts.map +1 -1
- package/esm/utils/sluggable.d.mts +1 -3
- package/esm/utils/sluggable.d.mts.map +1 -1
- package/esm/utils/to-json.d.mts +1 -2
- package/esm/utils/to-json.d.mts.map +1 -1
- package/esm/utils/types.d.mts +1 -2
- package/esm/utils/types.d.mts.map +1 -1
- package/esm/utils/urls.d.mts +5 -6
- package/esm/utils/urls.d.mts.map +1 -1
- package/esm/utils/version-compare.d.mts +1 -2
- package/esm/utils/version-compare.d.mts.map +1 -1
- package/esm/validation/database/exists-except-current-id.d.mts +2 -3
- package/esm/validation/database/exists-except-current-id.d.mts.map +1 -1
- package/esm/validation/database/exists-except-current-user.d.mts +2 -3
- package/esm/validation/database/exists-except-current-user.d.mts.map +1 -1
- package/esm/validation/database/index.d.mts +2 -1
- package/esm/validation/database/index.mjs +1 -1
- package/esm/validation/database/types.d.mts +14 -10
- package/esm/validation/database/types.d.mts.map +1 -1
- package/esm/validation/database/unique-except-current-id.d.mts +2 -3
- package/esm/validation/database/unique-except-current-id.d.mts.map +1 -1
- package/esm/validation/database/unique-except-current-user.d.mts +2 -3
- package/esm/validation/database/unique-except-current-user.d.mts.map +1 -1
- package/esm/validation/file/file.d.mts +4 -6
- package/esm/validation/file/file.d.mts.map +1 -1
- package/esm/validation/file/index.d.mts +2 -1
- package/esm/validation/file/index.mjs +1 -1
- package/esm/validation/index.d.mts +6 -2
- package/esm/validation/index.mjs +1 -1
- package/esm/validation/plugins/index.mjs +1 -1
- package/esm/validation/types.d.mts +61 -4
- package/esm/validation/types.d.mts.map +1 -1
- package/esm/validation/validateAll.mjs +21 -4
- package/esm/validation/validateAll.mjs.map +1 -1
- package/esm/validation/validation-failure-status.mjs +15 -0
- package/esm/validation/validation-failure-status.mjs.map +1 -0
- package/esm/validation/validators/file-validator.d.mts +2 -20
- package/esm/validation/validators/file-validator.d.mts.map +1 -1
- package/esm/validation/validators/index.d.mts +2 -1
- package/esm/validation/validators/index.mjs +1 -1
- package/esm/vite/lower-stage3-decorators.d.mts +2 -3
- package/esm/vite/lower-stage3-decorators.d.mts.map +1 -1
- package/esm/warlock-config/bundle-config.mjs +1 -1
- package/esm/warlock-config/define-config.d.mts +1 -3
- package/esm/warlock-config/define-config.d.mts.map +1 -1
- package/esm/warlock-config/define-config.mjs +3 -2
- package/esm/warlock-config/define-config.mjs.map +1 -1
- package/esm/warlock-config/index.d.mts +2 -1
- package/esm/warlock-config/index.mjs +1 -1
- package/esm/warlock-config/types.d.mts +31 -6
- package/esm/warlock-config/types.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.d.mts +5 -7
- package/esm/warlock-config/warlock-config.manager.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.mjs +2 -1
- package/esm/warlock-config/warlock-config.manager.mjs.map +1 -1
- package/esm/warlock-config/warn-deprecated-config.mjs +1 -1
- package/llms-full.txt +3211 -731
- package/llms.txt +16 -6
- package/package.json +47 -15
- package/schemas/inspect-report.schema.json +554 -0
- package/skills/README.md +9 -0
- package/skills/add-connector/SKILL.md +26 -38
- package/skills/benchmark-code/SKILL.md +30 -24
- package/skills/build-restful/SKILL.md +14 -14
- package/skills/build-url/SKILL.md +18 -18
- package/skills/configure-app/SKILL.md +107 -14
- package/skills/create-controller/SKILL.md +25 -12
- package/skills/create-module/SKILL.md +10 -3
- package/skills/define-resource/SKILL.md +32 -29
- package/skills/encrypt-data/SKILL.md +21 -19
- package/skills/generate-openapi/SKILL.md +50 -24
- package/skills/hash-password/SKILL.md +2 -2
- package/skills/health-checks/SKILL.md +24 -7
- package/skills/index.md +11 -4
- package/skills/lower-stage3-decorators/SKILL.md +4 -4
- package/skills/make-endpoint/SKILL.md +110 -0
- package/skills/model-factories/SKILL.md +92 -0
- package/skills/process-image/SKILL.md +32 -30
- package/skills/register-route/SKILL.md +109 -10
- package/skills/report-framework-issue.md +154 -0
- package/skills/request-memo/SKILL.md +1 -1
- package/skills/request-tracing/SKILL.md +4 -1
- package/skills/resolve-path/SKILL.md +45 -44
- package/skills/retry-operation/SKILL.md +20 -11
- package/skills/run-app/SKILL.md +107 -22
- package/skills/send-response/SKILL.md +179 -14
- package/skills/store-file/SKILL.md +93 -53
- package/skills/test-fakes/SKILL.md +123 -0
- package/skills/test-http/SKILL.md +125 -21
- package/skills/test-service/SKILL.md +41 -1
- package/skills/update-packages/SKILL.md +29 -18
- package/skills/upgrade-from-5-29/SKILL.md +454 -0
- package/skills/upload-file/SKILL.md +31 -33
- package/skills/use-app-context/SKILL.md +38 -31
- package/skills/use-middleware/SKILL.md +45 -25
- package/skills/use-model-transformers/SKILL.md +37 -28
- package/skills/use-repository/SKILL.md +2 -2
- package/skills/validate-input/SKILL.md +72 -28
- package/skills/warlock-agents-md/SKILL.md +96 -0
- package/skills/warlock-board/SKILL.md +123 -0
- package/skills/warlock-check/SKILL.md +133 -0
- package/skills/warlock-conventions/SKILL.md +115 -0
- package/skills/warlock-doctor/SKILL.md +55 -22
- package/skills/warlock-inspect/SKILL.md +134 -0
- package/skills/warlock-mcp/SKILL.md +120 -0
- package/skills/warlock-routes/SKILL.md +18 -11
- package/skills/warlock-trace/SKILL.md +81 -0
- package/skills/wire-socket/SKILL.md +8 -8
- package/skills/write-seeder/SKILL.md +46 -32
- package/skills/write-use-case/SKILL.md +40 -27
- package/esm/http/uploads/matches-if-none-match.mjs +0 -13
- package/esm/http/uploads/matches-if-none-match.mjs.map +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { createProblem } from "../../../tooling/problem.mjs";
|
|
2
|
+
import { execFile } from "node:child_process";
|
|
3
|
+
|
|
4
|
+
//#region ../../packages/core/src/cli/commands/check/child-typecheck.ts
|
|
5
|
+
function isTypecheckResult(value) {
|
|
6
|
+
return typeof value === "object" && value !== null && Array.isArray(Reflect.get(value, "problems")) && typeof Reflect.get(value, "checkedFiles") === "number";
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Run the typecheck step as `warlock typecheck --json` in a child process.
|
|
10
|
+
*
|
|
11
|
+
* The compiler is the one step that can exhaust the heap on a large app. In
|
|
12
|
+
* its own process an overflow ends only that process, and `warlock check`
|
|
13
|
+
* still prints its report — with a `WL8007` environment problem instead of
|
|
14
|
+
* dying without output.
|
|
15
|
+
*
|
|
16
|
+
* @param cliEntry The warlock CLI script (`process.argv[1]` of `warlock check`).
|
|
17
|
+
* @param flags The `--changed` / `--base` flags of the parent run, so the child
|
|
18
|
+
* lists the same changed files.
|
|
19
|
+
*/
|
|
20
|
+
function childTypecheckRunner(cliEntry, flags) {
|
|
21
|
+
return (options) => new Promise((resolve) => {
|
|
22
|
+
const args = [
|
|
23
|
+
cliEntry,
|
|
24
|
+
"typecheck",
|
|
25
|
+
"--json",
|
|
26
|
+
...flags
|
|
27
|
+
];
|
|
28
|
+
if (options.project) args.push("--project", options.project);
|
|
29
|
+
execFile(process.execPath, args, {
|
|
30
|
+
cwd: options.cwd ?? process.cwd(),
|
|
31
|
+
encoding: "utf8",
|
|
32
|
+
windowsHide: true,
|
|
33
|
+
maxBuffer: 67108864
|
|
34
|
+
}, (error, stdout, stderr) => {
|
|
35
|
+
let parsed;
|
|
36
|
+
try {
|
|
37
|
+
parsed = JSON.parse(stdout);
|
|
38
|
+
} catch {
|
|
39
|
+
parsed = void 0;
|
|
40
|
+
}
|
|
41
|
+
if (isTypecheckResult(parsed)) {
|
|
42
|
+
resolve(parsed);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const outOfMemory = /heap out of memory|ERR_WORKER_OUT_OF_MEMORY/i.test(stderr);
|
|
46
|
+
const how = error?.signal ? `was killed (${error.signal})` : `exited with ${String(error?.code ?? 0)}`;
|
|
47
|
+
resolve({
|
|
48
|
+
ok: false,
|
|
49
|
+
mode: options.files ? "files" : "program",
|
|
50
|
+
files: null,
|
|
51
|
+
checkedFiles: 0,
|
|
52
|
+
durationMs: 0,
|
|
53
|
+
buildInfoFile: null,
|
|
54
|
+
problems: [createProblem({
|
|
55
|
+
code: "WL8007",
|
|
56
|
+
source: "environment",
|
|
57
|
+
message: `The typecheck ${outOfMemory ? "ran out of memory" : how}: ${stderr.trim().split("\n").slice(-3).join(" ") || "no output"}`
|
|
58
|
+
})]
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
export { childTypecheckRunner };
|
|
66
|
+
//# sourceMappingURL=child-typecheck.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"child-typecheck.mjs","names":[],"sources":["../../../../../../../../../../packages/core/src/cli/commands/check/child-typecheck.ts"],"sourcesContent":["import { execFile } from \"node:child_process\";\nimport type { TypecheckRunner } from \"../../../tooling/check/run-check\";\nimport { createProblem } from \"../../../tooling/problem\";\nimport type { TypecheckResult } from \"../../../tooling/typecheck/run-typecheck\";\n\nfunction isTypecheckResult(value: unknown): value is TypecheckResult {\n return (\n typeof value === \"object\" &&\n value !== null &&\n Array.isArray(Reflect.get(value, \"problems\")) &&\n typeof Reflect.get(value, \"checkedFiles\") === \"number\"\n );\n}\n\n/**\n * Run the typecheck step as `warlock typecheck --json` in a child process.\n *\n * The compiler is the one step that can exhaust the heap on a large app. In\n * its own process an overflow ends only that process, and `warlock check`\n * still prints its report — with a `WL8007` environment problem instead of\n * dying without output.\n *\n * @param cliEntry The warlock CLI script (`process.argv[1]` of `warlock check`).\n * @param flags The `--changed` / `--base` flags of the parent run, so the child\n * lists the same changed files.\n */\nexport function childTypecheckRunner(cliEntry: string, flags: readonly string[]): TypecheckRunner {\n return (options) =>\n new Promise((resolve) => {\n const args = [cliEntry, \"typecheck\", \"--json\", ...flags];\n\n if (options.project) args.push(\"--project\", options.project);\n\n execFile(\n process.execPath,\n args,\n {\n cwd: options.cwd ?? process.cwd(),\n encoding: \"utf8\",\n windowsHide: true,\n maxBuffer: 64 * 1024 * 1024,\n },\n (error, stdout, stderr) => {\n let parsed: unknown;\n\n try {\n parsed = JSON.parse(stdout);\n } catch {\n parsed = undefined;\n }\n\n if (isTypecheckResult(parsed)) {\n resolve(parsed);\n return;\n }\n\n const outOfMemory = /heap out of memory|ERR_WORKER_OUT_OF_MEMORY/i.test(stderr);\n const how = error?.signal\n ? `was killed (${error.signal})`\n : `exited with ${String(error?.code ?? 0)}`;\n\n resolve({\n ok: false,\n mode: options.files ? \"files\" : \"program\",\n files: null,\n checkedFiles: 0,\n durationMs: 0,\n buildInfoFile: null,\n problems: [\n createProblem({\n code: \"WL8007\",\n source: \"environment\",\n message: `The typecheck ${outOfMemory ? \"ran out of memory\" : how}: ${stderr.trim().split(\"\\n\").slice(-3).join(\" \") || \"no output\"}`,\n }),\n ],\n });\n },\n );\n });\n}\n"],"mappings":";;;;AAKA,SAAS,kBAAkB,OAA0C;CACnE,OACE,OAAO,UAAU,YACjB,UAAU,QACV,MAAM,QAAQ,QAAQ,IAAI,OAAO,UAAU,CAAC,KAC5C,OAAO,QAAQ,IAAI,OAAO,cAAc,MAAM;AAElD;;;;;;;;;;;;;AAcA,SAAgB,qBAAqB,UAAkB,OAA2C;CAChG,QAAQ,YACN,IAAI,SAAS,YAAY;EACvB,MAAM,OAAO;GAAC;GAAU;GAAa;GAAU,GAAG;EAAK;EAEvD,IAAI,QAAQ,SAAS,KAAK,KAAK,aAAa,QAAQ,OAAO;EAE3D,SACE,QAAQ,UACR,MACA;GACE,KAAK,QAAQ,OAAO,QAAQ,IAAI;GAChC,UAAU;GACV,aAAa;GACb,WAAW;EACb,IACC,OAAO,QAAQ,WAAW;GACzB,IAAI;GAEJ,IAAI;IACF,SAAS,KAAK,MAAM,MAAM;GAC5B,QAAQ;IACN,SAAS;GACX;GAEA,IAAI,kBAAkB,MAAM,GAAG;IAC7B,QAAQ,MAAM;IACd;GACF;GAEA,MAAM,cAAc,+CAA+C,KAAK,MAAM;GAC9E,MAAM,MAAM,OAAO,SACf,eAAe,MAAM,OAAO,KAC5B,eAAe,OAAO,OAAO,QAAQ,CAAC;GAE1C,QAAQ;IACN,IAAI;IACJ,MAAM,QAAQ,QAAQ,UAAU;IAChC,OAAO;IACP,cAAc;IACd,YAAY;IACZ,eAAe;IACf,UAAU,CACR,cAAc;KACZ,MAAM;KACN,QAAQ;KACR,SAAS,iBAAiB,cAAc,sBAAsB,IAAI,IAAI,OAAO,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,GAAG,KAAK;IACzH,CAAC,CACH;GACF,CAAC;EACH,CACF;CACF,CAAC;AACL"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { colors } from "@mongez/copper";
|
|
2
|
+
|
|
3
|
+
//#region ../../packages/core/src/cli/commands/check/format-problems.ts
|
|
4
|
+
/** `file:line:col`, as much of it as the problem has. */
|
|
5
|
+
function locationOf(problem) {
|
|
6
|
+
if (!problem.file) return "(project)";
|
|
7
|
+
if (problem.line === null) return problem.file;
|
|
8
|
+
return `${problem.file}:${problem.line}${problem.column === null ? "" : `:${problem.column}`}`;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Two lines per problem: `file:line:col CODE message (rule)`, then the fix
|
|
12
|
+
* hint. Uncolored, so it is testable; {@link printProblems} adds color.
|
|
13
|
+
*/
|
|
14
|
+
function formatProblemLines(problems) {
|
|
15
|
+
return problems.flatMap((problem) => [`${locationOf(problem)} ${problem.code} ${problem.message.split("\n")[0]}${problem.rule ? ` (${problem.rule})` : ""}`, ` → ${problem.hint}`]);
|
|
16
|
+
}
|
|
17
|
+
/** Print problems to stdout, errors in red and warnings in yellow. */
|
|
18
|
+
function printProblems(problems) {
|
|
19
|
+
for (const problem of problems) {
|
|
20
|
+
const paint = problem.severity === "error" ? colors.red : colors.yellow;
|
|
21
|
+
const [first, second] = formatProblemLines([problem]);
|
|
22
|
+
console.log(paint(first ?? ""));
|
|
23
|
+
console.log(colors.dim(second ?? ""));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const STEP_SYMBOL = {
|
|
27
|
+
passed: "✓",
|
|
28
|
+
failed: "✗",
|
|
29
|
+
skipped: "-",
|
|
30
|
+
blocked: "!"
|
|
31
|
+
};
|
|
32
|
+
/** The step list and the verdict line of a check report, uncolored. */
|
|
33
|
+
function formatCheckSummary(report) {
|
|
34
|
+
const lines = report.steps.map((step) => `${STEP_SYMBOL[step.status]} ${step.name.padEnd(12)} ${step.status}${step.detail ? ` — ${step.detail}` : ""}`);
|
|
35
|
+
const { errors, warnings, environment } = report.summary;
|
|
36
|
+
lines.push("");
|
|
37
|
+
lines.push(report.exitCode === 0 ? `OK: ${warnings} warning(s)` : report.exitCode === 2 ? `${errors} error(s), ${environment} from this machine — fix the environment first (exit 2)` : `${errors} error(s) in the code (exit 1)`);
|
|
38
|
+
return lines;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export { formatCheckSummary, formatProblemLines, printProblems };
|
|
43
|
+
//# sourceMappingURL=format-problems.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-problems.mjs","names":[],"sources":["../../../../../../../../../../packages/core/src/cli/commands/check/format-problems.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\nimport type { CheckReport } from \"../../../tooling/check/check-report.types\";\nimport type { ToolingProblem } from \"../../../tooling/problem\";\n\n/** `file:line:col`, as much of it as the problem has. */\nfunction locationOf(problem: ToolingProblem): string {\n if (!problem.file) return \"(project)\";\n if (problem.line === null) return problem.file;\n\n return `${problem.file}:${problem.line}${problem.column === null ? \"\" : `:${problem.column}`}`;\n}\n\n/**\n * Two lines per problem: `file:line:col CODE message (rule)`, then the fix\n * hint. Uncolored, so it is testable; {@link printProblems} adds color.\n */\nexport function formatProblemLines(problems: readonly ToolingProblem[]): string[] {\n return problems.flatMap((problem) => [\n `${locationOf(problem)} ${problem.code} ${problem.message.split(\"\\n\")[0]}${problem.rule ? ` (${problem.rule})` : \"\"}`,\n ` → ${problem.hint}`,\n ]);\n}\n\n/** Print problems to stdout, errors in red and warnings in yellow. */\nexport function printProblems(problems: readonly ToolingProblem[]): void {\n for (const problem of problems) {\n const paint = problem.severity === \"error\" ? colors.red : colors.yellow;\n const [first, second] = formatProblemLines([problem]);\n\n console.log(paint(first ?? \"\"));\n console.log(colors.dim(second ?? \"\"));\n }\n}\n\nconst STEP_SYMBOL: Record<CheckReport[\"steps\"][number][\"status\"], string> = {\n passed: \"✓\",\n failed: \"✗\",\n skipped: \"-\",\n blocked: \"!\",\n};\n\n/** The step list and the verdict line of a check report, uncolored. */\nexport function formatCheckSummary(report: CheckReport): string[] {\n const lines = report.steps.map(\n (step) =>\n `${STEP_SYMBOL[step.status]} ${step.name.padEnd(12)} ${step.status}${step.detail ? ` — ${step.detail}` : \"\"}`,\n );\n const { errors, warnings, environment } = report.summary;\n\n lines.push(\"\");\n lines.push(\n report.exitCode === 0\n ? `OK: ${warnings} warning(s)`\n : report.exitCode === 2\n ? `${errors} error(s), ${environment} from this machine — fix the environment first (exit 2)`\n : `${errors} error(s) in the code (exit 1)`,\n );\n\n return lines;\n}\n"],"mappings":";;;;AAKA,SAAS,WAAW,SAAiC;CACnD,IAAI,CAAC,QAAQ,MAAM,OAAO;CAC1B,IAAI,QAAQ,SAAS,MAAM,OAAO,QAAQ;CAE1C,OAAO,GAAG,QAAQ,KAAK,GAAG,QAAQ,OAAO,QAAQ,WAAW,OAAO,KAAK,IAAI,QAAQ;AACtF;;;;;AAMA,SAAgB,mBAAmB,UAA+C;CAChF,OAAO,SAAS,SAAS,YAAY,CACnC,GAAG,WAAW,OAAO,EAAE,IAAI,QAAQ,KAAK,IAAI,QAAQ,QAAQ,MAAM,IAAI,CAAC,CAAC,KAAK,QAAQ,OAAO,KAAK,QAAQ,KAAK,KAAK,MACnH,OAAO,QAAQ,MACjB,CAAC;AACH;;AAGA,SAAgB,cAAc,UAA2C;CACvE,KAAK,MAAM,WAAW,UAAU;EAC9B,MAAM,QAAQ,QAAQ,aAAa,UAAU,OAAO,MAAM,OAAO;EACjE,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,OAAO,CAAC;EAEpD,QAAQ,IAAI,MAAM,SAAS,EAAE,CAAC;EAC9B,QAAQ,IAAI,OAAO,IAAI,UAAU,EAAE,CAAC;CACtC;AACF;AAEA,MAAM,cAAsE;CAC1E,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,SAAS;AACX;;AAGA,SAAgB,mBAAmB,QAA+B;CAChE,MAAM,QAAQ,OAAO,MAAM,KACxB,SACC,GAAG,YAAY,KAAK,QAAQ,GAAG,KAAK,KAAK,OAAO,EAAE,EAAE,GAAG,KAAK,SAAS,KAAK,SAAS,MAAM,KAAK,WAAW,IAC7G;CACA,MAAM,EAAE,QAAQ,UAAU,gBAAgB,OAAO;CAEjD,MAAM,KAAK,EAAE;CACb,MAAM,KACJ,OAAO,aAAa,IAChB,OAAO,SAAS,eAChB,OAAO,aAAa,IAClB,GAAG,OAAO,aAAa,YAAY,2DACnC,GAAG,OAAO,+BAClB;CAEA,OAAO;AACT"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { flushAndExit } from "../../flush-and-exit.mjs";
|
|
2
|
+
import { checkExitCode } from "../../../tooling/check/check-report.types.mjs";
|
|
3
|
+
import { runTypecheck } from "../../../tooling/typecheck/run-typecheck.mjs";
|
|
4
|
+
import { listChangedFiles } from "../../../tooling/check/changed-files.mjs";
|
|
5
|
+
import { printProblems } from "./format-problems.mjs";
|
|
6
|
+
|
|
7
|
+
//#region ../../packages/core/src/cli/commands/check/typecheck-command.action.ts
|
|
8
|
+
function stringOption(value) {
|
|
9
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Action behind `warlock typecheck`.
|
|
13
|
+
*
|
|
14
|
+
* Typechecks incrementally (state in `.warlock/cache/typecheck.tsbuildinfo`).
|
|
15
|
+
* `--changed` limits diagnostics to the files changed against HEAD (or the
|
|
16
|
+
* merge base with `--base`) and the files importing them. `--json` prints the
|
|
17
|
+
* result alone. Exit codes match `warlock check`: 0 clean, 1 type errors,
|
|
18
|
+
* 2 this machine (git unavailable for `--changed`).
|
|
19
|
+
*
|
|
20
|
+
* @param data Parsed CLI args: `changed`, `base`, `project`, `json`.
|
|
21
|
+
*/
|
|
22
|
+
async function typecheckCommandAction({ options }) {
|
|
23
|
+
const cwd = process.cwd();
|
|
24
|
+
const base = stringOption(options.base);
|
|
25
|
+
const changed = options.changed === true || base !== void 0;
|
|
26
|
+
const project = stringOption(options.project);
|
|
27
|
+
let result;
|
|
28
|
+
if (changed) {
|
|
29
|
+
const listed = await listChangedFiles({
|
|
30
|
+
cwd,
|
|
31
|
+
base
|
|
32
|
+
});
|
|
33
|
+
result = "problem" in listed ? {
|
|
34
|
+
ok: false,
|
|
35
|
+
mode: "files",
|
|
36
|
+
files: null,
|
|
37
|
+
checkedFiles: 0,
|
|
38
|
+
durationMs: 0,
|
|
39
|
+
buildInfoFile: null,
|
|
40
|
+
problems: [listed.problem]
|
|
41
|
+
} : runTypecheck({
|
|
42
|
+
cwd,
|
|
43
|
+
project,
|
|
44
|
+
files: listed.files
|
|
45
|
+
});
|
|
46
|
+
} else result = runTypecheck({
|
|
47
|
+
cwd,
|
|
48
|
+
project
|
|
49
|
+
});
|
|
50
|
+
const exitCode = checkExitCode(result.problems);
|
|
51
|
+
if (options.json === true) console.log(JSON.stringify(result, null, 2));
|
|
52
|
+
else {
|
|
53
|
+
printProblems(result.problems);
|
|
54
|
+
console.log(`${result.problems.length === 0 ? "No type errors" : `${result.problems.length} problem(s)`} in ${result.checkedFiles} file(s) (${result.durationMs}ms)`);
|
|
55
|
+
}
|
|
56
|
+
if (exitCode !== 0) await flushAndExit(exitCode);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
export { typecheckCommandAction };
|
|
61
|
+
//# sourceMappingURL=typecheck-command.action.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typecheck-command.action.mjs","names":[],"sources":["../../../../../../../../../../packages/core/src/cli/commands/check/typecheck-command.action.ts"],"sourcesContent":["import type { CommandActionData } from \"../../../commands/types\";\nimport { listChangedFiles } from \"../../../tooling/check/changed-files\";\nimport { checkExitCode } from \"../../../tooling/check/check-report.types\";\nimport { runTypecheck, type TypecheckResult } from \"../../../tooling/typecheck/run-typecheck\";\nimport { flushAndExit } from \"../../flush-and-exit\";\nimport { printProblems } from \"./format-problems\";\n\nfunction stringOption(value: string | number | boolean | undefined): string | undefined {\n return typeof value === \"string\" && value.trim().length > 0 ? value.trim() : undefined;\n}\n\n/**\n * Action behind `warlock typecheck`.\n *\n * Typechecks incrementally (state in `.warlock/cache/typecheck.tsbuildinfo`).\n * `--changed` limits diagnostics to the files changed against HEAD (or the\n * merge base with `--base`) and the files importing them. `--json` prints the\n * result alone. Exit codes match `warlock check`: 0 clean, 1 type errors,\n * 2 this machine (git unavailable for `--changed`).\n *\n * @param data Parsed CLI args: `changed`, `base`, `project`, `json`.\n */\nexport async function typecheckCommandAction({ options }: CommandActionData): Promise<void> {\n const cwd = process.cwd();\n const base = stringOption(options.base);\n const changed = options.changed === true || base !== undefined;\n const project = stringOption(options.project);\n let result: TypecheckResult;\n\n if (changed) {\n const listed = await listChangedFiles({ cwd, base });\n\n result =\n \"problem\" in listed\n ? {\n ok: false,\n mode: \"files\",\n files: null,\n checkedFiles: 0,\n durationMs: 0,\n buildInfoFile: null,\n problems: [listed.problem],\n }\n : runTypecheck({ cwd, project, files: listed.files });\n } else {\n result = runTypecheck({ cwd, project });\n }\n\n const exitCode = checkExitCode(result.problems);\n\n if (options.json === true) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n printProblems(result.problems);\n console.log(\n `${result.problems.length === 0 ? \"No type errors\" : `${result.problems.length} problem(s)`} in ${result.checkedFiles} file(s) (${result.durationMs}ms)`,\n );\n }\n\n if (exitCode !== 0) {\n await flushAndExit(exitCode);\n }\n}\n"],"mappings":";;;;;;;AAOA,SAAS,aAAa,OAAkE;CACtF,OAAO,OAAO,UAAU,YAAY,MAAM,KAAK,CAAC,CAAC,SAAS,IAAI,MAAM,KAAK,IAAI;AAC/E;;;;;;;;;;;;AAaA,eAAsB,uBAAuB,EAAE,WAA6C;CAC1F,MAAM,MAAM,QAAQ,IAAI;CACxB,MAAM,OAAO,aAAa,QAAQ,IAAI;CACtC,MAAM,UAAU,QAAQ,YAAY,QAAQ,SAAS;CACrD,MAAM,UAAU,aAAa,QAAQ,OAAO;CAC5C,IAAI;CAEJ,IAAI,SAAS;EACX,MAAM,SAAS,MAAM,iBAAiB;GAAE;GAAK;EAAK,CAAC;EAEnD,SACE,aAAa,SACT;GACE,IAAI;GACJ,MAAM;GACN,OAAO;GACP,cAAc;GACd,YAAY;GACZ,eAAe;GACf,UAAU,CAAC,OAAO,OAAO;EAC3B,IACA,aAAa;GAAE;GAAK;GAAS,OAAO,OAAO;EAAM,CAAC;CAC1D,OACE,SAAS,aAAa;EAAE;EAAK;CAAQ,CAAC;CAGxC,MAAM,WAAW,cAAc,OAAO,QAAQ;CAE9C,IAAI,QAAQ,SAAS,MACnB,QAAQ,IAAI,KAAK,UAAU,QAAQ,MAAM,CAAC,CAAC;MACtC;EACL,cAAc,OAAO,QAAQ;EAC7B,QAAQ,IACN,GAAG,OAAO,SAAS,WAAW,IAAI,mBAAmB,GAAG,OAAO,SAAS,OAAO,aAAa,MAAM,OAAO,aAAa,YAAY,OAAO,WAAW,IACtJ;CACF;CAEA,IAAI,aAAa,GACf,MAAM,aAAa,QAAQ;AAE/B"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { command } from "../../commands/cli-command.mjs";
|
|
2
|
+
import { checkCommandAction } from "./check/check-command.action.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../packages/core/src/cli/commands/check.command.ts
|
|
5
|
+
/**
|
|
6
|
+
* `warlock check` — the single verify command: typecheck, lint (the app's
|
|
7
|
+
* ESLint / oxlint config), the tests affected by the change, and framework
|
|
8
|
+
* convention checks, reported as one problem list. Exit 0 clean, 1 problems
|
|
9
|
+
* in the code, 2 problems with this machine.
|
|
10
|
+
*
|
|
11
|
+
* No preload: the steps read files and run tools; nothing boots, connects or
|
|
12
|
+
* binds a port, so `check` behaves the same with or without a database or
|
|
13
|
+
* Redis running.
|
|
14
|
+
*/
|
|
15
|
+
const checkCommand = command({
|
|
16
|
+
name: "check",
|
|
17
|
+
description: "Typecheck, lint, run the affected tests and check conventions; one problem list, exit 1 for your code and 2 for this machine",
|
|
18
|
+
action: checkCommandAction,
|
|
19
|
+
options: [
|
|
20
|
+
{
|
|
21
|
+
text: "--changed, -c",
|
|
22
|
+
description: "Only the files changed against HEAD (plus untracked files) and what they affect",
|
|
23
|
+
type: "boolean"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
text: "--base, -b",
|
|
27
|
+
description: "Compare with the merge base of this ref instead of HEAD (implies --changed)",
|
|
28
|
+
type: "string"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
text: "--skip, -s",
|
|
32
|
+
description: "Comma-separated steps to skip: environment, typecheck, lint, tests, conventions",
|
|
33
|
+
type: "string"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
text: "--project, -p",
|
|
37
|
+
description: "tsconfig path (default tsconfig.json)",
|
|
38
|
+
type: "string"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
text: "--json, -j",
|
|
42
|
+
description: "Print the report as JSON",
|
|
43
|
+
type: "boolean"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
export { checkCommand };
|
|
50
|
+
//# sourceMappingURL=check.command.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.command.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/cli/commands/check.command.ts"],"sourcesContent":["import { command } from \"../../commands/cli-command\";\nimport { checkCommandAction } from \"./check/check-command.action\";\n\n/**\n * `warlock check` — the single verify command: typecheck, lint (the app's\n * ESLint / oxlint config), the tests affected by the change, and framework\n * convention checks, reported as one problem list. Exit 0 clean, 1 problems\n * in the code, 2 problems with this machine.\n *\n * No preload: the steps read files and run tools; nothing boots, connects or\n * binds a port, so `check` behaves the same with or without a database or\n * Redis running.\n */\nexport const checkCommand = command({\n name: \"check\",\n description:\n \"Typecheck, lint, run the affected tests and check conventions; one problem list, exit 1 for your code and 2 for this machine\",\n action: checkCommandAction,\n options: [\n {\n text: \"--changed, -c\",\n description:\n \"Only the files changed against HEAD (plus untracked files) and what they affect\",\n type: \"boolean\",\n },\n {\n text: \"--base, -b\",\n description: \"Compare with the merge base of this ref instead of HEAD (implies --changed)\",\n type: \"string\",\n },\n {\n text: \"--skip, -s\",\n description:\n \"Comma-separated steps to skip: environment, typecheck, lint, tests, conventions\",\n type: \"string\",\n },\n {\n text: \"--project, -p\",\n description: \"tsconfig path (default tsconfig.json)\",\n type: \"string\",\n },\n {\n text: \"--json, -j\",\n description: \"Print the report as JSON\",\n type: \"boolean\",\n },\n ],\n});\n"],"mappings":";;;;;;;;;;;;;;AAaA,MAAa,eAAe,QAAQ;CAClC,MAAM;CACN,aACE;CACF,QAAQ;CACR,SAAS;EACP;GACE,MAAM;GACN,aACE;GACF,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aACE;GACF,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;CACF;AACF,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { assertNodeOnlyCommand } from "../../utils/runtime.mjs";
|
|
1
2
|
import { command } from "../../commands/cli-command.mjs";
|
|
2
3
|
import { isDevWorker, superviseDevServer } from "../../dev-server/supervisor.mjs";
|
|
3
4
|
import { displayStartupBanner } from "../cli-commands.utils.mjs";
|
|
@@ -19,16 +20,19 @@ const devServerCommand = command({
|
|
|
19
20
|
connectors: true
|
|
20
21
|
},
|
|
21
22
|
preAction: async () => {
|
|
23
|
+
assertNodeOnlyCommand("dev");
|
|
22
24
|
assertEsbuildBinaryIsLinked();
|
|
23
25
|
if (!isDevWorker()) return superviseDevServer();
|
|
24
26
|
await displayStartupBanner({ environment: "development" });
|
|
25
27
|
},
|
|
26
28
|
action: async (data) => {
|
|
27
|
-
|
|
29
|
+
const devServer = await startDevelopmentServer({
|
|
28
30
|
fresh: Boolean(data.options.fresh),
|
|
29
31
|
generateTypings: data.options.skipTypings ? false : void 0,
|
|
30
|
-
healthCheckers: data.options.skipHealth ? false : void 0
|
|
31
|
-
|
|
32
|
+
healthCheckers: data.options.skipHealth ? false : void 0,
|
|
33
|
+
mcp: data.options.mcp === true ? true : void 0
|
|
34
|
+
});
|
|
35
|
+
checkForFrameworkUpdate(devServer);
|
|
32
36
|
},
|
|
33
37
|
options: [
|
|
34
38
|
{
|
|
@@ -45,6 +49,11 @@ const devServerCommand = command({
|
|
|
45
49
|
text: "--skip-health, -sh",
|
|
46
50
|
description: "Skip file health checkers for this run",
|
|
47
51
|
type: "boolean"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
text: "--mcp",
|
|
55
|
+
description: "Also serve `warlock mcp` over HTTP on loopback from the dev server (live registries; needs @warlock.js/ai-tools)",
|
|
56
|
+
type: "boolean"
|
|
48
57
|
}
|
|
49
58
|
]
|
|
50
59
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-server.command.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/cli/commands/dev-server.command.ts"],"sourcesContent":["import { checkForFrameworkUpdate } from \"../../dev-server/check-for-updates\";\nimport { startDevelopmentServer } from \"../../dev-server/start-development-server\";\nimport { isDevWorker, superviseDevServer } from \"../../dev-server/supervisor\";\nimport { assertEsbuildBinaryIsLinked } from \"../../production/esbuild-preflight\";\nimport { command } from \"../../commands/cli-command\";\nimport { displayStartupBanner } from \"../cli-commands.utils\";\n\nexport const devServerCommand = command({\n name: \"dev\",\n description: \"Start development server (HMR, type-gen, health checks)\",\n persistent: true,\n preload: {\n runtimeStrategy: \"development\",\n // Overrides whatever NODE_ENV the shell exported. A shell with\n // NODE_ENV=production made Vite's dep optimiser pre-bundle the PRODUCTION\n // build of React, which silently suppresses hydration-mismatch warnings —\n // the dev server was hiding the exact class of bug it exists to surface.\n // Set here, in preload, because preloaders run before the action, and the\n // action is what eventually reaches Vite's `createServer`.\n environment: \"development\",\n config: true, // load all config\n bootstrap: true,\n prestart: true, // load prestart file (if exists)\n // Only the Early lifecycle phase starts here; the Late phase\n // (http, socket) starts after app modules load — see\n // development-server.ts STEP 8.5.\n connectors: true,\n },\n preAction: async () => {\n // Fail before either role (supervisor or worker) does any other work —\n // a missing/unlinked esbuild binary would otherwise surface much later\n // as an opaque low-level error from deep inside the transpile path.\n assertEsbuildBinaryIsLinked();\n\n // Two roles share this command. The first `warlock dev` becomes a thin\n // supervisor that owns the terminal and (re)spawns the real server; the\n // process it spawns carries WARLOCK_DEV_WORKER and falls through to the\n // server itself. See supervisor.ts for why the split exists.\n //\n // This branch has to sit in `preAction`, which runs BEFORE the command's\n // preloaders: the supervisor must never load config or start connectors,\n // or it would hold a second database connection open for the whole\n // session. `superviseDevServer()` never resolves, so nothing below it —\n // preload included — runs in the supervisor.\n if (!isDevWorker()) {\n return superviseDevServer();\n }\n\n await displayStartupBanner({ environment: \"development\" });\n },\n action: async (data) => {\n const devServer = await startDevelopmentServer({\n fresh: Boolean(data.options.fresh),\n // Pass `false` only when the CLI flag is explicitly set; `undefined`\n // lets `warlock.config.ts > devServer.*` defaults apply.\n generateTypings: data.options.skipTypings ? false : undefined,\n healthCheckers: data.options.skipHealth ? false : undefined,\n });\n\n // Fire-and-forget: once the server is ready, surface a one-line notice if\n // a newer @warlock.js/core has been published, and arm the `u` shortcut\n // that updates + restarts. Fully self-guarded — it never blocks startup\n // nor breaks dev if the registry is unreachable.\n void checkForFrameworkUpdate(devServer);\n },\n options: [\n {\n text: \"--fresh, -f\",\n description: \"Delete .warlock/manifest.json before start (force full re-parse from disk)\",\n type: \"boolean\",\n },\n {\n text: \"--skip-typings, -st\",\n description: \"Skip background type generation for this run\",\n type: \"boolean\",\n },\n {\n text: \"--skip-health, -sh\",\n description: \"Skip file health checkers for this run\",\n type: \"boolean\",\n },\n ],\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev-server.command.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/cli/commands/dev-server.command.ts"],"sourcesContent":["import { checkForFrameworkUpdate } from \"../../dev-server/check-for-updates\";\nimport { startDevelopmentServer } from \"../../dev-server/start-development-server\";\nimport { isDevWorker, superviseDevServer } from \"../../dev-server/supervisor\";\nimport { assertEsbuildBinaryIsLinked } from \"../../production/esbuild-preflight\";\nimport { command } from \"../../commands/cli-command\";\nimport { assertNodeOnlyCommand } from \"../../utils/runtime\";\nimport { displayStartupBanner } from \"../cli-commands.utils\";\n\nexport const devServerCommand = command({\n name: \"dev\",\n description: \"Start development server (HMR, type-gen, health checks)\",\n persistent: true,\n preload: {\n runtimeStrategy: \"development\",\n // Overrides whatever NODE_ENV the shell exported. A shell with\n // NODE_ENV=production made Vite's dep optimiser pre-bundle the PRODUCTION\n // build of React, which silently suppresses hydration-mismatch warnings —\n // the dev server was hiding the exact class of bug it exists to surface.\n // Set here, in preload, because preloaders run before the action, and the\n // action is what eventually reaches Vite's `createServer`.\n environment: \"development\",\n config: true, // load all config\n bootstrap: true,\n prestart: true, // load prestart file (if exists)\n // Only the Early lifecycle phase starts here; the Late phase\n // (http, socket) starts after app modules load — see\n // development-server.ts STEP 8.5.\n connectors: true,\n },\n preAction: async () => {\n // Node only. The dev server compiles TypeScript and hot-reloads modules\n // through Node's module loader hooks; Bun and Deno run the production\n // build instead. Checked first so neither role starts anything on them.\n assertNodeOnlyCommand(\"dev\");\n\n // Fail before either role (supervisor or worker) does any other work —\n // a missing/unlinked esbuild binary would otherwise surface much later\n // as an opaque low-level error from deep inside the transpile path.\n assertEsbuildBinaryIsLinked();\n\n // Two roles share this command. The first `warlock dev` becomes a thin\n // supervisor that owns the terminal and (re)spawns the real server; the\n // process it spawns carries WARLOCK_DEV_WORKER and falls through to the\n // server itself. See supervisor.ts for why the split exists.\n //\n // This branch has to sit in `preAction`, which runs BEFORE the command's\n // preloaders: the supervisor must never load config or start connectors,\n // or it would hold a second database connection open for the whole\n // session. `superviseDevServer()` never resolves, so nothing below it —\n // preload included — runs in the supervisor.\n if (!isDevWorker()) {\n return superviseDevServer();\n }\n\n await displayStartupBanner({ environment: \"development\" });\n },\n action: async (data) => {\n const devServer = await startDevelopmentServer({\n fresh: Boolean(data.options.fresh),\n // Pass `false` only when the CLI flag is explicitly set; `undefined`\n // lets `warlock.config.ts > devServer.*` defaults apply.\n generateTypings: data.options.skipTypings ? false : undefined,\n healthCheckers: data.options.skipHealth ? false : undefined,\n mcp: data.options.mcp === true ? true : undefined,\n });\n\n // Fire-and-forget: once the server is ready, surface a one-line notice if\n // a newer @warlock.js/core has been published, and arm the `u` shortcut\n // that updates + restarts. Fully self-guarded — it never blocks startup\n // nor breaks dev if the registry is unreachable.\n void checkForFrameworkUpdate(devServer);\n },\n options: [\n {\n text: \"--fresh, -f\",\n description: \"Delete .warlock/manifest.json before start (force full re-parse from disk)\",\n type: \"boolean\",\n },\n {\n text: \"--skip-typings, -st\",\n description: \"Skip background type generation for this run\",\n type: \"boolean\",\n },\n {\n text: \"--skip-health, -sh\",\n description: \"Skip file health checkers for this run\",\n type: \"boolean\",\n },\n {\n text: \"--mcp\",\n description:\n \"Also serve `warlock mcp` over HTTP on loopback from the dev server (live registries; needs @warlock.js/ai-tools)\",\n type: \"boolean\",\n },\n ],\n});\n"],"mappings":";;;;;;;;;AAQA,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;EAIrB,sBAAsB,KAAK;EAK3B,4BAA4B;EAY5B,IAAI,CAAC,YAAY,GACf,OAAO,mBAAmB;EAG5B,MAAM,qBAAqB,EAAE,aAAa,cAAc,CAAC;CAC3D;CACA,QAAQ,OAAO,SAAS;EACtB,MAAM,YAAY,MAAM,uBAAuB;GAC7C,OAAO,QAAQ,KAAK,QAAQ,KAAK;GAGjC,iBAAiB,KAAK,QAAQ,cAAc,QAAQ;GACpD,gBAAgB,KAAK,QAAQ,aAAa,QAAQ;GAClD,KAAK,KAAK,QAAQ,QAAQ,OAAO,OAAO;EAC1C,CAAC;EAMD,AAAK,wBAAwB,SAAS;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;EACA;GACE,MAAM;GACN,aACE;GACF,MAAM;EACR;CACF;AACF,CAAC"}
|
|
@@ -131,12 +131,16 @@ async function loadAppModules() {
|
|
|
131
131
|
* `DevelopmentServer.autoDiscoverFiles()` exists, and it must keep the same
|
|
132
132
|
* position in the sequence.
|
|
133
133
|
*/
|
|
134
|
-
async function discoverModels() {
|
|
134
|
+
async function discoverModels(modules) {
|
|
135
135
|
const failures = [];
|
|
136
136
|
for (const file of filesOrchestrator.files.values()) {
|
|
137
137
|
if (file.type !== "model") continue;
|
|
138
138
|
try {
|
|
139
|
-
await filesOrchestrator.moduleLoader.loadModule(file, "model");
|
|
139
|
+
const exports = await filesOrchestrator.moduleLoader.loadModule(file, "model");
|
|
140
|
+
if (typeof exports === "object" && exports !== null) modules.push({
|
|
141
|
+
file: file.relativePath,
|
|
142
|
+
exports: { ...exports }
|
|
143
|
+
});
|
|
140
144
|
} catch (error) {
|
|
141
145
|
failures.push({
|
|
142
146
|
file: file.relativePath,
|
|
@@ -169,6 +173,7 @@ async function bootForDiagnostics() {
|
|
|
169
173
|
appRoutes: 0,
|
|
170
174
|
totalRoutes: 0,
|
|
171
175
|
moduleFailures: [],
|
|
176
|
+
modelModules: [],
|
|
172
177
|
connectors
|
|
173
178
|
};
|
|
174
179
|
try {
|
|
@@ -193,7 +198,7 @@ async function bootForDiagnostics() {
|
|
|
193
198
|
return !connectorsManager.isBuiltInName(name);
|
|
194
199
|
});
|
|
195
200
|
await bootPhase("early", connectors);
|
|
196
|
-
context.moduleFailures.push(...await discoverModels());
|
|
201
|
+
context.moduleFailures.push(...await discoverModels(context.modelModules));
|
|
197
202
|
context.moduleFailures.push(...await loadAppModules());
|
|
198
203
|
context.appRoutes = router.routeCount();
|
|
199
204
|
await bootPhase("late", connectors);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot-for-diagnostics.mjs","names":[],"sources":["../../../../../../../../../../packages/core/src/cli/commands/doctor/boot-for-diagnostics.ts"],"sourcesContent":["import { config } from \"../../../config/config-getter\";\nimport { connectorsManager } from \"../../../connectors/connectors-manager\";\nimport { registerConfiguredConnectors } from \"../../../connectors/register-configured-connectors\";\nimport { ConnectorLifecyclePhase } from \"../../../connectors/types\";\nimport { container } from \"../../../container\";\nimport { filesOrchestrator } from \"../../../dev-server/files-orchestrator\";\nimport { ModuleLoadError } from \"../../../dev-server/module-loader\";\nimport { router } from \"../../../router/router\";\nimport type { DoctorBootContext, ModuleFailure } from \"./check.types\";\n\n/**\n * @fileoverview The boot pass `warlock doctor` runs before its checks.\n *\n * THE RULE: **doctor boots, it never starts.**\n *\n * The connector contract already splits the two things doctor needs to keep\n * apart. `boot()` is where a connector REGISTERS — the HTTP connector builds a\n * Fastify instance and adds `/health` + `/ready` to it, the web connector\n * installs one route per page on the app router — and `start()` is where it\n * CONNECTS: opens the database, dials the cache, binds the port. Doctor runs\n * every `boot()` and no `start()`, so it sees the exact surface a served app\n * would have while opening no connection and binding no port.\n *\n * That seam is what makes the checks true. Before it existed here, doctor\n * preloaded config and framework bootstrap only: no app module was ever\n * imported, so no route module ever ran, so `routes` reported `0` on an app\n * `warlock dev` served 14 routes for — while `health` reported the endpoints as\n * \"registered\" from a config flag alone. Two checks, one app, contradictory\n * answers, and the wrong one was the one users acted on.\n *\n * ORDERING mirrors `DevelopmentServer.start()` exactly, because the route\n * surface is order-dependent: early connectors boot, then models (decorator\n * registries the route modules resolve against), then locales/events/mains/\n * routes, then late connectors — which is where `web` turns pages into routes.\n * Get the order wrong and the count is wrong, which is the defect this replaces.\n *\n * NOT read-only in one narrow sense: it imports the app's own modules, so\n * whatever a module does at import time happens. That is unavoidable — routes\n * only exist as the side effect of importing the file that declares them — and\n * it is the same import the dev server performs. It also refreshes\n * `.warlock/manifest.json`, the framework's own file cache. Nothing in the\n * app's data, and no network, is touched.\n */\n\n/**\n * The one connector whose `boot()` can bind a port. See {@link shouldSkipBoot}.\n */\nconst SOCKET_CONNECTOR = \"socket\";\n\n/**\n * Normalize anything thrown into a one-line message.\n */\nfunction messageOf(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\n/**\n * Whether doctor must refuse to boot this connector, and why.\n *\n * Exactly one case, and it is not a taste call: `SocketConnector.boot()` shares\n * the HTTP connector's raw server when there is one, and CREATES its own —\n * `server.listen(socketConfig.port)` — when there is not. The HTTP connector\n * boots first (lower priority number), so the shared path is what normally\n * happens; an app that configures `socket` without `http` is the exception, and\n * for that app booting socket would make a diagnostic command open a listening\n * port. Detected by asking the container what HTTP actually left behind rather\n * than by re-deriving the condition from config.\n */\nfunction shouldSkipBoot(name: string): string | undefined {\n if (name === SOCKET_CONNECTOR && !container.has(\"http.server\")) {\n return \"no http connector to share a server with — booting it would bind a port\";\n }\n\n return undefined;\n}\n\n/**\n * Boot every registered connector in one lifecycle phase, isolating failures.\n *\n * A connector that throws on boot is recorded and the loop continues: one bad\n * connector must not hide the rest of the report, and \"which connector failed\n * to boot\" is itself a finding worth printing.\n */\nasync function bootPhase(\n phase: ConnectorLifecyclePhase,\n connectors: DoctorBootContext[\"connectors\"],\n): Promise<void> {\n for (const connector of connectorsManager.list()) {\n if (connector.lifecyclePhase !== phase) continue;\n\n const skipReason = shouldSkipBoot(connector.name);\n\n if (skipReason) {\n connectors.skipped.push({ name: connector.name, reason: skipReason });\n continue;\n }\n\n try {\n await connector.boot();\n connectors.booted.push(connector.name);\n } catch (error) {\n connectors.failures.push({ name: connector.name, message: messageOf(error) });\n }\n }\n}\n\n/**\n * Import every app module the dev server imports at boot, collecting failures\n * instead of letting the first one abort the pass.\n *\n * `loadAll()` is deliberately reused rather than reimplemented: it owns the\n * canonical order (locale → event → main → route) and the `withSourceFile`\n * scoping that gives each route its origin file. It aggregates its failures and\n * throws them at the end, which is exactly the shape needed here — every module\n * is attempted, and one broken route file cannot mask another.\n */\nasync function loadAppModules(): Promise<ModuleFailure[]> {\n try {\n await filesOrchestrator.moduleLoader.loadAll();\n return [];\n } catch (error) {\n if (error instanceof AggregateError) {\n return (error.errors as unknown[]).map((failure) => {\n return failure instanceof ModuleLoadError\n ? { file: failure.file.relativePath, message: messageOf(failure.cause) }\n : { file: \"unknown\", message: messageOf(failure) };\n });\n }\n\n return [{ file: \"unknown\", message: messageOf(error) }];\n }\n}\n\n/**\n * Eagerly import model files so the decorator-driven registries the route\n * modules resolve names against are populated first — the same reason\n * `DevelopmentServer.autoDiscoverFiles()` exists, and it must keep the same\n * position in the sequence.\n */\nasync function discoverModels(): Promise<ModuleFailure[]> {\n const failures: ModuleFailure[] = [];\n\n for (const file of filesOrchestrator.files.values()) {\n if (file.type !== \"model\") continue;\n\n try {\n await filesOrchestrator.moduleLoader.loadModule(file, \"model\");\n } catch (error) {\n failures.push({\n file: file.relativePath,\n message: error instanceof ModuleLoadError ? messageOf(error.cause) : messageOf(error),\n });\n }\n }\n\n return failures;\n}\n\n/**\n * Run the boot pass and report what it found.\n *\n * Never throws. Every failure mode — a connector array the config manager\n * refuses, a connector that throws on boot, a route module that fails to\n * import — becomes a field on the returned context, which the checks turn into\n * a printed verdict. A diagnostic command that crashes while diagnosing tells\n * the user nothing.\n */\nexport async function bootForDiagnostics(): Promise<DoctorBootContext> {\n const connectors: DoctorBootContext[\"connectors\"] = {\n registered: [],\n configured: [],\n booted: [],\n skipped: [],\n failures: [],\n };\n\n const context: DoctorBootContext = {\n booted: false,\n routeModules: 0,\n appRoutes: 0,\n totalRoutes: 0,\n moduleFailures: [],\n connectors,\n };\n\n try {\n // `init()` is idempotent and the preloader already ran it; calling it again\n // costs nothing and keeps this function honest on its own.\n await filesOrchestrator.init();\n await filesOrchestrator.initializeAll();\n\n filesOrchestrator.specialFilesCollector.collect(filesOrchestrator.getFiles());\n\n context.routeModules = filesOrchestrator.specialFilesCollector.getFilesByType(\"route\").length;\n } catch (error) {\n context.moduleFailures.push({ file: \"src/\", message: messageOf(error) });\n\n return context;\n }\n\n // The app's own connectors (`warlock.config.ts > connectors`) must be\n // registered before any phase boots, exactly as the dev preloader does it —\n // otherwise doctor would report on the eleven built-ins alone and miss the\n // connector the app actually configured. This is also the call that refuses a\n // duplicate or reserved connector name, so a config that would crash the next\n // real boot is caught here instead.\n try {\n registerConfiguredConnectors();\n } catch (error) {\n connectors.registrationError = messageOf(error);\n }\n\n connectors.registered = connectorsManager.list().map((connector) => connector.name);\n connectors.configured = connectors.registered.filter((name) => {\n return !connectorsManager.isBuiltInName(name);\n });\n\n await bootPhase(ConnectorLifecyclePhase.Early, connectors);\n\n context.moduleFailures.push(...(await discoverModels()));\n context.moduleFailures.push(...(await loadAppModules()));\n\n // Snapshot BEFORE the late phase: everything the app's own route modules\n // registered. The difference between this and the total is what connectors\n // contributed (pages, for `web`), and reporting the two separately is what\n // lets a user reconcile doctor's number with the dev server's.\n context.appRoutes = router.routeCount();\n\n await bootPhase(ConnectorLifecyclePhase.Late, connectors);\n\n context.totalRoutes = router.routeCount();\n\n context.booted = true;\n\n return context;\n}\n\n/**\n * Whether the app declares an HTTP surface at all. Checks that only make sense\n * for a served app use this to opt out instead of inventing a verdict.\n */\nexport function hasHttpConfig(): boolean {\n return Boolean(config.get(\"http\"));\n}\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,CAAC,CAAC;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,CAAC,CAAC,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
|
+
{"version":3,"file":"boot-for-diagnostics.mjs","names":[],"sources":["../../../../../../../../../../packages/core/src/cli/commands/doctor/boot-for-diagnostics.ts"],"sourcesContent":["import { config } from \"../../../config/config-getter\";\nimport { connectorsManager } from \"../../../connectors/connectors-manager\";\nimport { registerConfiguredConnectors } from \"../../../connectors/register-configured-connectors\";\nimport { ConnectorLifecyclePhase } from \"../../../connectors/types\";\nimport { container } from \"../../../container\";\nimport { filesOrchestrator } from \"../../../dev-server/files-orchestrator\";\nimport { ModuleLoadError } from \"../../../dev-server/module-loader\";\nimport { router } from \"../../../router/router\";\nimport type { DoctorBootContext, ModelModule, ModuleFailure } from \"./check.types\";\n\n/**\n * @fileoverview The boot pass `warlock doctor` runs before its checks.\n *\n * THE RULE: **doctor boots, it never starts.**\n *\n * The connector contract already splits the two things doctor needs to keep\n * apart. `boot()` is where a connector REGISTERS — the HTTP connector builds a\n * Fastify instance and adds `/health` + `/ready` to it, the web connector\n * installs one route per page on the app router — and `start()` is where it\n * CONNECTS: opens the database, dials the cache, binds the port. Doctor runs\n * every `boot()` and no `start()`, so it sees the exact surface a served app\n * would have while opening no connection and binding no port.\n *\n * That seam is what makes the checks true. Before it existed here, doctor\n * preloaded config and framework bootstrap only: no app module was ever\n * imported, so no route module ever ran, so `routes` reported `0` on an app\n * `warlock dev` served 14 routes for — while `health` reported the endpoints as\n * \"registered\" from a config flag alone. Two checks, one app, contradictory\n * answers, and the wrong one was the one users acted on.\n *\n * ORDERING mirrors `DevelopmentServer.start()` exactly, because the route\n * surface is order-dependent: early connectors boot, then models (decorator\n * registries the route modules resolve against), then locales/events/mains/\n * routes, then late connectors — which is where `web` turns pages into routes.\n * Get the order wrong and the count is wrong, which is the defect this replaces.\n *\n * NOT read-only in one narrow sense: it imports the app's own modules, so\n * whatever a module does at import time happens. That is unavoidable — routes\n * only exist as the side effect of importing the file that declares them — and\n * it is the same import the dev server performs. It also refreshes\n * `.warlock/manifest.json`, the framework's own file cache. Nothing in the\n * app's data, and no network, is touched.\n */\n\n/**\n * The one connector whose `boot()` can bind a port. See {@link shouldSkipBoot}.\n */\nconst SOCKET_CONNECTOR = \"socket\";\n\n/**\n * Normalize anything thrown into a one-line message.\n */\nfunction messageOf(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\n/**\n * Whether doctor must refuse to boot this connector, and why.\n *\n * Exactly one case, and it is not a taste call: `SocketConnector.boot()` shares\n * the HTTP connector's raw server when there is one, and CREATES its own —\n * `server.listen(socketConfig.port)` — when there is not. The HTTP connector\n * boots first (lower priority number), so the shared path is what normally\n * happens; an app that configures `socket` without `http` is the exception, and\n * for that app booting socket would make a diagnostic command open a listening\n * port. Detected by asking the container what HTTP actually left behind rather\n * than by re-deriving the condition from config.\n */\nfunction shouldSkipBoot(name: string): string | undefined {\n if (name === SOCKET_CONNECTOR && !container.has(\"http.server\")) {\n return \"no http connector to share a server with — booting it would bind a port\";\n }\n\n return undefined;\n}\n\n/**\n * Boot every registered connector in one lifecycle phase, isolating failures.\n *\n * A connector that throws on boot is recorded and the loop continues: one bad\n * connector must not hide the rest of the report, and \"which connector failed\n * to boot\" is itself a finding worth printing.\n */\nasync function bootPhase(\n phase: ConnectorLifecyclePhase,\n connectors: DoctorBootContext[\"connectors\"],\n): Promise<void> {\n for (const connector of connectorsManager.list()) {\n if (connector.lifecyclePhase !== phase) continue;\n\n const skipReason = shouldSkipBoot(connector.name);\n\n if (skipReason) {\n connectors.skipped.push({ name: connector.name, reason: skipReason });\n continue;\n }\n\n try {\n await connector.boot();\n connectors.booted.push(connector.name);\n } catch (error) {\n connectors.failures.push({ name: connector.name, message: messageOf(error) });\n }\n }\n}\n\n/**\n * Import every app module the dev server imports at boot, collecting failures\n * instead of letting the first one abort the pass.\n *\n * `loadAll()` is deliberately reused rather than reimplemented: it owns the\n * canonical order (locale → event → main → route) and the `withSourceFile`\n * scoping that gives each route its origin file. It aggregates its failures and\n * throws them at the end, which is exactly the shape needed here — every module\n * is attempted, and one broken route file cannot mask another.\n */\nasync function loadAppModules(): Promise<ModuleFailure[]> {\n try {\n await filesOrchestrator.moduleLoader.loadAll();\n return [];\n } catch (error) {\n if (error instanceof AggregateError) {\n return (error.errors as unknown[]).map((failure) => {\n return failure instanceof ModuleLoadError\n ? { file: failure.file.relativePath, message: messageOf(failure.cause) }\n : { file: \"unknown\", message: messageOf(failure) };\n });\n }\n\n return [{ file: \"unknown\", message: messageOf(error) }];\n }\n}\n\n/**\n * Eagerly import model files so the decorator-driven registries the route\n * modules resolve names against are populated first — the same reason\n * `DevelopmentServer.autoDiscoverFiles()` exists, and it must keep the same\n * position in the sequence.\n */\nasync function discoverModels(modules: ModelModule[]): Promise<ModuleFailure[]> {\n const failures: ModuleFailure[] = [];\n\n for (const file of filesOrchestrator.files.values()) {\n if (file.type !== \"model\") continue;\n\n try {\n const exports = await filesOrchestrator.moduleLoader.loadModule<unknown>(file, \"model\");\n\n if (typeof exports === \"object\" && exports !== null) {\n modules.push({ file: file.relativePath, exports: { ...exports } });\n }\n } catch (error) {\n failures.push({\n file: file.relativePath,\n message: error instanceof ModuleLoadError ? messageOf(error.cause) : messageOf(error),\n });\n }\n }\n\n return failures;\n}\n\n/**\n * Run the boot pass and report what it found.\n *\n * Never throws. Every failure mode — a connector array the config manager\n * refuses, a connector that throws on boot, a route module that fails to\n * import — becomes a field on the returned context, which the checks turn into\n * a printed verdict. A diagnostic command that crashes while diagnosing tells\n * the user nothing.\n */\nexport async function bootForDiagnostics(): Promise<DoctorBootContext> {\n const connectors: DoctorBootContext[\"connectors\"] = {\n registered: [],\n configured: [],\n booted: [],\n skipped: [],\n failures: [],\n };\n\n const context: DoctorBootContext = {\n booted: false,\n routeModules: 0,\n appRoutes: 0,\n totalRoutes: 0,\n moduleFailures: [],\n modelModules: [],\n connectors,\n };\n\n try {\n // `init()` is idempotent and the preloader already ran it; calling it again\n // costs nothing and keeps this function honest on its own.\n await filesOrchestrator.init();\n await filesOrchestrator.initializeAll();\n\n filesOrchestrator.specialFilesCollector.collect(filesOrchestrator.getFiles());\n\n context.routeModules = filesOrchestrator.specialFilesCollector.getFilesByType(\"route\").length;\n } catch (error) {\n context.moduleFailures.push({ file: \"src/\", message: messageOf(error) });\n\n return context;\n }\n\n // The app's own connectors (`warlock.config.ts > connectors`) must be\n // registered before any phase boots, exactly as the dev preloader does it —\n // otherwise doctor would report on the eleven built-ins alone and miss the\n // connector the app actually configured. This is also the call that refuses a\n // duplicate or reserved connector name, so a config that would crash the next\n // real boot is caught here instead.\n try {\n registerConfiguredConnectors();\n } catch (error) {\n connectors.registrationError = messageOf(error);\n }\n\n connectors.registered = connectorsManager.list().map((connector) => connector.name);\n connectors.configured = connectors.registered.filter((name) => {\n return !connectorsManager.isBuiltInName(name);\n });\n\n await bootPhase(ConnectorLifecyclePhase.Early, connectors);\n\n context.moduleFailures.push(...(await discoverModels(context.modelModules)));\n context.moduleFailures.push(...(await loadAppModules()));\n\n // Snapshot BEFORE the late phase: everything the app's own route modules\n // registered. The difference between this and the total is what connectors\n // contributed (pages, for `web`), and reporting the two separately is what\n // lets a user reconcile doctor's number with the dev server's.\n context.appRoutes = router.routeCount();\n\n await bootPhase(ConnectorLifecyclePhase.Late, connectors);\n\n context.totalRoutes = router.routeCount();\n\n context.booted = true;\n\n return context;\n}\n\n/**\n * Whether the app declares an HTTP surface at all. Checks that only make sense\n * for a served app use this to opt out instead of inventing a verdict.\n */\nexport function hasHttpConfig(): boolean {\n return Boolean(config.get(\"http\"));\n}\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,eAAe,SAAkD;CAC9E,MAAM,WAA4B,CAAC;CAEnC,KAAK,MAAM,QAAQ,kBAAkB,MAAM,OAAO,GAAG;EACnD,IAAI,KAAK,SAAS,SAAS;EAE3B,IAAI;GACF,MAAM,UAAU,MAAM,kBAAkB,aAAa,WAAoB,MAAM,OAAO;GAEtF,IAAI,OAAO,YAAY,YAAY,YAAY,MAC7C,QAAQ,KAAK;IAAE,MAAM,KAAK;IAAc,SAAS,EAAE,GAAG,QAAQ;GAAE,CAAC;EAErE,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,cAAc,CAAC;EACf;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,CAAC,CAAC;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,CAAC,CAAC,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,QAAQ,YAAY,CAAE;CAC3E,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"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
//#region ../../packages/core/src/cli/commands/doctor/check.types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Shared types for the `warlock doctor` diagnostics command.
|
|
4
|
+
* @description A doctor check is a self-contained probe of one facet of the
|
|
5
|
+
* application. Each check is handed the {@link DoctorBootContext} produced by
|
|
6
|
+
* the boot pass (see `boot-for-diagnostics.ts`) and resolves to a
|
|
7
|
+
* {@link CheckResult} — or to `undefined`, meaning the check does not apply to
|
|
8
|
+
* this project and must not appear in the report at all. The runner aggregates
|
|
9
|
+
* the results into a {@link DoctorReport} and derives an exit code. Checks must
|
|
10
|
+
* never throw out — a thrown check is caught by the runner and recorded as a
|
|
11
|
+
* `fail` so `doctor` itself can never crash.
|
|
12
|
+
*
|
|
13
|
+
* THE STANDARD EVERY CHECK IS HELD TO: a warning that a healthy project
|
|
14
|
+
* triggers is a bug, not a nuance. Doctor's only asset is being believed, and
|
|
15
|
+
* every false positive is spent from the same budget the one true finding will
|
|
16
|
+
* need. If a check cannot say something that is both true and actionable about
|
|
17
|
+
* a given project, it returns `undefined` and stays silent.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* A module the boot pass could not import, and why.
|
|
21
|
+
*/
|
|
22
|
+
export type ModuleFailure = {
|
|
23
|
+
/** Project-relative path of the file that failed. */
|
|
24
|
+
file: string;
|
|
25
|
+
/** The underlying error message (the cause, not the wrapper). */
|
|
26
|
+
message: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* A model module the boot pass imported, with its exports — what `warlock
|
|
30
|
+
* inspect` reads the app's model classes from.
|
|
31
|
+
*/
|
|
32
|
+
export type ModelModule = {
|
|
33
|
+
/** Project-relative path of the model file. */
|
|
34
|
+
file: string;
|
|
35
|
+
/** The module's exports (a shallow copy of its namespace). */
|
|
36
|
+
exports: Record<string, unknown>;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* What the boot pass observed. Handed to every check so no check has to boot
|
|
40
|
+
* anything itself — and so the report cannot contain two checks that booted the
|
|
41
|
+
* app differently and disagreed about it.
|
|
42
|
+
*/
|
|
43
|
+
export type DoctorBootContext = {
|
|
44
|
+
/**
|
|
45
|
+
* Whether the pass completed. `false` means app discovery itself failed and
|
|
46
|
+
* every app-dependent check must say so rather than report a zero.
|
|
47
|
+
*/
|
|
48
|
+
booted: boolean;
|
|
49
|
+
/** Number of `src/app/<module>/routes.ts` files found on disk. */
|
|
50
|
+
routeModules: number;
|
|
51
|
+
/** Routes registered by app modules alone, before late connectors booted. */
|
|
52
|
+
appRoutes: number;
|
|
53
|
+
/** Routes on the app router once every connector had booted. */
|
|
54
|
+
totalRoutes: number;
|
|
55
|
+
/** Every app module that failed to import, in load order. */
|
|
56
|
+
moduleFailures: ModuleFailure[];
|
|
57
|
+
/** The model modules that imported, with their exports, in load order. */
|
|
58
|
+
modelModules: ModelModule[];
|
|
59
|
+
/** What happened to the connectors. */
|
|
60
|
+
connectors: {
|
|
61
|
+
/** Names of every registered connector (built-ins + the app's own). */
|
|
62
|
+
registered: string[];
|
|
63
|
+
/**
|
|
64
|
+
* The connectors the APP configured, i.e. registered names that are not
|
|
65
|
+
* framework built-ins. This is the part of the list that varies between
|
|
66
|
+
* projects — the built-in count is a constant and diagnoses nothing.
|
|
67
|
+
*/
|
|
68
|
+
configured: string[];
|
|
69
|
+
/** Names that booted without throwing. */
|
|
70
|
+
booted: string[];
|
|
71
|
+
/** Connectors doctor deliberately did not boot, with the reason. */
|
|
72
|
+
skipped: {
|
|
73
|
+
name: string;
|
|
74
|
+
reason: string;
|
|
75
|
+
}[];
|
|
76
|
+
/** Connectors whose `boot()` threw, with the message. */
|
|
77
|
+
failures: {
|
|
78
|
+
name: string;
|
|
79
|
+
message: string;
|
|
80
|
+
}[];
|
|
81
|
+
/**
|
|
82
|
+
* Set when `warlock.config.ts > connectors` was itself refused (duplicate
|
|
83
|
+
* or reserved name) — a config that would crash the next real boot.
|
|
84
|
+
*/
|
|
85
|
+
registrationError?: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
//#endregion
|
|
89
|
+
//# sourceMappingURL=check.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.types.d.mts","names":[],"sources":["../../../../../../../../../../packages/core/src/cli/commands/doctor/check.types.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;YAuBY;;EAEV;;EAGA;;;;;;YAOU;;EAEV;;EAGA,SAAS;;;;;;;YAQC;;;;;EAKV;;EAGA;;EAGA;;EAGA;;EAGA,gBAAgB;;EAGhB,cAAc;;EAGd;;IAEE;;;;;;IAOA;;IAGA;;IAGA;MAAW;MAAc;;;IAGzB;MAAY;MAAc;;;;;;IAM1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.check.mjs","names":[],"sources":["../../../../../../../../../../../packages/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
|
+
{"version":3,"file":"config.check.mjs","names":[],"sources":["../../../../../../../../../../../packages/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 code: \"WL1001\",\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,MAAM;GACN,QAAQ,uCAAuC,QAAQ,KAAK,IAAI;EAClE;EAGF,OAAO;GACL,MAAM;GACN,QAAQ;GACR,QAAQ,8BAA8B,yBAAyB,KAAK,IAAI,EAAE;EAC5E;CACF;AACF"}
|
|
@@ -32,11 +32,13 @@ const connectorsCheck = {
|
|
|
32
32
|
if (connectors.registrationError) return {
|
|
33
33
|
name: "connectors",
|
|
34
34
|
status: "fail",
|
|
35
|
+
code: "WL1009",
|
|
35
36
|
detail: `warlock.config.ts > connectors was refused: ${connectors.registrationError}`
|
|
36
37
|
};
|
|
37
38
|
if (connectors.failures.length > 0) return {
|
|
38
39
|
name: "connectors",
|
|
39
40
|
status: "fail",
|
|
41
|
+
code: "WL2003",
|
|
40
42
|
detail: `${connectors.failures.length} connector(s) failed to boot:\n` + connectors.failures.map((failure) => ` - ${failure.name}: ${failure.message}`).join("\n")
|
|
41
43
|
};
|
|
42
44
|
if (!context.booted) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectors.check.mjs","names":[],"sources":["../../../../../../../../../../../packages/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,CAAC,CAC3D,KAAK,IAAI;EAChB;EAGF,IAAI,CAAC,QAAQ,QACX;EAGF,MAAM,UAAU,WAAW,QACxB,KAAK,UAAU,aAAa,MAAM,KAAK,IAAI,MAAM,OAAO,EAAE,CAAC,CAC3D,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
|
+
{"version":3,"file":"connectors.check.mjs","names":[],"sources":["../../../../../../../../../../../packages/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 code: \"WL1009\",\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 code: \"WL2003\",\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,MAAM;GACN,QAAQ,+CAA+C,WAAW;EACpE;EAGF,IAAI,WAAW,SAAS,SAAS,GAC/B,OAAO;GACL,MAAM;GACN,QAAQ;GACR,MAAM;GACN,QACE,GAAG,WAAW,SAAS,OAAO,mCAC9B,WAAW,SACR,KAAK,YAAY,OAAO,QAAQ,KAAK,IAAI,QAAQ,SAAS,CAAC,CAC3D,KAAK,IAAI;EAChB;EAGF,IAAI,CAAC,QAAQ,QACX;EAGF,MAAM,UAAU,WAAW,QACxB,KAAK,UAAU,aAAa,MAAM,KAAK,IAAI,MAAM,OAAO,EAAE,CAAC,CAC3D,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"}
|
|
@@ -34,6 +34,7 @@ const handlerSignatureCheck = {
|
|
|
34
34
|
return {
|
|
35
35
|
name: "handler-signature",
|
|
36
36
|
status: "warn",
|
|
37
|
+
code: "WL3006",
|
|
37
38
|
detail: `${suspects.length === 1 ? "1 handler looks like the v4 positional signature" : `${suspects.length} handlers look like the v4 positional signature`}:\n` + suspects.map((suspect) => ` - ${describePositionalHandlerSuspect(suspect)}`).join("\n")
|
|
38
39
|
};
|
|
39
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler-signature.check.mjs","names":[],"sources":["../../../../../../../../../../../packages/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,
|
|
1
|
+
{"version":3,"file":"handler-signature.check.mjs","names":[],"sources":["../../../../../../../../../../../packages/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 code: \"WL3006\",\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,MAAM;GACN,QACE,GATF,SAAS,WAAW,IAChB,qDACA,GAAG,SAAS,OAAO,iDAOT,OACZ,SAAS,KAAK,YAAY,OAAO,iCAAiC,OAAO,GAAG,CAAC,CAAC,KAAK,IAAI;EAC3F;CACF;AACF"}
|
|
@@ -73,6 +73,7 @@ const healthCheck = {
|
|
|
73
73
|
if (collisions.length > 0) return {
|
|
74
74
|
name: "health",
|
|
75
75
|
status: "fail",
|
|
76
|
+
code: "WL5002",
|
|
76
77
|
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
|
};
|
|
78
79
|
if (!context.connectors.booted.includes("http")) return;
|
|
@@ -80,12 +81,14 @@ const healthCheck = {
|
|
|
80
81
|
if (registered.some((answer) => answer === void 0)) return {
|
|
81
82
|
name: "health",
|
|
82
83
|
status: "warn",
|
|
84
|
+
code: "WL5003",
|
|
83
85
|
detail: `could not read the http server's route table — ${livenessPath} + ${readinessPath} unverified`
|
|
84
86
|
};
|
|
85
87
|
const missing = [livenessPath, readinessPath].filter((_path, index) => !registered[index]);
|
|
86
88
|
if (missing.length > 0) return {
|
|
87
89
|
name: "health",
|
|
88
90
|
status: "fail",
|
|
91
|
+
code: "WL5003",
|
|
89
92
|
detail: `enabled in config but not registered on the http server: ${missing.join(", ")}`
|
|
90
93
|
};
|
|
91
94
|
return {
|