@warlock.js/core 5.30.0 → 5.31.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 +142 -36
- package/README.md +28 -23
- package/bin/source-load-hook.mjs +63 -0
- package/bin/warlock.js +102 -42
- 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 +69 -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 +9 -1
- 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 +76 -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 +1 -0
- 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 +14 -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/endpoint.generator.mjs +311 -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 +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 +137 -0
- package/esm/cli/commands/generate/utils/endpoint-schema.mjs.map +1 -0
- package/esm/cli/commands/generate/utils/name-parser.mjs +1 -1
- package/esm/cli/commands/generate/utils/name-parser.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/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 +72 -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/mcp/mcp-command.action.mjs +103 -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.map +1 -1
- package/esm/cli/commands/openapi-generator.command.mjs.map +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/routes-diff.action.mjs +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/flush-and-exit.mjs +34 -0
- package/esm/cli/flush-and-exit.mjs.map +1 -0
- package/esm/cli/framework-cli-commands.mjs +23 -1
- package/esm/cli/framework-cli-commands.mjs.map +1 -1
- package/esm/cli/parse-cli-args.mjs +1 -0
- package/esm/cli/parse-cli-args.mjs.map +1 -1
- package/esm/config/config-loader.d.mts.map +1 -1
- package/esm/config/config-loader.mjs +34 -13
- package/esm/config/config-loader.mjs.map +1 -1
- package/esm/config/config-schema.d.mts +67 -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/index.d.mts +6 -0
- package/esm/config/index.mjs +1 -0
- 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.map +1 -1
- package/esm/connectors/assert-unique-connector-names.mjs +26 -2
- package/esm/connectors/assert-unique-connector-names.mjs.map +1 -1
- package/esm/connectors/http-connector.d.mts.map +1 -1
- package/esm/connectors/http-connector.mjs +3 -2
- package/esm/connectors/http-connector.mjs.map +1 -1
- package/esm/connectors/single-server-warnings.mjs.map +1 -1
- package/esm/connectors/socket-connector.d.mts.map +1 -1
- package/esm/connectors/socket-connector.mjs.map +1 -1
- package/esm/container/index.d.mts.map +1 -1
- package/esm/container/index.mjs.map +1 -1
- package/esm/database/migrate-action.mjs.map +1 -1
- package/esm/database/models/database-log/database-log.d.mts +0 -28
- package/esm/database/models/database-log/database-log.d.mts.map +1 -1
- package/esm/database/seeds/seeder.errors.d.mts +4 -0
- 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/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 +15 -9
- package/esm/dev-server/create-worker.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/files-orchestrator.mjs +4 -5
- package/esm/dev-server/files-orchestrator.mjs.map +1 -1
- package/esm/dev-server/files-watcher.mjs +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/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 +9 -3
- package/esm/dev-server/health-checker/file-health-checker.contract.d.mts.map +1 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs +15 -4
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs.map +1 -1
- package/esm/dev-server/health-checker/oxlint-runner.mjs +302 -0
- package/esm/dev-server/health-checker/oxlint-runner.mjs.map +1 -0
- 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/loader/loader-port-acks.mjs +1 -1
- package/esm/dev-server/loader/loader-port-acks.mjs.map +1 -1
- package/esm/dev-server/loader/register-loader.mjs +1 -1
- package/esm/dev-server/loader/register-loader.mjs.map +1 -1
- package/esm/dev-server/loader/resolve-hook.mjs +1 -1
- package/esm/dev-server/loader/transpile-cache.mjs +1 -1
- package/esm/dev-server/model-resource-typings.mjs.map +1 -1
- package/esm/dev-server/module-loader.mjs +1 -0
- package/esm/dev-server/module-loader.mjs.map +1 -1
- package/esm/dev-server/parse-imports.mjs +1 -1
- package/esm/dev-server/parse-imports.mjs.map +1 -1
- package/esm/dev-server/route-types-publisher.mjs +1 -1
- package/esm/dev-server/start-development-server.mjs.map +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.map +1 -1
- package/esm/dev-server/type-generator.mjs +3 -3
- package/esm/dev-server/type-generator.mjs.map +1 -1
- package/esm/dev-server/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 +653 -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 +23 -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 +19 -3
- 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 +1 -1
- 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 +5 -2
- 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.map +1 -1
- package/esm/generations/features/shared/patch-tsconfig-include.mjs +1 -1
- package/esm/generations/features/shared/patch-tsconfig-include.mjs.map +1 -1
- package/esm/generations/features/shared/relocate-conflicting-home-route.mjs +1 -1
- package/esm/generations/features/shared/relocate-conflicting-home-route.mjs.map +1 -1
- package/esm/generations/features/sitemap.feature.mjs +1 -1
- 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 +155 -13
- package/esm/generations/stubs.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-rate-limit-options.d.mts +13 -0
- package/esm/http/build-rate-limit-options.d.mts.map +1 -1
- package/esm/http/build-rate-limit-options.mjs.map +1 -1
- package/esm/http/conditional-request.d.mts +86 -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/csp.d.mts +2 -0
- package/esm/http/csp.d.mts.map +1 -1
- package/esm/http/csp.mjs +1 -0
- package/esm/http/csp.mjs.map +1 -1
- package/esm/http/csrf-origin-policy.mjs.map +1 -1
- package/esm/http/database/RequestLog.d.mts +24 -84
- package/esm/http/database/RequestLog.d.mts.map +1 -1
- package/esm/http/errors/errors.d.mts +2 -0
- 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 +18 -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/flush-pending-cookies.mjs.map +1 -1
- package/esm/http/index.d.mts +5 -2
- package/esm/http/index.mjs +4 -1
- package/esm/http/lazy-static.mjs +194 -0
- package/esm/http/lazy-static.mjs.map +1 -0
- package/esm/http/middleware/idempotency.middleware.mjs.map +1 -1
- package/esm/http/plugins.d.mts.map +1 -1
- package/esm/http/plugins.mjs +7 -4
- package/esm/http/plugins.mjs.map +1 -1
- package/esm/http/rate-limit-cache-store.mjs +2 -1
- package/esm/http/rate-limit-cache-store.mjs.map +1 -1
- package/esm/http/request-log-snapshot.d.mts +12 -5
- package/esm/http/request-log-snapshot.d.mts.map +1 -1
- package/esm/http/request-log-snapshot.mjs +83 -4
- package/esm/http/request-log-snapshot.mjs.map +1 -1
- package/esm/http/request.d.mts +2 -2
- package/esm/http/request.d.mts.map +1 -1
- package/esm/http/request.mjs +5 -4
- package/esm/http/request.mjs.map +1 -1
- package/esm/http/response.d.mts +11 -1
- package/esm/http/response.d.mts.map +1 -1
- package/esm/http/response.mjs +164 -76
- package/esm/http/response.mjs.map +1 -1
- package/esm/http/safe-redirect.d.mts +51 -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.map +1 -1
- package/esm/http/server.d.mts +3 -1
- package/esm/http/server.d.mts.map +1 -1
- package/esm/http/server.mjs +14 -4
- package/esm/http/server.mjs.map +1 -1
- package/esm/http/stream-transport.mjs +4 -2
- package/esm/http/stream-transport.mjs.map +1 -1
- package/esm/http/types.d.mts +44 -11
- package/esm/http/types.d.mts.map +1 -1
- package/esm/http/uploads/generate-image-variant.mjs +1 -1
- package/esm/http/uploads/generate-image-variants.d.mts +10 -7
- package/esm/http/uploads/generate-image-variants.d.mts.map +1 -1
- package/esm/http/uploads/generate-image-variants.mjs +61 -24
- 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 +2 -0
- package/esm/http/uploads/image-variant-types.d.mts.map +1 -1
- package/esm/http/uploads/image-variants-config-error.d.mts +3 -1
- 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/load-variant-source.mjs +1 -1
- package/esm/http/uploads/load-variant-source.mjs.map +1 -1
- package/esm/http/uploads/purge-image-variants.d.mts +7 -2
- 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 +3 -4
- 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 +5 -3
- package/esm/http/uploads/resolve-image-variants-config.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 +5 -3
- package/esm/http/uploads/uploaded-file.controller.d.mts.map +1 -1
- package/esm/http/uploads/uploaded-file.controller.mjs +16 -8
- package/esm/http/uploads/uploaded-file.controller.mjs.map +1 -1
- package/esm/http/uploads/variant-cache-key.mjs +1 -1
- package/esm/http/uploads-types.d.mts +6 -2
- package/esm/http/uploads-types.d.mts.map +1 -1
- package/esm/index.d.mts +17 -6
- package/esm/index.mjs +14 -3
- package/esm/localization/parse-locale-dictionary.d.mts +2 -0
- package/esm/localization/parse-locale-dictionary.d.mts.map +1 -1
- package/esm/localization/parse-locale-dictionary.mjs +1 -0
- package/esm/localization/parse-locale-dictionary.mjs.map +1 -1
- package/esm/mail/config.d.mts +12 -1
- 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/index.d.mts +1 -1
- package/esm/mail/index.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.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/error-responses.mjs +28 -2
- package/esm/openapi/error-responses.mjs.map +1 -1
- package/esm/openapi/postman/build-request-body.mjs.map +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.map +1 -1
- package/esm/openapi/postman/example-from-schema.mjs.map +1 -1
- 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/schema-refs.mjs.map +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.map +1 -1
- package/esm/openapi/types.d.mts +3 -2
- package/esm/openapi/types.d.mts.map +1 -1
- package/esm/production/assert-generated-imports.mjs +1 -0
- package/esm/production/assert-generated-imports.mjs.map +1 -1
- package/esm/production/production-builder.mjs +12 -4
- package/esm/production/production-builder.mjs.map +1 -1
- package/esm/production/resolve-build-config.mjs +1 -0
- package/esm/production/resolve-build-config.mjs.map +1 -1
- package/esm/production/route-registration-child.mjs.map +1 -1
- package/esm/production/route-registration-snapshot.mjs.map +1 -1
- package/esm/repositories/contracts/query-builder.contract.d.mts.map +1 -1
- package/esm/repositories/contracts/types.d.mts.map +1 -1
- package/esm/repositories/repository.manager.mjs.map +1 -1
- package/esm/resource/resource.d.mts.map +1 -1
- package/esm/resource/resource.mjs.map +1 -1
- package/esm/resource/types.d.mts.map +1 -1
- package/esm/restful/restful.d.mts +5 -5
- 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 +4 -2
- package/esm/router/index.mjs +2 -0
- package/esm/router/log-request-lifecycle.mjs.map +1 -1
- 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-guard-names.mjs +30 -0
- package/esm/router/route-guard-names.mjs.map +1 -0
- package/esm/router/route-name-taken-error.d.mts +14 -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/router.d.mts +32 -13
- package/esm/router/router.d.mts.map +1 -1
- package/esm/router/router.mjs +71 -38
- package/esm/router/router.mjs.map +1 -1
- package/esm/router/types.d.mts +137 -17
- package/esm/router/types.d.mts.map +1 -1
- package/esm/router/unguarded-route-diagnostics.d.mts +40 -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/storage/drivers/cloud-driver.d.mts.map +1 -1
- package/esm/storage/drivers/cloud-driver.mjs.map +1 -1
- package/esm/storage/drivers/local-driver.d.mts.map +1 -1
- package/esm/storage/drivers/local-driver.mjs.map +1 -1
- package/esm/storage/local-disk-roots.mjs +24 -0
- package/esm/storage/local-disk-roots.mjs.map +1 -0
- package/esm/storage/storage.d.mts +14 -0
- 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.map +1 -1
- package/esm/storage/utils/storage-not-initialized-error.d.mts +2 -0
- 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 +32 -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 +59 -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 +29 -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 +32 -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 +13 -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 +22 -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 +8 -0
- package/esm/tests/fakes/index.mjs +10 -0
- package/esm/tests/fakes/mail-fake.d.mts +41 -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 +48 -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 +31 -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 +39 -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 +14 -2
- package/esm/tests/index.mjs +15 -2
- package/esm/tests/snapshot-response.d.mts +34 -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 +22 -0
- package/esm/tests/start-http-development-server.d.mts.map +1 -1
- package/esm/tests/start-http-development-server.mjs +36 -3
- package/esm/tests/start-http-development-server.mjs.map +1 -1
- package/esm/tests/test-helpers.d.mts +20 -1
- 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 +62 -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/vitest-setup.d.mts +11 -0
- 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 +27 -0
- package/esm/tooling/agents-md/agents-md-markers.d.mts.map +1 -0
- package/esm/tooling/agents-md/agents-md-markers.mjs +59 -0
- package/esm/tooling/agents-md/agents-md-markers.mjs.map +1 -0
- package/esm/tooling/agents-md/agents-md-refresher.d.mts +36 -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 +30 -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 +33 -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 +33 -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 +31 -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 +109 -0
- package/esm/tooling/board/board.d.mts.map +1 -0
- package/esm/tooling/board/board.mjs +406 -0
- package/esm/tooling/board/board.mjs.map +1 -0
- package/esm/tooling/board/board.types.d.mts +72 -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 +33 -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 +62 -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 +34 -0
- package/esm/tooling/check/conventions-step.d.mts.map +1 -0
- package/esm/tooling/check/conventions-step.mjs +184 -0
- package/esm/tooling/check/conventions-step.mjs.map +1 -0
- package/esm/tooling/check/environment-step.d.mts +18 -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.d.mts +8 -0
- package/esm/tooling/check/index.mjs +10 -0
- package/esm/tooling/check/lint-step.d.mts +19 -0
- package/esm/tooling/check/lint-step.d.mts.map +1 -0
- package/esm/tooling/check/lint-step.mjs +111 -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 +35 -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 +48 -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 +648 -0
- package/esm/tooling/check/security-conventions.mjs.map +1 -0
- package/esm/tooling/check/source-ast.mjs +195 -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 +34 -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 +39 -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 +91 -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 +78 -0
- package/esm/tooling/generate/generation.d.mts.map +1 -0
- package/esm/tooling/generate/generation.mjs +123 -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 +40 -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 +37 -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 +41 -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 +9 -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 +10 -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 +7 -0
- package/esm/tooling/inspect/index.mjs +7 -0
- package/esm/tooling/inspect/inspect-app.d.mts +53 -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 +15 -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 +196 -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 +26 -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 +49 -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 +72 -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 +62 -0
- package/esm/tooling/mcp/load-ai-tools.d.mts.map +1 -0
- package/esm/tooling/mcp/load-ai-tools.mjs +44 -0
- package/esm/tooling/mcp/load-ai-tools.mjs.map +1 -0
- package/esm/tooling/mcp/mcp-tools.d.mts +60 -0
- package/esm/tooling/mcp/mcp-tools.d.mts.map +1 -0
- package/esm/tooling/mcp/mcp-tools.mjs +513 -0
- package/esm/tooling/mcp/mcp-tools.mjs.map +1 -0
- package/esm/tooling/mcp/start-mcp-server.d.mts +56 -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 +45 -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/trace/trace-report.types.d.mts +71 -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 +83 -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.d.mts +1 -0
- package/esm/tooling/typecheck/index.mjs +3 -0
- package/esm/tooling/typecheck/run-typecheck.d.mts +59 -0
- package/esm/tooling/typecheck/run-typecheck.d.mts.map +1 -0
- package/esm/tooling/typecheck/run-typecheck.mjs +153 -0
- package/esm/tooling/typecheck/run-typecheck.mjs.map +1 -0
- 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 +48 -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/use-cases-registry.mjs.map +1 -1
- package/esm/utils/clock.d.mts +33 -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/framework-vesion.mjs +1 -1
- package/esm/utils/framework-vesion.mjs.map +1 -1
- package/esm/utils/ids.d.mts +32 -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 +3 -0
- package/esm/utils/index.mjs +3 -0
- package/esm/utils/runtime.d.mts +59 -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/validation/index.d.mts +1 -1
- package/esm/validation/types.d.mts +57 -2
- package/esm/validation/types.d.mts.map +1 -1
- package/esm/validation/validateAll.mjs +19 -2
- 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 +0 -16
- package/esm/validation/validators/file-validator.d.mts.map +1 -1
- package/esm/warlock-config/bundle-config.mjs +1 -1
- package/esm/warlock-config/types.d.mts +27 -3
- package/esm/warlock-config/types.d.mts.map +1 -1
- package/llms-full.txt +3166 -736
- package/llms.txt +16 -6
- package/package.json +43 -13
- 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 +3 -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 +9 -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/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 +106 -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 +413 -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 +132 -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
|
@@ -5,7 +5,7 @@ description: 'Author seal schemas, attach them to controllers via `controller.va
|
|
|
5
5
|
|
|
6
6
|
# Warlock — validate a request
|
|
7
7
|
|
|
8
|
-
Validation is a three-file pattern: a seal schema, a `Request<Schema>` type alias, and the controller that attaches the schema via a static property. If validation fails, the framework returns a
|
|
8
|
+
Validation is a three-file pattern: a seal schema, a `Request<Schema>` type alias, and the controller that attaches the schema via a static property. If validation fails, the framework returns a 422 with an `errors` payload — your handler never runs (see "Your own failure body" to change it).
|
|
9
9
|
|
|
10
10
|
## The shape
|
|
11
11
|
|
|
@@ -53,29 +53,29 @@ Scaffold with `npx warlock generate.controller <module>/<action> --with-validati
|
|
|
53
53
|
|
|
54
54
|
From `@warlock.js/seal` — **always import from seal directly**. `@warlock.js/core` does not re-export `v`/`Infer`.
|
|
55
55
|
|
|
56
|
-
| Factory | Output type
|
|
57
|
-
| ---------------------------------- |
|
|
58
|
-
| `v.string(msg?)` | `string`
|
|
59
|
-
| `v.email(msg?)` | `string`
|
|
60
|
-
| `v.number(msg?)` | `number`
|
|
61
|
-
| `v.numeric(msg?)` | `number` (accepts numeric strings) | same
|
|
62
|
-
| `v.int(msg?)` | `number` (integer)
|
|
63
|
-
| `v.float(msg?)` | `number`
|
|
64
|
-
| `v.boolean(msg?)` | `boolean`
|
|
65
|
-
| `v.date(msg?)` | `Date`
|
|
66
|
-
| `v.array(inner, msg?)` | `T[]`
|
|
67
|
-
| `v.object(shape, msg?)` | `{ ... }`
|
|
68
|
-
| `v.record(value, msg?)` | `Record<string, T>`
|
|
69
|
-
| `v.tuple([a, b, c], msg?)` | `[A, B, C]`
|
|
70
|
-
| `v.union([a, b], msg?)` | `A
|
|
71
|
-
| `v.discriminatedUnion(key, [...])` | `A
|
|
72
|
-
| `v.enum([...]
|
|
73
|
-
| `v.literal(...values)` | exact literals
|
|
74
|
-
| `v.instanceof(Ctor, msg?)` | `Ctor` instances
|
|
75
|
-
| `v.lazy(() => schema)` | recursive/forward refs
|
|
76
|
-
| `v.file(msg?)` | `UploadedFile`
|
|
77
|
-
| `v.computed(callback)` | derived value
|
|
78
|
-
| `v.managed(callback)` | framework-injected value
|
|
56
|
+
| Factory | Output type | Common chain |
|
|
57
|
+
| ---------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
58
|
+
| `v.string(msg?)` | `string` | `.min(n)`, `.max(n)`, `.length(n)`, `.pattern(re)`, `.email()`, `.url()`, `.oneOf([...])`, `.trim()`, `.lowercase()`, `.uppercase()` |
|
|
59
|
+
| `v.email(msg?)` | `string` | (alias of `v.string().email()`) |
|
|
60
|
+
| `v.number(msg?)` | `number` | `.min(n)`, `.max(n)`, `.positive()` |
|
|
61
|
+
| `v.numeric(msg?)` | `number` (accepts numeric strings) | same |
|
|
62
|
+
| `v.int(msg?)` | `number` (integer) | same |
|
|
63
|
+
| `v.float(msg?)` | `number` | same |
|
|
64
|
+
| `v.boolean(msg?)` | `boolean` | — |
|
|
65
|
+
| `v.date(msg?)` | `Date` | — |
|
|
66
|
+
| `v.array(inner, msg?)` | `T[]` | `.minLength(n)`, `.maxLength(n)` |
|
|
67
|
+
| `v.object(shape, msg?)` | `{ ... }` | — |
|
|
68
|
+
| `v.record(value, msg?)` | `Record<string, T>` | — |
|
|
69
|
+
| `v.tuple([a, b, c], msg?)` | `[A, B, C]` | — |
|
|
70
|
+
| `v.union([a, b], msg?)` | `A | B` | — |
|
|
71
|
+
| `v.discriminatedUnion(key, [...])` | `A | B` (tagged) | each branch must be `v.object({ key: v.literal(...) })` |
|
|
72
|
+
| `v.enum([...] | EnumObj, msg?)` | literal union | — |
|
|
73
|
+
| `v.literal(...values)` | exact literals | — |
|
|
74
|
+
| `v.instanceof(Ctor, msg?)` | `Ctor` instances | — |
|
|
75
|
+
| `v.lazy(() => schema)` | recursive/forward refs | — |
|
|
76
|
+
| `v.file(msg?)` | `UploadedFile` | `.image()`, `.accept(exts)`, `.mimeType(types)`, `.minSize(n)`, `.maxSize(n)`, `.minWidth(n)`, `.maxWidth(n)` — see the `upload-file` topic |
|
|
77
|
+
| `v.computed(callback)` | derived value | — |
|
|
78
|
+
| `v.managed(callback)` | framework-injected value | — |
|
|
79
79
|
|
|
80
80
|
Universal modifiers from `BaseValidator`: `.optional()`, `.nullable()`, `.default(value)`, `.catch(value)`. Note: **there is no `v.url(...)`** at factory level — use `v.string().url(...)`.
|
|
81
81
|
|
|
@@ -187,18 +187,59 @@ const updateAvatarSchema = v.object({
|
|
|
187
187
|
|
|
188
188
|
The framework calls `response.failedSchema(result)` which sends `422` by default (set `validation.response.status` to change it) with the shape configured under `validation.response` (defaults shown):
|
|
189
189
|
|
|
190
|
-
```
|
|
191
|
-
// 422 Unprocessable Entity
|
|
190
|
+
```json
|
|
192
191
|
{
|
|
193
192
|
"errors": [
|
|
194
193
|
{ "input": "email", "error": "The email must be a valid email" },
|
|
195
|
-
{ "input": "password", "error": "The password must be at least 6 characters" }
|
|
194
|
+
{ "input": "password", "error": "The password must be at least 6 characters" }
|
|
196
195
|
]
|
|
197
196
|
}
|
|
198
197
|
```
|
|
199
198
|
|
|
200
199
|
The key names (`errors`, `input`, `error`) come from `config.get("validation.response")` — change them globally if your wire format differs.
|
|
201
200
|
|
|
201
|
+
### Your own failure body
|
|
202
|
+
|
|
203
|
+
For a contract with stable error codes, set `onFailure` on the validation. It gets the seal result and `{ request, response, route }` and returns `{ status?, body }` (no `status` → `validation.response.status`, 422):
|
|
204
|
+
|
|
205
|
+
```ts title="src/app/imports/controllers/create-import.controller.ts"
|
|
206
|
+
import type { RequestHandler } from "@warlock.js/core";
|
|
207
|
+
import { v } from "@warlock.js/seal";
|
|
208
|
+
|
|
209
|
+
const importSchema = v.object({ name: v.string().required() });
|
|
210
|
+
|
|
211
|
+
export const createImportController: RequestHandler = async ({ response }) =>
|
|
212
|
+
response.successCreate({ id: "import-1" });
|
|
213
|
+
|
|
214
|
+
createImportController.validation = {
|
|
215
|
+
schema: importSchema,
|
|
216
|
+
onFailure: () => ({ status: 400, body: { error: "IMPORT_REQUEST_INVALID" } }),
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
// Declare the failure status so `warlock generate.openapi` documents the body.
|
|
220
|
+
createImportController.responseSchema = {
|
|
221
|
+
201: { body: { id: "string" } },
|
|
222
|
+
400: { body: { error: "string" } },
|
|
223
|
+
};
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
The same `validation` object is accepted as a route option, merged over the handler's (route keys win): `router.post("/imports", createImportController, { validation: { onFailure } })`.
|
|
227
|
+
|
|
228
|
+
For every route at once, configure a global hook; a route's `onFailure` still wins, and returning `undefined` from either falls through to the next:
|
|
229
|
+
|
|
230
|
+
```ts title="src/config/validation.ts"
|
|
231
|
+
import type { ValidationConfiguration } from "@warlock.js/core";
|
|
232
|
+
|
|
233
|
+
const validationConfig: ValidationConfiguration = {
|
|
234
|
+
response: {
|
|
235
|
+
status: 400,
|
|
236
|
+
body: (result, route) => ({ error: `${route.name}.invalid`, fields: result.errors.length }),
|
|
237
|
+
},
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
export default validationConfig;
|
|
241
|
+
```
|
|
242
|
+
|
|
202
243
|
## Scoping what's validated
|
|
203
244
|
|
|
204
245
|
By default the validator merges `request.body + request.query` (everything but route params) and validates the merged object. To narrow:
|
|
@@ -219,6 +260,9 @@ For background jobs, CLI commands, or anywhere outside the HTTP path, call `vali
|
|
|
219
260
|
```ts
|
|
220
261
|
import { v } from "@warlock.js/seal";
|
|
221
262
|
|
|
263
|
+
const createProductSchema = v.object({ name: v.string().required(), price: v.number().min(0) });
|
|
264
|
+
declare const untrustedInput: unknown; // a queue payload, a webhook body, a CSV row…
|
|
265
|
+
|
|
222
266
|
const result = await v.validate(createProductSchema, untrustedInput);
|
|
223
267
|
|
|
224
268
|
if (!result.isValid) {
|
|
@@ -296,7 +340,7 @@ updateProductController.validation = {
|
|
|
296
340
|
## Gotchas
|
|
297
341
|
|
|
298
342
|
- **`v.url(...)` does not exist on the factory.** Use `v.string().url(...)`. Same goes for any other rule that's not in the table above — check `BaseValidator` / `StringValidator` first.
|
|
299
|
-
- **`.optional()` and `.required()` are not symmetric.** `.optional()` brands the field as absent-allowed. `.required()` clears the optional flag
|
|
343
|
+
- **`.optional()` and `.required()` are not symmetric.** `.optional()` brands the field as absent-allowed. `.required()` clears the optional flag _and_ replaces any prior required rule — read seal's `BaseValidator` source if you need conditional required.
|
|
300
344
|
- **`uniqueExceptCurrentId` reads `request.input("id")`.** It only works inside an HTTP context — useless in CLI/job code.
|
|
301
345
|
- **`request.validated()` is empty until the framework runs validation.** If you forgot the `controller.validation = { schema }` line, `validated()` returns `{}` (or the input from `setValidatedData` if you set it manually). Always pair the schema with the assignment.
|
|
302
346
|
- **Import `v`/`Infer` from `@warlock.js/seal`.** Core does not re-export them — `@warlock.js/seal` is the canonical and only home.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: warlock-agents-md
|
|
3
|
+
description: 'Generate the app-specific section of AGENTS.md from the booted app with `warlock agents-md [--write] [--json]` — modules, a routes summary with unguarded writes flagged, models, the conventions `warlock check` enforces, the installed skills and the verify commands — between `<!-- warlock:generated:start -->` / `<!-- warlock:generated:end -->` markers so hand-written content is never touched; `warlock dev` refreshes it (opt out with `devServer.agentsMd: false`). Triggers: `warlock agents-md`, `AGENTS.md`, `warlock:generated:start`, `renderAgentsMdSection`, `writeAgentsMd`, `upsertGeneratedSection`, `listInstalledSkills`, `createAgentsMdRefresher`, `devServer.agentsMd`, `WL7501`; "give agents the app facts", "keep AGENTS.md up to date", "which skills apply to this app". Skip: the full machine-readable report — the `warlock-inspect` topic; verifying a change — the `warlock-check` topic.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Warlock — `warlock agents-md`
|
|
7
|
+
|
|
8
|
+
Write the facts an agent needs about **this** app into `AGENTS.md`, from the booted registries, and keep them current.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx warlock agents-md # print the section
|
|
12
|
+
npx warlock agents-md --write # write it into AGENTS.md (created when missing)
|
|
13
|
+
npx warlock agents-md --json # { file, status, section }
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
It boots like `warlock inspect` (connectors booted, none started — no connection, no port).
|
|
17
|
+
|
|
18
|
+
## What it writes
|
|
19
|
+
|
|
20
|
+
Between two marker lines, appended at the end of an existing file without markers:
|
|
21
|
+
|
|
22
|
+
```md
|
|
23
|
+
# Notes written by hand — never touched
|
|
24
|
+
|
|
25
|
+
<!-- warlock:generated:start -->
|
|
26
|
+
|
|
27
|
+
## blog 1.2.0 — generated facts
|
|
28
|
+
|
|
29
|
+
### Modules
|
|
30
|
+
|
|
31
|
+
| Module | Routes | Models |
|
|
32
|
+
...
|
|
33
|
+
|
|
34
|
+
### Routes
|
|
35
|
+
|
|
36
|
+
4 route(s): 2 GET, 1 POST, 1 PATCH.
|
|
37
|
+
Mutating routes without an auth guard (confirm each is meant to be public): `POST /posts`.
|
|
38
|
+
...
|
|
39
|
+
<!-- warlock:generated:end -->
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Sections: app + `@warlock.js/*` versions, modules (`src/app/*`, routes/models per module), routes (counts, unguarded writes, a list capped at 60), models (table, module), conventions in force (`WL9001`–`WL9004` and the layout rules), installed skills (`node_modules/@warlock.js/*/skills/*/SKILL.md`, first sentence each), verify commands. No timestamps: an unchanged app regenerates the same bytes and nothing is written.
|
|
43
|
+
|
|
44
|
+
## Rules
|
|
45
|
+
|
|
46
|
+
- Only bytes between the markers change; a CRLF file stays CRLF.
|
|
47
|
+
- Malformed markers (one missing, duplicated, end before start) → `WL7501`, nothing written. Fix by hand.
|
|
48
|
+
- Put your own notes outside the markers; anything inside is replaced on the next refresh.
|
|
49
|
+
|
|
50
|
+
## `warlock dev` keeps it fresh
|
|
51
|
+
|
|
52
|
+
On boot and after reloads that change routes or modules (debounced). Opt out:
|
|
53
|
+
|
|
54
|
+
```ts title="warlock.config.ts"
|
|
55
|
+
import { defineConfig } from "@warlock.js/core";
|
|
56
|
+
|
|
57
|
+
export default defineConfig({
|
|
58
|
+
devServer: { agentsMd: false },
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## From code
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
import {
|
|
66
|
+
createAgentsMdRefresher,
|
|
67
|
+
inspectApp,
|
|
68
|
+
listInstalledSkills,
|
|
69
|
+
renderAgentsMdSection,
|
|
70
|
+
upsertGeneratedSection,
|
|
71
|
+
writeAgentsMd,
|
|
72
|
+
} from "@warlock.js/core/tooling";
|
|
73
|
+
|
|
74
|
+
const report = await inspectApp({ sections: ["routes", "models", "packages"] });
|
|
75
|
+
|
|
76
|
+
const section = renderAgentsMdSection(report, { skills: listInstalledSkills(process.cwd()) });
|
|
77
|
+
const next = upsertGeneratedSection("# Hand notes\n", section); // pure: returns the new file content
|
|
78
|
+
|
|
79
|
+
const { status } = writeAgentsMd({ report }); // "created" | "updated" | "unchanged"
|
|
80
|
+
|
|
81
|
+
const refresher = createAgentsMdRefresher({
|
|
82
|
+
collect: () => inspectApp({ sections: ["routes", "models", "packages"] }),
|
|
83
|
+
debounceMs: 1000,
|
|
84
|
+
onError: (error) => console.warn(error),
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
refresher.schedule(); // debounced
|
|
88
|
+
await refresher.flush(); // run now
|
|
89
|
+
refresher.dispose();
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## See also
|
|
93
|
+
|
|
94
|
+
- The `warlock-inspect` topic — the report the section is built from.
|
|
95
|
+
- The `warlock-check` topic — the verify command the section points at.
|
|
96
|
+
- The `warlock-conventions` topic — the conventions listed in the section.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: warlock-board
|
|
3
|
+
description: 'Coordinate two coding agents (an implementer and a reviewer) through `warlock board`: work items with a review state machine (todo, in-progress, ready-for-review, changes-requested, approved, blocked), append-only numbered messages per recipient in the git-ignored `.warlock/board/`, `VERDICT: APPROVED` / `VERDICT: CHANGES REQUESTED` lines that move the item, and a blocking `watch` with a timeout; `--json` on every action. Triggers: `warlock board`, `board init`, `board add`, `board status`, `board send`, `board watch`, `--verdict`, `WARLOCK_AGENT`, `.warlock/board`, `to-reviewer/`, `initBoard`, `addBoardItem`, `moveBoardItem`, `sendBoardMessage`, `watchBoard`, `readBoardStatus`, `WL7401`, `WL7402`, `WL7403`, `WL7404`; "hand this to the reviewer agent", "wait for the review", "two agents working together", "request changes", "approve the item". Skip: verifying the code itself — the `warlock-check` topic; app facts — the `warlock-inspect` topic.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Warlock — `warlock board`
|
|
7
|
+
|
|
8
|
+
A shared folder of plain files two agents use to hand work back and forth: **items** move through review states, **messages** are appended to the other agent's inbox, and `watch` blocks until something new arrives. Set `WARLOCK_AGENT` to your agent name so `--from` / `--by` default to it.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
export WARLOCK_AGENT=implementer
|
|
12
|
+
npx warlock board init
|
|
13
|
+
npx warlock board add "Add the orders module" --assignee implementer --reviewer reviewer --json
|
|
14
|
+
npx warlock board status --json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## The loop
|
|
18
|
+
|
|
19
|
+
Implementer:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx warlock board status 1 in-progress
|
|
23
|
+
# write the code; loop on `npx warlock check --changed --json` until it is clean
|
|
24
|
+
npx warlock board status 1 ready-for-review --note "check passes"
|
|
25
|
+
npx warlock board send reviewer "Orders module ready" --item 1 --body @handoff.md
|
|
26
|
+
npx warlock board watch implementer --timeout 1800 --json # blocks for the verdict
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Reviewer (`WARLOCK_AGENT=reviewer`):
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx warlock board watch reviewer --timeout 1800 --json
|
|
33
|
+
# review the diff, run `npx warlock check --changed --json`
|
|
34
|
+
npx warlock board send implementer "Review of orders" --item 1 --verdict changes-requested --body @review.md
|
|
35
|
+
# or, when it is right:
|
|
36
|
+
npx warlock board send implementer "Approved" --item 1 --verdict approved
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
On `changes-requested` the implementer moves the item back with `status 1 in-progress`, fixes, moves it to `ready-for-review` and sends a new message. The loop ends on `approved`.
|
|
40
|
+
|
|
41
|
+
## States
|
|
42
|
+
|
|
43
|
+
| From | Allowed next |
|
|
44
|
+
| ------------------- | ---------------------------------------------- |
|
|
45
|
+
| `todo` | `in-progress`, `blocked` |
|
|
46
|
+
| `in-progress` | `ready-for-review`, `blocked`, `todo` |
|
|
47
|
+
| `ready-for-review` | `approved`, `changes-requested`, `in-progress` |
|
|
48
|
+
| `changes-requested` | `in-progress`, `blocked` |
|
|
49
|
+
| `approved` | `in-progress` (reopen) |
|
|
50
|
+
| `blocked` | `todo`, `in-progress` |
|
|
51
|
+
|
|
52
|
+
Anything else fails with `WL7403`, and the message lists the allowed states. `npx warlock board status <id> --json` returns `{ item, next }`.
|
|
53
|
+
|
|
54
|
+
## Reading what `watch` returns
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"ok": true,
|
|
59
|
+
"timedOut": false,
|
|
60
|
+
"agent": "implementer",
|
|
61
|
+
"cursor": 3,
|
|
62
|
+
"messages": [
|
|
63
|
+
{
|
|
64
|
+
"number": 3,
|
|
65
|
+
"file": ".warlock/board/to-implementer/0003-review-of-orders.md",
|
|
66
|
+
"from": "reviewer",
|
|
67
|
+
"to": "implementer",
|
|
68
|
+
"item": 1,
|
|
69
|
+
"subject": "Review of orders",
|
|
70
|
+
"at": "2026-10-17T09:12:44.512Z",
|
|
71
|
+
"body": "Wrap the list response in OrderResource.",
|
|
72
|
+
"verdict": "changes-requested"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
- Every unread message comes back at once, oldest first, and the cursor moves past them. `--since 0` replays the inbox.
|
|
79
|
+
- Timeout: exit code **3** and `{ "ok": false, "code": "WL7404", "timedOut": true }`. Just run `watch` again.
|
|
80
|
+
- A message file ends with exactly `VERDICT: APPROVED` or `VERDICT: CHANGES REQUESTED` when it carries a verdict.
|
|
81
|
+
|
|
82
|
+
## From code
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
import {
|
|
86
|
+
initBoard,
|
|
87
|
+
addBoardItem,
|
|
88
|
+
moveBoardItem,
|
|
89
|
+
sendBoardMessage,
|
|
90
|
+
watchBoard,
|
|
91
|
+
} from "@warlock.js/core/tooling";
|
|
92
|
+
|
|
93
|
+
initBoard();
|
|
94
|
+
const item = addBoardItem({
|
|
95
|
+
title: "Add the orders module",
|
|
96
|
+
assignee: "implementer",
|
|
97
|
+
reviewer: "reviewer",
|
|
98
|
+
});
|
|
99
|
+
moveBoardItem(item.id, "in-progress", { by: "implementer" });
|
|
100
|
+
moveBoardItem(item.id, "ready-for-review", { by: "implementer" });
|
|
101
|
+
sendBoardMessage({
|
|
102
|
+
to: "reviewer",
|
|
103
|
+
from: "implementer",
|
|
104
|
+
subject: "Ready",
|
|
105
|
+
item: item.id,
|
|
106
|
+
body: "See the diff.",
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
const { messages } = await watchBoard({ agent: "implementer", timeoutMs: 30 * 60_000 });
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Gotchas
|
|
113
|
+
|
|
114
|
+
- Run `init` first; every other action fails with `WL7401` until the board exists. `init` git-ignores `.warlock/board/`.
|
|
115
|
+
- Messages are append-only and numbered per inbox; never edit or delete one by hand — send a new message.
|
|
116
|
+
- A verdict naming an item moves it; if the item is not in `ready-for-review`, the send fails with `WL7403` and no message is written.
|
|
117
|
+
- Agent names: lower-case letters, digits and dashes.
|
|
118
|
+
- `@mongez/agent-kit` lives outside this repository; it integrates by calling these commands.
|
|
119
|
+
|
|
120
|
+
## See also
|
|
121
|
+
|
|
122
|
+
- The `warlock-check` topic — the verify command both agents loop on.
|
|
123
|
+
- The `warlock-inspect` topic — the app's facts as JSON before you change it.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: warlock-check
|
|
3
|
+
description: 'Verify a change with one command: `warlock check [--changed] [--json]` runs an incremental typecheck, the app''s ESLint/oxlint, the tests affected by the change and framework convention checks, and reports one JSON object per problem `{ code, category, severity, source, file, line, column, message, hint, skill, docs, rule }` with exit 1 for problems in your code and 2 for problems with this machine (missing Redis/DB, busy port, Node version, missing tool). Also `warlock typecheck [--changed]`, `warlock explain <CODE>` and the stable `WL` error codes (`errorCodeOf`, `WarlockError`). Triggers: `warlock check`, `warlock typecheck`, `warlock explain`, `--changed`, `--base`, `runCheck`, `runTypecheck`, `CHECK_EXIT_CODES`, `ToolingProblem`, `WL7101`, `WL8003`, `errorCodeOf`, `explainErrorCode`, `WarlockError`, "verify my change", "run the checks", "is this failure my code or the machine", "what does WL3001 mean", "typecheck only changed files". Skip: app diagnostics at boot — the `warlock-doctor` topic; reading the app''s routes/models — the `warlock-inspect` topic; writing tests — the `test-http` / `test-service` topics.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Warlock — `warlock check`, `typecheck`, `explain`
|
|
7
|
+
|
|
8
|
+
Run `warlock check` after every change and loop on it until it exits 0.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx warlock check --changed --json # inner loop: only what changed vs HEAD (+ untracked)
|
|
12
|
+
npx warlock check --base main # what changed since the branch left main
|
|
13
|
+
npx warlock check # everything, before you finish
|
|
14
|
+
npx warlock check --skip tests # steps: environment, typecheck, lint, tests, conventions
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Exit codes
|
|
18
|
+
|
|
19
|
+
| Exit | Meaning | What to do |
|
|
20
|
+
| ---- | ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| `0` | no errors (warnings allowed) | done |
|
|
22
|
+
| `1` | problems **in your code** | fix each problem at `file:line:column` |
|
|
23
|
+
| `2` | a problem with **this machine** — the run is incomplete | fix the environment (start Redis/DB, free the port, switch Node, install the tool); do **not** edit code for it |
|
|
24
|
+
|
|
25
|
+
`2` wins when both kinds exist. Each problem's `category` (`code` / `environment`) says the same per problem.
|
|
26
|
+
|
|
27
|
+
## One problem
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"code": "WL8003",
|
|
32
|
+
"category": "environment",
|
|
33
|
+
"severity": "error",
|
|
34
|
+
"source": "environment",
|
|
35
|
+
"file": "src/app/posts/publish.spec.ts",
|
|
36
|
+
"line": null,
|
|
37
|
+
"column": null,
|
|
38
|
+
"message": "Error: connect ECONNREFUSED 127.0.0.1:6379",
|
|
39
|
+
"hint": "Start the service named in the message (database, Redis, ...) or point the config at a running one.",
|
|
40
|
+
"skill": "warlock-check",
|
|
41
|
+
"docs": "https://warlock.js.org/v/latest/core/cli/error-codes/#wl8003",
|
|
42
|
+
"rule": "publish caches the post"
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx warlock check --changed --json > check.json; code=$?
|
|
48
|
+
jq -r '.problems[] | "\(.file // "-"):\(.line // 0) \(.code) \(.message)\n → \(.hint)"' check.json
|
|
49
|
+
[ "$code" = 2 ] && echo "environment problem — fix the machine, not the code"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
| Code | Problem |
|
|
53
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
54
|
+
| `WL7101` | type error (`rule` = `TS2322`, …) |
|
|
55
|
+
| `WL7102` | tsconfig missing/invalid |
|
|
56
|
+
| `WL7201` / `WL7202` | lint error / warning (`rule` = the rule id) |
|
|
57
|
+
| `WL7301` / `WL7302` | a test failed / a test file failed to load |
|
|
58
|
+
| `WL9001` | imports an auto-loaded file (`routes.ts`, `main.ts`, `worker.ts`, `events/*`) |
|
|
59
|
+
| `WL9002` | relative import ends in `.js` |
|
|
60
|
+
| `WL9003` | relative import into another `src/app/<module>` — use `app/<module>/...` |
|
|
61
|
+
| `WL9004` | `experimentalDecorators: true` in tsconfig |
|
|
62
|
+
| `WL9005` | `request.all()` passed to a query, a service or `inApp()` — use `request.validated()` |
|
|
63
|
+
| `WL9006` | POST/PUT/PATCH/DELETE route with no auth middleware and no `public: true` |
|
|
64
|
+
| `WL9007` | redirect / `navigateTo()` / `<Link to>` target from request input without `safeRedirect()` |
|
|
65
|
+
| `WL9008` | raw email, credential or request body in a log call |
|
|
66
|
+
| `WL9009` | regex with `*` / `+` / `{n,}` run on request input |
|
|
67
|
+
| `WL9010`–`WL9012` | warnings: `await log.*()`, a second controller in a file, a `kind` discriminator |
|
|
68
|
+
| `WL8001`–`WL8007` | this machine: Node version, missing tool, unreachable service, busy port, esbuild binary, git, tool crash/OOM |
|
|
69
|
+
|
|
70
|
+
## `warlock typecheck`
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npx warlock typecheck # whole program, incremental (.warlock/cache/typecheck.tsbuildinfo)
|
|
74
|
+
npx warlock typecheck --changed # changed files + the files importing them
|
|
75
|
+
npx warlock typecheck --json --project tsconfig.app.json
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`--changed` checks the changed files and their direct importers only; a full run (cheap after the first, it is incremental) catches anything further away.
|
|
79
|
+
|
|
80
|
+
## `warlock explain`
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npx warlock explain WL3001 # title, fix, skill, docs link
|
|
84
|
+
npx warlock explain WL3001 --json # the registry entry
|
|
85
|
+
npx warlock explain # every code
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Error codes in code
|
|
89
|
+
|
|
90
|
+
Framework errors carry a stable `code`; read any thrown value with `errorCodeOf()` (it also maps `ECONNREFUSED` → `WL8003`, `EADDRINUSE` / `PortInUseError` → `WL8004`, and follows `cause`):
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
import { errorCodeOf, explainErrorCode, router, WarlockError } from "@warlock.js/core";
|
|
94
|
+
|
|
95
|
+
try {
|
|
96
|
+
router.getRoute("posts.show", {});
|
|
97
|
+
} catch (error) {
|
|
98
|
+
const code = errorCodeOf(error); // "WL3003" (unknown route name) or "WL3004" (missing param)
|
|
99
|
+
console.error(code, code && explainErrorCode(code)?.fix);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Throw a coded framework error from a connector or plugin:
|
|
103
|
+
throw new WarlockError("WL2003", "search connector failed to boot: SEARCH_URL is not set");
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## From code
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
import { CHECK_EXIT_CODES, runCheck, runTypecheck } from "@warlock.js/core/tooling";
|
|
110
|
+
|
|
111
|
+
const report = await runCheck({ changed: true });
|
|
112
|
+
|
|
113
|
+
if (report.exitCode === CHECK_EXIT_CODES.environment) {
|
|
114
|
+
// tell the user which service/tool is missing; don't touch the code
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const types = runTypecheck({ files: ["src/app/posts/services/publish.service.ts"] });
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Gotchas
|
|
121
|
+
|
|
122
|
+
- `check` boots nothing — no config, no connection, no port — so it runs the same with or without services; only tests that need them fail, and those report `WL8003`/`WL8004`.
|
|
123
|
+
- Lint runs only the linters the app configures (`eslint.config.*`; an oxlint config + the `oxlint` package). No config → the step is skipped, not failed.
|
|
124
|
+
- Tests use the app's own vitest (`vitest run`, or `vitest related <files> --run` with `--changed`). Test files without vitest installed → `WL8002`.
|
|
125
|
+
- The typecheck runs in a child `warlock typecheck` process; running out of memory is reported as `WL8007` instead of ending the run.
|
|
126
|
+
- The convention checks are the framework's own and run the same with ESLint, Oxlint or no linter. A deliberate exception gets `// warlock-check-ignore WL9006 -- why` on the problem's line or the line above (no code = every code on that line).
|
|
127
|
+
|
|
128
|
+
## See also
|
|
129
|
+
|
|
130
|
+
- The `warlock-doctor` topic — boot-time diagnostics; `doctor --json` uses the same codes and fields.
|
|
131
|
+
- The `warlock-inspect` topic — the app's routes, models and config as JSON.
|
|
132
|
+
- The `warlock-conventions` topic — the rules behind `WL9001`–`WL9012`, with the fix for each.
|
|
@@ -130,8 +130,123 @@ Within the same module, use relative paths (`./`, `../`).
|
|
|
130
130
|
|
|
131
131
|
Cascade uses `@RegisterModel()` for the model registry and `@BelongsTo` / `@HasMany` / `@MorphTo` for relations. The scaffolded `tsconfig.json` has `"experimentalDecorators": false` — these are native Stage-3 decorators, not legacy. Never set that flag to `true`; see the `lower-stage3-decorators` topic.
|
|
132
132
|
|
|
133
|
+
## What `warlock check` enforces
|
|
134
|
+
|
|
135
|
+
`npx warlock check` (the `warlock-check` topic) reports these with a stable code. They run the same whatever linter the app uses.
|
|
136
|
+
|
|
137
|
+
| Code | Rule |
|
|
138
|
+
| -------- | ------------------------------------------------------------------------------------------------- |
|
|
139
|
+
| `WL9001` | never import an auto-loaded file (fact 2) |
|
|
140
|
+
| `WL9002` | no `.js` extension on a relative import |
|
|
141
|
+
| `WL9003` | cross-module imports use `app/<module>/...` (see Path aliases) |
|
|
142
|
+
| `WL9004` | no `"experimentalDecorators": true` |
|
|
143
|
+
| `WL9005` | queries, services and `inApp()` get `request.validated()`, never `request.all()` |
|
|
144
|
+
| `WL9006` | every POST/PUT/PATCH/DELETE route is guarded or says `public: true` |
|
|
145
|
+
| `WL9007` | redirect and link targets from request input go through `safeRedirect()` / `safeRedirectTarget()` |
|
|
146
|
+
| `WL9008` | no raw email, credential or request body in a log call |
|
|
147
|
+
| `WL9009` | regexes run on request input have bounded quantifiers |
|
|
148
|
+
| `WL9010` | warning: no `await` on `log.info()` and its siblings |
|
|
149
|
+
| `WL9011` | warning: one controller per file |
|
|
150
|
+
| `WL9012` | warning: a tagged union's discriminator is `type`, not `kind` |
|
|
151
|
+
|
|
152
|
+
### `WL9005` — validated input only
|
|
153
|
+
|
|
154
|
+
`request.all()` hands every client-sent field to whatever receives it (mass assignment). Declare a schema and pass what it accepted:
|
|
155
|
+
|
|
156
|
+
```ts
|
|
157
|
+
import { type RequestHandler } from "@warlock.js/core";
|
|
158
|
+
import { v } from "@warlock.js/seal";
|
|
159
|
+
|
|
160
|
+
const createPostSchema = v.object({ title: v.string(), body: v.string() });
|
|
161
|
+
|
|
162
|
+
async function createPostService(input: { title: string; body: string }) {
|
|
163
|
+
return { id: 1, ...input };
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export const createPostController: RequestHandler = async ({ request, response }) => {
|
|
167
|
+
const post = await createPostService(request.validated());
|
|
168
|
+
return response.successCreate({ post });
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
createPostController.validation = { schema: createPostSchema };
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### `WL9006` — guarded or public
|
|
175
|
+
|
|
176
|
+
```ts
|
|
177
|
+
import { authMiddleware } from "@warlock.js/auth";
|
|
178
|
+
import { router, type RequestHandler } from "@warlock.js/core";
|
|
179
|
+
|
|
180
|
+
const createPostController: RequestHandler = async ({ response }) => response.successCreate({});
|
|
181
|
+
const contactController: RequestHandler = async ({ response }) => response.success({ sent: true });
|
|
182
|
+
|
|
183
|
+
router.post("/posts", createPostController, { middleware: [authMiddleware("user")] });
|
|
184
|
+
|
|
185
|
+
// Intentionally open: say so.
|
|
186
|
+
router.post("/contact", contactController, { public: true });
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
A route inside `guarded(() => …)` or `router.group({ middleware: [authMiddleware()] }, …)` is guarded. A middleware counts as a guard when its name contains `auth` or `guard`, or when it is a constant initialised with `markAuthGuard()` in the same file. `warlock dev` warns about the same routes at runtime.
|
|
190
|
+
|
|
191
|
+
### `WL9007` — safe redirects
|
|
192
|
+
|
|
193
|
+
```ts
|
|
194
|
+
import { safeRedirect, type RequestHandler } from "@warlock.js/core";
|
|
195
|
+
|
|
196
|
+
export const afterLoginController: RequestHandler = async ({ request, response }) => {
|
|
197
|
+
return response.redirect(
|
|
198
|
+
safeRedirect(request.input("next"), { allowedOrigins: ["https://app.example.com"] }),
|
|
199
|
+
);
|
|
200
|
+
};
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
In pages, `safeRedirectTarget(target) ?? "/"` from `@warlock.js/web` does the same for `navigateTo()` and `<Link to>`. A target checked by an enclosing `if (isSafeRedirect(target))` passes.
|
|
204
|
+
|
|
205
|
+
### `WL9008` — redacted logs
|
|
206
|
+
|
|
207
|
+
```ts
|
|
208
|
+
import type { Request } from "@warlock.js/core";
|
|
209
|
+
import { log, maskEmail } from "@warlock.js/logger";
|
|
210
|
+
|
|
211
|
+
export function logLogin(request: Request, user: { id: number; email: string }, token: string) {
|
|
212
|
+
log.info("auth", "login", `Signed in ${maskEmail(user.email)}`, {
|
|
213
|
+
userId: user.id,
|
|
214
|
+
token, // `token` is a key the logger censors by default
|
|
215
|
+
request: request.toLogSnapshot(),
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Keys the logger censors by default (`token`, `password`, `apiKey`, `authorization`, …) may carry secrets as structured data. Emails are not censored by default, so they always need `maskEmail()`. Free text from the client goes through `escapeLogValue()`.
|
|
221
|
+
|
|
222
|
+
### `WL9009` — bounded regexes on input
|
|
223
|
+
|
|
224
|
+
```ts
|
|
225
|
+
const SLUG = /^[a-z0-9-]{1,64}$/;
|
|
226
|
+
|
|
227
|
+
export function isSlug(value: string): boolean {
|
|
228
|
+
return SLUG.test(value);
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Bound each repetition (`{1,64}`, not `+`) or cap the input's length before matching.
|
|
233
|
+
|
|
234
|
+
### `WL9010`–`WL9012`
|
|
235
|
+
|
|
236
|
+
Drop the `await` from `log.info(…)` (`await log.flush()` waits for delivery); move each extra controller into its own `<name>.controller.ts`; rename a union's `kind` tag to `type` and update the `switch`.
|
|
237
|
+
|
|
238
|
+
### A deliberate exception
|
|
239
|
+
|
|
240
|
+
```ts
|
|
241
|
+
// warlock-check-ignore WL9006 -- authenticated by the provider's signature header
|
|
242
|
+
router.post("/webhooks/billing", billingWebhookController, { middleware: [verifySignature()] });
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
The comment covers the codes it names on its own line and the next; with no code it covers every code there.
|
|
246
|
+
|
|
133
247
|
## See also
|
|
134
248
|
|
|
249
|
+
- The `warlock-check` topic — running the checks and reading the report.
|
|
135
250
|
- The `register-route` topic — how to wire URLs to controllers.
|
|
136
251
|
- The `create-controller` topic — controller signature, validation, response shape.
|
|
137
252
|
- The `send-response` topic — the full Response helper surface.
|