@warlock.js/core 5.31.0 → 5.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/esm/application/app.d.mts +3 -3
- package/esm/application/app.d.mts.map +1 -1
- package/esm/application/application-config-types.d.mts +1 -2
- package/esm/application/application-config-types.d.mts.map +1 -1
- package/esm/application/application.d.mts +5 -7
- package/esm/application/application.d.mts.map +1 -1
- package/esm/application/application.mjs +3 -1
- package/esm/application/application.mjs.map +1 -1
- package/esm/application/boot-signal.d.mts +14 -12
- package/esm/application/boot-signal.d.mts.map +1 -1
- package/esm/application/index.d.mts +2 -1
- package/esm/application/index.mjs +1 -1
- package/esm/application/public-url.d.mts +1 -2
- package/esm/application/public-url.d.mts.map +1 -1
- package/esm/application/roles.d.mts +10 -11
- package/esm/application/roles.d.mts.map +1 -1
- package/esm/benchmark/benchmark-snapshots.d.mts +1 -3
- package/esm/benchmark/benchmark-snapshots.d.mts.map +1 -1
- package/esm/benchmark/benchmark.d.mts +1 -3
- package/esm/benchmark/benchmark.d.mts.map +1 -1
- package/esm/benchmark/channels/console.channel.d.mts +1 -3
- package/esm/benchmark/channels/console.channel.d.mts.map +1 -1
- package/esm/benchmark/channels/noop.channel.d.mts +1 -3
- package/esm/benchmark/channels/noop.channel.d.mts.map +1 -1
- package/esm/benchmark/index.mjs +1 -1
- package/esm/benchmark/profiler.d.mts +1 -3
- package/esm/benchmark/profiler.d.mts.map +1 -1
- package/esm/benchmark/profiler.mjs +2 -1
- package/esm/benchmark/profiler.mjs.map +1 -1
- package/esm/benchmark/types.d.mts +22 -17
- package/esm/benchmark/types.d.mts.map +1 -1
- package/esm/bootstrap/setup.d.mts +1 -2
- package/esm/bootstrap/setup.d.mts.map +1 -1
- package/esm/bootstrap.d.mts +1 -2
- package/esm/bootstrap.d.mts.map +1 -1
- package/esm/cache/database-cache-driver.d.mts +3 -5
- package/esm/cache/database-cache-driver.d.mts.map +1 -1
- package/esm/cache/database-cache-driver.mjs +1 -1
- package/esm/cache/index.d.mts +2 -1
- package/esm/cache/index.mjs +1 -1
- package/esm/cli/cli-commands.manager.mjs +6 -3
- package/esm/cli/cli-commands.manager.mjs.map +1 -1
- package/esm/cli/commands/agents-md/agents-md-command.action.mjs +3 -2
- package/esm/cli/commands/agents-md/agents-md-command.action.mjs.map +1 -1
- package/esm/cli/commands/board/board-command.action.mjs +1 -1
- package/esm/cli/commands/check/check-command.action.mjs +1 -1
- package/esm/cli/commands/check/child-typecheck.mjs +1 -1
- package/esm/cli/commands/check/child-typecheck.mjs.map +1 -1
- package/esm/cli/commands/check/format-problems.mjs +1 -1
- package/esm/cli/commands/dev-server.command.mjs +3 -2
- package/esm/cli/commands/dev-server.command.mjs.map +1 -1
- package/esm/cli/commands/doctor/check.types.d.mts +29 -16
- package/esm/cli/commands/doctor/check.types.d.mts.map +1 -1
- package/esm/cli/commands/doctor/checks/locales-ts-deprecated.check.mjs +22 -27
- package/esm/cli/commands/doctor/checks/locales-ts-deprecated.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/doctor-command.action.mjs +2 -1
- package/esm/cli/commands/doctor/doctor-command.action.mjs.map +1 -1
- package/esm/cli/commands/explain/explain-command.action.mjs +1 -1
- package/esm/cli/commands/generate/generators/controller.generator.mjs +5 -2
- package/esm/cli/commands/generate/generators/controller.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/endpoint.generator.mjs +5 -3
- package/esm/cli/commands/generate/generators/endpoint.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/model.generator.mjs +3 -2
- package/esm/cli/commands/generate/generators/model.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/repository.generator.mjs +3 -1
- package/esm/cli/commands/generate/generators/repository.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/resource.generator.mjs +3 -1
- package/esm/cli/commands/generate/generators/resource.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/service.generator.mjs +3 -1
- package/esm/cli/commands/generate/generators/service.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/templates/endpoint-stubs.mjs +2 -2
- package/esm/cli/commands/generate/templates/endpoint-stubs.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/endpoint-schema.mjs +1 -2
- package/esm/cli/commands/generate/utils/endpoint-schema.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/name-parser.mjs +1 -1
- package/esm/cli/commands/generate/utils/path-resolver.mjs +1 -1
- package/esm/cli/commands/inspect/inspect-command.action.mjs +3 -2
- package/esm/cli/commands/inspect/inspect-command.action.mjs.map +1 -1
- package/esm/cli/commands/issue/collect-environment.mjs +187 -0
- package/esm/cli/commands/issue/collect-environment.mjs.map +1 -0
- package/esm/cli/commands/issue/issue-command.action.mjs +70 -0
- package/esm/cli/commands/issue/issue-command.action.mjs.map +1 -0
- package/esm/cli/commands/issue.command.mjs +31 -0
- package/esm/cli/commands/issue.command.mjs.map +1 -0
- package/esm/cli/commands/mcp/mcp-command.action.mjs +15 -14
- package/esm/cli/commands/mcp/mcp-command.action.mjs.map +1 -1
- package/esm/cli/commands/openapi-generator.action.mjs +1 -1
- package/esm/cli/commands/postman-generator.action.mjs +1 -1
- package/esm/cli/commands/routes/format-routes-table.mjs +1 -1
- package/esm/cli/commands/routes/route-row.mjs +1 -1
- package/esm/cli/commands/routes/routes-diff.action.mjs +2 -2
- package/esm/cli/commands/routes/routes-diff.action.mjs.map +1 -1
- package/esm/cli/commands/test.command.mjs +1 -1
- package/esm/cli/commands/trace/trace-command.action.mjs +1 -1
- package/esm/cli/commands-loader.mjs +1 -1
- package/esm/cli/framework-cli-commands.mjs +2 -0
- package/esm/cli/framework-cli-commands.mjs.map +1 -1
- package/esm/cli/parse-cli-args.mjs +2 -2
- package/esm/cli/parse-cli-args.mjs.map +1 -1
- package/esm/cli/start.d.mts +1 -1
- package/esm/cli/string-similarity.mjs +1 -1
- package/esm/commands/cli-command.d.mts +2 -4
- package/esm/commands/cli-command.d.mts.map +1 -1
- package/esm/commands/index.d.mts +2 -1
- package/esm/commands/index.mjs +1 -1
- package/esm/commands/types.d.mts +8 -8
- package/esm/commands/types.d.mts.map +1 -1
- package/esm/config/config-getter.d.mts +2 -3
- package/esm/config/config-getter.d.mts.map +1 -1
- package/esm/config/config-getter.mjs +5 -5
- package/esm/config/config-getter.mjs.map +1 -1
- package/esm/config/config-handlers.d.mts +1 -3
- package/esm/config/config-handlers.d.mts.map +1 -1
- package/esm/config/config-loader.d.mts +1 -2
- package/esm/config/config-loader.d.mts.map +1 -1
- package/esm/config/config-loader.mjs +3 -3
- package/esm/config/config-loader.mjs.map +1 -1
- package/esm/config/config-manager.mjs +1 -1
- package/esm/config/config-schema.d.mts +19 -16
- package/esm/config/config-schema.d.mts.map +1 -1
- package/esm/config/config-setter.d.mts +2 -4
- package/esm/config/config-setter.d.mts.map +1 -1
- package/esm/config/config-setter.mjs +2 -2
- package/esm/config/config-setter.mjs.map +1 -1
- package/esm/config/config-special-handlers.d.mts +2 -4
- package/esm/config/config-special-handlers.d.mts.map +1 -1
- package/esm/config/index.d.mts +2 -1
- package/esm/config/index.mjs +1 -1
- package/esm/config/types.d.mts +4 -5
- package/esm/config/types.d.mts.map +1 -1
- package/esm/connectors/access-connector.d.mts +1 -3
- package/esm/connectors/access-connector.d.mts.map +1 -1
- package/esm/connectors/access-connector.mjs +2 -2
- package/esm/connectors/access-connector.mjs.map +1 -1
- package/esm/connectors/ai-connector.d.mts +1 -3
- package/esm/connectors/ai-connector.d.mts.map +1 -1
- package/esm/connectors/ai-connector.mjs +2 -2
- package/esm/connectors/ai-connector.mjs.map +1 -1
- package/esm/connectors/assert-no-reserved-connector-names.d.mts +1 -3
- package/esm/connectors/assert-no-reserved-connector-names.d.mts.map +1 -1
- package/esm/connectors/assert-unique-connector-names.d.mts +1 -3
- package/esm/connectors/assert-unique-connector-names.d.mts.map +1 -1
- package/esm/connectors/assert-unique-connector-names.mjs +2 -1
- package/esm/connectors/assert-unique-connector-names.mjs.map +1 -1
- package/esm/connectors/base-connector.d.mts +1 -3
- package/esm/connectors/base-connector.d.mts.map +1 -1
- package/esm/connectors/cache-connector.d.mts +1 -3
- package/esm/connectors/cache-connector.d.mts.map +1 -1
- package/esm/connectors/cache-connector.mjs +3 -3
- package/esm/connectors/cache-connector.mjs.map +1 -1
- package/esm/connectors/connectors-manager.d.mts +2 -4
- package/esm/connectors/connectors-manager.d.mts.map +1 -1
- package/esm/connectors/connectors-manager.mjs +2 -2
- package/esm/connectors/connectors-manager.mjs.map +1 -1
- package/esm/connectors/database-connector.d.mts +1 -3
- package/esm/connectors/database-connector.d.mts.map +1 -1
- package/esm/connectors/database-connector.mjs +2 -2
- package/esm/connectors/database-connector.mjs.map +1 -1
- package/esm/connectors/describe-server-address.mjs +4 -4
- package/esm/connectors/describe-server-address.mjs.map +1 -1
- package/esm/connectors/herald-connector.d.mts +1 -3
- package/esm/connectors/herald-connector.d.mts.map +1 -1
- package/esm/connectors/herald-connector.mjs +2 -2
- package/esm/connectors/herald-connector.mjs.map +1 -1
- package/esm/connectors/http-connector.d.mts +1 -3
- package/esm/connectors/http-connector.d.mts.map +1 -1
- package/esm/connectors/http-connector.mjs +8 -7
- package/esm/connectors/http-connector.mjs.map +1 -1
- package/esm/connectors/index.d.mts +2 -1
- package/esm/connectors/index.mjs +1 -1
- package/esm/connectors/logger-connector.d.mts +1 -3
- package/esm/connectors/logger-connector.d.mts.map +1 -1
- package/esm/connectors/logger-connector.mjs +2 -2
- package/esm/connectors/logger-connector.mjs.map +1 -1
- package/esm/connectors/mail-connector.d.mts +1 -3
- package/esm/connectors/mail-connector.d.mts.map +1 -1
- package/esm/connectors/mail-connector.mjs +2 -2
- package/esm/connectors/mail-connector.mjs.map +1 -1
- package/esm/connectors/notifications-connector.d.mts +1 -3
- package/esm/connectors/notifications-connector.d.mts.map +1 -1
- package/esm/connectors/notifications-connector.mjs +2 -2
- package/esm/connectors/notifications-connector.mjs.map +1 -1
- package/esm/connectors/register-configured-connectors.d.mts +2 -4
- package/esm/connectors/register-configured-connectors.d.mts.map +1 -1
- package/esm/connectors/socket-connector.d.mts +1 -3
- package/esm/connectors/socket-connector.d.mts.map +1 -1
- package/esm/connectors/socket-connector.mjs +12 -10
- package/esm/connectors/socket-connector.mjs.map +1 -1
- package/esm/connectors/storage.connector.d.mts +1 -3
- package/esm/connectors/storage.connector.d.mts.map +1 -1
- package/esm/connectors/storage.connector.mjs +2 -2
- package/esm/connectors/storage.connector.mjs.map +1 -1
- package/esm/connectors/types.d.mts +17 -14
- package/esm/connectors/types.d.mts.map +1 -1
- package/esm/container/container-instance-registry.mjs.map +1 -1
- package/esm/container/development-app-modules.d.mts +7 -5
- package/esm/container/development-app-modules.d.mts.map +1 -1
- package/esm/container/development-model-modules.d.mts +6 -5
- package/esm/container/development-model-modules.d.mts.map +1 -1
- package/esm/container/index.d.mts +4 -4
- package/esm/container/index.d.mts.map +1 -1
- package/esm/database/index.d.mts +3 -1
- package/esm/database/index.mjs +1 -1
- package/esm/database/migrate-action.mjs +1 -1
- package/esm/database/models/database-log/database-log.d.mts +2 -3
- package/esm/database/models/database-log/database-log.d.mts.map +1 -1
- package/esm/database/models/database-log/index.d.mts +2 -1
- package/esm/database/models/database-log/index.mjs +1 -1
- package/esm/database/seed-command-action.mjs +1 -1
- package/esm/database/seeds/seeder.d.mts +2 -4
- package/esm/database/seeds/seeder.d.mts.map +1 -1
- package/esm/database/seeds/seeder.errors.d.mts +2 -3
- package/esm/database/seeds/seeder.errors.d.mts.map +1 -1
- package/esm/database/seeds/seeders.manager.mjs +2 -1
- package/esm/database/seeds/seeders.manager.mjs.map +1 -1
- package/esm/database/seeds/types.d.mts +7 -8
- package/esm/database/seeds/types.d.mts.map +1 -1
- package/esm/database/utils.d.mts +4 -5
- package/esm/database/utils.d.mts.map +1 -1
- package/esm/dev-server/app-module-registry.mjs +1 -1
- package/esm/dev-server/create-worker.mjs +5 -3
- package/esm/dev-server/create-worker.mjs.map +1 -1
- package/esm/dev-server/dependency-graph.d.mts +1 -3
- package/esm/dev-server/dependency-graph.d.mts.map +1 -1
- package/esm/dev-server/dependency-graph.mjs +1 -1
- package/esm/dev-server/dependency-graph.mjs.map +1 -1
- package/esm/dev-server/extract-translation-keys.mjs +16 -17
- package/esm/dev-server/extract-translation-keys.mjs.map +1 -1
- package/esm/dev-server/file-manager.d.mts +3 -7
- package/esm/dev-server/file-manager.d.mts.map +1 -1
- package/esm/dev-server/file-operations.d.mts +1 -3
- package/esm/dev-server/file-operations.d.mts.map +1 -1
- package/esm/dev-server/files-watcher.mjs +12 -11
- package/esm/dev-server/files-watcher.mjs.map +1 -1
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.mjs +36 -115
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.mjs.map +1 -1
- package/esm/dev-server/health-checker/file-health-checker.contract.d.mts +5 -5
- package/esm/dev-server/health-checker/file-health-checker.contract.d.mts.map +1 -1
- package/esm/dev-server/health-checker/file-health-result.d.mts +2 -2
- package/esm/dev-server/health-checker/file-health-result.d.mts.map +1 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs +1 -0
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs.map +1 -1
- package/esm/dev-server/health-checker/oxlint-runner.mjs +6 -5
- package/esm/dev-server/health-checker/oxlint-runner.mjs.map +1 -1
- package/esm/dev-server/health-checker/workers/eslint-health.worker.d.mts +1 -1
- package/esm/dev-server/health-checker/workers/oxlint-health.worker.d.mts +1 -1
- package/esm/dev-server/health-checker/workers/ts-health.worker.d.mts +1 -1
- package/esm/dev-server/health-checker/workers/ts-health.worker.mjs +40 -174
- package/esm/dev-server/health-checker/workers/ts-health.worker.mjs.map +1 -1
- package/esm/dev-server/loader/hook-thread.d.mts +4 -8
- package/esm/dev-server/loader/hook-thread.d.mts.map +1 -1
- package/esm/dev-server/loader/load-hook.d.mts +10 -6
- package/esm/dev-server/loader/load-hook.d.mts.map +1 -1
- package/esm/dev-server/loader/load-hook.mjs +4 -3
- package/esm/dev-server/loader/load-hook.mjs.map +1 -1
- package/esm/dev-server/loader/own-resolver.mjs +1 -1
- package/esm/dev-server/loader/register-loader.mjs +3 -2
- package/esm/dev-server/loader/register-loader.mjs.map +1 -1
- package/esm/dev-server/loader/resolve-hook.d.mts +2 -2
- package/esm/dev-server/loader/resolve-hook.d.mts.map +1 -1
- package/esm/dev-server/loader/resolve-hook.mjs +2 -1
- package/esm/dev-server/loader/resolve-hook.mjs.map +1 -1
- package/esm/dev-server/loader/transpile-cache.mjs +2 -1
- package/esm/dev-server/loader/transpile-cache.mjs.map +1 -1
- package/esm/dev-server/manifest-manager.d.mts +1 -3
- package/esm/dev-server/manifest-manager.d.mts.map +1 -1
- package/esm/dev-server/model-module-registry.mjs +3 -3
- package/esm/dev-server/model-module-registry.mjs.map +1 -1
- package/esm/dev-server/model-resource-typings.mjs +40 -47
- package/esm/dev-server/model-resource-typings.mjs.map +1 -1
- package/esm/dev-server/module-loader.mjs +2 -2
- package/esm/dev-server/module-loader.mjs.map +1 -1
- package/esm/dev-server/package-json-manager.mjs +1 -1
- package/esm/dev-server/parse-imports.mjs +6 -38
- package/esm/dev-server/parse-imports.mjs.map +1 -1
- package/esm/dev-server/read-config-ast.mjs +3 -33
- package/esm/dev-server/read-config-ast.mjs.map +1 -1
- package/esm/dev-server/ready-block.mjs +1 -1
- package/esm/dev-server/shortcuts.mjs +1 -1
- package/esm/dev-server/special-files-collector.d.mts +2 -4
- package/esm/dev-server/special-files-collector.d.mts.map +1 -1
- package/esm/dev-server/supervisor.mjs +1 -1
- package/esm/dev-server/tsconfig-manager.mjs +3 -3
- package/esm/dev-server/tsconfig-manager.mjs.map +1 -1
- package/esm/dev-server/type-generator.mjs +28 -35
- package/esm/dev-server/type-generator.mjs.map +1 -1
- package/esm/dev-server/types.d.mts +3 -4
- package/esm/dev-server/types.d.mts.map +1 -1
- package/esm/dev-server/update-check-cache.mjs +2 -2
- package/esm/dev-server/update-check-cache.mjs.map +1 -1
- package/esm/encryption/encrypt.d.mts +2 -3
- package/esm/encryption/encrypt.d.mts.map +1 -1
- package/esm/encryption/hash.d.mts +1 -2
- package/esm/encryption/hash.d.mts.map +1 -1
- package/esm/encryption/index.mjs +1 -1
- package/esm/encryption/password.d.mts +2 -3
- package/esm/encryption/password.d.mts.map +1 -1
- package/esm/encryption/types.d.mts +2 -3
- package/esm/encryption/types.d.mts.map +1 -1
- package/esm/errors/error-codes.d.mts +29 -22
- package/esm/errors/error-codes.d.mts.map +1 -1
- package/esm/errors/warlock-error.d.mts +1 -3
- package/esm/errors/warlock-error.d.mts.map +1 -1
- package/esm/generations/add-command.action.mjs +3 -2
- package/esm/generations/add-command.action.mjs.map +1 -1
- package/esm/generations/features/bull-board.feature.mjs +2 -1
- package/esm/generations/features/bull-board.feature.mjs.map +1 -1
- package/esm/generations/features/notifications.feature.mjs +2 -1
- package/esm/generations/features/notifications.feature.mjs.map +1 -1
- package/esm/generations/features/shared/merge-web-sitemap-config.mjs +16 -23
- package/esm/generations/features/shared/merge-web-sitemap-config.mjs.map +1 -1
- package/esm/generations/features/shared/patch-tsconfig-include.mjs +1 -1
- package/esm/generations/features/shared/relocate-conflicting-home-route.mjs +1 -1
- package/esm/generations/features/sitemap.feature.mjs +2 -1
- package/esm/generations/features/sitemap.feature.mjs.map +1 -1
- package/esm/generations/generation-fs.mjs +1 -1
- package/esm/generations/generation-run.mjs +1 -1
- package/esm/generations/stubs.mjs +1 -1
- package/esm/generations/stubs.mjs.map +1 -1
- package/esm/http/boot-port-preflight.d.mts +4 -5
- package/esm/http/boot-port-preflight.d.mts.map +1 -1
- package/esm/http/boot-port-preflight.mjs +2 -2
- package/esm/http/boot-port-preflight.mjs.map +1 -1
- package/esm/http/bounded-stream-queue.d.mts +4 -4
- package/esm/http/bounded-stream-queue.d.mts.map +1 -1
- package/esm/http/bounded-stream-queue.mjs +1 -1
- package/esm/http/bounded-stream-queue.mjs.map +1 -1
- package/esm/http/build-cors-options.mjs +2 -2
- package/esm/http/build-cors-options.mjs.map +1 -1
- package/esm/http/build-rate-limit-options.d.mts +2 -3
- package/esm/http/build-rate-limit-options.d.mts.map +1 -1
- package/esm/http/build-rate-limit-options.mjs +1 -1
- package/esm/http/build-rate-limit-options.mjs.map +1 -1
- package/esm/http/conditional-request.d.mts +14 -13
- package/esm/http/conditional-request.d.mts.map +1 -1
- package/esm/http/config.d.mts +2 -4
- package/esm/http/config.d.mts.map +1 -1
- package/esm/http/config.mjs +2 -2
- package/esm/http/config.mjs.map +1 -1
- package/esm/http/context/request-context.d.mts +6 -7
- package/esm/http/context/request-context.d.mts.map +1 -1
- package/esm/http/context/request-memo.d.mts +1 -2
- package/esm/http/context/request-memo.d.mts.map +1 -1
- package/esm/http/createHttpApplication.d.mts +2 -3
- package/esm/http/createHttpApplication.d.mts.map +1 -1
- package/esm/http/createHttpApplication.mjs +2 -2
- package/esm/http/createHttpApplication.mjs.map +1 -1
- package/esm/http/csp.d.mts +10 -12
- package/esm/http/csp.d.mts.map +1 -1
- package/esm/http/csp.mjs +2 -2
- package/esm/http/csp.mjs.map +1 -1
- package/esm/http/csrf-default-guard.d.mts +2 -4
- package/esm/http/csrf-default-guard.d.mts.map +1 -1
- package/esm/http/csrf-default-guard.mjs +1 -1
- package/esm/http/csrf-default-guard.mjs.map +1 -1
- package/esm/http/csrf-origin-policy.d.mts +7 -9
- package/esm/http/csrf-origin-policy.d.mts.map +1 -1
- package/esm/http/csrf-origin-policy.mjs +2 -2
- package/esm/http/csrf-origin-policy.mjs.map +1 -1
- package/esm/http/database/RequestLog.d.mts +2 -3
- package/esm/http/database/RequestLog.d.mts.map +1 -1
- package/esm/http/error-codes.d.mts +1 -2
- package/esm/http/error-codes.d.mts.map +1 -1
- package/esm/http/error-mapper.d.mts +2 -4
- package/esm/http/error-mapper.d.mts.map +1 -1
- package/esm/http/error-mapper.mjs +2 -2
- package/esm/http/error-mapper.mjs.map +1 -1
- package/esm/http/errors/errors.d.mts +28 -29
- package/esm/http/errors/errors.d.mts.map +1 -1
- package/esm/http/escape-header-value.d.mts +1 -2
- package/esm/http/escape-header-value.d.mts.map +1 -1
- package/esm/http/events.d.mts +2 -4
- package/esm/http/events.d.mts.map +1 -1
- package/esm/http/health.d.mts +4 -4
- package/esm/http/health.d.mts.map +1 -1
- package/esm/http/index.d.mts +4 -1
- package/esm/http/index.mjs +1 -1
- package/esm/http/middleware/cache-response-middleware.d.mts +2 -4
- package/esm/http/middleware/cache-response-middleware.d.mts.map +1 -1
- package/esm/http/middleware/concurrency-limit.middleware.d.mts +3 -3
- package/esm/http/middleware/concurrency-limit.middleware.d.mts.map +1 -1
- package/esm/http/middleware/idempotency.middleware.d.mts +3 -3
- package/esm/http/middleware/idempotency.middleware.d.mts.map +1 -1
- package/esm/http/middleware/idempotency.middleware.mjs +6 -6
- package/esm/http/middleware/idempotency.middleware.mjs.map +1 -1
- package/esm/http/middleware/index.d.mts +3 -1
- package/esm/http/middleware/index.mjs +1 -1
- package/esm/http/middleware/inject-request-context.d.mts +2 -4
- package/esm/http/middleware/inject-request-context.d.mts.map +1 -1
- package/esm/http/middleware/inject-request-context.mjs +3 -3
- package/esm/http/middleware/inject-request-context.mjs.map +1 -1
- package/esm/http/middleware/ip-filter.middleware.d.mts +3 -3
- package/esm/http/middleware/ip-filter.middleware.d.mts.map +1 -1
- package/esm/http/middleware/maintenance.middleware.d.mts +3 -3
- package/esm/http/middleware/maintenance.middleware.d.mts.map +1 -1
- package/esm/http/middleware/maintenance.middleware.mjs +4 -4
- package/esm/http/middleware/maintenance.middleware.mjs.map +1 -1
- package/esm/http/middleware/max-body-size.middleware.d.mts +2 -2
- package/esm/http/middleware/max-body-size.middleware.d.mts.map +1 -1
- package/esm/http/middleware/middleware-list.d.mts +1 -3
- package/esm/http/middleware/middleware-list.d.mts.map +1 -1
- package/esm/http/middleware/rate-limit.middleware.d.mts +3 -3
- package/esm/http/middleware/rate-limit.middleware.d.mts.map +1 -1
- package/esm/http/middleware/rate-limit.middleware.mjs +2 -2
- package/esm/http/middleware/rate-limit.middleware.mjs.map +1 -1
- package/esm/http/middleware/utils/cidr-match.d.mts +2 -3
- package/esm/http/middleware/utils/cidr-match.d.mts.map +1 -1
- package/esm/http/middleware/utils/idempotency-key.d.mts +3 -5
- package/esm/http/middleware/utils/idempotency-key.d.mts.map +1 -1
- package/esm/http/middleware/utils/index.d.mts +2 -1
- package/esm/http/middleware/utils/parse-size.d.mts +1 -2
- package/esm/http/middleware/utils/parse-size.d.mts.map +1 -1
- package/esm/http/middleware/utils/parse-size.mjs +2 -2
- package/esm/http/middleware/utils/parse-size.mjs.map +1 -1
- package/esm/http/plugins.d.mts +2 -4
- package/esm/http/plugins.d.mts.map +1 -1
- package/esm/http/plugins.mjs +10 -10
- package/esm/http/plugins.mjs.map +1 -1
- package/esm/http/port-preflight.d.mts +3 -4
- package/esm/http/port-preflight.d.mts.map +1 -1
- package/esm/http/rate-limit-cache-store.mjs +4 -3
- package/esm/http/rate-limit-cache-store.mjs.map +1 -1
- package/esm/http/ready-report.d.mts +15 -10
- package/esm/http/ready-report.d.mts.map +1 -1
- package/esm/http/request-controller.d.mts +1 -3
- package/esm/http/request-controller.d.mts.map +1 -1
- package/esm/http/request-log-snapshot.d.mts +20 -16
- package/esm/http/request-log-snapshot.d.mts.map +1 -1
- package/esm/http/request-log-snapshot.mjs +3 -3
- package/esm/http/request-log-snapshot.mjs.map +1 -1
- package/esm/http/request.d.mts +8 -7
- package/esm/http/request.d.mts.map +1 -1
- package/esm/http/request.mjs +8 -7
- package/esm/http/request.mjs.map +1 -1
- package/esm/http/response.d.mts +12 -11
- package/esm/http/response.d.mts.map +1 -1
- package/esm/http/response.mjs +7 -7
- package/esm/http/response.mjs.map +1 -1
- package/esm/http/safe-redirect.d.mts +3 -4
- package/esm/http/safe-redirect.d.mts.map +1 -1
- package/esm/http/serialized.d.mts +12 -13
- package/esm/http/serialized.d.mts.map +1 -1
- package/esm/http/server-rebuilt.d.mts +3 -5
- package/esm/http/server-rebuilt.d.mts.map +1 -1
- package/esm/http/server.d.mts +9 -9
- package/esm/http/server.d.mts.map +1 -1
- package/esm/http/server.mjs +4 -4
- package/esm/http/server.mjs.map +1 -1
- package/esm/http/stream-react-response.d.mts +7 -7
- package/esm/http/stream-react-response.d.mts.map +1 -1
- package/esm/http/tracing/index.mjs +1 -1
- package/esm/http/tracing/trace-id.d.mts +2 -3
- package/esm/http/tracing/trace-id.d.mts.map +1 -1
- package/esm/http/tracing/tracing-dispatcher.d.mts +10 -11
- package/esm/http/tracing/tracing-dispatcher.d.mts.map +1 -1
- package/esm/http/tracing/tracing-dispatcher.mjs +2 -2
- package/esm/http/tracing/tracing-dispatcher.mjs.map +1 -1
- package/esm/http/tracing/tracing.type.d.mts +11 -9
- package/esm/http/tracing/tracing.type.d.mts.map +1 -1
- package/esm/http/types.d.mts +49 -43
- package/esm/http/types.d.mts.map +1 -1
- package/esm/http/uploaded-file.d.mts +6 -5
- package/esm/http/uploaded-file.d.mts.map +1 -1
- package/esm/http/uploads/generate-image-variants.d.mts +6 -6
- package/esm/http/uploads/generate-image-variants.d.mts.map +1 -1
- package/esm/http/uploads/generate-image-variants.mjs +1 -1
- package/esm/http/uploads/generate-image-variants.mjs.map +1 -1
- package/esm/http/uploads/image-variant-cache-entries.mjs +1 -1
- package/esm/http/uploads/image-variant-cache.mjs +8 -8
- package/esm/http/uploads/image-variant-cache.mjs.map +1 -1
- package/esm/http/uploads/image-variant-types.d.mts +7 -9
- package/esm/http/uploads/image-variant-types.d.mts.map +1 -1
- package/esm/http/uploads/image-variants-config-error.d.mts +1 -2
- package/esm/http/uploads/image-variants-config-error.d.mts.map +1 -1
- package/esm/http/uploads/index.d.mts +2 -1
- package/esm/http/uploads/index.mjs +1 -1
- package/esm/http/uploads/parse-uploaded-file-query.mjs +1 -1
- package/esm/http/uploads/parse-uploaded-file-query.mjs.map +1 -1
- package/esm/http/uploads/purge-image-variants.d.mts +2 -4
- package/esm/http/uploads/purge-image-variants.d.mts.map +1 -1
- package/esm/http/uploads/resolve-image-variant.d.mts +3 -5
- package/esm/http/uploads/resolve-image-variant.d.mts.map +1 -1
- package/esm/http/uploads/resolve-image-variants-config.mjs +4 -4
- package/esm/http/uploads/resolve-image-variants-config.mjs.map +1 -1
- package/esm/http/uploads/resolve-original-content-type.mjs +1 -1
- package/esm/http/uploads/resolve-original-content-type.mjs.map +1 -1
- package/esm/http/uploads/trim-image-variant-cache.mjs +3 -3
- package/esm/http/uploads/trim-image-variant-cache.mjs.map +1 -1
- package/esm/http/uploads/uploaded-file.controller.d.mts +6 -5
- package/esm/http/uploads/uploaded-file.controller.d.mts.map +1 -1
- package/esm/http/uploads/uploaded-file.controller.mjs +2 -1
- package/esm/http/uploads/uploaded-file.controller.mjs.map +1 -1
- package/esm/http/uploads/variant-cache-key.mjs +1 -1
- package/esm/http/uploads-config.d.mts +2 -4
- package/esm/http/uploads-config.d.mts.map +1 -1
- package/esm/http/uploads-types.d.mts +19 -17
- package/esm/http/uploads-types.d.mts.map +1 -1
- package/esm/http/xmlable.d.mts +1 -2
- package/esm/http/xmlable.d.mts.map +1 -1
- package/esm/image/image.d.mts +6 -7
- package/esm/image/image.d.mts.map +1 -1
- package/esm/image/image.mjs.map +1 -1
- package/esm/image/index.d.mts +2 -1
- package/esm/image/index.mjs +1 -1
- package/esm/index.d.mts +21 -0
- package/esm/loader/app-module-importer.d.mts +1 -2
- package/esm/loader/app-module-importer.d.mts.map +1 -1
- package/esm/localization/index.mjs +1 -1
- package/esm/localization/parse-locale-dictionary.d.mts +4 -5
- package/esm/localization/parse-locale-dictionary.d.mts.map +1 -1
- package/esm/localization/parse-locale-dictionary.mjs +1 -1
- package/esm/localization/parse-locale-dictionary.mjs.map +1 -1
- package/esm/localization/register-locale-dictionary.d.mts +3 -4
- package/esm/localization/register-locale-dictionary.d.mts.map +1 -1
- package/esm/localization/register-locale-dictionary.mjs +2 -2
- package/esm/localization/register-locale-dictionary.mjs.map +1 -1
- package/esm/logger/fatal-visibility.d.mts +1 -2
- package/esm/logger/fatal-visibility.d.mts.map +1 -1
- package/esm/logger/index.d.mts +2 -1
- package/esm/logger/index.mjs +1 -1
- package/esm/logger/logger.d.mts +1 -3
- package/esm/logger/logger.d.mts.map +1 -1
- package/esm/logger/types.d.mts +2 -3
- package/esm/logger/types.d.mts.map +1 -1
- package/esm/mail/config.d.mts +12 -14
- package/esm/mail/config.d.mts.map +1 -1
- package/esm/mail/events.d.mts +4 -6
- package/esm/mail/events.d.mts.map +1 -1
- package/esm/mail/index.d.mts +2 -1
- package/esm/mail/index.mjs +1 -1
- package/esm/mail/mail.d.mts +1 -3
- package/esm/mail/mail.d.mts.map +1 -1
- package/esm/mail/mailer-pool.d.mts +5 -7
- package/esm/mail/mailer-pool.d.mts.map +1 -1
- package/esm/mail/react-mail.d.mts +1 -3
- package/esm/mail/react-mail.d.mts.map +1 -1
- package/esm/mail/send-mail.d.mts +1 -3
- package/esm/mail/send-mail.d.mts.map +1 -1
- package/esm/mail/send-mail.mjs +2 -1
- package/esm/mail/send-mail.mjs.map +1 -1
- package/esm/mail/test-mailbox.d.mts +11 -13
- package/esm/mail/test-mailbox.d.mts.map +1 -1
- package/esm/mail/types.d.mts +17 -18
- package/esm/mail/types.d.mts.map +1 -1
- package/esm/manifest/manifest-manager.mjs +1 -1
- package/esm/openapi/build-openapi-document.d.mts +2 -4
- package/esm/openapi/build-openapi-document.d.mts.map +1 -1
- package/esm/openapi/cast-schema.mjs +1 -1
- package/esm/openapi/development-openapi-provider.d.mts +5 -6
- package/esm/openapi/development-openapi-provider.d.mts.map +1 -1
- package/esm/openapi/index.d.mts +3 -1
- package/esm/openapi/index.mjs +1 -1
- package/esm/openapi/openapi-child-output.mjs +2 -2
- package/esm/openapi/openapi-child-output.mjs.map +1 -1
- package/esm/openapi/postman/build-request-url.mjs +1 -1
- package/esm/openapi/postman/example-from-schema.d.mts +1 -3
- package/esm/openapi/postman/example-from-schema.d.mts.map +1 -1
- package/esm/openapi/postman/index.d.mts +2 -1
- package/esm/openapi/postman/openapi-to-postman-collection.d.mts +3 -5
- package/esm/openapi/postman/openapi-to-postman-collection.d.mts.map +1 -1
- package/esm/openapi/postman/postman-types.d.mts +19 -18
- package/esm/openapi/postman/postman-types.d.mts.map +1 -1
- package/esm/openapi/postman/schema-refs.d.mts +1 -3
- package/esm/openapi/postman/schema-refs.d.mts.map +1 -1
- package/esm/openapi/postman/uuid-v5.mjs +1 -1
- package/esm/openapi/schema-registry.d.mts +1 -1
- package/esm/openapi/security.mjs +1 -1
- package/esm/openapi/types.d.mts +23 -21
- package/esm/openapi/types.d.mts.map +1 -1
- package/esm/production/assert-generated-imports.mjs +1 -1
- package/esm/production/build-contributions.mjs +1 -1
- package/esm/production/bundle-framework-dependencies.mjs +1 -1
- package/esm/production/dist-build-manifest.mjs +1 -1
- package/esm/production/esbuild-plugins.mjs.map +1 -1
- package/esm/production/esbuild-preflight.mjs +1 -1
- package/esm/production/production-builder.mjs +2 -1
- package/esm/production/production-builder.mjs.map +1 -1
- package/esm/production/production-supervisor.mjs +1 -1
- package/esm/production/registration-child-runner.mjs +4 -3
- package/esm/production/registration-child-runner.mjs.map +1 -1
- package/esm/production/resolve-build-config.d.mts +4 -4
- package/esm/production/resolve-build-config.d.mts.map +1 -1
- package/esm/production/resolve-build-config.mjs +1 -1
- package/esm/production/route-registration-child.d.mts +1 -1
- package/esm/production/route-registration-child.mjs +8 -7
- package/esm/production/route-registration-child.mjs.map +1 -1
- package/esm/production/tsconfig-path-aliases.mjs +1 -1
- package/esm/react/index.d.mts +1 -3
- package/esm/react/index.d.mts.map +1 -1
- package/esm/react/index.mjs.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.d.mts +3 -4
- package/esm/repositories/adapters/cascade/cascade-adapter.d.mts.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.mts +2 -3
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.mts.map +1 -1
- package/esm/repositories/adapters/cascade/filter-applicator.mjs +10 -9
- package/esm/repositories/adapters/cascade/filter-applicator.mjs.map +1 -1
- package/esm/repositories/adapters/cascade/index.d.mts +2 -1
- package/esm/repositories/adapters/cascade/index.mjs +1 -1
- package/esm/repositories/contracts/index.d.mts +2 -1
- package/esm/repositories/contracts/query-builder.contract.d.mts +4 -6
- package/esm/repositories/contracts/query-builder.contract.d.mts.map +1 -1
- package/esm/repositories/contracts/repository-adapter.contract.d.mts +1 -3
- package/esm/repositories/contracts/repository-adapter.contract.d.mts.map +1 -1
- package/esm/repositories/contracts/types.d.mts +23 -25
- package/esm/repositories/contracts/types.d.mts.map +1 -1
- package/esm/repositories/index.d.mts +4 -1
- package/esm/repositories/index.mjs +1 -1
- package/esm/repositories/repository.manager.d.mts +2 -3
- package/esm/repositories/repository.manager.d.mts.map +1 -1
- package/esm/repositories/repository.manager.mjs +2 -2
- package/esm/repositories/repository.manager.mjs.map +1 -1
- package/esm/resource/define-resource.d.mts +3 -5
- package/esm/resource/define-resource.d.mts.map +1 -1
- package/esm/resource/index.d.mts +2 -1
- package/esm/resource/index.mjs +1 -1
- package/esm/resource/nullable-resource.d.mts +5 -7
- package/esm/resource/nullable-resource.d.mts.map +1 -1
- package/esm/resource/register-resource.d.mts +1 -3
- package/esm/resource/register-resource.d.mts.map +1 -1
- package/esm/resource/resource-field-builder.d.mts +1 -3
- package/esm/resource/resource-field-builder.d.mts.map +1 -1
- package/esm/resource/resource.d.mts +3 -5
- package/esm/resource/resource.d.mts.map +1 -1
- package/esm/resource/resource.mjs +4 -2
- package/esm/resource/resource.mjs.map +1 -1
- package/esm/resource/types.d.mts +21 -21
- package/esm/resource/types.d.mts.map +1 -1
- package/esm/restful/index.d.mts +2 -1
- package/esm/restful/index.mjs +1 -1
- package/esm/restful/restful.d.mts +12 -32
- package/esm/restful/restful.d.mts.map +1 -1
- package/esm/router/index.d.mts +2 -1
- package/esm/router/index.mjs +1 -1
- package/esm/router/named-api-routes-with-responses.mjs +2 -1
- package/esm/router/named-api-routes-with-responses.mjs.map +1 -1
- package/esm/router/normalize-request-path.d.mts +1 -2
- package/esm/router/normalize-request-path.d.mts.map +1 -1
- package/esm/router/normalize-route-path.d.mts +1 -2
- package/esm/router/normalize-route-path.d.mts.map +1 -1
- package/esm/router/positional-handler-diagnostics.d.mts +15 -13
- package/esm/router/positional-handler-diagnostics.d.mts.map +1 -1
- package/esm/router/resolve-route-rate-limit.mjs +3 -3
- package/esm/router/resolve-route-rate-limit.mjs.map +1 -1
- package/esm/router/route-builder.d.mts +1 -3
- package/esm/router/route-builder.d.mts.map +1 -1
- package/esm/router/route-guard-names.mjs +1 -1
- package/esm/router/route-guard-names.mjs.map +1 -1
- package/esm/router/route-name-method-suffix.d.mts +2 -3
- package/esm/router/route-name-method-suffix.d.mts.map +1 -1
- package/esm/router/route-name-taken-error.d.mts +1 -3
- package/esm/router/route-name-taken-error.d.mts.map +1 -1
- package/esm/router/route-registry.d.mts +1 -3
- package/esm/router/route-registry.d.mts.map +1 -1
- package/esm/router/router.d.mts +2 -4
- package/esm/router/router.d.mts.map +1 -1
- package/esm/router/router.mjs +8 -6
- package/esm/router/router.mjs.map +1 -1
- package/esm/router/types.d.mts +25 -26
- package/esm/router/types.d.mts.map +1 -1
- package/esm/router/unguarded-route-diagnostics.d.mts +6 -8
- package/esm/router/unguarded-route-diagnostics.d.mts.map +1 -1
- package/esm/socket/index.d.mts +2 -1
- package/esm/socket/index.mjs +1 -1
- package/esm/socket/types.d.mts +2 -4
- package/esm/socket/types.d.mts.map +1 -1
- package/esm/socket/utils.d.mts +1 -3
- package/esm/socket/utils.d.mts.map +1 -1
- package/esm/storage/config.d.mts +4 -6
- package/esm/storage/config.d.mts.map +1 -1
- package/esm/storage/context/storage-driver-context.d.mts +3 -4
- package/esm/storage/context/storage-driver-context.d.mts.map +1 -1
- package/esm/storage/drivers/cloud-driver.d.mts +2 -4
- package/esm/storage/drivers/cloud-driver.d.mts.map +1 -1
- package/esm/storage/drivers/cloud-driver.mjs.map +1 -1
- package/esm/storage/drivers/do-spaces-driver.d.mts +1 -3
- package/esm/storage/drivers/do-spaces-driver.d.mts.map +1 -1
- package/esm/storage/drivers/local-driver.d.mts +2 -3
- package/esm/storage/drivers/local-driver.d.mts.map +1 -1
- package/esm/storage/drivers/local-driver.mjs +8 -3
- package/esm/storage/drivers/local-driver.mjs.map +1 -1
- package/esm/storage/drivers/r2-driver.d.mts +1 -3
- package/esm/storage/drivers/r2-driver.d.mts.map +1 -1
- package/esm/storage/drivers/s3-driver.d.mts +1 -3
- package/esm/storage/drivers/s3-driver.d.mts.map +1 -1
- package/esm/storage/index.d.mts +2 -1
- package/esm/storage/index.mjs +1 -1
- package/esm/storage/local-disk-roots.mjs +2 -2
- package/esm/storage/local-disk-roots.mjs.map +1 -1
- package/esm/storage/scoped-storage.d.mts +2 -3
- package/esm/storage/scoped-storage.d.mts.map +1 -1
- package/esm/storage/storage-file.d.mts +1 -3
- package/esm/storage/storage-file.d.mts.map +1 -1
- package/esm/storage/storage.d.mts +3 -4
- package/esm/storage/storage.d.mts.map +1 -1
- package/esm/storage/types.d.mts +36 -36
- package/esm/storage/types.d.mts.map +1 -1
- package/esm/storage/utils/classify-ip-address.d.mts +1 -2
- package/esm/storage/utils/classify-ip-address.d.mts.map +1 -1
- package/esm/storage/utils/contain-path.d.mts +1 -2
- package/esm/storage/utils/contain-path.d.mts.map +1 -1
- package/esm/storage/utils/mime.d.mts +2 -3
- package/esm/storage/utils/mime.d.mts.map +1 -1
- package/esm/storage/utils/safe-fetch.d.mts +6 -6
- package/esm/storage/utils/safe-fetch.d.mts.map +1 -1
- package/esm/storage/utils/safe-fetch.mjs +3 -3
- package/esm/storage/utils/safe-fetch.mjs.map +1 -1
- package/esm/storage/utils/storage-capability-error.d.mts +1 -3
- package/esm/storage/utils/storage-capability-error.d.mts.map +1 -1
- package/esm/storage/utils/storage-error.d.mts +2 -3
- package/esm/storage/utils/storage-error.d.mts.map +1 -1
- package/esm/storage/utils/storage-not-initialized-error.d.mts +1 -2
- package/esm/storage/utils/storage-not-initialized-error.d.mts.map +1 -1
- package/esm/tests/authenticated-test-client.d.mts +5 -6
- package/esm/tests/authenticated-test-client.d.mts.map +1 -1
- package/esm/tests/factories.d.mts +38 -23
- package/esm/tests/factories.d.mts.map +1 -1
- package/esm/tests/fakes/cache-fake.d.mts +14 -9
- package/esm/tests/fakes/cache-fake.d.mts.map +1 -1
- package/esm/tests/fakes/clock-fake.d.mts +13 -8
- package/esm/tests/fakes/clock-fake.d.mts.map +1 -1
- package/esm/tests/fakes/fake-assertion-error.d.mts +2 -3
- package/esm/tests/fakes/fake-assertion-error.d.mts.map +1 -1
- package/esm/tests/fakes/ids-fake.d.mts +5 -4
- package/esm/tests/fakes/ids-fake.d.mts.map +1 -1
- package/esm/tests/fakes/index.d.mts +2 -1
- package/esm/tests/fakes/index.mjs +1 -1
- package/esm/tests/fakes/mail-fake.d.mts +21 -13
- package/esm/tests/fakes/mail-fake.d.mts.map +1 -1
- package/esm/tests/fakes/queue-fake.d.mts +21 -13
- package/esm/tests/fakes/queue-fake.d.mts.map +1 -1
- package/esm/tests/fakes/storage-fake.d.mts +12 -8
- package/esm/tests/fakes/storage-fake.d.mts.map +1 -1
- package/esm/tests/fakes/storage-fake.mjs +1 -1
- package/esm/tests/fakes/test-fakes.d.mts +8 -9
- package/esm/tests/fakes/test-fakes.d.mts.map +1 -1
- package/esm/tests/fakes/test-fakes.mjs +1 -1
- package/esm/tests/fakes/test-fakes.mjs.map +1 -1
- package/esm/tests/index.d.mts +1 -0
- package/esm/tests/snapshot-response.d.mts +4 -5
- package/esm/tests/snapshot-response.d.mts.map +1 -1
- package/esm/tests/start-http-development-server.d.mts +4 -6
- package/esm/tests/start-http-development-server.d.mts.map +1 -1
- package/esm/tests/start-http-development-server.mjs +5 -5
- package/esm/tests/start-http-development-server.mjs.map +1 -1
- package/esm/tests/test-connectors-selection.d.mts +2 -2
- package/esm/tests/test-connectors-selection.d.mts.map +1 -1
- package/esm/tests/test-connectors-selection.mjs +1 -1
- package/esm/tests/test-helpers.d.mts +11 -12
- package/esm/tests/test-helpers.d.mts.map +1 -1
- package/esm/tests/test-http-server.d.mts +14 -10
- package/esm/tests/test-http-server.d.mts.map +1 -1
- package/esm/tests/test-lifecycle-state.mjs +1 -1
- package/esm/tests/vitest-setup.d.mts +6 -7
- package/esm/tests/vitest-setup.d.mts.map +1 -1
- package/esm/tooling/agents-md/agents-md-markers.d.mts +4 -5
- package/esm/tooling/agents-md/agents-md-markers.d.mts.map +1 -1
- package/esm/tooling/agents-md/agents-md-markers.mjs +2 -1
- package/esm/tooling/agents-md/agents-md-markers.mjs.map +1 -1
- package/esm/tooling/agents-md/agents-md-refresher.d.mts +19 -12
- package/esm/tooling/agents-md/agents-md-refresher.d.mts.map +1 -1
- package/esm/tooling/agents-md/installed-skills.d.mts +13 -9
- package/esm/tooling/agents-md/installed-skills.d.mts.map +1 -1
- package/esm/tooling/agents-md/render-agents-md.d.mts +8 -7
- package/esm/tooling/agents-md/render-agents-md.d.mts.map +1 -1
- package/esm/tooling/agents-md/render-agents-md.mjs +2 -2
- package/esm/tooling/agents-md/render-agents-md.mjs.map +1 -1
- package/esm/tooling/agents-md/write-agents-md.d.mts +17 -12
- package/esm/tooling/agents-md/write-agents-md.d.mts.map +1 -1
- package/esm/tooling/board/board-message.d.mts +4 -6
- package/esm/tooling/board/board-message.d.mts.map +1 -1
- package/esm/tooling/board/board.d.mts +50 -38
- package/esm/tooling/board/board.d.mts.map +1 -1
- package/esm/tooling/board/board.mjs +4 -3
- package/esm/tooling/board/board.mjs.map +1 -1
- package/esm/tooling/board/board.types.d.mts +32 -23
- package/esm/tooling/board/board.types.d.mts.map +1 -1
- package/esm/tooling/check/changed-files.d.mts +4 -6
- package/esm/tooling/check/changed-files.d.mts.map +1 -1
- package/esm/tooling/check/changed-files.mjs +2 -2
- package/esm/tooling/check/changed-files.mjs.map +1 -1
- package/esm/tooling/check/check-report.types.d.mts +22 -17
- package/esm/tooling/check/check-report.types.d.mts.map +1 -1
- package/esm/tooling/check/code-style-conventions.mjs +25 -25
- package/esm/tooling/check/code-style-conventions.mjs.map +1 -1
- package/esm/tooling/check/conventions-step.d.mts +4 -6
- package/esm/tooling/check/conventions-step.d.mts.map +1 -1
- package/esm/tooling/check/conventions-step.mjs +7 -18
- package/esm/tooling/check/conventions-step.mjs.map +1 -1
- package/esm/tooling/check/environment-step.d.mts +2 -4
- package/esm/tooling/check/environment-step.d.mts.map +1 -1
- package/esm/tooling/check/environment-step.mjs +1 -1
- package/esm/tooling/check/index.mjs +1 -1
- package/esm/tooling/check/lint-step.d.mts +4 -5
- package/esm/tooling/check/lint-step.d.mts.map +1 -1
- package/esm/tooling/check/lint-step.mjs +2 -1
- package/esm/tooling/check/lint-step.mjs.map +1 -1
- package/esm/tooling/check/request-input.mjs +15 -15
- package/esm/tooling/check/request-input.mjs.map +1 -1
- package/esm/tooling/check/run-check.d.mts +22 -14
- package/esm/tooling/check/run-check.d.mts.map +1 -1
- package/esm/tooling/check/run-tests.d.mts +22 -15
- package/esm/tooling/check/run-tests.d.mts.map +1 -1
- package/esm/tooling/check/security-conventions.mjs +133 -131
- package/esm/tooling/check/security-conventions.mjs.map +1 -1
- package/esm/tooling/check/source-ast.mjs +92 -132
- package/esm/tooling/check/source-ast.mjs.map +1 -1
- package/esm/tooling/check/tests-step.d.mts +7 -8
- package/esm/tooling/check/tests-step.d.mts.map +1 -1
- package/esm/tooling/check/tests-step.mjs +3 -3
- package/esm/tooling/check/tests-step.mjs.map +1 -1
- package/esm/tooling/dev-state/dev-server-state.d.mts +17 -13
- package/esm/tooling/dev-state/dev-server-state.d.mts.map +1 -1
- package/esm/tooling/devtools/devtools-client.d.mts +29 -20
- package/esm/tooling/devtools/devtools-client.d.mts.map +1 -1
- package/esm/tooling/generate/generation.d.mts +34 -22
- package/esm/tooling/generate/generation.d.mts.map +1 -1
- package/esm/tooling/generate/generation.mjs +9 -5
- package/esm/tooling/generate/generation.mjs.map +1 -1
- package/esm/tooling/generate/generator-spec.d.mts +9 -9
- package/esm/tooling/generate/generator-spec.d.mts.map +1 -1
- package/esm/tooling/generate/index.mjs +1 -1
- package/esm/tooling/generate/project-files.mjs +3 -3
- package/esm/tooling/generate/project-files.mjs.map +1 -1
- package/esm/tooling/generate/run-cli.d.mts +14 -11
- package/esm/tooling/generate/run-cli.d.mts.map +1 -1
- package/esm/tooling/generate/run-cli.mjs +2 -2
- package/esm/tooling/generate/run-cli.mjs.map +1 -1
- package/esm/tooling/generate/unified-diff.d.mts +10 -7
- package/esm/tooling/generate/unified-diff.d.mts.map +1 -1
- package/esm/tooling/index.d.mts +1 -0
- package/esm/tooling/inspect/boot-for-inspect.d.mts +7 -7
- package/esm/tooling/inspect/boot-for-inspect.d.mts.map +1 -1
- package/esm/tooling/inspect/collect-config.mjs +3 -3
- package/esm/tooling/inspect/collect-config.mjs.map +1 -1
- package/esm/tooling/inspect/collect-models.d.mts +4 -3
- package/esm/tooling/inspect/collect-models.d.mts.map +1 -1
- package/esm/tooling/inspect/collect-models.mjs +1 -1
- package/esm/tooling/inspect/collect-packages.d.mts +1 -2
- package/esm/tooling/inspect/collect-packages.d.mts.map +1 -1
- package/esm/tooling/inspect/collect-pages.mjs +10 -10
- package/esm/tooling/inspect/collect-pages.mjs.map +1 -1
- package/esm/tooling/inspect/collect-routes.mjs +1 -1
- package/esm/tooling/inspect/event-recorder.d.mts +7 -7
- package/esm/tooling/inspect/event-recorder.d.mts.map +1 -1
- package/esm/tooling/inspect/index.d.mts +2 -1
- package/esm/tooling/inspect/index.mjs +1 -1
- package/esm/tooling/inspect/inspect-app.d.mts +25 -16
- package/esm/tooling/inspect/inspect-app.d.mts.map +1 -1
- package/esm/tooling/inspect/inspect-report.schema.d.mts +1 -2
- package/esm/tooling/inspect/inspect-report.schema.d.mts.map +1 -1
- package/esm/tooling/inspect/inspect-report.types.d.mts +86 -54
- package/esm/tooling/inspect/inspect-report.types.d.mts.map +1 -1
- package/esm/tooling/mcp/create-mcp-context.d.mts +11 -8
- package/esm/tooling/mcp/create-mcp-context.d.mts.map +1 -1
- package/esm/tooling/mcp/db-schema.d.mts +10 -9
- package/esm/tooling/mcp/db-schema.d.mts.map +1 -1
- package/esm/tooling/mcp/docs-search.d.mts +20 -15
- package/esm/tooling/mcp/docs-search.d.mts.map +1 -1
- package/esm/tooling/mcp/index.mjs +1 -1
- package/esm/tooling/mcp/load-ai-tools.d.mts +7 -8
- package/esm/tooling/mcp/load-ai-tools.d.mts.map +1 -1
- package/esm/tooling/mcp/load-ai-tools.mjs +2 -1
- package/esm/tooling/mcp/load-ai-tools.mjs.map +1 -1
- package/esm/tooling/mcp/mcp-tools.d.mts +29 -19
- package/esm/tooling/mcp/mcp-tools.d.mts.map +1 -1
- package/esm/tooling/mcp/mcp-tools.mjs +3 -2
- package/esm/tooling/mcp/mcp-tools.mjs.map +1 -1
- package/esm/tooling/mcp/start-mcp-server.d.mts +24 -17
- package/esm/tooling/mcp/start-mcp-server.d.mts.map +1 -1
- package/esm/tooling/mcp/start-mcp-server.mjs +1 -1
- package/esm/tooling/mcp/start-mcp-server.mjs.map +1 -1
- package/esm/tooling/mcp/tool-input.d.mts +7 -7
- package/esm/tooling/mcp/tool-input.d.mts.map +1 -1
- package/esm/tooling/problem.d.mts +27 -17
- package/esm/tooling/problem.d.mts.map +1 -1
- package/esm/tooling/syntax/ast.mjs +230 -0
- package/esm/tooling/syntax/ast.mjs.map +1 -0
- package/esm/tooling/syntax/imports.mjs +34 -0
- package/esm/tooling/syntax/imports.mjs.map +1 -0
- package/esm/tooling/trace/trace-report.types.d.mts +36 -22
- package/esm/tooling/trace/trace-report.types.d.mts.map +1 -1
- package/esm/tooling/trace/trace-request.d.mts +27 -20
- package/esm/tooling/trace/trace-request.d.mts.map +1 -1
- package/esm/tooling/trace/trace-request.mjs +2 -2
- package/esm/tooling/trace/trace-request.mjs.map +1 -1
- package/esm/tooling/typecheck/index.mjs +1 -1
- package/esm/tooling/typecheck/run-typecheck.d.mts +15 -48
- package/esm/tooling/typecheck/run-typecheck.d.mts.map +1 -1
- package/esm/tooling/typecheck/run-typecheck.mjs +42 -105
- package/esm/tooling/typecheck/run-typecheck.mjs.map +1 -1
- package/esm/tooling/typescript/compiler.d.mts +31 -0
- package/esm/tooling/typescript/compiler.d.mts.map +1 -0
- package/esm/tooling/typescript/compiler.mjs +120 -0
- package/esm/tooling/typescript/compiler.mjs.map +1 -0
- package/esm/updater/update-warlock-packages.mjs +3 -2
- package/esm/updater/update-warlock-packages.mjs.map +1 -1
- package/esm/upgrade/codemods/index.mjs +1 -1
- package/esm/upgrade/codemods/logger-sync-calls.mjs +1 -1
- package/esm/upgrade/codemods/logger-sync-calls.mjs.map +1 -1
- package/esm/upgrade/codemods/request-log-snapshot.mjs +1 -1
- package/esm/upgrade/codemods/request-log-snapshot.mjs.map +1 -1
- package/esm/upgrade/diff.mjs +1 -1
- package/esm/upgrade/diff.mjs.map +1 -1
- package/esm/upgrade/load-ts-morph.mjs +3 -2
- package/esm/upgrade/load-ts-morph.mjs.map +1 -1
- package/esm/upgrade/run-upgrade.mjs +1 -1
- package/esm/use-cases/index.d.mts +2 -1
- package/esm/use-cases/index.mjs +1 -1
- package/esm/use-cases/types.d.mts +116 -63
- package/esm/use-cases/types.d.mts.map +1 -1
- package/esm/use-cases/use-case-broadcast.d.mts +1 -3
- package/esm/use-cases/use-case-broadcast.d.mts.map +1 -1
- package/esm/use-cases/use-case-events.d.mts +3 -5
- package/esm/use-cases/use-case-events.d.mts.map +1 -1
- package/esm/use-cases/use-case-pipeline.d.mts +6 -6
- package/esm/use-cases/use-case-pipeline.d.mts.map +1 -1
- package/esm/use-cases/use-case.d.mts +2 -4
- package/esm/use-cases/use-case.d.mts.map +1 -1
- package/esm/use-cases/use-case.errors.d.mts +1 -3
- package/esm/use-cases/use-case.errors.d.mts.map +1 -1
- package/esm/use-cases/use-cases-registry.d.mts +8 -10
- package/esm/use-cases/use-cases-registry.d.mts.map +1 -1
- package/esm/utils/app-log.d.mts +1 -2
- package/esm/utils/app-log.d.mts.map +1 -1
- package/esm/utils/clock.d.mts +8 -6
- package/esm/utils/clock.d.mts.map +1 -1
- package/esm/utils/database-log.d.mts +3 -4
- package/esm/utils/database-log.d.mts.map +1 -1
- package/esm/utils/environment.d.mts +4 -5
- package/esm/utils/environment.d.mts.map +1 -1
- package/esm/utils/framework-vesion.mjs.map +1 -1
- package/esm/utils/get-localized.d.mts +2 -3
- package/esm/utils/get-localized.d.mts.map +1 -1
- package/esm/utils/ids.d.mts +9 -6
- package/esm/utils/ids.d.mts.map +1 -1
- package/esm/utils/index.d.mts +2 -1
- package/esm/utils/index.mjs +1 -1
- package/esm/utils/normalized-path.d.mts +1 -2
- package/esm/utils/normalized-path.d.mts.map +1 -1
- package/esm/utils/npm-registry.d.mts +1 -2
- package/esm/utils/npm-registry.d.mts.map +1 -1
- package/esm/utils/paths.d.mts +13 -14
- package/esm/utils/paths.d.mts.map +1 -1
- package/esm/utils/paths.mjs +2 -2
- package/esm/utils/paths.mjs.map +1 -1
- package/esm/utils/promise-all-object.d.mts +1 -2
- package/esm/utils/promise-all-object.d.mts.map +1 -1
- package/esm/utils/queue.d.mts +1 -2
- package/esm/utils/queue.d.mts.map +1 -1
- package/esm/utils/runtime.d.mts +11 -10
- package/esm/utils/runtime.d.mts.map +1 -1
- package/esm/utils/sleep.d.mts +1 -2
- package/esm/utils/sleep.d.mts.map +1 -1
- package/esm/utils/sluggable.d.mts +1 -3
- package/esm/utils/sluggable.d.mts.map +1 -1
- package/esm/utils/to-json.d.mts +1 -2
- package/esm/utils/to-json.d.mts.map +1 -1
- package/esm/utils/types.d.mts +1 -2
- package/esm/utils/types.d.mts.map +1 -1
- package/esm/utils/urls.d.mts +5 -6
- package/esm/utils/urls.d.mts.map +1 -1
- package/esm/utils/version-compare.d.mts +1 -2
- package/esm/utils/version-compare.d.mts.map +1 -1
- package/esm/validation/database/exists-except-current-id.d.mts +2 -3
- package/esm/validation/database/exists-except-current-id.d.mts.map +1 -1
- package/esm/validation/database/exists-except-current-user.d.mts +2 -3
- package/esm/validation/database/exists-except-current-user.d.mts.map +1 -1
- package/esm/validation/database/index.d.mts +2 -1
- package/esm/validation/database/index.mjs +1 -1
- package/esm/validation/database/types.d.mts +14 -10
- package/esm/validation/database/types.d.mts.map +1 -1
- package/esm/validation/database/unique-except-current-id.d.mts +2 -3
- package/esm/validation/database/unique-except-current-id.d.mts.map +1 -1
- package/esm/validation/database/unique-except-current-user.d.mts +2 -3
- package/esm/validation/database/unique-except-current-user.d.mts.map +1 -1
- package/esm/validation/file/file.d.mts +4 -6
- package/esm/validation/file/file.d.mts.map +1 -1
- package/esm/validation/file/index.d.mts +2 -1
- package/esm/validation/file/index.mjs +1 -1
- package/esm/validation/index.d.mts +5 -1
- package/esm/validation/index.mjs +1 -1
- package/esm/validation/plugins/index.mjs +1 -1
- package/esm/validation/types.d.mts +6 -4
- package/esm/validation/types.d.mts.map +1 -1
- package/esm/validation/validateAll.mjs +2 -2
- package/esm/validation/validateAll.mjs.map +1 -1
- package/esm/validation/validation-failure-status.mjs +2 -2
- package/esm/validation/validation-failure-status.mjs.map +1 -1
- package/esm/validation/validators/file-validator.d.mts +2 -4
- package/esm/validation/validators/file-validator.d.mts.map +1 -1
- package/esm/validation/validators/index.d.mts +2 -1
- package/esm/validation/validators/index.mjs +1 -1
- package/esm/vite/lower-stage3-decorators.d.mts +2 -3
- package/esm/vite/lower-stage3-decorators.d.mts.map +1 -1
- package/esm/warlock-config/define-config.d.mts +1 -3
- package/esm/warlock-config/define-config.d.mts.map +1 -1
- package/esm/warlock-config/define-config.mjs +3 -2
- package/esm/warlock-config/define-config.mjs.map +1 -1
- package/esm/warlock-config/index.d.mts +2 -1
- package/esm/warlock-config/index.mjs +1 -1
- package/esm/warlock-config/types.d.mts +6 -5
- package/esm/warlock-config/types.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.d.mts +5 -7
- package/esm/warlock-config/warlock-config.manager.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.mjs +2 -1
- package/esm/warlock-config/warlock-config.manager.mjs.map +1 -1
- package/esm/warlock-config/warn-deprecated-config.mjs +1 -1
- package/llms-full.txt +55 -5
- package/package.json +17 -15
- package/skills/create-module/SKILL.md +7 -0
- package/skills/index.md +2 -0
- package/skills/report-framework-issue.md +154 -0
- package/skills/run-app/SKILL.md +6 -5
- package/skills/upgrade-from-5-29/SKILL.md +41 -0
- package/skills/warlock-check/SKILL.md +1 -0
- package/esm/tooling/check/index.d.mts +0 -8
- package/esm/tooling/typecheck/index.d.mts +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { isAuthGuardName, isMutatingHttpMethod } from "../../router/route-guard-names.mjs";
|
|
2
|
+
import { expressionOf, isArrayLiteralExpression, isArrowFunction, isAsExpression, isAwaitExpression, isBinaryExpression, isCallExpression, isConditionalExpression, isElementAccessExpression, isFunctionExpression, isIdentifier, isIfStatement, isJsxAttribute, isJsxExpression, isJsxOpeningElement, isJsxSelfClosingElement, isNewExpression, isNonNullExpression, isObjectLiteralExpression, isOmittedExpression, isParenthesizedExpression, isPropertyAssignment, isRegularExpressionLiteral, isSatisfiesExpression, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, isTemplateExpression, isTypeAssertionExpression, isVariableDeclaration, nameNode, parentOf, valueText } from "../syntax/ast.mjs";
|
|
2
3
|
import { ancestors, calleeName, isFunctionLike, isMemberAccess, keyName, literalString, memberName, referencesOf, resolveInitializer, rootIdentifier, unwrap, walk } from "./source-ast.mjs";
|
|
3
4
|
import { REQUEST_BODY_MEMBERS, REQUEST_NAMES, containsRequestInput, requestMemberAccess } from "./request-input.mjs";
|
|
4
5
|
import { DEFAULT_REDACT_KEY_SET, normalizeRedactKey } from "@warlock.js/logger";
|
|
5
|
-
import ts from "typescript";
|
|
6
6
|
|
|
7
7
|
//#region ../../packages/core/src/tooling/check/security-conventions.ts
|
|
8
8
|
/** Request methods that return every input the client sent, validated or not. */
|
|
9
|
-
const UNFILTERED_METHODS = new Set([
|
|
9
|
+
const UNFILTERED_METHODS = /* @__PURE__ */ new Set([
|
|
10
10
|
"all",
|
|
11
11
|
"allExceptParams",
|
|
12
12
|
"heavy",
|
|
@@ -16,7 +16,7 @@ const UNFILTERED_METHODS = new Set([
|
|
|
16
16
|
* Responses and loggers are not the data sinks `WL9005` guards: echoing input
|
|
17
17
|
* back is not mass assignment, and logging it is `WL9008`'s concern.
|
|
18
18
|
*/
|
|
19
|
-
const IGNORED_RECEIVERS = new Set([
|
|
19
|
+
const IGNORED_RECEIVERS = /* @__PURE__ */ new Set([
|
|
20
20
|
"response",
|
|
21
21
|
"reply",
|
|
22
22
|
"res",
|
|
@@ -26,11 +26,11 @@ const IGNORED_RECEIVERS = new Set([
|
|
|
26
26
|
]);
|
|
27
27
|
function displayCallee(callee) {
|
|
28
28
|
const target = unwrap(callee);
|
|
29
|
-
if (
|
|
29
|
+
if (isIdentifier(target)) return `${valueText(target)}()`;
|
|
30
30
|
if (isMemberAccess(target)) {
|
|
31
31
|
const name = memberName(target);
|
|
32
|
-
const object = unwrap(target
|
|
33
|
-
const owner =
|
|
32
|
+
const object = unwrap(expressionOf(target));
|
|
33
|
+
const owner = isIdentifier(object) ? `${valueText(object)}.` : "";
|
|
34
34
|
return name ? `${owner}${name}()` : "a call";
|
|
35
35
|
}
|
|
36
36
|
return "a call";
|
|
@@ -38,21 +38,21 @@ function displayCallee(callee) {
|
|
|
38
38
|
function isIgnoredReceiver(callee) {
|
|
39
39
|
const target = unwrap(callee);
|
|
40
40
|
if (!isMemberAccess(target)) return false;
|
|
41
|
-
const object = unwrap(target
|
|
42
|
-
return
|
|
41
|
+
const object = unwrap(expressionOf(target));
|
|
42
|
+
return isIdentifier(object) && IGNORED_RECEIVERS.has(valueText(object));
|
|
43
43
|
}
|
|
44
44
|
/** When `node` flows into a call's arguments, the callee's display name. */
|
|
45
45
|
function callReceiving(node) {
|
|
46
46
|
let current = node;
|
|
47
47
|
for (;;) {
|
|
48
|
-
const parent = current
|
|
48
|
+
const parent = parentOf(current);
|
|
49
49
|
if (!parent) return void 0;
|
|
50
|
-
if (
|
|
50
|
+
if (isCallExpression(parent) || isNewExpression(parent)) {
|
|
51
51
|
if (!(parent.arguments ?? []).some((argument) => argument === current)) return void 0;
|
|
52
|
-
if (isIgnoredReceiver(parent
|
|
53
|
-
return displayCallee(parent
|
|
52
|
+
if (isIgnoredReceiver(expressionOf(parent))) return void 0;
|
|
53
|
+
return displayCallee(expressionOf(parent));
|
|
54
54
|
}
|
|
55
|
-
if (
|
|
55
|
+
if (isSpreadElement(parent) || isSpreadAssignment(parent) || isObjectLiteralExpression(parent) || isArrayLiteralExpression(parent) || isPropertyAssignment(parent) && parent.value === current || isShorthandPropertyAssignment(parent) || isAsExpression(parent) || isNonNullExpression(parent) || isSatisfiesExpression(parent) || isTypeAssertionExpression(parent) || isParenthesizedExpression(parent) || isAwaitExpression(parent)) {
|
|
56
56
|
current = parent;
|
|
57
57
|
continue;
|
|
58
58
|
}
|
|
@@ -67,18 +67,18 @@ function callReceiving(node) {
|
|
|
67
67
|
function receivingCall(node) {
|
|
68
68
|
const direct = callReceiving(node);
|
|
69
69
|
if (direct) return direct;
|
|
70
|
-
const parent = node
|
|
71
|
-
if (parent &&
|
|
70
|
+
const parent = parentOf(node);
|
|
71
|
+
if (parent && isVariableDeclaration(parent) && parent.init === node && isIdentifier(parent.id)) for (const reference of referencesOf(parent)) {
|
|
72
72
|
const name = callReceiving(reference);
|
|
73
73
|
if (name) return name;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
function checkRequestAll(node, findings) {
|
|
77
|
-
if (!
|
|
78
|
-
const callee = unwrap(node
|
|
77
|
+
if (!isCallExpression(node)) return;
|
|
78
|
+
const callee = unwrap(expressionOf(node));
|
|
79
79
|
if (!isMemberAccess(callee)) return;
|
|
80
|
-
const object = unwrap(callee
|
|
81
|
-
if (!
|
|
80
|
+
const object = unwrap(expressionOf(callee));
|
|
81
|
+
if (!isIdentifier(object) || !REQUEST_NAMES.has(valueText(object))) return;
|
|
82
82
|
const method = memberName(callee);
|
|
83
83
|
if (!method || !UNFILTERED_METHODS.has(method)) return;
|
|
84
84
|
const target = receivingCall(node);
|
|
@@ -86,21 +86,21 @@ function checkRequestAll(node, findings) {
|
|
|
86
86
|
findings.push({
|
|
87
87
|
code: "WL9005",
|
|
88
88
|
node,
|
|
89
|
-
message: `\`${object
|
|
89
|
+
message: `\`${valueText(object)}.${method}()\` passes every client-sent field to \`${target}\`. Use \`${valueText(object)}.validated()\` so only the fields the validation schema accepted reach it.`
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
const ROUTER_NAMES = new Set(["router"]);
|
|
92
|
+
const ROUTER_NAMES = /* @__PURE__ */ new Set(["router"]);
|
|
93
93
|
/** Wrappers whose callback routes are guarded, e.g. `guarded(() => …)`. */
|
|
94
|
-
const GUARD_FUNCTIONS = new Set(["guarded"]);
|
|
94
|
+
const GUARD_FUNCTIONS = /* @__PURE__ */ new Set(["guarded"]);
|
|
95
95
|
/** `router.post(…)` and friends. */
|
|
96
|
-
const MUTATING_ROUTER_METHODS = new Set([
|
|
96
|
+
const MUTATING_ROUTER_METHODS = /* @__PURE__ */ new Set([
|
|
97
97
|
"post",
|
|
98
98
|
"put",
|
|
99
99
|
"patch",
|
|
100
100
|
"delete"
|
|
101
101
|
]);
|
|
102
102
|
/** Route builder methods (`router.route(path).create(…)`) that register a mutating route. */
|
|
103
|
-
const MUTATING_BUILDER_METHODS = new Set([
|
|
103
|
+
const MUTATING_BUILDER_METHODS = /* @__PURE__ */ new Set([
|
|
104
104
|
"post",
|
|
105
105
|
"postOne",
|
|
106
106
|
"put",
|
|
@@ -113,14 +113,14 @@ const MUTATING_BUILDER_METHODS = new Set([
|
|
|
113
113
|
"update",
|
|
114
114
|
"destroy"
|
|
115
115
|
]);
|
|
116
|
-
const READ_ONLY_RESOURCE_METHODS = new Set([
|
|
116
|
+
const READ_ONLY_RESOURCE_METHODS = /* @__PURE__ */ new Set([
|
|
117
117
|
"list",
|
|
118
118
|
"get",
|
|
119
119
|
"show"
|
|
120
120
|
]);
|
|
121
121
|
function isRouter(node) {
|
|
122
122
|
const target = unwrap(node);
|
|
123
|
-
return
|
|
123
|
+
return isIdentifier(target) && ROUTER_NAMES.has(valueText(target));
|
|
124
124
|
}
|
|
125
125
|
function isGuardName(name) {
|
|
126
126
|
return name !== void 0 && isAuthGuardName(name);
|
|
@@ -129,16 +129,17 @@ function isGuardName(name) {
|
|
|
129
129
|
function isMarkedGuard(identifier) {
|
|
130
130
|
const initializer = resolveInitializer(identifier);
|
|
131
131
|
const value = initializer ? unwrap(initializer) : void 0;
|
|
132
|
-
return value !== void 0 &&
|
|
132
|
+
return value !== void 0 && isCallExpression(value) && calleeName(value) === "markAuthGuard" && !(value.arguments[1]?.type === "Literal" && value.arguments[1].value === false);
|
|
133
133
|
}
|
|
134
134
|
function middlewareHasGuard(node) {
|
|
135
135
|
const value = unwrap(node);
|
|
136
|
-
if (!
|
|
136
|
+
if (!isArrayLiteralExpression(value)) return true;
|
|
137
137
|
return value.elements.some((element) => {
|
|
138
|
-
if (
|
|
138
|
+
if (!element) return false;
|
|
139
|
+
if (isSpreadElement(element)) return true;
|
|
139
140
|
const item = unwrap(element);
|
|
140
|
-
if (
|
|
141
|
-
if (
|
|
141
|
+
if (isIdentifier(item)) return isGuardName(valueText(item)) || isMarkedGuard(item);
|
|
142
|
+
if (isCallExpression(item)) return isGuardName(calleeName(item));
|
|
142
143
|
if (isMemberAccess(item)) return isGuardName(memberName(item));
|
|
143
144
|
return false;
|
|
144
145
|
});
|
|
@@ -147,24 +148,24 @@ function middlewareHasGuard(node) {
|
|
|
147
148
|
function optionsGuard(node) {
|
|
148
149
|
if (!node) return "none";
|
|
149
150
|
const value = unwrap(node);
|
|
150
|
-
if (!
|
|
151
|
+
if (!isObjectLiteralExpression(value)) return "guarded";
|
|
151
152
|
let verdict = "unguarded";
|
|
152
153
|
for (const property of value.properties) {
|
|
153
|
-
if (
|
|
154
|
+
if (isSpreadAssignment(property)) {
|
|
154
155
|
verdict = "guarded";
|
|
155
156
|
continue;
|
|
156
157
|
}
|
|
157
158
|
let key;
|
|
158
159
|
let propertyValue;
|
|
159
|
-
if (
|
|
160
|
-
key = keyName(property.
|
|
161
|
-
propertyValue = unwrap(property.
|
|
162
|
-
} else if (
|
|
163
|
-
key = property.
|
|
164
|
-
propertyValue = property.
|
|
160
|
+
if (isPropertyAssignment(property)) {
|
|
161
|
+
key = keyName(property.key);
|
|
162
|
+
propertyValue = unwrap(property.value);
|
|
163
|
+
} else if (isShorthandPropertyAssignment(property)) {
|
|
164
|
+
key = valueText(property.key);
|
|
165
|
+
propertyValue = property.key;
|
|
165
166
|
}
|
|
166
167
|
if (!propertyValue) continue;
|
|
167
|
-
if (key === "public" && propertyValue.
|
|
168
|
+
if (key === "public" && propertyValue.type === "Literal" && propertyValue.value === true) return "guarded";
|
|
168
169
|
if (key === "middleware" && middlewareHasGuard(propertyValue)) return "guarded";
|
|
169
170
|
}
|
|
170
171
|
return verdict;
|
|
@@ -172,14 +173,14 @@ function optionsGuard(node) {
|
|
|
172
173
|
/** Whether an enclosing function is a guarded (or public) group callback. */
|
|
173
174
|
function insideGuardedGroup(node) {
|
|
174
175
|
for (const ancestor of ancestors(node)) {
|
|
175
|
-
if (!
|
|
176
|
-
const parent = ancestor
|
|
177
|
-
if (!parent || !
|
|
176
|
+
if (!isArrowFunction(ancestor) && !isFunctionExpression(ancestor)) continue;
|
|
177
|
+
const parent = parentOf(ancestor);
|
|
178
|
+
if (!parent || !isCallExpression(parent)) continue;
|
|
178
179
|
if (!parent.arguments.some((argument) => argument === ancestor)) continue;
|
|
179
180
|
const name = calleeName(parent);
|
|
180
181
|
if (name !== void 0 && GUARD_FUNCTIONS.has(name)) return true;
|
|
181
|
-
const callee = unwrap(parent
|
|
182
|
-
if (isMemberAccess(callee) && memberName(callee) === "group" && isRouter(callee
|
|
182
|
+
const callee = unwrap(expressionOf(parent));
|
|
183
|
+
if (isMemberAccess(callee) && memberName(callee) === "group" && isRouter(expressionOf(callee)) && optionsGuard(parent.arguments[0]) === "guarded") return true;
|
|
183
184
|
}
|
|
184
185
|
return false;
|
|
185
186
|
}
|
|
@@ -193,11 +194,11 @@ function pathText(node) {
|
|
|
193
194
|
function builderChain(node) {
|
|
194
195
|
const optionNodes = [];
|
|
195
196
|
let current = unwrap(node);
|
|
196
|
-
while (
|
|
197
|
-
const callee = unwrap(current
|
|
197
|
+
while (isCallExpression(current)) {
|
|
198
|
+
const callee = unwrap(expressionOf(current));
|
|
198
199
|
if (!isMemberAccess(callee)) return void 0;
|
|
199
200
|
const name = memberName(callee);
|
|
200
|
-
if (name === "route" && isRouter(callee
|
|
201
|
+
if (name === "route" && isRouter(expressionOf(callee))) {
|
|
201
202
|
const options = current.arguments[1];
|
|
202
203
|
if (options) optionNodes.push(options);
|
|
203
204
|
return {
|
|
@@ -209,18 +210,19 @@ function builderChain(node) {
|
|
|
209
210
|
const options = current.arguments[1];
|
|
210
211
|
if (options) optionNodes.push(options);
|
|
211
212
|
}
|
|
212
|
-
current = unwrap(callee
|
|
213
|
+
current = unwrap(expressionOf(callee));
|
|
213
214
|
}
|
|
214
215
|
}
|
|
215
216
|
function resourceIsReadOnly(node) {
|
|
216
217
|
if (!node) return false;
|
|
217
218
|
const value = unwrap(node);
|
|
218
|
-
if (!
|
|
219
|
+
if (!isObjectLiteralExpression(value)) return false;
|
|
219
220
|
for (const property of value.properties) {
|
|
220
|
-
if (!
|
|
221
|
-
const only = unwrap(property.
|
|
222
|
-
if (!
|
|
221
|
+
if (!isPropertyAssignment(property) || keyName(property.key) !== "only") continue;
|
|
222
|
+
const only = unwrap(property.value);
|
|
223
|
+
if (!isArrayLiteralExpression(only)) return false;
|
|
223
224
|
return only.elements.every((element) => {
|
|
225
|
+
if (!element) return false;
|
|
224
226
|
const method = literalString(element);
|
|
225
227
|
return method !== void 0 && READ_ONLY_RESOURCE_METHODS.has(method);
|
|
226
228
|
});
|
|
@@ -235,13 +237,13 @@ function unguardedRoute(node, route) {
|
|
|
235
237
|
};
|
|
236
238
|
}
|
|
237
239
|
function checkRouteGuard(node, findings) {
|
|
238
|
-
if (!
|
|
239
|
-
const callee = unwrap(node
|
|
240
|
+
if (!isCallExpression(node)) return;
|
|
241
|
+
const callee = unwrap(expressionOf(node));
|
|
240
242
|
if (!isMemberAccess(callee)) return;
|
|
241
243
|
const method = memberName(callee);
|
|
242
244
|
if (!method) return;
|
|
243
245
|
const guarded = (options) => optionsGuard(options) === "guarded" || insideGuardedGroup(node);
|
|
244
|
-
if (isRouter(callee
|
|
246
|
+
if (isRouter(expressionOf(callee))) {
|
|
245
247
|
if (MUTATING_ROUTER_METHODS.has(method)) {
|
|
246
248
|
if (!guarded(node.arguments[2])) findings.push(unguardedRoute(node, `${method.toUpperCase()} ${pathText(node.arguments[0])}`));
|
|
247
249
|
return;
|
|
@@ -259,7 +261,7 @@ function checkRouteGuard(node, findings) {
|
|
|
259
261
|
return;
|
|
260
262
|
}
|
|
261
263
|
if (!MUTATING_BUILDER_METHODS.has(method)) return;
|
|
262
|
-
const chain = builderChain(callee
|
|
264
|
+
const chain = builderChain(expressionOf(callee));
|
|
263
265
|
if (!chain) return;
|
|
264
266
|
if (optionsGuard(node.arguments[1]) === "guarded") return;
|
|
265
267
|
if (chain.optionNodes.some((options) => optionsGuard(options) === "guarded")) return;
|
|
@@ -267,37 +269,37 @@ function checkRouteGuard(node, findings) {
|
|
|
267
269
|
findings.push(unguardedRoute(node, `${method} ${chain.path}`));
|
|
268
270
|
}
|
|
269
271
|
/** Calls that turn their first argument into a redirect or a navigation. */
|
|
270
|
-
const REDIRECT_CALLS = new Set([
|
|
272
|
+
const REDIRECT_CALLS = /* @__PURE__ */ new Set([
|
|
271
273
|
"redirect",
|
|
272
274
|
"permanentRedirect",
|
|
273
275
|
"navigateTo"
|
|
274
276
|
]);
|
|
275
277
|
/** Components whose `to`/`href` prop navigates. */
|
|
276
|
-
const LINK_COMPONENTS = new Set(["Link", "NavLink"]);
|
|
278
|
+
const LINK_COMPONENTS = /* @__PURE__ */ new Set(["Link", "NavLink"]);
|
|
277
279
|
/** Helpers that return an allowed target (or a fallback) for any input. */
|
|
278
|
-
const REDIRECT_SANITIZERS = new Set(["safeRedirect", "safeRedirectTarget"]);
|
|
280
|
+
const REDIRECT_SANITIZERS = /* @__PURE__ */ new Set(["safeRedirect", "safeRedirectTarget"]);
|
|
279
281
|
/** Predicates that, used in an enclosing `if` or `? :`, prove the target was checked. */
|
|
280
|
-
const REDIRECT_VALIDATORS = new Set(["isSafeRedirect", "isSafeRedirectUrl"]);
|
|
282
|
+
const REDIRECT_VALIDATORS = /* @__PURE__ */ new Set(["isSafeRedirect", "isSafeRedirectUrl"]);
|
|
281
283
|
/** Client-side input: query-string hooks. */
|
|
282
|
-
const CLIENT_INPUT_CALLS = new Set([
|
|
284
|
+
const CLIENT_INPUT_CALLS = /* @__PURE__ */ new Set([
|
|
283
285
|
"useQueryString",
|
|
284
286
|
"useSearchParams",
|
|
285
287
|
"useParams"
|
|
286
288
|
]);
|
|
287
289
|
/** Identifiers whose members are client-controlled (a loader's `query`, URLSearchParams). */
|
|
288
|
-
const CLIENT_INPUT_NAMES = new Set(["query", "searchParams"]);
|
|
290
|
+
const CLIENT_INPUT_NAMES = /* @__PURE__ */ new Set(["query", "searchParams"]);
|
|
289
291
|
function isClientSource(node) {
|
|
290
|
-
if (
|
|
292
|
+
if (isCallExpression(node)) {
|
|
291
293
|
const name = calleeName(node);
|
|
292
294
|
if (name !== void 0 && CLIENT_INPUT_CALLS.has(name)) return true;
|
|
293
295
|
}
|
|
294
296
|
if (isMemberAccess(node)) {
|
|
295
297
|
const root = rootIdentifier(node);
|
|
296
|
-
if (root && CLIENT_INPUT_NAMES.has(root
|
|
298
|
+
if (root && CLIENT_INPUT_NAMES.has(valueText(root))) return true;
|
|
297
299
|
const name = memberName(node);
|
|
298
300
|
if (name === "search" || name === "hash") {
|
|
299
|
-
const object = unwrap(node
|
|
300
|
-
if (
|
|
301
|
+
const object = unwrap(expressionOf(node));
|
|
302
|
+
if (isIdentifier(object) && valueText(object) === "location") return true;
|
|
301
303
|
if (isMemberAccess(object) && memberName(object) === "location") return true;
|
|
302
304
|
}
|
|
303
305
|
}
|
|
@@ -313,12 +315,12 @@ function isRedirectTainted(node) {
|
|
|
313
315
|
function checkedByValidator(node) {
|
|
314
316
|
for (const ancestor of ancestors(node)) {
|
|
315
317
|
let test;
|
|
316
|
-
if (
|
|
317
|
-
else if (
|
|
318
|
+
if (isIfStatement(ancestor)) test = expressionOf(ancestor);
|
|
319
|
+
else if (isConditionalExpression(ancestor)) test = ancestor.test;
|
|
318
320
|
else continue;
|
|
319
321
|
let validated = false;
|
|
320
322
|
walk(test, (child) => {
|
|
321
|
-
if (
|
|
323
|
+
if (isCallExpression(child)) {
|
|
322
324
|
const name = calleeName(child);
|
|
323
325
|
if (name !== void 0 && REDIRECT_VALIDATORS.has(name)) validated = true;
|
|
324
326
|
}
|
|
@@ -335,37 +337,37 @@ function unsafeRedirect(node, what, helper, from) {
|
|
|
335
337
|
};
|
|
336
338
|
}
|
|
337
339
|
function checkRedirect(node, findings) {
|
|
338
|
-
if (
|
|
340
|
+
if (isCallExpression(node)) {
|
|
339
341
|
const name = calleeName(node);
|
|
340
342
|
if (name === void 0 || !REDIRECT_CALLS.has(name)) return;
|
|
341
|
-
const callee = unwrap(node
|
|
343
|
+
const callee = unwrap(expressionOf(node));
|
|
342
344
|
if (isMemberAccess(callee)) {
|
|
343
|
-
const owner = unwrap(callee
|
|
344
|
-
if (
|
|
345
|
+
const owner = unwrap(expressionOf(callee));
|
|
346
|
+
if (isIdentifier(owner) && valueText(owner) === "router") return;
|
|
345
347
|
}
|
|
346
348
|
const target = node.arguments[0];
|
|
347
|
-
if (!target ||
|
|
349
|
+
if (!target || isSpreadElement(target)) return;
|
|
348
350
|
if (!isRedirectTainted(target) || checkedByValidator(node)) return;
|
|
349
351
|
findings.push(name === "navigateTo" ? unsafeRedirect(target, "navigation", "safeRedirectTarget", "@warlock.js/web") : unsafeRedirect(target, "redirect", "safeRedirect", "@warlock.js/core"));
|
|
350
352
|
return;
|
|
351
353
|
}
|
|
352
|
-
if (!
|
|
353
|
-
if (node
|
|
354
|
-
const element = node
|
|
355
|
-
if (!
|
|
356
|
-
if (
|
|
357
|
-
const initializer = node.
|
|
358
|
-
if (!initializer || !
|
|
354
|
+
if (!isJsxAttribute(node) || nameNode(node).type !== "JSXIdentifier") return;
|
|
355
|
+
if (valueText(nameNode(node)) !== "to" && valueText(nameNode(node)) !== "href") return;
|
|
356
|
+
const element = parentOf(node);
|
|
357
|
+
if (!element || !isJsxOpeningElement(element) && !isJsxSelfClosingElement(element)) return;
|
|
358
|
+
if (element.name.type !== "JSXIdentifier" || !LINK_COMPONENTS.has(element.name.name)) return;
|
|
359
|
+
const initializer = node.value;
|
|
360
|
+
if (!initializer || !isJsxExpression(initializer) || !initializer.expression) return;
|
|
359
361
|
const expression = initializer.expression;
|
|
360
362
|
if (!isRedirectTainted(expression) || checkedByValidator(expression)) return;
|
|
361
363
|
findings.push(unsafeRedirect(expression, "link", "safeRedirectTarget", "@warlock.js/web"));
|
|
362
364
|
}
|
|
363
|
-
const LOGGER_NAMES = new Set([
|
|
365
|
+
const LOGGER_NAMES = /* @__PURE__ */ new Set([
|
|
364
366
|
"log",
|
|
365
367
|
"logger",
|
|
366
368
|
"console"
|
|
367
369
|
]);
|
|
368
|
-
const LOG_METHODS = new Set([
|
|
370
|
+
const LOG_METHODS = /* @__PURE__ */ new Set([
|
|
369
371
|
"info",
|
|
370
372
|
"warn",
|
|
371
373
|
"error",
|
|
@@ -377,7 +379,7 @@ const LOG_METHODS = new Set([
|
|
|
377
379
|
"trace"
|
|
378
380
|
]);
|
|
379
381
|
/** Helpers that make a value safe to log; their arguments are not inspected. */
|
|
380
|
-
const REDACTORS = new Set([
|
|
382
|
+
const REDACTORS = /* @__PURE__ */ new Set([
|
|
381
383
|
"maskEmail",
|
|
382
384
|
"maskEmailsInText",
|
|
383
385
|
"redact",
|
|
@@ -427,8 +429,8 @@ function describeMember(member) {
|
|
|
427
429
|
}
|
|
428
430
|
/** `request.all()` / `request.body` itself, not `request.body.title`. */
|
|
429
431
|
function isWholeAccess(node, member) {
|
|
430
|
-
if (
|
|
431
|
-
const callee = unwrap(node
|
|
432
|
+
if (isCallExpression(node)) {
|
|
433
|
+
const callee = unwrap(expressionOf(node));
|
|
432
434
|
return isMemberAccess(callee) && memberName(callee) === member;
|
|
433
435
|
}
|
|
434
436
|
return isMemberAccess(node) && memberName(node) === member;
|
|
@@ -436,11 +438,11 @@ function isWholeAccess(node, member) {
|
|
|
436
438
|
function inspectLogged(node, censoredKey, found) {
|
|
437
439
|
const value = unwrap(node);
|
|
438
440
|
if (isFunctionLike(value)) return;
|
|
439
|
-
if (
|
|
441
|
+
if (isCallExpression(value)) {
|
|
440
442
|
const name = calleeName(value);
|
|
441
443
|
if (name !== void 0 && REDACTORS.has(name)) return;
|
|
442
444
|
}
|
|
443
|
-
if (
|
|
445
|
+
if (isCallExpression(value) || isMemberAccess(value)) {
|
|
444
446
|
const member = requestMemberAccess(value);
|
|
445
447
|
if (member !== void 0 && isWholeAccess(value, member)) {
|
|
446
448
|
if (REQUEST_BODY_MEMBERS.has(member)) {
|
|
@@ -458,7 +460,7 @@ function inspectLogged(node, censoredKey, found) {
|
|
|
458
460
|
return;
|
|
459
461
|
}
|
|
460
462
|
}
|
|
461
|
-
if (
|
|
463
|
+
if (isCallExpression(value) && member !== void 0) {
|
|
462
464
|
const key = literalString(value.arguments[0]);
|
|
463
465
|
const category = key ? sensitiveCategory(key) : void 0;
|
|
464
466
|
if (category && !(censoredKey && category === "secret")) {
|
|
@@ -470,8 +472,8 @@ function inspectLogged(node, censoredKey, found) {
|
|
|
470
472
|
}
|
|
471
473
|
}
|
|
472
474
|
}
|
|
473
|
-
if (
|
|
474
|
-
const name =
|
|
475
|
+
if (isIdentifier(value) || isMemberAccess(value)) {
|
|
476
|
+
const name = isIdentifier(value) ? valueText(value) : memberName(value);
|
|
475
477
|
const category = name ? sensitiveCategory(name) : void 0;
|
|
476
478
|
if (category && !(censoredKey && category === "secret")) {
|
|
477
479
|
found.push({
|
|
@@ -481,59 +483,59 @@ function inspectLogged(node, censoredKey, found) {
|
|
|
481
483
|
return;
|
|
482
484
|
}
|
|
483
485
|
if (isMemberAccess(value) && requestMemberAccess(value) === void 0) {
|
|
484
|
-
inspectLogged(value
|
|
485
|
-
if (
|
|
486
|
+
inspectLogged(expressionOf(value), false, found);
|
|
487
|
+
if (isElementAccessExpression(value)) inspectLogged(value.property, false, found);
|
|
486
488
|
}
|
|
487
489
|
return;
|
|
488
490
|
}
|
|
489
|
-
if (
|
|
490
|
-
for (const property of value.properties) if (
|
|
491
|
-
else if (
|
|
492
|
-
const key = keyName(property.
|
|
493
|
-
inspectLogged(property.
|
|
494
|
-
} else if (
|
|
491
|
+
if (isObjectLiteralExpression(value)) {
|
|
492
|
+
for (const property of value.properties) if (isSpreadAssignment(property)) inspectLogged(expressionOf(property), false, found);
|
|
493
|
+
else if (isPropertyAssignment(property)) {
|
|
494
|
+
const key = keyName(property.key);
|
|
495
|
+
inspectLogged(property.value, key !== void 0 && isCensoredKey(key), found);
|
|
496
|
+
} else if (isShorthandPropertyAssignment(property)) inspectLogged(property.key, isCensoredKey(valueText(property.key)), found);
|
|
495
497
|
return;
|
|
496
498
|
}
|
|
497
|
-
if (
|
|
498
|
-
for (const
|
|
499
|
+
if (isTemplateExpression(value)) {
|
|
500
|
+
for (const expression of value.expressions) inspectLogged(expression, false, found);
|
|
499
501
|
return;
|
|
500
502
|
}
|
|
501
|
-
if (
|
|
503
|
+
if (isBinaryExpression(value)) {
|
|
502
504
|
inspectLogged(value.left, false, found);
|
|
503
505
|
inspectLogged(value.right, false, found);
|
|
504
506
|
return;
|
|
505
507
|
}
|
|
506
|
-
if (
|
|
507
|
-
inspectLogged(value.
|
|
508
|
-
inspectLogged(value.
|
|
508
|
+
if (isConditionalExpression(value)) {
|
|
509
|
+
inspectLogged(value.consequent, censoredKey, found);
|
|
510
|
+
inspectLogged(value.alternate, censoredKey, found);
|
|
509
511
|
return;
|
|
510
512
|
}
|
|
511
|
-
if (
|
|
513
|
+
if (isArrayLiteralExpression(value)) {
|
|
512
514
|
for (const element of value.elements) {
|
|
513
|
-
if (
|
|
514
|
-
inspectLogged(
|
|
515
|
+
if (isOmittedExpression(element)) continue;
|
|
516
|
+
inspectLogged(isSpreadElement(element) ? expressionOf(element) : element, false, found);
|
|
515
517
|
}
|
|
516
518
|
return;
|
|
517
519
|
}
|
|
518
|
-
if (
|
|
519
|
-
const callee = unwrap(value
|
|
520
|
-
if (isMemberAccess(callee)) inspectLogged(callee
|
|
521
|
-
for (const argument of value.arguments) inspectLogged(
|
|
520
|
+
if (isCallExpression(value)) {
|
|
521
|
+
const callee = unwrap(expressionOf(value));
|
|
522
|
+
if (isMemberAccess(callee)) inspectLogged(expressionOf(callee), false, found);
|
|
523
|
+
for (const argument of value.arguments) inspectLogged(isSpreadElement(argument) ? expressionOf(argument) : argument, false, found);
|
|
522
524
|
return;
|
|
523
525
|
}
|
|
524
|
-
if (
|
|
526
|
+
if (isAwaitExpression(value)) inspectLogged(expressionOf(value), censoredKey, found);
|
|
525
527
|
}
|
|
526
528
|
function checkSensitiveLog(node, findings) {
|
|
527
|
-
if (!
|
|
528
|
-
const callee = unwrap(node
|
|
529
|
+
if (!isCallExpression(node)) return;
|
|
530
|
+
const callee = unwrap(expressionOf(node));
|
|
529
531
|
if (!isMemberAccess(callee)) return;
|
|
530
532
|
const method = memberName(callee);
|
|
531
533
|
if (!method || !LOG_METHODS.has(method)) return;
|
|
532
|
-
const owner = unwrap(callee
|
|
533
|
-
if (!
|
|
534
|
-
if (!(LOGGER_NAMES.has(owner
|
|
534
|
+
const owner = unwrap(expressionOf(callee));
|
|
535
|
+
if (!isIdentifier(owner)) return;
|
|
536
|
+
if (!(LOGGER_NAMES.has(valueText(owner)) || REQUEST_NAMES.has(valueText(owner)) && method === "log")) return;
|
|
535
537
|
const found = [];
|
|
536
|
-
for (const argument of node.arguments) inspectLogged(
|
|
538
|
+
for (const argument of node.arguments) inspectLogged(isSpreadElement(argument) ? expressionOf(argument) : argument, false, found);
|
|
537
539
|
for (const finding of found) findings.push({
|
|
538
540
|
code: "WL9008",
|
|
539
541
|
node: finding.node,
|
|
@@ -541,9 +543,9 @@ function checkSensitiveLog(node, findings) {
|
|
|
541
543
|
});
|
|
542
544
|
}
|
|
543
545
|
/** `regex.test(input)` / `regex.exec(input)`. */
|
|
544
|
-
const REGEX_METHODS = new Set(["test", "exec"]);
|
|
546
|
+
const REGEX_METHODS = /* @__PURE__ */ new Set(["test", "exec"]);
|
|
545
547
|
/** `input.match(regex)` and friends: the regex is the first argument. */
|
|
546
|
-
const STRING_METHODS = new Set([
|
|
548
|
+
const STRING_METHODS = /* @__PURE__ */ new Set([
|
|
547
549
|
"match",
|
|
548
550
|
"matchAll",
|
|
549
551
|
"replace",
|
|
@@ -583,29 +585,29 @@ function findUnboundedQuantifier(source) {
|
|
|
583
585
|
function regexSource(node, depth = 0) {
|
|
584
586
|
if (!node || depth > 8) return void 0;
|
|
585
587
|
const value = unwrap(node);
|
|
586
|
-
if (
|
|
587
|
-
if ((
|
|
588
|
-
if (
|
|
588
|
+
if (isRegularExpressionLiteral(value)) return valueText(value).slice(1, valueText(value).lastIndexOf("/"));
|
|
589
|
+
if ((isNewExpression(value) || isCallExpression(value)) && isIdentifier(expressionOf(value)) && valueText(expressionOf(value)) === "RegExp") return literalString(value.arguments?.[0]);
|
|
590
|
+
if (isIdentifier(value)) {
|
|
589
591
|
const initializer = resolveInitializer(value);
|
|
590
592
|
return initializer ? regexSource(initializer, depth + 1) : void 0;
|
|
591
593
|
}
|
|
592
594
|
}
|
|
593
595
|
function checkUnboundedRegex(node, findings) {
|
|
594
|
-
if (!
|
|
595
|
-
const callee = unwrap(node
|
|
596
|
+
if (!isCallExpression(node)) return;
|
|
597
|
+
const callee = unwrap(expressionOf(node));
|
|
596
598
|
if (!isMemberAccess(callee)) return;
|
|
597
599
|
const method = memberName(callee);
|
|
598
600
|
if (!method) return;
|
|
599
601
|
const first = node.arguments[0];
|
|
600
|
-
const firstArgument = first && !
|
|
602
|
+
const firstArgument = first && !isSpreadElement(first) ? first : void 0;
|
|
601
603
|
let regex;
|
|
602
604
|
let input;
|
|
603
605
|
if (REGEX_METHODS.has(method)) {
|
|
604
|
-
regex = callee
|
|
606
|
+
regex = expressionOf(callee);
|
|
605
607
|
input = firstArgument;
|
|
606
608
|
} else if (STRING_METHODS.has(method)) {
|
|
607
609
|
regex = firstArgument;
|
|
608
|
-
input = callee
|
|
610
|
+
input = expressionOf(callee);
|
|
609
611
|
} else return;
|
|
610
612
|
if (!input) return;
|
|
611
613
|
const source = regexSource(regex);
|
|
@@ -644,5 +646,5 @@ function securityFindings(sourceFile) {
|
|
|
644
646
|
}
|
|
645
647
|
|
|
646
648
|
//#endregion
|
|
647
|
-
export { securityFindings };
|
|
649
|
+
export { findUnboundedQuantifier, securityFindings };
|
|
648
650
|
//# sourceMappingURL=security-conventions.mjs.map
|