@warlock.js/core 4.0.162 → 4.0.164
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/esm/benchmark/index.d.ts +7 -0
- package/esm/benchmark/index.d.ts.map +1 -0
- package/esm/benchmark/profiler.d.ts +63 -0
- package/esm/benchmark/profiler.d.ts.map +1 -0
- package/esm/benchmark/profiler.js +155 -0
- package/esm/benchmark/profiler.js.map +1 -0
- package/esm/benchmark/types.d.ts +167 -0
- package/esm/benchmark/types.d.ts.map +1 -0
- package/esm/bootstrap/setup.d.ts +2 -0
- package/esm/bootstrap/setup.d.ts.map +1 -0
- package/esm/bootstrap/setup.js +14 -0
- package/esm/bootstrap/setup.js.map +1 -0
- package/esm/bootstrap.d.ts +2 -0
- package/esm/bootstrap.d.ts.map +1 -0
- package/esm/bootstrap.js +5 -0
- package/esm/bootstrap.js.map +1 -0
- package/esm/cache/database-cache-driver.d.ts +56 -0
- package/esm/cache/database-cache-driver.d.ts.map +1 -0
- package/esm/cache/database-cache-driver.js +112 -0
- package/esm/cache/database-cache-driver.js.map +1 -0
- package/esm/cache/index.d.ts +3 -0
- package/esm/cache/index.d.ts.map +1 -0
- package/esm/cache/index.js +1 -0
- package/esm/cache/index.js.map +1 -0
- package/esm/cli/cli-command.d.ts +115 -0
- package/esm/cli/cli-command.d.ts.map +1 -0
- package/esm/cli/cli-command.js +227 -0
- package/esm/cli/cli-command.js.map +1 -0
- package/esm/cli/cli-commands.manager.d.ts +71 -0
- package/esm/cli/cli-commands.manager.d.ts.map +1 -0
- package/esm/cli/cli-commands.manager.js +362 -0
- package/esm/cli/cli-commands.manager.js.map +1 -0
- package/esm/cli/cli-commands.utils.d.ts +69 -0
- package/esm/cli/cli-commands.utils.d.ts.map +1 -0
- package/esm/cli/cli-commands.utils.js +180 -0
- package/esm/cli/cli-commands.utils.js.map +1 -0
- package/esm/cli/commands/add.command.d.ts +2 -0
- package/esm/cli/commands/add.command.d.ts.map +1 -0
- package/esm/cli/commands/add.command.js +15 -0
- package/esm/cli/commands/add.command.js.map +1 -0
- package/esm/cli/commands/build.command.d.ts +2 -0
- package/esm/cli/commands/build.command.d.ts.map +1 -0
- package/esm/cli/commands/build.command.js +8 -0
- package/esm/cli/commands/build.command.js.map +1 -0
- package/esm/cli/commands/create-database.command.d.ts +2 -0
- package/esm/cli/commands/create-database.command.d.ts.map +1 -0
- package/esm/cli/commands/create-database.command.js +18 -0
- package/esm/cli/commands/create-database.command.js.map +1 -0
- package/esm/cli/commands/dev-server.command.d.ts +2 -0
- package/esm/cli/commands/dev-server.command.d.ts.map +1 -0
- package/esm/cli/commands/dev-server.command.js +18 -0
- package/esm/cli/commands/dev-server.command.js.map +1 -0
- package/esm/cli/commands/drop-tables.command.d.ts +2 -0
- package/esm/cli/commands/drop-tables.command.d.ts.map +1 -0
- package/esm/cli/commands/drop-tables.command.js +17 -0
- package/esm/cli/commands/drop-tables.command.js.map +1 -0
- package/esm/cli/commands/generate/generate.command.d.ts +10 -0
- package/esm/cli/commands/generate/generate.command.d.ts.map +1 -0
- package/esm/cli/commands/generate/generate.command.js +188 -0
- package/esm/cli/commands/generate/generate.command.js.map +1 -0
- package/esm/cli/commands/generate/generators/column-dsl-parser.d.ts +11 -0
- package/esm/cli/commands/generate/generators/column-dsl-parser.d.ts.map +1 -0
- package/esm/cli/commands/generate/generators/column-dsl-parser.js +47 -0
- package/esm/cli/commands/generate/generators/column-dsl-parser.js.map +1 -0
- package/esm/cli/commands/generate/generators/controller.generator.d.ts +3 -0
- package/esm/cli/commands/generate/generators/controller.generator.d.ts.map +1 -0
- package/esm/cli/commands/generate/generators/controller.generator.js +51 -0
- package/esm/cli/commands/generate/generators/controller.generator.js.map +1 -0
- package/esm/cli/commands/generate/generators/migration.generator.d.ts +13 -0
- package/esm/cli/commands/generate/generators/migration.generator.d.ts.map +1 -0
- package/esm/cli/commands/generate/generators/migration.generator.js +82 -0
- package/esm/cli/commands/generate/generators/migration.generator.js.map +1 -0
- package/esm/cli/commands/generate/generators/model.generator.d.ts +3 -0
- package/esm/cli/commands/generate/generators/model.generator.d.ts.map +1 -0
- package/esm/cli/commands/generate/generators/model.generator.js +58 -0
- package/esm/cli/commands/generate/generators/model.generator.js.map +1 -0
- package/esm/cli/commands/generate/generators/module.generator.d.ts +3 -0
- package/esm/cli/commands/generate/generators/module.generator.d.ts.map +1 -0
- package/esm/cli/commands/generate/generators/module.generator.js +149 -0
- package/esm/cli/commands/generate/generators/module.generator.js.map +1 -0
- package/esm/cli/commands/generate/generators/repository.generator.d.ts +3 -0
- package/esm/cli/commands/generate/generators/repository.generator.d.ts.map +1 -0
- package/esm/cli/commands/generate/generators/repository.generator.js +37 -0
- package/esm/cli/commands/generate/generators/repository.generator.js.map +1 -0
- package/esm/cli/commands/generate/generators/resource.generator.d.ts +3 -0
- package/esm/cli/commands/generate/generators/resource.generator.d.ts.map +1 -0
- package/esm/cli/commands/generate/generators/resource.generator.js +37 -0
- package/esm/cli/commands/generate/generators/resource.generator.js.map +1 -0
- package/esm/cli/commands/generate/generators/service.generator.d.ts +3 -0
- package/esm/cli/commands/generate/generators/service.generator.d.ts.map +1 -0
- package/esm/cli/commands/generate/generators/service.generator.js +37 -0
- package/esm/cli/commands/generate/generators/service.generator.js.map +1 -0
- package/esm/cli/commands/generate/generators/validation.generator.d.ts +3 -0
- package/esm/cli/commands/generate/generators/validation.generator.d.ts.map +1 -0
- package/esm/cli/commands/generate/generators/validation.generator.js +46 -0
- package/esm/cli/commands/generate/generators/validation.generator.js.map +1 -0
- package/esm/cli/commands/generate/templates/stubs.d.ts +129 -0
- package/esm/cli/commands/generate/templates/stubs.d.ts.map +1 -0
- package/esm/cli/commands/generate/templates/stubs.js +528 -0
- package/esm/cli/commands/generate/templates/stubs.js.map +1 -0
- package/esm/cli/commands/generate/types.d.ts +53 -0
- package/esm/cli/commands/generate/types.d.ts.map +1 -0
- package/esm/cli/commands/generate/utils/name-parser.d.ts +40 -0
- package/esm/cli/commands/generate/utils/name-parser.d.ts.map +1 -0
- package/esm/cli/commands/generate/utils/name-parser.js +65 -0
- package/esm/cli/commands/generate/utils/name-parser.js.map +1 -0
- package/esm/cli/commands/generate/utils/path-resolver.d.ts +30 -0
- package/esm/cli/commands/generate/utils/path-resolver.d.ts.map +1 -0
- package/esm/cli/commands/generate/utils/path-resolver.js +42 -0
- package/esm/cli/commands/generate/utils/path-resolver.js.map +1 -0
- package/esm/cli/commands/generate/utils/prompt.d.ts +13 -0
- package/esm/cli/commands/generate/utils/prompt.d.ts.map +1 -0
- package/esm/cli/commands/generate/utils/prompt.js +21 -0
- package/esm/cli/commands/generate/utils/prompt.js.map +1 -0
- package/esm/cli/commands/migrate.command.d.ts +2 -0
- package/esm/cli/commands/migrate.command.d.ts.map +1 -0
- package/esm/cli/commands/migrate.command.js +52 -0
- package/esm/cli/commands/migrate.command.js.map +1 -0
- package/esm/cli/commands/seed.command.d.ts +2 -0
- package/esm/cli/commands/seed.command.d.ts.map +1 -0
- package/esm/cli/commands/seed.command.js +24 -0
- package/esm/cli/commands/seed.command.js.map +1 -0
- package/esm/cli/commands/start-production.command.d.ts +2 -0
- package/esm/cli/commands/start-production.command.d.ts.map +1 -0
- package/esm/cli/commands/start-production.command.js +65 -0
- package/esm/cli/commands/start-production.command.js.map +1 -0
- package/esm/cli/commands/storage-put.action.d.ts +22 -0
- package/esm/cli/commands/storage-put.action.d.ts.map +1 -0
- package/esm/cli/commands/storage-put.action.js +75 -0
- package/esm/cli/commands/storage-put.action.js.map +1 -0
- package/esm/cli/commands/storage-put.command.d.ts +20 -0
- package/esm/cli/commands/storage-put.command.d.ts.map +1 -0
- package/esm/cli/commands/storage-put.command.js +41 -0
- package/esm/cli/commands/storage-put.command.js.map +1 -0
- package/esm/cli/commands/typings-generator.command.d.ts +2 -0
- package/esm/cli/commands/typings-generator.command.d.ts.map +1 -0
- package/esm/cli/commands/typings-generator.command.js +37 -0
- package/esm/cli/commands/typings-generator.command.js.map +1 -0
- package/esm/cli/commands-loader.d.ts +18 -0
- package/esm/cli/commands-loader.d.ts.map +1 -0
- package/esm/cli/commands-loader.js +45 -0
- package/esm/cli/commands-loader.js.map +1 -0
- package/esm/cli/framework-cli-commands.d.ts +2 -0
- package/esm/cli/framework-cli-commands.d.ts.map +1 -0
- package/esm/cli/framework-cli-commands.js +27 -0
- package/esm/cli/framework-cli-commands.js.map +1 -0
- package/esm/cli/index.d.ts +3 -0
- package/esm/cli/index.d.ts.map +1 -0
- package/esm/cli/index.js +1 -0
- package/esm/cli/index.js.map +1 -0
- package/esm/cli/parse-cli-args.d.ts +18 -0
- package/esm/cli/parse-cli-args.d.ts.map +1 -0
- package/esm/cli/parse-cli-args.js +82 -0
- package/esm/cli/parse-cli-args.js.map +1 -0
- package/esm/cli/start.d.ts +2 -0
- package/esm/cli/start.d.ts.map +1 -0
- package/esm/cli/start.js +2 -0
- package/esm/cli/start.js.map +1 -0
- package/esm/cli/string-similarity.d.ts +44 -0
- package/esm/cli/string-similarity.d.ts.map +1 -0
- package/esm/cli/string-similarity.js +57 -0
- package/esm/cli/string-similarity.js.map +1 -0
- package/esm/cli/types.d.ts +218 -0
- package/esm/cli/types.d.ts.map +1 -0
- package/esm/config/config-getter.d.ts +35 -0
- package/esm/config/config-getter.d.ts.map +1 -0
- package/esm/config/config-getter.js +21 -0
- package/esm/config/config-getter.js.map +1 -0
- package/esm/config/config-handlers.d.ts +7 -0
- package/esm/config/config-handlers.d.ts.map +1 -0
- package/esm/config/config-handlers.js +19 -0
- package/esm/config/config-handlers.js.map +1 -0
- package/esm/config/config-loader.d.ts +37 -0
- package/esm/config/config-loader.d.ts.map +1 -0
- package/esm/config/config-loader.js +85 -0
- package/esm/config/config-loader.js.map +1 -0
- package/esm/config/config-manager.d.ts +22 -0
- package/esm/config/config-manager.d.ts.map +1 -0
- package/esm/config/config-manager.js +25 -0
- package/esm/config/config-manager.js.map +1 -0
- package/esm/config/config-special-handlers.d.ts +17 -0
- package/esm/config/config-special-handlers.d.ts.map +1 -0
- package/esm/config/config-special-handlers.js +23 -0
- package/esm/config/config-special-handlers.js.map +1 -0
- package/esm/config/index.d.ts +5 -0
- package/esm/config/index.d.ts.map +1 -0
- package/esm/config/load-config-files.d.ts +6 -0
- package/esm/config/load-config-files.d.ts.map +1 -0
- package/esm/config/load-config-files.js +19 -0
- package/esm/config/load-config-files.js.map +1 -0
- package/esm/config/types.d.ts +52 -0
- package/esm/config/types.d.ts.map +1 -0
- package/esm/connectors/base-connector.d.ts +49 -0
- package/esm/connectors/base-connector.d.ts.map +1 -0
- package/esm/connectors/base-connector.js +48 -0
- package/esm/connectors/base-connector.js.map +1 -0
- package/esm/connectors/cache-connector.d.ts +23 -0
- package/esm/connectors/cache-connector.d.ts.map +1 -0
- package/esm/connectors/cache-connector.js +35 -0
- package/esm/connectors/cache-connector.js.map +1 -0
- package/esm/connectors/communicator-connector.d.ts +23 -0
- package/esm/connectors/communicator-connector.d.ts.map +1 -0
- package/esm/connectors/communicator-connector.js +62 -0
- package/esm/connectors/communicator-connector.js.map +1 -0
- package/esm/connectors/connectors-manager.d.ts +42 -0
- package/esm/connectors/connectors-manager.d.ts.map +1 -0
- package/esm/connectors/connectors-manager.js +93 -0
- package/esm/connectors/connectors-manager.js.map +1 -0
- package/esm/connectors/database-connector.d.ts +23 -0
- package/esm/connectors/database-connector.d.ts.map +1 -0
- package/esm/connectors/database-connector.js +51 -0
- package/esm/connectors/database-connector.js.map +1 -0
- package/esm/connectors/http-connector.d.ts +31 -0
- package/esm/connectors/http-connector.d.ts.map +1 -0
- package/esm/connectors/http-connector.js +83 -0
- package/esm/connectors/http-connector.js.map +1 -0
- package/esm/connectors/index.d.ts +15 -0
- package/esm/connectors/index.d.ts.map +1 -0
- package/esm/connectors/logger-connector.d.ts +23 -0
- package/esm/connectors/logger-connector.d.ts.map +1 -0
- package/esm/connectors/logger-connector.js +45 -0
- package/esm/connectors/logger-connector.js.map +1 -0
- package/esm/connectors/mail-connector.d.ts +23 -0
- package/esm/connectors/mail-connector.d.ts.map +1 -0
- package/esm/connectors/mail-connector.js +45 -0
- package/esm/connectors/mail-connector.js.map +1 -0
- package/esm/connectors/storage.connector.d.ts +23 -0
- package/esm/connectors/storage.connector.d.ts.map +1 -0
- package/esm/connectors/storage.connector.js +30 -0
- package/esm/connectors/storage.connector.js.map +1 -0
- package/esm/connectors/types.d.ts +54 -0
- package/esm/connectors/types.d.ts.map +1 -0
- package/esm/connectors/types.js +13 -0
- package/esm/connectors/types.js.map +1 -0
- package/esm/database/create-database-action.d.ts +3 -0
- package/esm/database/create-database-action.d.ts.map +1 -0
- package/esm/database/create-database-action.js +28 -0
- package/esm/database/create-database-action.js.map +1 -0
- package/esm/database/drop-tables-action.d.ts +3 -0
- package/esm/database/drop-tables-action.d.ts.map +1 -0
- package/esm/database/drop-tables-action.js +29 -0
- package/esm/database/drop-tables-action.js.map +1 -0
- package/esm/database/index.d.ts +4 -0
- package/esm/database/index.d.ts.map +1 -0
- package/esm/database/migrate-action.d.ts +8 -0
- package/esm/database/migrate-action.d.ts.map +1 -0
- package/esm/database/migrate-action.js +118 -0
- package/esm/database/migrate-action.js.map +1 -0
- package/esm/database/models/database-log/database-log.d.ts +16 -0
- package/esm/database/models/database-log/database-log.d.ts.map +1 -0
- package/esm/database/models/database-log/database-log.js +17 -0
- package/esm/database/models/database-log/database-log.js.map +1 -0
- package/esm/database/models/database-log/index.d.ts +2 -0
- package/esm/database/models/database-log/index.d.ts.map +1 -0
- package/esm/database/seed-command-action.d.ts +3 -0
- package/esm/database/seed-command-action.d.ts.map +1 -0
- package/esm/database/seed-command-action.js +36 -0
- package/esm/database/seed-command-action.js.map +1 -0
- package/esm/database/seeds/index.d.ts +3 -0
- package/esm/database/seeds/index.d.ts.map +1 -0
- package/esm/database/seeds/seeder.d.ts +40 -0
- package/esm/database/seeds/seeder.d.ts.map +1 -0
- package/esm/database/seeds/seeder.js +6 -0
- package/esm/database/seeds/seeder.js.map +1 -0
- package/esm/database/seeds/seeders.manager.d.ts +47 -0
- package/esm/database/seeds/seeders.manager.d.ts.map +1 -0
- package/esm/database/seeds/seeders.manager.js +144 -0
- package/esm/database/seeds/seeders.manager.js.map +1 -0
- package/esm/database/seeds/seeds-table-migration.d.ts +8 -0
- package/esm/database/seeds/seeds-table-migration.d.ts.map +1 -0
- package/esm/database/seeds/seeds-table-migration.js +18 -0
- package/esm/database/seeds/seeds-table-migration.js.map +1 -0
- package/esm/database/seeds/types.d.ts +13 -0
- package/esm/database/seeds/types.d.ts.map +1 -0
- package/esm/database/seeds/utils.d.ts +2 -0
- package/esm/database/seeds/utils.d.ts.map +1 -0
- package/esm/database/seeds/utils.js +1 -0
- package/esm/database/seeds/utils.js.map +1 -0
- package/esm/database/utils.d.ts +17 -0
- package/esm/database/utils.d.ts.map +1 -0
- package/esm/database/utils.js +30 -0
- package/esm/database/utils.js.map +1 -0
- package/esm/dev-server/create-worker.d.ts +34 -0
- package/esm/dev-server/create-worker.d.ts.map +1 -0
- package/esm/dev-server/create-worker.js +37 -0
- package/esm/dev-server/create-worker.js.map +1 -0
- package/esm/dev-server/dependency-graph.d.ts +102 -0
- package/esm/dev-server/dependency-graph.d.ts.map +1 -0
- package/esm/dev-server/dependency-graph.js +310 -0
- package/esm/dev-server/dependency-graph.js.map +1 -0
- package/esm/dev-server/dev-logger.d.ts +14 -0
- package/esm/dev-server/dev-logger.d.ts.map +1 -0
- package/esm/dev-server/dev-logger.js +130 -0
- package/esm/dev-server/dev-logger.js.map +1 -0
- package/esm/dev-server/development-server.d.ts +55 -0
- package/esm/dev-server/development-server.d.ts.map +1 -0
- package/esm/dev-server/development-server.js +199 -0
- package/esm/dev-server/development-server.js.map +1 -0
- package/esm/dev-server/events.d.ts +5 -0
- package/esm/dev-server/events.d.ts.map +1 -0
- package/esm/dev-server/events.js +4 -0
- package/esm/dev-server/events.js.map +1 -0
- package/esm/dev-server/export-analyzer.d.ts +84 -0
- package/esm/dev-server/export-analyzer.d.ts.map +1 -0
- package/esm/dev-server/export-analyzer.js +206 -0
- package/esm/dev-server/export-analyzer.js.map +1 -0
- package/esm/dev-server/file-event-handler.d.ts +156 -0
- package/esm/dev-server/file-event-handler.d.ts.map +1 -0
- package/esm/dev-server/file-event-handler.js +309 -0
- package/esm/dev-server/file-event-handler.js.map +1 -0
- package/esm/dev-server/file-manager.d.ts +394 -0
- package/esm/dev-server/file-manager.d.ts.map +1 -0
- package/esm/dev-server/file-manager.js +603 -0
- package/esm/dev-server/file-manager.js.map +1 -0
- package/esm/dev-server/file-operations.d.ts +203 -0
- package/esm/dev-server/file-operations.d.ts.map +1 -0
- package/esm/dev-server/file-operations.js +365 -0
- package/esm/dev-server/file-operations.js.map +1 -0
- package/esm/dev-server/files-orchestrator.d.ts +153 -0
- package/esm/dev-server/files-orchestrator.d.ts.map +1 -0
- package/esm/dev-server/files-orchestrator.js +349 -0
- package/esm/dev-server/files-orchestrator.js.map +1 -0
- package/esm/dev-server/files-watcher.d.ts +67 -0
- package/esm/dev-server/files-watcher.d.ts.map +1 -0
- package/esm/dev-server/files-watcher.js +121 -0
- package/esm/dev-server/files-watcher.js.map +1 -0
- package/esm/dev-server/flags.d.ts +10 -0
- package/esm/dev-server/flags.d.ts.map +1 -0
- package/esm/dev-server/flags.js +9 -0
- package/esm/dev-server/flags.js.map +1 -0
- package/esm/dev-server/health-checker/checkers/base-health-checker.d.ts +52 -0
- package/esm/dev-server/health-checker/checkers/base-health-checker.d.ts.map +1 -0
- package/esm/dev-server/health-checker/checkers/base-health-checker.js +71 -0
- package/esm/dev-server/health-checker/checkers/base-health-checker.js.map +1 -0
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.d.ts +40 -0
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.d.ts.map +1 -0
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.js +217 -0
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.js.map +1 -0
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.d.ts +56 -0
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.d.ts.map +1 -0
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.js +279 -0
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.js.map +1 -0
- package/esm/dev-server/health-checker/file-health-checker.contract.d.ts +59 -0
- package/esm/dev-server/health-checker/file-health-checker.contract.d.ts.map +1 -0
- package/esm/dev-server/health-checker/file-health-result.d.ts +68 -0
- package/esm/dev-server/health-checker/file-health-result.d.ts.map +1 -0
- package/esm/dev-server/health-checker/file-health-result.js +40 -0
- package/esm/dev-server/health-checker/file-health-result.js.map +1 -0
- package/esm/dev-server/health-checker/files-healthcare.manager.d.ts +115 -0
- package/esm/dev-server/health-checker/files-healthcare.manager.d.ts.map +1 -0
- package/esm/dev-server/health-checker/files-healthcare.manager.js +422 -0
- package/esm/dev-server/health-checker/files-healthcare.manager.js.map +1 -0
- package/esm/dev-server/health-checker/index.d.ts +6 -0
- package/esm/dev-server/health-checker/index.d.ts.map +1 -0
- package/esm/dev-server/health-checker/workers/eslint-health.worker.d.ts +2 -0
- package/esm/dev-server/health-checker/workers/eslint-health.worker.d.ts.map +1 -0
- package/esm/dev-server/health-checker/workers/eslint-health.worker.js +214 -0
- package/esm/dev-server/health-checker/workers/eslint-health.worker.js.map +1 -0
- package/esm/dev-server/health-checker/workers/ts-health.worker.d.ts +2 -0
- package/esm/dev-server/health-checker/workers/ts-health.worker.d.ts.map +1 -0
- package/esm/dev-server/health-checker/workers/ts-health.worker.js +261 -0
- package/esm/dev-server/health-checker/workers/ts-health.worker.js.map +1 -0
- package/esm/dev-server/import-deduplicator.d.ts +75 -0
- package/esm/dev-server/import-deduplicator.d.ts.map +1 -0
- package/esm/dev-server/import-deduplicator.js +288 -0
- package/esm/dev-server/import-deduplicator.js.map +1 -0
- package/esm/dev-server/import-deduplicator.test.d.ts +7 -0
- package/esm/dev-server/import-deduplicator.test.d.ts.map +1 -0
- package/esm/dev-server/import-transformer.d.ts +17 -0
- package/esm/dev-server/import-transformer.d.ts.map +1 -0
- package/esm/dev-server/import-transformer.js +221 -0
- package/esm/dev-server/import-transformer.js.map +1 -0
- package/esm/dev-server/index.d.ts +1 -0
- package/esm/dev-server/index.d.ts.map +1 -0
- package/esm/dev-server/layer-executor.d.ts +64 -0
- package/esm/dev-server/layer-executor.d.ts.map +1 -0
- package/esm/dev-server/layer-executor.js +338 -0
- package/esm/dev-server/layer-executor.js.map +1 -0
- package/esm/dev-server/manifest-manager.d.ts +80 -0
- package/esm/dev-server/manifest-manager.d.ts.map +1 -0
- package/esm/dev-server/manifest-manager.js +107 -0
- package/esm/dev-server/manifest-manager.js.map +1 -0
- package/esm/dev-server/module-loader.d.ts +111 -0
- package/esm/dev-server/module-loader.d.ts.map +1 -0
- package/esm/dev-server/module-loader.js +276 -0
- package/esm/dev-server/module-loader.js.map +1 -0
- package/esm/dev-server/package-json-manager.d.ts +16 -0
- package/esm/dev-server/package-json-manager.d.ts.map +1 -0
- package/esm/dev-server/package-json-manager.js +20 -0
- package/esm/dev-server/package-json-manager.js.map +1 -0
- package/esm/dev-server/parse-imports.d.ts +34 -0
- package/esm/dev-server/parse-imports.d.ts.map +1 -0
- package/esm/dev-server/parse-imports.js +426 -0
- package/esm/dev-server/parse-imports.js.map +1 -0
- package/esm/dev-server/path.d.ts +39 -0
- package/esm/dev-server/path.d.ts.map +1 -0
- package/esm/dev-server/path.js +56 -0
- package/esm/dev-server/path.js.map +1 -0
- package/esm/dev-server/runtime-import-helper.d.ts +8 -0
- package/esm/dev-server/runtime-import-helper.d.ts.map +1 -0
- package/esm/dev-server/runtime-import-helper.js +158 -0
- package/esm/dev-server/runtime-import-helper.js.map +1 -0
- package/esm/dev-server/special-files-collector.d.ts +114 -0
- package/esm/dev-server/special-files-collector.d.ts.map +1 -0
- package/esm/dev-server/special-files-collector.js +212 -0
- package/esm/dev-server/special-files-collector.js.map +1 -0
- package/esm/dev-server/start-development-server.d.ts +7 -0
- package/esm/dev-server/start-development-server.d.ts.map +1 -0
- package/esm/dev-server/start-development-server.js +21 -0
- package/esm/dev-server/start-development-server.js.map +1 -0
- package/esm/dev-server/transpile-file.d.ts +11 -0
- package/esm/dev-server/transpile-file.d.ts.map +1 -0
- package/esm/dev-server/transpile-file.js +30 -0
- package/esm/dev-server/transpile-file.js.map +1 -0
- package/esm/dev-server/tsconfig-manager.d.ts +45 -0
- package/esm/dev-server/tsconfig-manager.d.ts.map +1 -0
- package/esm/dev-server/tsconfig-manager.js +107 -0
- package/esm/dev-server/tsconfig-manager.js.map +1 -0
- package/esm/dev-server/type-generator.d.ts +115 -0
- package/esm/dev-server/type-generator.d.ts.map +1 -0
- package/esm/dev-server/type-generator.js +566 -0
- package/esm/dev-server/type-generator.js.map +1 -0
- package/esm/dev-server/types.d.ts +30 -0
- package/esm/dev-server/types.d.ts.map +1 -0
- package/esm/dev-server/utils.d.ts +15 -0
- package/esm/dev-server/utils.d.ts.map +1 -0
- package/esm/dev-server/utils.js +41 -0
- package/esm/dev-server/utils.js.map +1 -0
- package/esm/encryption/encrypt.d.ts +23 -0
- package/esm/encryption/encrypt.d.ts.map +1 -0
- package/esm/encryption/encrypt.js +85 -0
- package/esm/encryption/encrypt.js.map +1 -0
- package/esm/encryption/hash.d.ts +17 -0
- package/esm/encryption/hash.d.ts.map +1 -0
- package/esm/encryption/hash.js +26 -0
- package/esm/encryption/hash.js.map +1 -0
- package/esm/encryption/index.d.ts +5 -0
- package/esm/encryption/index.d.ts.map +1 -0
- package/esm/encryption/password.d.ts +23 -0
- package/esm/encryption/password.d.ts.map +1 -0
- package/esm/encryption/password.js +72 -0
- package/esm/encryption/password.js.map +1 -0
- package/esm/encryption/types.d.ts +51 -0
- package/esm/encryption/types.d.ts.map +1 -0
- package/esm/generations/add-command.action.d.ts +3 -0
- package/esm/generations/add-command.action.d.ts.map +1 -0
- package/esm/generations/add-command.action.js +382 -0
- package/esm/generations/add-command.action.js.map +1 -0
- package/esm/generations/stubs.d.ts +2 -0
- package/esm/generations/stubs.d.ts.map +1 -0
- package/esm/generations/stubs.js +81 -0
- package/esm/generations/stubs.js.map +1 -0
- package/esm/http/config.d.ts +10 -0
- package/esm/http/config.d.ts.map +1 -0
- package/esm/http/config.js +22 -0
- package/esm/http/config.js.map +1 -0
- package/esm/http/context/request-context.d.ts +47 -0
- package/esm/http/context/request-context.d.ts.map +1 -0
- package/esm/http/context/request-context.js +52 -0
- package/esm/http/context/request-context.js.map +1 -0
- package/esm/http/createHttpApplication.d.ts +3 -0
- package/esm/http/createHttpApplication.d.ts.map +1 -0
- package/esm/http/createHttpApplication.js +28 -0
- package/esm/http/createHttpApplication.js.map +1 -0
- package/esm/http/database/RequestLog.d.ts +16 -0
- package/esm/http/database/RequestLog.d.ts.map +1 -0
- package/esm/http/database/RequestLog.js +26 -0
- package/esm/http/database/RequestLog.js.map +1 -0
- package/esm/http/errors/errors.d.ts +39 -0
- package/esm/http/errors/errors.d.ts.map +1 -0
- package/esm/http/errors/errors.js +76 -0
- package/esm/http/errors/errors.js.map +1 -0
- package/esm/http/errors/index.d.ts +2 -0
- package/esm/http/errors/index.d.ts.map +1 -0
- package/esm/http/events.d.ts +4 -0
- package/esm/http/events.d.ts.map +1 -0
- package/esm/http/events.js +26 -0
- package/esm/http/events.js.map +1 -0
- package/esm/http/index.d.ts +17 -0
- package/esm/http/index.d.ts.map +1 -0
- package/esm/http/middleware/cache-response-middleware.d.ts +34 -0
- package/esm/http/middleware/cache-response-middleware.d.ts.map +1 -0
- package/esm/http/middleware/cache-response-middleware.js +45 -0
- package/esm/http/middleware/cache-response-middleware.js.map +1 -0
- package/esm/http/middleware/index.d.ts +3 -0
- package/esm/http/middleware/index.d.ts.map +1 -0
- package/esm/http/middleware/inject-request-context.d.ts +21 -0
- package/esm/http/middleware/inject-request-context.d.ts.map +1 -0
- package/esm/http/middleware/inject-request-context.js +119 -0
- package/esm/http/middleware/inject-request-context.js.map +1 -0
- package/esm/http/plugins.d.ts +3 -0
- package/esm/http/plugins.d.ts.map +1 -0
- package/esm/http/plugins.js +36 -0
- package/esm/http/plugins.js.map +1 -0
- package/esm/http/request-controller.d.ts +11 -0
- package/esm/http/request-controller.d.ts.map +1 -0
- package/esm/http/request-controller.js +9 -0
- package/esm/http/request-controller.js.map +1 -0
- package/esm/http/request.d.ts +400 -0
- package/esm/http/request.d.ts.map +1 -0
- package/esm/http/request.js +766 -0
- package/esm/http/request.js.map +1 -0
- package/esm/http/response.d.ts +374 -0
- package/esm/http/response.d.ts.map +1 -0
- package/esm/http/response.js +974 -0
- package/esm/http/response.js.map +1 -0
- package/esm/http/server.d.ts +8 -0
- package/esm/http/server.d.ts.map +1 -0
- package/esm/http/server.js +15 -0
- package/esm/http/server.js.map +1 -0
- package/esm/http/types.d.ts +230 -0
- package/esm/http/types.d.ts.map +1 -0
- package/esm/http/uploaded-file.d.ts +459 -0
- package/esm/http/uploaded-file.d.ts.map +1 -0
- package/esm/http/uploaded-file.js +709 -0
- package/esm/http/uploaded-file.js.map +1 -0
- package/esm/http/uploads-config.d.ts +26 -0
- package/esm/http/uploads-config.d.ts.map +1 -0
- package/esm/http/uploads-config.js +35 -0
- package/esm/http/uploads-config.js.map +1 -0
- package/esm/http/uploads-types.d.ts +236 -0
- package/esm/http/uploads-types.d.ts.map +1 -0
- package/esm/image/image.d.ts +388 -0
- package/esm/image/image.d.ts.map +1 -0
- package/esm/image/image.js +602 -0
- package/esm/image/image.js.map +1 -0
- package/esm/image/index.d.ts +2 -0
- package/esm/image/index.d.ts.map +1 -0
- package/esm/index.d.ts +34 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -0
- package/esm/logger/index.d.ts +3 -0
- package/esm/logger/index.d.ts.map +1 -0
- package/esm/logger/logger.d.ts +3 -0
- package/esm/logger/logger.d.ts.map +1 -0
- package/esm/logger/logger.js +16 -0
- package/esm/logger/logger.js.map +1 -0
- package/esm/logger/types.d.ts +39 -0
- package/esm/logger/types.d.ts.map +1 -0
- package/esm/mail/config.d.ts +80 -0
- package/esm/mail/config.d.ts.map +1 -0
- package/esm/mail/config.js +158 -0
- package/esm/mail/config.js.map +1 -0
- package/esm/mail/events.d.ts +96 -0
- package/esm/mail/events.d.ts.map +1 -0
- package/esm/mail/events.js +123 -0
- package/esm/mail/events.js.map +1 -0
- package/esm/mail/index.d.ts +10 -0
- package/esm/mail/index.d.ts.map +1 -0
- package/esm/mail/mail.d.ts +175 -0
- package/esm/mail/mail.d.ts.map +1 -0
- package/esm/mail/mail.js +286 -0
- package/esm/mail/mail.js.map +1 -0
- package/esm/mail/mailer-pool.d.ts +27 -0
- package/esm/mail/mailer-pool.d.ts.map +1 -0
- package/esm/mail/mailer-pool.js +215 -0
- package/esm/mail/mailer-pool.js.map +1 -0
- package/esm/mail/react-mail.d.ts +12 -0
- package/esm/mail/react-mail.d.ts.map +1 -0
- package/esm/mail/react-mail.js +40 -0
- package/esm/mail/react-mail.js.map +1 -0
- package/esm/mail/send-mail.d.ts +33 -0
- package/esm/mail/send-mail.d.ts.map +1 -0
- package/esm/mail/send-mail.js +313 -0
- package/esm/mail/send-mail.js.map +1 -0
- package/esm/mail/test-mailbox.d.ts +110 -0
- package/esm/mail/test-mailbox.d.ts.map +1 -0
- package/esm/mail/test-mailbox.js +143 -0
- package/esm/mail/test-mailbox.js.map +1 -0
- package/esm/mail/types.d.ts +264 -0
- package/esm/mail/types.d.ts.map +1 -0
- package/esm/mail/types.js +13 -0
- package/esm/mail/types.js.map +1 -0
- package/esm/manifest/manifest-manager.d.ts +74 -0
- package/esm/manifest/manifest-manager.d.ts.map +1 -0
- package/esm/manifest/manifest-manager.js +88 -0
- package/esm/manifest/manifest-manager.js.map +1 -0
- package/esm/production/build-app-production.d.ts +6 -0
- package/esm/production/build-app-production.d.ts.map +1 -0
- package/esm/production/build-app-production.js +8 -0
- package/esm/production/build-app-production.js.map +1 -0
- package/esm/production/esbuild-plugins.d.ts +5 -0
- package/esm/production/esbuild-plugins.d.ts.map +1 -0
- package/esm/production/esbuild-plugins.js +23 -0
- package/esm/production/esbuild-plugins.js.map +1 -0
- package/esm/production/production-builder.d.ts +76 -0
- package/esm/production/production-builder.d.ts.map +1 -0
- package/esm/production/production-builder.js +254 -0
- package/esm/production/production-builder.js.map +1 -0
- package/esm/react/index.d.ts +14 -0
- package/esm/react/index.d.ts.map +1 -0
- package/esm/react/index.js +65 -0
- package/esm/react/index.js.map +1 -0
- package/esm/repositories/adapters/cascade/cascade-adapter.d.ts +85 -0
- package/esm/repositories/adapters/cascade/cascade-adapter.d.ts.map +1 -0
- package/esm/repositories/adapters/cascade/cascade-adapter.js +179 -0
- package/esm/repositories/adapters/cascade/cascade-adapter.js.map +1 -0
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.ts +141 -0
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.ts.map +1 -0
- package/esm/repositories/adapters/cascade/cascade-query-builder.js +281 -0
- package/esm/repositories/adapters/cascade/cascade-query-builder.js.map +1 -0
- package/esm/repositories/adapters/cascade/filter-applicator.d.ts +126 -0
- package/esm/repositories/adapters/cascade/filter-applicator.d.ts.map +1 -0
- package/esm/repositories/adapters/cascade/filter-applicator.js +549 -0
- package/esm/repositories/adapters/cascade/filter-applicator.js.map +1 -0
- package/esm/repositories/adapters/cascade/index.d.ts +7 -0
- package/esm/repositories/adapters/cascade/index.d.ts.map +1 -0
- package/esm/repositories/contracts/index.d.ts +8 -0
- package/esm/repositories/contracts/index.d.ts.map +1 -0
- package/esm/repositories/contracts/query-builder.contract.d.ts +320 -0
- package/esm/repositories/contracts/query-builder.contract.d.ts.map +1 -0
- package/esm/repositories/contracts/repository-adapter.contract.d.ts +183 -0
- package/esm/repositories/contracts/repository-adapter.contract.d.ts.map +1 -0
- package/esm/repositories/contracts/types.d.ts +328 -0
- package/esm/repositories/contracts/types.d.ts.map +1 -0
- package/esm/repositories/index.d.ts +8 -0
- package/esm/repositories/index.d.ts.map +1 -0
- package/esm/repositories/repository.manager.d.ts +694 -0
- package/esm/repositories/repository.manager.d.ts.map +1 -0
- package/esm/repositories/repository.manager.js +1123 -0
- package/esm/repositories/repository.manager.js.map +1 -0
- package/esm/resource/define-resource.d.ts +65 -0
- package/esm/resource/define-resource.d.ts.map +1 -0
- package/esm/resource/define-resource.js +62 -0
- package/esm/resource/define-resource.js.map +1 -0
- package/esm/resource/index.d.ts +6 -0
- package/esm/resource/index.d.ts.map +1 -0
- package/esm/resource/register-resource.d.ts +21 -0
- package/esm/resource/register-resource.d.ts.map +1 -0
- package/esm/resource/register-resource.js +23 -0
- package/esm/resource/register-resource.js.map +1 -0
- package/esm/resource/resource-field-builder.d.ts +104 -0
- package/esm/resource/resource-field-builder.d.ts.map +1 -0
- package/esm/resource/resource-field-builder.js +260 -0
- package/esm/resource/resource-field-builder.js.map +1 -0
- package/esm/resource/resource.d.ts +217 -0
- package/esm/resource/resource.d.ts.map +1 -0
- package/esm/resource/resource.js +307 -0
- package/esm/resource/resource.js.map +1 -0
- package/esm/resource/types.d.ts +74 -0
- package/esm/resource/types.d.ts.map +1 -0
- package/esm/restful/index.d.ts +2 -0
- package/esm/restful/index.d.ts.map +1 -0
- package/esm/restful/restful.d.ts +110 -0
- package/esm/restful/restful.d.ts.map +1 -0
- package/esm/restful/restful.js +317 -0
- package/esm/restful/restful.js.map +1 -0
- package/esm/retry/index.d.ts +3 -0
- package/esm/retry/index.d.ts.map +1 -0
- package/esm/retry/retry.d.ts +21 -0
- package/esm/retry/retry.d.ts.map +1 -0
- package/esm/retry/retry.js +39 -0
- package/esm/retry/retry.js.map +1 -0
- package/esm/retry/types.d.ts +27 -0
- package/esm/retry/types.d.ts.map +1 -0
- package/esm/router/index.d.ts +3 -0
- package/esm/router/index.d.ts.map +1 -0
- package/esm/router/route-builder.d.ts +120 -0
- package/esm/router/route-builder.d.ts.map +1 -0
- package/esm/router/route-builder.js +201 -0
- package/esm/router/route-builder.js.map +1 -0
- package/esm/router/route-registry.d.ts +30 -0
- package/esm/router/route-registry.d.ts.map +1 -0
- package/esm/router/route-registry.js +67 -0
- package/esm/router/route-registry.js.map +1 -0
- package/esm/router/route.d.ts +34 -0
- package/esm/router/route.d.ts.map +1 -0
- package/esm/router/router.d.ts +188 -0
- package/esm/router/router.d.ts.map +1 -0
- package/esm/router/router.js +605 -0
- package/esm/router/router.js.map +1 -0
- package/esm/router/types.d.ts +254 -0
- package/esm/router/types.d.ts.map +1 -0
- package/esm/storage/config.d.ts +15 -0
- package/esm/storage/config.d.ts.map +1 -0
- package/esm/storage/config.js +32 -0
- package/esm/storage/config.js.map +1 -0
- package/esm/storage/context/storage-driver-context.d.ts +69 -0
- package/esm/storage/context/storage-driver-context.d.ts.map +1 -0
- package/esm/storage/context/storage-driver-context.js +80 -0
- package/esm/storage/context/storage-driver-context.js.map +1 -0
- package/esm/storage/drivers/cloud-driver.d.ts +206 -0
- package/esm/storage/drivers/cloud-driver.d.ts.map +1 -0
- package/esm/storage/drivers/cloud-driver.js +721 -0
- package/esm/storage/drivers/cloud-driver.js.map +1 -0
- package/esm/storage/drivers/do-spaces-driver.d.ts +43 -0
- package/esm/storage/drivers/do-spaces-driver.d.ts.map +1 -0
- package/esm/storage/drivers/do-spaces-driver.js +50 -0
- package/esm/storage/drivers/do-spaces-driver.js.map +1 -0
- package/esm/storage/drivers/local-driver.d.ts +151 -0
- package/esm/storage/drivers/local-driver.d.ts.map +1 -0
- package/esm/storage/drivers/local-driver.js +448 -0
- package/esm/storage/drivers/local-driver.js.map +1 -0
- package/esm/storage/drivers/r2-driver.d.ts +47 -0
- package/esm/storage/drivers/r2-driver.d.ts.map +1 -0
- package/esm/storage/drivers/r2-driver.js +60 -0
- package/esm/storage/drivers/r2-driver.js.map +1 -0
- package/esm/storage/drivers/s3-driver.d.ts +32 -0
- package/esm/storage/drivers/s3-driver.d.ts.map +1 -0
- package/esm/storage/drivers/s3-driver.js +37 -0
- package/esm/storage/drivers/s3-driver.js.map +1 -0
- package/esm/storage/index.d.ts +13 -0
- package/esm/storage/index.d.ts.map +1 -0
- package/esm/storage/scoped-storage.d.ts +547 -0
- package/esm/storage/scoped-storage.d.ts.map +1 -0
- package/esm/storage/scoped-storage.js +739 -0
- package/esm/storage/scoped-storage.js.map +1 -0
- package/esm/storage/storage-file.d.ts +222 -0
- package/esm/storage/storage-file.d.ts.map +1 -0
- package/esm/storage/storage-file.js +376 -0
- package/esm/storage/storage-file.js.map +1 -0
- package/esm/storage/storage.d.ts +583 -0
- package/esm/storage/storage.d.ts.map +1 -0
- package/esm/storage/storage.js +948 -0
- package/esm/storage/storage.js.map +1 -0
- package/esm/storage/types.d.ts +966 -0
- package/esm/storage/types.d.ts.map +1 -0
- package/esm/storage/utils/mime.d.ts +33 -0
- package/esm/storage/utils/mime.d.ts.map +1 -0
- package/esm/storage/utils/mime.js +45 -0
- package/esm/storage/utils/mime.js.map +1 -0
- package/esm/tests/index.d.ts +9 -0
- package/esm/tests/index.d.ts.map +1 -0
- package/esm/tests/start-http-development-server.d.ts +15 -0
- package/esm/tests/start-http-development-server.d.ts.map +1 -0
- package/esm/tests/start-http-development-server.js +69 -0
- package/esm/tests/start-http-development-server.js.map +1 -0
- package/esm/tests/test-helpers.d.ts +43 -0
- package/esm/tests/test-helpers.d.ts.map +1 -0
- package/esm/tests/test-helpers.js +86 -0
- package/esm/tests/test-helpers.js.map +1 -0
- package/esm/tests/vitest-setup.d.ts +10 -0
- package/esm/tests/vitest-setup.d.ts.map +1 -0
- package/esm/tests/vitest-setup.js +36 -0
- package/esm/tests/vitest-setup.js.map +1 -0
- package/esm/use-cases/index.d.ts +7 -0
- package/esm/use-cases/index.d.ts.map +1 -0
- package/esm/use-cases/types.d.ts +267 -0
- package/esm/use-cases/types.d.ts.map +1 -0
- package/esm/use-cases/use-case-events.d.ts +33 -0
- package/esm/use-cases/use-case-events.d.ts.map +1 -0
- package/esm/use-cases/use-case-events.js +65 -0
- package/esm/use-cases/use-case-events.js.map +1 -0
- package/esm/use-cases/use-case-pipeline.d.ts +29 -0
- package/esm/use-cases/use-case-pipeline.d.ts.map +1 -0
- package/esm/use-cases/use-case-pipeline.js +45 -0
- package/esm/use-cases/use-case-pipeline.js.map +1 -0
- package/esm/use-cases/use-case.d.ts +27 -0
- package/esm/use-cases/use-case.d.ts.map +1 -0
- package/esm/use-cases/use-case.errors.d.ts +6 -0
- package/esm/use-cases/use-case.errors.d.ts.map +1 -0
- package/esm/use-cases/use-case.errors.js +8 -0
- package/esm/use-cases/use-case.errors.js.map +1 -0
- package/esm/use-cases/use-case.js +138 -0
- package/esm/use-cases/use-case.js.map +1 -0
- package/esm/use-cases/use-cases-registry.d.ts +38 -0
- package/esm/use-cases/use-cases-registry.d.ts.map +1 -0
- package/esm/use-cases/use-cases-registry.js +92 -0
- package/esm/use-cases/use-cases-registry.js.map +1 -0
- package/esm/utils/app-log.d.ts +8 -0
- package/esm/utils/app-log.d.ts.map +1 -0
- package/esm/utils/app-log.js +7 -0
- package/esm/utils/app-log.js.map +1 -0
- package/esm/utils/cleanup-temp-files.d.ts +5 -0
- package/esm/utils/cleanup-temp-files.d.ts.map +1 -0
- package/esm/utils/database-log.d.ts +25 -0
- package/esm/utils/database-log.d.ts.map +1 -0
- package/esm/utils/database-log.js +43 -0
- package/esm/utils/database-log.js.map +1 -0
- package/esm/utils/download-file.d.ts +3 -0
- package/esm/utils/download-file.d.ts.map +1 -0
- package/esm/utils/environment.d.ts +4 -0
- package/esm/utils/environment.d.ts.map +1 -0
- package/esm/utils/environment.js +6 -0
- package/esm/utils/environment.js.map +1 -0
- package/esm/utils/framework-vesion.d.ts +6 -0
- package/esm/utils/framework-vesion.d.ts.map +1 -0
- package/esm/utils/framework-vesion.js +18 -0
- package/esm/utils/framework-vesion.js.map +1 -0
- package/esm/utils/get-localized.d.ts +10 -0
- package/esm/utils/get-localized.d.ts.map +1 -0
- package/esm/utils/get-localized.js +15 -0
- package/esm/utils/get-localized.js.map +1 -0
- package/esm/utils/index.d.ts +12 -0
- package/esm/utils/index.d.ts.map +1 -0
- package/esm/utils/internal.d.ts +4 -0
- package/esm/utils/internal.d.ts.map +1 -0
- package/esm/utils/paths.d.ts +55 -0
- package/esm/utils/paths.d.ts.map +1 -0
- package/esm/utils/paths.js +89 -0
- package/esm/utils/paths.js.map +1 -0
- package/esm/utils/promise-all-object.d.ts +8 -0
- package/esm/utils/promise-all-object.d.ts.map +1 -0
- package/esm/utils/promise-all-object.js +12 -0
- package/esm/utils/promise-all-object.js.map +1 -0
- package/esm/utils/queue.d.ts +49 -0
- package/esm/utils/queue.d.ts.map +1 -0
- package/esm/utils/queue.js +89 -0
- package/esm/utils/queue.js.map +1 -0
- package/esm/utils/sleep.d.ts +2 -0
- package/esm/utils/sleep.d.ts.map +1 -0
- package/esm/utils/sleep.js +3 -0
- package/esm/utils/sleep.js.map +1 -0
- package/esm/utils/sluggable.d.ts +5 -0
- package/esm/utils/sluggable.d.ts.map +1 -0
- package/esm/utils/sluggable.js +15 -0
- package/esm/utils/sluggable.js.map +1 -0
- package/esm/utils/to-json.d.ts +2 -0
- package/esm/utils/to-json.d.ts.map +1 -0
- package/esm/utils/to-json.js +26 -0
- package/esm/utils/to-json.js.map +1 -0
- package/esm/utils/types.d.ts +22 -0
- package/esm/utils/types.d.ts.map +1 -0
- package/esm/utils/urls.d.ts +21 -0
- package/esm/utils/urls.d.ts.map +1 -0
- package/esm/utils/urls.js +31 -0
- package/esm/utils/urls.js.map +1 -0
- package/esm/validation/database/exists-except-current-id.d.ts +7 -0
- package/esm/validation/database/exists-except-current-id.d.ts.map +1 -0
- package/esm/validation/database/exists-except-current-id.js +24 -0
- package/esm/validation/database/exists-except-current-id.js.map +1 -0
- package/esm/validation/database/exists-except-current-user.d.ts +7 -0
- package/esm/validation/database/exists-except-current-user.d.ts.map +1 -0
- package/esm/validation/database/exists-except-current-user.js +26 -0
- package/esm/validation/database/exists-except-current-user.js.map +1 -0
- package/esm/validation/database/exists.d.ts +7 -0
- package/esm/validation/database/exists.d.ts.map +1 -0
- package/esm/validation/database/exists.js +22 -0
- package/esm/validation/database/exists.js.map +1 -0
- package/esm/validation/database/index.d.ts +12 -0
- package/esm/validation/database/index.d.ts.map +1 -0
- package/esm/validation/database/types.d.ts +68 -0
- package/esm/validation/database/types.d.ts.map +1 -0
- package/esm/validation/database/unique-except-current-id.d.ts +7 -0
- package/esm/validation/database/unique-except-current-id.d.ts.map +1 -0
- package/esm/validation/database/unique-except-current-id.js +24 -0
- package/esm/validation/database/unique-except-current-id.js.map +1 -0
- package/esm/validation/database/unique-except-current-user.d.ts +7 -0
- package/esm/validation/database/unique-except-current-user.d.ts.map +1 -0
- package/esm/validation/database/unique-except-current-user.js +29 -0
- package/esm/validation/database/unique-except-current-user.js.map +1 -0
- package/esm/validation/database/unique.d.ts +7 -0
- package/esm/validation/database/unique.d.ts.map +1 -0
- package/esm/validation/database/unique.js +31 -0
- package/esm/validation/database/unique.js.map +1 -0
- package/esm/validation/file/file.d.ts +22 -0
- package/esm/validation/file/file.d.ts.map +1 -0
- package/esm/validation/file/file.js +60 -0
- package/esm/validation/file/file.js.map +1 -0
- package/esm/validation/file/index.d.ts +6 -0
- package/esm/validation/file/index.d.ts.map +1 -0
- package/esm/validation/index.d.ts +16 -0
- package/esm/validation/index.d.ts.map +1 -0
- package/esm/validation/init.d.ts +7 -0
- package/esm/validation/init.d.ts.map +1 -0
- package/esm/validation/init.js +36 -0
- package/esm/validation/init.js.map +1 -0
- package/esm/validation/plugins/database-plugin.d.ts +14 -0
- package/esm/validation/plugins/database-plugin.d.ts.map +1 -0
- package/esm/validation/plugins/database-plugin.js +83 -0
- package/esm/validation/plugins/database-plugin.js.map +1 -0
- package/esm/validation/plugins/file-plugin.d.ts +11 -0
- package/esm/validation/plugins/file-plugin.d.ts.map +1 -0
- package/esm/validation/plugins/file-plugin.js +17 -0
- package/esm/validation/plugins/file-plugin.js.map +1 -0
- package/esm/validation/plugins/index.d.ts +9 -0
- package/esm/validation/plugins/index.d.ts.map +1 -0
- package/esm/validation/plugins/localized-plugin.d.ts +11 -0
- package/esm/validation/plugins/localized-plugin.d.ts.map +1 -0
- package/esm/validation/plugins/localized-plugin.js +19 -0
- package/esm/validation/plugins/localized-plugin.js.map +1 -0
- package/esm/validation/types.d.ts +87 -0
- package/esm/validation/types.d.ts.map +1 -0
- package/esm/validation/validateAll.d.ts +7 -0
- package/esm/validation/validateAll.d.ts.map +1 -0
- package/esm/validation/validateAll.js +60 -0
- package/esm/validation/validateAll.js.map +1 -0
- package/esm/validation/validators/file-validator.d.ts +62 -0
- package/esm/validation/validators/file-validator.d.ts.map +1 -0
- package/esm/validation/validators/file-validator.js +136 -0
- package/esm/validation/validators/file-validator.js.map +1 -0
- package/esm/validation/validators/index.d.ts +7 -0
- package/esm/validation/validators/index.d.ts.map +1 -0
- package/esm/warlock-config/default-configurations.d.ts +3 -0
- package/esm/warlock-config/default-configurations.d.ts.map +1 -0
- package/esm/warlock-config/default-configurations.js +8 -0
- package/esm/warlock-config/default-configurations.js.map +1 -0
- package/esm/warlock-config/define-config.d.ts +3 -0
- package/esm/warlock-config/define-config.d.ts.map +1 -0
- package/esm/warlock-config/define-config.js +3 -0
- package/esm/warlock-config/define-config.js.map +1 -0
- package/esm/warlock-config/index.d.ts +4 -0
- package/esm/warlock-config/index.d.ts.map +1 -0
- package/esm/warlock-config/types.d.ts +129 -0
- package/esm/warlock-config/types.d.ts.map +1 -0
- package/esm/warlock-config/warlock-config.manager.d.ts +83 -0
- package/esm/warlock-config/warlock-config.manager.d.ts.map +1 -0
- package/esm/warlock-config/warlock-config.manager.js +141 -0
- package/esm/warlock-config/warlock-config.manager.js.map +1 -0
- package/package.json +7 -7
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import type { GenericObject } from "@mongez/reinforcements";
|
|
2
|
+
import type { ObjectValidator } from "@warlock.js/seal";
|
|
3
|
+
import type { RouteShorthandOptions } from "fastify";
|
|
4
|
+
import type { Request, Response, ReturnedResponse } from "../http";
|
|
5
|
+
import type { ResponseSchema } from "../resource/types";
|
|
6
|
+
/**
|
|
7
|
+
* Middleware response
|
|
8
|
+
*/
|
|
9
|
+
export type MiddlewareResponse = ReturnedResponse | undefined | void;
|
|
10
|
+
/**
|
|
11
|
+
* Middleware method
|
|
12
|
+
* Receives the request and response objects
|
|
13
|
+
* And returns a response object or undefined if the request should continue
|
|
14
|
+
*/
|
|
15
|
+
export type Middleware<MiddlewareRequest extends Request = Request> = {
|
|
16
|
+
(request: MiddlewareRequest, response: Response): MiddlewareResponse;
|
|
17
|
+
};
|
|
18
|
+
export type RouterGroupCallback = () => void;
|
|
19
|
+
export type RequestHandlerType = RequestHandler<any> | [GenericObject, string];
|
|
20
|
+
/**
|
|
21
|
+
* Resource standard methods
|
|
22
|
+
*/
|
|
23
|
+
export type ResourceMethod = "list" | "get" | "create" | "update" | "delete" | "patch";
|
|
24
|
+
export type RestfulMiddleware = Record<string, [Middleware]>;
|
|
25
|
+
export type RequestHandlerValidation<TRequest extends Request = Request> = {
|
|
26
|
+
/**
|
|
27
|
+
* Validation custom message
|
|
28
|
+
*/
|
|
29
|
+
validate?: Middleware<TRequest>;
|
|
30
|
+
/**
|
|
31
|
+
* Define what should be validated
|
|
32
|
+
* If not passed, it will be validating only body and query
|
|
33
|
+
*/
|
|
34
|
+
validating?: ("body" | "query" | "params" | "headers")[];
|
|
35
|
+
/**
|
|
36
|
+
* Validation schema
|
|
37
|
+
*/
|
|
38
|
+
schema?: ObjectValidator;
|
|
39
|
+
};
|
|
40
|
+
export interface RequestControllerContract {
|
|
41
|
+
/**
|
|
42
|
+
* Request object
|
|
43
|
+
*/
|
|
44
|
+
request: Request;
|
|
45
|
+
/**
|
|
46
|
+
* Response object
|
|
47
|
+
*/
|
|
48
|
+
response: Response;
|
|
49
|
+
/**
|
|
50
|
+
* Request Handler execution
|
|
51
|
+
*/
|
|
52
|
+
execute(): Promise<ReturnedResponse>;
|
|
53
|
+
/**
|
|
54
|
+
* Request description
|
|
55
|
+
*/
|
|
56
|
+
description?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Request validation middleware
|
|
59
|
+
*/
|
|
60
|
+
middleware?: () => Promise<MiddlewareResponse> | MiddlewareResponse;
|
|
61
|
+
}
|
|
62
|
+
export type RequestHandler<TRequest extends Request = Request> = {
|
|
63
|
+
/**
|
|
64
|
+
* Function Declaration
|
|
65
|
+
*/
|
|
66
|
+
(request: TRequest, response: Response): ReturnedResponse | void;
|
|
67
|
+
/**
|
|
68
|
+
* Validation static object property which can be optional
|
|
69
|
+
*/
|
|
70
|
+
validation?: RequestHandlerValidation<TRequest>;
|
|
71
|
+
/**
|
|
72
|
+
* Request Handler Description
|
|
73
|
+
*/
|
|
74
|
+
description?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Response schema for documentation / OpenAPI generation.
|
|
77
|
+
* Keyed by HTTP status code. Each entry declares the expected response body shape.
|
|
78
|
+
*/
|
|
79
|
+
responseSchema?: ResponseSchema;
|
|
80
|
+
};
|
|
81
|
+
export interface RouteOptions {
|
|
82
|
+
/**
|
|
83
|
+
* Route middleware
|
|
84
|
+
*/
|
|
85
|
+
middleware?: Middleware[];
|
|
86
|
+
/**
|
|
87
|
+
* Middleware precedence to be applied before grouped middleware or after it
|
|
88
|
+
*/
|
|
89
|
+
middlewarePrecedence?: "before" | "after";
|
|
90
|
+
/**
|
|
91
|
+
* Route name
|
|
92
|
+
*/
|
|
93
|
+
name?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Route description
|
|
96
|
+
* Could be used for generating documentation
|
|
97
|
+
*/
|
|
98
|
+
description?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Request server options
|
|
101
|
+
*/
|
|
102
|
+
serverOptions?: RouteShorthandOptions;
|
|
103
|
+
/**
|
|
104
|
+
* Set route label
|
|
105
|
+
* Will be used for generating documentation
|
|
106
|
+
* If not set, then Warlock will try to generate a label from the route path
|
|
107
|
+
*/
|
|
108
|
+
label?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Whether it is part of restful routes
|
|
111
|
+
*/
|
|
112
|
+
restful?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Mark this route as a page route that will be handled by React SSR
|
|
115
|
+
*/
|
|
116
|
+
isPage?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Rate limit options for this route
|
|
119
|
+
*/
|
|
120
|
+
rateLimit?: {
|
|
121
|
+
/**
|
|
122
|
+
* Max number of requests within the time window
|
|
123
|
+
*/
|
|
124
|
+
max: number;
|
|
125
|
+
/**
|
|
126
|
+
* Time window in milliseconds
|
|
127
|
+
*/
|
|
128
|
+
timeWindow: number;
|
|
129
|
+
/**
|
|
130
|
+
* Error message when rate limit is exceeded
|
|
131
|
+
*/
|
|
132
|
+
errorMessage?: string;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export type RequestMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "OPTIONS" | "HEAD" | "all";
|
|
136
|
+
/**
|
|
137
|
+
* Route Object
|
|
138
|
+
*/
|
|
139
|
+
export type Route = RouteOptions & {
|
|
140
|
+
/**
|
|
141
|
+
* Route method
|
|
142
|
+
*/
|
|
143
|
+
method: RequestMethod;
|
|
144
|
+
/**
|
|
145
|
+
* Route source file (Relative path)
|
|
146
|
+
*/
|
|
147
|
+
sourceFile: string;
|
|
148
|
+
/**
|
|
149
|
+
* Route path
|
|
150
|
+
*/
|
|
151
|
+
path: string;
|
|
152
|
+
/**
|
|
153
|
+
* Route handler Can be a function
|
|
154
|
+
* And als can have a `validation` object as a static property of the handler
|
|
155
|
+
*/
|
|
156
|
+
handler: RequestHandler;
|
|
157
|
+
/**
|
|
158
|
+
* Path prefix
|
|
159
|
+
* Kindly note the prefix is auto added by the router and it should be added to the path itself
|
|
160
|
+
* this will be used for generating the documentation
|
|
161
|
+
*/
|
|
162
|
+
$prefix: string;
|
|
163
|
+
/**
|
|
164
|
+
* Path prefix Stack
|
|
165
|
+
* Kindly note the prefix is auto added by the router and it should be added to the path itself
|
|
166
|
+
* this will be used for generating the documentation
|
|
167
|
+
*/
|
|
168
|
+
$prefixStack: string[];
|
|
169
|
+
/**
|
|
170
|
+
* Rate limit
|
|
171
|
+
*/
|
|
172
|
+
rateLimit?: RouteOptions["rateLimit"];
|
|
173
|
+
};
|
|
174
|
+
export type PartialPick<T, F extends keyof T> = Omit<T, F> & Partial<Pick<T, F>>;
|
|
175
|
+
/**
|
|
176
|
+
* Grouped routes options
|
|
177
|
+
*/
|
|
178
|
+
export type GroupedRoutesOptions = {
|
|
179
|
+
/**
|
|
180
|
+
* Middlewares to be applied to all routes
|
|
181
|
+
*/
|
|
182
|
+
middleware?: Middleware[];
|
|
183
|
+
/**
|
|
184
|
+
* Route prefix
|
|
185
|
+
*/
|
|
186
|
+
prefix?: string;
|
|
187
|
+
/**
|
|
188
|
+
* Route name
|
|
189
|
+
* This will be added to each route as a name prefix
|
|
190
|
+
*/
|
|
191
|
+
name?: string;
|
|
192
|
+
};
|
|
193
|
+
/** Route resource */
|
|
194
|
+
export type RouteResource = {
|
|
195
|
+
/**
|
|
196
|
+
* list route
|
|
197
|
+
*/
|
|
198
|
+
list?: RequestHandler;
|
|
199
|
+
/**
|
|
200
|
+
* Single resource route
|
|
201
|
+
*/
|
|
202
|
+
get?: RequestHandler;
|
|
203
|
+
/**
|
|
204
|
+
* Create resource route
|
|
205
|
+
*/
|
|
206
|
+
create?: RequestHandler;
|
|
207
|
+
/**
|
|
208
|
+
* Update resource route
|
|
209
|
+
*/
|
|
210
|
+
update?: RequestHandler;
|
|
211
|
+
/**
|
|
212
|
+
* Patch resource route
|
|
213
|
+
*/
|
|
214
|
+
patch?: RequestHandler;
|
|
215
|
+
/**
|
|
216
|
+
* Delete resource route
|
|
217
|
+
*/
|
|
218
|
+
delete?: RequestHandler;
|
|
219
|
+
/**
|
|
220
|
+
* Delete Multiple Records
|
|
221
|
+
*/
|
|
222
|
+
bulkDelete?: RequestHandler;
|
|
223
|
+
/**
|
|
224
|
+
* Validation object
|
|
225
|
+
*/
|
|
226
|
+
validation?: {
|
|
227
|
+
/**
|
|
228
|
+
* Apply validation on create|update|patch combined
|
|
229
|
+
*/
|
|
230
|
+
all?: RequestHandlerValidation<any>;
|
|
231
|
+
/**
|
|
232
|
+
* Create validation object
|
|
233
|
+
*/
|
|
234
|
+
create?: RequestHandlerValidation<any>;
|
|
235
|
+
/**
|
|
236
|
+
* Update validation object
|
|
237
|
+
*/
|
|
238
|
+
update?: RequestHandlerValidation<any>;
|
|
239
|
+
/**
|
|
240
|
+
* Patch validation object
|
|
241
|
+
*/
|
|
242
|
+
patch?: RequestHandlerValidation<any>;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
export type RouterStacks = {
|
|
246
|
+
prefix: string[];
|
|
247
|
+
name: string[];
|
|
248
|
+
middleware: Middleware[];
|
|
249
|
+
/**
|
|
250
|
+
* Source file path for routes being added (for HMR route tracking)
|
|
251
|
+
*/
|
|
252
|
+
sourceFile?: string;
|
|
253
|
+
};
|
|
254
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/router/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { S3ClientConfig } from "@aws-sdk/client-s3";
|
|
2
|
+
import type { CloudStorageDriverOptions, LocalStorageDriverOptions, R2StorageDriverOptions, StorageConfigurations, StorageDriverConfig } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Get storage configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare function storageConfig(): StorageConfigurations;
|
|
7
|
+
export declare function storageConfig<T = any>(key: string): T;
|
|
8
|
+
export declare function storageConfig<T = any>(key: string, defaultValue: T): T;
|
|
9
|
+
export declare const storageConfigurations: {
|
|
10
|
+
local: (options: LocalStorageDriverOptions) => StorageDriverConfig;
|
|
11
|
+
aws: (options: CloudStorageDriverOptions & S3ClientConfig) => StorageDriverConfig;
|
|
12
|
+
r2: (options: R2StorageDriverOptions & S3ClientConfig) => StorageDriverConfig;
|
|
13
|
+
spaces: (options: CloudStorageDriverOptions & S3ClientConfig) => StorageDriverConfig;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/storage/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAK,EACV,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,wBAAgB,aAAa,IAAI,qBAAqB,CAAC;AACvD,wBAAgB,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;AACvD,wBAAgB,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,GAAG,CAAC,CAAC;AASxE,eAAO,MAAM,qBAAqB;qBACf,yBAAyB,KAAG,mBAAmB;mBAMjD,yBAAyB,GAAG,cAAc,KAAG,mBAAmB;kBAMjE,sBAAsB,GAAG,cAAc,KAAG,mBAAmB;sBAMzD,yBAAyB,GAAG,cAAc,KAAG,mBAAmB;CAMnF,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {config}from'../config/config-getter.js';import'../config/config-handlers.js';function storageConfig(key, defaultValue) {
|
|
2
|
+
if (!key) {
|
|
3
|
+
return config.get("storage");
|
|
4
|
+
}
|
|
5
|
+
return config.get(`storage.${key}`, defaultValue);
|
|
6
|
+
}
|
|
7
|
+
const storageConfigurations = {
|
|
8
|
+
local: (options) => {
|
|
9
|
+
return {
|
|
10
|
+
driver: "local",
|
|
11
|
+
...options,
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
aws: (options) => {
|
|
15
|
+
return {
|
|
16
|
+
driver: "s3",
|
|
17
|
+
...options,
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
r2: (options) => {
|
|
21
|
+
return {
|
|
22
|
+
driver: "r2",
|
|
23
|
+
...options,
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
spaces: (options) => {
|
|
27
|
+
return {
|
|
28
|
+
driver: "spaces",
|
|
29
|
+
...options,
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
};export{storageConfig,storageConfigurations};//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sources":["../../src/storage/config.ts"],"sourcesContent":[null],"names":[],"mappings":"qFAgBgB,SAAA,aAAa,CAAC,GAAY,EAAE,YAAkB,EAAA;IAC5D,IAAI,CAAC,GAAG,EAAE;AACR,QAAA,OAAO,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAC9B,KAAA;IAED,OAAO,MAAM,CAAC,GAAG,CAAC,CAAA,QAAA,EAAW,GAAG,CAAE,CAAA,EAAE,YAAY,CAAC,CAAC;AACpD,CAAC;AAEY,MAAA,qBAAqB,GAAG;AACnC,IAAA,KAAK,EAAE,CAAC,OAAkC,KAAyB;QACjE,OAAO;AACL,YAAA,MAAM,EAAE,OAAO;AACf,YAAA,GAAG,OAAO;SACX,CAAC;KACH;AACD,IAAA,GAAG,EAAE,CAAC,OAAmD,KAAyB;QAChF,OAAO;AACL,YAAA,MAAM,EAAE,IAAI;AACZ,YAAA,GAAG,OAAO;SACX,CAAC;KACH;AACD,IAAA,EAAE,EAAE,CAAC,OAAgD,KAAyB;QAC5E,OAAO;AACL,YAAA,MAAM,EAAE,IAAI;AACZ,YAAA,GAAG,OAAO;SACX,CAAC;KACH;AACD,IAAA,MAAM,EAAE,CAAC,OAAmD,KAAyB;QACnF,OAAO;AACL,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,GAAG,OAAO;SACX,CAAC;KACH;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Context } from "@warlock.js/context";
|
|
2
|
+
import type { StorageDriverContract } from "../types";
|
|
3
|
+
export type StorageDriverContextStore = {
|
|
4
|
+
driver?: StorageDriverContract;
|
|
5
|
+
prefix?: string;
|
|
6
|
+
metadata?: Record<string, any>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Storage Driver Context
|
|
10
|
+
*
|
|
11
|
+
* Manages the active storage driver and path prefix using AsyncLocalStorage.
|
|
12
|
+
* Allows multi-tenant applications to switch drivers and isolate storage paths per request context.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* // Set driver with tenant-specific prefix
|
|
17
|
+
* storageDriverContext.setDriver(storage.getDriver("s3"), {
|
|
18
|
+
* prefix: "tenant-123",
|
|
19
|
+
* metadata: { tenantId: "123" }
|
|
20
|
+
* });
|
|
21
|
+
*
|
|
22
|
+
* // Or just set prefix for same driver
|
|
23
|
+
* storageDriverContext.setPrefix("tenant-456");
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare class StorageDriverContext extends Context<StorageDriverContextStore> {
|
|
27
|
+
/**
|
|
28
|
+
* Get the current storage driver
|
|
29
|
+
*/
|
|
30
|
+
getDriver(): StorageDriverContract | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Get the current path prefix (e.g., tenant-specific path)
|
|
33
|
+
*/
|
|
34
|
+
getPrefix(): string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Get context metadata (e.g., tenantId)
|
|
37
|
+
*/
|
|
38
|
+
getMetadata(): Record<string, any> | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Set the active driver with optional prefix and metadata
|
|
41
|
+
*
|
|
42
|
+
* @param driver - Storage driver to use
|
|
43
|
+
* @param options - Optional prefix and metadata
|
|
44
|
+
*/
|
|
45
|
+
setDriver(driver: StorageDriverContract, options?: {
|
|
46
|
+
prefix?: string;
|
|
47
|
+
metadata?: Record<string, any>;
|
|
48
|
+
}): void;
|
|
49
|
+
/**
|
|
50
|
+
* Set only the path prefix (keeps current driver)
|
|
51
|
+
*
|
|
52
|
+
* Useful for multi-tenant scenarios where you want to isolate
|
|
53
|
+
* storage paths without changing the driver.
|
|
54
|
+
*
|
|
55
|
+
* @param prefix - Path prefix to prepend to all operations
|
|
56
|
+
*/
|
|
57
|
+
setPrefix(prefix: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* Clear the prefix
|
|
60
|
+
*/
|
|
61
|
+
clearPrefix(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Build the initial storage store with defaults
|
|
64
|
+
*/
|
|
65
|
+
buildStore(): StorageDriverContextStore;
|
|
66
|
+
}
|
|
67
|
+
export declare const storageDriverContext: StorageDriverContext;
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=storage-driver-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-driver-context.d.ts","sourceRoot":"","sources":["../../../src/storage/context/storage-driver-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAkB,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,MAAM,yBAAyB,GAAG;IACtC,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,cAAM,oBAAqB,SAAQ,OAAO,CAAC,yBAAyB,CAAC;IACnE;;OAEG;IACI,SAAS,IAAI,qBAAqB,GAAG,SAAS;IAIrD;;OAEG;IACI,SAAS,IAAI,MAAM,GAAG,SAAS;IAItC;;OAEG;IACI,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS;IAIrD;;;;;OAKG;IACI,SAAS,CACd,MAAM,EAAE,qBAAqB,EAC7B,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,GAC5D,IAAI;IAQP;;;;;;;OAOG;IACI,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAItC;;OAEG;IACI,WAAW,IAAI,IAAI;IAI1B;;OAEG;IACI,UAAU,IAAI,yBAAyB;CAO/C;AAED,eAAO,MAAM,oBAAoB,sBAA6B,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {contextManager,Context}from'@warlock.js/context';/**
|
|
2
|
+
* Storage Driver Context
|
|
3
|
+
*
|
|
4
|
+
* Manages the active storage driver and path prefix using AsyncLocalStorage.
|
|
5
|
+
* Allows multi-tenant applications to switch drivers and isolate storage paths per request context.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* // Set driver with tenant-specific prefix
|
|
10
|
+
* storageDriverContext.setDriver(storage.getDriver("s3"), {
|
|
11
|
+
* prefix: "tenant-123",
|
|
12
|
+
* metadata: { tenantId: "123" }
|
|
13
|
+
* });
|
|
14
|
+
*
|
|
15
|
+
* // Or just set prefix for same driver
|
|
16
|
+
* storageDriverContext.setPrefix("tenant-456");
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
class StorageDriverContext extends Context {
|
|
20
|
+
/**
|
|
21
|
+
* Get the current storage driver
|
|
22
|
+
*/
|
|
23
|
+
getDriver() {
|
|
24
|
+
return this.get("driver");
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get the current path prefix (e.g., tenant-specific path)
|
|
28
|
+
*/
|
|
29
|
+
getPrefix() {
|
|
30
|
+
return this.get("prefix");
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get context metadata (e.g., tenantId)
|
|
34
|
+
*/
|
|
35
|
+
getMetadata() {
|
|
36
|
+
return this.get("metadata");
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Set the active driver with optional prefix and metadata
|
|
40
|
+
*
|
|
41
|
+
* @param driver - Storage driver to use
|
|
42
|
+
* @param options - Optional prefix and metadata
|
|
43
|
+
*/
|
|
44
|
+
setDriver(driver, options) {
|
|
45
|
+
this.update({
|
|
46
|
+
driver,
|
|
47
|
+
prefix: options?.prefix,
|
|
48
|
+
metadata: options?.metadata,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Set only the path prefix (keeps current driver)
|
|
53
|
+
*
|
|
54
|
+
* Useful for multi-tenant scenarios where you want to isolate
|
|
55
|
+
* storage paths without changing the driver.
|
|
56
|
+
*
|
|
57
|
+
* @param prefix - Path prefix to prepend to all operations
|
|
58
|
+
*/
|
|
59
|
+
setPrefix(prefix) {
|
|
60
|
+
this.update({ prefix });
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Clear the prefix
|
|
64
|
+
*/
|
|
65
|
+
clearPrefix() {
|
|
66
|
+
this.update({ prefix: undefined });
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Build the initial storage store with defaults
|
|
70
|
+
*/
|
|
71
|
+
buildStore() {
|
|
72
|
+
return {
|
|
73
|
+
driver: undefined,
|
|
74
|
+
prefix: undefined,
|
|
75
|
+
metadata: undefined,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const storageDriverContext = new StorageDriverContext();
|
|
80
|
+
contextManager.register("storage", storageDriverContext);export{storageDriverContext};//# sourceMappingURL=storage-driver-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-driver-context.js","sources":["../../../src/storage/context/storage-driver-context.ts"],"sourcesContent":[null],"names":[],"mappings":"yDASA;;;;;;;;;;;;;;;;;AAiBG;AACH,MAAM,oBAAqB,SAAQ,OAAkC,CAAA;AACnE;;AAEG;IACI,SAAS,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;KAC3B;AAED;;AAEG;IACI,SAAS,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;KAC3B;AAED;;AAEG;IACI,WAAW,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;KAC7B;AAED;;;;;AAKG;IACI,SAAS,CACd,MAA6B,EAC7B,OAA6D,EAAA;QAE7D,IAAI,CAAC,MAAM,CAAC;YACV,MAAM;YACN,MAAM,EAAE,OAAO,EAAE,MAAM;YACvB,QAAQ,EAAE,OAAO,EAAE,QAAQ;AAC5B,SAAA,CAAC,CAAC;KACJ;AAED;;;;;;;AAOG;AACI,IAAA,SAAS,CAAC,MAAc,EAAA;AAC7B,QAAA,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;KACzB;AAED;;AAEG;IACI,WAAW,GAAA;QAChB,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;KACpC;AAED;;AAEG;IACI,UAAU,GAAA;QACf,OAAO;AACL,YAAA,MAAM,EAAE,SAAS;AACjB,YAAA,MAAM,EAAE,SAAS;AACjB,YAAA,QAAQ,EAAE,SAAS;SACpB,CAAC;KACH;AACF,CAAA;AAEY,MAAA,oBAAoB,GAAG,IAAI,oBAAoB,GAAG;AAE/D,cAAc,CAAC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import type { Readable } from "stream";
|
|
4
|
+
import type { CloudStorageDriverContract, CloudStorageDriverOptions, CloudStorageFileData, DeleteManyResult, FileVisibility, ListOptions, PresignedOptions, PresignedUploadOptions, PutOptions, StorageDriverType, StorageFileInfo } from "../types";
|
|
5
|
+
/**
|
|
6
|
+
* Load S3 modules lazily
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* await loadS3();
|
|
10
|
+
* if (isModuleExists) {
|
|
11
|
+
* // Safe to use S3Client, S3Storage, S3Presigner
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadS3(): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Base abstract class for all S3-compatible cloud storage drivers
|
|
17
|
+
*
|
|
18
|
+
* This class contains all shared logic for S3-compatible storage services
|
|
19
|
+
* including AWS S3, Cloudflare R2, DigitalOcean Spaces, and others.
|
|
20
|
+
*
|
|
21
|
+
* **Important:** S3 SDK packages are lazy-loaded on first use.
|
|
22
|
+
* Users must install them separately:
|
|
23
|
+
* ```
|
|
24
|
+
* npm install @aws-sdk/client-s3 @aws-sdk/lib-storage @aws-sdk/s3-request-presigner
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* Subclasses must implement:
|
|
28
|
+
* - `name`: Driver identifier (e.g., "s3", "r2", "spaces")
|
|
29
|
+
* - `url()`: Returns the public URL for a file (provider-specific format)
|
|
30
|
+
*/
|
|
31
|
+
export declare abstract class CloudDriver<TOptions extends Partial<CloudStorageDriverOptions> = CloudStorageDriverOptions> implements CloudStorageDriverContract {
|
|
32
|
+
options: TOptions;
|
|
33
|
+
/**
|
|
34
|
+
* S3-compatible client (lazy-loaded)
|
|
35
|
+
*/
|
|
36
|
+
protected client: InstanceType<typeof import("@aws-sdk/client-s3").S3Client>;
|
|
37
|
+
/**
|
|
38
|
+
* Retry configuration
|
|
39
|
+
*/
|
|
40
|
+
protected retryConfig: {
|
|
41
|
+
maxRetries: number;
|
|
42
|
+
initialDelayMs: number;
|
|
43
|
+
maxDelayMs: number;
|
|
44
|
+
backoffMultiplier: number;
|
|
45
|
+
};
|
|
46
|
+
constructor(options: TOptions);
|
|
47
|
+
/**
|
|
48
|
+
* Driver name identifier
|
|
49
|
+
*/
|
|
50
|
+
abstract readonly name: StorageDriverType;
|
|
51
|
+
/**
|
|
52
|
+
* Get public URL for file
|
|
53
|
+
* Must be implemented by subclasses with provider-specific format
|
|
54
|
+
*/
|
|
55
|
+
abstract url(location: string): string;
|
|
56
|
+
/**
|
|
57
|
+
* Get endpoint URL
|
|
58
|
+
* Can be overridden by subclasses for provider-specific endpoints
|
|
59
|
+
*/
|
|
60
|
+
protected getEndpoint(): string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Apply prefix to location path
|
|
63
|
+
*
|
|
64
|
+
* Priority: context prefix > driver options prefix > no prefix
|
|
65
|
+
* This allows multi-tenant scenarios where context overrides driver config.
|
|
66
|
+
*
|
|
67
|
+
* @param location - Original location path
|
|
68
|
+
* @returns Location with prefix applied if one exists
|
|
69
|
+
*/
|
|
70
|
+
applyPrefix(location: string): string;
|
|
71
|
+
/**
|
|
72
|
+
* Normalize storage path (remove double slashes, sanitize)
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
protected normalizePath(path: string): string;
|
|
76
|
+
/**
|
|
77
|
+
* Execute an operation with retry logic
|
|
78
|
+
*
|
|
79
|
+
* Retries on transient errors with exponential backoff.
|
|
80
|
+
*
|
|
81
|
+
* @param operation - Async operation to execute
|
|
82
|
+
* @param operationName - Name for logging
|
|
83
|
+
* @returns Result of the operation
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
protected withRetry<T>(operation: () => Promise<T>, operationName?: string): Promise<T>;
|
|
87
|
+
/**
|
|
88
|
+
* Check if an error is retryable
|
|
89
|
+
*
|
|
90
|
+
* Retries on:
|
|
91
|
+
* - Network errors
|
|
92
|
+
* - 5xx server errors
|
|
93
|
+
* - Rate limiting (429)
|
|
94
|
+
* - Timeout errors
|
|
95
|
+
*
|
|
96
|
+
* Does NOT retry on:
|
|
97
|
+
* - 4xx client errors (except 429)
|
|
98
|
+
* - Authentication errors
|
|
99
|
+
* - Not found errors
|
|
100
|
+
*
|
|
101
|
+
* @param error - Error to check
|
|
102
|
+
* @returns true if error is retryable
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
protected isRetryableError(error: any): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Put file to cloud storage
|
|
108
|
+
*/
|
|
109
|
+
put(file: Buffer, location: string, options?: PutOptions): Promise<CloudStorageFileData>;
|
|
110
|
+
/**
|
|
111
|
+
* Put file from a readable stream (for large files)
|
|
112
|
+
* Uses S3 multipart upload for efficient streaming
|
|
113
|
+
*/
|
|
114
|
+
putStream(stream: Readable, location: string, options?: PutOptions): Promise<CloudStorageFileData>;
|
|
115
|
+
/**
|
|
116
|
+
* Get file contents as Buffer
|
|
117
|
+
*/
|
|
118
|
+
get(location: string): Promise<Buffer>;
|
|
119
|
+
/**
|
|
120
|
+
* Get file as a readable stream (for large files)
|
|
121
|
+
*/
|
|
122
|
+
getStream(location: string): Promise<Readable>;
|
|
123
|
+
/**
|
|
124
|
+
* Delete a file
|
|
125
|
+
*/
|
|
126
|
+
delete(location: string): Promise<boolean>;
|
|
127
|
+
/**
|
|
128
|
+
* Delete multiple files at once (uses batch delete for efficiency)
|
|
129
|
+
*/
|
|
130
|
+
deleteMany(locations: string[]): Promise<DeleteManyResult[]>;
|
|
131
|
+
/**
|
|
132
|
+
* Delete directory (recursively deletes all objects with matching prefix)
|
|
133
|
+
*
|
|
134
|
+
* S3/R2 doesn't have true directories - only key prefixes.
|
|
135
|
+
* This method lists all objects with the prefix and deletes them in batches.
|
|
136
|
+
*
|
|
137
|
+
* @param directoryPath - Directory prefix to delete
|
|
138
|
+
* @returns true when all objects are deleted
|
|
139
|
+
*/
|
|
140
|
+
deleteDirectory(directoryPath: string): Promise<boolean>;
|
|
141
|
+
/**
|
|
142
|
+
* Check if file exists
|
|
143
|
+
*/
|
|
144
|
+
exists(location: string): Promise<boolean>;
|
|
145
|
+
/**
|
|
146
|
+
* Get a temporary presigned URL (alias for getPresignedUrl)
|
|
147
|
+
*/
|
|
148
|
+
temporaryUrl(location: string, expiresIn?: number): Promise<string>;
|
|
149
|
+
/**
|
|
150
|
+
* Get presigned URL for downloading
|
|
151
|
+
*/
|
|
152
|
+
getPresignedUrl(location: string, options?: PresignedOptions): Promise<string>;
|
|
153
|
+
/**
|
|
154
|
+
* Get presigned URL for uploading
|
|
155
|
+
*/
|
|
156
|
+
getPresignedUploadUrl(location: string, options?: PresignedUploadOptions): Promise<string>;
|
|
157
|
+
/**
|
|
158
|
+
* Get file info/metadata without downloading
|
|
159
|
+
*/
|
|
160
|
+
getInfo(location: string): Promise<StorageFileInfo>;
|
|
161
|
+
/**
|
|
162
|
+
* Get file size in bytes (shortcut for getInfo().size)
|
|
163
|
+
*/
|
|
164
|
+
size(location: string): Promise<number>;
|
|
165
|
+
/**
|
|
166
|
+
* Copy file to a new location
|
|
167
|
+
*/
|
|
168
|
+
copy(from: string, to: string): Promise<CloudStorageFileData>;
|
|
169
|
+
/**
|
|
170
|
+
* Move file to a new location
|
|
171
|
+
*/
|
|
172
|
+
move(from: string, to: string): Promise<CloudStorageFileData>;
|
|
173
|
+
/**
|
|
174
|
+
* List files in a directory
|
|
175
|
+
*/
|
|
176
|
+
list(directory: string, options?: ListOptions): Promise<StorageFileInfo[]>;
|
|
177
|
+
/**
|
|
178
|
+
* Get bucket name
|
|
179
|
+
*/
|
|
180
|
+
getBucket(): string;
|
|
181
|
+
/**
|
|
182
|
+
* Get region
|
|
183
|
+
*/
|
|
184
|
+
getRegion(): string;
|
|
185
|
+
/**
|
|
186
|
+
* Set storage class (e.g., STANDARD, GLACIER, etc.)
|
|
187
|
+
*/
|
|
188
|
+
setStorageClass(location: string, storageClass: string): Promise<void>;
|
|
189
|
+
/**
|
|
190
|
+
* Set file visibility (public or private)
|
|
191
|
+
*/
|
|
192
|
+
setVisibility(location: string, visibility: FileVisibility): Promise<void>;
|
|
193
|
+
/**
|
|
194
|
+
* Get file visibility
|
|
195
|
+
*/
|
|
196
|
+
getVisibility(location: string): Promise<FileVisibility>;
|
|
197
|
+
/**
|
|
198
|
+
* Calculate SHA-256 hash
|
|
199
|
+
*/
|
|
200
|
+
protected calculateHash(buffer: Buffer): string;
|
|
201
|
+
/**
|
|
202
|
+
* Guess MIME type from file extension
|
|
203
|
+
*/
|
|
204
|
+
protected guessMimeType(location: string): string;
|
|
205
|
+
}
|
|
206
|
+
//# sourceMappingURL=cloud-driver.d.ts.map
|