@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 @@
|
|
|
1
|
+
{"version":3,"file":"ast.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/syntax/ast.ts"],"sourcesContent":["import { parseSync, visitorKeys, type Node, type Program } from \"oxc-parser\";\nexport type * from \"oxc-parser\";\n\nexport type SourceFile = Program & { fileName: string; text: string };\nconst parents = new WeakMap<Node, Node>();\nconst sources = new WeakMap<Node, SourceFile>();\n\nexport function forEachChild(node: Node, visit: (node: Node) => void): void {\n const record = node as unknown as Record<string, unknown>;\n for (const key of visitorKeys[node.type] ?? []) {\n const value = record[key];\n for (const child of Array.isArray(value) ? value : [value]) {\n if (child && typeof child === \"object\" && \"type\" in child) visit(child as Node);\n }\n }\n}\n\nexport function parseSourceFile(fileName: string, text: string): SourceFile {\n const source = Object.assign(parseSync(fileName, text).program, { fileName, text });\n const attach = (node: Node): void => {\n sources.set(node, source);\n forEachChild(node, (child) => {\n parents.set(child, node);\n attach(child);\n });\n };\n attach(source);\n return source;\n}\nexport function parentOf(node: Node): Node | undefined {\n return parents.get(node);\n}\nexport function sourceOf(node: Node): SourceFile {\n const source = sources.get(node);\n if (!source) throw new Error(\"Node has no source file.\");\n return source;\n}\nexport function textOf(node: Node): string {\n return node.type === \"Identifier\" ? node.name : sourceOf(node).text.slice(node.start, node.end);\n}\nexport function keyName(node: Node | null | undefined): string | undefined {\n if (!node) return undefined;\n const parent = parentOf(node);\n if (parent && \"computed\" in parent && parent.computed) return undefined;\n if (node.type === \"Identifier\" || node.type === \"PrivateIdentifier\") return node.name;\n if (node.type === \"JSXIdentifier\") return node.name;\n if (node.type === \"Literal\" && (typeof node.value === \"string\" || typeof node.value === \"number\"))\n return String(node.value);\n if (node.type === \"TemplateLiteral\" && node.expressions.length === 0)\n return node.quasis[0]?.value.cooked ?? undefined;\n return undefined;\n}\nexport function positionOf(source: SourceFile, node: Node): { line: number; column: number } {\n const lines = source.text.slice(0, node.start).split(\"\\n\");\n return { line: lines.length, column: (lines.at(-1)?.length ?? 0) + 1 };\n}\n\nexport function expressionOf(node: Node): Node {\n if (node.type === \"CallExpression\" || node.type === \"NewExpression\") return node.callee;\n if (node.type === \"MemberExpression\") return node.object;\n if (node.type === \"AwaitExpression\" || node.type === \"SpreadElement\") return node.argument;\n if (node.type === \"IfStatement\") return node.test;\n if (\"expression\" in node && node.expression && typeof node.expression === \"object\")\n return node.expression;\n throw new Error(`No expression on ${node.type}.`);\n}\nexport function nameNode(node: Node): Node {\n if (\"id\" in node && node.id) return node.id;\n if (\"key\" in node) return node.key;\n if (\n node.type === \"ImportSpecifier\" ||\n node.type === \"ImportDefaultSpecifier\" ||\n node.type === \"ImportNamespaceSpecifier\"\n )\n return node.local;\n if (node.type === \"JSXAttribute\") return node.name;\n throw new Error(`No name on ${node.type}.`);\n}\nexport function declarationName(node: Node): string | undefined {\n return \"id\" in node && node.id?.type === \"Identifier\" ? node.id.name : undefined;\n}\nexport function valueText(node: Node): string {\n return keyName(node) ?? (node.type === \"Literal\" ? (node.raw ?? \"\") : textOf(node));\n}\nexport function initializerOf(\n node: import(\"oxc-parser\").ObjectProperty,\n): import(\"oxc-parser\").Expression;\nexport function initializerOf(node: Node): Node | null;\nexport function initializerOf(node: Node): Node | null {\n if (node.type === \"Property\") return node.value;\n if (node.type === \"VariableDeclarator\") return node.init;\n if (node.type === \"PropertyDefinition\" || node.type === \"JSXAttribute\") return node.value;\n return null;\n}\n\nexport function isCallExpression(node: Node): node is Node & { type: \"CallExpression\" } {\n return node.type === \"CallExpression\";\n}\n\nexport function isNewExpression(node: Node): node is Node & { type: \"NewExpression\" } {\n return node.type === \"NewExpression\";\n}\n\nexport function isIdentifier(node: Node): node is Node & { type: \"Identifier\" } {\n return node.type === \"Identifier\";\n}\n\nexport function isObjectLiteralExpression(node: Node): node is Node & { type: \"ObjectExpression\" } {\n return node.type === \"ObjectExpression\";\n}\n\nexport function isVariableDeclaration(node: Node): node is Node & { type: \"VariableDeclarator\" } {\n return node.type === \"VariableDeclarator\";\n}\n\nexport function isVariableStatement(node: Node): node is Node & { type: \"VariableDeclaration\" } {\n return node.type === \"VariableDeclaration\";\n}\n\nexport function isImportDeclaration(node: Node): node is Node & { type: \"ImportDeclaration\" } {\n return node.type === \"ImportDeclaration\";\n}\n\nexport function isPropertyAssignment(\n node: Node,\n): node is Node & { type: \"Property\"; shorthand: false; method: false; kind: \"init\" } {\n return node.type === \"Property\" && !node.shorthand && !node.method && node.kind === \"init\";\n}\n\nexport function isShorthandPropertyAssignment(\n node: Node,\n): node is Node & { type: \"Property\"; shorthand: true } {\n return node.type === \"Property\" && node.shorthand;\n}\n\nexport function isPropertyDeclaration(node: Node): node is Node & { type: \"PropertyDefinition\" } {\n return node.type === \"PropertyDefinition\";\n}\n\nexport function isExportAssignment(\n node: Node,\n): node is Node & { type: \"ExportDefaultDeclaration\" } {\n return node.type === \"ExportDefaultDeclaration\";\n}\n\nexport function isExportDeclaration(node: Node): node is Node & { type: \"ExportNamedDeclaration\" } {\n return node.type === \"ExportNamedDeclaration\";\n}\n\nexport function isClassDeclaration(node: Node): node is Node & { type: \"ClassDeclaration\" } {\n return node.type === \"ClassDeclaration\";\n}\n\nexport function isClassExpression(node: Node): node is Node & { type: \"ClassExpression\" } {\n return node.type === \"ClassExpression\";\n}\n\nexport function isFunctionDeclaration(node: Node): node is Node & { type: \"FunctionDeclaration\" } {\n return node.type === \"FunctionDeclaration\";\n}\n\nexport function isFunctionExpression(node: Node): node is Node & { type: \"FunctionExpression\" } {\n return node.type === \"FunctionExpression\";\n}\n\nexport function isArrowFunction(node: Node): node is Node & { type: \"ArrowFunctionExpression\" } {\n return node.type === \"ArrowFunctionExpression\";\n}\n\nexport function isInterfaceDeclaration(\n node: Node,\n): node is Node & { type: \"TSInterfaceDeclaration\" } {\n return node.type === \"TSInterfaceDeclaration\";\n}\n\nexport function isTypeAliasDeclaration(\n node: Node,\n): node is Node & { type: \"TSTypeAliasDeclaration\" } {\n return node.type === \"TSTypeAliasDeclaration\";\n}\n\nexport function isTypeReferenceNode(node: Node): node is Node & { type: \"TSTypeReference\" } {\n return node.type === \"TSTypeReference\";\n}\n\nexport function isAwaitExpression(node: Node): node is Node & { type: \"AwaitExpression\" } {\n return node.type === \"AwaitExpression\";\n}\n\nexport function isArrayLiteralExpression(node: Node): node is Node & { type: \"ArrayExpression\" } {\n return node.type === \"ArrayExpression\";\n}\n\nexport function isSpreadElement(node: Node): node is Node & { type: \"SpreadElement\" } {\n return node.type === \"SpreadElement\";\n}\n\nexport function isSpreadAssignment(node: Node): node is Node & { type: \"SpreadElement\" } {\n return node.type === \"SpreadElement\";\n}\n\nexport function isAsExpression(node: Node): node is Node & { type: \"TSAsExpression\" } {\n return node.type === \"TSAsExpression\";\n}\n\nexport function isNonNullExpression(node: Node): node is Node & { type: \"TSNonNullExpression\" } {\n return node.type === \"TSNonNullExpression\";\n}\n\nexport function isSatisfiesExpression(\n node: Node,\n): node is Node & { type: \"TSSatisfiesExpression\" } {\n return node.type === \"TSSatisfiesExpression\";\n}\n\nexport function isTypeAssertionExpression(node: Node): node is Node & { type: \"TSTypeAssertion\" } {\n return node.type === \"TSTypeAssertion\";\n}\n\nexport function isParenthesizedExpression(\n node: Node,\n): node is Node & { type: \"ParenthesizedExpression\" } {\n return node.type === \"ParenthesizedExpression\";\n}\n\nexport function isJsxAttribute(node: Node): node is Node & { type: \"JSXAttribute\" } {\n return node.type === \"JSXAttribute\";\n}\n\nexport function isJsxExpression(node: Node): node is Node & { type: \"JSXExpressionContainer\" } {\n return node.type === \"JSXExpressionContainer\";\n}\n\nexport function isJsxOpeningElement(node: Node): node is Node & { type: \"JSXOpeningElement\" } {\n return node.type === \"JSXOpeningElement\";\n}\n\nexport function isJsxSelfClosingElement(node: Node): node is Node & { type: \"JSXOpeningElement\" } {\n return node.type === \"JSXOpeningElement\" && node.selfClosing;\n}\n\nexport function isIfStatement(node: Node): node is Node & { type: \"IfStatement\" } {\n return node.type === \"IfStatement\";\n}\n\nexport function isConditionalExpression(\n node: Node,\n): node is Node & { type: \"ConditionalExpression\" } {\n return node.type === \"ConditionalExpression\";\n}\n\nexport function isTemplateExpression(node: Node): node is Node & { type: \"TemplateLiteral\" } {\n return node.type === \"TemplateLiteral\" && node.expressions.length > 0;\n}\n\nexport function isPropertySignature(node: Node): node is Node & { type: \"TSPropertySignature\" } {\n return node.type === \"TSPropertySignature\";\n}\n\nexport function isUnionTypeNode(node: Node): node is Node & { type: \"TSUnionType\" } {\n return node.type === \"TSUnionType\";\n}\n\nexport function isLiteralTypeNode(node: Node): node is Node & { type: \"TSLiteralType\" } {\n return node.type === \"TSLiteralType\";\n}\n\nexport function isPrivateIdentifier(node: Node): node is Node & { type: \"PrivateIdentifier\" } {\n return node.type === \"PrivateIdentifier\";\n}\n\nexport function isExpressionStatement(node: Node): node is Node & { type: \"ExpressionStatement\" } {\n return node.type === \"ExpressionStatement\";\n}\n\nexport function isStringLiteral(node: Node): node is import(\"oxc-parser\").StringLiteral {\n return node.type === \"Literal\" && typeof node.value === \"string\";\n}\nexport function isNumericLiteral(node: Node): node is import(\"oxc-parser\").NumericLiteral {\n return node.type === \"Literal\" && typeof node.value === \"number\";\n}\nexport function isNoSubstitutionTemplateLiteral(\n node: Node,\n): node is import(\"oxc-parser\").TemplateLiteral {\n return node.type === \"TemplateLiteral\" && node.expressions.length === 0;\n}\nexport function isBinaryExpression(\n node: Node,\n): node is\n | import(\"oxc-parser\").BinaryExpression\n | import(\"oxc-parser\").LogicalExpression\n | import(\"oxc-parser\").AssignmentExpression {\n return (\n node.type === \"BinaryExpression\" ||\n node.type === \"LogicalExpression\" ||\n node.type === \"AssignmentExpression\"\n );\n}\nexport function isRegularExpressionLiteral(node: Node): node is import(\"oxc-parser\").RegExpLiteral {\n return node.type === \"Literal\" && \"regex\" in node;\n}\nexport function isPropertyAccessExpression(\n node: Node,\n): node is import(\"oxc-parser\").MemberExpression & { computed: false } {\n return node.type === \"MemberExpression\" && !node.computed;\n}\nexport function isElementAccessExpression(\n node: Node,\n): node is import(\"oxc-parser\").MemberExpression & { computed: true } {\n return node.type === \"MemberExpression\" && node.computed;\n}\nexport function isComputedPropertyName(node: Node): boolean {\n const parent = parentOf(node);\n return !!parent && \"computed\" in parent && parent.computed;\n}\nexport function isOmittedExpression(node: Node | null): node is null {\n return node === null;\n}\nexport function hasModifier(\n node: Node,\n modifier: \"export\" | \"default\" | \"static\" | \"declare\",\n): boolean {\n const parent = parentOf(node);\n if (modifier === \"export\")\n return parent?.type === \"ExportNamedDeclaration\" || parent?.type === \"ExportDefaultDeclaration\";\n if (modifier === \"default\") return parent?.type === \"ExportDefaultDeclaration\";\n return modifier in node && Reflect.get(node, modifier) === true;\n}\nexport function topLevelDeclarations(source: SourceFile): Node[] {\n return source.body.map((statement) =>\n (statement.type === \"ExportNamedDeclaration\" ||\n statement.type === \"ExportDefaultDeclaration\") &&\n statement.declaration\n ? statement.declaration\n : statement,\n );\n}\n\nexport type Identifier = Node & { type: \"Identifier\" };\nexport type FunctionDeclaration = Node & { type: \"FunctionDeclaration\" };\nexport type FunctionExpression = Node & { type: \"FunctionExpression\" };\nexport function isEnumDeclaration(node: Node): node is Node & { type: \"TSEnumDeclaration\" } {\n return node.type === \"TSEnumDeclaration\";\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { forEachChild, parseSourceFile } from "./ast.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../packages/core/src/tooling/syntax/imports.ts
|
|
4
|
+
/** Module references in real syntax, including type-only, dynamic and require references. */
|
|
5
|
+
function importSpecifiers(fileName, source) {
|
|
6
|
+
const found = [];
|
|
7
|
+
const visit = (node) => {
|
|
8
|
+
if ((node.type === "ImportDeclaration" || node.type === "ExportNamedDeclaration" || node.type === "ExportAllDeclaration") && node.source) found.push({
|
|
9
|
+
specifier: node.source.value,
|
|
10
|
+
node: node.source,
|
|
11
|
+
dynamic: false
|
|
12
|
+
});
|
|
13
|
+
else if (node.type === "ImportExpression" && node.source.type === "Literal" && typeof node.source.value === "string") found.push({
|
|
14
|
+
specifier: node.source.value,
|
|
15
|
+
node: node.source,
|
|
16
|
+
dynamic: true
|
|
17
|
+
});
|
|
18
|
+
else if (node.type === "CallExpression" && node.callee.type === "Identifier" && node.callee.name === "require") {
|
|
19
|
+
const argument = node.arguments[0];
|
|
20
|
+
if (argument?.type === "Literal" && typeof argument.value === "string") found.push({
|
|
21
|
+
specifier: argument.value,
|
|
22
|
+
node: argument,
|
|
23
|
+
dynamic: false
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
forEachChild(node, visit);
|
|
27
|
+
};
|
|
28
|
+
visit(parseSourceFile(fileName, source));
|
|
29
|
+
return found;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { importSpecifiers };
|
|
34
|
+
//# sourceMappingURL=imports.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imports.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/syntax/imports.ts"],"sourcesContent":["import { forEachChild, parseSourceFile, type Node } from \"./ast\";\n\n/** Module references in real syntax, including type-only, dynamic and require references. */\nexport function importSpecifiers(\n fileName: string,\n source: string,\n): { specifier: string; node: Node; dynamic: boolean }[] {\n const found: { specifier: string; node: Node; dynamic: boolean }[] = [];\n const visit = (node: Node): void => {\n if (\n (node.type === \"ImportDeclaration\" ||\n node.type === \"ExportNamedDeclaration\" ||\n node.type === \"ExportAllDeclaration\") &&\n node.source\n )\n found.push({ specifier: node.source.value, node: node.source, dynamic: false });\n else if (\n node.type === \"ImportExpression\" &&\n node.source.type === \"Literal\" &&\n typeof node.source.value === \"string\"\n )\n found.push({ specifier: node.source.value, node: node.source, dynamic: true });\n else if (\n node.type === \"CallExpression\" &&\n node.callee.type === \"Identifier\" &&\n node.callee.name === \"require\"\n ) {\n const argument = node.arguments[0];\n if (argument?.type === \"Literal\" && typeof argument.value === \"string\")\n found.push({ specifier: argument.value, node: argument, dynamic: false });\n }\n forEachChild(node, visit);\n };\n visit(parseSourceFile(fileName, source));\n return found;\n}\n"],"mappings":";;;;AAGA,SAAgB,iBACd,UACA,QACuD;CACvD,MAAM,QAA+D,CAAC;CACtE,MAAM,SAAS,SAAqB;EAClC,KACG,KAAK,SAAS,uBACb,KAAK,SAAS,4BACd,KAAK,SAAS,2BAChB,KAAK,QAEL,MAAM,KAAK;GAAE,WAAW,KAAK,OAAO;GAAO,MAAM,KAAK;GAAQ,SAAS;EAAM,CAAC;OAC3E,IACH,KAAK,SAAS,sBACd,KAAK,OAAO,SAAS,aACrB,OAAO,KAAK,OAAO,UAAU,UAE7B,MAAM,KAAK;GAAE,WAAW,KAAK,OAAO;GAAO,MAAM,KAAK;GAAQ,SAAS;EAAK,CAAC;OAC1E,IACH,KAAK,SAAS,oBACd,KAAK,OAAO,SAAS,gBACrB,KAAK,OAAO,SAAS,WACrB;GACA,MAAM,WAAW,KAAK,UAAU;GAChC,IAAI,UAAU,SAAS,aAAa,OAAO,SAAS,UAAU,UAC5D,MAAM,KAAK;IAAE,WAAW,SAAS;IAAO,MAAM;IAAU,SAAS;GAAM,CAAC;EAC5E;EACA,aAAa,MAAM,KAAK;CAC1B;CACA,MAAM,gBAAgB,UAAU,MAAM,CAAC;CACvC,OAAO;AACT"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { DevtoolsPhaseRecord } from "../devtools/devtools-client.mjs";
|
|
2
|
+
//#region ../../packages/core/src/tooling/trace/trace-report.types.d.ts
|
|
3
|
+
/** The `schemaVersion` of {@link TraceReport}. Fields are only added within a version. */
|
|
4
|
+
export declare const TRACE_SCHEMA_VERSION = 1;
|
|
5
|
+
/** One middleware run, in the order it ran. */
|
|
6
|
+
export type TraceMiddleware = {
|
|
7
|
+
name: string | null;
|
|
8
|
+
index: number | null;
|
|
9
|
+
durationMs: number;
|
|
10
|
+
};
|
|
11
|
+
/** What the route's validation did. */
|
|
12
|
+
export type TraceValidation = {
|
|
13
|
+
/** Whether a validation phase ran (the route declares a schema or a `validate` function). */
|
|
14
|
+
ran: boolean;
|
|
15
|
+
durationMs: number | null;
|
|
16
|
+
/**
|
|
17
|
+
* `true` when validation ran and the handler ran after it (or the response
|
|
18
|
+
* succeeded); `false` when it ran, the handler did not, and the response is
|
|
19
|
+
* an error; `null` when validation did not run.
|
|
20
|
+
*/
|
|
21
|
+
passed: boolean | null;
|
|
22
|
+
/** The response body's `errors` (or the whole body) when validation failed; otherwise `null`. */
|
|
23
|
+
errors: unknown;
|
|
24
|
+
};
|
|
25
|
+
/** One recorded query, with its N+1 flag. */
|
|
26
|
+
export type TraceQuery = Record<string, unknown> & {
|
|
27
|
+
/** `true` when the query's shape is one devtools reported as an N+1. */
|
|
28
|
+
nPlusOne: boolean;
|
|
29
|
+
};
|
|
30
|
+
/** What `warlock trace --json` prints and `traceRequest()` returns. */
|
|
31
|
+
export type TraceReport = {
|
|
32
|
+
schemaVersion: typeof TRACE_SCHEMA_VERSION;
|
|
33
|
+
/** The request id the server used (the `x-request-id` it echoed). */
|
|
34
|
+
requestId: string;
|
|
35
|
+
/** The dev server origin the request went to. */
|
|
36
|
+
server: string;
|
|
37
|
+
request: {
|
|
38
|
+
method: string;
|
|
39
|
+
url: string;
|
|
40
|
+
/** Sent headers; `authorization`, `cookie` and `proxy-authorization` values read `[redacted]`. */
|
|
41
|
+
headers: Record<string, string>;
|
|
42
|
+
body: unknown;
|
|
43
|
+
};
|
|
44
|
+
response: {
|
|
45
|
+
status: number;
|
|
46
|
+
headers: Record<string, string>;
|
|
47
|
+
/** Parsed JSON when the content type is JSON, else text; `null` for an empty body. */
|
|
48
|
+
body: unknown;
|
|
49
|
+
/** Whether `body` was cut to the first 64 KiB. */
|
|
50
|
+
truncated: boolean;
|
|
51
|
+
};
|
|
52
|
+
/** The matched route pattern, e.g. `/posts/:id`, or `null`. */
|
|
53
|
+
route: string | null;
|
|
54
|
+
/** The error devtools recorded for the request, or `null`. */
|
|
55
|
+
error: string | null;
|
|
56
|
+
timeline: {
|
|
57
|
+
/** Every recorded phase in the order it was recorded. */
|
|
58
|
+
phases: DevtoolsPhaseRecord[];
|
|
59
|
+
routeMatch: {
|
|
60
|
+
durationMs: number;
|
|
61
|
+
} | null;
|
|
62
|
+
middleware: TraceMiddleware[];
|
|
63
|
+
validation: TraceValidation;
|
|
64
|
+
handler: {
|
|
65
|
+
durationMs: number;
|
|
66
|
+
} | null;
|
|
67
|
+
};
|
|
68
|
+
queries: TraceQuery[];
|
|
69
|
+
/** Devtools warnings for the request (`{ type: "n+1", message, shape, count, caller }`). */
|
|
70
|
+
warnings: Record<string, unknown>[];
|
|
71
|
+
logs: Record<string, unknown>[];
|
|
72
|
+
cache: Record<string, unknown>[];
|
|
73
|
+
/** Ids of mails captured during the request. */
|
|
74
|
+
mails: string[];
|
|
75
|
+
timings: {
|
|
76
|
+
/** The server-side duration devtools measured, or `null` while unsettled. */
|
|
77
|
+
totalMs: number | null;
|
|
78
|
+
/** The round trip measured by the client. */
|
|
79
|
+
clientMs: number;
|
|
80
|
+
/** Total time per phase name. */
|
|
81
|
+
phasesMs: Record<string, number>;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
//#endregion
|
|
85
|
+
//# sourceMappingURL=trace-report.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace-report.types.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/trace/trace-report.types.ts"],"mappings":";;;qBAGa;;YAGD;EACV;EACA;EACA;;;YAIU;;EAEV;EACA;;;;;;EAMA;;EAEA;;;YAIU,aAAa;;EAEvB;;;YAIU;EACV,sBAAsB;;EAEtB;;EAEA;EACA;IACE;IACA;;IAEA,SAAS;IACT;;EAEF;IACE;IACA,SAAS;;IAET;;IAEA;;;EAGF;;EAEA;EACA;;IAEE,QAAQ;IACR;MAAc;;IACd,YAAY;IACZ,YAAY;IACZ;MAAW;;;EAEb,SAAS;;EAET,UAAU;EACV,MAAM;EACN,OAAO;;EAEP;EACA;;IAEE;;IAEA;;IAEA,UAAU"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region ../../packages/core/src/tooling/trace/trace-report.types.ts
|
|
2
|
+
/** The `schemaVersion` of {@link TraceReport}. Fields are only added within a version. */
|
|
3
|
+
const TRACE_SCHEMA_VERSION = 1;
|
|
4
|
+
|
|
5
|
+
//#endregion
|
|
6
|
+
export { TRACE_SCHEMA_VERSION };
|
|
7
|
+
//# sourceMappingURL=trace-report.types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace-report.types.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/trace/trace-report.types.ts"],"sourcesContent":["import type { DevtoolsPhaseRecord } from \"../devtools/devtools-client\";\n\n/** The `schemaVersion` of {@link TraceReport}. Fields are only added within a version. */\nexport const TRACE_SCHEMA_VERSION = 1;\n\n/** One middleware run, in the order it ran. */\nexport type TraceMiddleware = {\n name: string | null;\n index: number | null;\n durationMs: number;\n};\n\n/** What the route's validation did. */\nexport type TraceValidation = {\n /** Whether a validation phase ran (the route declares a schema or a `validate` function). */\n ran: boolean;\n durationMs: number | null;\n /**\n * `true` when validation ran and the handler ran after it (or the response\n * succeeded); `false` when it ran, the handler did not, and the response is\n * an error; `null` when validation did not run.\n */\n passed: boolean | null;\n /** The response body's `errors` (or the whole body) when validation failed; otherwise `null`. */\n errors: unknown;\n};\n\n/** One recorded query, with its N+1 flag. */\nexport type TraceQuery = Record<string, unknown> & {\n /** `true` when the query's shape is one devtools reported as an N+1. */\n nPlusOne: boolean;\n};\n\n/** What `warlock trace --json` prints and `traceRequest()` returns. */\nexport type TraceReport = {\n schemaVersion: typeof TRACE_SCHEMA_VERSION;\n /** The request id the server used (the `x-request-id` it echoed). */\n requestId: string;\n /** The dev server origin the request went to. */\n server: string;\n request: {\n method: string;\n url: string;\n /** Sent headers; `authorization`, `cookie` and `proxy-authorization` values read `[redacted]`. */\n headers: Record<string, string>;\n body: unknown;\n };\n response: {\n status: number;\n headers: Record<string, string>;\n /** Parsed JSON when the content type is JSON, else text; `null` for an empty body. */\n body: unknown;\n /** Whether `body` was cut to the first 64 KiB. */\n truncated: boolean;\n };\n /** The matched route pattern, e.g. `/posts/:id`, or `null`. */\n route: string | null;\n /** The error devtools recorded for the request, or `null`. */\n error: string | null;\n timeline: {\n /** Every recorded phase in the order it was recorded. */\n phases: DevtoolsPhaseRecord[];\n routeMatch: { durationMs: number } | null;\n middleware: TraceMiddleware[];\n validation: TraceValidation;\n handler: { durationMs: number } | null;\n };\n queries: TraceQuery[];\n /** Devtools warnings for the request (`{ type: \"n+1\", message, shape, count, caller }`). */\n warnings: Record<string, unknown>[];\n logs: Record<string, unknown>[];\n cache: Record<string, unknown>[];\n /** Ids of mails captured during the request. */\n mails: string[];\n timings: {\n /** The server-side duration devtools measured, or `null` while unsettled. */\n totalMs: number | null;\n /** The round trip measured by the client. */\n clientMs: number;\n /** Total time per phase name. */\n phasesMs: Record<string, number>;\n };\n};\n"],"mappings":";;AAGA,MAAa,uBAAuB"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { DevtoolsFetch, DevtoolsRequestRecord } from "../devtools/devtools-client.mjs";
|
|
2
|
+
import { TraceReport } from "./trace-report.types.mjs";
|
|
3
|
+
//#region ../../packages/core/src/tooling/trace/trace-request.d.ts
|
|
4
|
+
/** The correlation header core reads and echoes by default (`http.requestId.header`). */
|
|
5
|
+
export declare const TRACE_REQUEST_ID_HEADER = "x-request-id";
|
|
6
|
+
/** Response bodies longer than this are cut in the report. */
|
|
7
|
+
export declare const TRACE_BODY_LIMIT: number;
|
|
8
|
+
/** Inputs of {@link traceRequest}. */
|
|
9
|
+
export type TraceRequestOptions = {
|
|
10
|
+
/** HTTP method, any case. */
|
|
11
|
+
method: string;
|
|
12
|
+
/** A path on the dev server (`/posts?page=2`) or an absolute URL. */
|
|
13
|
+
url: string;
|
|
14
|
+
/**
|
|
15
|
+
* The request body. A string is sent as-is; anything else is sent as JSON
|
|
16
|
+
* with `content-type: application/json` unless `headers` sets a content type.
|
|
17
|
+
*/
|
|
18
|
+
body?: unknown;
|
|
19
|
+
/** Extra request headers. */
|
|
20
|
+
headers?: Record<string, string>;
|
|
21
|
+
/** Project root, where `.warlock/dev-server.json` is read. Default: `process.cwd()`. */
|
|
22
|
+
cwd?: string;
|
|
23
|
+
/** The dev server origin; overrides the recorded one. */
|
|
24
|
+
serverUrl?: string;
|
|
25
|
+
/** The devtools mount; overrides the recorded one (default `/__warlock`). */
|
|
26
|
+
devtoolsPath?: string;
|
|
27
|
+
fetch?: DevtoolsFetch;
|
|
28
|
+
/** How long to wait for devtools to settle the request record. Default 5000 ms. */
|
|
29
|
+
timeoutMs?: number;
|
|
30
|
+
/** Poll interval while waiting for the record. Default 50 ms. */
|
|
31
|
+
intervalMs?: number;
|
|
32
|
+
/**
|
|
33
|
+
* The correlation header the app reads and echoes (`http.requestId.header`).
|
|
34
|
+
* Default `x-request-id`.
|
|
35
|
+
*/
|
|
36
|
+
requestIdHeader?: string;
|
|
37
|
+
};
|
|
38
|
+
/** The HTTP response as the report needs it. */
|
|
39
|
+
export type TracedResponse = {
|
|
40
|
+
status: number;
|
|
41
|
+
headers: Record<string, string>;
|
|
42
|
+
/** The raw response text. */
|
|
43
|
+
text: string;
|
|
44
|
+
};
|
|
45
|
+
/** Inputs of {@link buildTraceReport}. */
|
|
46
|
+
export type BuildTraceReportInput = {
|
|
47
|
+
requestId: string;
|
|
48
|
+
server: string;
|
|
49
|
+
request: {
|
|
50
|
+
method: string;
|
|
51
|
+
url: string;
|
|
52
|
+
headers: Record<string, string>;
|
|
53
|
+
body: unknown;
|
|
54
|
+
};
|
|
55
|
+
response: TracedResponse;
|
|
56
|
+
record: DevtoolsRequestRecord;
|
|
57
|
+
clientMs: number;
|
|
58
|
+
};
|
|
59
|
+
/** Headers with credential values replaced by `[redacted]`. */
|
|
60
|
+
export declare function redactHeaders(headers: Record<string, string>): Record<string, string>;
|
|
61
|
+
/** The response body as the report prints it: parsed JSON, else text, cut at the limit. */
|
|
62
|
+
export declare function readResponseBody(text: string, contentType: string | undefined): {
|
|
63
|
+
body: unknown;
|
|
64
|
+
truncated: boolean;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Assemble a {@link TraceReport} from the HTTP response and the devtools
|
|
68
|
+
* record of the same request. Pure: no I/O, so it is testable on its own.
|
|
69
|
+
*/
|
|
70
|
+
export declare function buildTraceReport(input: BuildTraceReportInput): TraceReport;
|
|
71
|
+
/** The absolute URL a trace sends to: `url` as-is when absolute, else joined to the server origin. */
|
|
72
|
+
export declare function resolveTraceUrl(server: string, url: string): string;
|
|
73
|
+
/**
|
|
74
|
+
* Send one request to the running dev server and return its devtools
|
|
75
|
+
* timeline: middleware, validation result, handler, queries (with N+1 flags),
|
|
76
|
+
* logs, cache operations, captured mails, the response and the timings.
|
|
77
|
+
*
|
|
78
|
+
* Devtools is reached first, so a missing dev server (`WL8008`) or devtools
|
|
79
|
+
* (`WL8009`) fails before anything is sent. The request carries an
|
|
80
|
+
* `x-request-id` (unless the caller set one), which core adopts as
|
|
81
|
+
* `request.id` and echoes back; that id is how the devtools record is found.
|
|
82
|
+
* Throws `WL5004` when devtools never recorded the request.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* const report = await traceRequest({ method: "POST", url: "/posts", body: { title: "Hi" } });
|
|
86
|
+
* report.timeline.validation.passed; // false when the body was refused
|
|
87
|
+
*/
|
|
88
|
+
export declare function traceRequest(options: TraceRequestOptions): Promise<TraceReport>;
|
|
89
|
+
//#endregion
|
|
90
|
+
//# sourceMappingURL=trace-request.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace-request.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/trace/trace-request.ts"],"mappings":";;;;qBAgBa;;qBAGA;;YAMD;;EAEV;;EAEA;;;;;EAKA;;EAEA,UAAU;;EAEV;;EAEA;;EAEA;EACA,QAAQ;;EAER;;EAEA;;;;;EAKA;;;YAIU;EACV;EACA,SAAS;;EAET;;;YAIU;EACV;EACA;EACA;IAAW;IAAgB;IAAa,SAAS;IAAwB;;EACzE,UAAU;EACV,QAAQ;EACR;;;wBAkBc,cAAc,SAAS,yBAAyB;;wBAWhD,iBACd,cACA;EACG;EAAe;;;;;;wBA6DJ,iBAAiB,OAAO,wBAAwB;;wBAoEhD,gBAAgB,gBAAgB;;;;;;;;;;;;;;;;wBA2C1B,aAAa,SAAS,sBAAsB,QAAQ"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { WarlockError } from "../../errors/warlock-error.mjs";
|
|
2
|
+
import { connectDevtools } from "../devtools/devtools-client.mjs";
|
|
3
|
+
import { TRACE_SCHEMA_VERSION } from "./trace-report.types.mjs";
|
|
4
|
+
import { randomUUID } from "node:crypto";
|
|
5
|
+
|
|
6
|
+
//#region ../../packages/core/src/tooling/trace/trace-request.ts
|
|
7
|
+
/** The correlation header core reads and echoes by default (`http.requestId.header`). */
|
|
8
|
+
const TRACE_REQUEST_ID_HEADER = "x-request-id";
|
|
9
|
+
/** Response bodies longer than this are cut in the report. */
|
|
10
|
+
const TRACE_BODY_LIMIT = 65536;
|
|
11
|
+
/** Header values never printed in a report. */
|
|
12
|
+
const REDACTED_HEADERS = /* @__PURE__ */ new Set([
|
|
13
|
+
"authorization",
|
|
14
|
+
"cookie",
|
|
15
|
+
"proxy-authorization"
|
|
16
|
+
]);
|
|
17
|
+
function isRecord(value) {
|
|
18
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19
|
+
}
|
|
20
|
+
function lowerCaseKeys(headers) {
|
|
21
|
+
const result = {};
|
|
22
|
+
for (const [key, value] of Object.entries(headers)) result[key.toLowerCase()] = value;
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
/** Headers with credential values replaced by `[redacted]`. */
|
|
26
|
+
function redactHeaders(headers) {
|
|
27
|
+
const result = {};
|
|
28
|
+
for (const [key, value] of Object.entries(headers)) result[key] = REDACTED_HEADERS.has(key.toLowerCase()) ? "[redacted]" : value;
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
/** The response body as the report prints it: parsed JSON, else text, cut at the limit. */
|
|
32
|
+
function readResponseBody(text, contentType) {
|
|
33
|
+
if (text.length === 0) return {
|
|
34
|
+
body: null,
|
|
35
|
+
truncated: false
|
|
36
|
+
};
|
|
37
|
+
const truncated = text.length > TRACE_BODY_LIMIT;
|
|
38
|
+
if (!truncated && contentType !== void 0 && /\bjson\b/i.test(contentType)) try {
|
|
39
|
+
return {
|
|
40
|
+
body: JSON.parse(text),
|
|
41
|
+
truncated: false
|
|
42
|
+
};
|
|
43
|
+
} catch {}
|
|
44
|
+
return {
|
|
45
|
+
body: truncated ? text.slice(0, TRACE_BODY_LIMIT) : text,
|
|
46
|
+
truncated
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function attrNumber(attrs, key) {
|
|
50
|
+
const value = attrs?.[key];
|
|
51
|
+
return typeof value === "number" ? value : null;
|
|
52
|
+
}
|
|
53
|
+
function attrString(attrs, key) {
|
|
54
|
+
const value = attrs?.[key];
|
|
55
|
+
return typeof value === "string" ? value : null;
|
|
56
|
+
}
|
|
57
|
+
function validationOf(record, status, body) {
|
|
58
|
+
const phases = record.phases.filter((phase) => phase.name === "validation");
|
|
59
|
+
if (phases.length === 0) return {
|
|
60
|
+
ran: false,
|
|
61
|
+
durationMs: null,
|
|
62
|
+
passed: null,
|
|
63
|
+
errors: null
|
|
64
|
+
};
|
|
65
|
+
const durationMs = phases.reduce((total, phase) => total + phase.durationMs, 0);
|
|
66
|
+
const passed = record.phases.some((phase) => phase.name === "handler") || status < 400;
|
|
67
|
+
return {
|
|
68
|
+
ran: true,
|
|
69
|
+
durationMs,
|
|
70
|
+
passed,
|
|
71
|
+
errors: passed ? null : isRecord(body) && "errors" in body ? body.errors : body
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function sumPhase(record, name) {
|
|
75
|
+
const phases = record.phases.filter((phase) => phase.name === name);
|
|
76
|
+
if (phases.length === 0) return null;
|
|
77
|
+
return { durationMs: phases.reduce((total, phase) => total + phase.durationMs, 0) };
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Assemble a {@link TraceReport} from the HTTP response and the devtools
|
|
81
|
+
* record of the same request. Pure: no I/O, so it is testable on its own.
|
|
82
|
+
*/
|
|
83
|
+
function buildTraceReport(input) {
|
|
84
|
+
const { record, response } = input;
|
|
85
|
+
const responseHeaders = lowerCaseKeys(response.headers);
|
|
86
|
+
const { body, truncated } = readResponseBody(response.text, responseHeaders["content-type"]);
|
|
87
|
+
const middleware = record.phases.filter((phase) => phase.name === "middleware").map((phase) => ({
|
|
88
|
+
name: attrString(phase.attrs, "name"),
|
|
89
|
+
index: attrNumber(phase.attrs, "index"),
|
|
90
|
+
durationMs: phase.durationMs
|
|
91
|
+
}));
|
|
92
|
+
const nPlusOneShapes = new Set(record.warnings.flatMap((warning) => warning.type === "n+1" && typeof warning.shape === "string" ? [warning.shape] : []));
|
|
93
|
+
const queries = record.queries.map((query) => ({
|
|
94
|
+
...query,
|
|
95
|
+
nPlusOne: typeof query.shape === "string" && nPlusOneShapes.has(query.shape)
|
|
96
|
+
}));
|
|
97
|
+
const phasesMs = {};
|
|
98
|
+
for (const phase of record.phases) phasesMs[phase.name] = (phasesMs[phase.name] ?? 0) + phase.durationMs;
|
|
99
|
+
return {
|
|
100
|
+
schemaVersion: 1,
|
|
101
|
+
requestId: input.requestId,
|
|
102
|
+
server: input.server,
|
|
103
|
+
request: {
|
|
104
|
+
method: input.request.method,
|
|
105
|
+
url: input.request.url,
|
|
106
|
+
headers: redactHeaders(input.request.headers),
|
|
107
|
+
body: input.request.body
|
|
108
|
+
},
|
|
109
|
+
response: {
|
|
110
|
+
status: response.status,
|
|
111
|
+
headers: redactHeaders(responseHeaders),
|
|
112
|
+
body,
|
|
113
|
+
truncated
|
|
114
|
+
},
|
|
115
|
+
route: record.route ?? null,
|
|
116
|
+
error: record.error ?? null,
|
|
117
|
+
timeline: {
|
|
118
|
+
phases: record.phases,
|
|
119
|
+
routeMatch: sumPhase(record, "route.match"),
|
|
120
|
+
middleware,
|
|
121
|
+
validation: validationOf(record, response.status, body),
|
|
122
|
+
handler: sumPhase(record, "handler")
|
|
123
|
+
},
|
|
124
|
+
queries,
|
|
125
|
+
warnings: record.warnings,
|
|
126
|
+
logs: record.logs,
|
|
127
|
+
cache: record.cache,
|
|
128
|
+
mails: record.mails,
|
|
129
|
+
timings: {
|
|
130
|
+
totalMs: record.durationMs ?? null,
|
|
131
|
+
clientMs: input.clientMs,
|
|
132
|
+
phasesMs
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
/** The absolute URL a trace sends to: `url` as-is when absolute, else joined to the server origin. */
|
|
137
|
+
function resolveTraceUrl(server, url) {
|
|
138
|
+
if (/^https?:\/\//i.test(url)) return url;
|
|
139
|
+
return `${server}${url.startsWith("/") ? url : `/${url}`}`;
|
|
140
|
+
}
|
|
141
|
+
/** The body and headers to send for a {@link TraceRequestOptions.body}. */
|
|
142
|
+
function encodeBody(body, headers) {
|
|
143
|
+
if (body === void 0) return {
|
|
144
|
+
payload: void 0,
|
|
145
|
+
headers
|
|
146
|
+
};
|
|
147
|
+
if (typeof body === "string") return {
|
|
148
|
+
payload: body,
|
|
149
|
+
headers
|
|
150
|
+
};
|
|
151
|
+
const hasContentType = Object.keys(headers).some((key) => key.toLowerCase() === "content-type");
|
|
152
|
+
return {
|
|
153
|
+
payload: JSON.stringify(body),
|
|
154
|
+
headers: hasContentType ? headers : {
|
|
155
|
+
...headers,
|
|
156
|
+
"content-type": "application/json"
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
function headerValue(headers, name) {
|
|
161
|
+
const key = Object.keys(headers).find((candidate) => candidate.toLowerCase() === name);
|
|
162
|
+
return key === void 0 ? void 0 : headers[key];
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Send one request to the running dev server and return its devtools
|
|
166
|
+
* timeline: middleware, validation result, handler, queries (with N+1 flags),
|
|
167
|
+
* logs, cache operations, captured mails, the response and the timings.
|
|
168
|
+
*
|
|
169
|
+
* Devtools is reached first, so a missing dev server (`WL8008`) or devtools
|
|
170
|
+
* (`WL8009`) fails before anything is sent. The request carries an
|
|
171
|
+
* `x-request-id` (unless the caller set one), which core adopts as
|
|
172
|
+
* `request.id` and echoes back; that id is how the devtools record is found.
|
|
173
|
+
* Throws `WL5004` when devtools never recorded the request.
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* const report = await traceRequest({ method: "POST", url: "/posts", body: { title: "Hi" } });
|
|
177
|
+
* report.timeline.validation.passed; // false when the body was refused
|
|
178
|
+
*/
|
|
179
|
+
async function traceRequest(options) {
|
|
180
|
+
const fetcher = options.fetch ?? ((input, init) => fetch(input, init));
|
|
181
|
+
const devtools = await connectDevtools({
|
|
182
|
+
cwd: options.cwd,
|
|
183
|
+
url: options.serverUrl,
|
|
184
|
+
devtoolsPath: options.devtoolsPath,
|
|
185
|
+
fetch: fetcher
|
|
186
|
+
});
|
|
187
|
+
const method = options.method.toUpperCase();
|
|
188
|
+
const url = resolveTraceUrl(devtools.url, options.url);
|
|
189
|
+
const idHeader = (options.requestIdHeader ?? "x-request-id").toLowerCase();
|
|
190
|
+
const ownId = headerValue(options.headers ?? {}, idHeader);
|
|
191
|
+
const sentId = ownId ?? randomUUID();
|
|
192
|
+
const base = ownId === void 0 ? {
|
|
193
|
+
...options.headers,
|
|
194
|
+
[idHeader]: sentId
|
|
195
|
+
} : { ...options.headers };
|
|
196
|
+
const { payload, headers } = encodeBody(options.body, base);
|
|
197
|
+
const startedAt = performance.now();
|
|
198
|
+
let response;
|
|
199
|
+
try {
|
|
200
|
+
response = await fetcher(url, {
|
|
201
|
+
method,
|
|
202
|
+
headers,
|
|
203
|
+
body: payload
|
|
204
|
+
});
|
|
205
|
+
} catch (error) {
|
|
206
|
+
throw new WarlockError("WL8008", `The dev server at ${devtools.url} did not answer ${method} ${url}: ${error instanceof Error ? error.message : String(error)}.`, { cause: error });
|
|
207
|
+
}
|
|
208
|
+
const text = await response.text();
|
|
209
|
+
const clientMs = performance.now() - startedAt;
|
|
210
|
+
const responseHeaders = {};
|
|
211
|
+
response.headers.forEach((value, key) => {
|
|
212
|
+
responseHeaders[key] = value;
|
|
213
|
+
});
|
|
214
|
+
const requestId = responseHeaders[idHeader] ?? sentId;
|
|
215
|
+
const record = await devtools.waitForRequest(requestId, {
|
|
216
|
+
timeoutMs: options.timeoutMs,
|
|
217
|
+
intervalMs: options.intervalMs
|
|
218
|
+
});
|
|
219
|
+
if (!record) throw new WarlockError("WL5004", `Devtools holds no record of request ${requestId} (${method} ${url} answered ${response.status}). Keep http.requestId enabled so the id is echoed; paths under ${devtools.devtoolsPath} are never recorded.`);
|
|
220
|
+
return buildTraceReport({
|
|
221
|
+
requestId,
|
|
222
|
+
server: devtools.url,
|
|
223
|
+
request: {
|
|
224
|
+
method,
|
|
225
|
+
url,
|
|
226
|
+
headers,
|
|
227
|
+
body: options.body ?? null
|
|
228
|
+
},
|
|
229
|
+
response: {
|
|
230
|
+
status: response.status,
|
|
231
|
+
headers: responseHeaders,
|
|
232
|
+
text
|
|
233
|
+
},
|
|
234
|
+
record,
|
|
235
|
+
clientMs
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
//#endregion
|
|
240
|
+
export { TRACE_BODY_LIMIT, TRACE_REQUEST_ID_HEADER, buildTraceReport, readResponseBody, redactHeaders, resolveTraceUrl, traceRequest };
|
|
241
|
+
//# sourceMappingURL=trace-request.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace-request.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/trace/trace-request.ts"],"sourcesContent":["import { randomUUID } from \"node:crypto\";\nimport { WarlockError } from \"../../errors/warlock-error\";\nimport {\n connectDevtools,\n type DevtoolsFetch,\n type DevtoolsRequestRecord,\n} from \"../devtools/devtools-client\";\nimport {\n TRACE_SCHEMA_VERSION,\n type TraceMiddleware,\n type TraceQuery,\n type TraceReport,\n type TraceValidation,\n} from \"./trace-report.types\";\n\n/** The correlation header core reads and echoes by default (`http.requestId.header`). */\nexport const TRACE_REQUEST_ID_HEADER = \"x-request-id\";\n\n/** Response bodies longer than this are cut in the report. */\nexport const TRACE_BODY_LIMIT = 64 * 1024;\n\n/** Header values never printed in a report. */\nconst REDACTED_HEADERS = new Set([\"authorization\", \"cookie\", \"proxy-authorization\"]);\n\n/** Inputs of {@link traceRequest}. */\nexport type TraceRequestOptions = {\n /** HTTP method, any case. */\n method: string;\n /** A path on the dev server (`/posts?page=2`) or an absolute URL. */\n url: string;\n /**\n * The request body. A string is sent as-is; anything else is sent as JSON\n * with `content-type: application/json` unless `headers` sets a content type.\n */\n body?: unknown;\n /** Extra request headers. */\n headers?: Record<string, string>;\n /** Project root, where `.warlock/dev-server.json` is read. Default: `process.cwd()`. */\n cwd?: string;\n /** The dev server origin; overrides the recorded one. */\n serverUrl?: string;\n /** The devtools mount; overrides the recorded one (default `/__warlock`). */\n devtoolsPath?: string;\n fetch?: DevtoolsFetch;\n /** How long to wait for devtools to settle the request record. Default 5000 ms. */\n timeoutMs?: number;\n /** Poll interval while waiting for the record. Default 50 ms. */\n intervalMs?: number;\n /**\n * The correlation header the app reads and echoes (`http.requestId.header`).\n * Default `x-request-id`.\n */\n requestIdHeader?: string;\n};\n\n/** The HTTP response as the report needs it. */\nexport type TracedResponse = {\n status: number;\n headers: Record<string, string>;\n /** The raw response text. */\n text: string;\n};\n\n/** Inputs of {@link buildTraceReport}. */\nexport type BuildTraceReportInput = {\n requestId: string;\n server: string;\n request: { method: string; url: string; headers: Record<string, string>; body: unknown };\n response: TracedResponse;\n record: DevtoolsRequestRecord;\n clientMs: number;\n};\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction lowerCaseKeys(headers: Record<string, string>): Record<string, string> {\n const result: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(headers)) {\n result[key.toLowerCase()] = value;\n }\n\n return result;\n}\n\n/** Headers with credential values replaced by `[redacted]`. */\nexport function redactHeaders(headers: Record<string, string>): Record<string, string> {\n const result: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(headers)) {\n result[key] = REDACTED_HEADERS.has(key.toLowerCase()) ? \"[redacted]\" : value;\n }\n\n return result;\n}\n\n/** The response body as the report prints it: parsed JSON, else text, cut at the limit. */\nexport function readResponseBody(\n text: string,\n contentType: string | undefined,\n): { body: unknown; truncated: boolean } {\n if (text.length === 0) return { body: null, truncated: false };\n\n const truncated = text.length > TRACE_BODY_LIMIT;\n\n if (!truncated && contentType !== undefined && /\\bjson\\b/i.test(contentType)) {\n try {\n return { body: JSON.parse(text), truncated: false };\n } catch {\n // Fall through to text: a body that claims JSON and is not is worth seeing as-is.\n }\n }\n\n return { body: truncated ? text.slice(0, TRACE_BODY_LIMIT) : text, truncated };\n}\n\nfunction attrNumber(attrs: Record<string, unknown> | undefined, key: string): number | null {\n const value = attrs?.[key];\n\n return typeof value === \"number\" ? value : null;\n}\n\nfunction attrString(attrs: Record<string, unknown> | undefined, key: string): string | null {\n const value = attrs?.[key];\n\n return typeof value === \"string\" ? value : null;\n}\n\nfunction validationOf(\n record: DevtoolsRequestRecord,\n status: number,\n body: unknown,\n): TraceValidation {\n const phases = record.phases.filter((phase) => phase.name === \"validation\");\n\n if (phases.length === 0) {\n return { ran: false, durationMs: null, passed: null, errors: null };\n }\n\n const durationMs = phases.reduce((total, phase) => total + phase.durationMs, 0);\n const handlerRan = record.phases.some((phase) => phase.name === \"handler\");\n // A validation failure answers before the handler runs, with the configured\n // failure status (422 by default, `validation.response.status`).\n const passed = handlerRan || status < 400;\n const errors = passed ? null : isRecord(body) && \"errors\" in body ? body.errors : body;\n\n return { ran: true, durationMs, passed, errors };\n}\n\nfunction sumPhase(record: DevtoolsRequestRecord, name: string): { durationMs: number } | null {\n const phases = record.phases.filter((phase) => phase.name === name);\n\n if (phases.length === 0) return null;\n\n return { durationMs: phases.reduce((total, phase) => total + phase.durationMs, 0) };\n}\n\n/**\n * Assemble a {@link TraceReport} from the HTTP response and the devtools\n * record of the same request. Pure: no I/O, so it is testable on its own.\n */\nexport function buildTraceReport(input: BuildTraceReportInput): TraceReport {\n const { record, response } = input;\n const responseHeaders = lowerCaseKeys(response.headers);\n const { body, truncated } = readResponseBody(response.text, responseHeaders[\"content-type\"]);\n\n const middleware: TraceMiddleware[] = record.phases\n .filter((phase) => phase.name === \"middleware\")\n .map((phase) => ({\n name: attrString(phase.attrs, \"name\"),\n index: attrNumber(phase.attrs, \"index\"),\n durationMs: phase.durationMs,\n }));\n\n const nPlusOneShapes = new Set(\n record.warnings.flatMap((warning) =>\n warning.type === \"n+1\" && typeof warning.shape === \"string\" ? [warning.shape] : [],\n ),\n );\n const queries: TraceQuery[] = record.queries.map((query) => ({\n ...query,\n nPlusOne: typeof query.shape === \"string\" && nPlusOneShapes.has(query.shape),\n }));\n\n const phasesMs: Record<string, number> = {};\n\n for (const phase of record.phases) {\n phasesMs[phase.name] = (phasesMs[phase.name] ?? 0) + phase.durationMs;\n }\n\n return {\n schemaVersion: TRACE_SCHEMA_VERSION,\n requestId: input.requestId,\n server: input.server,\n request: {\n method: input.request.method,\n url: input.request.url,\n headers: redactHeaders(input.request.headers),\n body: input.request.body,\n },\n response: {\n status: response.status,\n headers: redactHeaders(responseHeaders),\n body,\n truncated,\n },\n route: record.route ?? null,\n error: record.error ?? null,\n timeline: {\n phases: record.phases,\n routeMatch: sumPhase(record, \"route.match\"),\n middleware,\n validation: validationOf(record, response.status, body),\n handler: sumPhase(record, \"handler\"),\n },\n queries,\n warnings: record.warnings,\n logs: record.logs,\n cache: record.cache,\n mails: record.mails,\n timings: {\n totalMs: record.durationMs ?? null,\n clientMs: input.clientMs,\n phasesMs,\n },\n };\n}\n\n/** The absolute URL a trace sends to: `url` as-is when absolute, else joined to the server origin. */\nexport function resolveTraceUrl(server: string, url: string): string {\n if (/^https?:\\/\\//i.test(url)) return url;\n\n return `${server}${url.startsWith(\"/\") ? url : `/${url}`}`;\n}\n\n/** The body and headers to send for a {@link TraceRequestOptions.body}. */\nfunction encodeBody(\n body: unknown,\n headers: Record<string, string>,\n): { payload: string | undefined; headers: Record<string, string> } {\n if (body === undefined) return { payload: undefined, headers };\n if (typeof body === \"string\") return { payload: body, headers };\n\n const hasContentType = Object.keys(headers).some((key) => key.toLowerCase() === \"content-type\");\n\n return {\n payload: JSON.stringify(body),\n headers: hasContentType ? headers : { ...headers, \"content-type\": \"application/json\" },\n };\n}\n\nfunction headerValue(headers: Record<string, string>, name: string): string | undefined {\n const key = Object.keys(headers).find((candidate) => candidate.toLowerCase() === name);\n\n return key === undefined ? undefined : headers[key];\n}\n\n/**\n * Send one request to the running dev server and return its devtools\n * timeline: middleware, validation result, handler, queries (with N+1 flags),\n * logs, cache operations, captured mails, the response and the timings.\n *\n * Devtools is reached first, so a missing dev server (`WL8008`) or devtools\n * (`WL8009`) fails before anything is sent. The request carries an\n * `x-request-id` (unless the caller set one), which core adopts as\n * `request.id` and echoes back; that id is how the devtools record is found.\n * Throws `WL5004` when devtools never recorded the request.\n *\n * @example\n * const report = await traceRequest({ method: \"POST\", url: \"/posts\", body: { title: \"Hi\" } });\n * report.timeline.validation.passed; // false when the body was refused\n */\nexport async function traceRequest(options: TraceRequestOptions): Promise<TraceReport> {\n const fetcher: DevtoolsFetch = options.fetch ?? ((input, init) => fetch(input, init));\n const devtools = await connectDevtools({\n cwd: options.cwd,\n url: options.serverUrl,\n devtoolsPath: options.devtoolsPath,\n fetch: fetcher,\n });\n\n const method = options.method.toUpperCase();\n const url = resolveTraceUrl(devtools.url, options.url);\n const idHeader = (options.requestIdHeader ?? TRACE_REQUEST_ID_HEADER).toLowerCase();\n const ownId = headerValue(options.headers ?? {}, idHeader);\n const sentId = ownId ?? randomUUID();\n const base =\n ownId === undefined ? { ...options.headers, [idHeader]: sentId } : { ...options.headers };\n const { payload, headers } = encodeBody(options.body, base);\n\n const startedAt = performance.now();\n let response: Response;\n\n try {\n response = await fetcher(url, { method, headers, body: payload });\n } catch (error) {\n throw new WarlockError(\n \"WL8008\",\n `The dev server at ${devtools.url} did not answer ${method} ${url}: ${error instanceof Error ? error.message : String(error)}.`,\n { cause: error },\n );\n }\n\n const text = await response.text();\n const clientMs = performance.now() - startedAt;\n const responseHeaders: Record<string, string> = {};\n\n response.headers.forEach((value, key) => {\n responseHeaders[key] = value;\n });\n\n const requestId = responseHeaders[idHeader] ?? sentId;\n const record = await devtools.waitForRequest(requestId, {\n timeoutMs: options.timeoutMs,\n intervalMs: options.intervalMs,\n });\n\n if (!record) {\n throw new WarlockError(\n \"WL5004\",\n `Devtools holds no record of request ${requestId} (${method} ${url} answered ${response.status}). Keep http.requestId enabled so the id is echoed; paths under ${devtools.devtoolsPath} are never recorded.`,\n );\n }\n\n return buildTraceReport({\n requestId,\n server: devtools.url,\n request: { method, url, headers, body: options.body ?? null },\n response: { status: response.status, headers: responseHeaders, text },\n record,\n clientMs,\n });\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ToolingProblem } from "../problem.mjs";
|
|
2
|
+
import { CompilerDiagnostic, CompilerSession } from "../typescript/compiler.mjs";
|
|
3
|
+
//#region ../../packages/core/src/tooling/typecheck/run-typecheck.d.ts
|
|
4
|
+
export type TypecheckOptions = {
|
|
5
|
+
cwd?: string;
|
|
6
|
+
project?: string;
|
|
7
|
+
files?: readonly string[];
|
|
8
|
+
buildInfoFile?: string;
|
|
9
|
+
};
|
|
10
|
+
export type TypecheckResult = {
|
|
11
|
+
ok: boolean;
|
|
12
|
+
mode: "program" | "files";
|
|
13
|
+
files: string[] | null;
|
|
14
|
+
checkedFiles: number;
|
|
15
|
+
problems: ToolingProblem[];
|
|
16
|
+
durationMs: number;
|
|
17
|
+
buildInfoFile: string | null;
|
|
18
|
+
};
|
|
19
|
+
export declare const DEFAULT_TYPECHECK_BUILD_INFO: string;
|
|
20
|
+
export declare function diagnosticToProblem(diagnostic: CompilerDiagnostic, cwd: string, code?: "WL7101" | "WL7102"): ToolingProblem;
|
|
21
|
+
/** Resolve direct importers with the native checker, including package exports and aliases. */
|
|
22
|
+
export declare function directImporters(session: CompilerSession, targets: ReadonlySet<string>, root: string): Set<string>;
|
|
23
|
+
/** TypeScript 7's native incremental compiler owns build state; changed mode filters its diagnostics. */
|
|
24
|
+
export declare function runTypecheck(options?: TypecheckOptions): TypecheckResult;
|
|
25
|
+
//#endregion
|
|
26
|
+
//# sourceMappingURL=run-typecheck.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-typecheck.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/typecheck/run-typecheck.ts"],"mappings":";;;YAKY;EACV;EACA;EACA;EACA;;YAEU;EACV;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;;qBAEW;wBASG,oBACd,YAAY,oBACZ,aACA,6BACC;;wBAca,gBACd,SAAS,iBACT,SAAS,qBACT,eACC;;wBAWa,aAAa,UAAS,mBAAwB"}
|