@warlock.js/core 5.30.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 +165 -36
- package/README.md +28 -23
- package/bin/source-load-hook.mjs +63 -0
- package/bin/warlock.js +102 -42
- 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/add.command.mjs +4 -2
- package/esm/cli/commands/add.command.mjs.map +1 -1
- package/esm/cli/commands/agents-md/agents-md-command.action.mjs +70 -0
- package/esm/cli/commands/agents-md/agents-md-command.action.mjs.map +1 -0
- package/esm/cli/commands/agents-md.command.mjs +38 -0
- package/esm/cli/commands/agents-md.command.mjs.map +1 -0
- package/esm/cli/commands/board/board-command.action.mjs +279 -0
- package/esm/cli/commands/board/board-command.action.mjs.map +1 -0
- package/esm/cli/commands/board.command.mjs +78 -0
- package/esm/cli/commands/board.command.mjs.map +1 -0
- package/esm/cli/commands/build.command.mjs +6 -1
- package/esm/cli/commands/build.command.mjs.map +1 -1
- package/esm/cli/commands/check/check-command.action.mjs +57 -0
- package/esm/cli/commands/check/check-command.action.mjs.map +1 -0
- package/esm/cli/commands/check/child-typecheck.mjs +66 -0
- package/esm/cli/commands/check/child-typecheck.mjs.map +1 -0
- package/esm/cli/commands/check/format-problems.mjs +43 -0
- package/esm/cli/commands/check/format-problems.mjs.map +1 -0
- package/esm/cli/commands/check/typecheck-command.action.mjs +61 -0
- package/esm/cli/commands/check/typecheck-command.action.mjs.map +1 -0
- package/esm/cli/commands/check.command.mjs +50 -0
- package/esm/cli/commands/check.command.mjs.map +1 -0
- package/esm/cli/commands/dev-server.command.mjs +12 -3
- package/esm/cli/commands/dev-server.command.mjs.map +1 -1
- package/esm/cli/commands/doctor/boot-for-diagnostics.mjs +8 -3
- package/esm/cli/commands/doctor/boot-for-diagnostics.mjs.map +1 -1
- package/esm/cli/commands/doctor/check.types.d.mts +89 -0
- package/esm/cli/commands/doctor/check.types.d.mts.map +1 -0
- package/esm/cli/commands/doctor/checks/config.check.mjs +1 -0
- package/esm/cli/commands/doctor/checks/config.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/connectors.check.mjs +2 -0
- package/esm/cli/commands/doctor/checks/connectors.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/handler-signature.check.mjs +1 -0
- package/esm/cli/commands/doctor/checks/handler-signature.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/health.check.mjs +3 -0
- package/esm/cli/commands/doctor/checks/health.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/jwt-secret.check.mjs +1 -0
- package/esm/cli/commands/doctor/checks/jwt-secret.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/locales-ts-deprecated.check.mjs +23 -27
- package/esm/cli/commands/doctor/checks/locales-ts-deprecated.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/optional-peers.check.mjs +1 -0
- package/esm/cli/commands/doctor/checks/optional-peers.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/release-hygiene.check.mjs +4 -0
- package/esm/cli/commands/doctor/checks/release-hygiene.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/routes.check.mjs +3 -0
- package/esm/cli/commands/doctor/checks/routes.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/doctor-command.action.mjs +15 -6
- package/esm/cli/commands/doctor/doctor-command.action.mjs.map +1 -1
- package/esm/cli/commands/doctor/format-report.mjs +30 -2
- package/esm/cli/commands/doctor/format-report.mjs.map +1 -1
- package/esm/cli/commands/doctor.command.mjs +4 -0
- package/esm/cli/commands/doctor.command.mjs.map +1 -1
- package/esm/cli/commands/explain/explain-command.action.mjs +64 -0
- package/esm/cli/commands/explain/explain-command.action.mjs.map +1 -0
- package/esm/cli/commands/explain.command.mjs +23 -0
- package/esm/cli/commands/explain.command.mjs.map +1 -0
- package/esm/cli/commands/generate/generate.command.mjs +124 -124
- package/esm/cli/commands/generate/generate.command.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/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 +313 -0
- package/esm/cli/commands/generate/generators/endpoint.generator.mjs.map +1 -0
- package/esm/cli/commands/generate/generators/migration.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/migration.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/model.generator.mjs +4 -3
- 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 +341 -0
- package/esm/cli/commands/generate/templates/endpoint-stubs.mjs.map +1 -0
- package/esm/cli/commands/generate/templates/stubs.mjs +19 -6
- package/esm/cli/commands/generate/templates/stubs.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/endpoint-schema.mjs +136 -0
- package/esm/cli/commands/generate/utils/endpoint-schema.mjs.map +1 -0
- package/esm/cli/commands/generate/utils/name-parser.mjs +2 -2
- package/esm/cli/commands/generate/utils/name-parser.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/path-resolver.mjs +1 -1
- package/esm/cli/commands/generate/utils/prompt.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/writer.mjs +38 -13
- package/esm/cli/commands/generate/utils/writer.mjs.map +1 -1
- package/esm/cli/commands/inspect/inspect-command.action.mjs +73 -0
- package/esm/cli/commands/inspect/inspect-command.action.mjs.map +1 -0
- package/esm/cli/commands/inspect.command.mjs +39 -0
- package/esm/cli/commands/inspect.command.mjs.map +1 -0
- package/esm/cli/commands/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 +104 -0
- package/esm/cli/commands/mcp/mcp-command.action.mjs.map +1 -0
- package/esm/cli/commands/mcp.command.mjs +76 -0
- package/esm/cli/commands/mcp.command.mjs.map +1 -0
- package/esm/cli/commands/openapi-generator.action.mjs +1 -1
- package/esm/cli/commands/openapi-generator.action.mjs.map +1 -1
- package/esm/cli/commands/openapi-generator.command.mjs.map +1 -1
- package/esm/cli/commands/postman-generator.action.mjs +1 -1
- package/esm/cli/commands/postman-generator.action.mjs.map +1 -1
- package/esm/cli/commands/postman-generator.command.mjs.map +1 -1
- package/esm/cli/commands/routes/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 +3 -3
- package/esm/cli/commands/routes/routes-diff.action.mjs.map +1 -1
- package/esm/cli/commands/test.command.mjs +131 -0
- package/esm/cli/commands/test.command.mjs.map +1 -0
- package/esm/cli/commands/trace/trace-command.action.mjs +145 -0
- package/esm/cli/commands/trace/trace-command.action.mjs.map +1 -0
- package/esm/cli/commands/trace.command.mjs +60 -0
- package/esm/cli/commands/trace.command.mjs.map +1 -0
- package/esm/cli/commands/typecheck.command.mjs +40 -0
- package/esm/cli/commands/typecheck.command.mjs.map +1 -0
- package/esm/cli/commands/upgrade.command.mjs +46 -0
- package/esm/cli/commands/upgrade.command.mjs.map +1 -0
- package/esm/cli/commands-loader.mjs +1 -1
- package/esm/cli/flush-and-exit.mjs +34 -0
- package/esm/cli/flush-and-exit.mjs.map +1 -0
- package/esm/cli/framework-cli-commands.mjs +25 -1
- package/esm/cli/framework-cli-commands.mjs.map +1 -1
- package/esm/cli/parse-cli-args.mjs +3 -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 +35 -14
- package/esm/config/config-loader.mjs.map +1 -1
- package/esm/config/config-manager.mjs +1 -1
- package/esm/config/config-schema.d.mts +70 -0
- package/esm/config/config-schema.d.mts.map +1 -0
- package/esm/config/config-schema.mjs +77 -0
- package/esm/config/config-schema.mjs.map +1 -0
- package/esm/config/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 +7 -0
- package/esm/config/index.mjs +2 -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-no-reserved-connector-names.mjs +2 -1
- package/esm/connectors/assert-no-reserved-connector-names.mjs.map +1 -1
- package/esm/connectors/assert-unique-connector-names.d.mts +1 -3
- package/esm/connectors/assert-unique-connector-names.d.mts.map +1 -1
- package/esm/connectors/assert-unique-connector-names.mjs +26 -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 +11 -9
- 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/single-server-warnings.mjs.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/container/index.mjs.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/migrate-action.mjs.map +1 -1
- package/esm/database/models/database-log/database-log.d.mts +2 -31
- 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 +6 -3
- package/esm/database/seeds/seeder.errors.d.mts.map +1 -1
- package/esm/database/seeds/seeder.errors.mjs +2 -0
- package/esm/database/seeds/seeder.errors.mjs.map +1 -1
- package/esm/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/boot-precondition-error.mjs +1 -0
- package/esm/dev-server/boot-precondition-error.mjs.map +1 -1
- package/esm/dev-server/create-worker.mjs +17 -9
- 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/dev-agent-tooling.mjs +135 -0
- package/esm/dev-server/dev-agent-tooling.mjs.map +1 -0
- package/esm/dev-server/dev-logger.mjs.map +1 -1
- package/esm/dev-server/development-server.mjs +8 -0
- package/esm/dev-server/development-server.mjs.map +1 -1
- package/esm/dev-server/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-orchestrator.mjs +4 -5
- package/esm/dev-server/files-orchestrator.mjs.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 +2 -3
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.mjs.map +1 -1
- package/esm/dev-server/health-checker/checkers/oxlint-health-checker.mjs +33 -0
- package/esm/dev-server/health-checker/checkers/oxlint-health-checker.mjs.map +1 -0
- package/esm/dev-server/health-checker/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 +31 -0
- package/esm/dev-server/health-checker/default-health-checkers.mjs.map +1 -0
- package/esm/dev-server/health-checker/file-health-checker.contract.d.mts +12 -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 +16 -4
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs.map +1 -1
- package/esm/dev-server/health-checker/oxlint-runner.mjs +303 -0
- package/esm/dev-server/health-checker/oxlint-runner.mjs.map +1 -0
- 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 -0
- package/esm/dev-server/health-checker/workers/oxlint-health.worker.mjs +42 -0
- package/esm/dev-server/health-checker/workers/oxlint-health.worker.mjs.map +1 -0
- package/esm/dev-server/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/loader-port-acks.mjs +1 -1
- package/esm/dev-server/loader/loader-port-acks.mjs.map +1 -1
- package/esm/dev-server/loader/own-resolver.mjs +1 -1
- package/esm/dev-server/loader/register-loader.mjs +4 -3
- 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 +3 -2
- package/esm/dev-server/loader/resolve-hook.mjs.map +1 -1
- package/esm/dev-server/loader/transpile-cache.mjs +3 -2
- 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 +3 -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 +7 -39
- 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/route-types-publisher.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/start-development-server.mjs.map +1 -1
- package/esm/dev-server/supervisor.mjs +1 -1
- package/esm/dev-server/translation-keys-sources.mjs +1 -1
- package/esm/dev-server/translation-keys-sources.mjs.map +1 -1
- package/esm/dev-server/tsconfig-manager.mjs +3 -3
- package/esm/dev-server/tsconfig-manager.mjs.map +1 -1
- package/esm/dev-server/type-generator.mjs +31 -38
- 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/container-key-missing-error.mjs +1 -0
- package/esm/errors/container-key-missing-error.mjs.map +1 -1
- package/esm/errors/error-codes.d.mts +660 -0
- package/esm/errors/error-codes.d.mts.map +1 -0
- package/esm/errors/error-codes.mjs +634 -0
- package/esm/errors/error-codes.mjs.map +1 -0
- package/esm/errors/esbuild-binary-missing-error.mjs +1 -0
- package/esm/errors/esbuild-binary-missing-error.mjs.map +1 -1
- package/esm/errors/index.d.mts +3 -1
- package/esm/errors/index.mjs +3 -1
- package/esm/errors/unknown-locale-error.mjs +1 -0
- package/esm/errors/unknown-locale-error.mjs.map +1 -1
- package/esm/errors/warlock-error.d.mts +21 -0
- package/esm/errors/warlock-error.d.mts.map +1 -0
- package/esm/errors/warlock-error.mjs +22 -0
- package/esm/errors/warlock-error.mjs.map +1 -0
- package/esm/generations/add-command.action.mjs +22 -5
- package/esm/generations/add-command.action.mjs.map +1 -1
- package/esm/generations/features/access.feature.mjs +1 -1
- package/esm/generations/features/access.feature.mjs.map +1 -1
- package/esm/generations/features/bull-board.feature.mjs +3 -2
- package/esm/generations/features/bull-board.feature.mjs.map +1 -1
- package/esm/generations/features/mysql.feature.mjs.map +1 -1
- package/esm/generations/features/notifications.feature.mjs +7 -3
- package/esm/generations/features/notifications.feature.mjs.map +1 -1
- package/esm/generations/features/queue.feature.mjs +1 -1
- package/esm/generations/features/queue.feature.mjs.map +1 -1
- package/esm/generations/features/react-email.feature.mjs +1 -1
- package/esm/generations/features/react-email.feature.mjs.map +1 -1
- package/esm/generations/features/shadcn.feature.mjs +1 -1
- package/esm/generations/features/shadcn.feature.mjs.map +1 -1
- package/esm/generations/features/shared/link-ai-package-import.mjs +1 -1
- package/esm/generations/features/shared/link-ai-package-import.mjs.map +1 -1
- package/esm/generations/features/shared/merge-web-sitemap-config.mjs +16 -23
- package/esm/generations/features/shared/merge-web-sitemap-config.mjs.map +1 -1
- package/esm/generations/features/shared/patch-tsconfig-include.mjs +2 -2
- package/esm/generations/features/shared/patch-tsconfig-include.mjs.map +1 -1
- package/esm/generations/features/shared/relocate-conflicting-home-route.mjs +2 -2
- package/esm/generations/features/shared/relocate-conflicting-home-route.mjs.map +1 -1
- package/esm/generations/features/sitemap.feature.mjs +3 -2
- package/esm/generations/features/sitemap.feature.mjs.map +1 -1
- package/esm/generations/features/tailwind.feature.mjs +1 -1
- package/esm/generations/features/tailwind.feature.mjs.map +1 -1
- package/esm/generations/features/test.feature.mjs +11 -6
- package/esm/generations/features/test.feature.mjs.map +1 -1
- package/esm/generations/features/web.feature.mjs +1 -1
- package/esm/generations/features/web.feature.mjs.map +1 -1
- package/esm/generations/generation-fs.mjs +73 -0
- package/esm/generations/generation-fs.mjs.map +1 -0
- package/esm/generations/generation-run.mjs +185 -0
- package/esm/generations/generation-run.mjs.map +1 -0
- package/esm/generations/stubs.mjs +156 -14
- 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 +10 -0
- package/esm/http/bounded-stream-queue.d.mts.map +1 -0
- package/esm/http/bounded-stream-queue.mjs +97 -0
- package/esm/http/bounded-stream-queue.mjs.map +1 -0
- package/esm/http/build-cors-options.mjs +2 -2
- package/esm/http/build-cors-options.mjs.map +1 -1
- package/esm/http/build-rate-limit-options.d.mts +15 -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 +87 -0
- package/esm/http/conditional-request.d.mts.map +1 -0
- package/esm/http/conditional-request.mjs +121 -0
- package/esm/http/conditional-request.mjs.map +1 -0
- package/esm/http/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 +12 -12
- package/esm/http/csp.d.mts.map +1 -1
- package/esm/http/csp.mjs +3 -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 +26 -87
- 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 +30 -29
- package/esm/http/errors/errors.d.mts.map +1 -1
- package/esm/http/errors/errors.mjs +1 -0
- package/esm/http/errors/errors.mjs.map +1 -1
- package/esm/http/escape-header-value.d.mts +17 -0
- package/esm/http/escape-header-value.d.mts.map +1 -0
- package/esm/http/escape-header-value.mjs +27 -0
- package/esm/http/escape-header-value.mjs.map +1 -0
- package/esm/http/events.d.mts +2 -4
- package/esm/http/events.d.mts.map +1 -1
- package/esm/http/flush-pending-cookies.mjs.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 +9 -3
- package/esm/http/index.mjs +5 -2
- package/esm/http/lazy-static.mjs +194 -0
- package/esm/http/lazy-static.mjs.map +1 -0
- 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 +17 -14
- 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 +6 -4
- 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 +26 -15
- package/esm/http/request-log-snapshot.d.mts.map +1 -1
- package/esm/http/request-log-snapshot.mjs +85 -6
- package/esm/http/request-log-snapshot.mjs.map +1 -1
- package/esm/http/request.d.mts +6 -5
- package/esm/http/request.d.mts.map +1 -1
- package/esm/http/request.mjs +13 -11
- package/esm/http/request.mjs.map +1 -1
- package/esm/http/response.d.mts +23 -12
- package/esm/http/response.d.mts.map +1 -1
- package/esm/http/response.mjs +169 -81
- package/esm/http/response.mjs.map +1 -1
- package/esm/http/safe-redirect.d.mts +50 -0
- package/esm/http/safe-redirect.d.mts.map +1 -0
- package/esm/http/safe-redirect.mjs +80 -0
- package/esm/http/safe-redirect.mjs.map +1 -0
- package/esm/http/serialized.d.mts +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 +11 -9
- package/esm/http/server.d.mts.map +1 -1
- package/esm/http/server.mjs +17 -7
- 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/stream-transport.mjs +4 -2
- package/esm/http/stream-transport.mjs.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 +78 -39
- 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-variant.mjs +1 -1
- package/esm/http/uploads/generate-image-variants.d.mts +13 -10
- package/esm/http/uploads/generate-image-variants.d.mts.map +1 -1
- package/esm/http/uploads/generate-image-variants.mjs +62 -25
- package/esm/http/uploads/generate-image-variants.mjs.map +1 -1
- package/esm/http/uploads/image-variant-cache-entries.mjs +78 -0
- package/esm/http/uploads/image-variant-cache-entries.mjs.map +1 -0
- package/esm/http/uploads/image-variant-cache.mjs +72 -30
- package/esm/http/uploads/image-variant-cache.mjs.map +1 -1
- package/esm/http/uploads/image-variant-types.d.mts +9 -9
- package/esm/http/uploads/image-variant-types.d.mts.map +1 -1
- package/esm/http/uploads/image-variants-config-error.d.mts +4 -3
- package/esm/http/uploads/image-variants-config-error.d.mts.map +1 -1
- package/esm/http/uploads/image-variants-config-error.mjs +3 -2
- package/esm/http/uploads/image-variants-config-error.mjs.map +1 -1
- package/esm/http/uploads/index.d.mts +2 -1
- package/esm/http/uploads/index.mjs +1 -1
- package/esm/http/uploads/load-variant-source.mjs +1 -1
- package/esm/http/uploads/load-variant-source.mjs.map +1 -1
- package/esm/http/uploads/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 +9 -6
- package/esm/http/uploads/purge-image-variants.d.mts.map +1 -1
- package/esm/http/uploads/purge-image-variants.mjs +16 -16
- package/esm/http/uploads/purge-image-variants.mjs.map +1 -1
- package/esm/http/uploads/remote-variant-source.mjs +115 -0
- package/esm/http/uploads/remote-variant-source.mjs.map +1 -0
- package/esm/http/uploads/resolve-image-variant.d.mts +6 -9
- package/esm/http/uploads/resolve-image-variant.d.mts.map +1 -1
- package/esm/http/uploads/resolve-image-variant.mjs +10 -18
- package/esm/http/uploads/resolve-image-variant.mjs.map +1 -1
- package/esm/http/uploads/resolve-image-variants-config.mjs +7 -5
- 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/resolve-remote-image-variant.mjs +89 -0
- package/esm/http/uploads/resolve-remote-image-variant.mjs.map +1 -0
- package/esm/http/uploads/trim-image-variant-cache.mjs +193 -0
- package/esm/http/uploads/trim-image-variant-cache.mjs.map +1 -0
- package/esm/http/uploads/uploaded-file.controller.d.mts +9 -6
- package/esm/http/uploads/uploaded-file.controller.d.mts.map +1 -1
- package/esm/http/uploads/uploaded-file.controller.mjs +18 -9
- package/esm/http/uploads/uploaded-file.controller.mjs.map +1 -1
- package/esm/http/uploads/variant-cache-key.mjs +2 -2
- 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 +22 -16
- 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 +38 -6
- package/esm/index.mjs +14 -3
- 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 +6 -5
- package/esm/localization/parse-locale-dictionary.d.mts.map +1 -1
- package/esm/localization/parse-locale-dictionary.mjs +2 -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 +21 -12
- package/esm/mail/config.d.mts.map +1 -1
- package/esm/mail/config.mjs +16 -1
- package/esm/mail/config.mjs.map +1 -1
- package/esm/mail/events.d.mts +4 -6
- package/esm/mail/events.d.mts.map +1 -1
- package/esm/mail/index.d.mts +3 -2
- package/esm/mail/index.mjs +2 -2
- 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/net/index.d.mts +2 -0
- package/esm/net/index.mjs +3 -0
- package/esm/openapi/build-openapi-document.d.mts +2 -4
- package/esm/openapi/build-openapi-document.d.mts.map +1 -1
- package/esm/openapi/build-openapi-document.mjs +8 -5
- package/esm/openapi/build-openapi-document.mjs.map +1 -1
- package/esm/openapi/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/error-responses.mjs +28 -2
- package/esm/openapi/error-responses.mjs.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-body.mjs.map +1 -1
- package/esm/openapi/postman/build-request-url.mjs +1 -1
- package/esm/openapi/postman/build-request-url.mjs.map +1 -1
- package/esm/openapi/postman/build-saved-responses.mjs.map +1 -1
- package/esm/openapi/postman/example-from-schema.d.mts +1 -3
- package/esm/openapi/postman/example-from-schema.d.mts.map +1 -1
- package/esm/openapi/postman/example-from-schema.mjs.map +1 -1
- package/esm/openapi/postman/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/openapi-to-postman-collection.mjs.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/schema-refs.mjs.map +1 -1
- package/esm/openapi/postman/uuid-v5.mjs +1 -1
- package/esm/openapi/postman/uuid-v5.mjs.map +1 -1
- package/esm/openapi/request-schemas.mjs.map +1 -1
- package/esm/openapi/response-schemas.mjs.map +1 -1
- package/esm/openapi/schema-registry.d.mts +1 -0
- package/esm/openapi/schema-registry.mjs.map +1 -1
- package/esm/openapi/security.mjs +1 -1
- package/esm/openapi/security.mjs.map +1 -1
- package/esm/openapi/types.d.mts +23 -20
- package/esm/openapi/types.d.mts.map +1 -1
- package/esm/production/assert-generated-imports.mjs +2 -1
- package/esm/production/assert-generated-imports.mjs.map +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 +14 -5
- 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 +2 -1
- package/esm/production/resolve-build-config.mjs.map +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/route-registration-snapshot.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 +11 -31
- package/esm/restful/restful.d.mts.map +1 -1
- package/esm/restful/restful.mjs.map +1 -1
- package/esm/router/build-route-rate-limit.mjs.map +1 -1
- package/esm/router/dev-dispatch.mjs +31 -12
- package/esm/router/dev-dispatch.mjs.map +1 -1
- package/esm/router/index.d.mts +5 -2
- package/esm/router/index.mjs +3 -1
- package/esm/router/log-request-lifecycle.mjs.map +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/positional-handler-diagnostics.mjs.map +1 -1
- package/esm/router/resolve-route-rate-limit.mjs +47 -0
- package/esm/router/resolve-route-rate-limit.mjs.map +1 -0
- package/esm/router/resolve-route-validation.mjs +19 -0
- package/esm/router/resolve-route-validation.mjs.map +1 -0
- package/esm/router/route-builder.d.mts +1 -3
- package/esm/router/route-builder.d.mts.map +1 -1
- package/esm/router/route-guard-names.mjs +30 -0
- package/esm/router/route-guard-names.mjs.map +1 -0
- 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 +12 -0
- package/esm/router/route-name-taken-error.d.mts.map +1 -0
- package/esm/router/route-name-taken-error.mjs +18 -0
- package/esm/router/route-name-taken-error.mjs.map +1 -0
- package/esm/router/route-registry.d.mts +1 -3
- package/esm/router/route-registry.d.mts.map +1 -1
- package/esm/router/router.d.mts +34 -17
- package/esm/router/router.d.mts.map +1 -1
- package/esm/router/router.mjs +74 -39
- package/esm/router/router.mjs.map +1 -1
- package/esm/router/types.d.mts +156 -37
- package/esm/router/types.d.mts.map +1 -1
- package/esm/router/unguarded-route-diagnostics.d.mts +38 -0
- package/esm/router/unguarded-route-diagnostics.d.mts.map +1 -0
- package/esm/router/unguarded-route-diagnostics.mjs +95 -0
- package/esm/router/unguarded-route-diagnostics.mjs.map +1 -0
- package/esm/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 +24 -0
- package/esm/storage/local-disk-roots.mjs.map +1 -0
- 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 +17 -4
- package/esm/storage/storage.d.mts.map +1 -1
- package/esm/storage/storage.mjs +22 -0
- package/esm/storage/storage.mjs.map +1 -1
- package/esm/storage/types.d.mts +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 +3 -2
- package/esm/storage/utils/storage-not-initialized-error.d.mts.map +1 -1
- package/esm/storage/utils/storage-not-initialized-error.mjs +1 -0
- package/esm/storage/utils/storage-not-initialized-error.mjs.map +1 -1
- package/esm/tests/authenticated-test-client.d.mts +31 -0
- package/esm/tests/authenticated-test-client.d.mts.map +1 -0
- package/esm/tests/authenticated-test-client.mjs +40 -0
- package/esm/tests/authenticated-test-client.mjs.map +1 -0
- package/esm/tests/factories.d.mts +74 -0
- package/esm/tests/factories.d.mts.map +1 -0
- package/esm/tests/factories.mjs +105 -0
- package/esm/tests/factories.mjs.map +1 -0
- package/esm/tests/fakes/cache-fake.d.mts +34 -0
- package/esm/tests/fakes/cache-fake.d.mts.map +1 -0
- package/esm/tests/fakes/cache-fake.mjs +79 -0
- package/esm/tests/fakes/cache-fake.mjs.map +1 -0
- package/esm/tests/fakes/clock-fake.d.mts +37 -0
- package/esm/tests/fakes/clock-fake.d.mts.map +1 -0
- package/esm/tests/fakes/clock-fake.mjs +69 -0
- package/esm/tests/fakes/clock-fake.mjs.map +1 -0
- package/esm/tests/fakes/fake-assertion-error.d.mts +12 -0
- package/esm/tests/fakes/fake-assertion-error.d.mts.map +1 -0
- package/esm/tests/fakes/fake-assertion-error.mjs +20 -0
- package/esm/tests/fakes/fake-assertion-error.mjs.map +1 -0
- package/esm/tests/fakes/ids-fake.d.mts +23 -0
- package/esm/tests/fakes/ids-fake.d.mts.map +1 -0
- package/esm/tests/fakes/ids-fake.mjs +57 -0
- package/esm/tests/fakes/ids-fake.mjs.map +1 -0
- package/esm/tests/fakes/index.d.mts +9 -0
- package/esm/tests/fakes/index.mjs +10 -0
- package/esm/tests/fakes/mail-fake.d.mts +49 -0
- package/esm/tests/fakes/mail-fake.d.mts.map +1 -0
- package/esm/tests/fakes/mail-fake.mjs +111 -0
- package/esm/tests/fakes/mail-fake.mjs.map +1 -0
- package/esm/tests/fakes/queue-fake.d.mts +56 -0
- package/esm/tests/fakes/queue-fake.d.mts.map +1 -0
- package/esm/tests/fakes/queue-fake.mjs +134 -0
- package/esm/tests/fakes/queue-fake.mjs.map +1 -0
- package/esm/tests/fakes/storage-fake.d.mts +35 -0
- package/esm/tests/fakes/storage-fake.d.mts.map +1 -0
- package/esm/tests/fakes/storage-fake.mjs +122 -0
- package/esm/tests/fakes/storage-fake.mjs.map +1 -0
- package/esm/tests/fakes/test-fakes.d.mts +38 -0
- package/esm/tests/fakes/test-fakes.d.mts.map +1 -0
- package/esm/tests/fakes/test-fakes.mjs +90 -0
- package/esm/tests/fakes/test-fakes.mjs.map +1 -0
- package/esm/tests/index.d.mts +15 -2
- package/esm/tests/index.mjs +15 -2
- package/esm/tests/snapshot-response.d.mts +33 -0
- package/esm/tests/snapshot-response.d.mts.map +1 -0
- package/esm/tests/snapshot-response.mjs +42 -0
- package/esm/tests/snapshot-response.mjs.map +1 -0
- package/esm/tests/start-http-development-server.d.mts +25 -5
- package/esm/tests/start-http-development-server.d.mts.map +1 -1
- package/esm/tests/start-http-development-server.mjs +41 -8
- 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 +28 -10
- package/esm/tests/test-helpers.d.mts.map +1 -1
- package/esm/tests/test-helpers.mjs +40 -27
- package/esm/tests/test-helpers.mjs.map +1 -1
- package/esm/tests/test-http-server.d.mts +66 -0
- package/esm/tests/test-http-server.d.mts.map +1 -0
- package/esm/tests/test-http-server.mjs +119 -0
- package/esm/tests/test-http-server.mjs.map +1 -0
- package/esm/tests/test-lifecycle-state.mjs +1 -1
- package/esm/tests/vitest-setup.d.mts +17 -7
- package/esm/tests/vitest-setup.d.mts.map +1 -1
- package/esm/tests/vitest-setup.mjs +12 -4
- package/esm/tests/vitest-setup.mjs.map +1 -1
- package/esm/tooling/agents-md/agents-md-markers.d.mts +26 -0
- package/esm/tooling/agents-md/agents-md-markers.d.mts.map +1 -0
- package/esm/tooling/agents-md/agents-md-markers.mjs +60 -0
- package/esm/tooling/agents-md/agents-md-markers.mjs.map +1 -0
- package/esm/tooling/agents-md/agents-md-refresher.d.mts +43 -0
- package/esm/tooling/agents-md/agents-md-refresher.d.mts.map +1 -0
- package/esm/tooling/agents-md/agents-md-refresher.mjs +72 -0
- package/esm/tooling/agents-md/agents-md-refresher.mjs.map +1 -0
- package/esm/tooling/agents-md/index.mjs +7 -0
- package/esm/tooling/agents-md/installed-skills.d.mts +34 -0
- package/esm/tooling/agents-md/installed-skills.d.mts.map +1 -0
- package/esm/tooling/agents-md/installed-skills.mjs +74 -0
- package/esm/tooling/agents-md/installed-skills.mjs.map +1 -0
- package/esm/tooling/agents-md/render-agents-md.d.mts +34 -0
- package/esm/tooling/agents-md/render-agents-md.d.mts.map +1 -0
- package/esm/tooling/agents-md/render-agents-md.mjs +195 -0
- package/esm/tooling/agents-md/render-agents-md.mjs.map +1 -0
- package/esm/tooling/agents-md/write-agents-md.d.mts +38 -0
- package/esm/tooling/agents-md/write-agents-md.d.mts.map +1 -0
- package/esm/tooling/agents-md/write-agents-md.mjs +49 -0
- package/esm/tooling/agents-md/write-agents-md.mjs.map +1 -0
- package/esm/tooling/board/board-message.d.mts +29 -0
- package/esm/tooling/board/board-message.d.mts.map +1 -0
- package/esm/tooling/board/board-message.mjs +86 -0
- package/esm/tooling/board/board-message.mjs.map +1 -0
- package/esm/tooling/board/board.d.mts +121 -0
- package/esm/tooling/board/board.d.mts.map +1 -0
- package/esm/tooling/board/board.mjs +407 -0
- package/esm/tooling/board/board.mjs.map +1 -0
- package/esm/tooling/board/board.types.d.mts +81 -0
- package/esm/tooling/board/board.types.d.mts.map +1 -0
- package/esm/tooling/board/board.types.mjs +54 -0
- package/esm/tooling/board/board.types.mjs.map +1 -0
- package/esm/tooling/check/changed-files.d.mts +31 -0
- package/esm/tooling/check/changed-files.d.mts.map +1 -0
- package/esm/tooling/check/changed-files.mjs +73 -0
- package/esm/tooling/check/changed-files.mjs.map +1 -0
- package/esm/tooling/check/check-report.types.d.mts +67 -0
- package/esm/tooling/check/check-report.types.d.mts.map +1 -0
- package/esm/tooling/check/check-report.types.mjs +37 -0
- package/esm/tooling/check/check-report.types.mjs.map +1 -0
- package/esm/tooling/check/code-style-conventions.mjs +106 -0
- package/esm/tooling/check/code-style-conventions.mjs.map +1 -0
- package/esm/tooling/check/conventions-step.d.mts +32 -0
- package/esm/tooling/check/conventions-step.d.mts.map +1 -0
- package/esm/tooling/check/conventions-step.mjs +173 -0
- package/esm/tooling/check/conventions-step.mjs.map +1 -0
- package/esm/tooling/check/environment-step.d.mts +16 -0
- package/esm/tooling/check/environment-step.d.mts.map +1 -0
- package/esm/tooling/check/environment-step.mjs +78 -0
- package/esm/tooling/check/environment-step.mjs.map +1 -0
- package/esm/tooling/check/index.mjs +10 -0
- package/esm/tooling/check/lint-step.d.mts +18 -0
- package/esm/tooling/check/lint-step.d.mts.map +1 -0
- package/esm/tooling/check/lint-step.mjs +112 -0
- package/esm/tooling/check/lint-step.mjs.map +1 -0
- package/esm/tooling/check/request-input.mjs +132 -0
- package/esm/tooling/check/request-input.mjs.map +1 -0
- package/esm/tooling/check/run-check.d.mts +43 -0
- package/esm/tooling/check/run-check.d.mts.map +1 -0
- package/esm/tooling/check/run-check.mjs +192 -0
- package/esm/tooling/check/run-check.mjs.map +1 -0
- package/esm/tooling/check/run-tests.d.mts +55 -0
- package/esm/tooling/check/run-tests.d.mts.map +1 -0
- package/esm/tooling/check/run-tests.mjs +93 -0
- package/esm/tooling/check/run-tests.mjs.map +1 -0
- package/esm/tooling/check/security-conventions.mjs +650 -0
- package/esm/tooling/check/security-conventions.mjs.map +1 -0
- package/esm/tooling/check/source-ast.mjs +155 -0
- package/esm/tooling/check/source-ast.mjs.map +1 -0
- package/esm/tooling/check/source-files.mjs +27 -0
- package/esm/tooling/check/source-files.mjs.map +1 -0
- package/esm/tooling/check/tests-step.d.mts +33 -0
- package/esm/tooling/check/tests-step.d.mts.map +1 -0
- package/esm/tooling/check/tests-step.mjs +177 -0
- package/esm/tooling/check/tests-step.mjs.map +1 -0
- package/esm/tooling/dev-state/dev-server-state.d.mts +43 -0
- package/esm/tooling/dev-state/dev-server-state.d.mts.map +1 -0
- package/esm/tooling/dev-state/dev-server-state.mjs +67 -0
- package/esm/tooling/dev-state/dev-server-state.mjs.map +1 -0
- package/esm/tooling/devtools/devtools-client.d.mts +100 -0
- package/esm/tooling/devtools/devtools-client.d.mts.map +1 -0
- package/esm/tooling/devtools/devtools-client.mjs +155 -0
- package/esm/tooling/devtools/devtools-client.mjs.map +1 -0
- package/esm/tooling/generate/generation.d.mts +90 -0
- package/esm/tooling/generate/generation.d.mts.map +1 -0
- package/esm/tooling/generate/generation.mjs +127 -0
- package/esm/tooling/generate/generation.mjs.map +1 -0
- package/esm/tooling/generate/generator-spec.d.mts +57 -0
- package/esm/tooling/generate/generator-spec.d.mts.map +1 -0
- package/esm/tooling/generate/generator-spec.mjs +102 -0
- package/esm/tooling/generate/generator-spec.mjs.map +1 -0
- package/esm/tooling/generate/index.mjs +6 -0
- package/esm/tooling/generate/project-files.mjs +121 -0
- package/esm/tooling/generate/project-files.mjs.map +1 -0
- package/esm/tooling/generate/run-cli.d.mts +43 -0
- package/esm/tooling/generate/run-cli.d.mts.map +1 -0
- package/esm/tooling/generate/run-cli.mjs +93 -0
- package/esm/tooling/generate/run-cli.mjs.map +1 -0
- package/esm/tooling/generate/unified-diff.d.mts +40 -0
- package/esm/tooling/generate/unified-diff.d.mts.map +1 -0
- package/esm/tooling/generate/unified-diff.mjs +161 -0
- package/esm/tooling/generate/unified-diff.mjs.map +1 -0
- package/esm/tooling/index.d.mts +42 -0
- package/esm/tooling/index.mjs +45 -0
- package/esm/tooling/inspect/boot-for-inspect.d.mts +23 -0
- package/esm/tooling/inspect/boot-for-inspect.d.mts.map +1 -0
- package/esm/tooling/inspect/boot-for-inspect.mjs +63 -0
- package/esm/tooling/inspect/boot-for-inspect.mjs.map +1 -0
- package/esm/tooling/inspect/collect-config.mjs +77 -0
- package/esm/tooling/inspect/collect-config.mjs.map +1 -0
- package/esm/tooling/inspect/collect-models.d.mts +10 -0
- package/esm/tooling/inspect/collect-models.d.mts.map +1 -0
- package/esm/tooling/inspect/collect-models.mjs +154 -0
- package/esm/tooling/inspect/collect-models.mjs.map +1 -0
- package/esm/tooling/inspect/collect-packages.d.mts +9 -0
- package/esm/tooling/inspect/collect-packages.d.mts.map +1 -0
- package/esm/tooling/inspect/collect-packages.mjs +157 -0
- package/esm/tooling/inspect/collect-packages.mjs.map +1 -0
- package/esm/tooling/inspect/collect-pages.mjs +108 -0
- package/esm/tooling/inspect/collect-pages.mjs.map +1 -0
- package/esm/tooling/inspect/collect-routes.mjs +168 -0
- package/esm/tooling/inspect/collect-routes.mjs.map +1 -0
- package/esm/tooling/inspect/event-recorder.d.mts +37 -0
- package/esm/tooling/inspect/event-recorder.d.mts.map +1 -0
- package/esm/tooling/inspect/event-recorder.mjs +91 -0
- package/esm/tooling/inspect/event-recorder.mjs.map +1 -0
- package/esm/tooling/inspect/index.d.mts +8 -0
- package/esm/tooling/inspect/index.mjs +7 -0
- package/esm/tooling/inspect/inspect-app.d.mts +62 -0
- package/esm/tooling/inspect/inspect-app.d.mts.map +1 -0
- package/esm/tooling/inspect/inspect-app.mjs +92 -0
- package/esm/tooling/inspect/inspect-app.mjs.map +1 -0
- package/esm/tooling/inspect/inspect-report.schema.d.mts +14 -0
- package/esm/tooling/inspect/inspect-report.schema.d.mts.map +1 -0
- package/esm/tooling/inspect/inspect-report.schema.mjs +463 -0
- package/esm/tooling/inspect/inspect-report.schema.mjs.map +1 -0
- package/esm/tooling/inspect/inspect-report.types.d.mts +228 -0
- package/esm/tooling/inspect/inspect-report.types.d.mts.map +1 -0
- package/esm/tooling/inspect/inspect-report.types.mjs +33 -0
- package/esm/tooling/inspect/inspect-report.types.mjs.map +1 -0
- package/esm/tooling/mcp/create-mcp-context.d.mts +29 -0
- package/esm/tooling/mcp/create-mcp-context.d.mts.map +1 -0
- package/esm/tooling/mcp/create-mcp-context.mjs +75 -0
- package/esm/tooling/mcp/create-mcp-context.mjs.map +1 -0
- package/esm/tooling/mcp/db-schema.d.mts +50 -0
- package/esm/tooling/mcp/db-schema.d.mts.map +1 -0
- package/esm/tooling/mcp/db-schema.mjs +56 -0
- package/esm/tooling/mcp/db-schema.mjs.map +1 -0
- package/esm/tooling/mcp/docs-search.d.mts +77 -0
- package/esm/tooling/mcp/docs-search.d.mts.map +1 -0
- package/esm/tooling/mcp/docs-search.mjs +178 -0
- package/esm/tooling/mcp/docs-search.mjs.map +1 -0
- package/esm/tooling/mcp/index.mjs +9 -0
- package/esm/tooling/mcp/load-ai-tools.d.mts +61 -0
- package/esm/tooling/mcp/load-ai-tools.d.mts.map +1 -0
- package/esm/tooling/mcp/load-ai-tools.mjs +45 -0
- package/esm/tooling/mcp/load-ai-tools.mjs.map +1 -0
- package/esm/tooling/mcp/mcp-tools.d.mts +70 -0
- package/esm/tooling/mcp/mcp-tools.d.mts.map +1 -0
- package/esm/tooling/mcp/mcp-tools.mjs +514 -0
- package/esm/tooling/mcp/mcp-tools.mjs.map +1 -0
- package/esm/tooling/mcp/start-mcp-server.d.mts +63 -0
- package/esm/tooling/mcp/start-mcp-server.d.mts.map +1 -0
- package/esm/tooling/mcp/start-mcp-server.mjs +126 -0
- package/esm/tooling/mcp/start-mcp-server.mjs.map +1 -0
- package/esm/tooling/mcp/tool-input.d.mts +75 -0
- package/esm/tooling/mcp/tool-input.d.mts.map +1 -0
- package/esm/tooling/mcp/tool-input.mjs +72 -0
- package/esm/tooling/mcp/tool-input.mjs.map +1 -0
- package/esm/tooling/problem.d.mts +55 -0
- package/esm/tooling/problem.d.mts.map +1 -0
- package/esm/tooling/problem.mjs +28 -0
- package/esm/tooling/problem.mjs.map +1 -0
- package/esm/tooling/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 +85 -0
- package/esm/tooling/trace/trace-report.types.d.mts.map +1 -0
- package/esm/tooling/trace/trace-report.types.mjs +7 -0
- package/esm/tooling/trace/trace-report.types.mjs.map +1 -0
- package/esm/tooling/trace/trace-request.d.mts +90 -0
- package/esm/tooling/trace/trace-request.d.mts.map +1 -0
- package/esm/tooling/trace/trace-request.mjs +241 -0
- package/esm/tooling/trace/trace-request.mjs.map +1 -0
- package/esm/tooling/typecheck/index.mjs +3 -0
- package/esm/tooling/typecheck/run-typecheck.d.mts +26 -0
- package/esm/tooling/typecheck/run-typecheck.d.mts.map +1 -0
- package/esm/tooling/typecheck/run-typecheck.mjs +90 -0
- package/esm/tooling/typecheck/run-typecheck.mjs.map +1 -0
- 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/head-viewport.mjs +46 -0
- package/esm/upgrade/codemods/head-viewport.mjs.map +1 -0
- package/esm/upgrade/codemods/helpers.mjs +81 -0
- package/esm/upgrade/codemods/helpers.mjs.map +1 -0
- package/esm/upgrade/codemods/index.mjs +34 -0
- package/esm/upgrade/codemods/index.mjs.map +1 -0
- package/esm/upgrade/codemods/logger-sync-calls.mjs +57 -0
- package/esm/upgrade/codemods/logger-sync-calls.mjs.map +1 -0
- package/esm/upgrade/codemods/package-json.mjs +122 -0
- package/esm/upgrade/codemods/package-json.mjs.map +1 -0
- package/esm/upgrade/codemods/request-log-snapshot.mjs +82 -0
- package/esm/upgrade/codemods/request-log-snapshot.mjs.map +1 -0
- package/esm/upgrade/codemods/review-sites.mjs +262 -0
- package/esm/upgrade/codemods/review-sites.mjs.map +1 -0
- package/esm/upgrade/diff.mjs +119 -0
- package/esm/upgrade/diff.mjs.map +1 -0
- package/esm/upgrade/format-upgrade-report.mjs +32 -0
- package/esm/upgrade/format-upgrade-report.mjs.map +1 -0
- package/esm/upgrade/load-ts-morph.mjs +49 -0
- package/esm/upgrade/load-ts-morph.mjs.map +1 -0
- package/esm/upgrade/notes.mjs +16 -0
- package/esm/upgrade/notes.mjs.map +1 -0
- package/esm/upgrade/run-upgrade.mjs +246 -0
- package/esm/upgrade/run-upgrade.mjs.map +1 -0
- package/esm/upgrade/upgrade-command.action.mjs +37 -0
- package/esm/upgrade/upgrade-command.action.mjs.map +1 -0
- package/esm/upgrade/version.mjs +39 -0
- package/esm/upgrade/version.mjs.map +1 -0
- package/esm/use-cases/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/use-cases/use-cases-registry.mjs.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 +35 -0
- package/esm/utils/clock.d.mts.map +1 -0
- package/esm/utils/clock.mjs +27 -0
- package/esm/utils/clock.mjs.map +1 -0
- package/esm/utils/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 +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 +35 -0
- package/esm/utils/ids.d.mts.map +1 -0
- package/esm/utils/ids.mjs +33 -0
- package/esm/utils/ids.mjs.map +1 -0
- package/esm/utils/index.d.mts +5 -1
- package/esm/utils/index.mjs +4 -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 +60 -0
- package/esm/utils/runtime.d.mts.map +1 -0
- package/esm/utils/runtime.mjs +85 -0
- package/esm/utils/runtime.mjs.map +1 -0
- package/esm/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 +6 -2
- package/esm/validation/index.mjs +1 -1
- package/esm/validation/plugins/index.mjs +1 -1
- package/esm/validation/types.d.mts +61 -4
- package/esm/validation/types.d.mts.map +1 -1
- package/esm/validation/validateAll.mjs +21 -4
- package/esm/validation/validateAll.mjs.map +1 -1
- package/esm/validation/validation-failure-status.mjs +15 -0
- package/esm/validation/validation-failure-status.mjs.map +1 -0
- package/esm/validation/validators/file-validator.d.mts +2 -20
- 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/bundle-config.mjs +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 +31 -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 +3211 -731
- package/llms.txt +16 -6
- package/package.json +47 -15
- package/schemas/inspect-report.schema.json +554 -0
- package/skills/README.md +9 -0
- package/skills/add-connector/SKILL.md +26 -38
- package/skills/benchmark-code/SKILL.md +30 -24
- package/skills/build-restful/SKILL.md +14 -14
- package/skills/build-url/SKILL.md +18 -18
- package/skills/configure-app/SKILL.md +107 -14
- package/skills/create-controller/SKILL.md +25 -12
- package/skills/create-module/SKILL.md +10 -3
- package/skills/define-resource/SKILL.md +32 -29
- package/skills/encrypt-data/SKILL.md +21 -19
- package/skills/generate-openapi/SKILL.md +50 -24
- package/skills/hash-password/SKILL.md +2 -2
- package/skills/health-checks/SKILL.md +24 -7
- package/skills/index.md +11 -4
- package/skills/lower-stage3-decorators/SKILL.md +4 -4
- package/skills/make-endpoint/SKILL.md +110 -0
- package/skills/model-factories/SKILL.md +92 -0
- package/skills/process-image/SKILL.md +32 -30
- package/skills/register-route/SKILL.md +109 -10
- package/skills/report-framework-issue.md +154 -0
- package/skills/request-memo/SKILL.md +1 -1
- package/skills/request-tracing/SKILL.md +4 -1
- package/skills/resolve-path/SKILL.md +45 -44
- package/skills/retry-operation/SKILL.md +20 -11
- package/skills/run-app/SKILL.md +107 -22
- package/skills/send-response/SKILL.md +179 -14
- package/skills/store-file/SKILL.md +93 -53
- package/skills/test-fakes/SKILL.md +123 -0
- package/skills/test-http/SKILL.md +125 -21
- package/skills/test-service/SKILL.md +41 -1
- package/skills/update-packages/SKILL.md +29 -18
- package/skills/upgrade-from-5-29/SKILL.md +454 -0
- package/skills/upload-file/SKILL.md +31 -33
- package/skills/use-app-context/SKILL.md +38 -31
- package/skills/use-middleware/SKILL.md +45 -25
- package/skills/use-model-transformers/SKILL.md +37 -28
- package/skills/use-repository/SKILL.md +2 -2
- package/skills/validate-input/SKILL.md +72 -28
- package/skills/warlock-agents-md/SKILL.md +96 -0
- package/skills/warlock-board/SKILL.md +123 -0
- package/skills/warlock-check/SKILL.md +133 -0
- package/skills/warlock-conventions/SKILL.md +115 -0
- package/skills/warlock-doctor/SKILL.md +55 -22
- package/skills/warlock-inspect/SKILL.md +134 -0
- package/skills/warlock-mcp/SKILL.md +120 -0
- package/skills/warlock-routes/SKILL.md +18 -11
- package/skills/warlock-trace/SKILL.md +81 -0
- package/skills/wire-socket/SKILL.md +8 -8
- package/skills/write-seeder/SKILL.md +46 -32
- package/skills/write-use-case/SKILL.md +40 -27
- package/esm/http/uploads/matches-if-none-match.mjs +0 -13
- package/esm/http/uploads/matches-if-none-match.mjs.map +0 -1
package/esm/storage/types.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { StorageFile } from "./storage-file.mjs";
|
|
2
2
|
import { ScopedStorage } from "./scoped-storage.mjs";
|
|
3
3
|
import { UploadedFile } from "../http/uploaded-file.mjs";
|
|
4
|
+
import "../http/index.mjs";
|
|
4
5
|
import { Readable } from "stream";
|
|
5
|
-
|
|
6
6
|
//#region ../../packages/core/src/storage/types.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Options for local storage driver
|
|
9
9
|
*/
|
|
10
|
-
type LocalStorageDriverOptions = {
|
|
10
|
+
export type LocalStorageDriverOptions = {
|
|
11
11
|
/**
|
|
12
12
|
* Root path for storage
|
|
13
13
|
* Defaults to storagePath() utility
|
|
@@ -43,7 +43,7 @@ type LocalStorageDriverOptions = {
|
|
|
43
43
|
/**
|
|
44
44
|
* Base options for all S3-compatible cloud storage drivers
|
|
45
45
|
*/
|
|
46
|
-
type CloudStorageDriverOptions = {
|
|
46
|
+
export type CloudStorageDriverOptions = {
|
|
47
47
|
/**
|
|
48
48
|
* Bucket name
|
|
49
49
|
*/
|
|
@@ -99,7 +99,7 @@ type CloudStorageDriverOptions = {
|
|
|
99
99
|
/**
|
|
100
100
|
* Options specific to Cloudflare R2 driver
|
|
101
101
|
*/
|
|
102
|
-
type R2StorageDriverOptions = Omit<CloudStorageDriverOptions, "region"> & {
|
|
102
|
+
export type R2StorageDriverOptions = Omit<CloudStorageDriverOptions, "region"> & {
|
|
103
103
|
/**
|
|
104
104
|
* Cloudflare account ID
|
|
105
105
|
*/
|
|
@@ -119,7 +119,7 @@ type R2StorageDriverOptions = Omit<CloudStorageDriverOptions, "region"> & {
|
|
|
119
119
|
/**
|
|
120
120
|
* Base storage file data returned from operations
|
|
121
121
|
*/
|
|
122
|
-
type StorageFileData = {
|
|
122
|
+
export type StorageFileData = {
|
|
123
123
|
/**
|
|
124
124
|
* File storage path (relative to storage root)
|
|
125
125
|
*/
|
|
@@ -148,7 +148,7 @@ type StorageFileData = {
|
|
|
148
148
|
/**
|
|
149
149
|
* Extended storage file data with cloud-specific metadata
|
|
150
150
|
*/
|
|
151
|
-
type CloudStorageFileData = StorageFileData & {
|
|
151
|
+
export type CloudStorageFileData = StorageFileData & {
|
|
152
152
|
/**
|
|
153
153
|
* Cloud storage bucket name
|
|
154
154
|
*/
|
|
@@ -189,7 +189,7 @@ type CloudStorageFileData = StorageFileData & {
|
|
|
189
189
|
/**
|
|
190
190
|
* Storage file info for list and metadata operations
|
|
191
191
|
*/
|
|
192
|
-
type StorageFileInfo = {
|
|
192
|
+
export type StorageFileInfo = {
|
|
193
193
|
/**
|
|
194
194
|
* File storage path (relative to storage root)
|
|
195
195
|
*/
|
|
@@ -230,7 +230,7 @@ type StorageFileInfo = {
|
|
|
230
230
|
/**
|
|
231
231
|
* Options for list operations
|
|
232
232
|
*/
|
|
233
|
-
type ListOptions = {
|
|
233
|
+
export type ListOptions = {
|
|
234
234
|
/**
|
|
235
235
|
* Whether to list files recursively
|
|
236
236
|
*/
|
|
@@ -251,7 +251,7 @@ type ListOptions = {
|
|
|
251
251
|
/**
|
|
252
252
|
* Options for putDirectory operations
|
|
253
253
|
*/
|
|
254
|
-
type PutDirectoryOptions = {
|
|
254
|
+
export type PutDirectoryOptions = {
|
|
255
255
|
/**
|
|
256
256
|
* Max concurrent uploads
|
|
257
257
|
* @default 5
|
|
@@ -284,7 +284,7 @@ type PutDirectoryOptions = {
|
|
|
284
284
|
/**
|
|
285
285
|
* Result of a putDirectory operation
|
|
286
286
|
*/
|
|
287
|
-
type PutDirectoryResult = {
|
|
287
|
+
export type PutDirectoryResult = {
|
|
288
288
|
/**
|
|
289
289
|
* Successfully uploaded files
|
|
290
290
|
*/
|
|
@@ -304,7 +304,7 @@ type PutDirectoryResult = {
|
|
|
304
304
|
/**
|
|
305
305
|
* Options for presigned URLs
|
|
306
306
|
*/
|
|
307
|
-
type PresignedOptions = {
|
|
307
|
+
export type PresignedOptions = {
|
|
308
308
|
/**
|
|
309
309
|
* Expiration time in seconds
|
|
310
310
|
*/
|
|
@@ -321,7 +321,7 @@ type PresignedOptions = {
|
|
|
321
321
|
* removed rather than left as a no-op. Enforce size limits server-side (e.g.
|
|
322
322
|
* verify `metadata().size` after upload) or migrate to presigned POST.
|
|
323
323
|
*/
|
|
324
|
-
type PresignedUploadOptions = PresignedOptions & {
|
|
324
|
+
export type PresignedUploadOptions = PresignedOptions & {
|
|
325
325
|
/**
|
|
326
326
|
* File content type
|
|
327
327
|
*/
|
|
@@ -339,7 +339,7 @@ type PresignedUploadOptions = PresignedOptions & {
|
|
|
339
339
|
* (guards-ON) behaviour: https+http only, private/loopback/metadata hosts
|
|
340
340
|
* denied, a byte cap, and a timeout.
|
|
341
341
|
*/
|
|
342
|
-
type PutFromUrlOptions = PutOptions & {
|
|
342
|
+
export type PutFromUrlOptions = PutOptions & {
|
|
343
343
|
/**
|
|
344
344
|
* Allow private / loopback / link-local / cloud-metadata hosts. Default
|
|
345
345
|
* `false` — the SSRF guard is ON.
|
|
@@ -348,7 +348,8 @@ type PutFromUrlOptions = PutOptions & {
|
|
|
348
348
|
/**
|
|
349
349
|
* Maximum downloaded body size in bytes. Default `52_428_800` (50 MiB).
|
|
350
350
|
*/
|
|
351
|
-
maxBytes?: number;
|
|
351
|
+
maxBytes?: number;
|
|
352
|
+
/** Per-request timeout in milliseconds. Default `30_000`. */
|
|
352
353
|
timeoutMs?: number;
|
|
353
354
|
/**
|
|
354
355
|
* URL schemes permitted for the download. Default `["https", "http"]`.
|
|
@@ -358,7 +359,7 @@ type PutFromUrlOptions = PutOptions & {
|
|
|
358
359
|
/**
|
|
359
360
|
* Options for put operations
|
|
360
361
|
*/
|
|
361
|
-
type PutOptions = {
|
|
362
|
+
export type PutOptions = {
|
|
362
363
|
/**
|
|
363
364
|
* Explicit MIME type for the file
|
|
364
365
|
* If not provided, will be guessed from file extension
|
|
@@ -384,7 +385,7 @@ type PutOptions = {
|
|
|
384
385
|
/**
|
|
385
386
|
* Payload encoded in temporary URL tokens
|
|
386
387
|
*/
|
|
387
|
-
type TemporaryTokenPayload = {
|
|
388
|
+
export type TemporaryTokenPayload = {
|
|
388
389
|
/**
|
|
389
390
|
* Relative file path
|
|
390
391
|
*/
|
|
@@ -401,11 +402,11 @@ type TemporaryTokenPayload = {
|
|
|
401
402
|
/**
|
|
402
403
|
* Validation error types
|
|
403
404
|
*/
|
|
404
|
-
type TemporaryTokenError = "expired" | "invalid_signature" | "invalid_token" | "missing_key" | "file_not_found";
|
|
405
|
+
export type TemporaryTokenError = "expired" | "invalid_signature" | "invalid_token" | "missing_key" | "file_not_found";
|
|
405
406
|
/**
|
|
406
407
|
* Result of validating a temporary URL token
|
|
407
408
|
*/
|
|
408
|
-
type TemporaryTokenValidation = {
|
|
409
|
+
export type TemporaryTokenValidation = {
|
|
409
410
|
/**
|
|
410
411
|
* Whether the token is valid
|
|
411
412
|
*/
|
|
@@ -446,15 +447,15 @@ type TemporaryTokenValidation = {
|
|
|
446
447
|
/**
|
|
447
448
|
* File visibility options
|
|
448
449
|
*/
|
|
449
|
-
type FileVisibility = "public" | "private";
|
|
450
|
+
export type FileVisibility = "public" | "private";
|
|
450
451
|
/**
|
|
451
452
|
* Storage event types
|
|
452
453
|
*/
|
|
453
|
-
type StorageEventType = "beforePut" | "afterPut" | "beforeDelete" | "afterDelete" | "beforeCopy" | "afterCopy" | "beforeMove" | "afterMove";
|
|
454
|
+
export type StorageEventType = "beforePut" | "afterPut" | "beforeDelete" | "afterDelete" | "beforeCopy" | "afterCopy" | "beforeMove" | "afterMove";
|
|
454
455
|
/**
|
|
455
456
|
* Storage event payload base
|
|
456
457
|
*/
|
|
457
|
-
type StorageEventPayload = {
|
|
458
|
+
export type StorageEventPayload = {
|
|
458
459
|
/**
|
|
459
460
|
* Storage driver name
|
|
460
461
|
*/
|
|
@@ -471,7 +472,7 @@ type StorageEventPayload = {
|
|
|
471
472
|
/**
|
|
472
473
|
* Put event payload
|
|
473
474
|
*/
|
|
474
|
-
type StoragePutEventPayload = StorageEventPayload & {
|
|
475
|
+
export type StoragePutEventPayload = StorageEventPayload & {
|
|
475
476
|
/**
|
|
476
477
|
* Storage file data
|
|
477
478
|
*/
|
|
@@ -488,7 +489,7 @@ type StoragePutEventPayload = StorageEventPayload & {
|
|
|
488
489
|
/**
|
|
489
490
|
* Copy/Move event payload
|
|
490
491
|
*/
|
|
491
|
-
type StorageCopyEventPayload = StorageEventPayload & {
|
|
492
|
+
export type StorageCopyEventPayload = StorageEventPayload & {
|
|
492
493
|
/**
|
|
493
494
|
* Source file storage path
|
|
494
495
|
*/
|
|
@@ -505,11 +506,11 @@ type StorageCopyEventPayload = StorageEventPayload & {
|
|
|
505
506
|
/**
|
|
506
507
|
* Storage event handler type
|
|
507
508
|
*/
|
|
508
|
-
type StorageEventHandler<T extends StorageEventPayload = StorageEventPayload> = (payload: T) => void | Promise<void>;
|
|
509
|
+
export type StorageEventHandler<T extends StorageEventPayload = StorageEventPayload> = (payload: T) => void | Promise<void>;
|
|
509
510
|
/**
|
|
510
511
|
* Result of a batch delete operation
|
|
511
512
|
*/
|
|
512
|
-
type DeleteManyResult = {
|
|
513
|
+
export type DeleteManyResult = {
|
|
513
514
|
/**
|
|
514
515
|
* File storage path (relative to storage root)
|
|
515
516
|
*/
|
|
@@ -523,12 +524,12 @@ type DeleteManyResult = {
|
|
|
523
524
|
*/
|
|
524
525
|
error?: string;
|
|
525
526
|
};
|
|
526
|
-
type StorageDriverType = "local" | "s3" | "r2" | "spaces";
|
|
527
|
+
export type StorageDriverType = "local" | "s3" | "r2" | "spaces";
|
|
527
528
|
/**
|
|
528
529
|
* Storage driver configuration
|
|
529
530
|
* Used in configuration files
|
|
530
531
|
*/
|
|
531
|
-
type StorageDriverConfig = {
|
|
532
|
+
export type StorageDriverConfig = {
|
|
532
533
|
/**
|
|
533
534
|
* Driver type
|
|
534
535
|
*/
|
|
@@ -598,7 +599,7 @@ type StorageDriverConfig = {
|
|
|
598
599
|
* }
|
|
599
600
|
* ```
|
|
600
601
|
*/
|
|
601
|
-
interface StorageDriverRegistry {}
|
|
602
|
+
export interface StorageDriverRegistry {}
|
|
602
603
|
/**
|
|
603
604
|
* Storage driver name type.
|
|
604
605
|
*
|
|
@@ -606,11 +607,11 @@ interface StorageDriverRegistry {}
|
|
|
606
607
|
* Falls back to `string` if no drivers are registered.
|
|
607
608
|
* Autocomplete provided by generated `.warlock/typings/storage.d.ts`
|
|
608
609
|
*/
|
|
609
|
-
type StorageDriverName = keyof StorageDriverRegistry extends never ? string : keyof StorageDriverRegistry;
|
|
610
|
+
export type StorageDriverName = keyof StorageDriverRegistry extends never ? string : keyof StorageDriverRegistry;
|
|
610
611
|
/**
|
|
611
612
|
* Storage configurations
|
|
612
613
|
*/
|
|
613
|
-
type StorageConfigurations = {
|
|
614
|
+
export type StorageConfigurations = {
|
|
614
615
|
/**
|
|
615
616
|
* Default driver name
|
|
616
617
|
*/
|
|
@@ -631,7 +632,7 @@ type StorageConfigurations = {
|
|
|
631
632
|
* Drivers return raw data objects (`StorageFileData`), while the
|
|
632
633
|
* `ScopedStorage` and `Storage` classes wrap these in `StorageFile` instances.
|
|
633
634
|
*/
|
|
634
|
-
interface StorageDriverContract {
|
|
635
|
+
export interface StorageDriverContract {
|
|
635
636
|
/**
|
|
636
637
|
* Driver name identifier (e.g., "local", "s3", "r2", "spaces")
|
|
637
638
|
*/
|
|
@@ -793,7 +794,7 @@ interface StorageDriverContract {
|
|
|
793
794
|
* Extends the base contract with cloud-specific functionality
|
|
794
795
|
* like presigned URLs, visibility control, and storage classes.
|
|
795
796
|
*/
|
|
796
|
-
interface CloudStorageDriverContract extends StorageDriverContract {
|
|
797
|
+
export interface CloudStorageDriverContract extends StorageDriverContract {
|
|
797
798
|
/**
|
|
798
799
|
* Store a file (returns cloud-specific data)
|
|
799
800
|
*/
|
|
@@ -864,7 +865,7 @@ interface CloudStorageDriverContract extends StorageDriverContract {
|
|
|
864
865
|
*
|
|
865
866
|
* This provides the developer-facing API with rich file objects.
|
|
866
867
|
*/
|
|
867
|
-
interface ScopedStorageContract {
|
|
868
|
+
export interface ScopedStorageContract {
|
|
868
869
|
/**
|
|
869
870
|
* Driver name identifier
|
|
870
871
|
*/
|
|
@@ -977,7 +978,7 @@ interface ScopedStorageContract {
|
|
|
977
978
|
*
|
|
978
979
|
* This is the contract implemented by the `Storage` class.
|
|
979
980
|
*/
|
|
980
|
-
interface StorageManagerContract extends ScopedStorageContract {
|
|
981
|
+
export interface StorageManagerContract extends ScopedStorageContract {
|
|
981
982
|
/**
|
|
982
983
|
* Get a scoped storage for a specific driver
|
|
983
984
|
*
|
|
@@ -1038,12 +1039,11 @@ interface StorageManagerContract extends ScopedStorageContract {
|
|
|
1038
1039
|
/**
|
|
1039
1040
|
* Event subscription returned by event handlers
|
|
1040
1041
|
*/
|
|
1041
|
-
interface EventSubscription {
|
|
1042
|
+
export interface EventSubscription {
|
|
1042
1043
|
/**
|
|
1043
1044
|
* Unsubscribe from the event
|
|
1044
1045
|
*/
|
|
1045
1046
|
unsubscribe(): void;
|
|
1046
1047
|
}
|
|
1047
1048
|
//#endregion
|
|
1048
|
-
export { CloudStorageDriverContract, CloudStorageDriverOptions, CloudStorageFileData, DeleteManyResult, EventSubscription, FileVisibility, ListOptions, LocalStorageDriverOptions, PresignedOptions, PresignedUploadOptions, PutDirectoryOptions, PutDirectoryResult, PutFromUrlOptions, PutOptions, R2StorageDriverOptions, ScopedStorageContract, StorageConfigurations, StorageCopyEventPayload, StorageDriverConfig, StorageDriverContract, StorageDriverName, StorageDriverRegistry, StorageDriverType, StorageEventHandler, StorageEventPayload, StorageEventType, StorageFileData, StorageFileInfo, StorageManagerContract, StoragePutEventPayload, TemporaryTokenError, TemporaryTokenPayload, TemporaryTokenValidation };
|
|
1049
1049
|
//# sourceMappingURL=types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../../../../../../../../packages/core/src/storage/types.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":["_$__storage_file0.StorageFile"],"sources":["../../../../../../../../packages/core/src/storage/types.ts"],"mappings":"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"}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* by the IPv4 it carries. A non-IP string returns `false` (the caller
|
|
8
8
|
* resolves hostnames via DNS first).
|
|
9
9
|
*/
|
|
10
|
-
declare function isPrivateOrReservedIp(ip: string): boolean;
|
|
10
|
+
export declare function isPrivateOrReservedIp(ip: string): boolean;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { isPrivateOrReservedIp };
|
|
13
12
|
//# sourceMappingURL=classify-ip-address.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify-ip-address.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/classify-ip-address.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"classify-ip-address.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/classify-ip-address.ts"],"mappings":";;;;;;;;;wBAwKgB,sBAAsB"}
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
* @returns The absolute, contained filesystem path.
|
|
18
18
|
* @throws {StorageError} When the location escapes `root`.
|
|
19
19
|
*/
|
|
20
|
-
declare function resolveWithinRoot(root: string, location: string): string;
|
|
20
|
+
export declare function resolveWithinRoot(root: string, location: string): string;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { resolveWithinRoot };
|
|
23
22
|
//# sourceMappingURL=contain-path.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contain-path.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/contain-path.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"contain-path.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/contain-path.ts"],"mappings":";;;;;;;;;;;;;;;;;;;wBAqBgB,kBAAkB,cAAc"}
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* @param path - File path or extension
|
|
6
6
|
* @returns MIME type or "application/octet-stream" if unknown
|
|
7
7
|
*/
|
|
8
|
-
declare function getMimeType(path: string): string;
|
|
8
|
+
export declare function getMimeType(path: string): string;
|
|
9
9
|
/**
|
|
10
10
|
* Common MIME type constants
|
|
11
11
|
*/
|
|
12
|
-
declare const MimeTypes: {
|
|
12
|
+
export declare const MimeTypes: {
|
|
13
13
|
readonly jpeg: "image/jpeg";
|
|
14
14
|
readonly png: "image/png";
|
|
15
15
|
readonly gif: "image/gif";
|
|
@@ -32,5 +32,4 @@ declare const MimeTypes: {
|
|
|
32
32
|
readonly binary: "application/octet-stream";
|
|
33
33
|
};
|
|
34
34
|
//#endregion
|
|
35
|
-
export { MimeTypes, getMimeType };
|
|
36
35
|
//# sourceMappingURL=mime.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mime.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/mime.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"mime.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/mime.ts"],"mappings":";;;;;;;wBAcgB,YAAY;;;;qBAOf;WAEX;WACA;WACA;WACA;WACA;WACA;WAGA;WACA;WACA;WACA;WACA;WACA;WACA;WAGA;WACA;WAGA;WACA;WACA;WACA;WAGA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { isPrivateOrReservedIp } from "./classify-ip-address.mjs";
|
|
2
|
-
|
|
3
2
|
//#region ../../packages/core/src/storage/utils/safe-fetch.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Options controlling a guarded outbound fetch. Every field is optional;
|
|
@@ -8,7 +7,7 @@ import { isPrivateOrReservedIp } from "./classify-ip-address.mjs";
|
|
|
8
7
|
* 50 MiB cap) so a caller that does not tune them still gets a hardened
|
|
9
8
|
* request.
|
|
10
9
|
*/
|
|
11
|
-
type SafeFetchOptions = {
|
|
10
|
+
export type SafeFetchOptions = {
|
|
12
11
|
/**
|
|
13
12
|
* Whether to ALLOW private / loopback / link-local / metadata hosts.
|
|
14
13
|
* Default `false` — the SSRF guard is on (private hosts are denied).
|
|
@@ -19,7 +18,8 @@ type SafeFetchOptions = {
|
|
|
19
18
|
* this fails fast; otherwise the body is read with a running cap and the
|
|
20
19
|
* stream is aborted on overflow. Default `52_428_800` (50 MiB).
|
|
21
20
|
*/
|
|
22
|
-
maxBytes?: number;
|
|
21
|
+
maxBytes?: number;
|
|
22
|
+
/** Per-request timeout in milliseconds. Default `30_000`. */
|
|
23
23
|
timeoutMs?: number;
|
|
24
24
|
/**
|
|
25
25
|
* URL schemes permitted for the request, compared case-insensitively.
|
|
@@ -37,7 +37,7 @@ type SafeFetchOptions = {
|
|
|
37
37
|
* content-type, so callers can derive a MIME type and enforce a non-empty
|
|
38
38
|
* content-type check.
|
|
39
39
|
*/
|
|
40
|
-
type SafeFetchResult = {
|
|
40
|
+
export type SafeFetchResult = {
|
|
41
41
|
buffer: Buffer;
|
|
42
42
|
contentType: string | null;
|
|
43
43
|
status: number;
|
|
@@ -63,7 +63,7 @@ type SafeFetchResult = {
|
|
|
63
63
|
* @throws {StorageError} On a blocked URL (initial or redirect target),
|
|
64
64
|
* a redirect-hop bound overflow, timeout, or oversized body.
|
|
65
65
|
*/
|
|
66
|
-
declare function safeFetchToBuffer(rawUrl: string, options?: SafeFetchOptions): Promise<SafeFetchResult>;
|
|
66
|
+
export declare function safeFetchToBuffer(rawUrl: string, options?: SafeFetchOptions): Promise<SafeFetchResult>;
|
|
67
67
|
//#endregion
|
|
68
|
-
export {
|
|
68
|
+
export { isPrivateOrReservedIp };
|
|
69
69
|
//# sourceMappingURL=safe-fetch.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safe-fetch.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/safe-fetch.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"safe-fetch.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/safe-fetch.ts"],"mappings":";;;;;;;;;YAoCY;;;;;EAKV;;;;;;EAMA;;EAEA;;;;;EAKA;;;;;EAKA,eAAe;;;;;;;YA2GL;EACV,QAAQ;EACR;EACA;EACA;EACA;;;;;;;;;;;;;;;;;;;;;wBAsBoB,kBACpB,gBACA,UAAS,mBACR,QAAQ"}
|
|
@@ -14,7 +14,7 @@ import { isIP } from "node:net";
|
|
|
14
14
|
* extraction of a shared security package, keep the two copies in sync.
|
|
15
15
|
*/
|
|
16
16
|
/** 50 MiB — default cap on a downloaded body (storage files run larger than AI payloads). */
|
|
17
|
-
const DEFAULT_MAX_BYTES =
|
|
17
|
+
const DEFAULT_MAX_BYTES = 52428800;
|
|
18
18
|
/** 30s — default per-request timeout. */
|
|
19
19
|
const DEFAULT_TIMEOUT_MS = 3e4;
|
|
20
20
|
/**
|
|
@@ -24,7 +24,7 @@ const DEFAULT_TIMEOUT_MS = 3e4;
|
|
|
24
24
|
*/
|
|
25
25
|
const DEFAULT_MAX_REDIRECTS = 5;
|
|
26
26
|
/** 3xx statuses whose `Location` a follow re-issues — mirrors ai/src/security/outbound-policy.ts:18. */
|
|
27
|
-
const REDIRECT_STATUSES = new Set([
|
|
27
|
+
const REDIRECT_STATUSES = /* @__PURE__ */ new Set([
|
|
28
28
|
301,
|
|
29
29
|
302,
|
|
30
30
|
303,
|
|
@@ -208,5 +208,5 @@ async function readBodyCapped(response, maxBytes, rawUrl) {
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
//#endregion
|
|
211
|
-
export { safeFetchToBuffer };
|
|
211
|
+
export { isPrivateOrReservedIp, safeFetchToBuffer };
|
|
212
212
|
//# sourceMappingURL=safe-fetch.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safe-fetch.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/safe-fetch.ts"],"sourcesContent":["import { lookup } from \"node:dns/promises\";\nimport { isIP } from \"node:net\";\nimport { isPrivateOrReservedIp } from \"./classify-ip-address\";\nimport { StorageError } from \"./storage-error\";\n\n/**\n * SSRF / resource-exhaustion guard for storage's outbound downloads\n * (`putFromUrl`).\n *\n * NOTE: this MIRRORS `@warlock.js/ai`'s `src/security/private-ip.ts` and\n * `src/security/outbound-policy.ts`. It is duplicated here intentionally\n * because `@warlock.js/core` cannot depend on `@warlock.js/ai`. Pending\n * extraction of a shared security package, keep the two copies in sync.\n */\n\n/** 50 MiB — default cap on a downloaded body (storage files run larger than AI payloads). */\nconst DEFAULT_MAX_BYTES = 50 * 1024 * 1024;\n/** 30s — default per-request timeout. */\nconst DEFAULT_TIMEOUT_MS = 30_000;\n/**\n * Cap on the number of re-validated redirect hops. Mirrors\n * `@warlock.js/ai`'s `DEFAULT_MAX_REDIRECTS`\n * (ai/src/security/outbound-policy.ts:15).\n */\nconst DEFAULT_MAX_REDIRECTS = 5;\n\n/** 3xx statuses whose `Location` a follow re-issues — mirrors ai/src/security/outbound-policy.ts:18. */\nconst REDIRECT_STATUSES = new Set([301, 302, 303, 307, 308]);\n\n/**\n * Options controlling a guarded outbound fetch. Every field is optional;\n * {@link resolveFetchPolicy} fills safe defaults. The defaults are\n * deliberately strict (https+http, private-IP deny ON, 30s timeout,\n * 50 MiB cap) so a caller that does not tune them still gets a hardened\n * request.\n */\nexport type SafeFetchOptions = {\n /**\n * Whether to ALLOW private / loopback / link-local / metadata hosts.\n * Default `false` — the SSRF guard is on (private hosts are denied).\n */\n allowPrivateHosts?: boolean;\n /**\n * Maximum response body size in bytes. A declared `content-length` over\n * this fails fast; otherwise the body is read with a running cap and the\n * stream is aborted on overflow. Default `52_428_800` (50 MiB).\n */\n maxBytes?: number;\n /** Per-request timeout in milliseconds. Default `30_000`. */\n timeoutMs?: number;\n /**\n * URL schemes permitted for the request, compared case-insensitively.\n * Default `[\"https\", \"http\"]`.\n */\n allowedSchemes?: string[];\n /**\n * Injected `fetch` implementation (for tests or proxies). Defaults to the\n * global `fetch`.\n */\n fetch?: typeof fetch;\n};\n\n/** {@link SafeFetchOptions} with every default resolved — never partial. */\ntype ResolvedFetchPolicy = {\n allowPrivateHosts: boolean;\n maxBytes: number;\n timeoutMs: number;\n allowedSchemes: string[];\n fetch: typeof fetch;\n};\n\n/**\n * Fill a {@link SafeFetchOptions} with strict defaults: https+http,\n * private-IP deny on, 30s timeout, 50 MiB cap, global `fetch`.\n */\nfunction resolveFetchPolicy(options: SafeFetchOptions = {}): ResolvedFetchPolicy {\n return {\n allowPrivateHosts: options.allowPrivateHosts ?? false,\n maxBytes: options.maxBytes ?? DEFAULT_MAX_BYTES,\n timeoutMs: options.timeoutMs ?? DEFAULT_TIMEOUT_MS,\n allowedSchemes: options.allowedSchemes ?? [\"https\", \"http\"],\n fetch: options.fetch ?? globalThis.fetch,\n };\n}\n\nexport { isPrivateOrReservedIp };\n\n/** Strip the `[ ]` IPv6 brackets `URL.hostname` keeps. */\nfunction stripBrackets(host: string): string {\n return host.startsWith(\"[\") && host.endsWith(\"]\") ? host.slice(1, -1) : host;\n}\n\n/**\n * Reject when `host` is — or resolves to — a private / reserved address.\n * IP literals are checked directly; hostnames are resolved via DNS and every\n * returned address is checked (a public name pointing inward is caught). A\n * resolution failure fails closed.\n */\nasync function assertHostNotPrivate(host: string, rawUrl: string): Promise<void> {\n if (isIP(host) !== 0) {\n if (isPrivateOrReservedIp(host)) {\n throw new StorageError(`outbound request blocked — \"${host}\" is a private/reserved address`, {\n context: { url: rawUrl, address: host },\n });\n }\n return;\n }\n\n let addresses: Array<{ address: string }>;\n try {\n addresses = await lookup(host, { all: true });\n } catch (cause) {\n throw new StorageError(\n `outbound request blocked — could not resolve host \"${host}\" to verify it is public`,\n { cause, context: { url: rawUrl, host } },\n );\n }\n\n for (const { address } of addresses) {\n if (isPrivateOrReservedIp(address)) {\n throw new StorageError(\n `outbound request blocked — host \"${host}\" resolves to a private/reserved address (${address})`,\n { context: { url: rawUrl, host, address } },\n );\n }\n }\n}\n\n/**\n * Validate a URL against the policy BEFORE any network call: scheme\n * allowlist and (when private hosts are not allowed) a DNS resolution that\n * rejects private / loopback / link-local / metadata addresses — the SSRF\n * guard. Returns the parsed `URL` on success; throws {@link StorageError}\n * otherwise.\n */\nasync function assertUrlAllowed(rawUrl: string, policy: ResolvedFetchPolicy): Promise<URL> {\n let url: URL;\n try {\n url = new URL(rawUrl);\n } catch {\n throw new StorageError(`outbound request blocked — invalid URL: ${rawUrl}`, {\n context: { url: rawUrl },\n });\n }\n\n const scheme = url.protocol.replace(/:$/, \"\").toLowerCase();\n if (!policy.allowedSchemes.some((s) => s.toLowerCase() === scheme)) {\n throw new StorageError(\n `outbound request blocked — scheme \"${scheme}\" is not allowed (allowed: ${policy.allowedSchemes.join(\", \")})`,\n { context: { url: rawUrl, scheme } },\n );\n }\n\n if (!policy.allowPrivateHosts) {\n const host = stripBrackets(url.hostname);\n await assertHostNotPrivate(host, rawUrl);\n }\n\n return url;\n}\n\n/**\n * Result of {@link safeFetchToBuffer}: the (capped) body plus the response's\n * content-type, so callers can derive a MIME type and enforce a non-empty\n * content-type check.\n */\nexport type SafeFetchResult = {\n buffer: Buffer;\n contentType: string | null;\n status: number;\n statusText: string;\n ok: boolean;\n};\n\n/**\n * SSRF-guarded download: validates the URL (scheme allowlist + post-DNS\n * private-IP deny), performs the request with a timeout via\n * `AbortController`, then streams the body with a hard byte cap — aborting\n * the moment the running total exceeds `maxBytes`. A declared\n * `content-length` over the cap fails fast.\n *\n * Redirects are NEVER delegated to the platform: every hop is issued with\n * `redirect: \"manual\"` and its `Location` is re-run through\n * {@link assertUrlAllowed} — including the DNS-resolution private-IP check\n * — before being followed (capped at {@link DEFAULT_MAX_REDIRECTS}), so a\n * 3xx from an allowed host cannot smuggle the request to a private /\n * metadata target. Mirrors `@warlock.js/ai`'s `guardedFetch`\n * (ai/src/security/outbound-policy.ts:188-284); duplicated per this\n * module's file-header note since core cannot depend on ai.\n *\n * @throws {StorageError} On a blocked URL (initial or redirect target),\n * a redirect-hop bound overflow, timeout, or oversized body.\n */\nexport async function safeFetchToBuffer(\n rawUrl: string,\n options: SafeFetchOptions = {},\n): Promise<SafeFetchResult> {\n const policy = resolveFetchPolicy(options);\n let url = await assertUrlAllowed(rawUrl, policy);\n\n const controller = new AbortController();\n const timer = setTimeout(() => {\n controller.abort(\n new StorageError(`outbound request timed out after ${policy.timeoutMs}ms`, {\n context: { url: rawUrl, timeoutMs: policy.timeoutMs },\n }),\n );\n }, policy.timeoutMs);\n\n try {\n let response: Response;\n\n for (let hop = 0; ; hop++) {\n response = await policy.fetch(url, { signal: controller.signal, redirect: \"manual\" });\n\n const location = response.headers.get(\"location\");\n if (!REDIRECT_STATUSES.has(response.status) || location === null) {\n break;\n }\n\n if (hop >= DEFAULT_MAX_REDIRECTS) {\n throw new StorageError(\n `outbound request blocked — more than ${DEFAULT_MAX_REDIRECTS} redirects`,\n { context: { url: rawUrl, maxRedirects: DEFAULT_MAX_REDIRECTS } },\n );\n }\n\n let target: URL;\n try {\n target = new URL(location, url);\n } catch {\n throw new StorageError(\n `outbound request blocked — invalid redirect Location: ${location}`,\n {\n context: { url: url.toString(), location },\n },\n );\n }\n\n // Discard the interim body so the connection can be reused.\n if (response.body) {\n await response.body.cancel().catch(() => undefined);\n }\n\n // The redirect target gets the SAME scheme + private-IP validation\n // (incl. DNS resolution) as the initial URL — this is what closes\n // the redirect-based SSRF bypass: a 302 from an allowed host to\n // 169.254.169.254 is re-validated here, not blindly followed.\n url = await assertUrlAllowed(target.toString(), policy);\n }\n\n const declared = Number(response.headers.get(\"content-length\"));\n if (Number.isFinite(declared) && declared > policy.maxBytes) {\n throw new StorageError(\n `outbound response body too large — declared ${declared} bytes exceeds the ${policy.maxBytes}-byte cap`,\n { context: { url: rawUrl, declared, maxBytes: policy.maxBytes } },\n );\n }\n\n const buffer = await readBodyCapped(response, policy.maxBytes, rawUrl);\n\n return {\n buffer,\n contentType: response.headers.get(\"content-type\"),\n status: response.status,\n statusText: response.statusText,\n ok: response.ok,\n };\n } finally {\n clearTimeout(timer);\n }\n}\n\n/**\n * Read a response body into a Buffer with a hard byte cap. The stream is\n * read chunk-by-chunk and cancelled the moment the running total exceeds\n * `maxBytes`. Throws {@link StorageError} on overflow.\n */\nasync function readBodyCapped(\n response: Response,\n maxBytes: number,\n rawUrl: string,\n): Promise<Buffer> {\n if (!response.body) {\n const arrayBuffer = await response.arrayBuffer();\n if (arrayBuffer.byteLength > maxBytes) {\n throw new StorageError(`outbound response body exceeded the ${maxBytes}-byte cap`, {\n context: { url: rawUrl, maxBytes },\n });\n }\n return Buffer.from(arrayBuffer);\n }\n\n const reader = response.body.getReader();\n const chunks: Uint8Array[] = [];\n let total = 0;\n\n for (;;) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n if (!value) {\n continue;\n }\n\n total += value.byteLength;\n if (total > maxBytes) {\n await reader.cancel();\n throw new StorageError(`outbound response body exceeded the ${maxBytes}-byte cap`, {\n context: { url: rawUrl, maxBytes },\n });\n }\n chunks.push(value);\n }\n\n return Buffer.concat(chunks);\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"safe-fetch.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/safe-fetch.ts"],"sourcesContent":["import { lookup } from \"node:dns/promises\";\nimport { isIP } from \"node:net\";\nimport { isPrivateOrReservedIp } from \"./classify-ip-address\";\nimport { StorageError } from \"./storage-error\";\n\n/**\n * SSRF / resource-exhaustion guard for storage's outbound downloads\n * (`putFromUrl`).\n *\n * NOTE: this MIRRORS `@warlock.js/ai`'s `src/security/private-ip.ts` and\n * `src/security/outbound-policy.ts`. It is duplicated here intentionally\n * because `@warlock.js/core` cannot depend on `@warlock.js/ai`. Pending\n * extraction of a shared security package, keep the two copies in sync.\n */\n\n/** 50 MiB — default cap on a downloaded body (storage files run larger than AI payloads). */\nconst DEFAULT_MAX_BYTES = 50 * 1024 * 1024;\n/** 30s — default per-request timeout. */\nconst DEFAULT_TIMEOUT_MS = 30_000;\n/**\n * Cap on the number of re-validated redirect hops. Mirrors\n * `@warlock.js/ai`'s `DEFAULT_MAX_REDIRECTS`\n * (ai/src/security/outbound-policy.ts:15).\n */\nconst DEFAULT_MAX_REDIRECTS = 5;\n\n/** 3xx statuses whose `Location` a follow re-issues — mirrors ai/src/security/outbound-policy.ts:18. */\nconst REDIRECT_STATUSES = new Set([301, 302, 303, 307, 308]);\n\n/**\n * Options controlling a guarded outbound fetch. Every field is optional;\n * {@link resolveFetchPolicy} fills safe defaults. The defaults are\n * deliberately strict (https+http, private-IP deny ON, 30s timeout,\n * 50 MiB cap) so a caller that does not tune them still gets a hardened\n * request.\n */\nexport type SafeFetchOptions = {\n /**\n * Whether to ALLOW private / loopback / link-local / metadata hosts.\n * Default `false` — the SSRF guard is on (private hosts are denied).\n */\n allowPrivateHosts?: boolean;\n /**\n * Maximum response body size in bytes. A declared `content-length` over\n * this fails fast; otherwise the body is read with a running cap and the\n * stream is aborted on overflow. Default `52_428_800` (50 MiB).\n */\n maxBytes?: number;\n /** Per-request timeout in milliseconds. Default `30_000`. */\n timeoutMs?: number;\n /**\n * URL schemes permitted for the request, compared case-insensitively.\n * Default `[\"https\", \"http\"]`.\n */\n allowedSchemes?: string[];\n /**\n * Injected `fetch` implementation (for tests or proxies). Defaults to the\n * global `fetch`.\n */\n fetch?: typeof fetch;\n};\n\n/** {@link SafeFetchOptions} with every default resolved — never partial. */\ntype ResolvedFetchPolicy = {\n allowPrivateHosts: boolean;\n maxBytes: number;\n timeoutMs: number;\n allowedSchemes: string[];\n fetch: typeof fetch;\n};\n\n/**\n * Fill a {@link SafeFetchOptions} with strict defaults: https+http,\n * private-IP deny on, 30s timeout, 50 MiB cap, global `fetch`.\n */\nfunction resolveFetchPolicy(options: SafeFetchOptions = {}): ResolvedFetchPolicy {\n return {\n allowPrivateHosts: options.allowPrivateHosts ?? false,\n maxBytes: options.maxBytes ?? DEFAULT_MAX_BYTES,\n timeoutMs: options.timeoutMs ?? DEFAULT_TIMEOUT_MS,\n allowedSchemes: options.allowedSchemes ?? [\"https\", \"http\"],\n fetch: options.fetch ?? globalThis.fetch,\n };\n}\n\nexport { isPrivateOrReservedIp };\n\n/** Strip the `[ ]` IPv6 brackets `URL.hostname` keeps. */\nfunction stripBrackets(host: string): string {\n return host.startsWith(\"[\") && host.endsWith(\"]\") ? host.slice(1, -1) : host;\n}\n\n/**\n * Reject when `host` is — or resolves to — a private / reserved address.\n * IP literals are checked directly; hostnames are resolved via DNS and every\n * returned address is checked (a public name pointing inward is caught). A\n * resolution failure fails closed.\n */\nasync function assertHostNotPrivate(host: string, rawUrl: string): Promise<void> {\n if (isIP(host) !== 0) {\n if (isPrivateOrReservedIp(host)) {\n throw new StorageError(`outbound request blocked — \"${host}\" is a private/reserved address`, {\n context: { url: rawUrl, address: host },\n });\n }\n return;\n }\n\n let addresses: Array<{ address: string }>;\n try {\n addresses = await lookup(host, { all: true });\n } catch (cause) {\n throw new StorageError(\n `outbound request blocked — could not resolve host \"${host}\" to verify it is public`,\n { cause, context: { url: rawUrl, host } },\n );\n }\n\n for (const { address } of addresses) {\n if (isPrivateOrReservedIp(address)) {\n throw new StorageError(\n `outbound request blocked — host \"${host}\" resolves to a private/reserved address (${address})`,\n { context: { url: rawUrl, host, address } },\n );\n }\n }\n}\n\n/**\n * Validate a URL against the policy BEFORE any network call: scheme\n * allowlist and (when private hosts are not allowed) a DNS resolution that\n * rejects private / loopback / link-local / metadata addresses — the SSRF\n * guard. Returns the parsed `URL` on success; throws {@link StorageError}\n * otherwise.\n */\nasync function assertUrlAllowed(rawUrl: string, policy: ResolvedFetchPolicy): Promise<URL> {\n let url: URL;\n try {\n url = new URL(rawUrl);\n } catch {\n throw new StorageError(`outbound request blocked — invalid URL: ${rawUrl}`, {\n context: { url: rawUrl },\n });\n }\n\n const scheme = url.protocol.replace(/:$/, \"\").toLowerCase();\n if (!policy.allowedSchemes.some((s) => s.toLowerCase() === scheme)) {\n throw new StorageError(\n `outbound request blocked — scheme \"${scheme}\" is not allowed (allowed: ${policy.allowedSchemes.join(\", \")})`,\n { context: { url: rawUrl, scheme } },\n );\n }\n\n if (!policy.allowPrivateHosts) {\n const host = stripBrackets(url.hostname);\n await assertHostNotPrivate(host, rawUrl);\n }\n\n return url;\n}\n\n/**\n * Result of {@link safeFetchToBuffer}: the (capped) body plus the response's\n * content-type, so callers can derive a MIME type and enforce a non-empty\n * content-type check.\n */\nexport type SafeFetchResult = {\n buffer: Buffer;\n contentType: string | null;\n status: number;\n statusText: string;\n ok: boolean;\n};\n\n/**\n * SSRF-guarded download: validates the URL (scheme allowlist + post-DNS\n * private-IP deny), performs the request with a timeout via\n * `AbortController`, then streams the body with a hard byte cap — aborting\n * the moment the running total exceeds `maxBytes`. A declared\n * `content-length` over the cap fails fast.\n *\n * Redirects are NEVER delegated to the platform: every hop is issued with\n * `redirect: \"manual\"` and its `Location` is re-run through\n * {@link assertUrlAllowed} — including the DNS-resolution private-IP check\n * — before being followed (capped at {@link DEFAULT_MAX_REDIRECTS}), so a\n * 3xx from an allowed host cannot smuggle the request to a private /\n * metadata target. Mirrors `@warlock.js/ai`'s `guardedFetch`\n * (ai/src/security/outbound-policy.ts:188-284); duplicated per this\n * module's file-header note since core cannot depend on ai.\n *\n * @throws {StorageError} On a blocked URL (initial or redirect target),\n * a redirect-hop bound overflow, timeout, or oversized body.\n */\nexport async function safeFetchToBuffer(\n rawUrl: string,\n options: SafeFetchOptions = {},\n): Promise<SafeFetchResult> {\n const policy = resolveFetchPolicy(options);\n let url = await assertUrlAllowed(rawUrl, policy);\n\n const controller = new AbortController();\n const timer = setTimeout(() => {\n controller.abort(\n new StorageError(`outbound request timed out after ${policy.timeoutMs}ms`, {\n context: { url: rawUrl, timeoutMs: policy.timeoutMs },\n }),\n );\n }, policy.timeoutMs);\n\n try {\n let response: Response;\n\n for (let hop = 0; ; hop++) {\n response = await policy.fetch(url, { signal: controller.signal, redirect: \"manual\" });\n\n const location = response.headers.get(\"location\");\n if (!REDIRECT_STATUSES.has(response.status) || location === null) {\n break;\n }\n\n if (hop >= DEFAULT_MAX_REDIRECTS) {\n throw new StorageError(\n `outbound request blocked — more than ${DEFAULT_MAX_REDIRECTS} redirects`,\n { context: { url: rawUrl, maxRedirects: DEFAULT_MAX_REDIRECTS } },\n );\n }\n\n let target: URL;\n try {\n target = new URL(location, url);\n } catch {\n throw new StorageError(\n `outbound request blocked — invalid redirect Location: ${location}`,\n {\n context: { url: url.toString(), location },\n },\n );\n }\n\n // Discard the interim body so the connection can be reused.\n if (response.body) {\n await response.body.cancel().catch(() => undefined);\n }\n\n // The redirect target gets the SAME scheme + private-IP validation\n // (incl. DNS resolution) as the initial URL — this is what closes\n // the redirect-based SSRF bypass: a 302 from an allowed host to\n // 169.254.169.254 is re-validated here, not blindly followed.\n url = await assertUrlAllowed(target.toString(), policy);\n }\n\n const declared = Number(response.headers.get(\"content-length\"));\n if (Number.isFinite(declared) && declared > policy.maxBytes) {\n throw new StorageError(\n `outbound response body too large — declared ${declared} bytes exceeds the ${policy.maxBytes}-byte cap`,\n { context: { url: rawUrl, declared, maxBytes: policy.maxBytes } },\n );\n }\n\n const buffer = await readBodyCapped(response, policy.maxBytes, rawUrl);\n\n return {\n buffer,\n contentType: response.headers.get(\"content-type\"),\n status: response.status,\n statusText: response.statusText,\n ok: response.ok,\n };\n } finally {\n clearTimeout(timer);\n }\n}\n\n/**\n * Read a response body into a Buffer with a hard byte cap. The stream is\n * read chunk-by-chunk and cancelled the moment the running total exceeds\n * `maxBytes`. Throws {@link StorageError} on overflow.\n */\nasync function readBodyCapped(\n response: Response,\n maxBytes: number,\n rawUrl: string,\n): Promise<Buffer> {\n if (!response.body) {\n const arrayBuffer = await response.arrayBuffer();\n if (arrayBuffer.byteLength > maxBytes) {\n throw new StorageError(`outbound response body exceeded the ${maxBytes}-byte cap`, {\n context: { url: rawUrl, maxBytes },\n });\n }\n return Buffer.from(arrayBuffer);\n }\n\n const reader = response.body.getReader();\n const chunks: Uint8Array[] = [];\n let total = 0;\n\n for (;;) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n if (!value) {\n continue;\n }\n\n total += value.byteLength;\n if (total > maxBytes) {\n await reader.cancel();\n throw new StorageError(`outbound response body exceeded the ${maxBytes}-byte cap`, {\n context: { url: rawUrl, maxBytes },\n });\n }\n chunks.push(value);\n }\n\n return Buffer.concat(chunks);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,oBAAoB;;AAE1B,MAAM,qBAAqB;;;;;;AAM3B,MAAM,wBAAwB;;AAG9B,MAAM,oCAAoB,IAAI,IAAI;CAAC;CAAK;CAAK;CAAK;CAAK;AAAG,CAAC;;;;;AAgD3D,SAAS,mBAAmB,UAA4B,CAAC,GAAwB;CAC/E,OAAO;EACL,mBAAmB,QAAQ,qBAAqB;EAChD,UAAU,QAAQ,YAAY;EAC9B,WAAW,QAAQ,aAAa;EAChC,gBAAgB,QAAQ,kBAAkB,CAAC,SAAS,MAAM;EAC1D,OAAO,QAAQ,SAAS,WAAW;CACrC;AACF;;AAKA,SAAS,cAAc,MAAsB;CAC3C,OAAO,KAAK,WAAW,GAAG,KAAK,KAAK,SAAS,GAAG,IAAI,KAAK,MAAM,GAAG,EAAE,IAAI;AAC1E;;;;;;;AAQA,eAAe,qBAAqB,MAAc,QAA+B;CAC/E,IAAI,KAAK,IAAI,MAAM,GAAG;EACpB,IAAI,sBAAsB,IAAI,GAC5B,MAAM,IAAI,aAAa,+BAA+B,KAAK,kCAAkC,EAC3F,SAAS;GAAE,KAAK;GAAQ,SAAS;EAAK,EACxC,CAAC;EAEH;CACF;CAEA,IAAI;CACJ,IAAI;EACF,YAAY,MAAM,OAAO,MAAM,EAAE,KAAK,KAAK,CAAC;CAC9C,SAAS,OAAO;EACd,MAAM,IAAI,aACR,sDAAsD,KAAK,2BAC3D;GAAE;GAAO,SAAS;IAAE,KAAK;IAAQ;GAAK;EAAE,CAC1C;CACF;CAEA,KAAK,MAAM,EAAE,aAAa,WACxB,IAAI,sBAAsB,OAAO,GAC/B,MAAM,IAAI,aACR,oCAAoC,KAAK,4CAA4C,QAAQ,IAC7F,EAAE,SAAS;EAAE,KAAK;EAAQ;EAAM;CAAQ,EAAE,CAC5C;AAGN;;;;;;;;AASA,eAAe,iBAAiB,QAAgB,QAA2C;CACzF,IAAI;CACJ,IAAI;EACF,MAAM,IAAI,IAAI,MAAM;CACtB,QAAQ;EACN,MAAM,IAAI,aAAa,2CAA2C,UAAU,EAC1E,SAAS,EAAE,KAAK,OAAO,EACzB,CAAC;CACH;CAEA,MAAM,SAAS,IAAI,SAAS,QAAQ,MAAM,EAAE,CAAC,CAAC,YAAY;CAC1D,IAAI,CAAC,OAAO,eAAe,MAAM,MAAM,EAAE,YAAY,MAAM,MAAM,GAC/D,MAAM,IAAI,aACR,sCAAsC,OAAO,6BAA6B,OAAO,eAAe,KAAK,IAAI,EAAE,IAC3G,EAAE,SAAS;EAAE,KAAK;EAAQ;CAAO,EAAE,CACrC;CAGF,IAAI,CAAC,OAAO,mBAEV,MAAM,qBADO,cAAc,IAAI,QACD,GAAG,MAAM;CAGzC,OAAO;AACT;;;;;;;;;;;;;;;;;;;;AAkCA,eAAsB,kBACpB,QACA,UAA4B,CAAC,GACH;CAC1B,MAAM,SAAS,mBAAmB,OAAO;CACzC,IAAI,MAAM,MAAM,iBAAiB,QAAQ,MAAM;CAE/C,MAAM,aAAa,IAAI,gBAAgB;CACvC,MAAM,QAAQ,iBAAiB;EAC7B,WAAW,MACT,IAAI,aAAa,oCAAoC,OAAO,UAAU,KAAK,EACzE,SAAS;GAAE,KAAK;GAAQ,WAAW,OAAO;EAAU,EACtD,CAAC,CACH;CACF,GAAG,OAAO,SAAS;CAEnB,IAAI;EACF,IAAI;EAEJ,KAAK,IAAI,MAAM,IAAK,OAAO;GACzB,WAAW,MAAM,OAAO,MAAM,KAAK;IAAE,QAAQ,WAAW;IAAQ,UAAU;GAAS,CAAC;GAEpF,MAAM,WAAW,SAAS,QAAQ,IAAI,UAAU;GAChD,IAAI,CAAC,kBAAkB,IAAI,SAAS,MAAM,KAAK,aAAa,MAC1D;GAGF,IAAI,OAAO,uBACT,MAAM,IAAI,aACR,wCAAwC,sBAAsB,aAC9D,EAAE,SAAS;IAAE,KAAK;IAAQ,cAAc;GAAsB,EAAE,CAClE;GAGF,IAAI;GACJ,IAAI;IACF,SAAS,IAAI,IAAI,UAAU,GAAG;GAChC,QAAQ;IACN,MAAM,IAAI,aACR,yDAAyD,YACzD,EACE,SAAS;KAAE,KAAK,IAAI,SAAS;KAAG;IAAS,EAC3C,CACF;GACF;GAGA,IAAI,SAAS,MACX,MAAM,SAAS,KAAK,OAAO,CAAC,CAAC,YAAY,MAAS;GAOpD,MAAM,MAAM,iBAAiB,OAAO,SAAS,GAAG,MAAM;EACxD;EAEA,MAAM,WAAW,OAAO,SAAS,QAAQ,IAAI,gBAAgB,CAAC;EAC9D,IAAI,OAAO,SAAS,QAAQ,KAAK,WAAW,OAAO,UACjD,MAAM,IAAI,aACR,+CAA+C,SAAS,qBAAqB,OAAO,SAAS,YAC7F,EAAE,SAAS;GAAE,KAAK;GAAQ;GAAU,UAAU,OAAO;EAAS,EAAE,CAClE;EAKF,OAAO;GACL,cAHmB,eAAe,UAAU,OAAO,UAAU,MAAM;GAInE,aAAa,SAAS,QAAQ,IAAI,cAAc;GAChD,QAAQ,SAAS;GACjB,YAAY,SAAS;GACrB,IAAI,SAAS;EACf;CACF,UAAU;EACR,aAAa,KAAK;CACpB;AACF;;;;;;AAOA,eAAe,eACb,UACA,UACA,QACiB;CACjB,IAAI,CAAC,SAAS,MAAM;EAClB,MAAM,cAAc,MAAM,SAAS,YAAY;EAC/C,IAAI,YAAY,aAAa,UAC3B,MAAM,IAAI,aAAa,uCAAuC,SAAS,YAAY,EACjF,SAAS;GAAE,KAAK;GAAQ;EAAS,EACnC,CAAC;EAEH,OAAO,OAAO,KAAK,WAAW;CAChC;CAEA,MAAM,SAAS,SAAS,KAAK,UAAU;CACvC,MAAM,SAAuB,CAAC;CAC9B,IAAI,QAAQ;CAEZ,SAAS;EACP,MAAM,EAAE,MAAM,UAAU,MAAM,OAAO,KAAK;EAC1C,IAAI,MACF;EAEF,IAAI,CAAC,OACH;EAGF,SAAS,MAAM;EACf,IAAI,QAAQ,UAAU;GACpB,MAAM,OAAO,OAAO;GACpB,MAAM,IAAI,aAAa,uCAAuC,SAAS,YAAY,EACjF,SAAS;IAAE,KAAK;IAAQ;GAAS,EACnC,CAAC;EACH;EACA,OAAO,KAAK,KAAK;CACnB;CAEA,OAAO,OAAO,OAAO,MAAM;AAC7B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { StorageError } from "./storage-error.mjs";
|
|
2
|
-
|
|
3
2
|
//#region ../../packages/core/src/storage/utils/storage-capability-error.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Thrown when an operation needs an optional driver capability that the
|
|
@@ -9,7 +8,7 @@ import { StorageError } from "./storage-error.mjs";
|
|
|
9
8
|
* Callers can probe first (`storage.supportsPutIfAbsent()`) or branch on
|
|
10
9
|
* `instanceof StorageCapabilityError`.
|
|
11
10
|
*/
|
|
12
|
-
declare class StorageCapabilityError extends StorageError {
|
|
11
|
+
export declare class StorageCapabilityError extends StorageError {
|
|
13
12
|
/**
|
|
14
13
|
* The missing capability (e.g. "putIfAbsent").
|
|
15
14
|
*/
|
|
@@ -21,5 +20,4 @@ declare class StorageCapabilityError extends StorageError {
|
|
|
21
20
|
constructor(capability: string, driverName: string);
|
|
22
21
|
}
|
|
23
22
|
//#endregion
|
|
24
|
-
export { StorageCapabilityError };
|
|
25
23
|
//# sourceMappingURL=storage-capability-error.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-capability-error.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/storage-capability-error.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"storage-capability-error.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/storage-capability-error.ts"],"mappings":";;;;;;;;;;qBAUa,+BAA+B;;;;WAI1B;;;;WAKA;EAEhB,YAAmB,oBAAoB"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* mirroring the convention used by `@warlock.js/ai`'s error classes — it is
|
|
12
12
|
* for logs and telemetry, treated as opaque by consumers.
|
|
13
13
|
*/
|
|
14
|
-
type StorageErrorOptions = {
|
|
14
|
+
export type StorageErrorOptions = {
|
|
15
15
|
cause?: unknown;
|
|
16
16
|
context?: Record<string, unknown>;
|
|
17
17
|
};
|
|
@@ -19,7 +19,7 @@ type StorageErrorOptions = {
|
|
|
19
19
|
* Error thrown by storage drivers for refused or invalid operations
|
|
20
20
|
* (path-traversal attempts, blocked outbound fetches, oversized downloads).
|
|
21
21
|
*/
|
|
22
|
-
declare class StorageError extends Error {
|
|
22
|
+
export declare class StorageError extends Error {
|
|
23
23
|
/**
|
|
24
24
|
* Optional original thrown value preserved through re-wrapping.
|
|
25
25
|
*/
|
|
@@ -31,5 +31,4 @@ declare class StorageError extends Error {
|
|
|
31
31
|
constructor(message: string, options?: StorageErrorOptions);
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
|
-
export { StorageError, StorageErrorOptions };
|
|
35
34
|
//# sourceMappingURL=storage-error.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-error.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/storage-error.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"storage-error.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/storage-error.ts"],"mappings":";;;;;;;;;;;;;YAYY;EACV;EACA,UAAU;;;;;;qBAOC,qBAAqB;;;;WAIhB;;;;WAKA,UAAU;EAE1B,YAAmB,iBAAiB,UAAU"}
|
|
@@ -12,11 +12,12 @@
|
|
|
12
12
|
* process, so `Storage#init()` was never called and `_driver` stayed
|
|
13
13
|
* `null`. This error names that cause and the fix directly instead.
|
|
14
14
|
*/
|
|
15
|
-
declare class StorageNotInitializedError extends Error {
|
|
15
|
+
export declare class StorageNotInitializedError extends Error {
|
|
16
|
+
/** Stable Warlock error code; `warlock explain WL2006` prints the fix. */
|
|
17
|
+
readonly code = "WL2006";
|
|
16
18
|
constructor(options?: {
|
|
17
19
|
cause?: unknown;
|
|
18
20
|
});
|
|
19
21
|
}
|
|
20
22
|
//#endregion
|
|
21
|
-
export { StorageNotInitializedError };
|
|
22
23
|
//# sourceMappingURL=storage-not-initialized-error.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-not-initialized-error.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/storage-not-initialized-error.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"storage-not-initialized-error.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/storage-not-initialized-error.ts"],"mappings":";;;;;;;;;;;;;;qBAaa,mCAAmC;;WAE9B;EAEhB,YAAmB;IAAY"}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
var StorageNotInitializedError = class extends Error {
|
|
16
16
|
constructor(options) {
|
|
17
17
|
super("Storage is not initialized in this process. This happens when the `storage` connector never ran, so `Storage.init()` was never called.\n\nCheck that `src/config/storage.ts` exists. If this is a custom CLI command, add \"storage\" to its `preload.connectors` list so the connector runs before your command's action executes.", options);
|
|
18
|
+
this.code = "WL2006";
|
|
18
19
|
this.name = "StorageNotInitializedError";
|
|
19
20
|
}
|
|
20
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-not-initialized-error.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/storage-not-initialized-error.ts"],"sourcesContent":["/**\n * Thrown when storage is accessed (e.g. `storage.put(...)`) before it has\n * been initialized in this process — no context driver and no default\n * driver resolved yet.\n *\n * Previously this fell through to a bare `null` `activeDriver`, and the\n * first thing every call site did with it was read `.name` or call a\n * method on it, surfacing as `TypeError: Cannot read properties of null\n * (reading 'name')` deep inside `Storage#put()`. That told the caller\n * nothing about the real cause: the `storage` connector never ran in this\n * process, so `Storage#init()` was never called and `_driver` stayed\n * `null`. This error names that cause and the fix directly instead.\n */\nexport class StorageNotInitializedError extends Error {\n public constructor(options?: { cause?: unknown }) {\n super(\n \"Storage is not initialized in this process. This happens when the `storage` \" +\n \"connector never ran, so `Storage.init()` was never called.\\n\\n\" +\n \"Check that `src/config/storage.ts` exists. If this is a custom CLI command, \" +\n 'add \"storage\" to its `preload.connectors` list so the connector runs before ' +\n \"your command's action executes.\",\n options,\n );\n\n this.name = \"StorageNotInitializedError\";\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,IAAa,6BAAb,cAAgD,MAAM;
|
|
1
|
+
{"version":3,"file":"storage-not-initialized-error.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/storage/utils/storage-not-initialized-error.ts"],"sourcesContent":["/**\n * Thrown when storage is accessed (e.g. `storage.put(...)`) before it has\n * been initialized in this process — no context driver and no default\n * driver resolved yet.\n *\n * Previously this fell through to a bare `null` `activeDriver`, and the\n * first thing every call site did with it was read `.name` or call a\n * method on it, surfacing as `TypeError: Cannot read properties of null\n * (reading 'name')` deep inside `Storage#put()`. That told the caller\n * nothing about the real cause: the `storage` connector never ran in this\n * process, so `Storage#init()` was never called and `_driver` stayed\n * `null`. This error names that cause and the fix directly instead.\n */\nexport class StorageNotInitializedError extends Error {\n /** Stable Warlock error code; `warlock explain WL2006` prints the fix. */\n public readonly code = \"WL2006\";\n\n public constructor(options?: { cause?: unknown }) {\n super(\n \"Storage is not initialized in this process. This happens when the `storage` \" +\n \"connector never ran, so `Storage.init()` was never called.\\n\\n\" +\n \"Check that `src/config/storage.ts` exists. If this is a custom CLI command, \" +\n 'add \"storage\" to its `preload.connectors` list so the connector runs before ' +\n \"your command's action executes.\",\n options,\n );\n\n this.name = \"StorageNotInitializedError\";\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,IAAa,6BAAb,cAAgD,MAAM;CAIpD,AAAO,YAAY,SAA+B;EAChD,MACE,uUAKA,OACF;cAVqB;EAYrB,KAAK,OAAO;CACd;AACF"}
|