@warlock.js/core 5.31.0 → 5.33.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 +61 -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 +9 -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 +22 -20
- package/esm/application/boot-signal.d.mts.map +1 -1
- package/esm/application/boot-signal.mjs +15 -9
- package/esm/application/boot-signal.mjs.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/ai/ai-command.action.mjs +140 -0
- package/esm/cli/commands/ai/ai-command.action.mjs.map +1 -0
- package/esm/cli/commands/ai.command.mjs +50 -0
- package/esm/cli/commands/ai.command.mjs.map +1 -0
- package/esm/cli/commands/board/board-command.action.mjs +1 -1
- package/esm/cli/commands/check/check-command.action.mjs +4 -1
- package/esm/cli/commands/check/check-command.action.mjs.map +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/check.command.mjs +6 -1
- package/esm/cli/commands/check.command.mjs.map +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/pm2/pm2-command.action.mjs +91 -0
- package/esm/cli/commands/pm2/pm2-command.action.mjs.map +1 -0
- package/esm/cli/commands/pm2/pm2-config.mjs +115 -0
- package/esm/cli/commands/pm2/pm2-config.mjs.map +1 -0
- package/esm/cli/commands/pm2.command.mjs +53 -0
- package/esm/cli/commands/pm2.command.mjs.map +1 -0
- 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 +6 -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 +3 -6
- 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/shutdown-timeout.mjs +7 -0
- package/esm/connectors/shutdown-timeout.mjs.map +1 -0
- 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 +20 -11
- 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/eslint-health-checker.mjs +6 -8
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.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/default-health-checkers.mjs +6 -15
- package/esm/dev-server/health-checker/default-health-checkers.mjs.map +1 -1
- package/esm/dev-server/health-checker/eslint-support.mjs +27 -0
- package/esm/dev-server/health-checker/eslint-support.mjs.map +1 -0
- package/esm/dev-server/health-checker/file-health-checker.contract.d.mts +7 -6
- package/esm/dev-server/health-checker/file-health-checker.contract.d.mts.map +1 -1
- package/esm/dev-server/health-checker/file-health-result.d.mts +2 -2
- package/esm/dev-server/health-checker/file-health-result.d.mts.map +1 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs +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/eslint-health.worker.mjs +2 -11
- package/esm/dev-server/health-checker/workers/eslint-health.worker.mjs.map +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/index.mjs +2 -0
- package/esm/generations/features/index.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/process.feature.mjs +65 -0
- package/esm/generations/features/process.feature.mjs.map +1 -0
- 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/port-preflight.mjs +2 -0
- package/esm/http/port-preflight.mjs.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 +28 -2
- package/esm/index.mjs +7 -2
- 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/secrets/errors.d.mts +9 -0
- package/esm/secrets/errors.d.mts.map +1 -0
- package/esm/secrets/errors.mjs +22 -0
- package/esm/secrets/errors.mjs.map +1 -0
- package/esm/secrets/file-backend.mjs +167 -0
- package/esm/secrets/file-backend.mjs.map +1 -0
- package/esm/secrets/index.d.mts +6 -0
- package/esm/secrets/index.mjs +6 -0
- package/esm/secrets/keyring-backend.mjs +50 -0
- package/esm/secrets/keyring-backend.mjs.map +1 -0
- package/esm/secrets/memory-backend.d.mts +12 -0
- package/esm/secrets/memory-backend.d.mts.map +1 -0
- package/esm/secrets/memory-backend.mjs +28 -0
- package/esm/secrets/memory-backend.mjs.map +1 -0
- package/esm/secrets/secret-store.d.mts +25 -0
- package/esm/secrets/secret-store.d.mts.map +1 -0
- package/esm/secrets/secret-store.mjs +117 -0
- package/esm/secrets/secret-store.mjs.map +1 -0
- package/esm/secrets/secrets.d.mts +11 -0
- package/esm/secrets/secrets.d.mts.map +1 -0
- package/esm/secrets/secrets.mjs +63 -0
- package/esm/secrets/secrets.mjs.map +1 -0
- package/esm/secrets/types.d.mts +22 -0
- package/esm/secrets/types.d.mts.map +1 -0
- package/esm/socket/index.d.mts +2 -1
- package/esm/socket/index.mjs +2 -2
- package/esm/socket/types.d.mts +2 -4
- package/esm/socket/types.d.mts.map +1 -1
- package/esm/socket/utils.d.mts +8 -3
- package/esm/socket/utils.d.mts.map +1 -1
- package/esm/socket/utils.mjs +12 -1
- package/esm/socket/utils.mjs.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 +3 -1
- package/esm/tests/fakes/index.mjs +2 -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/secrets-fake.d.mts +13 -0
- package/esm/tests/fakes/secrets-fake.d.mts.map +1 -0
- package/esm/tests/fakes/secrets-fake.mjs +50 -0
- package/esm/tests/fakes/secrets-fake.mjs.map +1 -0
- 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 +9 -10
- package/esm/tests/fakes/test-fakes.d.mts.map +1 -1
- package/esm/tests/fakes/test-fakes.mjs +6 -3
- package/esm/tests/fakes/test-fakes.mjs.map +1 -1
- package/esm/tests/index.d.mts +3 -1
- package/esm/tests/index.mjs +2 -1
- 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 +7 -8
- package/esm/tests/vitest-setup.d.mts.map +1 -1
- package/esm/tests/vitest-setup.mjs.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 +5 -12
- package/esm/tooling/check/lint-step.d.mts.map +1 -1
- package/esm/tooling/check/lint-step.mjs +16 -12
- 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 +24 -14
- package/esm/tooling/check/run-check.d.mts.map +1 -1
- package/esm/tooling/check/run-check.mjs +2 -2
- package/esm/tooling/check/run-check.mjs.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 +3 -1
- package/esm/upgrade/codemods/index.mjs.map +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/oxc-toolchain.mjs +142 -0
- package/esm/upgrade/codemods/oxc-toolchain.mjs.map +1 -0
- package/esm/upgrade/codemods/request-log-snapshot.mjs +1 -1
- package/esm/upgrade/codemods/request-log-snapshot.mjs.map +1 -1
- package/esm/upgrade/codemods/toolchain-templates.mjs +244 -0
- package/esm/upgrade/codemods/toolchain-templates.mjs.map +1 -0
- 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 +26 -7
- package/esm/upgrade/run-upgrade.mjs.map +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 +8 -6
- package/esm/warlock-config/types.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.d.mts +5 -7
- package/esm/warlock-config/warlock-config.manager.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.mjs +2 -1
- package/esm/warlock-config/warlock-config.manager.mjs.map +1 -1
- package/esm/warlock-config/warn-deprecated-config.mjs +1 -1
- package/llms-full.txt +379 -22
- package/llms.txt +3 -2
- package/package.json +27 -15
- package/skills/README.md +2 -1
- package/skills/create-module/SKILL.md +7 -0
- package/skills/index.md +3 -1
- package/skills/report-framework-issue.md +154 -0
- package/skills/run-app/SKILL.md +120 -10
- package/skills/store-secrets/SKILL.md +102 -0
- package/skills/test-fakes/SKILL.md +13 -11
- package/skills/upgrade-from-5-29/SKILL.md +78 -0
- package/skills/warlock-check/SKILL.md +6 -1
- package/skills/warlock-doctor/SKILL.md +9 -0
- package/skills/wire-socket/SKILL.md +19 -0
- package/skills/write-cli-command/SKILL.md +21 -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":"index.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/upgrade/codemods/index.ts"],"sourcesContent":["import type { Codemod } from \"../types\";\nimport { headViewport } from \"./head-viewport\";\nimport { loggerSyncCalls } from \"./logger-sync-calls\";\nimport { node2215, warlockVersions } from \"./package-json\";\nimport { requestLogSnapshot } from \"./request-log-snapshot\";\nimport {\n aiAnthropicBody,\n aiCompactionOptIn,\n aiFinishReason,\n aiToolDispatch,\n rateLimitDefaults,\n sealContainerCatch,\n sealRefineOutput,\n sealUnionOutput,\n sealValidateResult,\n} from \"./review-sites\";\n\n/**\n * Every codemod, oldest release first. A codemod runs when the app upgrades\n * across its `version` (`from < version <= to`); `\"target\"` ones run on every\n * upgrade. Add one here for each breaking change, and name its id next to the\n * `**BREAKING**` entry in the package changelog.\n */\nexport const CODEMODS: readonly Codemod[] = [\n loggerSyncCalls,\n requestLogSnapshot,\n headViewport,\n sealValidateResult,\n aiToolDispatch,\n aiAnthropicBody,\n aiFinishReason,\n node2215,\n rateLimitDefaults,\n sealRefineOutput,\n sealContainerCatch,\n sealUnionOutput,\n aiCompactionOptIn,\n warlockVersions,\n];\n\nexport * from \"./helpers\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/upgrade/codemods/index.ts"],"sourcesContent":["import type { Codemod } from \"../types\";\nimport { headViewport } from \"./head-viewport\";\nimport { loggerSyncCalls } from \"./logger-sync-calls\";\nimport { node2215, warlockVersions } from \"./package-json\";\nimport { oxcToolchain } from \"./oxc-toolchain\";\nimport { requestLogSnapshot } from \"./request-log-snapshot\";\nimport {\n aiAnthropicBody,\n aiCompactionOptIn,\n aiFinishReason,\n aiToolDispatch,\n rateLimitDefaults,\n sealContainerCatch,\n sealRefineOutput,\n sealUnionOutput,\n sealValidateResult,\n} from \"./review-sites\";\n\n/**\n * Every codemod, oldest release first. A codemod runs when the app upgrades\n * across its `version` (`from < version <= to`); `\"target\"` ones run on every\n * upgrade. Add one here for each breaking change, and name its id next to the\n * `**BREAKING**` entry in the package changelog.\n */\nexport const CODEMODS: readonly Codemod[] = [\n loggerSyncCalls,\n requestLogSnapshot,\n headViewport,\n sealValidateResult,\n aiToolDispatch,\n aiAnthropicBody,\n aiFinishReason,\n node2215,\n rateLimitDefaults,\n sealRefineOutput,\n sealContainerCatch,\n sealUnionOutput,\n aiCompactionOptIn,\n oxcToolchain,\n warlockVersions,\n];\n\nexport * from \"./helpers\";\n"],"mappings":";;;;;;;;;;;;;;;AAwBA,MAAa,WAA+B;CAC1C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger-sync-calls.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/upgrade/codemods/logger-sync-calls.ts"],"sourcesContent":["import type { Codemod, CodemodOutput } from \"../types\";\nimport { importedLocalNames, manualAt, replaceNode } from \"./helpers\";\n\nconst SYNC_METHODS = new Set([\n \"info\",\n \"warn\",\n \"error\",\n \"debug\",\n \"success\",\n \"fatal\",\n \"log\",\n \"assert\",\n]);\n\n/**\n * 5.30: `log.info()` and its siblings return the logger instead of a promise.\n * Removes `await` in front of them; a `.then()` chained on one is listed for\n * review (code that must wait for delivery calls `await log.flush()`).\n */\nexport const loggerSyncCalls: Codemod = {\n id: \"logger-sync-calls\",\n version: \"5.30.0\",\n package: \"@warlock.js/logger\",\n title: \"Remove `await` from synchronous log calls\",\n skill: \"upgrade-from-5-29\",\n run(context) {\n const { Node, SyntaxKind } = context.tsMorph;\n const output: CodemodOutput = { edits: [], manual: [] };\n\n for (const sourceFile of context.sourceFiles) {\n const loggers = importedLocalNames(sourceFile, \"@warlock.js/logger\", \"log\");\n if (loggers.size === 0) continue;\n\n const isLogCall = (node: import(\"ts-morph\").Node): boolean => {\n if (!Node.isCallExpression(node)) return false;\n const callee = node.getExpression();\n if (!Node.isPropertyAccessExpression(callee)) return false;\n const owner = callee.getExpression();\n return (\n Node.isIdentifier(owner) &&\n loggers.has(owner.getText()) &&\n SYNC_METHODS.has(callee.getName())\n );\n };\n\n for (const awaitExpression of sourceFile.getDescendantsOfKind(SyntaxKind.AwaitExpression)) {\n const argument = awaitExpression.getExpression();\n if (!isLogCall(argument)) continue;\n output.edits.push(\n replaceNode(\n context,\n awaitExpression,\n argument.getText(),\n `removed await before ${argument.getText().split(\"(\")[0]}()`,\n ),\n );\n }\n\n for (const access of sourceFile.getDescendantsOfKind(SyntaxKind.PropertyAccessExpression)) {\n if (access.getName() !== \"then\" || !isLogCall(access.getExpression())) continue;\n output.manual.push(\n manualAt(\n context,\n access,\n \"`.then()` on a log call: log calls return the logger now. Run the callback directly, or `await log.flush()` first if it must wait for delivery.\",\n ),\n );\n }\n }\n\n return output;\n },\n};\n"],"mappings":";;;AAGA,MAAM,
|
|
1
|
+
{"version":3,"file":"logger-sync-calls.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/upgrade/codemods/logger-sync-calls.ts"],"sourcesContent":["import type { Codemod, CodemodOutput } from \"../types\";\nimport { importedLocalNames, manualAt, replaceNode } from \"./helpers\";\n\nconst SYNC_METHODS = new Set([\n \"info\",\n \"warn\",\n \"error\",\n \"debug\",\n \"success\",\n \"fatal\",\n \"log\",\n \"assert\",\n]);\n\n/**\n * 5.30: `log.info()` and its siblings return the logger instead of a promise.\n * Removes `await` in front of them; a `.then()` chained on one is listed for\n * review (code that must wait for delivery calls `await log.flush()`).\n */\nexport const loggerSyncCalls: Codemod = {\n id: \"logger-sync-calls\",\n version: \"5.30.0\",\n package: \"@warlock.js/logger\",\n title: \"Remove `await` from synchronous log calls\",\n skill: \"upgrade-from-5-29\",\n run(context) {\n const { Node, SyntaxKind } = context.tsMorph;\n const output: CodemodOutput = { edits: [], manual: [] };\n\n for (const sourceFile of context.sourceFiles) {\n const loggers = importedLocalNames(sourceFile, \"@warlock.js/logger\", \"log\");\n if (loggers.size === 0) continue;\n\n const isLogCall = (node: import(\"ts-morph\").Node): boolean => {\n if (!Node.isCallExpression(node)) return false;\n const callee = node.getExpression();\n if (!Node.isPropertyAccessExpression(callee)) return false;\n const owner = callee.getExpression();\n return (\n Node.isIdentifier(owner) &&\n loggers.has(owner.getText()) &&\n SYNC_METHODS.has(callee.getName())\n );\n };\n\n for (const awaitExpression of sourceFile.getDescendantsOfKind(SyntaxKind.AwaitExpression)) {\n const argument = awaitExpression.getExpression();\n if (!isLogCall(argument)) continue;\n output.edits.push(\n replaceNode(\n context,\n awaitExpression,\n argument.getText(),\n `removed await before ${argument.getText().split(\"(\")[0]}()`,\n ),\n );\n }\n\n for (const access of sourceFile.getDescendantsOfKind(SyntaxKind.PropertyAccessExpression)) {\n if (access.getName() !== \"then\" || !isLogCall(access.getExpression())) continue;\n output.manual.push(\n manualAt(\n context,\n access,\n \"`.then()` on a log call: log calls return the logger now. Run the callback directly, or `await log.flush()` first if it must wait for delivery.\",\n ),\n );\n }\n }\n\n return output;\n },\n};\n"],"mappings":";;;AAGA,MAAM,+BAAe,IAAI,IAAI;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;AAOD,MAAa,kBAA2B;CACtC,IAAI;CACJ,SAAS;CACT,SAAS;CACT,OAAO;CACP,OAAO;CACP,IAAI,SAAS;EACX,MAAM,EAAE,MAAM,eAAe,QAAQ;EACrC,MAAM,SAAwB;GAAE,OAAO,CAAC;GAAG,QAAQ,CAAC;EAAE;EAEtD,KAAK,MAAM,cAAc,QAAQ,aAAa;GAC5C,MAAM,UAAU,mBAAmB,YAAY,sBAAsB,KAAK;GAC1E,IAAI,QAAQ,SAAS,GAAG;GAExB,MAAM,aAAa,SAA2C;IAC5D,IAAI,CAAC,KAAK,iBAAiB,IAAI,GAAG,OAAO;IACzC,MAAM,SAAS,KAAK,cAAc;IAClC,IAAI,CAAC,KAAK,2BAA2B,MAAM,GAAG,OAAO;IACrD,MAAM,QAAQ,OAAO,cAAc;IACnC,OACE,KAAK,aAAa,KAAK,KACvB,QAAQ,IAAI,MAAM,QAAQ,CAAC,KAC3B,aAAa,IAAI,OAAO,QAAQ,CAAC;GAErC;GAEA,KAAK,MAAM,mBAAmB,WAAW,qBAAqB,WAAW,eAAe,GAAG;IACzF,MAAM,WAAW,gBAAgB,cAAc;IAC/C,IAAI,CAAC,UAAU,QAAQ,GAAG;IAC1B,OAAO,MAAM,KACX,YACE,SACA,iBACA,SAAS,QAAQ,GACjB,wBAAwB,SAAS,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAC3D,CACF;GACF;GAEA,KAAK,MAAM,UAAU,WAAW,qBAAqB,WAAW,wBAAwB,GAAG;IACzF,IAAI,OAAO,QAAQ,MAAM,UAAU,CAAC,UAAU,OAAO,cAAc,CAAC,GAAG;IACvE,OAAO,OAAO,KACZ,SACE,SACA,QACA,iJACF,CACF;GACF;EACF;EAEA,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { TOOLCHAIN_TEMPLATES } from "./toolchain-templates.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../packages/core/src/upgrade/codemods/oxc-toolchain.ts
|
|
4
|
+
/** Snapshots ship with core; parity specs keep them aligned with create-warlock. */
|
|
5
|
+
function asset(name) {
|
|
6
|
+
const content = TOOLCHAIN_TEMPLATES[name];
|
|
7
|
+
if (content === void 0) throw new Error(`Unknown toolchain template: ${name}`);
|
|
8
|
+
return content;
|
|
9
|
+
}
|
|
10
|
+
const OXC_VERSIONS = {
|
|
11
|
+
oxlint: "1.88.0",
|
|
12
|
+
oxfmt: "0.73.0",
|
|
13
|
+
typescript: "7.0.2"
|
|
14
|
+
};
|
|
15
|
+
const OXC_SCRIPTS = {
|
|
16
|
+
lint: "oxlint --fix ./src --max-warnings=0",
|
|
17
|
+
"lint:check": "oxlint ./src --max-warnings=0",
|
|
18
|
+
format: "oxfmt --ignore-path .gitignore --ignore-path .oxfmtignore --write ./src",
|
|
19
|
+
"format:check": "oxfmt --ignore-path .gitignore --ignore-path .oxfmtignore --check ./src"
|
|
20
|
+
};
|
|
21
|
+
function legacyDependency(name) {
|
|
22
|
+
return /^(eslint|prettier|@types\/prettier|eslint-config-prettier)$/.test(name) || name.startsWith("@typescript-eslint/") || /(?:^|\/)eslint-plugin-/.test(name) || /(?:^|\/)prettier-plugin-/.test(name) || name.startsWith("@prettier/plugin-");
|
|
23
|
+
}
|
|
24
|
+
function sameGenerated(source, expected) {
|
|
25
|
+
try {
|
|
26
|
+
return JSON.stringify(JSON.parse(source)) === JSON.stringify(JSON.parse(expected));
|
|
27
|
+
} catch {
|
|
28
|
+
return source.replace(/\r\n/g, "\n").trim() === expected.replace(/\r\n/g, "\n").trim();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function review(output, file, hint, line = 1) {
|
|
32
|
+
output.manual.push({
|
|
33
|
+
file,
|
|
34
|
+
line,
|
|
35
|
+
hint
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function migrateHealthSwitches(context, output) {
|
|
39
|
+
const file = "warlock.config.ts";
|
|
40
|
+
const source = context.text.read(file);
|
|
41
|
+
if (source === void 0) return;
|
|
42
|
+
const config = new context.tsMorph.Project({ useInMemoryFileSystem: true }).createSourceFile(file, source);
|
|
43
|
+
const switches = config.getDescendantsOfKind(context.tsMorph.SyntaxKind.PropertyAssignment).filter((property) => property.getName() === "healthCheckers");
|
|
44
|
+
let changed = false;
|
|
45
|
+
for (const property of switches) {
|
|
46
|
+
const value = property.getInitializer();
|
|
47
|
+
if (!value || !context.tsMorph.Node.isObjectLiteralExpression(value)) {
|
|
48
|
+
if (value?.getText() !== "false") review(output, file, "Review custom healthCheckers; remove ESLint checkers and enable Oxlint. ESLint support is removed in 5.34.0.", property.getStartLineNumber());
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
for (const spread of value.getProperties().filter(context.tsMorph.Node.isSpreadAssignment)) review(output, file, "Review spread healthCheckers options; set eslint: false and oxlint: true explicitly after the spread.", spread.getStartLineNumber());
|
|
52
|
+
for (const [name, next] of [["eslint", "false"], ["oxlint", "true"]]) {
|
|
53
|
+
const option = value.getProperty(name);
|
|
54
|
+
if (!option) continue;
|
|
55
|
+
if (!context.tsMorph.Node.isPropertyAssignment(option) || !["true", "false"].includes(option.getInitializer()?.getText() ?? "")) {
|
|
56
|
+
review(output, file, `Set healthCheckers.${name} to ${next} after reviewing this computed option.`, option.getStartLineNumber());
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
if (option.getInitializer()?.getText() !== next) {
|
|
60
|
+
option.setInitializer(next);
|
|
61
|
+
changed = true;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (changed) context.text.write(file, config.getFullText(), {
|
|
66
|
+
line: 1,
|
|
67
|
+
description: "Select Oxlint instead of ESLint for background health checks"
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
const oxcToolchain = {
|
|
71
|
+
id: "oxc-toolchain",
|
|
72
|
+
version: "5.33.0",
|
|
73
|
+
package: "@warlock.js/core",
|
|
74
|
+
title: "Migrate ESLint and Prettier to Oxlint and Oxfmt",
|
|
75
|
+
skill: "upgrade-from-5-29",
|
|
76
|
+
run(context) {
|
|
77
|
+
const output = {
|
|
78
|
+
edits: [],
|
|
79
|
+
manual: []
|
|
80
|
+
};
|
|
81
|
+
const source = context.text.read("package.json");
|
|
82
|
+
if (source === void 0) return output;
|
|
83
|
+
const pkg = JSON.parse(source);
|
|
84
|
+
const legacyFiles = context.text.list().filter((file) => /^(eslint\.config\..+|\.eslintrc(?:\..+)?|\.prettierrc(?:\..+)?|prettier\.config\..+|\.prettierignore)$/.test(file));
|
|
85
|
+
const dependencies = [pkg.dependencies, pkg.devDependencies];
|
|
86
|
+
const legacyScripts = Object.values(pkg.scripts ?? {}).some((script) => /\b(?:eslint|prettier)\b/.test(script));
|
|
87
|
+
if (!legacyFiles.length && !legacyScripts && !dependencies.some((deps) => Object.keys(deps ?? {}).some(legacyDependency))) return output;
|
|
88
|
+
const change = {
|
|
89
|
+
line: 1,
|
|
90
|
+
description: "Replace ESLint/Prettier with the default Oxlint/Oxfmt toolchain"
|
|
91
|
+
};
|
|
92
|
+
for (const deps of dependencies) for (const name of Object.keys(deps ?? {})) if (deps && (legacyDependency(name) || name in OXC_VERSIONS)) delete deps[name];
|
|
93
|
+
pkg.devDependencies = {
|
|
94
|
+
...pkg.devDependencies,
|
|
95
|
+
...OXC_VERSIONS
|
|
96
|
+
};
|
|
97
|
+
pkg.scripts = {
|
|
98
|
+
...pkg.scripts,
|
|
99
|
+
...OXC_SCRIPTS
|
|
100
|
+
};
|
|
101
|
+
if (/\beslint\b/.test(pkg.scripts.fix ?? "")) pkg.scripts.fix = OXC_SCRIPTS.lint;
|
|
102
|
+
for (const [name, command] of Object.entries(pkg.scripts)) if (/\b(?:eslint|prettier)\b/.test(command)) review(output, "package.json", `Replace the custom ${name} script (${command}) with oxlint or oxfmt; the legacy tools have been removed from dependencies.`);
|
|
103
|
+
context.text.write("package.json", `${JSON.stringify(pkg, null, 2)}\n`, change);
|
|
104
|
+
for (const file of [".oxlintrc.json", ".oxfmtrc.json"]) if (context.text.read(file) === void 0) context.text.write(file, asset(file.slice(1)), change);
|
|
105
|
+
for (const file of legacyFiles) {
|
|
106
|
+
const content = context.text.read(file);
|
|
107
|
+
const known = [
|
|
108
|
+
"eslint.config.js",
|
|
109
|
+
".prettierrc.json",
|
|
110
|
+
".prettierignore"
|
|
111
|
+
].includes(file);
|
|
112
|
+
if (content === void 0) continue;
|
|
113
|
+
if (!known || !sameGenerated(content, asset(`legacy-${file.replace(/^\./, "")}`))) {
|
|
114
|
+
review(output, file, "Customized legacy config retained. Port its rules, plugins, formatting or ignore patterns to .oxlintrc.json / .oxfmtrc.json / .oxfmtignore, then remove this file. Legacy support is removed in 5.34.0.");
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
if (file === ".prettierignore") {
|
|
118
|
+
const existing = context.text.read(".oxfmtignore");
|
|
119
|
+
if (existing === void 0) context.text.write(".oxfmtignore", content, change);
|
|
120
|
+
else if (existing.trim() !== content.trim()) {
|
|
121
|
+
review(output, file, "Merge these ignore patterns into the existing .oxfmtignore, then remove .prettierignore.");
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
context.text.remove(file, change);
|
|
126
|
+
}
|
|
127
|
+
if (context.text.read(".oxfmtignore") === void 0) context.text.write(".oxfmtignore", "node_modules\ndist\n", change);
|
|
128
|
+
for (const name of ["settings.json", "extensions.json"]) {
|
|
129
|
+
const file = `.vscode/${name}`;
|
|
130
|
+
const content = context.text.read(file);
|
|
131
|
+
if (content === void 0) continue;
|
|
132
|
+
if (name === "settings.json" && sameGenerated(content, asset(`legacy-vscode-${name}`))) context.text.write(file, asset(`oxc-vscode-${name}`), change);
|
|
133
|
+
else review(output, file, "Review editor settings: select oxc.oxc-vscode as the formatter, enable source.fixAll.oxc and remove ESLint/Prettier extension recommendations.");
|
|
134
|
+
}
|
|
135
|
+
migrateHealthSwitches(context, output);
|
|
136
|
+
return output;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
//#endregion
|
|
141
|
+
export { OXC_SCRIPTS, OXC_VERSIONS, oxcToolchain };
|
|
142
|
+
//# sourceMappingURL=oxc-toolchain.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oxc-toolchain.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/upgrade/codemods/oxc-toolchain.ts"],"sourcesContent":["import type { Codemod, CodemodContext, CodemodOutput } from \"../types\";\nimport { TOOLCHAIN_TEMPLATES } from \"./toolchain-templates\";\n\n/** Snapshots ship with core; parity specs keep them aligned with create-warlock. */\nfunction asset(name: string): string {\n const content = TOOLCHAIN_TEMPLATES[name];\n if (content === undefined) throw new Error(`Unknown toolchain template: ${name}`);\n return content;\n}\n\nexport const OXC_VERSIONS = { oxlint: \"1.88.0\", oxfmt: \"0.73.0\", typescript: \"7.0.2\" };\nexport const OXC_SCRIPTS = {\n lint: \"oxlint --fix ./src --max-warnings=0\",\n \"lint:check\": \"oxlint ./src --max-warnings=0\",\n format: \"oxfmt --ignore-path .gitignore --ignore-path .oxfmtignore --write ./src\",\n \"format:check\": \"oxfmt --ignore-path .gitignore --ignore-path .oxfmtignore --check ./src\",\n};\n\nfunction legacyDependency(name: string): boolean {\n return (\n /^(eslint|prettier|@types\\/prettier|eslint-config-prettier)$/.test(name) ||\n name.startsWith(\"@typescript-eslint/\") ||\n /(?:^|\\/)eslint-plugin-/.test(name) ||\n /(?:^|\\/)prettier-plugin-/.test(name) ||\n name.startsWith(\"@prettier/plugin-\")\n );\n}\n\nfunction sameGenerated(source: string, expected: string): boolean {\n // JSON may have been reformatted by the app; compare its data. Executable\n // configs are deliberately exact (apart from line endings/trailing space).\n try {\n return JSON.stringify(JSON.parse(source)) === JSON.stringify(JSON.parse(expected));\n } catch {\n return source.replace(/\\r\\n/g, \"\\n\").trim() === expected.replace(/\\r\\n/g, \"\\n\").trim();\n }\n}\n\nfunction review(output: CodemodOutput, file: string, hint: string, line = 1): void {\n output.manual.push({ file, line, hint });\n}\n\nfunction migrateHealthSwitches(context: CodemodContext, output: CodemodOutput): void {\n const file = \"warlock.config.ts\";\n const source = context.text.read(file);\n if (source === undefined) return;\n const project = new context.tsMorph.Project({ useInMemoryFileSystem: true });\n const config = project.createSourceFile(file, source);\n const switches = config\n .getDescendantsOfKind(context.tsMorph.SyntaxKind.PropertyAssignment)\n .filter((property) => property.getName() === \"healthCheckers\");\n let changed = false;\n for (const property of switches) {\n const value = property.getInitializer();\n if (!value || !context.tsMorph.Node.isObjectLiteralExpression(value)) {\n if (value?.getText() !== \"false\")\n review(\n output,\n file,\n \"Review custom healthCheckers; remove ESLint checkers and enable Oxlint. ESLint support is removed in 5.34.0.\",\n property.getStartLineNumber(),\n );\n continue;\n }\n for (const spread of value.getProperties().filter(context.tsMorph.Node.isSpreadAssignment)) {\n review(\n output,\n file,\n \"Review spread healthCheckers options; set eslint: false and oxlint: true explicitly after the spread.\",\n spread.getStartLineNumber(),\n );\n }\n for (const [name, next] of [\n [\"eslint\", \"false\"],\n [\"oxlint\", \"true\"],\n ] as const) {\n const option = value.getProperty(name);\n if (!option) continue;\n if (\n !context.tsMorph.Node.isPropertyAssignment(option) ||\n ![\"true\", \"false\"].includes(option.getInitializer()?.getText() ?? \"\")\n ) {\n review(\n output,\n file,\n `Set healthCheckers.${name} to ${next} after reviewing this computed option.`,\n option.getStartLineNumber(),\n );\n continue;\n }\n if (option.getInitializer()?.getText() !== next) {\n option.setInitializer(next);\n changed = true;\n }\n }\n }\n if (changed)\n context.text.write(file, config.getFullText(), {\n line: 1,\n description: \"Select Oxlint instead of ESLint for background health checks\",\n });\n}\n\nexport const oxcToolchain: Codemod = {\n id: \"oxc-toolchain\",\n version: \"5.33.0\",\n package: \"@warlock.js/core\",\n title: \"Migrate ESLint and Prettier to Oxlint and Oxfmt\",\n skill: \"upgrade-from-5-29\",\n run(context) {\n const output: CodemodOutput = { edits: [], manual: [] };\n const source = context.text.read(\"package.json\");\n if (source === undefined) return output;\n const pkg = JSON.parse(source) as {\n scripts?: Record<string, string>;\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n };\n const legacyFiles = context.text\n .list()\n .filter((file) =>\n /^(eslint\\.config\\..+|\\.eslintrc(?:\\..+)?|\\.prettierrc(?:\\..+)?|prettier\\.config\\..+|\\.prettierignore)$/.test(\n file,\n ),\n );\n const dependencies = [pkg.dependencies, pkg.devDependencies];\n const legacyScripts = Object.values(pkg.scripts ?? {}).some((script) =>\n /\\b(?:eslint|prettier)\\b/.test(script),\n );\n if (\n !legacyFiles.length &&\n !legacyScripts &&\n !dependencies.some((deps) => Object.keys(deps ?? {}).some(legacyDependency))\n )\n return output;\n\n const change = {\n line: 1,\n description: \"Replace ESLint/Prettier with the default Oxlint/Oxfmt toolchain\",\n };\n for (const deps of dependencies) {\n for (const name of Object.keys(deps ?? {})) {\n if (deps && (legacyDependency(name) || name in OXC_VERSIONS)) delete deps[name];\n }\n }\n pkg.devDependencies = { ...pkg.devDependencies, ...OXC_VERSIONS };\n pkg.scripts = { ...pkg.scripts, ...OXC_SCRIPTS };\n if (/\\beslint\\b/.test(pkg.scripts.fix ?? \"\")) pkg.scripts.fix = OXC_SCRIPTS.lint;\n for (const [name, command] of Object.entries(pkg.scripts)) {\n if (/\\b(?:eslint|prettier)\\b/.test(command))\n review(\n output,\n \"package.json\",\n `Replace the custom ${name} script (${command}) with oxlint or oxfmt; the legacy tools have been removed from dependencies.`,\n );\n }\n context.text.write(\"package.json\", `${JSON.stringify(pkg, null, 2)}\\n`, change);\n\n for (const file of [\".oxlintrc.json\", \".oxfmtrc.json\"]) {\n if (context.text.read(file) === undefined)\n context.text.write(file, asset(file.slice(1)), change);\n }\n for (const file of legacyFiles) {\n const content = context.text.read(file);\n const known = [\"eslint.config.js\", \".prettierrc.json\", \".prettierignore\"].includes(file);\n if (content === undefined) continue;\n if (!known || !sameGenerated(content, asset(`legacy-${file.replace(/^\\./, \"\")}`))) {\n review(\n output,\n file,\n \"Customized legacy config retained. Port its rules, plugins, formatting or ignore patterns to .oxlintrc.json / .oxfmtrc.json / .oxfmtignore, then remove this file. Legacy support is removed in 5.34.0.\",\n );\n continue;\n }\n if (file === \".prettierignore\") {\n const existing = context.text.read(\".oxfmtignore\");\n if (existing === undefined) context.text.write(\".oxfmtignore\", content, change);\n else if (existing.trim() !== content.trim()) {\n review(\n output,\n file,\n \"Merge these ignore patterns into the existing .oxfmtignore, then remove .prettierignore.\",\n );\n continue;\n }\n }\n context.text.remove(file, change);\n }\n // Oxfmt 0.73 uses .prettierignore by default (verified with --help).\n // Explicit script ignore paths make the migrated .oxfmtignore effective.\n if (context.text.read(\".oxfmtignore\") === undefined) {\n context.text.write(\".oxfmtignore\", \"node_modules\\ndist\\n\", change);\n }\n for (const name of [\"settings.json\", \"extensions.json\"]) {\n const file = `.vscode/${name}`;\n const content = context.text.read(file);\n if (content === undefined) continue;\n if (name === \"settings.json\" && sameGenerated(content, asset(`legacy-vscode-${name}`)))\n context.text.write(file, asset(`oxc-vscode-${name}`), change);\n else\n review(\n output,\n file,\n \"Review editor settings: select oxc.oxc-vscode as the formatter, enable source.fixAll.oxc and remove ESLint/Prettier extension recommendations.\",\n );\n }\n migrateHealthSwitches(context, output);\n return output;\n },\n};\n"],"mappings":"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"}
|
|
@@ -2,7 +2,7 @@ import { importedLocalNames, manualAt, replaceNode } from "./helpers.mjs";
|
|
|
2
2
|
|
|
3
3
|
//#region ../../packages/core/src/upgrade/codemods/request-log-snapshot.ts
|
|
4
4
|
/** Fields of the `RequestLogSnapshot` a log channel now receives. */
|
|
5
|
-
const SNAPSHOT_FIELDS = new Set([
|
|
5
|
+
const SNAPSHOT_FIELDS = /* @__PURE__ */ new Set([
|
|
6
6
|
"id",
|
|
7
7
|
"method",
|
|
8
8
|
"url",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-log-snapshot.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/upgrade/codemods/request-log-snapshot.ts"],"sourcesContent":["import type * as TsMorph from \"ts-morph\";\nimport type { Codemod, CodemodOutput } from \"../types\";\nimport { importedLocalNames, manualAt, replaceNode } from \"./helpers\";\n\n/** Fields of the `RequestLogSnapshot` a log channel now receives. */\nconst SNAPSHOT_FIELDS = new Set([\n \"id\",\n \"method\",\n \"url\",\n \"route\",\n \"name\",\n \"ip\",\n \"userAgent\",\n \"query\",\n \"body\",\n \"statusCode\",\n]);\n\n/** `request.<a>.<b>` reads with a snapshot equivalent. */\nconst REWRITES: Record<string, string> = {\n \"baseRequest.url\": \"url\",\n \"baseRequest.method\": \"method\",\n \"baseRequest.ip\": \"ip\",\n \"route.path\": \"route\",\n \"route.name\": \"name\",\n};\n\n/**\n * 5.30: request log entries carry a plain `RequestLogSnapshot` in\n * `context.request`, not the `Request` instance. Inside custom log channels,\n * rewrites the reads that have a direct snapshot field and lists the rest.\n */\nexport const requestLogSnapshot: Codemod = {\n id: \"request-log-snapshot\",\n version: \"5.30.0\",\n package: \"@warlock.js/core\",\n title: \"Read request log snapshots in custom log channels\",\n skill: \"upgrade-from-5-29\",\n run(context) {\n const { Node, SyntaxKind } = context.tsMorph;\n const output: CodemodOutput = { edits: [], manual: [] };\n\n for (const sourceFile of context.sourceFiles) {\n if (importedLocalNames(sourceFile, \"@warlock.js/logger\", \"LogChannel\").size === 0) continue;\n\n for (const access of sourceFile.getDescendantsOfKind(SyntaxKind.PropertyAccessExpression)) {\n const owner = access.getExpression();\n // `<anything>.context.request` / `.context.response`\n if (!Node.isPropertyAccessExpression(owner) || owner.getName() !== \"context\") continue;\n const target = access.getName();\n if (target !== \"request\" && target !== \"response\") continue;\n\n const chain = memberChain(Node, access);\n if (chain.length === 0) continue;\n\n const first = chain[0] as TsMorph.PropertyAccessExpression;\n const second = chain[1];\n const pair = second ? `${first.getName()}.${second.getName()}` : undefined;\n const replacement = pair ? REWRITES[pair] : undefined;\n\n if (target === \"request\" && replacement && second) {\n output.edits.push(\n replaceNode(\n context,\n second,\n `${access.getText()}.${replacement}`,\n `context.request.${pair} → context.request.${replacement}`,\n ),\n );\n continue;\n }\n\n const field = first.getName();\n const isCall = Node.isCallExpression(first.getParent());\n // `route` is the matched pattern string now, not the route object.\n const readsRouteObject = target === \"request\" && field === \"route\" && second !== undefined;\n if (!SNAPSHOT_FIELDS.has(field) || isCall || readsRouteObject) {\n output.manual.push(\n manualAt(\n context,\n first,\n `\\`context.${target}.${field}\\` is not on the log snapshot ({ id, method, url, route, name, ip, userAgent, query?, body? }). Read a snapshot field, or call \\`request.toLogSnapshot()\\` where the entry is logged.`,\n ),\n );\n }\n }\n }\n\n return output;\n },\n};\n\n/** `x.context.request.a.b` → [`…request.a`, `…request.a.b`]. */\nfunction memberChain(\n Node: typeof TsMorph.Node,\n start: TsMorph.PropertyAccessExpression,\n): TsMorph.PropertyAccessExpression[] {\n const chain: TsMorph.PropertyAccessExpression[] = [];\n let current: TsMorph.Node = start;\n\n for (;;) {\n const parent = current.getParent();\n if (!parent || !Node.isPropertyAccessExpression(parent) || parent.getExpression() !== current) {\n return chain;\n }\n chain.push(parent);\n current = parent;\n }\n}\n"],"mappings":";;;;AAKA,MAAM,
|
|
1
|
+
{"version":3,"file":"request-log-snapshot.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/upgrade/codemods/request-log-snapshot.ts"],"sourcesContent":["import type * as TsMorph from \"ts-morph\";\nimport type { Codemod, CodemodOutput } from \"../types\";\nimport { importedLocalNames, manualAt, replaceNode } from \"./helpers\";\n\n/** Fields of the `RequestLogSnapshot` a log channel now receives. */\nconst SNAPSHOT_FIELDS = new Set([\n \"id\",\n \"method\",\n \"url\",\n \"route\",\n \"name\",\n \"ip\",\n \"userAgent\",\n \"query\",\n \"body\",\n \"statusCode\",\n]);\n\n/** `request.<a>.<b>` reads with a snapshot equivalent. */\nconst REWRITES: Record<string, string> = {\n \"baseRequest.url\": \"url\",\n \"baseRequest.method\": \"method\",\n \"baseRequest.ip\": \"ip\",\n \"route.path\": \"route\",\n \"route.name\": \"name\",\n};\n\n/**\n * 5.30: request log entries carry a plain `RequestLogSnapshot` in\n * `context.request`, not the `Request` instance. Inside custom log channels,\n * rewrites the reads that have a direct snapshot field and lists the rest.\n */\nexport const requestLogSnapshot: Codemod = {\n id: \"request-log-snapshot\",\n version: \"5.30.0\",\n package: \"@warlock.js/core\",\n title: \"Read request log snapshots in custom log channels\",\n skill: \"upgrade-from-5-29\",\n run(context) {\n const { Node, SyntaxKind } = context.tsMorph;\n const output: CodemodOutput = { edits: [], manual: [] };\n\n for (const sourceFile of context.sourceFiles) {\n if (importedLocalNames(sourceFile, \"@warlock.js/logger\", \"LogChannel\").size === 0) continue;\n\n for (const access of sourceFile.getDescendantsOfKind(SyntaxKind.PropertyAccessExpression)) {\n const owner = access.getExpression();\n // `<anything>.context.request` / `.context.response`\n if (!Node.isPropertyAccessExpression(owner) || owner.getName() !== \"context\") continue;\n const target = access.getName();\n if (target !== \"request\" && target !== \"response\") continue;\n\n const chain = memberChain(Node, access);\n if (chain.length === 0) continue;\n\n const first = chain[0] as TsMorph.PropertyAccessExpression;\n const second = chain[1];\n const pair = second ? `${first.getName()}.${second.getName()}` : undefined;\n const replacement = pair ? REWRITES[pair] : undefined;\n\n if (target === \"request\" && replacement && second) {\n output.edits.push(\n replaceNode(\n context,\n second,\n `${access.getText()}.${replacement}`,\n `context.request.${pair} → context.request.${replacement}`,\n ),\n );\n continue;\n }\n\n const field = first.getName();\n const isCall = Node.isCallExpression(first.getParent());\n // `route` is the matched pattern string now, not the route object.\n const readsRouteObject = target === \"request\" && field === \"route\" && second !== undefined;\n if (!SNAPSHOT_FIELDS.has(field) || isCall || readsRouteObject) {\n output.manual.push(\n manualAt(\n context,\n first,\n `\\`context.${target}.${field}\\` is not on the log snapshot ({ id, method, url, route, name, ip, userAgent, query?, body? }). Read a snapshot field, or call \\`request.toLogSnapshot()\\` where the entry is logged.`,\n ),\n );\n }\n }\n }\n\n return output;\n },\n};\n\n/** `x.context.request.a.b` → [`…request.a`, `…request.a.b`]. */\nfunction memberChain(\n Node: typeof TsMorph.Node,\n start: TsMorph.PropertyAccessExpression,\n): TsMorph.PropertyAccessExpression[] {\n const chain: TsMorph.PropertyAccessExpression[] = [];\n let current: TsMorph.Node = start;\n\n for (;;) {\n const parent = current.getParent();\n if (!parent || !Node.isPropertyAccessExpression(parent) || parent.getExpression() !== current) {\n return chain;\n }\n chain.push(parent);\n current = parent;\n }\n}\n"],"mappings":";;;;AAKA,MAAM,kCAAkB,IAAI,IAAI;CAC9B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;AAGD,MAAM,WAAmC;CACvC,mBAAmB;CACnB,sBAAsB;CACtB,kBAAkB;CAClB,cAAc;CACd,cAAc;AAChB;;;;;;AAOA,MAAa,qBAA8B;CACzC,IAAI;CACJ,SAAS;CACT,SAAS;CACT,OAAO;CACP,OAAO;CACP,IAAI,SAAS;EACX,MAAM,EAAE,MAAM,eAAe,QAAQ;EACrC,MAAM,SAAwB;GAAE,OAAO,CAAC;GAAG,QAAQ,CAAC;EAAE;EAEtD,KAAK,MAAM,cAAc,QAAQ,aAAa;GAC5C,IAAI,mBAAmB,YAAY,sBAAsB,YAAY,CAAC,CAAC,SAAS,GAAG;GAEnF,KAAK,MAAM,UAAU,WAAW,qBAAqB,WAAW,wBAAwB,GAAG;IACzF,MAAM,QAAQ,OAAO,cAAc;IAEnC,IAAI,CAAC,KAAK,2BAA2B,KAAK,KAAK,MAAM,QAAQ,MAAM,WAAW;IAC9E,MAAM,SAAS,OAAO,QAAQ;IAC9B,IAAI,WAAW,aAAa,WAAW,YAAY;IAEnD,MAAM,QAAQ,YAAY,MAAM,MAAM;IACtC,IAAI,MAAM,WAAW,GAAG;IAExB,MAAM,QAAQ,MAAM;IACpB,MAAM,SAAS,MAAM;IACrB,MAAM,OAAO,SAAS,GAAG,MAAM,QAAQ,EAAE,GAAG,OAAO,QAAQ,MAAM;IACjE,MAAM,cAAc,OAAO,SAAS,QAAQ;IAE5C,IAAI,WAAW,aAAa,eAAe,QAAQ;KACjD,OAAO,MAAM,KACX,YACE,SACA,QACA,GAAG,OAAO,QAAQ,EAAE,GAAG,eACvB,mBAAmB,KAAK,qBAAqB,aAC/C,CACF;KACA;IACF;IAEA,MAAM,QAAQ,MAAM,QAAQ;IAC5B,MAAM,SAAS,KAAK,iBAAiB,MAAM,UAAU,CAAC;IAEtD,MAAM,mBAAmB,WAAW,aAAa,UAAU,WAAW,WAAW;IACjF,IAAI,CAAC,gBAAgB,IAAI,KAAK,KAAK,UAAU,kBAC3C,OAAO,OAAO,KACZ,SACE,SACA,OACA,aAAa,OAAO,GAAG,MAAM,sLAC/B,CACF;GAEJ;EACF;EAEA,OAAO;CACT;AACF;;AAGA,SAAS,YACP,MACA,OACoC;CACpC,MAAM,QAA4C,CAAC;CACnD,IAAI,UAAwB;CAE5B,SAAS;EACP,MAAM,SAAS,QAAQ,UAAU;EACjC,IAAI,CAAC,UAAU,CAAC,KAAK,2BAA2B,MAAM,KAAK,OAAO,cAAc,MAAM,SACpF,OAAO;EAET,MAAM,KAAK,MAAM;EACjB,UAAU;CACZ;AACF"}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
//#region ../../packages/core/src/upgrade/codemods/toolchain-templates.ts
|
|
2
|
+
/** Bundled create-warlock snapshots. oxc-toolchain.spec.ts checks template parity. */
|
|
3
|
+
const TOOLCHAIN_TEMPLATES = {
|
|
4
|
+
"legacy-eslint.config.js": `import tsPlugin from "@typescript-eslint/eslint-plugin";
|
|
5
|
+
import tsParser from "@typescript-eslint/parser";
|
|
6
|
+
import prettierConfig from "eslint-config-prettier";
|
|
7
|
+
import prettierPlugin from "eslint-plugin-prettier";
|
|
8
|
+
import unusedImports from "eslint-plugin-unused-imports";
|
|
9
|
+
|
|
10
|
+
export default [
|
|
11
|
+
// Global configuration
|
|
12
|
+
{
|
|
13
|
+
languageOptions: {
|
|
14
|
+
ecmaVersion: "latest",
|
|
15
|
+
sourceType: "module",
|
|
16
|
+
globals: {
|
|
17
|
+
// Node.js globals
|
|
18
|
+
console: "readonly",
|
|
19
|
+
process: "readonly",
|
|
20
|
+
Buffer: "readonly",
|
|
21
|
+
__dirname: "readonly",
|
|
22
|
+
__filename: "readonly",
|
|
23
|
+
global: "readonly",
|
|
24
|
+
module: "readonly",
|
|
25
|
+
require: "readonly",
|
|
26
|
+
exports: "readonly",
|
|
27
|
+
// ES2021 globals
|
|
28
|
+
Promise: "readonly",
|
|
29
|
+
// Jest globals
|
|
30
|
+
describe: "readonly",
|
|
31
|
+
it: "readonly",
|
|
32
|
+
test: "readonly",
|
|
33
|
+
expect: "readonly",
|
|
34
|
+
beforeEach: "readonly",
|
|
35
|
+
afterEach: "readonly",
|
|
36
|
+
beforeAll: "readonly",
|
|
37
|
+
afterAll: "readonly",
|
|
38
|
+
jest: "readonly",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
// TypeScript files configuration
|
|
44
|
+
{
|
|
45
|
+
files: ["**/*.ts", "**/*.tsx"],
|
|
46
|
+
languageOptions: {
|
|
47
|
+
parser: tsParser,
|
|
48
|
+
parserOptions: {
|
|
49
|
+
ecmaVersion: "latest",
|
|
50
|
+
sourceType: "module",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
plugins: {
|
|
54
|
+
"@typescript-eslint": tsPlugin,
|
|
55
|
+
prettier: prettierPlugin,
|
|
56
|
+
"unused-imports": unusedImports,
|
|
57
|
+
},
|
|
58
|
+
rules: {
|
|
59
|
+
// Prettier integration
|
|
60
|
+
...prettierConfig.rules,
|
|
61
|
+
"prettier/prettier": "error",
|
|
62
|
+
|
|
63
|
+
// TypeScript rules
|
|
64
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
65
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
66
|
+
"no-unused-vars": "off",
|
|
67
|
+
"unused-imports/no-unused-vars": [
|
|
68
|
+
"warn",
|
|
69
|
+
{
|
|
70
|
+
vars: "all",
|
|
71
|
+
varsIgnorePattern: "^_",
|
|
72
|
+
args: "after-used",
|
|
73
|
+
argsIgnorePattern: "^_",
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
"unused-imports/no-unused-imports": "error",
|
|
77
|
+
"@typescript-eslint/explicit-member-accessibility": [
|
|
78
|
+
"error",
|
|
79
|
+
{ accessibility: "explicit" },
|
|
80
|
+
],
|
|
81
|
+
"@typescript-eslint/consistent-type-imports": [
|
|
82
|
+
"error",
|
|
83
|
+
{
|
|
84
|
+
prefer: "type-imports",
|
|
85
|
+
disallowTypeAnnotations: false,
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
// Ignore patterns
|
|
92
|
+
{
|
|
93
|
+
ignores: [
|
|
94
|
+
"dist/",
|
|
95
|
+
"node_modules/",
|
|
96
|
+
"**/*.js",
|
|
97
|
+
"!**/*.config.js",
|
|
98
|
+
"!eslint.config.js",
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
];
|
|
102
|
+
`,
|
|
103
|
+
"legacy-prettierignore": `node_modules
|
|
104
|
+
dist
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
`,
|
|
108
|
+
"legacy-prettierrc.json": `{
|
|
109
|
+
"semi": true,
|
|
110
|
+
"tabWidth": 2,
|
|
111
|
+
"printWidth": 100,
|
|
112
|
+
"singleQuote": false,
|
|
113
|
+
"arrowParens": "always",
|
|
114
|
+
"trailingComma": "all",
|
|
115
|
+
"endOfLine": "lf",
|
|
116
|
+
"plugins": ["@ianvs/prettier-plugin-sort-imports"],
|
|
117
|
+
"importOrder": ["<BUILTIN_MODULES>", "<THIRD_PARTY_MODULES>", "^(app|web|@shared)/", "^[.]"],
|
|
118
|
+
"importOrderParserPlugins": ["typescript", "jsx", "decorators"]
|
|
119
|
+
}
|
|
120
|
+
`,
|
|
121
|
+
"legacy-vscode-settings.json": `{
|
|
122
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
123
|
+
"editor.formatOnSave": true,
|
|
124
|
+
"editor.codeActionsOnSave": {
|
|
125
|
+
"source.fixAll.eslint": "explicit",
|
|
126
|
+
"source.organizeImports": "never"
|
|
127
|
+
},
|
|
128
|
+
"[typescript]": {
|
|
129
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
130
|
+
"editor.formatOnSave": true
|
|
131
|
+
},
|
|
132
|
+
"[typescriptreact]": {
|
|
133
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
134
|
+
"editor.formatOnSave": true
|
|
135
|
+
},
|
|
136
|
+
"[javascript]": {
|
|
137
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
138
|
+
"editor.formatOnSave": true
|
|
139
|
+
},
|
|
140
|
+
"[javascriptreact]": {
|
|
141
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
142
|
+
"editor.formatOnSave": true
|
|
143
|
+
},
|
|
144
|
+
"[json]": {
|
|
145
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
146
|
+
"editor.formatOnSave": true
|
|
147
|
+
},
|
|
148
|
+
"[css]": {
|
|
149
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
150
|
+
"editor.formatOnSave": true
|
|
151
|
+
},
|
|
152
|
+
"prettier.configPath": ".prettierrc.json",
|
|
153
|
+
"prettier.requireConfig": true,
|
|
154
|
+
"prettier.ignorePath": ".prettierignore",
|
|
155
|
+
"prettier.documentSelectors": ["**/*.{ts,tsx,js,jsx,json,css,md}"],
|
|
156
|
+
"prettier.enable": true,
|
|
157
|
+
"prettier.useEditorConfig": false,
|
|
158
|
+
"prettier.resolveGlobalModules": false,
|
|
159
|
+
"eslint.format.enable": false,
|
|
160
|
+
"eslint.codeActionsOnSave.mode": "all"
|
|
161
|
+
}
|
|
162
|
+
`,
|
|
163
|
+
"oxc-vscode-settings.json": `{
|
|
164
|
+
"editor.defaultFormatter": "oxc.oxc-vscode",
|
|
165
|
+
"editor.formatOnSave": true,
|
|
166
|
+
"editor.codeActionsOnSave": {
|
|
167
|
+
"source.fixAll.oxc": "explicit",
|
|
168
|
+
"source.organizeImports": "never"
|
|
169
|
+
},
|
|
170
|
+
"[typescript]": {
|
|
171
|
+
"editor.defaultFormatter": "oxc.oxc-vscode",
|
|
172
|
+
"editor.formatOnSave": true
|
|
173
|
+
},
|
|
174
|
+
"[typescriptreact]": {
|
|
175
|
+
"editor.defaultFormatter": "oxc.oxc-vscode",
|
|
176
|
+
"editor.formatOnSave": true
|
|
177
|
+
},
|
|
178
|
+
"[javascript]": {
|
|
179
|
+
"editor.defaultFormatter": "oxc.oxc-vscode",
|
|
180
|
+
"editor.formatOnSave": true
|
|
181
|
+
},
|
|
182
|
+
"[javascriptreact]": {
|
|
183
|
+
"editor.defaultFormatter": "oxc.oxc-vscode",
|
|
184
|
+
"editor.formatOnSave": true
|
|
185
|
+
},
|
|
186
|
+
"[json]": {
|
|
187
|
+
"editor.defaultFormatter": "oxc.oxc-vscode",
|
|
188
|
+
"editor.formatOnSave": true
|
|
189
|
+
},
|
|
190
|
+
"[css]": {
|
|
191
|
+
"editor.defaultFormatter": "oxc.oxc-vscode",
|
|
192
|
+
"editor.formatOnSave": true
|
|
193
|
+
},
|
|
194
|
+
"oxc.enable.oxlint": true,
|
|
195
|
+
"oxc.enable.oxfmt": true,
|
|
196
|
+
"oxc.requireConfig": true
|
|
197
|
+
}
|
|
198
|
+
`,
|
|
199
|
+
"oxfmtrc.json": `{
|
|
200
|
+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
|
201
|
+
"semi": true,
|
|
202
|
+
"tabWidth": 2,
|
|
203
|
+
"printWidth": 100,
|
|
204
|
+
"singleQuote": false,
|
|
205
|
+
"arrowParens": "always",
|
|
206
|
+
"trailingComma": "all",
|
|
207
|
+
"endOfLine": "lf",
|
|
208
|
+
"sortImports": {
|
|
209
|
+
"newlinesBetween": false,
|
|
210
|
+
"internalPattern": ["app/", "web/", "@shared/"]
|
|
211
|
+
},
|
|
212
|
+
"ignorePatterns": ["node_modules/", "dist/"]
|
|
213
|
+
}
|
|
214
|
+
`,
|
|
215
|
+
"oxlintrc.json": `{
|
|
216
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
217
|
+
"plugins": ["typescript", "import", "react"],
|
|
218
|
+
"env": { "node": true, "es2021": true },
|
|
219
|
+
"categories": { "correctness": "off" },
|
|
220
|
+
"rules": {
|
|
221
|
+
"typescript/no-explicit-any": "off",
|
|
222
|
+
"no-unused-vars": [
|
|
223
|
+
"warn",
|
|
224
|
+
{
|
|
225
|
+
"vars": "all",
|
|
226
|
+
"varsIgnorePattern": "^_",
|
|
227
|
+
"args": "after-used",
|
|
228
|
+
"argsIgnorePattern": "^_"
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"typescript/explicit-member-accessibility": ["error", { "accessibility": "explicit" }],
|
|
232
|
+
"typescript/consistent-type-imports": [
|
|
233
|
+
"error",
|
|
234
|
+
{ "prefer": "type-imports", "disallowTypeAnnotations": false }
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
"ignorePatterns": ["node_modules/", "dist/"]
|
|
238
|
+
}
|
|
239
|
+
`
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
//#endregion
|
|
243
|
+
export { TOOLCHAIN_TEMPLATES };
|
|
244
|
+
//# sourceMappingURL=toolchain-templates.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolchain-templates.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/upgrade/codemods/toolchain-templates.ts"],"sourcesContent":["/** Bundled create-warlock snapshots. oxc-toolchain.spec.ts checks template parity. */\nexport const TOOLCHAIN_TEMPLATES: Readonly<Record<string, string>> = {\n \"legacy-eslint.config.js\": `import tsPlugin from \"@typescript-eslint/eslint-plugin\";\nimport tsParser from \"@typescript-eslint/parser\";\nimport prettierConfig from \"eslint-config-prettier\";\nimport prettierPlugin from \"eslint-plugin-prettier\";\nimport unusedImports from \"eslint-plugin-unused-imports\";\n\nexport default [\n // Global configuration\n {\n languageOptions: {\n ecmaVersion: \"latest\",\n sourceType: \"module\",\n globals: {\n // Node.js globals\n console: \"readonly\",\n process: \"readonly\",\n Buffer: \"readonly\",\n __dirname: \"readonly\",\n __filename: \"readonly\",\n global: \"readonly\",\n module: \"readonly\",\n require: \"readonly\",\n exports: \"readonly\",\n // ES2021 globals\n Promise: \"readonly\",\n // Jest globals\n describe: \"readonly\",\n it: \"readonly\",\n test: \"readonly\",\n expect: \"readonly\",\n beforeEach: \"readonly\",\n afterEach: \"readonly\",\n beforeAll: \"readonly\",\n afterAll: \"readonly\",\n jest: \"readonly\",\n },\n },\n },\n\n // TypeScript files configuration\n {\n files: [\"**/*.ts\", \"**/*.tsx\"],\n languageOptions: {\n parser: tsParser,\n parserOptions: {\n ecmaVersion: \"latest\",\n sourceType: \"module\",\n },\n },\n plugins: {\n \"@typescript-eslint\": tsPlugin,\n prettier: prettierPlugin,\n \"unused-imports\": unusedImports,\n },\n rules: {\n // Prettier integration\n ...prettierConfig.rules,\n \"prettier/prettier\": \"error\",\n\n // TypeScript rules\n \"@typescript-eslint/no-explicit-any\": \"off\",\n \"@typescript-eslint/no-unused-vars\": \"off\",\n \"no-unused-vars\": \"off\",\n \"unused-imports/no-unused-vars\": [\n \"warn\",\n {\n vars: \"all\",\n varsIgnorePattern: \"^_\",\n args: \"after-used\",\n argsIgnorePattern: \"^_\",\n },\n ],\n \"unused-imports/no-unused-imports\": \"error\",\n \"@typescript-eslint/explicit-member-accessibility\": [\n \"error\",\n { accessibility: \"explicit\" },\n ],\n \"@typescript-eslint/consistent-type-imports\": [\n \"error\",\n {\n prefer: \"type-imports\",\n disallowTypeAnnotations: false,\n },\n ],\n },\n },\n\n // Ignore patterns\n {\n ignores: [\n \"dist/\",\n \"node_modules/\",\n \"**/*.js\",\n \"!**/*.config.js\",\n \"!eslint.config.js\",\n ],\n },\n];\n`,\n \"legacy-prettierignore\": `node_modules\ndist\n\n\n`,\n \"legacy-prettierrc.json\": `{\n \"semi\": true,\n \"tabWidth\": 2,\n \"printWidth\": 100,\n \"singleQuote\": false,\n \"arrowParens\": \"always\",\n \"trailingComma\": \"all\",\n \"endOfLine\": \"lf\",\n \"plugins\": [\"@ianvs/prettier-plugin-sort-imports\"],\n \"importOrder\": [\"<BUILTIN_MODULES>\", \"<THIRD_PARTY_MODULES>\", \"^(app|web|@shared)/\", \"^[.]\"],\n \"importOrderParserPlugins\": [\"typescript\", \"jsx\", \"decorators\"]\n}\n`,\n \"legacy-vscode-settings.json\": `{\n \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n \"editor.formatOnSave\": true,\n \"editor.codeActionsOnSave\": {\n \"source.fixAll.eslint\": \"explicit\",\n \"source.organizeImports\": \"never\"\n },\n \"[typescript]\": {\n \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n \"editor.formatOnSave\": true\n },\n \"[typescriptreact]\": {\n \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n \"editor.formatOnSave\": true\n },\n \"[javascript]\": {\n \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n \"editor.formatOnSave\": true\n },\n \"[javascriptreact]\": {\n \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n \"editor.formatOnSave\": true\n },\n \"[json]\": {\n \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n \"editor.formatOnSave\": true\n },\n \"[css]\": {\n \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n \"editor.formatOnSave\": true\n },\n \"prettier.configPath\": \".prettierrc.json\",\n \"prettier.requireConfig\": true,\n \"prettier.ignorePath\": \".prettierignore\",\n \"prettier.documentSelectors\": [\"**/*.{ts,tsx,js,jsx,json,css,md}\"],\n \"prettier.enable\": true,\n \"prettier.useEditorConfig\": false,\n \"prettier.resolveGlobalModules\": false,\n \"eslint.format.enable\": false,\n \"eslint.codeActionsOnSave.mode\": \"all\"\n}\n`,\n \"oxc-vscode-settings.json\": `{\n \"editor.defaultFormatter\": \"oxc.oxc-vscode\",\n \"editor.formatOnSave\": true,\n \"editor.codeActionsOnSave\": {\n \"source.fixAll.oxc\": \"explicit\",\n \"source.organizeImports\": \"never\"\n },\n \"[typescript]\": {\n \"editor.defaultFormatter\": \"oxc.oxc-vscode\",\n \"editor.formatOnSave\": true\n },\n \"[typescriptreact]\": {\n \"editor.defaultFormatter\": \"oxc.oxc-vscode\",\n \"editor.formatOnSave\": true\n },\n \"[javascript]\": {\n \"editor.defaultFormatter\": \"oxc.oxc-vscode\",\n \"editor.formatOnSave\": true\n },\n \"[javascriptreact]\": {\n \"editor.defaultFormatter\": \"oxc.oxc-vscode\",\n \"editor.formatOnSave\": true\n },\n \"[json]\": {\n \"editor.defaultFormatter\": \"oxc.oxc-vscode\",\n \"editor.formatOnSave\": true\n },\n \"[css]\": {\n \"editor.defaultFormatter\": \"oxc.oxc-vscode\",\n \"editor.formatOnSave\": true\n },\n \"oxc.enable.oxlint\": true,\n \"oxc.enable.oxfmt\": true,\n \"oxc.requireConfig\": true\n}\n`,\n \"oxfmtrc.json\": `{\n \"$schema\": \"./node_modules/oxfmt/configuration_schema.json\",\n \"semi\": true,\n \"tabWidth\": 2,\n \"printWidth\": 100,\n \"singleQuote\": false,\n \"arrowParens\": \"always\",\n \"trailingComma\": \"all\",\n \"endOfLine\": \"lf\",\n \"sortImports\": {\n \"newlinesBetween\": false,\n \"internalPattern\": [\"app/\", \"web/\", \"@shared/\"]\n },\n \"ignorePatterns\": [\"node_modules/\", \"dist/\"]\n}\n`,\n \"oxlintrc.json\": `{\n \"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n \"plugins\": [\"typescript\", \"import\", \"react\"],\n \"env\": { \"node\": true, \"es2021\": true },\n \"categories\": { \"correctness\": \"off\" },\n \"rules\": {\n \"typescript/no-explicit-any\": \"off\",\n \"no-unused-vars\": [\n \"warn\",\n {\n \"vars\": \"all\",\n \"varsIgnorePattern\": \"^_\",\n \"args\": \"after-used\",\n \"argsIgnorePattern\": \"^_\"\n }\n ],\n \"typescript/explicit-member-accessibility\": [\"error\", { \"accessibility\": \"explicit\" }],\n \"typescript/consistent-type-imports\": [\n \"error\",\n { \"prefer\": \"type-imports\", \"disallowTypeAnnotations\": false }\n ]\n },\n \"ignorePatterns\": [\"node_modules/\", \"dist/\"]\n}\n`,\n};\n"],"mappings":";;AACA,MAAa,sBAAwD;CACnE,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmG3B,yBAAyB;;;;;CAKzB,0BAA0B;;;;;;;;;;;;;CAa1B,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0C/B,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoC5B,gBAAgB;;;;;;;;;;;;;;;;CAgBhB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;AAyBnB"}
|
package/esm/upgrade/diff.mjs
CHANGED
|
@@ -75,7 +75,7 @@ function formatHunks(operations) {
|
|
|
75
75
|
while (cursor < changed.length) {
|
|
76
76
|
const firstChange = changed[cursor] ?? 0;
|
|
77
77
|
let lastChange = firstChange;
|
|
78
|
-
while (cursor + 1 < changed.length && (changed[cursor + 1] ?? 0) - lastChange <=
|
|
78
|
+
while (cursor + 1 < changed.length && (changed[cursor + 1] ?? 0) - lastChange <= 6) {
|
|
79
79
|
cursor++;
|
|
80
80
|
lastChange = changed[cursor] ?? lastChange;
|
|
81
81
|
}
|
package/esm/upgrade/diff.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.mjs","names":[],"sources":["../../../../../../../../packages/core/src/upgrade/diff.ts"],"sourcesContent":["/**\n * A minimal unified diff (`diff -u` shape, 3 lines of context) between two\n * versions of one file, enough for `warlock upgrade --dry-run` to show what\n * it would change. Line-based longest common subsequence; files too large for\n * that are shown as one replaced hunk.\n */\nconst CONTEXT = 3;\nconst MAX_CELLS = 16_000_000;\n\ntype Operation = { type: \"same\" | \"removed\" | \"added\"; text: string };\n\nexport function unifiedDiff(file: string, before: string, after: string): string {\n if (before === after) return \"\";\n\n const oldLines = splitLines(before);\n const newLines = splitLines(after);\n const operations = diffLines(oldLines, newLines);\n\n const header = `--- a/${file}\\n+++ b/${file}\\n`;\n return header + formatHunks(operations);\n}\n\nfunction splitLines(text: string): string[] {\n if (text === \"\") return [];\n const lines = text.split(\"\\n\");\n if (lines[lines.length - 1] === \"\") lines.pop();\n return lines;\n}\n\nfunction diffLines(oldLines: string[], newLines: string[]): Operation[] {\n const n = oldLines.length;\n const m = newLines.length;\n\n if (n * m > MAX_CELLS) {\n return [\n ...oldLines.map((text): Operation => ({ type: \"removed\", text })),\n ...newLines.map((text): Operation => ({ type: \"added\", text })),\n ];\n }\n\n // lengths[i][j] = LCS length of oldLines[i..] and newLines[j..]\n const lengths: Uint32Array[] = [];\n for (let i = 0; i <= n; i++) lengths.push(new Uint32Array(m + 1));\n\n for (let i = n - 1; i >= 0; i--) {\n const row = lengths[i] as Uint32Array;\n const below = lengths[i + 1] as Uint32Array;\n for (let j = m - 1; j >= 0; j--) {\n row[j] =\n oldLines[i] === newLines[j]\n ? (below[j + 1] ?? 0) + 1\n : Math.max(below[j] ?? 0, row[j + 1] ?? 0);\n }\n }\n\n const operations: Operation[] = [];\n let i = 0;\n let j = 0;\n while (i < n && j < m) {\n if (oldLines[i] === newLines[j]) {\n operations.push({ type: \"same\", text: oldLines[i] ?? \"\" });\n i++;\n j++;\n } else if ((lengths[i + 1]?.[j] ?? 0) >= (lengths[i]?.[j + 1] ?? 0)) {\n operations.push({ type: \"removed\", text: oldLines[i] ?? \"\" });\n i++;\n } else {\n operations.push({ type: \"added\", text: newLines[j] ?? \"\" });\n j++;\n }\n }\n while (i < n) operations.push({ type: \"removed\", text: oldLines[i++] ?? \"\" });\n while (j < m) operations.push({ type: \"added\", text: newLines[j++] ?? \"\" });\n\n return operations;\n}\n\nfunction formatHunks(operations: Operation[]): string {\n const changed = operations\n .map((operation, index) => (operation.type === \"same\" ? -1 : index))\n .filter((index) => index >= 0);\n\n let output = \"\";\n let cursor = 0;\n\n while (cursor < changed.length) {\n const firstChange = changed[cursor] ?? 0;\n let lastChange = firstChange;\n // Merge changes whose context windows touch.\n while (cursor + 1 < changed.length && (changed[cursor + 1] ?? 0) - lastChange <= CONTEXT * 2) {\n cursor++;\n lastChange = changed[cursor] ?? lastChange;\n }\n cursor++;\n\n const start = Math.max(0, firstChange - CONTEXT);\n const end = Math.min(operations.length, lastChange + CONTEXT + 1);\n\n let oldStart = 1;\n let newStart = 1;\n for (let index = 0; index < start; index++) {\n const type = operations[index]?.type;\n if (type !== \"added\") oldStart++;\n if (type !== \"removed\") newStart++;\n }\n\n let oldCount = 0;\n let newCount = 0;\n let body = \"\";\n for (let index = start; index < end; index++) {\n const operation = operations[index];\n if (!operation) continue;\n if (operation.type === \"same\") {\n oldCount++;\n newCount++;\n body += ` ${operation.text}\\n`;\n } else if (operation.type === \"removed\") {\n oldCount++;\n body += `-${operation.text}\\n`;\n } else {\n newCount++;\n body += `+${operation.text}\\n`;\n }\n }\n\n const oldRange = oldCount === 0 ? `${oldStart - 1},0` : `${oldStart},${oldCount}`;\n const newRange = newCount === 0 ? `${newStart - 1},0` : `${newStart},${newCount}`;\n output += `@@ -${oldRange} +${newRange} @@\\n${body}`;\n }\n\n return output;\n}\n"],"mappings":";;;;;;;AAMA,MAAM,UAAU;AAChB,MAAM,YAAY;AAIlB,SAAgB,YAAY,MAAc,QAAgB,OAAuB;CAC/E,IAAI,WAAW,OAAO,OAAO;CAI7B,MAAM,aAAa,UAFF,WAAW,MAEQ,GADnB,WAAW,KACkB,CAAC;CAG/C,OAAO,SADiB,KAAK,UAAU,KAAK,MAC5B,YAAY,UAAU;AACxC;AAEA,SAAS,WAAW,MAAwB;CAC1C,IAAI,SAAS,IAAI,OAAO,CAAC;CACzB,MAAM,QAAQ,KAAK,MAAM,IAAI;CAC7B,IAAI,MAAM,MAAM,SAAS,OAAO,IAAI,MAAM,IAAI;CAC9C,OAAO;AACT;AAEA,SAAS,UAAU,UAAoB,UAAiC;CACtE,MAAM,IAAI,SAAS;CACnB,MAAM,IAAI,SAAS;CAEnB,IAAI,IAAI,IAAI,WACV,OAAO,CACL,GAAG,SAAS,KAAK,UAAqB;EAAE,MAAM;EAAW;CAAK,EAAE,GAChE,GAAG,SAAS,KAAK,UAAqB;EAAE,MAAM;EAAS;CAAK,EAAE,CAChE;CAIF,MAAM,UAAyB,CAAC;CAChC,KAAK,IAAI,IAAI,GAAG,KAAK,GAAG,KAAK,QAAQ,KAAK,IAAI,YAAY,IAAI,CAAC,CAAC;CAEhE,KAAK,IAAI,IAAI,IAAI,GAAG,KAAK,GAAG,KAAK;EAC/B,MAAM,MAAM,QAAQ;EACpB,MAAM,QAAQ,QAAQ,IAAI;EAC1B,KAAK,IAAI,IAAI,IAAI,GAAG,KAAK,GAAG,KAC1B,IAAI,KACF,SAAS,OAAO,SAAS,MACpB,MAAM,IAAI,MAAM,KAAK,IACtB,KAAK,IAAI,MAAM,MAAM,GAAG,IAAI,IAAI,MAAM,CAAC;CAEjD;CAEA,MAAM,aAA0B,CAAC;CACjC,IAAI,IAAI;CACR,IAAI,IAAI;CACR,OAAO,IAAI,KAAK,IAAI,GAClB,IAAI,SAAS,OAAO,SAAS,IAAI;EAC/B,WAAW,KAAK;GAAE,MAAM;GAAQ,MAAM,SAAS,MAAM;EAAG,CAAC;EACzD;EACA;CACF,OAAO,KAAK,QAAQ,IAAI,EAAE,GAAG,MAAM,OAAO,QAAQ,EAAE,GAAG,IAAI,MAAM,IAAI;EACnE,WAAW,KAAK;GAAE,MAAM;GAAW,MAAM,SAAS,MAAM;EAAG,CAAC;EAC5D;CACF,OAAO;EACL,WAAW,KAAK;GAAE,MAAM;GAAS,MAAM,SAAS,MAAM;EAAG,CAAC;EAC1D;CACF;CAEF,OAAO,IAAI,GAAG,WAAW,KAAK;EAAE,MAAM;EAAW,MAAM,SAAS,QAAQ;CAAG,CAAC;CAC5E,OAAO,IAAI,GAAG,WAAW,KAAK;EAAE,MAAM;EAAS,MAAM,SAAS,QAAQ;CAAG,CAAC;CAE1E,OAAO;AACT;AAEA,SAAS,YAAY,YAAiC;CACpD,MAAM,UAAU,WACb,KAAK,WAAW,UAAW,UAAU,SAAS,SAAS,KAAK,KAAM,CAAC,CACnE,QAAQ,UAAU,SAAS,CAAC;CAE/B,IAAI,SAAS;CACb,IAAI,SAAS;CAEb,OAAO,SAAS,QAAQ,QAAQ;EAC9B,MAAM,cAAc,QAAQ,WAAW;EACvC,IAAI,aAAa;EAEjB,OAAO,SAAS,IAAI,QAAQ,WAAW,QAAQ,SAAS,MAAM,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"diff.mjs","names":[],"sources":["../../../../../../../../packages/core/src/upgrade/diff.ts"],"sourcesContent":["/**\n * A minimal unified diff (`diff -u` shape, 3 lines of context) between two\n * versions of one file, enough for `warlock upgrade --dry-run` to show what\n * it would change. Line-based longest common subsequence; files too large for\n * that are shown as one replaced hunk.\n */\nconst CONTEXT = 3;\nconst MAX_CELLS = 16_000_000;\n\ntype Operation = { type: \"same\" | \"removed\" | \"added\"; text: string };\n\nexport function unifiedDiff(file: string, before: string, after: string): string {\n if (before === after) return \"\";\n\n const oldLines = splitLines(before);\n const newLines = splitLines(after);\n const operations = diffLines(oldLines, newLines);\n\n const header = `--- a/${file}\\n+++ b/${file}\\n`;\n return header + formatHunks(operations);\n}\n\nfunction splitLines(text: string): string[] {\n if (text === \"\") return [];\n const lines = text.split(\"\\n\");\n if (lines[lines.length - 1] === \"\") lines.pop();\n return lines;\n}\n\nfunction diffLines(oldLines: string[], newLines: string[]): Operation[] {\n const n = oldLines.length;\n const m = newLines.length;\n\n if (n * m > MAX_CELLS) {\n return [\n ...oldLines.map((text): Operation => ({ type: \"removed\", text })),\n ...newLines.map((text): Operation => ({ type: \"added\", text })),\n ];\n }\n\n // lengths[i][j] = LCS length of oldLines[i..] and newLines[j..]\n const lengths: Uint32Array[] = [];\n for (let i = 0; i <= n; i++) lengths.push(new Uint32Array(m + 1));\n\n for (let i = n - 1; i >= 0; i--) {\n const row = lengths[i] as Uint32Array;\n const below = lengths[i + 1] as Uint32Array;\n for (let j = m - 1; j >= 0; j--) {\n row[j] =\n oldLines[i] === newLines[j]\n ? (below[j + 1] ?? 0) + 1\n : Math.max(below[j] ?? 0, row[j + 1] ?? 0);\n }\n }\n\n const operations: Operation[] = [];\n let i = 0;\n let j = 0;\n while (i < n && j < m) {\n if (oldLines[i] === newLines[j]) {\n operations.push({ type: \"same\", text: oldLines[i] ?? \"\" });\n i++;\n j++;\n } else if ((lengths[i + 1]?.[j] ?? 0) >= (lengths[i]?.[j + 1] ?? 0)) {\n operations.push({ type: \"removed\", text: oldLines[i] ?? \"\" });\n i++;\n } else {\n operations.push({ type: \"added\", text: newLines[j] ?? \"\" });\n j++;\n }\n }\n while (i < n) operations.push({ type: \"removed\", text: oldLines[i++] ?? \"\" });\n while (j < m) operations.push({ type: \"added\", text: newLines[j++] ?? \"\" });\n\n return operations;\n}\n\nfunction formatHunks(operations: Operation[]): string {\n const changed = operations\n .map((operation, index) => (operation.type === \"same\" ? -1 : index))\n .filter((index) => index >= 0);\n\n let output = \"\";\n let cursor = 0;\n\n while (cursor < changed.length) {\n const firstChange = changed[cursor] ?? 0;\n let lastChange = firstChange;\n // Merge changes whose context windows touch.\n while (cursor + 1 < changed.length && (changed[cursor + 1] ?? 0) - lastChange <= CONTEXT * 2) {\n cursor++;\n lastChange = changed[cursor] ?? lastChange;\n }\n cursor++;\n\n const start = Math.max(0, firstChange - CONTEXT);\n const end = Math.min(operations.length, lastChange + CONTEXT + 1);\n\n let oldStart = 1;\n let newStart = 1;\n for (let index = 0; index < start; index++) {\n const type = operations[index]?.type;\n if (type !== \"added\") oldStart++;\n if (type !== \"removed\") newStart++;\n }\n\n let oldCount = 0;\n let newCount = 0;\n let body = \"\";\n for (let index = start; index < end; index++) {\n const operation = operations[index];\n if (!operation) continue;\n if (operation.type === \"same\") {\n oldCount++;\n newCount++;\n body += ` ${operation.text}\\n`;\n } else if (operation.type === \"removed\") {\n oldCount++;\n body += `-${operation.text}\\n`;\n } else {\n newCount++;\n body += `+${operation.text}\\n`;\n }\n }\n\n const oldRange = oldCount === 0 ? `${oldStart - 1},0` : `${oldStart},${oldCount}`;\n const newRange = newCount === 0 ? `${newStart - 1},0` : `${newStart},${newCount}`;\n output += `@@ -${oldRange} +${newRange} @@\\n${body}`;\n }\n\n return output;\n}\n"],"mappings":"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"}
|
|
@@ -28,7 +28,8 @@ function tsMorphInstallCommand(packageManager) {
|
|
|
28
28
|
*/
|
|
29
29
|
async function loadTsMorph(root) {
|
|
30
30
|
try {
|
|
31
|
-
|
|
31
|
+
const resolved = createRequire(path.join(root, "package.json")).resolve("ts-morph");
|
|
32
|
+
return fromNamespace(await import(pathToFileURL(resolved).href));
|
|
32
33
|
} catch {}
|
|
33
34
|
try {
|
|
34
35
|
return fromNamespace(await import("ts-morph"));
|
|
@@ -44,5 +45,5 @@ function fromNamespace(namespace) {
|
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
//#endregion
|
|
47
|
-
export { TsMorphMissingError, loadTsMorph };
|
|
48
|
+
export { TsMorphMissingError, loadTsMorph, tsMorphInstallCommand };
|
|
48
49
|
//# sourceMappingURL=load-ts-morph.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-ts-morph.mjs","names":[],"sources":["../../../../../../../../packages/core/src/upgrade/load-ts-morph.ts"],"sourcesContent":["import { createRequire } from \"node:module\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { detectPackageManager, type PackageManager } from \"../updater/package-manager\";\nimport type { TsMorphModule } from \"./types\";\n\n/** Thrown when `ts-morph` is not installed; the message says how to add it. */\nexport class TsMorphMissingError extends Error {\n public override readonly name = \"TsMorphMissingError\";\n\n public constructor(public readonly installCommand: string) {\n super(\n `warlock upgrade edits source files with ts-morph, which is not installed. ` +\n `Add it as a development dependency, then run the command again:\\n\\n ${installCommand}\\n`,\n );\n }\n}\n\n/** The dev-dependency install command for `ts-morph` with this package manager. */\nexport function tsMorphInstallCommand(packageManager: PackageManager): string {\n switch (packageManager) {\n case \"pnpm\":\n return \"pnpm add --save-dev ts-morph\";\n case \"yarn\":\n return \"yarn add --dev ts-morph\";\n case \"bun\":\n return \"bun add --dev ts-morph\";\n default:\n return \"npm install --save-dev ts-morph\";\n }\n}\n\n/**\n * Load `ts-morph` lazily: it is an optional peer of `@warlock.js/core`, needed\n * only by `warlock upgrade`. Resolved from the app first (where the user\n * installs it), then from core's own location.\n */\nexport async function loadTsMorph(root: string): Promise<TsMorphModule> {\n try {\n const resolved = createRequire(path.join(root, \"package.json\")).resolve(\"ts-morph\");\n return fromNamespace(await import(pathToFileURL(resolved).href));\n } catch {\n // Not in the app; try core's own resolution below.\n }\n\n try {\n return fromNamespace(await import(\"ts-morph\"));\n } catch {\n throw new TsMorphMissingError(tsMorphInstallCommand(await detectPackageManager(root)));\n }\n}\n\n/** A CommonJS package imported from ESM may expose its API on `default` only. */\nfunction fromNamespace(namespace: unknown): TsMorphModule {\n const candidate = namespace as { Project?: unknown; default?: unknown };\n if (typeof candidate.Project === \"function\") return namespace as TsMorphModule;\n return candidate.default as TsMorphModule;\n}\n"],"mappings":";;;;;;;AAOA,IAAa,sBAAb,cAAyC,MAAM;CAG7C,AAAO,YAAY,AAAgB,gBAAwB;EACzD,MACE,kJAC0E,eAAe,GAC3F;EAJiC;cAFH;CAOhC;AACF;;AAGA,SAAgB,sBAAsB,gBAAwC;CAC5E,QAAQ,gBAAR;EACE,KAAK,QACH,OAAO;EACT,KAAK,QACH,OAAO;EACT,KAAK,OACH,OAAO;EACT,SACE,OAAO;CACX;AACF;;;;;;AAOA,eAAsB,YAAY,MAAsC;CACtE,IAAI;
|
|
1
|
+
{"version":3,"file":"load-ts-morph.mjs","names":[],"sources":["../../../../../../../../packages/core/src/upgrade/load-ts-morph.ts"],"sourcesContent":["import { createRequire } from \"node:module\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { detectPackageManager, type PackageManager } from \"../updater/package-manager\";\nimport type { TsMorphModule } from \"./types\";\n\n/** Thrown when `ts-morph` is not installed; the message says how to add it. */\nexport class TsMorphMissingError extends Error {\n public override readonly name = \"TsMorphMissingError\";\n\n public constructor(public readonly installCommand: string) {\n super(\n `warlock upgrade edits source files with ts-morph, which is not installed. ` +\n `Add it as a development dependency, then run the command again:\\n\\n ${installCommand}\\n`,\n );\n }\n}\n\n/** The dev-dependency install command for `ts-morph` with this package manager. */\nexport function tsMorphInstallCommand(packageManager: PackageManager): string {\n switch (packageManager) {\n case \"pnpm\":\n return \"pnpm add --save-dev ts-morph\";\n case \"yarn\":\n return \"yarn add --dev ts-morph\";\n case \"bun\":\n return \"bun add --dev ts-morph\";\n default:\n return \"npm install --save-dev ts-morph\";\n }\n}\n\n/**\n * Load `ts-morph` lazily: it is an optional peer of `@warlock.js/core`, needed\n * only by `warlock upgrade`. Resolved from the app first (where the user\n * installs it), then from core's own location.\n */\nexport async function loadTsMorph(root: string): Promise<TsMorphModule> {\n try {\n const resolved = createRequire(path.join(root, \"package.json\")).resolve(\"ts-morph\");\n return fromNamespace(await import(pathToFileURL(resolved).href));\n } catch {\n // Not in the app; try core's own resolution below.\n }\n\n try {\n return fromNamespace(await import(\"ts-morph\"));\n } catch {\n throw new TsMorphMissingError(tsMorphInstallCommand(await detectPackageManager(root)));\n }\n}\n\n/** A CommonJS package imported from ESM may expose its API on `default` only. */\nfunction fromNamespace(namespace: unknown): TsMorphModule {\n const candidate = namespace as { Project?: unknown; default?: unknown };\n if (typeof candidate.Project === \"function\") return namespace as TsMorphModule;\n return candidate.default as TsMorphModule;\n}\n"],"mappings":";;;;;;;AAOA,IAAa,sBAAb,cAAyC,MAAM;CAG7C,AAAO,YAAY,AAAgB,gBAAwB;EACzD,MACE,kJAC0E,eAAe,GAC3F;EAJiC;cAFH;CAOhC;AACF;;AAGA,SAAgB,sBAAsB,gBAAwC;CAC5E,QAAQ,gBAAR;EACE,KAAK,QACH,OAAO;EACT,KAAK,QACH,OAAO;EACT,KAAK,OACH,OAAO;EACT,SACE,OAAO;CACX;AACF;;;;;;AAOA,eAAsB,YAAY,MAAsC;CACtE,IAAI;EACF,MAAM,WAAW,cAAc,KAAK,KAAK,MAAM,cAAc,CAAC,CAAC,CAAC,QAAQ,UAAU;EAClF,OAAO,cAAc,MAAM,OAAO,cAAc,QAAQ,CAAC,CAAC,KAAK;CACjE,QAAQ,CAER;CAEA,IAAI;EACF,OAAO,cAAc,MAAM,OAAO,WAAW;CAC/C,QAAQ;EACN,MAAM,IAAI,oBAAoB,sBAAsB,MAAM,qBAAqB,IAAI,CAAC,CAAC;CACvF;AACF;;AAGA,SAAS,cAAc,WAAmC;CACxD,MAAM,YAAY;CAClB,IAAI,OAAO,UAAU,YAAY,YAAY,OAAO;CACpD,OAAO,UAAU;AACnB"}
|