@warlock.js/core 4.1.14 → 4.2.0
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/CHANGELOG.md +24 -0
- package/LICENSE +21 -0
- package/esm/application/app.d.mts +1 -1
- package/esm/application/app.d.mts.map +1 -1
- package/esm/application/app.mjs +1 -1
- package/esm/application/app.mjs.map +1 -1
- package/esm/application/application-config-types.d.mts +1 -1
- package/esm/application/application-config-types.d.mts.map +1 -1
- package/esm/application/application.d.mts +1 -1
- package/esm/application/application.d.mts.map +1 -1
- package/esm/application/application.mjs +1 -1
- package/esm/application/application.mjs.map +1 -1
- package/esm/benchmark/benchmark-snapshots.d.mts +1 -1
- package/esm/benchmark/benchmark-snapshots.d.mts.map +1 -1
- package/esm/benchmark/benchmark-snapshots.mjs +1 -1
- package/esm/benchmark/benchmark-snapshots.mjs.map +1 -1
- package/esm/benchmark/benchmark.d.mts +1 -1
- package/esm/benchmark/benchmark.d.mts.map +1 -1
- package/esm/benchmark/benchmark.mjs +1 -1
- package/esm/benchmark/benchmark.mjs.map +1 -1
- package/esm/benchmark/channels/console.channel.d.mts +1 -1
- package/esm/benchmark/channels/console.channel.d.mts.map +1 -1
- package/esm/benchmark/channels/console.channel.mjs +1 -1
- package/esm/benchmark/channels/console.channel.mjs.map +1 -1
- package/esm/benchmark/channels/noop.channel.d.mts +1 -1
- package/esm/benchmark/channels/noop.channel.d.mts.map +1 -1
- package/esm/benchmark/channels/noop.channel.mjs +1 -1
- package/esm/benchmark/channels/noop.channel.mjs.map +1 -1
- package/esm/benchmark/profiler.d.mts +1 -1
- package/esm/benchmark/profiler.d.mts.map +1 -1
- package/esm/benchmark/profiler.mjs +1 -1
- package/esm/benchmark/profiler.mjs.map +1 -1
- package/esm/benchmark/types.d.mts +1 -1
- package/esm/benchmark/types.d.mts.map +1 -1
- package/esm/bootstrap/setup.d.mts +1 -1
- package/esm/bootstrap/setup.d.mts.map +1 -1
- package/esm/bootstrap/setup.mjs +1 -1
- package/esm/bootstrap/setup.mjs.map +1 -1
- package/esm/bootstrap.d.mts +1 -1
- package/esm/bootstrap.d.mts.map +1 -1
- package/esm/bootstrap.mjs +1 -1
- package/esm/bootstrap.mjs.map +1 -1
- package/esm/cache/database-cache-driver.d.mts +1 -1
- package/esm/cache/database-cache-driver.d.mts.map +1 -1
- package/esm/cache/database-cache-driver.mjs +1 -1
- package/esm/cache/database-cache-driver.mjs.map +1 -1
- package/esm/cache/index.mjs +1 -1
- package/esm/cache/index.mjs.map +1 -1
- package/esm/cli/cli-command.d.mts +1 -1
- package/esm/cli/cli-command.d.mts.map +1 -1
- package/esm/cli/cli-command.mjs +1 -1
- package/esm/cli/cli-command.mjs.map +1 -1
- package/esm/cli/types.d.mts +1 -1
- package/esm/cli/types.d.mts.map +1 -1
- package/esm/config/config-getter.d.mts +1 -1
- package/esm/config/config-getter.d.mts.map +1 -1
- package/esm/config/config-getter.mjs +1 -1
- package/esm/config/config-getter.mjs.map +1 -1
- package/esm/config/config-handlers.d.mts +1 -1
- package/esm/config/config-handlers.d.mts.map +1 -1
- package/esm/config/config-handlers.mjs +1 -1
- package/esm/config/config-handlers.mjs.map +1 -1
- package/esm/config/config-loader.d.mts +1 -1
- package/esm/config/config-loader.d.mts.map +1 -1
- package/esm/config/config-loader.mjs +1 -1
- package/esm/config/config-loader.mjs.map +1 -1
- package/esm/config/config-manager.mjs +1 -1
- package/esm/config/config-manager.mjs.map +1 -1
- package/esm/config/config-special-handlers.d.mts +1 -1
- package/esm/config/config-special-handlers.d.mts.map +1 -1
- package/esm/config/config-special-handlers.mjs +1 -1
- package/esm/config/config-special-handlers.mjs.map +1 -1
- package/esm/config/load-config-files.mjs +1 -1
- package/esm/config/load-config-files.mjs.map +1 -1
- package/esm/config/types.d.mts +1 -1
- package/esm/config/types.d.mts.map +1 -1
- package/esm/connectors/access-connector.d.mts +39 -0
- package/esm/connectors/access-connector.d.mts.map +1 -0
- package/esm/connectors/access-connector.mjs +54 -0
- package/esm/connectors/access-connector.mjs.map +1 -0
- package/esm/connectors/base-connector.d.mts +1 -1
- package/esm/connectors/base-connector.d.mts.map +1 -1
- package/esm/connectors/base-connector.mjs +1 -1
- package/esm/connectors/base-connector.mjs.map +1 -1
- package/esm/connectors/cache-connector.d.mts +1 -1
- package/esm/connectors/cache-connector.d.mts.map +1 -1
- package/esm/connectors/cache-connector.mjs +1 -1
- package/esm/connectors/cache-connector.mjs.map +1 -1
- package/esm/connectors/connectors-manager.d.mts +1 -1
- package/esm/connectors/connectors-manager.d.mts.map +1 -1
- package/esm/connectors/connectors-manager.mjs +5 -1
- package/esm/connectors/connectors-manager.mjs.map +1 -1
- package/esm/connectors/database-connector.d.mts +1 -1
- package/esm/connectors/database-connector.d.mts.map +1 -1
- package/esm/connectors/database-connector.mjs +1 -1
- package/esm/connectors/database-connector.mjs.map +1 -1
- package/esm/connectors/herald-connector.d.mts +1 -1
- package/esm/connectors/herald-connector.d.mts.map +1 -1
- package/esm/connectors/herald-connector.mjs +2 -2
- package/esm/connectors/herald-connector.mjs.map +1 -1
- package/esm/connectors/http-connector.d.mts +1 -1
- package/esm/connectors/http-connector.d.mts.map +1 -1
- package/esm/connectors/http-connector.mjs +3 -1
- package/esm/connectors/http-connector.mjs.map +1 -1
- package/esm/connectors/index.d.mts +2 -0
- package/esm/connectors/index.mjs +2 -0
- package/esm/connectors/logger-connector.d.mts +1 -1
- package/esm/connectors/logger-connector.d.mts.map +1 -1
- package/esm/connectors/logger-connector.mjs +1 -1
- package/esm/connectors/logger-connector.mjs.map +1 -1
- package/esm/connectors/mail-connector.d.mts +1 -1
- package/esm/connectors/mail-connector.d.mts.map +1 -1
- package/esm/connectors/mail-connector.mjs +1 -1
- package/esm/connectors/mail-connector.mjs.map +1 -1
- package/esm/connectors/notifications-connector.d.mts +38 -0
- package/esm/connectors/notifications-connector.d.mts.map +1 -0
- package/esm/connectors/notifications-connector.mjs +51 -0
- package/esm/connectors/notifications-connector.mjs.map +1 -0
- package/esm/connectors/socket-connector.d.mts +1 -1
- package/esm/connectors/socket-connector.d.mts.map +1 -1
- package/esm/connectors/socket-connector.mjs +1 -1
- package/esm/connectors/socket-connector.mjs.map +1 -1
- package/esm/connectors/storage.connector.d.mts +1 -1
- package/esm/connectors/storage.connector.d.mts.map +1 -1
- package/esm/connectors/storage.connector.mjs +1 -1
- package/esm/connectors/storage.connector.mjs.map +1 -1
- package/esm/connectors/types.d.mts +5 -3
- package/esm/connectors/types.d.mts.map +1 -1
- package/esm/connectors/types.mjs +3 -1
- package/esm/connectors/types.mjs.map +1 -1
- package/esm/container/index.d.mts +1 -1
- package/esm/container/index.d.mts.map +1 -1
- package/esm/container/index.mjs +1 -1
- package/esm/container/index.mjs.map +1 -1
- package/esm/database/models/database-log/database-log.d.mts +1 -1
- package/esm/database/models/database-log/database-log.d.mts.map +1 -1
- package/esm/database/models/database-log/database-log.mjs +1 -1
- package/esm/database/models/database-log/database-log.mjs.map +1 -1
- package/esm/database/seeds/seeder.d.mts +1 -1
- package/esm/database/seeds/seeder.d.mts.map +1 -1
- package/esm/database/seeds/seeder.mjs +1 -1
- package/esm/database/seeds/seeder.mjs.map +1 -1
- package/esm/database/seeds/types.d.mts +1 -1
- package/esm/database/seeds/types.d.mts.map +1 -1
- package/esm/database/utils.d.mts +1 -1
- package/esm/database/utils.d.mts.map +1 -1
- package/esm/database/utils.mjs +1 -1
- package/esm/database/utils.mjs.map +1 -1
- package/esm/dev-server/create-worker.mjs +1 -1
- package/esm/dev-server/create-worker.mjs.map +1 -1
- package/esm/dev-server/dependency-graph.d.mts +1 -1
- package/esm/dev-server/dependency-graph.d.mts.map +1 -1
- package/esm/dev-server/dependency-graph.mjs +1 -1
- package/esm/dev-server/dependency-graph.mjs.map +1 -1
- package/esm/dev-server/dev-logger.mjs +2 -13
- package/esm/dev-server/dev-logger.mjs.map +1 -1
- package/esm/dev-server/events.mjs +1 -1
- package/esm/dev-server/events.mjs.map +1 -1
- package/esm/dev-server/file-event-handler.mjs +1 -1
- package/esm/dev-server/file-event-handler.mjs.map +1 -1
- package/esm/dev-server/file-manager.d.mts +1 -1
- package/esm/dev-server/file-manager.d.mts.map +1 -1
- package/esm/dev-server/file-manager.mjs +1 -1
- package/esm/dev-server/file-manager.mjs.map +1 -1
- package/esm/dev-server/file-operations.d.mts +1 -1
- package/esm/dev-server/file-operations.d.mts.map +1 -1
- package/esm/dev-server/file-operations.mjs +1 -1
- package/esm/dev-server/file-operations.mjs.map +1 -1
- package/esm/dev-server/files-orchestrator.d.mts +1 -1
- package/esm/dev-server/files-orchestrator.d.mts.map +1 -1
- package/esm/dev-server/files-orchestrator.mjs +1 -1
- package/esm/dev-server/files-orchestrator.mjs.map +1 -1
- package/esm/dev-server/files-watcher.d.mts +1 -1
- package/esm/dev-server/files-watcher.d.mts.map +1 -1
- package/esm/dev-server/files-watcher.mjs +1 -1
- package/esm/dev-server/files-watcher.mjs.map +1 -1
- package/esm/dev-server/flags.mjs +1 -1
- package/esm/dev-server/flags.mjs.map +1 -1
- package/esm/dev-server/health-checker/checkers/base-health-checker.d.mts +1 -1
- package/esm/dev-server/health-checker/checkers/base-health-checker.d.mts.map +1 -1
- package/esm/dev-server/health-checker/checkers/base-health-checker.mjs +1 -1
- package/esm/dev-server/health-checker/checkers/base-health-checker.mjs.map +1 -1
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.d.mts +1 -1
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.d.mts.map +1 -1
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.mjs +1 -1
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.mjs.map +1 -1
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.d.mts +1 -1
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.d.mts.map +1 -1
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.mjs +1 -1
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.mjs.map +1 -1
- package/esm/dev-server/health-checker/file-health-checker.contract.d.mts +1 -1
- package/esm/dev-server/health-checker/file-health-checker.contract.d.mts.map +1 -1
- package/esm/dev-server/health-checker/file-health-result.d.mts +1 -1
- package/esm/dev-server/health-checker/file-health-result.d.mts.map +1 -1
- package/esm/dev-server/health-checker/file-health-result.mjs +1 -1
- package/esm/dev-server/health-checker/file-health-result.mjs.map +1 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.d.mts +1 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.d.mts.map +1 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs +1 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.mjs.map +1 -1
- package/esm/dev-server/health-checker/workers/eslint-health.worker.mjs +1 -1
- package/esm/dev-server/health-checker/workers/eslint-health.worker.mjs.map +1 -1
- package/esm/dev-server/health-checker/workers/ts-health.worker.mjs +1 -1
- package/esm/dev-server/health-checker/workers/ts-health.worker.mjs.map +1 -1
- package/esm/dev-server/loader/build-transpile-init.mjs +1 -1
- package/esm/dev-server/loader/build-transpile-init.mjs.map +1 -1
- package/esm/dev-server/loader/register-loader.mjs +1 -1
- package/esm/dev-server/loader/register-loader.mjs.map +1 -1
- package/esm/dev-server/loader/transpile-cache.mjs +2 -164
- package/esm/dev-server/loader/transpile-cache.mjs.map +1 -1
- package/esm/dev-server/manifest-manager.d.mts +1 -1
- package/esm/dev-server/manifest-manager.d.mts.map +1 -1
- package/esm/dev-server/manifest-manager.mjs +1 -1
- package/esm/dev-server/manifest-manager.mjs.map +1 -1
- package/esm/dev-server/module-loader.d.mts +1 -1
- package/esm/dev-server/module-loader.d.mts.map +1 -1
- package/esm/dev-server/module-loader.mjs +1 -1
- package/esm/dev-server/module-loader.mjs.map +1 -1
- package/esm/dev-server/package-json-manager.mjs +1 -1
- package/esm/dev-server/package-json-manager.mjs.map +1 -1
- package/esm/dev-server/parse-imports.mjs +1 -1
- package/esm/dev-server/parse-imports.mjs.map +1 -1
- package/esm/dev-server/path.mjs +1 -1
- package/esm/dev-server/path.mjs.map +1 -1
- package/esm/dev-server/special-files-collector.d.mts +1 -1
- package/esm/dev-server/special-files-collector.d.mts.map +1 -1
- package/esm/dev-server/special-files-collector.mjs +1 -1
- package/esm/dev-server/special-files-collector.mjs.map +1 -1
- package/esm/dev-server/tsconfig-manager.mjs +1 -1
- package/esm/dev-server/tsconfig-manager.mjs.map +1 -1
- package/esm/dev-server/types.d.mts +1 -1
- package/esm/dev-server/types.d.mts.map +1 -1
- package/esm/dev-server/utils.mjs +1 -1
- package/esm/dev-server/utils.mjs.map +1 -1
- package/esm/encryption/encrypt.d.mts +1 -1
- package/esm/encryption/encrypt.d.mts.map +1 -1
- package/esm/encryption/encrypt.mjs +1 -1
- package/esm/encryption/encrypt.mjs.map +1 -1
- package/esm/encryption/hash.d.mts +1 -1
- package/esm/encryption/hash.d.mts.map +1 -1
- package/esm/encryption/hash.mjs +1 -1
- package/esm/encryption/hash.mjs.map +1 -1
- package/esm/encryption/password.d.mts +1 -1
- package/esm/encryption/password.d.mts.map +1 -1
- package/esm/encryption/password.mjs +1 -1
- package/esm/encryption/password.mjs.map +1 -1
- package/esm/encryption/types.d.mts +1 -1
- package/esm/encryption/types.d.mts.map +1 -1
- package/esm/http/config.d.mts +1 -1
- package/esm/http/config.d.mts.map +1 -1
- package/esm/http/config.mjs +1 -1
- package/esm/http/config.mjs.map +1 -1
- package/esm/http/context/request-context.d.mts +1 -1
- package/esm/http/context/request-context.d.mts.map +1 -1
- package/esm/http/context/request-context.mjs +1 -1
- package/esm/http/context/request-context.mjs.map +1 -1
- package/esm/http/createHttpApplication.d.mts +1 -1
- package/esm/http/createHttpApplication.d.mts.map +1 -1
- package/esm/http/createHttpApplication.mjs +1 -1
- package/esm/http/createHttpApplication.mjs.map +1 -1
- package/esm/http/database/RequestLog.d.mts +1 -1
- package/esm/http/database/RequestLog.d.mts.map +1 -1
- package/esm/http/database/RequestLog.mjs +1 -1
- package/esm/http/database/RequestLog.mjs.map +1 -1
- package/esm/http/error-codes.d.mts +1 -1
- package/esm/http/error-codes.d.mts.map +1 -1
- package/esm/http/error-codes.mjs +1 -1
- package/esm/http/error-codes.mjs.map +1 -1
- package/esm/http/errors/errors.d.mts +1 -1
- package/esm/http/errors/errors.d.mts.map +1 -1
- package/esm/http/errors/errors.mjs +1 -1
- package/esm/http/errors/errors.mjs.map +1 -1
- package/esm/http/events.d.mts +1 -1
- package/esm/http/events.d.mts.map +1 -1
- package/esm/http/events.mjs +1 -1
- package/esm/http/events.mjs.map +1 -1
- package/esm/http/middleware/cache-response-middleware.d.mts +1 -1
- package/esm/http/middleware/cache-response-middleware.d.mts.map +1 -1
- package/esm/http/middleware/cache-response-middleware.mjs +1 -1
- package/esm/http/middleware/cache-response-middleware.mjs.map +1 -1
- package/esm/http/middleware/concurrency-limit.middleware.d.mts +1 -1
- package/esm/http/middleware/concurrency-limit.middleware.d.mts.map +1 -1
- package/esm/http/middleware/concurrency-limit.middleware.mjs +1 -1
- package/esm/http/middleware/concurrency-limit.middleware.mjs.map +1 -1
- package/esm/http/middleware/idempotency.middleware.d.mts +1 -1
- package/esm/http/middleware/idempotency.middleware.d.mts.map +1 -1
- package/esm/http/middleware/idempotency.middleware.mjs +1 -1
- package/esm/http/middleware/idempotency.middleware.mjs.map +1 -1
- package/esm/http/middleware/inject-request-context.d.mts +1 -1
- package/esm/http/middleware/inject-request-context.d.mts.map +1 -1
- package/esm/http/middleware/inject-request-context.mjs +1 -1
- package/esm/http/middleware/inject-request-context.mjs.map +1 -1
- package/esm/http/middleware/ip-filter.middleware.d.mts +1 -1
- package/esm/http/middleware/ip-filter.middleware.d.mts.map +1 -1
- package/esm/http/middleware/ip-filter.middleware.mjs +1 -1
- package/esm/http/middleware/ip-filter.middleware.mjs.map +1 -1
- package/esm/http/middleware/maintenance.middleware.d.mts +1 -1
- package/esm/http/middleware/maintenance.middleware.d.mts.map +1 -1
- package/esm/http/middleware/maintenance.middleware.mjs +1 -1
- package/esm/http/middleware/maintenance.middleware.mjs.map +1 -1
- package/esm/http/middleware/max-body-size.middleware.d.mts +1 -1
- package/esm/http/middleware/max-body-size.middleware.d.mts.map +1 -1
- package/esm/http/middleware/max-body-size.middleware.mjs +1 -1
- package/esm/http/middleware/max-body-size.middleware.mjs.map +1 -1
- package/esm/http/middleware/middleware-list.d.mts +1 -1
- package/esm/http/middleware/middleware-list.d.mts.map +1 -1
- package/esm/http/middleware/middleware-list.mjs +1 -1
- package/esm/http/middleware/middleware-list.mjs.map +1 -1
- package/esm/http/middleware/rate-limit.middleware.d.mts +1 -1
- package/esm/http/middleware/rate-limit.middleware.d.mts.map +1 -1
- package/esm/http/middleware/rate-limit.middleware.mjs +1 -1
- package/esm/http/middleware/rate-limit.middleware.mjs.map +1 -1
- package/esm/http/middleware/utils/cidr-match.d.mts +1 -1
- package/esm/http/middleware/utils/cidr-match.d.mts.map +1 -1
- package/esm/http/middleware/utils/cidr-match.mjs +1 -1
- package/esm/http/middleware/utils/cidr-match.mjs.map +1 -1
- package/esm/http/middleware/utils/idempotency-key.d.mts +1 -1
- package/esm/http/middleware/utils/idempotency-key.d.mts.map +1 -1
- package/esm/http/middleware/utils/idempotency-key.mjs +1 -1
- package/esm/http/middleware/utils/idempotency-key.mjs.map +1 -1
- package/esm/http/middleware/utils/parse-size.d.mts +1 -1
- package/esm/http/middleware/utils/parse-size.d.mts.map +1 -1
- package/esm/http/middleware/utils/parse-size.mjs +1 -1
- package/esm/http/middleware/utils/parse-size.mjs.map +1 -1
- package/esm/http/plugins.d.mts +1 -1
- package/esm/http/plugins.d.mts.map +1 -1
- package/esm/http/plugins.mjs +1 -1
- package/esm/http/plugins.mjs.map +1 -1
- package/esm/http/request-controller.d.mts +1 -1
- package/esm/http/request-controller.d.mts.map +1 -1
- package/esm/http/request-controller.mjs +1 -1
- package/esm/http/request-controller.mjs.map +1 -1
- package/esm/http/request.d.mts +1 -1
- package/esm/http/request.d.mts.map +1 -1
- package/esm/http/request.mjs +1 -1
- package/esm/http/request.mjs.map +1 -1
- package/esm/http/response.d.mts +4 -4
- package/esm/http/response.d.mts.map +1 -1
- package/esm/http/response.mjs +1 -1
- package/esm/http/response.mjs.map +1 -1
- package/esm/http/server.d.mts +1 -1
- package/esm/http/server.d.mts.map +1 -1
- package/esm/http/server.mjs +1 -1
- package/esm/http/server.mjs.map +1 -1
- package/esm/http/types.d.mts +1 -1
- package/esm/http/types.d.mts.map +1 -1
- package/esm/http/uploaded-file.d.mts +1 -1
- package/esm/http/uploaded-file.d.mts.map +1 -1
- package/esm/http/uploaded-file.mjs +1 -1
- package/esm/http/uploaded-file.mjs.map +1 -1
- package/esm/http/uploads-config.d.mts +1 -1
- package/esm/http/uploads-config.d.mts.map +1 -1
- package/esm/http/uploads-config.mjs +1 -1
- package/esm/http/uploads-config.mjs.map +1 -1
- package/esm/http/uploads-types.d.mts +1 -1
- package/esm/http/uploads-types.d.mts.map +1 -1
- package/esm/image/image.d.mts +1 -1
- package/esm/image/image.d.mts.map +1 -1
- package/esm/image/image.mjs +1 -1
- package/esm/image/image.mjs.map +1 -1
- package/esm/index.d.mts +5 -2
- package/esm/index.mjs +6 -2
- package/esm/logger/logger.d.mts +1 -1
- package/esm/logger/logger.d.mts.map +1 -1
- package/esm/logger/logger.mjs +1 -1
- package/esm/logger/logger.mjs.map +1 -1
- package/esm/logger/types.d.mts +1 -1
- package/esm/logger/types.d.mts.map +1 -1
- package/esm/mail/config.d.mts +1 -1
- package/esm/mail/config.d.mts.map +1 -1
- package/esm/mail/config.mjs +1 -1
- package/esm/mail/config.mjs.map +1 -1
- package/esm/mail/events.d.mts +1 -1
- package/esm/mail/events.d.mts.map +1 -1
- package/esm/mail/events.mjs +1 -1
- package/esm/mail/events.mjs.map +1 -1
- package/esm/mail/mail.d.mts +1 -1
- package/esm/mail/mail.d.mts.map +1 -1
- package/esm/mail/mail.mjs +1 -1
- package/esm/mail/mail.mjs.map +1 -1
- package/esm/mail/mailer-pool.d.mts +1 -1
- package/esm/mail/mailer-pool.d.mts.map +1 -1
- package/esm/mail/mailer-pool.mjs +1 -1
- package/esm/mail/mailer-pool.mjs.map +1 -1
- package/esm/mail/react-mail.d.mts +1 -1
- package/esm/mail/react-mail.d.mts.map +1 -1
- package/esm/mail/react-mail.mjs +1 -1
- package/esm/mail/react-mail.mjs.map +1 -1
- package/esm/mail/send-mail.d.mts +1 -1
- package/esm/mail/send-mail.d.mts.map +1 -1
- package/esm/mail/send-mail.mjs +1 -1
- package/esm/mail/send-mail.mjs.map +1 -1
- package/esm/mail/test-mailbox.d.mts +1 -1
- package/esm/mail/test-mailbox.d.mts.map +1 -1
- package/esm/mail/test-mailbox.mjs +1 -1
- package/esm/mail/test-mailbox.mjs.map +1 -1
- package/esm/mail/types.d.mts +1 -1
- package/esm/mail/types.d.mts.map +1 -1
- package/esm/mail/types.mjs +1 -1
- package/esm/mail/types.mjs.map +1 -1
- package/esm/react/index.d.mts +1 -1
- package/esm/react/index.d.mts.map +1 -1
- package/esm/react/index.mjs +1 -1
- package/esm/react/index.mjs.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.d.mts +1 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.d.mts.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.mjs +1 -1
- package/esm/repositories/adapters/cascade/cascade-adapter.mjs.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.mts +1 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.d.mts.map +1 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.mjs +1 -1
- package/esm/repositories/adapters/cascade/cascade-query-builder.mjs.map +1 -1
- package/esm/repositories/adapters/cascade/filter-applicator.mjs +1 -1
- package/esm/repositories/adapters/cascade/filter-applicator.mjs.map +1 -1
- package/esm/repositories/contracts/query-builder.contract.d.mts +1 -1
- package/esm/repositories/contracts/query-builder.contract.d.mts.map +1 -1
- package/esm/repositories/contracts/repository-adapter.contract.d.mts +1 -1
- package/esm/repositories/contracts/repository-adapter.contract.d.mts.map +1 -1
- package/esm/repositories/contracts/types.d.mts +1 -1
- package/esm/repositories/contracts/types.d.mts.map +1 -1
- package/esm/repositories/repository.manager.d.mts +1 -1
- package/esm/repositories/repository.manager.d.mts.map +1 -1
- package/esm/repositories/repository.manager.mjs +1 -1
- package/esm/repositories/repository.manager.mjs.map +1 -1
- package/esm/resource/define-resource.d.mts +1 -1
- package/esm/resource/define-resource.d.mts.map +1 -1
- package/esm/resource/define-resource.mjs +1 -1
- package/esm/resource/define-resource.mjs.map +1 -1
- package/esm/resource/register-resource.d.mts +1 -1
- package/esm/resource/register-resource.d.mts.map +1 -1
- package/esm/resource/register-resource.mjs +1 -1
- package/esm/resource/register-resource.mjs.map +1 -1
- package/esm/resource/resource-field-builder.d.mts +1 -1
- package/esm/resource/resource-field-builder.d.mts.map +1 -1
- package/esm/resource/resource-field-builder.mjs +1 -1
- package/esm/resource/resource-field-builder.mjs.map +1 -1
- package/esm/resource/resource.d.mts +1 -1
- package/esm/resource/resource.d.mts.map +1 -1
- package/esm/resource/resource.mjs +1 -1
- package/esm/resource/resource.mjs.map +1 -1
- package/esm/resource/types.d.mts +1 -1
- package/esm/resource/types.d.mts.map +1 -1
- package/esm/restful/restful.d.mts +1 -1
- package/esm/restful/restful.d.mts.map +1 -1
- package/esm/restful/restful.mjs +1 -1
- package/esm/restful/restful.mjs.map +1 -1
- package/esm/router/route-builder.d.mts +1 -1
- package/esm/router/route-builder.d.mts.map +1 -1
- package/esm/router/route-builder.mjs +1 -1
- package/esm/router/route-builder.mjs.map +1 -1
- package/esm/router/route-registry.mjs +1 -1
- package/esm/router/route-registry.mjs.map +1 -1
- package/esm/router/router.d.mts +1 -1
- package/esm/router/router.d.mts.map +1 -1
- package/esm/router/router.mjs +1 -1
- package/esm/router/router.mjs.map +1 -1
- package/esm/router/types.d.mts +1 -1
- package/esm/router/types.d.mts.map +1 -1
- package/esm/socket/types.d.mts +1 -1
- package/esm/socket/types.d.mts.map +1 -1
- package/esm/socket/utils.d.mts +1 -1
- package/esm/socket/utils.d.mts.map +1 -1
- package/esm/socket/utils.mjs +1 -1
- package/esm/socket/utils.mjs.map +1 -1
- package/esm/storage/config.d.mts +1 -1
- package/esm/storage/config.d.mts.map +1 -1
- package/esm/storage/config.mjs +1 -1
- package/esm/storage/config.mjs.map +1 -1
- package/esm/storage/context/storage-driver-context.d.mts +1 -1
- package/esm/storage/context/storage-driver-context.d.mts.map +1 -1
- package/esm/storage/context/storage-driver-context.mjs +1 -1
- package/esm/storage/context/storage-driver-context.mjs.map +1 -1
- package/esm/storage/drivers/cloud-driver.d.mts +1 -1
- package/esm/storage/drivers/cloud-driver.d.mts.map +1 -1
- package/esm/storage/drivers/cloud-driver.mjs +1 -1
- package/esm/storage/drivers/cloud-driver.mjs.map +1 -1
- package/esm/storage/drivers/do-spaces-driver.d.mts +1 -1
- package/esm/storage/drivers/do-spaces-driver.d.mts.map +1 -1
- package/esm/storage/drivers/do-spaces-driver.mjs +1 -1
- package/esm/storage/drivers/do-spaces-driver.mjs.map +1 -1
- package/esm/storage/drivers/local-driver.d.mts +1 -1
- package/esm/storage/drivers/local-driver.d.mts.map +1 -1
- package/esm/storage/drivers/local-driver.mjs +1 -1
- package/esm/storage/drivers/local-driver.mjs.map +1 -1
- package/esm/storage/drivers/r2-driver.d.mts +1 -1
- package/esm/storage/drivers/r2-driver.d.mts.map +1 -1
- package/esm/storage/drivers/r2-driver.mjs +1 -1
- package/esm/storage/drivers/r2-driver.mjs.map +1 -1
- package/esm/storage/drivers/s3-driver.d.mts +1 -1
- package/esm/storage/drivers/s3-driver.d.mts.map +1 -1
- package/esm/storage/drivers/s3-driver.mjs +1 -1
- package/esm/storage/drivers/s3-driver.mjs.map +1 -1
- package/esm/storage/scoped-storage.d.mts +1 -1
- package/esm/storage/scoped-storage.d.mts.map +1 -1
- package/esm/storage/scoped-storage.mjs +1 -1
- package/esm/storage/scoped-storage.mjs.map +1 -1
- package/esm/storage/storage-file.d.mts +1 -1
- package/esm/storage/storage-file.d.mts.map +1 -1
- package/esm/storage/storage-file.mjs +1 -1
- package/esm/storage/storage-file.mjs.map +1 -1
- package/esm/storage/storage.d.mts +1 -1
- package/esm/storage/storage.d.mts.map +1 -1
- package/esm/storage/storage.mjs +1 -1
- package/esm/storage/storage.mjs.map +1 -1
- package/esm/storage/types.d.mts +1 -1
- package/esm/storage/types.d.mts.map +1 -1
- package/esm/storage/utils/mime.d.mts +1 -1
- package/esm/storage/utils/mime.d.mts.map +1 -1
- package/esm/storage/utils/mime.mjs +1 -1
- package/esm/storage/utils/mime.mjs.map +1 -1
- package/esm/tests/start-http-development-server.d.mts +1 -1
- package/esm/tests/start-http-development-server.d.mts.map +1 -1
- package/esm/tests/start-http-development-server.mjs +4 -2
- package/esm/tests/start-http-development-server.mjs.map +1 -1
- package/esm/tests/test-helpers.d.mts +1 -1
- package/esm/tests/test-helpers.d.mts.map +1 -1
- package/esm/tests/test-helpers.mjs +1 -1
- package/esm/tests/test-helpers.mjs.map +1 -1
- package/esm/tests/vitest-setup.d.mts +1 -1
- package/esm/tests/vitest-setup.d.mts.map +1 -1
- package/esm/tests/vitest-setup.mjs +1 -1
- package/esm/tests/vitest-setup.mjs.map +1 -1
- package/esm/use-cases/types.d.mts +1 -1
- package/esm/use-cases/types.d.mts.map +1 -1
- package/esm/use-cases/use-case-broadcast.d.mts +1 -1
- package/esm/use-cases/use-case-broadcast.d.mts.map +1 -1
- package/esm/use-cases/use-case-broadcast.mjs +1 -1
- package/esm/use-cases/use-case-broadcast.mjs.map +1 -1
- package/esm/use-cases/use-case-events.d.mts +1 -1
- package/esm/use-cases/use-case-events.d.mts.map +1 -1
- package/esm/use-cases/use-case-events.mjs +1 -1
- package/esm/use-cases/use-case-events.mjs.map +1 -1
- package/esm/use-cases/use-case-pipeline.d.mts +1 -1
- package/esm/use-cases/use-case-pipeline.d.mts.map +1 -1
- package/esm/use-cases/use-case-pipeline.mjs +1 -1
- package/esm/use-cases/use-case-pipeline.mjs.map +1 -1
- package/esm/use-cases/use-case.d.mts +1 -1
- package/esm/use-cases/use-case.d.mts.map +1 -1
- package/esm/use-cases/use-case.errors.d.mts +1 -1
- package/esm/use-cases/use-case.errors.d.mts.map +1 -1
- package/esm/use-cases/use-case.errors.mjs +1 -1
- package/esm/use-cases/use-case.errors.mjs.map +1 -1
- package/esm/use-cases/use-case.mjs +1 -1
- package/esm/use-cases/use-case.mjs.map +1 -1
- package/esm/use-cases/use-cases-registry.d.mts +1 -1
- package/esm/use-cases/use-cases-registry.d.mts.map +1 -1
- package/esm/use-cases/use-cases-registry.mjs +1 -1
- package/esm/use-cases/use-cases-registry.mjs.map +1 -1
- package/esm/utils/app-log.d.mts +1 -1
- package/esm/utils/app-log.d.mts.map +1 -1
- package/esm/utils/app-log.mjs +1 -1
- package/esm/utils/app-log.mjs.map +1 -1
- package/esm/utils/database-log.d.mts +1 -1
- package/esm/utils/database-log.d.mts.map +1 -1
- package/esm/utils/database-log.mjs +1 -1
- package/esm/utils/database-log.mjs.map +1 -1
- package/esm/utils/environment.d.mts +1 -1
- package/esm/utils/environment.d.mts.map +1 -1
- package/esm/utils/environment.mjs +1 -1
- package/esm/utils/environment.mjs.map +1 -1
- package/esm/utils/framework-vesion.mjs +2 -11
- package/esm/utils/framework-vesion.mjs.map +1 -1
- package/esm/utils/get-localized.d.mts +1 -1
- package/esm/utils/get-localized.d.mts.map +1 -1
- package/esm/utils/get-localized.mjs +1 -1
- package/esm/utils/get-localized.mjs.map +1 -1
- package/esm/utils/paths.d.mts +1 -1
- package/esm/utils/paths.d.mts.map +1 -1
- package/esm/utils/paths.mjs +1 -1
- package/esm/utils/paths.mjs.map +1 -1
- package/esm/utils/promise-all-object.d.mts +1 -1
- package/esm/utils/promise-all-object.d.mts.map +1 -1
- package/esm/utils/promise-all-object.mjs +1 -1
- package/esm/utils/promise-all-object.mjs.map +1 -1
- package/esm/utils/queue.d.mts +1 -1
- package/esm/utils/queue.d.mts.map +1 -1
- package/esm/utils/queue.mjs +1 -1
- package/esm/utils/queue.mjs.map +1 -1
- package/esm/utils/sleep.d.mts +1 -1
- package/esm/utils/sleep.d.mts.map +1 -1
- package/esm/utils/sleep.mjs +1 -1
- package/esm/utils/sleep.mjs.map +1 -1
- package/esm/utils/sluggable.d.mts +1 -1
- package/esm/utils/sluggable.d.mts.map +1 -1
- package/esm/utils/sluggable.mjs +1 -1
- package/esm/utils/sluggable.mjs.map +1 -1
- package/esm/utils/to-json.d.mts +1 -1
- package/esm/utils/to-json.d.mts.map +1 -1
- package/esm/utils/to-json.mjs +1 -1
- package/esm/utils/to-json.mjs.map +1 -1
- package/esm/utils/types.d.mts +1 -1
- package/esm/utils/types.d.mts.map +1 -1
- package/esm/utils/urls.d.mts +1 -1
- package/esm/utils/urls.d.mts.map +1 -1
- package/esm/utils/urls.mjs +1 -1
- package/esm/utils/urls.mjs.map +1 -1
- package/esm/validation/database/exists-except-current-id.d.mts +1 -1
- package/esm/validation/database/exists-except-current-id.d.mts.map +1 -1
- package/esm/validation/database/exists-except-current-id.mjs +1 -1
- package/esm/validation/database/exists-except-current-id.mjs.map +1 -1
- package/esm/validation/database/exists-except-current-user.d.mts +1 -1
- package/esm/validation/database/exists-except-current-user.d.mts.map +1 -1
- package/esm/validation/database/exists-except-current-user.mjs +1 -1
- package/esm/validation/database/exists-except-current-user.mjs.map +1 -1
- package/esm/validation/database/types.d.mts +1 -1
- package/esm/validation/database/types.d.mts.map +1 -1
- package/esm/validation/database/unique-except-current-id.d.mts +1 -1
- package/esm/validation/database/unique-except-current-id.d.mts.map +1 -1
- package/esm/validation/database/unique-except-current-id.mjs +1 -1
- package/esm/validation/database/unique-except-current-id.mjs.map +1 -1
- package/esm/validation/database/unique-except-current-user.d.mts +1 -1
- package/esm/validation/database/unique-except-current-user.d.mts.map +1 -1
- package/esm/validation/database/unique-except-current-user.mjs +1 -1
- package/esm/validation/database/unique-except-current-user.mjs.map +1 -1
- package/esm/validation/file/file.d.mts +1 -1
- package/esm/validation/file/file.d.mts.map +1 -1
- package/esm/validation/file/file.mjs +1 -1
- package/esm/validation/file/file.mjs.map +1 -1
- package/esm/validation/init.mjs +1 -1
- package/esm/validation/init.mjs.map +1 -1
- package/esm/validation/plugins/database-plugin.mjs +1 -1
- package/esm/validation/plugins/database-plugin.mjs.map +1 -1
- package/esm/validation/plugins/file-plugin.mjs +1 -1
- package/esm/validation/plugins/file-plugin.mjs.map +1 -1
- package/esm/validation/plugins/localized-plugin.mjs +1 -1
- package/esm/validation/plugins/localized-plugin.mjs.map +1 -1
- package/esm/validation/types.d.mts +1 -1
- package/esm/validation/types.d.mts.map +1 -1
- package/esm/validation/validateAll.mjs +1 -1
- package/esm/validation/validateAll.mjs.map +1 -1
- package/esm/validation/validators/file-validator.d.mts +1 -1
- package/esm/validation/validators/file-validator.d.mts.map +1 -1
- package/esm/validation/validators/file-validator.mjs +1 -1
- package/esm/validation/validators/file-validator.mjs.map +1 -1
- package/esm/vite/index.mjs +3 -0
- package/esm/vite/lower-stage3-decorators.d.mts +53 -0
- package/esm/vite/lower-stage3-decorators.d.mts.map +1 -0
- package/esm/vite/lower-stage3-decorators.mjs +63 -0
- package/esm/vite/lower-stage3-decorators.mjs.map +1 -0
- package/esm/warlock-config/default-configurations.mjs +1 -1
- package/esm/warlock-config/default-configurations.mjs.map +1 -1
- package/esm/warlock-config/define-config.d.mts +1 -1
- package/esm/warlock-config/define-config.d.mts.map +1 -1
- package/esm/warlock-config/define-config.mjs +1 -1
- package/esm/warlock-config/define-config.mjs.map +1 -1
- package/esm/warlock-config/index.d.mts +1 -1
- package/esm/warlock-config/index.mjs +1 -1
- package/esm/warlock-config/types.d.mts +1 -1
- package/esm/warlock-config/types.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.d.mts +20 -2
- package/esm/warlock-config/warlock-config.manager.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.mjs +39 -2
- package/esm/warlock-config/warlock-config.manager.mjs.map +1 -1
- package/llms-full.txt +66 -4
- package/llms.txt +1 -0
- package/package.json +9 -33
- package/skills/lower-stage3-decorators/SKILL.md +54 -0
- package/skills/run-app/SKILL.md +2 -0
- package/skills/test-http/SKILL.md +3 -2
- package/skills/test-service/SKILL.md +3 -2
- package/bin/warlock.js +0 -3
- package/esm/_virtual/_rolldown/runtime.mjs +0 -7
- package/esm/cli/cli-commands.manager.mjs +0 -290
- package/esm/cli/cli-commands.manager.mjs.map +0 -1
- package/esm/cli/cli-commands.utils.mjs +0 -217
- package/esm/cli/cli-commands.utils.mjs.map +0 -1
- package/esm/cli/commands/add.command.mjs +0 -27
- package/esm/cli/commands/add.command.mjs.map +0 -1
- package/esm/cli/commands/build.command.mjs +0 -14
- package/esm/cli/commands/build.command.mjs.map +0 -1
- package/esm/cli/commands/create-database.command.mjs +0 -24
- package/esm/cli/commands/create-database.command.mjs.map +0 -1
- package/esm/cli/commands/dev-server.command.mjs +0 -48
- package/esm/cli/commands/dev-server.command.mjs.map +0 -1
- package/esm/cli/commands/drop-tables.command.mjs +0 -23
- package/esm/cli/commands/drop-tables.command.mjs.map +0 -1
- package/esm/cli/commands/generate/generate.command.mjs +0 -201
- package/esm/cli/commands/generate/generate.command.mjs.map +0 -1
- package/esm/cli/commands/generate/generators/column-dsl-parser.mjs +0 -49
- package/esm/cli/commands/generate/generators/column-dsl-parser.mjs.map +0 -1
- package/esm/cli/commands/generate/generators/controller.generator.mjs +0 -48
- package/esm/cli/commands/generate/generators/controller.generator.mjs.map +0 -1
- package/esm/cli/commands/generate/generators/migration.generator.mjs +0 -81
- package/esm/cli/commands/generate/generators/migration.generator.mjs.map +0 -1
- package/esm/cli/commands/generate/generators/model.generator.mjs +0 -60
- package/esm/cli/commands/generate/generators/model.generator.mjs.map +0 -1
- package/esm/cli/commands/generate/generators/module.generator.mjs +0 -113
- package/esm/cli/commands/generate/generators/module.generator.mjs.map +0 -1
- package/esm/cli/commands/generate/generators/repository.generator.mjs +0 -42
- package/esm/cli/commands/generate/generators/repository.generator.mjs.map +0 -1
- package/esm/cli/commands/generate/generators/resource.generator.mjs +0 -42
- package/esm/cli/commands/generate/generators/resource.generator.mjs.map +0 -1
- package/esm/cli/commands/generate/generators/service.generator.mjs +0 -42
- package/esm/cli/commands/generate/generators/service.generator.mjs.map +0 -1
- package/esm/cli/commands/generate/templates/stubs.mjs +0 -514
- package/esm/cli/commands/generate/templates/stubs.mjs.map +0 -1
- package/esm/cli/commands/generate/utils/name-parser.mjs +0 -69
- package/esm/cli/commands/generate/utils/name-parser.mjs.map +0 -1
- package/esm/cli/commands/generate/utils/path-resolver.mjs +0 -56
- package/esm/cli/commands/generate/utils/path-resolver.mjs.map +0 -1
- package/esm/cli/commands/generate/utils/prompt.mjs +0 -28
- package/esm/cli/commands/generate/utils/prompt.mjs.map +0 -1
- package/esm/cli/commands/generate/utils/writer.mjs +0 -60
- package/esm/cli/commands/generate/utils/writer.mjs.map +0 -1
- package/esm/cli/commands/migrate.command.mjs +0 -60
- package/esm/cli/commands/migrate.command.mjs.map +0 -1
- package/esm/cli/commands/seed.command.mjs +0 -41
- package/esm/cli/commands/seed.command.mjs.map +0 -1
- package/esm/cli/commands/start-production.command.mjs +0 -50
- package/esm/cli/commands/start-production.command.mjs.map +0 -1
- package/esm/cli/commands/storage-put.action.mjs +0 -75
- package/esm/cli/commands/storage-put.action.mjs.map +0 -1
- package/esm/cli/commands/storage-put.command.mjs +0 -46
- package/esm/cli/commands/storage-put.command.mjs.map +0 -1
- package/esm/cli/commands/typings-generator.command.mjs +0 -38
- package/esm/cli/commands/typings-generator.command.mjs.map +0 -1
- package/esm/cli/commands-loader.mjs +0 -50
- package/esm/cli/commands-loader.mjs.map +0 -1
- package/esm/cli/framework-cli-commands.mjs +0 -37
- package/esm/cli/framework-cli-commands.mjs.map +0 -1
- package/esm/cli/parse-cli-args.mjs +0 -62
- package/esm/cli/parse-cli-args.mjs.map +0 -1
- package/esm/cli/start.d.mts +0 -1
- package/esm/cli/start.mjs +0 -8
- package/esm/cli/start.mjs.map +0 -1
- package/esm/cli/string-similarity.mjs +0 -56
- package/esm/cli/string-similarity.mjs.map +0 -1
- package/esm/database/create-database-action.mjs +0 -32
- package/esm/database/create-database-action.mjs.map +0 -1
- package/esm/database/drop-tables-action.mjs +0 -35
- package/esm/database/drop-tables-action.mjs.map +0 -1
- package/esm/database/migrate-action.mjs +0 -99
- package/esm/database/migrate-action.mjs.map +0 -1
- package/esm/database/seed-command-action.mjs +0 -74
- package/esm/database/seed-command-action.mjs.map +0 -1
- package/esm/database/seeds/seeders.manager.mjs +0 -129
- package/esm/database/seeds/seeders.manager.mjs.map +0 -1
- package/esm/database/seeds/seeds-table-migration.mjs +0 -31
- package/esm/database/seeds/seeds-table-migration.mjs.map +0 -1
- package/esm/database/seeds/utils.mjs +0 -6
- package/esm/database/seeds/utils.mjs.map +0 -1
- package/esm/dev-server/development-server.mjs +0 -115
- package/esm/dev-server/development-server.mjs.map +0 -1
- package/esm/dev-server/health-checker/workers/eslint-health.worker.d.mts +0 -1
- package/esm/dev-server/health-checker/workers/ts-health.worker.d.mts +0 -1
- package/esm/dev-server/layer-executor.mjs +0 -114
- package/esm/dev-server/layer-executor.mjs.map +0 -1
- package/esm/dev-server/loader/hook-thread.d.mts +0 -48
- package/esm/dev-server/loader/hook-thread.d.mts.map +0 -1
- package/esm/dev-server/loader/hook-thread.mjs +0 -47
- package/esm/dev-server/loader/hook-thread.mjs.map +0 -1
- package/esm/dev-server/loader/load-hook.d.mts +0 -58
- package/esm/dev-server/loader/load-hook.d.mts.map +0 -1
- package/esm/dev-server/loader/load-hook.mjs +0 -86
- package/esm/dev-server/loader/load-hook.mjs.map +0 -1
- package/esm/dev-server/loader/own-resolver.mjs +0 -69
- package/esm/dev-server/loader/own-resolver.mjs.map +0 -1
- package/esm/dev-server/loader/resolve-capture.mjs +0 -43
- package/esm/dev-server/loader/resolve-capture.mjs.map +0 -1
- package/esm/dev-server/loader/resolve-hook.d.mts +0 -41
- package/esm/dev-server/loader/resolve-hook.d.mts.map +0 -1
- package/esm/dev-server/loader/resolve-hook.mjs +0 -87
- package/esm/dev-server/loader/resolve-hook.mjs.map +0 -1
- package/esm/dev-server/loader/source-slug.mjs +0 -22
- package/esm/dev-server/loader/source-slug.mjs.map +0 -1
- package/esm/dev-server/loader/version-registry.mjs +0 -45
- package/esm/dev-server/loader/version-registry.mjs.map +0 -1
- package/esm/dev-server/start-development-server.mjs +0 -63
- package/esm/dev-server/start-development-server.mjs.map +0 -1
- package/esm/dev-server/type-generator.mjs +0 -453
- package/esm/dev-server/type-generator.mjs.map +0 -1
- package/esm/generations/add-command.action.mjs +0 -376
- package/esm/generations/add-command.action.mjs.map +0 -1
- package/esm/generations/stubs.mjs +0 -103
- package/esm/generations/stubs.mjs.map +0 -1
- package/esm/manifest/manifest-manager.mjs +0 -79
- package/esm/manifest/manifest-manager.mjs.map +0 -1
- package/esm/production/build-app-production.mjs +0 -14
- package/esm/production/build-app-production.mjs.map +0 -1
- package/esm/production/esbuild-plugins.mjs +0 -37
- package/esm/production/esbuild-plugins.mjs.map +0 -1
- package/esm/production/production-builder.mjs +0 -264
- package/esm/production/production-builder.mjs.map +0 -1
- package/esm/production/resolve-build-config.mjs +0 -28
- package/esm/production/resolve-build-config.mjs.map +0 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { transform } from "esbuild";
|
|
2
|
+
|
|
3
|
+
//#region ../@warlock.js/core/src/vite/lower-stage3-decorators.ts
|
|
4
|
+
/**
|
|
5
|
+
* Vite/Vitest plugin that lowers TC39 Stage-3 (native) decorators to plain JS
|
|
6
|
+
* **before** the rest of the transform pipeline runs.
|
|
7
|
+
*
|
|
8
|
+
* Cascade models declare relations with native decorators (`@RegisterModel`,
|
|
9
|
+
* `@BelongsTo`, `@HasMany`, …). Vitest's bundled rolldown-vite transforms `.ts`
|
|
10
|
+
* with **oxc**, and Vite's SSR `moduleRunnerTransform` rewrites the decorator's
|
|
11
|
+
* import reference into `@(0, __vite_ssr_import__.RegisterModel)()` — invalid
|
|
12
|
+
* decorator syntax that throws "SyntaxError: Invalid or unexpected token" on
|
|
13
|
+
* every model load. oxc can only lower *legacy* decorators, and legacy lowering
|
|
14
|
+
* would mangle the Stage-3 `(value, context)` signature these decorators rely on
|
|
15
|
+
* (they read `context.kind` / `context.metadata`).
|
|
16
|
+
*
|
|
17
|
+
* esbuild lowers Stage-3 decorators correctly while preserving their runtime
|
|
18
|
+
* semantics — the same transform the production `tsx`/build path uses, so a file
|
|
19
|
+
* lowered here behaves identically in dev, test, and prod. Running `enforce:
|
|
20
|
+
* "pre"` hands oxc / the SSR rewrite already-lowered, decorator-free code. Files
|
|
21
|
+
* with no decorator skip esbuild entirely, so the fast path is untouched.
|
|
22
|
+
*
|
|
23
|
+
* Keep it **first** in the `plugins` array so it runs ahead of `@mongez/vite`
|
|
24
|
+
* and Vite's core transform.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* // vite.config.ts / vitest.config.ts
|
|
29
|
+
* import { lowerStage3Decorators } from "@warlock.js/core";
|
|
30
|
+
* import { defineConfig } from "vitest/config";
|
|
31
|
+
*
|
|
32
|
+
* export default defineConfig({
|
|
33
|
+
* plugins: [lowerStage3Decorators(), mongezVite()],
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
function lowerStage3Decorators() {
|
|
38
|
+
return {
|
|
39
|
+
name: "warlock:lower-stage3-decorators",
|
|
40
|
+
enforce: "pre",
|
|
41
|
+
async transform(code, id) {
|
|
42
|
+
const [filepath] = id.split("?");
|
|
43
|
+
if (!/\.tsx?$/.test(filepath) || filepath.includes("/node_modules/")) return null;
|
|
44
|
+
if (!/(^|\n)\s*@[A-Za-z_$]/.test(code)) return null;
|
|
45
|
+
const result = await transform(code, {
|
|
46
|
+
loader: filepath.endsWith(".tsx") ? "tsx" : "ts",
|
|
47
|
+
format: "esm",
|
|
48
|
+
target: "es2022",
|
|
49
|
+
sourcemap: true,
|
|
50
|
+
sourcefile: filepath,
|
|
51
|
+
tsconfigRaw: { compilerOptions: { experimentalDecorators: false } }
|
|
52
|
+
});
|
|
53
|
+
return {
|
|
54
|
+
code: result.code,
|
|
55
|
+
map: result.map
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
//#endregion
|
|
62
|
+
export { lowerStage3Decorators };
|
|
63
|
+
//# sourceMappingURL=lower-stage3-decorators.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lower-stage3-decorators.mjs","names":[],"sources":["../../../../../../../@warlock.js/core/src/vite/lower-stage3-decorators.ts"],"sourcesContent":["import { transform } from \"esbuild\";\n\n/**\n * The Vite/Vitest plugin object returned by {@link lowerStage3Decorators}.\n *\n * Declared structurally so `@warlock.js/core` needn't take a `vite` dependency\n * just for one type — the shape is assignable to Vite's `PluginOption` wherever\n * it's placed in a config's `plugins` array.\n */\nexport interface DecoratorLoweringPlugin {\n name: string;\n enforce: \"pre\";\n transform(code: string, id: string): Promise<{ code: string; map: string } | null>;\n}\n\n/**\n * Vite/Vitest plugin that lowers TC39 Stage-3 (native) decorators to plain JS\n * **before** the rest of the transform pipeline runs.\n *\n * Cascade models declare relations with native decorators (`@RegisterModel`,\n * `@BelongsTo`, `@HasMany`, …). Vitest's bundled rolldown-vite transforms `.ts`\n * with **oxc**, and Vite's SSR `moduleRunnerTransform` rewrites the decorator's\n * import reference into `@(0, __vite_ssr_import__.RegisterModel)()` — invalid\n * decorator syntax that throws \"SyntaxError: Invalid or unexpected token\" on\n * every model load. oxc can only lower *legacy* decorators, and legacy lowering\n * would mangle the Stage-3 `(value, context)` signature these decorators rely on\n * (they read `context.kind` / `context.metadata`).\n *\n * esbuild lowers Stage-3 decorators correctly while preserving their runtime\n * semantics — the same transform the production `tsx`/build path uses, so a file\n * lowered here behaves identically in dev, test, and prod. Running `enforce:\n * \"pre\"` hands oxc / the SSR rewrite already-lowered, decorator-free code. Files\n * with no decorator skip esbuild entirely, so the fast path is untouched.\n *\n * Keep it **first** in the `plugins` array so it runs ahead of `@mongez/vite`\n * and Vite's core transform.\n *\n * @example\n * ```ts\n * // vite.config.ts / vitest.config.ts\n * import { lowerStage3Decorators } from \"@warlock.js/core\";\n * import { defineConfig } from \"vitest/config\";\n *\n * export default defineConfig({\n * plugins: [lowerStage3Decorators(), mongezVite()],\n * });\n * ```\n */\nexport function lowerStage3Decorators(): DecoratorLoweringPlugin {\n return {\n name: \"warlock:lower-stage3-decorators\",\n enforce: \"pre\",\n async transform(code, id) {\n const [filepath] = id.split(\"?\");\n\n if (!/\\.tsx?$/.test(filepath) || filepath.includes(\"/node_modules/\")) {\n return null;\n }\n\n // Cheap gate: only files that actually carry a decorator pay esbuild's cost.\n if (!/(^|\\n)\\s*@[A-Za-z_$]/.test(code)) {\n return null;\n }\n\n const result = await transform(code, {\n loader: filepath.endsWith(\".tsx\") ? \"tsx\" : \"ts\",\n format: \"esm\",\n target: \"es2022\",\n sourcemap: true,\n sourcefile: filepath,\n // Force native (Stage-3) semantics regardless of any ambient tsconfig\n // esbuild might otherwise honor.\n tsconfigRaw: { compilerOptions: { experimentalDecorators: false } },\n });\n\n return { code: result.code, map: result.map };\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,wBAAiD;CAC/D,OAAO;EACL,MAAM;EACN,SAAS;EACT,MAAM,UAAU,MAAM,IAAI;GACxB,MAAM,CAAC,YAAY,GAAG,MAAM,GAAG;GAE/B,IAAI,CAAC,UAAU,KAAK,QAAQ,KAAK,SAAS,SAAS,gBAAgB,GACjE,OAAO;GAIT,IAAI,CAAC,uBAAuB,KAAK,IAAI,GACnC,OAAO;GAGT,MAAM,SAAS,MAAM,UAAU,MAAM;IACnC,QAAQ,SAAS,SAAS,MAAM,IAAI,QAAQ;IAC5C,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,YAAY;IAGZ,aAAa,EAAE,iBAAiB,EAAE,wBAAwB,MAAM,EAAE;GACpE,CAAC;GAED,OAAO;IAAE,MAAM,OAAO;IAAM,KAAK,OAAO;GAAI;EAC9C;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-configurations.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"default-configurations.mjs","names":[],"sources":["../../../../../../../@warlock.js/core/src/warlock-config/default-configurations.ts"],"sourcesContent":["import { WarlockConfig } from \"./types\";\n\nexport const defaultWarlockConfigurations: WarlockConfig = {\n build: {\n outDirectory: process.cwd() + \"/dist\",\n outFile: \"app.js\",\n sourcemap: true,\n minify: true,\n },\n};\n"],"mappings":";AAEA,MAAa,+BAA8C,EACzD,OAAO;CACL,cAAc,QAAQ,IAAI,IAAI;CAC9B,SAAS;CACT,WAAW;CACX,QAAQ;AACV,EACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WarlockConfig } from "./types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/core/src/warlock-config/define-config.d.ts
|
|
4
4
|
declare function defineConfig(options: WarlockConfig): WarlockConfig;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { defineConfig };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-config.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"define-config.d.mts","names":[],"sources":["../../../../../../../@warlock.js/core/src/warlock-config/define-config.ts"],"mappings":";;;iBAIgB,YAAA,CAAa,OAAA,EAAS,aAAA,GAAa,aAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defaultWarlockConfigurations } from "./default-configurations.mjs";
|
|
2
2
|
import { merge } from "@mongez/reinforcements";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/core/src/warlock-config/define-config.ts
|
|
5
5
|
function defineConfig(options) {
|
|
6
6
|
return merge(defaultWarlockConfigurations, options);
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-config.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"define-config.mjs","names":[],"sources":["../../../../../../../@warlock.js/core/src/warlock-config/define-config.ts"],"sourcesContent":["import { merge } from \"@mongez/reinforcements\";\nimport { defaultWarlockConfigurations } from \"./default-configurations\";\nimport type { WarlockConfig } from \"./types\";\n\nexport function defineConfig(options: WarlockConfig) {\n return merge(defaultWarlockConfigurations, options);\n}\n"],"mappings":";;;;AAIA,SAAgB,aAAa,SAAwB;CACnD,OAAO,MAAM,8BAA8B,OAAO;AACpD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { WarlockConfig } from "./types.mjs";
|
|
2
2
|
import { defineConfig } from "./define-config.mjs";
|
|
3
|
-
import { WarlockConfigManager, warlockConfigManager } from "./warlock-config.manager.mjs";
|
|
3
|
+
import { WarlockConfigManager, isUnknownTsExtensionError, warlockConfigManager } from "./warlock-config.manager.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WarlockConfigManager, warlockConfigManager } from "./warlock-config.manager.mjs";
|
|
1
|
+
import { WarlockConfigManager, isUnknownTsExtensionError, warlockConfigManager } from "./warlock-config.manager.mjs";
|
|
2
2
|
import { defineConfig } from "./define-config.mjs";
|
|
3
3
|
|
|
4
4
|
export { };
|
|
@@ -2,7 +2,7 @@ import { CLICommand } from "../cli/cli-command.mjs";
|
|
|
2
2
|
import { FileHealthCheckerContract } from "../dev-server/health-checker/file-health-checker.contract.mjs";
|
|
3
3
|
import { MigrationConstructor } from "@warlock.js/cascade";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../@warlock.js/core/src/warlock-config/types.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Resolved Warlock Configuration
|
|
8
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../../../../../../../@warlock.js/core/src/warlock-config/types.ts"],"mappings":";;;;;;;AASA;;;KAAY,aAAA;EAuES;;;EAnEnB,MAAA;IACE,IAAA;IACA,IAAA;IACA,cAAA;EAAA;EAAA;;;EAMF,KAAA;IAkBE;;;;;IAZA,YAAA;IAmCA;;;;;IA7BA,OAAA;IA6DA;;;;;IAvDA,MAAA;IA+FA;;;AAOO;;IAhGP,SAAA;EAAA;;;;EAMF,GAAA;IACE,QAAA,GAAW,UAAA;EAAA;;;;EAMb,SAAA;;;;IAIE,KAAA;;;;;;MAME,OAAA;;;;;;MAMA,OAAA;IAAA;;;;IAKF,cAAA,GAAiB,yBAAA;;;;;IAKjB,eAAA;;;;;;;;;;IAUA,mBAAA;EAAA;;;;EAMF,QAAA;;;;;;;;;;;;;;;;;;IAkBE,UAAA,GAAa,KAAA,CAAM,oBAAA;EAAA;;;;;;;EASrB,OAAA;;;;;;;IAOE,OAAA;;;;;;IAOA,OAAA;EAAA;AAAA"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { WarlockConfig } from "./types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/core/src/warlock-config/warlock-config.manager.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* True when `error` is Node's "this runtime can't import a `.ts` file" error.
|
|
6
|
+
*
|
|
7
|
+
* Node only executes TypeScript natively from v22.18 / v23.6 onward (earlier
|
|
8
|
+
* 22.x needs `--experimental-strip-types`). On older runtimes a bare
|
|
9
|
+
* `import("warlock.config.ts")` throws `ERR_UNKNOWN_FILE_EXTENSION` — which is
|
|
10
|
+
* the signal to fall back to transpiling the config ourselves.
|
|
11
|
+
*/
|
|
12
|
+
declare function isUnknownTsExtensionError(error: unknown): boolean;
|
|
4
13
|
/**
|
|
5
14
|
* Warlock Config Manager
|
|
6
15
|
*
|
|
@@ -29,6 +38,15 @@ declare class WarlockConfigManager {
|
|
|
29
38
|
* separate compile-to-disk step is needed.
|
|
30
39
|
*/
|
|
31
40
|
private doLoad;
|
|
41
|
+
/**
|
|
42
|
+
* Fallback config loader for runtimes without native TypeScript support.
|
|
43
|
+
*
|
|
44
|
+
* Transpiles `warlock.config.ts` with esbuild (already a core dependency),
|
|
45
|
+
* writes the result as a sibling `.mjs` — so the config's own imports (bare
|
|
46
|
+
* `@warlock.js/*` and any relative paths) resolve exactly as they would from
|
|
47
|
+
* the original location — imports it, then removes the temp file.
|
|
48
|
+
*/
|
|
49
|
+
private loadViaEsbuild;
|
|
32
50
|
/**
|
|
33
51
|
* Get config value by key (dot notation supported)
|
|
34
52
|
*
|
|
@@ -82,5 +100,5 @@ declare class WarlockConfigManager {
|
|
|
82
100
|
*/
|
|
83
101
|
declare const warlockConfigManager: WarlockConfigManager;
|
|
84
102
|
//#endregion
|
|
85
|
-
export { WarlockConfigManager, warlockConfigManager };
|
|
103
|
+
export { WarlockConfigManager, isUnknownTsExtensionError, warlockConfigManager };
|
|
86
104
|
//# sourceMappingURL=warlock-config.manager.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warlock-config.manager.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"warlock-config.manager.d.mts","names":[],"sources":["../../../../../../../@warlock.js/core/src/warlock-config/warlock-config.manager.ts"],"mappings":";;;;;AAgBA;;;;AAAwD;AAaxD;iBAbgB,yBAAA,CAA0B,KAAc;;;;;;;cAa3C,oBAAA;EAsHR;;;EAAA,QAlHK,MAAA;EAsIS;;;EAAA,QAjIT,OAAA;EAkIL;;;;;EA3HU,IAAA,IAAQ,OAAA,CAAQ,aAAA;EAPrB;;;;;;EAAA,QAgCM,MAAA;EA0EH;;;;;;;;EAAA,QAtCG,cAAA;EA2DR;;;;;;;;;;;EArBC,GAAA,mBAAsB,aAAA,EAC3B,GAAA,EAAK,GAAA,EACL,YAAA,GAAe,aAAA,CAAc,GAAA,IAC5B,aAAA,CAAc,GAAA;EAsCV;;;;;AAWuB;AAoBhC;;;;EAnDQ,OAAA,mBAA0B,aAAA,EAC9B,GAAA,EAAK,GAAA,EACL,YAAA,GAAe,aAAA,CAAc,GAAA,IAC5B,OAAA,CAAQ,aAAA,CAAc,GAAA;;;;MAQd,QAAA;;;;;;EASJ,MAAA,IAAU,aAAA;;;;EAWJ,MAAA,IAAU,OAAA;AAAA;;;;;;;;;;;;;;cAoBZ,oBAAA,EAAoB,oBAA6B"}
|
|
@@ -3,9 +3,21 @@ import "../utils/index.mjs";
|
|
|
3
3
|
import { devLogWarn } from "../dev-server/dev-logger.mjs";
|
|
4
4
|
import { get } from "@mongez/reinforcements";
|
|
5
5
|
import { fileExistsAsync } from "@warlock.js/fs";
|
|
6
|
+
import { readFile, unlink, writeFile } from "node:fs/promises";
|
|
6
7
|
import { pathToFileURL } from "url";
|
|
7
8
|
|
|
8
|
-
//#region
|
|
9
|
+
//#region ../@warlock.js/core/src/warlock-config/warlock-config.manager.ts
|
|
10
|
+
/**
|
|
11
|
+
* True when `error` is Node's "this runtime can't import a `.ts` file" error.
|
|
12
|
+
*
|
|
13
|
+
* Node only executes TypeScript natively from v22.18 / v23.6 onward (earlier
|
|
14
|
+
* 22.x needs `--experimental-strip-types`). On older runtimes a bare
|
|
15
|
+
* `import("warlock.config.ts")` throws `ERR_UNKNOWN_FILE_EXTENSION` — which is
|
|
16
|
+
* the signal to fall back to transpiling the config ourselves.
|
|
17
|
+
*/
|
|
18
|
+
function isUnknownTsExtensionError(error) {
|
|
19
|
+
return error?.code === "ERR_UNKNOWN_FILE_EXTENSION" || /Unknown file extension "\.tsx?"/.test(String(error?.message));
|
|
20
|
+
}
|
|
9
21
|
/**
|
|
10
22
|
* Warlock Config Manager
|
|
11
23
|
*
|
|
@@ -41,10 +53,35 @@ var WarlockConfigManager = class {
|
|
|
41
53
|
try {
|
|
42
54
|
return (await import(pathToFileURL(configPath).href)).default;
|
|
43
55
|
} catch (error) {
|
|
56
|
+
if (isUnknownTsExtensionError(error)) return await this.loadViaEsbuild(configPath);
|
|
44
57
|
throw new Error(`Failed to load warlock.config.ts: ${error}`);
|
|
45
58
|
}
|
|
46
59
|
}
|
|
47
60
|
/**
|
|
61
|
+
* Fallback config loader for runtimes without native TypeScript support.
|
|
62
|
+
*
|
|
63
|
+
* Transpiles `warlock.config.ts` with esbuild (already a core dependency),
|
|
64
|
+
* writes the result as a sibling `.mjs` — so the config's own imports (bare
|
|
65
|
+
* `@warlock.js/*` and any relative paths) resolve exactly as they would from
|
|
66
|
+
* the original location — imports it, then removes the temp file.
|
|
67
|
+
*/
|
|
68
|
+
async loadViaEsbuild(configPath) {
|
|
69
|
+
const { transformSync } = await import("esbuild");
|
|
70
|
+
const { code } = transformSync(await readFile(configPath, "utf8"), {
|
|
71
|
+
loader: "ts",
|
|
72
|
+
format: "esm",
|
|
73
|
+
target: `node${process.versions.node.split(".")[0]}`,
|
|
74
|
+
sourcefile: configPath
|
|
75
|
+
});
|
|
76
|
+
const compiledPath = configPath.replace(/warlock\.config\.ts$/, `.warlock.config.${process.pid}.mjs`);
|
|
77
|
+
await writeFile(compiledPath, code, "utf8");
|
|
78
|
+
try {
|
|
79
|
+
return (await import(pathToFileURL(compiledPath).href)).default;
|
|
80
|
+
} finally {
|
|
81
|
+
await unlink(compiledPath).catch(() => {});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
48
85
|
* Get config value by key (dot notation supported)
|
|
49
86
|
*
|
|
50
87
|
* @example
|
|
@@ -113,5 +150,5 @@ var WarlockConfigManager = class {
|
|
|
113
150
|
const warlockConfigManager = new WarlockConfigManager();
|
|
114
151
|
|
|
115
152
|
//#endregion
|
|
116
|
-
export { WarlockConfigManager, warlockConfigManager };
|
|
153
|
+
export { WarlockConfigManager, isUnknownTsExtensionError, warlockConfigManager };
|
|
117
154
|
//# sourceMappingURL=warlock-config.manager.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warlock-config.manager.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"warlock-config.manager.mjs","names":[],"sources":["../../../../../../../@warlock.js/core/src/warlock-config/warlock-config.manager.ts"],"sourcesContent":["import { fileExistsAsync } from \"@warlock.js/fs\";\r\nimport { get } from \"@mongez/reinforcements\";\r\nimport { readFile, unlink, writeFile } from \"node:fs/promises\";\r\nimport { pathToFileURL } from \"url\";\r\nimport { devLogWarn } from \"../dev-server/dev-logger\";\r\nimport { rootPath } from \"../utils\";\r\nimport { WarlockConfig } from \"./types\";\r\n\r\n/**\r\n * True when `error` is Node's \"this runtime can't import a `.ts` file\" error.\r\n *\r\n * Node only executes TypeScript natively from v22.18 / v23.6 onward (earlier\r\n * 22.x needs `--experimental-strip-types`). On older runtimes a bare\r\n * `import(\"warlock.config.ts\")` throws `ERR_UNKNOWN_FILE_EXTENSION` — which is\r\n * the signal to fall back to transpiling the config ourselves.\r\n */\r\nexport function isUnknownTsExtensionError(error: unknown): boolean {\r\n return (\r\n (error as { code?: string })?.code === \"ERR_UNKNOWN_FILE_EXTENSION\" ||\r\n /Unknown file extension \"\\.tsx?\"/.test(String((error as Error)?.message))\r\n );\r\n}\r\n\r\n/**\r\n * Warlock Config Manager\r\n *\r\n * Manages lazy loading of the pre-compiled warlock.config.js file\r\n * from the .warlock/cache directory.\r\n */\r\nexport class WarlockConfigManager {\r\n /**\r\n * Cached config instance\r\n */\r\n private config?: WarlockConfig;\r\n\r\n /**\r\n * Loading promise to prevent duplicate loads\r\n */\r\n private loading?: Promise<WarlockConfig | undefined>;\r\n\r\n /**\r\n * Load warlock.config.js (cached after first load)\r\n *\r\n * @returns The resolved Warlock configuration\r\n */\r\n public async load(): Promise<WarlockConfig | undefined> {\r\n // Already loaded\r\n if (this.config) {\r\n return this.config;\r\n }\r\n\r\n // Currently loading (prevent duplicate loads)\r\n if (this.loading) {\r\n return this.loading;\r\n }\r\n\r\n // Start loading\r\n this.loading = this.doLoad();\r\n this.config = await this.loading;\r\n this.loading = undefined;\r\n\r\n return this.config;\r\n }\r\n\r\n /**\r\n * Internal load implementation\r\n *\r\n * The ESM loader hook transpiles `warlock.config.ts` on import — no\r\n * separate compile-to-disk step is needed.\r\n */\r\n private async doLoad(): Promise<WarlockConfig | undefined> {\r\n const configPath = rootPath(\"warlock.config.ts\");\r\n\r\n if (!(await fileExistsAsync(configPath))) {\r\n devLogWarn(\r\n \"warlock.config.ts is missing, it's highly recommended to create it, run warlock init to create it\",\r\n );\r\n return;\r\n }\r\n\r\n try {\r\n const configModule = await import(pathToFileURL(configPath).href);\r\n return configModule.default;\r\n } catch (error) {\r\n // `dev` registers a TS loader hook, and Node ≥ 22.18 / 23.6 strips types\r\n // natively — in both cases the direct import above works. But `build` /\r\n // `start` register no hook, so on an older Node the import throws\r\n // ERR_UNKNOWN_FILE_EXTENSION. Transpile the config with esbuild ourselves\r\n // so config loading is Node-version-independent rather than relying on an\r\n // experimental runtime feature.\r\n if (isUnknownTsExtensionError(error)) {\r\n return await this.loadViaEsbuild(configPath);\r\n }\r\n\r\n throw new Error(`Failed to load warlock.config.ts: ${error}`);\r\n }\r\n }\r\n\r\n /**\r\n * Fallback config loader for runtimes without native TypeScript support.\r\n *\r\n * Transpiles `warlock.config.ts` with esbuild (already a core dependency),\r\n * writes the result as a sibling `.mjs` — so the config's own imports (bare\r\n * `@warlock.js/*` and any relative paths) resolve exactly as they would from\r\n * the original location — imports it, then removes the temp file.\r\n */\r\n private async loadViaEsbuild(configPath: string): Promise<WarlockConfig | undefined> {\r\n const { transformSync } = await import(\"esbuild\");\r\n const source = await readFile(configPath, \"utf8\");\r\n\r\n const { code } = transformSync(source, {\r\n loader: \"ts\",\r\n format: \"esm\",\r\n target: `node${process.versions.node.split(\".\")[0]}`,\r\n sourcefile: configPath,\r\n });\r\n\r\n // Unique sibling name so concurrent processes never clobber each other.\r\n const compiledPath = configPath.replace(\r\n /warlock\\.config\\.ts$/,\r\n `.warlock.config.${process.pid}.mjs`,\r\n );\r\n\r\n await writeFile(compiledPath, code, \"utf8\");\r\n\r\n try {\r\n const configModule = await import(pathToFileURL(compiledPath).href);\r\n return configModule.default;\r\n } finally {\r\n await unlink(compiledPath).catch(() => {});\r\n }\r\n }\r\n\r\n /**\r\n * Get config value by key (dot notation supported)\r\n *\r\n * @example\r\n * config.get(\"server.port\") // Returns 3000\r\n * config.get(\"cli.commands\") // Returns array of commands\r\n *\r\n * @param key - Config key (supports dot notation), autocompletes for first level only\r\n * @returns The config value\r\n * @throws Error if config is not loaded\r\n */\r\n public get<Key extends keyof WarlockConfig>(\r\n key: Key,\r\n defaultValue?: WarlockConfig[Key],\r\n ): WarlockConfig[Key] {\r\n if (!this.config) {\r\n throw new Error(\"WarlockConfig not loaded. Call load() first or use lazyGet().\");\r\n }\r\n\r\n return get(this.config, key as string, defaultValue);\r\n }\r\n\r\n /**\r\n * Lazy get - loads config if not already loaded\r\n *\r\n * @example\r\n * const port = await config.lazyGet(\"server\");\r\n *\r\n * @param key - Config key (supports dot notation), autocompletes for first level only\r\n * @param defaultValue - Default value if config key is undefined\r\n * @returns The config value\r\n */\r\n async lazyGet<Key extends keyof WarlockConfig>(\r\n key: Key,\r\n defaultValue?: WarlockConfig[Key],\r\n ): Promise<WarlockConfig[Key]> {\r\n await this.load();\r\n return this.get(key, defaultValue);\r\n }\r\n\r\n /**\r\n * Check if config is loaded\r\n */\r\n public get isLoaded(): boolean {\r\n return this.config !== undefined;\r\n }\r\n\r\n /**\r\n * Get the entire config object\r\n *\r\n * @throws Error if config is not loaded\r\n */\r\n public getAll(): WarlockConfig {\r\n if (!this.config) {\r\n throw new Error(\"WarlockConfig not loaded. Call load() first or use lazyGet().\");\r\n }\r\n\r\n return this.config;\r\n }\r\n\r\n /**\r\n * Reload config (useful for HMR/development)\r\n */\r\n public async reload(): Promise<void> {\r\n this.config = undefined;\r\n this.loading = undefined;\r\n await this.load();\r\n }\r\n}\r\n\r\n/**\r\n * Exported singleton instance\r\n *\r\n * @example\r\n * import { warlockConfig } from \"@warlock.js/core\";\r\n *\r\n * // Lazy load and get value\r\n * const port = await warlockConfig.lazyGet(\"server.port\");\r\n *\r\n * // Or load first, then get\r\n * await warlockConfig.load();\r\n * const commands = warlockConfig.get(\"cli.commands\");\r\n */\r\nexport const warlockConfigManager = new WarlockConfigManager();\r\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,SAAgB,0BAA0B,OAAyB;CACjE,OACG,OAA6B,SAAS,gCACvC,kCAAkC,KAAK,OAAQ,OAAiB,OAAO,CAAC;AAE5E;;;;;;;AAQA,IAAa,uBAAb,MAAkC;;;;;;CAgBhC,MAAa,OAA2C;EAEtD,IAAI,KAAK,QACP,OAAO,KAAK;EAId,IAAI,KAAK,SACP,OAAO,KAAK;EAId,KAAK,UAAU,KAAK,OAAO;EAC3B,KAAK,SAAS,MAAM,KAAK;EACzB,KAAK,UAAU;EAEf,OAAO,KAAK;CACd;;;;;;;CAQA,MAAc,SAA6C;EACzD,MAAM,aAAa,SAAS,mBAAmB;EAE/C,IAAI,CAAE,MAAM,gBAAgB,UAAU,GAAI;GACxC,WACE,mGACF;GACA;EACF;EAEA,IAAI;GAEF,QAAO,MADoB,OAAO,cAAc,UAAU,CAAC,CAAC,MACzC,CAAC;EACtB,SAAS,OAAO;GAOd,IAAI,0BAA0B,KAAK,GACjC,OAAO,MAAM,KAAK,eAAe,UAAU;GAG7C,MAAM,IAAI,MAAM,qCAAqC,OAAO;EAC9D;CACF;;;;;;;;;CAUA,MAAc,eAAe,YAAwD;EACnF,MAAM,EAAE,kBAAkB,MAAM,OAAO;EAGvC,MAAM,EAAE,SAAS,cAAc,MAFV,SAAS,YAAY,MAAM,GAET;GACrC,QAAQ;GACR,QAAQ;GACR,QAAQ,OAAO,QAAQ,SAAS,KAAK,MAAM,GAAG,CAAC,CAAC;GAChD,YAAY;EACd,CAAC;EAGD,MAAM,eAAe,WAAW,QAC9B,wBACA,mBAAmB,QAAQ,IAAI,KACjC;EAEA,MAAM,UAAU,cAAc,MAAM,MAAM;EAE1C,IAAI;GAEF,QAAO,MADoB,OAAO,cAAc,YAAY,CAAC,CAAC,MAC3C,CAAC;EACtB,UAAU;GACR,MAAM,OAAO,YAAY,CAAC,CAAC,YAAY,CAAC,CAAC;EAC3C;CACF;;;;;;;;;;;;CAaA,AAAO,IACL,KACA,cACoB;EACpB,IAAI,CAAC,KAAK,QACR,MAAM,IAAI,MAAM,+DAA+D;EAGjF,OAAO,IAAI,KAAK,QAAQ,KAAe,YAAY;CACrD;;;;;;;;;;;CAYA,MAAM,QACJ,KACA,cAC6B;EAC7B,MAAM,KAAK,KAAK;EAChB,OAAO,KAAK,IAAI,KAAK,YAAY;CACnC;;;;CAKA,IAAW,WAAoB;EAC7B,OAAO,KAAK,WAAW;CACzB;;;;;;CAOA,AAAO,SAAwB;EAC7B,IAAI,CAAC,KAAK,QACR,MAAM,IAAI,MAAM,+DAA+D;EAGjF,OAAO,KAAK;CACd;;;;CAKA,MAAa,SAAwB;EACnC,KAAK,SAAS;EACd,KAAK,UAAU;EACf,MAAM,KAAK,KAAK;CAClB;AACF;;;;;;;;;;;;;;AAeA,MAAa,uBAAuB,IAAI,qBAAqB"}
|
package/llms-full.txt
CHANGED
|
@@ -2292,6 +2292,64 @@ There is no `warlock add` feature for password hashing — `bcryptjs` is a plain
|
|
|
2292
2292
|
- [`warlock-conventions/SKILL.md`](../warlock-conventions/SKILL.md) — service layering, where the password boundary should sit.
|
|
2293
2293
|
|
|
2294
2294
|
|
|
2295
|
+
## lower-stage3-decorators `@warlock.js/core/lower-stage3-decorators/SKILL.md`
|
|
2296
|
+
|
|
2297
|
+
---
|
|
2298
|
+
name: lower-stage3-decorators
|
|
2299
|
+
description: 'Vite/Vitest plugin `lowerStage3Decorators()` that lowers TC39 Stage-3 (native) decorators with esbuild before oxc / the SSR rewrite mangles them — so `@RegisterModel`-decorated Cascade models load under Vitest 4 / Vite 8. Triggers: `lowerStage3Decorators`, "SyntaxError: Invalid or unexpected token" on a decorated class, "@(0, __vite_ssr_import__.X)()", "decorator crashes vitest", "models won''t load in tests", "Vite 8 oxc decorators"; typical import `import { lowerStage3Decorators } from "@warlock.js/core"` in `vite.config.ts` / `vitest.config.ts`. Skip: writing the tests themselves — `@warlock.js/core/test-service/SKILL.md` / `@warlock.js/core/test-http/SKILL.md`; runtime migrations — `@warlock.js/cascade/write-migration/SKILL.md`.'
|
|
2300
|
+
---
|
|
2301
|
+
|
|
2302
|
+
# Lower Stage-3 decorators for Vite/Vitest
|
|
2303
|
+
|
|
2304
|
+
Cascade declares relations with **native** decorators — `@RegisterModel`, `@BelongsTo`, `@HasMany`. Under Vitest 4 / Vite 8 those crash on load:
|
|
2305
|
+
|
|
2306
|
+
```
|
|
2307
|
+
SyntaxError: Invalid or unexpected token
|
|
2308
|
+
```
|
|
2309
|
+
|
|
2310
|
+
The cause is two transforms that don't understand each other. Vite 8 transpiles `.ts` with **oxc**, which only lowers *legacy* (`experimentalDecorators`) decorators — it leaves native ones in place. Then Vite's SSR `moduleRunnerTransform` rewrites the decorator's imported name into `@(0, __vite_ssr_import__.RegisterModel)()` — which is no longer valid decorator syntax. V8 throws on the first decorated model it evaluates, and your whole suite is dead before a single test runs.
|
|
2311
|
+
|
|
2312
|
+
`lowerStage3Decorators()` fixes it by getting **esbuild** to lower the decorators *first*.
|
|
2313
|
+
|
|
2314
|
+
## Use it
|
|
2315
|
+
|
|
2316
|
+
Drop it **first** in your `plugins` array:
|
|
2317
|
+
|
|
2318
|
+
```ts title="vite.config.ts"
|
|
2319
|
+
import { lowerStage3Decorators } from "@warlock.js/core";
|
|
2320
|
+
import mongezVite from "@mongez/vite";
|
|
2321
|
+
import { defineConfig } from "vitest/config";
|
|
2322
|
+
|
|
2323
|
+
export default defineConfig({
|
|
2324
|
+
plugins: [lowerStage3Decorators(), mongezVite()],
|
|
2325
|
+
test: {
|
|
2326
|
+
environment: "node",
|
|
2327
|
+
include: ["src/app/**/*.test.ts"],
|
|
2328
|
+
},
|
|
2329
|
+
});
|
|
2330
|
+
```
|
|
2331
|
+
|
|
2332
|
+
That's the whole fix. Any file that imports a decorated model now loads.
|
|
2333
|
+
|
|
2334
|
+
## Why it works
|
|
2335
|
+
|
|
2336
|
+
The plugin runs `enforce: "pre"`, so it executes **ahead of** Vite's core transform and the SSR rewrite. For every `.ts`/`.tsx` file that actually contains a decorator it runs esbuild with `target: "es2022"` and `experimentalDecorators: false` — esbuild lowers the Stage-3 decorator into a plain helper call (no `@` left), preserving the `(value, context)` runtime semantics the decorators depend on. By the time oxc and the SSR step see the file, there's no decorator syntax left to mangle — just ordinary import references.
|
|
2337
|
+
|
|
2338
|
+
It's the **same esbuild transform the production `tsx`/build path uses**, so a file lowered in tests behaves identically in dev and prod. Two cheap gates keep the fast path fast: files in `node_modules`, non-TypeScript files, and files with no `@decorator` are skipped entirely and never pay esbuild's cost.
|
|
2339
|
+
|
|
2340
|
+
## Things NOT to do
|
|
2341
|
+
|
|
2342
|
+
- **Don't reach for `oxc: { target: "es2022" }`** — it's insufficient. oxc can only lower *legacy* decorators, and the breakage is the SSR rewrite, not the transpile target. Legacy lowering would also mangle the Stage-3 `(value, context)` signature.
|
|
2343
|
+
- **Don't put it after `@mongez/vite`** — it must run `pre`, before any other transform. Keep it first.
|
|
2344
|
+
- **Don't set `experimentalDecorators: true`** anywhere in the test tsconfig — Cascade's decorators are native (Stage-3), not legacy. Legacy mode changes their call signature and breaks `context.kind` / `context.metadata`.
|
|
2345
|
+
|
|
2346
|
+
## See also
|
|
2347
|
+
|
|
2348
|
+
- [`@warlock.js/core/test-service/SKILL.md`](@warlock.js/core/test-service/SKILL.md) — `setupTest()` bootstrap for unit-testing services/models once the harness loads.
|
|
2349
|
+
- [`@warlock.js/core/test-http/SKILL.md`](@warlock.js/core/test-http/SKILL.md) — integration tests over the real HTTP server.
|
|
2350
|
+
- [`@warlock.js/cascade/write-migration/SKILL.md`](@warlock.js/cascade/write-migration/SKILL.md) — the decorated models this plugin lets you load.
|
|
2351
|
+
|
|
2352
|
+
|
|
2295
2353
|
## process-image `@warlock.js/core/process-image/SKILL.md`
|
|
2296
2354
|
|
|
2297
2355
|
---
|
|
@@ -2969,6 +3027,8 @@ preload: {
|
|
|
2969
3027
|
|
|
2970
3028
|
HTTP + Socket connectors are **Late** phase — they boot later in the dev-server startup sequence, after app modules load. That ordering is what guarantees `app.http` / `app.socket` are live by the time your `main.ts` runs.
|
|
2971
3029
|
|
|
3030
|
+
**Runs on any Node version.** `warlock.config.ts` is loaded by transpiling it with esbuild when the runtime can't import `.ts` natively (Node < 22.18 / < 23.6) — so `build`/`start` work on older production Node without `--experimental-strip-types` or a newer Node.
|
|
3031
|
+
|
|
2972
3032
|
**Boot failures are fatal and loud.** Anything that throws during preload — a bad import in a `src/config/*.ts` file, a removed package export, a connector that fails to start — stops `dev`/`start` immediately with the error message and the offending file/line, then exits `1`. A common cause is upgrading `@warlock.js/*` and hitting a removed export (e.g. a config file that pulls in a model importing a symbol the new version no longer exports). If `warlock dev` ever just freezes right after the banner with no message, treat it as a bug and report it — preload errors are meant to print, never hang.
|
|
2973
3033
|
|
|
2974
3034
|
### `devServer.*` config knobs
|
|
@@ -4270,11 +4330,12 @@ export async function teardown() {
|
|
|
4270
4330
|
```
|
|
4271
4331
|
|
|
4272
4332
|
```ts title="vite.config.ts"
|
|
4333
|
+
import { lowerStage3Decorators } from "@warlock.js/core";
|
|
4273
4334
|
import mongezVite from "@mongez/vite";
|
|
4274
4335
|
import { defineConfig } from "vitest/config";
|
|
4275
4336
|
|
|
4276
4337
|
export default defineConfig({
|
|
4277
|
-
plugins: [mongezVite()],
|
|
4338
|
+
plugins: [lowerStage3Decorators(), mongezVite()],
|
|
4278
4339
|
test: {
|
|
4279
4340
|
globalSetup: "./src/test-global-setup.ts", // ← starts the HTTP server
|
|
4280
4341
|
setupFiles: ["./src/test-setup.ts"], // ← per-worker setupTest (see test-service skill)
|
|
@@ -4285,7 +4346,7 @@ export default defineConfig({
|
|
|
4285
4346
|
});
|
|
4286
4347
|
```
|
|
4287
4348
|
|
|
4288
|
-
Both files are created by `warlock add test`. The split is intentional: `globalSetup` runs ONCE in the main vitest process; `setupFiles` runs per worker thread.
|
|
4349
|
+
Both files (and this config, with `lowerStage3Decorators()` first so decorated models load) are created by `warlock add test`. The split is intentional: `globalSetup` runs ONCE in the main vitest process; `setupFiles` runs per worker thread.
|
|
4289
4350
|
|
|
4290
4351
|
## HTTP request helpers
|
|
4291
4352
|
|
|
@@ -4577,11 +4638,12 @@ await setupTest({ connectors: true });
|
|
|
4577
4638
|
```
|
|
4578
4639
|
|
|
4579
4640
|
```ts title="vite.config.ts"
|
|
4641
|
+
import { lowerStage3Decorators } from "@warlock.js/core";
|
|
4580
4642
|
import mongezVite from "@mongez/vite";
|
|
4581
4643
|
import { defineConfig } from "vitest/config";
|
|
4582
4644
|
|
|
4583
4645
|
export default defineConfig({
|
|
4584
|
-
plugins: [mongezVite()],
|
|
4646
|
+
plugins: [lowerStage3Decorators(), mongezVite()],
|
|
4585
4647
|
test: {
|
|
4586
4648
|
globalSetup: "./src/test-global-setup.ts", // ← HTTP server (see test-http skill)
|
|
4587
4649
|
setupFiles: ["./src/test-setup.ts"], // ← runs setupTest per worker
|
|
@@ -4592,7 +4654,7 @@ export default defineConfig({
|
|
|
4592
4654
|
});
|
|
4593
4655
|
```
|
|
4594
4656
|
|
|
4595
|
-
The `mongezVite()` plugin handles TypeScript path resolution and the framework's module shape. Without it, your imports break the moment vitest tries to load a Warlock module.
|
|
4657
|
+
The `mongezVite()` plugin handles TypeScript path resolution and the framework's module shape. Without it, your imports break the moment vitest tries to load a Warlock module. `lowerStage3Decorators()` goes **first** — it lets decorated Cascade models (`@RegisterModel`, …) load under Vitest 4 / Vite 8; see [`@warlock.js/core/lower-stage3-decorators/SKILL.md`](@warlock.js/core/lower-stage3-decorators/SKILL.md).
|
|
4596
4658
|
|
|
4597
4659
|
Tests live colocated with the module: `src/app/<module>/tests/*.test.ts`. The `include` pattern picks them up.
|
|
4598
4660
|
|
package/llms.txt
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
- [define-resource](@warlock.js/core/define-resource/SKILL.md): Map model fields to wire-shape via `defineResource()` or `Resource` subclasses. Output-only — never put business logic, hydration, or reconciliation in a resource. Triggers: `defineResource`, `Resource`, `RegisterResource`, `toJSON`, `"self"`, `"localized"`, `"uploadsUrl"`; "shape an API response", "nest related resources", "rename a field on output", "self-referential tree resource"; typical import `import { defineResource } from "@warlock.js/core"`. Skip: localized columns — `@warlock.js/core/use-localization/SKILL.md`; URL casting — `@warlock.js/core/build-url/SKILL.md`; controller side — `@warlock.js/core/create-controller/SKILL.md`; competing libs `@nestjs/swagger` `@ApiProperty`, `class-transformer`, hand-rolled DTO mappers.
|
|
17
17
|
- [encrypt-data](@warlock.js/core/encrypt-data/SKILL.md): Reversible AES-256-GCM `encrypt` / `decrypt` for secrets you need to read back; one-way HMAC-SHA256 `hmacHash` for deterministic fingerprints (lookup/dedup of encrypted columns). Keys come from `src/config/encryption.ts`. Triggers: `encrypt`, `decrypt`, `hmacHash`, `EncryptionConfigurations`, `APP_ENCRYPTION_KEY`, `APP_HMAC_KEY`; "store an API key reversibly", "fingerprint an encrypted column for lookup", "AES-256-GCM secret", "HMAC-SHA256 dedup key"; typical import `import { encrypt, decrypt, hmacHash } from "@warlock.js/core"`. Skip: password hashing — `@warlock.js/core/hash-password/SKILL.md`; config wiring — `@warlock.js/core/configure-app/SKILL.md`; competing libs Node `crypto` direct, `crypto-js`, `libsodium-wrappers`.
|
|
18
18
|
- [hash-password](@warlock.js/core/hash-password/SKILL.md): One-way bcrypt password hashing — `hashPassword` / `verifyPassword`, plus the declarative `useHashedPassword()` schema transformer that auto-hashes a model's password field on save. Salt rounds come from `src/config/encryption.ts`. Triggers: `hashPassword`, `verifyPassword`, `useHashedPassword`, `password.salt`, `bcryptjs`; "hash a user password", "verify login credentials", "auto-hash on save", "rotate a password"; typical import `import { hashPassword, verifyPassword } from "@warlock.js/core"`. Skip: reversible secrets — `@warlock.js/core/encrypt-data/SKILL.md`; the other transformers — `@warlock.js/core/use-model-transformers/SKILL.md`; config wiring — `@warlock.js/core/configure-app/SKILL.md`; competing libs `bcrypt` native, `argon2`, `scrypt`.
|
|
19
|
+
- [lower-stage3-decorators](@warlock.js/core/lower-stage3-decorators/SKILL.md): Vite/Vitest plugin `lowerStage3Decorators()` that lowers TC39 Stage-3 (native) decorators with esbuild before oxc / the SSR rewrite mangles them — so `@RegisterModel`-decorated Cascade models load under Vitest 4 / Vite 8. Triggers: `lowerStage3Decorators`, "SyntaxError: Invalid or unexpected token" on a decorated class, "@(0, __vite_ssr_import__.X)()", "decorator crashes vitest", "models won't load in tests", "Vite 8 oxc decorators"; typical import `import { lowerStage3Decorators } from "@warlock.js/core"` in `vite.config.ts` / `vitest.config.ts`. Skip: writing the tests themselves — `@warlock.js/core/test-service/SKILL.md` / `@warlock.js/core/test-http/SKILL.md`; runtime migrations — `@warlock.js/cascade/write-migration/SKILL.md`.
|
|
19
20
|
- [process-image](@warlock.js/core/process-image/SKILL.md): Transform images with the `Image` class — resize, crop, rotate, format, quality, watermark, blur, etc. — using a deferred pipeline that runs only at `save()` / `toBuffer()` / `toBase64()` / `toDataUrl()` time. Requires sharp via `warlock add image`. Triggers: `Image`, `Image.fromFile`, `Image.fromBuffer`, `Image.fromUrl`, `.resize`, `.crop`, `.watermark`, `.toBuffer`, `.toDataUrl`, `.apply`; "resize an image", "generate a thumbnail", "watermark a product photo", "build an image pipeline"; typical import `import { Image } from "@warlock.js/core"`. Skip: multipart upload entry — `@warlock.js/core/upload-file/SKILL.md`; storage persistence — `@warlock.js/core/store-file/SKILL.md`; competing libs `sharp` direct, `jimp`, `imagemagick`, `gm`.
|
|
20
21
|
- [register-route](@warlock.js/core/register-route/SKILL.md): Register HTTP routes via @warlock.js/core's router — single routes, prefix groups, middleware-guarded blocks, and RESTful resource chains. Routes always live in `src/app/<module>/routes.ts`. Triggers: `router.get`, `router.post`, `router.prefix`, `router.group`, `router.route`, `guarded`; "add a route", "wire a controller to a URL", "group routes by prefix", "register a RESTful resource"; typical import `import { router } from "@warlock.js/core"`. Skip: handler shape — `@warlock.js/core/create-controller/SKILL.md`; CRUD chain details — `@warlock.js/core/build-restful/SKILL.md`; middleware authoring — `@warlock.js/core/write-middleware/SKILL.md`; competing libs `express`, `fastify`, `koa`, `@nestjs/common`.
|
|
21
22
|
- [resolve-path](@warlock.js/core/resolve-path/SKILL.md): Path helpers anchored at `process.cwd()` — `rootPath`, `srcPath`, `appPath`, `configPath`, `publicPath`, `storagePath`, `uploadsPath`, `cachePath`, `logsPath`, `tempPath`, `warlockPath`, `sanitizePath`. Optional `uploads.root` config overrides the uploads anchor. Triggers: `appPath`, `configPath`, `uploadsPath`, `storagePath`, `publicPath`, `cachePath`, `logsPath`, `tempPath`, `sanitizePath`, `paths`; "resolve a path inside src/app", "absolute upload destination", "sanitize a user filename", "ship uploads to a mounted volume"; typical import `import { appPath, uploadsPath } from "@warlock.js/core"`. Skip: HTTP URL helpers — `@warlock.js/core/build-url/SKILL.md`; app metadata — `@warlock.js/core/use-app-context/SKILL.md`; storage abstraction — `@warlock.js/core/store-file/SKILL.md`; competing patterns: `path.join(process.cwd(), ...)`, hand-rolled directory constants.
|
package/package.json
CHANGED
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"@mongez/slug": "^1.0.7",
|
|
37
37
|
"@mongez/supportive-is": "^2.1.3",
|
|
38
38
|
"@mongez/time-wizard": "^1.0.6",
|
|
39
|
-
"@warlock.js/auth": "
|
|
40
|
-
"@warlock.js/cache": "
|
|
41
|
-
"@warlock.js/cascade": "
|
|
42
|
-
"@warlock.js/context": "
|
|
43
|
-
"@warlock.js/logger": "
|
|
44
|
-
"@warlock.js/seal": "
|
|
45
|
-
"@warlock.js/fs": "
|
|
39
|
+
"@warlock.js/auth": "4.2.0",
|
|
40
|
+
"@warlock.js/cache": "4.2.0",
|
|
41
|
+
"@warlock.js/cascade": "4.2.0",
|
|
42
|
+
"@warlock.js/context": "4.2.0",
|
|
43
|
+
"@warlock.js/logger": "4.2.0",
|
|
44
|
+
"@warlock.js/seal": "4.2.0",
|
|
45
|
+
"@warlock.js/fs": "4.2.0",
|
|
46
46
|
"chokidar": "^5.0.0",
|
|
47
47
|
"dayjs": "^1.11.19",
|
|
48
48
|
"es-module-lexer": "^2.0.0",
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
"react": "^19.2.3",
|
|
69
69
|
"react-dom": "^19.2.3",
|
|
70
70
|
"@react-email/render": "^2.0.5",
|
|
71
|
-
"@warlock.js/herald": "
|
|
71
|
+
"@warlock.js/herald": "4.2.0"
|
|
72
72
|
},
|
|
73
73
|
"bin": {
|
|
74
74
|
"warlock": "bin/warlock.js"
|
|
75
75
|
},
|
|
76
|
-
"version": "4.
|
|
76
|
+
"version": "4.2.0",
|
|
77
77
|
"type": "module",
|
|
78
78
|
"main": "./esm/index.mjs",
|
|
79
79
|
"module": "./esm/index.mjs",
|
|
@@ -84,30 +84,6 @@
|
|
|
84
84
|
"types": "./esm/index.d.mts",
|
|
85
85
|
"default": "./esm/index.mjs"
|
|
86
86
|
}
|
|
87
|
-
},
|
|
88
|
-
"./cli/start": {
|
|
89
|
-
"import": {
|
|
90
|
-
"types": "./esm/cli/start.d.mts",
|
|
91
|
-
"default": "./esm/cli/start.mjs"
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
"./dev-server/loader/hook-thread": {
|
|
95
|
-
"import": {
|
|
96
|
-
"types": "./esm/dev-server/loader/hook-thread.d.mts",
|
|
97
|
-
"default": "./esm/dev-server/loader/hook-thread.mjs"
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
"./dev-server/health-checker/workers/eslint-health.worker": {
|
|
101
|
-
"import": {
|
|
102
|
-
"types": "./esm/dev-server/health-checker/workers/eslint-health.worker.d.mts",
|
|
103
|
-
"default": "./esm/dev-server/health-checker/workers/eslint-health.worker.mjs"
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
"./dev-server/health-checker/workers/ts-health.worker": {
|
|
107
|
-
"import": {
|
|
108
|
-
"types": "./esm/dev-server/health-checker/workers/ts-health.worker.d.mts",
|
|
109
|
-
"default": "./esm/dev-server/health-checker/workers/ts-health.worker.mjs"
|
|
110
|
-
}
|
|
111
87
|
}
|
|
112
88
|
}
|
|
113
89
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lower-stage3-decorators
|
|
3
|
+
description: 'Vite/Vitest plugin `lowerStage3Decorators()` that lowers TC39 Stage-3 (native) decorators with esbuild before oxc / the SSR rewrite mangles them — so `@RegisterModel`-decorated Cascade models load under Vitest 4 / Vite 8. Triggers: `lowerStage3Decorators`, "SyntaxError: Invalid or unexpected token" on a decorated class, "@(0, __vite_ssr_import__.X)()", "decorator crashes vitest", "models won''t load in tests", "Vite 8 oxc decorators"; typical import `import { lowerStage3Decorators } from "@warlock.js/core"` in `vite.config.ts` / `vitest.config.ts`. Skip: writing the tests themselves — `@warlock.js/core/test-service/SKILL.md` / `@warlock.js/core/test-http/SKILL.md`; runtime migrations — `@warlock.js/cascade/write-migration/SKILL.md`.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Lower Stage-3 decorators for Vite/Vitest
|
|
7
|
+
|
|
8
|
+
Cascade declares relations with **native** decorators — `@RegisterModel`, `@BelongsTo`, `@HasMany`. Under Vitest 4 / Vite 8 those crash on load:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
SyntaxError: Invalid or unexpected token
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The cause is two transforms that don't understand each other. Vite 8 transpiles `.ts` with **oxc**, which only lowers *legacy* (`experimentalDecorators`) decorators — it leaves native ones in place. Then Vite's SSR `moduleRunnerTransform` rewrites the decorator's imported name into `@(0, __vite_ssr_import__.RegisterModel)()` — which is no longer valid decorator syntax. V8 throws on the first decorated model it evaluates, and your whole suite is dead before a single test runs.
|
|
15
|
+
|
|
16
|
+
`lowerStage3Decorators()` fixes it by getting **esbuild** to lower the decorators *first*.
|
|
17
|
+
|
|
18
|
+
## Use it
|
|
19
|
+
|
|
20
|
+
Drop it **first** in your `plugins` array:
|
|
21
|
+
|
|
22
|
+
```ts title="vite.config.ts"
|
|
23
|
+
import { lowerStage3Decorators } from "@warlock.js/core";
|
|
24
|
+
import mongezVite from "@mongez/vite";
|
|
25
|
+
import { defineConfig } from "vitest/config";
|
|
26
|
+
|
|
27
|
+
export default defineConfig({
|
|
28
|
+
plugins: [lowerStage3Decorators(), mongezVite()],
|
|
29
|
+
test: {
|
|
30
|
+
environment: "node",
|
|
31
|
+
include: ["src/app/**/*.test.ts"],
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
That's the whole fix. Any file that imports a decorated model now loads.
|
|
37
|
+
|
|
38
|
+
## Why it works
|
|
39
|
+
|
|
40
|
+
The plugin runs `enforce: "pre"`, so it executes **ahead of** Vite's core transform and the SSR rewrite. For every `.ts`/`.tsx` file that actually contains a decorator it runs esbuild with `target: "es2022"` and `experimentalDecorators: false` — esbuild lowers the Stage-3 decorator into a plain helper call (no `@` left), preserving the `(value, context)` runtime semantics the decorators depend on. By the time oxc and the SSR step see the file, there's no decorator syntax left to mangle — just ordinary import references.
|
|
41
|
+
|
|
42
|
+
It's the **same esbuild transform the production `tsx`/build path uses**, so a file lowered in tests behaves identically in dev and prod. Two cheap gates keep the fast path fast: files in `node_modules`, non-TypeScript files, and files with no `@decorator` are skipped entirely and never pay esbuild's cost.
|
|
43
|
+
|
|
44
|
+
## Things NOT to do
|
|
45
|
+
|
|
46
|
+
- **Don't reach for `oxc: { target: "es2022" }`** — it's insufficient. oxc can only lower *legacy* decorators, and the breakage is the SSR rewrite, not the transpile target. Legacy lowering would also mangle the Stage-3 `(value, context)` signature.
|
|
47
|
+
- **Don't put it after `@mongez/vite`** — it must run `pre`, before any other transform. Keep it first.
|
|
48
|
+
- **Don't set `experimentalDecorators: true`** anywhere in the test tsconfig — Cascade's decorators are native (Stage-3), not legacy. Legacy mode changes their call signature and breaks `context.kind` / `context.metadata`.
|
|
49
|
+
|
|
50
|
+
## See also
|
|
51
|
+
|
|
52
|
+
- [`@warlock.js/core/test-service/SKILL.md`](@warlock.js/core/test-service/SKILL.md) — `setupTest()` bootstrap for unit-testing services/models once the harness loads.
|
|
53
|
+
- [`@warlock.js/core/test-http/SKILL.md`](@warlock.js/core/test-http/SKILL.md) — integration tests over the real HTTP server.
|
|
54
|
+
- [`@warlock.js/cascade/write-migration/SKILL.md`](@warlock.js/cascade/write-migration/SKILL.md) — the decorated models this plugin lets you load.
|
package/skills/run-app/SKILL.md
CHANGED
|
@@ -50,6 +50,8 @@ preload: {
|
|
|
50
50
|
|
|
51
51
|
HTTP + Socket connectors are **Late** phase — they boot later in the dev-server startup sequence, after app modules load. That ordering is what guarantees `app.http` / `app.socket` are live by the time your `main.ts` runs.
|
|
52
52
|
|
|
53
|
+
**Runs on any Node version.** `warlock.config.ts` is loaded by transpiling it with esbuild when the runtime can't import `.ts` natively (Node < 22.18 / < 23.6) — so `build`/`start` work on older production Node without `--experimental-strip-types` or a newer Node.
|
|
54
|
+
|
|
53
55
|
**Boot failures are fatal and loud.** Anything that throws during preload — a bad import in a `src/config/*.ts` file, a removed package export, a connector that fails to start — stops `dev`/`start` immediately with the error message and the offending file/line, then exits `1`. A common cause is upgrading `@warlock.js/*` and hitting a removed export (e.g. a config file that pulls in a model importing a symbol the new version no longer exports). If `warlock dev` ever just freezes right after the banner with no message, treat it as a bug and report it — preload errors are meant to print, never hang.
|
|
54
56
|
|
|
55
57
|
### `devServer.*` config knobs
|
|
@@ -75,11 +75,12 @@ export async function teardown() {
|
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
```ts title="vite.config.ts"
|
|
78
|
+
import { lowerStage3Decorators } from "@warlock.js/core";
|
|
78
79
|
import mongezVite from "@mongez/vite";
|
|
79
80
|
import { defineConfig } from "vitest/config";
|
|
80
81
|
|
|
81
82
|
export default defineConfig({
|
|
82
|
-
plugins: [mongezVite()],
|
|
83
|
+
plugins: [lowerStage3Decorators(), mongezVite()],
|
|
83
84
|
test: {
|
|
84
85
|
globalSetup: "./src/test-global-setup.ts", // ← starts the HTTP server
|
|
85
86
|
setupFiles: ["./src/test-setup.ts"], // ← per-worker setupTest (see test-service skill)
|
|
@@ -90,7 +91,7 @@ export default defineConfig({
|
|
|
90
91
|
});
|
|
91
92
|
```
|
|
92
93
|
|
|
93
|
-
Both files are created by `warlock add test`. The split is intentional: `globalSetup` runs ONCE in the main vitest process; `setupFiles` runs per worker thread.
|
|
94
|
+
Both files (and this config, with `lowerStage3Decorators()` first so decorated models load) are created by `warlock add test`. The split is intentional: `globalSetup` runs ONCE in the main vitest process; `setupFiles` runs per worker thread.
|
|
94
95
|
|
|
95
96
|
## HTTP request helpers
|
|
96
97
|
|
|
@@ -91,11 +91,12 @@ await setupTest({ connectors: true });
|
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
```ts title="vite.config.ts"
|
|
94
|
+
import { lowerStage3Decorators } from "@warlock.js/core";
|
|
94
95
|
import mongezVite from "@mongez/vite";
|
|
95
96
|
import { defineConfig } from "vitest/config";
|
|
96
97
|
|
|
97
98
|
export default defineConfig({
|
|
98
|
-
plugins: [mongezVite()],
|
|
99
|
+
plugins: [lowerStage3Decorators(), mongezVite()],
|
|
99
100
|
test: {
|
|
100
101
|
globalSetup: "./src/test-global-setup.ts", // ← HTTP server (see test-http skill)
|
|
101
102
|
setupFiles: ["./src/test-setup.ts"], // ← runs setupTest per worker
|
|
@@ -106,7 +107,7 @@ export default defineConfig({
|
|
|
106
107
|
});
|
|
107
108
|
```
|
|
108
109
|
|
|
109
|
-
The `mongezVite()` plugin handles TypeScript path resolution and the framework's module shape. Without it, your imports break the moment vitest tries to load a Warlock module.
|
|
110
|
+
The `mongezVite()` plugin handles TypeScript path resolution and the framework's module shape. Without it, your imports break the moment vitest tries to load a Warlock module. `lowerStage3Decorators()` goes **first** — it lets decorated Cascade models (`@RegisterModel`, …) load under Vitest 4 / Vite 8; see [`@warlock.js/core/lower-stage3-decorators/SKILL.md`](@warlock.js/core/lower-stage3-decorators/SKILL.md).
|
|
110
111
|
|
|
111
112
|
Tests live colocated with the module: `src/app/<module>/tests/*.test.ts`. The `include` pattern picks them up.
|
|
112
113
|
|