@kabyeon/nexusjs 0.6.5
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/LICENSE +21 -0
- package/README.md +860 -0
- package/dist/auth/auth.controller.d.ts +175 -0
- package/dist/auth/auth.controller.d.ts.map +1 -0
- package/dist/auth/auth.d.ts +47 -0
- package/dist/auth/auth.d.ts.map +1 -0
- package/dist/auth/auth.module.d.ts +34 -0
- package/dist/auth/auth.module.d.ts.map +1 -0
- package/dist/auth/auth.service.d.ts +192 -0
- package/dist/auth/auth.service.d.ts.map +1 -0
- package/dist/auth/decorators/current-user.d.ts +58 -0
- package/dist/auth/decorators/current-user.d.ts.map +1 -0
- package/dist/auth/index.d.ts +43 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +730 -0
- package/dist/auth/index.js.map +25 -0
- package/dist/auth/middleware.d.ts +50 -0
- package/dist/auth/middleware.d.ts.map +1 -0
- package/dist/auth/types.d.ts +135 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/cache/cache.module.d.ts +22 -0
- package/dist/cache/cache.module.d.ts.map +1 -0
- package/dist/cache/cache.service.d.ts +37 -0
- package/dist/cache/cache.service.d.ts.map +1 -0
- package/dist/cache/index.d.ts +9 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +814 -0
- package/dist/cache/index.js.map +25 -0
- package/dist/cache/stores/drizzle.d.ts +76 -0
- package/dist/cache/stores/drizzle.d.ts.map +1 -0
- package/dist/cache/stores/index.d.ts +10 -0
- package/dist/cache/stores/index.d.ts.map +1 -0
- package/dist/cache/stores/memory.d.ts +34 -0
- package/dist/cache/stores/memory.d.ts.map +1 -0
- package/dist/cache/stores/redis.d.ts +46 -0
- package/dist/cache/stores/redis.d.ts.map +1 -0
- package/dist/cache/types.d.ts +88 -0
- package/dist/cache/types.d.ts.map +1 -0
- package/dist/cli/commands/config.d.ts +44 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/db-generate.d.ts +20 -0
- package/dist/cli/commands/db-generate.d.ts.map +1 -0
- package/dist/cli/commands/db-migrate.d.ts +33 -0
- package/dist/cli/commands/db-migrate.d.ts.map +1 -0
- package/dist/cli/commands/db-seed.d.ts +43 -0
- package/dist/cli/commands/db-seed.d.ts.map +1 -0
- package/dist/cli/commands/index.d.ts +11 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/info.d.ts +11 -0
- package/dist/cli/commands/info.d.ts.map +1 -0
- package/dist/cli/commands/init.d.ts +38 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/make-auth.d.ts +17 -0
- package/dist/cli/commands/make-auth.d.ts.map +1 -0
- package/dist/cli/commands/make-controller.d.ts +16 -0
- package/dist/cli/commands/make-controller.d.ts.map +1 -0
- package/dist/cli/commands/make-crud.d.ts +28 -0
- package/dist/cli/commands/make-crud.d.ts.map +1 -0
- package/dist/cli/commands/make-listener.d.ts +15 -0
- package/dist/cli/commands/make-listener.d.ts.map +1 -0
- package/dist/cli/commands/make-middleware.d.ts +7 -0
- package/dist/cli/commands/make-middleware.d.ts.map +1 -0
- package/dist/cli/commands/make-migration.d.ts +21 -0
- package/dist/cli/commands/make-migration.d.ts.map +1 -0
- package/dist/cli/commands/make-model.d.ts +22 -0
- package/dist/cli/commands/make-model.d.ts.map +1 -0
- package/dist/cli/commands/make-module.d.ts +11 -0
- package/dist/cli/commands/make-module.d.ts.map +1 -0
- package/dist/cli/commands/make-queue.d.ts +17 -0
- package/dist/cli/commands/make-queue.d.ts.map +1 -0
- package/dist/cli/commands/make-schedule.d.ts +17 -0
- package/dist/cli/commands/make-schedule.d.ts.map +1 -0
- package/dist/cli/commands/make-service.d.ts +7 -0
- package/dist/cli/commands/make-service.d.ts.map +1 -0
- package/dist/cli/commands/make-session.d.ts +15 -0
- package/dist/cli/commands/make-session.d.ts.map +1 -0
- package/dist/cli/commands/make-validator.d.ts +7 -0
- package/dist/cli/commands/make-validator.d.ts.map +1 -0
- package/dist/cli/commands/new.d.ts +14 -0
- package/dist/cli/commands/new.d.ts.map +1 -0
- package/dist/cli/commands/repl.d.ts +42 -0
- package/dist/cli/commands/repl.d.ts.map +1 -0
- package/dist/cli/commands/route-list.d.ts +12 -0
- package/dist/cli/commands/route-list.d.ts.map +1 -0
- package/dist/cli/core/args.d.ts +29 -0
- package/dist/cli/core/args.d.ts.map +1 -0
- package/dist/cli/core/config.d.ts +137 -0
- package/dist/cli/core/config.d.ts.map +1 -0
- package/dist/cli/core/fs.d.ts +38 -0
- package/dist/cli/core/fs.d.ts.map +1 -0
- package/dist/cli/core/index.d.ts +42 -0
- package/dist/cli/core/index.d.ts.map +1 -0
- package/dist/cli/core/logger.d.ts +46 -0
- package/dist/cli/core/logger.d.ts.map +1 -0
- package/dist/cli/core/loose-json.d.ts +26 -0
- package/dist/cli/core/loose-json.d.ts.map +1 -0
- package/dist/cli/core/prompts.d.ts +22 -0
- package/dist/cli/core/prompts.d.ts.map +1 -0
- package/dist/cli/core/template.d.ts +26 -0
- package/dist/cli/core/template.d.ts.map +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +6136 -0
- package/dist/cli/index.js.map +91 -0
- package/dist/cli/templates/controller/adonis.d.ts +10 -0
- package/dist/cli/templates/controller/adonis.d.ts.map +1 -0
- package/dist/cli/templates/controller/functional.d.ts +9 -0
- package/dist/cli/templates/controller/functional.d.ts.map +1 -0
- package/dist/cli/templates/controller/nest.d.ts +17 -0
- package/dist/cli/templates/controller/nest.d.ts.map +1 -0
- package/dist/cli/templates/crud/controller.d.ts +8 -0
- package/dist/cli/templates/crud/controller.d.ts.map +1 -0
- package/dist/cli/templates/crud/dto.d.ts +8 -0
- package/dist/cli/templates/crud/dto.d.ts.map +1 -0
- package/dist/cli/templates/crud/index.d.ts +33 -0
- package/dist/cli/templates/crud/index.d.ts.map +1 -0
- package/dist/cli/templates/crud/module.d.ts +6 -0
- package/dist/cli/templates/crud/module.d.ts.map +1 -0
- package/dist/cli/templates/crud/test.d.ts +10 -0
- package/dist/cli/templates/crud/test.d.ts.map +1 -0
- package/dist/cli/templates/index.d.ts +39 -0
- package/dist/cli/templates/index.d.ts.map +1 -0
- package/dist/cli/templates/middleware/middleware.d.ts +8 -0
- package/dist/cli/templates/middleware/middleware.d.ts.map +1 -0
- package/dist/cli/templates/migration/drizzle.d.ts +12 -0
- package/dist/cli/templates/migration/drizzle.d.ts.map +1 -0
- package/dist/cli/templates/migration/sql.d.ts +10 -0
- package/dist/cli/templates/migration/sql.d.ts.map +1 -0
- package/dist/cli/templates/model/drizzle-dialect.d.ts +29 -0
- package/dist/cli/templates/model/drizzle-dialect.d.ts.map +1 -0
- package/dist/cli/templates/model/drizzle.d.ts +14 -0
- package/dist/cli/templates/model/drizzle.d.ts.map +1 -0
- package/dist/cli/templates/model/kysely.d.ts +12 -0
- package/dist/cli/templates/model/kysely.d.ts.map +1 -0
- package/dist/cli/templates/model/prisma.d.ts +12 -0
- package/dist/cli/templates/model/prisma.d.ts.map +1 -0
- package/dist/cli/templates/module/module.d.ts +16 -0
- package/dist/cli/templates/module/module.d.ts.map +1 -0
- package/dist/cli/templates/project/drizzle.config.d.ts +12 -0
- package/dist/cli/templates/project/drizzle.config.d.ts.map +1 -0
- package/dist/cli/templates/project/nx.config.d.ts +7 -0
- package/dist/cli/templates/project/nx.config.d.ts.map +1 -0
- package/dist/cli/templates/repository/repository.d.ts +13 -0
- package/dist/cli/templates/repository/repository.d.ts.map +1 -0
- package/dist/cli/templates/service/service.d.ts +12 -0
- package/dist/cli/templates/service/service.d.ts.map +1 -0
- package/dist/cli/templates/validator/validator.d.ts +8 -0
- package/dist/cli/templates/validator/validator.d.ts.map +1 -0
- package/dist/config/config.module.d.ts +39 -0
- package/dist/config/config.module.d.ts.map +1 -0
- package/dist/config/config.service.d.ts +47 -0
- package/dist/config/config.service.d.ts.map +1 -0
- package/dist/config/index.d.ts +39 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +436 -0
- package/dist/config/index.js.map +21 -0
- package/dist/config/types.d.ts +78 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/core/application.d.ts +77 -0
- package/dist/core/application.d.ts.map +1 -0
- package/dist/core/constants.d.ts +48 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/decorators/controller.d.ts +21 -0
- package/dist/core/decorators/controller.d.ts.map +1 -0
- package/dist/core/decorators/http-methods.d.ts +33 -0
- package/dist/core/decorators/http-methods.d.ts.map +1 -0
- package/dist/core/decorators/index.d.ts +12 -0
- package/dist/core/decorators/index.d.ts.map +1 -0
- package/dist/core/decorators/injectable.d.ts +42 -0
- package/dist/core/decorators/injectable.d.ts.map +1 -0
- package/dist/core/decorators/metadata.d.ts +7 -0
- package/dist/core/decorators/metadata.d.ts.map +1 -0
- package/dist/core/decorators/module.d.ts +23 -0
- package/dist/core/decorators/module.d.ts.map +1 -0
- package/dist/core/decorators/params.d.ts +33 -0
- package/dist/core/decorators/params.d.ts.map +1 -0
- package/dist/core/decorators/repository.d.ts +24 -0
- package/dist/core/decorators/repository.d.ts.map +1 -0
- package/dist/core/decorators/validate.d.ts +21 -0
- package/dist/core/decorators/validate.d.ts.map +1 -0
- package/dist/core/di/container.d.ts +70 -0
- package/dist/core/di/container.d.ts.map +1 -0
- package/dist/core/di/index.d.ts +9 -0
- package/dist/core/di/index.d.ts.map +1 -0
- package/dist/core/di/request-middleware.d.ts +36 -0
- package/dist/core/di/request-middleware.d.ts.map +1 -0
- package/dist/core/di/request-scope.d.ts +45 -0
- package/dist/core/di/request-scope.d.ts.map +1 -0
- package/dist/core/di/scanner.d.ts +36 -0
- package/dist/core/di/scanner.d.ts.map +1 -0
- package/dist/core/di/tokens.d.ts +98 -0
- package/dist/core/di/tokens.d.ts.map +1 -0
- package/dist/core/http/context.d.ts +30 -0
- package/dist/core/http/context.d.ts.map +1 -0
- package/dist/core/http/index.d.ts +8 -0
- package/dist/core/http/index.d.ts.map +1 -0
- package/dist/core/http/middleware.d.ts +31 -0
- package/dist/core/http/middleware.d.ts.map +1 -0
- package/dist/core/http/router.d.ts +46 -0
- package/dist/core/http/router.d.ts.map +1 -0
- package/dist/core/http/server.d.ts +58 -0
- package/dist/core/http/server.d.ts.map +1 -0
- package/dist/core/index.d.ts +20 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/orm/drizzle-adapter.d.ts +73 -0
- package/dist/core/orm/drizzle-adapter.d.ts.map +1 -0
- package/dist/core/orm/index.d.ts +5 -0
- package/dist/core/orm/index.d.ts.map +1 -0
- package/dist/core/runtime/bun.d.ts +13 -0
- package/dist/core/runtime/bun.d.ts.map +1 -0
- package/dist/core/runtime/cloudflare.d.ts +18 -0
- package/dist/core/runtime/cloudflare.d.ts.map +1 -0
- package/dist/core/runtime/index.d.ts +11 -0
- package/dist/core/runtime/index.d.ts.map +1 -0
- package/dist/core/runtime/node.d.ts +10 -0
- package/dist/core/runtime/node.d.ts.map +1 -0
- package/dist/core/validation/index.d.ts +5 -0
- package/dist/core/validation/index.d.ts.map +1 -0
- package/dist/core/validation/validator.d.ts +46 -0
- package/dist/core/validation/validator.d.ts.map +1 -0
- package/dist/crypto/encryption.d.ts +71 -0
- package/dist/crypto/encryption.d.ts.map +1 -0
- package/dist/crypto/hash.d.ts +52 -0
- package/dist/crypto/hash.d.ts.map +1 -0
- package/dist/crypto/index.d.ts +49 -0
- package/dist/crypto/index.d.ts.map +1 -0
- package/dist/crypto/index.js +533 -0
- package/dist/crypto/index.js.map +14 -0
- package/dist/crypto/module.d.ts +28 -0
- package/dist/crypto/module.d.ts.map +1 -0
- package/dist/crypto/types.d.ts +81 -0
- package/dist/crypto/types.d.ts.map +1 -0
- package/dist/drive/drive.module.d.ts +20 -0
- package/dist/drive/drive.module.d.ts.map +1 -0
- package/dist/drive/drive.service.d.ts +21 -0
- package/dist/drive/drive.service.d.ts.map +1 -0
- package/dist/drive/drivers/index.d.ts +9 -0
- package/dist/drive/drivers/index.d.ts.map +1 -0
- package/dist/drive/drivers/local.d.ts +24 -0
- package/dist/drive/drivers/local.d.ts.map +1 -0
- package/dist/drive/drivers/memory.d.ts +19 -0
- package/dist/drive/drivers/memory.d.ts.map +1 -0
- package/dist/drive/drivers/s3.d.ts +44 -0
- package/dist/drive/drivers/s3.d.ts.map +1 -0
- package/dist/drive/index.d.ts +9 -0
- package/dist/drive/index.d.ts.map +1 -0
- package/dist/drive/index.js +714 -0
- package/dist/drive/index.js.map +25 -0
- package/dist/drive/types.d.ts +97 -0
- package/dist/drive/types.d.ts.map +1 -0
- package/dist/drizzle/decorators/columns.d.ts +16 -0
- package/dist/drizzle/decorators/columns.d.ts.map +1 -0
- package/dist/drizzle/decorators/index.d.ts +6 -0
- package/dist/drizzle/decorators/index.d.ts.map +1 -0
- package/dist/drizzle/drivers/base.d.ts +32 -0
- package/dist/drizzle/drivers/base.d.ts.map +1 -0
- package/dist/drizzle/drivers/bun-sqlite.d.ts +6 -0
- package/dist/drizzle/drivers/bun-sqlite.d.ts.map +1 -0
- package/dist/drizzle/drivers/d1.d.ts +7 -0
- package/dist/drizzle/drivers/d1.d.ts.map +1 -0
- package/dist/drizzle/drivers/index.d.ts +14 -0
- package/dist/drizzle/drivers/index.d.ts.map +1 -0
- package/dist/drizzle/drivers/mysql.d.ts +6 -0
- package/dist/drizzle/drivers/mysql.d.ts.map +1 -0
- package/dist/drizzle/drivers/postgres.d.ts +12 -0
- package/dist/drizzle/drivers/postgres.d.ts.map +1 -0
- package/dist/drizzle/drivers/sqlite.d.ts +8 -0
- package/dist/drizzle/drivers/sqlite.d.ts.map +1 -0
- package/dist/drizzle/drizzle.module.d.ts +29 -0
- package/dist/drizzle/drizzle.module.d.ts.map +1 -0
- package/dist/drizzle/drizzle.service.d.ts +52 -0
- package/dist/drizzle/drizzle.service.d.ts.map +1 -0
- package/dist/drizzle/index.d.ts +13 -0
- package/dist/drizzle/index.d.ts.map +1 -0
- package/dist/drizzle/index.js +979 -0
- package/dist/drizzle/index.js.map +32 -0
- package/dist/drizzle/model.d.ts +26 -0
- package/dist/drizzle/model.d.ts.map +1 -0
- package/dist/drizzle/raw-query.d.ts +41 -0
- package/dist/drizzle/raw-query.d.ts.map +1 -0
- package/dist/drizzle/repository/index.d.ts +6 -0
- package/dist/drizzle/repository/index.d.ts.map +1 -0
- package/dist/drizzle/repository/repository.d.ts +60 -0
- package/dist/drizzle/repository/repository.d.ts.map +1 -0
- package/dist/drizzle/types.d.ts +160 -0
- package/dist/drizzle/types.d.ts.map +1 -0
- package/dist/events/decorators/on-event.d.ts +49 -0
- package/dist/events/decorators/on-event.d.ts.map +1 -0
- package/dist/events/emitter.d.ts +52 -0
- package/dist/events/emitter.d.ts.map +1 -0
- package/dist/events/event.service.d.ts +27 -0
- package/dist/events/event.service.d.ts.map +1 -0
- package/dist/events/events.module.d.ts +35 -0
- package/dist/events/events.module.d.ts.map +1 -0
- package/dist/events/index.d.ts +43 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +646 -0
- package/dist/events/index.js.map +23 -0
- package/dist/events/types.d.ts +120 -0
- package/dist/events/types.d.ts.map +1 -0
- package/dist/grpc/decorators.d.ts +34 -0
- package/dist/grpc/decorators.d.ts.map +1 -0
- package/dist/grpc/index.d.ts +70 -0
- package/dist/grpc/index.d.ts.map +1 -0
- package/dist/grpc/index.js +528 -0
- package/dist/grpc/index.js.map +22 -0
- package/dist/grpc/module.d.ts +32 -0
- package/dist/grpc/module.d.ts.map +1 -0
- package/dist/grpc/service.d.ts +60 -0
- package/dist/grpc/service.d.ts.map +1 -0
- package/dist/grpc/types.d.ts +79 -0
- package/dist/grpc/types.d.ts.map +1 -0
- package/dist/health/health.controller.d.ts +61 -0
- package/dist/health/health.controller.d.ts.map +1 -0
- package/dist/health/health.module.d.ts +29 -0
- package/dist/health/health.module.d.ts.map +1 -0
- package/dist/health/health.service.d.ts +34 -0
- package/dist/health/health.service.d.ts.map +1 -0
- package/dist/health/index.d.ts +38 -0
- package/dist/health/index.d.ts.map +1 -0
- package/dist/health/index.js +599 -0
- package/dist/health/index.js.map +25 -0
- package/dist/health/indicators/drizzle.d.ts +18 -0
- package/dist/health/indicators/drizzle.d.ts.map +1 -0
- package/dist/health/indicators/index.d.ts +59 -0
- package/dist/health/indicators/index.d.ts.map +1 -0
- package/dist/health/types.d.ts +105 -0
- package/dist/health/types.d.ts.map +1 -0
- package/dist/i18n/decorators.d.ts +14 -0
- package/dist/i18n/decorators.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +48 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +589 -0
- package/dist/i18n/index.js.map +17 -0
- package/dist/i18n/middleware.d.ts +26 -0
- package/dist/i18n/middleware.d.ts.map +1 -0
- package/dist/i18n/module.d.ts +39 -0
- package/dist/i18n/module.d.ts.map +1 -0
- package/dist/i18n/service.d.ts +130 -0
- package/dist/i18n/service.d.ts.map +1 -0
- package/dist/i18n/types.d.ts +65 -0
- package/dist/i18n/types.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2056 -0
- package/dist/index.js.map +53 -0
- package/dist/limiter/backends/drizzle.d.ts +40 -0
- package/dist/limiter/backends/drizzle.d.ts.map +1 -0
- package/dist/limiter/backends/index.d.ts +6 -0
- package/dist/limiter/backends/index.d.ts.map +1 -0
- package/dist/limiter/backends/memory.d.ts +28 -0
- package/dist/limiter/backends/memory.d.ts.map +1 -0
- package/dist/limiter/index.d.ts +9 -0
- package/dist/limiter/index.d.ts.map +1 -0
- package/dist/limiter/index.js +640 -0
- package/dist/limiter/index.js.map +25 -0
- package/dist/limiter/limiter.middleware.d.ts +11 -0
- package/dist/limiter/limiter.middleware.d.ts.map +1 -0
- package/dist/limiter/limiter.module.d.ts +23 -0
- package/dist/limiter/limiter.module.d.ts.map +1 -0
- package/dist/limiter/limiter.service.d.ts +18 -0
- package/dist/limiter/limiter.service.d.ts.map +1 -0
- package/dist/limiter/types.d.ts +99 -0
- package/dist/limiter/types.d.ts.map +1 -0
- package/dist/logger/index.d.ts +36 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +538 -0
- package/dist/logger/index.js.map +22 -0
- package/dist/logger/logger.module.d.ts +35 -0
- package/dist/logger/logger.module.d.ts.map +1 -0
- package/dist/logger/logger.service.d.ts +55 -0
- package/dist/logger/logger.service.d.ts.map +1 -0
- package/dist/logger/transports/index.d.ts +35 -0
- package/dist/logger/transports/index.d.ts.map +1 -0
- package/dist/logger/types.d.ts +58 -0
- package/dist/logger/types.d.ts.map +1 -0
- package/dist/mail/index.d.ts +9 -0
- package/dist/mail/index.d.ts.map +1 -0
- package/dist/mail/index.js +479 -0
- package/dist/mail/index.js.map +25 -0
- package/dist/mail/mail.module.d.ts +21 -0
- package/dist/mail/mail.module.d.ts.map +1 -0
- package/dist/mail/mail.service.d.ts +18 -0
- package/dist/mail/mail.service.d.ts.map +1 -0
- package/dist/mail/transports/file.d.ts +19 -0
- package/dist/mail/transports/file.d.ts.map +1 -0
- package/dist/mail/transports/index.d.ts +9 -0
- package/dist/mail/transports/index.d.ts.map +1 -0
- package/dist/mail/transports/null.d.ts +11 -0
- package/dist/mail/transports/null.d.ts.map +1 -0
- package/dist/mail/transports/smtp.d.ts +40 -0
- package/dist/mail/transports/smtp.d.ts.map +1 -0
- package/dist/mail/types.d.ts +73 -0
- package/dist/mail/types.d.ts.map +1 -0
- package/dist/metrics/controller.d.ts +27 -0
- package/dist/metrics/controller.d.ts.map +1 -0
- package/dist/metrics/counter.d.ts +36 -0
- package/dist/metrics/counter.d.ts.map +1 -0
- package/dist/metrics/decorators/counted.d.ts +26 -0
- package/dist/metrics/decorators/counted.d.ts.map +1 -0
- package/dist/metrics/decorators/index.d.ts +3 -0
- package/dist/metrics/decorators/index.d.ts.map +1 -0
- package/dist/metrics/decorators/timed.d.ts +25 -0
- package/dist/metrics/decorators/timed.d.ts.map +1 -0
- package/dist/metrics/gauge.d.ts +38 -0
- package/dist/metrics/gauge.d.ts.map +1 -0
- package/dist/metrics/histogram.d.ts +52 -0
- package/dist/metrics/histogram.d.ts.map +1 -0
- package/dist/metrics/index.d.ts +35 -0
- package/dist/metrics/index.d.ts.map +1 -0
- package/dist/metrics/index.js +1033 -0
- package/dist/metrics/index.js.map +21 -0
- package/dist/metrics/module.d.ts +33 -0
- package/dist/metrics/module.d.ts.map +1 -0
- package/dist/metrics/registry.d.ts +52 -0
- package/dist/metrics/registry.d.ts.map +1 -0
- package/dist/metrics/service.d.ts +42 -0
- package/dist/metrics/service.d.ts.map +1 -0
- package/dist/metrics/summary.d.ts +50 -0
- package/dist/metrics/summary.d.ts.map +1 -0
- package/dist/metrics/types.d.ts +115 -0
- package/dist/metrics/types.d.ts.map +1 -0
- package/dist/openapi/decorators/body.d.ts +9 -0
- package/dist/openapi/decorators/body.d.ts.map +1 -0
- package/dist/openapi/decorators/index.d.ts +11 -0
- package/dist/openapi/decorators/index.d.ts.map +1 -0
- package/dist/openapi/decorators/operation.d.ts +9 -0
- package/dist/openapi/decorators/operation.d.ts.map +1 -0
- package/dist/openapi/decorators/param.d.ts +17 -0
- package/dist/openapi/decorators/param.d.ts.map +1 -0
- package/dist/openapi/decorators/property.d.ts +24 -0
- package/dist/openapi/decorators/property.d.ts.map +1 -0
- package/dist/openapi/decorators/response.d.ts +10 -0
- package/dist/openapi/decorators/response.d.ts.map +1 -0
- package/dist/openapi/decorators/security.d.ts +9 -0
- package/dist/openapi/decorators/security.d.ts.map +1 -0
- package/dist/openapi/decorators/tags.d.ts +2 -0
- package/dist/openapi/decorators/tags.d.ts.map +1 -0
- package/dist/openapi/index.d.ts +10 -0
- package/dist/openapi/index.d.ts.map +1 -0
- package/dist/openapi/index.js +974 -0
- package/dist/openapi/index.js.map +31 -0
- package/dist/openapi/openapi.module.d.ts +46 -0
- package/dist/openapi/openapi.module.d.ts.map +1 -0
- package/dist/openapi/openapi.service.d.ts +55 -0
- package/dist/openapi/openapi.service.d.ts.map +1 -0
- package/dist/openapi/scalar.d.ts +16 -0
- package/dist/openapi/scalar.d.ts.map +1 -0
- package/dist/openapi/types.d.ts +266 -0
- package/dist/openapi/types.d.ts.map +1 -0
- package/dist/openapi/zod-to-json-schema.d.ts +34 -0
- package/dist/openapi/zod-to-json-schema.d.ts.map +1 -0
- package/dist/package.json +59 -0
- package/dist/queue/backends/bullmq.d.ts +41 -0
- package/dist/queue/backends/bullmq.d.ts.map +1 -0
- package/dist/queue/backends/cloudflare.d.ts +84 -0
- package/dist/queue/backends/cloudflare.d.ts.map +1 -0
- package/dist/queue/backends/index.d.ts +7 -0
- package/dist/queue/backends/index.d.ts.map +1 -0
- package/dist/queue/backends/memory.d.ts +24 -0
- package/dist/queue/backends/memory.d.ts.map +1 -0
- package/dist/queue/decorators/on-queue-ready.d.ts +43 -0
- package/dist/queue/decorators/on-queue-ready.d.ts.map +1 -0
- package/dist/queue/index.d.ts +57 -0
- package/dist/queue/index.d.ts.map +1 -0
- package/dist/queue/index.js +961 -0
- package/dist/queue/index.js.map +25 -0
- package/dist/queue/queue.module.d.ts +46 -0
- package/dist/queue/queue.module.d.ts.map +1 -0
- package/dist/queue/queue.service.d.ts +61 -0
- package/dist/queue/queue.service.d.ts.map +1 -0
- package/dist/queue/types.d.ts +204 -0
- package/dist/queue/types.d.ts.map +1 -0
- package/dist/redis/adapters/bun.d.ts +27 -0
- package/dist/redis/adapters/bun.d.ts.map +1 -0
- package/dist/redis/adapters/cloudflare.d.ts +51 -0
- package/dist/redis/adapters/cloudflare.d.ts.map +1 -0
- package/dist/redis/adapters/index.d.ts +29 -0
- package/dist/redis/adapters/index.d.ts.map +1 -0
- package/dist/redis/adapters/memory.d.ts +28 -0
- package/dist/redis/adapters/memory.d.ts.map +1 -0
- package/dist/redis/adapters/node.d.ts +36 -0
- package/dist/redis/adapters/node.d.ts.map +1 -0
- package/dist/redis/index.d.ts +33 -0
- package/dist/redis/index.d.ts.map +1 -0
- package/dist/redis/index.js +667 -0
- package/dist/redis/index.js.map +25 -0
- package/dist/redis/module.d.ts +32 -0
- package/dist/redis/module.d.ts.map +1 -0
- package/dist/redis/types.d.ts +146 -0
- package/dist/redis/types.d.ts.map +1 -0
- package/dist/schedule/backends/cloudflare.d.ts +55 -0
- package/dist/schedule/backends/cloudflare.d.ts.map +1 -0
- package/dist/schedule/backends/index.d.ts +3 -0
- package/dist/schedule/backends/index.d.ts.map +1 -0
- package/dist/schedule/backends/memory.d.ts +39 -0
- package/dist/schedule/backends/memory.d.ts.map +1 -0
- package/dist/schedule/cron-parser.d.ts +48 -0
- package/dist/schedule/cron-parser.d.ts.map +1 -0
- package/dist/schedule/decorators/cron.d.ts +71 -0
- package/dist/schedule/decorators/cron.d.ts.map +1 -0
- package/dist/schedule/index.d.ts +51 -0
- package/dist/schedule/index.d.ts.map +1 -0
- package/dist/schedule/index.js +1108 -0
- package/dist/schedule/index.js.map +25 -0
- package/dist/schedule/schedule.module.d.ts +44 -0
- package/dist/schedule/schedule.module.d.ts.map +1 -0
- package/dist/schedule/schedule.service.d.ts +51 -0
- package/dist/schedule/schedule.service.d.ts.map +1 -0
- package/dist/schedule/types.d.ts +150 -0
- package/dist/schedule/types.d.ts.map +1 -0
- package/dist/session/backends/cookie.d.ts +56 -0
- package/dist/session/backends/cookie.d.ts.map +1 -0
- package/dist/session/backends/drizzle.d.ts +65 -0
- package/dist/session/backends/drizzle.d.ts.map +1 -0
- package/dist/session/backends/index.d.ts +6 -0
- package/dist/session/backends/index.d.ts.map +1 -0
- package/dist/session/backends/memory.d.ts +32 -0
- package/dist/session/backends/memory.d.ts.map +1 -0
- package/dist/session/backends/redis.d.ts +53 -0
- package/dist/session/backends/redis.d.ts.map +1 -0
- package/dist/session/decorators/current-session.d.ts +56 -0
- package/dist/session/decorators/current-session.d.ts.map +1 -0
- package/dist/session/index.d.ts +42 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +1498 -0
- package/dist/session/index.js.map +28 -0
- package/dist/session/session-middleware.d.ts +29 -0
- package/dist/session/session-middleware.d.ts.map +1 -0
- package/dist/session/session.module.d.ts +35 -0
- package/dist/session/session.module.d.ts.map +1 -0
- package/dist/session/session.service.d.ts +49 -0
- package/dist/session/session.service.d.ts.map +1 -0
- package/dist/session/types.d.ts +201 -0
- package/dist/session/types.d.ts.map +1 -0
- package/dist/shield/guards/csrf.d.ts +33 -0
- package/dist/shield/guards/csrf.d.ts.map +1 -0
- package/dist/shield/guards/headers.d.ts +22 -0
- package/dist/shield/guards/headers.d.ts.map +1 -0
- package/dist/shield/guards/index.d.ts +6 -0
- package/dist/shield/guards/index.d.ts.map +1 -0
- package/dist/shield/index.d.ts +8 -0
- package/dist/shield/index.d.ts.map +1 -0
- package/dist/shield/index.js +728 -0
- package/dist/shield/index.js.map +25 -0
- package/dist/shield/shield.module.d.ts +25 -0
- package/dist/shield/shield.module.d.ts.map +1 -0
- package/dist/shield/shield.service.d.ts +21 -0
- package/dist/shield/shield.service.d.ts.map +1 -0
- package/dist/shield/types.d.ts +95 -0
- package/dist/shield/types.d.ts.map +1 -0
- package/dist/sse/index.d.ts +7 -0
- package/dist/sse/index.d.ts.map +1 -0
- package/dist/sse/index.js +214 -0
- package/dist/sse/index.js.map +13 -0
- package/dist/sse/sse-stream.d.ts +46 -0
- package/dist/sse/sse-stream.d.ts.map +1 -0
- package/dist/sse/sse.d.ts +24 -0
- package/dist/sse/sse.d.ts.map +1 -0
- package/dist/sse/types.d.ts +84 -0
- package/dist/sse/types.d.ts.map +1 -0
- package/dist/static/index.d.ts +41 -0
- package/dist/static/index.d.ts.map +1 -0
- package/dist/static/index.js +313 -0
- package/dist/static/index.js.map +13 -0
- package/dist/static/static.module.d.ts +41 -0
- package/dist/static/static.module.d.ts.map +1 -0
- package/dist/static/static.service.d.ts +38 -0
- package/dist/static/static.service.d.ts.map +1 -0
- package/dist/tracing/decorators/index.d.ts +2 -0
- package/dist/tracing/decorators/index.d.ts.map +1 -0
- package/dist/tracing/decorators/trace.d.ts +37 -0
- package/dist/tracing/decorators/trace.d.ts.map +1 -0
- package/dist/tracing/hono-instrumentation.d.ts +21 -0
- package/dist/tracing/hono-instrumentation.d.ts.map +1 -0
- package/dist/tracing/index.d.ts +29 -0
- package/dist/tracing/index.d.ts.map +1 -0
- package/dist/tracing/index.js +782 -0
- package/dist/tracing/index.js.map +24 -0
- package/dist/tracing/module.d.ts +45 -0
- package/dist/tracing/module.d.ts.map +1 -0
- package/dist/tracing/propagation.d.ts +53 -0
- package/dist/tracing/propagation.d.ts.map +1 -0
- package/dist/tracing/service.d.ts +95 -0
- package/dist/tracing/service.d.ts.map +1 -0
- package/dist/tracing/types.d.ts +90 -0
- package/dist/tracing/types.d.ts.map +1 -0
- package/dist/upload/decorators/index.d.ts +6 -0
- package/dist/upload/decorators/index.d.ts.map +1 -0
- package/dist/upload/decorators/upload.d.ts +16 -0
- package/dist/upload/decorators/upload.d.ts.map +1 -0
- package/dist/upload/decorators/uploaded-file.d.ts +10 -0
- package/dist/upload/decorators/uploaded-file.d.ts.map +1 -0
- package/dist/upload/index.d.ts +9 -0
- package/dist/upload/index.d.ts.map +1 -0
- package/dist/upload/index.js +553 -0
- package/dist/upload/index.js.map +25 -0
- package/dist/upload/types.d.ts +103 -0
- package/dist/upload/types.d.ts.map +1 -0
- package/dist/upload/upload.middleware.d.ts +15 -0
- package/dist/upload/upload.middleware.d.ts.map +1 -0
- package/dist/upload/upload.module.d.ts +33 -0
- package/dist/upload/upload.module.d.ts.map +1 -0
- package/dist/upload/upload.service.d.ts +29 -0
- package/dist/upload/upload.service.d.ts.map +1 -0
- package/dist/view/edge.d.ts +23 -0
- package/dist/view/edge.d.ts.map +1 -0
- package/dist/view/eta.d.ts +30 -0
- package/dist/view/eta.d.ts.map +1 -0
- package/dist/view/index.d.ts +34 -0
- package/dist/view/index.d.ts.map +1 -0
- package/dist/view/index.js +240 -0
- package/dist/view/index.js.map +14 -0
- package/dist/view/inertia/default-ssr.d.ts +15 -0
- package/dist/view/inertia/default-ssr.d.ts.map +1 -0
- package/dist/view/inertia/form-helper.d.ts +102 -0
- package/dist/view/inertia/form-helper.d.ts.map +1 -0
- package/dist/view/inertia/form-middleware.d.ts +53 -0
- package/dist/view/inertia/form-middleware.d.ts.map +1 -0
- package/dist/view/inertia/helpers.d.ts +149 -0
- package/dist/view/inertia/helpers.d.ts.map +1 -0
- package/dist/view/inertia/index.d.ts +18 -0
- package/dist/view/inertia/index.d.ts.map +1 -0
- package/dist/view/inertia/inertia-adapter.d.ts +93 -0
- package/dist/view/inertia/inertia-adapter.d.ts.map +1 -0
- package/dist/view/inertia/inertia-response.d.ts +51 -0
- package/dist/view/inertia/inertia-response.d.ts.map +1 -0
- package/dist/view/inertia/ssr/index.d.ts +13 -0
- package/dist/view/inertia/ssr/index.d.ts.map +1 -0
- package/dist/view/inertia/ssr/react-adapter.d.ts +33 -0
- package/dist/view/inertia/ssr/react-adapter.d.ts.map +1 -0
- package/dist/view/inertia/ssr/registry.d.ts +42 -0
- package/dist/view/inertia/ssr/registry.d.ts.map +1 -0
- package/dist/view/inertia/ssr/solid-adapter.d.ts +31 -0
- package/dist/view/inertia/ssr/solid-adapter.d.ts.map +1 -0
- package/dist/view/inertia/ssr/svelte-adapter.d.ts +31 -0
- package/dist/view/inertia/ssr/svelte-adapter.d.ts.map +1 -0
- package/dist/view/inertia/ssr/vue-adapter.d.ts +26 -0
- package/dist/view/inertia/ssr/vue-adapter.d.ts.map +1 -0
- package/dist/view/inertia/types.d.ts +131 -0
- package/dist/view/inertia/types.d.ts.map +1 -0
- package/dist/view/rendu.d.ts +11 -0
- package/dist/view/rendu.d.ts.map +1 -0
- package/dist/view/types.d.ts +52 -0
- package/dist/view/types.d.ts.map +1 -0
- package/dist/view/view-engine.d.ts +28 -0
- package/dist/view/view-engine.d.ts.map +1 -0
- package/dist/ws/client.d.ts +42 -0
- package/dist/ws/client.d.ts.map +1 -0
- package/dist/ws/decorators.d.ts +44 -0
- package/dist/ws/decorators.d.ts.map +1 -0
- package/dist/ws/index.d.ts +57 -0
- package/dist/ws/index.d.ts.map +1 -0
- package/dist/ws/index.js +796 -0
- package/dist/ws/index.js.map +26 -0
- package/dist/ws/module.d.ts +48 -0
- package/dist/ws/module.d.ts.map +1 -0
- package/dist/ws/runtime/bun.d.ts +41 -0
- package/dist/ws/runtime/bun.d.ts.map +1 -0
- package/dist/ws/runtime/index.d.ts +14 -0
- package/dist/ws/runtime/index.d.ts.map +1 -0
- package/dist/ws/runtime/node.d.ts +46 -0
- package/dist/ws/runtime/node.d.ts.map +1 -0
- package/dist/ws/runtime/types.d.ts +18 -0
- package/dist/ws/runtime/types.d.ts.map +1 -0
- package/dist/ws/service.d.ts +65 -0
- package/dist/ws/service.d.ts.map +1 -0
- package/dist/ws/types.d.ts +77 -0
- package/dist/ws/types.d.ts.map +1 -0
- package/package.json +262 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/core/constants.ts", "../src/core/decorators/controller.ts", "../src/core/decorators/http-methods.ts", "../src/core/decorators/params.ts", "../src/core/decorators/validate.ts", "../src/openapi/scalar.ts", "../src/openapi/types.ts", "../src/openapi/openapi.service.ts", "../src/core/decorators/module.ts", "../src/core/decorators/index.ts", "../src/core/decorators/injectable.ts", "../src/core/decorators/repository.ts", "../src/core/decorators/metadata.ts", "../src/openapi/zod-to-json-schema.ts", "../src/openapi/openapi.module.ts", "../src/openapi/decorators/tags.ts", "../src/openapi/decorators/operation.ts", "../src/openapi/decorators/response.ts", "../src/openapi/decorators/param.ts", "../src/openapi/decorators/body.ts", "../src/openapi/decorators/property.ts", "../src/openapi/decorators/security.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/**\n * Metadata keys used by reflect-metadata for storing decorator data.\n *\n * These constants are the contract between decorators and the framework\n * core (DI container, router, validator).\n */\nexport const METADATA_KEY = {\n\t/** Marks a class as a Nest-style controller, stores route prefix. */\n\tCONTROLLER: \"nexus:controller\",\n\n\t/** Marks a class as an injectable provider. */\n\tINJECTABLE: \"nexus:injectable\",\n\n\t/** Marks a class as a repository. */\n\tREPOSITORY: \"nexus:repository\",\n\n\t/** Marks a class as a module. Stores module options. */\n\tMODULE: \"nexus:module\",\n\n\t/** HTTP method routes registered on a controller (Get/Post/...). */\n\tROUTES: \"nexus:routes\",\n\n\t/** Method parameter type metadata (body/query/param/headers/ctx). */\n\tPARAMS: \"nexus:params\",\n\n\t/** Validation schema per method (Zod schema or class). */\n\tVALIDATE: \"nexus:validate\",\n\n\t/** Class-level design:paramtypes (built-in). */\n\tPARAMTYPES: \"design:paramtypes\",\n\n\t/** Class-level design:type (built-in). */\n\tTYPE: \"design:type\",\n\n\t/** Class-level design:returntype (built-in). */\n\tRETURNTYPE: \"design:returntype\",\n\n\t/** Provider token to inject for a parameter (for custom tokens). */\n\tINJECT: \"nexus:inject\",\n} as const;\n\nexport type MetadataKey = (typeof METADATA_KEY)[keyof typeof METADATA_KEY];\n\n/** Available parameter decorator locations. */\nexport const PARAM_TYPES = {\n\tREQUEST: 0,\n\tRESPONSE: 1,\n\tNEXT: 2,\n\tBODY: 3,\n\tQUERY: 4,\n\tPARAM: 5,\n\tHEADERS: 6,\n\tCTX: 7,\n\tUSER: 8,\n} as const;\n\nexport type ParamType = (typeof PARAM_TYPES)[keyof typeof PARAM_TYPES];\n\n/** HTTP methods supported by the router. */\nexport const HTTP_METHODS = [\n\t\"GET\",\n\t\"POST\",\n\t\"PUT\",\n\t\"DELETE\",\n\t\"PATCH\",\n\t\"OPTIONS\",\n\t\"HEAD\",\n] as const;\nexport type HttpMethod = (typeof HTTP_METHODS)[number];\n",
|
|
6
|
+
"/**\n * @Controller decorator.\n *\n * Marks a class as a controller and registers a route prefix.\n * Routes inside the controller class are decorated with @Get/@Post/etc.\n *\n * @example\n * ```ts\n * @Controller('/users')\n * class UserController {\n * @Get('/')\n * list() { ... }\n * }\n * ```\n */\nimport \"reflect-metadata\";\nimport { METADATA_KEY } from \"../constants.js\";\nimport type { ControllerMetadata } from \"../di/tokens.js\";\n\nexport function Controller(prefix: string = \"/\"): ClassDecorator {\n\treturn (target: object) => {\n\t\tconst normalized = normalizePrefix(prefix);\n\t\tconst meta: ControllerMetadata = { prefix: normalized };\n\t\tReflect.defineMetadata(METADATA_KEY.CONTROLLER, meta, target);\n\t};\n}\n\nexport function getControllerMetadata(target: any): ControllerMetadata {\n\treturn (\n\t\tReflect.getMetadata(METADATA_KEY.CONTROLLER, target) ?? { prefix: \"/\" }\n\t);\n}\n\nexport function isController(target: any): boolean {\n\treturn Reflect.hasMetadata(METADATA_KEY.CONTROLLER, target);\n}\n\n/**\n * Normalize a prefix so we can safely concatenate it with handler paths.\n * - Empty string becomes '/'.\n * - Trailing slashes are trimmed (we re-add them on the join).\n * - No leading slash is added; the router always joins with `/`.\n */\nfunction normalizePrefix(prefix: string): string {\n\tif (!prefix) return \"\";\n\tif (prefix !== \"/\" && prefix.endsWith(\"/\")) {\n\t\treturn prefix.slice(0, -1);\n\t}\n\treturn prefix;\n}\n",
|
|
7
|
+
"/**\n * HTTP method decorators.\n *\n * `@Get`, `@Post`, `@Put`, `@Delete`, `@Patch`, `@Options`, `@Head` mark a\n * controller method as a route handler. The path argument is appended to\n * the controller's prefix.\n *\n * @example\n * ```ts\n * @Controller('/users')\n * class UserController {\n * @Get('/')\n * list() {}\n *\n * @Post('/')\n * create(@Body() body: CreateUserDto) {}\n * }\n * ```\n */\nimport \"reflect-metadata\";\nimport { HTTP_METHODS, METADATA_KEY, type HttpMethod } from \"../constants.js\";\nimport type { RouteMetadata } from \"../di/tokens.js\";\n\nfunction defineRoute(method: HttpMethod, path: string): MethodDecorator {\n\treturn (\n\t\ttarget: object,\n\t\tpropertyKey: string | symbol,\n\t\tdescriptor: PropertyDescriptor,\n\t) => {\n\t\tconst routes: RouteMetadata[] =\n\t\t\tReflect.getMetadata(METADATA_KEY.ROUTES, target.constructor) ?? [];\n\n\t\troutes.push({\n\t\t\tmethod,\n\t\t\tpath: normalizePath(path),\n\t\t\tpropertyKey,\n\t\t\thandler: descriptor.value,\n\t\t});\n\n\t\tReflect.defineMetadata(METADATA_KEY.ROUTES, routes, target.constructor);\n\t};\n}\n\nfunction normalizePath(path: string): string {\n\tif (!path || path === \"/\") return \"/\";\n\treturn path.startsWith(\"/\") ? path : `/${path}`;\n}\n\nexport const Get = (path: string = \"/\") => defineRoute(\"GET\", path);\nexport const Post = (path: string = \"/\") => defineRoute(\"POST\", path);\nexport const Put = (path: string = \"/\") => defineRoute(\"PUT\", path);\nexport const Delete = (path: string = \"/\") => defineRoute(\"DELETE\", path);\nexport const Patch = (path: string = \"/\") => defineRoute(\"PATCH\", path);\nexport const Options = (path: string = \"/\") => defineRoute(\"OPTIONS\", path);\nexport const Head = (path: string = \"/\") => defineRoute(\"HEAD\", path);\n\nexport function getRoutes(target: any): RouteMetadata[] {\n\treturn Reflect.getMetadata(METADATA_KEY.ROUTES, target) ?? [];\n}\n\nexport { HTTP_METHODS };\nexport type { RouteMetadata };\n",
|
|
8
|
+
"/**\n * Parameter decorators.\n *\n * These mark a controller method argument as a source of request data:\n * - `@Req()` → Hono context\n * - `@Res()` → Response helper\n * - `@Next()` → next() callback (for middleware-style handlers)\n * - `@Body()` → request body (parsed)\n * - `@Query('key')` → a single query param, or full query object\n * - `@Param('key')` → a single path param, or full params object\n * - `@Headers('k')` → a single header, or full headers object\n * - `@Ctx()` → Hono context (alias for @Req)\n * - `@User()` → authenticated user (resolved via auth provider)\n *\n * The metadata is read by the router at mount time to build the\n * handler invocation list.\n */\nimport \"reflect-metadata\";\nimport { METADATA_KEY, PARAM_TYPES } from \"../constants.js\";\nimport type { ParamMetadata } from \"../di/tokens.js\";\n\nexport function createParamDecorator(\n\ttype: number,\n\tdata?: string | object,\n): ParameterDecorator {\n\treturn (\n\t\ttarget: object,\n\t\tpropertyKey: string | symbol | undefined,\n\t\tparameterIndex: number,\n\t) => {\n\t\t// Method parameter: target is the prototype, propertyKey is the method name.\n\t\t// Constructor parameter: target is the class, propertyKey is undefined.\n\t\tif (propertyKey !== undefined) {\n\t\t\tconst params: ParamMetadata[] =\n\t\t\t\tReflect.getMetadata(METADATA_KEY.PARAMS, target, propertyKey) ?? [];\n\t\t\tparams.push({\n\t\t\t\tindex: parameterIndex,\n\t\t\t\ttype,\n\t\t\t\tname: typeof data === \"string\" ? data : undefined,\n\t\t\t\tdata: typeof data === \"object\" ? data : undefined,\n\t\t\t});\n\t\t\tReflect.defineMetadata(METADATA_KEY.PARAMS, params, target, propertyKey);\n\t\t} else {\n\t\t\tconst params: ParamMetadata[] =\n\t\t\t\tReflect.getMetadata(METADATA_KEY.PARAMS, target) ?? [];\n\t\t\tparams.push({\n\t\t\t\tindex: parameterIndex,\n\t\t\t\ttype,\n\t\t\t\tname: typeof data === \"string\" ? data : undefined,\n\t\t\t\tdata: typeof data === \"object\" ? data : undefined,\n\t\t\t});\n\t\t\tReflect.defineMetadata(METADATA_KEY.PARAMS, params, target);\n\t\t}\n\t};\n}\n\nexport const Req = () => createParamDecorator(PARAM_TYPES.REQUEST);\nexport const Res = () => createParamDecorator(PARAM_TYPES.RESPONSE);\nexport const Next = () => createParamDecorator(PARAM_TYPES.NEXT);\nexport const Body = (key?: string) =>\n\tcreateParamDecorator(PARAM_TYPES.BODY, key);\nexport const Query = (key?: string) =>\n\tcreateParamDecorator(PARAM_TYPES.QUERY, key);\nexport const Param = (key?: string) =>\n\tcreateParamDecorator(PARAM_TYPES.PARAM, key);\nexport const Headers = (key?: string) =>\n\tcreateParamDecorator(PARAM_TYPES.HEADERS, key);\nexport const Ctx = () => createParamDecorator(PARAM_TYPES.CTX);\nexport const User = () => createParamDecorator(PARAM_TYPES.USER);\n\nexport function getParamMetadata(\n\ttarget: any,\n\tpropertyKey: string | symbol,\n): ParamMetadata[] {\n\treturn Reflect.getMetadata(METADATA_KEY.PARAMS, target, propertyKey) ?? [];\n}\n\nexport { PARAM_TYPES };\n",
|
|
9
|
+
"/**\n * @Validate decorator.\n *\n * Attaches Zod schemas (or class validators) to a route handler. Each\n * schema is run against the corresponding request part before the handler\n * executes; failed validation throws or returns a 400 response.\n *\n * @example\n * ```ts\n * const UserSchema = z.object({ name: z.string(), email: z.email() });\n *\n * @Post('/')\n * @Validate({ body: UserSchema })\n * create(@Body() body: z.infer<typeof UserSchema>) { ... }\n * ```\n */\nimport \"reflect-metadata\";\nimport { METADATA_KEY } from \"../constants.js\";\nimport type { ValidationMetadata } from \"../di/tokens.js\";\n\nexport function Validate(options: ValidationMetadata): MethodDecorator {\n\treturn (\n\t\ttarget: object,\n\t\tpropertyKey: string | symbol,\n\t\tdescriptor: PropertyDescriptor,\n\t) => {\n\t\tReflect.defineMetadata(\n\t\t\tMETADATA_KEY.VALIDATE,\n\t\t\toptions,\n\t\t\ttarget.constructor,\n\t\t\tpropertyKey,\n\t\t);\n\t};\n}\n\nexport function getValidationMetadata(\n\ttarget: any,\n\tpropertyKey: string | symbol,\n): ValidationMetadata | undefined {\n\treturn Reflect.getMetadata(METADATA_KEY.VALIDATE, target, propertyKey);\n}\n",
|
|
10
|
+
"/**\n * Scalar UI HTML — a single self-contained page that loads Scalar\n * from the jsDelivr CDN.\n *\n * The page mounts Scalar as a custom-element via `<script\n * id=\"api-reference\" data-url=\"...\">` and waits for the CDN script\n * to upgrade it.\n *\n * No assets are bundled with the framework. No build step required.\n */\n\nexport function scalarHtml(opts: { title: string; specUrl: string; theme?: \"default\" | \"dark\" | \"purple\" | \"alternate\" | \"moon\" | \"solarized\" | \"bluePlanet\" | \"saturn\" | \"kepler\" | \"mars\" | \"deepSpace\" | \"laserwave\" | \"none\" }): string {\n\tconst title = escapeHtml(opts.title);\n\tconst theme = opts.theme ?? \"default\";\n\treturn `<!doctype html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <title>${title} — API Reference</title>\n <meta name=\"description\" content=\"API reference for ${title}, generated from OpenAPI.\" />\n <style>\n :root { color-scheme: light dark; }\n body { margin: 0; font-family: ui-sans-serif, system-ui, sans-serif; }\n </style>\n</head>\n<body>\n <script\n id=\"api-reference\"\n type=\"application/json\"\n data-url=\"${escapeHtml(opts.specUrl)}\"\n data-configuration='${escapeJsonForAttr(JSON.stringify({ theme, hideClientButton: true }))}'\n ></script>\n <script src=\"https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.25.0\"></script>\n</body>\n</html>`;\n}\n\nfunction escapeHtml(s: string): string {\n\treturn s\n\t\t.replace(/&/g, \"&\")\n\t\t.replace(/</g, \"<\")\n\t\t.replace(/>/g, \">\")\n\t\t.replace(/\"/g, \""\")\n\t\t.replace(/'/g, \"'\");\n}\n\n/**\n * Encode a string for use inside an HTML attribute value. We avoid\n * `"` so the value remains valid JSON for Scalar's parser.\n */\nfunction escapeJsonForAttr(s: string): string {\n\treturn s.replace(/'/g, \"'\").replace(/</g, \"<\");\n}",
|
|
11
|
+
"/**\n * `nexusjs/openapi` — OpenAPI 3.1 + Scalar UI.\n *\n * @Module({\n * imports: [\n * OpenAPIModule.forRoot({\n * info: { title: 'My API', version: '1.0.0' },\n * servers: [{ url: 'http://localhost:3000' }],\n * }),\n * ],\n * })\n *\n * @Controller('/users')\n * @ApiTags('Users')\n * class UserController {\n * @Get('/')\n * @ApiOperation({ summary: 'List users' })\n * @ApiResponse(200, { description: 'OK', schema: UserSchema })\n * list() { ... }\n * }\n *\n * // -> GET /openapi.json (the spec)\n * // -> GET /docs (Scalar UI)\n */\n\nimport \"reflect-metadata\";\n\n// ---------------------------------------------------------------------------\n// OpenAPI spec types (subset of OpenAPI 3.1 — enough for 95% of real APIs)\n// ---------------------------------------------------------------------------\n\nexport interface OpenAPIConfig {\n\t/** Top-level info block. */\n\tinfo: OpenAPIInfo;\n\t/** Server URLs. Default: [{ url: '/' }]. */\n\tservers?: OpenAPIServer[];\n\t/** Tags grouped at the top of the spec. */\n\ttags?: OpenAPITag[];\n\t/** Path under which the JSON spec is served. Default: '/openapi.json'. */\n\tspecPath?: string;\n\t/** Path under which the Scalar UI is served. Default: '/docs'. */\n\tpath?: string;\n\t/** External docs link. */\n\texternalDocs?: { url: string; description?: string };\n}\n\nexport interface OpenAPIInfo {\n\ttitle: string;\n\tversion: string;\n\tdescription?: string;\n\ttermsOfService?: string;\n\tcontact?: { name?: string; url?: string; email?: string };\n\tlicense?: { name: string; url?: string };\n}\n\nexport interface OpenAPIServer {\n\turl: string;\n\tdescription?: string;\n\tvariables?: Record<string, { default: string; enum?: string[]; description?: string }>;\n}\n\nexport interface OpenAPITag {\n\tname: string;\n\tdescription?: string;\n\texternalDocs?: { url: string; description?: string };\n}\n\n/** OpenAPI Path Item. */\nexport interface OpenAPIPath {\n\t[method: string]: OpenAPIOperation | undefined;\n}\n\n/** OpenAPI Operation. */\nexport interface OpenAPIOperation {\n\ttags?: string[];\n\tsummary?: string;\n\tdescription?: string;\n\toperationId?: string;\n\tparameters?: OpenAPIParameter[];\n\trequestBody?: OpenAPIRequestBody;\n\tresponses: Record<string, OpenAPIResponse>;\n\tdeprecated?: boolean;\n\tsecurity?: OpenAPISecurity[];\n}\n\n/** OpenAPI Parameter (path, query, header, cookie). */\nexport interface OpenAPIParameter {\n\tname: string;\n\tin: \"path\" | \"query\" | \"header\" | \"cookie\";\n\tdescription?: string;\n\trequired?: boolean;\n\tdeprecated?: boolean;\n\tschema: JSONSchema;\n\texample?: unknown;\n\texamples?: Record<string, { summary?: string; value: unknown }>;\n}\n\n/** OpenAPI Request Body. */\nexport interface OpenAPIRequestBody {\n\tdescription?: string;\n\tcontent: Record<string, OpenAPIMediaType>;\n\trequired?: boolean;\n}\n\nexport interface OpenAPIMediaType {\n\tschema: JSONSchema;\n\texample?: unknown;\n\texamples?: Record<string, { summary?: string; value: unknown }>;\n\tencoding?: Record<string, OpenAPIEncoding>;\n}\n\nexport interface OpenAPIEncoding {\n\tcontentType?: string;\n\theaders?: Record<string, OpenAPIParameter>;\n\tstyle?: string;\n\texplode?: boolean;\n\tallowReserved?: boolean;\n}\n\n/** OpenAPI Response. */\nexport interface OpenAPIResponse {\n\tdescription: string;\n\theaders?: Record<string, OpenAPIParameter>;\n\tcontent?: Record<string, OpenAPIMediaType>;\n\tlinks?: Record<string, OpenAPILink>;\n}\n\nexport interface OpenAPILink {\n\toperationRef?: string;\n\toperationId?: string;\n\tparameters?: Record<string, unknown>;\n\tdescription?: string;\n\tserver?: OpenAPIServer;\n}\n\nexport interface OpenAPISecurity {\n\t[name: string]: string[];\n}\n\n/** OpenAPI Component (schemas, parameters, responses, ...). */\nexport interface OpenAPIComponents {\n\tschemas?: Record<string, JSONSchema>;\n\tparameters?: Record<string, OpenAPIParameter>;\n\tresponses?: Record<string, OpenAPIResponse>;\n\trequestBodies?: Record<string, OpenAPIRequestBody>;\n\theaders?: Record<string, OpenAPIParameter>;\n\tsecuritySchemes?: Record<string, OpenAPISecurityScheme>;\n\tlinks?: Record<string, OpenAPILink>;\n}\n\nexport interface OpenAPISecurityScheme {\n\ttype: \"apiKey\" | \"http\" | \"oauth2\" | \"openIdConnect\" | \"mutualTLS\";\n\tdescription?: string;\n\tname?: string;\n\tin?: \"query\" | \"header\" | \"cookie\";\n\tscheme?: string;\n\tbearerFormat?: string;\n\tflows?: unknown;\n\topenIdConnectUrl?: string;\n}\n\nexport interface OpenAPIDocument {\n\topenapi: \"3.1.0\";\n\tinfo: OpenAPIInfo;\n\tservers?: OpenAPIServer[];\n\tpaths: Record<string, OpenAPIPath>;\n\tcomponents?: OpenAPIComponents;\n\ttags?: OpenAPITag[];\n\texternalDocs?: { url: string; description?: string };\n\tsecurity?: OpenAPISecurity[];\n\twebhooks?: Record<string, OpenAPIPath | OpenAPIOperation>;\n}\n\n// ---------------------------------------------------------------------------\n// JSON Schema (subset)\n// ---------------------------------------------------------------------------\n\nexport interface JSONSchema {\n\t$ref?: string;\n\ttype?:\n\t\t| \"string\"\n\t\t| \"number\"\n\t\t| \"integer\"\n\t\t| \"boolean\"\n\t\t| \"object\"\n\t\t| \"array\"\n\t\t| \"null\"\n\t\t| (string & {});\n\tformat?: string;\n\ttitle?: string;\n\tdescription?: string;\n\tdefault?: unknown;\n\texample?: unknown;\n\tenum?: unknown[];\n\tconst?: unknown;\n\tproperties?: Record<string, JSONSchema>;\n\trequired?: string[];\n\tadditionalProperties?: boolean | JSONSchema;\n\titems?: JSONSchema;\n\tprefixItems?: JSONSchema[];\n\tminItems?: number;\n\tmaxItems?: number;\n\tuniqueItems?: boolean;\n\tminimum?: number;\n\tmaximum?: number;\n\tminLength?: number;\n\tmaxLength?: number;\n\tpattern?: string;\n\tnullable?: boolean;\n\toneOf?: JSONSchema[];\n\tanyOf?: JSONSchema[];\n\tallOf?: JSONSchema[];\n\tnot?: JSONSchema;\n\t$defs?: Record<string, JSONSchema>;\n\t$schema?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Decorator payload types\n// ---------------------------------------------------------------------------\n\nexport interface ApiOperationOptions {\n\tsummary?: string;\n\tdescription?: string;\n\toperationId?: string;\n\tdeprecated?: boolean;\n\ttags?: string[];\n}\n\nexport interface ApiResponseOptions {\n\tdescription: string;\n\tschema?: unknown;\n\theaders?: Record<string, OpenAPIParameter>;\n\texample?: unknown;\n\texamples?: Record<string, { summary?: string; value: unknown }>;\n}\n\nexport interface ApiParamOptions {\n\tname: string;\n\tdescription?: string;\n\trequired?: boolean;\n\tschema?: unknown;\n\texample?: unknown;\n}\n\nexport interface ApiQueryOptions extends Omit<ApiParamOptions, \"name\"> {\n\tname: string;\n}\n\nexport interface ApiBodyOptions {\n\tdescription?: string;\n\trequired?: boolean;\n\tschema?: unknown;\n\texample?: unknown;\n}\n\nexport interface ApiPropertyOptions {\n\tdescription?: string;\n\trequired?: boolean;\n\texample?: unknown;\n\tdeprecated?: boolean;\n\tformat?: string;\n\tschema?: unknown;\n}\n\nexport interface ApiSecurityOptions {\n\t[name: string]: string[];\n}\n\n// ---------------------------------------------------------------------------\n// Reflect metadata keys\n// ---------------------------------------------------------------------------\n\nexport const OPENAPI_META = {\n\tTAGS: \"nexus:openapi:tags\",\n\tOPERATION: \"nexus:openapi:operation\",\n\tRESPONSES: \"nexus:openapi:responses\",\n\tPARAMS: \"nexus:openapi:params\",\n\tQUERIES: \"nexus:openapi:queries\",\n\tBODY: \"nexus:openapi:body\",\n\tPROPERTIES: \"nexus:openapi:properties\",\n\tSECURITY: \"nexus:openapi:security\",\n\tEXCLUDE: \"nexus:openapi:exclude\",\n\tPRODUCES: \"nexus:openapi:produces\",\n\tCONSUMES: \"nexus:openapi:consumes\",\n} as const;\n",
|
|
12
|
+
"/**\n * `OpenAPIService` — walks the framework's route table, reads\n * `@ApiTags` / `@ApiOperation` / `@ApiResponse` / `@ApiBody` /\n * `@ApiParam` / `@ApiQuery` / `@Validate` metadata, and produces an\n * OpenAPI 3.1 document.\n *\n * The document is rebuilt on demand (cheap: in-memory walk) and\n * exposed via `getSpec()`. The framework's router already exposes a\n * `getRoutes()` method that returns the registered route list, so\n * the spec is always in sync with the actual API.\n */\nimport \"reflect-metadata\";\nimport { Inject, Injectable } from \"../core/decorators/index.js\";\nimport type {\n\tApiOperationOptions,\n\tApiParamOptions,\n\tApiPropertyOptions,\n\tApiResponseOptions,\n\tJSONSchema,\n\tOPENAPI_META as _OM,\n\tOpenAPIConfig,\n\tOpenAPIDocument,\n\tOpenAPIMediaType,\n\tOpenAPIOperation,\n\tOpenAPIParameter,\n\tOpenAPIRequestBody,\n\tOpenAPIResponse,\n} from \"./types.js\";\nimport { OPENAPI_META } from \"./types.js\";\nimport { zodToJsonSchema } from \"./zod-to-json-schema.js\";\n\n@Injectable()\nexport class OpenAPIService {\n\t/** DI token. */\n\tstatic readonly TOKEN = Symbol.for(\"nexus:OpenAPIService\");\n\n\t#config: OpenAPIConfig;\n\t#components: { schemas: Map<string, JSONSchema> } = { schemas: new Map() };\n\t#routes: { method: string; path: string; target: any; propertyKey: string | symbol; validation?: any }[] = [];\n\n\tconstructor(@Inject(\"OPENAPI_CONFIG\") config: OpenAPIConfig) {\n\t\tthis.#config = config;\n\t}\n\n\t/**\n\t * Inject the route list. The framework's router calls this on boot.\n\t * Each entry is the data needed to emit one OpenAPI operation.\n\t */\n\tsetRoutes(\n\t\troutes: {\n\t\t\tmethod: string;\n\t\t\tpath: string;\n\t\t\ttarget: any;\n\t\t\tpropertyKey: string | symbol;\n\t\t\tvalidation?: { body?: unknown; query?: unknown; params?: unknown; headers?: unknown };\n\t\t}[],\n\t): void {\n\t\tthis.#routes = routes;\n\t}\n\n\t/** Register a named component schema (e.g. for re-use). */\n\tregisterSchema(name: string, schema: JSONSchema): void {\n\t\tthis.#components.schemas.set(name, schema);\n\t}\n\n\t/** Build the OpenAPI 3.1 document. */\n\tgetSpec(): OpenAPIDocument {\n\t\tconst paths: Record<string, Record<string, OpenAPIOperation>> = {};\n\t\tfor (const route of this.#routes) {\n\t\t\tif (Reflect.getMetadata(OPENAPI_META.EXCLUDE, route.target.constructor, route.propertyKey)) continue;\n\t\t\tconst op = this.buildOperation(route);\n\t\t\tconst normalized = this.normalizePath(route.path);\n\t\t\tconst method = route.method.toLowerCase();\n\t\t\tif (!paths[normalized]) paths[normalized] = {};\n\t\t\tpaths[normalized][method] = op;\n\t\t}\n\n\t\tconst doc: OpenAPIDocument = {\n\t\t\topenapi: \"3.1.0\",\n\t\t\tinfo: this.#config.info,\n\t\t\tpaths,\n\t\t};\n\t\tif (this.#config.servers?.length) doc.servers = this.#config.servers;\n\t\tif (this.#config.tags?.length) doc.tags = this.#config.tags;\n\t\tif (this.#config.externalDocs) doc.externalDocs = this.#config.externalDocs;\n\t\tif (this.#components.schemas.size > 0) {\n\t\t\tdoc.components = {\n\t\t\t\tschemas: Object.fromEntries(this.#components.schemas),\n\t\t\t};\n\t\t}\n\t\treturn doc;\n\t}\n\n\t/**\n\t * Build one operation from a route.\n\t */\n\tprivate buildOperation(route: {\n\t\tmethod: string;\n\t\tpath: string;\n\t\ttarget: any;\n\t\tpropertyKey: string | symbol;\n\t\tvalidation?: { body?: unknown; query?: unknown; params?: unknown; headers?: unknown };\n\t}): OpenAPIOperation {\n\t\tconst ctor = route.target.constructor ?? route.target;\n\t\tconst propKey = route.propertyKey;\n\n\t\t// 1. Tags from class + operation\n\t\tconst classTags: string[] = Reflect.getMetadata(OPENAPI_META.TAGS, ctor) ?? [];\n\t\tconst opMeta: ApiOperationOptions | undefined = Reflect.getMetadata(\n\t\t\tOPENAPI_META.OPERATION,\n\t\t\tctor,\n\t\t\tpropKey,\n\t\t);\n\t\tconst opTags: string[] = opMeta?.tags ?? [];\n\t\tconst tags = [...new Set([...classTags, ...opTags])];\n\n\t\t// 2. Parameters (path / query / headers)\n\t\tconst params: OpenAPIParameter[] = [];\n\t\t// Auto-derive path params from the route pattern.\n\t\tconst pathParams = this.extractPathParams(route.path);\n\t\tfor (const name of pathParams) {\n\t\t\tconst override = (\n\t\t\t\t(Reflect.getMetadata(OPENAPI_META.PARAMS, ctor, propKey) ?? []) as ApiParamOptions[]\n\t\t\t).find((p) => p.name === name);\n\t\t\tparams.push({\n\t\t\t\tname,\n\t\t\t\tin: \"path\",\n\t\t\t\trequired: true,\n\t\t\t\tdescription: override?.description,\n\t\t\t\tschema: override?.schema ? this.toSchema(override.schema) : { type: \"string\" },\n\t\t\t});\n\t\t}\n\t\t// Auto-derive query params from `@Validate({ query })`.\n\t\tif (route.validation?.query) {\n\t\t\tthis.appendZodParams(\n\t\t\t\tctor,\n\t\t\t\tpropKey,\n\t\t\t\t\"query\",\n\t\t\t\troute.validation.query,\n\t\t\t\tparams,\n\t\t\t\tfalse,\n\t\t\t);\n\t\t}\n\t\t// Auto-derive headers from `@Validate({ headers })`.\n\t\tif (route.validation?.headers) {\n\t\t\tthis.appendZodParams(\n\t\t\t\tctor,\n\t\t\t\tpropKey,\n\t\t\t\t\"header\",\n\t\t\t\troute.validation.headers,\n\t\t\t\tparams,\n\t\t\t\tfalse,\n\t\t\t);\n\t\t}\n\t\t// Explicit `@ApiQuery` decorators override / supplement.\n\t\tconst explicitQueries: ApiParamOptions[] =\n\t\t\tReflect.getMetadata(OPENAPI_META.QUERIES, ctor, propKey) ?? [];\n\t\tfor (const q of explicitQueries) {\n\t\t\t// Replace any auto-derived entry for the same name.\n\t\t\tconst idx = params.findIndex(\n\t\t\t\t(p) => p.in === \"query\" && p.name === q.name,\n\t\t\t);\n\t\t\tconst param: OpenAPIParameter = {\n\t\t\t\tname: q.name,\n\t\t\t\tin: \"query\",\n\t\t\t\trequired: q.required ?? false,\n\t\t\t\tdescription: q.description,\n\t\t\t\tschema: q.schema ? this.toSchema(q.schema) : { type: \"string\" },\n\t\t\t};\n\t\t\tif (idx >= 0) params[idx] = param;\n\t\t\telse params.push(param);\n\t\t}\n\t\t// Explicit `@ApiParam` decorators override path params.\n\t\tconst explicitParams: ApiParamOptions[] =\n\t\t\tReflect.getMetadata(OPENAPI_META.PARAMS, ctor, propKey) ?? [];\n\t\tfor (const p of explicitParams) {\n\t\t\tconst idx = params.findIndex(\n\t\t\t\t(x) => x.in === \"path\" && x.name === p.name,\n\t\t\t);\n\t\t\tconst param: OpenAPIParameter = {\n\t\t\t\tname: p.name,\n\t\t\t\tin: \"path\",\n\t\t\t\trequired: p.required ?? true,\n\t\t\t\tdescription: p.description,\n\t\t\t\tschema: p.schema ? this.toSchema(p.schema) : { type: \"string\" },\n\t\t\t};\n\t\t\tif (idx >= 0) params[idx] = param;\n\t\t\telse params.push(param);\n\t\t}\n\n\t\t// 3. Request body\n\t\tlet requestBody: OpenAPIRequestBody | undefined;\n\t\tconst bodyMeta = Reflect.getMetadata(OPENAPI_META.BODY, ctor, propKey);\n\t\tif (bodyMeta?.schema || route.validation?.body) {\n\t\t\tconst schema = bodyMeta?.schema ?? route.validation?.body;\n\t\t\tconst mediaType: OpenAPIMediaType = { schema: this.toSchema(schema) };\n\t\t\tif (bodyMeta?.example !== undefined) mediaType.example = bodyMeta.example;\n\t\t\trequestBody = {\n\t\t\t\tdescription: bodyMeta?.description ?? \"Request body\",\n\t\t\t\tcontent: { \"application/json\": mediaType },\n\t\t\t\trequired: bodyMeta?.required ?? true,\n\t\t\t};\n\t\t}\n\n\t\t// 4. Responses\n\t\tconst responses: Record<string, OpenAPIResponse> = {};\n\t\tconst responseMetas: Array<[string, ApiResponseOptions]> =\n\t\t\tReflect.getMetadata(OPENAPI_META.RESPONSES, ctor, propKey) ?? [];\n\t\tfor (const [status, opt] of responseMetas) {\n\t\t\tconst r: OpenAPIResponse = { description: opt.description };\n\t\t\tif (opt.schema) {\n\t\t\t\tr.content = {\n\t\t\t\t\t\"application/json\": {\n\t\t\t\t\t\tschema: this.toSchema(opt.schema),\n\t\t\t\t\t\t...(opt.example !== undefined ? { example: opt.example } : {}),\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t\tresponses[status] = r;\n\t\t}\n\t\t// Default 200 OK if no responses declared.\n\t\tif (Object.keys(responses).length === 0) {\n\t\t\tresponses[\"200\"] = { description: \"Successful response\" };\n\t\t}\n\n\t\t// 5. Compose\n\t\tconst op: OpenAPIOperation = {\n\t\t\tresponses,\n\t\t};\n\t\tif (tags.length > 0) op.tags = tags;\n\t\tif (opMeta?.summary) op.summary = opMeta.summary;\n\t\tif (opMeta?.description) op.description = opMeta.description;\n\t\tif (opMeta?.operationId) op.operationId = opMeta.operationId;\n\t\tif (opMeta?.deprecated) op.deprecated = true;\n\t\tif (params.length > 0) op.parameters = params;\n\t\tif (requestBody) op.requestBody = requestBody;\n\t\treturn op;\n\t}\n\n\t/**\n\t * Convert any of:\n\t * - a Zod schema → JSON Schema via `zodToJsonSchema`\n\t * - a `JSONSchema` object → passthrough\n\t * - a class decorated with `@ApiProperty` → JSON Schema\n\t * - `null` / `undefined` → empty object\n\t */\n\tprivate toSchema(input: unknown): JSONSchema {\n\t\tif (input == null) return {};\n\t\t// JSONSchema passthrough (has `type` or `$ref` or any of our keys).\n\t\tif (typeof input === \"object\" && !isZodLike(input)) {\n\t\t\treturn input as JSONSchema;\n\t\t}\n\t\t// Zod-like: try the converter.\n\t\ttry {\n\t\t\treturn zodToJsonSchema(input);\n\t\t} catch {\n\t\t\treturn {};\n\t\t}\n\t}\n\n\tprivate appendZodParams(\n\t\tctor: any,\n\t\tpropKey: string | symbol,\n\t\twhere: \"query\" | \"header\",\n\t\tschema: unknown,\n\t\tparams: OpenAPIParameter[],\n\t\trequired: boolean,\n\t): void {\n\t\tconst json = this.toSchema(schema);\n\t\t// Unwrap top-level object to one entry per property.\n\t\tif (json.type === \"object\" && json.properties) {\n\t\t\tconst req = new Set(json.required ?? []);\n\t\t\tfor (const [name, sub] of Object.entries(json.properties)) {\n\t\t\t\tparams.push({\n\t\t\t\t\tname,\n\t\t\t\t\tin: where,\n\t\t\t\t\trequired: required || req.has(name),\n\t\t\t\t\tschema: sub,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate extractPathParams(path: string): string[] {\n\t\tconst out: string[] = [];\n\t\tconst re = /:([A-Za-z0-9_]+)/g;\n\t\tlet m: RegExpExecArray | null;\n\t\twhile ((m = re.exec(path)) !== null) out.push(m[1]!);\n\t\treturn out;\n\t}\n\n\tprivate normalizePath(path: string): string {\n\t\treturn path.replace(/:([A-Za-z0-9_]+)/g, \"{$1}\");\n\t}\n}\n\nfunction isZodLike(s: unknown): boolean {\n\tif (typeof s !== \"object\" || s === null) return false;\n\tconst o = s as { _def?: { typeName?: string }; typeName?: string };\n\tconst t = o._def?.typeName ?? o.typeName;\n\treturn typeof t === \"string\" && t.startsWith(\"Zod\");\n}",
|
|
13
|
+
"/**\n * @Module decorator.\n *\n * Marks a class as a Nest-style module: a logical grouping of\n * controllers and providers with explicit imports/exports.\n *\n * @example\n * ```ts\n * @Module({\n * imports: [UserModule],\n * controllers: [UserController],\n * providers: [UserService],\n * exports: [UserService],\n * })\n * class AppModule {}\n * ```\n */\nimport \"reflect-metadata\";\nimport { METADATA_KEY } from \"../constants.js\";\nimport type { ModuleOptions, Type } from \"../di/tokens.js\";\n\nexport function Module(options: ModuleOptions = {}): ClassDecorator {\n\treturn (target: object) => {\n\t\tReflect.defineMetadata(METADATA_KEY.MODULE, options, target);\n\t};\n}\n\n/** Read the @Module options from a class. */\nexport function getModuleOptions(target: Type<any>): ModuleOptions {\n\treturn Reflect.getMetadata(METADATA_KEY.MODULE, target) ?? {};\n}\n",
|
|
14
|
+
"/**\n * Convenience barrel for all decorators.\n */\nexport * from \"./module.js\";\nexport * from \"./controller.js\";\nexport * from \"./injectable.js\";\nexport * from \"./http-methods.js\";\nexport * from \"./params.js\";\nexport * from \"./validate.js\";\nexport * from \"./repository.js\";\nexport * from \"./metadata.js\";\n",
|
|
15
|
+
"/**\n * @Injectable decorator.\n *\n * Marks a class as available for DI. The container uses reflect-metadata's\n * `design:paramtypes` to read constructor parameter types and resolve them\n * automatically.\n *\n * @example\n * ```ts\n * @Injectable()\n * class UserService {\n * constructor(private repo: UserRepository) {}\n * }\n *\n * @Injectable({ scope: 'request' })\n * class RequestContext {\n * constructor(@Inject(REQUEST) private req: any) {}\n * }\n * ```\n */\nimport \"reflect-metadata\";\nimport { METADATA_KEY } from \"../constants.js\";\n\nexport interface InjectableOptions {\n\tscope?: \"singleton\" | \"request\" | \"transient\";\n}\n\nexport function Injectable(options: InjectableOptions = {}): ClassDecorator {\n\treturn (target: object) => {\n\t\tReflect.defineMetadata(METADATA_KEY.INJECTABLE, true, target);\n\t\tif (options.scope) {\n\t\t\tReflect.defineMetadata(\n\t\t\t\t\"nexus:di:scope\",\n\t\t\t\toptions.scope,\n\t\t\t\ttarget,\n\t\t\t);\n\t\t}\n\t};\n}\n\nexport function isInjectable(target: any): boolean {\n\treturn Reflect.hasMetadata(METADATA_KEY.INJECTABLE, target);\n}\n\n/**\n * Read the scope declared on a class via `@Injectable({ scope })`.\n * Returns undefined when no scope is declared (defaults to singleton).\n */\nexport function getScope(\n\ttarget: any,\n): \"singleton\" | \"request\" | \"transient\" | undefined {\n\treturn Reflect.getMetadata(\"nexus:di:scope\", target);\n}\n\n/**\n * Mark a parameter as resolved by a specific token instead of its declared\n * type. Useful for interfaces, abstract classes, or string tokens.\n *\n * @example\n * ```ts\n * constructor(@Inject('CONFIG') private config: AppConfig) {}\n * ```\n */\nexport function Inject<T = any>(token: any): ParameterDecorator {\n\treturn (\n\t\ttarget: object,\n\t\tpropertyKey: string | symbol | undefined,\n\t\tparameterIndex: number,\n\t) => {\n\t\tconst existing: Map<number, any> =\n\t\t\tReflect.getMetadata(METADATA_KEY.INJECT, target) ?? new Map();\n\t\texisting.set(parameterIndex, token);\n\t\tReflect.defineMetadata(METADATA_KEY.INJECT, existing, target);\n\t};\n}",
|
|
16
|
+
"/**\n * @Repository decorator.\n *\n * Marks a class as a Spring-style repository. Repositories are normal\n * `@Injectable()` classes; the decorator is a marker so the framework\n * can register them with a database adapter (Drizzle/Prisma) and emit\n * a friendly error if you forget to wire one.\n *\n * @example\n * ```ts\n * @Repository()\n * class UserRepository {\n * findAll() { return db.select().from(users); }\n * }\n * ```\n */\nimport \"reflect-metadata\";\nimport { METADATA_KEY } from \"../constants.js\";\nimport type { InjectionToken } from \"../di/tokens.js\";\n\nexport function Repository(entityToken?: InjectionToken<any>): ClassDecorator {\n\treturn (target: object) => {\n\t\tReflect.defineMetadata(\n\t\t\tMETADATA_KEY.REPOSITORY,\n\t\t\t{ entity: entityToken },\n\t\t\ttarget,\n\t\t);\n\t\tReflect.defineMetadata(METADATA_KEY.INJECTABLE, true, target);\n\t};\n}\n\nexport function getRepositoryMetadata(\n\ttarget: any,\n): { entity?: InjectionToken<any> } | undefined {\n\treturn Reflect.getMetadata(METADATA_KEY.REPOSITORY, target);\n}\n\nexport function isRepository(target: any): boolean {\n\treturn Reflect.hasMetadata(METADATA_KEY.REPOSITORY, target);\n}\n",
|
|
17
|
+
"/**\n * Reflect-metadata helper. Centralizes the keys the framework uses so\n * decorator files stay clean.\n */\nexport { METADATA_KEY, PARAM_TYPES, HTTP_METHODS } from \"../constants.js\";\nexport type { MetadataKey, ParamType, HttpMethod } from \"../constants.js\";\n",
|
|
18
|
+
"/**\n * `zodToJsonSchema` — convert a Zod schema to an OpenAPI-compatible\n * JSON Schema. Zero dependencies, supports the Zod patterns that\n * show up in real APIs:\n *\n * - primitives (string / number / integer / boolean / null)\n * - literal, enum, nativeEnum\n * - object (with required / optional / nullable fields)\n * - array / tuple\n * - union / discriminatedUnion\n * - optional / nullable / default\n * - record / map\n * - format inference (email, uuid, url, datetime, ...)\n * - min / max / length / regex constraints\n *\n * Limitations (by design):\n * - transforms / pipes / preprocess: not represented\n * - branded types: erased\n * - recursive schemas: pass `$ref` manually via `setRefName`\n *\n * For richer support, pre-compute a `JSONSchema` and pass it via\n * the decorator's `schema` field; this converter is a convenience,\n * not a complete codegen.\n */\n\nimport type { JSONSchema } from \"./types.js\";\n\n/**\n * Convert a Zod schema (or any value that quacks like one) to a\n * JSON Schema object.\n */\nexport function zodToJsonSchema(\n\tschema: unknown,\n\topts: { $defs?: Record<string, JSONSchema>; visited?: WeakSet<object> } = {},\n): JSONSchema {\n\tconst defs = opts.$defs ?? {};\n\tconst visited = opts.visited ?? new WeakSet<object>();\n\tif (visited.has(schema as object)) {\n\t\t// Recursive schema — fall back to `{}` so we don't infinite-loop.\n\t\treturn {};\n\t}\n\tif (typeof schema === \"object\" && schema !== null) {\n\t\tvisited.add(schema as object);\n\t}\n\n\tconst def = readDef(schema);\n\n\t// Primitives\n\tif (def.typeName === \"ZodString\") return convertString(def);\n\tif (def.typeName === \"ZodNumber\") return convertNumber(def);\n\tif (def.typeName === \"ZodBigInt\") return { type: \"integer\", format: \"int64\" };\n\tif (def.typeName === \"ZodBoolean\") return { type: \"boolean\" };\n\tif (def.typeName === \"ZodDate\") return { type: \"string\", format: \"date-time\" };\n\tif (def.typeName === \"ZodNull\") return { type: \"null\" };\n\tif (def.typeName === \"ZodUndefined\") return { not: {} };\n\tif (def.typeName === \"ZodAny\") return {};\n\tif (def.typeName === \"ZodUnknown\") return {};\n\tif (def.typeName === \"ZodNever\") return { not: {} };\n\n\tif (def.typeName === \"ZodLiteral\") {\n\t\tconst v = (def as { value: unknown }).value;\n\t\treturn { type: jsonTypeOf(v) as JSONSchema[\"type\"], enum: [v] };\n\t}\n\n\tif (def.typeName === \"ZodEnum\") {\n\t\tconst values = (def as { values: ReadonlyArray<string | number> }).values;\n\t\tconst t = values.every((v) => typeof v === \"number\") ? \"number\" : \"string\";\n\t\treturn { type: t as JSONSchema[\"type\"], enum: [...values] };\n\t}\n\n\tif (def.typeName === \"ZodNativeEnum\") {\n\t\tconst values = (def as { values: Record<string, string | number> }).values;\n\t\tconst entries = Object.entries(values).filter(\n\t\t\t([k, v]) => typeof v !== \"number\" || isNaN(Number(k)),\n\t\t);\n\t\tconst opts = entries.map(([, v]) => v);\n\t\tconst t = opts.every((v) => typeof v === \"number\") ? \"number\" : \"string\";\n\t\treturn { type: t as JSONSchema[\"type\"], enum: opts };\n\t}\n\n\tif (def.typeName === \"ZodObject\") {\n\t\treturn convertObject(schema, def, defs, visited);\n\t}\n\n\tif (def.typeName === \"ZodArray\") {\n\t\treturn convertArray(schema, def, defs, visited);\n\t}\n\n\tif (def.typeName === \"ZodTuple\") {\n\t\tconst items = (def as { items: unknown[] }).items;\n\t\treturn {\n\t\t\ttype: \"array\",\n\t\t\tprefixItems: items.map((s) => zodToJsonSchema(s, { $defs: defs, visited })),\n\t\t\tminItems: items.length,\n\t\t\tmaxItems: items.length,\n\t\t};\n\t}\n\n\tif (def.typeName === \"ZodUnion\" || def.typeName === \"ZodDiscriminatedUnion\") {\n\t\tconst options = (def as { options?: unknown[]; optionsArray?: unknown[] }).options\n\t\t\t?? (def as { optionsArray?: unknown[] }).optionsArray\n\t\t\t?? [];\n\t\treturn {\n\t\t\toneOf: options.map((s) => zodToJsonSchema(s, { $defs: defs, visited })),\n\t\t};\n\t}\n\n\tif (def.typeName === \"ZodDiscriminatedUnion\") {\n\t\tconst discriminator = (def as { discriminator?: string }).discriminator;\n\t\tconst options = (def as { options?: unknown[] }).options ?? [];\n\t\tconst mapping: Record<string, JSONSchema> = {};\n\t\tfor (const opt of options) {\n\t\t\tconst od = readDef(opt);\n\t\t\tif (od.typeName === \"ZodObject\") {\n\t\t\t\tconst shape = (od as { shape: () => Record<string, unknown> }).shape();\n\t\t\t\tconst disc = shape[discriminator ?? \"\"] as { value: unknown } | undefined;\n\t\t\t\tif (disc && \"value\" in disc) {\n\t\t\t\t\tmapping[String(disc.value)] = zodToJsonSchema(opt, { $defs: defs, visited });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\toneOf: Object.values(mapping),\n\t\t\tdiscriminator: { propertyName: discriminator ?? \"type\" },\n\t\t} as JSONSchema;\n\t}\n\n\tif (def.typeName === \"ZodIntersection\") {\n\t\tconst left = (def as { _def?: { left: unknown; right: unknown } })._def?.left\n\t\t\t?? (def as { left: unknown }).left;\n\t\tconst right = (def as { _def?: { left: unknown; right: unknown } })._def?.right\n\t\t\t?? (def as { right: unknown }).right;\n\t\treturn {\n\t\t\tallOf: [\n\t\t\t\tzodToJsonSchema(left, { $defs: defs, visited }),\n\t\t\t\tzodToJsonSchema(right, { $defs: defs, visited }),\n\t\t\t],\n\t\t};\n\t}\n\n\tif (def.typeName === \"ZodRecord\") {\n\t\tconst valueType = (def as { valueType: unknown }).valueType;\n\t\treturn {\n\t\t\ttype: \"object\",\n\t\t\tadditionalProperties: zodToJsonSchema(valueType, { $defs: defs, visited }),\n\t\t};\n\t}\n\n\tif (def.typeName === \"ZodMap\") {\n\t\tconst valueType = (def as { valueType: unknown }).valueType;\n\t\treturn {\n\t\t\ttype: \"object\",\n\t\t\tadditionalProperties: zodToJsonSchema(valueType, { $defs: defs, visited }),\n\t\t};\n\t}\n\n\tif (def.typeName === \"ZodOptional\") {\n\t\tconst inner = (def as { innerType: unknown }).innerType;\n\t\treturn zodToJsonSchema(inner, { $defs: defs, visited });\n\t}\n\n\tif (def.typeName === \"ZodNullable\") {\n\t\tconst inner = (def as { innerType: unknown }).innerType;\n\t\treturn {\n\t\t\t...zodToJsonSchema(inner, { $defs: defs, visited }),\n\t\t\tnullable: true,\n\t\t};\n\t}\n\n\tif (def.typeName === \"ZodDefault\") {\n\t\tconst inner = (def as { innerType: unknown; defaultValue: () => unknown }).innerType;\n\t\tconst dv = (def as { defaultValue: () => unknown }).defaultValue;\n\t\treturn {\n\t\t\t...zodToJsonSchema(inner, { $defs: defs, visited }),\n\t\t\tdefault: safeCall(dv),\n\t\t};\n\t}\n\n\tif (def.typeName === \"ZodCatch\") {\n\t\tconst inner = (def as { innerType: unknown }).innerType;\n\t\treturn zodToJsonSchema(inner, { $defs: defs, visited });\n\t}\n\n\tif (def.typeName === \"ZodBranded\") {\n\t\tconst inner = (def as { type: unknown }).type;\n\t\treturn zodToJsonSchema(inner, { $defs: defs, visited });\n\t}\n\n\tif (def.typeName === \"ZodReadonly\") {\n\t\tconst inner = (def as { innerType: unknown }).innerType;\n\t\treturn zodToJsonSchema(inner, { $defs: defs, visited });\n\t}\n\n\tif (def.typeName === \"ZodLazy\") {\n\t\tconst getter = (def as { getter: () => unknown }).getter;\n\t\tconst inner = safeCall(getter);\n\t\treturn zodToJsonSchema(inner, { $defs: defs, visited });\n\t}\n\n\tif (def.typeName === \"ZodEffects\") {\n\t\tconst inner = (def as { source?: unknown; schema?: unknown; innerType?: unknown }).source\n\t\t\t?? (def as { schema?: unknown }).schema\n\t\t\t?? (def as { innerType?: unknown }).innerType;\n\t\treturn zodToJsonSchema(inner, { $defs: defs, visited });\n\t}\n\n\tif (def.typeName === \"ZodPipeline\") {\n\t\tconst inner = (def as { out: unknown }).out;\n\t\treturn zodToJsonSchema(inner, { $defs: defs, visited });\n\t}\n\n\tif (def.typeName === \"ZodFunction\") return { type: \"null\" };\n\tif (def.typeName === \"ZodPromise\") {\n\t\tconst inner = (def as { innerType: unknown }).innerType;\n\t\treturn zodToJsonSchema(inner, { $defs: defs, visited });\n\t}\n\n\t// Fallback: emit a permissive object schema so the spec is at least\n\t// structurally valid. The user can refine by passing an explicit\n\t// `schema: {...}` on the decorator.\n\treturn {};\n}\n\n// ---------------------------------------------------------------------------\n// Internal helpers\n// ---------------------------------------------------------------------------\n\ntype ZodDef = Record<string, unknown>;\n\nfunction readDef(schema: unknown): ZodDef {\n\tif (typeof schema !== \"object\" || schema === null) return { typeName: \"\" };\n\t// Zod 3 / 3.25: stores everything under `_def`.\n\tconst s = schema as { _def?: ZodDef };\n\tif (s._def && typeof s._def === \"object\") return s._def;\n\t// Fallback: top-level access (some forks).\n\treturn s as ZodDef;\n}\n\nfunction convertString(def: ZodDef): JSONSchema {\n\tconst out: JSONSchema = { type: \"string\" };\n\tconst checks = (def.checks ?? []) as Array<{ kind: string; value?: unknown; regex?: { source: string; flags?: string } }>;\n\tfor (const c of checks) {\n\t\tswitch (c.kind) {\n\t\t\tcase \"email\": out.format = \"email\"; break;\n\t\t\tcase \"url\": out.format = \"uri\"; break;\n\t\t\tcase \"uuid\": out.format = \"uuid\"; break;\n\t\t\tcase \"cuid\":\n\t\t\tcase \"cuid2\": out.format = \"cuid\"; break;\n\t\t\tcase \"emoji\": break;\n\t\t\tcase \"ip\": out.format = \"ipv4\"; break;\n\t\t\tcase \"cidr\": out.format = \"cidr\"; break;\n\t\t\tcase \"datetime\": out.format = \"date-time\"; break;\n\t\t\tcase \"date\": out.format = \"date\"; break;\n\t\t\tcase \"time\": out.format = \"time\"; break;\n\t\t\tcase \"duration\": break;\n\t\t\tcase \"min\":\n\t\t\tcase \"length\": out.minLength = Number(c.value); break;\n\t\t\tcase \"max\": out.maxLength = Number(c.value); break;\n\t\t\tcase \"regex\": if (c.regex) out.pattern = c.regex.source; break;\n\t\t\tcase \"trim\":\n\t\t\tcase \"toLowerCase\":\n\t\t\tcase \"toUpperCase\":\n\t\t\tcase \"startsWith\":\n\t\t\tcase \"endsWith\":\n\t\t\tcase \"includes\":\n\t\t\t\t// No JSON Schema equivalent; ignore.\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn out;\n}\n\nfunction convertNumber(def: ZodDef): JSONSchema {\n\tconst out: JSONSchema = { type: \"number\" };\n\tconst checks = (def.checks ?? []) as Array<{ kind: string; value?: number }>;\n\tlet isInt = false;\n\tfor (const c of checks) {\n\t\tswitch (c.kind) {\n\t\t\tcase \"int\":\n\t\t\tcase \"safeint\": isInt = true; break;\n\t\t\tcase \"min\": out.minimum = c.value; break;\n\t\t\tcase \"max\": out.maximum = c.value; break;\n\t\t\tcase \"finite\":\n\t\t\tcase \"multipleOf\":\n\t\t\t\t// `multipleOf` accepts arbitrary numbers; we skip the\n\t\t\t\t// stricter check that the value is present.\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif (isInt) out.type = \"integer\";\n\treturn out;\n}\n\nfunction convertObject(\n\t_schema: unknown,\n\tdef: ZodDef,\n\tdefs: Record<string, JSONSchema>,\n\tvisited: WeakSet<object>,\n): JSONSchema {\n\tconst shapeFn = (def as { shape?: unknown }).shape;\n\tconst shape = typeof shapeFn === \"function\" ? (shapeFn as () => Record<string, unknown>)() : shapeFn;\n\tconst properties: Record<string, JSONSchema> = {};\n\tconst required: string[] = [];\n\tconst catchall = (def as { catchall?: unknown }).catchall;\n\tif (shape && typeof shape === \"object\") {\n\t\tfor (const [key, value] of Object.entries(shape)) {\n\t\t\tconst child = zodToJsonSchema(value, { $defs: defs, visited });\n\t\t\tconst childDef = readDef(value);\n\t\t\t// Zod: optional / nullable / default are NOT in `required`.\n\t\t\tconst isOptional =\n\t\t\t\tchildDef.typeName === \"ZodOptional\" ||\n\t\t\t\tchildDef.typeName === \"ZodDefault\" ||\n\t\t\t\tchildDef.typeName === \"ZodCatch\";\n\t\t\tproperties[key] = child;\n\t\t\tif (!isOptional) required.push(key);\n\t\t}\n\t}\n\tconst description = (def as { description?: string }).description;\n\tconst out: JSONSchema = { type: \"object\", properties };\n\tif (required.length > 0) out.required = required;\n\tif (typeof catchall === \"object\" && catchall !== null) {\n\t\tconst c = readDef(catchall);\n\t\t// `ZodNever` catchall = strict; `ZodAny`/`ZodUnknown` = passthrough.\n\t\tif (c.typeName === \"ZodNever\") out.additionalProperties = false;\n\t\telse out.additionalProperties = true;\n\t}\n\tif (description) out.description = description;\n\treturn out;\n}\n\nfunction convertArray(\n\t_schema: unknown,\n\tdef: ZodDef,\n\tdefs: Record<string, JSONSchema>,\n\tvisited: WeakSet<object>,\n): JSONSchema {\n\tconst out: JSONSchema = { type: \"array\" };\n\tconst element = (def as { element?: unknown; type?: unknown }).element\n\t\t?? (def as { type?: unknown }).type;\n\tif (element) out.items = zodToJsonSchema(element, { $defs: defs, visited });\n\tconst checks = (def as { minLength?: { value: number }; maxLength?: { value: number } });\n\tif (checks.minLength?.value != null) out.minItems = checks.minLength.value;\n\tif (checks.maxLength?.value != null) out.maxItems = checks.maxLength.value;\n\treturn out;\n}\n\nfunction jsonTypeOf(v: unknown): \"string\" | \"number\" | \"boolean\" | \"object\" | \"null\" {\n\tif (v === null) return \"null\";\n\tif (typeof v === \"string\") return \"string\";\n\tif (typeof v === \"number\") return \"number\";\n\tif (typeof v === \"boolean\") return \"boolean\";\n\treturn \"object\";\n}\n\nfunction safeCall<T>(fn: unknown): T {\n\ttry {\n\t\treturn (fn as () => T)();\n\t} catch {\n\t\treturn undefined as unknown as T;\n\t}\n}",
|
|
19
|
+
"/**\n * `OpenAPIModule` — drop-in OpenAPI 3.1 + Scalar UI.\n *\n * @Module({\n * imports: [\n * OpenAPIModule.forRoot({\n * info: { title: 'My API', version: '1.0.0' },\n * servers: [{ url: 'http://localhost:3000' }],\n * }),\n * ],\n * })\n * export class AppModule {}\n *\n * After boot, the framework exposes:\n *\n * GET /openapi.json — the OpenAPI 3.1 spec\n * GET /docs — the Scalar UI\n *\n * To feed routes to the spec, the application must call\n * `OpenAPIService.setRoutes(...)` after the router is built. The\n * recommended way is to read routes from the `NexusServer` instance\n * inside the module's onModuleInit hook (see the helper below).\n */\nimport \"reflect-metadata\";\nimport { Module } from \"../core/decorators/module.js\";\nimport { OpenAPIService } from \"./openapi.service.js\";\nimport type { OpenAPIConfig } from \"./types.js\";\n\n@Module({\n\tproviders: [\n\t\tOpenAPIService,\n\t\t{ provide: OpenAPIService.TOKEN, useExisting: OpenAPIService },\n\t],\n\texports: [OpenAPIService, OpenAPIService.TOKEN],\n})\nexport class OpenAPIModule {\n\tstatic forRoot(config: OpenAPIConfig) {\n\t\t@Module({\n\t\t\tproviders: [\n\t\t\t\tOpenAPIService,\n\t\t\t\t{ provide: OpenAPIService.TOKEN, useExisting: OpenAPIService },\n\t\t\t\t{ provide: \"OPENAPI_CONFIG\", useValue: config },\n\t\t\t],\n\t\t\texports: [OpenAPIService, OpenAPIService.TOKEN],\n\t\t})\n\t\tclass ConfiguredOpenAPIModule {}\n\t\tObject.defineProperty(ConfiguredOpenAPIModule, \"name\", {\n\t\t\tvalue: \"ConfiguredOpenAPIModule\",\n\t\t});\n\t\treturn ConfiguredOpenAPIModule;\n\t}\n\n\t/**\n\t * Mount the spec + Scalar UI on an existing Hono app. The user\n\t * calls this once, after the framework's router is built, passing\n\t * the route list.\n\t *\n\t * import { mountOpenAPI } from 'nexusjs/openapi';\n\t * const openapi = new OpenAPIService(config);\n\t * openapi.setRoutes(routes);\n\t * mountOpenAPI(app, openapi, config);\n\t */\n\tstatic mount(\n\t\tapp: { use: (path: string, ...handlers: any[]) => any; get: (path: string, ...handlers: any[]) => any },\n\t\tsvc: OpenAPIService,\n\t\tconfig: OpenAPIConfig,\n\t): void {\n\t\tconst specPath = config.specPath ?? \"/openapi.json\";\n\t\tconst docsPath = config.path ?? \"/docs\";\n\t\t// The route handlers are evaluated lazily at request time.\n\t\tapp.get(specPath, (c: any) => c.json(svc.getSpec(), 200, { \"Content-Type\": \"application/json\" }));\n\t\tapp.get(docsPath, (c: any) => {\n\t\t\t// We import lazily to avoid a circular dep.\n\t\t\tconst { scalarHtml } = require(\"./scalar.js\") as typeof import(\"./scalar.js\");\n\t\t\tconst html = scalarHtml({\n\t\t\t\ttitle: config.info.title,\n\t\t\t\tspecUrl: specPath,\n\t\t\t});\n\t\t\treturn c.html(html, 200, { \"Content-Type\": \"text/html; charset=utf-8\" });\n\t\t});\n\t}\n}",
|
|
20
|
+
"/**\n * `@ApiTags('Users', 'Admin')` — group operations under one or more\n * tags in the OpenAPI spec.\n */\nimport { OPENAPI_META } from \"../types.js\";\n\nexport function ApiTags(...tags: string[]): ClassDecorator {\n\treturn (target: any) => {\n\t\tconst existing: string[] = Reflect.getMetadata(OPENAPI_META.TAGS, target) ?? [];\n\t\tReflect.defineMetadata(OPENAPI_META.TAGS, [...existing, ...tags], target);\n\t};\n}\n",
|
|
21
|
+
"/**\n * `@ApiOperation({ summary, description, operationId, tags, deprecated })`\n *\n * Decorate a controller method to describe the operation in the spec.\n */\nimport \"reflect-metadata\";\nimport { OPENAPI_META, type ApiOperationOptions } from \"../types.js\";\n\nexport function ApiOperation(options: ApiOperationOptions): MethodDecorator {\n\treturn (target: object, propertyKey: string | symbol) => {\n\t\tReflect.defineMetadata(OPENAPI_META.OPERATION, options, target.constructor, propertyKey);\n\t};\n}",
|
|
22
|
+
"/**\n * `@ApiResponse(200, { description: 'OK', schema: UserSchema })`\n *\n * Decorate a controller method to describe one of its responses.\n * Multiple `@ApiResponse` calls accumulate.\n */\nimport \"reflect-metadata\";\nimport { OPENAPI_META, type ApiResponseOptions } from \"../types.js\";\n\nexport function ApiResponse(\n\tstatus: number | string,\n\toptions: ApiResponseOptions,\n): MethodDecorator {\n\treturn (target: object, propertyKey: string | symbol) => {\n\t\tconst existing: Array<[string, ApiResponseOptions]> =\n\t\t\tReflect.getMetadata(OPENAPI_META.RESPONSES, target.constructor, propertyKey) ?? [];\n\t\texisting.push([String(status), options]);\n\t\tReflect.defineMetadata(OPENAPI_META.RESPONSES, existing, target.constructor, propertyKey);\n\t};\n}",
|
|
23
|
+
"/**\n * `@ApiParam({ name, description, required, schema })` — document a\n * path parameter. The decorator is optional — the spec builder\n * auto-derives path params from the route pattern (`/users/:id` → `id`).\n * Use this when you want to override the schema or add a description.\n */\nimport \"reflect-metadata\";\nimport { OPENAPI_META, type ApiParamOptions } from \"../types.js\";\n\nexport function ApiParam(options: ApiParamOptions): MethodDecorator {\n\treturn (target: object, propertyKey: string | symbol) => {\n\t\tconst existing: ApiParamOptions[] =\n\t\t\tReflect.getMetadata(OPENAPI_META.PARAMS, target.constructor, propertyKey) ?? [];\n\t\texisting.push(options);\n\t\tReflect.defineMetadata(OPENAPI_META.PARAMS, existing, target.constructor, propertyKey);\n\t};\n}\n\n/**\n * `@ApiQuery({ name: 'q', description: '...', schema: z.string() })`\n *\n * Document a query parameter. Auto-derivation from `@Validate({ query })`\n * runs first; explicit `@ApiQuery` decorators take precedence.\n */\nexport function ApiQuery(options: ApiParamOptions): MethodDecorator {\n\treturn (target: object, propertyKey: string | symbol) => {\n\t\tconst existing: ApiParamOptions[] =\n\t\t\tReflect.getMetadata(OPENAPI_META.QUERIES, target.constructor, propertyKey) ?? [];\n\t\texisting.push(options);\n\t\tReflect.defineMetadata(OPENAPI_META.QUERIES, existing, target.constructor, propertyKey);\n\t};\n}",
|
|
24
|
+
"/**\n * `@ApiBody({ description, required, schema })` — document the request\n * body. Auto-derivation from `@Validate({ body })` runs first; explicit\n * `@ApiBody` decorators take precedence.\n */\nimport \"reflect-metadata\";\nimport { OPENAPI_META, type ApiBodyOptions } from \"../types.js\";\n\nexport function ApiBody(options: ApiBodyOptions): MethodDecorator {\n\treturn (target: object, propertyKey: string | symbol) => {\n\t\tReflect.defineMetadata(OPENAPI_META.BODY, options, target.constructor, propertyKey);\n\t};\n}",
|
|
25
|
+
"/**\n * `@ApiProperty({ description, required, schema, example })` — document\n * a property on a request / response DTO.\n *\n * ```ts\n * class UserDto {\n * @ApiProperty({ description: 'Unique user id', example: 42 })\n * id!: number;\n *\n * @ApiProperty({ description: 'Email address', required: true })\n * email!: string;\n * }\n * ```\n *\n * The `schema` field accepts either a Zod schema or a pre-computed\n * `JSONSchema`. Without a `schema`, the type is inferred from the\n * TypeScript reflection of the property's design:type metadata.\n */\nimport \"reflect-metadata\";\nimport { OPENAPI_META, type ApiPropertyOptions } from \"../types.js\";\n\nexport function ApiProperty(options: ApiPropertyOptions = {}): PropertyDecorator {\n\treturn (target: object, propertyKey: string | symbol) => {\n\t\tconst existing: Record<string | symbol, ApiPropertyOptions> =\n\t\t\tReflect.getMetadata(OPENAPI_META.PROPERTIES, target.constructor) ?? {};\n\t\texisting[propertyKey] = options;\n\t\tReflect.defineMetadata(OPENAPI_META.PROPERTIES, existing, target.constructor);\n\t};\n}\n\n/** Class-level: mark a DTO class so its properties can be lifted into a schema. */\nexport function ApiSchema(name: string): ClassDecorator {\n\treturn (target: any) => {\n\t\tReflect.defineMetadata(\"nexus:openapi:schemaName\", name, target);\n\t};\n}",
|
|
26
|
+
"/**\n * `@ApiSecurity('bearerAuth', [])` — declare the security requirements\n * for an operation or controller.\n */\nimport \"reflect-metadata\";\nimport { OPENAPI_META, type ApiSecurityOptions } from \"../types.js\";\n\nexport function ApiSecurity(name: string, scopes: string[] = []): ClassDecorator & MethodDecorator {\n\treturn (\n\t\ttarget: any,\n\t\t_propertyKey?: string | symbol,\n\t\t_descriptor?: PropertyDescriptor,\n\t) => {\n\t\t// Class or method — store the same way.\n\t\tconst key = OPENAPI_META.SECURITY;\n\t\tconst existing: ApiSecurityOptions[] =\n\t\t\t(typeof _propertyKey === \"string\" || typeof _propertyKey === \"symbol\")\n\t\t\t\t? Reflect.getMetadata(key, target.constructor, _propertyKey) ?? []\n\t\t\t\t: Reflect.getMetadata(key, target) ?? [];\n\t\texisting.push({ [name]: scopes });\n\t\tif (typeof _propertyKey === \"string\" || typeof _propertyKey === \"symbol\") {\n\t\t\tReflect.defineMetadata(key, existing, target.constructor, _propertyKey);\n\t\t} else {\n\t\t\tReflect.defineMetadata(key, existing, target);\n\t\t}\n\t};\n}\n\n/** `@ApiExclude()` — exclude a route from the spec. */\nexport function ApiExclude(): MethodDecorator {\n\treturn (target: object, propertyKey: string | symbol) => {\n\t\tReflect.defineMetadata(OPENAPI_META.EXCLUDE, true, target.constructor, propertyKey);\n\t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AoB;AAAA,EAC7C,OAAO,CAAC,QAAgB,gBAAiC;AAAA,IACxD,QAAQ,eAAe,aAAa,SAAS,MAAM,OAAO,aAAa,WAAW;AAAA;AAAA;",
|
|
29
|
+
"debugId": "A00AA811A516A55C64756E2164756E21",
|
|
30
|
+
"names": []
|
|
31
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `OpenAPIModule` — drop-in OpenAPI 3.1 + Scalar UI.
|
|
3
|
+
*
|
|
4
|
+
* @Module({
|
|
5
|
+
* imports: [
|
|
6
|
+
* OpenAPIModule.forRoot({
|
|
7
|
+
* info: { title: 'My API', version: '1.0.0' },
|
|
8
|
+
* servers: [{ url: 'http://localhost:3000' }],
|
|
9
|
+
* }),
|
|
10
|
+
* ],
|
|
11
|
+
* })
|
|
12
|
+
* export class AppModule {}
|
|
13
|
+
*
|
|
14
|
+
* After boot, the framework exposes:
|
|
15
|
+
*
|
|
16
|
+
* GET /openapi.json — the OpenAPI 3.1 spec
|
|
17
|
+
* GET /docs — the Scalar UI
|
|
18
|
+
*
|
|
19
|
+
* To feed routes to the spec, the application must call
|
|
20
|
+
* `OpenAPIService.setRoutes(...)` after the router is built. The
|
|
21
|
+
* recommended way is to read routes from the `NexusServer` instance
|
|
22
|
+
* inside the module's onModuleInit hook (see the helper below).
|
|
23
|
+
*/
|
|
24
|
+
import "reflect-metadata";
|
|
25
|
+
import { OpenAPIService } from "./openapi.service.js";
|
|
26
|
+
import type { OpenAPIConfig } from "./types.js";
|
|
27
|
+
export declare class OpenAPIModule {
|
|
28
|
+
static forRoot(config: OpenAPIConfig): {
|
|
29
|
+
new (): {};
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Mount the spec + Scalar UI on an existing Hono app. The user
|
|
33
|
+
* calls this once, after the framework's router is built, passing
|
|
34
|
+
* the route list.
|
|
35
|
+
*
|
|
36
|
+
* import { mountOpenAPI } from 'nexusjs/openapi';
|
|
37
|
+
* const openapi = new OpenAPIService(config);
|
|
38
|
+
* openapi.setRoutes(routes);
|
|
39
|
+
* mountOpenAPI(app, openapi, config);
|
|
40
|
+
*/
|
|
41
|
+
static mount(app: {
|
|
42
|
+
use: (path: string, ...handlers: any[]) => any;
|
|
43
|
+
get: (path: string, ...handlers: any[]) => any;
|
|
44
|
+
}, svc: OpenAPIService, config: OpenAPIConfig): void;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=openapi.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi.module.d.ts","sourceRoot":"","sources":["../../src/openapi/openapi.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,qBAOa,aAAa;IACzB,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa;;;IAgBpC;;;;;;;;;OASG;IACH,MAAM,CAAC,KAAK,CACX,GAAG,EAAE;QAAE,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;QAAC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;KAAE,EACvG,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,aAAa,GACnB,IAAI;CAeP"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `OpenAPIService` — walks the framework's route table, reads
|
|
3
|
+
* `@ApiTags` / `@ApiOperation` / `@ApiResponse` / `@ApiBody` /
|
|
4
|
+
* `@ApiParam` / `@ApiQuery` / `@Validate` metadata, and produces an
|
|
5
|
+
* OpenAPI 3.1 document.
|
|
6
|
+
*
|
|
7
|
+
* The document is rebuilt on demand (cheap: in-memory walk) and
|
|
8
|
+
* exposed via `getSpec()`. The framework's router already exposes a
|
|
9
|
+
* `getRoutes()` method that returns the registered route list, so
|
|
10
|
+
* the spec is always in sync with the actual API.
|
|
11
|
+
*/
|
|
12
|
+
import "reflect-metadata";
|
|
13
|
+
import type { JSONSchema, OpenAPIConfig, OpenAPIDocument } from "./types.js";
|
|
14
|
+
export declare class OpenAPIService {
|
|
15
|
+
#private;
|
|
16
|
+
/** DI token. */
|
|
17
|
+
static readonly TOKEN: unique symbol;
|
|
18
|
+
constructor(config: OpenAPIConfig);
|
|
19
|
+
/**
|
|
20
|
+
* Inject the route list. The framework's router calls this on boot.
|
|
21
|
+
* Each entry is the data needed to emit one OpenAPI operation.
|
|
22
|
+
*/
|
|
23
|
+
setRoutes(routes: {
|
|
24
|
+
method: string;
|
|
25
|
+
path: string;
|
|
26
|
+
target: any;
|
|
27
|
+
propertyKey: string | symbol;
|
|
28
|
+
validation?: {
|
|
29
|
+
body?: unknown;
|
|
30
|
+
query?: unknown;
|
|
31
|
+
params?: unknown;
|
|
32
|
+
headers?: unknown;
|
|
33
|
+
};
|
|
34
|
+
}[]): void;
|
|
35
|
+
/** Register a named component schema (e.g. for re-use). */
|
|
36
|
+
registerSchema(name: string, schema: JSONSchema): void;
|
|
37
|
+
/** Build the OpenAPI 3.1 document. */
|
|
38
|
+
getSpec(): OpenAPIDocument;
|
|
39
|
+
/**
|
|
40
|
+
* Build one operation from a route.
|
|
41
|
+
*/
|
|
42
|
+
private buildOperation;
|
|
43
|
+
/**
|
|
44
|
+
* Convert any of:
|
|
45
|
+
* - a Zod schema → JSON Schema via `zodToJsonSchema`
|
|
46
|
+
* - a `JSONSchema` object → passthrough
|
|
47
|
+
* - a class decorated with `@ApiProperty` → JSON Schema
|
|
48
|
+
* - `null` / `undefined` → empty object
|
|
49
|
+
*/
|
|
50
|
+
private toSchema;
|
|
51
|
+
private appendZodParams;
|
|
52
|
+
private extractPathParams;
|
|
53
|
+
private normalizePath;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=openapi.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi.service.d.ts","sourceRoot":"","sources":["../../src/openapi/openapi.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAKX,UAAU,EAEV,aAAa,EACb,eAAe,EAMf,MAAM,YAAY,CAAC;AAIpB,qBACa,cAAc;;IAC1B,gBAAgB;IAChB,MAAM,CAAC,QAAQ,CAAC,KAAK,gBAAsC;gBAMrB,MAAM,EAAE,aAAa;IAI3D;;;OAGG;IACH,SAAS,CACR,MAAM,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,GAAG,CAAC;QACZ,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;QAC7B,UAAU,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,OAAO,CAAC;YAAC,KAAK,CAAC,EAAE,OAAO,CAAC;YAAC,MAAM,CAAC,EAAE,OAAO,CAAC;YAAC,OAAO,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;KACtF,EAAE,GACD,IAAI;IAIP,2DAA2D;IAC3D,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI;IAItD,sCAAsC;IACtC,OAAO,IAAI,eAAe;IA2B1B;;OAEG;IACH,OAAO,CAAC,cAAc;IA+ItB;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ;IAchB,OAAO,CAAC,eAAe;IAuBvB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,aAAa;CAGrB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scalar UI HTML — a single self-contained page that loads Scalar
|
|
3
|
+
* from the jsDelivr CDN.
|
|
4
|
+
*
|
|
5
|
+
* The page mounts Scalar as a custom-element via `<script
|
|
6
|
+
* id="api-reference" data-url="...">` and waits for the CDN script
|
|
7
|
+
* to upgrade it.
|
|
8
|
+
*
|
|
9
|
+
* No assets are bundled with the framework. No build step required.
|
|
10
|
+
*/
|
|
11
|
+
export declare function scalarHtml(opts: {
|
|
12
|
+
title: string;
|
|
13
|
+
specUrl: string;
|
|
14
|
+
theme?: "default" | "dark" | "purple" | "alternate" | "moon" | "solarized" | "bluePlanet" | "saturn" | "kepler" | "mars" | "deepSpace" | "laserwave" | "none";
|
|
15
|
+
}): string;
|
|
16
|
+
//# sourceMappingURL=scalar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scalar.d.ts","sourceRoot":"","sources":["../../src/openapi/scalar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,wBAAgB,UAAU,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,MAAM,CAAA;CAAE,GAAG,MAAM,CAyB1O"}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `nexusjs/openapi` — OpenAPI 3.1 + Scalar UI.
|
|
3
|
+
*
|
|
4
|
+
* @Module({
|
|
5
|
+
* imports: [
|
|
6
|
+
* OpenAPIModule.forRoot({
|
|
7
|
+
* info: { title: 'My API', version: '1.0.0' },
|
|
8
|
+
* servers: [{ url: 'http://localhost:3000' }],
|
|
9
|
+
* }),
|
|
10
|
+
* ],
|
|
11
|
+
* })
|
|
12
|
+
*
|
|
13
|
+
* @Controller('/users')
|
|
14
|
+
* @ApiTags('Users')
|
|
15
|
+
* class UserController {
|
|
16
|
+
* @Get('/')
|
|
17
|
+
* @ApiOperation({ summary: 'List users' })
|
|
18
|
+
* @ApiResponse(200, { description: 'OK', schema: UserSchema })
|
|
19
|
+
* list() { ... }
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* // -> GET /openapi.json (the spec)
|
|
23
|
+
* // -> GET /docs (Scalar UI)
|
|
24
|
+
*/
|
|
25
|
+
import "reflect-metadata";
|
|
26
|
+
export interface OpenAPIConfig {
|
|
27
|
+
/** Top-level info block. */
|
|
28
|
+
info: OpenAPIInfo;
|
|
29
|
+
/** Server URLs. Default: [{ url: '/' }]. */
|
|
30
|
+
servers?: OpenAPIServer[];
|
|
31
|
+
/** Tags grouped at the top of the spec. */
|
|
32
|
+
tags?: OpenAPITag[];
|
|
33
|
+
/** Path under which the JSON spec is served. Default: '/openapi.json'. */
|
|
34
|
+
specPath?: string;
|
|
35
|
+
/** Path under which the Scalar UI is served. Default: '/docs'. */
|
|
36
|
+
path?: string;
|
|
37
|
+
/** External docs link. */
|
|
38
|
+
externalDocs?: {
|
|
39
|
+
url: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface OpenAPIInfo {
|
|
44
|
+
title: string;
|
|
45
|
+
version: string;
|
|
46
|
+
description?: string;
|
|
47
|
+
termsOfService?: string;
|
|
48
|
+
contact?: {
|
|
49
|
+
name?: string;
|
|
50
|
+
url?: string;
|
|
51
|
+
email?: string;
|
|
52
|
+
};
|
|
53
|
+
license?: {
|
|
54
|
+
name: string;
|
|
55
|
+
url?: string;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export interface OpenAPIServer {
|
|
59
|
+
url: string;
|
|
60
|
+
description?: string;
|
|
61
|
+
variables?: Record<string, {
|
|
62
|
+
default: string;
|
|
63
|
+
enum?: string[];
|
|
64
|
+
description?: string;
|
|
65
|
+
}>;
|
|
66
|
+
}
|
|
67
|
+
export interface OpenAPITag {
|
|
68
|
+
name: string;
|
|
69
|
+
description?: string;
|
|
70
|
+
externalDocs?: {
|
|
71
|
+
url: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/** OpenAPI Path Item. */
|
|
76
|
+
export interface OpenAPIPath {
|
|
77
|
+
[method: string]: OpenAPIOperation | undefined;
|
|
78
|
+
}
|
|
79
|
+
/** OpenAPI Operation. */
|
|
80
|
+
export interface OpenAPIOperation {
|
|
81
|
+
tags?: string[];
|
|
82
|
+
summary?: string;
|
|
83
|
+
description?: string;
|
|
84
|
+
operationId?: string;
|
|
85
|
+
parameters?: OpenAPIParameter[];
|
|
86
|
+
requestBody?: OpenAPIRequestBody;
|
|
87
|
+
responses: Record<string, OpenAPIResponse>;
|
|
88
|
+
deprecated?: boolean;
|
|
89
|
+
security?: OpenAPISecurity[];
|
|
90
|
+
}
|
|
91
|
+
/** OpenAPI Parameter (path, query, header, cookie). */
|
|
92
|
+
export interface OpenAPIParameter {
|
|
93
|
+
name: string;
|
|
94
|
+
in: "path" | "query" | "header" | "cookie";
|
|
95
|
+
description?: string;
|
|
96
|
+
required?: boolean;
|
|
97
|
+
deprecated?: boolean;
|
|
98
|
+
schema: JSONSchema;
|
|
99
|
+
example?: unknown;
|
|
100
|
+
examples?: Record<string, {
|
|
101
|
+
summary?: string;
|
|
102
|
+
value: unknown;
|
|
103
|
+
}>;
|
|
104
|
+
}
|
|
105
|
+
/** OpenAPI Request Body. */
|
|
106
|
+
export interface OpenAPIRequestBody {
|
|
107
|
+
description?: string;
|
|
108
|
+
content: Record<string, OpenAPIMediaType>;
|
|
109
|
+
required?: boolean;
|
|
110
|
+
}
|
|
111
|
+
export interface OpenAPIMediaType {
|
|
112
|
+
schema: JSONSchema;
|
|
113
|
+
example?: unknown;
|
|
114
|
+
examples?: Record<string, {
|
|
115
|
+
summary?: string;
|
|
116
|
+
value: unknown;
|
|
117
|
+
}>;
|
|
118
|
+
encoding?: Record<string, OpenAPIEncoding>;
|
|
119
|
+
}
|
|
120
|
+
export interface OpenAPIEncoding {
|
|
121
|
+
contentType?: string;
|
|
122
|
+
headers?: Record<string, OpenAPIParameter>;
|
|
123
|
+
style?: string;
|
|
124
|
+
explode?: boolean;
|
|
125
|
+
allowReserved?: boolean;
|
|
126
|
+
}
|
|
127
|
+
/** OpenAPI Response. */
|
|
128
|
+
export interface OpenAPIResponse {
|
|
129
|
+
description: string;
|
|
130
|
+
headers?: Record<string, OpenAPIParameter>;
|
|
131
|
+
content?: Record<string, OpenAPIMediaType>;
|
|
132
|
+
links?: Record<string, OpenAPILink>;
|
|
133
|
+
}
|
|
134
|
+
export interface OpenAPILink {
|
|
135
|
+
operationRef?: string;
|
|
136
|
+
operationId?: string;
|
|
137
|
+
parameters?: Record<string, unknown>;
|
|
138
|
+
description?: string;
|
|
139
|
+
server?: OpenAPIServer;
|
|
140
|
+
}
|
|
141
|
+
export interface OpenAPISecurity {
|
|
142
|
+
[name: string]: string[];
|
|
143
|
+
}
|
|
144
|
+
/** OpenAPI Component (schemas, parameters, responses, ...). */
|
|
145
|
+
export interface OpenAPIComponents {
|
|
146
|
+
schemas?: Record<string, JSONSchema>;
|
|
147
|
+
parameters?: Record<string, OpenAPIParameter>;
|
|
148
|
+
responses?: Record<string, OpenAPIResponse>;
|
|
149
|
+
requestBodies?: Record<string, OpenAPIRequestBody>;
|
|
150
|
+
headers?: Record<string, OpenAPIParameter>;
|
|
151
|
+
securitySchemes?: Record<string, OpenAPISecurityScheme>;
|
|
152
|
+
links?: Record<string, OpenAPILink>;
|
|
153
|
+
}
|
|
154
|
+
export interface OpenAPISecurityScheme {
|
|
155
|
+
type: "apiKey" | "http" | "oauth2" | "openIdConnect" | "mutualTLS";
|
|
156
|
+
description?: string;
|
|
157
|
+
name?: string;
|
|
158
|
+
in?: "query" | "header" | "cookie";
|
|
159
|
+
scheme?: string;
|
|
160
|
+
bearerFormat?: string;
|
|
161
|
+
flows?: unknown;
|
|
162
|
+
openIdConnectUrl?: string;
|
|
163
|
+
}
|
|
164
|
+
export interface OpenAPIDocument {
|
|
165
|
+
openapi: "3.1.0";
|
|
166
|
+
info: OpenAPIInfo;
|
|
167
|
+
servers?: OpenAPIServer[];
|
|
168
|
+
paths: Record<string, OpenAPIPath>;
|
|
169
|
+
components?: OpenAPIComponents;
|
|
170
|
+
tags?: OpenAPITag[];
|
|
171
|
+
externalDocs?: {
|
|
172
|
+
url: string;
|
|
173
|
+
description?: string;
|
|
174
|
+
};
|
|
175
|
+
security?: OpenAPISecurity[];
|
|
176
|
+
webhooks?: Record<string, OpenAPIPath | OpenAPIOperation>;
|
|
177
|
+
}
|
|
178
|
+
export interface JSONSchema {
|
|
179
|
+
$ref?: string;
|
|
180
|
+
type?: "string" | "number" | "integer" | "boolean" | "object" | "array" | "null" | (string & {});
|
|
181
|
+
format?: string;
|
|
182
|
+
title?: string;
|
|
183
|
+
description?: string;
|
|
184
|
+
default?: unknown;
|
|
185
|
+
example?: unknown;
|
|
186
|
+
enum?: unknown[];
|
|
187
|
+
const?: unknown;
|
|
188
|
+
properties?: Record<string, JSONSchema>;
|
|
189
|
+
required?: string[];
|
|
190
|
+
additionalProperties?: boolean | JSONSchema;
|
|
191
|
+
items?: JSONSchema;
|
|
192
|
+
prefixItems?: JSONSchema[];
|
|
193
|
+
minItems?: number;
|
|
194
|
+
maxItems?: number;
|
|
195
|
+
uniqueItems?: boolean;
|
|
196
|
+
minimum?: number;
|
|
197
|
+
maximum?: number;
|
|
198
|
+
minLength?: number;
|
|
199
|
+
maxLength?: number;
|
|
200
|
+
pattern?: string;
|
|
201
|
+
nullable?: boolean;
|
|
202
|
+
oneOf?: JSONSchema[];
|
|
203
|
+
anyOf?: JSONSchema[];
|
|
204
|
+
allOf?: JSONSchema[];
|
|
205
|
+
not?: JSONSchema;
|
|
206
|
+
$defs?: Record<string, JSONSchema>;
|
|
207
|
+
$schema?: string;
|
|
208
|
+
}
|
|
209
|
+
export interface ApiOperationOptions {
|
|
210
|
+
summary?: string;
|
|
211
|
+
description?: string;
|
|
212
|
+
operationId?: string;
|
|
213
|
+
deprecated?: boolean;
|
|
214
|
+
tags?: string[];
|
|
215
|
+
}
|
|
216
|
+
export interface ApiResponseOptions {
|
|
217
|
+
description: string;
|
|
218
|
+
schema?: unknown;
|
|
219
|
+
headers?: Record<string, OpenAPIParameter>;
|
|
220
|
+
example?: unknown;
|
|
221
|
+
examples?: Record<string, {
|
|
222
|
+
summary?: string;
|
|
223
|
+
value: unknown;
|
|
224
|
+
}>;
|
|
225
|
+
}
|
|
226
|
+
export interface ApiParamOptions {
|
|
227
|
+
name: string;
|
|
228
|
+
description?: string;
|
|
229
|
+
required?: boolean;
|
|
230
|
+
schema?: unknown;
|
|
231
|
+
example?: unknown;
|
|
232
|
+
}
|
|
233
|
+
export interface ApiQueryOptions extends Omit<ApiParamOptions, "name"> {
|
|
234
|
+
name: string;
|
|
235
|
+
}
|
|
236
|
+
export interface ApiBodyOptions {
|
|
237
|
+
description?: string;
|
|
238
|
+
required?: boolean;
|
|
239
|
+
schema?: unknown;
|
|
240
|
+
example?: unknown;
|
|
241
|
+
}
|
|
242
|
+
export interface ApiPropertyOptions {
|
|
243
|
+
description?: string;
|
|
244
|
+
required?: boolean;
|
|
245
|
+
example?: unknown;
|
|
246
|
+
deprecated?: boolean;
|
|
247
|
+
format?: string;
|
|
248
|
+
schema?: unknown;
|
|
249
|
+
}
|
|
250
|
+
export interface ApiSecurityOptions {
|
|
251
|
+
[name: string]: string[];
|
|
252
|
+
}
|
|
253
|
+
export declare const OPENAPI_META: {
|
|
254
|
+
readonly TAGS: "nexus:openapi:tags";
|
|
255
|
+
readonly OPERATION: "nexus:openapi:operation";
|
|
256
|
+
readonly RESPONSES: "nexus:openapi:responses";
|
|
257
|
+
readonly PARAMS: "nexus:openapi:params";
|
|
258
|
+
readonly QUERIES: "nexus:openapi:queries";
|
|
259
|
+
readonly BODY: "nexus:openapi:body";
|
|
260
|
+
readonly PROPERTIES: "nexus:openapi:properties";
|
|
261
|
+
readonly SECURITY: "nexus:openapi:security";
|
|
262
|
+
readonly EXCLUDE: "nexus:openapi:exclude";
|
|
263
|
+
readonly PRODUCES: "nexus:openapi:produces";
|
|
264
|
+
readonly CONSUMES: "nexus:openapi:consumes";
|
|
265
|
+
};
|
|
266
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/openapi/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,kBAAkB,CAAC;AAM1B,MAAM,WAAW,aAAa;IAC7B,4BAA4B;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,2CAA2C;IAC3C,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;IACpB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,YAAY,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACrD;AAED,MAAM,WAAW,WAAW;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1D,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACzC;AAED,MAAM,WAAW,aAAa;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,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