@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,62 @@
|
|
|
1
|
+
import type { FileSizeOption, JsonSchemaResult, JsonSchemaTarget } from "@warlock.js/seal";
|
|
2
|
+
import { BaseValidator } from "@warlock.js/seal";
|
|
3
|
+
export declare const uploadedFileMetadataSchema: any;
|
|
4
|
+
/**
|
|
5
|
+
* File validator class
|
|
6
|
+
*/
|
|
7
|
+
export declare class FileValidator extends BaseValidator {
|
|
8
|
+
constructor(errorMessage?: string);
|
|
9
|
+
/**
|
|
10
|
+
* Check if value is a File type
|
|
11
|
+
*/
|
|
12
|
+
matchesType(value: any): boolean;
|
|
13
|
+
/** Value must be an image */
|
|
14
|
+
image(errorMessage?: string): FileValidator;
|
|
15
|
+
/** Accept specific file extensions */
|
|
16
|
+
accept(extensions: string | string[], errorMessage?: string): FileValidator;
|
|
17
|
+
/** Allow specific MIME types */
|
|
18
|
+
mimeType(mimeTypes: string | string[], errorMessage?: string): FileValidator;
|
|
19
|
+
/** Allow only pdf files */
|
|
20
|
+
pdf(errorMessage?: string): FileValidator;
|
|
21
|
+
/** Allow only excel files */
|
|
22
|
+
excel(errorMessage?: string): FileValidator;
|
|
23
|
+
/** Allow only word files */
|
|
24
|
+
word(errorMessage?: string): FileValidator;
|
|
25
|
+
/** Minimum file size */
|
|
26
|
+
minSize(size: number | FileSizeOption, errorMessage?: string): FileValidator;
|
|
27
|
+
/** @alias minSize */
|
|
28
|
+
min(size: number | FileSizeOption, errorMessage?: string): FileValidator;
|
|
29
|
+
/** Maximum file size */
|
|
30
|
+
maxSize(size: number | FileSizeOption, errorMessage?: string): FileValidator;
|
|
31
|
+
/** @alias maxSize */
|
|
32
|
+
max(size: number, errorMessage?: string): FileValidator;
|
|
33
|
+
/** Minimum image width */
|
|
34
|
+
minWidth(width: number, errorMessage?: string): FileValidator;
|
|
35
|
+
/** Maximum image width */
|
|
36
|
+
maxWidth(width: number, errorMessage?: string): FileValidator;
|
|
37
|
+
/** Minimum image height */
|
|
38
|
+
minHeight(height: number, errorMessage?: string): FileValidator;
|
|
39
|
+
/** Maximum image height */
|
|
40
|
+
maxHeight(height: number, errorMessage?: string): FileValidator;
|
|
41
|
+
/**
|
|
42
|
+
* Save the file and return it as a string
|
|
43
|
+
*/
|
|
44
|
+
saveTo(relativeDirectory: string): FileValidator;
|
|
45
|
+
/**
|
|
46
|
+
* @inheritdoc
|
|
47
|
+
*
|
|
48
|
+
* File uploads are not natively representable in JSON Schema.
|
|
49
|
+
* The output varies by target:
|
|
50
|
+
* - `openapi-3.0` → `{ type: "string", format: "binary" }` (standard for multipart/form-data uploads)
|
|
51
|
+
* - `draft-2020-12` → `{ type: "string", contentEncoding: "binary" }`
|
|
52
|
+
* - `draft-07` → `{}` (no standard binary representation — permissive fallback)
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* v.file().toJsonSchema("openapi-3.0")
|
|
57
|
+
* // → { type: "string", format: "binary" }
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
toJsonSchema(target?: JsonSchemaTarget): JsonSchemaResult;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=file-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-validator.d.ts","sourceRoot":"","sources":["../../../src/validation/validators/file-validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC3F,OAAO,EACL,aAAa,EASd,MAAM,kBAAkB,CAAC;AAI1B,eAAO,MAAM,0BAA0B,KAQrC,CAAC;AAEH;;GAEG;AACH,qBAAa,aAAc,SAAQ,aAAa;gBAC3B,YAAY,CAAC,EAAE,MAAM;IAKxC;;OAEG;IACI,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO;IAIvC,6BAA6B;IACtB,KAAK,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;IAIlD,sCAAsC;IAC/B,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;IAMlF,gCAAgC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;IAMnF,2BAA2B;IACpB,GAAG,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;IAIhD,6BAA6B;IACtB,KAAK,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;IAUlD,4BAA4B;IACrB,IAAI,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;IAUjD,wBAAwB;IACjB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;IAMnF,qBAAqB;IACd,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;IAI/E,wBAAwB;IACjB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;IAMnF,qBAAqB;IACd,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;IAI9D,0BAA0B;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;IAMpE,0BAA0B;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;IAMpE,2BAA2B;IACpB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;IAMtE,2BAA2B;IACpB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;IAMtE;;OAEG;IACI,MAAM,CAAC,iBAAiB,EAAE,MAAM,GAAG,aAAa;IAQvD;;;;;;;;;;;;;;OAcG;IACa,YAAY,CAAC,MAAM,GAAE,gBAAkC,GAAG,gBAAgB;CAY3F"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import {v,BaseValidator,minFileSizeRule,resolveFileSize,maxFileSizeRule,minWidthRule,maxWidthRule,minHeightRule,maxHeightRule}from'@warlock.js/seal';import'@mongez/config';import'@mongez/reinforcements';import'@warlock.js/logger';import'../../router/router.js';import'@fastify/multipart';import'../../database/models/database-log/database-log.js';import'../../http/context/request-context.js';import'path';import'@mongez/slug';import'@mongez/supportive-is';import'fastify';import'../../http/database/RequestLog.js';import {UploadedFile}from'../../http/uploaded-file.js';import'../../config/config-handlers.js';import'@warlock.js/cache';import'@mongez/localization';import'@warlock.js/cascade';import'@warlock.js/context';import'@mongez/copper';import'@mongez/events';import'../../http/response.js';import {fileRule,imageRule,fileExtensionRule,fileTypeRule}from'../file/file.js';const uploadedFileMetadataSchema = v.object({
|
|
2
|
+
location: v.string().oneOf(["local", "cloud"]),
|
|
3
|
+
width: v.int().positive(),
|
|
4
|
+
height: v.int().positive(),
|
|
5
|
+
size: v.int().positive(),
|
|
6
|
+
mimeType: v.string(),
|
|
7
|
+
extension: v.string(),
|
|
8
|
+
name: v.string(),
|
|
9
|
+
});
|
|
10
|
+
/**
|
|
11
|
+
* File validator class
|
|
12
|
+
*/
|
|
13
|
+
class FileValidator extends BaseValidator {
|
|
14
|
+
constructor(errorMessage) {
|
|
15
|
+
super();
|
|
16
|
+
this.addMutableRule(fileRule, errorMessage);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Check if value is a File type
|
|
20
|
+
*/
|
|
21
|
+
matchesType(value) {
|
|
22
|
+
return value instanceof UploadedFile;
|
|
23
|
+
}
|
|
24
|
+
/** Value must be an image */
|
|
25
|
+
image(errorMessage) {
|
|
26
|
+
return this.addRule(imageRule, errorMessage);
|
|
27
|
+
}
|
|
28
|
+
/** Accept specific file extensions */
|
|
29
|
+
accept(extensions, errorMessage) {
|
|
30
|
+
return this.addRule(fileExtensionRule, errorMessage, {
|
|
31
|
+
extensions,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/** Allow specific MIME types */
|
|
35
|
+
mimeType(mimeTypes, errorMessage) {
|
|
36
|
+
return this.addRule(fileTypeRule, errorMessage, {
|
|
37
|
+
mimeTypes,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/** Allow only pdf files */
|
|
41
|
+
pdf(errorMessage) {
|
|
42
|
+
return this.mimeType("application/pdf", errorMessage);
|
|
43
|
+
}
|
|
44
|
+
/** Allow only excel files */
|
|
45
|
+
excel(errorMessage) {
|
|
46
|
+
return this.mimeType([
|
|
47
|
+
"application/vnd.ms-excel",
|
|
48
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
49
|
+
], errorMessage);
|
|
50
|
+
}
|
|
51
|
+
/** Allow only word files */
|
|
52
|
+
word(errorMessage) {
|
|
53
|
+
return this.mimeType([
|
|
54
|
+
"application/msword",
|
|
55
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
56
|
+
], errorMessage);
|
|
57
|
+
}
|
|
58
|
+
/** Minimum file size */
|
|
59
|
+
minSize(size, errorMessage) {
|
|
60
|
+
return this.addRule(minFileSizeRule, errorMessage, {
|
|
61
|
+
minSize: resolveFileSize(size),
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/** @alias minSize */
|
|
65
|
+
min(size, errorMessage) {
|
|
66
|
+
return this.minSize(size, errorMessage);
|
|
67
|
+
}
|
|
68
|
+
/** Maximum file size */
|
|
69
|
+
maxSize(size, errorMessage) {
|
|
70
|
+
return this.addRule(maxFileSizeRule, errorMessage, {
|
|
71
|
+
maxSize: resolveFileSize(size),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/** @alias maxSize */
|
|
75
|
+
max(size, errorMessage) {
|
|
76
|
+
return this.maxSize(size, errorMessage);
|
|
77
|
+
}
|
|
78
|
+
/** Minimum image width */
|
|
79
|
+
minWidth(width, errorMessage) {
|
|
80
|
+
return this.addRule(minWidthRule, errorMessage, {
|
|
81
|
+
minWidth: width,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/** Maximum image width */
|
|
85
|
+
maxWidth(width, errorMessage) {
|
|
86
|
+
return this.addRule(maxWidthRule, errorMessage, {
|
|
87
|
+
maxWidth: width,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/** Minimum image height */
|
|
91
|
+
minHeight(height, errorMessage) {
|
|
92
|
+
return this.addRule(minHeightRule, errorMessage, {
|
|
93
|
+
minHeight: height,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/** Maximum image height */
|
|
97
|
+
maxHeight(height, errorMessage) {
|
|
98
|
+
return this.addRule(maxHeightRule, errorMessage, {
|
|
99
|
+
maxHeight: height,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Save the file and return it as a string
|
|
104
|
+
*/
|
|
105
|
+
saveTo(relativeDirectory) {
|
|
106
|
+
return this.addTransformer(async (file) => {
|
|
107
|
+
const output = await file.save(relativeDirectory);
|
|
108
|
+
return output.path;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* @inheritdoc
|
|
113
|
+
*
|
|
114
|
+
* File uploads are not natively representable in JSON Schema.
|
|
115
|
+
* The output varies by target:
|
|
116
|
+
* - `openapi-3.0` → `{ type: "string", format: "binary" }` (standard for multipart/form-data uploads)
|
|
117
|
+
* - `draft-2020-12` → `{ type: "string", contentEncoding: "binary" }`
|
|
118
|
+
* - `draft-07` → `{}` (no standard binary representation — permissive fallback)
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
|
+
* v.file().toJsonSchema("openapi-3.0")
|
|
123
|
+
* // → { type: "string", format: "binary" }
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
toJsonSchema(target = "draft-2020-12") {
|
|
127
|
+
if (target === "openapi-3.0") {
|
|
128
|
+
return { type: "string", format: "binary" };
|
|
129
|
+
}
|
|
130
|
+
if (target === "draft-2020-12") {
|
|
131
|
+
return { type: "string", contentEncoding: "binary" };
|
|
132
|
+
}
|
|
133
|
+
// draft-07: no standard binary representation
|
|
134
|
+
return {};
|
|
135
|
+
}
|
|
136
|
+
}export{FileValidator,uploadedFileMetadataSchema};//# sourceMappingURL=file-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-validator.js","sources":["../../../src/validation/validators/file-validator.ts"],"sourcesContent":[null],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/validation/validators/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-configurations.d.ts","sourceRoot":"","sources":["../../src/warlock-config/default-configurations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,eAAO,MAAM,4BAA4B,EAAE,aAO1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-configurations.js","sources":["../../src/warlock-config/default-configurations.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEa,MAAA,4BAA4B,GAAkB;AACzD,IAAA,KAAK,EAAE;AACL,QAAA,YAAY,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,OAAO;AACrC,QAAA,OAAO,EAAE,QAAQ;AACjB,QAAA,SAAS,EAAE,IAAI;AACf,QAAA,MAAM,EAAE,IAAI;AACb,KAAA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-config.d.ts","sourceRoot":"","sources":["../../src/warlock-config/define-config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,wBAAgB,YAAY,CAAC,OAAO,EAAE,aAAa,OAElD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-config.js","sources":["../../src/warlock-config/define-config.ts"],"sourcesContent":[null],"names":[],"mappings":"kHAIM,SAAU,YAAY,CAAC,OAAsB,EAAA;AACjD,IAAA,OAAO,KAAK,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AACtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/warlock-config/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import type { MigrationConstructor } from "@warlock.js/cascade";
|
|
2
|
+
import type { CLICommand } from "../cli/cli-command";
|
|
3
|
+
import type { FileHealthCheckerContract } from "../dev-server/health-checker/file-health-checker.contract";
|
|
4
|
+
/**
|
|
5
|
+
* Resolved Warlock Configuration
|
|
6
|
+
*
|
|
7
|
+
* This is the final configuration after merging user config with defaults
|
|
8
|
+
*/
|
|
9
|
+
export type WarlockConfig = {
|
|
10
|
+
/**
|
|
11
|
+
* Server configuration
|
|
12
|
+
*/
|
|
13
|
+
server?: {
|
|
14
|
+
port?: number;
|
|
15
|
+
host?: string;
|
|
16
|
+
retryOtherPort?: boolean;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Build configuration
|
|
20
|
+
*/
|
|
21
|
+
build?: {
|
|
22
|
+
/**
|
|
23
|
+
* Output directory
|
|
24
|
+
*
|
|
25
|
+
* @default dist
|
|
26
|
+
*/
|
|
27
|
+
outDirectory?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Output file
|
|
30
|
+
*
|
|
31
|
+
* @default app.js
|
|
32
|
+
*/
|
|
33
|
+
outFile?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Minify output
|
|
36
|
+
*
|
|
37
|
+
* @default true
|
|
38
|
+
*/
|
|
39
|
+
minify?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Generate sourcemap
|
|
42
|
+
*
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
sourcemap?: boolean | "inline" | "linked";
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* CLI configuration
|
|
49
|
+
*/
|
|
50
|
+
cli?: {
|
|
51
|
+
commands?: CLICommand[];
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Development server configuration
|
|
55
|
+
*/
|
|
56
|
+
devServer?: {
|
|
57
|
+
/**
|
|
58
|
+
* Watch configuration
|
|
59
|
+
*/
|
|
60
|
+
watch?: {
|
|
61
|
+
/**
|
|
62
|
+
* Glob patterns to include in file watching
|
|
63
|
+
*
|
|
64
|
+
* @default ["**\/*.{ts,tsx}"]
|
|
65
|
+
*/
|
|
66
|
+
include?: string[];
|
|
67
|
+
/**
|
|
68
|
+
* Glob patterns to exclude from file watching
|
|
69
|
+
*
|
|
70
|
+
* @default ["**\/node_modules\/**", "**\/dist\/**", "**\/.warlock\/**", "**\/.git\/**"]
|
|
71
|
+
*/
|
|
72
|
+
exclude?: string[];
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Custom health checkers
|
|
76
|
+
*/
|
|
77
|
+
healthCheckers?: FileHealthCheckerContract[] | false;
|
|
78
|
+
/**
|
|
79
|
+
* Whether to generate typings on dev server start
|
|
80
|
+
* @default true
|
|
81
|
+
*/
|
|
82
|
+
generateTypings?: boolean;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Database configuration
|
|
86
|
+
*/
|
|
87
|
+
database?: {
|
|
88
|
+
/**
|
|
89
|
+
* Package-level migrations to include in migration runs.
|
|
90
|
+
*
|
|
91
|
+
* Use this to register migrations from external packages
|
|
92
|
+
* (e.g., @warlock.js/auth) that are not auto-discovered.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```typescript
|
|
96
|
+
* import { authMigrations } from "@warlock.js/auth";
|
|
97
|
+
*
|
|
98
|
+
* export default defineConfig({
|
|
99
|
+
* database: {
|
|
100
|
+
* migrations: [...authMigrations],
|
|
101
|
+
* },
|
|
102
|
+
* });
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
migrations?: Array<MigrationConstructor>;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Testing configuration
|
|
109
|
+
*
|
|
110
|
+
* High-level test settings. For detailed test behavior,
|
|
111
|
+
* use config/tests.ts instead.
|
|
112
|
+
*/
|
|
113
|
+
testing?: {
|
|
114
|
+
/**
|
|
115
|
+
* Additional glob patterns to include as test files.
|
|
116
|
+
* Added to the default patterns.
|
|
117
|
+
*
|
|
118
|
+
* @example ["src/shared/[ALL]/*.test.ts"]
|
|
119
|
+
*/
|
|
120
|
+
include?: string[];
|
|
121
|
+
/**
|
|
122
|
+
* Glob patterns to exclude from test discovery.
|
|
123
|
+
*
|
|
124
|
+
* @example [[ALL]/*.integration.test.ts"]
|
|
125
|
+
*/
|
|
126
|
+
exclude?: string[];
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/warlock-config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2DAA2D,CAAC;AAE3G;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;IAEF;;OAEG;IACH,KAAK,CAAC,EAAE;QACN;;;;WAIG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB;;;;WAIG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB;;;;WAIG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB;;;;WAIG;QACH,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;KAC3C,CAAC;IAEF;;OAEG;IACH,GAAG,CAAC,EAAE;QACJ,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC;KACzB,CAAC;IAEF;;OAEG;IACH,SAAS,CAAC,EAAE;QACV;;WAEG;QACH,KAAK,CAAC,EAAE;YACN;;;;eAIG;YACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;YACnB;;;;eAIG;YACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;SACpB,CAAC;QACF;;WAEG;QACH,cAAc,CAAC,EAAE,yBAAyB,EAAE,GAAG,KAAK,CAAC;QACrD;;;WAGG;QACH,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC;IAEF;;OAEG;IACH,QAAQ,CAAC,EAAE;QACT;;;;;;;;;;;;;;;;WAgBG;QACH,UAAU,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;KAC1C,CAAC;IAEF;;;;;OAKG;IACH,OAAO,CAAC,EAAE;QACR;;;;;WAKG;QACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QAEnB;;;;WAIG;QACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { WarlockConfig } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Warlock Config Manager
|
|
4
|
+
*
|
|
5
|
+
* Manages lazy loading of the pre-compiled warlock.config.js file
|
|
6
|
+
* from the .warlock/cache directory.
|
|
7
|
+
*/
|
|
8
|
+
export declare class WarlockConfigManager {
|
|
9
|
+
/**
|
|
10
|
+
* Cached config instance
|
|
11
|
+
*/
|
|
12
|
+
private config?;
|
|
13
|
+
/**
|
|
14
|
+
* Loading promise to prevent duplicate loads
|
|
15
|
+
*/
|
|
16
|
+
private loading?;
|
|
17
|
+
/**
|
|
18
|
+
* Load warlock.config.js (cached after first load)
|
|
19
|
+
*
|
|
20
|
+
* @returns The resolved Warlock configuration
|
|
21
|
+
*/
|
|
22
|
+
load(): Promise<WarlockConfig | undefined>;
|
|
23
|
+
/**
|
|
24
|
+
* Internal load implementation
|
|
25
|
+
*/
|
|
26
|
+
private doLoad;
|
|
27
|
+
/**
|
|
28
|
+
* Compile warlock.config.ts file
|
|
29
|
+
*/
|
|
30
|
+
protected compile(): Promise<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* Get config value by key (dot notation supported)
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* config.get("server.port") // Returns 3000
|
|
36
|
+
* config.get("cli.commands") // Returns array of commands
|
|
37
|
+
*
|
|
38
|
+
* @param key - Config key (supports dot notation), autocompletes for first level only
|
|
39
|
+
* @returns The config value
|
|
40
|
+
* @throws Error if config is not loaded
|
|
41
|
+
*/
|
|
42
|
+
get<Key extends keyof WarlockConfig>(key: Key, defaultValue?: WarlockConfig[Key]): WarlockConfig[Key];
|
|
43
|
+
/**
|
|
44
|
+
* Lazy get - loads config if not already loaded
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* const port = await config.lazyGet("server");
|
|
48
|
+
*
|
|
49
|
+
* @param key - Config key (supports dot notation), autocompletes for first level only
|
|
50
|
+
* @param defaultValue - Default value if config key is undefined
|
|
51
|
+
* @returns The config value
|
|
52
|
+
*/
|
|
53
|
+
lazyGet<Key extends keyof WarlockConfig>(key: Key, defaultValue?: WarlockConfig[Key]): Promise<WarlockConfig[Key]>;
|
|
54
|
+
/**
|
|
55
|
+
* Check if config is loaded
|
|
56
|
+
*/
|
|
57
|
+
get isLoaded(): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Get the entire config object
|
|
60
|
+
*
|
|
61
|
+
* @throws Error if config is not loaded
|
|
62
|
+
*/
|
|
63
|
+
getAll(): WarlockConfig;
|
|
64
|
+
/**
|
|
65
|
+
* Reload config (useful for HMR/development)
|
|
66
|
+
*/
|
|
67
|
+
reload(): Promise<void>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Exported singleton instance
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* import { warlockConfig } from "@warlock.js/core";
|
|
74
|
+
*
|
|
75
|
+
* // Lazy load and get value
|
|
76
|
+
* const port = await warlockConfig.lazyGet("server.port");
|
|
77
|
+
*
|
|
78
|
+
* // Or load first, then get
|
|
79
|
+
* await warlockConfig.load();
|
|
80
|
+
* const commands = warlockConfig.get("cli.commands");
|
|
81
|
+
*/
|
|
82
|
+
export declare const warlockConfigManager: WarlockConfigManager;
|
|
83
|
+
//# sourceMappingURL=warlock-config.manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warlock-config.manager.d.ts","sourceRoot":"","sources":["../../src/warlock-config/warlock-config.manager.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC;;;;;GAKG;AACH,qBAAa,oBAAoB;IAC/B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,CAAgB;IAE/B;;OAEG;IACH,OAAO,CAAC,OAAO,CAAC,CAAqC;IAErD;;;;OAIG;IACU,IAAI,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;IAmBvD;;OAEG;YACW,MAAM;IA2BpB;;OAEG;cACa,OAAO;IAYvB;;;;;;;;;;OAUG;IACI,GAAG,CAAC,GAAG,SAAS,MAAM,aAAa,EACxC,GAAG,EAAE,GAAG,EACR,YAAY,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,GAChC,aAAa,CAAC,GAAG,CAAC;IAQrB;;;;;;;;;OASG;IACG,OAAO,CAAC,GAAG,SAAS,MAAM,aAAa,EAC3C,GAAG,EAAE,GAAG,EACR,YAAY,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,GAChC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAK9B;;OAEG;IACH,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAED;;;;OAIG;IACI,MAAM,IAAI,aAAa;IAQ9B;;OAEG;IACU,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAKrC;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oBAAoB,sBAA6B,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import {fileExistsAsync,getFileAsync,putFileAsync}from'@mongez/fs';import {get}from'@mongez/reinforcements';import {pathToFileURL}from'url';import {devLogWarn}from'../dev-server/dev-logger.js';import'@warlock.js/logger';import'../database/models/database-log/database-log.js';import'../http/context/request-context.js';import {warlockPath,rootPath}from'../utils/paths.js';import'@mongez/slug';import'@mongez/supportive-is';import {transpile}from'../dev-server/transpile-file.js';/**
|
|
2
|
+
* Warlock Config Manager
|
|
3
|
+
*
|
|
4
|
+
* Manages lazy loading of the pre-compiled warlock.config.js file
|
|
5
|
+
* from the .warlock/cache directory.
|
|
6
|
+
*/
|
|
7
|
+
class WarlockConfigManager {
|
|
8
|
+
/**
|
|
9
|
+
* Cached config instance
|
|
10
|
+
*/
|
|
11
|
+
config;
|
|
12
|
+
/**
|
|
13
|
+
* Loading promise to prevent duplicate loads
|
|
14
|
+
*/
|
|
15
|
+
loading;
|
|
16
|
+
/**
|
|
17
|
+
* Load warlock.config.js (cached after first load)
|
|
18
|
+
*
|
|
19
|
+
* @returns The resolved Warlock configuration
|
|
20
|
+
*/
|
|
21
|
+
async load() {
|
|
22
|
+
// Already loaded
|
|
23
|
+
if (this.config) {
|
|
24
|
+
return this.config;
|
|
25
|
+
}
|
|
26
|
+
// Currently loading (prevent duplicate loads)
|
|
27
|
+
if (this.loading) {
|
|
28
|
+
return this.loading;
|
|
29
|
+
}
|
|
30
|
+
// Start loading
|
|
31
|
+
this.loading = this.doLoad();
|
|
32
|
+
this.config = await this.loading;
|
|
33
|
+
this.loading = undefined;
|
|
34
|
+
return this.config;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Internal load implementation
|
|
38
|
+
*/
|
|
39
|
+
async doLoad() {
|
|
40
|
+
const configPath = warlockPath("cache/warlock-config.js");
|
|
41
|
+
// if (!(await fileExistsAsync(configPath))) {
|
|
42
|
+
const result = await this.compile();
|
|
43
|
+
if (!result) {
|
|
44
|
+
devLogWarn("warlock.config.ts is missing, it's highly recommended to create it, run warlock init to create it");
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
// }
|
|
48
|
+
const fileUrl = pathToFileURL(configPath).href;
|
|
49
|
+
try {
|
|
50
|
+
const configModule = await import(fileUrl);
|
|
51
|
+
return configModule.default;
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
throw new Error(`Failed to load warlock.config.js from ${fileUrl}. ` +
|
|
55
|
+
`Make sure the config has been compiled. Error: ${error}`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Compile warlock.config.ts file
|
|
60
|
+
*/
|
|
61
|
+
async compile() {
|
|
62
|
+
const configPath = rootPath("warlock.config.ts");
|
|
63
|
+
if (!(await fileExistsAsync(configPath))) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
const content = await getFileAsync(configPath);
|
|
67
|
+
const compiledContent = await transpile(content, configPath);
|
|
68
|
+
await putFileAsync(warlockPath("cache/warlock-config.js"), compiledContent);
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Get config value by key (dot notation supported)
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* config.get("server.port") // Returns 3000
|
|
76
|
+
* config.get("cli.commands") // Returns array of commands
|
|
77
|
+
*
|
|
78
|
+
* @param key - Config key (supports dot notation), autocompletes for first level only
|
|
79
|
+
* @returns The config value
|
|
80
|
+
* @throws Error if config is not loaded
|
|
81
|
+
*/
|
|
82
|
+
get(key, defaultValue) {
|
|
83
|
+
if (!this.config) {
|
|
84
|
+
throw new Error("WarlockConfig not loaded. Call load() first or use lazyGet().");
|
|
85
|
+
}
|
|
86
|
+
return get(this.config, key, defaultValue);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Lazy get - loads config if not already loaded
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* const port = await config.lazyGet("server");
|
|
93
|
+
*
|
|
94
|
+
* @param key - Config key (supports dot notation), autocompletes for first level only
|
|
95
|
+
* @param defaultValue - Default value if config key is undefined
|
|
96
|
+
* @returns The config value
|
|
97
|
+
*/
|
|
98
|
+
async lazyGet(key, defaultValue) {
|
|
99
|
+
await this.load();
|
|
100
|
+
return this.get(key, defaultValue);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Check if config is loaded
|
|
104
|
+
*/
|
|
105
|
+
get isLoaded() {
|
|
106
|
+
return this.config !== undefined;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Get the entire config object
|
|
110
|
+
*
|
|
111
|
+
* @throws Error if config is not loaded
|
|
112
|
+
*/
|
|
113
|
+
getAll() {
|
|
114
|
+
if (!this.config) {
|
|
115
|
+
throw new Error("WarlockConfig not loaded. Call load() first or use lazyGet().");
|
|
116
|
+
}
|
|
117
|
+
return this.config;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Reload config (useful for HMR/development)
|
|
121
|
+
*/
|
|
122
|
+
async reload() {
|
|
123
|
+
this.config = undefined;
|
|
124
|
+
this.loading = undefined;
|
|
125
|
+
await this.load();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Exported singleton instance
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* import { warlockConfig } from "@warlock.js/core";
|
|
133
|
+
*
|
|
134
|
+
* // Lazy load and get value
|
|
135
|
+
* const port = await warlockConfig.lazyGet("server.port");
|
|
136
|
+
*
|
|
137
|
+
* // Or load first, then get
|
|
138
|
+
* await warlockConfig.load();
|
|
139
|
+
* const commands = warlockConfig.get("cli.commands");
|
|
140
|
+
*/
|
|
141
|
+
const warlockConfigManager = new WarlockConfigManager();export{WarlockConfigManager,warlockConfigManager};//# sourceMappingURL=warlock-config.manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warlock-config.manager.js","sources":["../../src/warlock-config/warlock-config.manager.ts"],"sourcesContent":[null],"names":[],"mappings":"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"}
|