@warlock.js/core 5.29.0 → 5.31.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 +168 -4
- 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 +1 -1
- package/esm/application/app.d.mts.map +1 -1
- package/esm/application/app.mjs +1 -1
- package/esm/application/app.mjs.map +1 -1
- package/esm/application/application-config-types.d.mts +1 -1
- package/esm/application/application-config-types.d.mts.map +1 -1
- package/esm/application/application.d.mts +1 -1
- package/esm/application/application.d.mts.map +1 -1
- package/esm/application/application.mjs +1 -1
- package/esm/application/application.mjs.map +1 -1
- package/esm/application/boot-signal.d.mts +1 -1
- package/esm/application/boot-signal.d.mts.map +1 -1
- package/esm/application/boot-signal.mjs +1 -1
- package/esm/application/boot-signal.mjs.map +1 -1
- package/esm/application/public-url.d.mts +1 -1
- package/esm/application/public-url.d.mts.map +1 -1
- package/esm/application/public-url.mjs +1 -1
- package/esm/application/public-url.mjs.map +1 -1
- package/esm/application/roles.d.mts +1 -1
- package/esm/application/roles.d.mts.map +1 -1
- package/esm/application/roles.mjs +1 -1
- package/esm/application/roles.mjs.map +1 -1
- package/esm/benchmark/benchmark-snapshots.d.mts +1 -1
- package/esm/benchmark/benchmark-snapshots.d.mts.map +1 -1
- package/esm/benchmark/benchmark-snapshots.mjs +1 -1
- package/esm/benchmark/benchmark-snapshots.mjs.map +1 -1
- package/esm/benchmark/benchmark.d.mts +1 -1
- package/esm/benchmark/benchmark.d.mts.map +1 -1
- package/esm/benchmark/benchmark.mjs +1 -1
- package/esm/benchmark/benchmark.mjs.map +1 -1
- package/esm/benchmark/channels/console.channel.d.mts +1 -1
- package/esm/benchmark/channels/console.channel.d.mts.map +1 -1
- package/esm/benchmark/channels/console.channel.mjs +1 -1
- package/esm/benchmark/channels/console.channel.mjs.map +1 -1
- package/esm/benchmark/channels/noop.channel.d.mts +1 -1
- package/esm/benchmark/channels/noop.channel.d.mts.map +1 -1
- package/esm/benchmark/channels/noop.channel.mjs +1 -1
- package/esm/benchmark/channels/noop.channel.mjs.map +1 -1
- package/esm/benchmark/profiler.d.mts +1 -1
- package/esm/benchmark/profiler.d.mts.map +1 -1
- package/esm/benchmark/profiler.mjs +1 -1
- package/esm/benchmark/profiler.mjs.map +1 -1
- package/esm/benchmark/types.d.mts +1 -1
- package/esm/benchmark/types.d.mts.map +1 -1
- package/esm/bootstrap/setup.d.mts +1 -1
- package/esm/bootstrap/setup.d.mts.map +1 -1
- package/esm/bootstrap/setup.mjs +1 -1
- package/esm/bootstrap/setup.mjs.map +1 -1
- package/esm/bootstrap.d.mts +1 -1
- package/esm/bootstrap.d.mts.map +1 -1
- package/esm/bootstrap.mjs +1 -1
- package/esm/bootstrap.mjs.map +1 -1
- package/esm/cache/database-cache-driver.d.mts +1 -1
- package/esm/cache/database-cache-driver.d.mts.map +1 -1
- package/esm/cache/database-cache-driver.mjs +1 -1
- package/esm/cache/database-cache-driver.mjs.map +1 -1
- package/esm/cache/index.mjs +1 -1
- package/esm/cache/index.mjs.map +1 -1
- package/esm/cli/cli-commands.manager.mjs +1 -1
- package/esm/cli/cli-commands.manager.mjs.map +1 -1
- package/esm/cli/cli-commands.utils.mjs +1 -1
- package/esm/cli/cli-commands.utils.mjs.map +1 -1
- package/esm/cli/commands/add.command.mjs +5 -3
- package/esm/cli/commands/add.command.mjs.map +1 -1
- package/esm/cli/commands/agents-md/agents-md-command.action.mjs +69 -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 +7 -2
- 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/create-database.command.mjs +1 -1
- package/esm/cli/commands/create-database.command.mjs.map +1 -1
- package/esm/cli/commands/dev-server.command.mjs +10 -2
- package/esm/cli/commands/dev-server.command.mjs.map +1 -1
- package/esm/cli/commands/doctor/boot-for-diagnostics.mjs +9 -4
- package/esm/cli/commands/doctor/boot-for-diagnostics.mjs.map +1 -1
- package/esm/cli/commands/doctor/check.types.d.mts +76 -0
- package/esm/cli/commands/doctor/check.types.d.mts.map +1 -0
- package/esm/cli/commands/doctor/checks/config.check.mjs +2 -1
- package/esm/cli/commands/doctor/checks/config.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/connectors.check.mjs +3 -1
- package/esm/cli/commands/doctor/checks/connectors.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/handler-signature.check.mjs +2 -1
- package/esm/cli/commands/doctor/checks/handler-signature.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/health.check.mjs +4 -1
- package/esm/cli/commands/doctor/checks/health.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/index.mjs +1 -1
- package/esm/cli/commands/doctor/checks/index.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/jwt-secret.check.mjs +2 -1
- package/esm/cli/commands/doctor/checks/jwt-secret.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/locales-ts-deprecated.check.mjs +2 -1
- package/esm/cli/commands/doctor/checks/locales-ts-deprecated.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/optional-peers.check.mjs +2 -1
- package/esm/cli/commands/doctor/checks/optional-peers.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/release-hygiene.check.mjs +5 -1
- package/esm/cli/commands/doctor/checks/release-hygiene.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/checks/routes.check.mjs +4 -1
- package/esm/cli/commands/doctor/checks/routes.check.mjs.map +1 -1
- package/esm/cli/commands/doctor/doctor-command.action.mjs +15 -7
- package/esm/cli/commands/doctor/doctor-command.action.mjs.map +1 -1
- package/esm/cli/commands/doctor/format-report.mjs +31 -3
- package/esm/cli/commands/doctor/format-report.mjs.map +1 -1
- package/esm/cli/commands/doctor/run-checks.mjs +1 -1
- package/esm/cli/commands/doctor/run-checks.mjs.map +1 -1
- package/esm/cli/commands/doctor.command.mjs +5 -1
- package/esm/cli/commands/doctor.command.mjs.map +1 -1
- package/esm/cli/commands/drop-tables.command.mjs +1 -1
- package/esm/cli/commands/drop-tables.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 +125 -125
- package/esm/cli/commands/generate/generate.command.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/column-dsl-parser.mjs +1 -1
- package/esm/cli/commands/generate/generators/column-dsl-parser.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/controller.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/controller.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/endpoint.generator.mjs +311 -0
- package/esm/cli/commands/generate/generators/endpoint.generator.mjs.map +1 -0
- package/esm/cli/commands/generate/generators/migration.generator.mjs +2 -2
- package/esm/cli/commands/generate/generators/migration.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/model.generator.mjs +2 -2
- package/esm/cli/commands/generate/generators/model.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/module.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/module.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/repository.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/repository.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/resource.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/resource.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/service.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/service.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/use-case.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/use-case.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 +20 -7
- package/esm/cli/commands/generate/templates/stubs.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/endpoint-schema.mjs +137 -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/path-resolver.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/prompt.mjs +1 -1
- package/esm/cli/commands/generate/utils/prompt.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/writer.mjs +39 -14
- package/esm/cli/commands/generate/utils/writer.mjs.map +1 -1
- package/esm/cli/commands/inspect/inspect-command.action.mjs +72 -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/mcp/mcp-command.action.mjs +103 -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/migrate.command.mjs +1 -1
- package/esm/cli/commands/migrate.command.mjs.map +1 -1
- 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 +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 +1 -1
- package/esm/cli/commands/postman-generator.command.mjs.map +1 -1
- package/esm/cli/commands/routes/diff-page-routes.mjs +1 -1
- package/esm/cli/commands/routes/diff-page-routes.mjs.map +1 -1
- package/esm/cli/commands/routes/format-routes-table.mjs +1 -1
- package/esm/cli/commands/routes/format-routes-table.mjs.map +1 -1
- package/esm/cli/commands/routes/route-row.mjs +1 -1
- package/esm/cli/commands/routes/route-row.mjs.map +1 -1
- package/esm/cli/commands/routes/routes-command.action.mjs +1 -1
- package/esm/cli/commands/routes/routes-command.action.mjs.map +1 -1
- package/esm/cli/commands/routes/routes-diff.action.mjs +2 -2
- package/esm/cli/commands/routes/routes-diff.action.mjs.map +1 -1
- package/esm/cli/commands/routes/with-console-on-stderr.mjs +1 -1
- package/esm/cli/commands/routes/with-console-on-stderr.mjs.map +1 -1
- package/esm/cli/commands/routes.command.mjs +1 -1
- package/esm/cli/commands/routes.command.mjs.map +1 -1
- package/esm/cli/commands/seed.command.mjs +1 -1
- package/esm/cli/commands/seed.command.mjs.map +1 -1
- package/esm/cli/commands/start-production.command.mjs +1 -1
- package/esm/cli/commands/start-production.command.mjs.map +1 -1
- package/esm/cli/commands/storage-put.action.mjs +1 -1
- package/esm/cli/commands/storage-put.action.mjs.map +1 -1
- package/esm/cli/commands/storage-put.command.mjs +1 -1
- package/esm/cli/commands/storage-put.command.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/typings-generator.command.mjs +1 -1
- package/esm/cli/commands/typings-generator.command.mjs.map +1 -1
- package/esm/cli/commands/update.command.mjs +1 -1
- package/esm/cli/commands/update.command.mjs.map +1 -1
- 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/commands-loader.mjs.map +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 +24 -2
- package/esm/cli/framework-cli-commands.mjs.map +1 -1
- package/esm/cli/parse-cli-args.mjs +2 -1
- package/esm/cli/parse-cli-args.mjs.map +1 -1
- package/esm/cli/start.mjs +1 -1
- package/esm/cli/start.mjs.map +1 -1
- package/esm/cli/string-similarity.mjs +1 -1
- package/esm/cli/string-similarity.mjs.map +1 -1
- package/esm/commands/cli-command.d.mts +1 -1
- package/esm/commands/cli-command.d.mts.map +1 -1
- package/esm/commands/cli-command.mjs +1 -1
- package/esm/commands/cli-command.mjs.map +1 -1
- package/esm/commands/types.d.mts +1 -1
- package/esm/commands/types.d.mts.map +1 -1
- package/esm/config/config-getter.d.mts +1 -1
- package/esm/config/config-getter.d.mts.map +1 -1
- package/esm/config/config-getter.mjs +1 -1
- package/esm/config/config-getter.mjs.map +1 -1
- package/esm/config/config-handlers.d.mts +1 -1
- package/esm/config/config-handlers.d.mts.map +1 -1
- package/esm/config/config-handlers.mjs +1 -1
- package/esm/config/config-handlers.mjs.map +1 -1
- package/esm/config/config-key-from-path.mjs +1 -1
- package/esm/config/config-key-from-path.mjs.map +1 -1
- package/esm/config/config-loader.d.mts +1 -1
- 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-manager.mjs.map +1 -1
- package/esm/config/config-schema.d.mts +67 -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 +1 -1
- package/esm/config/config-setter.d.mts.map +1 -1
- package/esm/config/config-setter.mjs +1 -1
- package/esm/config/config-setter.mjs.map +1 -1
- package/esm/config/config-special-handlers.d.mts +1 -1
- package/esm/config/config-special-handlers.d.mts.map +1 -1
- package/esm/config/config-special-handlers.mjs +1 -1
- package/esm/config/config-special-handlers.mjs.map +1 -1
- package/esm/config/index.d.mts +6 -0
- package/esm/config/index.mjs +1 -0
- package/esm/config/load-config-files.mjs +1 -1
- package/esm/config/load-config-files.mjs.map +1 -1
- package/esm/config/locale-configuration.mjs +1 -1
- package/esm/config/locale-configuration.mjs.map +1 -1
- package/esm/config/types.d.mts +1 -1
- package/esm/config/types.d.mts.map +1 -1
- package/esm/connectors/access-connector.d.mts +1 -1
- package/esm/connectors/access-connector.d.mts.map +1 -1
- package/esm/connectors/access-connector.mjs +1 -1
- package/esm/connectors/access-connector.mjs.map +1 -1
- package/esm/connectors/ai-connector.d.mts +1 -1
- package/esm/connectors/ai-connector.d.mts.map +1 -1
- package/esm/connectors/ai-connector.mjs +1 -1
- package/esm/connectors/ai-connector.mjs.map +1 -1
- package/esm/connectors/assert-no-reserved-connector-names.d.mts +1 -1
- package/esm/connectors/assert-no-reserved-connector-names.d.mts.map +1 -1
- package/esm/connectors/assert-no-reserved-connector-names.mjs +3 -2
- package/esm/connectors/assert-no-reserved-connector-names.mjs.map +1 -1
- package/esm/connectors/assert-unique-connector-names.d.mts +1 -1
- package/esm/connectors/assert-unique-connector-names.d.mts.map +1 -1
- package/esm/connectors/assert-unique-connector-names.mjs +27 -3
- package/esm/connectors/assert-unique-connector-names.mjs.map +1 -1
- package/esm/connectors/base-connector.d.mts +1 -1
- package/esm/connectors/base-connector.d.mts.map +1 -1
- package/esm/connectors/base-connector.mjs +1 -1
- package/esm/connectors/base-connector.mjs.map +1 -1
- package/esm/connectors/cache-connector.d.mts +1 -1
- package/esm/connectors/cache-connector.d.mts.map +1 -1
- package/esm/connectors/cache-connector.mjs +1 -1
- package/esm/connectors/cache-connector.mjs.map +1 -1
- package/esm/connectors/connectors-manager.d.mts +1 -1
- 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 -1
- package/esm/connectors/database-connector.d.mts.map +1 -1
- package/esm/connectors/database-connector.mjs +1 -1
- package/esm/connectors/database-connector.mjs.map +1 -1
- package/esm/connectors/describe-server-address.mjs +1 -1
- package/esm/connectors/describe-server-address.mjs.map +1 -1
- package/esm/connectors/herald-connector.d.mts +1 -1
- package/esm/connectors/herald-connector.d.mts.map +1 -1
- package/esm/connectors/herald-connector.mjs +1 -1
- package/esm/connectors/herald-connector.mjs.map +1 -1
- package/esm/connectors/http-connector.d.mts +1 -1
- package/esm/connectors/http-connector.d.mts.map +1 -1
- package/esm/connectors/http-connector.mjs +4 -3
- package/esm/connectors/http-connector.mjs.map +1 -1
- package/esm/connectors/logger-connector.d.mts +1 -1
- package/esm/connectors/logger-connector.d.mts.map +1 -1
- package/esm/connectors/logger-connector.mjs +1 -1
- package/esm/connectors/logger-connector.mjs.map +1 -1
- package/esm/connectors/mail-connector.d.mts +1 -1
- package/esm/connectors/mail-connector.d.mts.map +1 -1
- package/esm/connectors/mail-connector.mjs +1 -1
- package/esm/connectors/mail-connector.mjs.map +1 -1
- package/esm/connectors/notifications-connector.d.mts +1 -1
- package/esm/connectors/notifications-connector.d.mts.map +1 -1
- package/esm/connectors/notifications-connector.mjs +1 -1
- package/esm/connectors/notifications-connector.mjs.map +1 -1
- package/esm/connectors/read-bound-port.mjs +1 -1
- package/esm/connectors/read-bound-port.mjs.map +1 -1
- package/esm/connectors/register-configured-connectors.d.mts +1 -1
- package/esm/connectors/register-configured-connectors.d.mts.map +1 -1
- package/esm/connectors/register-configured-connectors.mjs +1 -1
- package/esm/connectors/register-configured-connectors.mjs.map +1 -1
- package/esm/connectors/single-server-warnings.mjs +1 -1
- package/esm/connectors/single-server-warnings.mjs.map +1 -1
- package/esm/connectors/socket-connector.d.mts +1 -1
- package/esm/connectors/socket-connector.d.mts.map +1 -1
- package/esm/connectors/socket-connector.mjs +1 -1
- package/esm/connectors/socket-connector.mjs.map +1 -1
- package/esm/connectors/storage.connector.d.mts +1 -1
- package/esm/connectors/storage.connector.d.mts.map +1 -1
- package/esm/connectors/storage.connector.mjs +1 -1
- package/esm/connectors/storage.connector.mjs.map +1 -1
- package/esm/connectors/types.d.mts +1 -1
- package/esm/connectors/types.d.mts.map +1 -1
- package/esm/connectors/types.mjs +1 -1
- package/esm/connectors/types.mjs.map +1 -1
- package/esm/container/container-instance-registry.mjs +1 -1
- package/esm/container/container-instance-registry.mjs.map +1 -1
- package/esm/container/development-app-modules.d.mts +1 -1
- package/esm/container/development-app-modules.d.mts.map +1 -1
- package/esm/container/development-model-modules.d.mts +1 -1
- package/esm/container/development-model-modules.d.mts.map +1 -1
- package/esm/container/index.d.mts +1 -1
- package/esm/container/index.d.mts.map +1 -1
- package/esm/container/index.mjs +1 -1
- package/esm/container/index.mjs.map +1 -1
- package/esm/database/create-database-action.mjs +1 -1
- package/esm/database/create-database-action.mjs.map +1 -1
- package/esm/database/drop-tables-action.mjs +1 -1
- package/esm/database/drop-tables-action.mjs.map +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 +3 -39
- package/esm/database/models/database-log/database-log.d.mts.map +1 -1
- package/esm/database/models/database-log/database-log.mjs +1 -1
- package/esm/database/models/database-log/database-log.mjs.map +1 -1
- package/esm/database/pending-exit-code.mjs +1 -1
- package/esm/database/pending-exit-code.mjs.map +1 -1
- package/esm/database/resolve-pending-migrations.mjs +1 -1
- package/esm/database/resolve-pending-migrations.mjs.map +1 -1
- package/esm/database/seed-command-action.mjs +1 -1
- package/esm/database/seed-command-action.mjs.map +1 -1
- package/esm/database/seeds/seed-records-table-migration.mjs +1 -1
- package/esm/database/seeds/seed-records-table-migration.mjs.map +1 -1
- package/esm/database/seeds/seeder.d.mts +1 -1
- package/esm/database/seeds/seeder.d.mts.map +1 -1
- package/esm/database/seeds/seeder.errors.d.mts +5 -1
- package/esm/database/seeds/seeder.errors.d.mts.map +1 -1
- package/esm/database/seeds/seeder.errors.mjs +3 -1
- package/esm/database/seeds/seeder.errors.mjs.map +1 -1
- package/esm/database/seeds/seeder.mjs +1 -1
- package/esm/database/seeds/seeder.mjs.map +1 -1
- package/esm/database/seeds/seeders.manager.mjs +1 -1
- package/esm/database/seeds/seeders.manager.mjs.map +1 -1
- package/esm/database/seeds/seeds-table-migration.mjs +1 -1
- package/esm/database/seeds/seeds-table-migration.mjs.map +1 -1
- package/esm/database/seeds/types.d.mts +1 -1
- package/esm/database/seeds/types.d.mts.map +1 -1
- package/esm/database/seeds/utils.mjs +1 -1
- package/esm/database/seeds/utils.mjs.map +1 -1
- package/esm/database/utils.d.mts +1 -1
- package/esm/database/utils.d.mts.map +1 -1
- package/esm/database/utils.mjs +1 -1
- package/esm/database/utils.mjs.map +1 -1
- package/esm/dev-server/app-module-registry.mjs +1 -1
- package/esm/dev-server/app-module-registry.mjs.map +1 -1
- package/esm/dev-server/boot-precondition-error.mjs +2 -1
- package/esm/dev-server/boot-precondition-error.mjs.map +1 -1
- package/esm/dev-server/build-development-openapi-document.mjs +1 -1
- package/esm/dev-server/build-development-openapi-document.mjs.map +1 -1
- package/esm/dev-server/check-for-updates.mjs +1 -1
- package/esm/dev-server/check-for-updates.mjs.map +1 -1
- package/esm/dev-server/collect-development-api-routes.mjs +1 -1
- package/esm/dev-server/collect-development-api-routes.mjs.map +1 -1
- package/esm/dev-server/create-worker.mjs +16 -10
- package/esm/dev-server/create-worker.mjs.map +1 -1
- package/esm/dev-server/dependency-graph.d.mts +1 -1
- 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 +1 -1
- package/esm/dev-server/dev-logger.mjs.map +1 -1
- package/esm/dev-server/development-server.mjs +9 -1
- package/esm/dev-server/development-server.mjs.map +1 -1
- package/esm/dev-server/events.mjs +1 -1
- package/esm/dev-server/events.mjs.map +1 -1
- package/esm/dev-server/extract-translation-keys.mjs +1 -1
- package/esm/dev-server/extract-translation-keys.mjs.map +1 -1
- package/esm/dev-server/file-event-handler.mjs +1 -1
- package/esm/dev-server/file-event-handler.mjs.map +1 -1
- package/esm/dev-server/file-manager.d.mts +1 -1
- package/esm/dev-server/file-manager.d.mts.map +1 -1
- package/esm/dev-server/file-manager.mjs +1 -1
- package/esm/dev-server/file-manager.mjs.map +1 -1
- package/esm/dev-server/file-operations.d.mts +1 -1
- package/esm/dev-server/file-operations.d.mts.map +1 -1
- package/esm/dev-server/file-operations.mjs +1 -1
- package/esm/dev-server/file-operations.mjs.map +1 -1
- package/esm/dev-server/files-orchestrator.mjs +22 -20
- package/esm/dev-server/files-orchestrator.mjs.map +1 -1
- package/esm/dev-server/files-watcher.mjs +2 -2
- package/esm/dev-server/files-watcher.mjs.map +1 -1
- package/esm/dev-server/flags.mjs +1 -1
- package/esm/dev-server/flags.mjs.map +1 -1
- package/esm/dev-server/health-checker/checkers/base-health-checker.mjs +1 -1
- package/esm/dev-server/health-checker/checkers/base-health-checker.mjs.map +1 -1
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.mjs +3 -4
- 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 +1 -1
- 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 +10 -4
- 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 +1 -1
- package/esm/dev-server/health-checker/file-health-result.d.mts.map +1 -1
- package/esm/dev-server/health-checker/file-health-result.mjs +1 -1
- package/esm/dev-server/health-checker/file-health-result.mjs.map +1 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs +16 -5
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs.map +1 -1
- package/esm/dev-server/health-checker/oxlint-runner.mjs +302 -0
- package/esm/dev-server/health-checker/oxlint-runner.mjs.map +1 -0
- package/esm/dev-server/health-checker/workers/eslint-health.worker.mjs +1 -1
- package/esm/dev-server/health-checker/workers/eslint-health.worker.mjs.map +1 -1
- package/esm/dev-server/health-checker/workers/oxlint-health.worker.d.mts +1 -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.mjs +1 -1
- package/esm/dev-server/health-checker/workers/ts-health.worker.mjs.map +1 -1
- package/esm/dev-server/layer-executor.mjs +1 -1
- package/esm/dev-server/layer-executor.mjs.map +1 -1
- package/esm/dev-server/legacy-locales-warning.mjs +1 -1
- package/esm/dev-server/legacy-locales-warning.mjs.map +1 -1
- package/esm/dev-server/loader/build-transpile-init.mjs +1 -1
- package/esm/dev-server/loader/build-transpile-init.mjs.map +1 -1
- package/esm/dev-server/loader/hook-thread.d.mts +1 -1
- package/esm/dev-server/loader/hook-thread.d.mts.map +1 -1
- package/esm/dev-server/loader/hook-thread.mjs +1 -1
- package/esm/dev-server/loader/hook-thread.mjs.map +1 -1
- package/esm/dev-server/loader/load-hook.d.mts +1 -1
- package/esm/dev-server/loader/load-hook.d.mts.map +1 -1
- package/esm/dev-server/loader/load-hook.mjs +1 -1
- package/esm/dev-server/loader/load-hook.mjs.map +1 -1
- package/esm/dev-server/loader/loader-port-acks.mjs +34 -0
- package/esm/dev-server/loader/loader-port-acks.mjs.map +1 -0
- package/esm/dev-server/loader/own-resolver.mjs +1 -1
- package/esm/dev-server/loader/own-resolver.mjs.map +1 -1
- package/esm/dev-server/loader/register-loader.mjs +2 -2
- package/esm/dev-server/loader/register-loader.mjs.map +1 -1
- package/esm/dev-server/loader/resolve-capture.mjs +1 -1
- package/esm/dev-server/loader/resolve-capture.mjs.map +1 -1
- package/esm/dev-server/loader/resolve-hook.d.mts +1 -1
- package/esm/dev-server/loader/resolve-hook.d.mts.map +1 -1
- package/esm/dev-server/loader/resolve-hook.mjs +1 -1
- package/esm/dev-server/loader/resolve-hook.mjs.map +1 -1
- package/esm/dev-server/loader/source-slug.mjs +1 -1
- package/esm/dev-server/loader/source-slug.mjs.map +1 -1
- package/esm/dev-server/loader/transpile-cache.mjs +2 -2
- package/esm/dev-server/loader/transpile-cache.mjs.map +1 -1
- package/esm/dev-server/loader/version-registry.mjs +1 -1
- package/esm/dev-server/loader/version-registry.mjs.map +1 -1
- package/esm/dev-server/manifest-manager.d.mts +1 -1
- package/esm/dev-server/manifest-manager.d.mts.map +1 -1
- package/esm/dev-server/manifest-manager.mjs +1 -1
- package/esm/dev-server/manifest-manager.mjs.map +1 -1
- package/esm/dev-server/model-module-registry.mjs +1 -1
- package/esm/dev-server/model-module-registry.mjs.map +1 -1
- package/esm/dev-server/model-resource-typings.mjs +1 -1
- package/esm/dev-server/model-resource-typings.mjs.map +1 -1
- package/esm/dev-server/module-loader.mjs +2 -1
- package/esm/dev-server/module-loader.mjs.map +1 -1
- package/esm/dev-server/package-json-manager.mjs +1 -1
- package/esm/dev-server/package-json-manager.mjs.map +1 -1
- package/esm/dev-server/parse-imports.mjs +74 -7
- package/esm/dev-server/parse-imports.mjs.map +1 -1
- package/esm/dev-server/read-config-ast.mjs +1 -1
- package/esm/dev-server/read-config-ast.mjs.map +1 -1
- package/esm/dev-server/ready-block.mjs +1 -1
- package/esm/dev-server/ready-block.mjs.map +1 -1
- package/esm/dev-server/register-dev-shortcuts.mjs +1 -1
- package/esm/dev-server/register-dev-shortcuts.mjs.map +1 -1
- package/esm/dev-server/register-installed-devtools.mjs +1 -1
- package/esm/dev-server/register-installed-devtools.mjs.map +1 -1
- package/esm/dev-server/restart-dev-server.mjs +1 -1
- package/esm/dev-server/restart-dev-server.mjs.map +1 -1
- package/esm/dev-server/route-types-publisher.mjs +2 -2
- package/esm/dev-server/route-types-publisher.mjs.map +1 -1
- package/esm/dev-server/run-connector-typings.mjs +1 -1
- package/esm/dev-server/run-connector-typings.mjs.map +1 -1
- package/esm/dev-server/run-typings-generation.mjs +1 -1
- package/esm/dev-server/run-typings-generation.mjs.map +1 -1
- package/esm/dev-server/shortcuts.mjs +1 -1
- package/esm/dev-server/shortcuts.mjs.map +1 -1
- package/esm/dev-server/special-file-patterns.mjs +1 -1
- package/esm/dev-server/special-file-patterns.mjs.map +1 -1
- package/esm/dev-server/special-files-collector.d.mts +1 -1
- package/esm/dev-server/special-files-collector.d.mts.map +1 -1
- package/esm/dev-server/special-files-collector.mjs +1 -1
- package/esm/dev-server/special-files-collector.mjs.map +1 -1
- package/esm/dev-server/start-development-server.mjs +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/supervisor.mjs.map +1 -1
- package/esm/dev-server/translation-keys-sources.mjs +2 -2
- package/esm/dev-server/translation-keys-sources.mjs.map +1 -1
- package/esm/dev-server/tsconfig-manager.mjs +1 -1
- package/esm/dev-server/tsconfig-manager.mjs.map +1 -1
- package/esm/dev-server/type-generator.mjs +33 -12
- package/esm/dev-server/type-generator.mjs.map +1 -1
- package/esm/dev-server/types.d.mts +1 -1
- package/esm/dev-server/types.d.mts.map +1 -1
- package/esm/dev-server/update-check-cache.mjs +1 -1
- package/esm/dev-server/update-check-cache.mjs.map +1 -1
- package/esm/dev-server/utils.mjs +1 -1
- package/esm/dev-server/utils.mjs.map +1 -1
- package/esm/encryption/encrypt.d.mts +1 -1
- package/esm/encryption/encrypt.d.mts.map +1 -1
- package/esm/encryption/encrypt.mjs +1 -1
- package/esm/encryption/encrypt.mjs.map +1 -1
- package/esm/encryption/hash.d.mts +1 -1
- package/esm/encryption/hash.d.mts.map +1 -1
- package/esm/encryption/hash.mjs +1 -1
- package/esm/encryption/hash.mjs.map +1 -1
- package/esm/encryption/password.d.mts +1 -1
- package/esm/encryption/password.d.mts.map +1 -1
- package/esm/encryption/password.mjs +1 -1
- package/esm/encryption/password.mjs.map +1 -1
- package/esm/encryption/types.d.mts +1 -1
- package/esm/encryption/types.d.mts.map +1 -1
- package/esm/errors/container-key-missing-error.mjs +2 -1
- package/esm/errors/container-key-missing-error.mjs.map +1 -1
- package/esm/errors/error-codes.d.mts +653 -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 +2 -1
- package/esm/errors/esbuild-binary-missing-error.mjs.map +1 -1
- package/esm/errors/index.d.mts +4 -0
- package/esm/errors/index.mjs +5 -0
- package/esm/errors/unknown-locale-error.mjs +2 -1
- package/esm/errors/unknown-locale-error.mjs.map +1 -1
- package/esm/errors/warlock-error.d.mts +23 -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 +48 -9
- package/esm/generations/add-command.action.mjs.map +1 -1
- package/esm/generations/features/access.feature.mjs +2 -2
- package/esm/generations/features/access.feature.mjs.map +1 -1
- package/esm/generations/features/ai-anthropic.feature.mjs +1 -1
- package/esm/generations/features/ai-anthropic.feature.mjs.map +1 -1
- package/esm/generations/features/ai-bedrock.feature.mjs +1 -1
- package/esm/generations/features/ai-bedrock.feature.mjs.map +1 -1
- package/esm/generations/features/ai-google.feature.mjs +1 -1
- package/esm/generations/features/ai-google.feature.mjs.map +1 -1
- package/esm/generations/features/ai-ollama.feature.mjs +1 -1
- package/esm/generations/features/ai-ollama.feature.mjs.map +1 -1
- package/esm/generations/features/ai-openai.feature.mjs +1 -1
- package/esm/generations/features/ai-openai.feature.mjs.map +1 -1
- package/esm/generations/features/ai-panoptic.feature.mjs +1 -1
- package/esm/generations/features/ai-panoptic.feature.mjs.map +1 -1
- package/esm/generations/features/ai-tools.feature.mjs +1 -1
- package/esm/generations/features/ai-tools.feature.mjs.map +1 -1
- package/esm/generations/features/ai-workspace.feature.mjs +1 -1
- package/esm/generations/features/ai-workspace.feature.mjs.map +1 -1
- package/esm/generations/features/ai.feature.mjs +1 -1
- package/esm/generations/features/ai.feature.mjs.map +1 -1
- package/esm/generations/features/auth-google.feature.mjs +1 -1
- package/esm/generations/features/auth-google.feature.mjs.map +1 -1
- package/esm/generations/features/auth-passkeys.feature.mjs +1 -1
- package/esm/generations/features/auth-passkeys.feature.mjs.map +1 -1
- package/esm/generations/features/bull-board.feature.mjs +2 -2
- package/esm/generations/features/bull-board.feature.mjs.map +1 -1
- package/esm/generations/features/devtools.feature.mjs +1 -1
- package/esm/generations/features/devtools.feature.mjs.map +1 -1
- package/esm/generations/features/herald.feature.mjs +1 -1
- package/esm/generations/features/herald.feature.mjs.map +1 -1
- package/esm/generations/features/image.feature.mjs +1 -1
- package/esm/generations/features/image.feature.mjs.map +1 -1
- package/esm/generations/features/index.mjs +1 -1
- package/esm/generations/features/index.mjs.map +1 -1
- package/esm/generations/features/mail.feature.mjs +1 -1
- package/esm/generations/features/mail.feature.mjs.map +1 -1
- package/esm/generations/features/mongodb.feature.mjs +1 -1
- package/esm/generations/features/mongodb.feature.mjs.map +1 -1
- package/esm/generations/features/mysql.feature.mjs +1 -1
- package/esm/generations/features/mysql.feature.mjs.map +1 -1
- package/esm/generations/features/notifications.feature.mjs +124 -17
- package/esm/generations/features/notifications.feature.mjs.map +1 -1
- package/esm/generations/features/postgres.feature.mjs +1 -1
- package/esm/generations/features/postgres.feature.mjs.map +1 -1
- package/esm/generations/features/queue.feature.mjs +2 -2
- package/esm/generations/features/queue.feature.mjs.map +1 -1
- package/esm/generations/features/react-email.feature.mjs +2 -2
- package/esm/generations/features/react-email.feature.mjs.map +1 -1
- package/esm/generations/features/react.feature.mjs +1 -1
- package/esm/generations/features/react.feature.mjs.map +1 -1
- package/esm/generations/features/redis.feature.mjs +1 -1
- package/esm/generations/features/redis.feature.mjs.map +1 -1
- package/esm/generations/features/s3.feature.mjs +1 -1
- package/esm/generations/features/s3.feature.mjs.map +1 -1
- package/esm/generations/features/scheduler.feature.mjs +1 -1
- package/esm/generations/features/scheduler.feature.mjs.map +1 -1
- package/esm/generations/features/ses.feature.mjs +1 -1
- package/esm/generations/features/ses.feature.mjs.map +1 -1
- package/esm/generations/features/shadcn.feature.mjs +2 -2
- package/esm/generations/features/shadcn.feature.mjs.map +1 -1
- package/esm/generations/features/shared/insert-connector-entry.mjs +1 -1
- package/esm/generations/features/shared/insert-connector-entry.mjs.map +1 -1
- package/esm/generations/features/shared/insert-queue-dashboard-block.mjs +1 -1
- package/esm/generations/features/shared/insert-queue-dashboard-block.mjs.map +1 -1
- package/esm/generations/features/shared/link-ai-package-import.mjs +2 -2
- package/esm/generations/features/shared/link-ai-package-import.mjs.map +1 -1
- package/esm/generations/features/shared/merge-web-sitemap-config.mjs +1 -1
- package/esm/generations/features/shared/merge-web-sitemap-config.mjs.map +1 -1
- package/esm/generations/features/shared/migration-timestamp.mjs +1 -1
- package/esm/generations/features/shared/migration-timestamp.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/shared/resolve-contact-scaffold.mjs +1 -1
- package/esm/generations/features/shared/resolve-contact-scaffold.mjs.map +1 -1
- package/esm/generations/features/sitemap.feature.mjs +2 -2
- package/esm/generations/features/sitemap.feature.mjs.map +1 -1
- package/esm/generations/features/socket.feature.mjs +1 -1
- package/esm/generations/features/socket.feature.mjs.map +1 -1
- package/esm/generations/features/tailwind.feature.mjs +2 -2
- package/esm/generations/features/tailwind.feature.mjs.map +1 -1
- package/esm/generations/features/test.feature.mjs +12 -7
- package/esm/generations/features/test.feature.mjs.map +1 -1
- package/esm/generations/features/types.mjs +1 -1
- package/esm/generations/features/types.mjs.map +1 -1
- package/esm/generations/features/web.feature.mjs +2 -2
- 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/pnpm-build-approvals.mjs +89 -3
- package/esm/generations/pnpm-build-approvals.mjs.map +1 -1
- package/esm/generations/stubs.mjs +327 -79
- package/esm/generations/stubs.mjs.map +1 -1
- package/esm/http/boot-port-preflight.d.mts +1 -1
- package/esm/http/boot-port-preflight.d.mts.map +1 -1
- package/esm/http/boot-port-preflight.mjs +1 -1
- 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 +1 -1
- package/esm/http/build-cors-options.mjs.map +1 -1
- package/esm/http/build-rate-limit-options.d.mts +35 -1
- package/esm/http/build-rate-limit-options.d.mts.map +1 -1
- package/esm/http/build-rate-limit-options.mjs +7 -1
- package/esm/http/build-rate-limit-options.mjs.map +1 -1
- package/esm/http/conditional-request.d.mts +86 -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 +1 -1
- package/esm/http/config.d.mts.map +1 -1
- package/esm/http/config.mjs +1 -1
- package/esm/http/config.mjs.map +1 -1
- package/esm/http/context/request-context.d.mts +1 -1
- package/esm/http/context/request-context.d.mts.map +1 -1
- package/esm/http/context/request-context.mjs +1 -1
- package/esm/http/context/request-context.mjs.map +1 -1
- package/esm/http/context/request-memo.d.mts +1 -1
- package/esm/http/context/request-memo.d.mts.map +1 -1
- package/esm/http/context/request-memo.mjs +1 -1
- package/esm/http/context/request-memo.mjs.map +1 -1
- package/esm/http/createHttpApplication.d.mts +1 -1
- package/esm/http/createHttpApplication.d.mts.map +1 -1
- package/esm/http/createHttpApplication.mjs +1 -1
- package/esm/http/createHttpApplication.mjs.map +1 -1
- package/esm/http/csp.d.mts +3 -1
- package/esm/http/csp.d.mts.map +1 -1
- package/esm/http/csp.mjs +2 -1
- package/esm/http/csp.mjs.map +1 -1
- package/esm/http/csrf-default-guard.d.mts +1 -1
- 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 +1 -1
- package/esm/http/csrf-origin-policy.d.mts.map +1 -1
- package/esm/http/csrf-origin-policy.mjs +1 -1
- package/esm/http/csrf-origin-policy.mjs.map +1 -1
- package/esm/http/database/RequestLog.d.mts +27 -135
- package/esm/http/database/RequestLog.d.mts.map +1 -1
- package/esm/http/database/RequestLog.mjs +1 -1
- package/esm/http/database/RequestLog.mjs.map +1 -1
- package/esm/http/error-codes.d.mts +1 -1
- package/esm/http/error-codes.d.mts.map +1 -1
- package/esm/http/error-codes.mjs +1 -1
- package/esm/http/error-codes.mjs.map +1 -1
- package/esm/http/error-mapper.d.mts +48 -0
- package/esm/http/error-mapper.d.mts.map +1 -0
- package/esm/http/error-mapper.mjs +48 -0
- package/esm/http/error-mapper.mjs.map +1 -0
- package/esm/http/errors/errors.d.mts +3 -1
- package/esm/http/errors/errors.d.mts.map +1 -1
- package/esm/http/errors/errors.mjs +2 -1
- package/esm/http/errors/errors.mjs.map +1 -1
- package/esm/http/escape-header-value.d.mts +18 -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 +1 -1
- package/esm/http/events.d.mts.map +1 -1
- package/esm/http/events.mjs +1 -1
- package/esm/http/events.mjs.map +1 -1
- package/esm/http/flush-pending-cookies.mjs +1 -1
- package/esm/http/flush-pending-cookies.mjs.map +1 -1
- package/esm/http/health.d.mts +1 -1
- package/esm/http/health.d.mts.map +1 -1
- package/esm/http/health.mjs +1 -1
- package/esm/http/health.mjs.map +1 -1
- package/esm/http/index.d.mts +13 -6
- package/esm/http/index.mjs +12 -6
- 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 +1 -1
- package/esm/http/middleware/cache-response-middleware.d.mts.map +1 -1
- package/esm/http/middleware/cache-response-middleware.mjs +1 -1
- package/esm/http/middleware/cache-response-middleware.mjs.map +1 -1
- package/esm/http/middleware/concurrency-limit.middleware.d.mts +1 -1
- package/esm/http/middleware/concurrency-limit.middleware.d.mts.map +1 -1
- package/esm/http/middleware/concurrency-limit.middleware.mjs +1 -1
- package/esm/http/middleware/concurrency-limit.middleware.mjs.map +1 -1
- package/esm/http/middleware/idempotency.middleware.d.mts +1 -1
- package/esm/http/middleware/idempotency.middleware.d.mts.map +1 -1
- package/esm/http/middleware/idempotency.middleware.mjs +1 -1
- package/esm/http/middleware/idempotency.middleware.mjs.map +1 -1
- package/esm/http/middleware/inject-request-context.d.mts +1 -1
- package/esm/http/middleware/inject-request-context.d.mts.map +1 -1
- package/esm/http/middleware/inject-request-context.mjs +4 -2
- package/esm/http/middleware/inject-request-context.mjs.map +1 -1
- package/esm/http/middleware/ip-filter.middleware.d.mts +1 -1
- package/esm/http/middleware/ip-filter.middleware.d.mts.map +1 -1
- package/esm/http/middleware/ip-filter.middleware.mjs +1 -1
- package/esm/http/middleware/ip-filter.middleware.mjs.map +1 -1
- package/esm/http/middleware/maintenance.middleware.d.mts +1 -1
- package/esm/http/middleware/maintenance.middleware.d.mts.map +1 -1
- package/esm/http/middleware/maintenance.middleware.mjs +1 -1
- package/esm/http/middleware/maintenance.middleware.mjs.map +1 -1
- package/esm/http/middleware/max-body-size.middleware.d.mts +1 -1
- package/esm/http/middleware/max-body-size.middleware.d.mts.map +1 -1
- package/esm/http/middleware/max-body-size.middleware.mjs +1 -1
- package/esm/http/middleware/max-body-size.middleware.mjs.map +1 -1
- package/esm/http/middleware/middleware-list.d.mts +1 -1
- package/esm/http/middleware/middleware-list.d.mts.map +1 -1
- package/esm/http/middleware/middleware-list.mjs +1 -1
- package/esm/http/middleware/middleware-list.mjs.map +1 -1
- package/esm/http/middleware/rate-limit.middleware.d.mts +20 -5
- package/esm/http/middleware/rate-limit.middleware.d.mts.map +1 -1
- package/esm/http/middleware/rate-limit.middleware.mjs +34 -12
- package/esm/http/middleware/rate-limit.middleware.mjs.map +1 -1
- package/esm/http/middleware/utils/cidr-match.d.mts +1 -1
- package/esm/http/middleware/utils/cidr-match.d.mts.map +1 -1
- package/esm/http/middleware/utils/cidr-match.mjs +1 -1
- package/esm/http/middleware/utils/cidr-match.mjs.map +1 -1
- package/esm/http/middleware/utils/idempotency-key.d.mts +1 -1
- package/esm/http/middleware/utils/idempotency-key.d.mts.map +1 -1
- package/esm/http/middleware/utils/idempotency-key.mjs +1 -1
- package/esm/http/middleware/utils/idempotency-key.mjs.map +1 -1
- package/esm/http/middleware/utils/parse-size.d.mts +1 -1
- package/esm/http/middleware/utils/parse-size.d.mts.map +1 -1
- package/esm/http/middleware/utils/parse-size.mjs +1 -1
- package/esm/http/middleware/utils/parse-size.mjs.map +1 -1
- package/esm/http/parse-urlencoded-body.mjs +1 -1
- package/esm/http/parse-urlencoded-body.mjs.map +1 -1
- package/esm/http/plugins.d.mts +9 -2
- package/esm/http/plugins.d.mts.map +1 -1
- package/esm/http/plugins.mjs +23 -6
- package/esm/http/plugins.mjs.map +1 -1
- package/esm/http/port-preflight.d.mts +1 -1
- package/esm/http/port-preflight.d.mts.map +1 -1
- package/esm/http/port-preflight.mjs +1 -1
- package/esm/http/port-preflight.mjs.map +1 -1
- package/esm/http/rate-limit-cache-store.mjs +156 -0
- package/esm/http/rate-limit-cache-store.mjs.map +1 -0
- package/esm/http/ready-report.d.mts +1 -1
- package/esm/http/ready-report.d.mts.map +1 -1
- package/esm/http/ready-report.mjs +1 -1
- package/esm/http/ready-report.mjs.map +1 -1
- package/esm/http/request-controller.d.mts +1 -1
- package/esm/http/request-controller.d.mts.map +1 -1
- package/esm/http/request-controller.mjs +1 -1
- package/esm/http/request-controller.mjs.map +1 -1
- package/esm/http/request-log-snapshot.d.mts +130 -0
- package/esm/http/request-log-snapshot.d.mts.map +1 -0
- package/esm/http/request-log-snapshot.mjs +220 -0
- package/esm/http/request-log-snapshot.mjs.map +1 -0
- package/esm/http/request.d.mts +43 -4
- package/esm/http/request.d.mts.map +1 -1
- package/esm/http/request.mjs +70 -6
- package/esm/http/request.mjs.map +1 -1
- package/esm/http/resolve-bind-port.mjs +1 -1
- package/esm/http/resolve-bind-port.mjs.map +1 -1
- package/esm/http/response.d.mts +51 -9
- package/esm/http/response.d.mts.map +1 -1
- package/esm/http/response.mjs +301 -101
- package/esm/http/response.mjs.map +1 -1
- package/esm/http/safe-redirect.d.mts +51 -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 +1 -1
- package/esm/http/serialized.d.mts.map +1 -1
- package/esm/http/server-rebuilt.d.mts +1 -1
- package/esm/http/server-rebuilt.d.mts.map +1 -1
- package/esm/http/server-rebuilt.mjs +1 -1
- package/esm/http/server-rebuilt.mjs.map +1 -1
- package/esm/http/server.d.mts +36 -6
- package/esm/http/server.d.mts.map +1 -1
- package/esm/http/server.mjs +80 -5
- package/esm/http/server.mjs.map +1 -1
- package/esm/http/stream-react-response.d.mts +1 -1
- package/esm/http/stream-react-response.d.mts.map +1 -1
- package/esm/http/stream-react-response.mjs +1 -1
- package/esm/http/stream-react-response.mjs.map +1 -1
- package/esm/http/stream-transport.mjs +77 -0
- package/esm/http/stream-transport.mjs.map +1 -0
- package/esm/http/tracing/trace-id.d.mts +1 -1
- package/esm/http/tracing/trace-id.d.mts.map +1 -1
- package/esm/http/tracing/trace-id.mjs +1 -1
- package/esm/http/tracing/trace-id.mjs.map +1 -1
- package/esm/http/tracing/tracing-dispatcher.d.mts +1 -1
- package/esm/http/tracing/tracing-dispatcher.d.mts.map +1 -1
- package/esm/http/tracing/tracing-dispatcher.mjs +1 -1
- package/esm/http/tracing/tracing-dispatcher.mjs.map +1 -1
- package/esm/http/tracing/tracing.type.d.mts +1 -1
- package/esm/http/tracing/tracing.type.d.mts.map +1 -1
- package/esm/http/types.d.mts +165 -7
- package/esm/http/types.d.mts.map +1 -1
- package/esm/http/uploaded-file.d.mts +2 -2
- package/esm/http/uploaded-file.d.mts.map +1 -1
- package/esm/http/uploaded-file.mjs +2 -2
- package/esm/http/uploaded-file.mjs.map +1 -1
- package/esm/http/uploads/detect-image-format.mjs +1 -1
- package/esm/http/uploads/detect-image-format.mjs.map +1 -1
- package/esm/http/uploads/generate-image-variant.mjs +2 -2
- package/esm/http/uploads/generate-image-variant.mjs.map +1 -1
- package/esm/http/uploads/generate-image-variants.d.mts +11 -8
- package/esm/http/uploads/generate-image-variants.d.mts.map +1 -1
- package/esm/http/uploads/generate-image-variants.mjs +75 -30
- 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 +185 -0
- package/esm/http/uploads/image-variant-cache.mjs.map +1 -0
- package/esm/http/uploads/image-variant-types.d.mts +3 -1
- package/esm/http/uploads/image-variant-types.d.mts.map +1 -1
- package/esm/http/uploads/image-variants-config-error.d.mts +4 -2
- package/esm/http/uploads/image-variants-config-error.d.mts.map +1 -1
- package/esm/http/uploads/image-variants-config-error.mjs +4 -3
- package/esm/http/uploads/image-variants-config-error.mjs.map +1 -1
- package/esm/http/uploads/index.d.mts +3 -1
- package/esm/http/uploads/index.mjs +3 -1
- package/esm/http/uploads/is-path-inside.mjs +1 -1
- package/esm/http/uploads/is-path-inside.mjs.map +1 -1
- package/esm/http/uploads/load-variant-source.mjs +2 -2
- package/esm/http/uploads/load-variant-source.mjs.map +1 -1
- package/esm/http/uploads/local-disk-root.mjs +24 -0
- package/esm/http/uploads/local-disk-root.mjs.map +1 -0
- 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 +37 -0
- package/esm/http/uploads/purge-image-variants.d.mts.map +1 -0
- package/esm/http/uploads/purge-image-variants.mjs +46 -0
- package/esm/http/uploads/purge-image-variants.mjs.map +1 -0
- package/esm/http/uploads/read-file-head.mjs +1 -1
- package/esm/http/uploads/read-file-head.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 +72 -0
- package/esm/http/uploads/resolve-image-variant.d.mts.map +1 -0
- package/esm/http/uploads/resolve-image-variant.mjs +99 -0
- package/esm/http/uploads/resolve-image-variant.mjs.map +1 -0
- package/esm/http/uploads/resolve-image-variants-config.mjs +6 -4
- package/esm/http/uploads/resolve-image-variants-config.mjs.map +1 -1
- package/esm/http/uploads/resolve-inline-image-content-type.mjs +1 -1
- package/esm/http/uploads/resolve-inline-image-content-type.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/resolve-upload-path.mjs +3 -2
- package/esm/http/uploads/resolve-upload-path.mjs.map +1 -1
- package/esm/http/uploads/resolve-variant-candidate.mjs +1 -1
- package/esm/http/uploads/resolve-variant-candidate.mjs.map +1 -1
- package/esm/http/uploads/single-flight.mjs +1 -1
- package/esm/http/uploads/single-flight.mjs.map +1 -1
- 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 +27 -7
- package/esm/http/uploads/uploaded-file.controller.d.mts.map +1 -1
- package/esm/http/uploads/uploaded-file.controller.mjs +72 -92
- package/esm/http/uploads/uploaded-file.controller.mjs.map +1 -1
- package/esm/http/uploads/variant-cache-key.mjs +31 -6
- package/esm/http/uploads/variant-cache-key.mjs.map +1 -1
- package/esm/http/uploads/variant-generations.mjs +1 -1
- package/esm/http/uploads/variant-generations.mjs.map +1 -1
- package/esm/http/uploads-config.d.mts +1 -1
- package/esm/http/uploads-config.d.mts.map +1 -1
- package/esm/http/uploads-config.mjs +1 -1
- package/esm/http/uploads-config.mjs.map +1 -1
- package/esm/http/uploads-types.d.mts +7 -3
- package/esm/http/uploads-types.d.mts.map +1 -1
- package/esm/http/xmlable.d.mts +1 -1
- package/esm/http/xmlable.d.mts.map +1 -1
- package/esm/image/image.d.mts +1 -1
- package/esm/image/image.d.mts.map +1 -1
- package/esm/image/image.mjs +1 -1
- package/esm/image/image.mjs.map +1 -1
- package/esm/index.d.mts +27 -12
- package/esm/index.mjs +23 -9
- package/esm/loader/app-module-importer.d.mts +1 -1
- package/esm/loader/app-module-importer.d.mts.map +1 -1
- package/esm/loader/app-module-importer.mjs +1 -1
- package/esm/loader/app-module-importer.mjs.map +1 -1
- package/esm/localization/parse-locale-dictionary.d.mts +3 -1
- 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 +1 -1
- package/esm/localization/register-locale-dictionary.d.mts.map +1 -1
- package/esm/localization/register-locale-dictionary.mjs +1 -1
- package/esm/localization/register-locale-dictionary.mjs.map +1 -1
- package/esm/logger/fatal-visibility.d.mts +1 -1
- package/esm/logger/fatal-visibility.d.mts.map +1 -1
- package/esm/logger/fatal-visibility.mjs +1 -1
- package/esm/logger/fatal-visibility.mjs.map +1 -1
- package/esm/logger/logger.d.mts +1 -1
- package/esm/logger/logger.d.mts.map +1 -1
- package/esm/logger/logger.mjs +1 -1
- package/esm/logger/logger.mjs.map +1 -1
- package/esm/logger/types.d.mts +1 -1
- package/esm/logger/types.d.mts.map +1 -1
- package/esm/mail/config.d.mts +13 -2
- package/esm/mail/config.d.mts.map +1 -1
- package/esm/mail/config.mjs +17 -2
- package/esm/mail/config.mjs.map +1 -1
- package/esm/mail/events.d.mts +1 -1
- package/esm/mail/events.d.mts.map +1 -1
- package/esm/mail/events.mjs +1 -1
- package/esm/mail/events.mjs.map +1 -1
- package/esm/mail/index.d.mts +1 -1
- package/esm/mail/index.mjs +1 -1
- package/esm/mail/mail.d.mts +1 -1
- package/esm/mail/mail.d.mts.map +1 -1
- package/esm/mail/mail.mjs +1 -1
- package/esm/mail/mail.mjs.map +1 -1
- package/esm/mail/mailer-pool.d.mts +1 -1
- package/esm/mail/mailer-pool.d.mts.map +1 -1
- package/esm/mail/mailer-pool.mjs +1 -1
- package/esm/mail/mailer-pool.mjs.map +1 -1
- package/esm/mail/react-mail.d.mts +1 -1
- package/esm/mail/react-mail.d.mts.map +1 -1
- package/esm/mail/react-mail.mjs +1 -1
- package/esm/mail/react-mail.mjs.map +1 -1
- package/esm/mail/send-mail.d.mts +1 -1
- package/esm/mail/send-mail.d.mts.map +1 -1
- package/esm/mail/send-mail.mjs +7 -7
- package/esm/mail/send-mail.mjs.map +1 -1
- package/esm/mail/test-mailbox.d.mts +1 -1
- package/esm/mail/test-mailbox.d.mts.map +1 -1
- package/esm/mail/test-mailbox.mjs +1 -1
- package/esm/mail/test-mailbox.mjs.map +1 -1
- package/esm/mail/types.d.mts +1 -1
- package/esm/mail/types.d.mts.map +1 -1
- package/esm/mail/types.mjs +1 -1
- package/esm/mail/types.mjs.map +1 -1
- package/esm/manifest/manifest-manager.mjs +1 -1
- package/esm/manifest/manifest-manager.mjs.map +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 +1 -1
- package/esm/openapi/build-openapi-document.d.mts.map +1 -1
- package/esm/openapi/build-openapi-document.mjs +9 -6
- package/esm/openapi/build-openapi-document.mjs.map +1 -1
- package/esm/openapi/cast-schema.mjs +1 -1
- package/esm/openapi/cast-schema.mjs.map +1 -1
- package/esm/openapi/collect-openapi-document.mjs +1 -1
- package/esm/openapi/collect-openapi-document.mjs.map +1 -1
- package/esm/openapi/development-openapi-provider.d.mts +1 -1
- package/esm/openapi/development-openapi-provider.d.mts.map +1 -1
- package/esm/openapi/development-openapi-provider.mjs +1 -1
- package/esm/openapi/development-openapi-provider.mjs.map +1 -1
- package/esm/openapi/error-responses.mjs +29 -3
- package/esm/openapi/error-responses.mjs.map +1 -1
- package/esm/openapi/openapi-child-output.mjs +1 -1
- package/esm/openapi/openapi-child-output.mjs.map +1 -1
- package/esm/openapi/openapi-protocol.mjs +1 -1
- package/esm/openapi/openapi-protocol.mjs.map +1 -1
- package/esm/openapi/paths.mjs +1 -1
- package/esm/openapi/paths.mjs.map +1 -1
- package/esm/openapi/postman/build-request-body.mjs +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 +1 -1
- package/esm/openapi/postman/build-saved-responses.mjs.map +1 -1
- package/esm/openapi/postman/example-from-schema.d.mts +1 -1
- package/esm/openapi/postman/example-from-schema.d.mts.map +1 -1
- package/esm/openapi/postman/example-from-schema.mjs +1 -1
- package/esm/openapi/postman/example-from-schema.mjs.map +1 -1
- package/esm/openapi/postman/http-status-text.mjs +1 -1
- package/esm/openapi/postman/http-status-text.mjs.map +1 -1
- package/esm/openapi/postman/openapi-to-postman-collection.d.mts +1 -1
- package/esm/openapi/postman/openapi-to-postman-collection.d.mts.map +1 -1
- package/esm/openapi/postman/openapi-to-postman-collection.mjs +1 -1
- package/esm/openapi/postman/openapi-to-postman-collection.mjs.map +1 -1
- package/esm/openapi/postman/postman-types.d.mts +1 -1
- package/esm/openapi/postman/postman-types.d.mts.map +1 -1
- package/esm/openapi/postman/resolve-operation-auth.mjs +1 -1
- package/esm/openapi/postman/resolve-operation-auth.mjs.map +1 -1
- package/esm/openapi/postman/schema-refs.d.mts +1 -1
- package/esm/openapi/postman/schema-refs.d.mts.map +1 -1
- package/esm/openapi/postman/schema-refs.mjs +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 +1 -1
- package/esm/openapi/request-schemas.mjs.map +1 -1
- package/esm/openapi/response-schemas.mjs +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 +1 -1
- 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 +4 -3
- package/esm/openapi/types.d.mts.map +1 -1
- package/esm/production/assert-dist-ready-to-start.mjs +1 -1
- package/esm/production/assert-dist-ready-to-start.mjs.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-app-production.mjs +1 -1
- package/esm/production/build-app-production.mjs.map +1 -1
- package/esm/production/build-contributions.mjs +1 -1
- package/esm/production/build-contributions.mjs.map +1 -1
- package/esm/production/bundle-framework-dependencies.mjs +1 -1
- package/esm/production/bundle-framework-dependencies.mjs.map +1 -1
- package/esm/production/dist-build-manifest.mjs +1 -1
- package/esm/production/dist-build-manifest.mjs.map +1 -1
- package/esm/production/esbuild-plugins.mjs +1 -1
- package/esm/production/esbuild-plugins.mjs.map +1 -1
- package/esm/production/esbuild-preflight.mjs +1 -1
- package/esm/production/esbuild-preflight.mjs.map +1 -1
- package/esm/production/production-builder.mjs +13 -5
- package/esm/production/production-builder.mjs.map +1 -1
- package/esm/production/production-supervisor.mjs +1 -1
- package/esm/production/production-supervisor.mjs.map +1 -1
- package/esm/production/promote-dist.mjs +1 -1
- package/esm/production/promote-dist.mjs.map +1 -1
- package/esm/production/registration-child-runner.mjs +1 -1
- package/esm/production/registration-child-runner.mjs.map +1 -1
- package/esm/production/resolve-build-config.d.mts +1 -1
- 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.mjs +1 -1
- package/esm/production/route-registration-child.mjs.map +1 -1
- package/esm/production/route-registration-snapshot.mjs +1 -1
- package/esm/production/route-registration-snapshot.mjs.map +1 -1
- package/esm/production/tsconfig-path-aliases.mjs +1 -1
- package/esm/production/tsconfig-path-aliases.mjs.map +1 -1
- package/esm/react/index.d.mts +1 -1
- package/esm/react/index.d.mts.map +1 -1
- package/esm/react/index.mjs +1 -1
- package/esm/react/index.mjs.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.d.mts +1 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.d.mts.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.mjs +1 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.mjs.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.mts +1 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.mts.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.mjs +1 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.mjs.map +1 -1
- package/esm/repositories/adapters/cascade/filter-applicator.mjs +1 -1
- package/esm/repositories/adapters/cascade/filter-applicator.mjs.map +1 -1
- package/esm/repositories/contracts/query-builder.contract.d.mts +1 -1
- package/esm/repositories/contracts/query-builder.contract.d.mts.map +1 -1
- package/esm/repositories/contracts/repository-adapter.contract.d.mts +1 -1
- package/esm/repositories/contracts/repository-adapter.contract.d.mts.map +1 -1
- package/esm/repositories/contracts/types.d.mts +1 -1
- package/esm/repositories/contracts/types.d.mts.map +1 -1
- package/esm/repositories/repository.manager.d.mts +1 -1
- package/esm/repositories/repository.manager.d.mts.map +1 -1
- package/esm/repositories/repository.manager.mjs +1 -1
- package/esm/repositories/repository.manager.mjs.map +1 -1
- package/esm/resource/define-resource.d.mts +1 -1
- package/esm/resource/define-resource.d.mts.map +1 -1
- package/esm/resource/define-resource.mjs +1 -1
- package/esm/resource/define-resource.mjs.map +1 -1
- package/esm/resource/nullable-resource.d.mts +1 -1
- package/esm/resource/nullable-resource.d.mts.map +1 -1
- package/esm/resource/nullable-resource.mjs +1 -1
- package/esm/resource/nullable-resource.mjs.map +1 -1
- package/esm/resource/register-resource.d.mts +1 -1
- package/esm/resource/register-resource.d.mts.map +1 -1
- package/esm/resource/register-resource.mjs +1 -1
- package/esm/resource/register-resource.mjs.map +1 -1
- package/esm/resource/resource-field-builder.d.mts +1 -1
- package/esm/resource/resource-field-builder.d.mts.map +1 -1
- package/esm/resource/resource-field-builder.mjs +1 -1
- package/esm/resource/resource-field-builder.mjs.map +1 -1
- package/esm/resource/resource.d.mts +1 -1
- package/esm/resource/resource.d.mts.map +1 -1
- package/esm/resource/resource.mjs +1 -1
- package/esm/resource/resource.mjs.map +1 -1
- package/esm/resource/types.d.mts +1 -1
- package/esm/resource/types.d.mts.map +1 -1
- package/esm/restful/restful.d.mts +6 -6
- package/esm/restful/restful.d.mts.map +1 -1
- package/esm/restful/restful.mjs +1 -1
- package/esm/restful/restful.mjs.map +1 -1
- package/esm/router/build-route-rate-limit.mjs +1 -1
- package/esm/router/build-route-rate-limit.mjs.map +1 -1
- package/esm/router/describe-route-for-log.mjs +1 -1
- package/esm/router/describe-route-for-log.mjs.map +1 -1
- package/esm/router/dev-dispatch.mjs +32 -13
- package/esm/router/dev-dispatch.mjs.map +1 -1
- package/esm/router/index.d.mts +4 -2
- package/esm/router/index.mjs +2 -0
- package/esm/router/log-request-lifecycle.mjs +1 -1
- package/esm/router/log-request-lifecycle.mjs.map +1 -1
- package/esm/router/named-api-routes-with-responses.mjs +1 -1
- package/esm/router/named-api-routes-with-responses.mjs.map +1 -1
- package/esm/router/normalize-request-path.d.mts +1 -1
- package/esm/router/normalize-request-path.d.mts.map +1 -1
- package/esm/router/normalize-request-path.mjs +1 -1
- package/esm/router/normalize-request-path.mjs.map +1 -1
- package/esm/router/normalize-route-path.d.mts +1 -1
- package/esm/router/normalize-route-path.d.mts.map +1 -1
- package/esm/router/normalize-route-path.mjs +1 -1
- package/esm/router/normalize-route-path.mjs.map +1 -1
- package/esm/router/positional-handler-diagnostics.d.mts +1 -1
- package/esm/router/positional-handler-diagnostics.d.mts.map +1 -1
- package/esm/router/positional-handler-diagnostics.mjs +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/response-schema-types.mjs +1 -1
- package/esm/router/response-schema-types.mjs.map +1 -1
- package/esm/router/route-builder.d.mts +1 -1
- package/esm/router/route-builder.d.mts.map +1 -1
- package/esm/router/route-builder.mjs +1 -1
- package/esm/router/route-builder.mjs.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 +1 -1
- package/esm/router/route-name-method-suffix.d.mts.map +1 -1
- package/esm/router/route-name-method-suffix.mjs +1 -1
- package/esm/router/route-name-method-suffix.mjs.map +1 -1
- package/esm/router/route-name-taken-error.d.mts +14 -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 -1
- package/esm/router/route-registry.d.mts.map +1 -1
- package/esm/router/route-registry.mjs +1 -1
- package/esm/router/route-registry.mjs.map +1 -1
- package/esm/router/router.d.mts +35 -9
- package/esm/router/router.d.mts.map +1 -1
- package/esm/router/router.mjs +78 -40
- package/esm/router/router.mjs.map +1 -1
- package/esm/router/types.d.mts +150 -18
- package/esm/router/types.d.mts.map +1 -1
- package/esm/router/unguarded-route-diagnostics.d.mts +40 -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/types.d.mts +1 -1
- package/esm/socket/types.d.mts.map +1 -1
- package/esm/socket/utils.d.mts +1 -1
- package/esm/socket/utils.d.mts.map +1 -1
- package/esm/socket/utils.mjs +1 -1
- package/esm/socket/utils.mjs.map +1 -1
- package/esm/storage/config.d.mts +1 -1
- package/esm/storage/config.d.mts.map +1 -1
- package/esm/storage/config.mjs +1 -1
- package/esm/storage/config.mjs.map +1 -1
- package/esm/storage/context/storage-driver-context.d.mts +1 -1
- package/esm/storage/context/storage-driver-context.d.mts.map +1 -1
- package/esm/storage/context/storage-driver-context.mjs +1 -1
- package/esm/storage/context/storage-driver-context.mjs.map +1 -1
- package/esm/storage/drivers/cloud-driver.d.mts +1 -1
- package/esm/storage/drivers/cloud-driver.d.mts.map +1 -1
- package/esm/storage/drivers/cloud-driver.mjs +1 -1
- package/esm/storage/drivers/cloud-driver.mjs.map +1 -1
- package/esm/storage/drivers/do-spaces-driver.d.mts +1 -1
- package/esm/storage/drivers/do-spaces-driver.d.mts.map +1 -1
- package/esm/storage/drivers/do-spaces-driver.mjs +1 -1
- package/esm/storage/drivers/do-spaces-driver.mjs.map +1 -1
- package/esm/storage/drivers/local-driver.d.mts +12 -1
- package/esm/storage/drivers/local-driver.d.mts.map +1 -1
- package/esm/storage/drivers/local-driver.mjs +33 -1
- package/esm/storage/drivers/local-driver.mjs.map +1 -1
- package/esm/storage/drivers/r2-driver.d.mts +1 -1
- package/esm/storage/drivers/r2-driver.d.mts.map +1 -1
- package/esm/storage/drivers/r2-driver.mjs +1 -1
- package/esm/storage/drivers/r2-driver.mjs.map +1 -1
- package/esm/storage/drivers/s3-driver.d.mts +1 -1
- package/esm/storage/drivers/s3-driver.d.mts.map +1 -1
- package/esm/storage/drivers/s3-driver.mjs +1 -1
- package/esm/storage/drivers/s3-driver.mjs.map +1 -1
- package/esm/storage/index.d.mts +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 +1 -1
- package/esm/storage/scoped-storage.d.mts.map +1 -1
- package/esm/storage/scoped-storage.mjs +1 -1
- package/esm/storage/scoped-storage.mjs.map +1 -1
- package/esm/storage/storage-file.d.mts +1 -1
- package/esm/storage/storage-file.d.mts.map +1 -1
- package/esm/storage/storage-file.mjs +1 -1
- package/esm/storage/storage-file.mjs.map +1 -1
- package/esm/storage/storage.d.mts +17 -3
- package/esm/storage/storage.d.mts.map +1 -1
- package/esm/storage/storage.mjs +23 -1
- package/esm/storage/storage.mjs.map +1 -1
- package/esm/storage/types.d.mts +3 -2
- package/esm/storage/types.d.mts.map +1 -1
- package/esm/storage/utils/classify-ip-address.d.mts +1 -1
- package/esm/storage/utils/classify-ip-address.d.mts.map +1 -1
- package/esm/storage/utils/classify-ip-address.mjs +1 -1
- package/esm/storage/utils/classify-ip-address.mjs.map +1 -1
- package/esm/storage/utils/contain-path.d.mts +1 -1
- package/esm/storage/utils/contain-path.d.mts.map +1 -1
- package/esm/storage/utils/contain-path.mjs +1 -1
- package/esm/storage/utils/contain-path.mjs.map +1 -1
- package/esm/storage/utils/mime.d.mts +1 -1
- package/esm/storage/utils/mime.d.mts.map +1 -1
- package/esm/storage/utils/mime.mjs +1 -1
- package/esm/storage/utils/mime.mjs.map +1 -1
- package/esm/storage/utils/safe-fetch.d.mts +1 -1
- package/esm/storage/utils/safe-fetch.d.mts.map +1 -1
- package/esm/storage/utils/safe-fetch.mjs +1 -1
- package/esm/storage/utils/safe-fetch.mjs.map +1 -1
- package/esm/storage/utils/storage-capability-error.d.mts +1 -1
- package/esm/storage/utils/storage-capability-error.d.mts.map +1 -1
- package/esm/storage/utils/storage-capability-error.mjs +1 -1
- package/esm/storage/utils/storage-capability-error.mjs.map +1 -1
- package/esm/storage/utils/storage-error.d.mts +1 -1
- package/esm/storage/utils/storage-error.d.mts.map +1 -1
- package/esm/storage/utils/storage-error.mjs +1 -1
- package/esm/storage/utils/storage-error.mjs.map +1 -1
- package/esm/storage/utils/storage-not-initialized-error.d.mts +3 -1
- package/esm/storage/utils/storage-not-initialized-error.d.mts.map +1 -1
- package/esm/storage/utils/storage-not-initialized-error.mjs +2 -1
- package/esm/storage/utils/storage-not-initialized-error.mjs.map +1 -1
- package/esm/tests/authenticated-test-client.d.mts +32 -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 +59 -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 +29 -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 +32 -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 +13 -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 +22 -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 +8 -0
- package/esm/tests/fakes/index.mjs +10 -0
- package/esm/tests/fakes/mail-fake.d.mts +41 -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 +48 -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 +31 -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 +39 -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 +14 -2
- package/esm/tests/index.mjs +15 -2
- package/esm/tests/snapshot-response.d.mts +34 -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 +23 -1
- package/esm/tests/start-http-development-server.d.mts.map +1 -1
- package/esm/tests/start-http-development-server.mjs +37 -4
- package/esm/tests/start-http-development-server.mjs.map +1 -1
- package/esm/tests/test-connectors-selection.d.mts +1 -1
- package/esm/tests/test-connectors-selection.d.mts.map +1 -1
- package/esm/tests/test-connectors-selection.mjs +1 -1
- package/esm/tests/test-connectors-selection.mjs.map +1 -1
- package/esm/tests/test-helpers.d.mts +21 -2
- package/esm/tests/test-helpers.d.mts.map +1 -1
- package/esm/tests/test-helpers.mjs +41 -28
- package/esm/tests/test-helpers.mjs.map +1 -1
- package/esm/tests/test-http-server.d.mts +62 -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/test-lifecycle-state.mjs.map +1 -1
- package/esm/tests/test-server-port-channel.mjs +1 -1
- package/esm/tests/test-server-port-channel.mjs.map +1 -1
- package/esm/tests/test-setup-timeout.mjs +1 -1
- package/esm/tests/test-setup-timeout.mjs.map +1 -1
- package/esm/tests/vitest-setup.d.mts +12 -1
- package/esm/tests/vitest-setup.d.mts.map +1 -1
- package/esm/tests/vitest-setup.mjs +13 -5
- package/esm/tests/vitest-setup.mjs.map +1 -1
- package/esm/tooling/agents-md/agents-md-markers.d.mts +27 -0
- package/esm/tooling/agents-md/agents-md-markers.d.mts.map +1 -0
- package/esm/tooling/agents-md/agents-md-markers.mjs +59 -0
- package/esm/tooling/agents-md/agents-md-markers.mjs.map +1 -0
- package/esm/tooling/agents-md/agents-md-refresher.d.mts +36 -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 +30 -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 +33 -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 +33 -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 +31 -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 +109 -0
- package/esm/tooling/board/board.d.mts.map +1 -0
- package/esm/tooling/board/board.mjs +406 -0
- package/esm/tooling/board/board.mjs.map +1 -0
- package/esm/tooling/board/board.types.d.mts +72 -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 +33 -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 +62 -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 +34 -0
- package/esm/tooling/check/conventions-step.d.mts.map +1 -0
- package/esm/tooling/check/conventions-step.mjs +184 -0
- package/esm/tooling/check/conventions-step.mjs.map +1 -0
- package/esm/tooling/check/environment-step.d.mts +18 -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.d.mts +8 -0
- package/esm/tooling/check/index.mjs +10 -0
- package/esm/tooling/check/lint-step.d.mts +19 -0
- package/esm/tooling/check/lint-step.d.mts.map +1 -0
- package/esm/tooling/check/lint-step.mjs +111 -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 +35 -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 +48 -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 +648 -0
- package/esm/tooling/check/security-conventions.mjs.map +1 -0
- package/esm/tooling/check/source-ast.mjs +195 -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 +34 -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 +39 -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 +91 -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 +78 -0
- package/esm/tooling/generate/generation.d.mts.map +1 -0
- package/esm/tooling/generate/generation.mjs +123 -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 +40 -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 +37 -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 +41 -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 +9 -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 +10 -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 +7 -0
- package/esm/tooling/inspect/index.mjs +7 -0
- package/esm/tooling/inspect/inspect-app.d.mts +53 -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 +15 -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 +196 -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 +26 -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 +49 -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 +72 -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 +62 -0
- package/esm/tooling/mcp/load-ai-tools.d.mts.map +1 -0
- package/esm/tooling/mcp/load-ai-tools.mjs +44 -0
- package/esm/tooling/mcp/load-ai-tools.mjs.map +1 -0
- package/esm/tooling/mcp/mcp-tools.d.mts +60 -0
- package/esm/tooling/mcp/mcp-tools.d.mts.map +1 -0
- package/esm/tooling/mcp/mcp-tools.mjs +513 -0
- package/esm/tooling/mcp/mcp-tools.mjs.map +1 -0
- package/esm/tooling/mcp/start-mcp-server.d.mts +56 -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 +45 -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/trace/trace-report.types.d.mts +71 -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 +83 -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.d.mts +1 -0
- package/esm/tooling/typecheck/index.mjs +3 -0
- package/esm/tooling/typecheck/run-typecheck.d.mts +59 -0
- package/esm/tooling/typecheck/run-typecheck.d.mts.map +1 -0
- package/esm/tooling/typecheck/run-typecheck.mjs +153 -0
- package/esm/tooling/typecheck/run-typecheck.mjs.map +1 -0
- package/esm/updater/package-manager.mjs +1 -1
- package/esm/updater/package-manager.mjs.map +1 -1
- package/esm/updater/update-warlock-packages.mjs +1 -1
- 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 +48 -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/types.d.mts +1 -1
- package/esm/use-cases/types.d.mts.map +1 -1
- package/esm/use-cases/use-case-broadcast.d.mts +1 -1
- package/esm/use-cases/use-case-broadcast.d.mts.map +1 -1
- package/esm/use-cases/use-case-broadcast.mjs +1 -1
- package/esm/use-cases/use-case-broadcast.mjs.map +1 -1
- package/esm/use-cases/use-case-events.d.mts +1 -1
- package/esm/use-cases/use-case-events.d.mts.map +1 -1
- package/esm/use-cases/use-case-events.mjs +1 -1
- package/esm/use-cases/use-case-events.mjs.map +1 -1
- package/esm/use-cases/use-case-pipeline.d.mts +1 -1
- package/esm/use-cases/use-case-pipeline.d.mts.map +1 -1
- package/esm/use-cases/use-case-pipeline.mjs +1 -1
- package/esm/use-cases/use-case-pipeline.mjs.map +1 -1
- package/esm/use-cases/use-case.d.mts +1 -1
- package/esm/use-cases/use-case.d.mts.map +1 -1
- package/esm/use-cases/use-case.errors.d.mts +1 -1
- package/esm/use-cases/use-case.errors.d.mts.map +1 -1
- package/esm/use-cases/use-case.errors.mjs +1 -1
- package/esm/use-cases/use-case.errors.mjs.map +1 -1
- package/esm/use-cases/use-case.mjs +1 -1
- package/esm/use-cases/use-case.mjs.map +1 -1
- package/esm/use-cases/use-cases-registry.d.mts +1 -1
- package/esm/use-cases/use-cases-registry.d.mts.map +1 -1
- package/esm/use-cases/use-cases-registry.mjs +1 -1
- package/esm/use-cases/use-cases-registry.mjs.map +1 -1
- package/esm/utils/app-log.d.mts +6 -6
- package/esm/utils/app-log.d.mts.map +1 -1
- package/esm/utils/app-log.mjs +1 -1
- package/esm/utils/app-log.mjs.map +1 -1
- package/esm/utils/clock.d.mts +33 -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 +1 -1
- package/esm/utils/database-log.d.mts.map +1 -1
- package/esm/utils/database-log.mjs +1 -1
- package/esm/utils/database-log.mjs.map +1 -1
- package/esm/utils/detect-environment-overrides.mjs +1 -1
- package/esm/utils/detect-environment-overrides.mjs.map +1 -1
- package/esm/utils/environment.d.mts +1 -1
- package/esm/utils/environment.d.mts.map +1 -1
- package/esm/utils/environment.mjs +1 -1
- package/esm/utils/environment.mjs.map +1 -1
- package/esm/utils/framework-vesion.mjs +2 -2
- package/esm/utils/framework-vesion.mjs.map +1 -1
- package/esm/utils/get-localized.d.mts +1 -1
- package/esm/utils/get-localized.d.mts.map +1 -1
- package/esm/utils/get-localized.mjs +1 -1
- package/esm/utils/get-localized.mjs.map +1 -1
- package/esm/utils/ids.d.mts +32 -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 +3 -0
- package/esm/utils/index.mjs +3 -0
- package/esm/utils/is-test-file.mjs +1 -1
- package/esm/utils/is-test-file.mjs.map +1 -1
- package/esm/utils/load-environment.mjs +1 -1
- package/esm/utils/load-environment.mjs.map +1 -1
- package/esm/utils/normalized-path.d.mts +1 -1
- package/esm/utils/normalized-path.d.mts.map +1 -1
- package/esm/utils/normalized-path.mjs +1 -1
- package/esm/utils/normalized-path.mjs.map +1 -1
- package/esm/utils/npm-registry.d.mts +1 -1
- package/esm/utils/npm-registry.d.mts.map +1 -1
- package/esm/utils/npm-registry.mjs +1 -1
- package/esm/utils/npm-registry.mjs.map +1 -1
- package/esm/utils/paths.d.mts +1 -1
- package/esm/utils/paths.d.mts.map +1 -1
- package/esm/utils/paths.mjs +1 -1
- package/esm/utils/paths.mjs.map +1 -1
- package/esm/utils/promise-all-object.d.mts +1 -1
- package/esm/utils/promise-all-object.d.mts.map +1 -1
- package/esm/utils/promise-all-object.mjs +1 -1
- package/esm/utils/promise-all-object.mjs.map +1 -1
- package/esm/utils/queue.d.mts +1 -1
- package/esm/utils/queue.d.mts.map +1 -1
- package/esm/utils/queue.mjs +1 -1
- package/esm/utils/queue.mjs.map +1 -1
- package/esm/utils/recorded-environment-overrides.mjs +1 -1
- package/esm/utils/recorded-environment-overrides.mjs.map +1 -1
- package/esm/utils/report-environment-overrides.mjs +1 -1
- package/esm/utils/report-environment-overrides.mjs.map +1 -1
- package/esm/utils/runtime.d.mts +59 -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 -1
- package/esm/utils/sleep.d.mts.map +1 -1
- package/esm/utils/sleep.mjs +1 -1
- package/esm/utils/sleep.mjs.map +1 -1
- package/esm/utils/sluggable.d.mts +1 -1
- package/esm/utils/sluggable.d.mts.map +1 -1
- package/esm/utils/sluggable.mjs +1 -1
- package/esm/utils/sluggable.mjs.map +1 -1
- package/esm/utils/to-json.d.mts +1 -1
- package/esm/utils/to-json.d.mts.map +1 -1
- package/esm/utils/to-json.mjs +1 -1
- package/esm/utils/to-json.mjs.map +1 -1
- package/esm/utils/types.d.mts +1 -1
- package/esm/utils/types.d.mts.map +1 -1
- package/esm/utils/urls.d.mts +1 -1
- package/esm/utils/urls.d.mts.map +1 -1
- package/esm/utils/urls.mjs +1 -1
- package/esm/utils/urls.mjs.map +1 -1
- package/esm/utils/version-compare.d.mts +1 -1
- package/esm/utils/version-compare.d.mts.map +1 -1
- package/esm/utils/version-compare.mjs +1 -1
- package/esm/utils/version-compare.mjs.map +1 -1
- package/esm/validation/database/exists-except-current-id.d.mts +1 -1
- package/esm/validation/database/exists-except-current-id.d.mts.map +1 -1
- package/esm/validation/database/exists-except-current-id.mjs +1 -1
- package/esm/validation/database/exists-except-current-id.mjs.map +1 -1
- package/esm/validation/database/exists-except-current-user.d.mts +1 -1
- package/esm/validation/database/exists-except-current-user.d.mts.map +1 -1
- package/esm/validation/database/exists-except-current-user.mjs +1 -1
- package/esm/validation/database/exists-except-current-user.mjs.map +1 -1
- package/esm/validation/database/types.d.mts +1 -1
- package/esm/validation/database/types.d.mts.map +1 -1
- package/esm/validation/database/unique-except-current-id.d.mts +1 -1
- package/esm/validation/database/unique-except-current-id.d.mts.map +1 -1
- package/esm/validation/database/unique-except-current-id.mjs +1 -1
- package/esm/validation/database/unique-except-current-id.mjs.map +1 -1
- package/esm/validation/database/unique-except-current-user.d.mts +1 -1
- package/esm/validation/database/unique-except-current-user.d.mts.map +1 -1
- package/esm/validation/database/unique-except-current-user.mjs +1 -1
- package/esm/validation/database/unique-except-current-user.mjs.map +1 -1
- package/esm/validation/file/file.d.mts +1 -1
- package/esm/validation/file/file.d.mts.map +1 -1
- package/esm/validation/file/file.mjs +1 -1
- package/esm/validation/file/file.mjs.map +1 -1
- package/esm/validation/index.d.mts +1 -1
- package/esm/validation/init.mjs +1 -1
- package/esm/validation/init.mjs.map +1 -1
- package/esm/validation/plugins/database-plugin.mjs +1 -1
- package/esm/validation/plugins/database-plugin.mjs.map +1 -1
- package/esm/validation/plugins/file-plugin.mjs +1 -1
- package/esm/validation/plugins/file-plugin.mjs.map +1 -1
- package/esm/validation/plugins/localized-plugin.mjs +1 -1
- package/esm/validation/plugins/localized-plugin.mjs.map +1 -1
- package/esm/validation/types.d.mts +58 -3
- package/esm/validation/types.d.mts.map +1 -1
- package/esm/validation/validateAll.mjs +20 -3
- 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 +28 -41
- package/esm/validation/validators/file-validator.d.mts.map +1 -1
- package/esm/validation/validators/file-validator.mjs +4 -1
- package/esm/validation/validators/file-validator.mjs.map +1 -1
- package/esm/vite/lower-stage3-decorators.d.mts +1 -1
- package/esm/vite/lower-stage3-decorators.d.mts.map +1 -1
- package/esm/vite/lower-stage3-decorators.mjs +1 -1
- package/esm/vite/lower-stage3-decorators.mjs.map +1 -1
- package/esm/warlock-config/bundle-config.mjs +148 -0
- package/esm/warlock-config/bundle-config.mjs.map +1 -0
- package/esm/warlock-config/default-configurations.mjs +1 -1
- package/esm/warlock-config/default-configurations.mjs.map +1 -1
- package/esm/warlock-config/define-config.d.mts +1 -1
- package/esm/warlock-config/define-config.d.mts.map +1 -1
- package/esm/warlock-config/define-config.mjs +1 -1
- package/esm/warlock-config/define-config.mjs.map +1 -1
- package/esm/warlock-config/index.d.mts +1 -1
- package/esm/warlock-config/index.mjs +1 -1
- package/esm/warlock-config/normalize-build-config.mjs +1 -1
- package/esm/warlock-config/normalize-build-config.mjs.map +1 -1
- package/esm/warlock-config/types.d.mts +28 -4
- package/esm/warlock-config/types.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.d.mts +32 -7
- package/esm/warlock-config/warlock-config.manager.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.mjs +94 -18
- package/esm/warlock-config/warlock-config.manager.mjs.map +1 -1
- package/esm/warlock-config/warn-deprecated-config.mjs +1 -1
- package/esm/warlock-config/warn-deprecated-config.mjs.map +1 -1
- package/llms-full.txt +3271 -784
- package/llms.txt +16 -6
- package/package.json +51 -14
- 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 +129 -14
- package/skills/create-controller/SKILL.md +29 -12
- package/skills/create-module/SKILL.md +3 -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 +26 -7
- package/skills/index.md +9 -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 +119 -10
- 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 +111 -20
- package/skills/send-response/SKILL.md +189 -16
- package/skills/store-file/SKILL.md +97 -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 +413 -0
- package/skills/upload-file/SKILL.md +31 -33
- package/skills/use-app-context/SKILL.md +38 -31
- package/skills/use-middleware/SKILL.md +46 -26
- package/skills/use-model-transformers/SKILL.md +37 -28
- package/skills/use-repository/SKILL.md +2 -2
- package/skills/validate-input/SKILL.md +73 -29
- package/skills/warlock-agents-md/SKILL.md +96 -0
- package/skills/warlock-board/SKILL.md +123 -0
- package/skills/warlock-check/SKILL.md +132 -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
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { clock } from "../../utils/clock.mjs";
|
|
2
|
+
import { FakeAssertionError, describeRecorded } from "./fake-assertion-error.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../packages/core/src/tests/fakes/queue-fake.ts
|
|
5
|
+
const INTERCEPTOR_KEY = Symbol.for("warlock.queue.dispatchInterceptor");
|
|
6
|
+
const pushed = [];
|
|
7
|
+
let sequence = 0;
|
|
8
|
+
let previous;
|
|
9
|
+
let installed = false;
|
|
10
|
+
function nameOf(job) {
|
|
11
|
+
return typeof job === "string" ? job : job.name;
|
|
12
|
+
}
|
|
13
|
+
function isSubset(expected, actual) {
|
|
14
|
+
if (expected === actual) return true;
|
|
15
|
+
if (typeof expected !== "object" || expected === null) return false;
|
|
16
|
+
if (typeof actual !== "object" || actual === null) return false;
|
|
17
|
+
return Object.entries(expected).every(([key, value]) => isSubset(value, actual[key]));
|
|
18
|
+
}
|
|
19
|
+
function matches(job, matcher) {
|
|
20
|
+
if (matcher === void 0) return true;
|
|
21
|
+
if (typeof matcher === "function") return matcher(job);
|
|
22
|
+
return isSubset(matcher, job.payload);
|
|
23
|
+
}
|
|
24
|
+
function describeJob(job) {
|
|
25
|
+
return `${job.name} on "${job.queue}" with ${JSON.stringify(job.payload)}`;
|
|
26
|
+
}
|
|
27
|
+
const interceptor = {
|
|
28
|
+
dispatch({ name, queue, payload, options }) {
|
|
29
|
+
const explicitId = typeof options.jobId === "string" ? options.jobId : void 0;
|
|
30
|
+
const existing = explicitId ? pushed.find((job) => job.id === explicitId) : void 0;
|
|
31
|
+
if (existing) return {
|
|
32
|
+
id: existing.id,
|
|
33
|
+
name: existing.name,
|
|
34
|
+
queue: existing.queue
|
|
35
|
+
};
|
|
36
|
+
sequence += 1;
|
|
37
|
+
const job = {
|
|
38
|
+
id: explicitId ?? `fake-${sequence}`,
|
|
39
|
+
name,
|
|
40
|
+
queue,
|
|
41
|
+
payload,
|
|
42
|
+
options: { ...options },
|
|
43
|
+
pushedAt: clock.now()
|
|
44
|
+
};
|
|
45
|
+
pushed.push(job);
|
|
46
|
+
return {
|
|
47
|
+
id: job.id,
|
|
48
|
+
name,
|
|
49
|
+
queue
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
find({ name, id }) {
|
|
53
|
+
const job = pushed.find((entry) => entry.id === id && entry.name === name);
|
|
54
|
+
if (!job) return void 0;
|
|
55
|
+
return {
|
|
56
|
+
id: job.id,
|
|
57
|
+
name: job.name,
|
|
58
|
+
queue: job.queue,
|
|
59
|
+
state: "waiting",
|
|
60
|
+
payload: job.payload,
|
|
61
|
+
progress: 0,
|
|
62
|
+
attemptsMade: 0,
|
|
63
|
+
createdAt: job.pushedAt
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Records every `@warlock.js/queue` dispatch instead of pushing it to Redis.
|
|
69
|
+
*
|
|
70
|
+
* Installed by default in the test environment. Jobs are recorded, not run:
|
|
71
|
+
* call the job's handler directly to test what it does.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* await placeOrder(order);
|
|
75
|
+
*
|
|
76
|
+
* queueFake.assertPushed(sendInvoice, { orderId: order.id });
|
|
77
|
+
* queueFake.assertPushedCount(1);
|
|
78
|
+
*/
|
|
79
|
+
const queueFake = {
|
|
80
|
+
/** Start recording (idempotent). Clears anything recorded before. */
|
|
81
|
+
install() {
|
|
82
|
+
const holder = globalThis;
|
|
83
|
+
if (!installed) {
|
|
84
|
+
previous = holder[INTERCEPTOR_KEY];
|
|
85
|
+
installed = true;
|
|
86
|
+
}
|
|
87
|
+
holder[INTERCEPTOR_KEY] = interceptor;
|
|
88
|
+
queueFake.clear();
|
|
89
|
+
},
|
|
90
|
+
/** Stop recording; dispatches reach the broker again. */
|
|
91
|
+
restore() {
|
|
92
|
+
if (!installed) return;
|
|
93
|
+
globalThis[INTERCEPTOR_KEY] = previous;
|
|
94
|
+
previous = void 0;
|
|
95
|
+
installed = false;
|
|
96
|
+
queueFake.clear();
|
|
97
|
+
},
|
|
98
|
+
isInstalled() {
|
|
99
|
+
return installed;
|
|
100
|
+
},
|
|
101
|
+
/** Forget recorded jobs. */
|
|
102
|
+
clear() {
|
|
103
|
+
pushed.length = 0;
|
|
104
|
+
sequence = 0;
|
|
105
|
+
},
|
|
106
|
+
/** Recorded jobs, oldest first; optionally only one job type. */
|
|
107
|
+
pushed(job, matcher) {
|
|
108
|
+
return pushed.filter((entry) => (job === void 0 || entry.name === nameOf(job)) && matches(entry, matcher));
|
|
109
|
+
},
|
|
110
|
+
/** Assert `job` was pushed (with a payload matching `matcher`); returns the first match. */
|
|
111
|
+
assertPushed(job, matcher) {
|
|
112
|
+
const found = queueFake.pushed(job, matcher)[0];
|
|
113
|
+
if (!found) throw new FakeAssertionError(`Expected ${nameOf(job)} to be pushed${matcher === void 0 ? "" : " with a matching payload"}. ${describeRecorded(pushed, describeJob, "pushed")}`);
|
|
114
|
+
return found;
|
|
115
|
+
},
|
|
116
|
+
/** Assert `job` was not pushed (with a matching payload). */
|
|
117
|
+
assertNotPushed(job, matcher) {
|
|
118
|
+
const found = queueFake.pushed(job, matcher);
|
|
119
|
+
if (found.length > 0) throw new FakeAssertionError(`Expected ${nameOf(job)} not to be pushed. ${describeRecorded(found, describeJob, "pushed")}`);
|
|
120
|
+
},
|
|
121
|
+
/** Assert exactly `count` jobs were pushed — of type `job` when given. */
|
|
122
|
+
assertPushedCount(count, job) {
|
|
123
|
+
const found = queueFake.pushed(job);
|
|
124
|
+
if (found.length !== count) throw new FakeAssertionError(`Expected ${count} ${job === void 0 ? "job(s)" : nameOf(job)} pushed, found ${found.length}. ${describeRecorded(pushed, describeJob, "pushed")}`);
|
|
125
|
+
},
|
|
126
|
+
/** Assert nothing was pushed. */
|
|
127
|
+
assertNothingPushed() {
|
|
128
|
+
queueFake.assertPushedCount(0);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
//#endregion
|
|
133
|
+
export { queueFake };
|
|
134
|
+
//# sourceMappingURL=queue-fake.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue-fake.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/tests/fakes/queue-fake.ts"],"sourcesContent":["import { clock } from \"../../utils/clock\";\nimport { FakeAssertionError, describeRecorded } from \"./fake-assertion-error\";\n\n/**\n * One job `dispatch()`ed while the fake was installed.\n *\n * Structural on purpose: core has no dependency on `@warlock.js/queue`. The\n * fake talks to it through the global dispatch-interceptor slot that package\n * reads (`setDispatchInterceptor`).\n */\nexport type PushedJob = {\n id: string;\n name: string;\n queue: string;\n payload: unknown;\n /** The dispatch options (`delay`, `priority`, `jobId`, ...). */\n options: Record<string, unknown>;\n pushedAt: Date;\n};\n\n/** A job name, or anything with a `name` — the object `defineJob()` returns. */\nexport type JobReference = string | { readonly name: string };\n\n/** Which pushed jobs an assertion is about: a predicate, or a payload subset. */\nexport type PushedJobMatcher = ((job: PushedJob) => boolean) | Record<string, unknown>;\n\nconst INTERCEPTOR_KEY = Symbol.for(\"warlock.queue.dispatchInterceptor\");\n\ntype Interceptor = {\n dispatch(job: {\n name: string;\n queue: string;\n payload: unknown;\n options: Record<string, unknown>;\n }): { id: string; name: string; queue: string };\n find(job: { name: string; id: string }): unknown;\n};\n\ntype InterceptorHolder = { [INTERCEPTOR_KEY]?: Interceptor };\n\nconst pushed: PushedJob[] = [];\nlet sequence = 0;\nlet previous: Interceptor | undefined;\nlet installed = false;\n\nfunction nameOf(job: JobReference): string {\n return typeof job === \"string\" ? job : job.name;\n}\n\nfunction isSubset(expected: unknown, actual: unknown): boolean {\n if (expected === actual) return true;\n if (typeof expected !== \"object\" || expected === null) return false;\n if (typeof actual !== \"object\" || actual === null) return false;\n\n return Object.entries(expected).every(([key, value]) =>\n isSubset(value, (actual as Record<string, unknown>)[key]),\n );\n}\n\nfunction matches(job: PushedJob, matcher: PushedJobMatcher | undefined): boolean {\n if (matcher === undefined) return true;\n if (typeof matcher === \"function\") return matcher(job);\n\n return isSubset(matcher, job.payload);\n}\n\nfunction describeJob(job: PushedJob): string {\n return `${job.name} on \"${job.queue}\" with ${JSON.stringify(job.payload)}`;\n}\n\nconst interceptor: Interceptor = {\n dispatch({ name, queue, payload, options }) {\n // An explicit jobId makes a real dispatch idempotent; keep that contract.\n const explicitId = typeof options.jobId === \"string\" ? options.jobId : undefined;\n const existing = explicitId ? pushed.find((job) => job.id === explicitId) : undefined;\n\n if (existing) return { id: existing.id, name: existing.name, queue: existing.queue };\n\n sequence += 1;\n\n const job: PushedJob = {\n id: explicitId ?? `fake-${sequence}`,\n name,\n queue,\n payload,\n options: { ...options },\n pushedAt: clock.now(),\n };\n\n pushed.push(job);\n\n return { id: job.id, name, queue };\n },\n\n find({ name, id }) {\n const job = pushed.find((entry) => entry.id === id && entry.name === name);\n\n if (!job) return undefined;\n\n return {\n id: job.id,\n name: job.name,\n queue: job.queue,\n state: \"waiting\",\n payload: job.payload,\n progress: 0,\n attemptsMade: 0,\n createdAt: job.pushedAt,\n };\n },\n};\n\n/**\n * Records every `@warlock.js/queue` dispatch instead of pushing it to Redis.\n *\n * Installed by default in the test environment. Jobs are recorded, not run:\n * call the job's handler directly to test what it does.\n *\n * @example\n * await placeOrder(order);\n *\n * queueFake.assertPushed(sendInvoice, { orderId: order.id });\n * queueFake.assertPushedCount(1);\n */\nexport const queueFake = {\n /** Start recording (idempotent). Clears anything recorded before. */\n install(): void {\n const holder = globalThis as InterceptorHolder;\n\n if (!installed) {\n previous = holder[INTERCEPTOR_KEY];\n installed = true;\n }\n\n holder[INTERCEPTOR_KEY] = interceptor;\n queueFake.clear();\n },\n\n /** Stop recording; dispatches reach the broker again. */\n restore(): void {\n if (!installed) return;\n\n (globalThis as InterceptorHolder)[INTERCEPTOR_KEY] = previous;\n previous = undefined;\n installed = false;\n queueFake.clear();\n },\n\n isInstalled(): boolean {\n return installed;\n },\n\n /** Forget recorded jobs. */\n clear(): void {\n pushed.length = 0;\n sequence = 0;\n },\n\n /** Recorded jobs, oldest first; optionally only one job type. */\n pushed(job?: JobReference, matcher?: PushedJobMatcher): PushedJob[] {\n return pushed.filter(\n (entry) => (job === undefined || entry.name === nameOf(job)) && matches(entry, matcher),\n );\n },\n\n /** Assert `job` was pushed (with a payload matching `matcher`); returns the first match. */\n assertPushed(job: JobReference, matcher?: PushedJobMatcher): PushedJob {\n const found = queueFake.pushed(job, matcher)[0];\n\n if (!found) {\n throw new FakeAssertionError(\n `Expected ${nameOf(job)} to be pushed${matcher === undefined ? \"\" : \" with a matching payload\"}. ${describeRecorded(pushed, describeJob, \"pushed\")}`,\n );\n }\n\n return found;\n },\n\n /** Assert `job` was not pushed (with a matching payload). */\n assertNotPushed(job: JobReference, matcher?: PushedJobMatcher): void {\n const found = queueFake.pushed(job, matcher);\n\n if (found.length > 0) {\n throw new FakeAssertionError(\n `Expected ${nameOf(job)} not to be pushed. ${describeRecorded(found, describeJob, \"pushed\")}`,\n );\n }\n },\n\n /** Assert exactly `count` jobs were pushed — of type `job` when given. */\n assertPushedCount(count: number, job?: JobReference): void {\n const found = queueFake.pushed(job);\n\n if (found.length !== count) {\n throw new FakeAssertionError(\n `Expected ${count} ${job === undefined ? \"job(s)\" : nameOf(job)} pushed, found ${found.length}. ${describeRecorded(pushed, describeJob, \"pushed\")}`,\n );\n }\n },\n\n /** Assert nothing was pushed. */\n assertNothingPushed(): void {\n queueFake.assertPushedCount(0);\n },\n};\n"],"mappings":";;;;AA0BA,MAAM,kBAAkB,OAAO,IAAI,mCAAmC;AActE,MAAM,SAAsB,CAAC;AAC7B,IAAI,WAAW;AACf,IAAI;AACJ,IAAI,YAAY;AAEhB,SAAS,OAAO,KAA2B;CACzC,OAAO,OAAO,QAAQ,WAAW,MAAM,IAAI;AAC7C;AAEA,SAAS,SAAS,UAAmB,QAA0B;CAC7D,IAAI,aAAa,QAAQ,OAAO;CAChC,IAAI,OAAO,aAAa,YAAY,aAAa,MAAM,OAAO;CAC9D,IAAI,OAAO,WAAW,YAAY,WAAW,MAAM,OAAO;CAE1D,OAAO,OAAO,QAAQ,QAAQ,CAAC,CAAC,OAAO,CAAC,KAAK,WAC3C,SAAS,OAAQ,OAAmC,IAAI,CAC1D;AACF;AAEA,SAAS,QAAQ,KAAgB,SAAgD;CAC/E,IAAI,YAAY,QAAW,OAAO;CAClC,IAAI,OAAO,YAAY,YAAY,OAAO,QAAQ,GAAG;CAErD,OAAO,SAAS,SAAS,IAAI,OAAO;AACtC;AAEA,SAAS,YAAY,KAAwB;CAC3C,OAAO,GAAG,IAAI,KAAK,OAAO,IAAI,MAAM,SAAS,KAAK,UAAU,IAAI,OAAO;AACzE;AAEA,MAAM,cAA2B;CAC/B,SAAS,EAAE,MAAM,OAAO,SAAS,WAAW;EAE1C,MAAM,aAAa,OAAO,QAAQ,UAAU,WAAW,QAAQ,QAAQ;EACvE,MAAM,WAAW,aAAa,OAAO,MAAM,QAAQ,IAAI,OAAO,UAAU,IAAI;EAE5E,IAAI,UAAU,OAAO;GAAE,IAAI,SAAS;GAAI,MAAM,SAAS;GAAM,OAAO,SAAS;EAAM;EAEnF,YAAY;EAEZ,MAAM,MAAiB;GACrB,IAAI,cAAc,QAAQ;GAC1B;GACA;GACA;GACA,SAAS,EAAE,GAAG,QAAQ;GACtB,UAAU,MAAM,IAAI;EACtB;EAEA,OAAO,KAAK,GAAG;EAEf,OAAO;GAAE,IAAI,IAAI;GAAI;GAAM;EAAM;CACnC;CAEA,KAAK,EAAE,MAAM,MAAM;EACjB,MAAM,MAAM,OAAO,MAAM,UAAU,MAAM,OAAO,MAAM,MAAM,SAAS,IAAI;EAEzE,IAAI,CAAC,KAAK,OAAO;EAEjB,OAAO;GACL,IAAI,IAAI;GACR,MAAM,IAAI;GACV,OAAO,IAAI;GACX,OAAO;GACP,SAAS,IAAI;GACb,UAAU;GACV,cAAc;GACd,WAAW,IAAI;EACjB;CACF;AACF;;;;;;;;;;;;;AAcA,MAAa,YAAY;;CAEvB,UAAgB;EACd,MAAM,SAAS;EAEf,IAAI,CAAC,WAAW;GACd,WAAW,OAAO;GAClB,YAAY;EACd;EAEA,OAAO,mBAAmB;EAC1B,UAAU,MAAM;CAClB;;CAGA,UAAgB;EACd,IAAI,CAAC,WAAW;EAEhB,AAAC,WAAiC,mBAAmB;EACrD,WAAW;EACX,YAAY;EACZ,UAAU,MAAM;CAClB;CAEA,cAAuB;EACrB,OAAO;CACT;;CAGA,QAAc;EACZ,OAAO,SAAS;EAChB,WAAW;CACb;;CAGA,OAAO,KAAoB,SAAyC;EAClE,OAAO,OAAO,QACX,WAAW,QAAQ,UAAa,MAAM,SAAS,OAAO,GAAG,MAAM,QAAQ,OAAO,OAAO,CACxF;CACF;;CAGA,aAAa,KAAmB,SAAuC;EACrE,MAAM,QAAQ,UAAU,OAAO,KAAK,OAAO,CAAC,CAAC;EAE7C,IAAI,CAAC,OACH,MAAM,IAAI,mBACR,YAAY,OAAO,GAAG,EAAE,eAAe,YAAY,SAAY,KAAK,2BAA2B,IAAI,iBAAiB,QAAQ,aAAa,QAAQ,GACnJ;EAGF,OAAO;CACT;;CAGA,gBAAgB,KAAmB,SAAkC;EACnE,MAAM,QAAQ,UAAU,OAAO,KAAK,OAAO;EAE3C,IAAI,MAAM,SAAS,GACjB,MAAM,IAAI,mBACR,YAAY,OAAO,GAAG,EAAE,qBAAqB,iBAAiB,OAAO,aAAa,QAAQ,GAC5F;CAEJ;;CAGA,kBAAkB,OAAe,KAA0B;EACzD,MAAM,QAAQ,UAAU,OAAO,GAAG;EAElC,IAAI,MAAM,WAAW,OACnB,MAAM,IAAI,mBACR,YAAY,MAAM,GAAG,QAAQ,SAAY,WAAW,OAAO,GAAG,EAAE,iBAAiB,MAAM,OAAO,IAAI,iBAAiB,QAAQ,aAAa,QAAQ,GAClJ;CAEJ;;CAGA,sBAA4B;EAC1B,UAAU,kBAAkB,CAAC;CAC/B;AACF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { StorageDriverName } from "../../storage/types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../packages/core/src/tests/fakes/storage-fake.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Points every configured storage driver — local, S3, R2, Spaces — at a
|
|
6
|
+
* local temporary directory.
|
|
7
|
+
*
|
|
8
|
+
* Installed by default in the test environment: uploads and `storage.put()`
|
|
9
|
+
* calls land on disk under one temp root (a folder per driver name), never in
|
|
10
|
+
* a bucket and never in the app's real `storage/` folder. The root is shared
|
|
11
|
+
* with the HTTP test server, so a file an HTTP request stored is visible to
|
|
12
|
+
* the test that sent it. The process that created the root deletes it on
|
|
13
|
+
* restore.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* await uploadAvatar(user, file);
|
|
17
|
+
*
|
|
18
|
+
* await storageFake.assertExists(`avatars/${user.id}.png`);
|
|
19
|
+
*/
|
|
20
|
+
declare const storageFake: {
|
|
21
|
+
/** Re-register every driver as a local one under the temp root. */install(): Promise<void>; /** Drop the fake drivers; the real configuration is read again on next use. */
|
|
22
|
+
restore(): Promise<void>;
|
|
23
|
+
isInstalled(): boolean; /** The temp directory every fake driver lives under. */
|
|
24
|
+
root(): string; /** Every stored file, as `<driver>/<path>`, sorted. */
|
|
25
|
+
files(driver?: StorageDriverName): string[]; /** Assert a file exists, on the default driver unless `driver` is given. */
|
|
26
|
+
assertExists(location: string, driver?: StorageDriverName): Promise<void>; /** Assert a file does not exist, on the default driver unless `driver` is given. */
|
|
27
|
+
assertMissing(location: string, driver?: StorageDriverName): Promise<void>;
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { storageFake };
|
|
31
|
+
//# sourceMappingURL=storage-fake.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-fake.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tests/fakes/storage-fake.ts"],"mappings":";;;;;;;;;;;;;;;;;;;cA2Da,WAAA;gFAEM,OAAA,QA6EkB;aAtClB,OAAA;;kBAmDmB;iBArBrB,iBAAA,aAqB2D;iCAbvC,MAAA,GAAW,iBAAA,GAAoB,OAAA;kCAa9B,MAAA,GAAW,iBAAA,GAAoB,OAAA;AAAA"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { storageConfigurations } from "../../storage/config.mjs";
|
|
2
|
+
import { storage } from "../../storage/storage.mjs";
|
|
3
|
+
import "../../storage/index.mjs";
|
|
4
|
+
import { FakeAssertionError } from "./fake-assertion-error.mjs";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { existsSync, mkdirSync, mkdtempSync, readdirSync, rmSync } from "node:fs";
|
|
7
|
+
import os from "node:os";
|
|
8
|
+
|
|
9
|
+
//#region ../../packages/core/src/tests/fakes/storage-fake.ts
|
|
10
|
+
/**
|
|
11
|
+
* The env var that carries the fake storage root from the process that
|
|
12
|
+
* created it (the HTTP test server, in `globalSetup`) to the test workers it
|
|
13
|
+
* spawns, so both sides read and write the same files. Like
|
|
14
|
+
* `WARLOCK_TEST_SERVER_PORT`, it is plumbing between the kit's own processes.
|
|
15
|
+
*/
|
|
16
|
+
const TEST_STORAGE_ROOT_ENV_KEY = "WARLOCK_TEST_STORAGE_ROOT";
|
|
17
|
+
let root;
|
|
18
|
+
let ownsRoot = false;
|
|
19
|
+
let installed = false;
|
|
20
|
+
let wasInitialized = false;
|
|
21
|
+
function currentRoot() {
|
|
22
|
+
if (!root) throw new FakeAssertionError("storageFake is not installed. It installs by default in the test environment; check `tests.fakes` in src/config/tests.ts, or call storageFake.install().");
|
|
23
|
+
return root;
|
|
24
|
+
}
|
|
25
|
+
function listFiles(directory, base) {
|
|
26
|
+
if (!existsSync(directory)) return [];
|
|
27
|
+
return readdirSync(directory, { withFileTypes: true }).flatMap((entry) => {
|
|
28
|
+
const absolute = path.join(directory, entry.name);
|
|
29
|
+
return entry.isDirectory() ? listFiles(absolute, base) : [path.relative(base, absolute).split(path.sep).join("/")];
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Points every configured storage driver — local, S3, R2, Spaces — at a
|
|
34
|
+
* local temporary directory.
|
|
35
|
+
*
|
|
36
|
+
* Installed by default in the test environment: uploads and `storage.put()`
|
|
37
|
+
* calls land on disk under one temp root (a folder per driver name), never in
|
|
38
|
+
* a bucket and never in the app's real `storage/` folder. The root is shared
|
|
39
|
+
* with the HTTP test server, so a file an HTTP request stored is visible to
|
|
40
|
+
* the test that sent it. The process that created the root deletes it on
|
|
41
|
+
* restore.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await uploadAvatar(user, file);
|
|
45
|
+
*
|
|
46
|
+
* await storageFake.assertExists(`avatars/${user.id}.png`);
|
|
47
|
+
*/
|
|
48
|
+
const storageFake = {
|
|
49
|
+
/** Re-register every driver as a local one under the temp root. */
|
|
50
|
+
async install() {
|
|
51
|
+
if (!installed) {
|
|
52
|
+
wasInitialized = storage.isInitialized;
|
|
53
|
+
installed = true;
|
|
54
|
+
}
|
|
55
|
+
if (!root) {
|
|
56
|
+
const shared = process.env[TEST_STORAGE_ROOT_ENV_KEY];
|
|
57
|
+
if (shared) {
|
|
58
|
+
root = shared;
|
|
59
|
+
ownsRoot = false;
|
|
60
|
+
} else {
|
|
61
|
+
root = mkdtempSync(path.join(os.tmpdir(), "warlock-test-storage-"));
|
|
62
|
+
ownsRoot = true;
|
|
63
|
+
process.env[TEST_STORAGE_ROOT_ENV_KEY] = root;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
await storage.init();
|
|
67
|
+
const fakeRoot = root;
|
|
68
|
+
for (const name of storage.driverNames()) {
|
|
69
|
+
const driverRoot = path.join(fakeRoot, name);
|
|
70
|
+
mkdirSync(driverRoot, { recursive: true });
|
|
71
|
+
storage.register(name, storageConfigurations.local({
|
|
72
|
+
root: driverRoot,
|
|
73
|
+
urlPrefix: `/test-storage/${name}`
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
const defaultName = storage.getDefaultName();
|
|
77
|
+
if (defaultName) storage.setDefault(defaultName);
|
|
78
|
+
},
|
|
79
|
+
/** Drop the fake drivers; the real configuration is read again on next use. */
|
|
80
|
+
async restore() {
|
|
81
|
+
if (!installed) return;
|
|
82
|
+
installed = false;
|
|
83
|
+
storage.reset();
|
|
84
|
+
if (wasInitialized) await storage.init();
|
|
85
|
+
if (root && ownsRoot) {
|
|
86
|
+
rmSync(root, {
|
|
87
|
+
recursive: true,
|
|
88
|
+
force: true
|
|
89
|
+
});
|
|
90
|
+
if (process.env["WARLOCK_TEST_STORAGE_ROOT"] === root) delete process.env[TEST_STORAGE_ROOT_ENV_KEY];
|
|
91
|
+
}
|
|
92
|
+
root = void 0;
|
|
93
|
+
ownsRoot = false;
|
|
94
|
+
},
|
|
95
|
+
isInstalled() {
|
|
96
|
+
return installed;
|
|
97
|
+
},
|
|
98
|
+
/** The temp directory every fake driver lives under. */
|
|
99
|
+
root() {
|
|
100
|
+
return currentRoot();
|
|
101
|
+
},
|
|
102
|
+
/** Every stored file, as `<driver>/<path>`, sorted. */
|
|
103
|
+
files(driver) {
|
|
104
|
+
const base = currentRoot();
|
|
105
|
+
const directory = driver ? path.join(base, driver) : base;
|
|
106
|
+
return listFiles(directory, directory).sort();
|
|
107
|
+
},
|
|
108
|
+
/** Assert a file exists, on the default driver unless `driver` is given. */
|
|
109
|
+
async assertExists(location, driver) {
|
|
110
|
+
currentRoot();
|
|
111
|
+
if (!await (driver ? storage.use(driver) : storage).exists(location)) throw new FakeAssertionError(`Expected ${JSON.stringify(location)} to be stored${driver ? ` on "${driver}"` : ""}. Stored files: ${JSON.stringify(storageFake.files())}.`);
|
|
112
|
+
},
|
|
113
|
+
/** Assert a file does not exist, on the default driver unless `driver` is given. */
|
|
114
|
+
async assertMissing(location, driver) {
|
|
115
|
+
currentRoot();
|
|
116
|
+
if (await (driver ? storage.use(driver) : storage).exists(location)) throw new FakeAssertionError(`Expected ${JSON.stringify(location)} not to be stored${driver ? ` on "${driver}"` : ""}, but it is.`);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
//#endregion
|
|
121
|
+
export { storageFake };
|
|
122
|
+
//# sourceMappingURL=storage-fake.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-fake.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/tests/fakes/storage-fake.ts"],"sourcesContent":["import { existsSync, mkdirSync, mkdtempSync, readdirSync, rmSync } from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { storage } from \"../../storage\";\nimport { storageConfigurations } from \"../../storage/config\";\nimport type { StorageDriverName } from \"../../storage/types\";\nimport { FakeAssertionError } from \"./fake-assertion-error\";\n\n/**\n * The env var that carries the fake storage root from the process that\n * created it (the HTTP test server, in `globalSetup`) to the test workers it\n * spawns, so both sides read and write the same files. Like\n * `WARLOCK_TEST_SERVER_PORT`, it is plumbing between the kit's own processes.\n */\nexport const TEST_STORAGE_ROOT_ENV_KEY = \"WARLOCK_TEST_STORAGE_ROOT\";\n\nlet root: string | undefined;\nlet ownsRoot = false;\nlet installed = false;\nlet wasInitialized = false;\n\nfunction currentRoot(): string {\n if (!root) {\n throw new FakeAssertionError(\n \"storageFake is not installed. It installs by default in the test environment; check `tests.fakes` in src/config/tests.ts, or call storageFake.install().\",\n );\n }\n\n return root;\n}\n\nfunction listFiles(directory: string, base: string): string[] {\n if (!existsSync(directory)) return [];\n\n return readdirSync(directory, { withFileTypes: true }).flatMap((entry) => {\n const absolute = path.join(directory, entry.name);\n\n return entry.isDirectory()\n ? listFiles(absolute, base)\n : [path.relative(base, absolute).split(path.sep).join(\"/\")];\n });\n}\n\n/**\n * Points every configured storage driver — local, S3, R2, Spaces — at a\n * local temporary directory.\n *\n * Installed by default in the test environment: uploads and `storage.put()`\n * calls land on disk under one temp root (a folder per driver name), never in\n * a bucket and never in the app's real `storage/` folder. The root is shared\n * with the HTTP test server, so a file an HTTP request stored is visible to\n * the test that sent it. The process that created the root deletes it on\n * restore.\n *\n * @example\n * await uploadAvatar(user, file);\n *\n * await storageFake.assertExists(`avatars/${user.id}.png`);\n */\nexport const storageFake = {\n /** Re-register every driver as a local one under the temp root. */\n async install(): Promise<void> {\n if (!installed) {\n wasInitialized = storage.isInitialized;\n installed = true;\n }\n\n if (!root) {\n const shared = process.env[TEST_STORAGE_ROOT_ENV_KEY];\n\n if (shared) {\n root = shared;\n ownsRoot = false;\n } else {\n root = mkdtempSync(path.join(os.tmpdir(), \"warlock-test-storage-\"));\n ownsRoot = true;\n process.env[TEST_STORAGE_ROOT_ENV_KEY] = root;\n }\n }\n\n await storage.init();\n\n const fakeRoot = root;\n\n for (const name of storage.driverNames()) {\n const driverRoot = path.join(fakeRoot, name);\n\n mkdirSync(driverRoot, { recursive: true });\n storage.register(\n name,\n storageConfigurations.local({ root: driverRoot, urlPrefix: `/test-storage/${name}` }),\n );\n }\n\n const defaultName = storage.getDefaultName();\n\n if (defaultName) storage.setDefault(defaultName);\n },\n\n /** Drop the fake drivers; the real configuration is read again on next use. */\n async restore(): Promise<void> {\n if (!installed) return;\n\n installed = false;\n storage.reset();\n\n if (wasInitialized) await storage.init();\n\n if (root && ownsRoot) {\n rmSync(root, { recursive: true, force: true });\n\n if (process.env[TEST_STORAGE_ROOT_ENV_KEY] === root) {\n delete process.env[TEST_STORAGE_ROOT_ENV_KEY];\n }\n }\n\n root = undefined;\n ownsRoot = false;\n },\n\n isInstalled(): boolean {\n return installed;\n },\n\n /** The temp directory every fake driver lives under. */\n root(): string {\n return currentRoot();\n },\n\n /** Every stored file, as `<driver>/<path>`, sorted. */\n files(driver?: StorageDriverName): string[] {\n const base = currentRoot();\n const directory = driver ? path.join(base, driver) : base;\n\n return listFiles(directory, directory).sort();\n },\n\n /** Assert a file exists, on the default driver unless `driver` is given. */\n async assertExists(location: string, driver?: StorageDriverName): Promise<void> {\n currentRoot();\n\n const target = driver ? storage.use(driver) : storage;\n\n if (!(await target.exists(location))) {\n throw new FakeAssertionError(\n `Expected ${JSON.stringify(location)} to be stored${driver ? ` on \"${driver}\"` : \"\"}. Stored files: ${JSON.stringify(storageFake.files())}.`,\n );\n }\n },\n\n /** Assert a file does not exist, on the default driver unless `driver` is given. */\n async assertMissing(location: string, driver?: StorageDriverName): Promise<void> {\n currentRoot();\n\n const target = driver ? storage.use(driver) : storage;\n\n if (await target.exists(location)) {\n throw new FakeAssertionError(\n `Expected ${JSON.stringify(location)} not to be stored${driver ? ` on \"${driver}\"` : \"\"}, but it is.`,\n );\n }\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAa,4BAA4B;AAEzC,IAAI;AACJ,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,iBAAiB;AAErB,SAAS,cAAsB;CAC7B,IAAI,CAAC,MACH,MAAM,IAAI,mBACR,0JACF;CAGF,OAAO;AACT;AAEA,SAAS,UAAU,WAAmB,MAAwB;CAC5D,IAAI,CAAC,WAAW,SAAS,GAAG,OAAO,CAAC;CAEpC,OAAO,YAAY,WAAW,EAAE,eAAe,KAAK,CAAC,CAAC,CAAC,SAAS,UAAU;EACxE,MAAM,WAAW,KAAK,KAAK,WAAW,MAAM,IAAI;EAEhD,OAAO,MAAM,YAAY,IACrB,UAAU,UAAU,IAAI,IACxB,CAAC,KAAK,SAAS,MAAM,QAAQ,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC;CAC9D,CAAC;AACH;;;;;;;;;;;;;;;;;AAkBA,MAAa,cAAc;;CAEzB,MAAM,UAAyB;EAC7B,IAAI,CAAC,WAAW;GACd,iBAAiB,QAAQ;GACzB,YAAY;EACd;EAEA,IAAI,CAAC,MAAM;GACT,MAAM,SAAS,QAAQ,IAAI;GAE3B,IAAI,QAAQ;IACV,OAAO;IACP,WAAW;GACb,OAAO;IACL,OAAO,YAAY,KAAK,KAAK,GAAG,OAAO,GAAG,uBAAuB,CAAC;IAClE,WAAW;IACX,QAAQ,IAAI,6BAA6B;GAC3C;EACF;EAEA,MAAM,QAAQ,KAAK;EAEnB,MAAM,WAAW;EAEjB,KAAK,MAAM,QAAQ,QAAQ,YAAY,GAAG;GACxC,MAAM,aAAa,KAAK,KAAK,UAAU,IAAI;GAE3C,UAAU,YAAY,EAAE,WAAW,KAAK,CAAC;GACzC,QAAQ,SACN,MACA,sBAAsB,MAAM;IAAE,MAAM;IAAY,WAAW,iBAAiB;GAAO,CAAC,CACtF;EACF;EAEA,MAAM,cAAc,QAAQ,eAAe;EAE3C,IAAI,aAAa,QAAQ,WAAW,WAAW;CACjD;;CAGA,MAAM,UAAyB;EAC7B,IAAI,CAAC,WAAW;EAEhB,YAAY;EACZ,QAAQ,MAAM;EAEd,IAAI,gBAAgB,MAAM,QAAQ,KAAK;EAEvC,IAAI,QAAQ,UAAU;GACpB,OAAO,MAAM;IAAE,WAAW;IAAM,OAAO;GAAK,CAAC;GAE7C,IAAI,QAAQ,qCAAmC,MAC7C,OAAO,QAAQ,IAAI;EAEvB;EAEA,OAAO;EACP,WAAW;CACb;CAEA,cAAuB;EACrB,OAAO;CACT;;CAGA,OAAe;EACb,OAAO,YAAY;CACrB;;CAGA,MAAM,QAAsC;EAC1C,MAAM,OAAO,YAAY;EACzB,MAAM,YAAY,SAAS,KAAK,KAAK,MAAM,MAAM,IAAI;EAErD,OAAO,UAAU,WAAW,SAAS,CAAC,CAAC,KAAK;CAC9C;;CAGA,MAAM,aAAa,UAAkB,QAA2C;EAC9E,YAAY;EAIZ,IAAI,CAAE,OAFS,SAAS,QAAQ,IAAI,MAAM,IAAI,QAE5B,CAAC,OAAO,QAAQ,GAChC,MAAM,IAAI,mBACR,YAAY,KAAK,UAAU,QAAQ,EAAE,eAAe,SAAS,QAAQ,OAAO,KAAK,GAAG,kBAAkB,KAAK,UAAU,YAAY,MAAM,CAAC,EAAE,EAC5I;CAEJ;;CAGA,MAAM,cAAc,UAAkB,QAA2C;EAC/E,YAAY;EAIZ,IAAI,OAFW,SAAS,QAAQ,IAAI,MAAM,IAAI,QAE9B,CAAC,OAAO,QAAQ,GAC9B,MAAM,IAAI,mBACR,YAAY,KAAK,UAAU,QAAQ,EAAE,mBAAmB,SAAS,QAAQ,OAAO,KAAK,GAAG,aAC1F;CAEJ;AACF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
//#region ../../packages/core/src/tests/fakes/test-fakes.d.ts
|
|
2
|
+
/** The fakes the test kit installs. */
|
|
3
|
+
declare const TEST_FAKE_NAMES: readonly ["mail", "queue", "cache", "storage", "clock", "ids"];
|
|
4
|
+
type TestFakeName = (typeof TEST_FAKE_NAMES)[number];
|
|
5
|
+
/**
|
|
6
|
+
* Which fakes to install.
|
|
7
|
+
*
|
|
8
|
+
* - `true` (the default) — all of them.
|
|
9
|
+
* - `false` — none: real drivers, real clock, real ids.
|
|
10
|
+
* - an object — all of them except the ones set to `false`, e.g.
|
|
11
|
+
* `{ cache: false }` keeps the configured cache driver.
|
|
12
|
+
*/
|
|
13
|
+
type TestFakesSelection = boolean | Partial<Record<TestFakeName, boolean>>;
|
|
14
|
+
/** Read `tests.fakes` from `src/config/tests.ts`, or `undefined` when unset. */
|
|
15
|
+
declare function readConfiguredFakes(): TestFakesSelection | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* The fakes to install. Precedence: an explicit selection (the `fakes`
|
|
18
|
+
* option of `setupTest()` / `startHttpTestServer()`) > `tests.fakes` in
|
|
19
|
+
* `src/config/tests.ts` > all on.
|
|
20
|
+
*/
|
|
21
|
+
declare function resolveTestFakes(explicit?: TestFakesSelection): TestFakeName[];
|
|
22
|
+
/**
|
|
23
|
+
* Install the selected fakes. Called by `setupTest()` and
|
|
24
|
+
* `startHttpTestServer()` once their connectors are up; call it yourself only
|
|
25
|
+
* when you bootstrap the framework without them.
|
|
26
|
+
*
|
|
27
|
+
* @returns the fakes that are now installed.
|
|
28
|
+
*/
|
|
29
|
+
declare function installTestFakes(explicit?: TestFakesSelection): Promise<TestFakeName[]>;
|
|
30
|
+
/**
|
|
31
|
+
* Restore every installed fake, in reverse order. Every fake is restored even
|
|
32
|
+
* when one fails; the failures are rethrown together afterwards.
|
|
33
|
+
*/
|
|
34
|
+
declare function restoreTestFakes(): Promise<void>;
|
|
35
|
+
/** The fakes installed right now. */
|
|
36
|
+
declare function installedTestFakes(): TestFakeName[];
|
|
37
|
+
//#endregion
|
|
38
|
+
export { TEST_FAKE_NAMES, TestFakeName, TestFakesSelection, installTestFakes, installedTestFakes, readConfiguredFakes, resolveTestFakes, restoreTestFakes };
|
|
39
|
+
//# sourceMappingURL=test-fakes.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-fakes.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/tests/fakes/test-fakes.ts"],"mappings":";;cAUa,eAAA;AAAA,KAED,YAAA,WAAuB,eAAe;;;AAF2C;AAE7F;;;;AAAkD;KAUtC,kBAAA,aAA+B,OAAA,CAAQ,MAAA,CAAO,YAAA;;iBAiB1C,mBAAA,IAAuB,kBAAkB;;;;;;iBA0CzC,gBAAA,CAAiB,QAAA,GAAW,kBAAA,GAAqB,YAAY;;;;AA3DP;AAiBtE;;;iBA2DsB,gBAAA,CAAiB,QAAA,GAAW,kBAAA,GAAqB,OAAA,CAAQ,YAAA;AA3DtB;AA0CzD;;;AA1CyD,iBA2EnC,gBAAA,IAAoB,OAAO;;iBAiBjC,kBAAA,IAAsB,YAAY"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { config } from "../../config/config-getter.mjs";
|
|
2
|
+
import "../../config/index.mjs";
|
|
3
|
+
import { cacheFake } from "./cache-fake.mjs";
|
|
4
|
+
import { clockFake } from "./clock-fake.mjs";
|
|
5
|
+
import { idsFake } from "./ids-fake.mjs";
|
|
6
|
+
import { mailFake } from "./mail-fake.mjs";
|
|
7
|
+
import { queueFake } from "./queue-fake.mjs";
|
|
8
|
+
import { storageFake } from "./storage-fake.mjs";
|
|
9
|
+
|
|
10
|
+
//#region ../../packages/core/src/tests/fakes/test-fakes.ts
|
|
11
|
+
/** The fakes the test kit installs. */
|
|
12
|
+
const TEST_FAKE_NAMES = [
|
|
13
|
+
"mail",
|
|
14
|
+
"queue",
|
|
15
|
+
"cache",
|
|
16
|
+
"storage",
|
|
17
|
+
"clock",
|
|
18
|
+
"ids"
|
|
19
|
+
];
|
|
20
|
+
const fakes = {
|
|
21
|
+
mail: mailFake,
|
|
22
|
+
queue: queueFake,
|
|
23
|
+
cache: cacheFake,
|
|
24
|
+
storage: storageFake,
|
|
25
|
+
clock: clockFake,
|
|
26
|
+
ids: idsFake
|
|
27
|
+
};
|
|
28
|
+
let active = [];
|
|
29
|
+
/** Read `tests.fakes` from `src/config/tests.ts`, or `undefined` when unset. */
|
|
30
|
+
function readConfiguredFakes() {
|
|
31
|
+
return validateSelection((config.get("tests", {}) ?? {}).fakes, "tests.fakes");
|
|
32
|
+
}
|
|
33
|
+
function validateSelection(value, source) {
|
|
34
|
+
if (value === void 0 || typeof value === "boolean") return value;
|
|
35
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error(`${source} must be true, false, or an object such as { cache: false }; got ${JSON.stringify(value)}.`);
|
|
36
|
+
const selection = {};
|
|
37
|
+
for (const [key, flag] of Object.entries(value)) {
|
|
38
|
+
const name = TEST_FAKE_NAMES.find((candidate) => candidate === key);
|
|
39
|
+
if (!name) throw new Error(`${source} has an unknown fake "${key}". Known fakes: ${TEST_FAKE_NAMES.join(", ")}.`);
|
|
40
|
+
if (typeof flag !== "boolean") throw new Error(`${source}.${key} must be true or false; got ${JSON.stringify(flag)}.`);
|
|
41
|
+
selection[name] = flag;
|
|
42
|
+
}
|
|
43
|
+
return selection;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The fakes to install. Precedence: an explicit selection (the `fakes`
|
|
47
|
+
* option of `setupTest()` / `startHttpTestServer()`) > `tests.fakes` in
|
|
48
|
+
* `src/config/tests.ts` > all on.
|
|
49
|
+
*/
|
|
50
|
+
function resolveTestFakes(explicit) {
|
|
51
|
+
const selection = explicit !== void 0 ? validateSelection(explicit, "fakes") : readConfiguredFakes();
|
|
52
|
+
if (selection === void 0 || selection === true) return [...TEST_FAKE_NAMES];
|
|
53
|
+
if (selection === false) return [];
|
|
54
|
+
return TEST_FAKE_NAMES.filter((name) => selection[name] !== false);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Install the selected fakes. Called by `setupTest()` and
|
|
58
|
+
* `startHttpTestServer()` once their connectors are up; call it yourself only
|
|
59
|
+
* when you bootstrap the framework without them.
|
|
60
|
+
*
|
|
61
|
+
* @returns the fakes that are now installed.
|
|
62
|
+
*/
|
|
63
|
+
async function installTestFakes(explicit) {
|
|
64
|
+
const selected = resolveTestFakes(explicit);
|
|
65
|
+
for (const name of selected) await fakes[name].install();
|
|
66
|
+
active = [...new Set([...active, ...selected])];
|
|
67
|
+
return selected;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Restore every installed fake, in reverse order. Every fake is restored even
|
|
71
|
+
* when one fails; the failures are rethrown together afterwards.
|
|
72
|
+
*/
|
|
73
|
+
async function restoreTestFakes() {
|
|
74
|
+
const errors = [];
|
|
75
|
+
for (const name of [...active].reverse()) try {
|
|
76
|
+
await fakes[name].restore();
|
|
77
|
+
} catch (error) {
|
|
78
|
+
errors.push(error);
|
|
79
|
+
}
|
|
80
|
+
active = [];
|
|
81
|
+
if (errors.length > 0) throw new AggregateError(errors, "Restoring the test fakes failed.");
|
|
82
|
+
}
|
|
83
|
+
/** The fakes installed right now. */
|
|
84
|
+
function installedTestFakes() {
|
|
85
|
+
return [...active];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
export { TEST_FAKE_NAMES, installTestFakes, installedTestFakes, readConfiguredFakes, resolveTestFakes, restoreTestFakes };
|
|
90
|
+
//# sourceMappingURL=test-fakes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-fakes.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/tests/fakes/test-fakes.ts"],"sourcesContent":["import type { GenericObject } from \"@mongez/reinforcements\";\nimport { config } from \"../../config\";\nimport { cacheFake } from \"./cache-fake\";\nimport { clockFake } from \"./clock-fake\";\nimport { idsFake } from \"./ids-fake\";\nimport { mailFake } from \"./mail-fake\";\nimport { queueFake } from \"./queue-fake\";\nimport { storageFake } from \"./storage-fake\";\n\n/** The fakes the test kit installs. */\nexport const TEST_FAKE_NAMES = [\"mail\", \"queue\", \"cache\", \"storage\", \"clock\", \"ids\"] as const;\n\nexport type TestFakeName = (typeof TEST_FAKE_NAMES)[number];\n\n/**\n * Which fakes to install.\n *\n * - `true` (the default) — all of them.\n * - `false` — none: real drivers, real clock, real ids.\n * - an object — all of them except the ones set to `false`, e.g.\n * `{ cache: false }` keeps the configured cache driver.\n */\nexport type TestFakesSelection = boolean | Partial<Record<TestFakeName, boolean>>;\n\nconst fakes: Record<\n TestFakeName,\n { install(): void | Promise<void>; restore(): void | Promise<void> }\n> = {\n mail: mailFake,\n queue: queueFake,\n cache: cacheFake,\n storage: storageFake,\n clock: clockFake,\n ids: idsFake,\n};\n\nlet active: TestFakeName[] = [];\n\n/** Read `tests.fakes` from `src/config/tests.ts`, or `undefined` when unset. */\nexport function readConfiguredFakes(): TestFakesSelection | undefined {\n // `config.get` resolves an absent key to `null`, not to its default's shape.\n const testsConfig = config.get<GenericObject>(\"tests\", {}) ?? {};\n\n return validateSelection(testsConfig.fakes as unknown, \"tests.fakes\");\n}\n\nfunction validateSelection(value: unknown, source: string): TestFakesSelection | undefined {\n if (value === undefined || typeof value === \"boolean\") return value;\n\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n throw new Error(\n `${source} must be true, false, or an object such as { cache: false }; got ${JSON.stringify(value)}.`,\n );\n }\n\n const selection: Partial<Record<TestFakeName, boolean>> = {};\n\n for (const [key, flag] of Object.entries(value)) {\n const name = TEST_FAKE_NAMES.find((candidate) => candidate === key);\n\n if (!name) {\n throw new Error(\n `${source} has an unknown fake \"${key}\". Known fakes: ${TEST_FAKE_NAMES.join(\", \")}.`,\n );\n }\n\n if (typeof flag !== \"boolean\") {\n throw new Error(`${source}.${key} must be true or false; got ${JSON.stringify(flag)}.`);\n }\n\n selection[name] = flag;\n }\n\n return selection;\n}\n\n/**\n * The fakes to install. Precedence: an explicit selection (the `fakes`\n * option of `setupTest()` / `startHttpTestServer()`) > `tests.fakes` in\n * `src/config/tests.ts` > all on.\n */\nexport function resolveTestFakes(explicit?: TestFakesSelection): TestFakeName[] {\n const selection =\n explicit !== undefined ? validateSelection(explicit, \"fakes\") : readConfiguredFakes();\n\n if (selection === undefined || selection === true) return [...TEST_FAKE_NAMES];\n if (selection === false) return [];\n\n return TEST_FAKE_NAMES.filter((name) => selection[name] !== false);\n}\n\n/**\n * Install the selected fakes. Called by `setupTest()` and\n * `startHttpTestServer()` once their connectors are up; call it yourself only\n * when you bootstrap the framework without them.\n *\n * @returns the fakes that are now installed.\n */\nexport async function installTestFakes(explicit?: TestFakesSelection): Promise<TestFakeName[]> {\n const selected = resolveTestFakes(explicit);\n\n for (const name of selected) {\n await fakes[name].install();\n }\n\n active = [...new Set([...active, ...selected])];\n\n return selected;\n}\n\n/**\n * Restore every installed fake, in reverse order. Every fake is restored even\n * when one fails; the failures are rethrown together afterwards.\n */\nexport async function restoreTestFakes(): Promise<void> {\n const errors: unknown[] = [];\n\n for (const name of [...active].reverse()) {\n try {\n await fakes[name].restore();\n } catch (error) {\n errors.push(error);\n }\n }\n\n active = [];\n\n if (errors.length > 0) throw new AggregateError(errors, \"Restoring the test fakes failed.\");\n}\n\n/** The fakes installed right now. */\nexport function installedTestFakes(): TestFakeName[] {\n return [...active];\n}\n"],"mappings":";;;;;;;;;;;AAUA,MAAa,kBAAkB;CAAC;CAAQ;CAAS;CAAS;CAAW;CAAS;AAAK;AAcnF,MAAM,QAGF;CACF,MAAM;CACN,OAAO;CACP,OAAO;CACP,SAAS;CACT,OAAO;CACP,KAAK;AACP;AAEA,IAAI,SAAyB,CAAC;;AAG9B,SAAgB,sBAAsD;CAIpE,OAAO,mBAFa,OAAO,IAAmB,SAAS,CAAC,CAAC,KAAK,CAAC,EAE3B,CAAC,OAAkB,aAAa;AACtE;AAEA,SAAS,kBAAkB,OAAgB,QAAgD;CACzF,IAAI,UAAU,UAAa,OAAO,UAAU,WAAW,OAAO;CAE9D,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,MAAM,QAAQ,KAAK,GACpE,MAAM,IAAI,MACR,GAAG,OAAO,mEAAmE,KAAK,UAAU,KAAK,EAAE,EACrG;CAGF,MAAM,YAAoD,CAAC;CAE3D,KAAK,MAAM,CAAC,KAAK,SAAS,OAAO,QAAQ,KAAK,GAAG;EAC/C,MAAM,OAAO,gBAAgB,MAAM,cAAc,cAAc,GAAG;EAElE,IAAI,CAAC,MACH,MAAM,IAAI,MACR,GAAG,OAAO,wBAAwB,IAAI,kBAAkB,gBAAgB,KAAK,IAAI,EAAE,EACrF;EAGF,IAAI,OAAO,SAAS,WAClB,MAAM,IAAI,MAAM,GAAG,OAAO,GAAG,IAAI,8BAA8B,KAAK,UAAU,IAAI,EAAE,EAAE;EAGxF,UAAU,QAAQ;CACpB;CAEA,OAAO;AACT;;;;;;AAOA,SAAgB,iBAAiB,UAA+C;CAC9E,MAAM,YACJ,aAAa,SAAY,kBAAkB,UAAU,OAAO,IAAI,oBAAoB;CAEtF,IAAI,cAAc,UAAa,cAAc,MAAM,OAAO,CAAC,GAAG,eAAe;CAC7E,IAAI,cAAc,OAAO,OAAO,CAAC;CAEjC,OAAO,gBAAgB,QAAQ,SAAS,UAAU,UAAU,KAAK;AACnE;;;;;;;;AASA,eAAsB,iBAAiB,UAAwD;CAC7F,MAAM,WAAW,iBAAiB,QAAQ;CAE1C,KAAK,MAAM,QAAQ,UACjB,MAAM,MAAM,KAAK,CAAC,QAAQ;CAG5B,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAAC;CAE9C,OAAO;AACT;;;;;AAMA,eAAsB,mBAAkC;CACtD,MAAM,SAAoB,CAAC;CAE3B,KAAK,MAAM,QAAQ,CAAC,GAAG,MAAM,CAAC,CAAC,QAAQ,GACrC,IAAI;EACF,MAAM,MAAM,KAAK,CAAC,QAAQ;CAC5B,SAAS,OAAO;EACd,OAAO,KAAK,KAAK;CACnB;CAGF,SAAS,CAAC;CAEV,IAAI,OAAO,SAAS,GAAG,MAAM,IAAI,eAAe,QAAQ,kCAAkC;AAC5F;;AAGA,SAAgB,qBAAqC;CACnD,OAAO,CAAC,GAAG,MAAM;AACnB"}
|
package/esm/tests/index.d.mts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { assertPortIsAvailable, isPortAvailable } from "../http/port-preflight.mjs";
|
|
2
|
+
import { TEST_FAKE_NAMES, TestFakeName, TestFakesSelection, installTestFakes, installedTestFakes, readConfiguredFakes, resolveTestFakes, restoreTestFakes } from "./fakes/test-fakes.mjs";
|
|
2
3
|
import { StartHttpTestServerOptions, isTestServerRunning, startHttpTestServer, stopHttpTestServer } from "./start-http-development-server.mjs";
|
|
3
|
-
import { expectJson, getTestServerUrl, parseJsonResponse, testDelete, testGet, testPatch, testPost, testPut, testRequest } from "./test-helpers.mjs";
|
|
4
|
+
import { TestRequestClient, createTestRequestClient, expectJson, getTestServerUrl, parseJsonResponse, testDelete, testGet, testPatch, testPost, testPut, testRequest } from "./test-helpers.mjs";
|
|
5
|
+
import { AuthenticatedTestClient, TestAuthenticableUser, actingAs } from "./authenticated-test-client.mjs";
|
|
4
6
|
import { TestConnectorsSelection } from "./test-connectors-selection.mjs";
|
|
5
7
|
import { TestLifecycleError, TestSetupOptions, setupTest, teardownTest, warnMissingImportModule } from "./vitest-setup.mjs";
|
|
6
|
-
|
|
8
|
+
import { cacheFake } from "./fakes/cache-fake.mjs";
|
|
9
|
+
import { DEFAULT_FAKE_NOW, clockFake } from "./fakes/clock-fake.mjs";
|
|
10
|
+
import { FakeAssertionError, describeRecorded } from "./fakes/fake-assertion-error.mjs";
|
|
11
|
+
import { idsFake } from "./fakes/ids-fake.mjs";
|
|
12
|
+
import { MailMatcher, mailFake } from "./fakes/mail-fake.mjs";
|
|
13
|
+
import { JobReference, PushedJob, PushedJobMatcher, queueFake } from "./fakes/queue-fake.mjs";
|
|
14
|
+
import { storageFake } from "./fakes/storage-fake.mjs";
|
|
15
|
+
import { Factory, FactoryAttributes, FactoryOverrides, FactorySeed, FactoryState, defineFactory, resetFactorySequences } from "./factories.mjs";
|
|
16
|
+
import { CreateTestHttpServerOptions, TestHttpServer, createTestHttpServer } from "./test-http-server.mjs";
|
|
17
|
+
import { REDACTED, ResponseSnapshot, SnapshotResponseOptions, snapshotResponse } from "./snapshot-response.mjs";
|
|
18
|
+
export { AuthenticatedTestClient, CreateTestHttpServerOptions, DEFAULT_FAKE_NOW, Factory, FactoryAttributes, FactoryOverrides, FactorySeed, FactoryState, FakeAssertionError, JobReference, MailMatcher, PushedJob, PushedJobMatcher, REDACTED, ResponseSnapshot, SnapshotResponseOptions, StartHttpTestServerOptions, TEST_FAKE_NAMES, TestAuthenticableUser, type TestConnectorsSelection, TestFakeName, TestFakesSelection, TestHttpServer, TestLifecycleError, TestRequestClient, TestSetupOptions, actingAs, assertPortIsAvailable, cacheFake, clockFake, createTestHttpServer, createTestRequestClient, defineFactory, describeRecorded, expectJson, getTestServerUrl, idsFake, installTestFakes, installedTestFakes, isPortAvailable, isTestServerRunning, mailFake, parseJsonResponse, queueFake, readConfiguredFakes, resetFactorySequences, resolveTestFakes, restoreTestFakes, setupTest, snapshotResponse, startHttpTestServer, stopHttpTestServer, storageFake, teardownTest, testDelete, testGet, testPatch, testPost, testPut, testRequest, warnMissingImportModule };
|
package/esm/tests/index.mjs
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { assertPortIsAvailable, isPortAvailable } from "../http/port-preflight.mjs";
|
|
2
|
+
import { FakeAssertionError, describeRecorded } from "./fakes/fake-assertion-error.mjs";
|
|
3
|
+
import { cacheFake } from "./fakes/cache-fake.mjs";
|
|
4
|
+
import { DEFAULT_FAKE_NOW, clockFake } from "./fakes/clock-fake.mjs";
|
|
5
|
+
import { idsFake } from "./fakes/ids-fake.mjs";
|
|
6
|
+
import { mailFake } from "./fakes/mail-fake.mjs";
|
|
7
|
+
import { queueFake } from "./fakes/queue-fake.mjs";
|
|
8
|
+
import { storageFake } from "./fakes/storage-fake.mjs";
|
|
9
|
+
import { TEST_FAKE_NAMES, installTestFakes, installedTestFakes, readConfiguredFakes, resolveTestFakes, restoreTestFakes } from "./fakes/test-fakes.mjs";
|
|
2
10
|
import { isTestServerRunning, startHttpTestServer, stopHttpTestServer } from "./start-http-development-server.mjs";
|
|
3
|
-
import { expectJson, getTestServerUrl, parseJsonResponse, testDelete, testGet, testPatch, testPost, testPut, testRequest } from "./test-helpers.mjs";
|
|
11
|
+
import { createTestRequestClient, expectJson, getTestServerUrl, parseJsonResponse, testDelete, testGet, testPatch, testPost, testPut, testRequest } from "./test-helpers.mjs";
|
|
12
|
+
import { actingAs } from "./authenticated-test-client.mjs";
|
|
4
13
|
import { TestLifecycleError, setupTest, teardownTest, warnMissingImportModule } from "./vitest-setup.mjs";
|
|
14
|
+
import "./fakes/index.mjs";
|
|
15
|
+
import { defineFactory, resetFactorySequences } from "./factories.mjs";
|
|
16
|
+
import { createTestHttpServer } from "./test-http-server.mjs";
|
|
17
|
+
import { REDACTED, snapshotResponse } from "./snapshot-response.mjs";
|
|
5
18
|
|
|
6
|
-
export { TestLifecycleError, assertPortIsAvailable, expectJson, getTestServerUrl, isPortAvailable, isTestServerRunning, parseJsonResponse, setupTest, startHttpTestServer, stopHttpTestServer, teardownTest, testDelete, testGet, testPatch, testPost, testPut, testRequest, warnMissingImportModule };
|
|
19
|
+
export { DEFAULT_FAKE_NOW, FakeAssertionError, REDACTED, TEST_FAKE_NAMES, TestLifecycleError, actingAs, assertPortIsAvailable, cacheFake, clockFake, createTestHttpServer, createTestRequestClient, defineFactory, describeRecorded, expectJson, getTestServerUrl, idsFake, installTestFakes, installedTestFakes, isPortAvailable, isTestServerRunning, mailFake, parseJsonResponse, queueFake, readConfiguredFakes, resetFactorySequences, resolveTestFakes, restoreTestFakes, setupTest, snapshotResponse, startHttpTestServer, stopHttpTestServer, storageFake, teardownTest, testDelete, testGet, testPatch, testPost, testPut, testRequest, warnMissingImportModule };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region ../../packages/core/src/tests/snapshot-response.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* A response reduced to what a snapshot should pin: the status, the content
|
|
4
|
+
* type and the body — with the values that differ on every run (ids, tokens,
|
|
5
|
+
* timestamps) replaced, so the snapshot fails only when the shape or a stable
|
|
6
|
+
* value changes.
|
|
7
|
+
*/
|
|
8
|
+
type ResponseSnapshot = {
|
|
9
|
+
status: number;
|
|
10
|
+
contentType: string | null;
|
|
11
|
+
body: unknown;
|
|
12
|
+
};
|
|
13
|
+
type SnapshotResponseOptions = {
|
|
14
|
+
/**
|
|
15
|
+
* Dot paths whose values are replaced by `"[redacted]"`. `*` matches any
|
|
16
|
+
* key or array index: `"post.id"`, `"posts.*.createdAt"`, `"*.token"`.
|
|
17
|
+
*/
|
|
18
|
+
redact?: string[];
|
|
19
|
+
};
|
|
20
|
+
declare const REDACTED = "[redacted]";
|
|
21
|
+
/**
|
|
22
|
+
* Read a response into a {@link ResponseSnapshot} for `toMatchSnapshot()`.
|
|
23
|
+
* Consumes the body: call it instead of `response.json()`, not after.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const response = await testPost("/posts", { title: "Hello" });
|
|
27
|
+
*
|
|
28
|
+
* expect(await snapshotResponse(response, { redact: ["post.id", "post.createdAt"] }))
|
|
29
|
+
* .toMatchSnapshot();
|
|
30
|
+
*/
|
|
31
|
+
declare function snapshotResponse(response: Response, options?: SnapshotResponseOptions): Promise<ResponseSnapshot>;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { REDACTED, ResponseSnapshot, SnapshotResponseOptions, snapshotResponse };
|
|
34
|
+
//# sourceMappingURL=snapshot-response.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot-response.d.mts","names":[],"sources":["../../../../../../../../packages/core/src/tests/snapshot-response.ts"],"mappings":";;AAMA;;;;;KAAY,gBAAA;EACV,MAAA;EACA,WAAA;EACA,IAAA;AAAA;AAAA,KAGU,uBAAA;;;AAKJ;AAGR;EAHE,MAAM;AAAA;AAAA,cAGK,QAAA;AAAQ;AAkCrB;;;;;;;;;AAlCqB,iBAkCC,gBAAA,CACpB,QAAA,EAAU,QAAA,EACV,OAAA,GAAS,uBAAA,GACR,OAAA,CAAQ,gBAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//#region ../../packages/core/src/tests/snapshot-response.ts
|
|
2
|
+
const REDACTED = "[redacted]";
|
|
3
|
+
function redactPath(value, segments) {
|
|
4
|
+
if (segments.length === 0) return REDACTED;
|
|
5
|
+
if (typeof value !== "object" || value === null) return value;
|
|
6
|
+
const [head, ...rest] = segments;
|
|
7
|
+
if (Array.isArray(value)) return value.map((item, index) => head === "*" || head === String(index) ? redactPath(item, rest) : item);
|
|
8
|
+
const record = value;
|
|
9
|
+
const copy = { ...record };
|
|
10
|
+
for (const key of Object.keys(record)) if (head === "*" || head === key) copy[key] = redactPath(record[key], rest);
|
|
11
|
+
return copy;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Read a response into a {@link ResponseSnapshot} for `toMatchSnapshot()`.
|
|
15
|
+
* Consumes the body: call it instead of `response.json()`, not after.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const response = await testPost("/posts", { title: "Hello" });
|
|
19
|
+
*
|
|
20
|
+
* expect(await snapshotResponse(response, { redact: ["post.id", "post.createdAt"] }))
|
|
21
|
+
* .toMatchSnapshot();
|
|
22
|
+
*/
|
|
23
|
+
async function snapshotResponse(response, options = {}) {
|
|
24
|
+
const contentType = response.headers.get("content-type");
|
|
25
|
+
const text = await response.text();
|
|
26
|
+
let body = text;
|
|
27
|
+
if (contentType?.includes("json") && text !== "") try {
|
|
28
|
+
body = JSON.parse(text);
|
|
29
|
+
} catch {
|
|
30
|
+
body = text;
|
|
31
|
+
}
|
|
32
|
+
for (const path of options.redact ?? []) body = redactPath(body, path.split("."));
|
|
33
|
+
return {
|
|
34
|
+
status: response.status,
|
|
35
|
+
contentType,
|
|
36
|
+
body
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { REDACTED, snapshotResponse };
|
|
42
|
+
//# sourceMappingURL=snapshot-response.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot-response.mjs","names":[],"sources":["../../../../../../../../packages/core/src/tests/snapshot-response.ts"],"sourcesContent":["/**\n * A response reduced to what a snapshot should pin: the status, the content\n * type and the body — with the values that differ on every run (ids, tokens,\n * timestamps) replaced, so the snapshot fails only when the shape or a stable\n * value changes.\n */\nexport type ResponseSnapshot = {\n status: number;\n contentType: string | null;\n body: unknown;\n};\n\nexport type SnapshotResponseOptions = {\n /**\n * Dot paths whose values are replaced by `\"[redacted]\"`. `*` matches any\n * key or array index: `\"post.id\"`, `\"posts.*.createdAt\"`, `\"*.token\"`.\n */\n redact?: string[];\n};\n\nexport const REDACTED = \"[redacted]\";\n\nfunction redactPath(value: unknown, segments: readonly string[]): unknown {\n if (segments.length === 0) return REDACTED;\n if (typeof value !== \"object\" || value === null) return value;\n\n const [head, ...rest] = segments;\n\n if (Array.isArray(value)) {\n return value.map((item, index) =>\n head === \"*\" || head === String(index) ? redactPath(item, rest) : item,\n );\n }\n\n const record = value as Record<string, unknown>;\n const copy: Record<string, unknown> = { ...record };\n\n for (const key of Object.keys(record)) {\n if (head === \"*\" || head === key) copy[key] = redactPath(record[key], rest);\n }\n\n return copy;\n}\n\n/**\n * Read a response into a {@link ResponseSnapshot} for `toMatchSnapshot()`.\n * Consumes the body: call it instead of `response.json()`, not after.\n *\n * @example\n * const response = await testPost(\"/posts\", { title: \"Hello\" });\n *\n * expect(await snapshotResponse(response, { redact: [\"post.id\", \"post.createdAt\"] }))\n * .toMatchSnapshot();\n */\nexport async function snapshotResponse(\n response: Response,\n options: SnapshotResponseOptions = {},\n): Promise<ResponseSnapshot> {\n const contentType = response.headers.get(\"content-type\");\n const text = await response.text();\n let body: unknown = text;\n\n if (contentType?.includes(\"json\") && text !== \"\") {\n try {\n body = JSON.parse(text) as unknown;\n } catch {\n body = text;\n }\n }\n\n for (const path of options.redact ?? []) {\n body = redactPath(body, path.split(\".\"));\n }\n\n return { status: response.status, contentType, body };\n}\n"],"mappings":";AAoBA,MAAa,WAAW;AAExB,SAAS,WAAW,OAAgB,UAAsC;CACxE,IAAI,SAAS,WAAW,GAAG,OAAO;CAClC,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CAExD,MAAM,CAAC,MAAM,GAAG,QAAQ;CAExB,IAAI,MAAM,QAAQ,KAAK,GACrB,OAAO,MAAM,KAAK,MAAM,UACtB,SAAS,OAAO,SAAS,OAAO,KAAK,IAAI,WAAW,MAAM,IAAI,IAAI,IACpE;CAGF,MAAM,SAAS;CACf,MAAM,OAAgC,EAAE,GAAG,OAAO;CAElD,KAAK,MAAM,OAAO,OAAO,KAAK,MAAM,GAClC,IAAI,SAAS,OAAO,SAAS,KAAK,KAAK,OAAO,WAAW,OAAO,MAAM,IAAI;CAG5E,OAAO;AACT;;;;;;;;;;;AAYA,eAAsB,iBACpB,UACA,UAAmC,CAAC,GACT;CAC3B,MAAM,cAAc,SAAS,QAAQ,IAAI,cAAc;CACvD,MAAM,OAAO,MAAM,SAAS,KAAK;CACjC,IAAI,OAAgB;CAEpB,IAAI,aAAa,SAAS,MAAM,KAAK,SAAS,IAC5C,IAAI;EACF,OAAO,KAAK,MAAM,IAAI;CACxB,QAAQ;EACN,OAAO;CACT;CAGF,KAAK,MAAM,QAAQ,QAAQ,UAAU,CAAC,GACpC,OAAO,WAAW,MAAM,KAAK,MAAM,GAAG,CAAC;CAGzC,OAAO;EAAE,QAAQ,SAAS;EAAQ;EAAa;CAAK;AACtD"}
|