@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-inline-image-content-type.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"resolve-inline-image-content-type.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/resolve-inline-image-content-type.ts"],"sourcesContent":["import path from \"node:path\";\nimport type { DetectedImageFormat, VariantSourceFormat } from \"./image-variant-types\";\n\n/**\n * Extensions an upload original may carry for each raster format that is\n * allowed to render inline. Anything else — including `.gif`, since gif is\n * not a variant source format — is never served inline, regardless of what\n * its bytes sniff as.\n */\nconst EXTENSION_IMAGE_FORMATS: Readonly<Record<string, VariantSourceFormat>> = {\n \".jpg\": \"jpeg\",\n \".jpeg\": \"jpeg\",\n \".png\": \"png\",\n \".webp\": \"webp\",\n \".avif\": \"avif\",\n};\n\n/**\n * Content type an inline response must advertise for each raster format,\n * used instead of an extension-derived guess.\n */\nconst INLINE_IMAGE_CONTENT_TYPES: Readonly<Record<VariantSourceFormat, string>> = {\n jpeg: \"image/jpeg\",\n png: \"image/png\",\n webp: \"image/webp\",\n avif: \"image/avif\",\n};\n\n/**\n * Content type to serve an upload original inline with, or `undefined` when\n * it must go out as an attachment instead.\n *\n * `sendFile` sets `Content-Type` from the file's EXTENSION, not its bytes.\n * The inline branch in `uploaded-file.controller.ts` only sniffs the bytes to\n * decide \"is this raster\" — so a JPEG-signature file named `x.html` sniffed\n * as jpeg (raster, so \"safe\") would still have been sent by `sendFile` as\n * `text/html`: a polyglot JPEG/HTML stored-XSS vector, the reverse of the\n * already-fixed SVG-named-`.png` case.\n *\n * Inline is therefore only safe when the sniffed format AND the\n * extension-derived format agree — the extension maps to the SAME image\n * type the bytes sniffed as. Any mismatch (raster bytes under a non-image or\n * different-image extension) returns `undefined`, sending the caller to the\n * attachment path instead of trusting either signal alone.\n */\nexport function resolveInlineImageContentType(\n filePath: string,\n sniffedFormat: DetectedImageFormat | undefined,\n): string | undefined {\n if (sniffedFormat === undefined) return undefined;\n\n const extensionFormat = EXTENSION_IMAGE_FORMATS[path.extname(filePath).toLowerCase()];\n\n if (extensionFormat === undefined || extensionFormat !== sniffedFormat) return undefined;\n\n return INLINE_IMAGE_CONTENT_TYPES[extensionFormat];\n}\n"],"mappings":";;;;;;;;;AASA,MAAM,0BAAyE;CAC7E,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;AACX;;;;;AAMA,MAAM,6BAA4E;CAChF,MAAM;CACN,KAAK;CACL,MAAM;CACN,MAAM;AACR;;;;;;;;;;;;;;;;;;AAmBA,SAAgB,8BACd,UACA,eACoB;CACpB,IAAI,kBAAkB,QAAW,OAAO;CAExC,MAAM,kBAAkB,wBAAwB,KAAK,QAAQ,QAAQ,CAAC,CAAC,YAAY;CAEnF,IAAI,oBAAoB,UAAa,oBAAoB,eAAe,OAAO;CAE/E,OAAO,2BAA2B;AACpC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import mime from "mime";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../../packages/core/src/http/uploads/resolve-original-content-type.ts
|
|
4
4
|
/**
|
|
5
5
|
* Extension-derived MIME types that are never safe to advertise as-is: a
|
|
6
6
|
* browser that trusts one of these will parse and execute the response body
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-original-content-type.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"resolve-original-content-type.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/resolve-original-content-type.ts"],"sourcesContent":["import mime from \"mime\";\n\n/**\n * Extension-derived MIME types that are never safe to advertise as-is: a\n * browser that trusts one of these will parse and execute the response body\n * (inline `<script>` in an svg, markup and script in html/xhtml/xml), so an\n * upload served under its real type is stored XSS the moment it is fetched\n * from the app's own origin.\n */\nconst INLINE_EXECUTABLE_MIME_TYPES = new Set([\n \"image/svg+xml\",\n \"text/html\",\n \"application/xhtml+xml\",\n \"text/xml\",\n \"application/xml\",\n]);\n\n/**\n * Content type for an upload original that is being served as an\n * `attachment` (see `uploaded-file.controller.ts`): the extension-derived\n * type, except the svg/html/xml family, which is downgraded to\n * `application/octet-stream` so a browser never sniffs or renders it.\n */\nexport function resolveOriginalContentType(filePath: string): string {\n const type = mime.getType(filePath) || \"application/octet-stream\";\n\n return INLINE_EXECUTABLE_MIME_TYPES.has(type) ? \"application/octet-stream\" : type;\n}\n"],"mappings":";;;;;;;;;;AASA,MAAM,+BAA+B,IAAI,IAAI;CAC3C;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;;AAQD,SAAgB,2BAA2B,UAA0B;CACnE,MAAM,OAAO,KAAK,QAAQ,QAAQ,KAAK;CAEvC,OAAO,6BAA6B,IAAI,IAAI,IAAI,6BAA6B;AAC/E"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { HttpError } from "../errors/errors.mjs";
|
|
2
|
+
import { uploadsConfig } from "../uploads-config.mjs";
|
|
3
|
+
import { variantCacheKey, variantCachePath, variantSourceDirectory, variantSourceKey } from "./variant-cache-key.mjs";
|
|
4
|
+
import { retryOnVanishedDirectory, warnIfVariantCacheIsPublic } from "./image-variant-cache.mjs";
|
|
5
|
+
import { isVariantSourceFormat } from "./detect-image-format.mjs";
|
|
6
|
+
import { remoteVariantDisk, remoteVariantSource } from "./remote-variant-source.mjs";
|
|
7
|
+
import { generateImageVariant } from "./generate-image-variant.mjs";
|
|
8
|
+
import { resolveImageVariantsConfig } from "./resolve-image-variants-config.mjs";
|
|
9
|
+
import { freshImageVariant, scheduleImageVariantCacheTrim } from "./trim-image-variant-cache.mjs";
|
|
10
|
+
import { variantGenerations } from "./variant-generations.mjs";
|
|
11
|
+
import path from "node:path";
|
|
12
|
+
import { atomicWriteAsync } from "@warlock.js/fs";
|
|
13
|
+
import fs from "node:fs/promises";
|
|
14
|
+
|
|
15
|
+
//#region ../../packages/core/src/http/uploads/resolve-remote-image-variant.ts
|
|
16
|
+
/** Cloud sources are read through their driver; derivatives remain in a local cache. */
|
|
17
|
+
async function resolveRemoteImageVariant(input) {
|
|
18
|
+
const disk = remoteVariantDisk(input.disk);
|
|
19
|
+
const images = resolveImageVariantsConfig(uploadsConfig("images"), disk.cacheRoot);
|
|
20
|
+
if (!images) throw new HttpError(400, "Image variants are not configured.");
|
|
21
|
+
if (!Object.prototype.hasOwnProperty.call(images.variants, input.variant)) throw new HttpError(400, `Unknown variant "${input.variant}".`);
|
|
22
|
+
if (input.format !== void 0 && !images.formats.includes(input.format)) throw new HttpError(400, `Format "${input.format}" is not allowed.`);
|
|
23
|
+
const source = await remoteVariantSource(input.path, disk, images);
|
|
24
|
+
if (!source) return void 0;
|
|
25
|
+
try {
|
|
26
|
+
return await renderRemoteImageVariant(input, disk, images, source);
|
|
27
|
+
} finally {
|
|
28
|
+
source.release();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/** Ingest rendering reuses one source handle and its memoized bounded download. */
|
|
32
|
+
async function renderRemoteImageVariant(input, disk, images, source) {
|
|
33
|
+
const variant = Object.prototype.hasOwnProperty.call(images.variants, input.variant) ? images.variants[input.variant] : void 0;
|
|
34
|
+
if (!variant) throw new HttpError(400, `Unknown variant "${input.variant}".`);
|
|
35
|
+
if (input.format !== void 0 && !images.formats.includes(input.format)) throw new HttpError(400, `Format "${input.format}" is not allowed.`);
|
|
36
|
+
const generation = source.metadataGeneration ?? (await source.load()).generation;
|
|
37
|
+
const sourceKey = variantSourceKey(disk.root, source.sourcePath);
|
|
38
|
+
const manifestPath = path.join(variantSourceDirectory(images.cacheDirectory, sourceKey), generation, "source.json");
|
|
39
|
+
let format = input.format;
|
|
40
|
+
if (!format) {
|
|
41
|
+
try {
|
|
42
|
+
const savedFormat = JSON.parse(await fs.readFile(manifestPath, "utf8"))?.format;
|
|
43
|
+
if (isVariantSourceFormat(savedFormat)) format = savedFormat;
|
|
44
|
+
} catch (error) {
|
|
45
|
+
if (error.code !== "ENOENT" && !(error instanceof SyntaxError)) throw error;
|
|
46
|
+
}
|
|
47
|
+
format ??= (await source.load()).sourceFormat;
|
|
48
|
+
}
|
|
49
|
+
const hash = variantCacheKey({
|
|
50
|
+
relativePath: JSON.stringify([
|
|
51
|
+
disk.root,
|
|
52
|
+
source.sourcePath,
|
|
53
|
+
generation
|
|
54
|
+
]),
|
|
55
|
+
sourceSize: 0,
|
|
56
|
+
sourceMtimeMs: 0,
|
|
57
|
+
variant,
|
|
58
|
+
format
|
|
59
|
+
});
|
|
60
|
+
const target = variantCachePath(images.cacheDirectory, {
|
|
61
|
+
sourceKey,
|
|
62
|
+
generation
|
|
63
|
+
}, hash, format);
|
|
64
|
+
warnIfVariantCacheIsPublic(images.cacheDirectory);
|
|
65
|
+
if (!await freshImageVariant(target, images.maxCacheAge)) await variantGenerations.run(target, async () => {
|
|
66
|
+
if (await freshImageVariant(target, images.maxCacheAge)) return;
|
|
67
|
+
const loaded = await source.load();
|
|
68
|
+
await retryOnVanishedDirectory(async () => {
|
|
69
|
+
await generateImageVariant({
|
|
70
|
+
image: loaded.image.clone(),
|
|
71
|
+
variant,
|
|
72
|
+
format,
|
|
73
|
+
targetPath: target
|
|
74
|
+
});
|
|
75
|
+
await atomicWriteAsync(manifestPath, JSON.stringify({ format: loaded.sourceFormat }));
|
|
76
|
+
});
|
|
77
|
+
scheduleImageVariantCacheTrim(images, target);
|
|
78
|
+
});
|
|
79
|
+
return {
|
|
80
|
+
absolutePath: target,
|
|
81
|
+
hash,
|
|
82
|
+
format,
|
|
83
|
+
contentType: `image/${format}`
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
//#endregion
|
|
88
|
+
export { renderRemoteImageVariant, resolveRemoteImageVariant };
|
|
89
|
+
//# sourceMappingURL=resolve-remote-image-variant.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-remote-image-variant.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/resolve-remote-image-variant.ts"],"sourcesContent":["import { atomicWriteAsync } from \"@warlock.js/fs\";\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { HttpError } from \"../errors\";\nimport { uploadsConfig } from \"../uploads-config\";\nimport { isVariantSourceFormat } from \"./detect-image-format\";\nimport { generateImageVariant } from \"./generate-image-variant\";\nimport { retryOnVanishedDirectory, warnIfVariantCacheIsPublic } from \"./image-variant-cache\";\nimport type { ResolvedImageVariantsConfig, VariantOutputFormat } from \"./image-variant-types\";\nimport {\n remoteVariantDisk,\n remoteVariantSource,\n type RemoteVariantSource,\n} from \"./remote-variant-source\";\nimport { resolveImageVariantsConfig } from \"./resolve-image-variants-config\";\nimport type { ResolveImageVariantInput, ResolvedImageVariant } from \"./resolve-image-variant\";\nimport { freshImageVariant, scheduleImageVariantCacheTrim } from \"./trim-image-variant-cache\";\nimport {\n variantCacheKey,\n variantCachePath,\n variantSourceDirectory,\n variantSourceKey,\n} from \"./variant-cache-key\";\nimport { variantGenerations } from \"./variant-generations\";\n\n/** Cloud sources are read through their driver; derivatives remain in a local cache. */\nexport async function resolveRemoteImageVariant(\n input: ResolveImageVariantInput,\n): Promise<ResolvedImageVariant | undefined> {\n const disk = remoteVariantDisk(input.disk);\n const images = resolveImageVariantsConfig(uploadsConfig(\"images\"), disk.cacheRoot);\n if (!images) throw new HttpError(400, \"Image variants are not configured.\");\n if (!Object.prototype.hasOwnProperty.call(images.variants, input.variant))\n throw new HttpError(400, `Unknown variant \"${input.variant}\".`);\n if (input.format !== undefined && !images.formats.includes(input.format as never))\n throw new HttpError(400, `Format \"${input.format}\" is not allowed.`);\n const source = await remoteVariantSource(input.path, disk, images);\n if (!source) return undefined;\n try {\n return await renderRemoteImageVariant(input, disk, images, source);\n } finally {\n source.release();\n }\n}\n\n/** Ingest rendering reuses one source handle and its memoized bounded download. */\nexport async function renderRemoteImageVariant(\n input: ResolveImageVariantInput,\n disk: ReturnType<typeof remoteVariantDisk>,\n images: ResolvedImageVariantsConfig,\n source: RemoteVariantSource,\n): Promise<ResolvedImageVariant> {\n const variant = Object.prototype.hasOwnProperty.call(images.variants, input.variant)\n ? images.variants[input.variant]\n : undefined;\n if (!variant) throw new HttpError(400, `Unknown variant \"${input.variant}\".`);\n if (input.format !== undefined && !images.formats.includes(input.format as never))\n throw new HttpError(400, `Format \"${input.format}\" is not allowed.`);\n const generation = source.metadataGeneration ?? (await source.load()).generation;\n const sourceKey = variantSourceKey(disk.root, source.sourcePath);\n const manifestPath = path.join(\n variantSourceDirectory(images.cacheDirectory, sourceKey),\n generation,\n \"source.json\",\n );\n let format: VariantOutputFormat | undefined = input.format;\n if (!format) {\n try {\n const saved: unknown = JSON.parse(await fs.readFile(manifestPath, \"utf8\"));\n const savedFormat = (saved as { format?: unknown } | null)?.format;\n if (isVariantSourceFormat(savedFormat as never)) format = savedFormat as VariantOutputFormat;\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== \"ENOENT\" && !(error instanceof SyntaxError))\n throw error;\n }\n format ??= (await source.load()).sourceFormat;\n }\n const hash = variantCacheKey({\n relativePath: JSON.stringify([disk.root, source.sourcePath, generation]),\n sourceSize: 0,\n sourceMtimeMs: 0,\n variant,\n format,\n });\n const target = variantCachePath(images.cacheDirectory, { sourceKey, generation }, hash, format);\n warnIfVariantCacheIsPublic(images.cacheDirectory);\n if (!(await freshImageVariant(target, images.maxCacheAge))) {\n await variantGenerations.run(target, async () => {\n if (await freshImageVariant(target, images.maxCacheAge)) return;\n const loaded = await source.load();\n await retryOnVanishedDirectory(async () => {\n await generateImageVariant({\n image: loaded.image.clone(),\n variant,\n format,\n targetPath: target,\n });\n await atomicWriteAsync(manifestPath, JSON.stringify({ format: loaded.sourceFormat }));\n });\n scheduleImageVariantCacheTrim(images, target);\n // Retain other generations: an older concurrent download must not prune\n // a newer object's derivatives. Background eviction reclaims them.\n });\n }\n return { absolutePath: target, hash, format, contentType: `image/${format}` };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA0BA,eAAsB,0BACpB,OAC2C;CAC3C,MAAM,OAAO,kBAAkB,MAAM,IAAI;CACzC,MAAM,SAAS,2BAA2B,cAAc,QAAQ,GAAG,KAAK,SAAS;CACjF,IAAI,CAAC,QAAQ,MAAM,IAAI,UAAU,KAAK,oCAAoC;CAC1E,IAAI,CAAC,OAAO,UAAU,eAAe,KAAK,OAAO,UAAU,MAAM,OAAO,GACtE,MAAM,IAAI,UAAU,KAAK,oBAAoB,MAAM,QAAQ,GAAG;CAChE,IAAI,MAAM,WAAW,UAAa,CAAC,OAAO,QAAQ,SAAS,MAAM,MAAe,GAC9E,MAAM,IAAI,UAAU,KAAK,WAAW,MAAM,OAAO,kBAAkB;CACrE,MAAM,SAAS,MAAM,oBAAoB,MAAM,MAAM,MAAM,MAAM;CACjE,IAAI,CAAC,QAAQ,OAAO;CACpB,IAAI;EACF,OAAO,MAAM,yBAAyB,OAAO,MAAM,QAAQ,MAAM;CACnE,UAAU;EACR,OAAO,QAAQ;CACjB;AACF;;AAGA,eAAsB,yBACpB,OACA,MACA,QACA,QAC+B;CAC/B,MAAM,UAAU,OAAO,UAAU,eAAe,KAAK,OAAO,UAAU,MAAM,OAAO,IAC/E,OAAO,SAAS,MAAM,WACtB;CACJ,IAAI,CAAC,SAAS,MAAM,IAAI,UAAU,KAAK,oBAAoB,MAAM,QAAQ,GAAG;CAC5E,IAAI,MAAM,WAAW,UAAa,CAAC,OAAO,QAAQ,SAAS,MAAM,MAAe,GAC9E,MAAM,IAAI,UAAU,KAAK,WAAW,MAAM,OAAO,kBAAkB;CACrE,MAAM,aAAa,OAAO,uBAAuB,MAAM,OAAO,KAAK,EAAC,CAAE;CACtE,MAAM,YAAY,iBAAiB,KAAK,MAAM,OAAO,UAAU;CAC/D,MAAM,eAAe,KAAK,KACxB,uBAAuB,OAAO,gBAAgB,SAAS,GACvD,YACA,aACF;CACA,IAAI,SAA0C,MAAM;CACpD,IAAI,CAAC,QAAQ;EACX,IAAI;GAEF,MAAM,cADiB,KAAK,MAAM,MAAM,GAAG,SAAS,cAAc,MAAM,CAC/C,CAAC,EAAkC;GAC5D,IAAI,sBAAsB,WAAoB,GAAG,SAAS;EAC5D,SAAS,OAAO;GACd,IAAK,MAAgC,SAAS,YAAY,EAAE,iBAAiB,cAC3E,MAAM;EACV;EACA,YAAY,MAAM,OAAO,KAAK,EAAC,CAAE;CACnC;CACA,MAAM,OAAO,gBAAgB;EAC3B,cAAc,KAAK,UAAU;GAAC,KAAK;GAAM,OAAO;GAAY;EAAU,CAAC;EACvE,YAAY;EACZ,eAAe;EACf;EACA;CACF,CAAC;CACD,MAAM,SAAS,iBAAiB,OAAO,gBAAgB;EAAE;EAAW;CAAW,GAAG,MAAM,MAAM;CAC9F,2BAA2B,OAAO,cAAc;CAChD,IAAI,CAAE,MAAM,kBAAkB,QAAQ,OAAO,WAAW,GACtD,MAAM,mBAAmB,IAAI,QAAQ,YAAY;EAC/C,IAAI,MAAM,kBAAkB,QAAQ,OAAO,WAAW,GAAG;EACzD,MAAM,SAAS,MAAM,OAAO,KAAK;EACjC,MAAM,yBAAyB,YAAY;GACzC,MAAM,qBAAqB;IACzB,OAAO,OAAO,MAAM,MAAM;IAC1B;IACA;IACA,YAAY;GACd,CAAC;GACD,MAAM,iBAAiB,cAAc,KAAK,UAAU,EAAE,QAAQ,OAAO,aAAa,CAAC,CAAC;EACtF,CAAC;EACD,8BAA8B,QAAQ,MAAM;CAG9C,CAAC;CAEH,OAAO;EAAE,cAAc;EAAQ;EAAM;EAAQ,aAAa,SAAS;CAAS;AAC9E"}
|
|
@@ -2,7 +2,7 @@ import { isPathInside, isPathWithin } from "./is-path-inside.mjs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../../packages/core/src/http/uploads/resolve-upload-path.ts
|
|
6
6
|
async function realpathOrSelf(target) {
|
|
7
7
|
try {
|
|
8
8
|
return await fs.realpath(target);
|
|
@@ -47,7 +47,8 @@ async function resolveUploadPath(wildcard, storageRoot, excludedDirectories = []
|
|
|
47
47
|
}
|
|
48
48
|
return {
|
|
49
49
|
absolutePath: realPath,
|
|
50
|
-
relativePath: path.relative(realRoot, realPath).split(path.sep).join("/")
|
|
50
|
+
relativePath: path.relative(realRoot, realPath).split(path.sep).join("/"),
|
|
51
|
+
root: realRoot
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
54
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-upload-path.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"resolve-upload-path.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/resolve-upload-path.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { isPathInside, isPathWithin } from \"./is-path-inside\";\n\n/**\n * A request path that resolved to a regular file inside the storage root\n */\nexport type ResolvedUploadPath = {\n /**\n * Real (symlink-free) absolute path of the file\n */\n absolutePath: string;\n\n /**\n * Path of the file relative to the real storage root, `/`-separated\n */\n relativePath: string;\n\n /**\n * Real (symlink-free) absolute path of the storage root\n */\n root: string;\n};\n\nasync function realpathOrSelf(target: string): Promise<string> {\n try {\n return await fs.realpath(target);\n } catch {\n return target;\n }\n}\n\n/**\n * Resolve the wildcard of an uploads route to a file inside the storage root.\n *\n * The wildcard arrives already decoded once by the router and is NOT decoded\n * again: a second decode would turn `%252e%252e%252f` into `../`.\n *\n * Returns `undefined` — the caller answers 404 for every case, so the response\n * is no existence oracle — when the path:\n * - is empty, carries a NUL byte, or is absolute\n * - resolves outside the root, or to the root itself\n * - lies in one of the `excludedDirectories` (the variant cache)\n * - does not exist, or is not a regular file\n * - is (or passes through) a symlink whose target leaves the root\n */\nexport async function resolveUploadPath(\n wildcard: unknown,\n storageRoot: string,\n excludedDirectories: readonly string[] = [],\n): Promise<ResolvedUploadPath | undefined> {\n if (typeof wildcard !== \"string\" || wildcard === \"\" || wildcard.includes(\"\\0\")) {\n return undefined;\n }\n\n if (path.isAbsolute(wildcard) || path.win32.isAbsolute(wildcard) || /^[A-Za-z]:/.test(wildcard)) {\n return undefined;\n }\n\n const root = path.resolve(storageRoot);\n const resolved = path.resolve(root, wildcard);\n\n if (!isPathInside(resolved, root)) return undefined;\n\n for (const excluded of excludedDirectories) {\n if (isPathWithin(resolved, path.resolve(excluded))) return undefined;\n }\n\n let realPath: string;\n\n try {\n realPath = await fs.realpath(resolved);\n } catch {\n return undefined;\n }\n\n const realRoot = await realpathOrSelf(root);\n\n if (!isPathInside(realPath, realRoot)) return undefined;\n\n for (const excluded of excludedDirectories) {\n if (isPathWithin(realPath, await realpathOrSelf(path.resolve(excluded)))) return undefined;\n }\n\n try {\n const stats = await fs.stat(realPath);\n\n if (!stats.isFile()) return undefined;\n } catch {\n return undefined;\n }\n\n return {\n absolutePath: realPath,\n relativePath: path.relative(realRoot, realPath).split(path.sep).join(\"/\"),\n root: realRoot,\n };\n}\n"],"mappings":";;;;;AAwBA,eAAe,eAAe,QAAiC;CAC7D,IAAI;EACF,OAAO,MAAM,GAAG,SAAS,MAAM;CACjC,QAAQ;EACN,OAAO;CACT;AACF;;;;;;;;;;;;;;;AAgBA,eAAsB,kBACpB,UACA,aACA,sBAAyC,CAAC,GACD;CACzC,IAAI,OAAO,aAAa,YAAY,aAAa,MAAM,SAAS,SAAS,IAAI,GAC3E;CAGF,IAAI,KAAK,WAAW,QAAQ,KAAK,KAAK,MAAM,WAAW,QAAQ,KAAK,aAAa,KAAK,QAAQ,GAC5F;CAGF,MAAM,OAAO,KAAK,QAAQ,WAAW;CACrC,MAAM,WAAW,KAAK,QAAQ,MAAM,QAAQ;CAE5C,IAAI,CAAC,aAAa,UAAU,IAAI,GAAG,OAAO;CAE1C,KAAK,MAAM,YAAY,qBACrB,IAAI,aAAa,UAAU,KAAK,QAAQ,QAAQ,CAAC,GAAG,OAAO;CAG7D,IAAI;CAEJ,IAAI;EACF,WAAW,MAAM,GAAG,SAAS,QAAQ;CACvC,QAAQ;EACN;CACF;CAEA,MAAM,WAAW,MAAM,eAAe,IAAI;CAE1C,IAAI,CAAC,aAAa,UAAU,QAAQ,GAAG,OAAO;CAE9C,KAAK,MAAM,YAAY,qBACrB,IAAI,aAAa,UAAU,MAAM,eAAe,KAAK,QAAQ,QAAQ,CAAC,CAAC,GAAG,OAAO;CAGnF,IAAI;EAGF,IAAI,EAAC,MAFe,GAAG,KAAK,QAAQ,EAE1B,CAAC,OAAO,GAAG,OAAO;CAC9B,QAAQ;EACN;CACF;CAEA,OAAO;EACL,cAAc;EACd,cAAc,KAAK,SAAS,UAAU,QAAQ,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG;EACxE,MAAM;CACR;AACF"}
|
|
@@ -4,7 +4,7 @@ import { readFileHead } from "./read-file-head.mjs";
|
|
|
4
4
|
import { resolveUploadPath } from "./resolve-upload-path.mjs";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../../packages/core/src/http/uploads/resolve-variant-candidate.ts
|
|
8
8
|
/**
|
|
9
9
|
* Resolve a path to a variant source, applying the guards both the on-demand
|
|
10
10
|
* route and the `generateImageVariants` ingest helper need: containment
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-variant-candidate.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"resolve-variant-candidate.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/resolve-variant-candidate.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport { HttpError } from \"../errors\";\nimport {\n detectImageFormat,\n IMAGE_SIGNATURE_BYTES,\n isVariantSourceFormat,\n} from \"./detect-image-format\";\nimport type { ResolvedImageVariantsConfig, VariantSourceFormat } from \"./image-variant-types\";\nimport { readFileHead } from \"./read-file-head\";\nimport { resolveUploadPath, type ResolvedUploadPath } from \"./resolve-upload-path\";\n\n/**\n * A request path resolved to a usable variant source\n */\nexport type VariantCandidate = {\n source: ResolvedUploadPath;\n stats: { size: number; mtimeMs: number };\n sourceFormat: VariantSourceFormat;\n};\n\n/**\n * Resolve a path to a variant source, applying the guards both the on-demand\n * route and the `generateImageVariants` ingest helper need: containment\n * (via `resolveUploadPath`), the byte-size limit, and the source format,\n * detected from magic bytes rather than the file extension.\n *\n * @returns `undefined` when the path does not resolve to a file inside the\n * storage root — the caller answers 404, the same as a missing file, so the\n * response is no existence oracle\n * @throws HttpError(413) when the source is over `images.maxSourceBytes`\n * @throws HttpError(415) when the source is not jpeg, png, webp or avif\n */\nexport async function resolveVariantCandidate(\n wildcard: unknown,\n storageRoot: string,\n images: ResolvedImageVariantsConfig,\n): Promise<VariantCandidate | undefined> {\n const source = await resolveUploadPath(wildcard, storageRoot, [images.cacheDirectory]);\n\n if (!source) return undefined;\n\n const stats = await fs.stat(source.absolutePath);\n\n if (stats.size > images.maxSourceBytes) {\n throw new HttpError(413, \"The source image is too large.\");\n }\n\n const sourceFormat = detectImageFormat(\n await readFileHead(source.absolutePath, IMAGE_SIGNATURE_BYTES),\n );\n\n if (!isVariantSourceFormat(sourceFormat)) {\n throw new HttpError(415, \"Variants are only available for jpeg, png, webp and avif images.\");\n }\n\n return {\n source,\n stats: { size: stats.size, mtimeMs: stats.mtimeMs },\n sourceFormat,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAgCA,eAAsB,wBACpB,UACA,aACA,QACuC;CACvC,MAAM,SAAS,MAAM,kBAAkB,UAAU,aAAa,CAAC,OAAO,cAAc,CAAC;CAErF,IAAI,CAAC,QAAQ,OAAO;CAEpB,MAAM,QAAQ,MAAM,GAAG,KAAK,OAAO,YAAY;CAE/C,IAAI,MAAM,OAAO,OAAO,gBACtB,MAAM,IAAI,UAAU,KAAK,gCAAgC;CAG3D,MAAM,eAAe,kBACnB,MAAM,aAAa,OAAO,iBAAmC,CAC/D;CAEA,IAAI,CAAC,sBAAsB,YAAY,GACrC,MAAM,IAAI,UAAU,KAAK,kEAAkE;CAG7F,OAAO;EACL;EACA,OAAO;GAAE,MAAM,MAAM;GAAM,SAAS,MAAM;EAAQ;EAClD;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-flight.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"single-flight.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/single-flight.ts"],"sourcesContent":["/**\n * Runs a task once per key at a time.\n *\n * A caller that arrives while the task for its key is still running gets the\n * same promise instead of starting a second run, so N concurrent cache misses\n * for one derivative generate it once. The entry is dropped when the task\n * settles, success or failure, so a failed run is retried by the next request.\n */\nexport class SingleFlight<T> {\n protected readonly inflight = new Map<string, Promise<T>>();\n\n /**\n * Run `task` for `key`, or join the run already in flight\n */\n public run(key: string, task: () => Promise<T>): Promise<T> {\n const existing = this.inflight.get(key);\n\n if (existing) return existing;\n\n const promise = (async () => {\n try {\n return await task();\n } finally {\n this.inflight.delete(key);\n }\n })();\n\n this.inflight.set(key, promise);\n\n return promise;\n }\n\n /**\n * Number of keys currently in flight\n */\n public get size(): number {\n return this.inflight.size;\n }\n}\n"],"mappings":";;;;;;;;;AAQA,IAAa,eAAb,MAA6B;;kCACG,IAAI,IAAwB;;;;;CAK1D,AAAO,IAAI,KAAa,MAAoC;EAC1D,MAAM,WAAW,KAAK,SAAS,IAAI,GAAG;EAEtC,IAAI,UAAU,OAAO;EAErB,MAAM,WAAW,YAAY;GAC3B,IAAI;IACF,OAAO,MAAM,KAAK;GACpB,UAAU;IACR,KAAK,SAAS,OAAO,GAAG;GAC1B;EACF,EAAC,CAAE;EAEH,KAAK,SAAS,IAAI,KAAK,OAAO;EAE9B,OAAO;CACT;;;;CAKA,IAAW,OAAe;EACxB,OAAO,KAAK,SAAS;CACvB;AACF"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { variantCacheGenerations } from "./image-variant-cache-entries.mjs";
|
|
2
|
+
import { log } from "@warlock.js/logger";
|
|
3
|
+
import fs from "node:fs/promises";
|
|
4
|
+
|
|
5
|
+
//#region ../../packages/core/src/http/uploads/trim-image-variant-cache.ts
|
|
6
|
+
const SWEEP_INTERVAL_MS = 6e4;
|
|
7
|
+
/**
|
|
8
|
+
* A writer's temporary file older than this is an orphan left by a crashed
|
|
9
|
+
* write and is removed by the sweep. Younger ones are never touched: a writer
|
|
10
|
+
* may still be renaming them into place.
|
|
11
|
+
*/
|
|
12
|
+
const ORPHAN_TEMP_AGE_MS = 60 * 6e4;
|
|
13
|
+
/**
|
|
14
|
+
* A generation directory left without derivatives is removed only when it
|
|
15
|
+
* was last changed longer ago than this, so a directory a writer has just
|
|
16
|
+
* created for its first derivative survives. The writers also retry once when
|
|
17
|
+
* their directory vanishes between `mkdir` and the rename.
|
|
18
|
+
*/
|
|
19
|
+
const EMPTY_GENERATION_GRACE_MS = 5 * 6e4;
|
|
20
|
+
const caches = /* @__PURE__ */ new Map();
|
|
21
|
+
function cacheState(directory) {
|
|
22
|
+
let state = caches.get(directory);
|
|
23
|
+
if (!state) {
|
|
24
|
+
state = {
|
|
25
|
+
lastSweep: 0,
|
|
26
|
+
lastWalk: 0,
|
|
27
|
+
bytes: 0,
|
|
28
|
+
sizes: /* @__PURE__ */ new Map(),
|
|
29
|
+
keep: /* @__PURE__ */ new Set(),
|
|
30
|
+
reconciled: false
|
|
31
|
+
};
|
|
32
|
+
caches.set(directory, state);
|
|
33
|
+
}
|
|
34
|
+
return state;
|
|
35
|
+
}
|
|
36
|
+
function errorCode(error) {
|
|
37
|
+
return error?.code;
|
|
38
|
+
}
|
|
39
|
+
/** Age is measured from generation; hits do not extend a derivative's life. */
|
|
40
|
+
async function freshImageVariant(target, maxAgeSeconds) {
|
|
41
|
+
try {
|
|
42
|
+
const stats = await fs.stat(target);
|
|
43
|
+
return stats.isFile() && Date.now() - stats.mtimeMs < maxAgeSeconds * 1e3;
|
|
44
|
+
} catch (error) {
|
|
45
|
+
if (errorCode(error) === "ENOENT") return false;
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Whether a scheduled check must walk the cache. It may skip only when a walk
|
|
51
|
+
* has already reconciled the byte estimate, the cache is within its byte
|
|
52
|
+
* budget, nothing retained has expired (new writes are always younger than
|
|
53
|
+
* the oldest retained derivative), and a walk ran within the last
|
|
54
|
+
* `maxCacheAge`, which also bounds how long an orphaned temporary can linger.
|
|
55
|
+
*/
|
|
56
|
+
function sweepIsDue(state, images) {
|
|
57
|
+
const maxAgeMs = images.maxCacheAge * 1e3;
|
|
58
|
+
const now = Date.now();
|
|
59
|
+
return !state.reconciled || state.bytes > images.maxCacheBytes || state.oldestMtimeMs !== void 0 && state.oldestMtimeMs <= now - maxAgeMs || now - state.lastWalk >= maxAgeMs;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Schedule housekeeping only after a write. Hits do no cache-directory I/O.
|
|
63
|
+
* Writes update a running byte estimate; at most one background check per
|
|
64
|
+
* minute walks the cache, and only when it may have something to reclaim
|
|
65
|
+
* (see {@link sweepIsDue}).
|
|
66
|
+
*/
|
|
67
|
+
function scheduleImageVariantCacheTrim(images, target) {
|
|
68
|
+
const state = cacheState(images.cacheDirectory);
|
|
69
|
+
fs.stat(target).then((stats) => {
|
|
70
|
+
state.bytes += stats.size - (state.sizes.get(target) ?? 0);
|
|
71
|
+
state.sizes.set(target, stats.size);
|
|
72
|
+
state.oldestMtimeMs = Math.min(state.oldestMtimeMs ?? stats.mtimeMs, stats.mtimeMs);
|
|
73
|
+
if (state.timer) return;
|
|
74
|
+
const delay = Math.max(0, state.lastSweep + SWEEP_INTERVAL_MS - Date.now());
|
|
75
|
+
state.timer = setTimeout(() => {
|
|
76
|
+
state.timer = void 0;
|
|
77
|
+
if (!sweepIsDue(state, images)) {
|
|
78
|
+
state.lastSweep = Date.now();
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
trimImageVariantCache(images, target).catch((error) => {
|
|
82
|
+
log.warn("uploads", "image-variants", error);
|
|
83
|
+
});
|
|
84
|
+
}, delay);
|
|
85
|
+
state.timer.unref();
|
|
86
|
+
}).catch((error) => {
|
|
87
|
+
if (errorCode(error) !== "ENOENT") log.warn("uploads", "image-variants", error);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/** Remove a temporary only when it is a regular file older than {@link ORPHAN_TEMP_AGE_MS}. */
|
|
91
|
+
async function removeOrphanTemporary(target) {
|
|
92
|
+
try {
|
|
93
|
+
const stats = await fs.lstat(target);
|
|
94
|
+
if (stats.isFile() && Date.now() - stats.mtimeMs > 36e5) await fs.rm(target, { force: true });
|
|
95
|
+
} catch (error) {
|
|
96
|
+
if (errorCode(error) !== "ENOENT") throw error;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Remove a generation left without derivatives: its manifest, then the
|
|
101
|
+
* directory itself with a non-recursive `rmdir`, so anything a writer has put
|
|
102
|
+
* there since the walk keeps the directory in place.
|
|
103
|
+
*/
|
|
104
|
+
async function removeEmptyGeneration(generation) {
|
|
105
|
+
if (generation.derivatives > 0) return;
|
|
106
|
+
if (Date.now() - generation.mtimeMs <= 3e5) return;
|
|
107
|
+
if (generation.manifest) await fs.rm(generation.manifest, { force: true });
|
|
108
|
+
try {
|
|
109
|
+
if (!(await fs.lstat(generation.directory)).isDirectory()) return;
|
|
110
|
+
await fs.rmdir(generation.directory);
|
|
111
|
+
} catch (error) {
|
|
112
|
+
const code = errorCode(error);
|
|
113
|
+
if (code !== "ENOENT" && code !== "ENOTEMPTY" && code !== "EEXIST") throw error;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Join an in-flight sweep rather than queueing another walk. Retain the file
|
|
118
|
+
* about to be served, even if it alone exceeds the byte budget. Only paths in
|
|
119
|
+
* the generated cache layout are touched and symlinks are never followed:
|
|
120
|
+
* expired and oldest derivatives are evicted, writer temporaries older than
|
|
121
|
+
* {@link ORPHAN_TEMP_AGE_MS} are removed, and a generation directory left
|
|
122
|
+
* without derivatives loses its manifest and the directory itself once it is
|
|
123
|
+
* older than {@link EMPTY_GENERATION_GRACE_MS}. The cache root, shard and
|
|
124
|
+
* source directories, user folders and unrelated files stay in place.
|
|
125
|
+
*/
|
|
126
|
+
async function trimImageVariantCache(images, keep) {
|
|
127
|
+
const state = cacheState(images.cacheDirectory);
|
|
128
|
+
state.keep.add(keep);
|
|
129
|
+
if (state.sweep) return state.sweep;
|
|
130
|
+
state.lastSweep = Date.now();
|
|
131
|
+
state.lastWalk = state.lastSweep;
|
|
132
|
+
const sweep = (async () => {
|
|
133
|
+
const files = [];
|
|
134
|
+
const generations = [];
|
|
135
|
+
for await (const found of variantCacheGenerations(images.cacheDirectory)) {
|
|
136
|
+
let mtimeMs;
|
|
137
|
+
try {
|
|
138
|
+
mtimeMs = (await fs.lstat(found.directory)).mtimeMs;
|
|
139
|
+
} catch (error) {
|
|
140
|
+
if (errorCode(error) === "ENOENT") continue;
|
|
141
|
+
throw error;
|
|
142
|
+
}
|
|
143
|
+
const generation = {
|
|
144
|
+
directory: found.directory,
|
|
145
|
+
mtimeMs,
|
|
146
|
+
derivatives: 0
|
|
147
|
+
};
|
|
148
|
+
generations.push(generation);
|
|
149
|
+
for (const entry of found.entries) if (entry.type === "manifest") generation.manifest = entry.target;
|
|
150
|
+
else if (entry.type === "temporary") await removeOrphanTemporary(entry.target);
|
|
151
|
+
else try {
|
|
152
|
+
const stats = await fs.stat(entry.target);
|
|
153
|
+
files.push({
|
|
154
|
+
target: entry.target,
|
|
155
|
+
size: stats.size,
|
|
156
|
+
mtimeMs: stats.mtimeMs,
|
|
157
|
+
generation
|
|
158
|
+
});
|
|
159
|
+
generation.derivatives += 1;
|
|
160
|
+
} catch (error) {
|
|
161
|
+
if (errorCode(error) !== "ENOENT") throw error;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
state.sizes = new Map(files.map((file) => [file.target, file.size]));
|
|
165
|
+
state.bytes = files.reduce((sum, file) => sum + file.size, 0);
|
|
166
|
+
const cutoff = Date.now() - images.maxCacheAge * 1e3;
|
|
167
|
+
let oldestMtimeMs;
|
|
168
|
+
for (const file of files.sort((a, b) => a.mtimeMs - b.mtimeMs)) {
|
|
169
|
+
if (!state.keep.has(file.target) && (file.mtimeMs <= cutoff || state.bytes > images.maxCacheBytes)) {
|
|
170
|
+
await fs.rm(file.target, { force: true });
|
|
171
|
+
state.bytes -= file.size;
|
|
172
|
+
state.sizes.delete(file.target);
|
|
173
|
+
file.generation.derivatives -= 1;
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
oldestMtimeMs = Math.min(oldestMtimeMs ?? file.mtimeMs, file.mtimeMs);
|
|
177
|
+
}
|
|
178
|
+
for (const generation of generations) await removeEmptyGeneration(generation);
|
|
179
|
+
state.oldestMtimeMs = oldestMtimeMs;
|
|
180
|
+
state.reconciled = true;
|
|
181
|
+
})();
|
|
182
|
+
state.sweep = sweep;
|
|
183
|
+
try {
|
|
184
|
+
await sweep;
|
|
185
|
+
} finally {
|
|
186
|
+
state.sweep = void 0;
|
|
187
|
+
state.keep.clear();
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
//#endregion
|
|
192
|
+
export { freshImageVariant, scheduleImageVariantCacheTrim };
|
|
193
|
+
//# sourceMappingURL=trim-image-variant-cache.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trim-image-variant-cache.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/trim-image-variant-cache.ts"],"sourcesContent":["import { log } from \"@warlock.js/logger\";\nimport fs from \"node:fs/promises\";\nimport type { ResolvedImageVariantsConfig } from \"./image-variant-types\";\nimport { variantCacheGenerations } from \"./image-variant-cache-entries\";\n\nconst SWEEP_INTERVAL_MS = 60_000;\n\n/**\n * A writer's temporary file older than this is an orphan left by a crashed\n * write and is removed by the sweep. Younger ones are never touched: a writer\n * may still be renaming them into place.\n */\nexport const ORPHAN_TEMP_AGE_MS = 60 * 60_000;\n\n/**\n * A generation directory left without derivatives is removed only when it\n * was last changed longer ago than this, so a directory a writer has just\n * created for its first derivative survives. The writers also retry once when\n * their directory vanishes between `mkdir` and the rename.\n */\nexport const EMPTY_GENERATION_GRACE_MS = 5 * 60_000;\n\ntype CacheState = {\n sweep?: Promise<void>;\n timer?: ReturnType<typeof setTimeout>;\n /** When the last scheduled check ran, whether or not it walked the cache. */\n lastSweep: number;\n /** When the cache was last walked. */\n lastWalk: number;\n bytes: number;\n sizes: Map<string, number>;\n keep: Set<string>;\n /** True once a walk has reconciled `bytes` with the disk. */\n reconciled: boolean;\n /** The oldest retained derivative's mtime; undefined when none is known. */\n oldestMtimeMs?: number;\n};\nconst caches = new Map<string, CacheState>();\nfunction cacheState(directory: string): CacheState {\n let state = caches.get(directory);\n if (!state) {\n state = {\n lastSweep: 0,\n lastWalk: 0,\n bytes: 0,\n sizes: new Map(),\n keep: new Set(),\n reconciled: false,\n };\n caches.set(directory, state);\n }\n return state;\n}\n\nfunction errorCode(error: unknown): string | undefined {\n return (error as NodeJS.ErrnoException | undefined)?.code;\n}\n\n/** Age is measured from generation; hits do not extend a derivative's life. */\nexport async function freshImageVariant(target: string, maxAgeSeconds: number): Promise<boolean> {\n try {\n const stats = await fs.stat(target);\n return stats.isFile() && Date.now() - stats.mtimeMs < maxAgeSeconds * 1000;\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") return false;\n throw error;\n }\n}\n\n/**\n * Whether a scheduled check must walk the cache. It may skip only when a walk\n * has already reconciled the byte estimate, the cache is within its byte\n * budget, nothing retained has expired (new writes are always younger than\n * the oldest retained derivative), and a walk ran within the last\n * `maxCacheAge`, which also bounds how long an orphaned temporary can linger.\n */\nfunction sweepIsDue(state: CacheState, images: ResolvedImageVariantsConfig): boolean {\n const maxAgeMs = images.maxCacheAge * 1000;\n const now = Date.now();\n return (\n !state.reconciled ||\n state.bytes > images.maxCacheBytes ||\n (state.oldestMtimeMs !== undefined && state.oldestMtimeMs <= now - maxAgeMs) ||\n now - state.lastWalk >= maxAgeMs\n );\n}\n\n/**\n * Schedule housekeeping only after a write. Hits do no cache-directory I/O.\n * Writes update a running byte estimate; at most one background check per\n * minute walks the cache, and only when it may have something to reclaim\n * (see {@link sweepIsDue}).\n */\nexport function scheduleImageVariantCacheTrim(\n images: ResolvedImageVariantsConfig,\n target: string,\n): void {\n const state = cacheState(images.cacheDirectory);\n void fs\n .stat(target)\n .then((stats) => {\n state.bytes += stats.size - (state.sizes.get(target) ?? 0);\n state.sizes.set(target, stats.size);\n state.oldestMtimeMs = Math.min(state.oldestMtimeMs ?? stats.mtimeMs, stats.mtimeMs);\n if (state.timer) return;\n const delay = Math.max(0, state.lastSweep + SWEEP_INTERVAL_MS - Date.now());\n state.timer = setTimeout(() => {\n state.timer = undefined;\n if (!sweepIsDue(state, images)) {\n state.lastSweep = Date.now();\n return;\n }\n void trimImageVariantCache(images, target).catch((error: unknown) => {\n log.warn(\"uploads\", \"image-variants\", error);\n });\n }, delay);\n state.timer.unref();\n })\n .catch((error: unknown) => {\n if (errorCode(error) !== \"ENOENT\") log.warn(\"uploads\", \"image-variants\", error);\n });\n}\n\ntype Derivative = { target: string; size: number; mtimeMs: number; generation: Generation };\ntype Generation = {\n directory: string;\n /** The directory's mtime before this sweep removed anything from it. */\n mtimeMs: number;\n derivatives: number;\n manifest?: string;\n};\n\n/** Remove a temporary only when it is a regular file older than {@link ORPHAN_TEMP_AGE_MS}. */\nasync function removeOrphanTemporary(target: string): Promise<void> {\n try {\n const stats = await fs.lstat(target);\n if (stats.isFile() && Date.now() - stats.mtimeMs > ORPHAN_TEMP_AGE_MS) {\n await fs.rm(target, { force: true });\n }\n } catch (error) {\n if (errorCode(error) !== \"ENOENT\") throw error;\n }\n}\n\n/**\n * Remove a generation left without derivatives: its manifest, then the\n * directory itself with a non-recursive `rmdir`, so anything a writer has put\n * there since the walk keeps the directory in place.\n */\nasync function removeEmptyGeneration(generation: Generation): Promise<void> {\n if (generation.derivatives > 0) return;\n if (Date.now() - generation.mtimeMs <= EMPTY_GENERATION_GRACE_MS) return;\n if (generation.manifest) await fs.rm(generation.manifest, { force: true });\n try {\n if (!(await fs.lstat(generation.directory)).isDirectory()) return;\n await fs.rmdir(generation.directory);\n } catch (error) {\n const code = errorCode(error);\n if (code !== \"ENOENT\" && code !== \"ENOTEMPTY\" && code !== \"EEXIST\") throw error;\n }\n}\n\n/**\n * Join an in-flight sweep rather than queueing another walk. Retain the file\n * about to be served, even if it alone exceeds the byte budget. Only paths in\n * the generated cache layout are touched and symlinks are never followed:\n * expired and oldest derivatives are evicted, writer temporaries older than\n * {@link ORPHAN_TEMP_AGE_MS} are removed, and a generation directory left\n * without derivatives loses its manifest and the directory itself once it is\n * older than {@link EMPTY_GENERATION_GRACE_MS}. The cache root, shard and\n * source directories, user folders and unrelated files stay in place.\n */\nexport async function trimImageVariantCache(\n images: ResolvedImageVariantsConfig,\n keep: string,\n): Promise<void> {\n const state = cacheState(images.cacheDirectory);\n state.keep.add(keep);\n if (state.sweep) return state.sweep;\n state.lastSweep = Date.now();\n state.lastWalk = state.lastSweep;\n const sweep = (async () => {\n const files: Derivative[] = [];\n const generations: Generation[] = [];\n for await (const found of variantCacheGenerations(images.cacheDirectory)) {\n let mtimeMs: number;\n try {\n mtimeMs = (await fs.lstat(found.directory)).mtimeMs;\n } catch (error) {\n if (errorCode(error) === \"ENOENT\") continue;\n throw error;\n }\n const generation: Generation = { directory: found.directory, mtimeMs, derivatives: 0 };\n generations.push(generation);\n for (const entry of found.entries) {\n if (entry.type === \"manifest\") {\n generation.manifest = entry.target;\n } else if (entry.type === \"temporary\") {\n await removeOrphanTemporary(entry.target);\n } else {\n try {\n const stats = await fs.stat(entry.target);\n files.push({\n target: entry.target,\n size: stats.size,\n mtimeMs: stats.mtimeMs,\n generation,\n });\n generation.derivatives += 1;\n } catch (error) {\n if (errorCode(error) !== \"ENOENT\") throw error;\n }\n }\n }\n }\n state.sizes = new Map(files.map((file) => [file.target, file.size]));\n state.bytes = files.reduce((sum, file) => sum + file.size, 0);\n const cutoff = Date.now() - images.maxCacheAge * 1000;\n let oldestMtimeMs: number | undefined;\n for (const file of files.sort((a, b) => a.mtimeMs - b.mtimeMs)) {\n if (\n !state.keep.has(file.target) &&\n (file.mtimeMs <= cutoff || state.bytes > images.maxCacheBytes)\n ) {\n await fs.rm(file.target, { force: true });\n state.bytes -= file.size;\n state.sizes.delete(file.target);\n file.generation.derivatives -= 1;\n continue;\n }\n oldestMtimeMs = Math.min(oldestMtimeMs ?? file.mtimeMs, file.mtimeMs);\n }\n for (const generation of generations) await removeEmptyGeneration(generation);\n state.oldestMtimeMs = oldestMtimeMs;\n state.reconciled = true;\n })();\n state.sweep = sweep;\n try {\n await sweep;\n } finally {\n state.sweep = undefined;\n state.keep.clear();\n }\n}\n"],"mappings":";;;;;AAKA,MAAM,oBAAoB;;;;;;AAO1B,MAAa,qBAAqB,KAAK;;;;;;;AAQvC,MAAa,4BAA4B,IAAI;AAiB7C,MAAM,yBAAS,IAAI,IAAwB;AAC3C,SAAS,WAAW,WAA+B;CACjD,IAAI,QAAQ,OAAO,IAAI,SAAS;CAChC,IAAI,CAAC,OAAO;EACV,QAAQ;GACN,WAAW;GACX,UAAU;GACV,OAAO;GACP,uBAAO,IAAI,IAAI;GACf,sBAAM,IAAI,IAAI;GACd,YAAY;EACd;EACA,OAAO,IAAI,WAAW,KAAK;CAC7B;CACA,OAAO;AACT;AAEA,SAAS,UAAU,OAAoC;CACrD,OAAQ,OAA6C;AACvD;;AAGA,eAAsB,kBAAkB,QAAgB,eAAyC;CAC/F,IAAI;EACF,MAAM,QAAQ,MAAM,GAAG,KAAK,MAAM;EAClC,OAAO,MAAM,OAAO,KAAK,KAAK,IAAI,IAAI,MAAM,UAAU,gBAAgB;CACxE,SAAS,OAAO;EACd,IAAI,UAAU,KAAK,MAAM,UAAU,OAAO;EAC1C,MAAM;CACR;AACF;;;;;;;;AASA,SAAS,WAAW,OAAmB,QAA8C;CACnF,MAAM,WAAW,OAAO,cAAc;CACtC,MAAM,MAAM,KAAK,IAAI;CACrB,OACE,CAAC,MAAM,cACP,MAAM,QAAQ,OAAO,iBACpB,MAAM,kBAAkB,UAAa,MAAM,iBAAiB,MAAM,YACnE,MAAM,MAAM,YAAY;AAE5B;;;;;;;AAQA,SAAgB,8BACd,QACA,QACM;CACN,MAAM,QAAQ,WAAW,OAAO,cAAc;CAC9C,AAAK,GACF,KAAK,MAAM,CAAC,CACZ,MAAM,UAAU;EACf,MAAM,SAAS,MAAM,QAAQ,MAAM,MAAM,IAAI,MAAM,KAAK;EACxD,MAAM,MAAM,IAAI,QAAQ,MAAM,IAAI;EAClC,MAAM,gBAAgB,KAAK,IAAI,MAAM,iBAAiB,MAAM,SAAS,MAAM,OAAO;EAClF,IAAI,MAAM,OAAO;EACjB,MAAM,QAAQ,KAAK,IAAI,GAAG,MAAM,YAAY,oBAAoB,KAAK,IAAI,CAAC;EAC1E,MAAM,QAAQ,iBAAiB;GAC7B,MAAM,QAAQ;GACd,IAAI,CAAC,WAAW,OAAO,MAAM,GAAG;IAC9B,MAAM,YAAY,KAAK,IAAI;IAC3B;GACF;GACA,AAAK,sBAAsB,QAAQ,MAAM,CAAC,CAAC,OAAO,UAAmB;IACnE,IAAI,KAAK,WAAW,kBAAkB,KAAK;GAC7C,CAAC;EACH,GAAG,KAAK;EACR,MAAM,MAAM,MAAM;CACpB,CAAC,CAAC,CACD,OAAO,UAAmB;EACzB,IAAI,UAAU,KAAK,MAAM,UAAU,IAAI,KAAK,WAAW,kBAAkB,KAAK;CAChF,CAAC;AACL;;AAYA,eAAe,sBAAsB,QAA+B;CAClE,IAAI;EACF,MAAM,QAAQ,MAAM,GAAG,MAAM,MAAM;EACnC,IAAI,MAAM,OAAO,KAAK,KAAK,IAAI,IAAI,MAAM,gBACvC,MAAM,GAAG,GAAG,QAAQ,EAAE,OAAO,KAAK,CAAC;CAEvC,SAAS,OAAO;EACd,IAAI,UAAU,KAAK,MAAM,UAAU,MAAM;CAC3C;AACF;;;;;;AAOA,eAAe,sBAAsB,YAAuC;CAC1E,IAAI,WAAW,cAAc,GAAG;CAChC,IAAI,KAAK,IAAI,IAAI,WAAW,gBAAsC;CAClE,IAAI,WAAW,UAAU,MAAM,GAAG,GAAG,WAAW,UAAU,EAAE,OAAO,KAAK,CAAC;CACzE,IAAI;EACF,IAAI,EAAE,MAAM,GAAG,MAAM,WAAW,SAAS,EAAC,CAAE,YAAY,GAAG;EAC3D,MAAM,GAAG,MAAM,WAAW,SAAS;CACrC,SAAS,OAAO;EACd,MAAM,OAAO,UAAU,KAAK;EAC5B,IAAI,SAAS,YAAY,SAAS,eAAe,SAAS,UAAU,MAAM;CAC5E;AACF;;;;;;;;;;;AAYA,eAAsB,sBACpB,QACA,MACe;CACf,MAAM,QAAQ,WAAW,OAAO,cAAc;CAC9C,MAAM,KAAK,IAAI,IAAI;CACnB,IAAI,MAAM,OAAO,OAAO,MAAM;CAC9B,MAAM,YAAY,KAAK,IAAI;CAC3B,MAAM,WAAW,MAAM;CACvB,MAAM,SAAS,YAAY;EACzB,MAAM,QAAsB,CAAC;EAC7B,MAAM,cAA4B,CAAC;EACnC,WAAW,MAAM,SAAS,wBAAwB,OAAO,cAAc,GAAG;GACxE,IAAI;GACJ,IAAI;IACF,WAAW,MAAM,GAAG,MAAM,MAAM,SAAS,EAAC,CAAE;GAC9C,SAAS,OAAO;IACd,IAAI,UAAU,KAAK,MAAM,UAAU;IACnC,MAAM;GACR;GACA,MAAM,aAAyB;IAAE,WAAW,MAAM;IAAW;IAAS,aAAa;GAAE;GACrF,YAAY,KAAK,UAAU;GAC3B,KAAK,MAAM,SAAS,MAAM,SACxB,IAAI,MAAM,SAAS,YACjB,WAAW,WAAW,MAAM;QACvB,IAAI,MAAM,SAAS,aACxB,MAAM,sBAAsB,MAAM,MAAM;QAExC,IAAI;IACF,MAAM,QAAQ,MAAM,GAAG,KAAK,MAAM,MAAM;IACxC,MAAM,KAAK;KACT,QAAQ,MAAM;KACd,MAAM,MAAM;KACZ,SAAS,MAAM;KACf;IACF,CAAC;IACD,WAAW,eAAe;GAC5B,SAAS,OAAO;IACd,IAAI,UAAU,KAAK,MAAM,UAAU,MAAM;GAC3C;EAGN;EACA,MAAM,QAAQ,IAAI,IAAI,MAAM,KAAK,SAAS,CAAC,KAAK,QAAQ,KAAK,IAAI,CAAC,CAAC;EACnE,MAAM,QAAQ,MAAM,QAAQ,KAAK,SAAS,MAAM,KAAK,MAAM,CAAC;EAC5D,MAAM,SAAS,KAAK,IAAI,IAAI,OAAO,cAAc;EACjD,IAAI;EACJ,KAAK,MAAM,QAAQ,MAAM,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,OAAO,GAAG;GAC9D,IACE,CAAC,MAAM,KAAK,IAAI,KAAK,MAAM,MAC1B,KAAK,WAAW,UAAU,MAAM,QAAQ,OAAO,gBAChD;IACA,MAAM,GAAG,GAAG,KAAK,QAAQ,EAAE,OAAO,KAAK,CAAC;IACxC,MAAM,SAAS,KAAK;IACpB,MAAM,MAAM,OAAO,KAAK,MAAM;IAC9B,KAAK,WAAW,eAAe;IAC/B;GACF;GACA,gBAAgB,KAAK,IAAI,iBAAiB,KAAK,SAAS,KAAK,OAAO;EACtE;EACA,KAAK,MAAM,cAAc,aAAa,MAAM,sBAAsB,UAAU;EAC5E,MAAM,gBAAgB;EACtB,MAAM,aAAa;CACrB,EAAC,CAAE;CACH,MAAM,QAAQ;CACd,IAAI;EACF,MAAM;CACR,UAAU;EACR,MAAM,QAAQ;EACd,MAAM,KAAK,MAAM;CACnB;AACF"}
|
|
@@ -1,10 +1,26 @@
|
|
|
1
|
+
import { StorageDriverName } from "../../storage/types.mjs";
|
|
1
2
|
import { RequestHandler } from "../../router/types.mjs";
|
|
2
|
-
//#region
|
|
3
|
+
//#region ../../packages/core/src/http/uploads/uploaded-file.controller.d.ts
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
+
* Options for {@link createUploadedFileController}
|
|
6
|
+
*/
|
|
7
|
+
type UploadedFileControllerOptions = {
|
|
8
|
+
/**
|
|
9
|
+
* Disk to serve from; remote disks support variants only. Uses the default
|
|
10
|
+
* disk when omitted. A private disk
|
|
11
|
+
* should be served from a route that checks access first.
|
|
12
|
+
*/
|
|
13
|
+
disk?: StorageDriverName; /** Allow derivatives from the default cloud disk. Explicit disk selection also opts in. */
|
|
14
|
+
remote?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Serves local uploads and bounded on-demand image variants from any disk.
|
|
5
18
|
*
|
|
6
19
|
* ```ts
|
|
7
20
|
* router.get("/uploads/*", uploadedFileController);
|
|
21
|
+
* router.get("/invoices/*", createUploadedFileController({ disk: "private" }), {
|
|
22
|
+
* middleware: [authMiddleware()],
|
|
23
|
+
* });
|
|
8
24
|
* ```
|
|
9
25
|
*
|
|
10
26
|
* - `GET /uploads/<path>` sends the original file with a one-year cache.
|
|
@@ -12,13 +28,17 @@ import { RequestHandler } from "../../router/types.mjs";
|
|
|
12
28
|
* rendered from a variant named in `uploads.images.variants`. No other query
|
|
13
29
|
* key is accepted, so a client can never ask for an arbitrary size.
|
|
14
30
|
*
|
|
15
|
-
* The path must stay inside the
|
|
31
|
+
* The path must stay inside the disk root (after symlinks are resolved) and
|
|
16
32
|
* outside the variant cache; anything else is a 404, the same answer a missing
|
|
17
|
-
* file gets. Derivatives are cached on disk under a
|
|
18
|
-
*
|
|
19
|
-
*
|
|
33
|
+
* file gets. Derivatives are cached on disk under a directory per source
|
|
34
|
+
* (see `resolveImageVariant`), written atomically, generated once per key even
|
|
35
|
+
* under concurrent requests, and sent with an immutable cache and an ETag.
|
|
36
|
+
*/
|
|
37
|
+
declare function createUploadedFileController(options?: UploadedFileControllerOptions): RequestHandler;
|
|
38
|
+
/**
|
|
39
|
+
* Serves the default disk's uploads; see {@link createUploadedFileController}
|
|
20
40
|
*/
|
|
21
41
|
declare const uploadedFileController: RequestHandler;
|
|
22
42
|
//#endregion
|
|
23
|
-
export { uploadedFileController };
|
|
43
|
+
export { UploadedFileControllerOptions, createUploadedFileController, uploadedFileController };
|
|
24
44
|
//# sourceMappingURL=uploaded-file.controller.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploaded-file.controller.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"uploaded-file.controller.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/uploaded-file.controller.ts"],"mappings":";;;;;;KA6FY,6BAAA;EAA6B;;;;;EAMvC,IAAA,GAAO,iBAAiB,EAGlB;EAAN,MAAA;AAAA;;;;;;;;AA0Be;AA+HjB;;;;AAAoF;;;;;;;;;iBAjIpE,4BAAA,CACd,OAAA,GAAS,6BAAA,GACR,cAAc;;;;cA+HJ,sBAAA,EAAwB,cAA+C"}
|