@warlock.js/core 4.0.10 → 4.0.15
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/cli/cli-commands.manager.js +344 -0
- package/esm/cli/cli-commands.manager.js.map +1 -0
- package/esm/cli/cli-commands.utils.js +182 -0
- package/esm/cli/cli-commands.utils.js.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/dev-server.command.js +17 -0
- package/esm/cli/commands/dev-server.command.js.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/typings-generator.command.js +40 -0
- package/esm/cli/commands/typings-generator.command.js.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.js +6 -0
- package/esm/cli/framework-cli-commands.js.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.js +2 -0
- package/esm/cli/start.js.map +1 -0
- package/esm/cli/string-similarity.js +57 -0
- package/esm/cli/string-similarity.js.map +1 -0
- package/esm/config/config-loader.js +82 -0
- package/esm/config/config-loader.js.map +1 -0
- package/esm/config/config-manager.js +25 -0
- package/esm/config/config-manager.js.map +1 -0
- package/esm/config/load-config-files.js +19 -0
- package/esm/config/load-config-files.js.map +1 -0
- package/esm/dev2-server/create-worker.js +37 -0
- package/esm/dev2-server/create-worker.js.map +1 -0
- package/esm/dev2-server/dependency-graph.js +266 -0
- package/esm/dev2-server/dependency-graph.js.map +1 -0
- package/esm/dev2-server/dev-logger.js +63 -1
- package/esm/dev2-server/dev-logger.js.map +1 -1
- package/esm/dev2-server/development-server.js +138 -0
- package/esm/dev2-server/development-server.js.map +1 -0
- package/esm/dev2-server/events.js +4 -0
- package/esm/dev2-server/events.js.map +1 -0
- package/esm/dev2-server/file-event-handler.js +186 -0
- package/esm/dev2-server/file-event-handler.js.map +1 -0
- package/esm/dev2-server/file-manager.js +374 -0
- package/esm/dev2-server/file-manager.js.map +1 -0
- package/esm/dev2-server/file-operations.js +228 -0
- package/esm/dev2-server/file-operations.js.map +1 -0
- package/esm/dev2-server/files-orchestrator.js +326 -0
- package/esm/dev2-server/files-orchestrator.js.map +1 -0
- package/esm/dev2-server/files-watcher.js +95 -0
- package/esm/dev2-server/files-watcher.js.map +1 -0
- package/esm/dev2-server/flags.js +9 -0
- package/esm/dev2-server/flags.js.map +1 -0
- package/esm/dev2-server/health-checker/checkers/base-health-checker.js +71 -0
- package/esm/dev2-server/health-checker/checkers/base-health-checker.js.map +1 -0
- package/esm/dev2-server/health-checker/checkers/eslint-health-checker.js +217 -0
- package/esm/dev2-server/health-checker/checkers/eslint-health-checker.js.map +1 -0
- package/esm/dev2-server/health-checker/checkers/typescript-health-checker.js +279 -0
- package/esm/dev2-server/health-checker/checkers/typescript-health-checker.js.map +1 -0
- package/esm/dev2-server/health-checker/file-health-result.js +40 -0
- package/esm/dev2-server/health-checker/file-health-result.js.map +1 -0
- package/esm/dev2-server/health-checker/files-healthcare.manager.js +422 -0
- package/esm/dev2-server/health-checker/files-healthcare.manager.js.map +1 -0
- package/esm/dev2-server/import-transformer.js +248 -0
- package/esm/dev2-server/import-transformer.js.map +1 -0
- package/esm/dev2-server/layer-executor.js +309 -0
- package/esm/dev2-server/layer-executor.js.map +1 -0
- package/esm/dev2-server/manifest-manager.js +107 -0
- package/esm/dev2-server/manifest-manager.js.map +1 -0
- package/esm/dev2-server/module-loader.js +251 -0
- package/esm/dev2-server/module-loader.js.map +1 -0
- package/esm/dev2-server/package-json-manager.js +20 -0
- package/esm/dev2-server/package-json-manager.js.map +1 -0
- package/esm/dev2-server/parse-imports.js +328 -0
- package/esm/dev2-server/parse-imports.js.map +1 -0
- package/esm/dev2-server/runtime-import-helper.js +150 -0
- package/esm/dev2-server/runtime-import-helper.js.map +1 -0
- package/esm/dev2-server/special-files-collector.js +212 -0
- package/esm/dev2-server/special-files-collector.js.map +1 -0
- package/esm/dev2-server/transpile-file.js +12 -2
- package/esm/dev2-server/transpile-file.js.map +1 -1
- package/esm/dev2-server/type-generator.js +557 -0
- package/esm/dev2-server/type-generator.js.map +1 -0
- package/esm/dev2-server/utils.js +40 -0
- package/esm/dev2-server/utils.js.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.js +8 -0
- package/esm/production/build-app-production.js.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.js +245 -0
- package/esm/production/production-builder.js.map +1 -0
- package/package.json +1 -1
- package/cjs/application.d.ts +0 -27
- package/cjs/application.d.ts.map +0 -1
- package/cjs/bootstrap/setup.d.ts +0 -7
- package/cjs/bootstrap/setup.d.ts.map +0 -1
- package/cjs/bootstrap/setup.js +0 -38
- package/cjs/bootstrap/setup.js.map +0 -1
- package/cjs/bootstrap.d.ts +0 -2
- package/cjs/bootstrap.d.ts.map +0 -1
- package/cjs/bootstrap.js +0 -5
- package/cjs/bootstrap.js.map +0 -1
- package/cjs/cache/database-cache-driver.d.ts +0 -56
- package/cjs/cache/database-cache-driver.d.ts.map +0 -1
- package/cjs/cache/database-cache-driver.js +0 -96
- package/cjs/cache/database-cache-driver.js.map +0 -1
- package/cjs/cache/index.d.ts +0 -3
- package/cjs/cache/index.d.ts.map +0 -1
- package/cjs/cache/index.js +0 -1
- package/cjs/cache/index.js.map +0 -1
- package/cjs/cli/cli-command.d.ts +0 -115
- package/cjs/cli/cli-command.d.ts.map +0 -1
- package/cjs/cli/cli-command.js +0 -224
- package/cjs/cli/cli-command.js.map +0 -1
- package/cjs/cli/cli-commands.manager.d.ts +0 -71
- package/cjs/cli/cli-commands.manager.d.ts.map +0 -1
- package/cjs/cli/cli-commands.utils.d.ts +0 -68
- package/cjs/cli/cli-commands.utils.d.ts.map +0 -1
- package/cjs/cli/commands/build.command.d.ts +0 -2
- package/cjs/cli/commands/build.command.d.ts.map +0 -1
- package/cjs/cli/commands/dev-server.command.d.ts +0 -2
- package/cjs/cli/commands/dev-server.command.d.ts.map +0 -1
- package/cjs/cli/commands/start-production.command.d.ts +0 -2
- package/cjs/cli/commands/start-production.command.d.ts.map +0 -1
- package/cjs/cli/commands/typings-generator.command.d.ts +0 -2
- package/cjs/cli/commands/typings-generator.command.d.ts.map +0 -1
- package/cjs/cli/commands-loader.d.ts +0 -18
- package/cjs/cli/commands-loader.d.ts.map +0 -1
- package/cjs/cli/framework-cli-commands.d.ts +0 -2
- package/cjs/cli/framework-cli-commands.d.ts.map +0 -1
- package/cjs/cli/index.d.ts +0 -3
- package/cjs/cli/index.d.ts.map +0 -1
- package/cjs/cli/index.js +0 -1
- package/cjs/cli/index.js.map +0 -1
- package/cjs/cli/parse-cli-args.d.ts +0 -18
- package/cjs/cli/parse-cli-args.d.ts.map +0 -1
- package/cjs/cli/start.d.ts +0 -2
- package/cjs/cli/start.d.ts.map +0 -1
- package/cjs/cli/string-similarity.d.ts +0 -44
- package/cjs/cli/string-similarity.d.ts.map +0 -1
- package/cjs/cli/types.d.ts +0 -201
- package/cjs/cli/types.d.ts.map +0 -1
- package/cjs/config/config-getter.d.ts +0 -35
- package/cjs/config/config-getter.d.ts.map +0 -1
- package/cjs/config/config-getter.js +0 -21
- package/cjs/config/config-getter.js.map +0 -1
- package/cjs/config/config-handlers.d.ts +0 -19
- package/cjs/config/config-handlers.d.ts.map +0 -1
- package/cjs/config/config-handlers.js +0 -47
- package/cjs/config/config-handlers.js.map +0 -1
- package/cjs/config/config-loader.d.ts +0 -37
- package/cjs/config/config-loader.d.ts.map +0 -1
- package/cjs/config/config-manager.d.ts +0 -22
- package/cjs/config/config-manager.d.ts.map +0 -1
- package/cjs/config/config-special-handlers.d.ts +0 -17
- package/cjs/config/config-special-handlers.d.ts.map +0 -1
- package/cjs/config/config-special-handlers.js +0 -23
- package/cjs/config/config-special-handlers.js.map +0 -1
- package/cjs/config/index.d.ts +0 -5
- package/cjs/config/index.d.ts.map +0 -1
- package/cjs/config/load-config-files.d.ts +0 -6
- package/cjs/config/load-config-files.d.ts.map +0 -1
- package/cjs/config/types.d.ts +0 -52
- package/cjs/config/types.d.ts.map +0 -1
- package/cjs/database/decorators/index.d.ts +0 -2
- package/cjs/database/decorators/index.d.ts.map +0 -1
- package/cjs/database/decorators/sluggable.d.ts +0 -2
- package/cjs/database/decorators/sluggable.d.ts.map +0 -1
- package/cjs/database/decorators/sluggable.js +0 -8
- package/cjs/database/decorators/sluggable.js.map +0 -1
- package/cjs/database/index.d.ts +0 -3
- package/cjs/database/index.d.ts.map +0 -1
- package/cjs/database/models/database-log/database-log.d.ts +0 -13
- package/cjs/database/models/database-log/database-log.d.ts.map +0 -1
- package/cjs/database/models/database-log/database-log.js +0 -16
- package/cjs/database/models/database-log/database-log.js.map +0 -1
- package/cjs/database/models/database-log/index.d.ts +0 -2
- package/cjs/database/models/database-log/index.d.ts.map +0 -1
- package/cjs/dev2-server/config-handlers.d.ts +0 -8
- package/cjs/dev2-server/config-handlers.d.ts.map +0 -1
- package/cjs/dev2-server/config-loader.d.ts +0 -61
- package/cjs/dev2-server/config-loader.d.ts.map +0 -1
- package/cjs/dev2-server/connectors/base-connector.d.ts +0 -49
- package/cjs/dev2-server/connectors/base-connector.d.ts.map +0 -1
- package/cjs/dev2-server/connectors/base-connector.js +0 -48
- package/cjs/dev2-server/connectors/base-connector.js.map +0 -1
- package/cjs/dev2-server/connectors/cache-connector.d.ts +0 -23
- package/cjs/dev2-server/connectors/cache-connector.d.ts.map +0 -1
- package/cjs/dev2-server/connectors/cache-connector.js +0 -35
- package/cjs/dev2-server/connectors/cache-connector.js.map +0 -1
- package/cjs/dev2-server/connectors/connectors-manager.d.ts +0 -38
- package/cjs/dev2-server/connectors/connectors-manager.d.ts.map +0 -1
- package/cjs/dev2-server/connectors/connectors-manager.js +0 -80
- package/cjs/dev2-server/connectors/connectors-manager.js.map +0 -1
- package/cjs/dev2-server/connectors/database-connector.d.ts +0 -23
- package/cjs/dev2-server/connectors/database-connector.d.ts.map +0 -1
- package/cjs/dev2-server/connectors/database-connector.js +0 -42
- package/cjs/dev2-server/connectors/database-connector.js.map +0 -1
- package/cjs/dev2-server/connectors/http-connector.d.ts +0 -29
- package/cjs/dev2-server/connectors/http-connector.d.ts.map +0 -1
- package/cjs/dev2-server/connectors/http-connector.js +0 -69
- package/cjs/dev2-server/connectors/http-connector.js.map +0 -1
- package/cjs/dev2-server/connectors/index.d.ts +0 -11
- package/cjs/dev2-server/connectors/index.d.ts.map +0 -1
- package/cjs/dev2-server/connectors/types.d.ts +0 -49
- package/cjs/dev2-server/connectors/types.d.ts.map +0 -1
- package/cjs/dev2-server/connectors/types.js +0 -9
- package/cjs/dev2-server/connectors/types.js.map +0 -1
- package/cjs/dev2-server/create-worker.d.ts +0 -34
- package/cjs/dev2-server/create-worker.d.ts.map +0 -1
- package/cjs/dev2-server/dependency-graph.d.ts +0 -93
- package/cjs/dev2-server/dependency-graph.d.ts.map +0 -1
- package/cjs/dev2-server/dev-logger.d.ts +0 -14
- package/cjs/dev2-server/dev-logger.d.ts.map +0 -1
- package/cjs/dev2-server/dev-logger.js +0 -68
- package/cjs/dev2-server/dev-logger.js.map +0 -1
- package/cjs/dev2-server/development-server.d.ts +0 -47
- package/cjs/dev2-server/development-server.d.ts.map +0 -1
- package/cjs/dev2-server/events.d.ts +0 -5
- package/cjs/dev2-server/events.d.ts.map +0 -1
- package/cjs/dev2-server/file-event-handler.d.ts +0 -59
- package/cjs/dev2-server/file-event-handler.d.ts.map +0 -1
- package/cjs/dev2-server/file-manager.d.ts +0 -136
- package/cjs/dev2-server/file-manager.d.ts.map +0 -1
- package/cjs/dev2-server/file-operations.d.ts +0 -65
- package/cjs/dev2-server/file-operations.d.ts.map +0 -1
- package/cjs/dev2-server/files-orchestrator.d.ts +0 -122
- package/cjs/dev2-server/files-orchestrator.d.ts.map +0 -1
- package/cjs/dev2-server/files-watcher.d.ts +0 -67
- package/cjs/dev2-server/files-watcher.d.ts.map +0 -1
- package/cjs/dev2-server/flags.d.ts +0 -10
- package/cjs/dev2-server/flags.d.ts.map +0 -1
- package/cjs/dev2-server/health-checker/checkers/base-health-checker.d.ts +0 -52
- package/cjs/dev2-server/health-checker/checkers/base-health-checker.d.ts.map +0 -1
- package/cjs/dev2-server/health-checker/checkers/eslint-health-checker.d.ts +0 -40
- package/cjs/dev2-server/health-checker/checkers/eslint-health-checker.d.ts.map +0 -1
- package/cjs/dev2-server/health-checker/checkers/typescript-health-checker.d.ts +0 -56
- package/cjs/dev2-server/health-checker/checkers/typescript-health-checker.d.ts.map +0 -1
- package/cjs/dev2-server/health-checker/file-health-checker.contract.d.ts +0 -59
- package/cjs/dev2-server/health-checker/file-health-checker.contract.d.ts.map +0 -1
- package/cjs/dev2-server/health-checker/file-health-result.d.ts +0 -68
- package/cjs/dev2-server/health-checker/file-health-result.d.ts.map +0 -1
- package/cjs/dev2-server/health-checker/files-healthcare.manager.d.ts +0 -115
- package/cjs/dev2-server/health-checker/files-healthcare.manager.d.ts.map +0 -1
- package/cjs/dev2-server/health-checker/workers/eslint-health.worker.d.ts +0 -2
- package/cjs/dev2-server/health-checker/workers/eslint-health.worker.d.ts.map +0 -1
- package/cjs/dev2-server/health-checker/workers/ts-health.worker.d.ts +0 -2
- package/cjs/dev2-server/health-checker/workers/ts-health.worker.d.ts.map +0 -1
- package/cjs/dev2-server/import-transformer.d.ts +0 -16
- package/cjs/dev2-server/import-transformer.d.ts.map +0 -1
- package/cjs/dev2-server/index.d.ts +0 -1
- package/cjs/dev2-server/index.d.ts.map +0 -1
- package/cjs/dev2-server/layer-executor.d.ts +0 -60
- package/cjs/dev2-server/layer-executor.d.ts.map +0 -1
- package/cjs/dev2-server/manifest-manager.d.ts +0 -80
- package/cjs/dev2-server/manifest-manager.d.ts.map +0 -1
- package/cjs/dev2-server/module-loader.d.ts +0 -104
- package/cjs/dev2-server/module-loader.d.ts.map +0 -1
- package/cjs/dev2-server/package-json-manager.d.ts +0 -16
- package/cjs/dev2-server/package-json-manager.d.ts.map +0 -1
- package/cjs/dev2-server/parse-imports.d.ts +0 -13
- package/cjs/dev2-server/parse-imports.d.ts.map +0 -1
- package/cjs/dev2-server/path.d.ts +0 -39
- package/cjs/dev2-server/path.d.ts.map +0 -1
- package/cjs/dev2-server/path.js +0 -56
- package/cjs/dev2-server/path.js.map +0 -1
- package/cjs/dev2-server/runtime-import-helper.d.ts +0 -9
- package/cjs/dev2-server/runtime-import-helper.d.ts.map +0 -1
- package/cjs/dev2-server/special-files-collector.d.ts +0 -114
- package/cjs/dev2-server/special-files-collector.d.ts.map +0 -1
- package/cjs/dev2-server/start-development-server.d.ts +0 -7
- package/cjs/dev2-server/start-development-server.d.ts.map +0 -1
- package/cjs/dev2-server/transpile-file.d.ts +0 -11
- package/cjs/dev2-server/transpile-file.d.ts.map +0 -1
- package/cjs/dev2-server/transpile-file.js +0 -11
- package/cjs/dev2-server/transpile-file.js.map +0 -1
- package/cjs/dev2-server/tsconfig-manager.d.ts +0 -45
- package/cjs/dev2-server/tsconfig-manager.d.ts.map +0 -1
- package/cjs/dev2-server/tsconfig-manager.js +0 -102
- package/cjs/dev2-server/tsconfig-manager.js.map +0 -1
- package/cjs/dev2-server/type-generator.d.ts +0 -111
- package/cjs/dev2-server/type-generator.d.ts.map +0 -1
- package/cjs/dev2-server/types.d.ts +0 -16
- package/cjs/dev2-server/types.d.ts.map +0 -1
- package/cjs/dev2-server/utils.d.ts +0 -15
- package/cjs/dev2-server/utils.d.ts.map +0 -1
- package/cjs/http/config.d.ts +0 -10
- package/cjs/http/config.d.ts.map +0 -1
- package/cjs/http/config.js +0 -22
- package/cjs/http/config.js.map +0 -1
- package/cjs/http/createHttpApplication.d.ts +0 -3
- package/cjs/http/createHttpApplication.d.ts.map +0 -1
- package/cjs/http/createHttpApplication.js +0 -28
- package/cjs/http/createHttpApplication.js.map +0 -1
- package/cjs/http/database/RequestLog.d.ts +0 -13
- package/cjs/http/database/RequestLog.d.ts.map +0 -1
- package/cjs/http/database/RequestLog.js +0 -25
- package/cjs/http/database/RequestLog.js.map +0 -1
- package/cjs/http/errors/index.d.ts +0 -2
- package/cjs/http/errors/index.d.ts.map +0 -1
- package/cjs/http/errors/resource-not-found.error.d.ts +0 -17
- package/cjs/http/errors/resource-not-found.error.d.ts.map +0 -1
- package/cjs/http/errors/resource-not-found.error.js +0 -32
- package/cjs/http/errors/resource-not-found.error.js.map +0 -1
- package/cjs/http/events.d.ts +0 -4
- package/cjs/http/events.d.ts.map +0 -1
- package/cjs/http/events.js +0 -26
- package/cjs/http/events.js.map +0 -1
- package/cjs/http/index.d.ts +0 -16
- package/cjs/http/index.d.ts.map +0 -1
- package/cjs/http/middleware/cache-response-middleware.d.ts +0 -34
- package/cjs/http/middleware/cache-response-middleware.d.ts.map +0 -1
- package/cjs/http/middleware/cache-response-middleware.js +0 -45
- package/cjs/http/middleware/cache-response-middleware.js.map +0 -1
- package/cjs/http/middleware/index.d.ts +0 -3
- package/cjs/http/middleware/index.d.ts.map +0 -1
- package/cjs/http/middleware/inject-request-context.d.ts +0 -35
- package/cjs/http/middleware/inject-request-context.d.ts.map +0 -1
- package/cjs/http/middleware/inject-request-context.js +0 -104
- package/cjs/http/middleware/inject-request-context.js.map +0 -1
- package/cjs/http/plugins/index.d.ts +0 -3
- package/cjs/http/plugins/index.d.ts.map +0 -1
- package/cjs/http/plugins.d.ts +0 -3
- package/cjs/http/plugins.d.ts.map +0 -1
- package/cjs/http/plugins.js +0 -39
- package/cjs/http/plugins.js.map +0 -1
- package/cjs/http/request-controller.d.ts +0 -11
- package/cjs/http/request-controller.d.ts.map +0 -1
- package/cjs/http/request-controller.js +0 -9
- package/cjs/http/request-controller.js.map +0 -1
- package/cjs/http/request.d.ts +0 -376
- package/cjs/http/request.d.ts.map +0 -1
- package/cjs/http/request.js +0 -729
- package/cjs/http/request.js.map +0 -1
- package/cjs/http/response.d.ts +0 -271
- package/cjs/http/response.d.ts.map +0 -1
- package/cjs/http/response.js +0 -574
- package/cjs/http/response.js.map +0 -1
- package/cjs/http/server.d.ts +0 -8
- package/cjs/http/server.d.ts.map +0 -1
- package/cjs/http/server.js +0 -15
- package/cjs/http/server.js.map +0 -1
- package/cjs/http/types.d.ts +0 -174
- package/cjs/http/types.d.ts.map +0 -1
- package/cjs/http/uploaded-file.d.ts +0 -445
- package/cjs/http/uploaded-file.d.ts.map +0 -1
- package/cjs/http/uploaded-file.js +0 -694
- package/cjs/http/uploaded-file.js.map +0 -1
- package/cjs/http/uploads-config.d.ts +0 -26
- package/cjs/http/uploads-config.d.ts.map +0 -1
- package/cjs/http/uploads-config.js +0 -35
- package/cjs/http/uploads-config.js.map +0 -1
- package/cjs/http/uploads-types.d.ts +0 -236
- package/cjs/http/uploads-types.d.ts.map +0 -1
- package/cjs/image/image.d.ts +0 -382
- package/cjs/image/image.d.ts.map +0 -1
- package/cjs/image/image.js +0 -552
- package/cjs/image/image.js.map +0 -1
- package/cjs/image/index.d.ts +0 -2
- package/cjs/image/index.d.ts.map +0 -1
- package/cjs/index.d.ts +0 -27
- package/cjs/index.d.ts.map +0 -1
- package/cjs/index.js +0 -1
- package/cjs/index.js.map +0 -1
- package/cjs/logger/index.d.ts +0 -3
- package/cjs/logger/index.d.ts.map +0 -1
- package/cjs/logger/logger.d.ts +0 -3
- package/cjs/logger/logger.d.ts.map +0 -1
- package/cjs/logger/logger.js +0 -16
- package/cjs/logger/logger.js.map +0 -1
- package/cjs/logger/types.d.ts +0 -39
- package/cjs/logger/types.d.ts.map +0 -1
- package/cjs/mail/config.d.ts +0 -83
- package/cjs/mail/config.d.ts.map +0 -1
- package/cjs/mail/config.js +0 -152
- package/cjs/mail/config.js.map +0 -1
- package/cjs/mail/events.d.ts +0 -96
- package/cjs/mail/events.d.ts.map +0 -1
- package/cjs/mail/events.js +0 -123
- package/cjs/mail/events.js.map +0 -1
- package/cjs/mail/index.d.ts +0 -10
- package/cjs/mail/index.d.ts.map +0 -1
- package/cjs/mail/mail.d.ts +0 -175
- package/cjs/mail/mail.d.ts.map +0 -1
- package/cjs/mail/mail.js +0 -286
- package/cjs/mail/mail.js.map +0 -1
- package/cjs/mail/mailer-pool.d.ts +0 -26
- package/cjs/mail/mailer-pool.d.ts.map +0 -1
- package/cjs/mail/mailer-pool.js +0 -95
- package/cjs/mail/mailer-pool.js.map +0 -1
- package/cjs/mail/react-mail.d.ts +0 -6
- package/cjs/mail/react-mail.d.ts.map +0 -1
- package/cjs/mail/react-mail.js +0 -25
- package/cjs/mail/react-mail.js.map +0 -1
- package/cjs/mail/send-mail.d.ts +0 -33
- package/cjs/mail/send-mail.d.ts.map +0 -1
- package/cjs/mail/send-mail.js +0 -309
- package/cjs/mail/send-mail.js.map +0 -1
- package/cjs/mail/test-mailbox.d.ts +0 -110
- package/cjs/mail/test-mailbox.d.ts.map +0 -1
- package/cjs/mail/test-mailbox.js +0 -143
- package/cjs/mail/test-mailbox.js.map +0 -1
- package/cjs/mail/types.d.ts +0 -245
- package/cjs/mail/types.d.ts.map +0 -1
- package/cjs/mail/types.js +0 -13
- package/cjs/mail/types.js.map +0 -1
- package/cjs/manifest/manifest-manager.d.ts +0 -74
- package/cjs/manifest/manifest-manager.d.ts.map +0 -1
- package/cjs/output/index.d.ts +0 -3
- package/cjs/output/index.d.ts.map +0 -1
- package/cjs/output/output.d.ts +0 -193
- package/cjs/output/output.d.ts.map +0 -1
- package/cjs/output/output.js +0 -599
- package/cjs/output/output.js.map +0 -1
- package/cjs/output/types.d.ts +0 -23
- package/cjs/output/types.d.ts.map +0 -1
- package/cjs/production/build-app-production.d.ts +0 -6
- package/cjs/production/build-app-production.d.ts.map +0 -1
- package/cjs/production/esbuild-plugins.d.ts +0 -5
- package/cjs/production/esbuild-plugins.d.ts.map +0 -1
- package/cjs/production/production-builder.d.ts +0 -76
- package/cjs/production/production-builder.d.ts.map +0 -1
- package/cjs/react/index.d.ts +0 -3
- package/cjs/react/index.d.ts.map +0 -1
- package/cjs/react/index.js +0 -7
- package/cjs/react/index.js.map +0 -1
- package/cjs/repositories/base-repository-manager.d.ts +0 -47
- package/cjs/repositories/base-repository-manager.d.ts.map +0 -1
- package/cjs/repositories/base-repository-manager.js +0 -63
- package/cjs/repositories/base-repository-manager.js.map +0 -1
- package/cjs/repositories/index.d.ts +0 -8
- package/cjs/repositories/index.d.ts.map +0 -1
- package/cjs/repositories/repository-destroyer-manager.d.ts +0 -21
- package/cjs/repositories/repository-destroyer-manager.d.ts.map +0 -1
- package/cjs/repositories/repository-destroyer-manager.js +0 -38
- package/cjs/repositories/repository-destroyer-manager.js.map +0 -1
- package/cjs/repositories/repository-filler-manager.d.ts +0 -60
- package/cjs/repositories/repository-filler-manager.d.ts.map +0 -1
- package/cjs/repositories/repository-filler-manager.js +0 -102
- package/cjs/repositories/repository-filler-manager.js.map +0 -1
- package/cjs/repositories/repository-filler.d.ts +0 -26
- package/cjs/repositories/repository-filler.d.ts.map +0 -1
- package/cjs/repositories/repository-filler.js +0 -63
- package/cjs/repositories/repository-filler.js.map +0 -1
- package/cjs/repositories/repository-list-manager.d.ts +0 -385
- package/cjs/repositories/repository-list-manager.d.ts.map +0 -1
- package/cjs/repositories/repository-list-manager.js +0 -812
- package/cjs/repositories/repository-list-manager.js.map +0 -1
- package/cjs/repositories/repository-listing.d.ts +0 -82
- package/cjs/repositories/repository-listing.d.ts.map +0 -1
- package/cjs/repositories/repository-listing.js +0 -177
- package/cjs/repositories/repository-listing.js.map +0 -1
- package/cjs/repositories/repository-manager.d.ts +0 -5
- package/cjs/repositories/repository-manager.d.ts.map +0 -1
- package/cjs/repositories/repository-manager.js +0 -2
- package/cjs/repositories/repository-manager.js.map +0 -1
- package/cjs/repositories/types.d.ts +0 -114
- package/cjs/repositories/types.d.ts.map +0 -1
- package/cjs/repositories/utils.d.ts +0 -3
- package/cjs/repositories/utils.d.ts.map +0 -1
- package/cjs/repositories/utils.js +0 -7
- package/cjs/repositories/utils.js.map +0 -1
- package/cjs/restful/index.d.ts +0 -2
- package/cjs/restful/index.d.ts.map +0 -1
- package/cjs/restful/restful.d.ts +0 -110
- package/cjs/restful/restful.d.ts.map +0 -1
- package/cjs/restful/restful.js +0 -317
- package/cjs/restful/restful.js.map +0 -1
- package/cjs/router/index.d.ts +0 -4
- package/cjs/router/index.d.ts.map +0 -1
- package/cjs/router/route-registry.d.ts +0 -30
- package/cjs/router/route-registry.d.ts.map +0 -1
- package/cjs/router/route-registry.js +0 -67
- package/cjs/router/route-registry.js.map +0 -1
- package/cjs/router/route.d.ts +0 -34
- package/cjs/router/route.d.ts.map +0 -1
- package/cjs/router/router.d.ts +0 -169
- package/cjs/router/router.d.ts.map +0 -1
- package/cjs/router/router.js +0 -564
- package/cjs/router/router.js.map +0 -1
- package/cjs/router/types.d.ts +0 -258
- package/cjs/router/types.d.ts.map +0 -1
- package/cjs/router/utils.d.ts +0 -5
- package/cjs/router/utils.d.ts.map +0 -1
- package/cjs/router/utils.js +0 -6
- package/cjs/router/utils.js.map +0 -1
- package/cjs/storage/config.d.ts +0 -8
- package/cjs/storage/config.d.ts.map +0 -1
- package/cjs/storage/config.js +0 -6
- package/cjs/storage/config.js.map +0 -1
- package/cjs/storage/drivers/cloud-driver.d.ts +0 -127
- package/cjs/storage/drivers/cloud-driver.d.ts.map +0 -1
- package/cjs/storage/drivers/cloud-driver.js +0 -406
- package/cjs/storage/drivers/cloud-driver.js.map +0 -1
- package/cjs/storage/drivers/do-spaces-driver.d.ts +0 -47
- package/cjs/storage/drivers/do-spaces-driver.d.ts.map +0 -1
- package/cjs/storage/drivers/do-spaces-driver.js +0 -52
- package/cjs/storage/drivers/do-spaces-driver.js.map +0 -1
- package/cjs/storage/drivers/local-driver.d.ts +0 -136
- package/cjs/storage/drivers/local-driver.d.ts.map +0 -1
- package/cjs/storage/drivers/local-driver.js +0 -409
- package/cjs/storage/drivers/local-driver.js.map +0 -1
- package/cjs/storage/drivers/r2-driver.d.ts +0 -50
- package/cjs/storage/drivers/r2-driver.d.ts.map +0 -1
- package/cjs/storage/drivers/r2-driver.js +0 -59
- package/cjs/storage/drivers/r2-driver.js.map +0 -1
- package/cjs/storage/drivers/s3-driver.d.ts +0 -32
- package/cjs/storage/drivers/s3-driver.d.ts.map +0 -1
- package/cjs/storage/drivers/s3-driver.js +0 -34
- package/cjs/storage/drivers/s3-driver.js.map +0 -1
- package/cjs/storage/index.d.ts +0 -12
- package/cjs/storage/index.d.ts.map +0 -1
- package/cjs/storage/scoped-storage.d.ts +0 -402
- package/cjs/storage/scoped-storage.d.ts.map +0 -1
- package/cjs/storage/scoped-storage.js +0 -488
- package/cjs/storage/scoped-storage.js.map +0 -1
- package/cjs/storage/storage-file.d.ts +0 -216
- package/cjs/storage/storage-file.d.ts.map +0 -1
- package/cjs/storage/storage-file.js +0 -358
- package/cjs/storage/storage-file.js.map +0 -1
- package/cjs/storage/storage.d.ts +0 -582
- package/cjs/storage/storage.d.ts.map +0 -1
- package/cjs/storage/storage.js +0 -941
- package/cjs/storage/storage.js.map +0 -1
- package/cjs/storage/types.d.ts +0 -728
- package/cjs/storage/types.d.ts.map +0 -1
- package/cjs/storage/utils/mime.d.ts +0 -33
- package/cjs/storage/utils/mime.d.ts.map +0 -1
- package/cjs/storage/utils/mime.js +0 -45
- package/cjs/storage/utils/mime.js.map +0 -1
- package/cjs/store/index.d.ts +0 -25
- package/cjs/store/index.d.ts.map +0 -1
- package/cjs/store/index.js +0 -52
- package/cjs/store/index.js.map +0 -1
- package/cjs/tests/boot-testing.d.ts +0 -7
- package/cjs/tests/boot-testing.d.ts.map +0 -1
- package/cjs/tests/boot-testing.js +0 -23
- package/cjs/tests/boot-testing.js.map +0 -1
- package/cjs/tests/create-http-test-application.d.ts +0 -25
- package/cjs/tests/create-http-test-application.d.ts.map +0 -1
- package/cjs/tests/create-http-test-application.js +0 -76
- package/cjs/tests/create-http-test-application.js.map +0 -1
- package/cjs/tests/http-response-output-test.d.ts +0 -42
- package/cjs/tests/http-response-output-test.d.ts.map +0 -1
- package/cjs/tests/http-response-output-test.js +0 -53
- package/cjs/tests/http-response-output-test.js.map +0 -1
- package/cjs/tests/http-test-response.d.ts +0 -75
- package/cjs/tests/http-test-response.d.ts.map +0 -1
- package/cjs/tests/index.d.ts +0 -4
- package/cjs/tests/index.d.ts.map +0 -1
- package/cjs/tests/init-testing.d.ts +0 -7
- package/cjs/tests/init-testing.d.ts.map +0 -1
- package/cjs/tests/types.d.ts +0 -10
- package/cjs/tests/types.d.ts.map +0 -1
- package/cjs/utils/app-log.d.ts +0 -8
- package/cjs/utils/app-log.d.ts.map +0 -1
- package/cjs/utils/app-log.js +0 -7
- package/cjs/utils/app-log.js.map +0 -1
- package/cjs/utils/cleanup-temp-files.d.ts +0 -5
- package/cjs/utils/cleanup-temp-files.d.ts.map +0 -1
- package/cjs/utils/database-log.d.ts +0 -25
- package/cjs/utils/database-log.d.ts.map +0 -1
- package/cjs/utils/database-log.js +0 -44
- package/cjs/utils/database-log.js.map +0 -1
- package/cjs/utils/date-output.d.ts +0 -69
- package/cjs/utils/date-output.d.ts.map +0 -1
- package/cjs/utils/date-output.js +0 -62
- package/cjs/utils/date-output.js.map +0 -1
- package/cjs/utils/date-output.test.d.ts +0 -2
- package/cjs/utils/date-output.test.d.ts.map +0 -1
- package/cjs/utils/download-file.d.ts +0 -3
- package/cjs/utils/download-file.d.ts.map +0 -1
- package/cjs/utils/environment.d.ts +0 -4
- package/cjs/utils/environment.d.ts.map +0 -1
- package/cjs/utils/environment.js +0 -6
- package/cjs/utils/environment.js.map +0 -1
- package/cjs/utils/get-localized.d.ts +0 -10
- package/cjs/utils/get-localized.d.ts.map +0 -1
- package/cjs/utils/get-localized.js +0 -15
- package/cjs/utils/get-localized.js.map +0 -1
- package/cjs/utils/get-localized.test.d.ts +0 -2
- package/cjs/utils/get-localized.test.d.ts.map +0 -1
- package/cjs/utils/index.d.ts +0 -13
- package/cjs/utils/index.d.ts.map +0 -1
- package/cjs/utils/internal.d.ts +0 -4
- package/cjs/utils/internal.d.ts.map +0 -1
- package/cjs/utils/paths.d.ts +0 -55
- package/cjs/utils/paths.d.ts.map +0 -1
- package/cjs/utils/paths.js +0 -89
- package/cjs/utils/paths.js.map +0 -1
- package/cjs/utils/promise-all-object.d.ts +0 -8
- package/cjs/utils/promise-all-object.d.ts.map +0 -1
- package/cjs/utils/promise-all-object.js +0 -12
- package/cjs/utils/promise-all-object.js.map +0 -1
- package/cjs/utils/queue.d.ts +0 -49
- package/cjs/utils/queue.d.ts.map +0 -1
- package/cjs/utils/queue.js +0 -89
- package/cjs/utils/queue.js.map +0 -1
- package/cjs/utils/sleep.d.ts +0 -2
- package/cjs/utils/sleep.d.ts.map +0 -1
- package/cjs/utils/sleep.js +0 -3
- package/cjs/utils/sleep.js.map +0 -1
- package/cjs/utils/sluggable.d.ts +0 -5
- package/cjs/utils/sluggable.d.ts.map +0 -1
- package/cjs/utils/sluggable.js +0 -15
- package/cjs/utils/sluggable.js.map +0 -1
- package/cjs/utils/sluggable.test.d.ts +0 -2
- package/cjs/utils/sluggable.test.d.ts.map +0 -1
- package/cjs/utils/to-json.d.ts +0 -2
- package/cjs/utils/to-json.d.ts.map +0 -1
- package/cjs/utils/to-json.js +0 -26
- package/cjs/utils/to-json.js.map +0 -1
- package/cjs/utils/types.d.ts +0 -22
- package/cjs/utils/types.d.ts.map +0 -1
- package/cjs/utils/urls.d.ts +0 -21
- package/cjs/utils/urls.d.ts.map +0 -1
- package/cjs/utils/urls.js +0 -31
- package/cjs/utils/urls.js.map +0 -1
- package/cjs/validation/database/exists-except-current-id.d.ts +0 -7
- package/cjs/validation/database/exists-except-current-id.d.ts.map +0 -1
- package/cjs/validation/database/exists-except-current-id.js +0 -23
- package/cjs/validation/database/exists-except-current-id.js.map +0 -1
- package/cjs/validation/database/exists-except-current-user.d.ts +0 -7
- package/cjs/validation/database/exists-except-current-user.d.ts.map +0 -1
- package/cjs/validation/database/exists-except-current-user.js +0 -25
- package/cjs/validation/database/exists-except-current-user.js.map +0 -1
- package/cjs/validation/database/exists.d.ts +0 -7
- package/cjs/validation/database/exists.d.ts.map +0 -1
- package/cjs/validation/database/exists.js +0 -21
- package/cjs/validation/database/exists.js.map +0 -1
- package/cjs/validation/database/index.d.ts +0 -12
- package/cjs/validation/database/index.d.ts.map +0 -1
- package/cjs/validation/database/types.d.ts +0 -68
- package/cjs/validation/database/types.d.ts.map +0 -1
- package/cjs/validation/database/unique-except-current-id.d.ts +0 -7
- package/cjs/validation/database/unique-except-current-id.d.ts.map +0 -1
- package/cjs/validation/database/unique-except-current-id.js +0 -23
- package/cjs/validation/database/unique-except-current-id.js.map +0 -1
- package/cjs/validation/database/unique-except-current-user.d.ts +0 -7
- package/cjs/validation/database/unique-except-current-user.d.ts.map +0 -1
- package/cjs/validation/database/unique-except-current-user.js +0 -25
- package/cjs/validation/database/unique-except-current-user.js.map +0 -1
- package/cjs/validation/database/unique.d.ts +0 -7
- package/cjs/validation/database/unique.d.ts.map +0 -1
- package/cjs/validation/database/unique.js +0 -30
- package/cjs/validation/database/unique.js.map +0 -1
- package/cjs/validation/file/file.d.ts +0 -22
- package/cjs/validation/file/file.d.ts.map +0 -1
- package/cjs/validation/file/file.js +0 -60
- package/cjs/validation/file/file.js.map +0 -1
- package/cjs/validation/file/index.d.ts +0 -6
- package/cjs/validation/file/index.d.ts.map +0 -1
- package/cjs/validation/index.d.ts +0 -16
- package/cjs/validation/index.d.ts.map +0 -1
- package/cjs/validation/init.d.ts +0 -7
- package/cjs/validation/init.d.ts.map +0 -1
- package/cjs/validation/init.js +0 -34
- package/cjs/validation/init.js.map +0 -1
- package/cjs/validation/plugins/database-plugin.d.ts +0 -14
- package/cjs/validation/plugins/database-plugin.d.ts.map +0 -1
- package/cjs/validation/plugins/database-plugin.js +0 -95
- package/cjs/validation/plugins/database-plugin.js.map +0 -1
- package/cjs/validation/plugins/file-plugin.d.ts +0 -11
- package/cjs/validation/plugins/file-plugin.d.ts.map +0 -1
- package/cjs/validation/plugins/file-plugin.js +0 -17
- package/cjs/validation/plugins/file-plugin.js.map +0 -1
- package/cjs/validation/plugins/index.d.ts +0 -9
- package/cjs/validation/plugins/index.d.ts.map +0 -1
- package/cjs/validation/plugins/localized-plugin.d.ts +0 -11
- package/cjs/validation/plugins/localized-plugin.d.ts.map +0 -1
- package/cjs/validation/plugins/localized-plugin.js +0 -19
- package/cjs/validation/plugins/localized-plugin.js.map +0 -1
- package/cjs/validation/types.d.ts +0 -87
- package/cjs/validation/types.d.ts.map +0 -1
- package/cjs/validation/validateAll.d.ts +0 -7
- package/cjs/validation/validateAll.d.ts.map +0 -1
- package/cjs/validation/validateAll.js +0 -39
- package/cjs/validation/validateAll.js.map +0 -1
- package/cjs/validation/validators/file-validator.d.ts +0 -40
- package/cjs/validation/validators/file-validator.d.ts.map +0 -1
- package/cjs/validation/validators/file-validator.js +0 -94
- package/cjs/validation/validators/file-validator.js.map +0 -1
- package/cjs/validation/validators/index.d.ts +0 -7
- package/cjs/validation/validators/index.d.ts.map +0 -1
- package/cjs/warlock-config/default-configurations.d.ts +0 -3
- package/cjs/warlock-config/default-configurations.d.ts.map +0 -1
- package/cjs/warlock-config/default-configurations.js +0 -8
- package/cjs/warlock-config/default-configurations.js.map +0 -1
- package/cjs/warlock-config/define-config.d.ts +0 -3
- package/cjs/warlock-config/define-config.d.ts.map +0 -1
- package/cjs/warlock-config/define-config.js +0 -3
- package/cjs/warlock-config/define-config.js.map +0 -1
- package/cjs/warlock-config/index.d.ts +0 -4
- package/cjs/warlock-config/index.d.ts.map +0 -1
- package/cjs/warlock-config/types.d.ts +0 -79
- package/cjs/warlock-config/types.d.ts.map +0 -1
- package/cjs/warlock-config/warlock-config.manager.d.ts +0 -83
- package/cjs/warlock-config/warlock-config.manager.d.ts.map +0 -1
- package/cjs/warlock-config/warlock-config.manager.js +0 -141
- package/cjs/warlock-config/warlock-config.manager.js.map +0 -1
package/cjs/storage/types.d.ts
DELETED
|
@@ -1,728 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import type { Readable } from "stream";
|
|
4
|
-
import type { UploadedFile } from "../http";
|
|
5
|
-
import type { StorageFile } from "./storage-file";
|
|
6
|
-
/**
|
|
7
|
-
* Options for local storage driver
|
|
8
|
-
*/
|
|
9
|
-
export type LocalStorageDriverOptions = {
|
|
10
|
-
/**
|
|
11
|
-
* Root path for storage
|
|
12
|
-
* Defaults to storagePath() utility
|
|
13
|
-
*/
|
|
14
|
-
root?: string;
|
|
15
|
-
/**
|
|
16
|
-
* URL prefix for file URLs
|
|
17
|
-
* @default "/uploads"
|
|
18
|
-
*/
|
|
19
|
-
urlPrefix?: string;
|
|
20
|
-
/**
|
|
21
|
-
* URL prefix for temporary file URLs
|
|
22
|
-
* The token will be appended: {temporaryUrlPrefix}/{token}
|
|
23
|
-
* @default "/temp-files"
|
|
24
|
-
*/
|
|
25
|
-
temporaryUrlPrefix?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Secret key for signing temporary URLs
|
|
28
|
-
* Required for temporaryUrl() support
|
|
29
|
-
*/
|
|
30
|
-
signatureKey?: string;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Base options for all S3-compatible cloud storage drivers
|
|
34
|
-
*/
|
|
35
|
-
export type CloudStorageDriverOptions = {
|
|
36
|
-
/**
|
|
37
|
-
* Bucket name
|
|
38
|
-
*/
|
|
39
|
-
bucket: string;
|
|
40
|
-
/**
|
|
41
|
-
* Region (e.g., "us-east-1" for S3, "auto" for R2, "nyc3" for DO Spaces)
|
|
42
|
-
*/
|
|
43
|
-
region: string;
|
|
44
|
-
/**
|
|
45
|
-
* Access key ID
|
|
46
|
-
*/
|
|
47
|
-
accessKeyId: string;
|
|
48
|
-
/**
|
|
49
|
-
* Secret access key
|
|
50
|
-
*/
|
|
51
|
-
secretAccessKey: string;
|
|
52
|
-
/**
|
|
53
|
-
* Custom endpoint URL
|
|
54
|
-
* Optional - derived from provider if not specified
|
|
55
|
-
*/
|
|
56
|
-
endpoint?: string;
|
|
57
|
-
/**
|
|
58
|
-
* Custom URL prefix for public URLs (e.g., CDN domain)
|
|
59
|
-
*/
|
|
60
|
-
urlPrefix?: string;
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Options specific to Cloudflare R2 driver
|
|
64
|
-
*/
|
|
65
|
-
export type R2StorageDriverOptions = CloudStorageDriverOptions & {
|
|
66
|
-
/**
|
|
67
|
-
* Cloudflare account ID
|
|
68
|
-
*/
|
|
69
|
-
accountId: string;
|
|
70
|
-
/**
|
|
71
|
-
* Custom public domain for R2 bucket
|
|
72
|
-
* If using Cloudflare CDN with custom domain
|
|
73
|
-
*/
|
|
74
|
-
publicDomain?: string;
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* Base storage file data returned from operations
|
|
78
|
-
*/
|
|
79
|
-
export type StorageFileData = {
|
|
80
|
-
path: string;
|
|
81
|
-
url: string;
|
|
82
|
-
size: number;
|
|
83
|
-
hash: string;
|
|
84
|
-
mimeType: string;
|
|
85
|
-
driver: string;
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* Extended storage file data with cloud-specific metadata
|
|
89
|
-
*/
|
|
90
|
-
export type CloudStorageFileData = StorageFileData & {
|
|
91
|
-
bucket: string;
|
|
92
|
-
region: string;
|
|
93
|
-
etag?: string;
|
|
94
|
-
versionId?: string;
|
|
95
|
-
storageClass?: string;
|
|
96
|
-
lastModified?: Date;
|
|
97
|
-
contentEncoding?: string;
|
|
98
|
-
cacheControl?: string;
|
|
99
|
-
metadata?: Record<string, string>;
|
|
100
|
-
};
|
|
101
|
-
/**
|
|
102
|
-
* Storage file info for list and getInfo operations
|
|
103
|
-
*/
|
|
104
|
-
export type StorageFileInfo = {
|
|
105
|
-
path: string;
|
|
106
|
-
name: string;
|
|
107
|
-
size: number;
|
|
108
|
-
isDirectory: boolean;
|
|
109
|
-
lastModified?: Date;
|
|
110
|
-
mimeType?: string;
|
|
111
|
-
etag?: string;
|
|
112
|
-
storageClass?: string;
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* Options for list operations
|
|
116
|
-
*/
|
|
117
|
-
export type ListOptions = {
|
|
118
|
-
recursive?: boolean;
|
|
119
|
-
limit?: number;
|
|
120
|
-
prefix?: string;
|
|
121
|
-
cursor?: string;
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* Options for presigned URLs
|
|
125
|
-
*/
|
|
126
|
-
export type PresignedOptions = {
|
|
127
|
-
expiresIn?: number;
|
|
128
|
-
};
|
|
129
|
-
/**
|
|
130
|
-
* Options for presigned upload URLs
|
|
131
|
-
*/
|
|
132
|
-
export type PresignedUploadOptions = PresignedOptions & {
|
|
133
|
-
contentType?: string;
|
|
134
|
-
maxSize?: number;
|
|
135
|
-
metadata?: Record<string, string>;
|
|
136
|
-
};
|
|
137
|
-
/**
|
|
138
|
-
* Options for put operations
|
|
139
|
-
*/
|
|
140
|
-
export type PutOptions = {
|
|
141
|
-
/**
|
|
142
|
-
* Explicit MIME type for the file
|
|
143
|
-
* If not provided, will be guessed from file extension
|
|
144
|
-
*/
|
|
145
|
-
mimeType?: string;
|
|
146
|
-
/**
|
|
147
|
-
* Custom metadata to store with the file (cloud drivers only)
|
|
148
|
-
*/
|
|
149
|
-
metadata?: Record<string, string>;
|
|
150
|
-
/**
|
|
151
|
-
* Cache-Control header (cloud drivers only)
|
|
152
|
-
*/
|
|
153
|
-
cacheControl?: string;
|
|
154
|
-
/**
|
|
155
|
-
* Content-Disposition header (cloud drivers only)
|
|
156
|
-
*/
|
|
157
|
-
contentDisposition?: string;
|
|
158
|
-
/**
|
|
159
|
-
* File visibility (cloud drivers only)
|
|
160
|
-
*/
|
|
161
|
-
visibility?: FileVisibility;
|
|
162
|
-
};
|
|
163
|
-
/**
|
|
164
|
-
* Payload encoded in temporary URL tokens
|
|
165
|
-
*/
|
|
166
|
-
export type TemporaryTokenPayload = {
|
|
167
|
-
/**
|
|
168
|
-
* Relative file path
|
|
169
|
-
*/
|
|
170
|
-
path: string;
|
|
171
|
-
/**
|
|
172
|
-
* Expiration timestamp (Unix seconds)
|
|
173
|
-
*/
|
|
174
|
-
exp: number;
|
|
175
|
-
/**
|
|
176
|
-
* HMAC signature
|
|
177
|
-
*/
|
|
178
|
-
sig: string;
|
|
179
|
-
};
|
|
180
|
-
/**
|
|
181
|
-
* Validation error types
|
|
182
|
-
*/
|
|
183
|
-
export type TemporaryTokenError = "expired" | "invalid_signature" | "invalid_token" | "missing_key" | "file_not_found";
|
|
184
|
-
/**
|
|
185
|
-
* Result of validating a temporary URL token
|
|
186
|
-
*/
|
|
187
|
-
export type TemporaryTokenValidation = {
|
|
188
|
-
/**
|
|
189
|
-
* Whether the token is valid
|
|
190
|
-
*/
|
|
191
|
-
valid: boolean;
|
|
192
|
-
/**
|
|
193
|
-
* Error reason if invalid
|
|
194
|
-
*/
|
|
195
|
-
error?: TemporaryTokenError;
|
|
196
|
-
/**
|
|
197
|
-
* Relative file path (available when valid)
|
|
198
|
-
*/
|
|
199
|
-
path?: string;
|
|
200
|
-
/**
|
|
201
|
-
* Absolute filesystem path (local driver only, for sendFile)
|
|
202
|
-
*/
|
|
203
|
-
absolutePath?: string;
|
|
204
|
-
/**
|
|
205
|
-
* Token expiration date
|
|
206
|
-
*/
|
|
207
|
-
expiresAt?: Date;
|
|
208
|
-
/**
|
|
209
|
-
* MIME type of the file
|
|
210
|
-
*/
|
|
211
|
-
mimeType?: string;
|
|
212
|
-
/**
|
|
213
|
-
* The driver instance that created this token
|
|
214
|
-
*/
|
|
215
|
-
driver?: StorageDriverContract;
|
|
216
|
-
/**
|
|
217
|
-
* Get file contents as Buffer
|
|
218
|
-
*/
|
|
219
|
-
getFile?: () => Promise<Buffer>;
|
|
220
|
-
/**
|
|
221
|
-
* Get file as readable stream
|
|
222
|
-
*/
|
|
223
|
-
getStream?: () => Promise<Readable>;
|
|
224
|
-
};
|
|
225
|
-
/**
|
|
226
|
-
* File visibility options
|
|
227
|
-
*/
|
|
228
|
-
export type FileVisibility = "public" | "private";
|
|
229
|
-
/**
|
|
230
|
-
* Storage event types
|
|
231
|
-
*/
|
|
232
|
-
export type StorageEventType = "beforePut" | "afterPut" | "beforeDelete" | "afterDelete" | "beforeCopy" | "afterCopy" | "beforeMove" | "afterMove";
|
|
233
|
-
/**
|
|
234
|
-
* Storage event payload base
|
|
235
|
-
*/
|
|
236
|
-
export type StorageEventPayload = {
|
|
237
|
-
driver: string;
|
|
238
|
-
location: string;
|
|
239
|
-
timestamp: Date;
|
|
240
|
-
};
|
|
241
|
-
/**
|
|
242
|
-
* Put event payload
|
|
243
|
-
*/
|
|
244
|
-
export type StoragePutEventPayload = StorageEventPayload & {
|
|
245
|
-
file?: StorageFileData;
|
|
246
|
-
size?: number;
|
|
247
|
-
mimeType?: string;
|
|
248
|
-
};
|
|
249
|
-
/**
|
|
250
|
-
* Copy/Move event payload
|
|
251
|
-
*/
|
|
252
|
-
export type StorageCopyEventPayload = StorageEventPayload & {
|
|
253
|
-
from: string;
|
|
254
|
-
to: string;
|
|
255
|
-
file?: StorageFileData;
|
|
256
|
-
};
|
|
257
|
-
/**
|
|
258
|
-
* Storage event handler type
|
|
259
|
-
*/
|
|
260
|
-
export type StorageEventHandler<T extends StorageEventPayload = StorageEventPayload> = (payload: T) => void | Promise<void>;
|
|
261
|
-
/**
|
|
262
|
-
* Result of a batch delete operation
|
|
263
|
-
*/
|
|
264
|
-
export type DeleteManyResult = {
|
|
265
|
-
location: string;
|
|
266
|
-
deleted: boolean;
|
|
267
|
-
error?: string;
|
|
268
|
-
};
|
|
269
|
-
export type StorageDriverType = "local" | "s3" | "r2" | "spaces";
|
|
270
|
-
/**
|
|
271
|
-
* Storage driver configuration
|
|
272
|
-
* Used in configuration files
|
|
273
|
-
*/
|
|
274
|
-
export type StorageDriverConfig = {
|
|
275
|
-
/**
|
|
276
|
-
* Driver type
|
|
277
|
-
*/
|
|
278
|
-
driver: StorageDriverType;
|
|
279
|
-
/**
|
|
280
|
-
* Root path for local storage
|
|
281
|
-
*/
|
|
282
|
-
root?: string;
|
|
283
|
-
/**
|
|
284
|
-
* Secret key for signing local temporary URLs
|
|
285
|
-
*/
|
|
286
|
-
signatureKey?: string;
|
|
287
|
-
/**
|
|
288
|
-
* Bucket name (required for cloud drivers)
|
|
289
|
-
*/
|
|
290
|
-
bucket?: string;
|
|
291
|
-
/**
|
|
292
|
-
* Region (required for cloud drivers)
|
|
293
|
-
*/
|
|
294
|
-
region?: string;
|
|
295
|
-
/**
|
|
296
|
-
* Access key ID (required for cloud drivers)
|
|
297
|
-
*/
|
|
298
|
-
accessKeyId?: string;
|
|
299
|
-
/**
|
|
300
|
-
* Secret access key (required for cloud drivers)
|
|
301
|
-
*/
|
|
302
|
-
secretAccessKey?: string;
|
|
303
|
-
/**
|
|
304
|
-
* Custom endpoint URL
|
|
305
|
-
*/
|
|
306
|
-
endpoint?: string;
|
|
307
|
-
/**
|
|
308
|
-
* URL prefix for public URLs
|
|
309
|
-
*/
|
|
310
|
-
urlPrefix?: string;
|
|
311
|
-
/**
|
|
312
|
-
* Cloudflare account ID (required for R2)
|
|
313
|
-
*/
|
|
314
|
-
accountId?: string;
|
|
315
|
-
/**
|
|
316
|
-
* Custom public domain for R2
|
|
317
|
-
*/
|
|
318
|
-
publicDomain?: string;
|
|
319
|
-
};
|
|
320
|
-
/**
|
|
321
|
-
* Storage driver registry interface.
|
|
322
|
-
*
|
|
323
|
-
* This interface is extended via module augmentation by generated typings.
|
|
324
|
-
* Each key represents a configured storage driver name.
|
|
325
|
-
*
|
|
326
|
-
* @example Generated augmentation:
|
|
327
|
-
* ```typescript
|
|
328
|
-
* declare module "@warlock.js/core" {
|
|
329
|
-
* interface StorageDriverRegistry {
|
|
330
|
-
* disk: true;
|
|
331
|
-
* aws: true;
|
|
332
|
-
* }
|
|
333
|
-
* }
|
|
334
|
-
* ```
|
|
335
|
-
*/
|
|
336
|
-
export interface StorageDriverRegistry {
|
|
337
|
-
}
|
|
338
|
-
/**
|
|
339
|
-
* Storage driver name type.
|
|
340
|
-
*
|
|
341
|
-
* Extracts driver names from the registry interface.
|
|
342
|
-
* Falls back to `string` if no drivers are registered.
|
|
343
|
-
* Autocomplete provided by generated `.warlock/typings/storage.d.ts`
|
|
344
|
-
*/
|
|
345
|
-
export type StorageDriverName = keyof StorageDriverRegistry extends never ? string : keyof StorageDriverRegistry;
|
|
346
|
-
/**
|
|
347
|
-
* Storage configurations
|
|
348
|
-
*/
|
|
349
|
-
export type StorageConfigurations = {
|
|
350
|
-
/**
|
|
351
|
-
* Default driver name
|
|
352
|
-
*/
|
|
353
|
-
default: StorageDriverName;
|
|
354
|
-
/**
|
|
355
|
-
* Driver configurations
|
|
356
|
-
*/
|
|
357
|
-
drivers: Record<StorageDriverName, StorageDriverConfig>;
|
|
358
|
-
/**
|
|
359
|
-
* Optional resolver for dynamic driver selection (e.g., multi-tenancy)
|
|
360
|
-
*/
|
|
361
|
-
resolver?: () => Promise<StorageDriverName> | StorageDriverName;
|
|
362
|
-
};
|
|
363
|
-
/**
|
|
364
|
-
* Base storage driver contract
|
|
365
|
-
*
|
|
366
|
-
* Defines the core operations that all storage drivers must implement.
|
|
367
|
-
* Drivers return raw data objects (`StorageFileData`), while the
|
|
368
|
-
* `ScopedStorage` and `Storage` classes wrap these in `StorageFile` instances.
|
|
369
|
-
*/
|
|
370
|
-
export interface StorageDriverContract {
|
|
371
|
-
/**
|
|
372
|
-
* Driver name identifier (e.g., "local", "s3", "r2", "spaces")
|
|
373
|
-
*/
|
|
374
|
-
readonly name: StorageDriverType;
|
|
375
|
-
/**
|
|
376
|
-
* Store a file in storage
|
|
377
|
-
*
|
|
378
|
-
* @param file - File content as Buffer, UploadedFile, string content, or Readable stream
|
|
379
|
-
* @param location - Destination path in storage
|
|
380
|
-
* @param options - Optional storage options (mimeType, cacheControl, etc.)
|
|
381
|
-
* @returns Raw file data object
|
|
382
|
-
*/
|
|
383
|
-
put(file: Buffer | UploadedFile | string | Readable, location: string, options?: PutOptions): Promise<StorageFileData>;
|
|
384
|
-
/**
|
|
385
|
-
* Store a file from a readable stream
|
|
386
|
-
*
|
|
387
|
-
* Optimized for large files - streams directly without full buffering.
|
|
388
|
-
*
|
|
389
|
-
* @param stream - Readable stream of file content
|
|
390
|
-
* @param location - Destination path in storage
|
|
391
|
-
* @param options - Optional storage options
|
|
392
|
-
* @returns Raw file data object
|
|
393
|
-
*/
|
|
394
|
-
putStream(stream: Readable, location: string, options?: PutOptions): Promise<StorageFileData>;
|
|
395
|
-
/**
|
|
396
|
-
* Retrieve file contents as Buffer
|
|
397
|
-
*
|
|
398
|
-
* @param location - Path to the file
|
|
399
|
-
* @returns Buffer containing file contents
|
|
400
|
-
* @throws Error if file not found
|
|
401
|
-
*/
|
|
402
|
-
get(location: string): Promise<Buffer>;
|
|
403
|
-
/**
|
|
404
|
-
* Retrieve file contents as a readable stream
|
|
405
|
-
*
|
|
406
|
-
* @param location - Path to the file
|
|
407
|
-
* @returns Readable stream of file contents
|
|
408
|
-
* @throws Error if file not found
|
|
409
|
-
*/
|
|
410
|
-
getStream(location: string): Promise<Readable>;
|
|
411
|
-
/**
|
|
412
|
-
* Delete a file
|
|
413
|
-
*
|
|
414
|
-
* @param location - Path to the file
|
|
415
|
-
* @returns `true` if deleted, `false` if not found
|
|
416
|
-
*/
|
|
417
|
-
delete(location: string): Promise<boolean>;
|
|
418
|
-
/**
|
|
419
|
-
* Delete multiple files at once
|
|
420
|
-
*
|
|
421
|
-
* @param locations - Array of file paths to delete
|
|
422
|
-
* @returns Array of results with status for each file
|
|
423
|
-
*/
|
|
424
|
-
deleteMany(locations: string[]): Promise<DeleteManyResult[]>;
|
|
425
|
-
/**
|
|
426
|
-
* Check if a file exists
|
|
427
|
-
*
|
|
428
|
-
* @param location - Path to check
|
|
429
|
-
* @returns `true` if exists, `false` otherwise
|
|
430
|
-
*/
|
|
431
|
-
exists(location: string): Promise<boolean>;
|
|
432
|
-
/**
|
|
433
|
-
* Get the public URL for a file
|
|
434
|
-
*
|
|
435
|
-
* @param location - File path
|
|
436
|
-
* @returns Public URL string
|
|
437
|
-
*/
|
|
438
|
-
url(location: string): string;
|
|
439
|
-
/**
|
|
440
|
-
* Get a temporary signed URL with expiration
|
|
441
|
-
*
|
|
442
|
-
* @param location - File path
|
|
443
|
-
* @param expiresIn - Seconds until expiration (default: 3600)
|
|
444
|
-
* @returns Signed URL string
|
|
445
|
-
*/
|
|
446
|
-
temporaryUrl(location: string, expiresIn?: number): Promise<string>;
|
|
447
|
-
/**
|
|
448
|
-
* Get file metadata without downloading
|
|
449
|
-
*
|
|
450
|
-
* @param location - File path
|
|
451
|
-
* @returns File information object
|
|
452
|
-
* @throws Error if file not found
|
|
453
|
-
*/
|
|
454
|
-
getInfo(location: string): Promise<StorageFileInfo>;
|
|
455
|
-
/**
|
|
456
|
-
* Get file size in bytes
|
|
457
|
-
*
|
|
458
|
-
* @param location - File path
|
|
459
|
-
* @returns File size in bytes
|
|
460
|
-
* @throws Error if file not found
|
|
461
|
-
*/
|
|
462
|
-
size(location: string): Promise<number>;
|
|
463
|
-
/**
|
|
464
|
-
* Copy a file to a new location
|
|
465
|
-
*
|
|
466
|
-
* @param from - Source path
|
|
467
|
-
* @param to - Destination path
|
|
468
|
-
* @returns Raw file data object for the copy
|
|
469
|
-
*/
|
|
470
|
-
copy(from: string, to: string): Promise<StorageFileData>;
|
|
471
|
-
/**
|
|
472
|
-
* Move a file to a new location
|
|
473
|
-
*
|
|
474
|
-
* @param from - Source path
|
|
475
|
-
* @param to - Destination path
|
|
476
|
-
* @returns Raw file data object at new location
|
|
477
|
-
*/
|
|
478
|
-
move(from: string, to: string): Promise<StorageFileData>;
|
|
479
|
-
/**
|
|
480
|
-
* List files in a directory
|
|
481
|
-
*
|
|
482
|
-
* @param directory - Directory path
|
|
483
|
-
* @param options - List options (recursive, limit, cursor)
|
|
484
|
-
* @returns Array of file information objects
|
|
485
|
-
*/
|
|
486
|
-
list(directory: string, options?: ListOptions): Promise<StorageFileInfo[]>;
|
|
487
|
-
/**
|
|
488
|
-
* Get the absolute filesystem path for a location
|
|
489
|
-
* Only available for local storage drivers.
|
|
490
|
-
*
|
|
491
|
-
* @param location - File path
|
|
492
|
-
* @returns Absolute filesystem path
|
|
493
|
-
*/
|
|
494
|
-
path?(location: string): string;
|
|
495
|
-
}
|
|
496
|
-
/**
|
|
497
|
-
* Cloud storage driver contract with extended methods
|
|
498
|
-
*
|
|
499
|
-
* Extends the base contract with cloud-specific functionality
|
|
500
|
-
* like presigned URLs, visibility control, and storage classes.
|
|
501
|
-
*/
|
|
502
|
-
export interface CloudStorageDriverContract extends StorageDriverContract {
|
|
503
|
-
/**
|
|
504
|
-
* Store a file (returns cloud-specific data)
|
|
505
|
-
*/
|
|
506
|
-
put(file: Buffer, location: string, options?: PutOptions): Promise<CloudStorageFileData>;
|
|
507
|
-
/**
|
|
508
|
-
* Store a file from stream (returns cloud-specific data)
|
|
509
|
-
*/
|
|
510
|
-
putStream(stream: Readable, location: string, options?: PutOptions): Promise<CloudStorageFileData>;
|
|
511
|
-
/**
|
|
512
|
-
* Copy a file (returns cloud-specific data)
|
|
513
|
-
*/
|
|
514
|
-
copy(from: string, to: string): Promise<CloudStorageFileData>;
|
|
515
|
-
/**
|
|
516
|
-
* Move a file (returns cloud-specific data)
|
|
517
|
-
*/
|
|
518
|
-
move(from: string, to: string): Promise<CloudStorageFileData>;
|
|
519
|
-
/**
|
|
520
|
-
* Get a presigned URL for downloading
|
|
521
|
-
*
|
|
522
|
-
* @param location - File path
|
|
523
|
-
* @param options - Presigned URL options
|
|
524
|
-
* @returns Presigned download URL
|
|
525
|
-
*/
|
|
526
|
-
getPresignedUrl(location: string, options?: PresignedOptions): Promise<string>;
|
|
527
|
-
/**
|
|
528
|
-
* Get a presigned URL for uploading
|
|
529
|
-
*
|
|
530
|
-
* @param location - Destination path
|
|
531
|
-
* @param options - Presigned upload options
|
|
532
|
-
* @returns Presigned upload URL
|
|
533
|
-
*/
|
|
534
|
-
getPresignedUploadUrl(location: string, options?: PresignedUploadOptions): Promise<string>;
|
|
535
|
-
/**
|
|
536
|
-
* Get the bucket name
|
|
537
|
-
*/
|
|
538
|
-
getBucket(): string;
|
|
539
|
-
/**
|
|
540
|
-
* Get the region
|
|
541
|
-
*/
|
|
542
|
-
getRegion(): string;
|
|
543
|
-
/**
|
|
544
|
-
* Set storage class (e.g., STANDARD, GLACIER, etc.)
|
|
545
|
-
*
|
|
546
|
-
* @param location - File path
|
|
547
|
-
* @param storageClass - Target storage class
|
|
548
|
-
*/
|
|
549
|
-
setStorageClass(location: string, storageClass: string): Promise<void>;
|
|
550
|
-
/**
|
|
551
|
-
* Set file visibility
|
|
552
|
-
*
|
|
553
|
-
* @param location - File path
|
|
554
|
-
* @param visibility - "public" or "private"
|
|
555
|
-
*/
|
|
556
|
-
setVisibility(location: string, visibility: FileVisibility): Promise<void>;
|
|
557
|
-
/**
|
|
558
|
-
* Get file visibility
|
|
559
|
-
*
|
|
560
|
-
* @param location - File path
|
|
561
|
-
* @returns Current visibility setting
|
|
562
|
-
*/
|
|
563
|
-
getVisibility(location: string): Promise<FileVisibility>;
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* Scoped storage contract
|
|
567
|
-
*
|
|
568
|
-
* Contract for storage wrappers that return `StorageFile` instances
|
|
569
|
-
* instead of raw `StorageFileData`. Used by `ScopedStorage` and `Storage`.
|
|
570
|
-
*
|
|
571
|
-
* This provides the developer-facing API with rich file objects.
|
|
572
|
-
*/
|
|
573
|
-
export interface ScopedStorageContract {
|
|
574
|
-
/**
|
|
575
|
-
* Driver name identifier
|
|
576
|
-
*/
|
|
577
|
-
readonly name: string;
|
|
578
|
-
/**
|
|
579
|
-
* Store a file in storage
|
|
580
|
-
*
|
|
581
|
-
* @param file - File content
|
|
582
|
-
* @param location - Destination path
|
|
583
|
-
* @param options - Storage options
|
|
584
|
-
* @returns StorageFile instance
|
|
585
|
-
*/
|
|
586
|
-
put(file: Buffer | UploadedFile | string | Readable, location: string, options?: PutOptions): Promise<StorageFile>;
|
|
587
|
-
/**
|
|
588
|
-
* Store a file from stream
|
|
589
|
-
*/
|
|
590
|
-
putStream(stream: Readable, location: string, options?: PutOptions): Promise<StorageFile>;
|
|
591
|
-
/**
|
|
592
|
-
* Get file contents
|
|
593
|
-
*/
|
|
594
|
-
get(location: string): Promise<Buffer>;
|
|
595
|
-
/**
|
|
596
|
-
* Get file as stream
|
|
597
|
-
*/
|
|
598
|
-
getStream(location: string): Promise<Readable>;
|
|
599
|
-
/**
|
|
600
|
-
* Delete a file
|
|
601
|
-
*/
|
|
602
|
-
delete(location: string | StorageFile): Promise<boolean>;
|
|
603
|
-
/**
|
|
604
|
-
* Delete multiple files
|
|
605
|
-
*/
|
|
606
|
-
deleteMany(locations: string[]): Promise<DeleteManyResult[]>;
|
|
607
|
-
/**
|
|
608
|
-
* Check if file exists
|
|
609
|
-
*/
|
|
610
|
-
exists(location: string): Promise<boolean>;
|
|
611
|
-
/**
|
|
612
|
-
* Get public URL
|
|
613
|
-
*/
|
|
614
|
-
url(location: string): string;
|
|
615
|
-
/**
|
|
616
|
-
* Get temporary signed URL
|
|
617
|
-
*/
|
|
618
|
-
temporaryUrl(location: string, expiresIn?: number): Promise<string>;
|
|
619
|
-
/**
|
|
620
|
-
* Get file metadata
|
|
621
|
-
*/
|
|
622
|
-
getInfo(location: string): Promise<StorageFileInfo>;
|
|
623
|
-
/**
|
|
624
|
-
* Get file size
|
|
625
|
-
*/
|
|
626
|
-
size(location: string): Promise<number>;
|
|
627
|
-
/**
|
|
628
|
-
* Copy a file
|
|
629
|
-
*/
|
|
630
|
-
copy(from: string | StorageFile, to: string): Promise<StorageFile>;
|
|
631
|
-
/**
|
|
632
|
-
* Move a file
|
|
633
|
-
*/
|
|
634
|
-
move(from: string | StorageFile, to: string): Promise<StorageFile>;
|
|
635
|
-
/**
|
|
636
|
-
* List files in directory
|
|
637
|
-
*/
|
|
638
|
-
list(directory?: string, options?: ListOptions): Promise<StorageFileInfo[]>;
|
|
639
|
-
/**
|
|
640
|
-
* Get a StorageFile instance
|
|
641
|
-
*/
|
|
642
|
-
file(location: string): Promise<StorageFile>;
|
|
643
|
-
}
|
|
644
|
-
/**
|
|
645
|
-
* Storage manager contract
|
|
646
|
-
*
|
|
647
|
-
* Extends `ScopedStorageContract` with manager-specific functionality
|
|
648
|
-
* like driver management, events, and configuration.
|
|
649
|
-
*
|
|
650
|
-
* This is the contract implemented by the `Storage` class.
|
|
651
|
-
*/
|
|
652
|
-
export interface StorageManagerContract extends ScopedStorageContract {
|
|
653
|
-
/**
|
|
654
|
-
* Get a scoped storage for a specific driver
|
|
655
|
-
*
|
|
656
|
-
* Returns a `ScopedStorage` instance that wraps the specified driver
|
|
657
|
-
* and provides the same DX (returns `StorageFile` instances).
|
|
658
|
-
*
|
|
659
|
-
* @param name - Driver name as configured
|
|
660
|
-
* @returns ScopedStorage instance for the driver
|
|
661
|
-
*/
|
|
662
|
-
use(name: StorageDriverName): ScopedStorageContract;
|
|
663
|
-
/**
|
|
664
|
-
* Get a raw driver instance
|
|
665
|
-
*
|
|
666
|
-
* Returns the underlying driver directly for advanced use cases.
|
|
667
|
-
* Unlike `use()`, this returns raw `StorageFileData` instead of `StorageFile`.
|
|
668
|
-
*
|
|
669
|
-
* @param name - Driver name as configured
|
|
670
|
-
* @returns Raw driver instance
|
|
671
|
-
*/
|
|
672
|
-
getDriver(name: StorageDriverName): StorageDriverContract;
|
|
673
|
-
/**
|
|
674
|
-
* Register a new driver configuration at runtime
|
|
675
|
-
*
|
|
676
|
-
* @param name - Unique driver name
|
|
677
|
-
* @param config - Driver configuration
|
|
678
|
-
* @returns This instance for chaining
|
|
679
|
-
*/
|
|
680
|
-
register(name: StorageDriverName, config: StorageDriverConfig): this;
|
|
681
|
-
/**
|
|
682
|
-
* Set the default driver name
|
|
683
|
-
*
|
|
684
|
-
* @param name - Driver name to use as default
|
|
685
|
-
* @returns This instance for chaining
|
|
686
|
-
*/
|
|
687
|
-
setDefault(name: StorageDriverName): this;
|
|
688
|
-
/**
|
|
689
|
-
* Get the current driver instance
|
|
690
|
-
*
|
|
691
|
-
* Resolves the driver based on configuration, including
|
|
692
|
-
* any async resolver for multi-tenancy support.
|
|
693
|
-
*
|
|
694
|
-
* @returns Promise resolving to the current driver
|
|
695
|
-
*/
|
|
696
|
-
currentDriver(): Promise<StorageDriverContract>;
|
|
697
|
-
/**
|
|
698
|
-
* Check if the current driver is a cloud driver
|
|
699
|
-
*
|
|
700
|
-
* @returns Promise resolving to true if cloud driver
|
|
701
|
-
*/
|
|
702
|
-
isCloud(): Promise<boolean>;
|
|
703
|
-
/**
|
|
704
|
-
* Register an event handler
|
|
705
|
-
*
|
|
706
|
-
* @param event - Event type (beforePut, afterPut, etc.)
|
|
707
|
-
* @param handler - Event handler function
|
|
708
|
-
* @returns Event subscription for unsubscribing
|
|
709
|
-
*/
|
|
710
|
-
on<T extends StorageEventPayload>(event: StorageEventType, handler: StorageEventHandler<T>): EventSubscription;
|
|
711
|
-
/**
|
|
712
|
-
* Remove all handlers for an event type
|
|
713
|
-
*
|
|
714
|
-
* @param event - Event type to remove handlers for
|
|
715
|
-
* @returns This instance for chaining
|
|
716
|
-
*/
|
|
717
|
-
off(event: StorageEventType): this;
|
|
718
|
-
}
|
|
719
|
-
/**
|
|
720
|
-
* Event subscription returned by event handlers
|
|
721
|
-
*/
|
|
722
|
-
export interface EventSubscription {
|
|
723
|
-
/**
|
|
724
|
-
* Unsubscribe from the event
|
|
725
|
-
*/
|
|
726
|
-
unsubscribe(): void;
|
|
727
|
-
}
|
|
728
|
-
//# sourceMappingURL=types.d.ts.map
|