@warlock.js/core 4.0.156 → 4.0.158
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/package.json +7 -7
- package/esm/application/application-config-types.d.ts +0 -27
- package/esm/application/application-config-types.d.ts.map +0 -1
- package/esm/application/application.d.ts +0 -68
- package/esm/application/application.d.ts.map +0 -1
- package/esm/application/application.js +0 -94
- package/esm/application/application.js.map +0 -1
- package/esm/application/index.d.ts +0 -3
- package/esm/application/index.d.ts.map +0 -1
- package/esm/benchmark/benchmark-snapshots.d.ts +0 -47
- package/esm/benchmark/benchmark-snapshots.d.ts.map +0 -1
- package/esm/benchmark/benchmark-snapshots.js +0 -77
- package/esm/benchmark/benchmark-snapshots.js.map +0 -1
- package/esm/benchmark/benchmark.d.ts +0 -25
- package/esm/benchmark/benchmark.d.ts.map +0 -1
- package/esm/benchmark/benchmark.example.d.ts +0 -2
- package/esm/benchmark/benchmark.example.d.ts.map +0 -1
- package/esm/benchmark/benchmark.js +0 -120
- package/esm/benchmark/benchmark.js.map +0 -1
- package/esm/benchmark/channels/console.channel.d.ts +0 -14
- package/esm/benchmark/channels/console.channel.d.ts.map +0 -1
- package/esm/benchmark/channels/console.channel.js +0 -29
- package/esm/benchmark/channels/console.channel.js.map +0 -1
- package/esm/benchmark/channels/index.d.ts +0 -3
- package/esm/benchmark/channels/index.d.ts.map +0 -1
- package/esm/benchmark/channels/noop.channel.d.ts +0 -5
- package/esm/benchmark/channels/noop.channel.d.ts.map +0 -1
- package/esm/benchmark/channels/noop.channel.js +0 -3
- package/esm/benchmark/channels/noop.channel.js.map +0 -1
- package/esm/benchmark/index.d.ts +0 -7
- package/esm/benchmark/index.d.ts.map +0 -1
- package/esm/benchmark/profiler.d.ts +0 -63
- package/esm/benchmark/profiler.d.ts.map +0 -1
- package/esm/benchmark/profiler.js +0 -155
- package/esm/benchmark/profiler.js.map +0 -1
- package/esm/benchmark/types.d.ts +0 -167
- package/esm/benchmark/types.d.ts.map +0 -1
- package/esm/bootstrap/setup.d.ts +0 -2
- package/esm/bootstrap/setup.d.ts.map +0 -1
- package/esm/bootstrap/setup.js +0 -14
- package/esm/bootstrap/setup.js.map +0 -1
- package/esm/bootstrap.d.ts +0 -2
- package/esm/bootstrap.d.ts.map +0 -1
- package/esm/bootstrap.js +0 -5
- package/esm/bootstrap.js.map +0 -1
- package/esm/cache/database-cache-driver.d.ts +0 -56
- package/esm/cache/database-cache-driver.d.ts.map +0 -1
- package/esm/cache/database-cache-driver.js +0 -112
- package/esm/cache/database-cache-driver.js.map +0 -1
- package/esm/cache/index.d.ts +0 -3
- package/esm/cache/index.d.ts.map +0 -1
- package/esm/cache/index.js +0 -1
- package/esm/cache/index.js.map +0 -1
- package/esm/cli/cli-command.d.ts +0 -115
- package/esm/cli/cli-command.d.ts.map +0 -1
- package/esm/cli/cli-command.js +0 -227
- package/esm/cli/cli-command.js.map +0 -1
- package/esm/cli/cli-commands.manager.d.ts +0 -71
- package/esm/cli/cli-commands.manager.d.ts.map +0 -1
- package/esm/cli/cli-commands.manager.js +0 -362
- package/esm/cli/cli-commands.manager.js.map +0 -1
- package/esm/cli/cli-commands.utils.d.ts +0 -69
- package/esm/cli/cli-commands.utils.d.ts.map +0 -1
- package/esm/cli/cli-commands.utils.js +0 -180
- package/esm/cli/cli-commands.utils.js.map +0 -1
- package/esm/cli/commands/add.command.d.ts +0 -2
- package/esm/cli/commands/add.command.d.ts.map +0 -1
- package/esm/cli/commands/add.command.js +0 -15
- package/esm/cli/commands/add.command.js.map +0 -1
- package/esm/cli/commands/build.command.d.ts +0 -2
- package/esm/cli/commands/build.command.d.ts.map +0 -1
- package/esm/cli/commands/build.command.js +0 -8
- package/esm/cli/commands/build.command.js.map +0 -1
- package/esm/cli/commands/create-database.command.d.ts +0 -2
- package/esm/cli/commands/create-database.command.d.ts.map +0 -1
- package/esm/cli/commands/create-database.command.js +0 -18
- package/esm/cli/commands/create-database.command.js.map +0 -1
- package/esm/cli/commands/dev-server.command.d.ts +0 -2
- package/esm/cli/commands/dev-server.command.d.ts.map +0 -1
- package/esm/cli/commands/dev-server.command.js +0 -18
- package/esm/cli/commands/dev-server.command.js.map +0 -1
- package/esm/cli/commands/drop-tables.command.d.ts +0 -2
- package/esm/cli/commands/drop-tables.command.d.ts.map +0 -1
- package/esm/cli/commands/drop-tables.command.js +0 -17
- package/esm/cli/commands/drop-tables.command.js.map +0 -1
- package/esm/cli/commands/generate/generate.command.d.ts +0 -10
- package/esm/cli/commands/generate/generate.command.d.ts.map +0 -1
- package/esm/cli/commands/generate/generate.command.js +0 -188
- package/esm/cli/commands/generate/generate.command.js.map +0 -1
- package/esm/cli/commands/generate/generators/column-dsl-parser.d.ts +0 -11
- package/esm/cli/commands/generate/generators/column-dsl-parser.d.ts.map +0 -1
- package/esm/cli/commands/generate/generators/column-dsl-parser.js +0 -47
- package/esm/cli/commands/generate/generators/column-dsl-parser.js.map +0 -1
- package/esm/cli/commands/generate/generators/controller.generator.d.ts +0 -3
- package/esm/cli/commands/generate/generators/controller.generator.d.ts.map +0 -1
- package/esm/cli/commands/generate/generators/controller.generator.js +0 -51
- package/esm/cli/commands/generate/generators/controller.generator.js.map +0 -1
- package/esm/cli/commands/generate/generators/migration.generator.d.ts +0 -13
- package/esm/cli/commands/generate/generators/migration.generator.d.ts.map +0 -1
- package/esm/cli/commands/generate/generators/migration.generator.js +0 -82
- package/esm/cli/commands/generate/generators/migration.generator.js.map +0 -1
- package/esm/cli/commands/generate/generators/model.generator.d.ts +0 -3
- package/esm/cli/commands/generate/generators/model.generator.d.ts.map +0 -1
- package/esm/cli/commands/generate/generators/model.generator.js +0 -58
- package/esm/cli/commands/generate/generators/model.generator.js.map +0 -1
- package/esm/cli/commands/generate/generators/module.generator.d.ts +0 -3
- package/esm/cli/commands/generate/generators/module.generator.d.ts.map +0 -1
- package/esm/cli/commands/generate/generators/module.generator.js +0 -149
- package/esm/cli/commands/generate/generators/module.generator.js.map +0 -1
- package/esm/cli/commands/generate/generators/repository.generator.d.ts +0 -3
- package/esm/cli/commands/generate/generators/repository.generator.d.ts.map +0 -1
- package/esm/cli/commands/generate/generators/repository.generator.js +0 -37
- package/esm/cli/commands/generate/generators/repository.generator.js.map +0 -1
- package/esm/cli/commands/generate/generators/resource.generator.d.ts +0 -3
- package/esm/cli/commands/generate/generators/resource.generator.d.ts.map +0 -1
- package/esm/cli/commands/generate/generators/resource.generator.js +0 -37
- package/esm/cli/commands/generate/generators/resource.generator.js.map +0 -1
- package/esm/cli/commands/generate/generators/service.generator.d.ts +0 -3
- package/esm/cli/commands/generate/generators/service.generator.d.ts.map +0 -1
- package/esm/cli/commands/generate/generators/service.generator.js +0 -37
- package/esm/cli/commands/generate/generators/service.generator.js.map +0 -1
- package/esm/cli/commands/generate/generators/validation.generator.d.ts +0 -3
- package/esm/cli/commands/generate/generators/validation.generator.d.ts.map +0 -1
- package/esm/cli/commands/generate/generators/validation.generator.js +0 -46
- package/esm/cli/commands/generate/generators/validation.generator.js.map +0 -1
- package/esm/cli/commands/generate/templates/stubs.d.ts +0 -129
- package/esm/cli/commands/generate/templates/stubs.d.ts.map +0 -1
- package/esm/cli/commands/generate/templates/stubs.js +0 -528
- package/esm/cli/commands/generate/templates/stubs.js.map +0 -1
- package/esm/cli/commands/generate/types.d.ts +0 -53
- package/esm/cli/commands/generate/types.d.ts.map +0 -1
- package/esm/cli/commands/generate/utils/name-parser.d.ts +0 -40
- package/esm/cli/commands/generate/utils/name-parser.d.ts.map +0 -1
- package/esm/cli/commands/generate/utils/name-parser.js +0 -65
- package/esm/cli/commands/generate/utils/name-parser.js.map +0 -1
- package/esm/cli/commands/generate/utils/path-resolver.d.ts +0 -30
- package/esm/cli/commands/generate/utils/path-resolver.d.ts.map +0 -1
- package/esm/cli/commands/generate/utils/path-resolver.js +0 -42
- package/esm/cli/commands/generate/utils/path-resolver.js.map +0 -1
- package/esm/cli/commands/generate/utils/prompt.d.ts +0 -13
- package/esm/cli/commands/generate/utils/prompt.d.ts.map +0 -1
- package/esm/cli/commands/generate/utils/prompt.js +0 -21
- package/esm/cli/commands/generate/utils/prompt.js.map +0 -1
- package/esm/cli/commands/migrate.command.d.ts +0 -2
- package/esm/cli/commands/migrate.command.d.ts.map +0 -1
- package/esm/cli/commands/migrate.command.js +0 -52
- package/esm/cli/commands/migrate.command.js.map +0 -1
- package/esm/cli/commands/seed.command.d.ts +0 -2
- package/esm/cli/commands/seed.command.d.ts.map +0 -1
- package/esm/cli/commands/seed.command.js +0 -24
- package/esm/cli/commands/seed.command.js.map +0 -1
- package/esm/cli/commands/start-production.command.d.ts +0 -2
- package/esm/cli/commands/start-production.command.d.ts.map +0 -1
- package/esm/cli/commands/start-production.command.js +0 -65
- package/esm/cli/commands/start-production.command.js.map +0 -1
- package/esm/cli/commands/storage-put.action.d.ts +0 -22
- package/esm/cli/commands/storage-put.action.d.ts.map +0 -1
- package/esm/cli/commands/storage-put.action.js +0 -75
- package/esm/cli/commands/storage-put.action.js.map +0 -1
- package/esm/cli/commands/storage-put.command.d.ts +0 -20
- package/esm/cli/commands/storage-put.command.d.ts.map +0 -1
- package/esm/cli/commands/storage-put.command.js +0 -41
- package/esm/cli/commands/storage-put.command.js.map +0 -1
- package/esm/cli/commands/typings-generator.command.d.ts +0 -2
- package/esm/cli/commands/typings-generator.command.d.ts.map +0 -1
- package/esm/cli/commands/typings-generator.command.js +0 -37
- package/esm/cli/commands/typings-generator.command.js.map +0 -1
- package/esm/cli/commands-loader.d.ts +0 -18
- package/esm/cli/commands-loader.d.ts.map +0 -1
- package/esm/cli/commands-loader.js +0 -45
- package/esm/cli/commands-loader.js.map +0 -1
- package/esm/cli/framework-cli-commands.d.ts +0 -2
- package/esm/cli/framework-cli-commands.d.ts.map +0 -1
- package/esm/cli/framework-cli-commands.js +0 -27
- package/esm/cli/framework-cli-commands.js.map +0 -1
- package/esm/cli/index.d.ts +0 -3
- package/esm/cli/index.d.ts.map +0 -1
- package/esm/cli/index.js +0 -1
- package/esm/cli/index.js.map +0 -1
- package/esm/cli/parse-cli-args.d.ts +0 -18
- package/esm/cli/parse-cli-args.d.ts.map +0 -1
- package/esm/cli/parse-cli-args.js +0 -82
- package/esm/cli/parse-cli-args.js.map +0 -1
- package/esm/cli/start.d.ts +0 -2
- package/esm/cli/start.d.ts.map +0 -1
- package/esm/cli/start.js +0 -2
- package/esm/cli/start.js.map +0 -1
- package/esm/cli/string-similarity.d.ts +0 -44
- package/esm/cli/string-similarity.d.ts.map +0 -1
- package/esm/cli/string-similarity.js +0 -57
- package/esm/cli/string-similarity.js.map +0 -1
- package/esm/cli/types.d.ts +0 -218
- package/esm/cli/types.d.ts.map +0 -1
- package/esm/config/config-getter.d.ts +0 -35
- package/esm/config/config-getter.d.ts.map +0 -1
- package/esm/config/config-getter.js +0 -21
- package/esm/config/config-getter.js.map +0 -1
- package/esm/config/config-handlers.d.ts +0 -19
- package/esm/config/config-handlers.d.ts.map +0 -1
- package/esm/config/config-handlers.js +0 -47
- package/esm/config/config-handlers.js.map +0 -1
- package/esm/config/config-loader.d.ts +0 -37
- package/esm/config/config-loader.d.ts.map +0 -1
- package/esm/config/config-loader.js +0 -85
- package/esm/config/config-loader.js.map +0 -1
- package/esm/config/config-manager.d.ts +0 -22
- package/esm/config/config-manager.d.ts.map +0 -1
- package/esm/config/config-manager.js +0 -25
- package/esm/config/config-manager.js.map +0 -1
- package/esm/config/config-special-handlers.d.ts +0 -17
- package/esm/config/config-special-handlers.d.ts.map +0 -1
- package/esm/config/config-special-handlers.js +0 -23
- package/esm/config/config-special-handlers.js.map +0 -1
- package/esm/config/index.d.ts +0 -5
- package/esm/config/index.d.ts.map +0 -1
- package/esm/config/load-config-files.d.ts +0 -6
- package/esm/config/load-config-files.d.ts.map +0 -1
- package/esm/config/load-config-files.js +0 -19
- package/esm/config/load-config-files.js.map +0 -1
- package/esm/config/types.d.ts +0 -52
- package/esm/config/types.d.ts.map +0 -1
- package/esm/connectors/base-connector.d.ts +0 -49
- package/esm/connectors/base-connector.d.ts.map +0 -1
- package/esm/connectors/base-connector.js +0 -48
- package/esm/connectors/base-connector.js.map +0 -1
- package/esm/connectors/cache-connector.d.ts +0 -23
- package/esm/connectors/cache-connector.d.ts.map +0 -1
- package/esm/connectors/cache-connector.js +0 -35
- package/esm/connectors/cache-connector.js.map +0 -1
- package/esm/connectors/communicator-connector.d.ts +0 -23
- package/esm/connectors/communicator-connector.d.ts.map +0 -1
- package/esm/connectors/communicator-connector.js +0 -62
- package/esm/connectors/communicator-connector.js.map +0 -1
- package/esm/connectors/connectors-manager.d.ts +0 -42
- package/esm/connectors/connectors-manager.d.ts.map +0 -1
- package/esm/connectors/connectors-manager.js +0 -91
- package/esm/connectors/connectors-manager.js.map +0 -1
- package/esm/connectors/database-connector.d.ts +0 -23
- package/esm/connectors/database-connector.d.ts.map +0 -1
- package/esm/connectors/database-connector.js +0 -51
- package/esm/connectors/database-connector.js.map +0 -1
- package/esm/connectors/http-connector.d.ts +0 -31
- package/esm/connectors/http-connector.d.ts.map +0 -1
- package/esm/connectors/http-connector.js +0 -83
- package/esm/connectors/http-connector.js.map +0 -1
- package/esm/connectors/index.d.ts +0 -13
- package/esm/connectors/index.d.ts.map +0 -1
- package/esm/connectors/storage.connector.d.ts +0 -23
- package/esm/connectors/storage.connector.d.ts.map +0 -1
- package/esm/connectors/storage.connector.js +0 -32
- package/esm/connectors/storage.connector.js.map +0 -1
- package/esm/connectors/types.d.ts +0 -52
- package/esm/connectors/types.d.ts.map +0 -1
- package/esm/connectors/types.js +0 -11
- package/esm/connectors/types.js.map +0 -1
- package/esm/database/create-database-action.d.ts +0 -3
- package/esm/database/create-database-action.d.ts.map +0 -1
- package/esm/database/create-database-action.js +0 -28
- package/esm/database/create-database-action.js.map +0 -1
- package/esm/database/drop-tables-action.d.ts +0 -3
- package/esm/database/drop-tables-action.d.ts.map +0 -1
- package/esm/database/drop-tables-action.js +0 -29
- package/esm/database/drop-tables-action.js.map +0 -1
- package/esm/database/index.d.ts +0 -4
- package/esm/database/index.d.ts.map +0 -1
- package/esm/database/migrate-action.d.ts +0 -8
- package/esm/database/migrate-action.d.ts.map +0 -1
- package/esm/database/migrate-action.js +0 -118
- package/esm/database/migrate-action.js.map +0 -1
- package/esm/database/models/database-log/database-log.d.ts +0 -16
- package/esm/database/models/database-log/database-log.d.ts.map +0 -1
- package/esm/database/models/database-log/database-log.js +0 -17
- package/esm/database/models/database-log/database-log.js.map +0 -1
- package/esm/database/models/database-log/index.d.ts +0 -2
- package/esm/database/models/database-log/index.d.ts.map +0 -1
- package/esm/database/seed-command-action.d.ts +0 -3
- package/esm/database/seed-command-action.d.ts.map +0 -1
- package/esm/database/seed-command-action.js +0 -36
- package/esm/database/seed-command-action.js.map +0 -1
- package/esm/database/seeds/index.d.ts +0 -3
- package/esm/database/seeds/index.d.ts.map +0 -1
- package/esm/database/seeds/seeder.d.ts +0 -40
- package/esm/database/seeds/seeder.d.ts.map +0 -1
- package/esm/database/seeds/seeder.js +0 -6
- package/esm/database/seeds/seeder.js.map +0 -1
- package/esm/database/seeds/seeders.manager.d.ts +0 -47
- package/esm/database/seeds/seeders.manager.d.ts.map +0 -1
- package/esm/database/seeds/seeders.manager.js +0 -144
- package/esm/database/seeds/seeders.manager.js.map +0 -1
- package/esm/database/seeds/seeds-table-migration.d.ts +0 -8
- package/esm/database/seeds/seeds-table-migration.d.ts.map +0 -1
- package/esm/database/seeds/seeds-table-migration.js +0 -18
- package/esm/database/seeds/seeds-table-migration.js.map +0 -1
- package/esm/database/seeds/types.d.ts +0 -13
- package/esm/database/seeds/types.d.ts.map +0 -1
- package/esm/database/seeds/utils.d.ts +0 -2
- package/esm/database/seeds/utils.d.ts.map +0 -1
- package/esm/database/seeds/utils.js +0 -1
- package/esm/database/seeds/utils.js.map +0 -1
- package/esm/database/utils.d.ts +0 -17
- package/esm/database/utils.d.ts.map +0 -1
- package/esm/database/utils.js +0 -30
- package/esm/database/utils.js.map +0 -1
- package/esm/dev-server/create-worker.d.ts +0 -34
- package/esm/dev-server/create-worker.d.ts.map +0 -1
- package/esm/dev-server/create-worker.js +0 -37
- package/esm/dev-server/create-worker.js.map +0 -1
- package/esm/dev-server/dependency-graph.d.ts +0 -102
- package/esm/dev-server/dependency-graph.d.ts.map +0 -1
- package/esm/dev-server/dependency-graph.js +0 -310
- package/esm/dev-server/dependency-graph.js.map +0 -1
- package/esm/dev-server/dev-logger.d.ts +0 -14
- package/esm/dev-server/dev-logger.d.ts.map +0 -1
- package/esm/dev-server/dev-logger.js +0 -130
- package/esm/dev-server/dev-logger.js.map +0 -1
- package/esm/dev-server/development-server.d.ts +0 -55
- package/esm/dev-server/development-server.d.ts.map +0 -1
- package/esm/dev-server/development-server.js +0 -199
- package/esm/dev-server/development-server.js.map +0 -1
- package/esm/dev-server/events.d.ts +0 -5
- package/esm/dev-server/events.d.ts.map +0 -1
- package/esm/dev-server/events.js +0 -4
- package/esm/dev-server/events.js.map +0 -1
- package/esm/dev-server/export-analyzer.d.ts +0 -84
- package/esm/dev-server/export-analyzer.d.ts.map +0 -1
- package/esm/dev-server/export-analyzer.js +0 -206
- package/esm/dev-server/export-analyzer.js.map +0 -1
- package/esm/dev-server/file-event-handler.d.ts +0 -156
- package/esm/dev-server/file-event-handler.d.ts.map +0 -1
- package/esm/dev-server/file-event-handler.js +0 -309
- package/esm/dev-server/file-event-handler.js.map +0 -1
- package/esm/dev-server/file-manager.d.ts +0 -394
- package/esm/dev-server/file-manager.d.ts.map +0 -1
- package/esm/dev-server/file-manager.js +0 -603
- package/esm/dev-server/file-manager.js.map +0 -1
- package/esm/dev-server/file-operations.d.ts +0 -203
- package/esm/dev-server/file-operations.d.ts.map +0 -1
- package/esm/dev-server/file-operations.js +0 -365
- package/esm/dev-server/file-operations.js.map +0 -1
- package/esm/dev-server/files-orchestrator.d.ts +0 -153
- package/esm/dev-server/files-orchestrator.d.ts.map +0 -1
- package/esm/dev-server/files-orchestrator.js +0 -349
- package/esm/dev-server/files-orchestrator.js.map +0 -1
- package/esm/dev-server/files-watcher.d.ts +0 -67
- package/esm/dev-server/files-watcher.d.ts.map +0 -1
- package/esm/dev-server/files-watcher.js +0 -121
- package/esm/dev-server/files-watcher.js.map +0 -1
- package/esm/dev-server/flags.d.ts +0 -10
- package/esm/dev-server/flags.d.ts.map +0 -1
- package/esm/dev-server/flags.js +0 -9
- package/esm/dev-server/flags.js.map +0 -1
- package/esm/dev-server/health-checker/checkers/base-health-checker.d.ts +0 -52
- package/esm/dev-server/health-checker/checkers/base-health-checker.d.ts.map +0 -1
- package/esm/dev-server/health-checker/checkers/base-health-checker.js +0 -71
- package/esm/dev-server/health-checker/checkers/base-health-checker.js.map +0 -1
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.d.ts +0 -40
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.d.ts.map +0 -1
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.js +0 -217
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.js.map +0 -1
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.d.ts +0 -56
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.d.ts.map +0 -1
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.js +0 -279
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.js.map +0 -1
- package/esm/dev-server/health-checker/file-health-checker.contract.d.ts +0 -59
- package/esm/dev-server/health-checker/file-health-checker.contract.d.ts.map +0 -1
- package/esm/dev-server/health-checker/file-health-result.d.ts +0 -68
- package/esm/dev-server/health-checker/file-health-result.d.ts.map +0 -1
- package/esm/dev-server/health-checker/file-health-result.js +0 -40
- package/esm/dev-server/health-checker/file-health-result.js.map +0 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.d.ts +0 -115
- package/esm/dev-server/health-checker/files-healthcare.manager.d.ts.map +0 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.js +0 -422
- package/esm/dev-server/health-checker/files-healthcare.manager.js.map +0 -1
- package/esm/dev-server/health-checker/index.d.ts +0 -6
- package/esm/dev-server/health-checker/index.d.ts.map +0 -1
- package/esm/dev-server/health-checker/workers/eslint-health.worker.d.ts +0 -2
- package/esm/dev-server/health-checker/workers/eslint-health.worker.d.ts.map +0 -1
- package/esm/dev-server/health-checker/workers/eslint-health.worker.js +0 -214
- package/esm/dev-server/health-checker/workers/eslint-health.worker.js.map +0 -1
- package/esm/dev-server/health-checker/workers/ts-health.worker.d.ts +0 -2
- package/esm/dev-server/health-checker/workers/ts-health.worker.d.ts.map +0 -1
- package/esm/dev-server/health-checker/workers/ts-health.worker.js +0 -261
- package/esm/dev-server/health-checker/workers/ts-health.worker.js.map +0 -1
- package/esm/dev-server/import-deduplicator.d.ts +0 -75
- package/esm/dev-server/import-deduplicator.d.ts.map +0 -1
- package/esm/dev-server/import-deduplicator.js +0 -288
- package/esm/dev-server/import-deduplicator.js.map +0 -1
- package/esm/dev-server/import-deduplicator.test.d.ts +0 -7
- package/esm/dev-server/import-deduplicator.test.d.ts.map +0 -1
- package/esm/dev-server/import-transformer.d.ts +0 -17
- package/esm/dev-server/import-transformer.d.ts.map +0 -1
- package/esm/dev-server/import-transformer.js +0 -221
- package/esm/dev-server/import-transformer.js.map +0 -1
- package/esm/dev-server/index.d.ts +0 -1
- package/esm/dev-server/index.d.ts.map +0 -1
- package/esm/dev-server/layer-executor.d.ts +0 -64
- package/esm/dev-server/layer-executor.d.ts.map +0 -1
- package/esm/dev-server/layer-executor.js +0 -338
- package/esm/dev-server/layer-executor.js.map +0 -1
- package/esm/dev-server/manifest-manager.d.ts +0 -80
- package/esm/dev-server/manifest-manager.d.ts.map +0 -1
- package/esm/dev-server/manifest-manager.js +0 -107
- package/esm/dev-server/manifest-manager.js.map +0 -1
- package/esm/dev-server/module-loader.d.ts +0 -111
- package/esm/dev-server/module-loader.d.ts.map +0 -1
- package/esm/dev-server/module-loader.js +0 -276
- package/esm/dev-server/module-loader.js.map +0 -1
- package/esm/dev-server/package-json-manager.d.ts +0 -16
- package/esm/dev-server/package-json-manager.d.ts.map +0 -1
- package/esm/dev-server/package-json-manager.js +0 -20
- package/esm/dev-server/package-json-manager.js.map +0 -1
- package/esm/dev-server/parse-imports.d.ts +0 -34
- package/esm/dev-server/parse-imports.d.ts.map +0 -1
- package/esm/dev-server/parse-imports.js +0 -426
- package/esm/dev-server/parse-imports.js.map +0 -1
- package/esm/dev-server/path.d.ts +0 -39
- package/esm/dev-server/path.d.ts.map +0 -1
- package/esm/dev-server/path.js +0 -56
- package/esm/dev-server/path.js.map +0 -1
- package/esm/dev-server/runtime-import-helper.d.ts +0 -8
- package/esm/dev-server/runtime-import-helper.d.ts.map +0 -1
- package/esm/dev-server/runtime-import-helper.js +0 -158
- package/esm/dev-server/runtime-import-helper.js.map +0 -1
- package/esm/dev-server/special-files-collector.d.ts +0 -114
- package/esm/dev-server/special-files-collector.d.ts.map +0 -1
- package/esm/dev-server/special-files-collector.js +0 -212
- package/esm/dev-server/special-files-collector.js.map +0 -1
- package/esm/dev-server/start-development-server.d.ts +0 -7
- package/esm/dev-server/start-development-server.d.ts.map +0 -1
- package/esm/dev-server/start-development-server.js +0 -21
- package/esm/dev-server/start-development-server.js.map +0 -1
- package/esm/dev-server/transpile-file.d.ts +0 -11
- package/esm/dev-server/transpile-file.d.ts.map +0 -1
- package/esm/dev-server/transpile-file.js +0 -30
- package/esm/dev-server/transpile-file.js.map +0 -1
- package/esm/dev-server/tsconfig-manager.d.ts +0 -45
- package/esm/dev-server/tsconfig-manager.d.ts.map +0 -1
- package/esm/dev-server/tsconfig-manager.js +0 -107
- package/esm/dev-server/tsconfig-manager.js.map +0 -1
- package/esm/dev-server/type-generator.d.ts +0 -115
- package/esm/dev-server/type-generator.d.ts.map +0 -1
- package/esm/dev-server/type-generator.js +0 -566
- package/esm/dev-server/type-generator.js.map +0 -1
- package/esm/dev-server/types.d.ts +0 -30
- package/esm/dev-server/types.d.ts.map +0 -1
- package/esm/dev-server/utils.d.ts +0 -15
- package/esm/dev-server/utils.d.ts.map +0 -1
- package/esm/dev-server/utils.js +0 -41
- package/esm/dev-server/utils.js.map +0 -1
- package/esm/encryption/encrypt.d.ts +0 -23
- package/esm/encryption/encrypt.d.ts.map +0 -1
- package/esm/encryption/encrypt.js +0 -85
- package/esm/encryption/encrypt.js.map +0 -1
- package/esm/encryption/hash.d.ts +0 -17
- package/esm/encryption/hash.d.ts.map +0 -1
- package/esm/encryption/hash.js +0 -26
- package/esm/encryption/hash.js.map +0 -1
- package/esm/encryption/index.d.ts +0 -5
- package/esm/encryption/index.d.ts.map +0 -1
- package/esm/encryption/password.d.ts +0 -23
- package/esm/encryption/password.d.ts.map +0 -1
- package/esm/encryption/password.js +0 -72
- package/esm/encryption/password.js.map +0 -1
- package/esm/encryption/types.d.ts +0 -51
- package/esm/encryption/types.d.ts.map +0 -1
- package/esm/generations/add-command.action.d.ts +0 -3
- package/esm/generations/add-command.action.d.ts.map +0 -1
- package/esm/generations/add-command.action.js +0 -299
- package/esm/generations/add-command.action.js.map +0 -1
- package/esm/generations/stubs.d.ts +0 -2
- package/esm/generations/stubs.d.ts.map +0 -1
- package/esm/generations/stubs.js +0 -81
- package/esm/generations/stubs.js.map +0 -1
- package/esm/http/config.d.ts +0 -10
- package/esm/http/config.d.ts.map +0 -1
- package/esm/http/config.js +0 -22
- package/esm/http/config.js.map +0 -1
- package/esm/http/context/request-context.d.ts +0 -47
- package/esm/http/context/request-context.d.ts.map +0 -1
- package/esm/http/context/request-context.js +0 -52
- package/esm/http/context/request-context.js.map +0 -1
- package/esm/http/createHttpApplication.d.ts +0 -3
- package/esm/http/createHttpApplication.d.ts.map +0 -1
- package/esm/http/createHttpApplication.js +0 -28
- package/esm/http/createHttpApplication.js.map +0 -1
- package/esm/http/database/RequestLog.d.ts +0 -16
- package/esm/http/database/RequestLog.d.ts.map +0 -1
- package/esm/http/database/RequestLog.js +0 -26
- package/esm/http/database/RequestLog.js.map +0 -1
- package/esm/http/errors/errors.d.ts +0 -39
- package/esm/http/errors/errors.d.ts.map +0 -1
- package/esm/http/errors/errors.js +0 -76
- package/esm/http/errors/errors.js.map +0 -1
- package/esm/http/errors/index.d.ts +0 -2
- package/esm/http/errors/index.d.ts.map +0 -1
- package/esm/http/events.d.ts +0 -4
- package/esm/http/events.d.ts.map +0 -1
- package/esm/http/events.js +0 -26
- package/esm/http/events.js.map +0 -1
- package/esm/http/index.d.ts +0 -17
- package/esm/http/index.d.ts.map +0 -1
- package/esm/http/middleware/cache-response-middleware.d.ts +0 -34
- package/esm/http/middleware/cache-response-middleware.d.ts.map +0 -1
- package/esm/http/middleware/cache-response-middleware.js +0 -45
- package/esm/http/middleware/cache-response-middleware.js.map +0 -1
- package/esm/http/middleware/index.d.ts +0 -3
- package/esm/http/middleware/index.d.ts.map +0 -1
- package/esm/http/middleware/inject-request-context.d.ts +0 -21
- package/esm/http/middleware/inject-request-context.d.ts.map +0 -1
- package/esm/http/middleware/inject-request-context.js +0 -119
- package/esm/http/middleware/inject-request-context.js.map +0 -1
- package/esm/http/plugins.d.ts +0 -3
- package/esm/http/plugins.d.ts.map +0 -1
- package/esm/http/plugins.js +0 -36
- package/esm/http/plugins.js.map +0 -1
- package/esm/http/request-controller.d.ts +0 -11
- package/esm/http/request-controller.d.ts.map +0 -1
- package/esm/http/request-controller.js +0 -9
- package/esm/http/request-controller.js.map +0 -1
- package/esm/http/request.d.ts +0 -396
- package/esm/http/request.d.ts.map +0 -1
- package/esm/http/request.js +0 -759
- package/esm/http/request.js.map +0 -1
- package/esm/http/response.d.ts +0 -374
- package/esm/http/response.d.ts.map +0 -1
- package/esm/http/response.js +0 -974
- package/esm/http/response.js.map +0 -1
- package/esm/http/server.d.ts +0 -8
- package/esm/http/server.d.ts.map +0 -1
- package/esm/http/server.js +0 -15
- package/esm/http/server.js.map +0 -1
- package/esm/http/types.d.ts +0 -230
- package/esm/http/types.d.ts.map +0 -1
- package/esm/http/uploaded-file.d.ts +0 -459
- package/esm/http/uploaded-file.d.ts.map +0 -1
- package/esm/http/uploaded-file.js +0 -709
- package/esm/http/uploaded-file.js.map +0 -1
- package/esm/http/uploads-config.d.ts +0 -26
- package/esm/http/uploads-config.d.ts.map +0 -1
- package/esm/http/uploads-config.js +0 -35
- package/esm/http/uploads-config.js.map +0 -1
- package/esm/http/uploads-types.d.ts +0 -236
- package/esm/http/uploads-types.d.ts.map +0 -1
- package/esm/image/image.d.ts +0 -388
- package/esm/image/image.d.ts.map +0 -1
- package/esm/image/image.js +0 -602
- package/esm/image/image.js.map +0 -1
- package/esm/image/index.d.ts +0 -2
- package/esm/image/index.d.ts.map +0 -1
- package/esm/index.d.ts +0 -34
- package/esm/index.d.ts.map +0 -1
- package/esm/index.js +0 -1
- package/esm/index.js.map +0 -1
- package/esm/logger/index.d.ts +0 -3
- package/esm/logger/index.d.ts.map +0 -1
- package/esm/logger/logger.d.ts +0 -3
- package/esm/logger/logger.d.ts.map +0 -1
- package/esm/logger/logger.js +0 -16
- package/esm/logger/logger.js.map +0 -1
- package/esm/logger/types.d.ts +0 -39
- package/esm/logger/types.d.ts.map +0 -1
- package/esm/mail/config.d.ts +0 -80
- package/esm/mail/config.d.ts.map +0 -1
- package/esm/mail/config.js +0 -158
- package/esm/mail/config.js.map +0 -1
- package/esm/mail/events.d.ts +0 -96
- package/esm/mail/events.d.ts.map +0 -1
- package/esm/mail/events.js +0 -123
- package/esm/mail/events.js.map +0 -1
- package/esm/mail/index.d.ts +0 -10
- package/esm/mail/index.d.ts.map +0 -1
- package/esm/mail/mail.d.ts +0 -175
- package/esm/mail/mail.d.ts.map +0 -1
- package/esm/mail/mail.js +0 -286
- package/esm/mail/mail.js.map +0 -1
- package/esm/mail/mailer-pool.d.ts +0 -27
- package/esm/mail/mailer-pool.d.ts.map +0 -1
- package/esm/mail/mailer-pool.js +0 -215
- package/esm/mail/mailer-pool.js.map +0 -1
- package/esm/mail/react-mail.d.ts +0 -9
- package/esm/mail/react-mail.d.ts.map +0 -1
- package/esm/mail/react-mail.js +0 -28
- package/esm/mail/react-mail.js.map +0 -1
- package/esm/mail/send-mail.d.ts +0 -33
- package/esm/mail/send-mail.d.ts.map +0 -1
- package/esm/mail/send-mail.js +0 -313
- package/esm/mail/send-mail.js.map +0 -1
- package/esm/mail/test-mailbox.d.ts +0 -110
- package/esm/mail/test-mailbox.d.ts.map +0 -1
- package/esm/mail/test-mailbox.js +0 -143
- package/esm/mail/test-mailbox.js.map +0 -1
- package/esm/mail/types.d.ts +0 -264
- package/esm/mail/types.d.ts.map +0 -1
- package/esm/mail/types.js +0 -13
- package/esm/mail/types.js.map +0 -1
- package/esm/manifest/manifest-manager.d.ts +0 -74
- package/esm/manifest/manifest-manager.d.ts.map +0 -1
- package/esm/manifest/manifest-manager.js +0 -88
- package/esm/manifest/manifest-manager.js.map +0 -1
- package/esm/production/build-app-production.d.ts +0 -6
- package/esm/production/build-app-production.d.ts.map +0 -1
- package/esm/production/build-app-production.js +0 -8
- package/esm/production/build-app-production.js.map +0 -1
- package/esm/production/esbuild-plugins.d.ts +0 -5
- package/esm/production/esbuild-plugins.d.ts.map +0 -1
- package/esm/production/esbuild-plugins.js +0 -23
- package/esm/production/esbuild-plugins.js.map +0 -1
- package/esm/production/production-builder.d.ts +0 -76
- package/esm/production/production-builder.d.ts.map +0 -1
- package/esm/production/production-builder.js +0 -254
- package/esm/production/production-builder.js.map +0 -1
- package/esm/react/index.d.ts +0 -14
- package/esm/react/index.d.ts.map +0 -1
- package/esm/react/index.js +0 -65
- package/esm/react/index.js.map +0 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.d.ts +0 -85
- package/esm/repositories/adapters/cascade/cascade-adapter.d.ts.map +0 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.js +0 -179
- package/esm/repositories/adapters/cascade/cascade-adapter.js.map +0 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.ts +0 -141
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.ts.map +0 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.js +0 -281
- package/esm/repositories/adapters/cascade/cascade-query-builder.js.map +0 -1
- package/esm/repositories/adapters/cascade/filter-applicator.d.ts +0 -126
- package/esm/repositories/adapters/cascade/filter-applicator.d.ts.map +0 -1
- package/esm/repositories/adapters/cascade/filter-applicator.js +0 -549
- package/esm/repositories/adapters/cascade/filter-applicator.js.map +0 -1
- package/esm/repositories/adapters/cascade/index.d.ts +0 -7
- package/esm/repositories/adapters/cascade/index.d.ts.map +0 -1
- package/esm/repositories/contracts/index.d.ts +0 -8
- package/esm/repositories/contracts/index.d.ts.map +0 -1
- package/esm/repositories/contracts/query-builder.contract.d.ts +0 -320
- package/esm/repositories/contracts/query-builder.contract.d.ts.map +0 -1
- package/esm/repositories/contracts/repository-adapter.contract.d.ts +0 -183
- package/esm/repositories/contracts/repository-adapter.contract.d.ts.map +0 -1
- package/esm/repositories/contracts/types.d.ts +0 -328
- package/esm/repositories/contracts/types.d.ts.map +0 -1
- package/esm/repositories/index.d.ts +0 -8
- package/esm/repositories/index.d.ts.map +0 -1
- package/esm/repositories/repository.manager.d.ts +0 -694
- package/esm/repositories/repository.manager.d.ts.map +0 -1
- package/esm/repositories/repository.manager.js +0 -1123
- package/esm/repositories/repository.manager.js.map +0 -1
- package/esm/resource/define-resource.d.ts +0 -65
- package/esm/resource/define-resource.d.ts.map +0 -1
- package/esm/resource/define-resource.js +0 -62
- package/esm/resource/define-resource.js.map +0 -1
- package/esm/resource/index.d.ts +0 -6
- package/esm/resource/index.d.ts.map +0 -1
- package/esm/resource/register-resource.d.ts +0 -21
- package/esm/resource/register-resource.d.ts.map +0 -1
- package/esm/resource/register-resource.js +0 -23
- package/esm/resource/register-resource.js.map +0 -1
- package/esm/resource/resource-field-builder.d.ts +0 -104
- package/esm/resource/resource-field-builder.d.ts.map +0 -1
- package/esm/resource/resource-field-builder.js +0 -260
- package/esm/resource/resource-field-builder.js.map +0 -1
- package/esm/resource/resource.d.ts +0 -217
- package/esm/resource/resource.d.ts.map +0 -1
- package/esm/resource/resource.js +0 -303
- package/esm/resource/resource.js.map +0 -1
- package/esm/resource/types.d.ts +0 -74
- package/esm/resource/types.d.ts.map +0 -1
- package/esm/restful/index.d.ts +0 -2
- package/esm/restful/index.d.ts.map +0 -1
- package/esm/restful/restful.d.ts +0 -110
- package/esm/restful/restful.d.ts.map +0 -1
- package/esm/restful/restful.js +0 -317
- package/esm/restful/restful.js.map +0 -1
- package/esm/retry/index.d.ts +0 -3
- package/esm/retry/index.d.ts.map +0 -1
- package/esm/retry/retry.d.ts +0 -21
- package/esm/retry/retry.d.ts.map +0 -1
- package/esm/retry/retry.js +0 -39
- package/esm/retry/retry.js.map +0 -1
- package/esm/retry/types.d.ts +0 -27
- package/esm/retry/types.d.ts.map +0 -1
- package/esm/router/index.d.ts +0 -3
- package/esm/router/index.d.ts.map +0 -1
- package/esm/router/route-builder.d.ts +0 -120
- package/esm/router/route-builder.d.ts.map +0 -1
- package/esm/router/route-builder.js +0 -201
- package/esm/router/route-builder.js.map +0 -1
- package/esm/router/route-registry.d.ts +0 -30
- package/esm/router/route-registry.d.ts.map +0 -1
- package/esm/router/route-registry.js +0 -67
- package/esm/router/route-registry.js.map +0 -1
- package/esm/router/route.d.ts +0 -34
- package/esm/router/route.d.ts.map +0 -1
- package/esm/router/router.d.ts +0 -188
- package/esm/router/router.d.ts.map +0 -1
- package/esm/router/router.js +0 -605
- package/esm/router/router.js.map +0 -1
- package/esm/router/types.d.ts +0 -254
- package/esm/router/types.d.ts.map +0 -1
- package/esm/storage/config.d.ts +0 -15
- package/esm/storage/config.d.ts.map +0 -1
- package/esm/storage/config.js +0 -32
- package/esm/storage/config.js.map +0 -1
- package/esm/storage/context/storage-driver-context.d.ts +0 -69
- package/esm/storage/context/storage-driver-context.d.ts.map +0 -1
- package/esm/storage/context/storage-driver-context.js +0 -80
- package/esm/storage/context/storage-driver-context.js.map +0 -1
- package/esm/storage/drivers/cloud-driver.d.ts +0 -206
- package/esm/storage/drivers/cloud-driver.d.ts.map +0 -1
- package/esm/storage/drivers/cloud-driver.js +0 -721
- package/esm/storage/drivers/cloud-driver.js.map +0 -1
- package/esm/storage/drivers/do-spaces-driver.d.ts +0 -43
- package/esm/storage/drivers/do-spaces-driver.d.ts.map +0 -1
- package/esm/storage/drivers/do-spaces-driver.js +0 -50
- package/esm/storage/drivers/do-spaces-driver.js.map +0 -1
- package/esm/storage/drivers/local-driver.d.ts +0 -151
- package/esm/storage/drivers/local-driver.d.ts.map +0 -1
- package/esm/storage/drivers/local-driver.js +0 -448
- package/esm/storage/drivers/local-driver.js.map +0 -1
- package/esm/storage/drivers/r2-driver.d.ts +0 -47
- package/esm/storage/drivers/r2-driver.d.ts.map +0 -1
- package/esm/storage/drivers/r2-driver.js +0 -60
- package/esm/storage/drivers/r2-driver.js.map +0 -1
- package/esm/storage/drivers/s3-driver.d.ts +0 -32
- package/esm/storage/drivers/s3-driver.d.ts.map +0 -1
- package/esm/storage/drivers/s3-driver.js +0 -37
- package/esm/storage/drivers/s3-driver.js.map +0 -1
- package/esm/storage/index.d.ts +0 -13
- package/esm/storage/index.d.ts.map +0 -1
- package/esm/storage/scoped-storage.d.ts +0 -547
- package/esm/storage/scoped-storage.d.ts.map +0 -1
- package/esm/storage/scoped-storage.js +0 -739
- package/esm/storage/scoped-storage.js.map +0 -1
- package/esm/storage/storage-file.d.ts +0 -222
- package/esm/storage/storage-file.d.ts.map +0 -1
- package/esm/storage/storage-file.js +0 -376
- package/esm/storage/storage-file.js.map +0 -1
- package/esm/storage/storage.d.ts +0 -583
- package/esm/storage/storage.d.ts.map +0 -1
- package/esm/storage/storage.js +0 -948
- package/esm/storage/storage.js.map +0 -1
- package/esm/storage/types.d.ts +0 -966
- package/esm/storage/types.d.ts.map +0 -1
- package/esm/storage/utils/mime.d.ts +0 -33
- package/esm/storage/utils/mime.d.ts.map +0 -1
- package/esm/storage/utils/mime.js +0 -45
- package/esm/storage/utils/mime.js.map +0 -1
- package/esm/tests/index.d.ts +0 -9
- package/esm/tests/index.d.ts.map +0 -1
- package/esm/tests/start-http-development-server.d.ts +0 -15
- package/esm/tests/start-http-development-server.d.ts.map +0 -1
- package/esm/tests/start-http-development-server.js +0 -69
- package/esm/tests/start-http-development-server.js.map +0 -1
- package/esm/tests/test-helpers.d.ts +0 -43
- package/esm/tests/test-helpers.d.ts.map +0 -1
- package/esm/tests/test-helpers.js +0 -86
- package/esm/tests/test-helpers.js.map +0 -1
- package/esm/tests/vitest-setup.d.ts +0 -10
- package/esm/tests/vitest-setup.d.ts.map +0 -1
- package/esm/tests/vitest-setup.js +0 -36
- package/esm/tests/vitest-setup.js.map +0 -1
- package/esm/use-cases/index.d.ts +0 -7
- package/esm/use-cases/index.d.ts.map +0 -1
- package/esm/use-cases/types.d.ts +0 -267
- package/esm/use-cases/types.d.ts.map +0 -1
- package/esm/use-cases/use-case-events.d.ts +0 -33
- package/esm/use-cases/use-case-events.d.ts.map +0 -1
- package/esm/use-cases/use-case-events.js +0 -65
- package/esm/use-cases/use-case-events.js.map +0 -1
- package/esm/use-cases/use-case-pipeline.d.ts +0 -29
- package/esm/use-cases/use-case-pipeline.d.ts.map +0 -1
- package/esm/use-cases/use-case-pipeline.js +0 -45
- package/esm/use-cases/use-case-pipeline.js.map +0 -1
- package/esm/use-cases/use-case.d.ts +0 -27
- package/esm/use-cases/use-case.d.ts.map +0 -1
- package/esm/use-cases/use-case.errors.d.ts +0 -6
- package/esm/use-cases/use-case.errors.d.ts.map +0 -1
- package/esm/use-cases/use-case.errors.js +0 -8
- package/esm/use-cases/use-case.errors.js.map +0 -1
- package/esm/use-cases/use-case.js +0 -138
- package/esm/use-cases/use-case.js.map +0 -1
- package/esm/use-cases/use-cases-registry.d.ts +0 -38
- package/esm/use-cases/use-cases-registry.d.ts.map +0 -1
- package/esm/use-cases/use-cases-registry.js +0 -92
- package/esm/use-cases/use-cases-registry.js.map +0 -1
- package/esm/utils/app-log.d.ts +0 -8
- package/esm/utils/app-log.d.ts.map +0 -1
- package/esm/utils/app-log.js +0 -7
- package/esm/utils/app-log.js.map +0 -1
- package/esm/utils/cleanup-temp-files.d.ts +0 -5
- package/esm/utils/cleanup-temp-files.d.ts.map +0 -1
- package/esm/utils/database-log.d.ts +0 -25
- package/esm/utils/database-log.d.ts.map +0 -1
- package/esm/utils/database-log.js +0 -43
- package/esm/utils/database-log.js.map +0 -1
- package/esm/utils/download-file.d.ts +0 -3
- package/esm/utils/download-file.d.ts.map +0 -1
- package/esm/utils/environment.d.ts +0 -4
- package/esm/utils/environment.d.ts.map +0 -1
- package/esm/utils/environment.js +0 -6
- package/esm/utils/environment.js.map +0 -1
- package/esm/utils/framework-vesion.d.ts +0 -6
- package/esm/utils/framework-vesion.d.ts.map +0 -1
- package/esm/utils/framework-vesion.js +0 -18
- package/esm/utils/framework-vesion.js.map +0 -1
- package/esm/utils/get-localized.d.ts +0 -10
- package/esm/utils/get-localized.d.ts.map +0 -1
- package/esm/utils/get-localized.js +0 -15
- package/esm/utils/get-localized.js.map +0 -1
- package/esm/utils/index.d.ts +0 -12
- package/esm/utils/index.d.ts.map +0 -1
- package/esm/utils/internal.d.ts +0 -4
- package/esm/utils/internal.d.ts.map +0 -1
- package/esm/utils/paths.d.ts +0 -55
- package/esm/utils/paths.d.ts.map +0 -1
- package/esm/utils/paths.js +0 -89
- package/esm/utils/paths.js.map +0 -1
- package/esm/utils/promise-all-object.d.ts +0 -8
- package/esm/utils/promise-all-object.d.ts.map +0 -1
- package/esm/utils/promise-all-object.js +0 -12
- package/esm/utils/promise-all-object.js.map +0 -1
- package/esm/utils/queue.d.ts +0 -49
- package/esm/utils/queue.d.ts.map +0 -1
- package/esm/utils/queue.js +0 -89
- package/esm/utils/queue.js.map +0 -1
- package/esm/utils/sleep.d.ts +0 -2
- package/esm/utils/sleep.d.ts.map +0 -1
- package/esm/utils/sleep.js +0 -3
- package/esm/utils/sleep.js.map +0 -1
- package/esm/utils/sluggable.d.ts +0 -5
- package/esm/utils/sluggable.d.ts.map +0 -1
- package/esm/utils/sluggable.js +0 -15
- package/esm/utils/sluggable.js.map +0 -1
- package/esm/utils/to-json.d.ts +0 -2
- package/esm/utils/to-json.d.ts.map +0 -1
- package/esm/utils/to-json.js +0 -26
- package/esm/utils/to-json.js.map +0 -1
- package/esm/utils/types.d.ts +0 -22
- package/esm/utils/types.d.ts.map +0 -1
- package/esm/utils/urls.d.ts +0 -21
- package/esm/utils/urls.d.ts.map +0 -1
- package/esm/utils/urls.js +0 -31
- package/esm/utils/urls.js.map +0 -1
- package/esm/validation/database/exists-except-current-id.d.ts +0 -7
- package/esm/validation/database/exists-except-current-id.d.ts.map +0 -1
- package/esm/validation/database/exists-except-current-id.js +0 -24
- package/esm/validation/database/exists-except-current-id.js.map +0 -1
- package/esm/validation/database/exists-except-current-user.d.ts +0 -7
- package/esm/validation/database/exists-except-current-user.d.ts.map +0 -1
- package/esm/validation/database/exists-except-current-user.js +0 -26
- package/esm/validation/database/exists-except-current-user.js.map +0 -1
- package/esm/validation/database/exists.d.ts +0 -7
- package/esm/validation/database/exists.d.ts.map +0 -1
- package/esm/validation/database/exists.js +0 -22
- package/esm/validation/database/exists.js.map +0 -1
- package/esm/validation/database/index.d.ts +0 -12
- package/esm/validation/database/index.d.ts.map +0 -1
- package/esm/validation/database/types.d.ts +0 -68
- package/esm/validation/database/types.d.ts.map +0 -1
- package/esm/validation/database/unique-except-current-id.d.ts +0 -7
- package/esm/validation/database/unique-except-current-id.d.ts.map +0 -1
- package/esm/validation/database/unique-except-current-id.js +0 -24
- package/esm/validation/database/unique-except-current-id.js.map +0 -1
- package/esm/validation/database/unique-except-current-user.d.ts +0 -7
- package/esm/validation/database/unique-except-current-user.d.ts.map +0 -1
- package/esm/validation/database/unique-except-current-user.js +0 -29
- package/esm/validation/database/unique-except-current-user.js.map +0 -1
- package/esm/validation/database/unique.d.ts +0 -7
- package/esm/validation/database/unique.d.ts.map +0 -1
- package/esm/validation/database/unique.js +0 -31
- package/esm/validation/database/unique.js.map +0 -1
- package/esm/validation/file/file.d.ts +0 -22
- package/esm/validation/file/file.d.ts.map +0 -1
- package/esm/validation/file/file.js +0 -60
- package/esm/validation/file/file.js.map +0 -1
- package/esm/validation/file/index.d.ts +0 -6
- package/esm/validation/file/index.d.ts.map +0 -1
- package/esm/validation/index.d.ts +0 -16
- package/esm/validation/index.d.ts.map +0 -1
- package/esm/validation/init.d.ts +0 -7
- package/esm/validation/init.d.ts.map +0 -1
- package/esm/validation/init.js +0 -36
- package/esm/validation/init.js.map +0 -1
- package/esm/validation/plugins/database-plugin.d.ts +0 -14
- package/esm/validation/plugins/database-plugin.d.ts.map +0 -1
- package/esm/validation/plugins/database-plugin.js +0 -83
- package/esm/validation/plugins/database-plugin.js.map +0 -1
- package/esm/validation/plugins/file-plugin.d.ts +0 -11
- package/esm/validation/plugins/file-plugin.d.ts.map +0 -1
- package/esm/validation/plugins/file-plugin.js +0 -17
- package/esm/validation/plugins/file-plugin.js.map +0 -1
- package/esm/validation/plugins/index.d.ts +0 -9
- package/esm/validation/plugins/index.d.ts.map +0 -1
- package/esm/validation/plugins/localized-plugin.d.ts +0 -11
- package/esm/validation/plugins/localized-plugin.d.ts.map +0 -1
- package/esm/validation/plugins/localized-plugin.js +0 -19
- package/esm/validation/plugins/localized-plugin.js.map +0 -1
- package/esm/validation/types.d.ts +0 -87
- package/esm/validation/types.d.ts.map +0 -1
- package/esm/validation/validateAll.d.ts +0 -7
- package/esm/validation/validateAll.d.ts.map +0 -1
- package/esm/validation/validateAll.js +0 -60
- package/esm/validation/validateAll.js.map +0 -1
- package/esm/validation/validators/file-validator.d.ts +0 -62
- package/esm/validation/validators/file-validator.d.ts.map +0 -1
- package/esm/validation/validators/file-validator.js +0 -136
- package/esm/validation/validators/file-validator.js.map +0 -1
- package/esm/validation/validators/index.d.ts +0 -7
- package/esm/validation/validators/index.d.ts.map +0 -1
- package/esm/warlock-config/default-configurations.d.ts +0 -3
- package/esm/warlock-config/default-configurations.d.ts.map +0 -1
- package/esm/warlock-config/default-configurations.js +0 -8
- package/esm/warlock-config/default-configurations.js.map +0 -1
- package/esm/warlock-config/define-config.d.ts +0 -3
- package/esm/warlock-config/define-config.d.ts.map +0 -1
- package/esm/warlock-config/define-config.js +0 -3
- package/esm/warlock-config/define-config.js.map +0 -1
- package/esm/warlock-config/index.d.ts +0 -4
- package/esm/warlock-config/index.d.ts.map +0 -1
- package/esm/warlock-config/types.d.ts +0 -129
- package/esm/warlock-config/types.d.ts.map +0 -1
- package/esm/warlock-config/warlock-config.manager.d.ts +0 -83
- package/esm/warlock-config/warlock-config.manager.d.ts.map +0 -1
- package/esm/warlock-config/warlock-config.manager.js +0 -141
- package/esm/warlock-config/warlock-config.manager.js.map +0 -1
|
@@ -1,709 +0,0 @@
|
|
|
1
|
-
import {Random}from'@mongez/reinforcements';import dayjs from'dayjs';import path from'path';import {Image}from'../image/image.js';import'@mongez/config';import'../config/config-handlers.js';import'@mongez/fs';import'fs';import'fs/promises';import {storage}from'../storage/storage.js';import'../storage/context/storage-driver-context.js';import'mime';import'../storage/drivers/cloud-driver.js';import'crypto';import'stream/promises';import {sanitizePath}from'../utils/paths.js';import {uploadsConfig}from'./uploads-config.js';/**
|
|
2
|
-
* UploadedFile - Handles multipart file uploads with storage and image integration
|
|
3
|
-
*
|
|
4
|
-
* Provides a fluent API for validating, transforming, and saving uploaded files
|
|
5
|
-
* to various storage drivers (local, S3, R2, etc.).
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```typescript
|
|
9
|
-
* // Simple save with random name
|
|
10
|
-
* const file = await uploadedFile.save("avatars");
|
|
11
|
-
*
|
|
12
|
-
* // Original name with date prefix
|
|
13
|
-
* const file = await uploadedFile.save("avatars", {
|
|
14
|
-
* name: "original",
|
|
15
|
-
* prefix: { format: "yyyy/mm/dd", as: "directory" }
|
|
16
|
-
* });
|
|
17
|
-
*
|
|
18
|
-
* // With image transformations
|
|
19
|
-
* const file = await uploadedFile
|
|
20
|
-
* .resize(800, 600)
|
|
21
|
-
* .quality(85)
|
|
22
|
-
* .format("webp")
|
|
23
|
-
* .save("avatars");
|
|
24
|
-
*
|
|
25
|
-
* // Different storage driver
|
|
26
|
-
* const file = await uploadedFile.use("s3").save("avatars");
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
class UploadedFile {
|
|
30
|
-
fileData;
|
|
31
|
-
/**
|
|
32
|
-
* File buffered content
|
|
33
|
-
* @internal
|
|
34
|
-
*/
|
|
35
|
-
bufferedFileContent;
|
|
36
|
-
/**
|
|
37
|
-
* Upload file hash (SHA-256)
|
|
38
|
-
*
|
|
39
|
-
* Populated after file is saved.
|
|
40
|
-
*/
|
|
41
|
-
hash = "";
|
|
42
|
-
/**
|
|
43
|
-
* Selected storage driver
|
|
44
|
-
* @internal
|
|
45
|
-
*/
|
|
46
|
-
_storage = storage;
|
|
47
|
-
/**
|
|
48
|
-
* Saved StorageFile reference
|
|
49
|
-
* @internal
|
|
50
|
-
*/
|
|
51
|
-
_storageFile;
|
|
52
|
-
/**
|
|
53
|
-
* Queued image options (high-level API)
|
|
54
|
-
* @internal
|
|
55
|
-
*/
|
|
56
|
-
_imageOptions = {};
|
|
57
|
-
/**
|
|
58
|
-
* Full transform options or callback
|
|
59
|
-
* @internal
|
|
60
|
-
*/
|
|
61
|
-
_transformConfig;
|
|
62
|
-
/**
|
|
63
|
-
* Create a new UploadedFile instance
|
|
64
|
-
*
|
|
65
|
-
* @param fileData - Multipart file data from Fastify
|
|
66
|
-
* @throws Error if file data is invalid
|
|
67
|
-
*/
|
|
68
|
-
constructor(fileData) {
|
|
69
|
-
this.fileData = fileData;
|
|
70
|
-
if (!fileData?.filename) {
|
|
71
|
-
throw new Error("Invalid file data: filename is required");
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
// ============================================================
|
|
75
|
-
// File Properties
|
|
76
|
-
// ============================================================
|
|
77
|
-
/**
|
|
78
|
-
* Get file name (sanitized)
|
|
79
|
-
*
|
|
80
|
-
* Returns the original filename with special characters removed/replaced.
|
|
81
|
-
*/
|
|
82
|
-
get name() {
|
|
83
|
-
return sanitizePath(this.fileData.filename);
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Get file MIME type
|
|
87
|
-
*
|
|
88
|
-
* @example "image/jpeg", "application/pdf"
|
|
89
|
-
*/
|
|
90
|
-
get mimeType() {
|
|
91
|
-
return this.fileData.mimetype;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Get file extension (lowercase, without dot)
|
|
95
|
-
*
|
|
96
|
-
* @example "jpg", "png", "pdf"
|
|
97
|
-
*/
|
|
98
|
-
get extension() {
|
|
99
|
-
return path.extname(this.fileData.filename).replace(".", "").toLowerCase();
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Get file metadata
|
|
103
|
-
*/
|
|
104
|
-
async metadata() {
|
|
105
|
-
const data = {
|
|
106
|
-
name: this.name,
|
|
107
|
-
mimeType: this.mimeType,
|
|
108
|
-
extension: this.extension,
|
|
109
|
-
size: await this.size(),
|
|
110
|
-
};
|
|
111
|
-
if (this.isImage) {
|
|
112
|
-
const dimensions = await this.dimensions();
|
|
113
|
-
data.width = dimensions.width;
|
|
114
|
-
data.height = dimensions.height;
|
|
115
|
-
}
|
|
116
|
-
return data;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Get file size in bytes
|
|
120
|
-
*
|
|
121
|
-
* Buffers the file content if not already buffered.
|
|
122
|
-
*/
|
|
123
|
-
async size() {
|
|
124
|
-
const file = await this.buffer();
|
|
125
|
-
return file.length;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Get file buffer
|
|
129
|
-
*
|
|
130
|
-
* Caches the buffer after first call for efficiency.
|
|
131
|
-
*/
|
|
132
|
-
async buffer() {
|
|
133
|
-
if (this.bufferedFileContent) {
|
|
134
|
-
return this.bufferedFileContent;
|
|
135
|
-
}
|
|
136
|
-
this.bufferedFileContent = await this.fileData.toBuffer();
|
|
137
|
-
return this.bufferedFileContent;
|
|
138
|
-
}
|
|
139
|
-
// ============================================================
|
|
140
|
-
// File Type Checks
|
|
141
|
-
// ============================================================
|
|
142
|
-
/**
|
|
143
|
-
* Check if file is an image based on MIME type
|
|
144
|
-
*/
|
|
145
|
-
get isImage() {
|
|
146
|
-
return this.mimeType.startsWith("image");
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Check if file is a video based on MIME type
|
|
150
|
-
*/
|
|
151
|
-
get isVideo() {
|
|
152
|
-
return this.mimeType.startsWith("video");
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Check if file is an audio based on MIME type
|
|
156
|
-
*/
|
|
157
|
-
get isAudio() {
|
|
158
|
-
return this.mimeType.startsWith("audio");
|
|
159
|
-
}
|
|
160
|
-
// ============================================================
|
|
161
|
-
// Storage Driver Selection
|
|
162
|
-
// ============================================================
|
|
163
|
-
/**
|
|
164
|
-
* Select a specific storage driver for this upload
|
|
165
|
-
*
|
|
166
|
-
* Returns this instance for chaining. The driver is used
|
|
167
|
-
* when `save()` or `saveAs()` is called.
|
|
168
|
-
*
|
|
169
|
-
* @param driver - Driver name from storage configuration
|
|
170
|
-
* @returns This instance for chaining
|
|
171
|
-
*
|
|
172
|
-
* @example
|
|
173
|
-
* ```typescript
|
|
174
|
-
* await file.use("s3").save("avatars");
|
|
175
|
-
* await file.use("r2").save("cdn/images");
|
|
176
|
-
* ```
|
|
177
|
-
*/
|
|
178
|
-
use(driver) {
|
|
179
|
-
this._storage = storage.use(driver);
|
|
180
|
-
return this;
|
|
181
|
-
}
|
|
182
|
-
// ============================================================
|
|
183
|
-
// High-Level Image Transform API
|
|
184
|
-
// ============================================================
|
|
185
|
-
/**
|
|
186
|
-
* Resize the image before saving
|
|
187
|
-
*
|
|
188
|
-
* Only applies to image files. Non-image files ignore this.
|
|
189
|
-
*
|
|
190
|
-
* @param width - Target width in pixels
|
|
191
|
-
* @param height - Optional target height (maintains aspect ratio if omitted)
|
|
192
|
-
* @returns This instance for chaining
|
|
193
|
-
*
|
|
194
|
-
* @example
|
|
195
|
-
* ```typescript
|
|
196
|
-
* await file.resize(800).save("thumbnails");
|
|
197
|
-
* await file.resize(400, 400).save("avatars");
|
|
198
|
-
* ```
|
|
199
|
-
*/
|
|
200
|
-
resize(width, height) {
|
|
201
|
-
this._imageOptions.resize = { width, height };
|
|
202
|
-
return this;
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Set image output quality
|
|
206
|
-
*
|
|
207
|
-
* Quality affects file size and visual fidelity.
|
|
208
|
-
* Only applies to formats that support quality (JPEG, WebP, AVIF).
|
|
209
|
-
*
|
|
210
|
-
* @param value - Quality value (1-100)
|
|
211
|
-
* @returns This instance for chaining
|
|
212
|
-
*
|
|
213
|
-
* @example
|
|
214
|
-
* ```typescript
|
|
215
|
-
* await file.quality(85).save("images");
|
|
216
|
-
* ```
|
|
217
|
-
*/
|
|
218
|
-
quality(value) {
|
|
219
|
-
if (value < 1 || value > 100) {
|
|
220
|
-
throw new Error("Quality must be between 1 and 100");
|
|
221
|
-
}
|
|
222
|
-
this._imageOptions.quality = value;
|
|
223
|
-
return this;
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Convert image to a specific format
|
|
227
|
-
*
|
|
228
|
-
* Changes the output format and updates the file extension accordingly.
|
|
229
|
-
*
|
|
230
|
-
* @param format - Target image format (jpeg, png, webp, avif, etc.)
|
|
231
|
-
* @returns This instance for chaining
|
|
232
|
-
*
|
|
233
|
-
* @example
|
|
234
|
-
* ```typescript
|
|
235
|
-
* await file.format("webp").save("images");
|
|
236
|
-
* await file.resize(800).format("avif").quality(80).save("optimized");
|
|
237
|
-
* ```
|
|
238
|
-
*/
|
|
239
|
-
format(format) {
|
|
240
|
-
this._imageOptions.format = format;
|
|
241
|
-
return this;
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Rotate the image
|
|
245
|
-
*
|
|
246
|
-
* @param degrees - Rotation angle in degrees (positive = clockwise)
|
|
247
|
-
* @returns This instance for chaining
|
|
248
|
-
*
|
|
249
|
-
* @example
|
|
250
|
-
* ```typescript
|
|
251
|
-
* await file.rotate(90).save("rotated");
|
|
252
|
-
* ```
|
|
253
|
-
*/
|
|
254
|
-
rotate(degrees) {
|
|
255
|
-
this._imageOptions.rotate = degrees;
|
|
256
|
-
return this;
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* Apply blur effect to the image
|
|
260
|
-
*
|
|
261
|
-
* @param sigma - Blur intensity (default: 3, minimum: 0.3)
|
|
262
|
-
* @returns This instance for chaining
|
|
263
|
-
*
|
|
264
|
-
* @example
|
|
265
|
-
* ```typescript
|
|
266
|
-
* await file.blur(5).save("blurred");
|
|
267
|
-
* ```
|
|
268
|
-
*/
|
|
269
|
-
blur(sigma = 3) {
|
|
270
|
-
if (sigma < 0.3) {
|
|
271
|
-
throw new Error("Blur sigma must be at least 0.3");
|
|
272
|
-
}
|
|
273
|
-
this._imageOptions.blur = sigma;
|
|
274
|
-
return this;
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Convert image to grayscale (black and white)
|
|
278
|
-
*
|
|
279
|
-
* @returns This instance for chaining
|
|
280
|
-
*
|
|
281
|
-
* @example
|
|
282
|
-
* ```typescript
|
|
283
|
-
* await file.grayscale().save("bw-images");
|
|
284
|
-
* ```
|
|
285
|
-
*/
|
|
286
|
-
grayscale() {
|
|
287
|
-
this._imageOptions.grayscale = true;
|
|
288
|
-
return this;
|
|
289
|
-
}
|
|
290
|
-
// ============================================================
|
|
291
|
-
// Full Transform Control
|
|
292
|
-
// ============================================================
|
|
293
|
-
/**
|
|
294
|
-
* Apply full image transformations
|
|
295
|
-
*
|
|
296
|
-
* Provides complete control over image processing. Can be used with:
|
|
297
|
-
* - An options object for predefined transforms
|
|
298
|
-
* - A callback function for chained operations
|
|
299
|
-
*
|
|
300
|
-
* @param config - Transform options or callback function
|
|
301
|
-
* @returns This instance for chaining
|
|
302
|
-
*
|
|
303
|
-
* @example
|
|
304
|
-
* ```typescript
|
|
305
|
-
* // Using options object
|
|
306
|
-
* await file.transform({
|
|
307
|
-
* resize: { width: 800, fit: "inside" },
|
|
308
|
-
* quality: 85
|
|
309
|
-
* }).save("images");
|
|
310
|
-
*
|
|
311
|
-
* // Using callback for full control
|
|
312
|
-
* await file.transform(img =>
|
|
313
|
-
* img.resize({ width: 800 })
|
|
314
|
-
* .watermark("logo.png", { gravity: "southeast" })
|
|
315
|
-
* .sharpen()
|
|
316
|
-
* ).save("products");
|
|
317
|
-
* ```
|
|
318
|
-
*/
|
|
319
|
-
transform(config) {
|
|
320
|
-
this._transformConfig = config;
|
|
321
|
-
return this;
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Get an Image instance for advanced manipulation
|
|
325
|
-
*
|
|
326
|
-
* Returns an Image instance from the file buffer for manual processing.
|
|
327
|
-
* Use this when you need operations not covered by the fluent API.
|
|
328
|
-
*
|
|
329
|
-
* @returns Promise resolving to Image instance
|
|
330
|
-
*
|
|
331
|
-
* @example
|
|
332
|
-
* ```typescript
|
|
333
|
-
* const img = await file.toImage();
|
|
334
|
-
* await img
|
|
335
|
-
* .resize({ width: 800 })
|
|
336
|
-
* .watermark("logo.png", { gravity: "southeast" })
|
|
337
|
-
* .save("path/to/output.jpg");
|
|
338
|
-
* ```
|
|
339
|
-
*/
|
|
340
|
-
async toImage() {
|
|
341
|
-
return new Image(await this.buffer());
|
|
342
|
-
}
|
|
343
|
-
// ============================================================
|
|
344
|
-
// Image Metadata
|
|
345
|
-
// ============================================================
|
|
346
|
-
/**
|
|
347
|
-
* Get file width and height (only for images)
|
|
348
|
-
*
|
|
349
|
-
* @returns Dimensions object, or empty object if not an image
|
|
350
|
-
*/
|
|
351
|
-
async dimensions() {
|
|
352
|
-
if (!this.isImage) {
|
|
353
|
-
return {};
|
|
354
|
-
}
|
|
355
|
-
return new Image(await this.buffer()).dimensions();
|
|
356
|
-
}
|
|
357
|
-
// ============================================================
|
|
358
|
-
// Validation
|
|
359
|
-
// ============================================================
|
|
360
|
-
/**
|
|
361
|
-
* Validate file against the given options
|
|
362
|
-
*
|
|
363
|
-
* @param options - Validation rules
|
|
364
|
-
* @throws Error if validation fails
|
|
365
|
-
*
|
|
366
|
-
* @example
|
|
367
|
-
* ```typescript
|
|
368
|
-
* await file.validate({
|
|
369
|
-
* allowedMimeTypes: ["image/jpeg", "image/png"],
|
|
370
|
-
* maxSize: 5 * 1024 * 1024 // 5MB
|
|
371
|
-
* });
|
|
372
|
-
* ```
|
|
373
|
-
*/
|
|
374
|
-
async validate(options) {
|
|
375
|
-
const { allowedMimeTypes, allowedExtensions, maxSize } = options;
|
|
376
|
-
if (allowedMimeTypes && !allowedMimeTypes.includes(this.mimeType)) {
|
|
377
|
-
throw new Error(`Invalid file type: ${this.mimeType}. Allowed types: ${allowedMimeTypes.join(", ")}`);
|
|
378
|
-
}
|
|
379
|
-
if (allowedExtensions && !allowedExtensions.includes(this.extension)) {
|
|
380
|
-
throw new Error(`Invalid file extension: ${this.extension}. Allowed extensions: ${allowedExtensions.join(", ")}`);
|
|
381
|
-
}
|
|
382
|
-
if (maxSize) {
|
|
383
|
-
const fileSize = await this.size();
|
|
384
|
-
if (fileSize > maxSize) {
|
|
385
|
-
throw new Error(`File too large: ${fileSize} bytes. Maximum allowed: ${maxSize} bytes`);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
// ============================================================
|
|
390
|
-
// Save Operations
|
|
391
|
-
// ============================================================
|
|
392
|
-
/**
|
|
393
|
-
* Save the file to a directory with automatic naming
|
|
394
|
-
* Keep in mind to use only relative path to the root of storage
|
|
395
|
-
* If you are using local driver
|
|
396
|
-
* Uses the configured naming strategy and prefix options to generate
|
|
397
|
-
* the final path. Returns a StorageFile for accessing file metadata.
|
|
398
|
-
*
|
|
399
|
-
* @param directory - Target directory path
|
|
400
|
-
* @param options - Save options (name, prefix, driver, validate)
|
|
401
|
-
* @returns StorageFile instance with file metadata and operations
|
|
402
|
-
*
|
|
403
|
-
* @example
|
|
404
|
-
* ```typescript
|
|
405
|
-
* // Random name (default)
|
|
406
|
-
* await file.save("avatars");
|
|
407
|
-
* // → avatars/x7k9m2p4.jpg
|
|
408
|
-
*
|
|
409
|
-
* // Original name
|
|
410
|
-
* await file.save("avatars", { name: "original" });
|
|
411
|
-
* // → avatars/photo.jpg
|
|
412
|
-
*
|
|
413
|
-
* // With date directory
|
|
414
|
-
* await file.save("avatars", {
|
|
415
|
-
* prefix: { format: "yyyy/mm/dd", as: "directory" }
|
|
416
|
-
* });
|
|
417
|
-
* // → avatars/2025/12/21/x7k9m2p4.jpg
|
|
418
|
-
*
|
|
419
|
-
* // Original name with datetime prefix
|
|
420
|
-
* await file.save("avatars", { name: "original", prefix: true });
|
|
421
|
-
* // → avatars/21-12-2025-16-45-30-photo.jpg
|
|
422
|
-
* ```
|
|
423
|
-
*/
|
|
424
|
-
async save(directory, options) {
|
|
425
|
-
// Validate if requested
|
|
426
|
-
if (options?.validate) {
|
|
427
|
-
await this.validate(options.validate);
|
|
428
|
-
}
|
|
429
|
-
// Resolve filename and prefix
|
|
430
|
-
const filename = this.resolveFilename(options);
|
|
431
|
-
const prefix = this.resolvePrefix(options?.prefix);
|
|
432
|
-
const location = this.buildLocation(directory, prefix, filename);
|
|
433
|
-
return this.saveToLocation(location, options?.driver);
|
|
434
|
-
}
|
|
435
|
-
/**
|
|
436
|
-
* Save the file to an explicit path
|
|
437
|
-
*
|
|
438
|
-
* Unlike `save()`, this method uses the exact path you provide.
|
|
439
|
-
* No automatic naming or prefix is applied.
|
|
440
|
-
*
|
|
441
|
-
* @param location - Full file path (directory + filename)
|
|
442
|
-
* @param options - Save options (driver, validate)
|
|
443
|
-
* @returns StorageFile instance with file metadata
|
|
444
|
-
*
|
|
445
|
-
* @example
|
|
446
|
-
* ```typescript
|
|
447
|
-
* await file.saveAs("avatars/profile-123.png");
|
|
448
|
-
* await file.saveAs("products/2025/featured-image.webp");
|
|
449
|
-
* ```
|
|
450
|
-
*/
|
|
451
|
-
async saveAs(location, options) {
|
|
452
|
-
// Validate if requested
|
|
453
|
-
if (options?.validate) {
|
|
454
|
-
await this.validate(options.validate);
|
|
455
|
-
}
|
|
456
|
-
return this.saveToLocation(location, options?.driver);
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* Get the StorageFile reference if file has been saved
|
|
460
|
-
*
|
|
461
|
-
* Returns undefined if file hasn't been saved yet.
|
|
462
|
-
*/
|
|
463
|
-
get storageFile() {
|
|
464
|
-
return this._storageFile;
|
|
465
|
-
}
|
|
466
|
-
// ============================================================
|
|
467
|
-
// Internal Helpers
|
|
468
|
-
// ============================================================
|
|
469
|
-
/**
|
|
470
|
-
* Execute save to the specified location
|
|
471
|
-
* @internal
|
|
472
|
-
*/
|
|
473
|
-
async saveToLocation(location, driver) {
|
|
474
|
-
// Get file content (apply transforms if image)
|
|
475
|
-
const content = await this.getProcessedContent();
|
|
476
|
-
// Select storage
|
|
477
|
-
const storageInstance = this.resolveStorage(driver);
|
|
478
|
-
// Determine final location (adjust extension if format changed)
|
|
479
|
-
const finalLocation = this.adjustLocationForFormat(location);
|
|
480
|
-
// Save to storage
|
|
481
|
-
this._storageFile = await storageInstance.put(content, finalLocation, {
|
|
482
|
-
mimeType: this.getFinalMimeType(),
|
|
483
|
-
});
|
|
484
|
-
// Store hash from StorageFile
|
|
485
|
-
const info = await this._storageFile.data();
|
|
486
|
-
this.hash = info.hash || "";
|
|
487
|
-
return this._storageFile;
|
|
488
|
-
}
|
|
489
|
-
/**
|
|
490
|
-
* Get processed content (with transforms applied if applicable)
|
|
491
|
-
* @internal
|
|
492
|
-
*/
|
|
493
|
-
async getProcessedContent() {
|
|
494
|
-
const content = await this.buffer();
|
|
495
|
-
// If not an image or no transforms, return as-is
|
|
496
|
-
if (!this.isImage || !this.hasTransforms()) {
|
|
497
|
-
return content;
|
|
498
|
-
}
|
|
499
|
-
// Create Image and apply transforms
|
|
500
|
-
let img = new Image(content);
|
|
501
|
-
// Apply transform callback or options
|
|
502
|
-
if (typeof this._transformConfig === "function") {
|
|
503
|
-
img = this._transformConfig(img);
|
|
504
|
-
}
|
|
505
|
-
else if (this._transformConfig) {
|
|
506
|
-
img = img.apply(this._transformConfig);
|
|
507
|
-
}
|
|
508
|
-
// Apply high-level options on top
|
|
509
|
-
img = this.applyImageOptions(img);
|
|
510
|
-
return img.toBuffer();
|
|
511
|
-
}
|
|
512
|
-
/**
|
|
513
|
-
* Apply high-level image options
|
|
514
|
-
* @internal
|
|
515
|
-
*/
|
|
516
|
-
applyImageOptions(img) {
|
|
517
|
-
const opts = this._imageOptions;
|
|
518
|
-
if (opts.resize) {
|
|
519
|
-
img = img.resize({ width: opts.resize.width, height: opts.resize.height });
|
|
520
|
-
}
|
|
521
|
-
if (opts.rotate !== undefined) {
|
|
522
|
-
img = img.rotate(opts.rotate);
|
|
523
|
-
}
|
|
524
|
-
if (opts.blur !== undefined) {
|
|
525
|
-
img = img.blur(opts.blur);
|
|
526
|
-
}
|
|
527
|
-
if (opts.grayscale) {
|
|
528
|
-
img = img.grayscale();
|
|
529
|
-
}
|
|
530
|
-
if (opts.quality !== undefined) {
|
|
531
|
-
img = img.quality(opts.quality);
|
|
532
|
-
}
|
|
533
|
-
if (opts.format) {
|
|
534
|
-
img = img.format(opts.format);
|
|
535
|
-
}
|
|
536
|
-
return img;
|
|
537
|
-
}
|
|
538
|
-
/**
|
|
539
|
-
* Check if any transforms are queued
|
|
540
|
-
* @internal
|
|
541
|
-
*/
|
|
542
|
-
hasTransforms() {
|
|
543
|
-
return this._transformConfig !== undefined || Object.keys(this._imageOptions).length > 0;
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* Resolve storage instance to use
|
|
547
|
-
* @internal
|
|
548
|
-
*/
|
|
549
|
-
resolveStorage(driver) {
|
|
550
|
-
if (driver) {
|
|
551
|
-
return storage.use(driver);
|
|
552
|
-
}
|
|
553
|
-
return this._storage || storage;
|
|
554
|
-
}
|
|
555
|
-
/**
|
|
556
|
-
* Resolve the filename based on options and config
|
|
557
|
-
* @internal
|
|
558
|
-
*/
|
|
559
|
-
resolveFilename(options) {
|
|
560
|
-
const namingStrategy = options?.name ?? uploadsConfig("name") ?? "random";
|
|
561
|
-
let baseName;
|
|
562
|
-
if (namingStrategy === "original") {
|
|
563
|
-
baseName = path.basename(this.name, path.extname(this.name));
|
|
564
|
-
}
|
|
565
|
-
else if (namingStrategy === "random") {
|
|
566
|
-
const length = uploadsConfig("randomLength");
|
|
567
|
-
baseName = Random.string(length);
|
|
568
|
-
}
|
|
569
|
-
else {
|
|
570
|
-
// Custom name - strip extension if provided, we'll add it
|
|
571
|
-
baseName = path.basename(namingStrategy, path.extname(namingStrategy));
|
|
572
|
-
}
|
|
573
|
-
// Get extension (may be changed by format transform)
|
|
574
|
-
const ext = this.getFinalExtension();
|
|
575
|
-
return `${baseName}.${ext}`;
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
* Resolve prefix based on options and config
|
|
579
|
-
* @internal
|
|
580
|
-
*/
|
|
581
|
-
resolvePrefix(prefix) {
|
|
582
|
-
// No prefix
|
|
583
|
-
if (prefix === false || prefix === undefined) {
|
|
584
|
-
const configPrefix = uploadsConfig("prefix");
|
|
585
|
-
if (!configPrefix) {
|
|
586
|
-
return "";
|
|
587
|
-
}
|
|
588
|
-
// Use config prefix if no explicit prefix provided
|
|
589
|
-
prefix = configPrefix;
|
|
590
|
-
}
|
|
591
|
-
// Boolean true = use default format
|
|
592
|
-
if (prefix === true) {
|
|
593
|
-
const format = uploadsConfig("defaultPrefixFormat");
|
|
594
|
-
return this.formatDatePrefix(format, "file");
|
|
595
|
-
}
|
|
596
|
-
// String = static prefix
|
|
597
|
-
if (typeof prefix === "string") {
|
|
598
|
-
return prefix;
|
|
599
|
-
}
|
|
600
|
-
// PrefixOptions object
|
|
601
|
-
const parts = [];
|
|
602
|
-
// Add date format if specified
|
|
603
|
-
if (prefix.format) {
|
|
604
|
-
parts.push(this.formatDate(prefix.format));
|
|
605
|
-
}
|
|
606
|
-
// Add random string if specified
|
|
607
|
-
if (prefix.randomLength) {
|
|
608
|
-
parts.push(Random.string(prefix.randomLength));
|
|
609
|
-
}
|
|
610
|
-
const combined = parts.join("-");
|
|
611
|
-
const as = prefix.as ?? "file";
|
|
612
|
-
if (as === "directory") {
|
|
613
|
-
return combined ? `${combined}/` : "";
|
|
614
|
-
}
|
|
615
|
-
return combined ? `${combined}-` : "";
|
|
616
|
-
}
|
|
617
|
-
/**
|
|
618
|
-
* Format a date prefix with the given format
|
|
619
|
-
* @internal
|
|
620
|
-
*/
|
|
621
|
-
formatDatePrefix(format, as) {
|
|
622
|
-
const formatted = this.formatDate(format);
|
|
623
|
-
return as === "directory" ? `${formatted}/` : `${formatted}-`;
|
|
624
|
-
}
|
|
625
|
-
/**
|
|
626
|
-
* Format current date using token-based format string
|
|
627
|
-
* @internal
|
|
628
|
-
*/
|
|
629
|
-
formatDate(format) {
|
|
630
|
-
return dayjs().format(format);
|
|
631
|
-
}
|
|
632
|
-
/**
|
|
633
|
-
* Build final location from directory, prefix, and filename
|
|
634
|
-
* @internal
|
|
635
|
-
*/
|
|
636
|
-
buildLocation(directory, prefix, filename) {
|
|
637
|
-
// Clean up directory (remove trailing slash)
|
|
638
|
-
const dir = directory.replace(/\/$/, "");
|
|
639
|
-
// If prefix ends with /, it's a directory
|
|
640
|
-
if (prefix.endsWith("/")) {
|
|
641
|
-
return `${dir}/${prefix}${filename}`;
|
|
642
|
-
}
|
|
643
|
-
// Otherwise prefix is part of filename
|
|
644
|
-
return `${dir}/${prefix}${filename}`;
|
|
645
|
-
}
|
|
646
|
-
/**
|
|
647
|
-
* Get final extension (accounting for format changes)
|
|
648
|
-
* @internal
|
|
649
|
-
*/
|
|
650
|
-
getFinalExtension() {
|
|
651
|
-
if (this._imageOptions.format) {
|
|
652
|
-
// Map formats to extensions
|
|
653
|
-
const format = this._imageOptions.format;
|
|
654
|
-
if (format === "jpeg")
|
|
655
|
-
return "jpg";
|
|
656
|
-
return format;
|
|
657
|
-
}
|
|
658
|
-
return this.extension;
|
|
659
|
-
}
|
|
660
|
-
/**
|
|
661
|
-
* Get final MIME type (accounting for format changes)
|
|
662
|
-
* @internal
|
|
663
|
-
*/
|
|
664
|
-
getFinalMimeType() {
|
|
665
|
-
if (this._imageOptions.format) {
|
|
666
|
-
const format = this._imageOptions.format;
|
|
667
|
-
if (format === "jpeg" || format === "jpg")
|
|
668
|
-
return "image/jpeg";
|
|
669
|
-
return `image/${format}`;
|
|
670
|
-
}
|
|
671
|
-
return this.mimeType;
|
|
672
|
-
}
|
|
673
|
-
/**
|
|
674
|
-
* Adjust location to use correct extension if format changed
|
|
675
|
-
* @internal
|
|
676
|
-
*/
|
|
677
|
-
adjustLocationForFormat(location) {
|
|
678
|
-
if (!this._imageOptions.format) {
|
|
679
|
-
return location;
|
|
680
|
-
}
|
|
681
|
-
const ext = this.getFinalExtension();
|
|
682
|
-
const currentExt = path.extname(location);
|
|
683
|
-
if (currentExt) {
|
|
684
|
-
return location.replace(currentExt, `.${ext}`);
|
|
685
|
-
}
|
|
686
|
-
return `${location}.${ext}`;
|
|
687
|
-
}
|
|
688
|
-
// ============================================================
|
|
689
|
-
// Serialization
|
|
690
|
-
// ============================================================
|
|
691
|
-
/**
|
|
692
|
-
* Convert to JSON representation
|
|
693
|
-
*
|
|
694
|
-
* Includes file metadata and base64 content for serialization.
|
|
695
|
-
*/
|
|
696
|
-
async toJSON() {
|
|
697
|
-
return {
|
|
698
|
-
name: this.name,
|
|
699
|
-
mimeType: this.mimeType,
|
|
700
|
-
extension: this.extension,
|
|
701
|
-
size: await this.size(),
|
|
702
|
-
isImage: this.isImage,
|
|
703
|
-
isVideo: this.isVideo,
|
|
704
|
-
isAudio: this.isAudio,
|
|
705
|
-
dimensions: this.isImage ? await this.dimensions() : undefined,
|
|
706
|
-
base64: (await this.buffer()).toString("base64"),
|
|
707
|
-
};
|
|
708
|
-
}
|
|
709
|
-
}export{UploadedFile};//# sourceMappingURL=uploaded-file.js.map
|