@warlock.js/core 4.0.162 → 4.0.163
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,120 @@
|
|
|
1
|
+
import { type Router } from "./router";
|
|
2
|
+
import type { RequestHandlerType, RouteOptions } from "./types";
|
|
3
|
+
export declare class RouteBuilder {
|
|
4
|
+
private readonly router;
|
|
5
|
+
private readonly path;
|
|
6
|
+
private readonly moreOptions;
|
|
7
|
+
protected addedRoutes: {
|
|
8
|
+
get: boolean;
|
|
9
|
+
post: boolean;
|
|
10
|
+
put: boolean;
|
|
11
|
+
delete: boolean;
|
|
12
|
+
patch: boolean;
|
|
13
|
+
options: boolean;
|
|
14
|
+
head: boolean;
|
|
15
|
+
};
|
|
16
|
+
constructor(router: Router, path: string, moreOptions?: RouteOptions);
|
|
17
|
+
/**
|
|
18
|
+
* Add a get method to the route
|
|
19
|
+
*/
|
|
20
|
+
get(handler: RequestHandlerType, options?: RouteOptions): this;
|
|
21
|
+
/**
|
|
22
|
+
* Get one resource, appends /:id to the path
|
|
23
|
+
* For example: /posts/:id
|
|
24
|
+
*/
|
|
25
|
+
getOne(handler: RequestHandlerType, options?: RouteOptions): this;
|
|
26
|
+
/**
|
|
27
|
+
* Add a post method to the route
|
|
28
|
+
*/
|
|
29
|
+
post(handler: RequestHandlerType, options?: RouteOptions): this;
|
|
30
|
+
/**
|
|
31
|
+
* Post one resource, appends /:id to the path
|
|
32
|
+
* For example: /posts/:id
|
|
33
|
+
*/
|
|
34
|
+
postOne(handler: RequestHandlerType, options?: RouteOptions): this;
|
|
35
|
+
/**
|
|
36
|
+
* Add a PUT request handler for current path
|
|
37
|
+
*/
|
|
38
|
+
put(handler: RequestHandlerType, options?: RouteOptions): this;
|
|
39
|
+
/**
|
|
40
|
+
* Update one resource, appends /:id to the path
|
|
41
|
+
*/
|
|
42
|
+
updateOne(handler: RequestHandlerType, options?: RouteOptions): this;
|
|
43
|
+
/**
|
|
44
|
+
* Add a PATCH request handler for current path
|
|
45
|
+
*/
|
|
46
|
+
patch(handler: RequestHandlerType, options?: RouteOptions): this;
|
|
47
|
+
/**
|
|
48
|
+
* Patch one resource, appends /:id to the path
|
|
49
|
+
*/
|
|
50
|
+
patchOne(handler: RequestHandlerType, options?: RouteOptions): this;
|
|
51
|
+
/**
|
|
52
|
+
* Add a DELETE request handler for current path
|
|
53
|
+
*/
|
|
54
|
+
delete(handler: RequestHandlerType, options?: RouteOptions): this;
|
|
55
|
+
/**
|
|
56
|
+
* Delete one resource, appends /:id to the path
|
|
57
|
+
*/
|
|
58
|
+
deleteOne(handler: RequestHandlerType, options?: RouteOptions): this;
|
|
59
|
+
/**
|
|
60
|
+
* List all resources (RESTful alias for GET collection)
|
|
61
|
+
* @example router.route("/posts").list(listPosts)
|
|
62
|
+
*/
|
|
63
|
+
list(handler: RequestHandlerType, options?: RouteOptions): this;
|
|
64
|
+
/**
|
|
65
|
+
* Create a new resource (RESTful alias for POST)
|
|
66
|
+
* @example router.route("/posts").create(createPost)
|
|
67
|
+
*/
|
|
68
|
+
create(handler: RequestHandlerType, options?: RouteOptions): this;
|
|
69
|
+
/**
|
|
70
|
+
* Show a single resource (RESTful alias for GET one)
|
|
71
|
+
* @example router.route("/posts").show(showPost) // GET /posts/:id
|
|
72
|
+
*/
|
|
73
|
+
show(handler: RequestHandlerType, options?: RouteOptions): this;
|
|
74
|
+
/**
|
|
75
|
+
* Update a resource (RESTful alias for PUT one)
|
|
76
|
+
* @example router.route("/posts").update(updatePost) // PUT /posts/:id
|
|
77
|
+
*/
|
|
78
|
+
update(handler: RequestHandlerType, options?: RouteOptions): this;
|
|
79
|
+
/**
|
|
80
|
+
* Destroy a resource (RESTful alias for DELETE one)
|
|
81
|
+
* @example router.route("/posts").destroy(deletePost) // DELETE /posts/:id
|
|
82
|
+
*/
|
|
83
|
+
destroy(handler: RequestHandlerType, options?: RouteOptions): this;
|
|
84
|
+
/**
|
|
85
|
+
* Create a nested route builder
|
|
86
|
+
* Useful for building nested resources like /posts/:id/comments
|
|
87
|
+
* @example
|
|
88
|
+
* router.route("/posts/:id")
|
|
89
|
+
* .getOne(showPost)
|
|
90
|
+
* .nest("/comments")
|
|
91
|
+
* .list(listComments) // GET /posts/:id/comments
|
|
92
|
+
* .create(createComment); // POST /posts/:id/comments
|
|
93
|
+
*/
|
|
94
|
+
nest(path: string, options?: RouteOptions): RouteBuilder;
|
|
95
|
+
/**
|
|
96
|
+
* Set up common RESTful CRUD routes in one call
|
|
97
|
+
* @example
|
|
98
|
+
* router.route("/posts").crud({
|
|
99
|
+
* list: listPosts, // GET /posts
|
|
100
|
+
* create: createPost, // POST /posts
|
|
101
|
+
* show: showPost, // GET /posts/:id
|
|
102
|
+
* update: updatePost, // PUT /posts/:id
|
|
103
|
+
* destroy: deletePost, // DELETE /posts/:id
|
|
104
|
+
* patch: patchPost, // PATCH /posts/:id
|
|
105
|
+
* });
|
|
106
|
+
*/
|
|
107
|
+
crud(handlers: {
|
|
108
|
+
list?: RequestHandlerType;
|
|
109
|
+
create?: RequestHandlerType;
|
|
110
|
+
show?: RequestHandlerType;
|
|
111
|
+
update?: RequestHandlerType;
|
|
112
|
+
destroy?: RequestHandlerType;
|
|
113
|
+
patch?: RequestHandlerType;
|
|
114
|
+
}, options?: RouteOptions): this;
|
|
115
|
+
/**
|
|
116
|
+
* Merge options with moreOptions
|
|
117
|
+
*/
|
|
118
|
+
protected withOptions(options?: RouteOptions): any;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=route-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-builder.d.ts","sourceRoot":"","sources":["../../src/router/route-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEhE,qBAAa,YAAY;IAYrB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAb9B,SAAS,CAAC,WAAW;;;;;;;;MAQnB;gBAGiB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,WAAW,GAAE,YAAiB;IAKjD;;OAEG;IACI,GAAG,CAAC,OAAO,EAAE,kBAAkB,EAAE,OAAO,GAAE,YAAiB;IAUlE;;;OAGG;IACI,MAAM,CAAC,OAAO,EAAE,kBAAkB,EAAE,OAAO,GAAE,YAAiB;IAKrE;;OAEG;IACI,IAAI,CAAC,OAAO,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;QAC1B,MAAM,CAAC,EAAE,kBAAkB,CAAC;QAC5B,OAAO,CAAC,EAAE,kBAAkB,CAAC;QAC7B,KAAK,CAAC,EAAE,kBAAkB,CAAC;KAC5B,EACD,OAAO,GAAE,YAAiB;IAW5B;;OAEG;IACH,SAAS,CAAC,WAAW,CAAC,OAAO,GAAE,YAAiB;CAGjD"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import {merge}from'@mongez/reinforcements';class RouteBuilder {
|
|
2
|
+
router;
|
|
3
|
+
path;
|
|
4
|
+
moreOptions;
|
|
5
|
+
addedRoutes = {
|
|
6
|
+
get: false,
|
|
7
|
+
post: false,
|
|
8
|
+
put: false,
|
|
9
|
+
delete: false,
|
|
10
|
+
patch: false,
|
|
11
|
+
options: false,
|
|
12
|
+
head: false,
|
|
13
|
+
};
|
|
14
|
+
constructor(router, path, moreOptions = {}) {
|
|
15
|
+
this.router = router;
|
|
16
|
+
this.path = path;
|
|
17
|
+
this.moreOptions = moreOptions;
|
|
18
|
+
//
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Add a get method to the route
|
|
22
|
+
*/
|
|
23
|
+
get(handler, options = {}) {
|
|
24
|
+
if (this.addedRoutes.get) {
|
|
25
|
+
throw new Error(`Route ${this.path} already has a GET method`);
|
|
26
|
+
}
|
|
27
|
+
this.addedRoutes.get = true;
|
|
28
|
+
this.router.get(this.path, handler, this.withOptions(options));
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get one resource, appends /:id to the path
|
|
33
|
+
* For example: /posts/:id
|
|
34
|
+
*/
|
|
35
|
+
getOne(handler, options = {}) {
|
|
36
|
+
this.router.get(`${this.path}/:id`, handler, this.withOptions(options));
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Add a post method to the route
|
|
41
|
+
*/
|
|
42
|
+
post(handler, options = {}) {
|
|
43
|
+
if (this.addedRoutes.post) {
|
|
44
|
+
throw new Error(`Route ${this.path} already has a POST method`);
|
|
45
|
+
}
|
|
46
|
+
this.addedRoutes.post = true;
|
|
47
|
+
this.router.post(this.path, handler, this.withOptions(options));
|
|
48
|
+
return this;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Post one resource, appends /:id to the path
|
|
52
|
+
* For example: /posts/:id
|
|
53
|
+
*/
|
|
54
|
+
postOne(handler, options = {}) {
|
|
55
|
+
this.router.post(`${this.path}/:id`, handler, this.withOptions(options));
|
|
56
|
+
return this;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Add a PUT request handler for current path
|
|
60
|
+
*/
|
|
61
|
+
put(handler, options = {}) {
|
|
62
|
+
if (this.addedRoutes.put) {
|
|
63
|
+
throw new Error(`Route ${this.path} already has a PUT method`);
|
|
64
|
+
}
|
|
65
|
+
this.addedRoutes.put = true;
|
|
66
|
+
this.router.put(this.path, handler, this.withOptions(options));
|
|
67
|
+
return this;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Update one resource, appends /:id to the path
|
|
71
|
+
*/
|
|
72
|
+
updateOne(handler, options = {}) {
|
|
73
|
+
this.router.put(`${this.path}/:id`, handler, this.withOptions(options));
|
|
74
|
+
return this;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Add a PATCH request handler for current path
|
|
78
|
+
*/
|
|
79
|
+
patch(handler, options = {}) {
|
|
80
|
+
if (this.addedRoutes.patch) {
|
|
81
|
+
throw new Error(`Route ${this.path} already has a PATCH method`);
|
|
82
|
+
}
|
|
83
|
+
this.addedRoutes.patch = true;
|
|
84
|
+
this.router.patch(this.path, handler, this.withOptions(options));
|
|
85
|
+
return this;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Patch one resource, appends /:id to the path
|
|
89
|
+
*/
|
|
90
|
+
patchOne(handler, options = {}) {
|
|
91
|
+
this.router.patch(`${this.path}/:id`, handler, this.withOptions(options));
|
|
92
|
+
return this;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Add a DELETE request handler for current path
|
|
96
|
+
*/
|
|
97
|
+
delete(handler, options = {}) {
|
|
98
|
+
if (this.addedRoutes.delete) {
|
|
99
|
+
throw new Error(`Route ${this.path} already has a DELETE method`);
|
|
100
|
+
}
|
|
101
|
+
this.addedRoutes.delete = true;
|
|
102
|
+
this.router.delete(this.path, handler, this.withOptions(options));
|
|
103
|
+
return this;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Delete one resource, appends /:id to the path
|
|
107
|
+
*/
|
|
108
|
+
deleteOne(handler, options = {}) {
|
|
109
|
+
this.router.delete(`${this.path}/:id`, handler, this.withOptions(options));
|
|
110
|
+
return this;
|
|
111
|
+
}
|
|
112
|
+
// ============================================================================
|
|
113
|
+
// RESTful Semantic Aliases
|
|
114
|
+
// ============================================================================
|
|
115
|
+
/**
|
|
116
|
+
* List all resources (RESTful alias for GET collection)
|
|
117
|
+
* @example router.route("/posts").list(listPosts)
|
|
118
|
+
*/
|
|
119
|
+
list(handler, options = {}) {
|
|
120
|
+
return this.get(handler, options);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Create a new resource (RESTful alias for POST)
|
|
124
|
+
* @example router.route("/posts").create(createPost)
|
|
125
|
+
*/
|
|
126
|
+
create(handler, options = {}) {
|
|
127
|
+
return this.post(handler, options);
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Show a single resource (RESTful alias for GET one)
|
|
131
|
+
* @example router.route("/posts").show(showPost) // GET /posts/:id
|
|
132
|
+
*/
|
|
133
|
+
show(handler, options = {}) {
|
|
134
|
+
return this.getOne(handler, options);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Update a resource (RESTful alias for PUT one)
|
|
138
|
+
* @example router.route("/posts").update(updatePost) // PUT /posts/:id
|
|
139
|
+
*/
|
|
140
|
+
update(handler, options = {}) {
|
|
141
|
+
return this.updateOne(handler, options);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Destroy a resource (RESTful alias for DELETE one)
|
|
145
|
+
* @example router.route("/posts").destroy(deletePost) // DELETE /posts/:id
|
|
146
|
+
*/
|
|
147
|
+
destroy(handler, options = {}) {
|
|
148
|
+
return this.deleteOne(handler, options);
|
|
149
|
+
}
|
|
150
|
+
// ============================================================================
|
|
151
|
+
// Route Nesting
|
|
152
|
+
// ============================================================================
|
|
153
|
+
/**
|
|
154
|
+
* Create a nested route builder
|
|
155
|
+
* Useful for building nested resources like /posts/:id/comments
|
|
156
|
+
* @example
|
|
157
|
+
* router.route("/posts/:id")
|
|
158
|
+
* .getOne(showPost)
|
|
159
|
+
* .nest("/comments")
|
|
160
|
+
* .list(listComments) // GET /posts/:id/comments
|
|
161
|
+
* .create(createComment); // POST /posts/:id/comments
|
|
162
|
+
*/
|
|
163
|
+
nest(path, options = {}) {
|
|
164
|
+
const nestedPath = `${this.path}${path}`;
|
|
165
|
+
const mergedOptions = this.withOptions(options);
|
|
166
|
+
return new RouteBuilder(this.router, nestedPath, mergedOptions);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Set up common RESTful CRUD routes in one call
|
|
170
|
+
* @example
|
|
171
|
+
* router.route("/posts").crud({
|
|
172
|
+
* list: listPosts, // GET /posts
|
|
173
|
+
* create: createPost, // POST /posts
|
|
174
|
+
* show: showPost, // GET /posts/:id
|
|
175
|
+
* update: updatePost, // PUT /posts/:id
|
|
176
|
+
* destroy: deletePost, // DELETE /posts/:id
|
|
177
|
+
* patch: patchPost, // PATCH /posts/:id
|
|
178
|
+
* });
|
|
179
|
+
*/
|
|
180
|
+
crud(handlers, options = {}) {
|
|
181
|
+
if (handlers.list)
|
|
182
|
+
this.get(handlers.list, options);
|
|
183
|
+
if (handlers.create)
|
|
184
|
+
this.post(handlers.create, options);
|
|
185
|
+
if (handlers.show)
|
|
186
|
+
this.getOne(handlers.show, options);
|
|
187
|
+
if (handlers.update)
|
|
188
|
+
this.updateOne(handlers.update, options);
|
|
189
|
+
if (handlers.destroy)
|
|
190
|
+
this.deleteOne(handlers.destroy, options);
|
|
191
|
+
if (handlers.patch)
|
|
192
|
+
this.patchOne(handlers.patch, options);
|
|
193
|
+
return this;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Merge options with moreOptions
|
|
197
|
+
*/
|
|
198
|
+
withOptions(options = {}) {
|
|
199
|
+
return merge(this.moreOptions, options);
|
|
200
|
+
}
|
|
201
|
+
}export{RouteBuilder};//# sourceMappingURL=route-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-builder.js","sources":["../../src/router/route-builder.ts"],"sourcesContent":[null],"names":[],"mappings":"iDAIa,YAAY,CAAA;AAYJ,IAAA,MAAA,CAAA;AACA,IAAA,IAAA,CAAA;AACA,IAAA,WAAA,CAAA;AAbT,IAAA,WAAW,GAAG;AACtB,QAAA,GAAG,EAAE,KAAK;AACV,QAAA,IAAI,EAAE,KAAK;AACX,QAAA,GAAG,EAAE,KAAK;AACV,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,KAAK,EAAE,KAAK;AACZ,QAAA,OAAO,EAAE,KAAK;AACd,QAAA,IAAI,EAAE,KAAK;KACZ,CAAC;AAEF,IAAA,WAAA,CACmB,MAAc,EACd,IAAY,EACZ,cAA4B,EAAE,EAAA;QAF9B,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACd,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAQ;QACZ,IAAW,CAAA,WAAA,GAAX,WAAW,CAAmB;;KAGhD;AAED;;AAEG;AACI,IAAA,GAAG,CAAC,OAA2B,EAAE,OAAA,GAAwB,EAAE,EAAA;AAChE,QAAA,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE;YACxB,MAAM,IAAI,KAAK,CAAC,CAAA,MAAA,EAAS,IAAI,CAAC,IAAI,CAA2B,yBAAA,CAAA,CAAC,CAAC;AAChE,SAAA;AAED,QAAA,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SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9D,IAAI,QAAQ,CAAC,OAAO;YAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAChE,IAAI,QAAQ,CAAC,KAAK;YAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC3D,QAAA,OAAO,IAAI,CAAC;KACb;AAED;;AAEG;IACO,WAAW,CAAC,UAAwB,EAAE,EAAA;QAC9C,OAAO,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;KACzC;AACF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Route } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Route Registry
|
|
4
|
+
* Manages dynamic route matching using find-my-way for HMR support
|
|
5
|
+
*/
|
|
6
|
+
export declare class RouteRegistry {
|
|
7
|
+
private router;
|
|
8
|
+
constructor();
|
|
9
|
+
/**
|
|
10
|
+
* Register all routes from the router's internal list
|
|
11
|
+
*/
|
|
12
|
+
register(routes: Route[]): void;
|
|
13
|
+
/**
|
|
14
|
+
* Register a single route
|
|
15
|
+
*/
|
|
16
|
+
registerRoute(route: Route): void;
|
|
17
|
+
/**
|
|
18
|
+
* Find a matching route for the given method and URL
|
|
19
|
+
* @returns Matched route with extracted params, or null if no match
|
|
20
|
+
*/
|
|
21
|
+
find(method: string, url: string): {
|
|
22
|
+
route: Route;
|
|
23
|
+
params: Record<string, string>;
|
|
24
|
+
} | null;
|
|
25
|
+
/**
|
|
26
|
+
* Get all registered routes count (for debugging)
|
|
27
|
+
*/
|
|
28
|
+
getRouteCount(): number;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=route-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-registry.d.ts","sourceRoot":"","sources":["../../src/router/route-registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;;GAGG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAgB;;IAS9B;;OAEG;IACI,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI;IAmBtC;;OAEG;IACI,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAOxC;;;OAGG;IACI,IAAI,CACT,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,GACV;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,IAAI;IAe1D;;OAEG;IACI,aAAa,IAAI,MAAM;CAM/B"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import FindMyWay from'find-my-way';/**
|
|
2
|
+
* Route Registry
|
|
3
|
+
* Manages dynamic route matching using find-my-way for HMR support
|
|
4
|
+
*/
|
|
5
|
+
class RouteRegistry {
|
|
6
|
+
router;
|
|
7
|
+
constructor() {
|
|
8
|
+
this.router = FindMyWay({
|
|
9
|
+
ignoreTrailingSlash: true,
|
|
10
|
+
caseSensitive: false,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Register all routes from the router's internal list
|
|
15
|
+
*/
|
|
16
|
+
register(routes) {
|
|
17
|
+
// Register each route
|
|
18
|
+
for (const route of routes) {
|
|
19
|
+
if (route.method === "all") {
|
|
20
|
+
this.registerRoute({
|
|
21
|
+
...route,
|
|
22
|
+
method: "GET",
|
|
23
|
+
});
|
|
24
|
+
this.registerRoute({
|
|
25
|
+
...route,
|
|
26
|
+
method: "POST",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
this.registerRoute(route);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Register a single route
|
|
36
|
+
*/
|
|
37
|
+
registerRoute(route) {
|
|
38
|
+
this.router.on(route.method, route.path, (req, res, params) => {
|
|
39
|
+
// Store the route and params for later use
|
|
40
|
+
return { route, params };
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Find a matching route for the given method and URL
|
|
45
|
+
* @returns Matched route with extracted params, or null if no match
|
|
46
|
+
*/
|
|
47
|
+
find(method, url) {
|
|
48
|
+
// Strip query string from URL (find-my-way expects just the path)
|
|
49
|
+
const path = url.split("?")[0];
|
|
50
|
+
const match = this.router.find(method, path);
|
|
51
|
+
if (!match) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
// find-my-way handler expects (req, res, params, store, searchParams)
|
|
55
|
+
// We only care about the return value which contains { route, params }
|
|
56
|
+
return match.handler(null, null, match.params, match.store, {});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Get all registered routes count (for debugging)
|
|
60
|
+
*/
|
|
61
|
+
getRouteCount() {
|
|
62
|
+
return this.router
|
|
63
|
+
.prettyPrint()
|
|
64
|
+
.split("\n")
|
|
65
|
+
.filter((line) => line.trim()).length;
|
|
66
|
+
}
|
|
67
|
+
}export{RouteRegistry};//# sourceMappingURL=route-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-registry.js","sources":["../../src/router/route-registry.ts"],"sourcesContent":[null],"names":[],"mappings":"mCAGA;;;AAGG;MACU,aAAa,CAAA;AAChB,IAAA,MAAM,CAAgB;AAE9B,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;AACtB,YAAA,mBAAmB,EAAE,IAAI;AACzB,YAAA,aAAa,EAAE,KAAK;AACrB,SAAA,CAAC,CAAC;KACJ;AAED;;AAEG;AACI,IAAA,QAAQ,CAAC,MAAe,EAAA;;AAE7B,QAAA,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;AAC1B,YAAA,IAAI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AAK,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;KACzC;AACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Route as RouteData } from "./types";
|
|
2
|
+
export declare class Route {
|
|
3
|
+
data: RouteData;
|
|
4
|
+
constructor(data: RouteData);
|
|
5
|
+
/**
|
|
6
|
+
* Set route name
|
|
7
|
+
*/
|
|
8
|
+
name(name: string): this;
|
|
9
|
+
/**
|
|
10
|
+
* Set route middleware
|
|
11
|
+
*/
|
|
12
|
+
middleware(middleware: RouteData["middleware"]): this;
|
|
13
|
+
/**
|
|
14
|
+
* Set route description
|
|
15
|
+
*/
|
|
16
|
+
description(description: string): this;
|
|
17
|
+
/**
|
|
18
|
+
* Set route label
|
|
19
|
+
*/
|
|
20
|
+
label(label: string): this;
|
|
21
|
+
/**
|
|
22
|
+
* Set route path
|
|
23
|
+
*/
|
|
24
|
+
path(path: string): this;
|
|
25
|
+
/**
|
|
26
|
+
* Set route method
|
|
27
|
+
*/
|
|
28
|
+
method(method: RouteData["method"]): this;
|
|
29
|
+
/**
|
|
30
|
+
* Set route handler
|
|
31
|
+
*/
|
|
32
|
+
handler(handler: RouteData["handler"]): this;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../src/router/route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,SAAS,CAAC;AAElD,qBAAa,KAAK;IACU,IAAI,EAAE,SAAS;gBAAf,IAAI,EAAE,SAAS;IAEzC;;OAEG;IACI,IAAI,CAAC,IAAI,EAAE,MAAM;IAMxB;;OAEG;IACI,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC,YAAY,CAAC;IAMrD;;OAEG;IACI,WAAW,CAAC,WAAW,EAAE,MAAM;IAMtC;;OAEG;IACI,KAAK,CAAC,KAAK,EAAE,MAAM;IAM1B;;OAEG;IACI,IAAI,CAAC,IAAI,EAAE,MAAM;IAMxB;;OAEG;IACI,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC;IAMzC;;OAEG;IACI,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC;CAK7C"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { type FastifyHttpProxyOptions } from "@fastify/http-proxy";
|
|
2
|
+
import { type FastifyStaticOptions } from "@fastify/static";
|
|
3
|
+
import { type FastifyInstance } from "../http/server";
|
|
4
|
+
import { RouteBuilder } from "./route-builder";
|
|
5
|
+
import type { GroupedRoutesOptions, RequestHandler, RequestHandlerType, ResourceMethod, Route, RouteOptions, RouteResource, RouterGroupCallback, RouterStacks } from "./types";
|
|
6
|
+
export declare class Router {
|
|
7
|
+
/**
|
|
8
|
+
* Routes list
|
|
9
|
+
*/
|
|
10
|
+
private routes;
|
|
11
|
+
/**
|
|
12
|
+
* Router Instance
|
|
13
|
+
*/
|
|
14
|
+
private static instance;
|
|
15
|
+
/**
|
|
16
|
+
* Static paths
|
|
17
|
+
*/
|
|
18
|
+
protected staticDirectories: FastifyStaticOptions[];
|
|
19
|
+
/**
|
|
20
|
+
* Event listeners
|
|
21
|
+
*/
|
|
22
|
+
protected eventListeners: Record<string, ((router: Router, server: FastifyInstance) => void)[]>;
|
|
23
|
+
/**
|
|
24
|
+
* Stacks
|
|
25
|
+
* Stacks will be used for grouping routes to add prefix, name or middleware
|
|
26
|
+
*/
|
|
27
|
+
protected stacks: RouterStacks;
|
|
28
|
+
/**
|
|
29
|
+
* Get router instance
|
|
30
|
+
*/
|
|
31
|
+
static getInstance(): Router;
|
|
32
|
+
private constructor();
|
|
33
|
+
/**
|
|
34
|
+
* Listen to router before scan
|
|
35
|
+
*/
|
|
36
|
+
beforeScanning(callback: (router: Router, server: FastifyInstance) => void): this;
|
|
37
|
+
/**
|
|
38
|
+
* Listen to router after scanning
|
|
39
|
+
*/
|
|
40
|
+
afterScanning(callback: (router: Router, server: FastifyInstance) => void): this;
|
|
41
|
+
/**
|
|
42
|
+
* Redirect path to another path
|
|
43
|
+
*/
|
|
44
|
+
redirect(from: string, to: string, redirectMode?: "temporary" | "permanent"): this;
|
|
45
|
+
/**
|
|
46
|
+
* Server static folder
|
|
47
|
+
*/
|
|
48
|
+
directory(options: FastifyStaticOptions): this;
|
|
49
|
+
/**
|
|
50
|
+
* Serve file
|
|
51
|
+
*/
|
|
52
|
+
file(path: string, location: string, cacheTime?: number): this;
|
|
53
|
+
/**
|
|
54
|
+
* Serve cached file, it will cache the file to 1 year by default
|
|
55
|
+
*/
|
|
56
|
+
cachedFile(path: string, location: string, cacheTime?: number): this;
|
|
57
|
+
/**
|
|
58
|
+
* Serve list of files
|
|
59
|
+
*/
|
|
60
|
+
files(files: Record<string, string>, cacheTime?: number): void;
|
|
61
|
+
/**
|
|
62
|
+
* Serve list of cached files, it will cache the file to 1 year by default
|
|
63
|
+
*/
|
|
64
|
+
cachedFiles(files: Record<string, string>, cacheTime?: number): void;
|
|
65
|
+
/**
|
|
66
|
+
* Add proxy route
|
|
67
|
+
*/
|
|
68
|
+
proxy(path: string, baseUrl: string, options?: Omit<FastifyHttpProxyOptions, "prefix" | "upstream">): this;
|
|
69
|
+
proxy(options: FastifyHttpProxyOptions): this;
|
|
70
|
+
/**
|
|
71
|
+
* Add route to routes list
|
|
72
|
+
*/
|
|
73
|
+
add(method: Route["method"], path: string | string[], handler: RequestHandlerType, options?: RouteOptions): this;
|
|
74
|
+
/**
|
|
75
|
+
* Add a request that accepts all methods
|
|
76
|
+
*/
|
|
77
|
+
any(path: string, handler: RequestHandlerType, options?: RouteOptions): this;
|
|
78
|
+
/**
|
|
79
|
+
* Add get request method
|
|
80
|
+
*/
|
|
81
|
+
get(path: string, handler: RequestHandlerType, options?: RouteOptions): this;
|
|
82
|
+
/**
|
|
83
|
+
* Add post request method
|
|
84
|
+
*/
|
|
85
|
+
post(path: string | string[], handler: RequestHandlerType, options?: RouteOptions): this;
|
|
86
|
+
/**
|
|
87
|
+
* Add put request method
|
|
88
|
+
*/
|
|
89
|
+
put(path: string, handler: RequestHandlerType, options?: RouteOptions): this;
|
|
90
|
+
/**
|
|
91
|
+
* Add delete request method
|
|
92
|
+
*/
|
|
93
|
+
delete(path: string | string[], handler: RequestHandlerType, options?: RouteOptions): this;
|
|
94
|
+
/**
|
|
95
|
+
* Add patch request method
|
|
96
|
+
*/
|
|
97
|
+
patch(path: string, handler: RequestHandlerType, options?: RouteOptions): this;
|
|
98
|
+
/**
|
|
99
|
+
* Add head request method
|
|
100
|
+
*/
|
|
101
|
+
head(path: string, handler: RequestHandlerType, options?: RouteOptions): this;
|
|
102
|
+
/**
|
|
103
|
+
* Add options request method
|
|
104
|
+
*/
|
|
105
|
+
options(path: string, handler: RequestHandlerType, options?: RouteOptions): this;
|
|
106
|
+
/**
|
|
107
|
+
* Get a chainable route builder for the same route path
|
|
108
|
+
*/
|
|
109
|
+
route(path: string, options?: RouteOptions): RouteBuilder;
|
|
110
|
+
/**
|
|
111
|
+
* Add full restful resource routes
|
|
112
|
+
* This method will generate the following routes:
|
|
113
|
+
* 1. GET /path: list all resources
|
|
114
|
+
* 2. GET /path/:id: get a single resource
|
|
115
|
+
* 3. POST /path: create a new resource
|
|
116
|
+
* 4. PUT /path/:id: update a resource
|
|
117
|
+
* 5. DELETE /path/:id: delete a resource
|
|
118
|
+
* 6. PATCH /path/:id: update a resource partially
|
|
119
|
+
*/
|
|
120
|
+
restfulResource(path: string, resource: RouteResource, options?: RouteOptions & {
|
|
121
|
+
only?: ResourceMethod[];
|
|
122
|
+
except?: ResourceMethod[];
|
|
123
|
+
replace?: Partial<Record<ResourceMethod, RequestHandler>> & {
|
|
124
|
+
bulkDelete?: RequestHandler;
|
|
125
|
+
};
|
|
126
|
+
}): this;
|
|
127
|
+
/**
|
|
128
|
+
* Group routes with options
|
|
129
|
+
*/
|
|
130
|
+
group(options: GroupedRoutesOptions, callback: RouterGroupCallback): this;
|
|
131
|
+
/**
|
|
132
|
+
* Add prefix to all routes in the given callback
|
|
133
|
+
*/
|
|
134
|
+
prefix(prefix: string, callback: () => void): this;
|
|
135
|
+
/**
|
|
136
|
+
* Add API version prefix to all routes in the given callback
|
|
137
|
+
* Automatically formats the version as /v{version}
|
|
138
|
+
* @example
|
|
139
|
+
* router.version("1", () => {
|
|
140
|
+
* router.get("/users", getUsersV1); // /v1/users
|
|
141
|
+
* });
|
|
142
|
+
*
|
|
143
|
+
* router.version("2", () => {
|
|
144
|
+
* router.get("/users", getUsersV2); // /v2/users
|
|
145
|
+
* });
|
|
146
|
+
*/
|
|
147
|
+
version(version: string | number, callback: () => void): this;
|
|
148
|
+
/**
|
|
149
|
+
* Wrap route additions with a source file path
|
|
150
|
+
* Used for tracking which routes come from which file (for HMR)
|
|
151
|
+
* @param sourceFile Relative path to the source file (e.g., "src/app/users/routes.ts")
|
|
152
|
+
* @param callback Function that adds routes (will have sourceFile injected)
|
|
153
|
+
*/
|
|
154
|
+
withSourceFile<T = any>(sourceFile: string, callback: () => T | Promise<T>): Promise<T | undefined>;
|
|
155
|
+
/**
|
|
156
|
+
* Remove all routes that belong to a specific source file
|
|
157
|
+
* Used when reloading routes files via HMR
|
|
158
|
+
* @param sourceFile Relative path to the source file
|
|
159
|
+
*/
|
|
160
|
+
removeRoutesBySourceFile(sourceFile: string): void;
|
|
161
|
+
/**
|
|
162
|
+
* Manage validation system for the given resource
|
|
163
|
+
*/
|
|
164
|
+
private manageValidation;
|
|
165
|
+
/**
|
|
166
|
+
* Get all routes list
|
|
167
|
+
*/
|
|
168
|
+
list(): Route[];
|
|
169
|
+
/**
|
|
170
|
+
* Register routes to the server
|
|
171
|
+
*/
|
|
172
|
+
scan(server: FastifyInstance): void;
|
|
173
|
+
/**
|
|
174
|
+
* Scan routes for the development server
|
|
175
|
+
* Uses wildcard routing with find-my-way for HMR support
|
|
176
|
+
*/
|
|
177
|
+
scanDevServer(server: FastifyInstance): void;
|
|
178
|
+
/**
|
|
179
|
+
* Get the route path for the given route name
|
|
180
|
+
*/
|
|
181
|
+
getRoute(name: string, params?: any): string;
|
|
182
|
+
/**
|
|
183
|
+
* Handle the given route
|
|
184
|
+
*/
|
|
185
|
+
private handleRoute;
|
|
186
|
+
}
|
|
187
|
+
export declare const router: Router;
|
|
188
|
+
//# sourceMappingURL=router.d.ts.map
|