@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
package/bin/warlock.js
CHANGED
|
@@ -4,6 +4,41 @@ import { existsSync } from "node:fs";
|
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
6
|
|
|
7
|
+
const [nodeMajor, nodeMinor] = process.versions.node.split(".").map(Number);
|
|
8
|
+
if (nodeMajor < 22 || (nodeMajor === 22 && nodeMinor < 15)) {
|
|
9
|
+
console.error(`[warlock] requires Node 22.15 or newer (running ${process.versions.node}).`);
|
|
10
|
+
process.exit(1);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Bun and Deno report the Node version they emulate in `process.versions.node`
|
|
14
|
+
// and add their own entry, so the check above passes on both. `warlock dev` is
|
|
15
|
+
// the one command that cannot run there (it is built on Node's module loader
|
|
16
|
+
// hooks), and it is refused here, before anything loads, so the refusal reads
|
|
17
|
+
// the same whether the CLI runs from published output or from source. The
|
|
18
|
+
// `dev` command repeats this check for callers that bypass this file.
|
|
19
|
+
const foreignRuntimeName = process.versions.bun
|
|
20
|
+
? "Bun"
|
|
21
|
+
: process.versions.deno
|
|
22
|
+
? "Deno"
|
|
23
|
+
: undefined;
|
|
24
|
+
|
|
25
|
+
if (foreignRuntimeName && process.argv[2] === "dev") {
|
|
26
|
+
const foreignRuntime = `${foreignRuntimeName} ${process.versions.bun ?? process.versions.deno}`;
|
|
27
|
+
const start = process.versions.bun ? "bun dist/app.js" : "deno run -A dist/app.js";
|
|
28
|
+
|
|
29
|
+
console.error(
|
|
30
|
+
[
|
|
31
|
+
`✖ warlock dev runs on Node.js only — this process is ${foreignRuntime}.`,
|
|
32
|
+
" The development server compiles TypeScript and hot-reloads modules through Node's module loader hooks.",
|
|
33
|
+
" Run it with Node.js 22.15 or newer: npx warlock dev",
|
|
34
|
+
` ${foreignRuntimeName} can run the production build: build it with Node (npx warlock build),`,
|
|
35
|
+
` then start it with ${start}.`,
|
|
36
|
+
" Supported runtimes: https://warlock.js.org/v/latest/core/digging-deeper/supported-runtimes/",
|
|
37
|
+
].join("\n"),
|
|
38
|
+
);
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
|
|
7
42
|
const binDir = path.dirname(fileURLToPath(import.meta.url));
|
|
8
43
|
|
|
9
44
|
/**
|
|
@@ -49,8 +84,19 @@ async function bootFromSource() {
|
|
|
49
84
|
}
|
|
50
85
|
|
|
51
86
|
const { registerHooks } = await import("node:module");
|
|
52
|
-
|
|
53
|
-
|
|
87
|
+
|
|
88
|
+
// Bun has no `module.registerHooks`. Only a source checkout reaches this
|
|
89
|
+
// path (published packages ship compiled output), so say what is missing
|
|
90
|
+
// instead of failing on "registerHooks is not a function".
|
|
91
|
+
if (typeof registerHooks !== "function") {
|
|
92
|
+
console.error(
|
|
93
|
+
"[warlock] Running @warlock.js/core from TypeScript source needs Node's module.registerHooks " +
|
|
94
|
+
"(Node 22.15 or newer); this runtime does not provide it. Use Node, or install the published package.",
|
|
95
|
+
);
|
|
96
|
+
process.exit(1);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const { register } = await import("node:module");
|
|
54
100
|
const { getTsconfig, resolvePathAlias } = await import("get-tsconfig");
|
|
55
101
|
|
|
56
102
|
// Same target the dev loader and the production builder pin, so a file
|
|
@@ -58,8 +104,6 @@ async function bootFromSource() {
|
|
|
58
104
|
// get anywhere else in the toolchain. Drifting from it would make the CLI a
|
|
59
105
|
// third, subtly different dialect.
|
|
60
106
|
const TRANSPILE_TARGET = "node22";
|
|
61
|
-
const TS_FILE = /\.(ts|tsx|mts|cts)$/;
|
|
62
|
-
const VERSION_QUERY = /\?v=\d+$/;
|
|
63
107
|
|
|
64
108
|
// Read from cwd, not from core: `jsx`, `experimentalDecorators` and friends
|
|
65
109
|
// are the *app's* call, and this is the same source of truth the dev
|
|
@@ -70,59 +114,44 @@ async function bootFromSource() {
|
|
|
70
114
|
});
|
|
71
115
|
|
|
72
116
|
/**
|
|
73
|
-
* Handover switch
|
|
74
|
-
* `register()` worker hooks and
|
|
75
|
-
*
|
|
76
|
-
* `.ts` first and short-circuit
|
|
77
|
-
*
|
|
117
|
+
* Handover switch for the in-thread `resolve` hook below. Verified
|
|
118
|
+
* behaviour: in-thread hooks run *before* `register()` worker hooks and
|
|
119
|
+
* delegate down the chain, so once the dev server registers its own loader
|
|
120
|
+
* this hook would still resolve every `.ts` first and short-circuit,
|
|
121
|
+
* bypassing the dev loader's `?v=N` HMR stamping.
|
|
78
122
|
*
|
|
79
|
-
* Setting `active = false` makes
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
123
|
+
* Setting `active = false` makes it a pure pass-through. `registerLoader()`
|
|
124
|
+
* should flip it just before it calls `register()`; until it does, this
|
|
125
|
+
* hook stays in charge, which is the correct default for every non-dev
|
|
126
|
+
* command. (The `load` hook needs no switch: it is a worker hook, and the
|
|
127
|
+
* dev loader's worker hooks, registered later, run before it.)
|
|
83
128
|
*/
|
|
84
129
|
const bootstrapLoader = { active: true };
|
|
85
130
|
globalThis.__warlockBootstrapLoader = bootstrapLoader;
|
|
86
131
|
|
|
87
132
|
/**
|
|
88
|
-
* `load` hook
|
|
89
|
-
* `register()
|
|
90
|
-
*
|
|
133
|
+
* `load` hook — transpiles TypeScript with esbuild. It runs on Node's
|
|
134
|
+
* loader worker thread (`register()`), NOT in this thread
|
|
135
|
+
* (`registerHooks()`): on Node 22.15 an in-thread `load` hook makes a
|
|
136
|
+
* CommonJS package that `require()`s a file which an ES module also imports
|
|
137
|
+
* receive that file's empty, not-yet-run `exports`, which crashed every
|
|
138
|
+
* booting command inside `dayjs.extend`. See `source-load-hook.mjs`.
|
|
91
139
|
*/
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
// Not TypeScript → not ours. npm `.js`, `node:`, JSON all fall through.
|
|
96
|
-
if (!bootstrapLoader.active || !TS_FILE.test(cleanUrl)) return nextLoad(url, context);
|
|
97
|
-
|
|
98
|
-
const absolutePath = fileURLToPath(cleanUrl);
|
|
99
|
-
const { code } = transformSync(readFileSync(absolutePath, "utf8"), {
|
|
100
|
-
loader: absolutePath.endsWith(".tsx") ? "tsx" : "ts",
|
|
101
|
-
format: "esm",
|
|
102
|
-
target: TRANSPILE_TARGET,
|
|
103
|
-
sourcefile: absolutePath,
|
|
104
|
-
sourcemap: "inline",
|
|
105
|
-
tsconfigRaw,
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
return { format: "module", source: code, shortCircuit: true };
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
registerHooks({ load });
|
|
140
|
+
register(pathToFileURL(path.join(binDir, "source-load-hook.mjs")).href, {
|
|
141
|
+
data: { target: TRANSPILE_TARGET, tsconfigRaw },
|
|
142
|
+
});
|
|
112
143
|
|
|
113
144
|
// Stage 2 — the reuse. With `load` live, core's own resolver can be pulled
|
|
114
145
|
// in as TypeScript. It is imported by exact absolute path on purpose: it is
|
|
115
146
|
// a leaf module whose only import is `node:url`, so it needs no extension
|
|
116
147
|
// probing to load, which is precisely the thing we don't have yet.
|
|
117
|
-
const { ownResolve } = await import(
|
|
118
|
-
pathToFileURL(
|
|
119
|
-
path.join(binDir, "..", "src", "dev-server", "loader", "own-resolver.ts"),
|
|
120
|
-
).href
|
|
148
|
+
const { ownResolve, probeFile } = await import(
|
|
149
|
+
pathToFileURL(path.join(binDir, "..", "src", "dev-server", "loader", "own-resolver.ts")).href
|
|
121
150
|
);
|
|
122
151
|
|
|
123
152
|
let pathsMatcher = null;
|
|
124
153
|
if (tsconfig) {
|
|
125
|
-
pathsMatcher = specifier => resolvePathAlias(tsconfig, specifier);
|
|
154
|
+
pathsMatcher = (specifier) => resolvePathAlias(tsconfig, specifier);
|
|
126
155
|
}
|
|
127
156
|
|
|
128
157
|
/**
|
|
@@ -131,6 +160,14 @@ async function bootFromSource() {
|
|
|
131
160
|
* `null` for (bare npm, `node:`, `file:`) falls through to Node's default,
|
|
132
161
|
* which keeps `exports`/`node_modules` semantics intact.
|
|
133
162
|
*
|
|
163
|
+
* One fallback on top: a bare subpath of a package consumed as source, such
|
|
164
|
+
* as `@warlock.js/core/net` (imported by `@warlock.js/ai`). Core declares no
|
|
165
|
+
* `exports` map in source form, so Node's default resolver lands on the
|
|
166
|
+
* `net/` directory and refuses it (`ERR_UNSUPPORTED_DIR_IMPORT`); the
|
|
167
|
+
* published package maps the subpath to its built entry instead. The
|
|
168
|
+
* directory's `index.ts` is what TypeScript and vitest resolve the same
|
|
169
|
+
* specifier to, so that is what this resolves it to as well.
|
|
170
|
+
*
|
|
134
171
|
* The dev loader's version of this also stamps `?v=N` for HMR. That is
|
|
135
172
|
* deliberately absent: the CLI process has no watcher, and the dev server
|
|
136
173
|
* registers its own full loader when it boots.
|
|
@@ -143,7 +180,30 @@ async function bootFromSource() {
|
|
|
143
180
|
// Producing the URL ourselves means `nextResolve` was never called, so the
|
|
144
181
|
// chain has to be short-circuited explicitly or Node raises
|
|
145
182
|
// ERR_LOADER_CHAIN_INCOMPLETE.
|
|
146
|
-
|
|
183
|
+
if (owned) return { url: owned, shortCircuit: true };
|
|
184
|
+
|
|
185
|
+
try {
|
|
186
|
+
return nextResolve(specifier, context);
|
|
187
|
+
} catch (error) {
|
|
188
|
+
const index = bootstrapLoader.active ? directoryIndexOf(error) : null;
|
|
189
|
+
|
|
190
|
+
if (index) return { url: index, shortCircuit: true };
|
|
191
|
+
|
|
192
|
+
throw error;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* The `index.ts` (or `.tsx`/`.js`/`.jsx`) inside the directory Node refused
|
|
198
|
+
* to import, as a `file:` URL, or `null` when the error is anything else.
|
|
199
|
+
*/
|
|
200
|
+
function directoryIndexOf(error) {
|
|
201
|
+
if (error?.code !== "ERR_UNSUPPORTED_DIR_IMPORT" || typeof error.url !== "string") return null;
|
|
202
|
+
|
|
203
|
+
const directory = fileURLToPath(error.url).replace(/\\/g, "/").replace(/\/$/, "");
|
|
204
|
+
const hit = probeFile(`${directory}/index`, existsSync);
|
|
205
|
+
|
|
206
|
+
return hit ? pathToFileURL(hit).href : null;
|
|
147
207
|
}
|
|
148
208
|
|
|
149
209
|
registerHooks({ resolve });
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { command } from "../../commands/cli-command.mjs";
|
|
2
|
+
import { generationOutputOptions, runGenerationCommand } from "../../generations/generation-run.mjs";
|
|
2
3
|
import { addCommandAction } from "../../generations/add-command.action.mjs";
|
|
3
4
|
|
|
4
5
|
//#region ../../packages/core/src/cli/commands/add.command.ts
|
|
5
6
|
const addCommand = command({
|
|
6
7
|
name: "add <features...>",
|
|
7
8
|
description: "Add new feature(s) to the project",
|
|
8
|
-
action: addCommandAction,
|
|
9
|
+
action: (data) => runGenerationCommand("add", data, addCommandAction),
|
|
9
10
|
options: [
|
|
10
11
|
{
|
|
11
12
|
text: "--package-manager, -pm",
|
|
@@ -20,7 +21,8 @@ const addCommand = command({
|
|
|
20
21
|
text: "--no-install",
|
|
21
22
|
description: "Record dependencies in package.json without installing them — still ejects configs, adds scripts, and runs setup hooks. Used by scaffolders that run a single install afterwards.",
|
|
22
23
|
type: "boolean"
|
|
23
|
-
}
|
|
24
|
+
},
|
|
25
|
+
...generationOutputOptions
|
|
24
26
|
]
|
|
25
27
|
});
|
|
26
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.command.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/cli/commands/add.command.ts"],"sourcesContent":["import { addCommandAction } from \"../../generations/add-command.action\";\nimport { command } from \"../../commands/cli-command\";\n\nexport const addCommand = command({\n name: \"add <features...>\",\n description: \"Add new feature(s) to the project\",\n action: addCommandAction,\n options: [\n {\n text: \"--package-manager, -pm\",\n description: \"Package manager to use, if not passed, it will be detected automatically\",\n },\n {\n text: \"--list, -l\",\n description: \"List available features\",\n type: \"boolean\",\n },\n {\n text: \"--no-install\",\n description:\n \"Record dependencies in package.json without installing them — still ejects configs, adds scripts, and runs setup hooks. Used by scaffolders that run a single install afterwards.\",\n type: \"boolean\",\n },\n ],\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"add.command.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/cli/commands/add.command.ts"],"sourcesContent":["import { addCommandAction } from \"../../generations/add-command.action\";\nimport { generationOutputOptions, runGenerationCommand } from \"../../generations/generation-run\";\nimport { command } from \"../../commands/cli-command\";\n\nexport const addCommand = command({\n name: \"add <features...>\",\n description: \"Add new feature(s) to the project\",\n action: (data) => runGenerationCommand(\"add\", data, addCommandAction),\n options: [\n {\n text: \"--package-manager, -pm\",\n description: \"Package manager to use, if not passed, it will be detected automatically\",\n },\n {\n text: \"--list, -l\",\n description: \"List available features\",\n type: \"boolean\",\n },\n {\n text: \"--no-install\",\n description:\n \"Record dependencies in package.json without installing them — still ejects configs, adds scripts, and runs setup hooks. Used by scaffolders that run a single install afterwards.\",\n type: \"boolean\",\n },\n ...generationOutputOptions,\n ],\n});\n"],"mappings":";;;;;AAIA,MAAa,aAAa,QAAQ;CAChC,MAAM;CACN,aAAa;CACb,SAAS,SAAS,qBAAqB,OAAO,MAAM,gBAAgB;CACpE,SAAS;EACP;GACE,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aACE;GACF,MAAM;EACR;EACA,GAAG;CACL;AACF,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { AGENTS_MD_FILE } from "../../../tooling/agents-md/agents-md-markers.mjs";
|
|
2
|
+
import { listInstalledSkills } from "../../../tooling/agents-md/installed-skills.mjs";
|
|
3
|
+
import { listAppModules, renderAgentsMdSection } from "../../../tooling/agents-md/render-agents-md.mjs";
|
|
4
|
+
import { writeAgentsMd } from "../../../tooling/agents-md/write-agents-md.mjs";
|
|
5
|
+
import { bootForInspect, inspectOptionsFromBoot } from "../../../tooling/inspect/boot-for-inspect.mjs";
|
|
6
|
+
import { inspectApp } from "../../../tooling/inspect/inspect-app.mjs";
|
|
7
|
+
import { withConsoleOnStderr } from "../routes/with-console-on-stderr.mjs";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
|
|
10
|
+
//#region ../../packages/core/src/cli/commands/agents-md/agents-md-command.action.ts
|
|
11
|
+
/** The inspect sections the generated section reads. */
|
|
12
|
+
const AGENTS_MD_SECTIONS = [
|
|
13
|
+
"routes",
|
|
14
|
+
"models",
|
|
15
|
+
"packages"
|
|
16
|
+
];
|
|
17
|
+
/** The one line `warlock agents-md --write` prints. */
|
|
18
|
+
function formatWriteStatus(result) {
|
|
19
|
+
const file = path.relative(process.cwd(), result.file) || "AGENTS.md";
|
|
20
|
+
switch (result.status) {
|
|
21
|
+
case "created": return `Created ${file} with the generated section.`;
|
|
22
|
+
case "updated": return `Updated the generated section of ${file}.`;
|
|
23
|
+
case "unchanged": return `${file} is up to date.`;
|
|
24
|
+
default: return `${file} does not exist; nothing written.`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Action behind `warlock agents-md`.
|
|
29
|
+
*
|
|
30
|
+
* Boots the app read-only (the inspect boot pass) with boot output on stderr,
|
|
31
|
+
* then prints the section (no flag), writes it (`--write`) or prints
|
|
32
|
+
* `{ file, status, section }` (`--json`; `status` is `"printed"` without
|
|
33
|
+
* `--write`). Malformed markers throw `WL7501` and nothing is written.
|
|
34
|
+
*
|
|
35
|
+
* @param data Parsed CLI args: `options.write`, `options.json`.
|
|
36
|
+
*/
|
|
37
|
+
async function agentsMdCommandAction({ options }) {
|
|
38
|
+
const cwd = process.cwd();
|
|
39
|
+
const report = await inspectApp({
|
|
40
|
+
...inspectOptionsFromBoot(await withConsoleOnStderr(() => bootForInspect(cwd))),
|
|
41
|
+
cwd,
|
|
42
|
+
sections: AGENTS_MD_SECTIONS
|
|
43
|
+
});
|
|
44
|
+
if (options.write === true) {
|
|
45
|
+
const result = writeAgentsMd({
|
|
46
|
+
cwd,
|
|
47
|
+
report
|
|
48
|
+
});
|
|
49
|
+
console.log(options.json === true ? JSON.stringify(result, null, 2) : formatWriteStatus(result));
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const section = renderAgentsMdSection(report, {
|
|
53
|
+
skills: listInstalledSkills(cwd),
|
|
54
|
+
modules: listAppModules(cwd)
|
|
55
|
+
});
|
|
56
|
+
if (options.json === true) {
|
|
57
|
+
console.log(JSON.stringify({
|
|
58
|
+
file: path.join(cwd, AGENTS_MD_FILE),
|
|
59
|
+
status: "printed",
|
|
60
|
+
section
|
|
61
|
+
}, null, 2));
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
process.stdout.write(section);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
//#endregion
|
|
68
|
+
export { agentsMdCommandAction };
|
|
69
|
+
//# sourceMappingURL=agents-md-command.action.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents-md-command.action.mjs","names":[],"sources":["../../../../../../../../../../packages/core/src/cli/commands/agents-md/agents-md-command.action.ts"],"sourcesContent":["import path from \"node:path\";\nimport type { CommandActionData } from \"../../../commands/types\";\nimport { AGENTS_MD_FILE } from \"../../../tooling/agents-md/agents-md-markers\";\nimport { listInstalledSkills } from \"../../../tooling/agents-md/installed-skills\";\nimport { listAppModules, renderAgentsMdSection } from \"../../../tooling/agents-md/render-agents-md\";\nimport {\n writeAgentsMd,\n type WriteAgentsMdResult,\n} from \"../../../tooling/agents-md/write-agents-md\";\nimport { bootForInspect, inspectOptionsFromBoot } from \"../../../tooling/inspect/boot-for-inspect\";\nimport { inspectApp } from \"../../../tooling/inspect/inspect-app\";\nimport type { InspectSection } from \"../../../tooling/inspect/inspect-report.types\";\nimport { withConsoleOnStderr } from \"../routes/with-console-on-stderr\";\n\n/** The inspect sections the generated section reads. */\nexport const AGENTS_MD_SECTIONS: readonly InspectSection[] = [\"routes\", \"models\", \"packages\"];\n\n/** The one line `warlock agents-md --write` prints. */\nexport function formatWriteStatus(result: Pick<WriteAgentsMdResult, \"file\" | \"status\">): string {\n const file = path.relative(process.cwd(), result.file) || AGENTS_MD_FILE;\n\n switch (result.status) {\n case \"created\":\n return `Created ${file} with the generated section.`;\n case \"updated\":\n return `Updated the generated section of ${file}.`;\n case \"unchanged\":\n return `${file} is up to date.`;\n default:\n return `${file} does not exist; nothing written.`;\n }\n}\n\n/**\n * Action behind `warlock agents-md`.\n *\n * Boots the app read-only (the inspect boot pass) with boot output on stderr,\n * then prints the section (no flag), writes it (`--write`) or prints\n * `{ file, status, section }` (`--json`; `status` is `\"printed\"` without\n * `--write`). Malformed markers throw `WL7501` and nothing is written.\n *\n * @param data Parsed CLI args: `options.write`, `options.json`.\n */\nexport async function agentsMdCommandAction({ options }: CommandActionData): Promise<void> {\n const cwd = process.cwd();\n const boot = await withConsoleOnStderr(() => bootForInspect(cwd));\n const report = await inspectApp({\n ...inspectOptionsFromBoot(boot),\n cwd,\n sections: AGENTS_MD_SECTIONS,\n });\n\n if (options.write === true) {\n const result = writeAgentsMd({ cwd, report });\n\n console.log(\n options.json === true ? JSON.stringify(result, null, 2) : formatWriteStatus(result),\n );\n return;\n }\n\n const section = renderAgentsMdSection(report, {\n skills: listInstalledSkills(cwd),\n modules: listAppModules(cwd),\n });\n\n if (options.json === true) {\n console.log(\n JSON.stringify({ file: path.join(cwd, AGENTS_MD_FILE), status: \"printed\", section }, null, 2),\n );\n return;\n }\n\n process.stdout.write(section);\n}\n"],"mappings":";;;;;;;;;;;AAeA,MAAa,qBAAgD;CAAC;CAAU;CAAU;AAAU;;AAG5F,SAAgB,kBAAkB,QAA8D;CAC9F,MAAM,OAAO,KAAK,SAAS,QAAQ,IAAI,GAAG,OAAO,IAAI;CAErD,QAAQ,OAAO,QAAf;EACE,KAAK,WACH,OAAO,WAAW,KAAK;EACzB,KAAK,WACH,OAAO,oCAAoC,KAAK;EAClD,KAAK,aACH,OAAO,GAAG,KAAK;EACjB,SACE,OAAO,GAAG,KAAK;CACnB;AACF;;;;;;;;;;;AAYA,eAAsB,sBAAsB,EAAE,WAA6C;CACzF,MAAM,MAAM,QAAQ,IAAI;CAExB,MAAM,SAAS,MAAM,WAAW;EAC9B,GAAG,uBAAuB,MAFT,0BAA0B,eAAe,GAAG,CAAC,CAEhC;EAC9B;EACA,UAAU;CACZ,CAAC;CAED,IAAI,QAAQ,UAAU,MAAM;EAC1B,MAAM,SAAS,cAAc;GAAE;GAAK;EAAO,CAAC;EAE5C,QAAQ,IACN,QAAQ,SAAS,OAAO,KAAK,UAAU,QAAQ,MAAM,CAAC,IAAI,kBAAkB,MAAM,CACpF;EACA;CACF;CAEA,MAAM,UAAU,sBAAsB,QAAQ;EAC5C,QAAQ,oBAAoB,GAAG;EAC/B,SAAS,eAAe,GAAG;CAC7B,CAAC;CAED,IAAI,QAAQ,SAAS,MAAM;EACzB,QAAQ,IACN,KAAK,UAAU;GAAE,MAAM,KAAK,KAAK,KAAK,cAAc;GAAG,QAAQ;GAAW;EAAQ,GAAG,MAAM,CAAC,CAC9F;EACA;CACF;CAEA,QAAQ,OAAO,MAAM,OAAO;AAC9B"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { command } from "../../commands/cli-command.mjs";
|
|
2
|
+
import { agentsMdCommandAction } from "./agents-md/agents-md-command.action.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../packages/core/src/cli/commands/agents-md.command.ts
|
|
5
|
+
/**
|
|
6
|
+
* `warlock agents-md` — render the app-specific AGENTS.md section from the
|
|
7
|
+
* booted app (modules, routes, models, conventions, installed skills, verify
|
|
8
|
+
* commands). Prints it; `--write` puts it between the
|
|
9
|
+
* `<!-- warlock:generated:start -->` / `end` markers of AGENTS.md, creating
|
|
10
|
+
* the file when missing and never touching content outside the markers.
|
|
11
|
+
*
|
|
12
|
+
* Boots like `warlock inspect`: connectors boot but none starts, so no
|
|
13
|
+
* connection opens and no port binds.
|
|
14
|
+
*/
|
|
15
|
+
const agentsMdCommand = command({
|
|
16
|
+
name: "agents-md",
|
|
17
|
+
description: "Generate the app-specific AGENTS.md section from the booted app; --write updates it between its markers",
|
|
18
|
+
action: agentsMdCommandAction,
|
|
19
|
+
preload: {
|
|
20
|
+
runtimeStrategy: "development",
|
|
21
|
+
config: true,
|
|
22
|
+
env: true,
|
|
23
|
+
bootstrap: true
|
|
24
|
+
},
|
|
25
|
+
options: [{
|
|
26
|
+
text: "--write, -w",
|
|
27
|
+
description: "Write the section into AGENTS.md between its markers (creates the file when missing)",
|
|
28
|
+
type: "boolean"
|
|
29
|
+
}, {
|
|
30
|
+
text: "--json, -j",
|
|
31
|
+
description: "Print { file, status, section } as JSON",
|
|
32
|
+
type: "boolean"
|
|
33
|
+
}]
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { agentsMdCommand };
|
|
38
|
+
//# sourceMappingURL=agents-md.command.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents-md.command.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/cli/commands/agents-md.command.ts"],"sourcesContent":["import { command } from \"../../commands/cli-command\";\nimport { agentsMdCommandAction } from \"./agents-md/agents-md-command.action\";\n\n/**\n * `warlock agents-md` — render the app-specific AGENTS.md section from the\n * booted app (modules, routes, models, conventions, installed skills, verify\n * commands). Prints it; `--write` puts it between the\n * `<!-- warlock:generated:start -->` / `end` markers of AGENTS.md, creating\n * the file when missing and never touching content outside the markers.\n *\n * Boots like `warlock inspect`: connectors boot but none starts, so no\n * connection opens and no port binds.\n */\nexport const agentsMdCommand = command({\n name: \"agents-md\",\n description:\n \"Generate the app-specific AGENTS.md section from the booted app; --write updates it between its markers\",\n action: agentsMdCommandAction,\n preload: {\n runtimeStrategy: \"development\",\n config: true,\n env: true,\n bootstrap: true,\n },\n options: [\n {\n text: \"--write, -w\",\n description:\n \"Write the section into AGENTS.md between its markers (creates the file when missing)\",\n type: \"boolean\",\n },\n {\n text: \"--json, -j\",\n description: \"Print { file, status, section } as JSON\",\n type: \"boolean\",\n },\n ],\n});\n"],"mappings":";;;;;;;;;;;;;;AAaA,MAAa,kBAAkB,QAAQ;CACrC,MAAM;CACN,aACE;CACF,QAAQ;CACR,SAAS;EACP,iBAAiB;EACjB,QAAQ;EACR,KAAK;EACL,WAAW;CACb;CACA,SAAS,CACP;EACE,MAAM;EACN,aACE;EACF,MAAM;CACR,GACA;EACE,MAAM;EACN,aAAa;EACb,MAAM;CACR,CACF;AACF,CAAC"}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { WarlockError } from "../../../errors/warlock-error.mjs";
|
|
2
|
+
import { BOARD_STATES, BOARD_VERDICT_LINES, isBoardState, isBoardVerdict } from "../../../tooling/board/board.types.mjs";
|
|
3
|
+
import { addBoardItem, initBoard, moveBoardItem, nextBoardStates, readBoardItem, readBoardStatus, sendBoardMessage, watchBoard } from "../../../tooling/board/board.mjs";
|
|
4
|
+
import { flushAndExit } from "../../flush-and-exit.mjs";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { readFileSync } from "node:fs";
|
|
7
|
+
|
|
8
|
+
//#region ../../packages/core/src/cli/commands/board/board-command.action.ts
|
|
9
|
+
/** The exit code of `warlock board watch` when it times out. */
|
|
10
|
+
const BOARD_WATCH_TIMEOUT_EXIT_CODE = 3;
|
|
11
|
+
/** The sub-commands of `warlock board`. */
|
|
12
|
+
const BOARD_ACTIONS = [
|
|
13
|
+
"init",
|
|
14
|
+
"add",
|
|
15
|
+
"status",
|
|
16
|
+
"send",
|
|
17
|
+
"watch"
|
|
18
|
+
];
|
|
19
|
+
function stringOption(options, key) {
|
|
20
|
+
const value = options[key];
|
|
21
|
+
if (typeof value === "number") return String(value);
|
|
22
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
|
|
23
|
+
}
|
|
24
|
+
function parseId(value, label) {
|
|
25
|
+
const id = value === void 0 ? NaN : Number(value);
|
|
26
|
+
if (!Number.isInteger(id) || id < 1) throw new Error(`${label} must be a positive whole number, got ${JSON.stringify(value)}.`);
|
|
27
|
+
return id;
|
|
28
|
+
}
|
|
29
|
+
/** `--body text` as is; `--body @notes.md` reads the file (relative to `cwd`). */
|
|
30
|
+
function readBodyOption(value, cwd) {
|
|
31
|
+
if (value === void 0) return "";
|
|
32
|
+
return value.startsWith("@") ? readFileSync(path.resolve(cwd, value.slice(1)), "utf8") : value;
|
|
33
|
+
}
|
|
34
|
+
/** The current agent: the explicit option, else `WARLOCK_AGENT`, else `null`. */
|
|
35
|
+
function agentOf(options, key, environment) {
|
|
36
|
+
return stringOption(options, key) ?? environment.WARLOCK_AGENT ?? null;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Turn `warlock board <action> [args...]` into a {@link BoardInvocation}.
|
|
40
|
+
* Throws on an unknown action, a missing argument or an invalid value.
|
|
41
|
+
*
|
|
42
|
+
* @param args Positionals after `board`: the action first.
|
|
43
|
+
* @param options Parsed flags.
|
|
44
|
+
* @param cwd Where `--body @file` resolves.
|
|
45
|
+
* @param environment Where `WARLOCK_AGENT` is read.
|
|
46
|
+
*/
|
|
47
|
+
function parseBoardInvocation(args, options, cwd = process.cwd(), environment = process.env) {
|
|
48
|
+
const [action, ...rest] = args;
|
|
49
|
+
switch (action) {
|
|
50
|
+
case "init": return { type: "init" };
|
|
51
|
+
case "add": {
|
|
52
|
+
const title = rest.join(" ").trim();
|
|
53
|
+
if (title.length === 0) throw new Error("Usage: warlock board add \"<title>\" [--assignee a --reviewer b]");
|
|
54
|
+
return {
|
|
55
|
+
type: "add",
|
|
56
|
+
title,
|
|
57
|
+
assignee: stringOption(options, "assignee") ?? null,
|
|
58
|
+
reviewer: stringOption(options, "reviewer") ?? null,
|
|
59
|
+
by: agentOf(options, "by", environment)
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
case "status": {
|
|
63
|
+
const [idText, state] = rest;
|
|
64
|
+
if (idText === void 0) return { type: "overview" };
|
|
65
|
+
const id = parseId(idText, "The item id");
|
|
66
|
+
if (state === void 0) return {
|
|
67
|
+
type: "item",
|
|
68
|
+
id
|
|
69
|
+
};
|
|
70
|
+
if (!isBoardState(state)) throw new Error(`Unknown state ${JSON.stringify(state)}. States: ${BOARD_STATES.join(", ")}.`);
|
|
71
|
+
return {
|
|
72
|
+
type: "move",
|
|
73
|
+
id,
|
|
74
|
+
state,
|
|
75
|
+
by: agentOf(options, "by", environment),
|
|
76
|
+
note: stringOption(options, "note") ?? null
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
case "send": {
|
|
80
|
+
const [to, ...subjectWords] = rest;
|
|
81
|
+
const subject = subjectWords.join(" ").trim();
|
|
82
|
+
if (to === void 0 || subject.length === 0) throw new Error("Usage: warlock board send <agent> \"<subject>\" --from <agent> [--item id --body text|@file --verdict approved|changes-requested]");
|
|
83
|
+
const from = agentOf(options, "from", environment);
|
|
84
|
+
if (from === null) throw new Error("Name the sender with --from <agent> (or set WARLOCK_AGENT).");
|
|
85
|
+
const verdict = stringOption(options, "verdict");
|
|
86
|
+
if (verdict !== void 0 && !isBoardVerdict(verdict)) throw new Error(`--verdict must be "approved" or "changes-requested", got ${JSON.stringify(verdict)}.`);
|
|
87
|
+
const item = stringOption(options, "item");
|
|
88
|
+
return {
|
|
89
|
+
type: "send",
|
|
90
|
+
to,
|
|
91
|
+
from,
|
|
92
|
+
subject,
|
|
93
|
+
body: readBodyOption(stringOption(options, "body"), cwd),
|
|
94
|
+
item: item === void 0 ? null : parseId(item, "--item"),
|
|
95
|
+
verdict: verdict ?? null
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
case "watch": {
|
|
99
|
+
const [agent] = rest;
|
|
100
|
+
if (agent === void 0) throw new Error("Usage: warlock board watch <agent> [--timeout seconds --since N]");
|
|
101
|
+
const timeout = stringOption(options, "timeout");
|
|
102
|
+
const seconds = timeout === void 0 ? 600 : Number(timeout);
|
|
103
|
+
if (!Number.isFinite(seconds) || seconds <= 0) throw new Error(`--timeout must be a positive number of seconds, got ${JSON.stringify(timeout)}.`);
|
|
104
|
+
const since = stringOption(options, "since");
|
|
105
|
+
const sinceNumber = since === void 0 ? void 0 : Number(since);
|
|
106
|
+
if (sinceNumber !== void 0 && (!Number.isInteger(sinceNumber) || sinceNumber < 0)) throw new Error(`--since must be a whole number, got ${JSON.stringify(since)}.`);
|
|
107
|
+
return {
|
|
108
|
+
type: "watch",
|
|
109
|
+
agent,
|
|
110
|
+
timeoutMs: Math.round(seconds * 1e3),
|
|
111
|
+
since: sinceNumber
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
default: throw new Error(`Unknown board action ${JSON.stringify(action ?? "")}. Actions: ${BOARD_ACTIONS.join(", ")}.`);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/** `#3 [in-progress] Add the orders module (implementer → reviewer)` */
|
|
118
|
+
function formatBoardItemLine(item) {
|
|
119
|
+
const people = item.assignee || item.reviewer ? ` (${item.assignee ?? "-"} → ${item.reviewer ?? "-"})` : "";
|
|
120
|
+
return `#${item.id} [${item.state}] ${item.title}${people}`;
|
|
121
|
+
}
|
|
122
|
+
function formatMessage(message) {
|
|
123
|
+
const about = message.item === null ? "" : ` (item #${message.item})`;
|
|
124
|
+
return [
|
|
125
|
+
`── ${message.file}`,
|
|
126
|
+
`From ${message.from}${about}: ${message.subject}`,
|
|
127
|
+
...message.body.length > 0 ? ["", message.body] : [],
|
|
128
|
+
...message.verdict ? ["", BOARD_VERDICT_LINES[message.verdict]] : [],
|
|
129
|
+
""
|
|
130
|
+
];
|
|
131
|
+
}
|
|
132
|
+
/** Run one parsed invocation against the board in `cwd`. Throws `WarlockError`s with WL74xx codes. */
|
|
133
|
+
async function runBoardInvocation(invocation, cwd = process.cwd()) {
|
|
134
|
+
switch (invocation.type) {
|
|
135
|
+
case "init": {
|
|
136
|
+
const result = initBoard(cwd);
|
|
137
|
+
return {
|
|
138
|
+
json: {
|
|
139
|
+
ok: true,
|
|
140
|
+
...result
|
|
141
|
+
},
|
|
142
|
+
lines: [result.created ? `Created ${result.directory}/` : `${result.directory}/ already exists`, ...result.gitignoreUpdated ? [`Added ${result.directory}/ to .gitignore`] : []],
|
|
143
|
+
exitCode: 0
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
case "add": {
|
|
147
|
+
const item = addBoardItem({
|
|
148
|
+
title: invocation.title,
|
|
149
|
+
assignee: invocation.assignee,
|
|
150
|
+
reviewer: invocation.reviewer,
|
|
151
|
+
by: invocation.by
|
|
152
|
+
}, cwd);
|
|
153
|
+
return {
|
|
154
|
+
json: {
|
|
155
|
+
ok: true,
|
|
156
|
+
item
|
|
157
|
+
},
|
|
158
|
+
lines: [`Added ${formatBoardItemLine(item)}`],
|
|
159
|
+
exitCode: 0
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
case "overview": {
|
|
163
|
+
const status = readBoardStatus(cwd);
|
|
164
|
+
const lines = status.items.length === 0 ? ["No items. Add one with `warlock board add \"<title>\"`."] : status.items.map(formatBoardItemLine);
|
|
165
|
+
if (status.inboxes.length > 0) {
|
|
166
|
+
lines.push("", "Inboxes:");
|
|
167
|
+
for (const inbox of status.inboxes) lines.push(` ${inbox.agent.padEnd(16)} ${inbox.messages} message(s), ${inbox.unread} unread`);
|
|
168
|
+
}
|
|
169
|
+
return {
|
|
170
|
+
json: {
|
|
171
|
+
ok: true,
|
|
172
|
+
...status
|
|
173
|
+
},
|
|
174
|
+
lines,
|
|
175
|
+
exitCode: 0
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
case "item": {
|
|
179
|
+
const item = readBoardItem(invocation.id, cwd);
|
|
180
|
+
const next = nextBoardStates(item.state);
|
|
181
|
+
return {
|
|
182
|
+
json: {
|
|
183
|
+
ok: true,
|
|
184
|
+
item,
|
|
185
|
+
next
|
|
186
|
+
},
|
|
187
|
+
lines: [
|
|
188
|
+
formatBoardItemLine(item),
|
|
189
|
+
` next: ${next.join(", ")}`,
|
|
190
|
+
...item.history.map((entry) => ` ${entry.at} ${entry.from ?? "∅"} → ${entry.to}${entry.by ? ` by ${entry.by}` : ""}${entry.note ? ` — ${entry.note}` : ""}`)
|
|
191
|
+
],
|
|
192
|
+
exitCode: 0
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
case "move": {
|
|
196
|
+
const item = moveBoardItem(invocation.id, invocation.state, {
|
|
197
|
+
by: invocation.by,
|
|
198
|
+
note: invocation.note
|
|
199
|
+
}, cwd);
|
|
200
|
+
return {
|
|
201
|
+
json: {
|
|
202
|
+
ok: true,
|
|
203
|
+
item
|
|
204
|
+
},
|
|
205
|
+
lines: [`Moved ${formatBoardItemLine(item)}`],
|
|
206
|
+
exitCode: 0
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
case "send": {
|
|
210
|
+
const result = sendBoardMessage({
|
|
211
|
+
to: invocation.to,
|
|
212
|
+
from: invocation.from,
|
|
213
|
+
subject: invocation.subject,
|
|
214
|
+
body: invocation.body,
|
|
215
|
+
item: invocation.item,
|
|
216
|
+
verdict: invocation.verdict
|
|
217
|
+
}, cwd);
|
|
218
|
+
return {
|
|
219
|
+
json: {
|
|
220
|
+
ok: true,
|
|
221
|
+
...result
|
|
222
|
+
},
|
|
223
|
+
lines: [`Wrote ${result.message.file}`, ...result.item ? [`Moved ${formatBoardItemLine(result.item)}`] : []],
|
|
224
|
+
exitCode: 0
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
case "watch": {
|
|
228
|
+
const result = await watchBoard({
|
|
229
|
+
agent: invocation.agent,
|
|
230
|
+
timeoutMs: invocation.timeoutMs,
|
|
231
|
+
since: invocation.since
|
|
232
|
+
}, cwd);
|
|
233
|
+
return {
|
|
234
|
+
json: {
|
|
235
|
+
ok: true,
|
|
236
|
+
timedOut: false,
|
|
237
|
+
...result
|
|
238
|
+
},
|
|
239
|
+
lines: result.messages.flatMap(formatMessage),
|
|
240
|
+
exitCode: 0
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Action behind `warlock board <action> [args...]`.
|
|
247
|
+
*
|
|
248
|
+
* With `--json`, stdout carries exactly one JSON object — `{ ok: true, … }`, or
|
|
249
|
+
* `{ ok: false, code, message }` for a coded failure (`timedOut: true` for a
|
|
250
|
+
* watch timeout). Exit codes: 0 done, 1 refused or invalid, 3 watch timed out.
|
|
251
|
+
*
|
|
252
|
+
* @param data Parsed CLI args: the action and its positionals, and the flags.
|
|
253
|
+
*/
|
|
254
|
+
async function boardCommandAction({ args, options }) {
|
|
255
|
+
const json = options.json === true;
|
|
256
|
+
try {
|
|
257
|
+
const outcome = await runBoardInvocation(parseBoardInvocation(args, options));
|
|
258
|
+
if (json) console.log(JSON.stringify(outcome.json, null, 2));
|
|
259
|
+
else for (const line of outcome.lines) console.log(line);
|
|
260
|
+
if (outcome.exitCode !== 0) await flushAndExit(outcome.exitCode);
|
|
261
|
+
} catch (error) {
|
|
262
|
+
const timedOut = error instanceof WarlockError && error.code === "WL7404";
|
|
263
|
+
const exitCode = timedOut ? 3 : 1;
|
|
264
|
+
if (!json && !timedOut) throw error;
|
|
265
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
266
|
+
if (json) console.log(JSON.stringify({
|
|
267
|
+
ok: false,
|
|
268
|
+
code: error instanceof WarlockError ? error.code : null,
|
|
269
|
+
message,
|
|
270
|
+
...timedOut ? { timedOut: true } : {}
|
|
271
|
+
}, null, 2));
|
|
272
|
+
else console.error(message);
|
|
273
|
+
await flushAndExit(exitCode);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
//#endregion
|
|
278
|
+
export { boardCommandAction };
|
|
279
|
+
//# sourceMappingURL=board-command.action.mjs.map
|