@warlock.js/core 5.31.0 → 5.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/esm/application/app.d.mts +3 -3
- package/esm/application/app.d.mts.map +1 -1
- package/esm/application/application-config-types.d.mts +1 -2
- package/esm/application/application-config-types.d.mts.map +1 -1
- package/esm/application/application.d.mts +5 -7
- package/esm/application/application.d.mts.map +1 -1
- package/esm/application/application.mjs +3 -1
- package/esm/application/application.mjs.map +1 -1
- package/esm/application/boot-signal.d.mts +14 -12
- package/esm/application/boot-signal.d.mts.map +1 -1
- package/esm/application/index.d.mts +2 -1
- package/esm/application/index.mjs +1 -1
- package/esm/application/public-url.d.mts +1 -2
- package/esm/application/public-url.d.mts.map +1 -1
- package/esm/application/roles.d.mts +10 -11
- package/esm/application/roles.d.mts.map +1 -1
- package/esm/benchmark/benchmark-snapshots.d.mts +1 -3
- package/esm/benchmark/benchmark-snapshots.d.mts.map +1 -1
- package/esm/benchmark/benchmark.d.mts +1 -3
- package/esm/benchmark/benchmark.d.mts.map +1 -1
- package/esm/benchmark/channels/console.channel.d.mts +1 -3
- package/esm/benchmark/channels/console.channel.d.mts.map +1 -1
- package/esm/benchmark/channels/noop.channel.d.mts +1 -3
- package/esm/benchmark/channels/noop.channel.d.mts.map +1 -1
- package/esm/benchmark/index.mjs +1 -1
- package/esm/benchmark/profiler.d.mts +1 -3
- package/esm/benchmark/profiler.d.mts.map +1 -1
- package/esm/benchmark/profiler.mjs +2 -1
- package/esm/benchmark/profiler.mjs.map +1 -1
- package/esm/benchmark/types.d.mts +22 -17
- package/esm/benchmark/types.d.mts.map +1 -1
- package/esm/bootstrap/setup.d.mts +1 -2
- package/esm/bootstrap/setup.d.mts.map +1 -1
- package/esm/bootstrap.d.mts +1 -2
- package/esm/bootstrap.d.mts.map +1 -1
- package/esm/cache/database-cache-driver.d.mts +3 -5
- package/esm/cache/database-cache-driver.d.mts.map +1 -1
- package/esm/cache/database-cache-driver.mjs +1 -1
- package/esm/cache/index.d.mts +2 -1
- package/esm/cache/index.mjs +1 -1
- package/esm/cli/cli-commands.manager.mjs +6 -3
- package/esm/cli/cli-commands.manager.mjs.map +1 -1
- package/esm/cli/commands/agents-md/agents-md-command.action.mjs +3 -2
- package/esm/cli/commands/agents-md/agents-md-command.action.mjs.map +1 -1
- package/esm/cli/commands/board/board-command.action.mjs +1 -1
- package/esm/cli/commands/check/check-command.action.mjs +1 -1
- package/esm/cli/commands/check/child-typecheck.mjs +1 -1
- package/esm/cli/commands/check/child-typecheck.mjs.map +1 -1
- package/esm/cli/commands/check/format-problems.mjs +1 -1
- package/esm/cli/commands/dev-server.command.mjs +3 -2
- package/esm/cli/commands/dev-server.command.mjs.map +1 -1
- package/esm/cli/commands/doctor/check.types.d.mts +29 -16
- package/esm/cli/commands/doctor/check.types.d.mts.map +1 -1
- package/esm/cli/commands/doctor/checks/locales-ts-deprecated.check.mjs +22 -27
- package/esm/cli/commands/doctor/checks/locales-ts-deprecated.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/doctor-command.action.mjs +2 -1
- package/esm/cli/commands/doctor/doctor-command.action.mjs.map +1 -1
- package/esm/cli/commands/explain/explain-command.action.mjs +1 -1
- package/esm/cli/commands/generate/generators/controller.generator.mjs +5 -2
- package/esm/cli/commands/generate/generators/controller.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/endpoint.generator.mjs +5 -3
- package/esm/cli/commands/generate/generators/endpoint.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/model.generator.mjs +3 -2
- package/esm/cli/commands/generate/generators/model.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/repository.generator.mjs +3 -1
- package/esm/cli/commands/generate/generators/repository.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/resource.generator.mjs +3 -1
- package/esm/cli/commands/generate/generators/resource.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/service.generator.mjs +3 -1
- package/esm/cli/commands/generate/generators/service.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/templates/endpoint-stubs.mjs +2 -2
- package/esm/cli/commands/generate/templates/endpoint-stubs.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/endpoint-schema.mjs +1 -2
- package/esm/cli/commands/generate/utils/endpoint-schema.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/name-parser.mjs +1 -1
- package/esm/cli/commands/generate/utils/path-resolver.mjs +1 -1
- package/esm/cli/commands/inspect/inspect-command.action.mjs +3 -2
- package/esm/cli/commands/inspect/inspect-command.action.mjs.map +1 -1
- package/esm/cli/commands/issue/collect-environment.mjs +187 -0
- package/esm/cli/commands/issue/collect-environment.mjs.map +1 -0
- package/esm/cli/commands/issue/issue-command.action.mjs +70 -0
- package/esm/cli/commands/issue/issue-command.action.mjs.map +1 -0
- package/esm/cli/commands/issue.command.mjs +31 -0
- package/esm/cli/commands/issue.command.mjs.map +1 -0
- package/esm/cli/commands/mcp/mcp-command.action.mjs +15 -14
- package/esm/cli/commands/mcp/mcp-command.action.mjs.map +1 -1
- package/esm/cli/commands/openapi-generator.action.mjs +1 -1
- package/esm/cli/commands/postman-generator.action.mjs +1 -1
- package/esm/cli/commands/routes/format-routes-table.mjs +1 -1
- package/esm/cli/commands/routes/route-row.mjs +1 -1
- package/esm/cli/commands/routes/routes-diff.action.mjs +2 -2
- package/esm/cli/commands/routes/routes-diff.action.mjs.map +1 -1
- package/esm/cli/commands/test.command.mjs +1 -1
- package/esm/cli/commands/trace/trace-command.action.mjs +1 -1
- package/esm/cli/commands-loader.mjs +1 -1
- package/esm/cli/framework-cli-commands.mjs +2 -0
- package/esm/cli/framework-cli-commands.mjs.map +1 -1
- package/esm/cli/parse-cli-args.mjs +2 -2
- package/esm/cli/parse-cli-args.mjs.map +1 -1
- package/esm/cli/start.d.mts +1 -1
- package/esm/cli/string-similarity.mjs +1 -1
- package/esm/commands/cli-command.d.mts +2 -4
- package/esm/commands/cli-command.d.mts.map +1 -1
- package/esm/commands/index.d.mts +2 -1
- package/esm/commands/index.mjs +1 -1
- package/esm/commands/types.d.mts +8 -8
- package/esm/commands/types.d.mts.map +1 -1
- package/esm/config/config-getter.d.mts +2 -3
- package/esm/config/config-getter.d.mts.map +1 -1
- package/esm/config/config-getter.mjs +5 -5
- package/esm/config/config-getter.mjs.map +1 -1
- package/esm/config/config-handlers.d.mts +1 -3
- package/esm/config/config-handlers.d.mts.map +1 -1
- package/esm/config/config-loader.d.mts +1 -2
- package/esm/config/config-loader.d.mts.map +1 -1
- package/esm/config/config-loader.mjs +3 -3
- package/esm/config/config-loader.mjs.map +1 -1
- package/esm/config/config-manager.mjs +1 -1
- package/esm/config/config-schema.d.mts +19 -16
- package/esm/config/config-schema.d.mts.map +1 -1
- package/esm/config/config-setter.d.mts +2 -4
- package/esm/config/config-setter.d.mts.map +1 -1
- package/esm/config/config-setter.mjs +2 -2
- package/esm/config/config-setter.mjs.map +1 -1
- package/esm/config/config-special-handlers.d.mts +2 -4
- package/esm/config/config-special-handlers.d.mts.map +1 -1
- package/esm/config/index.d.mts +2 -1
- package/esm/config/index.mjs +1 -1
- package/esm/config/types.d.mts +4 -5
- package/esm/config/types.d.mts.map +1 -1
- package/esm/connectors/access-connector.d.mts +1 -3
- package/esm/connectors/access-connector.d.mts.map +1 -1
- package/esm/connectors/access-connector.mjs +2 -2
- package/esm/connectors/access-connector.mjs.map +1 -1
- package/esm/connectors/ai-connector.d.mts +1 -3
- package/esm/connectors/ai-connector.d.mts.map +1 -1
- package/esm/connectors/ai-connector.mjs +2 -2
- package/esm/connectors/ai-connector.mjs.map +1 -1
- package/esm/connectors/assert-no-reserved-connector-names.d.mts +1 -3
- package/esm/connectors/assert-no-reserved-connector-names.d.mts.map +1 -1
- package/esm/connectors/assert-unique-connector-names.d.mts +1 -3
- package/esm/connectors/assert-unique-connector-names.d.mts.map +1 -1
- package/esm/connectors/assert-unique-connector-names.mjs +2 -1
- package/esm/connectors/assert-unique-connector-names.mjs.map +1 -1
- package/esm/connectors/base-connector.d.mts +1 -3
- package/esm/connectors/base-connector.d.mts.map +1 -1
- package/esm/connectors/cache-connector.d.mts +1 -3
- package/esm/connectors/cache-connector.d.mts.map +1 -1
- package/esm/connectors/cache-connector.mjs +3 -3
- package/esm/connectors/cache-connector.mjs.map +1 -1
- package/esm/connectors/connectors-manager.d.mts +2 -4
- package/esm/connectors/connectors-manager.d.mts.map +1 -1
- package/esm/connectors/connectors-manager.mjs +2 -2
- package/esm/connectors/connectors-manager.mjs.map +1 -1
- package/esm/connectors/database-connector.d.mts +1 -3
- package/esm/connectors/database-connector.d.mts.map +1 -1
- package/esm/connectors/database-connector.mjs +2 -2
- package/esm/connectors/database-connector.mjs.map +1 -1
- package/esm/connectors/describe-server-address.mjs +4 -4
- package/esm/connectors/describe-server-address.mjs.map +1 -1
- package/esm/connectors/herald-connector.d.mts +1 -3
- package/esm/connectors/herald-connector.d.mts.map +1 -1
- package/esm/connectors/herald-connector.mjs +2 -2
- package/esm/connectors/herald-connector.mjs.map +1 -1
- package/esm/connectors/http-connector.d.mts +1 -3
- package/esm/connectors/http-connector.d.mts.map +1 -1
- package/esm/connectors/http-connector.mjs +8 -7
- package/esm/connectors/http-connector.mjs.map +1 -1
- package/esm/connectors/index.d.mts +2 -1
- package/esm/connectors/index.mjs +1 -1
- package/esm/connectors/logger-connector.d.mts +1 -3
- package/esm/connectors/logger-connector.d.mts.map +1 -1
- package/esm/connectors/logger-connector.mjs +2 -2
- package/esm/connectors/logger-connector.mjs.map +1 -1
- package/esm/connectors/mail-connector.d.mts +1 -3
- package/esm/connectors/mail-connector.d.mts.map +1 -1
- package/esm/connectors/mail-connector.mjs +2 -2
- package/esm/connectors/mail-connector.mjs.map +1 -1
- package/esm/connectors/notifications-connector.d.mts +1 -3
- package/esm/connectors/notifications-connector.d.mts.map +1 -1
- package/esm/connectors/notifications-connector.mjs +2 -2
- package/esm/connectors/notifications-connector.mjs.map +1 -1
- package/esm/connectors/register-configured-connectors.d.mts +2 -4
- package/esm/connectors/register-configured-connectors.d.mts.map +1 -1
- package/esm/connectors/socket-connector.d.mts +1 -3
- package/esm/connectors/socket-connector.d.mts.map +1 -1
- package/esm/connectors/socket-connector.mjs +12 -10
- package/esm/connectors/socket-connector.mjs.map +1 -1
- package/esm/connectors/storage.connector.d.mts +1 -3
- package/esm/connectors/storage.connector.d.mts.map +1 -1
- package/esm/connectors/storage.connector.mjs +2 -2
- package/esm/connectors/storage.connector.mjs.map +1 -1
- package/esm/connectors/types.d.mts +17 -14
- package/esm/connectors/types.d.mts.map +1 -1
- package/esm/container/container-instance-registry.mjs.map +1 -1
- package/esm/container/development-app-modules.d.mts +7 -5
- package/esm/container/development-app-modules.d.mts.map +1 -1
- package/esm/container/development-model-modules.d.mts +6 -5
- package/esm/container/development-model-modules.d.mts.map +1 -1
- package/esm/container/index.d.mts +4 -4
- package/esm/container/index.d.mts.map +1 -1
- package/esm/database/index.d.mts +3 -1
- package/esm/database/index.mjs +1 -1
- package/esm/database/migrate-action.mjs +1 -1
- package/esm/database/models/database-log/database-log.d.mts +2 -3
- package/esm/database/models/database-log/database-log.d.mts.map +1 -1
- package/esm/database/models/database-log/index.d.mts +2 -1
- package/esm/database/models/database-log/index.mjs +1 -1
- package/esm/database/seed-command-action.mjs +1 -1
- package/esm/database/seeds/seeder.d.mts +2 -4
- package/esm/database/seeds/seeder.d.mts.map +1 -1
- package/esm/database/seeds/seeder.errors.d.mts +2 -3
- package/esm/database/seeds/seeder.errors.d.mts.map +1 -1
- package/esm/database/seeds/seeders.manager.mjs +2 -1
- package/esm/database/seeds/seeders.manager.mjs.map +1 -1
- package/esm/database/seeds/types.d.mts +7 -8
- package/esm/database/seeds/types.d.mts.map +1 -1
- package/esm/database/utils.d.mts +4 -5
- package/esm/database/utils.d.mts.map +1 -1
- package/esm/dev-server/app-module-registry.mjs +1 -1
- package/esm/dev-server/create-worker.mjs +5 -3
- package/esm/dev-server/create-worker.mjs.map +1 -1
- package/esm/dev-server/dependency-graph.d.mts +1 -3
- package/esm/dev-server/dependency-graph.d.mts.map +1 -1
- package/esm/dev-server/dependency-graph.mjs +1 -1
- package/esm/dev-server/dependency-graph.mjs.map +1 -1
- package/esm/dev-server/extract-translation-keys.mjs +16 -17
- package/esm/dev-server/extract-translation-keys.mjs.map +1 -1
- package/esm/dev-server/file-manager.d.mts +3 -7
- package/esm/dev-server/file-manager.d.mts.map +1 -1
- package/esm/dev-server/file-operations.d.mts +1 -3
- package/esm/dev-server/file-operations.d.mts.map +1 -1
- package/esm/dev-server/files-watcher.mjs +12 -11
- package/esm/dev-server/files-watcher.mjs.map +1 -1
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.mjs +36 -115
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.mjs.map +1 -1
- package/esm/dev-server/health-checker/file-health-checker.contract.d.mts +5 -5
- package/esm/dev-server/health-checker/file-health-checker.contract.d.mts.map +1 -1
- package/esm/dev-server/health-checker/file-health-result.d.mts +2 -2
- package/esm/dev-server/health-checker/file-health-result.d.mts.map +1 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs +1 -0
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs.map +1 -1
- package/esm/dev-server/health-checker/oxlint-runner.mjs +6 -5
- package/esm/dev-server/health-checker/oxlint-runner.mjs.map +1 -1
- package/esm/dev-server/health-checker/workers/eslint-health.worker.d.mts +1 -1
- package/esm/dev-server/health-checker/workers/oxlint-health.worker.d.mts +1 -1
- package/esm/dev-server/health-checker/workers/ts-health.worker.d.mts +1 -1
- package/esm/dev-server/health-checker/workers/ts-health.worker.mjs +40 -174
- package/esm/dev-server/health-checker/workers/ts-health.worker.mjs.map +1 -1
- package/esm/dev-server/loader/hook-thread.d.mts +4 -8
- package/esm/dev-server/loader/hook-thread.d.mts.map +1 -1
- package/esm/dev-server/loader/load-hook.d.mts +10 -6
- package/esm/dev-server/loader/load-hook.d.mts.map +1 -1
- package/esm/dev-server/loader/load-hook.mjs +4 -3
- package/esm/dev-server/loader/load-hook.mjs.map +1 -1
- package/esm/dev-server/loader/own-resolver.mjs +1 -1
- package/esm/dev-server/loader/register-loader.mjs +3 -2
- package/esm/dev-server/loader/register-loader.mjs.map +1 -1
- package/esm/dev-server/loader/resolve-hook.d.mts +2 -2
- package/esm/dev-server/loader/resolve-hook.d.mts.map +1 -1
- package/esm/dev-server/loader/resolve-hook.mjs +2 -1
- package/esm/dev-server/loader/resolve-hook.mjs.map +1 -1
- package/esm/dev-server/loader/transpile-cache.mjs +2 -1
- package/esm/dev-server/loader/transpile-cache.mjs.map +1 -1
- package/esm/dev-server/manifest-manager.d.mts +1 -3
- package/esm/dev-server/manifest-manager.d.mts.map +1 -1
- package/esm/dev-server/model-module-registry.mjs +3 -3
- package/esm/dev-server/model-module-registry.mjs.map +1 -1
- package/esm/dev-server/model-resource-typings.mjs +40 -47
- package/esm/dev-server/model-resource-typings.mjs.map +1 -1
- package/esm/dev-server/module-loader.mjs +2 -2
- package/esm/dev-server/module-loader.mjs.map +1 -1
- package/esm/dev-server/package-json-manager.mjs +1 -1
- package/esm/dev-server/parse-imports.mjs +6 -38
- package/esm/dev-server/parse-imports.mjs.map +1 -1
- package/esm/dev-server/read-config-ast.mjs +3 -33
- package/esm/dev-server/read-config-ast.mjs.map +1 -1
- package/esm/dev-server/ready-block.mjs +1 -1
- package/esm/dev-server/shortcuts.mjs +1 -1
- package/esm/dev-server/special-files-collector.d.mts +2 -4
- package/esm/dev-server/special-files-collector.d.mts.map +1 -1
- package/esm/dev-server/supervisor.mjs +1 -1
- package/esm/dev-server/tsconfig-manager.mjs +3 -3
- package/esm/dev-server/tsconfig-manager.mjs.map +1 -1
- package/esm/dev-server/type-generator.mjs +28 -35
- package/esm/dev-server/type-generator.mjs.map +1 -1
- package/esm/dev-server/types.d.mts +3 -4
- package/esm/dev-server/types.d.mts.map +1 -1
- package/esm/dev-server/update-check-cache.mjs +2 -2
- package/esm/dev-server/update-check-cache.mjs.map +1 -1
- package/esm/encryption/encrypt.d.mts +2 -3
- package/esm/encryption/encrypt.d.mts.map +1 -1
- package/esm/encryption/hash.d.mts +1 -2
- package/esm/encryption/hash.d.mts.map +1 -1
- package/esm/encryption/index.mjs +1 -1
- package/esm/encryption/password.d.mts +2 -3
- package/esm/encryption/password.d.mts.map +1 -1
- package/esm/encryption/types.d.mts +2 -3
- package/esm/encryption/types.d.mts.map +1 -1
- package/esm/errors/error-codes.d.mts +29 -22
- package/esm/errors/error-codes.d.mts.map +1 -1
- package/esm/errors/warlock-error.d.mts +1 -3
- package/esm/errors/warlock-error.d.mts.map +1 -1
- package/esm/generations/add-command.action.mjs +3 -2
- package/esm/generations/add-command.action.mjs.map +1 -1
- package/esm/generations/features/bull-board.feature.mjs +2 -1
- package/esm/generations/features/bull-board.feature.mjs.map +1 -1
- package/esm/generations/features/notifications.feature.mjs +2 -1
- package/esm/generations/features/notifications.feature.mjs.map +1 -1
- package/esm/generations/features/shared/merge-web-sitemap-config.mjs +16 -23
- package/esm/generations/features/shared/merge-web-sitemap-config.mjs.map +1 -1
- package/esm/generations/features/shared/patch-tsconfig-include.mjs +1 -1
- package/esm/generations/features/shared/relocate-conflicting-home-route.mjs +1 -1
- package/esm/generations/features/sitemap.feature.mjs +2 -1
- package/esm/generations/features/sitemap.feature.mjs.map +1 -1
- package/esm/generations/generation-fs.mjs +1 -1
- package/esm/generations/generation-run.mjs +1 -1
- package/esm/generations/stubs.mjs +1 -1
- package/esm/generations/stubs.mjs.map +1 -1
- package/esm/http/boot-port-preflight.d.mts +4 -5
- package/esm/http/boot-port-preflight.d.mts.map +1 -1
- package/esm/http/boot-port-preflight.mjs +2 -2
- package/esm/http/boot-port-preflight.mjs.map +1 -1
- package/esm/http/bounded-stream-queue.d.mts +4 -4
- package/esm/http/bounded-stream-queue.d.mts.map +1 -1
- package/esm/http/bounded-stream-queue.mjs +1 -1
- package/esm/http/bounded-stream-queue.mjs.map +1 -1
- package/esm/http/build-cors-options.mjs +2 -2
- package/esm/http/build-cors-options.mjs.map +1 -1
- package/esm/http/build-rate-limit-options.d.mts +2 -3
- package/esm/http/build-rate-limit-options.d.mts.map +1 -1
- package/esm/http/build-rate-limit-options.mjs +1 -1
- package/esm/http/build-rate-limit-options.mjs.map +1 -1
- package/esm/http/conditional-request.d.mts +14 -13
- package/esm/http/conditional-request.d.mts.map +1 -1
- package/esm/http/config.d.mts +2 -4
- package/esm/http/config.d.mts.map +1 -1
- package/esm/http/config.mjs +2 -2
- package/esm/http/config.mjs.map +1 -1
- package/esm/http/context/request-context.d.mts +6 -7
- package/esm/http/context/request-context.d.mts.map +1 -1
- package/esm/http/context/request-memo.d.mts +1 -2
- package/esm/http/context/request-memo.d.mts.map +1 -1
- package/esm/http/createHttpApplication.d.mts +2 -3
- package/esm/http/createHttpApplication.d.mts.map +1 -1
- package/esm/http/createHttpApplication.mjs +2 -2
- package/esm/http/createHttpApplication.mjs.map +1 -1
- package/esm/http/csp.d.mts +10 -12
- package/esm/http/csp.d.mts.map +1 -1
- package/esm/http/csp.mjs +2 -2
- package/esm/http/csp.mjs.map +1 -1
- package/esm/http/csrf-default-guard.d.mts +2 -4
- package/esm/http/csrf-default-guard.d.mts.map +1 -1
- package/esm/http/csrf-default-guard.mjs +1 -1
- package/esm/http/csrf-default-guard.mjs.map +1 -1
- package/esm/http/csrf-origin-policy.d.mts +7 -9
- package/esm/http/csrf-origin-policy.d.mts.map +1 -1
- package/esm/http/csrf-origin-policy.mjs +2 -2
- package/esm/http/csrf-origin-policy.mjs.map +1 -1
- package/esm/http/database/RequestLog.d.mts +2 -3
- package/esm/http/database/RequestLog.d.mts.map +1 -1
- package/esm/http/error-codes.d.mts +1 -2
- package/esm/http/error-codes.d.mts.map +1 -1
- package/esm/http/error-mapper.d.mts +2 -4
- package/esm/http/error-mapper.d.mts.map +1 -1
- package/esm/http/error-mapper.mjs +2 -2
- package/esm/http/error-mapper.mjs.map +1 -1
- package/esm/http/errors/errors.d.mts +28 -29
- package/esm/http/errors/errors.d.mts.map +1 -1
- package/esm/http/escape-header-value.d.mts +1 -2
- package/esm/http/escape-header-value.d.mts.map +1 -1
- package/esm/http/events.d.mts +2 -4
- package/esm/http/events.d.mts.map +1 -1
- package/esm/http/health.d.mts +4 -4
- package/esm/http/health.d.mts.map +1 -1
- package/esm/http/index.d.mts +4 -1
- package/esm/http/index.mjs +1 -1
- package/esm/http/middleware/cache-response-middleware.d.mts +2 -4
- package/esm/http/middleware/cache-response-middleware.d.mts.map +1 -1
- package/esm/http/middleware/concurrency-limit.middleware.d.mts +3 -3
- package/esm/http/middleware/concurrency-limit.middleware.d.mts.map +1 -1
- package/esm/http/middleware/idempotency.middleware.d.mts +3 -3
- package/esm/http/middleware/idempotency.middleware.d.mts.map +1 -1
- package/esm/http/middleware/idempotency.middleware.mjs +6 -6
- package/esm/http/middleware/idempotency.middleware.mjs.map +1 -1
- package/esm/http/middleware/index.d.mts +3 -1
- package/esm/http/middleware/index.mjs +1 -1
- package/esm/http/middleware/inject-request-context.d.mts +2 -4
- package/esm/http/middleware/inject-request-context.d.mts.map +1 -1
- package/esm/http/middleware/inject-request-context.mjs +3 -3
- package/esm/http/middleware/inject-request-context.mjs.map +1 -1
- package/esm/http/middleware/ip-filter.middleware.d.mts +3 -3
- package/esm/http/middleware/ip-filter.middleware.d.mts.map +1 -1
- package/esm/http/middleware/maintenance.middleware.d.mts +3 -3
- package/esm/http/middleware/maintenance.middleware.d.mts.map +1 -1
- package/esm/http/middleware/maintenance.middleware.mjs +4 -4
- package/esm/http/middleware/maintenance.middleware.mjs.map +1 -1
- package/esm/http/middleware/max-body-size.middleware.d.mts +2 -2
- package/esm/http/middleware/max-body-size.middleware.d.mts.map +1 -1
- package/esm/http/middleware/middleware-list.d.mts +1 -3
- package/esm/http/middleware/middleware-list.d.mts.map +1 -1
- package/esm/http/middleware/rate-limit.middleware.d.mts +3 -3
- package/esm/http/middleware/rate-limit.middleware.d.mts.map +1 -1
- package/esm/http/middleware/rate-limit.middleware.mjs +2 -2
- package/esm/http/middleware/rate-limit.middleware.mjs.map +1 -1
- package/esm/http/middleware/utils/cidr-match.d.mts +2 -3
- package/esm/http/middleware/utils/cidr-match.d.mts.map +1 -1
- package/esm/http/middleware/utils/idempotency-key.d.mts +3 -5
- package/esm/http/middleware/utils/idempotency-key.d.mts.map +1 -1
- package/esm/http/middleware/utils/index.d.mts +2 -1
- package/esm/http/middleware/utils/parse-size.d.mts +1 -2
- package/esm/http/middleware/utils/parse-size.d.mts.map +1 -1
- package/esm/http/middleware/utils/parse-size.mjs +2 -2
- package/esm/http/middleware/utils/parse-size.mjs.map +1 -1
- package/esm/http/plugins.d.mts +2 -4
- package/esm/http/plugins.d.mts.map +1 -1
- package/esm/http/plugins.mjs +10 -10
- package/esm/http/plugins.mjs.map +1 -1
- package/esm/http/port-preflight.d.mts +3 -4
- package/esm/http/port-preflight.d.mts.map +1 -1
- package/esm/http/rate-limit-cache-store.mjs +4 -3
- package/esm/http/rate-limit-cache-store.mjs.map +1 -1
- package/esm/http/ready-report.d.mts +15 -10
- package/esm/http/ready-report.d.mts.map +1 -1
- package/esm/http/request-controller.d.mts +1 -3
- package/esm/http/request-controller.d.mts.map +1 -1
- package/esm/http/request-log-snapshot.d.mts +20 -16
- package/esm/http/request-log-snapshot.d.mts.map +1 -1
- package/esm/http/request-log-snapshot.mjs +3 -3
- package/esm/http/request-log-snapshot.mjs.map +1 -1
- package/esm/http/request.d.mts +8 -7
- package/esm/http/request.d.mts.map +1 -1
- package/esm/http/request.mjs +8 -7
- package/esm/http/request.mjs.map +1 -1
- package/esm/http/response.d.mts +12 -11
- package/esm/http/response.d.mts.map +1 -1
- package/esm/http/response.mjs +7 -7
- package/esm/http/response.mjs.map +1 -1
- package/esm/http/safe-redirect.d.mts +3 -4
- package/esm/http/safe-redirect.d.mts.map +1 -1
- package/esm/http/serialized.d.mts +12 -13
- package/esm/http/serialized.d.mts.map +1 -1
- package/esm/http/server-rebuilt.d.mts +3 -5
- package/esm/http/server-rebuilt.d.mts.map +1 -1
- package/esm/http/server.d.mts +9 -9
- package/esm/http/server.d.mts.map +1 -1
- package/esm/http/server.mjs +4 -4
- package/esm/http/server.mjs.map +1 -1
- package/esm/http/stream-react-response.d.mts +7 -7
- package/esm/http/stream-react-response.d.mts.map +1 -1
- package/esm/http/tracing/index.mjs +1 -1
- package/esm/http/tracing/trace-id.d.mts +2 -3
- package/esm/http/tracing/trace-id.d.mts.map +1 -1
- package/esm/http/tracing/tracing-dispatcher.d.mts +10 -11
- package/esm/http/tracing/tracing-dispatcher.d.mts.map +1 -1
- package/esm/http/tracing/tracing-dispatcher.mjs +2 -2
- package/esm/http/tracing/tracing-dispatcher.mjs.map +1 -1
- package/esm/http/tracing/tracing.type.d.mts +11 -9
- package/esm/http/tracing/tracing.type.d.mts.map +1 -1
- package/esm/http/types.d.mts +49 -43
- package/esm/http/types.d.mts.map +1 -1
- package/esm/http/uploaded-file.d.mts +6 -5
- package/esm/http/uploaded-file.d.mts.map +1 -1
- package/esm/http/uploads/generate-image-variants.d.mts +6 -6
- package/esm/http/uploads/generate-image-variants.d.mts.map +1 -1
- package/esm/http/uploads/generate-image-variants.mjs +1 -1
- package/esm/http/uploads/generate-image-variants.mjs.map +1 -1
- package/esm/http/uploads/image-variant-cache-entries.mjs +1 -1
- package/esm/http/uploads/image-variant-cache.mjs +8 -8
- package/esm/http/uploads/image-variant-cache.mjs.map +1 -1
- package/esm/http/uploads/image-variant-types.d.mts +7 -9
- package/esm/http/uploads/image-variant-types.d.mts.map +1 -1
- package/esm/http/uploads/image-variants-config-error.d.mts +1 -2
- package/esm/http/uploads/image-variants-config-error.d.mts.map +1 -1
- package/esm/http/uploads/index.d.mts +2 -1
- package/esm/http/uploads/index.mjs +1 -1
- package/esm/http/uploads/parse-uploaded-file-query.mjs +1 -1
- package/esm/http/uploads/parse-uploaded-file-query.mjs.map +1 -1
- package/esm/http/uploads/purge-image-variants.d.mts +2 -4
- package/esm/http/uploads/purge-image-variants.d.mts.map +1 -1
- package/esm/http/uploads/resolve-image-variant.d.mts +3 -5
- package/esm/http/uploads/resolve-image-variant.d.mts.map +1 -1
- package/esm/http/uploads/resolve-image-variants-config.mjs +4 -4
- package/esm/http/uploads/resolve-image-variants-config.mjs.map +1 -1
- package/esm/http/uploads/resolve-original-content-type.mjs +1 -1
- package/esm/http/uploads/resolve-original-content-type.mjs.map +1 -1
- package/esm/http/uploads/trim-image-variant-cache.mjs +3 -3
- package/esm/http/uploads/trim-image-variant-cache.mjs.map +1 -1
- package/esm/http/uploads/uploaded-file.controller.d.mts +6 -5
- package/esm/http/uploads/uploaded-file.controller.d.mts.map +1 -1
- package/esm/http/uploads/uploaded-file.controller.mjs +2 -1
- 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-config.d.mts +2 -4
- package/esm/http/uploads-config.d.mts.map +1 -1
- package/esm/http/uploads-types.d.mts +19 -17
- package/esm/http/uploads-types.d.mts.map +1 -1
- package/esm/http/xmlable.d.mts +1 -2
- package/esm/http/xmlable.d.mts.map +1 -1
- package/esm/image/image.d.mts +6 -7
- package/esm/image/image.d.mts.map +1 -1
- package/esm/image/image.mjs.map +1 -1
- package/esm/image/index.d.mts +2 -1
- package/esm/image/index.mjs +1 -1
- package/esm/index.d.mts +21 -0
- package/esm/loader/app-module-importer.d.mts +1 -2
- package/esm/loader/app-module-importer.d.mts.map +1 -1
- package/esm/localization/index.mjs +1 -1
- package/esm/localization/parse-locale-dictionary.d.mts +4 -5
- package/esm/localization/parse-locale-dictionary.d.mts.map +1 -1
- package/esm/localization/parse-locale-dictionary.mjs +1 -1
- package/esm/localization/parse-locale-dictionary.mjs.map +1 -1
- package/esm/localization/register-locale-dictionary.d.mts +3 -4
- package/esm/localization/register-locale-dictionary.d.mts.map +1 -1
- package/esm/localization/register-locale-dictionary.mjs +2 -2
- package/esm/localization/register-locale-dictionary.mjs.map +1 -1
- package/esm/logger/fatal-visibility.d.mts +1 -2
- package/esm/logger/fatal-visibility.d.mts.map +1 -1
- package/esm/logger/index.d.mts +2 -1
- package/esm/logger/index.mjs +1 -1
- package/esm/logger/logger.d.mts +1 -3
- package/esm/logger/logger.d.mts.map +1 -1
- package/esm/logger/types.d.mts +2 -3
- package/esm/logger/types.d.mts.map +1 -1
- package/esm/mail/config.d.mts +12 -14
- package/esm/mail/config.d.mts.map +1 -1
- package/esm/mail/events.d.mts +4 -6
- package/esm/mail/events.d.mts.map +1 -1
- package/esm/mail/index.d.mts +2 -1
- package/esm/mail/index.mjs +1 -1
- package/esm/mail/mail.d.mts +1 -3
- package/esm/mail/mail.d.mts.map +1 -1
- package/esm/mail/mailer-pool.d.mts +5 -7
- package/esm/mail/mailer-pool.d.mts.map +1 -1
- package/esm/mail/react-mail.d.mts +1 -3
- package/esm/mail/react-mail.d.mts.map +1 -1
- package/esm/mail/send-mail.d.mts +1 -3
- package/esm/mail/send-mail.d.mts.map +1 -1
- package/esm/mail/send-mail.mjs +2 -1
- package/esm/mail/send-mail.mjs.map +1 -1
- package/esm/mail/test-mailbox.d.mts +11 -13
- package/esm/mail/test-mailbox.d.mts.map +1 -1
- package/esm/mail/types.d.mts +17 -18
- package/esm/mail/types.d.mts.map +1 -1
- package/esm/manifest/manifest-manager.mjs +1 -1
- package/esm/openapi/build-openapi-document.d.mts +2 -4
- package/esm/openapi/build-openapi-document.d.mts.map +1 -1
- package/esm/openapi/cast-schema.mjs +1 -1
- package/esm/openapi/development-openapi-provider.d.mts +5 -6
- package/esm/openapi/development-openapi-provider.d.mts.map +1 -1
- package/esm/openapi/index.d.mts +3 -1
- package/esm/openapi/index.mjs +1 -1
- package/esm/openapi/openapi-child-output.mjs +2 -2
- package/esm/openapi/openapi-child-output.mjs.map +1 -1
- package/esm/openapi/postman/build-request-url.mjs +1 -1
- package/esm/openapi/postman/example-from-schema.d.mts +1 -3
- package/esm/openapi/postman/example-from-schema.d.mts.map +1 -1
- package/esm/openapi/postman/index.d.mts +2 -1
- package/esm/openapi/postman/openapi-to-postman-collection.d.mts +3 -5
- package/esm/openapi/postman/openapi-to-postman-collection.d.mts.map +1 -1
- package/esm/openapi/postman/postman-types.d.mts +19 -18
- package/esm/openapi/postman/postman-types.d.mts.map +1 -1
- package/esm/openapi/postman/schema-refs.d.mts +1 -3
- package/esm/openapi/postman/schema-refs.d.mts.map +1 -1
- package/esm/openapi/postman/uuid-v5.mjs +1 -1
- package/esm/openapi/schema-registry.d.mts +1 -1
- package/esm/openapi/security.mjs +1 -1
- package/esm/openapi/types.d.mts +23 -21
- package/esm/openapi/types.d.mts.map +1 -1
- package/esm/production/assert-generated-imports.mjs +1 -1
- package/esm/production/build-contributions.mjs +1 -1
- package/esm/production/bundle-framework-dependencies.mjs +1 -1
- package/esm/production/dist-build-manifest.mjs +1 -1
- package/esm/production/esbuild-plugins.mjs.map +1 -1
- package/esm/production/esbuild-preflight.mjs +1 -1
- package/esm/production/production-builder.mjs +2 -1
- package/esm/production/production-builder.mjs.map +1 -1
- package/esm/production/production-supervisor.mjs +1 -1
- package/esm/production/registration-child-runner.mjs +4 -3
- package/esm/production/registration-child-runner.mjs.map +1 -1
- package/esm/production/resolve-build-config.d.mts +4 -4
- package/esm/production/resolve-build-config.d.mts.map +1 -1
- package/esm/production/resolve-build-config.mjs +1 -1
- package/esm/production/route-registration-child.d.mts +1 -1
- package/esm/production/route-registration-child.mjs +8 -7
- package/esm/production/route-registration-child.mjs.map +1 -1
- package/esm/production/tsconfig-path-aliases.mjs +1 -1
- package/esm/react/index.d.mts +1 -3
- package/esm/react/index.d.mts.map +1 -1
- package/esm/react/index.mjs.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.d.mts +3 -4
- package/esm/repositories/adapters/cascade/cascade-adapter.d.mts.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.mts +2 -3
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.mts.map +1 -1
- package/esm/repositories/adapters/cascade/filter-applicator.mjs +10 -9
- package/esm/repositories/adapters/cascade/filter-applicator.mjs.map +1 -1
- package/esm/repositories/adapters/cascade/index.d.mts +2 -1
- package/esm/repositories/adapters/cascade/index.mjs +1 -1
- package/esm/repositories/contracts/index.d.mts +2 -1
- package/esm/repositories/contracts/query-builder.contract.d.mts +4 -6
- package/esm/repositories/contracts/query-builder.contract.d.mts.map +1 -1
- package/esm/repositories/contracts/repository-adapter.contract.d.mts +1 -3
- package/esm/repositories/contracts/repository-adapter.contract.d.mts.map +1 -1
- package/esm/repositories/contracts/types.d.mts +23 -25
- package/esm/repositories/contracts/types.d.mts.map +1 -1
- package/esm/repositories/index.d.mts +4 -1
- package/esm/repositories/index.mjs +1 -1
- package/esm/repositories/repository.manager.d.mts +2 -3
- package/esm/repositories/repository.manager.d.mts.map +1 -1
- package/esm/repositories/repository.manager.mjs +2 -2
- package/esm/repositories/repository.manager.mjs.map +1 -1
- package/esm/resource/define-resource.d.mts +3 -5
- package/esm/resource/define-resource.d.mts.map +1 -1
- package/esm/resource/index.d.mts +2 -1
- package/esm/resource/index.mjs +1 -1
- package/esm/resource/nullable-resource.d.mts +5 -7
- package/esm/resource/nullable-resource.d.mts.map +1 -1
- package/esm/resource/register-resource.d.mts +1 -3
- package/esm/resource/register-resource.d.mts.map +1 -1
- package/esm/resource/resource-field-builder.d.mts +1 -3
- package/esm/resource/resource-field-builder.d.mts.map +1 -1
- package/esm/resource/resource.d.mts +3 -5
- package/esm/resource/resource.d.mts.map +1 -1
- package/esm/resource/resource.mjs +4 -2
- package/esm/resource/resource.mjs.map +1 -1
- package/esm/resource/types.d.mts +21 -21
- package/esm/resource/types.d.mts.map +1 -1
- package/esm/restful/index.d.mts +2 -1
- package/esm/restful/index.mjs +1 -1
- package/esm/restful/restful.d.mts +12 -32
- package/esm/restful/restful.d.mts.map +1 -1
- package/esm/router/index.d.mts +2 -1
- package/esm/router/index.mjs +1 -1
- package/esm/router/named-api-routes-with-responses.mjs +2 -1
- package/esm/router/named-api-routes-with-responses.mjs.map +1 -1
- package/esm/router/normalize-request-path.d.mts +1 -2
- package/esm/router/normalize-request-path.d.mts.map +1 -1
- package/esm/router/normalize-route-path.d.mts +1 -2
- package/esm/router/normalize-route-path.d.mts.map +1 -1
- package/esm/router/positional-handler-diagnostics.d.mts +15 -13
- package/esm/router/positional-handler-diagnostics.d.mts.map +1 -1
- package/esm/router/resolve-route-rate-limit.mjs +3 -3
- package/esm/router/resolve-route-rate-limit.mjs.map +1 -1
- package/esm/router/route-builder.d.mts +1 -3
- package/esm/router/route-builder.d.mts.map +1 -1
- package/esm/router/route-guard-names.mjs +1 -1
- package/esm/router/route-guard-names.mjs.map +1 -1
- package/esm/router/route-name-method-suffix.d.mts +2 -3
- package/esm/router/route-name-method-suffix.d.mts.map +1 -1
- package/esm/router/route-name-taken-error.d.mts +1 -3
- package/esm/router/route-name-taken-error.d.mts.map +1 -1
- package/esm/router/route-registry.d.mts +1 -3
- package/esm/router/route-registry.d.mts.map +1 -1
- package/esm/router/router.d.mts +2 -4
- package/esm/router/router.d.mts.map +1 -1
- package/esm/router/router.mjs +8 -6
- package/esm/router/router.mjs.map +1 -1
- package/esm/router/types.d.mts +25 -26
- package/esm/router/types.d.mts.map +1 -1
- package/esm/router/unguarded-route-diagnostics.d.mts +6 -8
- package/esm/router/unguarded-route-diagnostics.d.mts.map +1 -1
- package/esm/socket/index.d.mts +2 -1
- package/esm/socket/index.mjs +1 -1
- package/esm/socket/types.d.mts +2 -4
- package/esm/socket/types.d.mts.map +1 -1
- package/esm/socket/utils.d.mts +1 -3
- package/esm/socket/utils.d.mts.map +1 -1
- package/esm/storage/config.d.mts +4 -6
- package/esm/storage/config.d.mts.map +1 -1
- package/esm/storage/context/storage-driver-context.d.mts +3 -4
- package/esm/storage/context/storage-driver-context.d.mts.map +1 -1
- package/esm/storage/drivers/cloud-driver.d.mts +2 -4
- package/esm/storage/drivers/cloud-driver.d.mts.map +1 -1
- package/esm/storage/drivers/cloud-driver.mjs.map +1 -1
- package/esm/storage/drivers/do-spaces-driver.d.mts +1 -3
- package/esm/storage/drivers/do-spaces-driver.d.mts.map +1 -1
- package/esm/storage/drivers/local-driver.d.mts +2 -3
- package/esm/storage/drivers/local-driver.d.mts.map +1 -1
- package/esm/storage/drivers/local-driver.mjs +8 -3
- package/esm/storage/drivers/local-driver.mjs.map +1 -1
- package/esm/storage/drivers/r2-driver.d.mts +1 -3
- package/esm/storage/drivers/r2-driver.d.mts.map +1 -1
- package/esm/storage/drivers/s3-driver.d.mts +1 -3
- package/esm/storage/drivers/s3-driver.d.mts.map +1 -1
- package/esm/storage/index.d.mts +2 -1
- package/esm/storage/index.mjs +1 -1
- package/esm/storage/local-disk-roots.mjs +2 -2
- package/esm/storage/local-disk-roots.mjs.map +1 -1
- package/esm/storage/scoped-storage.d.mts +2 -3
- package/esm/storage/scoped-storage.d.mts.map +1 -1
- package/esm/storage/storage-file.d.mts +1 -3
- package/esm/storage/storage-file.d.mts.map +1 -1
- package/esm/storage/storage.d.mts +3 -4
- package/esm/storage/storage.d.mts.map +1 -1
- package/esm/storage/types.d.mts +36 -36
- package/esm/storage/types.d.mts.map +1 -1
- package/esm/storage/utils/classify-ip-address.d.mts +1 -2
- package/esm/storage/utils/classify-ip-address.d.mts.map +1 -1
- package/esm/storage/utils/contain-path.d.mts +1 -2
- package/esm/storage/utils/contain-path.d.mts.map +1 -1
- package/esm/storage/utils/mime.d.mts +2 -3
- package/esm/storage/utils/mime.d.mts.map +1 -1
- package/esm/storage/utils/safe-fetch.d.mts +6 -6
- package/esm/storage/utils/safe-fetch.d.mts.map +1 -1
- package/esm/storage/utils/safe-fetch.mjs +3 -3
- package/esm/storage/utils/safe-fetch.mjs.map +1 -1
- package/esm/storage/utils/storage-capability-error.d.mts +1 -3
- package/esm/storage/utils/storage-capability-error.d.mts.map +1 -1
- package/esm/storage/utils/storage-error.d.mts +2 -3
- package/esm/storage/utils/storage-error.d.mts.map +1 -1
- package/esm/storage/utils/storage-not-initialized-error.d.mts +1 -2
- package/esm/storage/utils/storage-not-initialized-error.d.mts.map +1 -1
- package/esm/tests/authenticated-test-client.d.mts +5 -6
- package/esm/tests/authenticated-test-client.d.mts.map +1 -1
- package/esm/tests/factories.d.mts +38 -23
- package/esm/tests/factories.d.mts.map +1 -1
- package/esm/tests/fakes/cache-fake.d.mts +14 -9
- package/esm/tests/fakes/cache-fake.d.mts.map +1 -1
- package/esm/tests/fakes/clock-fake.d.mts +13 -8
- package/esm/tests/fakes/clock-fake.d.mts.map +1 -1
- package/esm/tests/fakes/fake-assertion-error.d.mts +2 -3
- package/esm/tests/fakes/fake-assertion-error.d.mts.map +1 -1
- package/esm/tests/fakes/ids-fake.d.mts +5 -4
- package/esm/tests/fakes/ids-fake.d.mts.map +1 -1
- package/esm/tests/fakes/index.d.mts +2 -1
- package/esm/tests/fakes/index.mjs +1 -1
- package/esm/tests/fakes/mail-fake.d.mts +21 -13
- package/esm/tests/fakes/mail-fake.d.mts.map +1 -1
- package/esm/tests/fakes/queue-fake.d.mts +21 -13
- package/esm/tests/fakes/queue-fake.d.mts.map +1 -1
- package/esm/tests/fakes/storage-fake.d.mts +12 -8
- package/esm/tests/fakes/storage-fake.d.mts.map +1 -1
- package/esm/tests/fakes/storage-fake.mjs +1 -1
- package/esm/tests/fakes/test-fakes.d.mts +8 -9
- package/esm/tests/fakes/test-fakes.d.mts.map +1 -1
- package/esm/tests/fakes/test-fakes.mjs +1 -1
- package/esm/tests/fakes/test-fakes.mjs.map +1 -1
- package/esm/tests/index.d.mts +1 -0
- package/esm/tests/snapshot-response.d.mts +4 -5
- package/esm/tests/snapshot-response.d.mts.map +1 -1
- package/esm/tests/start-http-development-server.d.mts +4 -6
- package/esm/tests/start-http-development-server.d.mts.map +1 -1
- package/esm/tests/start-http-development-server.mjs +5 -5
- package/esm/tests/start-http-development-server.mjs.map +1 -1
- package/esm/tests/test-connectors-selection.d.mts +2 -2
- package/esm/tests/test-connectors-selection.d.mts.map +1 -1
- package/esm/tests/test-connectors-selection.mjs +1 -1
- package/esm/tests/test-helpers.d.mts +11 -12
- package/esm/tests/test-helpers.d.mts.map +1 -1
- package/esm/tests/test-http-server.d.mts +14 -10
- package/esm/tests/test-http-server.d.mts.map +1 -1
- package/esm/tests/test-lifecycle-state.mjs +1 -1
- package/esm/tests/vitest-setup.d.mts +6 -7
- package/esm/tests/vitest-setup.d.mts.map +1 -1
- package/esm/tooling/agents-md/agents-md-markers.d.mts +4 -5
- package/esm/tooling/agents-md/agents-md-markers.d.mts.map +1 -1
- package/esm/tooling/agents-md/agents-md-markers.mjs +2 -1
- package/esm/tooling/agents-md/agents-md-markers.mjs.map +1 -1
- package/esm/tooling/agents-md/agents-md-refresher.d.mts +19 -12
- package/esm/tooling/agents-md/agents-md-refresher.d.mts.map +1 -1
- package/esm/tooling/agents-md/installed-skills.d.mts +13 -9
- package/esm/tooling/agents-md/installed-skills.d.mts.map +1 -1
- package/esm/tooling/agents-md/render-agents-md.d.mts +8 -7
- package/esm/tooling/agents-md/render-agents-md.d.mts.map +1 -1
- package/esm/tooling/agents-md/render-agents-md.mjs +2 -2
- package/esm/tooling/agents-md/render-agents-md.mjs.map +1 -1
- package/esm/tooling/agents-md/write-agents-md.d.mts +17 -12
- package/esm/tooling/agents-md/write-agents-md.d.mts.map +1 -1
- package/esm/tooling/board/board-message.d.mts +4 -6
- package/esm/tooling/board/board-message.d.mts.map +1 -1
- package/esm/tooling/board/board.d.mts +50 -38
- package/esm/tooling/board/board.d.mts.map +1 -1
- package/esm/tooling/board/board.mjs +4 -3
- package/esm/tooling/board/board.mjs.map +1 -1
- package/esm/tooling/board/board.types.d.mts +32 -23
- package/esm/tooling/board/board.types.d.mts.map +1 -1
- package/esm/tooling/check/changed-files.d.mts +4 -6
- package/esm/tooling/check/changed-files.d.mts.map +1 -1
- package/esm/tooling/check/changed-files.mjs +2 -2
- package/esm/tooling/check/changed-files.mjs.map +1 -1
- package/esm/tooling/check/check-report.types.d.mts +22 -17
- package/esm/tooling/check/check-report.types.d.mts.map +1 -1
- package/esm/tooling/check/code-style-conventions.mjs +25 -25
- package/esm/tooling/check/code-style-conventions.mjs.map +1 -1
- package/esm/tooling/check/conventions-step.d.mts +4 -6
- package/esm/tooling/check/conventions-step.d.mts.map +1 -1
- package/esm/tooling/check/conventions-step.mjs +7 -18
- package/esm/tooling/check/conventions-step.mjs.map +1 -1
- package/esm/tooling/check/environment-step.d.mts +2 -4
- package/esm/tooling/check/environment-step.d.mts.map +1 -1
- package/esm/tooling/check/environment-step.mjs +1 -1
- package/esm/tooling/check/index.mjs +1 -1
- package/esm/tooling/check/lint-step.d.mts +4 -5
- package/esm/tooling/check/lint-step.d.mts.map +1 -1
- package/esm/tooling/check/lint-step.mjs +2 -1
- package/esm/tooling/check/lint-step.mjs.map +1 -1
- package/esm/tooling/check/request-input.mjs +15 -15
- package/esm/tooling/check/request-input.mjs.map +1 -1
- package/esm/tooling/check/run-check.d.mts +22 -14
- package/esm/tooling/check/run-check.d.mts.map +1 -1
- package/esm/tooling/check/run-tests.d.mts +22 -15
- package/esm/tooling/check/run-tests.d.mts.map +1 -1
- package/esm/tooling/check/security-conventions.mjs +133 -131
- package/esm/tooling/check/security-conventions.mjs.map +1 -1
- package/esm/tooling/check/source-ast.mjs +92 -132
- package/esm/tooling/check/source-ast.mjs.map +1 -1
- package/esm/tooling/check/tests-step.d.mts +7 -8
- package/esm/tooling/check/tests-step.d.mts.map +1 -1
- package/esm/tooling/check/tests-step.mjs +3 -3
- package/esm/tooling/check/tests-step.mjs.map +1 -1
- package/esm/tooling/dev-state/dev-server-state.d.mts +17 -13
- package/esm/tooling/dev-state/dev-server-state.d.mts.map +1 -1
- package/esm/tooling/devtools/devtools-client.d.mts +29 -20
- package/esm/tooling/devtools/devtools-client.d.mts.map +1 -1
- package/esm/tooling/generate/generation.d.mts +34 -22
- package/esm/tooling/generate/generation.d.mts.map +1 -1
- package/esm/tooling/generate/generation.mjs +9 -5
- package/esm/tooling/generate/generation.mjs.map +1 -1
- package/esm/tooling/generate/generator-spec.d.mts +9 -9
- package/esm/tooling/generate/generator-spec.d.mts.map +1 -1
- package/esm/tooling/generate/index.mjs +1 -1
- package/esm/tooling/generate/project-files.mjs +3 -3
- package/esm/tooling/generate/project-files.mjs.map +1 -1
- package/esm/tooling/generate/run-cli.d.mts +14 -11
- package/esm/tooling/generate/run-cli.d.mts.map +1 -1
- package/esm/tooling/generate/run-cli.mjs +2 -2
- package/esm/tooling/generate/run-cli.mjs.map +1 -1
- package/esm/tooling/generate/unified-diff.d.mts +10 -7
- package/esm/tooling/generate/unified-diff.d.mts.map +1 -1
- package/esm/tooling/index.d.mts +1 -0
- package/esm/tooling/inspect/boot-for-inspect.d.mts +7 -7
- package/esm/tooling/inspect/boot-for-inspect.d.mts.map +1 -1
- package/esm/tooling/inspect/collect-config.mjs +3 -3
- package/esm/tooling/inspect/collect-config.mjs.map +1 -1
- package/esm/tooling/inspect/collect-models.d.mts +4 -3
- package/esm/tooling/inspect/collect-models.d.mts.map +1 -1
- package/esm/tooling/inspect/collect-models.mjs +1 -1
- package/esm/tooling/inspect/collect-packages.d.mts +1 -2
- package/esm/tooling/inspect/collect-packages.d.mts.map +1 -1
- package/esm/tooling/inspect/collect-pages.mjs +10 -10
- package/esm/tooling/inspect/collect-pages.mjs.map +1 -1
- package/esm/tooling/inspect/collect-routes.mjs +1 -1
- package/esm/tooling/inspect/event-recorder.d.mts +7 -7
- package/esm/tooling/inspect/event-recorder.d.mts.map +1 -1
- package/esm/tooling/inspect/index.d.mts +2 -1
- package/esm/tooling/inspect/index.mjs +1 -1
- package/esm/tooling/inspect/inspect-app.d.mts +25 -16
- package/esm/tooling/inspect/inspect-app.d.mts.map +1 -1
- package/esm/tooling/inspect/inspect-report.schema.d.mts +1 -2
- package/esm/tooling/inspect/inspect-report.schema.d.mts.map +1 -1
- package/esm/tooling/inspect/inspect-report.types.d.mts +86 -54
- package/esm/tooling/inspect/inspect-report.types.d.mts.map +1 -1
- package/esm/tooling/mcp/create-mcp-context.d.mts +11 -8
- package/esm/tooling/mcp/create-mcp-context.d.mts.map +1 -1
- package/esm/tooling/mcp/db-schema.d.mts +10 -9
- package/esm/tooling/mcp/db-schema.d.mts.map +1 -1
- package/esm/tooling/mcp/docs-search.d.mts +20 -15
- package/esm/tooling/mcp/docs-search.d.mts.map +1 -1
- package/esm/tooling/mcp/index.mjs +1 -1
- package/esm/tooling/mcp/load-ai-tools.d.mts +7 -8
- package/esm/tooling/mcp/load-ai-tools.d.mts.map +1 -1
- package/esm/tooling/mcp/load-ai-tools.mjs +2 -1
- package/esm/tooling/mcp/load-ai-tools.mjs.map +1 -1
- package/esm/tooling/mcp/mcp-tools.d.mts +29 -19
- package/esm/tooling/mcp/mcp-tools.d.mts.map +1 -1
- package/esm/tooling/mcp/mcp-tools.mjs +3 -2
- package/esm/tooling/mcp/mcp-tools.mjs.map +1 -1
- package/esm/tooling/mcp/start-mcp-server.d.mts +24 -17
- package/esm/tooling/mcp/start-mcp-server.d.mts.map +1 -1
- package/esm/tooling/mcp/start-mcp-server.mjs +1 -1
- package/esm/tooling/mcp/start-mcp-server.mjs.map +1 -1
- package/esm/tooling/mcp/tool-input.d.mts +7 -7
- package/esm/tooling/mcp/tool-input.d.mts.map +1 -1
- package/esm/tooling/problem.d.mts +27 -17
- package/esm/tooling/problem.d.mts.map +1 -1
- package/esm/tooling/syntax/ast.mjs +230 -0
- package/esm/tooling/syntax/ast.mjs.map +1 -0
- package/esm/tooling/syntax/imports.mjs +34 -0
- package/esm/tooling/syntax/imports.mjs.map +1 -0
- package/esm/tooling/trace/trace-report.types.d.mts +36 -22
- package/esm/tooling/trace/trace-report.types.d.mts.map +1 -1
- package/esm/tooling/trace/trace-request.d.mts +27 -20
- package/esm/tooling/trace/trace-request.d.mts.map +1 -1
- package/esm/tooling/trace/trace-request.mjs +2 -2
- package/esm/tooling/trace/trace-request.mjs.map +1 -1
- package/esm/tooling/typecheck/index.mjs +1 -1
- package/esm/tooling/typecheck/run-typecheck.d.mts +15 -48
- package/esm/tooling/typecheck/run-typecheck.d.mts.map +1 -1
- package/esm/tooling/typecheck/run-typecheck.mjs +42 -105
- package/esm/tooling/typecheck/run-typecheck.mjs.map +1 -1
- package/esm/tooling/typescript/compiler.d.mts +31 -0
- package/esm/tooling/typescript/compiler.d.mts.map +1 -0
- package/esm/tooling/typescript/compiler.mjs +120 -0
- package/esm/tooling/typescript/compiler.mjs.map +1 -0
- package/esm/updater/update-warlock-packages.mjs +3 -2
- package/esm/updater/update-warlock-packages.mjs.map +1 -1
- package/esm/upgrade/codemods/index.mjs +1 -1
- package/esm/upgrade/codemods/logger-sync-calls.mjs +1 -1
- package/esm/upgrade/codemods/logger-sync-calls.mjs.map +1 -1
- package/esm/upgrade/codemods/request-log-snapshot.mjs +1 -1
- package/esm/upgrade/codemods/request-log-snapshot.mjs.map +1 -1
- package/esm/upgrade/diff.mjs +1 -1
- package/esm/upgrade/diff.mjs.map +1 -1
- package/esm/upgrade/load-ts-morph.mjs +3 -2
- package/esm/upgrade/load-ts-morph.mjs.map +1 -1
- package/esm/upgrade/run-upgrade.mjs +1 -1
- package/esm/use-cases/index.d.mts +2 -1
- package/esm/use-cases/index.mjs +1 -1
- package/esm/use-cases/types.d.mts +116 -63
- package/esm/use-cases/types.d.mts.map +1 -1
- package/esm/use-cases/use-case-broadcast.d.mts +1 -3
- package/esm/use-cases/use-case-broadcast.d.mts.map +1 -1
- package/esm/use-cases/use-case-events.d.mts +3 -5
- package/esm/use-cases/use-case-events.d.mts.map +1 -1
- package/esm/use-cases/use-case-pipeline.d.mts +6 -6
- package/esm/use-cases/use-case-pipeline.d.mts.map +1 -1
- package/esm/use-cases/use-case.d.mts +2 -4
- package/esm/use-cases/use-case.d.mts.map +1 -1
- package/esm/use-cases/use-case.errors.d.mts +1 -3
- package/esm/use-cases/use-case.errors.d.mts.map +1 -1
- package/esm/use-cases/use-cases-registry.d.mts +8 -10
- package/esm/use-cases/use-cases-registry.d.mts.map +1 -1
- package/esm/utils/app-log.d.mts +1 -2
- package/esm/utils/app-log.d.mts.map +1 -1
- package/esm/utils/clock.d.mts +8 -6
- package/esm/utils/clock.d.mts.map +1 -1
- package/esm/utils/database-log.d.mts +3 -4
- package/esm/utils/database-log.d.mts.map +1 -1
- package/esm/utils/environment.d.mts +4 -5
- package/esm/utils/environment.d.mts.map +1 -1
- package/esm/utils/framework-vesion.mjs.map +1 -1
- package/esm/utils/get-localized.d.mts +2 -3
- package/esm/utils/get-localized.d.mts.map +1 -1
- package/esm/utils/ids.d.mts +9 -6
- package/esm/utils/ids.d.mts.map +1 -1
- package/esm/utils/index.d.mts +2 -1
- package/esm/utils/index.mjs +1 -1
- package/esm/utils/normalized-path.d.mts +1 -2
- package/esm/utils/normalized-path.d.mts.map +1 -1
- package/esm/utils/npm-registry.d.mts +1 -2
- package/esm/utils/npm-registry.d.mts.map +1 -1
- package/esm/utils/paths.d.mts +13 -14
- package/esm/utils/paths.d.mts.map +1 -1
- package/esm/utils/paths.mjs +2 -2
- package/esm/utils/paths.mjs.map +1 -1
- package/esm/utils/promise-all-object.d.mts +1 -2
- package/esm/utils/promise-all-object.d.mts.map +1 -1
- package/esm/utils/queue.d.mts +1 -2
- package/esm/utils/queue.d.mts.map +1 -1
- package/esm/utils/runtime.d.mts +11 -10
- package/esm/utils/runtime.d.mts.map +1 -1
- package/esm/utils/sleep.d.mts +1 -2
- package/esm/utils/sleep.d.mts.map +1 -1
- package/esm/utils/sluggable.d.mts +1 -3
- package/esm/utils/sluggable.d.mts.map +1 -1
- package/esm/utils/to-json.d.mts +1 -2
- package/esm/utils/to-json.d.mts.map +1 -1
- package/esm/utils/types.d.mts +1 -2
- package/esm/utils/types.d.mts.map +1 -1
- package/esm/utils/urls.d.mts +5 -6
- package/esm/utils/urls.d.mts.map +1 -1
- package/esm/utils/version-compare.d.mts +1 -2
- package/esm/utils/version-compare.d.mts.map +1 -1
- package/esm/validation/database/exists-except-current-id.d.mts +2 -3
- package/esm/validation/database/exists-except-current-id.d.mts.map +1 -1
- package/esm/validation/database/exists-except-current-user.d.mts +2 -3
- package/esm/validation/database/exists-except-current-user.d.mts.map +1 -1
- package/esm/validation/database/index.d.mts +2 -1
- package/esm/validation/database/index.mjs +1 -1
- package/esm/validation/database/types.d.mts +14 -10
- package/esm/validation/database/types.d.mts.map +1 -1
- package/esm/validation/database/unique-except-current-id.d.mts +2 -3
- package/esm/validation/database/unique-except-current-id.d.mts.map +1 -1
- package/esm/validation/database/unique-except-current-user.d.mts +2 -3
- package/esm/validation/database/unique-except-current-user.d.mts.map +1 -1
- package/esm/validation/file/file.d.mts +4 -6
- package/esm/validation/file/file.d.mts.map +1 -1
- package/esm/validation/file/index.d.mts +2 -1
- package/esm/validation/file/index.mjs +1 -1
- package/esm/validation/index.d.mts +5 -1
- package/esm/validation/index.mjs +1 -1
- package/esm/validation/plugins/index.mjs +1 -1
- package/esm/validation/types.d.mts +6 -4
- package/esm/validation/types.d.mts.map +1 -1
- package/esm/validation/validateAll.mjs +2 -2
- package/esm/validation/validateAll.mjs.map +1 -1
- package/esm/validation/validation-failure-status.mjs +2 -2
- package/esm/validation/validation-failure-status.mjs.map +1 -1
- package/esm/validation/validators/file-validator.d.mts +2 -4
- package/esm/validation/validators/file-validator.d.mts.map +1 -1
- package/esm/validation/validators/index.d.mts +2 -1
- package/esm/validation/validators/index.mjs +1 -1
- package/esm/vite/lower-stage3-decorators.d.mts +2 -3
- package/esm/vite/lower-stage3-decorators.d.mts.map +1 -1
- package/esm/warlock-config/define-config.d.mts +1 -3
- package/esm/warlock-config/define-config.d.mts.map +1 -1
- package/esm/warlock-config/define-config.mjs +3 -2
- package/esm/warlock-config/define-config.mjs.map +1 -1
- package/esm/warlock-config/index.d.mts +2 -1
- package/esm/warlock-config/index.mjs +1 -1
- package/esm/warlock-config/types.d.mts +6 -5
- package/esm/warlock-config/types.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.d.mts +5 -7
- package/esm/warlock-config/warlock-config.manager.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.mjs +2 -1
- package/esm/warlock-config/warlock-config.manager.mjs.map +1 -1
- package/esm/warlock-config/warn-deprecated-config.mjs +1 -1
- package/llms-full.txt +55 -5
- package/package.json +17 -15
- package/skills/create-module/SKILL.md +7 -0
- package/skills/index.md +2 -0
- package/skills/report-framework-issue.md +154 -0
- package/skills/run-app/SKILL.md +6 -5
- package/skills/upgrade-from-5-29/SKILL.md +41 -0
- package/skills/warlock-check/SKILL.md +1 -0
- package/esm/tooling/check/index.d.mts +0 -8
- package/esm/tooling/typecheck/index.d.mts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-files.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/generate/project-files.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport {\n copyFileSync,\n existsSync,\n mkdirSync,\n readdirSync,\n readFileSync,\n symlinkSync,\n} from \"node:fs\";\nimport path from \"node:path\";\n\n/**\n * Which project files a generation can see and change, and how they are\n * copied, hashed and compared.\n *\n * THE SCOPE: the files at the project root plus the `src/` tree. That is where\n * every generator writes (`src/app/**`, `src/config/**`, `package.json`,\n * `warlock.config.ts`, `tsconfig.json`). `.env` files are never copied, hashed\n * or diffed: they hold secrets, and a diff is text an agent will read.\n */\n\n/** Directory names never entered anywhere. */\nconst SKIPPED_DIRECTORIES = new Set([\".git\", \"node_modules\"]);\n\n/** Root directories outside the scope that a sandbox still never copies (listed for the walk of a sandbox). */\nconst SKIPPED_ROOT_DIRECTORIES = new Set([\n \".git\",\n \"node_modules\",\n \".warlock\",\n \"dist\",\n \"storage\",\n \"public\",\n \"coverage\",\n]);\n\n/** Whether a file name is an env file (`.env`, `.env.local`, `.env.production`…). */\nexport function isEnvFile(name: string): boolean {\n return name === \".env\" || name.startsWith(\".env.\");\n}\n\n/** A file's content hash, keyed by project-relative POSIX path. */\nexport type FileSnapshot = Map<string, string>;\n\nfunction toPosix(relative: string): string {\n return relative.split(path.sep).join(\"/\");\n}\n\nfunction hashFile(file: string): string {\n return createHash(\"sha256\").update(readFileSync(file)).digest(\"hex\");\n}\n\nfunction walk(\n root: string,\n directory: string,\n visit: (absolute: string, relative: string) => void,\n): void {\n for (const entry of readdirSync(directory, { withFileTypes: true })) {\n if (entry.isSymbolicLink()) continue;\n\n const absolute = path.join(directory, entry.name);\n\n if (entry.isDirectory()) {\n if (!SKIPPED_DIRECTORIES.has(entry.name)) walk(root, absolute, visit);\n continue;\n }\n\n if (entry.isFile() && !isEnvFile(entry.name)) {\n visit(absolute, toPosix(path.relative(root, absolute)));\n }\n }\n}\n\n/**\n * Visit every file in the generation scope of `root`: root-level files and the\n * `src/` tree, skipping env files, symlinks, `node_modules` and `.git`.\n */\nexport function forEachScopedFile(\n root: string,\n visit: (absolute: string, relative: string) => void,\n): void {\n for (const entry of readdirSync(root, { withFileTypes: true })) {\n if (entry.isFile() && !isEnvFile(entry.name)) {\n visit(path.join(root, entry.name), entry.name);\n }\n }\n\n const source = path.join(root, \"src\");\n\n if (existsSync(source)) walk(root, source, visit);\n}\n\n/**\n * Visit every file under `root` except env files, symlinks and the\n * {@link SKIPPED_ROOT_DIRECTORIES} — how a sandbox is read after a generator\n * ran, so a file written outside `src/` is still seen.\n */\nexport function forEachSandboxFile(\n root: string,\n visit: (absolute: string, relative: string) => void,\n): void {\n for (const entry of readdirSync(root, { withFileTypes: true })) {\n if (entry.isSymbolicLink()) continue;\n\n const absolute = path.join(root, entry.name);\n\n if (entry.isDirectory()) {\n if (!SKIPPED_ROOT_DIRECTORIES.has(entry.name)) walk(root, absolute, visit);\n } else if (entry.isFile() && !isEnvFile(entry.name)) {\n visit(absolute, entry.name);\n }\n }\n}\n\n/** Hash every file the walker visits. */\nexport function snapshotFiles(\n root: string,\n walker: (root: string, visit: (absolute: string, relative: string) => void) => void,\n): FileSnapshot {\n const snapshot: FileSnapshot = new Map();\n\n walker(root, (absolute, relative) => {\n snapshot.set(relative, hashFile(absolute));\n });\n\n return snapshot;\n}\n\n/**\n * Copy the generation scope of `projectRoot` into `sandboxRoot` and link the\n * project's `node_modules` into it, so `warlock.config.ts` and every package\n * resolve exactly as they do in the project. Nothing is copied from\n * `node_modules`; the link is removed with the sandbox, never followed.\n */\nexport function copyProjectScope(projectRoot: string, sandboxRoot: string): void {\n forEachScopedFile(projectRoot, (absolute, relative) => {\n const target = path.join(sandboxRoot, relative);\n\n mkdirSync(path.dirname(target), { recursive: true });\n copyFileSync(absolute, target);\n });\n\n const modules = path.join(projectRoot, \"node_modules\");\n\n if (existsSync(modules)) {\n // \"junction\" is ignored off Windows and makes the link work there without admin rights.\n symlinkSync(modules, path.join(sandboxRoot, \"node_modules\"), \"junction\");\n }\n}\n\n/** One file that differs between two snapshots. */\nexport type SnapshotChange = { path: string; status: \"created\" | \"modified\" | \"deleted\" };\n\n/** The files created, modified or deleted between two snapshots, sorted by path. */\nexport function compareSnapshots(before: FileSnapshot, after: FileSnapshot): SnapshotChange[] {\n const changes: SnapshotChange[] = [];\n\n for (const [file, hash] of after) {\n const previous = before.get(file);\n\n if (previous === undefined) changes.push({ path: file, status: \"created\" });\n else if (previous !== hash) changes.push({ path: file, status: \"modified\" });\n }\n\n for (const file of before.keys()) {\n if (!after.has(file)) changes.push({ path: file, status: \"deleted\" });\n }\n\n return changes.sort((first, second) => first.path.localeCompare(second.path));\n}\n\n/** Whether bytes look binary: a NUL in the first 8000 bytes, as git decides. */\nexport function isBinary(content: Buffer): boolean {\n return content.subarray(0, 8000).includes(0);\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,MAAM,
|
|
1
|
+
{"version":3,"file":"project-files.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/generate/project-files.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport {\n copyFileSync,\n existsSync,\n mkdirSync,\n readdirSync,\n readFileSync,\n symlinkSync,\n} from \"node:fs\";\nimport path from \"node:path\";\n\n/**\n * Which project files a generation can see and change, and how they are\n * copied, hashed and compared.\n *\n * THE SCOPE: the files at the project root plus the `src/` tree. That is where\n * every generator writes (`src/app/**`, `src/config/**`, `package.json`,\n * `warlock.config.ts`, `tsconfig.json`). `.env` files are never copied, hashed\n * or diffed: they hold secrets, and a diff is text an agent will read.\n */\n\n/** Directory names never entered anywhere. */\nconst SKIPPED_DIRECTORIES = new Set([\".git\", \"node_modules\"]);\n\n/** Root directories outside the scope that a sandbox still never copies (listed for the walk of a sandbox). */\nconst SKIPPED_ROOT_DIRECTORIES = new Set([\n \".git\",\n \"node_modules\",\n \".warlock\",\n \"dist\",\n \"storage\",\n \"public\",\n \"coverage\",\n]);\n\n/** Whether a file name is an env file (`.env`, `.env.local`, `.env.production`…). */\nexport function isEnvFile(name: string): boolean {\n return name === \".env\" || name.startsWith(\".env.\");\n}\n\n/** A file's content hash, keyed by project-relative POSIX path. */\nexport type FileSnapshot = Map<string, string>;\n\nfunction toPosix(relative: string): string {\n return relative.split(path.sep).join(\"/\");\n}\n\nfunction hashFile(file: string): string {\n return createHash(\"sha256\").update(readFileSync(file)).digest(\"hex\");\n}\n\nfunction walk(\n root: string,\n directory: string,\n visit: (absolute: string, relative: string) => void,\n): void {\n for (const entry of readdirSync(directory, { withFileTypes: true })) {\n if (entry.isSymbolicLink()) continue;\n\n const absolute = path.join(directory, entry.name);\n\n if (entry.isDirectory()) {\n if (!SKIPPED_DIRECTORIES.has(entry.name)) walk(root, absolute, visit);\n continue;\n }\n\n if (entry.isFile() && !isEnvFile(entry.name)) {\n visit(absolute, toPosix(path.relative(root, absolute)));\n }\n }\n}\n\n/**\n * Visit every file in the generation scope of `root`: root-level files and the\n * `src/` tree, skipping env files, symlinks, `node_modules` and `.git`.\n */\nexport function forEachScopedFile(\n root: string,\n visit: (absolute: string, relative: string) => void,\n): void {\n for (const entry of readdirSync(root, { withFileTypes: true })) {\n if (entry.isFile() && !isEnvFile(entry.name)) {\n visit(path.join(root, entry.name), entry.name);\n }\n }\n\n const source = path.join(root, \"src\");\n\n if (existsSync(source)) walk(root, source, visit);\n}\n\n/**\n * Visit every file under `root` except env files, symlinks and the\n * {@link SKIPPED_ROOT_DIRECTORIES} — how a sandbox is read after a generator\n * ran, so a file written outside `src/` is still seen.\n */\nexport function forEachSandboxFile(\n root: string,\n visit: (absolute: string, relative: string) => void,\n): void {\n for (const entry of readdirSync(root, { withFileTypes: true })) {\n if (entry.isSymbolicLink()) continue;\n\n const absolute = path.join(root, entry.name);\n\n if (entry.isDirectory()) {\n if (!SKIPPED_ROOT_DIRECTORIES.has(entry.name)) walk(root, absolute, visit);\n } else if (entry.isFile() && !isEnvFile(entry.name)) {\n visit(absolute, entry.name);\n }\n }\n}\n\n/** Hash every file the walker visits. */\nexport function snapshotFiles(\n root: string,\n walker: (root: string, visit: (absolute: string, relative: string) => void) => void,\n): FileSnapshot {\n const snapshot: FileSnapshot = new Map();\n\n walker(root, (absolute, relative) => {\n snapshot.set(relative, hashFile(absolute));\n });\n\n return snapshot;\n}\n\n/**\n * Copy the generation scope of `projectRoot` into `sandboxRoot` and link the\n * project's `node_modules` into it, so `warlock.config.ts` and every package\n * resolve exactly as they do in the project. Nothing is copied from\n * `node_modules`; the link is removed with the sandbox, never followed.\n */\nexport function copyProjectScope(projectRoot: string, sandboxRoot: string): void {\n forEachScopedFile(projectRoot, (absolute, relative) => {\n const target = path.join(sandboxRoot, relative);\n\n mkdirSync(path.dirname(target), { recursive: true });\n copyFileSync(absolute, target);\n });\n\n const modules = path.join(projectRoot, \"node_modules\");\n\n if (existsSync(modules)) {\n // \"junction\" is ignored off Windows and makes the link work there without admin rights.\n symlinkSync(modules, path.join(sandboxRoot, \"node_modules\"), \"junction\");\n }\n}\n\n/** One file that differs between two snapshots. */\nexport type SnapshotChange = { path: string; status: \"created\" | \"modified\" | \"deleted\" };\n\n/** The files created, modified or deleted between two snapshots, sorted by path. */\nexport function compareSnapshots(before: FileSnapshot, after: FileSnapshot): SnapshotChange[] {\n const changes: SnapshotChange[] = [];\n\n for (const [file, hash] of after) {\n const previous = before.get(file);\n\n if (previous === undefined) changes.push({ path: file, status: \"created\" });\n else if (previous !== hash) changes.push({ path: file, status: \"modified\" });\n }\n\n for (const file of before.keys()) {\n if (!after.has(file)) changes.push({ path: file, status: \"deleted\" });\n }\n\n return changes.sort((first, second) => first.path.localeCompare(second.path));\n}\n\n/** Whether bytes look binary: a NUL in the first 8000 bytes, as git decides. */\nexport function isBinary(content: Buffer): boolean {\n return content.subarray(0, 8000).includes(0);\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,MAAM,sCAAsB,IAAI,IAAI,CAAC,QAAQ,cAAc,CAAC;;AAG5D,MAAM,2CAA2B,IAAI,IAAI;CACvC;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;AAGD,SAAgB,UAAU,MAAuB;CAC/C,OAAO,SAAS,UAAU,KAAK,WAAW,OAAO;AACnD;AAKA,SAAS,QAAQ,UAA0B;CACzC,OAAO,SAAS,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG;AAC1C;AAEA,SAAS,SAAS,MAAsB;CACtC,OAAO,WAAW,QAAQ,CAAC,CAAC,OAAO,aAAa,IAAI,CAAC,CAAC,CAAC,OAAO,KAAK;AACrE;AAEA,SAAS,KACP,MACA,WACA,OACM;CACN,KAAK,MAAM,SAAS,YAAY,WAAW,EAAE,eAAe,KAAK,CAAC,GAAG;EACnE,IAAI,MAAM,eAAe,GAAG;EAE5B,MAAM,WAAW,KAAK,KAAK,WAAW,MAAM,IAAI;EAEhD,IAAI,MAAM,YAAY,GAAG;GACvB,IAAI,CAAC,oBAAoB,IAAI,MAAM,IAAI,GAAG,KAAK,MAAM,UAAU,KAAK;GACpE;EACF;EAEA,IAAI,MAAM,OAAO,KAAK,CAAC,UAAU,MAAM,IAAI,GACzC,MAAM,UAAU,QAAQ,KAAK,SAAS,MAAM,QAAQ,CAAC,CAAC;CAE1D;AACF;;;;;AAMA,SAAgB,kBACd,MACA,OACM;CACN,KAAK,MAAM,SAAS,YAAY,MAAM,EAAE,eAAe,KAAK,CAAC,GAC3D,IAAI,MAAM,OAAO,KAAK,CAAC,UAAU,MAAM,IAAI,GACzC,MAAM,KAAK,KAAK,MAAM,MAAM,IAAI,GAAG,MAAM,IAAI;CAIjD,MAAM,SAAS,KAAK,KAAK,MAAM,KAAK;CAEpC,IAAI,WAAW,MAAM,GAAG,KAAK,MAAM,QAAQ,KAAK;AAClD;;;;;;AAOA,SAAgB,mBACd,MACA,OACM;CACN,KAAK,MAAM,SAAS,YAAY,MAAM,EAAE,eAAe,KAAK,CAAC,GAAG;EAC9D,IAAI,MAAM,eAAe,GAAG;EAE5B,MAAM,WAAW,KAAK,KAAK,MAAM,MAAM,IAAI;EAE3C,IAAI,MAAM,YAAY,GACpB;OAAI,CAAC,yBAAyB,IAAI,MAAM,IAAI,GAAG,KAAK,MAAM,UAAU,KAAK;EAAC,OACrE,IAAI,MAAM,OAAO,KAAK,CAAC,UAAU,MAAM,IAAI,GAChD,MAAM,UAAU,MAAM,IAAI;CAE9B;AACF;;AAGA,SAAgB,cACd,MACA,QACc;CACd,MAAM,2BAAyB,IAAI,IAAI;CAEvC,OAAO,OAAO,UAAU,aAAa;EACnC,SAAS,IAAI,UAAU,SAAS,QAAQ,CAAC;CAC3C,CAAC;CAED,OAAO;AACT;;;;;;;AAQA,SAAgB,iBAAiB,aAAqB,aAA2B;CAC/E,kBAAkB,cAAc,UAAU,aAAa;EACrD,MAAM,SAAS,KAAK,KAAK,aAAa,QAAQ;EAE9C,UAAU,KAAK,QAAQ,MAAM,GAAG,EAAE,WAAW,KAAK,CAAC;EACnD,aAAa,UAAU,MAAM;CAC/B,CAAC;CAED,MAAM,UAAU,KAAK,KAAK,aAAa,cAAc;CAErD,IAAI,WAAW,OAAO,GAEpB,YAAY,SAAS,KAAK,KAAK,aAAa,cAAc,GAAG,UAAU;AAE3E;;AAMA,SAAgB,iBAAiB,QAAsB,OAAuC;CAC5F,MAAM,UAA4B,CAAC;CAEnC,KAAK,MAAM,CAAC,MAAM,SAAS,OAAO;EAChC,MAAM,WAAW,OAAO,IAAI,IAAI;EAEhC,IAAI,aAAa,QAAW,QAAQ,KAAK;GAAE,MAAM;GAAM,QAAQ;EAAU,CAAC;OACrE,IAAI,aAAa,MAAM,QAAQ,KAAK;GAAE,MAAM;GAAM,QAAQ;EAAW,CAAC;CAC7E;CAEA,KAAK,MAAM,QAAQ,OAAO,KAAK,GAC7B,IAAI,CAAC,MAAM,IAAI,IAAI,GAAG,QAAQ,KAAK;EAAE,MAAM;EAAM,QAAQ;CAAU,CAAC;CAGtE,OAAO,QAAQ,MAAM,OAAO,WAAW,MAAM,KAAK,cAAc,OAAO,IAAI,CAAC;AAC9E;;AAGA,SAAgB,SAAS,SAA0B;CACjD,OAAO,QAAQ,SAAS,GAAG,GAAI,CAAC,CAAC,SAAS,CAAC;AAC7C"}
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
//#region ../../packages/core/src/tooling/generate/run-cli.d.ts
|
|
2
2
|
/** How one CLI run ended. */
|
|
3
|
-
type CliRun = {
|
|
4
|
-
/** The exit code, or `null` when the process was killed. */
|
|
3
|
+
export type CliRun = {
|
|
4
|
+
/** The exit code, or `null` when the process was killed. */
|
|
5
|
+
exitCode: number | null;
|
|
6
|
+
/** The signal that ended it, or `null`. */
|
|
5
7
|
signal: string | null;
|
|
6
8
|
stdout: string;
|
|
7
|
-
stderr: string;
|
|
9
|
+
stderr: string;
|
|
10
|
+
/** Whether the run hit its timeout and was stopped. */
|
|
8
11
|
timedOut: boolean;
|
|
9
12
|
};
|
|
10
13
|
/** What a {@link CliRunner} is asked to run: `node <entry> <args>` in `cwd`. */
|
|
11
|
-
type CliInvocation = {
|
|
12
|
-
/** The CLI entry script (the `warlock` bin). */
|
|
14
|
+
export type CliInvocation = {
|
|
15
|
+
/** The CLI entry script (the `warlock` bin). */
|
|
16
|
+
entry: string;
|
|
13
17
|
args: readonly string[];
|
|
14
18
|
cwd: string;
|
|
15
19
|
timeoutMs: number;
|
|
16
20
|
};
|
|
17
21
|
/** Runs the CLI. Injectable so tests never spawn the real one. */
|
|
18
|
-
type CliRunner = (invocation: CliInvocation) => Promise<CliRun>;
|
|
22
|
+
export type CliRunner = (invocation: CliInvocation) => Promise<CliRun>;
|
|
19
23
|
/** Two minutes: `add` features run setup hooks; a scaffold is far quicker. */
|
|
20
|
-
declare const DEFAULT_GENERATION_TIMEOUT_MS = 120000;
|
|
24
|
+
export declare const DEFAULT_GENERATION_TIMEOUT_MS = 120000;
|
|
21
25
|
/**
|
|
22
26
|
* The `warlock` bin the project uses: `<@warlock.js/core>/bin/warlock.js` as
|
|
23
27
|
* the project at `cwd` resolves the package, else the script this process
|
|
@@ -25,16 +29,15 @@ declare const DEFAULT_GENERATION_TIMEOUT_MS = 120000;
|
|
|
25
29
|
*
|
|
26
30
|
* @throws When neither is found; pass the entry explicitly then.
|
|
27
31
|
*/
|
|
28
|
-
declare function resolveCliEntry(cwd?: string): string;
|
|
32
|
+
export declare function resolveCliEntry(cwd?: string): string;
|
|
29
33
|
/**
|
|
30
34
|
* The default {@link CliRunner}: spawns `node <entry> <args>` with stdin
|
|
31
35
|
* closed (a prompt reads end-of-input instead of hanging), colors off and
|
|
32
36
|
* `CI=1`, and stops the child it spawned — that one process, by its own
|
|
33
37
|
* handle — when the timeout passes.
|
|
34
38
|
*/
|
|
35
|
-
declare const spawnCli: CliRunner;
|
|
39
|
+
export declare const spawnCli: CliRunner;
|
|
36
40
|
/** Output a plan carries: stdout then stderr, ANSI stripped, capped. */
|
|
37
|
-
declare function describeRun(run: CliRun, limit?: number): string;
|
|
41
|
+
export declare function describeRun(run: CliRun, limit?: number): string;
|
|
38
42
|
//#endregion
|
|
39
|
-
export { CliInvocation, CliRun, CliRunner, DEFAULT_GENERATION_TIMEOUT_MS, describeRun, resolveCliEntry, spawnCli };
|
|
40
43
|
//# sourceMappingURL=run-cli.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-cli.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/generate/run-cli.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"run-cli.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/generate/run-cli.ts"],"mappings":";;YAKY;;EAEV;;EAEA;EACA;EACA;;EAEA;;;YAIU;;EAEV;EACA;EACA;EACA;;;YAIU,aAAa,YAAY,kBAAkB,QAAQ;;qBAGlD;;;;;;;;wBAYG,gBAAgB;;;;;;;qBA0BnB,UAAU;;wBA+CP,YAAY,KAAK,QAAQ"}
|
|
@@ -6,7 +6,7 @@ import { spawn } from "node:child_process";
|
|
|
6
6
|
/** Two minutes: `add` features run setup hooks; a scaffold is far quicker. */
|
|
7
7
|
const DEFAULT_GENERATION_TIMEOUT_MS = 12e4;
|
|
8
8
|
/** Output kept per stream; the rest is dropped (the diff is the result, not the log). */
|
|
9
|
-
const MAX_STREAM_BYTES =
|
|
9
|
+
const MAX_STREAM_BYTES = 262144;
|
|
10
10
|
/**
|
|
11
11
|
* The `warlock` bin the project uses: `<@warlock.js/core>/bin/warlock.js` as
|
|
12
12
|
* the project at `cwd` resolves the package, else the script this process
|
|
@@ -82,7 +82,7 @@ const spawnCli = (invocation) => new Promise((resolve) => {
|
|
|
82
82
|
/** ANSI color and cursor sequences. */
|
|
83
83
|
const ANSI_SEQUENCE = new RegExp(`${String.fromCharCode(27)}\\[[0-9;?]*[A-Za-z]`, "g");
|
|
84
84
|
/** Output a plan carries: stdout then stderr, ANSI stripped, capped. */
|
|
85
|
-
function describeRun(run, limit =
|
|
85
|
+
function describeRun(run, limit = 16384) {
|
|
86
86
|
const text = [run.stdout, run.stderr].map((part) => part.replace(ANSI_SEQUENCE, "").trim()).filter((part) => part.length > 0).join("\n");
|
|
87
87
|
const suffix = run.timedOut ? "\n(stopped: the command timed out)" : "";
|
|
88
88
|
return text.length > limit ? `${text.slice(0, limit)}\n… (output truncated)${suffix}` : `${text}${suffix}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-cli.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/generate/run-cli.ts"],"sourcesContent":["import { spawn } from \"node:child_process\";\nimport { createRequire } from \"node:module\";\nimport path from \"node:path\";\n\n/** How one CLI run ended. */\nexport type CliRun = {\n /** The exit code, or `null` when the process was killed. */\n exitCode: number | null;\n /** The signal that ended it, or `null`. */\n signal: string | null;\n stdout: string;\n stderr: string;\n /** Whether the run hit its timeout and was stopped. */\n timedOut: boolean;\n};\n\n/** What a {@link CliRunner} is asked to run: `node <entry> <args>` in `cwd`. */\nexport type CliInvocation = {\n /** The CLI entry script (the `warlock` bin). */\n entry: string;\n args: readonly string[];\n cwd: string;\n timeoutMs: number;\n};\n\n/** Runs the CLI. Injectable so tests never spawn the real one. */\nexport type CliRunner = (invocation: CliInvocation) => Promise<CliRun>;\n\n/** Two minutes: `add` features run setup hooks; a scaffold is far quicker. */\nexport const DEFAULT_GENERATION_TIMEOUT_MS = 120_000;\n\n/** Output kept per stream; the rest is dropped (the diff is the result, not the log). */\nconst MAX_STREAM_BYTES = 256 * 1024;\n\n/**\n * The `warlock` bin the project uses: `<@warlock.js/core>/bin/warlock.js` as\n * the project at `cwd` resolves the package, else the script this process\n * was started with when it is the `warlock` bin.\n *\n * @throws When neither is found; pass the entry explicitly then.\n */\nexport function resolveCliEntry(cwd = process.cwd()): string {\n try {\n const manifest = createRequire(path.join(cwd, \"package.json\")).resolve(\n \"@warlock.js/core/package.json\",\n );\n\n return path.join(path.dirname(manifest), \"bin\", \"warlock.js\");\n } catch {\n // Not resolvable from the project; try the running script.\n }\n\n const invoked = process.argv[1];\n\n if (invoked && /^warlock(\\.js)?$/.test(path.basename(invoked))) return invoked;\n\n throw new Error(\n \"Could not find the warlock CLI: install @warlock.js/core in the project, or pass cliEntry.\",\n );\n}\n\n/**\n * The default {@link CliRunner}: spawns `node <entry> <args>` with stdin\n * closed (a prompt reads end-of-input instead of hanging), colors off and\n * `CI=1`, and stops the child it spawned — that one process, by its own\n * handle — when the timeout passes.\n */\nexport const spawnCli: CliRunner = (invocation) =>\n new Promise((resolve) => {\n const child = spawn(process.execPath, [invocation.entry, ...invocation.args], {\n cwd: invocation.cwd,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n windowsHide: true,\n env: { ...process.env, CI: \"1\", NO_COLOR: \"1\", FORCE_COLOR: \"0\" },\n });\n let stdout = \"\";\n let stderr = \"\";\n let timedOut = false;\n\n child.stdout.setEncoding(\"utf8\");\n child.stderr.setEncoding(\"utf8\");\n child.stdout.on(\"data\", (chunk: string) => {\n if (stdout.length < MAX_STREAM_BYTES) stdout += chunk;\n });\n child.stderr.on(\"data\", (chunk: string) => {\n if (stderr.length < MAX_STREAM_BYTES) stderr += chunk;\n });\n\n const timer = setTimeout(() => {\n timedOut = true;\n child.kill(\"SIGTERM\");\n }, invocation.timeoutMs);\n\n let settled = false;\n\n const finish = (exitCode: number | null, signal: string | null) => {\n if (settled) return;\n\n settled = true;\n clearTimeout(timer);\n resolve({ exitCode, signal, stdout, stderr, timedOut });\n };\n\n child.on(\"error\", (error) => {\n stderr += `${error.message}\\n`;\n finish(null, null);\n });\n child.on(\"close\", (code, signal) => finish(code, signal));\n });\n\n/** ANSI color and cursor sequences. */\nconst ANSI_SEQUENCE = new RegExp(`${String.fromCharCode(27)}\\\\[[0-9;?]*[A-Za-z]`, \"g\");\n\n/** Output a plan carries: stdout then stderr, ANSI stripped, capped. */\nexport function describeRun(run: CliRun, limit = 16 * 1024): string {\n const text = [run.stdout, run.stderr]\n .map((part) => part.replace(ANSI_SEQUENCE, \"\").trim())\n .filter((part) => part.length > 0)\n .join(\"\\n\");\n const suffix = run.timedOut ? \"\\n(stopped: the command timed out)\" : \"\";\n\n return text.length > limit\n ? `${text.slice(0, limit)}\\n… (output truncated)${suffix}`\n : `${text}${suffix}`;\n}\n"],"mappings":";;;;;;AA6BA,MAAa,gCAAgC;;AAG7C,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"run-cli.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/generate/run-cli.ts"],"sourcesContent":["import { spawn } from \"node:child_process\";\nimport { createRequire } from \"node:module\";\nimport path from \"node:path\";\n\n/** How one CLI run ended. */\nexport type CliRun = {\n /** The exit code, or `null` when the process was killed. */\n exitCode: number | null;\n /** The signal that ended it, or `null`. */\n signal: string | null;\n stdout: string;\n stderr: string;\n /** Whether the run hit its timeout and was stopped. */\n timedOut: boolean;\n};\n\n/** What a {@link CliRunner} is asked to run: `node <entry> <args>` in `cwd`. */\nexport type CliInvocation = {\n /** The CLI entry script (the `warlock` bin). */\n entry: string;\n args: readonly string[];\n cwd: string;\n timeoutMs: number;\n};\n\n/** Runs the CLI. Injectable so tests never spawn the real one. */\nexport type CliRunner = (invocation: CliInvocation) => Promise<CliRun>;\n\n/** Two minutes: `add` features run setup hooks; a scaffold is far quicker. */\nexport const DEFAULT_GENERATION_TIMEOUT_MS = 120_000;\n\n/** Output kept per stream; the rest is dropped (the diff is the result, not the log). */\nconst MAX_STREAM_BYTES = 256 * 1024;\n\n/**\n * The `warlock` bin the project uses: `<@warlock.js/core>/bin/warlock.js` as\n * the project at `cwd` resolves the package, else the script this process\n * was started with when it is the `warlock` bin.\n *\n * @throws When neither is found; pass the entry explicitly then.\n */\nexport function resolveCliEntry(cwd = process.cwd()): string {\n try {\n const manifest = createRequire(path.join(cwd, \"package.json\")).resolve(\n \"@warlock.js/core/package.json\",\n );\n\n return path.join(path.dirname(manifest), \"bin\", \"warlock.js\");\n } catch {\n // Not resolvable from the project; try the running script.\n }\n\n const invoked = process.argv[1];\n\n if (invoked && /^warlock(\\.js)?$/.test(path.basename(invoked))) return invoked;\n\n throw new Error(\n \"Could not find the warlock CLI: install @warlock.js/core in the project, or pass cliEntry.\",\n );\n}\n\n/**\n * The default {@link CliRunner}: spawns `node <entry> <args>` with stdin\n * closed (a prompt reads end-of-input instead of hanging), colors off and\n * `CI=1`, and stops the child it spawned — that one process, by its own\n * handle — when the timeout passes.\n */\nexport const spawnCli: CliRunner = (invocation) =>\n new Promise((resolve) => {\n const child = spawn(process.execPath, [invocation.entry, ...invocation.args], {\n cwd: invocation.cwd,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n windowsHide: true,\n env: { ...process.env, CI: \"1\", NO_COLOR: \"1\", FORCE_COLOR: \"0\" },\n });\n let stdout = \"\";\n let stderr = \"\";\n let timedOut = false;\n\n child.stdout.setEncoding(\"utf8\");\n child.stderr.setEncoding(\"utf8\");\n child.stdout.on(\"data\", (chunk: string) => {\n if (stdout.length < MAX_STREAM_BYTES) stdout += chunk;\n });\n child.stderr.on(\"data\", (chunk: string) => {\n if (stderr.length < MAX_STREAM_BYTES) stderr += chunk;\n });\n\n const timer = setTimeout(() => {\n timedOut = true;\n child.kill(\"SIGTERM\");\n }, invocation.timeoutMs);\n\n let settled = false;\n\n const finish = (exitCode: number | null, signal: string | null) => {\n if (settled) return;\n\n settled = true;\n clearTimeout(timer);\n resolve({ exitCode, signal, stdout, stderr, timedOut });\n };\n\n child.on(\"error\", (error) => {\n stderr += `${error.message}\\n`;\n finish(null, null);\n });\n child.on(\"close\", (code, signal) => finish(code, signal));\n });\n\n/** ANSI color and cursor sequences. */\nconst ANSI_SEQUENCE = new RegExp(`${String.fromCharCode(27)}\\\\[[0-9;?]*[A-Za-z]`, \"g\");\n\n/** Output a plan carries: stdout then stderr, ANSI stripped, capped. */\nexport function describeRun(run: CliRun, limit = 16 * 1024): string {\n const text = [run.stdout, run.stderr]\n .map((part) => part.replace(ANSI_SEQUENCE, \"\").trim())\n .filter((part) => part.length > 0)\n .join(\"\\n\");\n const suffix = run.timedOut ? \"\\n(stopped: the command timed out)\" : \"\";\n\n return text.length > limit\n ? `${text.slice(0, limit)}\\n… (output truncated)${suffix}`\n : `${text}${suffix}`;\n}\n"],"mappings":";;;;;;AA6BA,MAAa,gCAAgC;;AAG7C,MAAM,mBAAmB;;;;;;;;AASzB,SAAgB,gBAAgB,MAAM,QAAQ,IAAI,GAAW;CAC3D,IAAI;EACF,MAAM,WAAW,cAAc,KAAK,KAAK,KAAK,cAAc,CAAC,CAAC,CAAC,QAC7D,+BACF;EAEA,OAAO,KAAK,KAAK,KAAK,QAAQ,QAAQ,GAAG,OAAO,YAAY;CAC9D,QAAQ,CAER;CAEA,MAAM,UAAU,QAAQ,KAAK;CAE7B,IAAI,WAAW,mBAAmB,KAAK,KAAK,SAAS,OAAO,CAAC,GAAG,OAAO;CAEvE,MAAM,IAAI,MACR,4FACF;AACF;;;;;;;AAQA,MAAa,YAAuB,eAClC,IAAI,SAAS,YAAY;CACvB,MAAM,QAAQ,MAAM,QAAQ,UAAU,CAAC,WAAW,OAAO,GAAG,WAAW,IAAI,GAAG;EAC5E,KAAK,WAAW;EAChB,OAAO;GAAC;GAAU;GAAQ;EAAM;EAChC,aAAa;EACb,KAAK;GAAE,GAAG,QAAQ;GAAK,IAAI;GAAK,UAAU;GAAK,aAAa;EAAI;CAClE,CAAC;CACD,IAAI,SAAS;CACb,IAAI,SAAS;CACb,IAAI,WAAW;CAEf,MAAM,OAAO,YAAY,MAAM;CAC/B,MAAM,OAAO,YAAY,MAAM;CAC/B,MAAM,OAAO,GAAG,SAAS,UAAkB;EACzC,IAAI,OAAO,SAAS,kBAAkB,UAAU;CAClD,CAAC;CACD,MAAM,OAAO,GAAG,SAAS,UAAkB;EACzC,IAAI,OAAO,SAAS,kBAAkB,UAAU;CAClD,CAAC;CAED,MAAM,QAAQ,iBAAiB;EAC7B,WAAW;EACX,MAAM,KAAK,SAAS;CACtB,GAAG,WAAW,SAAS;CAEvB,IAAI,UAAU;CAEd,MAAM,UAAU,UAAyB,WAA0B;EACjE,IAAI,SAAS;EAEb,UAAU;EACV,aAAa,KAAK;EAClB,QAAQ;GAAE;GAAU;GAAQ;GAAQ;GAAQ;EAAS,CAAC;CACxD;CAEA,MAAM,GAAG,UAAU,UAAU;EAC3B,UAAU,GAAG,MAAM,QAAQ;EAC3B,OAAO,MAAM,IAAI;CACnB,CAAC;CACD,MAAM,GAAG,UAAU,MAAM,WAAW,OAAO,MAAM,MAAM,CAAC;AAC1D,CAAC;;AAGH,MAAM,gBAAgB,IAAI,OAAO,GAAG,OAAO,aAAa,EAAE,EAAE,sBAAsB,GAAG;;AAGrF,SAAgB,YAAY,KAAa,QAAQ,OAAmB;CAClE,MAAM,OAAO,CAAC,IAAI,QAAQ,IAAI,MAAM,CAAC,CAClC,KAAK,SAAS,KAAK,QAAQ,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CACrD,QAAQ,SAAS,KAAK,SAAS,CAAC,CAAC,CACjC,KAAK,IAAI;CACZ,MAAM,SAAS,IAAI,WAAW,uCAAuC;CAErE,OAAO,KAAK,SAAS,QACjB,GAAG,KAAK,MAAM,GAAG,KAAK,EAAE,wBAAwB,WAChD,GAAG,OAAO;AAChB"}
|
|
@@ -11,12 +11,16 @@
|
|
|
11
11
|
* still a correct (if larger) diff.
|
|
12
12
|
*/
|
|
13
13
|
/** Lines of context around each change. */
|
|
14
|
-
declare const DIFF_CONTEXT_LINES = 3;
|
|
14
|
+
export declare const DIFF_CONTEXT_LINES = 3;
|
|
15
15
|
/** Inputs of {@link unifiedDiff}. */
|
|
16
|
-
type UnifiedDiffInput = {
|
|
17
|
-
/** Project-relative POSIX path, used in the headers. */
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
export type UnifiedDiffInput = {
|
|
17
|
+
/** Project-relative POSIX path, used in the headers. */
|
|
18
|
+
path: string;
|
|
19
|
+
/** The old content; `null` when the file is created. */
|
|
20
|
+
before: string | null;
|
|
21
|
+
/** The new content; `null` when the file is deleted. */
|
|
22
|
+
after: string | null;
|
|
23
|
+
/** Lines of context. Default {@link DIFF_CONTEXT_LINES}. */
|
|
20
24
|
context?: number;
|
|
21
25
|
};
|
|
22
26
|
/**
|
|
@@ -31,7 +35,6 @@ type UnifiedDiffInput = {
|
|
|
31
35
|
* // a
|
|
32
36
|
* // +b
|
|
33
37
|
*/
|
|
34
|
-
declare function unifiedDiff(input: UnifiedDiffInput): string;
|
|
38
|
+
export declare function unifiedDiff(input: UnifiedDiffInput): string;
|
|
35
39
|
//#endregion
|
|
36
|
-
export { DIFF_CONTEXT_LINES, UnifiedDiffInput, unifiedDiff };
|
|
37
40
|
//# sourceMappingURL=unified-diff.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unified-diff.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/generate/unified-diff.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"unified-diff.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/generate/unified-diff.ts"],"mappings":";;;;;;;;;;;;;qBAaa;;YAuHD;;EAEV;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;wBAec,YAAY,OAAO"}
|
package/esm/tooling/index.d.mts
CHANGED
|
@@ -29,6 +29,7 @@ import { AppModuleImporter } from "./inspect/collect-packages.mjs";
|
|
|
29
29
|
import { InspectOptions, inspectApp, isInspectSection, parseInspectSections } from "./inspect/inspect-app.mjs";
|
|
30
30
|
import { InspectBootResult, bootForInspect, inspectOptionsFromBoot } from "./inspect/boot-for-inspect.mjs";
|
|
31
31
|
import { INSPECT_REPORT_JSON_SCHEMA } from "./inspect/inspect-report.schema.mjs";
|
|
32
|
+
import "./inspect/index.mjs";
|
|
32
33
|
import { DbSchema, DbSchemaColumn, DbSchemaTable, buildDbSchema } from "./mcp/db-schema.mjs";
|
|
33
34
|
import { DOCS_CORPUS_GLOBS, DocsCorpus, DocsSearchHit, DocsSection, loadDocsCorpus, readDocsFile, searchDocs, searchTerms, splitSections } from "./mcp/docs-search.mjs";
|
|
34
35
|
import { McpInputProperty, McpInputSchema, inputSchema, toStandardSchema, validateToolInput } from "./mcp/tool-input.mjs";
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { DoctorBootContext } from "../../cli/commands/doctor/check.types.mjs";
|
|
2
2
|
import { RecordedListener } from "./event-recorder.mjs";
|
|
3
3
|
import { InspectOptions } from "./inspect-app.mjs";
|
|
4
|
-
|
|
5
4
|
//#region ../../packages/core/src/tooling/inspect/boot-for-inspect.d.ts
|
|
6
5
|
/** What the boot pass observed, ready to hand to `inspectApp`. */
|
|
7
|
-
type InspectBootResult = {
|
|
6
|
+
export type InspectBootResult = {
|
|
8
7
|
context: DoctorBootContext;
|
|
9
|
-
events: RecordedListener[];
|
|
10
|
-
|
|
8
|
+
events: RecordedListener[];
|
|
9
|
+
/** Names resource classes by the export of their `*.resource.ts` module. */
|
|
10
|
+
resolveResourceName: (resource: unknown) => string | undefined;
|
|
11
|
+
/** Resource modules that could not be read while naming resources. */
|
|
11
12
|
warnings: string[];
|
|
12
13
|
};
|
|
13
14
|
/**
|
|
@@ -15,9 +16,8 @@ type InspectBootResult = {
|
|
|
15
16
|
* started, no connection opened and no port bound — while recording the event
|
|
16
17
|
* listeners app modules register.
|
|
17
18
|
*/
|
|
18
|
-
declare function bootForInspect(cwd?: string): Promise<InspectBootResult>;
|
|
19
|
+
export declare function bootForInspect(cwd?: string): Promise<InspectBootResult>;
|
|
19
20
|
/** The `inspectApp` inputs a boot pass provides. */
|
|
20
|
-
declare function inspectOptionsFromBoot(result: InspectBootResult): InspectOptions;
|
|
21
|
+
export declare function inspectOptionsFromBoot(result: InspectBootResult): InspectOptions;
|
|
21
22
|
//#endregion
|
|
22
|
-
export { InspectBootResult, bootForInspect, inspectOptionsFromBoot };
|
|
23
23
|
//# sourceMappingURL=boot-for-inspect.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot-for-inspect.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/inspect/boot-for-inspect.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"boot-for-inspect.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/inspect/boot-for-inspect.ts"],"mappings":";;;;;YAYY;EACV,SAAS;EACT,QAAQ;;EAER,sBAAsB;;EAEtB;;;;;;;wBAyBoB,eAAe,eAAsB,QAAQ;;wBAyBnD,uBAAuB,QAAQ,oBAAoB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import baseConfig from "@mongez/config";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
|
|
@@ -46,7 +46,7 @@ function configFileFor(cwd, section) {
|
|
|
46
46
|
* @param source The loaded config tree; defaults to everything `config` holds.
|
|
47
47
|
*/
|
|
48
48
|
function collectConfig(cwd, source) {
|
|
49
|
-
const tree = source ??
|
|
49
|
+
const tree = source ?? baseConfig.list();
|
|
50
50
|
const keys = [];
|
|
51
51
|
if (!isPlainObject(tree)) return keys;
|
|
52
52
|
const walk = (value, prefix, depth, file) => {
|
|
@@ -73,5 +73,5 @@ function collectConfig(cwd, source) {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
//#endregion
|
|
76
|
-
export { collectConfig };
|
|
76
|
+
export { collectConfig, configValueType };
|
|
77
77
|
//# sourceMappingURL=collect-config.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect-config.mjs","names":[
|
|
1
|
+
{"version":3,"file":"collect-config.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/inspect/collect-config.ts"],"sourcesContent":["import baseConfig from \"@mongez/config\";\nimport { existsSync } from \"node:fs\";\nimport path from \"node:path\";\nimport type { InspectConfigKey } from \"./inspect-report.types\";\n\n/** How deep nested config objects are walked. Deeper keys are reported as `object`. */\nconst MAX_DEPTH = 4;\n\n/** Extensions a `src/config/<name>` file may have. */\nconst CONFIG_EXTENSIONS = [\".ts\", \".tsx\", \".js\", \".mjs\"];\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null) return false;\n\n const prototype = Object.getPrototypeOf(value);\n\n return prototype === Object.prototype || prototype === null;\n}\n\n/** The JS type of a config value, without the value. */\nexport function configValueType(value: unknown): string {\n if (value === null) return \"null\";\n if (Array.isArray(value)) return \"array\";\n if (value instanceof RegExp) return \"regexp\";\n if (value instanceof Date) return \"date\";\n if (isPlainObject(value)) return \"object\";\n\n if (typeof value === \"object\") {\n const constructorName = Reflect.get(Object.getPrototypeOf(value) ?? {}, \"constructor\");\n\n return typeof constructorName === \"function\" && constructorName.name\n ? constructorName.name\n : \"object\";\n }\n\n return typeof value;\n}\n\nfunction configFileFor(cwd: string, section: string): string | null {\n for (const extension of CONFIG_EXTENSIONS) {\n const relative = `src/config/${section}${extension}`;\n\n if (existsSync(path.join(cwd, relative))) return relative;\n }\n\n return null;\n}\n\n/**\n * Every loaded config key as a dotted path with its type — NEVER its value,\n * because config holds secrets. Plain objects are walked up to\n * {@link MAX_DEPTH} levels; arrays, class instances and functions are leaves.\n *\n * @param cwd Project root, used to name the `src/config/*` file of each section.\n * @param source The loaded config tree; defaults to everything `config` holds.\n */\nexport function collectConfig(cwd: string, source?: Record<string, unknown>): InspectConfigKey[] {\n const tree: unknown = source ?? baseConfig.list();\n const keys: InspectConfigKey[] = [];\n\n if (!isPlainObject(tree)) return keys;\n\n const walk = (value: unknown, prefix: string, depth: number, file: string | null) => {\n if (isPlainObject(value) && depth < MAX_DEPTH && Object.keys(value).length > 0) {\n for (const [key, child] of Object.entries(value)) {\n walk(child, `${prefix}.${key}`, depth + 1, file);\n }\n\n return;\n }\n\n keys.push({ key: prefix, type: configValueType(value), file });\n };\n\n for (const [section, value] of Object.entries(tree)) {\n const file = configFileFor(cwd, section);\n\n if (isPlainObject(value) && Object.keys(value).length > 0) {\n for (const [key, child] of Object.entries(value)) {\n walk(child, `${section}.${key}`, 2, file);\n }\n } else {\n keys.push({ key: section, type: configValueType(value), file });\n }\n }\n\n return keys.sort((first, second) => first.key.localeCompare(second.key));\n}\n"],"mappings":";;;;;;AAMA,MAAM,YAAY;;AAGlB,MAAM,oBAAoB;CAAC;CAAO;CAAQ;CAAO;AAAM;AAEvD,SAAS,cAAc,OAAkD;CACvE,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CAExD,MAAM,YAAY,OAAO,eAAe,KAAK;CAE7C,OAAO,cAAc,OAAO,aAAa,cAAc;AACzD;;AAGA,SAAgB,gBAAgB,OAAwB;CACtD,IAAI,UAAU,MAAM,OAAO;CAC3B,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO;CACjC,IAAI,iBAAiB,QAAQ,OAAO;CACpC,IAAI,iBAAiB,MAAM,OAAO;CAClC,IAAI,cAAc,KAAK,GAAG,OAAO;CAEjC,IAAI,OAAO,UAAU,UAAU;EAC7B,MAAM,kBAAkB,QAAQ,IAAI,OAAO,eAAe,KAAK,KAAK,CAAC,GAAG,aAAa;EAErF,OAAO,OAAO,oBAAoB,cAAc,gBAAgB,OAC5D,gBAAgB,OAChB;CACN;CAEA,OAAO,OAAO;AAChB;AAEA,SAAS,cAAc,KAAa,SAAgC;CAClE,KAAK,MAAM,aAAa,mBAAmB;EACzC,MAAM,WAAW,cAAc,UAAU;EAEzC,IAAI,WAAW,KAAK,KAAK,KAAK,QAAQ,CAAC,GAAG,OAAO;CACnD;CAEA,OAAO;AACT;;;;;;;;;AAUA,SAAgB,cAAc,KAAa,QAAsD;CAC/F,MAAM,OAAgB,UAAU,WAAW,KAAK;CAChD,MAAM,OAA2B,CAAC;CAElC,IAAI,CAAC,cAAc,IAAI,GAAG,OAAO;CAEjC,MAAM,QAAQ,OAAgB,QAAgB,OAAe,SAAwB;EACnF,IAAI,cAAc,KAAK,KAAK,QAAQ,aAAa,OAAO,KAAK,KAAK,CAAC,CAAC,SAAS,GAAG;GAC9E,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,KAAK,GAC7C,KAAK,OAAO,GAAG,OAAO,GAAG,OAAO,QAAQ,GAAG,IAAI;GAGjD;EACF;EAEA,KAAK,KAAK;GAAE,KAAK;GAAQ,MAAM,gBAAgB,KAAK;GAAG;EAAK,CAAC;CAC/D;CAEA,KAAK,MAAM,CAAC,SAAS,UAAU,OAAO,QAAQ,IAAI,GAAG;EACnD,MAAM,OAAO,cAAc,KAAK,OAAO;EAEvC,IAAI,cAAc,KAAK,KAAK,OAAO,KAAK,KAAK,CAAC,CAAC,SAAS,GACtD,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,KAAK,GAC7C,KAAK,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI;OAG1C,KAAK,KAAK;GAAE,KAAK;GAAS,MAAM,gBAAgB,KAAK;GAAG;EAAK,CAAC;CAElE;CAEA,OAAO,KAAK,MAAM,OAAO,WAAW,MAAM,IAAI,cAAc,OAAO,GAAG,CAAC;AACzE"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import "../../openapi/schema-registry.mjs";
|
|
1
2
|
//#region ../../packages/core/src/tooling/inspect/collect-models.d.ts
|
|
2
3
|
/** A model module the boot pass imported: its file and its exports. */
|
|
3
|
-
type InspectModelModule = {
|
|
4
|
-
/** Project-relative path. */
|
|
4
|
+
export type InspectModelModule = {
|
|
5
|
+
/** Project-relative path. */
|
|
6
|
+
file: string;
|
|
5
7
|
exports: Record<string, unknown>;
|
|
6
8
|
};
|
|
7
9
|
//#endregion
|
|
8
|
-
export { InspectModelModule };
|
|
9
10
|
//# sourceMappingURL=collect-models.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect-models.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/inspect/collect-models.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"collect-models.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/inspect/collect-models.ts"],"mappings":";;;YAaY;;EAEV;EACA,SAAS"}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* module instance (and registry) the app's own modules populated. Resolves to
|
|
5
5
|
* `undefined` when the app does not have the package.
|
|
6
6
|
*/
|
|
7
|
-
type AppModuleImporter = (specifier: string) => Promise<unknown>;
|
|
7
|
+
export type AppModuleImporter = (specifier: string) => Promise<unknown>;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { AppModuleImporter };
|
|
10
9
|
//# sourceMappingURL=collect-packages.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect-packages.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/inspect/collect-packages.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"collect-packages.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/inspect/collect-packages.ts"],"mappings":";;;;;;YAgBY,qBAAqB,sBAAsB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { connectorsManager } from "../../connectors/connectors-manager.mjs";
|
|
2
|
+
import { declarationName, hasModifier, isExportDeclaration, isFunctionDeclaration, isIdentifier, isVariableStatement, nameNode, parseSourceFile, topLevelDeclarations, valueText } from "../syntax/ast.mjs";
|
|
2
3
|
import path from "node:path";
|
|
3
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
|
-
import ts from "typescript";
|
|
5
5
|
|
|
6
6
|
//#region ../../packages/core/src/tooling/inspect/collect-pages.ts
|
|
7
7
|
function isInstalledPage(value) {
|
|
@@ -45,7 +45,7 @@ function layoutChainOf(pageFile, cwd) {
|
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* Whether a module's source exports a binding named `name`, read with the
|
|
48
|
-
*
|
|
48
|
+
* OXC parser (the page files are TSX that Node cannot import directly).
|
|
49
49
|
*/
|
|
50
50
|
function exportsName(file, name) {
|
|
51
51
|
let source;
|
|
@@ -54,14 +54,14 @@ function exportsName(file, name) {
|
|
|
54
54
|
} catch {
|
|
55
55
|
return false;
|
|
56
56
|
}
|
|
57
|
-
const sourceFile =
|
|
58
|
-
for (const statement of sourceFile
|
|
59
|
-
const exported =
|
|
60
|
-
if (exported &&
|
|
61
|
-
if (statement.
|
|
57
|
+
const sourceFile = parseSourceFile(file, source);
|
|
58
|
+
for (const statement of topLevelDeclarations(sourceFile)) {
|
|
59
|
+
const exported = hasModifier(statement, "export");
|
|
60
|
+
if (exported && isVariableStatement(statement)) {
|
|
61
|
+
if (statement.declarations.some((declaration) => isIdentifier(nameNode(declaration)) && valueText(declaration.id) === name)) return true;
|
|
62
62
|
}
|
|
63
|
-
if (exported &&
|
|
64
|
-
if (
|
|
63
|
+
if (exported && isFunctionDeclaration(statement) && declarationName(statement) === name) return true;
|
|
64
|
+
if (isExportDeclaration(statement) && statement.specifiers.some((element) => valueText(element.exported) === name)) return true;
|
|
65
65
|
}
|
|
66
66
|
return false;
|
|
67
67
|
}
|
|
@@ -104,5 +104,5 @@ function collectPages(pages, cwd, warnings) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
//#endregion
|
|
107
|
-
export { collectPages, installedPagesFromConnectors };
|
|
107
|
+
export { collectPages, exportsName, installedPagesFromConnectors, layoutChainOf };
|
|
108
108
|
//# sourceMappingURL=collect-pages.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect-pages.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/inspect/collect-pages.ts"],"sourcesContent":["import { existsSync, readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport
|
|
1
|
+
{"version":3,"file":"collect-pages.mjs","names":["ast.parseSourceFile","ast.topLevelDeclarations","ast.hasModifier","ast.isVariableStatement","ast.isIdentifier","ast.nameNode","ast.valueText","ast.isFunctionDeclaration","ast.declarationName","ast.isExportDeclaration"],"sources":["../../../../../../../../../packages/core/src/tooling/inspect/collect-pages.ts"],"sourcesContent":["import { existsSync, readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport * as ast from \"../syntax/ast\";\nimport { connectorsManager } from \"../../connectors/connectors-manager\";\nimport type { InspectPage, InspectWarning } from \"./inspect-report.types\";\n\n/** The fields of `@warlock.js/web`'s installed page record that inspect reads. */\ntype InstalledPageLike = {\n path: string;\n name?: unknown;\n file: string;\n actions?: unknown;\n guard?: unknown;\n};\n\nfunction isInstalledPage(value: unknown): value is InstalledPageLike {\n return (\n typeof value === \"object\" &&\n value !== null &&\n typeof Reflect.get(value, \"path\") === \"string\" &&\n typeof Reflect.get(value, \"file\") === \"string\"\n );\n}\n\n/**\n * The pages the `web` connector installed, read through its public\n * `getInstalledPages()` without importing `@warlock.js/web`. `undefined` when\n * no such connector is registered (an API-only app).\n */\nexport function installedPagesFromConnectors(): unknown[] | undefined {\n const web = connectorsManager.list().find((connector) => connector.name === \"web\");\n const read = web ? Reflect.get(web, \"getInstalledPages\") : undefined;\n\n if (typeof read !== \"function\") return undefined;\n\n const pages: unknown = read.call(web);\n\n return Array.isArray(pages) ? pages : undefined;\n}\n\nfunction toPosix(file: string): string {\n return file.split(path.sep).join(\"/\");\n}\n\nfunction relativeTo(cwd: string, file: string): string {\n return toPosix(path.isAbsolute(file) ? path.relative(cwd, file) : file);\n}\n\n/**\n * The page's layout chain, outermost first: every `layout.tsx` from the web\n * root (the nearest ancestor holding `root.tsx`, else `src/`) down to the\n * page's own directory — the rule `@warlock.js/web` applies.\n */\nexport function layoutChainOf(pageFile: string, cwd: string): string[] {\n const srcRoot = path.join(cwd, \"src\");\n const directories: string[] = [];\n let current = path.dirname(pageFile);\n\n while (current.startsWith(srcRoot)) {\n directories.unshift(current);\n\n if (existsSync(path.join(current, \"root.tsx\")) || current === srcRoot) break;\n\n const parent = path.dirname(current);\n\n if (parent === current) break;\n\n current = parent;\n }\n\n return directories\n .map((directory) => path.join(directory, \"layout.tsx\"))\n .filter((candidate) => existsSync(candidate));\n}\n\n/**\n * Whether a module's source exports a binding named `name`, read with the\n * OXC parser (the page files are TSX that Node cannot import directly).\n */\nexport function exportsName(file: string, name: string): boolean {\n let source: string;\n\n try {\n source = readFileSync(file, \"utf8\");\n } catch {\n return false;\n }\n\n const sourceFile = ast.parseSourceFile(file, source);\n\n for (const statement of ast.topLevelDeclarations(sourceFile)) {\n const exported = ast.hasModifier(statement, \"export\");\n\n if (exported && ast.isVariableStatement(statement)) {\n if (\n statement.declarations.some(\n (declaration) =>\n ast.isIdentifier(ast.nameNode(declaration)) && ast.valueText(declaration.id) === name,\n )\n ) {\n return true;\n }\n }\n\n if (\n exported &&\n ast.isFunctionDeclaration(statement) &&\n ast.declarationName(statement) === name\n ) {\n return true;\n }\n\n if (\n ast.isExportDeclaration(statement) &&\n statement.specifiers.some((element) => ast.valueText(element.exported) === name)\n ) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Describe the installed pages: route path and name, page file, layout chain,\n * the files on that chain exporting a `loader`, actions and guard.\n *\n * @param pages The connector's installed page records; see {@link installedPagesFromConnectors}.\n */\nexport function collectPages(\n pages: readonly unknown[] | undefined,\n cwd: string,\n warnings: InspectWarning[],\n): InspectPage[] {\n if (!pages) return [];\n\n const collected: InspectPage[] = [];\n\n for (const page of pages) {\n if (!isInstalledPage(page)) {\n warnings.push({ code: null, message: \"A page record has no path or file.\", source: \"pages\" });\n continue;\n }\n\n const pageFile = path.isAbsolute(page.file) ? page.file : path.join(cwd, page.file);\n const layouts = layoutChainOf(pageFile, cwd);\n const loaders = [...layouts, pageFile].filter((file) => exportsName(file, \"loader\"));\n const actions = Array.isArray(page.actions)\n ? page.actions.filter((action): action is string => typeof action === \"string\")\n : [];\n\n collected.push({\n path: page.path,\n name: typeof page.name === \"string\" && page.name.length > 0 ? page.name : null,\n file: relativeTo(cwd, pageFile),\n layouts: layouts.map((file) => relativeTo(cwd, file)),\n loaders: loaders.map((file) => relativeTo(cwd, file)),\n actions: [...actions].sort(),\n guard: typeof page.guard === \"string\" ? page.guard : null,\n });\n }\n\n return collected.sort((first, second) => {\n if (first.path !== second.path) return first.path < second.path ? -1 : 1;\n\n return first.file.localeCompare(second.file);\n });\n}\n"],"mappings":";;;;;;AAeA,SAAS,gBAAgB,OAA4C;CACnE,OACE,OAAO,UAAU,YACjB,UAAU,QACV,OAAO,QAAQ,IAAI,OAAO,MAAM,MAAM,YACtC,OAAO,QAAQ,IAAI,OAAO,MAAM,MAAM;AAE1C;;;;;;AAOA,SAAgB,+BAAsD;CACpE,MAAM,MAAM,kBAAkB,KAAK,CAAC,CAAC,MAAM,cAAc,UAAU,SAAS,KAAK;CACjF,MAAM,OAAO,MAAM,QAAQ,IAAI,KAAK,mBAAmB,IAAI;CAE3D,IAAI,OAAO,SAAS,YAAY,OAAO;CAEvC,MAAM,QAAiB,KAAK,KAAK,GAAG;CAEpC,OAAO,MAAM,QAAQ,KAAK,IAAI,QAAQ;AACxC;AAEA,SAAS,QAAQ,MAAsB;CACrC,OAAO,KAAK,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG;AACtC;AAEA,SAAS,WAAW,KAAa,MAAsB;CACrD,OAAO,QAAQ,KAAK,WAAW,IAAI,IAAI,KAAK,SAAS,KAAK,IAAI,IAAI,IAAI;AACxE;;;;;;AAOA,SAAgB,cAAc,UAAkB,KAAuB;CACrE,MAAM,UAAU,KAAK,KAAK,KAAK,KAAK;CACpC,MAAM,cAAwB,CAAC;CAC/B,IAAI,UAAU,KAAK,QAAQ,QAAQ;CAEnC,OAAO,QAAQ,WAAW,OAAO,GAAG;EAClC,YAAY,QAAQ,OAAO;EAE3B,IAAI,WAAW,KAAK,KAAK,SAAS,UAAU,CAAC,KAAK,YAAY,SAAS;EAEvE,MAAM,SAAS,KAAK,QAAQ,OAAO;EAEnC,IAAI,WAAW,SAAS;EAExB,UAAU;CACZ;CAEA,OAAO,YACJ,KAAK,cAAc,KAAK,KAAK,WAAW,YAAY,CAAC,CAAC,CACtD,QAAQ,cAAc,WAAW,SAAS,CAAC;AAChD;;;;;AAMA,SAAgB,YAAY,MAAc,MAAuB;CAC/D,IAAI;CAEJ,IAAI;EACF,SAAS,aAAa,MAAM,MAAM;CACpC,QAAQ;EACN,OAAO;CACT;CAEA,MAAM,aAAaA,gBAAoB,MAAM,MAAM;CAEnD,KAAK,MAAM,aAAaC,qBAAyB,UAAU,GAAG;EAC5D,MAAM,WAAWC,YAAgB,WAAW,QAAQ;EAEpD,IAAI,YAAYC,oBAAwB,SAAS,GAC/C;OACE,UAAU,aAAa,MACpB,gBACCC,aAAiBC,SAAa,WAAW,CAAC,KAAKC,UAAc,YAAY,EAAE,MAAM,IACrF,GAEA,OAAO;EACT;EAGF,IACE,YACAC,sBAA0B,SAAS,KACnCC,gBAAoB,SAAS,MAAM,MAEnC,OAAO;EAGT,IACEC,oBAAwB,SAAS,KACjC,UAAU,WAAW,MAAM,YAAYH,UAAc,QAAQ,QAAQ,MAAM,IAAI,GAE/E,OAAO;CAEX;CAEA,OAAO;AACT;;;;;;;AAQA,SAAgB,aACd,OACA,KACA,UACe;CACf,IAAI,CAAC,OAAO,OAAO,CAAC;CAEpB,MAAM,YAA2B,CAAC;CAElC,KAAK,MAAM,QAAQ,OAAO;EACxB,IAAI,CAAC,gBAAgB,IAAI,GAAG;GAC1B,SAAS,KAAK;IAAE,MAAM;IAAM,SAAS;IAAsC,QAAQ;GAAQ,CAAC;GAC5F;EACF;EAEA,MAAM,WAAW,KAAK,WAAW,KAAK,IAAI,IAAI,KAAK,OAAO,KAAK,KAAK,KAAK,KAAK,IAAI;EAClF,MAAM,UAAU,cAAc,UAAU,GAAG;EAC3C,MAAM,UAAU,CAAC,GAAG,SAAS,QAAQ,CAAC,CAAC,QAAQ,SAAS,YAAY,MAAM,QAAQ,CAAC;EACnF,MAAM,UAAU,MAAM,QAAQ,KAAK,OAAO,IACtC,KAAK,QAAQ,QAAQ,WAA6B,OAAO,WAAW,QAAQ,IAC5E,CAAC;EAEL,UAAU,KAAK;GACb,MAAM,KAAK;GACX,MAAM,OAAO,KAAK,SAAS,YAAY,KAAK,KAAK,SAAS,IAAI,KAAK,OAAO;GAC1E,MAAM,WAAW,KAAK,QAAQ;GAC9B,SAAS,QAAQ,KAAK,SAAS,WAAW,KAAK,IAAI,CAAC;GACpD,SAAS,QAAQ,KAAK,SAAS,WAAW,KAAK,IAAI,CAAC;GACpD,SAAS,CAAC,GAAG,OAAO,CAAC,CAAC,KAAK;GAC3B,OAAO,OAAO,KAAK,UAAU,WAAW,KAAK,QAAQ;EACvD,CAAC;CACH;CAEA,OAAO,UAAU,MAAM,OAAO,WAAW;EACvC,IAAI,MAAM,SAAS,OAAO,MAAM,OAAO,MAAM,OAAO,OAAO,OAAO,KAAK;EAEvE,OAAO,MAAM,KAAK,cAAc,OAAO,IAAI;CAC7C,CAAC;AACH"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { InspectEvent } from "./inspect-report.types.mjs";
|
|
2
|
-
|
|
3
2
|
//#region ../../packages/core/src/tooling/inspect/event-recorder.d.ts
|
|
4
3
|
/** One listener an app module registered. */
|
|
5
|
-
type RecordedListener = {
|
|
6
|
-
event: string;
|
|
7
|
-
|
|
4
|
+
export type RecordedListener = {
|
|
5
|
+
event: string;
|
|
6
|
+
/** The listener's function name, `"anonymous"` when it has none. */
|
|
7
|
+
name: string;
|
|
8
|
+
/** Project-relative file whose import registered it. */
|
|
8
9
|
sourceFile: string;
|
|
9
10
|
};
|
|
10
11
|
/**
|
|
@@ -17,7 +18,7 @@ type RecordedListener = {
|
|
|
17
18
|
* at that moment. Listeners registered outside an app module import (by the
|
|
18
19
|
* framework itself) are not app facts and are not recorded.
|
|
19
20
|
*/
|
|
20
|
-
declare class EventRecorder {
|
|
21
|
+
export declare class EventRecorder {
|
|
21
22
|
private readonly records;
|
|
22
23
|
private readonly restores;
|
|
23
24
|
/**
|
|
@@ -31,7 +32,6 @@ declare class EventRecorder {
|
|
|
31
32
|
list(): RecordedListener[];
|
|
32
33
|
}
|
|
33
34
|
/** Group recorded listeners by event, sorted, for the report. */
|
|
34
|
-
declare function groupListeners(records: readonly RecordedListener[]): InspectEvent[];
|
|
35
|
+
export declare function groupListeners(records: readonly RecordedListener[]): InspectEvent[];
|
|
35
36
|
//#endregion
|
|
36
|
-
export { EventRecorder, RecordedListener, groupListeners };
|
|
37
37
|
//# sourceMappingURL=event-recorder.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-recorder.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/inspect/event-recorder.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"event-recorder.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/inspect/event-recorder.ts"],"mappings":";;;YAIY;EACV;;EAEA;;EAEA;;;;;;;;;;;;qBA6CW;mBACM;mBAEA;;;;;EAMV,MAAM;;EAmCN;;EASA,QAAQ;;;wBAMD,eAAe,kBAAkB,qBAAqB"}
|
|
@@ -4,4 +4,5 @@ import { InspectModelModule } from "./collect-models.mjs";
|
|
|
4
4
|
import { AppModuleImporter } from "./collect-packages.mjs";
|
|
5
5
|
import { InspectOptions, inspectApp, isInspectSection, parseInspectSections } from "./inspect-app.mjs";
|
|
6
6
|
import { InspectBootResult, bootForInspect, inspectOptionsFromBoot } from "./boot-for-inspect.mjs";
|
|
7
|
-
import { INSPECT_REPORT_JSON_SCHEMA } from "./inspect-report.schema.mjs";
|
|
7
|
+
import { INSPECT_REPORT_JSON_SCHEMA } from "./inspect-report.schema.mjs";
|
|
8
|
+
export { type AppModuleImporter, EventRecorder, INSPECT_REPORT_JSON_SCHEMA, INSPECT_SCHEMA_VERSION, INSPECT_SECTIONS, type InspectBootResult, InspectConfigKey, InspectEvent, InspectJob, InspectModel, InspectModelColumn, type InspectModelModule, InspectModelRelation, type InspectOptions, InspectPackage, InspectPage, InspectParameter, InspectReport, InspectResource, InspectRoute, InspectRouteAuth, InspectRouteLogging, InspectRouteRateLimit, InspectSchedule, InspectSection, InspectWarning, JsonSchema, type RecordedListener, bootForInspect, groupListeners, inspectApp, inspectOptionsFromBoot, isInspectSection, parseInspectSections };
|
|
@@ -4,4 +4,4 @@ import { INSPECT_SCHEMA_VERSION, INSPECT_SECTIONS } from "./inspect-report.types
|
|
|
4
4
|
import { inspectApp, isInspectSection, parseInspectSections } from "./inspect-app.mjs";
|
|
5
5
|
import { INSPECT_REPORT_JSON_SCHEMA } from "./inspect-report.schema.mjs";
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { EventRecorder, INSPECT_REPORT_JSON_SCHEMA, INSPECT_SCHEMA_VERSION, INSPECT_SECTIONS, bootForInspect, groupListeners, inspectApp, inspectOptionsFromBoot, isInspectSection, parseInspectSections };
|
|
@@ -3,37 +3,47 @@ import { InspectReport, InspectSection, InspectWarning } from "./inspect-report.
|
|
|
3
3
|
import { RecordedListener } from "./event-recorder.mjs";
|
|
4
4
|
import { InspectModelModule } from "./collect-models.mjs";
|
|
5
5
|
import { AppModuleImporter } from "./collect-packages.mjs";
|
|
6
|
-
|
|
7
6
|
//#region ../../packages/core/src/tooling/inspect/inspect-app.d.ts
|
|
8
7
|
/** Inputs of {@link inspectApp}. Every field is optional. */
|
|
9
|
-
type InspectOptions = {
|
|
10
|
-
/** Project root. Default: `process.cwd()`. */
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
export type InspectOptions = {
|
|
9
|
+
/** Project root. Default: `process.cwd()`. */
|
|
10
|
+
cwd?: string;
|
|
11
|
+
/** The sections to include. Default: all of {@link INSPECT_SECTIONS}. */
|
|
12
|
+
sections?: readonly InspectSection[];
|
|
13
|
+
/** The routes to describe. Default: `router.list()`. */
|
|
14
|
+
routes?: readonly Route[];
|
|
15
|
+
/** Model modules the boot pass imported (their exports are scanned for model classes). */
|
|
16
|
+
modelModules?: readonly InspectModelModule[];
|
|
17
|
+
/** Listeners recorded while app modules were imported (see `EventRecorder`). */
|
|
18
|
+
events?: readonly RecordedListener[];
|
|
19
|
+
/** Warnings found before inspecting (by the boot pass); listed first. */
|
|
20
|
+
warnings?: readonly InspectWarning[];
|
|
21
|
+
/** App modules that failed to import; each becomes a `WL2001` warning. */
|
|
16
22
|
moduleFailures?: readonly {
|
|
17
23
|
file: string;
|
|
18
24
|
message: string;
|
|
19
|
-
}[];
|
|
25
|
+
}[];
|
|
26
|
+
/** The `web` connector's installed pages. Default: read from the registered connectors. */
|
|
20
27
|
pages?: readonly unknown[];
|
|
21
28
|
/**
|
|
22
29
|
* Name a resource class in `components.schemas`, usually by its export name
|
|
23
30
|
* (`PostResource`). Unnamed resources fall back to the class name.
|
|
24
31
|
*/
|
|
25
|
-
resolveResourceName?: (resource: unknown) => string | undefined;
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
resolveResourceName?: (resource: unknown) => string | undefined;
|
|
33
|
+
/** The loaded config tree. Default: everything `config` holds. */
|
|
34
|
+
config?: Record<string, unknown>;
|
|
35
|
+
/** How packages are imported as the app resolves them (`@warlock.js/queue`, `/scheduler`). */
|
|
36
|
+
importFromApp?: AppModuleImporter;
|
|
37
|
+
/** Clock, for `generatedAt`. */
|
|
28
38
|
now?: () => Date;
|
|
29
39
|
};
|
|
30
40
|
/** Whether a string is a section name. */
|
|
31
|
-
declare function isInspectSection(value: string): value is InspectSection;
|
|
41
|
+
export declare function isInspectSection(value: string): value is InspectSection;
|
|
32
42
|
/**
|
|
33
43
|
* Parse a `--section routes,models` value. Throws on an unknown name, listing
|
|
34
44
|
* the valid ones. An empty value means every section.
|
|
35
45
|
*/
|
|
36
|
-
declare function parseInspectSections(value: string | undefined): InspectSection[];
|
|
46
|
+
export declare function parseInspectSections(value: string | undefined): InspectSection[];
|
|
37
47
|
/**
|
|
38
48
|
* Describe the application from its in-process registries: routes, models,
|
|
39
49
|
* resources, config keys, event listeners, pages, queue jobs, scheduled
|
|
@@ -47,7 +57,6 @@ declare function parseInspectSections(value: string | undefined): InspectSection
|
|
|
47
57
|
* const report = await inspectApp({ sections: ["routes"] });
|
|
48
58
|
* report.routes?.filter((route) => !route.auth.required && route.method !== "GET");
|
|
49
59
|
*/
|
|
50
|
-
declare function inspectApp(options?: InspectOptions): Promise<InspectReport>;
|
|
60
|
+
export declare function inspectApp(options?: InspectOptions): Promise<InspectReport>;
|
|
51
61
|
//#endregion
|
|
52
|
-
export { InspectOptions, inspectApp, isInspectSection, parseInspectSections };
|
|
53
62
|
//# sourceMappingURL=inspect-app.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspect-app.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/inspect/inspect-app.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"inspect-app.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/inspect/inspect-app.ts"],"mappings":";;;;;;;YA0BY;;EAEV;;EAEA,oBAAoB;;EAEpB,kBAAkB;;EAElB,wBAAwB;;EAExB,kBAAkB;;EAElB,oBAAoB;;EAEpB;IAA4B;IAAc;;;EAE1C;;;;;EAKA,uBAAuB;;EAEvB,SAAS;;EAET,gBAAgB;;EAEhB,YAAY;;;wBAIE,iBAAiB,gBAAgB,SAAS;;;;;wBAQ1C,qBAAqB,4BAA4B;;;;;;;;;;;;;;wBA+B3C,WAAW,UAAS,iBAAsB,QAAQ"}
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
* validator written today must accept tomorrow's reports.
|
|
10
10
|
*/
|
|
11
11
|
/** The report's JSON Schema, draft 2020-12. */
|
|
12
|
-
declare const INSPECT_REPORT_JSON_SCHEMA: Record<string, unknown>;
|
|
12
|
+
export declare const INSPECT_REPORT_JSON_SCHEMA: Record<string, unknown>;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { INSPECT_REPORT_JSON_SCHEMA };
|
|
15
14
|
//# sourceMappingURL=inspect-report.schema.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspect-report.schema.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/inspect/inspect-report.schema.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"inspect-report.schema.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tooling/inspect/inspect-report.schema.ts"],"mappings":";;;;;;;;;;;qBAkRa,4BAA4B"}
|