@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":"extract-translation-keys.mjs","names":[],"sources":["../../../../../../../../packages/core/src/dev-server/extract-translation-keys.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"extract-translation-keys.mjs","names":["ast.isCallExpression","ast.isIdentifier","ast.expressionOf","ast.valueText","ast.isStringLiteral","ast.isObjectLiteralExpression","ast.isPropertyAssignment","ast.keyName"],"sources":["../../../../../../../../packages/core/src/dev-server/extract-translation-keys.ts"],"sourcesContent":["import * as ast from \"../tooling/syntax/ast\";\n\n/**\n * Extract literal lookup keys registered through `groupedTranslations` calls,\n * statically, without executing the source.\n *\n * Handles both call shapes:\n * - Named-group: `groupedTranslations(\"site\", { home: { en, ar } })`\n * - Object: `groupedTranslations({ site: { home: { en, ar } } })`\n *\n * Groups nest to any depth (`{ detail: { title: { en, ar } } }` yields\n * `products.detail.title`) — an object is a leaf once none of its own\n * properties hold a further object literal.\n *\n * A dynamic group name, dictionary, or property key (an identifier, spread,\n * or computed name instead of a literal) cannot be resolved statically and is\n * silently skipped; such keys must be documented by the app author instead.\n */\nexport function extractTranslationKeys(sourceFile: ast.SourceFile): string[] {\n const keys = new Set<string>();\n\n const visit = (node: ast.Node): void => {\n if (isGroupedTranslationsCall(node)) {\n collectFromCall(node, keys);\n }\n\n ast.forEachChild(node, visit);\n };\n\n ast.forEachChild(sourceFile, visit);\n\n return Array.from(keys).sort();\n}\n\nfunction isGroupedTranslationsCall(node: ast.Node): node is ast.CallExpression {\n return (\n ast.isCallExpression(node) &&\n ast.isIdentifier(ast.expressionOf(node)) &&\n ast.valueText(ast.expressionOf(node)) === \"groupedTranslations\"\n );\n}\n\nfunction collectFromCall(call: ast.CallExpression, keys: Set<string>): void {\n const [first, second] = call.arguments;\n\n if (first === undefined) return;\n\n if (second !== undefined) {\n if (ast.isStringLiteral(first) && ast.isObjectLiteralExpression(second)) {\n collectLeaves(second, ast.valueText(first), keys);\n }\n return;\n }\n\n if (ast.isObjectLiteralExpression(first)) {\n for (const property of first.properties) {\n if (!ast.isPropertyAssignment(property)) continue;\n\n const groupName = getPropertyName(property.key);\n if (groupName === undefined) continue;\n\n if (ast.isObjectLiteralExpression(property.value)) {\n collectLeaves(property.value, groupName, keys);\n }\n }\n }\n}\n\nfunction collectLeaves(object: ast.ObjectExpression, prefix: string, keys: Set<string>): void {\n for (const property of object.properties) {\n if (!ast.isPropertyAssignment(property)) continue;\n\n const key = getPropertyName(property.key);\n if (key === undefined) continue;\n\n if (!ast.isObjectLiteralExpression(property.value)) continue;\n\n const path = `${prefix}.${key}`;\n\n if (isLeaf(property.value)) {\n keys.add(path);\n } else {\n collectLeaves(property.value, path, keys);\n }\n }\n}\n\n/** A locale map (`{ en: \"...\", ar: \"...\" }`) has no object-literal children. */\nfunction isLeaf(object: ast.ObjectExpression): boolean {\n return !object.properties.some(\n (property) =>\n ast.isPropertyAssignment(property) && ast.isObjectLiteralExpression(property.value),\n );\n}\n\nfunction getPropertyName(name: ast.Node | undefined): string | undefined {\n return ast.keyName(name);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,SAAgB,uBAAuB,YAAsC;CAC3E,MAAM,uBAAO,IAAI,IAAY;CAE7B,MAAM,SAAS,SAAyB;EACtC,IAAI,0BAA0B,IAAI,GAChC,gBAAgB,MAAM,IAAI;EAG5B,aAAiB,MAAM,KAAK;CAC9B;CAEA,aAAiB,YAAY,KAAK;CAElC,OAAO,MAAM,KAAK,IAAI,C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import { FileManifest, FileState, FileType } from "./types.mjs";
|
|
2
2
|
import { FileOperations } from "./file-operations.mjs";
|
|
3
|
-
|
|
4
3
|
//#region ../../packages/core/src/dev-server/file-manager.d.ts
|
|
5
|
-
type CleanupFunction = () => void;
|
|
4
|
+
export type CleanupFunction = () => void;
|
|
6
5
|
/**
|
|
7
6
|
* FileManager — per-file metadata for the dependency graph.
|
|
8
7
|
*
|
|
@@ -11,7 +10,7 @@ type CleanupFunction = () => void;
|
|
|
11
10
|
* and parse its imports. Its job is keeping the metadata that the
|
|
12
11
|
* orchestrator needs to invalidate dependents on change.
|
|
13
12
|
*/
|
|
14
|
-
declare class FileManager {
|
|
13
|
+
export declare class FileManager {
|
|
15
14
|
readonly absolutePath: string;
|
|
16
15
|
files: Map<string, FileManager>;
|
|
17
16
|
fileOperations: FileOperations;
|
|
@@ -59,9 +58,7 @@ declare class FileManager {
|
|
|
59
58
|
* @param force - re-parse even when the hash matches.
|
|
60
59
|
* @returns true if the file was (re)parsed.
|
|
61
60
|
*/
|
|
62
|
-
process({
|
|
63
|
-
force
|
|
64
|
-
}?: {
|
|
61
|
+
process({ force }?: {
|
|
65
62
|
force?: boolean;
|
|
66
63
|
}): Promise<boolean>;
|
|
67
64
|
/**
|
|
@@ -81,5 +78,4 @@ declare class FileManager {
|
|
|
81
78
|
toManifest(): FileManifest;
|
|
82
79
|
}
|
|
83
80
|
//#endregion
|
|
84
|
-
export { FileManager };
|
|
85
81
|
//# sourceMappingURL=file-manager.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-manager.d.mts","names":[],"sources":["../../../../../../../../packages/core/src/dev-server/file-manager.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-manager.d.mts","names":[],"sources":["../../../../../../../../packages/core/src/dev-server/file-manager.ts"],"mappings":";;;YASY;;;;;;;;;qBAyBC;WAgCO;EACT,OAAO,YAAY;EACnB,gBAAgB;EAjClB;EACA;EACA;EACA;;EAGA,cAAY;;;;;EAMZ,sBAAoB;;EAGpB,WAAS;;EAGT,YAAU;EAEV,MAAM;;EAGN,SAAS;;EAGT;EAEA,OAAO;EAEd,YACkB,sBACT,OAAO,YAAY,cACnB,gBAAgB;EAGlB,WAAW,SAAS,kBAAkB;EAMtC;;;;;EAQM,KAAK,eAAe,QAAQ,gBAAgB;;;;;;;;;;;;;;;;EA0B5C,UAAU;IAAmB;MAAyB;;;;;;;YA+CnD,yBAAyB;;;;;;YAgCzB,iBAAiB,cAAc,QAAQ,gBAAgB;YA6B7D;EAuBH,cAAc"}
|
|
@@ -2,7 +2,6 @@ import { DependencyGraph } from "./dependency-graph.mjs";
|
|
|
2
2
|
import { ManifestManager } from "./manifest-manager.mjs";
|
|
3
3
|
import { SpecialFilesCollector } from "./special-files-collector.mjs";
|
|
4
4
|
import { FileManager } from "./file-manager.mjs";
|
|
5
|
-
|
|
6
5
|
//#region ../../packages/core/src/dev-server/file-operations.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* FileOperations — add/update/delete lifecycle for a single file.
|
|
@@ -10,7 +9,7 @@ import { FileManager } from "./file-manager.mjs";
|
|
|
10
9
|
* Coordinates the dependency graph, manifest, and special-files collector
|
|
11
10
|
* so the orchestrator and event handler can stay declarative.
|
|
12
11
|
*/
|
|
13
|
-
declare class FileOperations {
|
|
12
|
+
export declare class FileOperations {
|
|
14
13
|
private readonly files;
|
|
15
14
|
private readonly dependencyGraph;
|
|
16
15
|
private readonly manifest;
|
|
@@ -39,5 +38,4 @@ declare class FileOperations {
|
|
|
39
38
|
syncFilesToManifest(): void;
|
|
40
39
|
}
|
|
41
40
|
//#endregion
|
|
42
|
-
export { FileOperations };
|
|
43
41
|
//# sourceMappingURL=file-operations.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-operations.d.mts","names":[],"sources":["../../../../../../../../packages/core/src/dev-server/file-operations.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-operations.d.mts","names":[],"sources":["../../../../../../../../packages/core/src/dev-server/file-operations.ts"],"mappings":";;;;;;;;;;;qBAgBa;mBAEQ;mBACA;mBACA;mBACA;EAJnB,YACmB,OAAO,YAAY,cACnB,iBAAiB,iBACjB,UAAU,iBACV,uBAAuB;;;;;EAO7B,QAAQ,uBAAuB,QAAQ;;;;;EAoCvC,WAAW,uBAAuB;;;;EA+BlC,WAAW,uBAAuB;;;;;UAyBjC;EAoCP;EAMA"}
|
|
@@ -4,7 +4,7 @@ import "../utils/index.mjs";
|
|
|
4
4
|
import { warlockConfigManager } from "../warlock-config/warlock-config.manager.mjs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { Random } from "@mongez/reinforcements";
|
|
7
|
-
import
|
|
7
|
+
import fsSync from "node:fs";
|
|
8
8
|
import events from "@mongez/events";
|
|
9
9
|
import glob from "fast-glob";
|
|
10
10
|
import chokidar from "chokidar";
|
|
@@ -30,14 +30,15 @@ function globToRegExp(glob) {
|
|
|
30
30
|
let braceDepth = 0;
|
|
31
31
|
for (let i = 0; i < glob.length; i++) {
|
|
32
32
|
const char = glob[i];
|
|
33
|
-
if (char === "*")
|
|
34
|
-
i
|
|
35
|
-
if (glob[i + 1] === "/") {
|
|
33
|
+
if (char === "*") {
|
|
34
|
+
if (glob[i + 1] === "*") {
|
|
36
35
|
i++;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
if (glob[i + 1] === "/") {
|
|
37
|
+
i++;
|
|
38
|
+
source += "(?:.*/)?";
|
|
39
|
+
} else source += ".*";
|
|
40
|
+
} else source += "[^/]*";
|
|
41
|
+
} else if (char === "?") source += "[^/]";
|
|
41
42
|
else if (char === "{") {
|
|
42
43
|
braceDepth++;
|
|
43
44
|
source += "(?:";
|
|
@@ -96,9 +97,9 @@ var FilesWatcher = class {
|
|
|
96
97
|
async watch(config) {
|
|
97
98
|
const devServerConfig = await warlockConfigManager.lazyGet("devServer");
|
|
98
99
|
const userWatchConfig = devServerConfig?.watch;
|
|
99
|
-
const rootEnvFiles =
|
|
100
|
+
const rootEnvFiles = fsSync.readdirSync(rootPath(), { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.startsWith(".env")).map((entry) => entry.name);
|
|
100
101
|
const basePaths = [
|
|
101
|
-
...[
|
|
102
|
+
...[.../* @__PURE__ */ new Set([
|
|
102
103
|
...ENV_FILES,
|
|
103
104
|
".env.shared",
|
|
104
105
|
...rootEnvFiles
|
|
@@ -201,5 +202,5 @@ var FilesWatcher = class {
|
|
|
201
202
|
};
|
|
202
203
|
|
|
203
204
|
//#endregion
|
|
204
|
-
export { FilesWatcher, createIgnoredMatcher };
|
|
205
|
+
export { FilesWatcher, createIgnoredMatcher, globToRegExp };
|
|
205
206
|
//# sourceMappingURL=files-watcher.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files-watcher.mjs","names":["fg","nodePath"],"sources":["../../../../../../../../packages/core/src/dev-server/files-watcher.ts"],"sourcesContent":["import events from \"@mongez/events\";\nimport { Random } from \"@mongez/reinforcements\";\nimport chokidar from \"chokidar\";\nimport fg from \"fast-glob\";\nimport fs from \"node:fs\";\nimport nodePath from \"node:path\";\nimport { rootPath, srcPath } from \"../utils\";\nimport { warlockConfigManager } from \"../warlock-config/warlock-config.manager\";\nimport { Path } from \"../utils/normalized-path\";\n\ntype FileWatcherEvent = \"change\" | \"delete\" | \"add\" | \"error\" | \"addDir\" | \"unlinkDir\";\n\ntype FileChangeCallback = (filePath: string, settleMs?: number) => void;\ntype FileDeleteCallback = (filePath: string, settleMs?: number) => void;\ntype FileAddCallback = (filePath: string, settleMs?: number) => void;\ntype FileErrorCallback = (filePath: string, error: Error) => void;\ntype FileAddDirCallback = (filePath: string) => void;\ntype FileUnlinkDirCallback = (filePath: string) => void;\ntype OnFileEventCallback =\n | FileChangeCallback\n | FileDeleteCallback\n | FileAddCallback\n | FileErrorCallback\n | FileAddDirCallback\n | FileUnlinkDirCallback;\n\n/**\n * Watch configuration options\n */\nexport type WatchConfig = {\n /**\n * Glob patterns to include\n */\n include?: string[];\n /**\n * Glob patterns to exclude\n */\n exclude?: string[];\n};\n\n/**\n * Default patterns to exclude from watching\n */\nconst DEFAULT_EXCLUDE = [\"**/node_modules/**\", \"**/dist/**\", \"**/.warlock/**\", \"**/.git/**\"];\n\nconst GLOB_CHARS = /[*?{}[\\]]/;\n\n/**\n * Convert a glob (`**`, `*`, `?`, `{a,b}`) to a RegExp over a forward-slash\n * path. chokidar >= 4 has no glob support, so patterns are matched here\n * instead of being handed to it.\n */\nexport function globToRegExp(glob: string): RegExp {\n let source = \"\";\n let braceDepth = 0;\n\n for (let i = 0; i < glob.length; i++) {\n const char = glob[i]!;\n\n if (char === \"*\") {\n if (glob[i + 1] === \"*\") {\n i++;\n if (glob[i + 1] === \"/\") {\n i++;\n source += \"(?:.*/)?\";\n } else {\n source += \".*\";\n }\n } else {\n source += \"[^/]*\";\n }\n } else if (char === \"?\") {\n source += \"[^/]\";\n } else if (char === \"{\") {\n braceDepth++;\n source += \"(?:\";\n } else if (char === \"}\" && braceDepth > 0) {\n braceDepth--;\n source += \")\";\n } else if (char === \",\" && braceDepth > 0) {\n source += \"|\";\n } else {\n source += /[.+^$()|[\\]\\\\]/.test(char) ? `\\\\${char}` : char;\n }\n }\n\n return new RegExp(`^${source}$`);\n}\n\n/**\n * Build a chokidar `ignored` predicate from glob and literal patterns. A\n * pattern matches the absolute path or the project-relative path.\n */\nexport function createIgnoredMatcher(patterns: string[]): (path: string) => boolean {\n const matchers = patterns.map((pattern) => globToRegExp(Path.normalize(pattern)));\n\n return (path: string) => {\n const absolute = Path.normalize(path);\n const relative = Path.toRelative(absolute);\n\n return matchers.some((matcher) => matcher.test(absolute) || matcher.test(relative));\n };\n}\n\n/**\n * Expand glob `include` entries to concrete files (chokidar watches literal\n * paths only); literal entries pass through unchanged.\n */\nfunction expandIncludes(include: string[]): string[] {\n return include.flatMap((entry) =>\n GLOB_CHARS.test(entry)\n ? fg.sync(entry.replace(/\\\\/g, \"/\"), { cwd: rootPath(), absolute: true })\n : [entry],\n );\n}\n\n/**\n * All .env file variants to watch\n */\nconst ENV_FILES = [\n \".env\",\n \".env.local\",\n \".env.development\",\n \".env.development.local\",\n \".env.test\",\n \".env.test.local\",\n \".env.production\",\n \".env.production.local\",\n];\n\nexport class FilesWatcher {\n /**\n * File watcher id\n */\n private id = Random.string();\n\n /**\n * First-seen timestamp per path from chokidar's `raw` event, which fires\n * BEFORE `awaitWriteFinish` stabilises the change. Diffing it against the\n * stabilised `add`/`change` timestamp gives the actual watcher-settle\n * duration for the phase-timing line. Only populated when\n * `devServer.timings` is on — see `watch()` — so a disabled flag costs\n * nothing here beyond the `undefined` checks below.\n */\n private readonly rawEventTimestamps = new Map<string, number>();\n\n /**\n * Watch for files changes\n * @param config Optional watch configuration\n */\n public async watch(config?: WatchConfig) {\n // Get user config from warlock.config.ts\n const devServerConfig = await warlockConfigManager.lazyGet(\"devServer\");\n const userWatchConfig = devServerConfig?.watch;\n\n // Build paths to watch:\n // 1. All .env variants that exist\n // 2. warlock.config.ts (project-level settings; restart-required on change)\n // 3. src directory\n // 4. Any additional paths from user config\n // Also any other `.env*` at the root (`.env.shared`, `.env.staging`, …).\n const rootEnvFiles = fs\n .readdirSync(rootPath(), { withFileTypes: true })\n .filter((entry) => entry.isFile() && entry.name.startsWith(\".env\"))\n .map((entry) => entry.name);\n const envPaths = [...new Set([...ENV_FILES, \".env.shared\", ...rootEnvFiles])].map((file) =>\n rootPath(file),\n );\n const basePaths = [...envPaths, rootPath(\"warlock.config.ts\"), srcPath()];\n const additionalPaths = expandIncludes(userWatchConfig?.include || config?.include || []);\n\n const paths = [...basePaths, ...additionalPaths].map((path) => Path.normalize(path));\n\n // Merge default exclude with config exclude\n const ignored = createIgnoredMatcher([\n ...DEFAULT_EXCLUDE,\n ...(userWatchConfig?.exclude || []),\n ...(config?.exclude || []),\n ]);\n\n const timingsEnabled = devServerConfig?.timings === true;\n\n const watcher = chokidar.watch(paths, {\n ignoreInitial: true,\n ignored,\n persistent: true,\n usePolling: false, // Try native first, will fallback if needed\n interval: 100,\n binaryInterval: 300,\n awaitWriteFinish: {\n stabilityThreshold: 100,\n pollInterval: 50,\n },\n // On Windows, explicitly enable recursive watching\n depth: 99,\n });\n\n if (timingsEnabled) {\n watcher.on(\"raw\", (_event, evPath, details) => {\n // On the native (non-fsevents) handler chokidar uses on Windows/Linux,\n // `evPath` is only the changed entry's path *relative to the watched\n // directory* (see chokidar's `handler.js` `handleEvent`/`emitRaw`),\n // not the absolute path the later `add`/`change` event carries. Only\n // fsevents (macOS) hands back an already-absolute path. Reconstruct\n // the absolute path from `details.watchedPath` so the timestamp is\n // keyed the same way the stabilised event looks it up below —\n // otherwise the lookup always misses and the phase silently reads 0.\n const watchedPath = (details as { watchedPath?: string } | undefined)?.watchedPath;\n const absolutePath = watchedPath ? nodePath.resolve(watchedPath, evPath) : evPath;\n const normalized = Path.normalize(absolutePath);\n if (!this.rawEventTimestamps.has(normalized)) {\n this.rawEventTimestamps.set(normalized, performance.now());\n }\n });\n }\n\n watcher.on(\"add\", (filePath) => this.triggerEvent(\"add\", filePath));\n watcher.on(\"change\", (filePath) => this.triggerEvent(\"change\", filePath));\n watcher.on(\"unlink\", (filePath) => this.triggerEvent(\"delete\", filePath));\n watcher.on(\"addDir\", (filePath) => this.triggerEvent(\"addDir\", filePath));\n watcher.on(\"unlinkDir\", (filePath) => this.triggerEvent(\"unlinkDir\", filePath));\n // watcher.on(\"error\", (error: Error, filePath: string) =>\n // this.triggerEvent(\"error\", filePath, error),\n // );\n\n // Cleanup on process exit\n process.on(\"SIGINT\", async () => {\n await watcher.close();\n });\n }\n\n /**\n * Trigger event immediately (no debouncing here)\n * Debouncing is handled at the orchestrator level for batch processing\n */\n private triggerEvent(event: FileWatcherEvent, filePath: string, error?: Error) {\n const normalized = Path.normalize(filePath);\n const rawEventAt = this.rawEventTimestamps.get(normalized);\n let settleMs: number | undefined;\n\n if (rawEventAt !== undefined) {\n settleMs = performance.now() - rawEventAt;\n this.rawEventTimestamps.delete(normalized);\n }\n\n // `error` and `settleMs` share the same second-argument slot: an error\n // event's subscriber reads it as `Error`, every other event's subscriber\n // reads it as the watcher-settle duration (see the `On*Callback` types\n // above). Passing both positionally (`normalized, error, settleMs`) used\n // to leave `settleMs` in an unread third slot, so every change/add/delete\n // subscriber always received `undefined` in its `settleMs` parameter —\n // the watcher phase's timing was silently discarded here even when the\n // raw-event timestamp above resolved correctly.\n events.trigger(`file-watcher.${this.id}.${event}`, normalized, error ?? settleMs);\n }\n\n /**\n * On file change event\n */\n public onFileChange(callback: FileChangeCallback) {\n return this.on(\"change\", callback);\n }\n\n /**\n * On file delete event\n */\n public onFileDelete(callback: FileDeleteCallback) {\n return this.on(\"delete\", callback);\n }\n\n /**\n * On file add event\n */\n public onFileAdd(callback: FileAddCallback) {\n return this.on(\"add\", callback);\n }\n\n /**\n * On file error event\n */\n public onFileError(callback: FileErrorCallback) {\n return this.on(\"error\", callback);\n }\n\n /**\n * On file add dir event\n */\n public onDirectoryAdd(callback: FileAddDirCallback) {\n return this.on(\"addDir\", callback);\n }\n\n /**\n * On file unlink dir event\n */\n public onDirectoryRemove(callback: FileUnlinkDirCallback) {\n return this.on(\"unlinkDir\", callback);\n }\n\n /**\n * On file event\n */\n public on(event: FileWatcherEvent, callback: OnFileEventCallback) {\n return events.subscribe(`file-watcher.${this.id}.${event}`, callback);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AA2CA,MAAM,kBAAkB;CAAC;CAAsB;CAAc;CAAkB;AAAY;AAE3F,MAAM,aAAa;;;;;;AAOnB,SAAgB,aAAa,MAAsB;CACjD,IAAI,SAAS;CACb,IAAI,aAAa;CAEjB,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;EACpC,MAAM,OAAO,KAAK;EAElB,IAAI,SAAS,KACX,IAAI,KAAK,IAAI,OAAO,KAAK;GACvB;GACA,IAAI,KAAK,IAAI,OAAO,KAAK;IAC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AQ,GAAG,cAAc,aAAa,KAAK,aAAa,aAAa,QAAQ,CAAC;EAM9E,QAAQ,GAAG,UAAU,YAAY;GAC/B,MAAM,QAAQ,MAAM;EACtB,CAAC;CACH;;;;;CAMA,AAAQ,aAAa,OAAyB,UAAkB,OAAe;EAC7E,MAAM,aAAa,KAAK,UAAU,QAAQ;EAC1C,MAAM,aAAa,KAAK,mBAAmB,IAAI,UAAU;EACzD,IAAI;EAEJ,IAAI,eAAe,QAAW;GAC5B,WAAW,YAAY,IAAI,IAAI;GAC/B,KAAK,mBAAmB,OAAO,UAAU;EAC3C;EAUA,OAAO,QAAQ,gBAAgB,KAAK,GAAG,GAAG,SAAS,YAAY,SAAS,QAAQ;CAClF;;;;CAKA,AAAO,aAAa,UAA8B;EAChD,OAAO,KAAK,GAAG,UAAU,QAAQ;CACnC;;;;CAKA,AAAO,aAAa,UAA8B;EAChD,OAAO,KAAK,GAAG,UAAU,QAAQ;CACnC;;;;CAKA,AAAO,UAAU,UAA2B;EAC1C,OAAO,KAAK,GAAG,OAAO,QAAQ;CAChC;;;;CAKA,AAAO,YAAY,UAA6B;EAC9C,OAAO,KAAK,GAAG,SAAS,QAAQ;CAClC;;;;CAKA,AAAO,eAAe,UAA8B;EAClD,OAAO,KAAK,GAAG,UAAU,QAAQ;CACnC;;;;CAKA,AAAO,kBAAkB,UAAiC;EACxD,OAAO,KAAK,GAAG,aAAa,QAAQ;CACtC;;;;CAKA,AAAO,GAAG,OAAyB,UAA+B;EAChE,OAAO,OAAO,UAAU,gBAAgB,KAAK,GAAG,GAAG,SAAS,QAAQ;CACtE;AACF"}
|
|
1
|
+
{"version":3,"file":"files-watcher.mjs","names":["fg","fs","nodePath"],"sources":["../../../../../../../../packages/core/src/dev-server/files-watcher.ts"],"sourcesContent":["import events from \"@mongez/events\";\nimport { Random } from \"@mongez/reinforcements\";\nimport chokidar from \"chokidar\";\nimport fg from \"fast-glob\";\nimport fs from \"node:fs\";\nimport nodePath from \"node:path\";\nimport { rootPath, srcPath } from \"../utils\";\nimport { warlockConfigManager } from \"../warlock-config/warlock-config.manager\";\nimport { Path } from \"../utils/normalized-path\";\n\ntype FileWatcherEvent = \"change\" | \"delete\" | \"add\" | \"error\" | \"addDir\" | \"unlinkDir\";\n\ntype FileChangeCallback = (filePath: string, settleMs?: number) => void;\ntype FileDeleteCallback = (filePath: string, settleMs?: number) => void;\ntype FileAddCallback = (filePath: string, settleMs?: number) => void;\ntype FileErrorCallback = (filePath: string, error: Error) => void;\ntype FileAddDirCallback = (filePath: string) => void;\ntype FileUnlinkDirCallback = (filePath: string) => void;\ntype OnFileEventCallback =\n | FileChangeCallback\n | FileDeleteCallback\n | FileAddCallback\n | FileErrorCallback\n | FileAddDirCallback\n | FileUnlinkDirCallback;\n\n/**\n * Watch configuration options\n */\nexport type WatchConfig = {\n /**\n * Glob patterns to include\n */\n include?: string[];\n /**\n * Glob patterns to exclude\n */\n exclude?: string[];\n};\n\n/**\n * Default patterns to exclude from watching\n */\nconst DEFAULT_EXCLUDE = [\"**/node_modules/**\", \"**/dist/**\", \"**/.warlock/**\", \"**/.git/**\"];\n\nconst GLOB_CHARS = /[*?{}[\\]]/;\n\n/**\n * Convert a glob (`**`, `*`, `?`, `{a,b}`) to a RegExp over a forward-slash\n * path. chokidar >= 4 has no glob support, so patterns are matched here\n * instead of being handed to it.\n */\nexport function globToRegExp(glob: string): RegExp {\n let source = \"\";\n let braceDepth = 0;\n\n for (let i = 0; i < glob.length; i++) {\n const char = glob[i]!;\n\n if (char === \"*\") {\n if (glob[i + 1] === \"*\") {\n i++;\n if (glob[i + 1] === \"/\") {\n i++;\n source += \"(?:.*/)?\";\n } else {\n source += \".*\";\n }\n } else {\n source += \"[^/]*\";\n }\n } else if (char === \"?\") {\n source += \"[^/]\";\n } else if (char === \"{\") {\n braceDepth++;\n source += \"(?:\";\n } else if (char === \"}\" && braceDepth > 0) {\n braceDepth--;\n source += \")\";\n } else if (char === \",\" && braceDepth > 0) {\n source += \"|\";\n } else {\n source += /[.+^$()|[\\]\\\\]/.test(char) ? `\\\\${char}` : char;\n }\n }\n\n return new RegExp(`^${source}$`);\n}\n\n/**\n * Build a chokidar `ignored` predicate from glob and literal patterns. A\n * pattern matches the absolute path or the project-relative path.\n */\nexport function createIgnoredMatcher(patterns: string[]): (path: string) => boolean {\n const matchers = patterns.map((pattern) => globToRegExp(Path.normalize(pattern)));\n\n return (path: string) => {\n const absolute = Path.normalize(path);\n const relative = Path.toRelative(absolute);\n\n return matchers.some((matcher) => matcher.test(absolute) || matcher.test(relative));\n };\n}\n\n/**\n * Expand glob `include` entries to concrete files (chokidar watches literal\n * paths only); literal entries pass through unchanged.\n */\nfunction expandIncludes(include: string[]): string[] {\n return include.flatMap((entry) =>\n GLOB_CHARS.test(entry)\n ? fg.sync(entry.replace(/\\\\/g, \"/\"), { cwd: rootPath(), absolute: true })\n : [entry],\n );\n}\n\n/**\n * All .env file variants to watch\n */\nconst ENV_FILES = [\n \".env\",\n \".env.local\",\n \".env.development\",\n \".env.development.local\",\n \".env.test\",\n \".env.test.local\",\n \".env.production\",\n \".env.production.local\",\n];\n\nexport class FilesWatcher {\n /**\n * File watcher id\n */\n private id = Random.string();\n\n /**\n * First-seen timestamp per path from chokidar's `raw` event, which fires\n * BEFORE `awaitWriteFinish` stabilises the change. Diffing it against the\n * stabilised `add`/`change` timestamp gives the actual watcher-settle\n * duration for the phase-timing line. Only populated when\n * `devServer.timings` is on — see `watch()` — so a disabled flag costs\n * nothing here beyond the `undefined` checks below.\n */\n private readonly rawEventTimestamps = new Map<string, number>();\n\n /**\n * Watch for files changes\n * @param config Optional watch configuration\n */\n public async watch(config?: WatchConfig) {\n // Get user config from warlock.config.ts\n const devServerConfig = await warlockConfigManager.lazyGet(\"devServer\");\n const userWatchConfig = devServerConfig?.watch;\n\n // Build paths to watch:\n // 1. All .env variants that exist\n // 2. warlock.config.ts (project-level settings; restart-required on change)\n // 3. src directory\n // 4. Any additional paths from user config\n // Also any other `.env*` at the root (`.env.shared`, `.env.staging`, …).\n const rootEnvFiles = fs\n .readdirSync(rootPath(), { withFileTypes: true })\n .filter((entry) => entry.isFile() && entry.name.startsWith(\".env\"))\n .map((entry) => entry.name);\n const envPaths = [...new Set([...ENV_FILES, \".env.shared\", ...rootEnvFiles])].map((file) =>\n rootPath(file),\n );\n const basePaths = [...envPaths, rootPath(\"warlock.config.ts\"), srcPath()];\n const additionalPaths = expandIncludes(userWatchConfig?.include || config?.include || []);\n\n const paths = [...basePaths, ...additionalPaths].map((path) => Path.normalize(path));\n\n // Merge default exclude with config exclude\n const ignored = createIgnoredMatcher([\n ...DEFAULT_EXCLUDE,\n ...(userWatchConfig?.exclude || []),\n ...(config?.exclude || []),\n ]);\n\n const timingsEnabled = devServerConfig?.timings === true;\n\n const watcher = chokidar.watch(paths, {\n ignoreInitial: true,\n ignored,\n persistent: true,\n usePolling: false, // Try native first, will fallback if needed\n interval: 100,\n binaryInterval: 300,\n awaitWriteFinish: {\n stabilityThreshold: 100,\n pollInterval: 50,\n },\n // On Windows, explicitly enable recursive watching\n depth: 99,\n });\n\n if (timingsEnabled) {\n watcher.on(\"raw\", (_event, evPath, details) => {\n // On the native (non-fsevents) handler chokidar uses on Windows/Linux,\n // `evPath` is only the changed entry's path *relative to the watched\n // directory* (see chokidar's `handler.js` `handleEvent`/`emitRaw`),\n // not the absolute path the later `add`/`change` event carries. Only\n // fsevents (macOS) hands back an already-absolute path. Reconstruct\n // the absolute path from `details.watchedPath` so the timestamp is\n // keyed the same way the stabilised event looks it up below —\n // otherwise the lookup always misses and the phase silently reads 0.\n const watchedPath = (details as { watchedPath?: string } | undefined)?.watchedPath;\n const absolutePath = watchedPath ? nodePath.resolve(watchedPath, evPath) : evPath;\n const normalized = Path.normalize(absolutePath);\n if (!this.rawEventTimestamps.has(normalized)) {\n this.rawEventTimestamps.set(normalized, performance.now());\n }\n });\n }\n\n watcher.on(\"add\", (filePath) => this.triggerEvent(\"add\", filePath));\n watcher.on(\"change\", (filePath) => this.triggerEvent(\"change\", filePath));\n watcher.on(\"unlink\", (filePath) => this.triggerEvent(\"delete\", filePath));\n watcher.on(\"addDir\", (filePath) => this.triggerEvent(\"addDir\", filePath));\n watcher.on(\"unlinkDir\", (filePath) => this.triggerEvent(\"unlinkDir\", filePath));\n // watcher.on(\"error\", (error: Error, filePath: string) =>\n // this.triggerEvent(\"error\", filePath, error),\n // );\n\n // Cleanup on process exit\n process.on(\"SIGINT\", async () => {\n await watcher.close();\n });\n }\n\n /**\n * Trigger event immediately (no debouncing here)\n * Debouncing is handled at the orchestrator level for batch processing\n */\n private triggerEvent(event: FileWatcherEvent, filePath: string, error?: Error) {\n const normalized = Path.normalize(filePath);\n const rawEventAt = this.rawEventTimestamps.get(normalized);\n let settleMs: number | undefined;\n\n if (rawEventAt !== undefined) {\n settleMs = performance.now() - rawEventAt;\n this.rawEventTimestamps.delete(normalized);\n }\n\n // `error` and `settleMs` share the same second-argument slot: an error\n // event's subscriber reads it as `Error`, every other event's subscriber\n // reads it as the watcher-settle duration (see the `On*Callback` types\n // above). Passing both positionally (`normalized, error, settleMs`) used\n // to leave `settleMs` in an unread third slot, so every change/add/delete\n // subscriber always received `undefined` in its `settleMs` parameter —\n // the watcher phase's timing was silently discarded here even when the\n // raw-event timestamp above resolved correctly.\n events.trigger(`file-watcher.${this.id}.${event}`, normalized, error ?? settleMs);\n }\n\n /**\n * On file change event\n */\n public onFileChange(callback: FileChangeCallback) {\n return this.on(\"change\", callback);\n }\n\n /**\n * On file delete event\n */\n public onFileDelete(callback: FileDeleteCallback) {\n return this.on(\"delete\", callback);\n }\n\n /**\n * On file add event\n */\n public onFileAdd(callback: FileAddCallback) {\n return this.on(\"add\", callback);\n }\n\n /**\n * On file error event\n */\n public onFileError(callback: FileErrorCallback) {\n return this.on(\"error\", callback);\n }\n\n /**\n * On file add dir event\n */\n public onDirectoryAdd(callback: FileAddDirCallback) {\n return this.on(\"addDir\", callback);\n }\n\n /**\n * On file unlink dir event\n */\n public onDirectoryRemove(callback: FileUnlinkDirCallback) {\n return this.on(\"unlinkDir\", callback);\n }\n\n /**\n * On file event\n */\n public on(event: FileWatcherEvent, callback: OnFileEventCallback) {\n return events.subscribe(`file-watcher.${this.id}.${event}`, callback);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AA2CA,MAAM,kBAAkB;CAAC;CAAsB;CAAc;CAAkB;AAAY;AAE3F,MAAM,aAAa;;;;;;AAOnB,SAAgB,aAAa,MAAsB;CACjD,IAAI,SAAS;CACb,IAAI,aAAa;CAEjB,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;EACpC,MAAM,OAAO,KAAK;EAElB,IAAI,SAAS,KAAK;GAChB,IAAI,KAAK,IAAI,OAAO,KAAK;IACvB;IACA,IAAI,KAAK,IAAI,OAAO,KAAK;KACvB;KACA,UAAU;IACZ,OACE,UAAU;GAEd,OACE,UAAU;EAEd,OAAO,IAAI,SAAS,KAClB,UAAU;OACL,IAAI,SAAS,KAAK;GACvB;GACA,UAAU;EACZ,OAAO,IAAI,SAAS,OAAO,aAAa,GAAG;GACzC;GACA,UAAU;EACZ,OAAO,IAAI,SAAS,OAAO,aAAa,GACtC,UAAU;OAEV,UAAU,iBAAiB,KAAK,IAAI,IAAI,KAAK,SAAS;CAE1D;CAEA,OAAO,IAAI,OAAO,IAAI,OAAO,EAAE;AACjC;;;;;AAMA,SAAgB,qBAAqB,UAA+C;CAClF,MAAM,WAAW,SAAS,KAAK,YAAY,aAAa,KAAK,UAAU,OAAO,CAAC,CAAC;CAEhF,QAAQ,SAAiB;EACvB,MAAM,WAAW,KAAK,UAAU,IAAI;EACpC,MAAM,WAAW,KAAK,WAAW,QAAQ;EAEzC,OAAO,SAAS,MAAM,YAAY,QAAQ,KAAK,QAAQ,KAAK,QAAQ,KAAK,QAAQ,CAAC;CACpF;AACF;;;;;AAMA,SAAS,eAAe,SAA6B;CACnD,OAAO,QAAQ,SAAS,UACtB,WAAW,KAAK,KAAK,IACjBA,KAAG,KAAK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,QAAQ;CAClC;;;;CAKA,AAAO,eAAe,UAA8B;EAClD,OAAO,KAAK,GAAG,UAAU,QAAQ;CACnC;;;;CAKA,AAAO,kBAAkB,UAAiC;EACxD,OAAO,KAAK,GAAG,aAAa,QAAQ;CACtC;;;;CAKA,AAAO,GAAG,OAAyB,UAA+B;EAChE,OAAO,OAAO,UAAU,gBAAgB,KAAK,GAAG,GAAG,SAAS,QAAQ;CACtE;AACF"}
|
|
@@ -1,55 +1,16 @@
|
|
|
1
|
-
import { tsconfigManager } from "../../tsconfig-manager.mjs";
|
|
2
1
|
import { BaseHealthChecker } from "./base-health-checker.mjs";
|
|
2
|
+
import { CompilerSession } from "../../../tooling/typescript/compiler.mjs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { existsSync } from "node:fs";
|
|
3
5
|
import { colors } from "@mongez/copper";
|
|
4
|
-
import ts from "typescript";
|
|
5
6
|
|
|
6
7
|
//#region ../../packages/core/src/dev-server/health-checker/checkers/typescript-health-checker.ts
|
|
7
8
|
var TypescriptHealthChecker = class extends BaseHealthChecker {
|
|
8
9
|
constructor(..._args) {
|
|
9
10
|
super(..._args);
|
|
10
|
-
this.
|
|
11
|
-
this.parsedConfig = null;
|
|
11
|
+
this.session = null;
|
|
12
12
|
this.name = "TypeScript";
|
|
13
13
|
this.workerPath = "./workers/ts-health.worker";
|
|
14
|
-
this.initialized = false;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Check if file is a TypeScript file
|
|
18
|
-
*/
|
|
19
|
-
isTypeScriptFile(filePath) {
|
|
20
|
-
const ext = filePath.toLowerCase();
|
|
21
|
-
return ext.endsWith(".ts") || ext.endsWith(".tsx");
|
|
22
|
-
}
|
|
23
|
-
/** Preserve files selected by tsconfig when source updates rebuild the program. */
|
|
24
|
-
getProgramRootNames(files) {
|
|
25
|
-
return [...new Set([...this.parsedConfig?.fileNames || [], ...files.map((file) => file.absolutePath)])];
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Extract line and column from diagnostic location
|
|
29
|
-
*/
|
|
30
|
-
getDiagnosticLocation(diagnostic) {
|
|
31
|
-
if (diagnostic.file && diagnostic.start !== void 0) {
|
|
32
|
-
const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
|
|
33
|
-
return {
|
|
34
|
-
lineNumber: line + 1,
|
|
35
|
-
columnNumber: character + 1
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
return {
|
|
39
|
-
lineNumber: 1,
|
|
40
|
-
columnNumber: 1
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Format diagnostic message
|
|
45
|
-
*/
|
|
46
|
-
formatDiagnosticMessage(diagnostic) {
|
|
47
|
-
if (diagnostic.file && diagnostic.start !== void 0) return ts.formatDiagnostic(diagnostic, {
|
|
48
|
-
getCurrentDirectory: () => process.cwd(),
|
|
49
|
-
getCanonicalFileName: (fileName) => fileName,
|
|
50
|
-
getNewLine: () => "\n"
|
|
51
|
-
});
|
|
52
|
-
return diagnostic.messageText.toString();
|
|
53
14
|
}
|
|
54
15
|
/**
|
|
55
16
|
* Display health check results in a pretty format
|
|
@@ -107,86 +68,46 @@ var TypescriptHealthChecker = class extends BaseHealthChecker {
|
|
|
107
68
|
if (errorCount > 0) summary.push(colors.red(`${errorCount} error${errorCount > 1 ? "s" : ""}`));
|
|
108
69
|
if (warningCount > 0) summary.push(colors.yellow(`${warningCount} warning${warningCount > 1 ? "s" : ""}`));
|
|
109
70
|
}
|
|
110
|
-
/**
|
|
111
|
-
* Detect when files are changed
|
|
112
|
-
*/
|
|
113
71
|
async onFileChanges(files) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}, void 0, this.program);
|
|
72
|
+
this.session?.update(files.map((file) => ({
|
|
73
|
+
path: file.absolutePath,
|
|
74
|
+
content: file.source
|
|
75
|
+
})));
|
|
119
76
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
initialize() {
|
|
124
|
-
try {
|
|
125
|
-
if (!tsconfigManager.tsconfig || Object.keys(tsconfigManager.tsconfig).length === 0) {
|
|
126
|
-
this.initialized = true;
|
|
127
|
-
return this;
|
|
128
|
-
}
|
|
129
|
-
this.parsedConfig = ts.parseJsonConfigFileContent(tsconfigManager.tsconfig, ts.sys, process.cwd());
|
|
130
|
-
if (this.parsedConfig.errors.length > 0) console.warn("TypeScript Health Checker: tsconfig.json has errors:", this.parsedConfig.errors.map((e) => ts.formatDiagnostic(e, ts.createCompilerHost({}))));
|
|
131
|
-
this.program = ts.createProgram(this.parsedConfig.fileNames, this.parsedConfig.options);
|
|
132
|
-
this.initialized = true;
|
|
133
|
-
} catch (error) {
|
|
134
|
-
console.warn("TypeScript Health Checker: Failed to initialize:", error);
|
|
135
|
-
this.initialized = true;
|
|
136
|
-
}
|
|
77
|
+
initialize(cwd = process.cwd()) {
|
|
78
|
+
this.shutdown();
|
|
79
|
+
if (existsSync(path.join(cwd, "tsconfig.json"))) this.session = new CompilerSession(cwd);
|
|
137
80
|
return this;
|
|
138
81
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
82
|
+
removeFile(file) {
|
|
83
|
+
this.session?.update([], [file.absolutePath]);
|
|
84
|
+
super.removeFile(file);
|
|
85
|
+
return this;
|
|
86
|
+
}
|
|
87
|
+
shutdown() {
|
|
88
|
+
this.session?.close();
|
|
89
|
+
this.session = null;
|
|
90
|
+
}
|
|
142
91
|
async validate(file, result) {
|
|
143
|
-
if (!this.
|
|
92
|
+
if (!this.session || !/\.tsx?$/i.test(file.absolutePath)) {
|
|
144
93
|
result.markAsHealthy();
|
|
145
94
|
return result;
|
|
146
95
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
const warnings = [];
|
|
163
|
-
for (const diagnostic of allDiagnostics) {
|
|
164
|
-
const location = this.getDiagnosticLocation(diagnostic);
|
|
165
|
-
const message = this.formatDiagnosticMessage(diagnostic);
|
|
166
|
-
const errorLength = diagnostic.length || 1;
|
|
167
|
-
if (diagnostic.category === ts.DiagnosticCategory.Error) errors.push({
|
|
168
|
-
message,
|
|
169
|
-
type: "error",
|
|
170
|
-
lineNumber: location.lineNumber,
|
|
171
|
-
columnNumber: location.columnNumber,
|
|
172
|
-
length: errorLength
|
|
173
|
-
});
|
|
174
|
-
else if (diagnostic.category === ts.DiagnosticCategory.Warning) warnings.push({
|
|
175
|
-
message,
|
|
176
|
-
type: "warning",
|
|
177
|
-
lineNumber: location.lineNumber,
|
|
178
|
-
columnNumber: location.columnNumber,
|
|
179
|
-
length: errorLength
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
if (errors.length > 0) result.addErrors(errors);
|
|
183
|
-
if (warnings.length > 0) result.addWarnings(warnings);
|
|
184
|
-
if (errors.length === 0 && warnings.length === 0) result.markAsHealthy();
|
|
185
|
-
else this.displayResults(file, result);
|
|
186
|
-
} catch (error) {
|
|
187
|
-
console.warn(`TypeScript Health Checker: Error validating file ${file.relativePath}:`, error);
|
|
188
|
-
result.markAsHealthy();
|
|
189
|
-
}
|
|
96
|
+
this.session.update([{
|
|
97
|
+
path: file.absolutePath,
|
|
98
|
+
content: file.source
|
|
99
|
+
}]);
|
|
100
|
+
const messages = this.session.diagnostics(file.absolutePath).map((diagnostic) => ({
|
|
101
|
+
type: diagnostic.severity,
|
|
102
|
+
message: diagnostic.message,
|
|
103
|
+
lineNumber: diagnostic.line,
|
|
104
|
+
columnNumber: diagnostic.column,
|
|
105
|
+
length: diagnostic.length
|
|
106
|
+
}));
|
|
107
|
+
result.addErrors(messages.filter((message) => message.type === "error"));
|
|
108
|
+
result.addWarnings(messages.filter((message) => message.type === "warning"));
|
|
109
|
+
if (messages.length === 0) result.markAsHealthy();
|
|
110
|
+
else this.displayResults(file, result);
|
|
190
111
|
return result;
|
|
191
112
|
}
|
|
192
113
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-health-checker.mjs","names":[],"sources":["../../../../../../../../../../packages/core/src/dev-server/health-checker/checkers/typescript-health-checker.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\nimport ts from \"typescript\";\nimport type { FileManager } from \"../../file-manager\";\nimport { tsconfigManager } from \"../../tsconfig-manager\";\nimport type { FileHealthCheckerContract } from \"../file-health-checker.contract\";\nimport { FileHealthResult } from \"../file-health-result\";\nimport { BaseHealthChecker } from \"./base-health-checker\";\n\nexport class TypescriptHealthChecker\n extends BaseHealthChecker\n implements FileHealthCheckerContract\n{\n /**\n * Cached TypeScript program instance\n */\n private program: ts.Program | null = null;\n\n /**\n * Cached parsed TypeScript configuration\n */\n private parsedConfig: ts.ParsedCommandLine | null = null;\n\n /**\n * Health checker name\n */\n public name: string = \"TypeScript\";\n\n /**\n * Path to dedicated worker file for TypeScript checking\n * Runs in a separate thread to avoid blocking the main dev server\n */\n public workerPath: string = \"./workers/ts-health.worker\";\n\n /**\n * Whether checker is initialized\n */\n private initialized: boolean = false;\n\n /**\n * Check if file is a TypeScript file\n */\n private isTypeScriptFile(filePath: string): boolean {\n const ext = filePath.toLowerCase();\n return ext.endsWith(\".ts\") || ext.endsWith(\".tsx\");\n }\n\n /** Preserve files selected by tsconfig when source updates rebuild the program. */\n private getProgramRootNames(files: FileManager[]): string[] {\n return [\n ...new Set([\n ...(this.parsedConfig?.fileNames || []),\n ...files.map((file) => file.absolutePath),\n ]),\n ];\n }\n\n /**\n * Extract line and column from diagnostic location\n */\n private getDiagnosticLocation(diagnostic: ts.Diagnostic): {\n lineNumber: number;\n columnNumber: number;\n } {\n if (diagnostic.file && diagnostic.start !== undefined) {\n const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);\n return {\n lineNumber: line + 1, // TypeScript uses 0-based, we use 1-based\n columnNumber: character + 1,\n };\n }\n return {\n lineNumber: 1,\n columnNumber: 1,\n };\n }\n\n /**\n * Format diagnostic message\n */\n private formatDiagnosticMessage(diagnostic: ts.Diagnostic): string {\n if (diagnostic.file && diagnostic.start !== undefined) {\n return ts.formatDiagnostic(diagnostic, {\n getCurrentDirectory: () => process.cwd(),\n getCanonicalFileName: (fileName) => fileName,\n getNewLine: () => \"\\n\",\n });\n }\n return diagnostic.messageText.toString();\n }\n\n /**\n * Display health check results in a pretty format\n */\n private displayResults(file: FileManager, result: FileHealthResult): void {\n const stats = result.getStats();\n\n // Only display if there are errors or warnings\n if (stats.errors === 0 && stats.warnings === 0) {\n return;\n }\n\n const fileName = file.relativePath.replace(/\\\\/g, \"/\");\n const errorCount = stats.errors;\n const warningCount = stats.warnings;\n const sourceLines = file.source ? file.source.split(\"\\n\") : [];\n\n // Display header\n // console.log(\n // `\\n${colors.dim(\"╭─\")} ${colors.bold(colors.cyanBright(\"TypeScript Health\"))} ${colors.dim(\"→\")} ${colors.cyan(fileName)}`,\n // );\n\n // Display errors\n if (errorCount > 0) {\n const errorMessages = result.messages.filter((m) => m.type === \"error\");\n for (const error of errorMessages) {\n const icon = colors.redBright(\"✖\");\n const level = colors.redBright(colors.bold(\"ERROR\"));\n console.log(\n `\\n${icon} ${level} ${colors.dim(\"in\")} ${colors.cyanBright(fileName)}${colors.dim(`(${error.lineNumber},${error.columnNumber})`)}`,\n );\n // Extract just the message text (remove file path prefix if present)\n const messageLines = error.message.split(\"\\n\");\n const cleanMessage = messageLines\n .map((line) => line.replace(/^[^:]+:\\d+:\\d+ - /, \"\").trim())\n .filter((line) => line.length > 0)\n .join(\"\\n\");\n console.log(` ${colors.dim(\"→\")} ${colors.red(cleanMessage)}`);\n\n // Display code line with underline indicator\n if (\n sourceLines.length > 0 &&\n error.lineNumber > 0 &&\n error.lineNumber <= sourceLines.length\n ) {\n const lineIndex = error.lineNumber - 1; // Convert to 0-based index\n const lineContent = sourceLines[lineIndex];\n const lineNum = error.lineNumber.toString().padStart(4, \" \");\n const errorLength = error.length || 1;\n const columnIndex = error.columnNumber - 1; // Convert to 0-based index\n\n // Display the line with normal color (not all red)\n console.log(` ${colors.dim(lineNum)} ${colors.dim(\"│\")} ${lineContent || \"\"}`);\n\n // Display underline indicator\n // Padding accounts for: lineNum.length + 1 space + 1 (│) + 1 space = lineNum.length + 3\n // (The initial 2 spaces indent is already in the console.log)\n const prefixPadding = lineNum.length + 3;\n const columnPadding = \" \".repeat(columnIndex);\n const underline = colors.redBright(\"~\".repeat(Math.max(1, errorLength)));\n console.log(` ${colors.dim(\" \".repeat(prefixPadding))}${columnPadding}${underline}`);\n }\n }\n }\n\n // Display warnings\n if (warningCount > 0) {\n const warningMessages = result.messages.filter((m) => m.type === \"warning\");\n for (const warning of warningMessages) {\n const icon = colors.yellowBright(\"⚠\");\n const level = colors.yellowBright(colors.bold(\"WARNING\"));\n console.log(\n `\\n${icon} ${level} ${colors.dim(\"in\")} ${colors.cyanBright(fileName)}${colors.dim(`(${warning.lineNumber},${warning.columnNumber})`)}`,\n );\n // Extract just the message text (remove file path prefix if present)\n const messageLines = warning.message.split(\"\\n\");\n const cleanMessage = messageLines\n .map((line) => line.replace(/^[^:]+:\\d+:\\d+ - /, \"\").trim())\n .filter((line) => line.length > 0)\n .join(\"\\n\");\n console.log(` ${colors.dim(\"→\")} ${colors.yellow(cleanMessage)}`);\n\n // Display code line with underline indicator\n if (\n sourceLines.length > 0 &&\n warning.lineNumber > 0 &&\n warning.lineNumber <= sourceLines.length\n ) {\n const lineIndex = warning.lineNumber - 1; // Convert to 0-based index\n const lineContent = sourceLines[lineIndex];\n const lineNum = warning.lineNumber.toString().padStart(4, \" \");\n const warningLength = warning.length || 1;\n const columnIndex = warning.columnNumber - 1; // Convert to 0-based index\n\n // Display the line with normal color (not all yellow)\n console.log(` ${colors.dim(lineNum)} ${colors.dim(\"│\")} ${lineContent || \"\"}`);\n\n // Display underline indicator\n // Padding accounts for: lineNum.length + 1 space + 1 (│) + 1 space = lineNum.length + 3\n // (The initial 2 spaces indent is already in the console.log)\n const prefixPadding = lineNum.length + 3;\n const columnPadding = \" \".repeat(columnIndex);\n const underline = colors.yellowBright(\"~\".repeat(Math.max(1, warningLength)));\n console.log(` ${colors.dim(\" \".repeat(prefixPadding))}${columnPadding}${underline}`);\n }\n }\n }\n\n // Display summary\n const summary = [];\n if (errorCount > 0) {\n summary.push(colors.red(`${errorCount} error${errorCount > 1 ? \"s\" : \"\"}`));\n }\n if (warningCount > 0) {\n summary.push(colors.yellow(`${warningCount} warning${warningCount > 1 ? \"s\" : \"\"}`));\n }\n\n // console.log(\n // `\\n${colors.dim(\"╰─\")} ${colors.bold(\"TypeScript\")} ${colors.dim(\"→\")} ${summary.join(colors.dim(\" and \"))}`,\n // );\n }\n\n /**\n * Detect when files are changed\n */\n public async onFileChanges(files: FileManager[]): Promise<void> {\n // recreate an incremental program\n if (!this.parsedConfig) {\n return;\n }\n\n this.program = ts.createProgram(\n this.getProgramRootNames(files),\n {\n ...this.parsedConfig.options,\n incremental: true,\n },\n undefined,\n this.program!,\n );\n }\n\n /**\n * Initialize the health checker\n */\n public initialize(): TypescriptHealthChecker {\n try {\n // Verify tsconfigManager is initialized and has config\n if (!tsconfigManager.tsconfig || Object.keys(tsconfigManager.tsconfig).length === 0) {\n this.initialized = true;\n return this;\n }\n\n // Parse the config using tsconfigManager's cached config\n this.parsedConfig = ts.parseJsonConfigFileContent(\n tsconfigManager.tsconfig,\n ts.sys,\n process.cwd(),\n );\n\n // Check for config errors\n if (this.parsedConfig.errors.length > 0) {\n // Log config errors but continue (will skip validation)\n console.warn(\n \"TypeScript Health Checker: tsconfig.json has errors:\",\n this.parsedConfig.errors.map((e) => ts.formatDiagnostic(e, ts.createCompilerHost({}))),\n );\n }\n\n this.program = ts.createProgram(this.parsedConfig.fileNames, this.parsedConfig.options);\n\n this.initialized = true;\n } catch (error) {\n // Handle any errors during initialization gracefully\n console.warn(\"TypeScript Health Checker: Failed to initialize:\", error);\n this.initialized = true; // Mark as initialized to prevent retries\n }\n\n return this;\n }\n\n /**\n * Validate the health of the file\n */\n public async validate(file: FileManager, result: FileHealthResult): Promise<FileHealthResult> {\n // Early exit: skip non-TypeScript files\n if (!this.isTypeScriptFile(file.absolutePath)) {\n result.markAsHealthy();\n return result;\n }\n\n // Early exit: check if parsed config is available\n if (!this.parsedConfig) {\n result.markAsHealthy();\n return result;\n }\n\n try {\n // Lazy-load program on first validation if not already created\n if (!this.program) {\n // Create program with all project files from parsed config (for proper type checking)\n this.program = ts.createProgram(this.parsedConfig.fileNames, this.parsedConfig.options);\n }\n\n // Get source file from program\n const sourceFile = this.program.getSourceFile(file.absolutePath);\n\n // If file is not in the program, return healthy (might be excluded)\n if (!sourceFile) {\n result.markAsHealthy();\n return result;\n }\n\n // Get diagnostics for the specific file only\n const syntacticDiagnostics = this.program.getSyntacticDiagnostics(sourceFile);\n const semanticDiagnostics = this.program.getSemanticDiagnostics(sourceFile);\n\n // Combine all diagnostics\n const allDiagnostics = [...syntacticDiagnostics, ...semanticDiagnostics];\n\n // Convert TypeScript diagnostics to FileHealthResult format\n const errors: Array<{\n message: string;\n type: \"error\";\n lineNumber: number;\n columnNumber: number;\n length: number;\n }> = [];\n const warnings: Array<{\n message: string;\n type: \"warning\";\n lineNumber: number;\n columnNumber: number;\n length: number;\n }> = [];\n\n for (const diagnostic of allDiagnostics) {\n const location = this.getDiagnosticLocation(diagnostic);\n const message = this.formatDiagnosticMessage(diagnostic);\n const errorLength = diagnostic.length || 1;\n\n if (diagnostic.category === ts.DiagnosticCategory.Error) {\n errors.push({\n message,\n type: \"error\",\n lineNumber: location.lineNumber,\n columnNumber: location.columnNumber,\n length: errorLength,\n });\n } else if (diagnostic.category === ts.DiagnosticCategory.Warning) {\n warnings.push({\n message,\n type: \"warning\",\n lineNumber: location.lineNumber,\n columnNumber: location.columnNumber,\n length: errorLength,\n });\n }\n }\n\n // Add errors and warnings to result\n if (errors.length > 0) {\n result.addErrors(errors);\n }\n if (warnings.length > 0) {\n result.addWarnings(warnings);\n }\n\n // If no errors or warnings, mark as healthy\n if (errors.length === 0 && warnings.length === 0) {\n result.markAsHealthy();\n } else {\n // Display results if there are errors or warnings\n this.displayResults(file, result);\n }\n } catch (error) {\n // Handle any errors during validation gracefully\n console.warn(`TypeScript Health Checker: Error validating file ${file.relativePath}:`, error);\n result.markAsHealthy(); // Return healthy on error to avoid blocking\n }\n\n return result;\n }\n}\n"],"mappings":";;;;;;AAQA,IAAa,0BAAb,cACU,kBAEV;;;iBAIuC;sBAKe;cAK9B;oBAMM;qBAKG;;;;;CAK/B,AAAQ,iBAAiB,UAA2B;EAClD,MAAM,MAAM,SAAS,YAAY;EACjC,OAAO,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,MAAM;CACnD;;CAGA,AAAQ,oBAAoB,OAAgC;EAC1D,OAAO,CACL,GAAG,IAAI,IAAI,CACT,GAAI,KAAK,cAAc,aAAa,CAAC,GACrC,GAAG,MAAM,KAAK,SAAS,KAAK,YAAY,CAC1C,CAAC,CACH;CACF;;;;CAKA,AAAQ,sBAAsB,YAG5B;EACA,IAAI,WAAW,QAAQ,WAAW,UAAU,QAAW;GACrD,MAAM,EAAE,MAAM,cAAc,WAAW,KAAK,8BAA8B,WAAW,KAAK;GAC1F,OAAO;IACL,YAAY,OAAO;IACnB,cAAc,YAAY;GAC5B;EACF;EACA,OAAO;GACL,YAAY;GACZ,cAAc;EAChB;CACF;;;;CAKA,AAAQ,wBAAwB,YAAmC;EACjE,IAAI,WAAW,QAAQ,WAAW,UAAU,QAC1C,OAAO,GAAG,iBAAiB,YAAY;GACrC,2BAA2B,QAAQ,IAAI;GACvC,uBAAuB,aAAa;GACpC,kBAAkB;EACpB,CAAC;EAEH,OAAO,WAAW,YAAY,SAAS;CACzC;;;;CAKA,AAAQ,eAAe,MAAmB,QAAgC;EACxE,MAAM,QAAQ,OAAO,SAAS;EAG9B,IAAI,MA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AAc;EACvB;EAEA,OAAO;CACT;AACF"}
|
|
1
|
+
{"version":3,"file":"typescript-health-checker.mjs","names":[],"sources":["../../../../../../../../../../packages/core/src/dev-server/health-checker/checkers/typescript-health-checker.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\nimport { existsSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { CompilerSession } from \"../../../tooling/typescript/compiler\";\nimport type { FileManager } from \"../../file-manager\";\nimport type { FileHealthCheckerContract } from \"../file-health-checker.contract\";\nimport { FileHealthResult } from \"../file-health-result\";\nimport { BaseHealthChecker } from \"./base-health-checker\";\n\nexport class TypescriptHealthChecker\n extends BaseHealthChecker\n implements FileHealthCheckerContract\n{\n private session: CompilerSession | null = null;\n /**\n * Health checker name\n */\n public name: string = \"TypeScript\";\n\n /**\n * Path to dedicated worker file for TypeScript checking\n * Runs in a separate thread to avoid blocking the main dev server\n */\n public workerPath: string = \"./workers/ts-health.worker\";\n\n /**\n * Display health check results in a pretty format\n */\n private displayResults(file: FileManager, result: FileHealthResult): void {\n const stats = result.getStats();\n\n // Only display if there are errors or warnings\n if (stats.errors === 0 && stats.warnings === 0) {\n return;\n }\n\n const fileName = file.relativePath.replace(/\\\\/g, \"/\");\n const errorCount = stats.errors;\n const warningCount = stats.warnings;\n const sourceLines = file.source ? file.source.split(\"\\n\") : [];\n\n // Display header\n // console.log(\n // `\\n${colors.dim(\"╭─\")} ${colors.bold(colors.cyanBright(\"TypeScript Health\"))} ${colors.dim(\"→\")} ${colors.cyan(fileName)}`,\n // );\n\n // Display errors\n if (errorCount > 0) {\n const errorMessages = result.messages.filter((m) => m.type === \"error\");\n for (const error of errorMessages) {\n const icon = colors.redBright(\"✖\");\n const level = colors.redBright(colors.bold(\"ERROR\"));\n console.log(\n `\\n${icon} ${level} ${colors.dim(\"in\")} ${colors.cyanBright(fileName)}${colors.dim(`(${error.lineNumber},${error.columnNumber})`)}`,\n );\n // Extract just the message text (remove file path prefix if present)\n const messageLines = error.message.split(\"\\n\");\n const cleanMessage = messageLines\n .map((line) => line.replace(/^[^:]+:\\d+:\\d+ - /, \"\").trim())\n .filter((line) => line.length > 0)\n .join(\"\\n\");\n console.log(` ${colors.dim(\"→\")} ${colors.red(cleanMessage)}`);\n\n // Display code line with underline indicator\n if (\n sourceLines.length > 0 &&\n error.lineNumber > 0 &&\n error.lineNumber <= sourceLines.length\n ) {\n const lineIndex = error.lineNumber - 1; // Convert to 0-based index\n const lineContent = sourceLines[lineIndex];\n const lineNum = error.lineNumber.toString().padStart(4, \" \");\n const errorLength = error.length || 1;\n const columnIndex = error.columnNumber - 1; // Convert to 0-based index\n\n // Display the line with normal color (not all red)\n console.log(` ${colors.dim(lineNum)} ${colors.dim(\"│\")} ${lineContent || \"\"}`);\n\n // Display underline indicator\n // Padding accounts for: lineNum.length + 1 space + 1 (│) + 1 space = lineNum.length + 3\n // (The initial 2 spaces indent is already in the console.log)\n const prefixPadding = lineNum.length + 3;\n const columnPadding = \" \".repeat(columnIndex);\n const underline = colors.redBright(\"~\".repeat(Math.max(1, errorLength)));\n console.log(` ${colors.dim(\" \".repeat(prefixPadding))}${columnPadding}${underline}`);\n }\n }\n }\n\n // Display warnings\n if (warningCount > 0) {\n const warningMessages = result.messages.filter((m) => m.type === \"warning\");\n for (const warning of warningMessages) {\n const icon = colors.yellowBright(\"⚠\");\n const level = colors.yellowBright(colors.bold(\"WARNING\"));\n console.log(\n `\\n${icon} ${level} ${colors.dim(\"in\")} ${colors.cyanBright(fileName)}${colors.dim(`(${warning.lineNumber},${warning.columnNumber})`)}`,\n );\n // Extract just the message text (remove file path prefix if present)\n const messageLines = warning.message.split(\"\\n\");\n const cleanMessage = messageLines\n .map((line) => line.replace(/^[^:]+:\\d+:\\d+ - /, \"\").trim())\n .filter((line) => line.length > 0)\n .join(\"\\n\");\n console.log(` ${colors.dim(\"→\")} ${colors.yellow(cleanMessage)}`);\n\n // Display code line with underline indicator\n if (\n sourceLines.length > 0 &&\n warning.lineNumber > 0 &&\n warning.lineNumber <= sourceLines.length\n ) {\n const lineIndex = warning.lineNumber - 1; // Convert to 0-based index\n const lineContent = sourceLines[lineIndex];\n const lineNum = warning.lineNumber.toString().padStart(4, \" \");\n const warningLength = warning.length || 1;\n const columnIndex = warning.columnNumber - 1; // Convert to 0-based index\n\n // Display the line with normal color (not all yellow)\n console.log(` ${colors.dim(lineNum)} ${colors.dim(\"│\")} ${lineContent || \"\"}`);\n\n // Display underline indicator\n // Padding accounts for: lineNum.length + 1 space + 1 (│) + 1 space = lineNum.length + 3\n // (The initial 2 spaces indent is already in the console.log)\n const prefixPadding = lineNum.length + 3;\n const columnPadding = \" \".repeat(columnIndex);\n const underline = colors.yellowBright(\"~\".repeat(Math.max(1, warningLength)));\n console.log(` ${colors.dim(\" \".repeat(prefixPadding))}${columnPadding}${underline}`);\n }\n }\n }\n\n // Display summary\n const summary = [];\n if (errorCount > 0) {\n summary.push(colors.red(`${errorCount} error${errorCount > 1 ? \"s\" : \"\"}`));\n }\n if (warningCount > 0) {\n summary.push(colors.yellow(`${warningCount} warning${warningCount > 1 ? \"s\" : \"\"}`));\n }\n\n // console.log(\n // `\\n${colors.dim(\"╰─\")} ${colors.bold(\"TypeScript\")} ${colors.dim(\"→\")} ${summary.join(colors.dim(\" and \"))}`,\n // );\n }\n\n public async onFileChanges(files: FileManager[]): Promise<void> {\n this.session?.update(files.map((file) => ({ path: file.absolutePath, content: file.source })));\n }\n\n public initialize(cwd = process.cwd()): TypescriptHealthChecker {\n this.shutdown();\n if (existsSync(path.join(cwd, \"tsconfig.json\"))) this.session = new CompilerSession(cwd);\n return this;\n }\n\n public override removeFile(file: FileManager): this {\n this.session?.update([], [file.absolutePath]);\n super.removeFile(file);\n return this;\n }\n\n public shutdown(): void {\n this.session?.close();\n this.session = null;\n }\n\n public async validate(file: FileManager, result: FileHealthResult): Promise<FileHealthResult> {\n if (!this.session || !/\\.tsx?$/i.test(file.absolutePath)) {\n result.markAsHealthy();\n return result;\n }\n this.session.update([{ path: file.absolutePath, content: file.source }]);\n const diagnostics = this.session.diagnostics(file.absolutePath);\n const messages = diagnostics.map((diagnostic) => ({\n type: diagnostic.severity,\n message: diagnostic.message,\n lineNumber: diagnostic.line,\n columnNumber: diagnostic.column,\n length: diagnostic.length,\n }));\n result.addErrors(messages.filter((message) => message.type === \"error\"));\n result.addWarnings(messages.filter((message) => message.type === \"warning\"));\n if (messages.length === 0) result.markAsHealthy();\n else this.displayResults(file, result);\n return result;\n }\n}\n"],"mappings":";;;;;;;AASA,IAAa,0BAAb,cACU,kBAEV;;;iBAC4C;cAIpB;oBAMM;;;;;CAK5B,AAAQ,eAAe,MAAmB,QAAgC;EACxE,MAAM,QAAQ,OAAO,SAAS;EAG9B,IAAI,MAAM,WAAW,KAAK,MAAM,aAAa,GAC3C;EAGF,MAAM,WAAW,KAAK,aAAa,QAAQ,OAAO,GAAG;EACrD,MAAM,aAAa,MAAM;EACzB,MAAM,eAAe,MAAM;EAC3B,MAAM,cAAc,KAAK,SAAS,KAAK,OAAO,MAAM,IAAI,IAAI,CAAC;EAQ7D,IAAI,aAAa,GAAG;GAClB,MAAM,gBAAgB,OAAO,SAAS,QAAQ,MAAM,EAAE,SAAS,OAAO;GACtE,KAAK,MAAM,SAAS,eAAe;IACjC,MAAM,OAAO,OAAO,UAAU,GAAG;IACjC,MAAM,QAAQ,OAAO,UAAU,OAAO,KAAK,OAAO,CAAC;IACnD,QAAQ,IACN,KAAK,KAAK,GAAG,MAAM,GAAG,OAAO,IAAI,IAAI,EAAE,GAAG,OAAO,WAAW,QAAQ,IAAI,OAAO,IAAI,IAAI,MAAM,WAAW,GAAG,MAAM,aAAa,EAAE,GAClI;IAGA,MAAM,eADe,MAAM,QAAQ,MAAM,IACT,CAAC,CAC9B,KAAK,SAAS,KAAK,QAAQ,qBAAqB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAC3D,QAAQ,SAAS,KAAK,SAAS,CAAC,CAAC,CACjC,KAAK,IAAI;IACZ,QAAQ,IAAI,KA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AAG,CAAC,KAAK,YAAY,CAAC;EAC5C,MAAM,WAAW,IAAI;EACrB,OAAO;CACT;CAEA,AAAO,WAAiB;EACtB,KAAK,SAAS,MAAM;EACpB,KAAK,UAAU;CACjB;CAEA,MAAa,SAAS,MAAmB,QAAqD;EAC5F,IAAI,CAAC,KAAK,WAAW,CAAC,WAAW,KAAK,KAAK,YAAY,GAAG;GACxD,OAAO,cAAc;GACrB,OAAO;EACT;EACA,KAAK,QAAQ,OAAO,CAAC;GAAE,MAAM,KAAK;GAAc,SAAS,KAAK;EAAO,CAAC,CAAC;EAEvE,MAAM,WADc,KAAK,QAAQ,YAAY,KAAK,YACvB,CAAC,CAAC,KAAK,gBAAgB;GAChD,MAAM,WAAW;GACjB,SAAS,WAAW;GACpB,YAAY,WAAW;GACvB,cAAc,WAAW;GACzB,QAAQ,WAAW;EACrB,EAAE;EACF,OAAO,UAAU,SAAS,QAAQ,YAAY,QAAQ,SAAS,OAAO,CAAC;EACvE,OAAO,YAAY,SAAS,QAAQ,YAAY,QAAQ,SAAS,SAAS,CAAC;EAC3E,IAAI,SAAS,WAAW,GAAG,OAAO,cAAc;OAC3C,KAAK,eAAe,MAAM,MAAM;EACrC,OAAO;CACT;AACF"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { FileManager } from "../file-manager.mjs";
|
|
2
2
|
import { FileHealthResult } from "./file-health-result.mjs";
|
|
3
|
-
|
|
4
3
|
//#region ../../packages/core/src/dev-server/health-checker/file-health-checker.contract.d.ts
|
|
5
|
-
type HealthCheckerFilesStats = {
|
|
4
|
+
export type HealthCheckerFilesStats = {
|
|
6
5
|
name: string;
|
|
7
6
|
files: {
|
|
8
7
|
healthy: number;
|
|
@@ -17,7 +16,7 @@ type HealthCheckerFilesStats = {
|
|
|
17
16
|
totalFiles: number;
|
|
18
17
|
};
|
|
19
18
|
};
|
|
20
|
-
interface FileHealthCheckerContract {
|
|
19
|
+
export interface FileHealthCheckerContract {
|
|
21
20
|
/**
|
|
22
21
|
* Health checker name (unique identifier)
|
|
23
22
|
*/
|
|
@@ -41,6 +40,8 @@ interface FileHealthCheckerContract {
|
|
|
41
40
|
* Called once on startup (before any checks run)
|
|
42
41
|
*/
|
|
43
42
|
initialize(): void;
|
|
43
|
+
/** Release resources owned by an inline checker. */
|
|
44
|
+
shutdown?(): void | Promise<void>;
|
|
44
45
|
/**
|
|
45
46
|
* Detect when files are changed
|
|
46
47
|
*/
|
|
@@ -59,11 +60,10 @@ interface FileHealthCheckerContract {
|
|
|
59
60
|
stats(): Promise<HealthCheckerFilesStats>;
|
|
60
61
|
}
|
|
61
62
|
/** Select built-in background checks; installed/configured linters run by default. */
|
|
62
|
-
type BuiltInHealthCheckerOptions = {
|
|
63
|
+
export type BuiltInHealthCheckerOptions = {
|
|
63
64
|
typescript?: boolean;
|
|
64
65
|
eslint?: boolean;
|
|
65
66
|
oxlint?: boolean;
|
|
66
67
|
};
|
|
67
68
|
//#endregion
|
|
68
|
-
export { BuiltInHealthCheckerOptions, FileHealthCheckerContract };
|
|
69
69
|
//# sourceMappingURL=file-health-checker.contract.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-health-checker.contract.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/dev-server/health-checker/file-health-checker.contract.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-health-checker.contract.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/dev-server/health-checker/file-health-checker.contract.ts"],"mappings":";;;YAGY;EACV;EACA;IACE;IACA;;EAEF;IACE;IACA;;EAEF;IACE;IACA;;;iBAIa;;;;EAIf;;;;;;;;;;;;;;EAeA;;;;;EAMA;;EAGA,oBAAoB;;;;EAKpB,cAAc,OAAO,gBAAgB;;;;EAKrC,WAAW,MAAM;;;;EAKjB,MAAM,MAAM,cAAc,QAAQ;;;;EAKlC,SAAS,QAAQ;;;YAIP;EACV;EACA;EACA"}
|
|
@@ -39,7 +39,7 @@ type FileHealthMessage = {
|
|
|
39
39
|
*/
|
|
40
40
|
ruleId?: string;
|
|
41
41
|
};
|
|
42
|
-
declare class FileHealthResult {
|
|
42
|
+
export declare class FileHealthResult {
|
|
43
43
|
/**
|
|
44
44
|
* Result of the health check
|
|
45
45
|
*/
|
|
@@ -66,5 +66,5 @@ declare class FileHealthResult {
|
|
|
66
66
|
getStats(): FileHealthStats;
|
|
67
67
|
}
|
|
68
68
|
//#endregion
|
|
69
|
-
export {
|
|
69
|
+
export {};
|
|
70
70
|
//# sourceMappingURL=file-health-result.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-health-result.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/dev-server/health-checker/file-health-result.ts"],"mappings":";KAAK
|
|
1
|
+
{"version":3,"file":"file-health-result.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/dev-server/health-checker/file-health-result.ts"],"mappings":";KAAK;;;;EAIH;;;;EAIA;;;;EAIA;;KAGG;;;;EAIH;;;;EAIA;;;;EAIA;;;;EAIA;;;;EAIA;;;;EAIA;;qBAGW;;;;EAIJ;;;;EAKA,UAAU;;;;EAKV;;;;EAOA,UAAU,UAAU;;;;EAQpB,YAAY,UAAU;;;;EAQtB,YAAY"}
|
|
@@ -368,6 +368,7 @@ var FilesHealthcareManager = class {
|
|
|
368
368
|
await worker.terminate();
|
|
369
369
|
} catch {}
|
|
370
370
|
}));
|
|
371
|
+
await Promise.all(this.healthCheckers.filter((checker) => !checker.workerPath).map((checker) => checker.shutdown?.()));
|
|
371
372
|
this.workers.clear();
|
|
372
373
|
this.workerInitPromises.clear();
|
|
373
374
|
this.checkerStats.clear();
|