@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":"is-path-inside.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"is-path-inside.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/is-path-inside.ts"],"sourcesContent":["import path from \"node:path\";\n\n/**\n * Whether `candidate` is strictly inside `directory` (never equal to it).\n *\n * Both paths must already be absolute and resolved. The check compares against\n * `directory + path.sep`, so a sibling sharing the directory's name as a prefix\n * (`/srv/storage-evil` next to `/srv/storage`) is outside. On win32 the\n * comparison is case-insensitive, matching the filesystem.\n */\nexport function isPathInside(candidate: string, directory: string): boolean {\n const prefix = directory.endsWith(path.sep) ? directory : directory + path.sep;\n\n if (process.platform === \"win32\") {\n return candidate.toLowerCase().startsWith(prefix.toLowerCase());\n }\n\n return candidate.startsWith(prefix);\n}\n\n/**\n * Whether `candidate` is `directory` itself or anything inside it\n */\nexport function isPathWithin(candidate: string, directory: string): boolean {\n const same =\n process.platform === \"win32\"\n ? candidate.toLowerCase() === directory.toLowerCase()\n : candidate === directory;\n\n return same || isPathInside(candidate, directory);\n}\n"],"mappings":";;;;;;;;;;;AAUA,SAAgB,aAAa,WAAmB,WAA4B;CAC1E,MAAM,SAAS,UAAU,SAAS,KAAK,GAAG,IAAI,YAAY,YAAY,KAAK;CAE3E,IAAI,QAAQ,aAAa,SACvB,OAAO,UAAU,YAAY,CAAC,CAAC,WAAW,OAAO,YAAY,CAAC;CAGhE,OAAO,UAAU,WAAW,MAAM;AACpC;;;;AAKA,SAAgB,aAAa,WAAmB,WAA4B;CAM1E,QAJE,QAAQ,aAAa,UACjB,UAAU,YAAY,MAAM,UAAU,YAAY,IAClD,cAAc,cAEL,aAAa,WAAW,SAAS;AAClD"}
|
|
@@ -4,7 +4,7 @@ import "../../image/index.mjs";
|
|
|
4
4
|
import { detectImageFormat } from "./detect-image-format.mjs";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../../packages/core/src/http/uploads/load-variant-source.ts
|
|
8
8
|
/**
|
|
9
9
|
* Read a variant source in full and check it before it is decoded.
|
|
10
10
|
*
|
|
@@ -21,7 +21,7 @@ import fs from "node:fs/promises";
|
|
|
21
21
|
* I/O) propagates unchanged.
|
|
22
22
|
*/
|
|
23
23
|
async function loadVariantSource(absolutePath, { maxSourceBytes, maxSourcePixels, expectedFormat }) {
|
|
24
|
-
const buffer = await fs.readFile(absolutePath);
|
|
24
|
+
const buffer = Buffer.isBuffer(absolutePath) ? absolutePath : await fs.readFile(absolutePath);
|
|
25
25
|
if (buffer.length > maxSourceBytes) throw new HttpError(413, "The source image is too large.");
|
|
26
26
|
if (detectImageFormat(buffer) !== expectedFormat) throw new HttpError(415, "The source image changed format while it was read.");
|
|
27
27
|
const image = new Image(buffer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-variant-source.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"load-variant-source.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/load-variant-source.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport { Image } from \"../../image\";\nimport { HttpError } from \"../errors\";\nimport { detectImageFormat } from \"./detect-image-format\";\nimport type { VariantSourceFormat } from \"./image-variant-types\";\n\n/**\n * Bounds and the expected format a source must match\n */\nexport type LoadVariantSourceOptions = {\n maxSourceBytes: number;\n maxSourcePixels: number;\n expectedFormat: VariantSourceFormat;\n};\n\n/**\n * Read a variant source in full and check it before it is decoded.\n *\n * The caller has already sniffed the format from the file head; this re-checks\n * the bytes actually read, the same buffer that is then resized, so the file\n * cannot be swapped between the check and the render.\n *\n * - bytes over `maxSourceBytes` → 413\n * - magic bytes that no longer match `expectedFormat` → 415\n * - a header sharp cannot read (e.g. avif without a decoder) → 415\n * - width × height over `maxSourcePixels` → 413, read from the header only\n *\n * @throws HttpError with status 413 or 415. Any other error (sharp missing,\n * I/O) propagates unchanged.\n */\nexport async function loadVariantSource(\n absolutePath: string | Buffer,\n { maxSourceBytes, maxSourcePixels, expectedFormat }: LoadVariantSourceOptions,\n): Promise<Image> {\n const buffer = Buffer.isBuffer(absolutePath) ? absolutePath : await fs.readFile(absolutePath);\n\n if (buffer.length > maxSourceBytes) {\n throw new HttpError(413, \"The source image is too large.\");\n }\n\n if (detectImageFormat(buffer) !== expectedFormat) {\n throw new HttpError(415, \"The source image changed format while it was read.\");\n }\n\n // Constructed outside the try below: sharp being absent is a server fault\n // (500 with the install hint), not an unsupported image.\n const image = new Image(buffer);\n\n let width: number | undefined;\n let height: number | undefined;\n\n try {\n ({ width, height } = await image.metadata());\n } catch {\n throw new HttpError(415, \"The source image cannot be decoded.\");\n }\n\n if (!width || !height) {\n throw new HttpError(415, \"The source image cannot be decoded.\");\n }\n\n if (width * height > maxSourcePixels) {\n throw new HttpError(413, \"The source image has too many pixels.\");\n }\n\n return image;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA8BA,eAAsB,kBACpB,cACA,EAAE,gBAAgB,iBAAiB,kBACnB;CAChB,MAAM,SAAS,OAAO,SAAS,YAAY,IAAI,eAAe,MAAM,GAAG,SAAS,YAAY;CAE5F,IAAI,OAAO,SAAS,gBAClB,MAAM,IAAI,UAAU,KAAK,gCAAgC;CAG3D,IAAI,kBAAkB,MAAM,MAAM,gBAChC,MAAM,IAAI,UAAU,KAAK,oDAAoD;CAK/E,MAAM,QAAQ,IAAI,MAAM,MAAM;CAE9B,IAAI;CACJ,IAAI;CAEJ,IAAI;EACF,CAAC,CAAE,OAAO,UAAW,MAAM,MAAM,SAAS;CAC5C,QAAQ;EACN,MAAM,IAAI,UAAU,KAAK,qCAAqC;CAChE;CAEA,IAAI,CAAC,SAAS,CAAC,QACb,MAAM,IAAI,UAAU,KAAK,qCAAqC;CAGhE,IAAI,QAAQ,SAAS,iBACnB,MAAM,IAAI,UAAU,KAAK,uCAAuC;CAGlE,OAAO;AACT"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { storage } from "../../storage/storage.mjs";
|
|
2
|
+
import "../../storage/index.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../packages/core/src/http/uploads/local-disk-root.ts
|
|
5
|
+
/**
|
|
6
|
+
* Root directory of a local storage disk, or `undefined` when the disk is not
|
|
7
|
+
* local (object storage has no directory to serve or cache from).
|
|
8
|
+
*
|
|
9
|
+
* Without a name this is the default disk, read through `storage.root()` as
|
|
10
|
+
* `uploadedFileController` always has.
|
|
11
|
+
*/
|
|
12
|
+
function localDiskRoot(disk) {
|
|
13
|
+
if (disk === void 0) {
|
|
14
|
+
const root = storage.root();
|
|
15
|
+
return root && root !== "." ? root : void 0;
|
|
16
|
+
}
|
|
17
|
+
const driver = storage.getDriver(disk);
|
|
18
|
+
if (driver.name !== "local" || typeof driver.getRoot !== "function") return void 0;
|
|
19
|
+
return driver.getRoot();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { localDiskRoot };
|
|
24
|
+
//# sourceMappingURL=local-disk-root.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-disk-root.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/local-disk-root.ts"],"sourcesContent":["import { storage } from \"../../storage\";\nimport type { StorageDriverName } from \"../../storage/types\";\n\n/**\n * Root directory of a local storage disk, or `undefined` when the disk is not\n * local (object storage has no directory to serve or cache from).\n *\n * Without a name this is the default disk, read through `storage.root()` as\n * `uploadedFileController` always has.\n */\nexport function localDiskRoot(disk?: StorageDriverName): string | undefined {\n if (disk === undefined) {\n const root = storage.root();\n\n return root && root !== \".\" ? root : undefined;\n }\n\n const driver = storage.getDriver(disk) as { name?: string; getRoot?: () => string };\n\n if (driver.name !== \"local\" || typeof driver.getRoot !== \"function\") return undefined;\n\n return driver.getRoot();\n}\n"],"mappings":";;;;;;;;;;;AAUA,SAAgB,cAAc,MAA8C;CAC1E,IAAI,SAAS,QAAW;EACtB,MAAM,OAAO,QAAQ,KAAK;EAE1B,OAAO,QAAQ,SAAS,MAAM,OAAO;CACvC;CAEA,MAAM,SAAS,QAAQ,UAAU,IAAI;CAErC,IAAI,OAAO,SAAS,WAAW,OAAO,OAAO,YAAY,YAAY,OAAO;CAE5E,OAAO,OAAO,QAAQ;AACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-uploaded-file-query.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"parse-uploaded-file-query.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/parse-uploaded-file-query.ts"],"sourcesContent":["import type { UploadedFileQuery } from \"./image-variant-types\";\n\nconst ALLOWED_KEYS = new Set([\"variant\", \"format\"]);\n\n/**\n * Read the query string of an uploads request, strictly.\n *\n * It parses the raw URL rather than the framework's parsed query, because the\n * parsed form folds a repeated key into an array and a lone key into a string,\n * and a strict allowlist has to see both. Only `variant` and `format` are\n * accepted, each at most once, and `format` only next to `variant`.\n *\n * @param url - the raw request URL, path and query\n */\nexport function parseUploadedFileQuery(url: string): UploadedFileQuery {\n const queryStart = url.indexOf(\"?\");\n const rawQuery = queryStart === -1 ? \"\" : url.slice(queryStart + 1);\n\n if (rawQuery === \"\") return { type: \"original\" };\n\n const values = new Map<string, string>();\n\n for (const [key, value] of new URLSearchParams(rawQuery)) {\n if (!ALLOWED_KEYS.has(key)) {\n return { type: \"invalid\", reason: `Unknown query parameter \"${key}\".` };\n }\n\n if (values.has(key)) {\n return { type: \"invalid\", reason: `Query parameter \"${key}\" is repeated.` };\n }\n\n values.set(key, value);\n }\n\n const variant = values.get(\"variant\");\n const format = values.get(\"format\");\n\n if (variant === undefined) {\n return values.size === 0\n ? { type: \"original\" }\n : { type: \"invalid\", reason: `\"format\" requires \"variant\".` };\n }\n\n if (variant === \"\") {\n return { type: \"invalid\", reason: `\"variant\" must not be empty.` };\n }\n\n return format === undefined ? { type: \"variant\", variant } : { type: \"variant\", variant, format };\n}\n"],"mappings":";AAEA,MAAM,eAAe,IAAI,IAAI,CAAC,WAAW,QAAQ,CAAC;;;;;;;;;;;AAYlD,SAAgB,uBAAuB,KAAgC;CACrE,MAAM,aAAa,IAAI,QAAQ,GAAG;CAClC,MAAM,WAAW,eAAe,KAAK,KAAK,IAAI,MAAM,aAAa,CAAC;CAElE,IAAI,aAAa,IAAI,OAAO,EAAE,MAAM,WAAW;CAE/C,MAAM,yBAAS,IAAI,IAAoB;CAEvC,KAAK,MAAM,CAAC,KAAK,UAAU,IAAI,gBAAgB,QAAQ,GAAG;EACxD,IAAI,CAAC,aAAa,IAAI,GAAG,GACvB,OAAO;GAAE,MAAM;GAAW,QAAQ,4BAA4B,IAAI;EAAI;EAGxE,IAAI,OAAO,IAAI,GAAG,GAChB,OAAO;GAAE,MAAM;GAAW,QAAQ,oBAAoB,IAAI;EAAgB;EAG5E,OAAO,IAAI,KAAK,KAAK;CACvB;CAEA,MAAM,UAAU,OAAO,IAAI,SAAS;CACpC,MAAM,SAAS,OAAO,IAAI,QAAQ;CAElC,IAAI,YAAY,QACd,OAAO,OAAO,SAAS,IACnB,EAAE,MAAM,WAAW,IACnB;EAAE,MAAM;EAAW,QAAQ;CAA+B;CAGhE,IAAI,YAAY,IACd,OAAO;EAAE,MAAM;EAAW,QAAQ;CAA+B;CAGnE,OAAO,WAAW,SAAY;EAAE,MAAM;EAAW;CAAQ,IAAI;EAAE,MAAM;EAAW;EAAS;CAAO;AAClG"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { StorageDriverName } from "../../storage/types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../packages/core/src/http/uploads/purge-image-variants.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Options for {@link purgeImageVariants}
|
|
6
|
+
*/
|
|
7
|
+
type PurgeImageVariantsOptions = {
|
|
8
|
+
/**
|
|
9
|
+
* Disk the source lives on; the default disk when omitted
|
|
10
|
+
*/
|
|
11
|
+
disk?: StorageDriverName;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Remove cached image derivatives.
|
|
15
|
+
*
|
|
16
|
+
* - With a path: every derivative of that file, in every variant and format.
|
|
17
|
+
* The file itself is untouched and does not need to exist.
|
|
18
|
+
* - Without a path: the whole derivative cache of the disk. When
|
|
19
|
+
* `uploads.images.cacheDirectory` is set, that directory is shared by every
|
|
20
|
+
* local disk, so this clears all of them.
|
|
21
|
+
*
|
|
22
|
+
* Only recognized derivative, source-manifest and temporary files in the
|
|
23
|
+
* generated cache layout are removed. The cache root, directories, unrelated
|
|
24
|
+
* files and symlinks stay in place. Use a dedicated folder for derivatives.
|
|
25
|
+
*
|
|
26
|
+
* Deleting or moving a file through local storage (`storage.delete`,
|
|
27
|
+
* `deleteMany`, `move`) already purges its derivatives; call this for files
|
|
28
|
+
* removed some other way.
|
|
29
|
+
*
|
|
30
|
+
* @throws ImageVariantsConfigError when the cache equals or contains any
|
|
31
|
+
* configured local disk root, including through a symlink
|
|
32
|
+
* @returns `true` when something was removed
|
|
33
|
+
*/
|
|
34
|
+
declare function purgeImageVariants(relativePath?: string, options?: PurgeImageVariantsOptions): Promise<boolean>;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { PurgeImageVariantsOptions, purgeImageVariants };
|
|
37
|
+
//# sourceMappingURL=purge-image-variants.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purge-image-variants.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/purge-image-variants.ts"],"mappings":";;;;;AAeA;KAAY,yBAAA;;;AAIc;EAAxB,IAAA,GAAO,iBAAiB;AAAA;;;;;;;;AA2BhB;;;;;;;;;;;;;;iBAHY,kBAAA,CACpB,YAAA,WACA,OAAA,GAAS,yBAAA,GACR,OAAO"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { purgeVariantCacheEntries, variantCacheEntries, variantSourceCacheEntries } from "./image-variant-cache-entries.mjs";
|
|
2
|
+
import { variantSourceDirectory, variantSourceKey } from "./variant-cache-key.mjs";
|
|
3
|
+
import { purgeImageVariantsOfFile, variantCacheDirectoryFor } from "./image-variant-cache.mjs";
|
|
4
|
+
import { localDiskRoot } from "./local-disk-root.mjs";
|
|
5
|
+
import { remoteVariantDisk, remoteVariantPath } from "./remote-variant-source.mjs";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
|
|
8
|
+
//#region ../../packages/core/src/http/uploads/purge-image-variants.ts
|
|
9
|
+
/**
|
|
10
|
+
* Remove cached image derivatives.
|
|
11
|
+
*
|
|
12
|
+
* - With a path: every derivative of that file, in every variant and format.
|
|
13
|
+
* The file itself is untouched and does not need to exist.
|
|
14
|
+
* - Without a path: the whole derivative cache of the disk. When
|
|
15
|
+
* `uploads.images.cacheDirectory` is set, that directory is shared by every
|
|
16
|
+
* local disk, so this clears all of them.
|
|
17
|
+
*
|
|
18
|
+
* Only recognized derivative, source-manifest and temporary files in the
|
|
19
|
+
* generated cache layout are removed. The cache root, directories, unrelated
|
|
20
|
+
* files and symlinks stay in place. Use a dedicated folder for derivatives.
|
|
21
|
+
*
|
|
22
|
+
* Deleting or moving a file through local storage (`storage.delete`,
|
|
23
|
+
* `deleteMany`, `move`) already purges its derivatives; call this for files
|
|
24
|
+
* removed some other way.
|
|
25
|
+
*
|
|
26
|
+
* @throws ImageVariantsConfigError when the cache equals or contains any
|
|
27
|
+
* configured local disk root, including through a symlink
|
|
28
|
+
* @returns `true` when something was removed
|
|
29
|
+
*/
|
|
30
|
+
async function purgeImageVariants(relativePath, options = {}) {
|
|
31
|
+
const diskRoot = localDiskRoot(options.disk);
|
|
32
|
+
if (!diskRoot) {
|
|
33
|
+
const disk = remoteVariantDisk(options.disk);
|
|
34
|
+
const location = relativePath === void 0 ? void 0 : remoteVariantPath(relativePath);
|
|
35
|
+
if (relativePath !== void 0 && location === void 0) return false;
|
|
36
|
+
const cache = variantCacheDirectoryFor(disk.cacheRoot);
|
|
37
|
+
return purgeVariantCacheEntries(location === void 0 ? variantCacheEntries(cache) : variantSourceCacheEntries(variantSourceDirectory(cache, variantSourceKey(disk.root, disk.driver.applyPrefix(location)))));
|
|
38
|
+
}
|
|
39
|
+
if (relativePath === void 0) return purgeVariantCacheEntries(variantCacheEntries(variantCacheDirectoryFor(diskRoot)));
|
|
40
|
+
const location = relativePath.replace(/\\/g, "/").replace(/^\/+/, "");
|
|
41
|
+
return purgeImageVariantsOfFile(diskRoot, path.resolve(diskRoot, location));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { purgeImageVariants };
|
|
46
|
+
//# sourceMappingURL=purge-image-variants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purge-image-variants.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/purge-image-variants.ts"],"sourcesContent":["import path from \"node:path\";\nimport type { StorageDriverName } from \"../../storage/types\";\nimport { purgeImageVariantsOfFile, variantCacheDirectoryFor } from \"./image-variant-cache\";\nimport { remoteVariantDisk, remoteVariantPath } from \"./remote-variant-source\";\nimport { variantSourceDirectory, variantSourceKey } from \"./variant-cache-key\";\nimport { localDiskRoot } from \"./local-disk-root\";\nimport {\n purgeVariantCacheEntries,\n variantCacheEntries,\n variantSourceCacheEntries,\n} from \"./image-variant-cache-entries\";\n\n/**\n * Options for {@link purgeImageVariants}\n */\nexport type PurgeImageVariantsOptions = {\n /**\n * Disk the source lives on; the default disk when omitted\n */\n disk?: StorageDriverName;\n};\n\n/**\n * Remove cached image derivatives.\n *\n * - With a path: every derivative of that file, in every variant and format.\n * The file itself is untouched and does not need to exist.\n * - Without a path: the whole derivative cache of the disk. When\n * `uploads.images.cacheDirectory` is set, that directory is shared by every\n * local disk, so this clears all of them.\n *\n * Only recognized derivative, source-manifest and temporary files in the\n * generated cache layout are removed. The cache root, directories, unrelated\n * files and symlinks stay in place. Use a dedicated folder for derivatives.\n *\n * Deleting or moving a file through local storage (`storage.delete`,\n * `deleteMany`, `move`) already purges its derivatives; call this for files\n * removed some other way.\n *\n * @throws ImageVariantsConfigError when the cache equals or contains any\n * configured local disk root, including through a symlink\n * @returns `true` when something was removed\n */\nexport async function purgeImageVariants(\n relativePath?: string,\n options: PurgeImageVariantsOptions = {},\n): Promise<boolean> {\n const diskRoot = localDiskRoot(options.disk);\n\n if (!diskRoot) {\n const disk = remoteVariantDisk(options.disk);\n const location = relativePath === undefined ? undefined : remoteVariantPath(relativePath);\n if (relativePath !== undefined && location === undefined) return false;\n const cache = variantCacheDirectoryFor(disk.cacheRoot);\n return purgeVariantCacheEntries(\n location === undefined\n ? variantCacheEntries(cache)\n : variantSourceCacheEntries(\n variantSourceDirectory(\n cache,\n variantSourceKey(disk.root, disk.driver.applyPrefix(location)),\n ),\n ),\n );\n }\n\n if (relativePath === undefined) {\n return purgeVariantCacheEntries(variantCacheEntries(variantCacheDirectoryFor(diskRoot)));\n }\n\n const location = relativePath.replace(/\\\\/g, \"/\").replace(/^\\/+/, \"\");\n\n return purgeImageVariantsOfFile(diskRoot, path.resolve(diskRoot, location));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,eAAsB,mBACpB,cACA,UAAqC,CAAC,GACpB;CAClB,MAAM,WAAW,cAAc,QAAQ,IAAI;CAE3C,IAAI,CAAC,UAAU;EACb,MAAM,OAAO,kBAAkB,QAAQ,IAAI;EAC3C,MAAM,WAAW,iBAAiB,SAAY,SAAY,kBAAkB,YAAY;EACxF,IAAI,iBAAiB,UAAa,aAAa,QAAW,OAAO;EACjE,MAAM,QAAQ,yBAAyB,KAAK,SAAS;EACrD,OAAO,yBACL,aAAa,SACT,oBAAoB,KAAK,IACzB,0BACE,uBACE,OACA,iBAAiB,KAAK,MAAM,KAAK,OAAO,YAAY,QAAQ,CAAC,CAC/D,CACF,CACN;CACF;CAEA,IAAI,iBAAiB,QACnB,OAAO,yBAAyB,oBAAoB,yBAAyB,QAAQ,CAAC,CAAC;CAGzF,MAAM,WAAW,aAAa,QAAQ,OAAO,GAAG,CAAC,CAAC,QAAQ,QAAQ,EAAE;CAEpE,OAAO,yBAAyB,UAAU,KAAK,QAAQ,UAAU,QAAQ,CAAC;AAC5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-file-head.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"read-file-head.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/read-file-head.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\n\n/**\n * Read at most the first `length` bytes of a file\n */\nexport async function readFileHead(absolutePath: string, length: number): Promise<Buffer> {\n const handle = await fs.open(absolutePath, \"r\");\n\n try {\n const buffer = Buffer.alloc(length);\n const { bytesRead } = await handle.read(buffer, 0, length, 0);\n\n return buffer.subarray(0, bytesRead);\n } finally {\n await handle.close();\n }\n}\n"],"mappings":";;;;;;AAKA,eAAsB,aAAa,cAAsB,QAAiC;CACxF,MAAM,SAAS,MAAM,GAAG,KAAK,cAAc,GAAG;CAE9C,IAAI;EACF,MAAM,SAAS,OAAO,MAAM,MAAM;EAClC,MAAM,EAAE,cAAc,MAAM,OAAO,KAAK,QAAQ,GAAG,QAAQ,CAAC;EAE5D,OAAO,OAAO,SAAS,GAAG,SAAS;CACrC,UAAU;EACR,MAAM,OAAO,MAAM;CACrB;AACF"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { storagePath } from "../../utils/paths.mjs";
|
|
2
|
+
import { HttpError } from "../errors/errors.mjs";
|
|
3
|
+
import { storage } from "../../storage/storage.mjs";
|
|
4
|
+
import "../../storage/index.mjs";
|
|
5
|
+
import { detectImageFormat, isVariantSourceFormat } from "./detect-image-format.mjs";
|
|
6
|
+
import { loadVariantSource } from "./load-variant-source.mjs";
|
|
7
|
+
import { createHash } from "node:crypto";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
|
|
10
|
+
//#region ../../packages/core/src/http/uploads/remote-variant-source.ts
|
|
11
|
+
const activeSources = /* @__PURE__ */ new Map();
|
|
12
|
+
function remoteVariantDisk(disk) {
|
|
13
|
+
const driver = disk === void 0 ? storage.activeDriver : storage.getDriver(disk);
|
|
14
|
+
const { bucket, endpoint, region } = driver.options;
|
|
15
|
+
return {
|
|
16
|
+
driver,
|
|
17
|
+
root: JSON.stringify([
|
|
18
|
+
driver.name,
|
|
19
|
+
bucket,
|
|
20
|
+
endpoint,
|
|
21
|
+
region
|
|
22
|
+
]),
|
|
23
|
+
cacheRoot: storagePath()
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/** Object keys are normalized once, without URL decoding, before prefixing. */
|
|
27
|
+
function remoteVariantPath(location) {
|
|
28
|
+
if (!location || location.includes("\0") || location.includes("\\") || path.posix.isAbsolute(location) || path.win32.isAbsolute(location) || /^[A-Za-z]:/.test(location) || location.split("/").includes("..")) return void 0;
|
|
29
|
+
const normalized = path.posix.normalize(location);
|
|
30
|
+
return normalized === "." ? void 0 : normalized;
|
|
31
|
+
}
|
|
32
|
+
async function remoteVariantSource(location, disk, images) {
|
|
33
|
+
const relativePath = remoteVariantPath(location);
|
|
34
|
+
if (!relativePath) return void 0;
|
|
35
|
+
const objectPath = relativePath;
|
|
36
|
+
let metadata;
|
|
37
|
+
try {
|
|
38
|
+
metadata = await disk.driver.metadata(relativePath);
|
|
39
|
+
} catch (error) {
|
|
40
|
+
const detail = error;
|
|
41
|
+
if ([
|
|
42
|
+
"ENOENT",
|
|
43
|
+
"NoSuchKey",
|
|
44
|
+
"NotFound"
|
|
45
|
+
].includes(detail.code ?? detail.name ?? "") || detail.$metadata?.httpStatusCode === 404) return void 0;
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
if (metadata.isDirectory) return void 0;
|
|
49
|
+
if (metadata.size > images.maxSourceBytes) throw new HttpError(413, "The source image is too large.");
|
|
50
|
+
const sourcePath = disk.driver.applyPrefix(relativePath);
|
|
51
|
+
const metadataGeneration = metadata.etag ? createHash("sha256").update(JSON.stringify([
|
|
52
|
+
metadata.etag,
|
|
53
|
+
metadata.size,
|
|
54
|
+
metadata.lastModified?.getTime()
|
|
55
|
+
])).digest("hex") : void 0;
|
|
56
|
+
const activeKey = JSON.stringify([
|
|
57
|
+
disk.root,
|
|
58
|
+
sourcePath,
|
|
59
|
+
metadataGeneration,
|
|
60
|
+
images.maxSourceBytes,
|
|
61
|
+
images.maxSourcePixels
|
|
62
|
+
]);
|
|
63
|
+
const existing = activeSources.get(activeKey);
|
|
64
|
+
if (existing) {
|
|
65
|
+
existing.references++;
|
|
66
|
+
return existing.source;
|
|
67
|
+
}
|
|
68
|
+
let loaded;
|
|
69
|
+
async function load() {
|
|
70
|
+
const stream = await disk.driver.getStream(objectPath);
|
|
71
|
+
const chunks = [];
|
|
72
|
+
let size = 0;
|
|
73
|
+
try {
|
|
74
|
+
for await (const chunk of stream) {
|
|
75
|
+
const bytes = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
76
|
+
size += bytes.length;
|
|
77
|
+
if (size > images.maxSourceBytes) throw new HttpError(413, "The source image is too large.");
|
|
78
|
+
chunks.push(bytes);
|
|
79
|
+
}
|
|
80
|
+
} finally {
|
|
81
|
+
stream.destroy();
|
|
82
|
+
}
|
|
83
|
+
const buffer = Buffer.concat(chunks);
|
|
84
|
+
const sourceFormat = detectImageFormat(buffer);
|
|
85
|
+
if (!isVariantSourceFormat(sourceFormat)) throw new HttpError(415, "Variants are only available for jpeg, png, webp and avif images.");
|
|
86
|
+
return {
|
|
87
|
+
image: await loadVariantSource(buffer, {
|
|
88
|
+
maxSourceBytes: images.maxSourceBytes,
|
|
89
|
+
maxSourcePixels: images.maxSourcePixels,
|
|
90
|
+
expectedFormat: sourceFormat
|
|
91
|
+
}),
|
|
92
|
+
sourceFormat,
|
|
93
|
+
generation: metadataGeneration ?? createHash("sha256").update(buffer).digest("hex")
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
const source = {
|
|
97
|
+
relativePath,
|
|
98
|
+
sourcePath,
|
|
99
|
+
metadataGeneration,
|
|
100
|
+
load: () => loaded ??= load(),
|
|
101
|
+
release() {
|
|
102
|
+
const active = activeSources.get(activeKey);
|
|
103
|
+
if (active && --active.references === 0) activeSources.delete(activeKey);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
activeSources.set(activeKey, {
|
|
107
|
+
source,
|
|
108
|
+
references: 1
|
|
109
|
+
});
|
|
110
|
+
return source;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
//#endregion
|
|
114
|
+
export { remoteVariantDisk, remoteVariantPath, remoteVariantSource };
|
|
115
|
+
//# sourceMappingURL=remote-variant-source.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-variant-source.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/remote-variant-source.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport path from \"node:path\";\nimport type { StorageDriverContract, StorageDriverName } from \"../../storage/types\";\nimport { storage } from \"../../storage\";\nimport { storagePath } from \"../../utils/paths\";\nimport { HttpError } from \"../errors\";\nimport { detectImageFormat, isVariantSourceFormat } from \"./detect-image-format\";\nimport type { ResolvedImageVariantsConfig } from \"./image-variant-types\";\nimport { loadVariantSource } from \"./load-variant-source\";\nimport type { Image } from \"../../image\";\nimport type { VariantSourceFormat } from \"./image-variant-types\";\n\ntype LoadedRemoteSource = { image: Image; sourceFormat: VariantSourceFormat; generation: string };\nexport type RemoteVariantSource = {\n relativePath: string;\n sourcePath: string;\n metadataGeneration?: string;\n load(): Promise<LoadedRemoteSource>;\n release(): void;\n};\nconst activeSources = new Map<string, { references: number; source: RemoteVariantSource }>();\n\nexport function remoteVariantDisk(disk?: StorageDriverName): {\n driver: StorageDriverContract;\n root: string;\n cacheRoot: string;\n} {\n const driver = disk === undefined ? storage.activeDriver : storage.getDriver(disk);\n const { bucket, endpoint, region } = driver.options;\n return {\n driver,\n root: JSON.stringify([driver.name, bucket, endpoint, region]),\n cacheRoot: storagePath(),\n };\n}\n\n/** Object keys are normalized once, without URL decoding, before prefixing. */\nexport function remoteVariantPath(location: string): string | undefined {\n if (\n !location ||\n location.includes(\"\\0\") ||\n location.includes(\"\\\\\") ||\n path.posix.isAbsolute(location) ||\n path.win32.isAbsolute(location) ||\n /^[A-Za-z]:/.test(location) ||\n location.split(\"/\").includes(\"..\")\n )\n return undefined;\n const normalized = path.posix.normalize(location);\n return normalized === \".\" ? undefined : normalized;\n}\n\nexport async function remoteVariantSource(\n location: string,\n disk: ReturnType<typeof remoteVariantDisk>,\n images: ResolvedImageVariantsConfig,\n): Promise<RemoteVariantSource | undefined> {\n const relativePath = remoteVariantPath(location);\n if (!relativePath) return undefined;\n const objectPath = relativePath;\n let metadata;\n try {\n metadata = await disk.driver.metadata(relativePath);\n } catch (error) {\n const detail = error as {\n code?: string;\n name?: string;\n $metadata?: { httpStatusCode?: number };\n };\n if (\n [\"ENOENT\", \"NoSuchKey\", \"NotFound\"].includes(detail.code ?? detail.name ?? \"\") ||\n detail.$metadata?.httpStatusCode === 404\n )\n return undefined;\n throw error;\n }\n if (metadata.isDirectory) return undefined;\n if (metadata.size > images.maxSourceBytes)\n throw new HttpError(413, \"The source image is too large.\");\n // The identity includes the effective prefix, including tenant context.\n const sourcePath = disk.driver.applyPrefix(relativePath);\n const metadataGeneration = metadata.etag\n ? createHash(\"sha256\")\n .update(JSON.stringify([metadata.etag, metadata.size, metadata.lastModified?.getTime()]))\n .digest(\"hex\")\n : undefined;\n const activeKey = JSON.stringify([\n disk.root,\n sourcePath,\n metadataGeneration,\n images.maxSourceBytes,\n images.maxSourcePixels,\n ]);\n const existing = activeSources.get(activeKey);\n if (existing) {\n existing.references++;\n return existing.source;\n }\n let loaded: Promise<LoadedRemoteSource> | undefined;\n async function load() {\n const stream = await disk.driver.getStream(objectPath);\n const chunks: Buffer[] = [];\n let size = 0;\n try {\n for await (const chunk of stream) {\n const bytes = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);\n size += bytes.length;\n if (size > images.maxSourceBytes)\n throw new HttpError(413, \"The source image is too large.\");\n chunks.push(bytes);\n }\n } finally {\n stream.destroy();\n }\n const buffer = Buffer.concat(chunks);\n const sourceFormat = detectImageFormat(buffer);\n if (!isVariantSourceFormat(sourceFormat))\n throw new HttpError(415, \"Variants are only available for jpeg, png, webp and avif images.\");\n const image = await loadVariantSource(buffer, {\n maxSourceBytes: images.maxSourceBytes,\n maxSourcePixels: images.maxSourcePixels,\n expectedFormat: sourceFormat,\n });\n return {\n image,\n sourceFormat,\n generation: metadataGeneration ?? createHash(\"sha256\").update(buffer).digest(\"hex\"),\n };\n }\n const source: RemoteVariantSource = {\n relativePath,\n sourcePath,\n metadataGeneration,\n load: () => (loaded ??= load()),\n release() {\n const active = activeSources.get(activeKey);\n if (active && --active.references === 0) activeSources.delete(activeKey);\n },\n };\n activeSources.set(activeKey, { source, references: 1 });\n return source;\n}\n"],"mappings":";;;;;;;;;;AAoBA,MAAM,gCAAgB,IAAI,IAAiE;AAE3F,SAAgB,kBAAkB,MAIhC;CACA,MAAM,SAAS,SAAS,SAAY,QAAQ,eAAe,QAAQ,UAAU,IAAI;CACjF,MAAM,EAAE,QAAQ,UAAU,WAAW,OAAO;CAC5C,OAAO;EACL;EACA,MAAM,KAAK,UAAU;GAAC,OAAO;GAAM;GAAQ;GAAU;EAAM,CAAC;EAC5D,WAAW,YAAY;CACzB;AACF;;AAGA,SAAgB,kBAAkB,UAAsC;CACtE,IACE,CAAC,YACD,SAAS,SAAS,IAAI,KACtB,SAAS,SAAS,IAAI,KACtB,KAAK,MAAM,WAAW,QAAQ,KAC9B,KAAK,MAAM,WAAW,QAAQ,KAC9B,aAAa,KAAK,QAAQ,KAC1B,SAAS,MAAM,GAAG,CAAC,CAAC,SAAS,IAAI,GAEjC,OAAO;CACT,MAAM,aAAa,KAAK,MAAM,UAAU,QAAQ;CAChD,OAAO,eAAe,MAAM,SAAY;AAC1C;AAEA,eAAsB,oBACpB,UACA,MACA,QAC0C;CAC1C,MAAM,eAAe,kBAAkB,QAAQ;CAC/C,IAAI,CAAC,cAAc,OAAO;CAC1B,MAAM,aAAa;CACnB,IAAI;CACJ,IAAI;EACF,WAAW,MAAM,KAAK,OAAO,SAAS,YAAY;CACpD,SAAS,OAAO;EACd,MAAM,SAAS;EAKf,IACE;GAAC;GAAU;GAAa;EAAU,CAAC,CAAC,SAAS,OAAO,QAAQ,OAAO,QAAQ,EAAE,KAC7E,OAAO,WAAW,mBAAmB,KAErC,OAAO;EACT,MAAM;CACR;CACA,IAAI,SAAS,aAAa,OAAO;CACjC,IAAI,SAAS,OAAO,OAAO,gBACzB,MAAM,IAAI,UAAU,KAAK,gCAAgC;CAE3D,MAAM,aAAa,KAAK,OAAO,YAAY,YAAY;CACvD,MAAM,qBAAqB,SAAS,OAChC,WAAW,QAAQ,CAAC,CACjB,OAAO,KAAK,UAAU;EAAC,SAAS;EAAM,SAAS;EAAM,SAAS,cAAc,QAAQ;CAAC,CAAC,CAAC,CAAC,CACxF,OAAO,KAAK,IACf;CACJ,MAAM,YAAY,KAAK,UAAU;EAC/B,KAAK;EACL;EACA;EACA,OAAO;EACP,OAAO;CACT,CAAC;CACD,MAAM,WAAW,cAAc,IAAI,SAAS;CAC5C,IAAI,UAAU;EACZ,SAAS;EACT,OAAO,SAAS;CAClB;CACA,IAAI;CACJ,eAAe,OAAO;EACpB,MAAM,SAAS,MAAM,KAAK,OAAO,UAAU,UAAU;EACrD,MAAM,SAAmB,CAAC;EAC1B,IAAI,OAAO;EACX,IAAI;GACF,WAAW,MAAM,SAAS,QAAQ;IAChC,MAAM,QAAQ,OAAO,SAAS,KAAK,IAAI,QAAQ,OAAO,KAAK,KAAK;IAChE,QAAQ,MAAM;IACd,IAAI,OAAO,OAAO,gBAChB,MAAM,IAAI,UAAU,KAAK,gCAAgC;IAC3D,OAAO,KAAK,KAAK;GACnB;EACF,UAAU;GACR,OAAO,QAAQ;EACjB;EACA,MAAM,SAAS,OAAO,OAAO,MAAM;EACnC,MAAM,eAAe,kBAAkB,MAAM;EAC7C,IAAI,CAAC,sBAAsB,YAAY,GACrC,MAAM,IAAI,UAAU,KAAK,kEAAkE;EAM7F,OAAO;GACL,aANkB,kBAAkB,QAAQ;IAC5C,gBAAgB,OAAO;IACvB,iBAAiB,OAAO;IACxB,gBAAgB;GAClB,CAAC;GAGC;GACA,YAAY,sBAAsB,WAAW,QAAQ,CAAC,CAAC,OAAO,MAAM,CAAC,CAAC,OAAO,KAAK;EACpF;CACF;CACA,MAAM,SAA8B;EAClC;EACA;EACA;EACA,YAAa,WAAW,KAAK;EAC7B,UAAU;GACR,MAAM,SAAS,cAAc,IAAI,SAAS;GAC1C,IAAI,UAAU,EAAE,OAAO,eAAe,GAAG,cAAc,OAAO,SAAS;EACzE;CACF;CACA,cAAc,IAAI,WAAW;EAAE;EAAQ,YAAY;CAAE,CAAC;CACtD,OAAO;AACT"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { StorageDriverName } from "../../storage/types.mjs";
|
|
2
|
+
import { VariantOutputFormat } from "./image-variant-types.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../packages/core/src/http/uploads/resolve-image-variant.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* What to render: a file on a storage disk and a variant named in
|
|
7
|
+
* `uploads.images.variants`
|
|
8
|
+
*/
|
|
9
|
+
type ResolveImageVariantInput = {
|
|
10
|
+
/**
|
|
11
|
+
* Path of the source, relative to the disk root
|
|
12
|
+
*/
|
|
13
|
+
path: string;
|
|
14
|
+
/**
|
|
15
|
+
* Variant name from `uploads.images.variants`
|
|
16
|
+
*/
|
|
17
|
+
variant: string;
|
|
18
|
+
/**
|
|
19
|
+
* Output format; defaults to the source's own format. Must be the source
|
|
20
|
+
* format or one listed in `uploads.images.formats`.
|
|
21
|
+
*/
|
|
22
|
+
format?: VariantOutputFormat;
|
|
23
|
+
/**
|
|
24
|
+
* Disk the source lives on; the default disk when omitted
|
|
25
|
+
*/
|
|
26
|
+
disk?: StorageDriverName;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* A derivative on disk, ready to send
|
|
30
|
+
*/
|
|
31
|
+
type ResolvedImageVariant = {
|
|
32
|
+
/**
|
|
33
|
+
* Absolute path of the cached derivative
|
|
34
|
+
*/
|
|
35
|
+
absolutePath: string;
|
|
36
|
+
/**
|
|
37
|
+
* sha256 of everything the derivative depends on; a strong ETag value
|
|
38
|
+
*/
|
|
39
|
+
hash: string;
|
|
40
|
+
format: VariantOutputFormat;
|
|
41
|
+
contentType: string;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Resolve, and render on a cache miss, one variant of an image on a storage
|
|
45
|
+
* disk. This is what `uploadedFileController` serves; call it from your own
|
|
46
|
+
* route to serve variants of a private disk behind authentication:
|
|
47
|
+
*
|
|
48
|
+
* ```ts
|
|
49
|
+
* const variant = await resolveImageVariant({ disk: "private", path, variant: "thumb" });
|
|
50
|
+
* if (!variant) return response.notFound();
|
|
51
|
+
* return response.sendBuffer(await fs.readFile(variant.absolutePath), {
|
|
52
|
+
* contentType: variant.contentType,
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* The same guards apply as on the public route: the path must stay inside
|
|
57
|
+
* the disk root and outside the derivative cache, the source must be a
|
|
58
|
+
* jpeg/png/webp/avif within `maxSourceBytes`/`maxSourcePixels`, and only
|
|
59
|
+
* declared variants and formats render. Derivatives are generated once per
|
|
60
|
+
* key, even under concurrent calls, and older versions of a rewritten source
|
|
61
|
+
* are pruned once a new derivative is written.
|
|
62
|
+
*
|
|
63
|
+
* @returns `undefined` when the path does not resolve to a file on the disk
|
|
64
|
+
* @throws HttpError(400) when variants are not configured, or the variant or
|
|
65
|
+
* format is not allowed
|
|
66
|
+
* @throws HttpError(413) when the source is over the configured limits
|
|
67
|
+
* @throws HttpError(415) when the source is not jpeg, png, webp or avif
|
|
68
|
+
*/
|
|
69
|
+
declare function resolveImageVariant(input: ResolveImageVariantInput): Promise<ResolvedImageVariant | undefined>;
|
|
70
|
+
//#endregion
|
|
71
|
+
export { ResolveImageVariantInput, ResolvedImageVariant, resolveImageVariant };
|
|
72
|
+
//# sourceMappingURL=resolve-image-variant.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-image-variant.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/resolve-image-variant.ts"],"mappings":";;;;;;AAoCA;;KAAY,wBAAA;EAoBc;;;EAhBxB,IAAA;EAWS;;;EANT,OAAA;EAWwB;AAM1B;;;EAXE,MAAA,GAAS,mBAAA;EAeT;;;EAVA,IAAA,GAAO,iBAAiB;AAAA;;AAmBb;AA6Bb;KA1CY,oBAAA;;;;EAIV,YAAA;EAwCQ;;;EAnCR,IAAA;EAEA,MAAA,EAAQ,mBAAmB;EAE3B,WAAA;AAAA;AA+B6B;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAFT,mBAAA,CACpB,KAAA,EAAO,wBAAA,GACN,OAAA,CAAQ,oBAAA"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { HttpError } from "../errors/errors.mjs";
|
|
2
|
+
import { uploadsConfig } from "../uploads-config.mjs";
|
|
3
|
+
import { variantCacheKey, variantCachePath, variantGenerationTag, variantSourceDirectory, variantSourceKey } from "./variant-cache-key.mjs";
|
|
4
|
+
import { pruneStaleVariantGenerationsIfCurrent, retryOnVanishedDirectory, warnIfVariantCacheIsPublic } from "./image-variant-cache.mjs";
|
|
5
|
+
import { localDiskRoot } from "./local-disk-root.mjs";
|
|
6
|
+
import { loadVariantSource } from "./load-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 { resolveRemoteImageVariant } from "./resolve-remote-image-variant.mjs";
|
|
12
|
+
import { resolveVariantCandidate } from "./resolve-variant-candidate.mjs";
|
|
13
|
+
|
|
14
|
+
//#region ../../packages/core/src/http/uploads/resolve-image-variant.ts
|
|
15
|
+
const CONTENT_TYPES = {
|
|
16
|
+
jpeg: "image/jpeg",
|
|
17
|
+
png: "image/png",
|
|
18
|
+
webp: "image/webp",
|
|
19
|
+
avif: "image/avif"
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Resolve, and render on a cache miss, one variant of an image on a storage
|
|
23
|
+
* disk. This is what `uploadedFileController` serves; call it from your own
|
|
24
|
+
* route to serve variants of a private disk behind authentication:
|
|
25
|
+
*
|
|
26
|
+
* ```ts
|
|
27
|
+
* const variant = await resolveImageVariant({ disk: "private", path, variant: "thumb" });
|
|
28
|
+
* if (!variant) return response.notFound();
|
|
29
|
+
* return response.sendBuffer(await fs.readFile(variant.absolutePath), {
|
|
30
|
+
* contentType: variant.contentType,
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* The same guards apply as on the public route: the path must stay inside
|
|
35
|
+
* the disk root and outside the derivative cache, the source must be a
|
|
36
|
+
* jpeg/png/webp/avif within `maxSourceBytes`/`maxSourcePixels`, and only
|
|
37
|
+
* declared variants and formats render. Derivatives are generated once per
|
|
38
|
+
* key, even under concurrent calls, and older versions of a rewritten source
|
|
39
|
+
* are pruned once a new derivative is written.
|
|
40
|
+
*
|
|
41
|
+
* @returns `undefined` when the path does not resolve to a file on the disk
|
|
42
|
+
* @throws HttpError(400) when variants are not configured, or the variant or
|
|
43
|
+
* format is not allowed
|
|
44
|
+
* @throws HttpError(413) when the source is over the configured limits
|
|
45
|
+
* @throws HttpError(415) when the source is not jpeg, png, webp or avif
|
|
46
|
+
*/
|
|
47
|
+
async function resolveImageVariant(input) {
|
|
48
|
+
const diskRoot = localDiskRoot(input.disk);
|
|
49
|
+
if (!diskRoot) return resolveRemoteImageVariant(input);
|
|
50
|
+
const images = resolveImageVariantsConfig(uploadsConfig("images"), diskRoot);
|
|
51
|
+
if (!images) throw new HttpError(400, "Image variants are not configured.");
|
|
52
|
+
const variant = Object.prototype.hasOwnProperty.call(images.variants, input.variant) ? images.variants[input.variant] : void 0;
|
|
53
|
+
if (variant === void 0) throw new HttpError(400, `Unknown variant "${input.variant}".`);
|
|
54
|
+
if (input.format !== void 0 && !images.formats.includes(input.format)) throw new HttpError(400, `Format "${input.format}" is not allowed.`);
|
|
55
|
+
warnIfVariantCacheIsPublic(images.cacheDirectory);
|
|
56
|
+
const candidate = await resolveVariantCandidate(input.path, diskRoot, images);
|
|
57
|
+
if (!candidate) return void 0;
|
|
58
|
+
const { source, stats, sourceFormat } = candidate;
|
|
59
|
+
const format = input.format ?? sourceFormat;
|
|
60
|
+
const hash = variantCacheKey({
|
|
61
|
+
relativePath: source.relativePath,
|
|
62
|
+
sourceSize: stats.size,
|
|
63
|
+
sourceMtimeMs: stats.mtimeMs,
|
|
64
|
+
variant,
|
|
65
|
+
format
|
|
66
|
+
});
|
|
67
|
+
const sourceKey = variantSourceKey(source.root, source.relativePath);
|
|
68
|
+
const generation = variantGenerationTag(stats.size, stats.mtimeMs);
|
|
69
|
+
const target = variantCachePath(images.cacheDirectory, {
|
|
70
|
+
sourceKey,
|
|
71
|
+
generation
|
|
72
|
+
}, hash, format);
|
|
73
|
+
if (!await freshImageVariant(target, images.maxCacheAge)) await variantGenerations.run(target, async () => {
|
|
74
|
+
if (await freshImageVariant(target, images.maxCacheAge)) return;
|
|
75
|
+
const image = await loadVariantSource(source.absolutePath, {
|
|
76
|
+
maxSourceBytes: images.maxSourceBytes,
|
|
77
|
+
maxSourcePixels: images.maxSourcePixels,
|
|
78
|
+
expectedFormat: sourceFormat
|
|
79
|
+
});
|
|
80
|
+
await retryOnVanishedDirectory(() => generateImageVariant({
|
|
81
|
+
image: image.clone(),
|
|
82
|
+
variant,
|
|
83
|
+
format,
|
|
84
|
+
targetPath: target
|
|
85
|
+
}));
|
|
86
|
+
scheduleImageVariantCacheTrim(images, target);
|
|
87
|
+
await pruneStaleVariantGenerationsIfCurrent(source.absolutePath, variantSourceDirectory(images.cacheDirectory, sourceKey), generation);
|
|
88
|
+
});
|
|
89
|
+
return {
|
|
90
|
+
absolutePath: target,
|
|
91
|
+
hash,
|
|
92
|
+
format,
|
|
93
|
+
contentType: CONTENT_TYPES[format]
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
//#endregion
|
|
98
|
+
export { resolveImageVariant };
|
|
99
|
+
//# sourceMappingURL=resolve-image-variant.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-image-variant.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/resolve-image-variant.ts"],"sourcesContent":["import type { StorageDriverName } from \"../../storage/types\";\nimport { HttpError } from \"../errors\";\nimport { uploadsConfig } from \"../uploads-config\";\nimport { generateImageVariant } from \"./generate-image-variant\";\nimport {\n pruneStaleVariantGenerationsIfCurrent,\n retryOnVanishedDirectory,\n warnIfVariantCacheIsPublic,\n} from \"./image-variant-cache\";\nimport { resolveRemoteImageVariant } from \"./resolve-remote-image-variant\";\nimport type { VariantOutputFormat } from \"./image-variant-types\";\nimport { loadVariantSource } from \"./load-variant-source\";\nimport { localDiskRoot } from \"./local-disk-root\";\nimport { resolveImageVariantsConfig } from \"./resolve-image-variants-config\";\nimport { resolveVariantCandidate } from \"./resolve-variant-candidate\";\nimport {\n variantCacheKey,\n variantCachePath,\n variantGenerationTag,\n variantSourceDirectory,\n variantSourceKey,\n} from \"./variant-cache-key\";\nimport { freshImageVariant, scheduleImageVariantCacheTrim } from \"./trim-image-variant-cache\";\nimport { variantGenerations } from \"./variant-generations\";\n\nconst CONTENT_TYPES: Record<VariantOutputFormat, string> = {\n jpeg: \"image/jpeg\",\n png: \"image/png\",\n webp: \"image/webp\",\n avif: \"image/avif\",\n};\n\n/**\n * What to render: a file on a storage disk and a variant named in\n * `uploads.images.variants`\n */\nexport type ResolveImageVariantInput = {\n /**\n * Path of the source, relative to the disk root\n */\n path: string;\n\n /**\n * Variant name from `uploads.images.variants`\n */\n variant: string;\n\n /**\n * Output format; defaults to the source's own format. Must be the source\n * format or one listed in `uploads.images.formats`.\n */\n format?: VariantOutputFormat;\n\n /**\n * Disk the source lives on; the default disk when omitted\n */\n disk?: StorageDriverName;\n};\n\n/**\n * A derivative on disk, ready to send\n */\nexport type ResolvedImageVariant = {\n /**\n * Absolute path of the cached derivative\n */\n absolutePath: string;\n\n /**\n * sha256 of everything the derivative depends on; a strong ETag value\n */\n hash: string;\n\n format: VariantOutputFormat;\n\n contentType: string;\n};\n\n/**\n * Resolve, and render on a cache miss, one variant of an image on a storage\n * disk. This is what `uploadedFileController` serves; call it from your own\n * route to serve variants of a private disk behind authentication:\n *\n * ```ts\n * const variant = await resolveImageVariant({ disk: \"private\", path, variant: \"thumb\" });\n * if (!variant) return response.notFound();\n * return response.sendBuffer(await fs.readFile(variant.absolutePath), {\n * contentType: variant.contentType,\n * });\n * ```\n *\n * The same guards apply as on the public route: the path must stay inside\n * the disk root and outside the derivative cache, the source must be a\n * jpeg/png/webp/avif within `maxSourceBytes`/`maxSourcePixels`, and only\n * declared variants and formats render. Derivatives are generated once per\n * key, even under concurrent calls, and older versions of a rewritten source\n * are pruned once a new derivative is written.\n *\n * @returns `undefined` when the path does not resolve to a file on the disk\n * @throws HttpError(400) when variants are not configured, or the variant or\n * format is not allowed\n * @throws HttpError(413) when the source is over the configured limits\n * @throws HttpError(415) when the source is not jpeg, png, webp or avif\n */\nexport async function resolveImageVariant(\n input: ResolveImageVariantInput,\n): Promise<ResolvedImageVariant | undefined> {\n const diskRoot = localDiskRoot(input.disk);\n\n if (!diskRoot) return resolveRemoteImageVariant(input);\n\n const images = resolveImageVariantsConfig(uploadsConfig(\"images\"), diskRoot);\n\n if (!images) {\n throw new HttpError(400, \"Image variants are not configured.\");\n }\n\n const variant = Object.prototype.hasOwnProperty.call(images.variants, input.variant)\n ? images.variants[input.variant]\n : undefined;\n\n if (variant === undefined) {\n throw new HttpError(400, `Unknown variant \"${input.variant}\".`);\n }\n\n if (input.format !== undefined && !images.formats.includes(input.format as never)) {\n throw new HttpError(400, `Format \"${input.format}\" is not allowed.`);\n }\n\n warnIfVariantCacheIsPublic(images.cacheDirectory);\n\n const candidate = await resolveVariantCandidate(input.path, diskRoot, images);\n\n if (!candidate) return undefined;\n\n const { source, stats, sourceFormat } = candidate;\n const format: VariantOutputFormat = input.format ?? sourceFormat;\n const hash = variantCacheKey({\n relativePath: source.relativePath,\n sourceSize: stats.size,\n sourceMtimeMs: stats.mtimeMs,\n variant,\n format,\n });\n const sourceKey = variantSourceKey(source.root, source.relativePath);\n const generation = variantGenerationTag(stats.size, stats.mtimeMs);\n const target = variantCachePath(images.cacheDirectory, { sourceKey, generation }, hash, format);\n\n if (!(await freshImageVariant(target, images.maxCacheAge))) {\n // Keyed on the target path, which includes the disk's real root: the\n // same file on two disks (a mirror copied with its mtime) has the same\n // `hash`, and joining the other disk's flight would leave this target\n // unwritten.\n await variantGenerations.run(target, async () => {\n if (await freshImageVariant(target, images.maxCacheAge)) return;\n\n const image = await loadVariantSource(source.absolutePath, {\n maxSourceBytes: images.maxSourceBytes,\n maxSourcePixels: images.maxSourcePixels,\n expectedFormat: sourceFormat,\n });\n\n await retryOnVanishedDirectory(() =>\n generateImageVariant({ image: image.clone(), variant, format, targetPath: target }),\n );\n scheduleImageVariantCacheTrim(images, target);\n await pruneStaleVariantGenerationsIfCurrent(\n source.absolutePath,\n variantSourceDirectory(images.cacheDirectory, sourceKey),\n generation,\n );\n });\n }\n\n return { absolutePath: target, hash, format, contentType: CONTENT_TYPES[format] };\n}\n"],"mappings":";;;;;;;;;;;;;;AAyBA,MAAM,gBAAqD;CACzD,MAAM;CACN,KAAK;CACL,MAAM;CACN,MAAM;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EA,eAAsB,oBACpB,OAC2C;CAC3C,MAAM,WAAW,cAAc,MAAM,IAAI;CAEzC,IAAI,CAAC,UAAU,OAAO,0BAA0B,KAAK;CAErD,MAAM,SAAS,2BAA2B,cAAc,QAAQ,GAAG,QAAQ;CAE3E,IAAI,CAAC,QACH,MAAM,IAAI,UAAU,KAAK,oCAAoC;CAG/D,MAAM,UAAU,OAAO,UAAU,eAAe,KAAK,OAAO,UAAU,MAAM,OAAO,IAC/E,OAAO,SAAS,MAAM,WACtB;CAEJ,IAAI,YAAY,QACd,MAAM,IAAI,UAAU,KAAK,oBAAoB,MAAM,QAAQ,GAAG;CAGhE,IAAI,MAAM,WAAW,UAAa,CAAC,OAAO,QAAQ,SAAS,MAAM,MAAe,GAC9E,MAAM,IAAI,UAAU,KAAK,WAAW,MAAM,OAAO,kBAAkB;CAGrE,2BAA2B,OAAO,cAAc;CAEhD,MAAM,YAAY,MAAM,wBAAwB,MAAM,MAAM,UAAU,MAAM;CAE5E,IAAI,CAAC,WAAW,OAAO;CAEvB,MAAM,EAAE,QAAQ,OAAO,iBAAiB;CACxC,MAAM,SAA8B,MAAM,UAAU;CACpD,MAAM,OAAO,gBAAgB;EAC3B,cAAc,OAAO;EACrB,YAAY,MAAM;EAClB,eAAe,MAAM;EACrB;EACA;CACF,CAAC;CACD,MAAM,YAAY,iBAAiB,OAAO,MAAM,OAAO,YAAY;CACnE,MAAM,aAAa,qBAAqB,MAAM,MAAM,MAAM,OAAO;CACjE,MAAM,SAAS,iBAAiB,OAAO,gBAAgB;EAAE;EAAW;CAAW,GAAG,MAAM,MAAM;CAE9F,IAAI,CAAE,MAAM,kBAAkB,QAAQ,OAAO,WAAW,GAKtD,MAAM,mBAAmB,IAAI,QAAQ,YAAY;EAC/C,IAAI,MAAM,kBAAkB,QAAQ,OAAO,WAAW,GAAG;EAEzD,MAAM,QAAQ,MAAM,kBAAkB,OAAO,cAAc;GACzD,gBAAgB,OAAO;GACvB,iBAAiB,OAAO;GACxB,gBAAgB;EAClB,CAAC;EAED,MAAM,+BACJ,qBAAqB;GAAE,OAAO,MAAM,MAAM;GAAG;GAAS;GAAQ,YAAY;EAAO,CAAC,CACpF;EACA,8BAA8B,QAAQ,MAAM;EAC5C,MAAM,sCACJ,OAAO,cACP,uBAAuB,OAAO,gBAAgB,SAAS,GACvD,UACF;CACF,CAAC;CAGH,OAAO;EAAE,cAAc;EAAQ;EAAM;EAAQ,aAAa,cAAc;CAAQ;AAClF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ImageVariantsConfigError } from "./image-variants-config-error.mjs";
|
|
2
|
-
import
|
|
2
|
+
import { variantCacheDirectoryFor } from "./image-variant-cache.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../packages/core/src/http/uploads/resolve-image-variants-config.ts
|
|
5
5
|
/**
|
|
6
6
|
* Largest width or height a variant may declare
|
|
7
7
|
*/
|
|
@@ -76,13 +76,15 @@ function resolveImageVariantsConfig(images, storageRoot) {
|
|
|
76
76
|
if (!rawVariants || typeof rawVariants !== "object" || Object.keys(rawVariants).length === 0) throw new ImageVariantsConfigError("uploads.images.variants must declare at least one variant.");
|
|
77
77
|
const variants = {};
|
|
78
78
|
for (const [name, raw] of Object.entries(rawVariants)) variants[name] = resolveVariant(name, raw);
|
|
79
|
-
const cacheDirectory =
|
|
79
|
+
const cacheDirectory = variantCacheDirectoryFor(storageRoot, images);
|
|
80
80
|
return {
|
|
81
81
|
variants,
|
|
82
82
|
formats: resolveFormats(images.formats),
|
|
83
83
|
maxSourceBytes: resolveLimit("maxSourceBytes", images.maxSourceBytes, DEFAULT_MAX_SOURCE_BYTES),
|
|
84
84
|
maxSourcePixels: resolveLimit("maxSourcePixels", images.maxSourcePixels, DEFAULT_MAX_SOURCE_PIXELS),
|
|
85
|
-
cacheDirectory
|
|
85
|
+
cacheDirectory,
|
|
86
|
+
maxCacheBytes: resolveLimit("maxCacheBytes", images.maxCacheBytes, 512 * 1024 * 1024),
|
|
87
|
+
maxCacheAge: resolveLimit("maxCacheAge", images.maxCacheAge, 10080 * 60)
|
|
86
88
|
};
|
|
87
89
|
}
|
|
88
90
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-image-variants-config.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"resolve-image-variants-config.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/http/uploads/resolve-image-variants-config.ts"],"sourcesContent":["import type {\n ImageVariantDefinition,\n ImageVariantFit,\n ImageVariantOutputFormat,\n UploadsImagesConfigurations,\n} from \"../uploads-types\";\nimport { variantCacheDirectoryFor } from \"./image-variant-cache\";\nimport { ImageVariantsConfigError } from \"./image-variants-config-error\";\nimport type { ResolvedImageVariantsConfig } from \"./image-variant-types\";\n\n/**\n * Largest width or height a variant may declare\n */\nexport const MAX_VARIANT_DIMENSION = 8192;\n\n/**\n * Default `maxSourceBytes`: 25 MB\n */\nexport const DEFAULT_MAX_SOURCE_BYTES = 25 * 1024 * 1024;\n\n/**\n * Default `maxSourcePixels`\n */\nexport const DEFAULT_MAX_SOURCE_PIXELS = 40_000_000;\n\nconst FITS: readonly ImageVariantFit[] = [\"cover\", \"contain\", \"inside\"];\n\nconst OUTPUT_FORMATS: readonly ImageVariantOutputFormat[] = [\"avif\", \"webp\"];\n\nconst VARIANT_NAME = /^[A-Za-z0-9_-]+$/;\n\nfunction isPositiveInteger(value: unknown, max = Number.MAX_SAFE_INTEGER): value is number {\n return typeof value === \"number\" && Number.isInteger(value) && value >= 1 && value <= max;\n}\n\nfunction resolveVariant(name: string, raw: unknown): ImageVariantDefinition {\n const key = `uploads.images.variants.${name}`;\n\n if (!VARIANT_NAME.test(name)) {\n throw new ImageVariantsConfigError(\n `${key}: a variant name may only use letters, digits, \"-\" and \"_\".`,\n );\n }\n\n if (!raw || typeof raw !== \"object\") {\n throw new ImageVariantsConfigError(`${key} must be an object with a width.`);\n }\n\n const { width, height, fit, quality, enlarge } = raw as Record<string, unknown>;\n\n if (!isPositiveInteger(width, MAX_VARIANT_DIMENSION)) {\n throw new ImageVariantsConfigError(\n `${key}.width must be an integer from 1 to ${MAX_VARIANT_DIMENSION}, got ${JSON.stringify(width)}.`,\n );\n }\n\n const variant: ImageVariantDefinition = { width };\n\n if (height !== undefined) {\n if (!isPositiveInteger(height, MAX_VARIANT_DIMENSION)) {\n throw new ImageVariantsConfigError(\n `${key}.height must be an integer from 1 to ${MAX_VARIANT_DIMENSION}, got ${JSON.stringify(height)}.`,\n );\n }\n\n variant.height = height;\n }\n\n if (fit !== undefined) {\n if (!FITS.includes(fit as ImageVariantFit)) {\n throw new ImageVariantsConfigError(\n `${key}.fit must be one of ${FITS.join(\", \")}, got ${JSON.stringify(fit)}.`,\n );\n }\n\n variant.fit = fit as ImageVariantFit;\n }\n\n if (quality !== undefined) {\n if (!isPositiveInteger(quality, 100)) {\n throw new ImageVariantsConfigError(\n `${key}.quality must be an integer from 1 to 100, got ${JSON.stringify(quality)}.`,\n );\n }\n\n variant.quality = quality;\n }\n\n if (enlarge !== undefined && typeof enlarge !== \"boolean\") {\n throw new ImageVariantsConfigError(\n `${key}.enlarge must be a boolean, got ${JSON.stringify(enlarge)}.`,\n );\n }\n\n // Always set, never left undefined: the effective flag (default false) is\n // part of the normalized variant, so toggling it changes the cache key.\n variant.enlarge = enlarge === true;\n\n return variant;\n}\n\nfunction resolveFormats(raw: unknown): readonly ImageVariantOutputFormat[] {\n if (raw === undefined) return [];\n\n if (!Array.isArray(raw)) {\n throw new ImageVariantsConfigError(`uploads.images.formats must be an array.`);\n }\n\n for (const format of raw) {\n if (!OUTPUT_FORMATS.includes(format)) {\n throw new ImageVariantsConfigError(\n `uploads.images.formats may only contain ${OUTPUT_FORMATS.join(\", \")}, got ${JSON.stringify(format)}.`,\n );\n }\n }\n\n return [...new Set(raw as ImageVariantOutputFormat[])];\n}\n\nfunction resolveLimit(name: string, raw: unknown, fallback: number): number {\n if (raw === undefined) return fallback;\n\n if (!isPositiveInteger(raw)) {\n throw new ImageVariantsConfigError(\n `uploads.images.${name} must be a positive integer, got ${JSON.stringify(raw)}.`,\n );\n }\n\n return raw;\n}\n\n/**\n * Validate the `uploads.images` config and apply its defaults.\n *\n * Every variant is copied field by field, so an unknown key in the config can\n * never reach sharp, and the result is what the cache key is computed from.\n *\n * @param images - the raw `uploads.images` value\n * @param storageRoot - the local storage root, base of the default cache directory\n * @returns the resolved config, or `undefined` when variants are not configured\n * @throws ImageVariantsConfigError when any value is out of bounds\n */\nexport function resolveImageVariantsConfig(\n images: UploadsImagesConfigurations | undefined,\n storageRoot: string,\n): ResolvedImageVariantsConfig | undefined {\n if (images === undefined || images === null) return undefined;\n\n if (typeof images !== \"object\") {\n throw new ImageVariantsConfigError(\"uploads.images must be an object.\");\n }\n\n const rawVariants = (images as { variants?: unknown }).variants;\n\n if (!rawVariants || typeof rawVariants !== \"object\" || Object.keys(rawVariants).length === 0) {\n throw new ImageVariantsConfigError(\n \"uploads.images.variants must declare at least one variant.\",\n );\n }\n\n const variants: Record<string, ImageVariantDefinition> = {};\n\n for (const [name, raw] of Object.entries(rawVariants)) {\n variants[name] = resolveVariant(name, raw);\n }\n\n const cacheDirectory = variantCacheDirectoryFor(storageRoot, images);\n\n return {\n variants,\n formats: resolveFormats(images.formats),\n maxSourceBytes: resolveLimit(\"maxSourceBytes\", images.maxSourceBytes, DEFAULT_MAX_SOURCE_BYTES),\n maxSourcePixels: resolveLimit(\n \"maxSourcePixels\",\n images.maxSourcePixels,\n DEFAULT_MAX_SOURCE_PIXELS,\n ),\n cacheDirectory,\n maxCacheBytes: resolveLimit(\"maxCacheBytes\", images.maxCacheBytes, 512 * 1024 * 1024),\n maxCacheAge: resolveLimit(\"maxCacheAge\", images.maxCacheAge, 7 * 24 * 60 * 60),\n };\n}\n"],"mappings":";;;;;;;AAaA,MAAa,wBAAwB;;;;AAKrC,MAAa,2BAA2B,KAAK,OAAO;;;;AAKpD,MAAa,4BAA4B;AAEzC,MAAM,OAAmC;CAAC;CAAS;CAAW;AAAQ;AAEtE,MAAM,iBAAsD,CAAC,QAAQ,MAAM;AAE3E,MAAM,eAAe;AAErB,SAAS,kBAAkB,OAAgB,MAAM,OAAO,kBAAmC;CACzF,OAAO,OAAO,UAAU,YAAY,OAAO,UAAU,KAAK,KAAK,SAAS,KAAK,SAAS;AACxF;AAEA,SAAS,eAAe,MAAc,KAAsC;CAC1E,MAAM,MAAM,2BAA2B;CAEvC,IAAI,CAAC,aAAa,KAAK,IAAI,GACzB,MAAM,IAAI,yBACR,GAAG,IAAI,4DACT;CAGF,IAAI,CAAC,OAAO,OAAO,QAAQ,UACzB,MAAM,IAAI,yBAAyB,GAAG,IAAI,iCAAiC;CAG7E,MAAM,EAAE,OAAO,QAAQ,KAAK,SAAS,YAAY;CAEjD,IAAI,CAAC,kBAAkB,WAA4B,GACjD,MAAM,IAAI,yBACR,GAAG,IAAI,sCAAsC,sBAAsB,QAAQ,KAAK,UAAU,KAAK,EAAE,EACnG;CAGF,MAAM,UAAkC,EAAE,MAAM;CAEhD,IAAI,WAAW,QAAW;EACxB,IAAI,CAAC,kBAAkB,YAA6B,GAClD,MAAM,IAAI,yBACR,GAAG,IAAI,uCAAuC,sBAAsB,QAAQ,KAAK,UAAU,MAAM,EAAE,EACrG;EAGF,QAAQ,SAAS;CACnB;CAEA,IAAI,QAAQ,QAAW;EACrB,IAAI,CAAC,KAAK,SAAS,GAAsB,GACvC,MAAM,IAAI,yBACR,GAAG,IAAI,sBAAsB,KAAK,KAAK,IAAI,EAAE,QAAQ,KAAK,UAAU,GAAG,EAAE,EAC3E;EAGF,QAAQ,MAAM;CAChB;CAEA,IAAI,YAAY,QAAW;EACzB,IAAI,CAAC,kBAAkB,SAAS,GAAG,GACjC,MAAM,IAAI,yBACR,GAAG,IAAI,iDAAiD,KAAK,UAAU,OAAO,EAAE,EAClF;EAGF,QAAQ,UAAU;CACpB;CAEA,IAAI,YAAY,UAAa,OAAO,YAAY,WAC9C,MAAM,IAAI,yBACR,GAAG,IAAI,kCAAkC,KAAK,UAAU,OAAO,EAAE,EACnE;CAKF,QAAQ,UAAU,YAAY;CAE9B,OAAO;AACT;AAEA,SAAS,eAAe,KAAmD;CACzE,IAAI,QAAQ,QAAW,OAAO,CAAC;CAE/B,IAAI,CAAC,MAAM,QAAQ,GAAG,GACpB,MAAM,IAAI,yBAAyB,0CAA0C;CAG/E,KAAK,MAAM,UAAU,KACnB,IAAI,CAAC,eAAe,SAAS,MAAM,GACjC,MAAM,IAAI,yBACR,2CAA2C,eAAe,KAAK,IAAI,EAAE,QAAQ,KAAK,UAAU,MAAM,EAAE,EACtG;CAIJ,OAAO,CAAC,GAAG,IAAI,IAAI,GAAiC,CAAC;AACvD;AAEA,SAAS,aAAa,MAAc,KAAc,UAA0B;CAC1E,IAAI,QAAQ,QAAW,OAAO;CAE9B,IAAI,CAAC,kBAAkB,GAAG,GACxB,MAAM,IAAI,yBACR,kBAAkB,KAAK,mCAAmC,KAAK,UAAU,GAAG,EAAE,EAChF;CAGF,OAAO;AACT;;;;;;;;;;;;AAaA,SAAgB,2BACd,QACA,aACyC;CACzC,IAAI,WAAW,UAAa,WAAW,MAAM,OAAO;CAEpD,IAAI,OAAO,WAAW,UACpB,MAAM,IAAI,yBAAyB,mCAAmC;CAGxE,MAAM,cAAe,OAAkC;CAEvD,IAAI,CAAC,eAAe,OAAO,gBAAgB,YAAY,OAAO,KAAK,WAAW,CAAC,CAAC,WAAW,GACzF,MAAM,IAAI,yBACR,4DACF;CAGF,MAAM,WAAmD,CAAC;CAE1D,KAAK,MAAM,CAAC,MAAM,QAAQ,OAAO,QAAQ,WAAW,GAClD,SAAS,QAAQ,eAAe,MAAM,GAAG;CAG3C,MAAM,iBAAiB,yBAAyB,aAAa,MAAM;CAEnE,OAAO;EACL;EACA,SAAS,eAAe,OAAO,OAAO;EACtC,gBAAgB,aAAa,kBAAkB,OAAO,gBAAgB,wBAAwB;EAC9F,iBAAiB,aACf,mBACA,OAAO,iBACP,yBACF;EACA;EACA,eAAe,aAAa,iBAAiB,OAAO,eAAe,MAAM,OAAO,IAAI;EACpF,aAAa,aAAa,eAAe,OAAO,aAAa,QAAc,EAAE;CAC/E;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../../packages/core/src/http/uploads/resolve-inline-image-content-type.ts
|
|
4
4
|
/**
|
|
5
5
|
* Extensions an upload original may carry for each raster format that is
|
|
6
6
|
* allowed to render inline. Anything else — including `.gif`, since gif is
|