@venizia/ignis-kernel 0.3.0 → 0.3.2
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/dist/cjs/base/applications/abstract.js.map +1 -1
- package/dist/cjs/base/applications/artifact-group.js.map +1 -1
- package/dist/cjs/base/applications/artifact-index.js.map +1 -1
- package/dist/cjs/base/applications/boot-sequence.js.map +1 -1
- package/dist/cjs/base/applications/common/constants.js.map +1 -1
- package/dist/cjs/base/applications/common/index.js.map +1 -1
- package/dist/cjs/base/applications/common/types/application.js.map +1 -1
- package/dist/cjs/base/applications/common/types/artifacts.js.map +1 -1
- package/dist/cjs/base/applications/common/types/index.js.map +1 -1
- package/dist/cjs/base/applications/common/types/middlewares.js.map +1 -1
- package/dist/cjs/base/applications/index.js.map +1 -1
- package/dist/cjs/base/applications/rest.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/common/codecs.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/common/constants/authentication.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/common/constants/index.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/common/constants/jose.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/common/constants/service-assertion.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/common/errors.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/common/index.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/common/keys.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/common/types/basic.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/common/types/index.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/common/types/jwt.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/common/types/options.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/common/types/rest.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/common/types/service.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/common/types/strategy.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/index.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/middlewares/authenticate.middleware.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/middlewares/index.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/providers/authentication.provider.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/providers/index.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/strategies/index.js.map +1 -1
- package/dist/cjs/base/auth/authenticate/strategies/strategy-registry.js.map +1 -1
- package/dist/cjs/base/auth/authorize/builders/grant.builder.js.map +1 -1
- package/dist/cjs/base/auth/authorize/builders/index.js.map +1 -1
- package/dist/cjs/base/auth/authorize/builders/permission.builder.js.map +1 -1
- package/dist/cjs/base/auth/authorize/builders/policy.builder.js.map +1 -1
- package/dist/cjs/base/auth/authorize/common/constants/authorization.js.map +1 -1
- package/dist/cjs/base/auth/authorize/common/constants/binding-keys.js.map +1 -1
- package/dist/cjs/base/auth/authorize/common/constants/enforcer.js.map +1 -1
- package/dist/cjs/base/auth/authorize/common/constants/index.js.map +1 -1
- package/dist/cjs/base/auth/authorize/common/errors.js.map +1 -1
- package/dist/cjs/base/auth/authorize/common/index.js.map +1 -1
- package/dist/cjs/base/auth/authorize/common/types/enforcer.js.map +1 -1
- package/dist/cjs/base/auth/authorize/common/types/grant.js.map +1 -1
- package/dist/cjs/base/auth/authorize/common/types/index.js.map +1 -1
- package/dist/cjs/base/auth/authorize/common/types/request.js.map +1 -1
- package/dist/cjs/base/auth/authorize/enforcers/enforcer-registry.js.map +1 -1
- package/dist/cjs/base/auth/authorize/enforcers/index.js.map +1 -1
- package/dist/cjs/base/auth/authorize/index.js.map +1 -1
- package/dist/cjs/base/auth/authorize/middlewares/authorize.middleware.js.map +1 -1
- package/dist/cjs/base/auth/authorize/middlewares/index.js.map +1 -1
- package/dist/cjs/base/auth/authorize/models/authorization-role.model.js.map +1 -1
- package/dist/cjs/base/auth/authorize/models/index.js.map +1 -1
- package/dist/cjs/base/auth/authorize/providers/authorization.provider.js.map +1 -1
- package/dist/cjs/base/auth/authorize/providers/index.js.map +1 -1
- package/dist/cjs/base/auth/authorize/providers/request-domain.js.map +1 -1
- package/dist/cjs/base/auth/base/abstract-auth-registry.js.map +1 -1
- package/dist/cjs/base/auth/base/index.js.map +1 -1
- package/dist/cjs/base/auth/context-variables.js.map +1 -1
- package/dist/cjs/base/auth/index.js.map +1 -1
- package/dist/cjs/base/auth/models/index.js.map +1 -1
- package/dist/cjs/base/auth/models/requests/change-password.schema.js.map +1 -1
- package/dist/cjs/base/auth/models/requests/index.js.map +1 -1
- package/dist/cjs/base/auth/models/requests/sign-in.schema.js.map +1 -1
- package/dist/cjs/base/auth/models/requests/sign-up.schema.js.map +1 -1
- package/dist/cjs/base/components/base.js.map +1 -1
- package/dist/cjs/base/components/controller/index.js.map +1 -1
- package/dist/cjs/base/components/controller/rest/common/index.js.map +1 -1
- package/dist/cjs/base/components/controller/rest/common/types.js.map +1 -1
- package/dist/cjs/base/components/controller/rest/index.js.map +1 -1
- package/dist/cjs/base/components/controller/rest/rest.component.js.map +1 -1
- package/dist/cjs/base/components/index.js.map +1 -1
- package/dist/cjs/base/configurations/base.js.map +1 -1
- package/dist/cjs/base/configurations/common/index.js.map +1 -1
- package/dist/cjs/base/configurations/common/types.js.map +1 -1
- package/dist/cjs/base/configurations/index.js.map +1 -1
- package/dist/cjs/base/controllers/common/constants.js.map +1 -1
- package/dist/cjs/base/controllers/common/html-response.js.map +1 -1
- package/dist/cjs/base/controllers/common/index.js.map +1 -1
- package/dist/cjs/base/controllers/common/schema-builders.js.map +1 -1
- package/dist/cjs/base/controllers/common/schemas.js.map +1 -1
- package/dist/cjs/base/controllers/common/types/context.js.map +1 -1
- package/dist/cjs/base/controllers/common/types/controller.js.map +1 -1
- package/dist/cjs/base/controllers/common/types/index.js.map +1 -1
- package/dist/cjs/base/controllers/common/types/route.js.map +1 -1
- package/dist/cjs/base/controllers/context.js.map +1 -1
- package/dist/cjs/base/controllers/factory/controller.js.map +1 -1
- package/dist/cjs/base/controllers/factory/crud/abstract.js.map +1 -1
- package/dist/cjs/base/controllers/factory/crud/index.js.map +1 -1
- package/dist/cjs/base/controllers/factory/crud/persistable.js.map +1 -1
- package/dist/cjs/base/controllers/factory/crud/readable.js.map +1 -1
- package/dist/cjs/base/controllers/factory/definition.js.map +1 -1
- package/dist/cjs/base/controllers/factory/helper.js.map +1 -1
- package/dist/cjs/base/controllers/factory/index.js.map +1 -1
- package/dist/cjs/base/controllers/factory/repository-injection.js.map +1 -1
- package/dist/cjs/base/controllers/index.js.map +1 -1
- package/dist/cjs/base/controllers/rest/abstract.js.map +1 -1
- package/dist/cjs/base/controllers/rest/base.js.map +1 -1
- package/dist/cjs/base/controllers/rest/extras.js.map +1 -1
- package/dist/cjs/base/controllers/rest/index.js.map +1 -1
- package/dist/cjs/base/datasources/abstract.js.map +1 -1
- package/dist/cjs/base/datasources/common/index.js.map +1 -1
- package/dist/cjs/base/datasources/common/types.js.map +1 -1
- package/dist/cjs/base/datasources/index.js.map +1 -1
- package/dist/cjs/base/events/common/constants.js.map +1 -1
- package/dist/cjs/base/events/common/index.js.map +1 -1
- package/dist/cjs/base/events/common/types.js.map +1 -1
- package/dist/cjs/base/events/event-bus.js.map +1 -1
- package/dist/cjs/base/events/index.js.map +1 -1
- package/dist/cjs/base/index.js.map +1 -1
- package/dist/cjs/base/metadata/artifact-keys.js.map +1 -1
- package/dist/cjs/base/metadata/index.js.map +1 -1
- package/dist/cjs/base/metadata/injectable.js.map +1 -1
- package/dist/cjs/base/metadata/injectors.js.map +1 -1
- package/dist/cjs/base/metadata/persistents.js.map +1 -1
- package/dist/cjs/base/metadata/routes/common.js.map +1 -1
- package/dist/cjs/base/metadata/routes/controller.js.map +1 -1
- package/dist/cjs/base/metadata/routes/index.js.map +1 -1
- package/dist/cjs/base/metadata/routes/rest.js.map +1 -1
- package/dist/cjs/base/metadata/routes/rpc.js.map +1 -1
- package/dist/cjs/base/middlewares/app-error/app-error.middleware.js.map +1 -1
- package/dist/cjs/base/middlewares/app-error/common/index.js.map +1 -1
- package/dist/cjs/base/middlewares/app-error/common/types.js.map +1 -1
- package/dist/cjs/base/middlewares/app-error/database.handler.js.map +1 -1
- package/dist/cjs/base/middlewares/app-error/definition.js.map +1 -1
- package/dist/cjs/base/middlewares/app-error/index.js.map +1 -1
- package/dist/cjs/base/middlewares/app-error/zod.handler.js.map +1 -1
- package/dist/cjs/base/middlewares/common/constants.js.map +1 -1
- package/dist/cjs/base/middlewares/common/errors.js.map +1 -1
- package/dist/cjs/base/middlewares/common/index.js.map +1 -1
- package/dist/cjs/base/middlewares/emoji-favicon/emoji-favicon.middleware.js.map +1 -1
- package/dist/cjs/base/middlewares/emoji-favicon/index.js.map +1 -1
- package/dist/cjs/base/middlewares/form-body/form-body.middleware.js.map +1 -1
- package/dist/cjs/base/middlewares/index.js.map +1 -1
- package/dist/cjs/base/middlewares/not-found/index.js.map +1 -1
- package/dist/cjs/base/middlewares/not-found/not-found.middleware.js.map +1 -1
- package/dist/cjs/base/mixins/common/index.js.map +1 -1
- package/dist/cjs/base/mixins/common/types.js.map +1 -1
- package/dist/cjs/base/mixins/index.js.map +1 -1
- package/dist/cjs/base/models/base.js.map +1 -1
- package/dist/cjs/base/models/common/constants.js.map +1 -1
- package/dist/cjs/base/models/common/index.js.map +1 -1
- package/dist/cjs/base/models/common/schemas.js.map +1 -1
- package/dist/cjs/base/models/common/types/id.js.map +1 -1
- package/dist/cjs/base/models/common/types/index.js.map +1 -1
- package/dist/cjs/base/models/common/utilities.js.map +1 -1
- package/dist/cjs/base/models/index.js.map +1 -1
- package/dist/cjs/base/providers/base.js.map +1 -1
- package/dist/cjs/base/providers/index.js.map +1 -1
- package/dist/cjs/base/repositories/common/constants.js.map +1 -1
- package/dist/cjs/base/repositories/common/errors.js.map +1 -1
- package/dist/cjs/base/repositories/common/extra-request.js.map +1 -1
- package/dist/cjs/base/repositories/common/index.js.map +1 -1
- package/dist/cjs/base/repositories/common/response-reader.js.map +1 -1
- package/dist/cjs/base/repositories/common/types/contracts.js.map +1 -1
- package/dist/cjs/base/repositories/common/types/index.js.map +1 -1
- package/dist/cjs/base/repositories/common/types/options.js.map +1 -1
- package/dist/cjs/base/repositories/common/types/query.js.map +1 -1
- package/dist/cjs/base/repositories/common/types/result-schemas.js.map +1 -1
- package/dist/cjs/base/repositories/common/types/results.js.map +1 -1
- package/dist/cjs/base/repositories/core/abstract.js.map +1 -1
- package/dist/cjs/base/repositories/core/index.js.map +1 -1
- package/dist/cjs/base/repositories/index.js.map +1 -1
- package/dist/cjs/base/repositories/query-schemas/index.js.map +1 -1
- package/dist/cjs/base/request-context/common/index.js.map +1 -1
- package/dist/cjs/base/request-context/common/types.js.map +1 -1
- package/dist/cjs/base/request-context/index.js.map +1 -1
- package/dist/cjs/base/request-context/registry.js.map +1 -1
- package/dist/cjs/base/services/base.js.map +1 -1
- package/dist/cjs/base/services/common/index.js.map +1 -1
- package/dist/cjs/base/services/common/types.js.map +1 -1
- package/dist/cjs/base/services/index.js.map +1 -1
- package/dist/cjs/common/bindings.js.map +1 -1
- package/dist/cjs/common/error-codes.js.map +1 -1
- package/dist/cjs/common/index.js.map +1 -1
- package/dist/cjs/common/statuses/common.js.map +1 -1
- package/dist/cjs/common/statuses/index.js.map +1 -1
- package/dist/cjs/common/statuses/migration.js.map +1 -1
- package/dist/cjs/common/statuses/role.js.map +1 -1
- package/dist/cjs/common/statuses/user.js.map +1 -1
- package/dist/cjs/helpers/index.js.map +1 -1
- package/dist/cjs/helpers/inversion/common/constants.js.map +1 -1
- package/dist/cjs/helpers/inversion/common/index.js.map +1 -1
- package/dist/cjs/helpers/inversion/common/keys.js.map +1 -1
- package/dist/cjs/helpers/inversion/common/relation-builder.js.map +1 -1
- package/dist/cjs/helpers/inversion/common/types/artifact.js.map +1 -1
- package/dist/cjs/helpers/inversion/common/types/controller.js.map +1 -1
- package/dist/cjs/helpers/inversion/common/types/index.js.map +1 -1
- package/dist/cjs/helpers/inversion/common/types/injection.js.map +1 -1
- package/dist/cjs/helpers/inversion/common/types/model.js.map +1 -1
- package/dist/cjs/helpers/inversion/common/types/persistence.js.map +1 -1
- package/dist/cjs/helpers/inversion/container.js.map +1 -1
- package/dist/cjs/helpers/inversion/index.js.map +1 -1
- package/dist/cjs/helpers/inversion/mixins/artifact.mixin.js.map +1 -1
- package/dist/cjs/helpers/inversion/mixins/controllers/controller.js.map +1 -1
- package/dist/cjs/helpers/inversion/mixins/controllers/grpc.js.map +1 -1
- package/dist/cjs/helpers/inversion/mixins/controllers/index.js.map +1 -1
- package/dist/cjs/helpers/inversion/mixins/controllers/rest.js.map +1 -1
- package/dist/cjs/helpers/inversion/mixins/datasource.mixin.js.map +1 -1
- package/dist/cjs/helpers/inversion/mixins/index.js.map +1 -1
- package/dist/cjs/helpers/inversion/mixins/model.mixin.js.map +1 -1
- package/dist/cjs/helpers/inversion/mixins/repository.mixin.js.map +1 -1
- package/dist/cjs/helpers/inversion/registry.js.map +1 -1
- package/dist/cjs/helpers/singleton-realm.js.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/metadata.js.map +1 -1
- package/dist/cjs/repository.js.map +1 -1
- package/dist/cjs/utilities/error.utility.js.map +1 -1
- package/dist/cjs/utilities/index.js.map +1 -1
- package/dist/esm/base/applications/abstract.js.map +1 -1
- package/dist/esm/base/applications/artifact-group.js.map +1 -1
- package/dist/esm/base/applications/artifact-index.js.map +1 -1
- package/dist/esm/base/applications/boot-sequence.js.map +1 -1
- package/dist/esm/base/applications/common/constants.js.map +1 -1
- package/dist/esm/base/applications/common/index.js.map +1 -1
- package/dist/esm/base/applications/common/types/application.js.map +1 -1
- package/dist/esm/base/applications/common/types/artifacts.js.map +1 -1
- package/dist/esm/base/applications/common/types/index.js.map +1 -1
- package/dist/esm/base/applications/common/types/middlewares.js.map +1 -1
- package/dist/esm/base/applications/index.js.map +1 -1
- package/dist/esm/base/applications/rest.js.map +1 -1
- package/dist/esm/base/auth/authenticate/common/codecs.js.map +1 -1
- package/dist/esm/base/auth/authenticate/common/constants/authentication.js.map +1 -1
- package/dist/esm/base/auth/authenticate/common/constants/index.js.map +1 -1
- package/dist/esm/base/auth/authenticate/common/constants/jose.js.map +1 -1
- package/dist/esm/base/auth/authenticate/common/constants/service-assertion.js.map +1 -1
- package/dist/esm/base/auth/authenticate/common/errors.js.map +1 -1
- package/dist/esm/base/auth/authenticate/common/index.js.map +1 -1
- package/dist/esm/base/auth/authenticate/common/keys.js.map +1 -1
- package/dist/esm/base/auth/authenticate/common/types/basic.js.map +1 -1
- package/dist/esm/base/auth/authenticate/common/types/index.js.map +1 -1
- package/dist/esm/base/auth/authenticate/common/types/jwt.js.map +1 -1
- package/dist/esm/base/auth/authenticate/common/types/options.js.map +1 -1
- package/dist/esm/base/auth/authenticate/common/types/rest.js.map +1 -1
- package/dist/esm/base/auth/authenticate/common/types/service.js.map +1 -1
- package/dist/esm/base/auth/authenticate/common/types/strategy.js.map +1 -1
- package/dist/esm/base/auth/authenticate/index.js.map +1 -1
- package/dist/esm/base/auth/authenticate/middlewares/authenticate.middleware.js.map +1 -1
- package/dist/esm/base/auth/authenticate/middlewares/index.js.map +1 -1
- package/dist/esm/base/auth/authenticate/providers/authentication.provider.js.map +1 -1
- package/dist/esm/base/auth/authenticate/providers/index.js.map +1 -1
- package/dist/esm/base/auth/authenticate/strategies/index.js.map +1 -1
- package/dist/esm/base/auth/authenticate/strategies/strategy-registry.js.map +1 -1
- package/dist/esm/base/auth/authorize/builders/grant.builder.js.map +1 -1
- package/dist/esm/base/auth/authorize/builders/index.js.map +1 -1
- package/dist/esm/base/auth/authorize/builders/permission.builder.js.map +1 -1
- package/dist/esm/base/auth/authorize/builders/policy.builder.js.map +1 -1
- package/dist/esm/base/auth/authorize/common/constants/authorization.js.map +1 -1
- package/dist/esm/base/auth/authorize/common/constants/binding-keys.js.map +1 -1
- package/dist/esm/base/auth/authorize/common/constants/enforcer.js.map +1 -1
- package/dist/esm/base/auth/authorize/common/constants/index.js.map +1 -1
- package/dist/esm/base/auth/authorize/common/errors.js.map +1 -1
- package/dist/esm/base/auth/authorize/common/index.js.map +1 -1
- package/dist/esm/base/auth/authorize/common/types/enforcer.js.map +1 -1
- package/dist/esm/base/auth/authorize/common/types/grant.js.map +1 -1
- package/dist/esm/base/auth/authorize/common/types/index.js.map +1 -1
- package/dist/esm/base/auth/authorize/common/types/request.js.map +1 -1
- package/dist/esm/base/auth/authorize/enforcers/enforcer-registry.js.map +1 -1
- package/dist/esm/base/auth/authorize/enforcers/index.js.map +1 -1
- package/dist/esm/base/auth/authorize/index.js.map +1 -1
- package/dist/esm/base/auth/authorize/middlewares/authorize.middleware.js.map +1 -1
- package/dist/esm/base/auth/authorize/middlewares/index.js.map +1 -1
- package/dist/esm/base/auth/authorize/models/authorization-role.model.js.map +1 -1
- package/dist/esm/base/auth/authorize/models/index.js.map +1 -1
- package/dist/esm/base/auth/authorize/providers/authorization.provider.js.map +1 -1
- package/dist/esm/base/auth/authorize/providers/index.js.map +1 -1
- package/dist/esm/base/auth/authorize/providers/request-domain.js.map +1 -1
- package/dist/esm/base/auth/base/abstract-auth-registry.js.map +1 -1
- package/dist/esm/base/auth/base/index.js.map +1 -1
- package/dist/esm/base/auth/context-variables.js.map +1 -1
- package/dist/esm/base/auth/index.js.map +1 -1
- package/dist/esm/base/auth/models/index.js.map +1 -1
- package/dist/esm/base/auth/models/requests/change-password.schema.js.map +1 -1
- package/dist/esm/base/auth/models/requests/index.js.map +1 -1
- package/dist/esm/base/auth/models/requests/sign-in.schema.js.map +1 -1
- package/dist/esm/base/auth/models/requests/sign-up.schema.js.map +1 -1
- package/dist/esm/base/components/base.js.map +1 -1
- package/dist/esm/base/components/controller/index.js.map +1 -1
- package/dist/esm/base/components/controller/rest/common/index.js.map +1 -1
- package/dist/esm/base/components/controller/rest/common/types.js.map +1 -1
- package/dist/esm/base/components/controller/rest/index.js.map +1 -1
- package/dist/esm/base/components/controller/rest/rest.component.js.map +1 -1
- package/dist/esm/base/components/index.js.map +1 -1
- package/dist/esm/base/configurations/base.js.map +1 -1
- package/dist/esm/base/configurations/common/index.js.map +1 -1
- package/dist/esm/base/configurations/common/types.js.map +1 -1
- package/dist/esm/base/configurations/index.js.map +1 -1
- package/dist/esm/base/controllers/common/constants.js.map +1 -1
- package/dist/esm/base/controllers/common/html-response.js.map +1 -1
- package/dist/esm/base/controllers/common/index.js.map +1 -1
- package/dist/esm/base/controllers/common/schema-builders.js.map +1 -1
- package/dist/esm/base/controllers/common/schemas.js.map +1 -1
- package/dist/esm/base/controllers/common/types/context.js.map +1 -1
- package/dist/esm/base/controllers/common/types/controller.js.map +1 -1
- package/dist/esm/base/controllers/common/types/index.js.map +1 -1
- package/dist/esm/base/controllers/common/types/route.js.map +1 -1
- package/dist/esm/base/controllers/context.js.map +1 -1
- package/dist/esm/base/controllers/factory/controller.js.map +1 -1
- package/dist/esm/base/controllers/factory/crud/abstract.js.map +1 -1
- package/dist/esm/base/controllers/factory/crud/index.js.map +1 -1
- package/dist/esm/base/controllers/factory/crud/persistable.js.map +1 -1
- package/dist/esm/base/controllers/factory/crud/readable.js.map +1 -1
- package/dist/esm/base/controllers/factory/definition.js.map +1 -1
- package/dist/esm/base/controllers/factory/helper.js.map +1 -1
- package/dist/esm/base/controllers/factory/index.js.map +1 -1
- package/dist/esm/base/controllers/factory/repository-injection.js.map +1 -1
- package/dist/esm/base/controllers/index.js.map +1 -1
- package/dist/esm/base/controllers/rest/abstract.js.map +1 -1
- package/dist/esm/base/controllers/rest/base.js.map +1 -1
- package/dist/esm/base/controllers/rest/extras.js.map +1 -1
- package/dist/esm/base/controllers/rest/index.js.map +1 -1
- package/dist/esm/base/datasources/abstract.js.map +1 -1
- package/dist/esm/base/datasources/common/index.js.map +1 -1
- package/dist/esm/base/datasources/common/types.js.map +1 -1
- package/dist/esm/base/datasources/index.js.map +1 -1
- package/dist/esm/base/events/common/constants.js.map +1 -1
- package/dist/esm/base/events/common/index.js.map +1 -1
- package/dist/esm/base/events/common/types.js.map +1 -1
- package/dist/esm/base/events/event-bus.js.map +1 -1
- package/dist/esm/base/events/index.js.map +1 -1
- package/dist/esm/base/index.js.map +1 -1
- package/dist/esm/base/metadata/artifact-keys.js.map +1 -1
- package/dist/esm/base/metadata/index.js.map +1 -1
- package/dist/esm/base/metadata/injectable.js.map +1 -1
- package/dist/esm/base/metadata/injectors.js.map +1 -1
- package/dist/esm/base/metadata/persistents.js.map +1 -1
- package/dist/esm/base/metadata/routes/common.js.map +1 -1
- package/dist/esm/base/metadata/routes/controller.js.map +1 -1
- package/dist/esm/base/metadata/routes/index.js.map +1 -1
- package/dist/esm/base/metadata/routes/rest.js.map +1 -1
- package/dist/esm/base/metadata/routes/rpc.js.map +1 -1
- package/dist/esm/base/middlewares/app-error/app-error.middleware.js.map +1 -1
- package/dist/esm/base/middlewares/app-error/common/index.js.map +1 -1
- package/dist/esm/base/middlewares/app-error/common/types.js.map +1 -1
- package/dist/esm/base/middlewares/app-error/database.handler.js.map +1 -1
- package/dist/esm/base/middlewares/app-error/definition.js.map +1 -1
- package/dist/esm/base/middlewares/app-error/index.js.map +1 -1
- package/dist/esm/base/middlewares/app-error/zod.handler.js.map +1 -1
- package/dist/esm/base/middlewares/common/constants.js.map +1 -1
- package/dist/esm/base/middlewares/common/errors.js.map +1 -1
- package/dist/esm/base/middlewares/common/index.js.map +1 -1
- package/dist/esm/base/middlewares/emoji-favicon/emoji-favicon.middleware.js.map +1 -1
- package/dist/esm/base/middlewares/emoji-favicon/index.js.map +1 -1
- package/dist/esm/base/middlewares/form-body/form-body.middleware.js.map +1 -1
- package/dist/esm/base/middlewares/index.js.map +1 -1
- package/dist/esm/base/middlewares/not-found/index.js.map +1 -1
- package/dist/esm/base/middlewares/not-found/not-found.middleware.js.map +1 -1
- package/dist/esm/base/mixins/common/index.js.map +1 -1
- package/dist/esm/base/mixins/common/types.js.map +1 -1
- package/dist/esm/base/mixins/index.js.map +1 -1
- package/dist/esm/base/models/base.js.map +1 -1
- package/dist/esm/base/models/common/constants.js.map +1 -1
- package/dist/esm/base/models/common/index.js.map +1 -1
- package/dist/esm/base/models/common/schemas.js.map +1 -1
- package/dist/esm/base/models/common/types/id.js.map +1 -1
- package/dist/esm/base/models/common/types/index.js.map +1 -1
- package/dist/esm/base/models/common/utilities.js.map +1 -1
- package/dist/esm/base/models/index.js.map +1 -1
- package/dist/esm/base/providers/base.js.map +1 -1
- package/dist/esm/base/providers/index.js.map +1 -1
- package/dist/esm/base/repositories/common/constants.js.map +1 -1
- package/dist/esm/base/repositories/common/errors.js.map +1 -1
- package/dist/esm/base/repositories/common/extra-request.js.map +1 -1
- package/dist/esm/base/repositories/common/index.js.map +1 -1
- package/dist/esm/base/repositories/common/response-reader.js.map +1 -1
- package/dist/esm/base/repositories/common/types/contracts.js.map +1 -1
- package/dist/esm/base/repositories/common/types/index.js.map +1 -1
- package/dist/esm/base/repositories/common/types/options.js.map +1 -1
- package/dist/esm/base/repositories/common/types/query.js.map +1 -1
- package/dist/esm/base/repositories/common/types/result-schemas.js.map +1 -1
- package/dist/esm/base/repositories/common/types/results.js.map +1 -1
- package/dist/esm/base/repositories/core/abstract.js.map +1 -1
- package/dist/esm/base/repositories/core/index.js.map +1 -1
- package/dist/esm/base/repositories/index.js.map +1 -1
- package/dist/esm/base/repositories/query-schemas/index.js.map +1 -1
- package/dist/esm/base/request-context/common/index.js.map +1 -1
- package/dist/esm/base/request-context/common/types.js.map +1 -1
- package/dist/esm/base/request-context/index.js.map +1 -1
- package/dist/esm/base/request-context/registry.js.map +1 -1
- package/dist/esm/base/services/base.js.map +1 -1
- package/dist/esm/base/services/common/index.js.map +1 -1
- package/dist/esm/base/services/common/types.js.map +1 -1
- package/dist/esm/base/services/index.js.map +1 -1
- package/dist/esm/common/bindings.js.map +1 -1
- package/dist/esm/common/error-codes.js.map +1 -1
- package/dist/esm/common/index.js.map +1 -1
- package/dist/esm/common/statuses/common.js.map +1 -1
- package/dist/esm/common/statuses/index.js.map +1 -1
- package/dist/esm/common/statuses/migration.js.map +1 -1
- package/dist/esm/common/statuses/role.js.map +1 -1
- package/dist/esm/common/statuses/user.js.map +1 -1
- package/dist/esm/helpers/index.js.map +1 -1
- package/dist/esm/helpers/inversion/common/constants.js.map +1 -1
- package/dist/esm/helpers/inversion/common/index.js.map +1 -1
- package/dist/esm/helpers/inversion/common/keys.js.map +1 -1
- package/dist/esm/helpers/inversion/common/relation-builder.js.map +1 -1
- package/dist/esm/helpers/inversion/common/types/artifact.js.map +1 -1
- package/dist/esm/helpers/inversion/common/types/controller.js.map +1 -1
- package/dist/esm/helpers/inversion/common/types/index.js.map +1 -1
- package/dist/esm/helpers/inversion/common/types/injection.js.map +1 -1
- package/dist/esm/helpers/inversion/common/types/model.js.map +1 -1
- package/dist/esm/helpers/inversion/common/types/persistence.js.map +1 -1
- package/dist/esm/helpers/inversion/container.js.map +1 -1
- package/dist/esm/helpers/inversion/index.js.map +1 -1
- package/dist/esm/helpers/inversion/mixins/artifact.mixin.js.map +1 -1
- package/dist/esm/helpers/inversion/mixins/controllers/controller.js.map +1 -1
- package/dist/esm/helpers/inversion/mixins/controllers/grpc.js.map +1 -1
- package/dist/esm/helpers/inversion/mixins/controllers/index.js.map +1 -1
- package/dist/esm/helpers/inversion/mixins/controllers/rest.js.map +1 -1
- package/dist/esm/helpers/inversion/mixins/datasource.mixin.js.map +1 -1
- package/dist/esm/helpers/inversion/mixins/index.js.map +1 -1
- package/dist/esm/helpers/inversion/mixins/model.mixin.js.map +1 -1
- package/dist/esm/helpers/inversion/mixins/repository.mixin.js.map +1 -1
- package/dist/esm/helpers/inversion/registry.js.map +1 -1
- package/dist/esm/helpers/singleton-realm.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/metadata.js.map +1 -1
- package/dist/esm/repository.js.map +1 -1
- package/dist/esm/utilities/error.utility.js.map +1 -1
- package/dist/esm/utilities/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract.js","sourceRoot":"","sources":["../../../../src/base/applications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CAAC;aACnC,KAAK,CAAC,4CAA4C,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC1E,CAAC;IAES,KAAK,CAAC,oBAAoB;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAC/D,KAAK,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACtD,IAAI,CAAC;gBACH,MAAM,IAAI,EAAE,CAAC;YACf,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,CAAC,KAAK,CAAC,oDAAoD,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;YACxF,CAAC;QACH,CAAC;IACH,CAAC;IAES,oBAAoB;QAC5B,IAAI,CAAC,IAAI,CAAc;YACrB,GAAG,EAAE,uBAAY,CAAC,oBAAoB;SACvC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED,IAAI;QACF,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;CACF;AAhID,kDAgIC","sourcesContent":["import { CoreBindings } from '@/common/bindings';\nimport { Container } from '@/helpers/inversion/container';\nimport type { ValueOrPromise } from '@venizia/ignis-helpers/common';\nimport { getError } from '@venizia/ignis-helpers/core';\nimport { HTTP } from '@venizia/ignis-helpers/common';\nimport type { IApplicationConfigs, IApplicationInfo } from './common';\n\nexport abstract class AbstractApplication extends Container {\n protected configs: IApplicationConfigs;\n protected projectRoot: string;\n\n private postStartHooks: Array<{ identifier: string; hook: () => ValueOrPromise<void> }> = [];\n private postStopHooks: Array<{ identifier: string; hook: () => ValueOrPromise<void> }> = [];\n\n constructor(opts: { scope: string; config: IApplicationConfigs }) {\n const { scope, config } = opts;\n super({ scope });\n\n this.configs = Object.assign({}, config, {\n asyncContext: {\n enable: config?.asyncContext?.enable ?? this.getDefaultAsyncContextEnabled(),\n },\n });\n\n this.projectRoot = this.getProjectRoot();\n this.logger.for('constructor').info('Project root: %s', this.projectRoot);\n }\n\n abstract getAppInfo(): ValueOrPromise<IApplicationInfo>;\n abstract preConfigure(): ValueOrPromise<void>;\n\n /**\n * Runs after every registration sweep (datasources, components, controllers) has already\n * completed. Registering a new one here is not auto-registered and silently does nothing -\n * call `configure()` manually instead.\n */\n abstract postConfigure(): ValueOrPromise<void>;\n\n abstract staticConfigure(): void;\n\n abstract setupMiddlewares(opts?: {\n middlewares?: Record<string | symbol, any>;\n }): ValueOrPromise<void>;\n\n abstract initialize(): Promise<void>;\n\n protected getDefaultAsyncContextEnabled(): boolean {\n return false;\n }\n\n getProjectConfigs(): IApplicationConfigs {\n return this.configs;\n }\n\n getProjectRoot(): string {\n const projectRoot = '';\n this.bind<string>({ key: CoreBindings.APPLICATION_PROJECT_ROOT }).toValue(projectRoot);\n return projectRoot;\n }\n\n registerPostStartHook(opts: { identifier: string; hook: () => ValueOrPromise<void> }) {\n this.postStartHooks.push(opts);\n this.logger\n .for(this.registerPostStartHook.name)\n .debug('Registered post-start hook | identifier: %s', opts.identifier);\n }\n\n /** Runs every post-start hook in isolation - the server is already listening, so a throwing hook must not cancel the ones behind it; failures are collected and reported as one error at the end. */\n protected async executePostStartHooks() {\n if (this.postStartHooks.length === 0) {\n return;\n }\n\n const logger = this.logger.for(this.executePostStartHooks.name);\n logger.info('Executing %s post-start hook(s)...', this.postStartHooks.length);\n\n const failures: Array<{ identifier: string; error: unknown }> = [];\n\n for (const { identifier, hook } of this.postStartHooks) {\n const t = performance.now();\n\n try {\n await hook();\n } catch (error) {\n logger.error('Failed to execute hook | identifier: %s | error: %s', identifier, error);\n failures.push({ identifier, error });\n continue;\n }\n\n logger.info(\n 'Executed hook | identifier: %s | took: %s (ms)',\n identifier,\n performance.now() - t,\n );\n }\n\n if (failures.length === 0) {\n return;\n }\n\n throw getError({\n statusCode: HTTP.ResultCodes.RS_5.InternalServerError,\n message: `[executePostStartHooks] Failed post-start hook(s): ${failures\n .map(failure => `${failure.identifier} (${failure.error})`)\n .join(', ')}`,\n });\n }\n\n registerPostStopHook(opts: { identifier: string; hook: () => ValueOrPromise<void> }) {\n this.postStopHooks.push(opts);\n this.logger\n .for(this.registerPostStopHook.name)\n .debug('Registered post-stop hook | identifier: %s', opts.identifier);\n }\n\n protected async executePostStopHooks() {\n const logger = this.logger.for(this.executePostStopHooks.name);\n for (const { identifier, hook } of this.postStopHooks) {\n try {\n await hook();\n } catch (error) {\n logger.error('Post-stop hook failed | identifier: %s | error: %s', identifier, error);\n }\n }\n }\n\n protected registerCoreBindings() {\n this.bind<typeof this>({\n key: CoreBindings.APPLICATION_INSTANCE,\n }).toProvider(_ => this);\n }\n\n init() {\n this.registerCoreBindings();\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-group.js","sourceRoot":"","sources":["../../../../src/base/applications/artifact-group.ts"],"names":[],"mappings":";;;AAAA,+DAA2D;AAC3D,sDAAuD;AAKvD,sXAAsX;AACtX,MAAa,aAAa;IACxB,kIAAkI;aAClH,cAAS,GAAG,iBAAiB,AAApB,CAAqB;IAC9C,uGAAuG;aACvF,wBAAmB,GAAG,yBAAyB,AAA5B,CAA6B;IAMhE,YAAoB,IAOnB;QAXQ,oBAAe,GAAG,IAAa,CAAC;QAYvC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC5B,CAAC;IAOD,2FAA2F;IAC3F,MAAM,CAAC,MAAM,C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AAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACpE,IAAI,MAAM,IAAI,CAAC,uCAAuC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAClE,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;;AA1KH,sCA2KC","sourcesContent":["import { SingletonRealm } from '@/helpers/singleton-realm';\nimport { getError } from '@venizia/ignis-helpers/core';\nimport type { IArtifactGroup, IArtifactIndex } from './common';\n\ntype TGroupResolver = (opts: { group: IArtifactGroup }) => Promise<IArtifactIndex>;\n\n/** A typed slice of a shared package's artifacts - every decorated class under a directory named `folder` in the package that defined it. A package declares one per domain, once; an application borrows it in `configs.artifacts`. The content is filled by `@venizia/ignis-boot`: inlined when the application is built, or resolved from source when artifacts are registered. */\nexport class ArtifactGroup implements IArtifactGroup {\n /** A string brand, so the group protocol is structural: `@venizia/ignis-boot/auto` builds one without depending on the kernel. */\n static readonly BRAND_KEY = 'isArtifactGroup';\n /** The realm slot `@venizia/ignis-boot` fills with the resolver for groups defined without content. */\n static readonly SINGLETON_REALM_KEY = 'artifact-group-resolver';\n\n readonly isArtifactGroup = true as const;\n readonly resolve: (() => Promise<IArtifactIndex>) | undefined;\n readonly kinds: ReadonlyArray<keyof IArtifactIndex> | undefined;\n\n private constructor(opts: {\n folder: string | undefined;\n site: string | undefined;\n content: IArtifactIndex | undefined;\n resolve?: () => Promise<IArtifactIndex>;\n kinds?: ReadonlyArray<keyof IArtifactIndex>;\n ignore?: ReadonlyArray<string>;\n }) {\n this.folder = opts.folder;\n this.site = opts.site;\n this.content = opts.content;\n this.resolve = opts.resolve;\n this.kinds = opts.kinds;\n this.ignore = opts.ignore;\n }\n\n readonly folder: string | undefined;\n readonly site: string | undefined;\n readonly content: IArtifactIndex | undefined;\n readonly ignore: ReadonlyArray<string> | undefined;\n\n /** `content` is written by the build plugin; a hand-written group passes only `folder`. */\n static define(opts: { folder: string; content?: IArtifactIndex }): ArtifactGroup {\n return new ArtifactGroup({\n folder: opts.folder,\n site: ArtifactGroup.callSite(),\n content: opts.content,\n });\n }\n\n /** Every decorated class of the calling package - an application's own artifacts, picked by its call site, so several applications in one process each get their own. `ignore` takes the globs `ignis-artifacts --ignore` takes, relative to the package `src`. `content` is written by the build plugin. */\n static application(\n opts: { ignore?: ReadonlyArray<string>; content?: IArtifactIndex } = {},\n ): ArtifactGroup {\n return new ArtifactGroup({\n folder: undefined,\n site: ArtifactGroup.callSite(),\n content: opts.content,\n ignore: opts.ignore,\n });\n }\n\n /** A group carrying only `kinds` - for a slicer that splits `configs.artifacts` by run mode. The source group is resolved when artifacts are registered, never here. */\n static pick(opts: {\n group: IArtifactGroup;\n kinds: ReadonlyArray<keyof IArtifactIndex>;\n }): ArtifactGroup {\n const { group, kinds } = opts;\n const slice = (index: IArtifactIndex): IArtifactIndex =>\n Object.fromEntries(\n kinds.filter(kind => index[kind] !== undefined).map(kind => [kind, index[kind]]),\n );\n\n return new ArtifactGroup({\n folder: group.folder,\n site: group.site,\n content: group.content ? slice(group.content) : undefined,\n resolve: async () => slice(await ArtifactGroup.resolveContent({ group })),\n kinds,\n ignore: group.ignore,\n });\n }\n\n /** A group's classes: inlined by a build, else its own `resolve()`, else the resolver `@venizia/ignis-boot/auto` installs. */\n static async resolveContent(opts: { group: IArtifactGroup }): Promise<IArtifactIndex> {\n const { group } = opts;\n if (group.content) {\n return group.content;\n }\n if (group.resolve) {\n return group.resolve();\n }\n const resolve = ArtifactGroup.getResolver();\n if (!resolve) {\n throw getError({\n message: `[ArtifactGroup] '${group.folder ?? '<application>'}' has no content | Import @venizia/ignis-boot/auto in the application (it resolves groups from source), or add IgnisArtifactsPlugin to the build's plugins`,\n });\n }\n return resolve({ group });\n }\n\n /** Positional on purpose: a type predicate narrows its own parameter, and an options object would narrow the wrapper instead of `value`. */\n static isGroup(value: unknown): value is IArtifactGroup {\n return (\n typeof value === 'object' &&\n value !== null &&\n ArtifactGroup.BRAND_KEY in value &&\n value[ArtifactGroup.BRAND_KEY] === true\n );\n }\n\n static setResolver(opts: { resolve: TGroupResolver | undefined }): void {\n ArtifactGroup.holder().resolve = opts.resolve;\n }\n\n static getResolver(): TGroupResolver | undefined {\n return ArtifactGroup.holder().resolve;\n }\n\n /** The error a walker over `configs.artifacts` gets for reading a kind off a group - loud, never an empty list. */\n static unreadKindError(opts: { folder: string | undefined }): Error {\n return getError({\n message: `[ArtifactGroup] '${opts.folder ?? '<application>'}' is resolved when artifacts are registered | A function that walks configs.artifacts must pass a group through untouched (ArtifactGroup.isGroup) instead of reading its kinds`,\n });\n }\n\n get configurations(): never {\n throw ArtifactGroup.unreadKindError({ folder: this.folder });\n }\n\n get dataSources(): never {\n throw ArtifactGroup.unreadKindError({ folder: this.folder });\n }\n\n get components(): never {\n throw ArtifactGroup.unreadKindError({ folder: this.folder });\n }\n\n get repositories(): never {\n throw ArtifactGroup.unreadKindError({ folder: this.folder });\n }\n\n get services(): never {\n throw ArtifactGroup.unreadKindError({ folder: this.folder });\n }\n\n get controllers(): never {\n throw ArtifactGroup.unreadKindError({ folder: this.folder });\n }\n\n private static holder(): { resolve: TGroupResolver | undefined } {\n return SingletonRealm.resolve({\n key: ArtifactGroup.SINGLETON_REALM_KEY,\n create: () => ({ resolve: undefined }),\n });\n }\n\n /** The module that declared the group, read from the call stack. */\n private static callSite(): string | undefined {\n // A stack trace, not a failure: reading the call site needs an Error object, and nothing is thrown.\n // eslint-disable-next-line venizia/no-new-error\n return ArtifactGroup.siteFromStack({ stack: new Error().stack ?? '' });\n }\n\n /** The first frame outside the kernel's own `artifact-group` file: POSIX and Windows paths, `file://` URLs (decoded, drive kept), parentheses inside a path. */\n static siteFromStack(opts: { stack: string }): string | undefined {\n for (const raw of opts.stack.split('\\n').slice(1)) {\n const frame = raw.trim().replace(/^at\\s+/, '');\n const opening = frame.indexOf(' (');\n const location = frame.endsWith(')') && opening >= 0 ? frame.slice(opening + 2, -1) : frame;\n let file = location.replace(/:\\d+:\\d+$/, '');\n if (file.startsWith('file://')) {\n file = decodeURIComponent(file.slice('file://'.length)).replace(/^\\/([A-Za-z]:\\/)/, '$1');\n }\n const isPath = file.startsWith('/') || /^[A-Za-z]:[\\\\/]/.test(file);\n if (isPath && !/(?:^|[\\\\/])artifact-group\\.(?:ts|js)$/.test(file)) {\n return file;\n }\n }\n return undefined;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-index.js","sourceRoot":"","sources":["../../../../src/base/applications/artifact-index.ts"],"names":[],"mappings":";;;AAAA,mDAAuD;AACvD,+DAA2D;AAE3D,mDAA6D;AAC7D,sDAAmE;AACnE,qDAAiD;AAOjD,qCAA+C;AAE/C,+NAA+N;AAC/N,MAAa,mBAAoB,SAAQ,iBAAU;aACjC,wBAAmB,GAAG,uBAAuB,CAAC;IAE9D;QACE,KAAK,CAAC,EAAE,KAAK,EAAE,mBAAmB,CAAC,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CAAC,WAAW;QAChB,OAAO,gCAAc,CAAC,OAAO,CAAC;YAC5B,GAAG,EAAE,mBAAmB,CAAC,mBAAmB;YAC5C,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,mBAAmB,EAAE;SACxC,CAAC,CAAC;IACL,CAAC;IAED,uMAAuM;aAC/K,wBAAmB,GAA2B;QACpE,CAAC,yBAAa,CAAC,aAAa,CAAC,EAAE,4BAAmB,CAAC,cAAc;QACjE,CAAC,yBAAa,CAAC,UAAU,CAAC,EAAE,4BAAmB,CAAC,YAAY;QAC5D,CAAC,yBAAa,CAAC,SAAS,CAAC,EAAE,4BAAmB,CAAC,UAAU;QACzD,CAAC,yBAAa,CAAC,UAAU,CAAC,EAAE,4BAAmB,CAAC,YAAY;QAC5D,CAAC,yBAAa,CAAC,OAAO,CAAC,EAAE,4BAAmB,CAAC,QAAQ;QACrD,CAAC,yBAAa,CAAC,UAAU,CAAC,EAAE,4BAAmB,CAAC,WAAW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I,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;IAC/B,CAAC;;AA9RH,kDA+RC","sourcesContent":["import { MetadataRegistry } from '@/helpers/inversion';\nimport { SingletonRealm } from '@/helpers/singleton-realm';\nimport type { AnyType, TClass } from '@venizia/ignis-helpers/common';\nimport { ArtifactTypes, isClass } from '@/helpers/inversion';\nimport { BaseHelper, getError } from '@venizia/ignis-helpers/core';\nimport { ArtifactGroup } from './artifact-group';\nimport type {\n IArtifactGroup,\n IArtifactIndex,\n IConditionalArtifactIndex,\n TArtifactIndexInput,\n} from './common';\nimport { ArtifactIndexFields } from './common';\n\n/** Turns a `configs.artifacts` input into the classes to register: flattens nested indexes, drops the classes whose `when` says no, orders the rest. It never touches the container - `registerArtifacts` does the binding. */\nexport class ArtifactIndexHelper extends BaseHelper {\n static readonly SINGLETON_REALM_KEY = 'artifact-index-helper';\n\n private constructor() {\n super({ scope: ArtifactIndexHelper.name });\n }\n\n static getInstance(): ArtifactIndexHelper {\n return SingletonRealm.resolve({\n key: ArtifactIndexHelper.SINGLETON_REALM_KEY,\n create: () => new ArtifactIndexHelper(),\n });\n }\n\n /** Maps an artifact type to the index field that carries it. `ArtifactTypes.MODEL` is deliberately absent: a model has a binding namespace but no index field, because its repository registers it. */\n private static readonly INDEX_FIELD_BY_TYPE: Record<string, string> = {\n [ArtifactTypes.CONFIGURATION]: ArtifactIndexFields.CONFIGURATIONS,\n [ArtifactTypes.DATASOURCE]: ArtifactIndexFields.DATA_SOURCES,\n [ArtifactTypes.COMPONENT]: ArtifactIndexFields.COMPONENTS,\n [ArtifactTypes.REPOSITORY]: ArtifactIndexFields.REPOSITORIES,\n [ArtifactTypes.SERVICE]: ArtifactIndexFields.SERVICES,\n [ArtifactTypes.CONTROLLER]: ArtifactIndexFields.CONTROLLERS,\n };\n\n /** The index a decorator-only application has: every class a stereotype saw at import time, bucketed by its type. `when` and `order` still apply - `resolve` does that, exactly as it does for a declared index. */\n buildDiscoveredIndex(): IArtifactIndex {\n const registry = MetadataRegistry.getInstance();\n const index: Record<string, TClass<AnyType>[]> = {};\n\n const discoveredArtifacts = registry.getDiscoveredArtifacts();\n for (const target of discoveredArtifacts) {\n if (!isClass<AnyType>(target)) {\n continue;\n }\n\n const type = registry.getArtifactMetadata({ target })?.type;\n const field = type ? ArtifactIndexHelper.INDEX_FIELD_BY_TYPE[type] : undefined;\n if (!field) {\n continue;\n }\n\n index[field] = [...(index[field] ?? []), target];\n }\n\n return index;\n }\n\n /** Every kind of the input, each already filtered by `when` and sorted by `order`, keyed the way `IArtifactIndex` is. */\n async resolve(opts: {\n input: TArtifactIndexInput;\n application: unknown;\n }): Promise<Required<IArtifactIndex>> {\n const { input, application } = opts;\n const indexes = await this.flatten({ input, application });\n\n const rawConfigurations = await this.select({\n indexes,\n field: ArtifactIndexFields.CONFIGURATIONS,\n application,\n });\n const configurations = this.sortConfigurationsTopologically({\n classes: rawConfigurations,\n });\n\n const dataSources = await this.select({\n indexes,\n field: ArtifactIndexFields.DATA_SOURCES,\n application,\n });\n const components = await this.select({\n indexes,\n field: ArtifactIndexFields.COMPONENTS,\n application,\n });\n const repositories = await this.select({\n indexes,\n field: ArtifactIndexFields.REPOSITORIES,\n application,\n });\n const services = await this.select({\n indexes,\n field: ArtifactIndexFields.SERVICES,\n application,\n });\n const controllers = await this.select({\n indexes,\n field: ArtifactIndexFields.CONTROLLERS,\n application,\n });\n\n return { configurations, dataSources, components, repositories, services, controllers };\n }\n\n /**\n * Topologically sort configurations based on `after` dependencies.\n * Siblings with no dependency relation are sorted deterministically by class name.\n * Throws if an unknown `after` dependency is referenced or if a dependency cycle is detected.\n */\n sortConfigurationsTopologically(opts: { classes: ReadonlyArray<TClass<any>> }): TClass<any>[] {\n const { classes } = opts;\n if (classes.length === 0) {\n return [];\n }\n\n const registry = MetadataRegistry.getInstance();\n\n // Keyed by the class itself: two configurations may share a name (a minified build renames them),\n // and a name-keyed graph silently drops one of them.\n const inDegree = new Map<TClass<any>, number>();\n const adjacency = new Map<TClass<any>, TClass<any>[]>();\n\n for (const target of classes) {\n inDegree.set(target, 0);\n adjacency.set(target, []);\n }\n\n for (const target of classes) {\n const metadata = registry.getArtifactMetadata({ target });\n const afterList = metadata?.after ?? [];\n\n for (const prereq of afterList) {\n // A string names a class, the only form that can; a class is matched by identity.\n const prereqClass =\n typeof prereq === 'function'\n ? classes.find(candidate => candidate === prereq)\n : classes.find(candidate => candidate.name === String(prereq));\n\n if (!prereqClass) {\n const prereqName = typeof prereq === 'function' ? prereq.name : String(prereq);\n throw getError({\n message: `[sortConfigurationsTopologically][${target.name}] Declared 'after' dependency '${prereqName}' is not registered as a configuration`,\n });\n }\n\n adjacency.get(prereqClass)!.push(target);\n inDegree.set(target, (inDegree.get(target) ?? 0) + 1);\n }\n }\n\n // Kahn's algorithm. Siblings run in class-name order; a minified build renames classes, so an\n // order that matters belongs in `after`.\n const byName = (a: TClass<any>, b: TClass<any>) => a.name.localeCompare(b.name);\n const available = classes.filter(target => inDegree.get(target) === 0).sort(byName);\n const sorted: TClass<any>[] = [];\n\n while (available.length > 0) {\n const current = available.shift()!;\n sorted.push(current);\n\n for (const dependent of adjacency.get(current) ?? []) {\n const newDeg = inDegree.get(dependent)! - 1;\n inDegree.set(dependent, newDeg);\n if (newDeg === 0) {\n available.push(dependent);\n available.sort(byName);\n }\n }\n }\n\n if (sorted.length !== classes.length) {\n const unvisited = classes\n .filter(target => !sorted.includes(target))\n .map(target => target.name);\n throw getError({\n message: `[sortConfigurationsTopologically] Dependency cycle detected in configurations: ${unvisited.join(', ')}`,\n });\n }\n\n return sorted;\n }\n\n /** Every entry of a kind must be a class. `undefined` is what an import cycle leaves - the index was read before a class's module finished loading - so it gets a message that names the cause instead of a crash on `.name`. */\n private assertClasses(opts: {\n field: string;\n classes: ReadonlyArray<unknown> | undefined;\n }): void {\n const position = (opts.classes ?? []).findIndex(target => typeof target !== 'function');\n if (position >= 0) {\n throw getError({\n message: `[ArtifactIndex] '${opts.field}' lists an entry that is not a class (position ${position}) | Usually an import cycle: the index was read before that class's module finished loading. The module that imports the index (or @venizia/ignis-boot/auto) must not define decorated classes or be imported by them`,\n });\n }\n }\n\n /** One index, or arrays nested to any depth, as a flat list in input order; a conditional entry contributes its subtree only when its `when` answers true. */\n async flatten(opts: {\n input: TArtifactIndexInput;\n application: unknown;\n }): Promise<IArtifactIndex[]> {\n const { input, application } = opts;\n if (ArtifactGroup.isGroup(input)) {\n return this.flatten({ input: await this.contentOf({ group: input }), application });\n }\n if (Array.isArray(input)) {\n const nested = await Promise.all(\n input.map(entry => this.flatten({ input: entry, application })),\n );\n return nested.flat();\n }\n\n if (this.isConditional(input)) {\n const isSelected = await input.when({ application });\n if (!isSelected) {\n this.logger.debug('Skipped by condition | conditional index entry');\n return [];\n }\n\n return this.flatten({ input: input.index, application });\n }\n\n return [input];\n }\n\n /** A group's classes: inlined at build time, else the resolver `@venizia/ignis-boot/auto` installs. Never empty - a group that names nothing is a typo or a moved folder. */\n private async contentOf(opts: { group: IArtifactGroup }): Promise<IArtifactIndex> {\n const { group } = opts;\n const content = await ArtifactGroup.resolveContent({ group });\n\n // One element type for the six kinds, so `.map` is callable on every member of the union.\n for (const [field, classes] of Object.entries(content)) {\n this.assertClasses({ field, classes });\n }\n const kinds: Array<ReadonlyArray<TClass<unknown>> | undefined> = Object.values(content);\n const names = kinds.flatMap(classes => (classes ?? []).map(target => target.name));\n if (names.length === 0 && !group.kinds) {\n throw getError({\n message: `[ArtifactGroup] '${group.folder ?? '<application>'}' resolved to no class | Defined in ${group.site ?? 'an unknown module'} - check the folder name and that its classes carry a stereotype decorator`,\n });\n }\n this.logger.info('[ArtifactGroup] %s -> %s', group.folder ?? '<application>', names.join(', '));\n return content;\n }\n\n /** Positional on purpose: a type predicate narrows its own parameter, and an options object would narrow the wrapper instead of `input`. */\n private isConditional(\n entry: IArtifactIndex | IConditionalArtifactIndex,\n ): entry is IConditionalArtifactIndex {\n return 'when' in entry && 'index' in entry;\n }\n\n /** The classes of one kind across every index, minus those whose `when` says no, sorted by `order` (stable). The `when` conditions run concurrently: each reads config and environment, never another artifact. */\n async select<Field extends keyof IArtifactIndex>(opts: {\n indexes: IArtifactIndex[];\n field: Field;\n application: unknown;\n }): Promise<NonNullable<IArtifactIndex[Field]>[number][]> {\n const { indexes, field, application } = opts;\n const registry = MetadataRegistry.getInstance();\n\n // De-duplicated: discovery and a declared index can name the same class, and registering it\n // twice trips `bootChecks.binding.allowOverride: false`. First mention wins its position.\n const listed = [...new Set(indexes.flatMap(index => [...(index[field] ?? [])]))];\n this.assertClasses({ field, classes: listed });\n const decisions = await Promise.all(\n listed.map(target => this.isSelected({ target, application })),\n );\n\n const kept = listed.filter((target, position) => {\n if (decisions[position]) {\n return true;\n }\n\n this.logger.debug('Skipped by condition | kind: %s | class: %s', field, target.name);\n return false;\n });\n\n return kept\n .map((target, position) => ({\n target,\n position,\n order: registry.getArtifactMetadata({ target })?.order ?? 0,\n }))\n .sort((a, b) => a.order - b.order || a.position - b.position)\n .map(entry => entry.target);\n }\n\n private async isSelected(opts: {\n target: TClass<unknown>;\n application: unknown;\n }): Promise<boolean> {\n const { target, application } = opts;\n const when = MetadataRegistry.getInstance().getArtifactMetadata({ target })?.when;\n if (!when) {\n return true;\n }\n return when({ application });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot-sequence.js","sourceRoot":"","sources":["../../../../src/base/applications/boot-sequence.ts"],"names":[],"mappings":";;;AACA,sDAAuD;AAEvD,+LAA+L;AAC/L,MAAa,SAAS;aACJ,qBAAgB,GAAG,iBAAiB,CAAC;aACrC,uBAAkB,GAAG,mBAAmB,CAAC;aACzC,kBAAa,GAAG,cAAc,CAAC;aAC/B,iCAA4B,GAAG,4BAA4B,CAAC;aAC5D,4BAAuB,GAAG,wBAAwB,CAAC;aACnD,0BAAqB,GAAG,qBAAqB,CAAC;aAC9C,wBAAmB,GAAG,oBAAoB,CAAC;aAC3C,sCAAiC,GAAG,gCAAgC,CAAC;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C;YACD,OAAO,CAAC,CAAC,CAAC;gBACR,MAAM,IAAA,eAAQ,EAAC;oBACb,OAAO,EAAE,mCAAmC,MAAM,aAAa,OAAO,CAAC,MAAM,yBAAyB,KAAK,EAAE;iBAC9G,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,IAIlB;QACC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QACrC,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QAEtD,OAAO,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;IACzE,CAAC;CACF;AAlCD,oCAkCC","sourcesContent":["import type { TConstValue, ValueOrPromise } from '@venizia/ignis-helpers/common';\nimport { getError } from '@venizia/ignis-helpers/core';\n\n/** The step names the kernel defines - the vocabulary a subclass targets with `BootSequence.insertAfter`. A server application adds its own on top (`ServerBootSteps` in `@venizia/ignis`). */\nexport class BootSteps {\n static readonly STATIC_CONFIGURE = 'staticConfigure';\n static readonly REGISTER_ARTIFACTS = 'registerArtifacts';\n static readonly PRE_CONFIGURE = 'preConfigure';\n static readonly REGISTER_DEFAULT_MIDDLEWARES = 'registerDefaultMiddlewares';\n static readonly REGISTER_CONFIGURATIONS = 'registerConfigurations';\n static readonly REGISTER_DATA_SOURCES = 'registerDataSources';\n static readonly REGISTER_COMPONENTS = 'registerComponents';\n static readonly REGISTER_CONTRIBUTED_DATA_SOURCES = 'registerContributedDataSources';\n static readonly REGISTER_CONTROLLERS = 'registerControllers';\n static readonly POST_CONFIGURE = 'postConfigure';\n static readonly VERIFY_BINDINGS = 'verifyBindings';\n static readonly SCHEME_SET = new Set<string>([\n this.STATIC_CONFIGURE,\n this.REGISTER_ARTIFACTS,\n this.PRE_CONFIGURE,\n this.REGISTER_DEFAULT_MIDDLEWARES,\n this.REGISTER_CONFIGURATIONS,\n this.REGISTER_DATA_SOURCES,\n this.REGISTER_COMPONENTS,\n this.REGISTER_CONTRIBUTED_DATA_SOURCES,\n this.REGISTER_CONTROLLERS,\n this.POST_CONFIGURE,\n this.VERIFY_BINDINGS,\n ]);\n\n static isValid(value: string): boolean {\n return this.SCHEME_SET.has(value);\n }\n}\n\nexport type TBootStep = TConstValue<typeof BootSteps>;\n\nexport interface IBootSequenceStep {\n name: string;\n run: () => ValueOrPromise<void>;\n}\n\n/** Composes a boot sequence by name instead of copying the array - a subclass reads exactly what it adds by reading its own override, without diffing two files by eye. */\nexport class BootSequence {\n /** A duplicated name is refused as loudly as a missing one - picking the first match would splice a step into the wrong place silently. */\n private static indexOf(opts: { steps: IBootSequenceStep[]; target: string }): number {\n const { steps, target } = opts;\n const matches = steps.flatMap((step, index) => (step.name === target ? [index] : []));\n const known = steps.map(step => step.name).join(', ');\n\n switch (matches.length) {\n case 0: {\n throw getError({\n message: `[BootSequence] Unknown step: '${target}' | Known steps: ${known}`,\n });\n }\n case 1: {\n return matches[0];\n }\n default: {\n throw getError({\n message: `[BootSequence] Ambiguous step: '${target}' appears ${matches.length} times | Known steps: ${known}`,\n });\n }\n }\n }\n\n static insertAfter(opts: {\n steps: IBootSequenceStep[];\n target: string;\n step: IBootSequenceStep;\n }): IBootSequenceStep[] {\n const { steps, target, step } = opts;\n const index = BootSequence.indexOf({ steps, target });\n\n return [...steps.slice(0, index + 1), step, ...steps.slice(index + 1)];\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/base/applications/common/constants.ts"],"names":[],"mappings":";;;AAEA,2KAA2K;AAC3K,MAAa,mBAAmB;aACd,mBAAc,GAAG,gBAAgB,CAAC;aAClC,iBAAY,GAAG,aAAa,CAAC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a,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,CAAU,CAAC","sourcesContent":["import type { TConstValue } from '@venizia/ignis-helpers/common';\n\n/** The `IArtifactIndex` field names, in registration order. `@venizia/ignis-boot` mirrors these values in its own `ArtifactIndexFields` - boot cannot depend on kernel. */\nexport class ArtifactIndexFields {\n static readonly CONFIGURATIONS = 'configurations';\n static readonly DATA_SOURCES = 'dataSources';\n static readonly COMPONENTS = 'components';\n static readonly REPOSITORIES = 'repositories';\n static readonly SERVICES = 'services';\n static readonly CONTROLLERS = 'controllers';\n\n static readonly SCHEME_SET = new Set<string>([\n this.CONFIGURATIONS,\n this.DATA_SOURCES,\n this.COMPONENTS,\n this.REPOSITORIES,\n this.SERVICES,\n this.CONTROLLERS,\n ]);\n\n static isValid(value: string): boolean {\n return this.SCHEME_SET.has(value);\n }\n}\n\nexport type TArtifactIndexField = TConstValue<typeof ArtifactIndexFields>;\n\nexport const SecFetchSiteValues = ['same-origin', 'same-site', 'none', 'cross-site'] as const;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/base/applications/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/base/applications/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,0CAAwB","sourcesContent":["export * from './constants';\nexport * from './types';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../../../../../src/base/applications/common/types/application.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../../../../../src/base/applications/common/types/application.ts"],"names":[],"mappings":"","sourcesContent":["import type { OpenAPIHono } from '@hono/zod-openapi';\nimport type { ValueOrPromise } from '@venizia/ignis-helpers/common';\nimport type { Env, Schema } from 'hono';\nimport type { TControllerTransport } from '../../../controllers/common/constants';\nimport type {\n IComponentMixin,\n IControllerMixin,\n IRepositoryMixin,\n IServiceMixin,\n IStaticServeMixin,\n} from '../../../mixins/common';\nimport type { TArtifactIndexInput } from './artifacts';\nimport type { IMiddlewareConfigs } from './middlewares';\n\n/** No `host`/`port`: a browser Worker has neither, and carrying them here made one silently configured with `localhost:3000`. `@venizia/ignis` widens this shape with both - see its `IServerApplicationConfigs`. */\nexport interface IApplicationConfigs {\n /**\n * `isStrict` (default `true`) makes `/users` and `/users/` different routes; `false` answers both.\n * Under `false`, declare routes without a trailing slash: a route declared as `/users/` answers\n * neither `/users` nor `/users/`.\n */\n path: { base: string; isStrict: boolean };\n requestId?: { isStrict: boolean };\n favicon?: string;\n\n /** `environment` is the host's ambient environment name. Set it where there is none to read - a browser Worker - so the error middleware can tell \"no ambient environment\" from \"misconfigured\". Absent on a server, which reads `process.env.NODE_ENV`. */\n error?: { rootKey?: string; environment?: string };\n\n /** Generated indexes to register before `preConfigure` - one, or an array composed from several packages. */\n artifacts?: TArtifactIndexInput;\n\n /** Registers every class a stereotype decorated, so an application lists none of its own. Off by default: an absent `artifacts` keeps meaning \"register nothing\", never \"register everything\". Both together register the union, de-duplicated - which is how an application discovers its own classes and still composes a library index. */\n discoverArtifacts?: boolean;\n\n /** Boot-time checks. Without `binding`, nothing is verified, and hand registration and same-key override stay allowed. */\n bootChecks?: {\n binding?: { doVerify: boolean; allowManual: boolean; allowOverride: boolean };\n\n /**\n * Two different classes deriving one binding key from their class name fail registration: in a\n * minified build the second would silently replace the first. A development setup that\n * re-registers after a hot reload re-evaluates modules, which looks the same; `true` there turns\n * the failure into a warning.\n */\n allowDerivedKeyCollision?: boolean;\n };\n\n /** Controller transports to enable. Defaults to ['rest']. */\n transports?: TControllerTransport[];\n\n asyncContext?: { enable: boolean };\n debug?: { shouldShowRoutes?: boolean };\n\n /** Only `bodyLimit` is installed by the framework: right after the request id, ahead of every other middleware, so none of them reads a body over it. Every other key is the application's to wire in `setupMiddlewares()`. */\n middlewares?: IMiddlewareConfigs;\n\n /** How long `stop()` waits for one datasource's `close()` before it logs and moves on. Default `10_000`; `0` waits without limit. */\n dataSourceCloseTimeoutMs?: number;\n [key: string]: any;\n}\n\nexport interface IApplicationInfo {\n name: string;\n version: string;\n description: string;\n author?: { name: string; email: string; url?: string };\n [extra: string | symbol]: any;\n}\n\n/** Exactly what EVERY host implements. `getServerHost`/`getServerPort`/`getServerAddress`/`start`/`stop` are not here on purpose - a browser Worker can implement none of them; they live on `@venizia/ignis`'s `IServerApplication`. */\nexport interface IApplication<\n AppEnv extends Env = Env,\n AppSchema extends Schema = Schema,\n BasePath extends string = '/',\n> {\n getProjectRoot(): string;\n getProjectConfigs(): IApplicationConfigs;\n getServer(): OpenAPIHono<AppEnv, AppSchema, BasePath>;\n getRootRouter(): OpenAPIHono<AppEnv, AppSchema, BasePath>;\n\n setupMiddlewares(): ValueOrPromise<void>;\n\n initialize(): ValueOrPromise<void>;\n}\n\nexport interface IRestApplication\n extends\n IApplication,\n IComponentMixin,\n IControllerMixin,\n IRepositoryMixin,\n IServiceMixin,\n IStaticServeMixin {}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../../../src/base/applications/common/types/artifacts.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../../../src/base/applications/common/types/artifacts.ts"],"names":[],"mappings":"","sourcesContent":["import type { TArtifactCondition } from '@/helpers/inversion/common/types';\nimport type { TClass } from '@venizia/ignis-helpers/common';\nimport type { BaseComponent } from '../../../components';\nimport type { BaseConfiguration } from '../../../configurations';\nimport type { IDataSource } from '../../../datasources';\nimport type { IRepository } from '../../../repositories';\nimport type { IService } from '../../../services';\n\n/** The shape `@venizia/ignis-boot`'s generator emits and `registerArtifacts()` consumes. Kinds are registered in this field order. */\nexport interface IArtifactIndex {\n configurations?: ReadonlyArray<TClass<BaseConfiguration>>;\n dataSources?: ReadonlyArray<TClass<IDataSource>>;\n components?: ReadonlyArray<TClass<BaseComponent>>;\n repositories?: ReadonlyArray<TClass<IRepository>>;\n services?: ReadonlyArray<TClass<IService>>;\n controllers?: ReadonlyArray<TClass<unknown>>;\n}\n\n/** An index (or nested indexes) registered only when `when` answers true - the run-mode gate: a worker keeps its controllers out of the container instead of mounting routes no security step guards. Extends the never-typed kind fields so code that destructures kinds from a non-array input still compiles against the union. */\nexport interface IConditionalArtifactIndex extends Partial<Record<keyof IArtifactIndex, never>> {\n when: TArtifactCondition;\n index: TArtifactIndexInput;\n}\n\n/** A slice of artifacts whose classes are known only when they are registered: a shared package's `ArtifactGroup`, or `@venizia/ignis-boot/auto`. `content` is inlined by a build; otherwise `resolve` (or the resolver `@venizia/ignis-boot` installs) supplies it. The kind fields are typed never so a walker that destructures kinds still compiles - reading one throws. */\nexport interface IArtifactGroup extends Partial<Record<keyof IArtifactIndex, never>> {\n readonly isArtifactGroup: true;\n /** The directory name the group covers; undefined for the application's own root. */\n readonly folder: string | undefined;\n /** The module that defined the group, for the resolver and the error messages. */\n readonly site: string | undefined;\n readonly content: IArtifactIndex | undefined;\n /** Globs relative to the package `src` whose classes the group leaves out (`ArtifactGroup.application`). */\n readonly ignore?: ReadonlyArray<string>;\n resolve?(): Promise<IArtifactIndex>;\n /** Set on a slice (`ArtifactGroup.pick`): only these kinds are registered, and an empty slice is not an error. */\n readonly kinds?: ReadonlyArray<keyof IArtifactIndex>;\n}\n\n/** One index, a conditional entry, a group, or any nesting of arrays of them - a library exports one, an application composes several. */\nexport type TArtifactIndexInput =\n | IArtifactIndex\n | IConditionalArtifactIndex\n | IArtifactGroup\n | TArtifactIndexInput[];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/base/applications/common/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,8CAA4B;AAC5B,gDAA8B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/base/applications/common/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,8CAA4B;AAC5B,gDAA8B","sourcesContent":["export * from './application';\nexport * from './artifacts';\nexport * from './middlewares';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middlewares.js","sourceRoot":"","sources":["../../../../../../src/base/applications/common/types/middlewares.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"middlewares.js","sourceRoot":"","sources":["../../../../../../src/base/applications/common/types/middlewares.ts"],"names":[],"mappings":"","sourcesContent":["import type { Context } from 'hono';\nimport type { IPRestrictionRules as IIPRestrictionRules } from 'hono/ip-restriction';\nimport { type SecFetchSiteValues } from '../constants';\n\nexport interface IBaseMiddlewareOptions {\n enable: boolean;\n path?: string;\n [extra: string | symbol]: any;\n}\n\nexport interface ICompressOptions extends IBaseMiddlewareOptions {\n encoding: 'gzip' | 'deflate';\n threshold?: number;\n}\n\nexport type TOrigin =\n | string\n | string[]\n | ((\n origin: string,\n c: Context,\n ) => Promise<string | undefined | null> | string | undefined | null);\nexport interface ICORSOptions extends IBaseMiddlewareOptions {\n origin: TOrigin;\n allowMethods?: string[] | ((origin: string, c: Context) => Promise<string[]> | string[]);\n allowHeaders?: string[];\n maxAge?: number;\n credentials?: boolean;\n exposeHeaders?: string[];\n}\n\nexport type TIsAllowedOriginHandler = (origin: string, context: Context) => boolean;\nexport type TSecFetchSite = (typeof SecFetchSiteValues)[number];\nexport type TIsAllowedSecFetchSiteHandler = (\n secFetchSite: TSecFetchSite,\n context: Context,\n) => boolean;\n\nexport interface ICSRFOptions extends IBaseMiddlewareOptions {\n origin?: string | string[] | TIsAllowedOriginHandler;\n secFetchSite?: TSecFetchSite | TSecFetchSite[] | TIsAllowedSecFetchSiteHandler;\n}\n\nexport interface IBodyLimitOptions extends IBaseMiddlewareOptions {\n maxSize: number;\n onError?: (c: Context) => Response | Promise<Response>;\n}\n\nexport interface IRequestIdOptions extends IBaseMiddlewareOptions {}\n\nexport interface IMiddlewareConfigs {\n requestId?: IRequestIdOptions;\n compress?: ICompressOptions;\n cors?: ICORSOptions;\n csrf?: ICSRFOptions;\n bodyLimit?: IBodyLimitOptions;\n ipRestriction?: IBaseMiddlewareOptions & IIPRestrictionRules;\n [extra: string | symbol]: any;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/base/applications/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,mDAAiC;AACjC,kDAAgC;AAChC,2CAAyB;AACzB,yCAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/base/applications/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,mDAAiC;AACjC,kDAAgC;AAChC,2CAAyB;AACzB,yCAAuB","sourcesContent":["export * from './abstract';\nexport * from './artifact-group';\nexport * from './boot-sequence';\nexport * from './common';\nexport * from './rest';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rest.js","sourceRoot":"","sources":["../../../../src/base/applications/rest.ts"],"names":[],"mappings":";;;AACA,gDAAwF;AAExF,mDAAsE;AACtE,mDAAgD;AAEhD,sDAKqC;AAErC,kCAA+D;AAC/D,gDAA4C;AAC5C,gDAA4C;AAE5C,6DAAgE;AAChE,iFAA6E;AAE7E,+DAAuE;AAEvE,wFAAuF;AACvF,yDAA6D;AAC7D,wFAAgF;AAIhF,yCAAiD;AACjD,qDAAuD;AAEvD,mDAA4C;AAU5C,4NAA4N;AAC5N,MAAsB,eAIpB,SAAQ,8BAAmB;IAa3B,YAAY,IAAoD;QAC9D,KAAK,CAAC,IAAI,CAAC,CAAC;QAbN,uBAAkB,GAAgC,EAAE,CA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;oBACvB,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,GAAG,CAAC,CAAC;oBAChD,SAAS;gBACX,CAAC;gBAED,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC;gBACnC,MAAM,kBAAW,CAAC,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;YAC5F,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,kBAAW,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC;oBAC3C,MAAM,CAAC,KAAK,CAAC,2CAA2C,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;oBAC1E,SAAS;gBACX,CAAC;gBAED,MAAM,CAAC,KAAK,CAAC,kDAAkD,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;gBAC7E,SAAS;YACX,CAAC;YAED,MAAM,CAAC,IAAI,CAAC,6BAA6B,EAAE,GAAG,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;CACF;AAryBD,0CAqyBC","sourcesContent":["import type { TBindingNamespace } from '@/common/bindings';\nimport { ArtifactNamespaces, BindingNamespaces, CoreBindings } from '@/common/bindings';\nimport type { Binding, TBindingScope } from '@/helpers/inversion';\nimport { BindingScopes, MetadataRegistry } from '@/helpers/inversion';\nimport { OpenAPIHono } from '@hono/zod-openapi';\nimport type { AnyType, IConfigurable, TClass, ValueOrPromise } from '@venizia/ignis-helpers/common';\nimport {\n executeWithPerformanceMeasure,\n getError,\n RequestIdGenerator,\n RetryHelper,\n} from '@venizia/ignis-helpers/core';\nimport type { Env, Schema } from 'hono';\nimport { showRoutes as showApplicationRoutes } from 'hono/dev';\nimport { bodyLimit } from 'hono/body-limit';\nimport { requestId } from 'hono/request-id';\nimport type { BaseComponent } from '../components';\nimport { ArtifactBindingKeys } from '../metadata/artifact-keys';\nimport { RestComponent } from '../components/controller/rest/rest.component';\nimport type { BaseConfiguration } from '../configurations';\nimport { ControllerTransports } from '../controllers/common/constants';\nimport type { IDataSource } from '../datasources';\nimport { BaseAppErrorMiddleware } from '../middlewares/app-error/app-error.middleware';\nimport { RequestErrors } from '../middlewares/common/errors';\nimport { notFoundHandler } from '../middlewares/not-found/not-found.middleware';\nimport type { TMixinOpts } from '../mixins/common';\nimport type { IRepository } from '../repositories';\nimport type { IService } from '../services';\nimport { AbstractApplication } from './abstract';\nimport { ArtifactIndexHelper } from './artifact-index';\nimport type { IBootSequenceStep } from './boot-sequence';\nimport { BootSteps } from './boot-sequence';\nimport type { IApplicationConfigs, IBodyLimitOptions, TArtifactIndexInput } from './common';\n\ninterface IRegisterDynamicBindingsOptions<T extends IConfigurable = IConfigurable> {\n namespace: TBindingNamespace;\n\n onBeforeConfigure?: (opts: { binding: Binding<T> }) => Promise<void>;\n onAfterConfigure?: (opts: { binding: Binding<T>; instance: T }) => Promise<void>;\n}\n\n/** Adds the `OpenAPIHono` router surface on top of `AbstractApplication` - no listening server, so this is the layer a browser Worker or gRPC-only host can extend without pulling in `Bun.serve` / `@hono/node-server`. */\nexport abstract class RestApplication<\n AppEnv extends Env = Env,\n AppSchema extends Schema = {},\n BasePath extends string = '/',\n> extends AbstractApplication {\n private registeredBindings: Record<string, Set<string>> = {};\n private artifactOptions = new Map<string, object>();\n\n /** The router, and nothing else. What runtime is underneath and what socket is bound are `ServerApplication`'s to know - a browser Worker has neither, and carrying the union here made `RuntimeModules.detect()` answer `'node'` inside a Worker. */\n protected server: { hono: OpenAPIHono<AppEnv, AppSchema, BasePath> };\n\n protected rootRouter: OpenAPIHono<AppEnv, AppSchema, BasePath>;\n protected readonly requestIdGenerator: RequestIdGenerator;\n\n /** A copy of the `bodyLimit` the default stack installed, absent until `registerDefaultMiddlewares()` ran. */\n private installedBodyLimit?: { options?: IBodyLimitOptions };\n\n constructor(opts: { scope: string; config: IApplicationConfigs }) {\n super(opts);\n\n // A config built from the environment can lose `path.base` at run time; the router would only fail later, inside `route()`, with a message that names nothing.\n if (typeof this.configs.path?.base !== 'string') {\n throw getError({\n message: `[${opts.scope}] configs.path.base must be a string | value: ${String(this.configs.path?.base)} | an empty string mounts the application at the root`,\n });\n }\n\n // The index signature accepts any key, so a leftover `strictPath` would compile and be ignored.\n if (this.configs.strictPath !== undefined) {\n throw getError({\n message: `[${opts.scope}] configs.strictPath was removed | value: ${String(this.configs.strictPath)} | Use configs.path.isStrict`,\n });\n }\n\n this.requestIdGenerator = new RequestIdGenerator({ scope: opts.scope });\n\n const strict = this.configs.path.isStrict ?? true;\n const honoServer = new OpenAPIHono<AppEnv, AppSchema, BasePath>({ strict });\n this.rootRouter = new OpenAPIHono({ strict });\n\n this.server = { hono: honoServer };\n }\n\n getRootRouter(): OpenAPIHono<AppEnv, AppSchema, BasePath> {\n return this.rootRouter;\n }\n\n getServer(): OpenAPIHono<AppEnv, AppSchema, BasePath> {\n return this.server.hono;\n }\n\n protected override registerCoreBindings() {\n super.registerCoreBindings();\n\n this.bind<typeof this.server>({\n key: CoreBindings.APPLICATION_SERVER,\n }).toProvider(_ => this.server);\n this.bind<typeof this.rootRouter>({\n key: CoreBindings.APPLICATION_ROOT_ROUTER,\n }).toProvider(_ => this.rootRouter);\n }\n\n /** The correlation id every host stamps - see {@link RequestIdGenerator} for why `crypto.randomUUID` is refused. */\n protected generateRequestId(): string {\n return this.requestIdGenerator.nextId();\n }\n\n /** The error handler the default stack installs. `@venizia/ignis` overrides it to swap in the `ErrorPrettier`-backed formatter, which reaches `node:util` and so cannot live here. */\n protected buildErrorMiddleware(): BaseAppErrorMiddleware {\n const environment = this.configs.error?.environment;\n\n return new BaseAppErrorMiddleware({\n logger: this.logger,\n rootKey: this.configs.error?.rootKey ?? undefined,\n // Spread, not `environment: () => environment`: the option's PRESENCE is what claims this host\n // has an ambient environment at all, so an unset config must leave it absent.\n ...(environment === undefined ? {} : { environment: () => environment }),\n });\n }\n\n /**\n * The three registrations every host needs: request id, error envelope, JSON 404 - without them a\n * thrown `ApplicationError` is a generic 500, a 404 is `text/plain`, and no response carries a request id.\n * Registered before `initialize()`, so an application's own handlers still win.\n */\n protected registerDefaultMiddlewares(): ValueOrPromise<void> {\n const server = this.getServer();\n\n server.use(requestId({ generator: () => this.generateRequestId() }));\n\n // Ahead of every middleware a host adds after this one, so none of them buffers a body over it.\n const bodyLimitOptions = this.configs.middlewares?.bodyLimit;\n this.installedBodyLimit = { options: this.toInstalledBodyLimit({ options: bodyLimitOptions }) };\n\n if (bodyLimitOptions && bodyLimitOptions.enable !== false) {\n const { maxSize, path, onError } = bodyLimitOptions;\n\n if (typeof maxSize !== 'number' || !Number.isFinite(maxSize) || maxSize < 0) {\n throw getError({\n message: `[registerDefaultMiddlewares] configs.middlewares.bodyLimit.maxSize must be a non-negative number of bytes | value: ${String(maxSize)}`,\n });\n }\n\n const limiter = bodyLimit({\n maxSize,\n onError:\n onError ??\n (() => {\n throw getError({\n error: RequestErrors.BODY_TOO_LARGE,\n message: `Request body exceeds the maximum of ${maxSize} bytes`,\n });\n }),\n });\n\n if (path) {\n server.use(path, limiter);\n } else {\n server.use(limiter);\n }\n }\n\n server.onError(this.buildErrorMiddleware().value());\n server.notFound(notFoundHandler({ logger: this.logger }));\n }\n\n /** What a `bodyLimit` config installs: nothing when absent or disabled, else a copy, so a later in-place edit shows. */\n private toInstalledBodyLimit(opts: {\n options?: IBodyLimitOptions;\n }): IBodyLimitOptions | undefined {\n const { options } = opts;\n\n if (!options || options.enable === false) {\n return undefined;\n }\n\n return { ...options };\n }\n\n private isSameBodyLimit(opts: { left?: IBodyLimitOptions; right?: IBodyLimitOptions }): boolean {\n const { left, right } = opts;\n\n if (!left || !right) {\n return left === right;\n }\n\n const keys = new Set([...Object.keys(left), ...Object.keys(right)]);\n for (const key of keys) {\n if (!Object.is(left[key], right[key])) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * `configs.middlewares` is read by `registerDefaultMiddlewares()`, which runs before `staticConfigure()`.\n * A limit assigned in a boot hook would read back as configured while every request ran unlimited.\n */\n private assertBodyLimitUnchanged(opts: { step: string }): void {\n if (!this.installedBodyLimit) {\n return;\n }\n\n const installed = this.installedBodyLimit.options;\n const current = this.toInstalledBodyLimit({ options: this.configs.middlewares?.bodyLimit });\n\n if (this.isSameBodyLimit({ left: installed, right: current })) {\n return;\n }\n\n throw getError({\n message: `[${opts.step}] configs.middlewares.bodyLimit changed after registerDefaultMiddlewares() installed it | installed maxSize: ${installed?.maxSize ?? 'none'} | now maxSize: ${current?.maxSize ?? 'none'} | Pass it through the constructor config: new Application({ config: { middlewares: { bodyLimit } } })`,\n });\n }\n\n /**\n * The artifact order, stated once: datasources before the repositories that auto-resolve them,\n * components before the controllers they may contribute. `BaseApplication` splices its server-only\n * steps around these by name instead of rewriting the list.\n */\n protected getBootSequence(): IBootSequenceStep[] {\n return [\n {\n name: BootSteps.STATIC_CONFIGURE,\n run: async () => {\n // Declared `void`, but an override may be async; the step has always waited on it.\n await Promise.resolve(this.staticConfigure());\n this.assertBodyLimitUnchanged({ step: BootSteps.STATIC_CONFIGURE });\n },\n },\n { name: BootSteps.REGISTER_ARTIFACTS, run: () => this.registerConfiguredArtifacts() },\n {\n name: BootSteps.PRE_CONFIGURE,\n run: async () => {\n await this.runApplicationHook({\n name: BootSteps.PRE_CONFIGURE,\n hook: () => this.preConfigure(),\n });\n this.assertBodyLimitUnchanged({ step: BootSteps.PRE_CONFIGURE });\n },\n },\n {\n name: BootSteps.REGISTER_CONFIGURATIONS,\n run: () => this.registerConfigurations(),\n },\n { name: BootSteps.REGISTER_DATA_SOURCES, run: () => this.registerDataSources() },\n { name: BootSteps.REGISTER_COMPONENTS, run: () => this.registerComponents() },\n {\n name: BootSteps.REGISTER_CONTRIBUTED_DATA_SOURCES,\n run: () => this.registerContributedDataSources(),\n },\n { name: BootSteps.REGISTER_CONTROLLERS, run: () => this.registerControllers() },\n {\n name: BootSteps.POST_CONFIGURE,\n run: () =>\n this.runApplicationHook({\n name: BootSteps.POST_CONFIGURE,\n hook: () => this.postConfigure(),\n }),\n },\n { name: BootSteps.VERIFY_BINDINGS, run: () => this.verifyBindings() },\n ];\n }\n\n async initialize(): Promise<void> {\n await this.runBootSequence({ steps: this.getBootSequence() });\n }\n\n /** The application hook currently running, so `registerArtifact` can tell a hand registration inside `preConfigure`/`postConfigure` from one the index step made. */\n private runningApplicationHook: string | undefined;\n\n private async runApplicationHook(opts: {\n name: string;\n hook: () => ValueOrPromise<void>;\n }): Promise<void> {\n this.runningApplicationHook = opts.name;\n try {\n await opts.hook();\n } finally {\n this.runningApplicationHook = undefined;\n }\n }\n\n /**\n * Bound keys carrying one of `tags` that nothing has resolved since the counts were last reset.\n * The counter answers \"who was read\", never \"who is dead\" - an unread binding may be an\n * allow-list entry or a technical floor, and only the application can tell those apart.\n *\n * Counting is off by default. Call `startResolutionCounting()` after `initialize()` and run the\n * traffic that exercises the application, then read this.\n */\n getUnresolvedBindings(opts?: { tags?: string[] }): string[] {\n if (!this.hasStartedResolutionCounting) {\n throw getError({\n message: `[${this.getUnresolvedBindings.name}] Resolution counting never started | Call startResolutionCounting() after initialize(), run the traffic that exercises the application, then read this - without it every binding would be reported unresolved`,\n });\n }\n\n const tags = opts?.tags ?? [BindingNamespaces.SERVICE, BindingNamespaces.REPOSITORY];\n const counts = this.getResolutionCounts();\n const unresolved: string[] = [];\n\n for (const tag of tags) {\n const bindings = this.findByTag({ tag });\n for (const binding of bindings) {\n if (counts.has(binding.key)) {\n continue;\n }\n\n unresolved.push(binding.key);\n }\n }\n\n return unresolved;\n }\n\n /** `bootChecks.binding.doVerify`: resolve every service and repository once, collect every failure, throw once with the whole list - a made-up `@inject` key or a dependency a `when` excluded then fails the boot, not the first request. */\n protected verifyBindings(): void {\n if (!this.configs.bootChecks?.binding?.doVerify) {\n return;\n }\n\n const logger = this.logger.for(this.verifyBindings.name);\n const tags = [BindingNamespaces.SERVICE, BindingNamespaces.REPOSITORY];\n const failures: string[] = [];\n let verified = 0;\n\n for (const tag of tags) {\n const bindings = this.findByTag({ tag });\n for (const binding of bindings) {\n try {\n this.get({ key: binding.key });\n verified += 1;\n } catch (error) {\n failures.push(\n `${binding.key}: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n }\n }\n\n if (failures.length > 0) {\n throw getError({\n message: `[${this.verifyBindings.name}] ${failures.length} binding(s) cannot be resolved | ${failures.join(' | ')}`,\n });\n }\n\n logger.info('Every service and repository binding resolves | verified: %d', verified);\n }\n\n /** One measured log line per step, and a failure names its step before rethrowing, so a hung or failed boot is attributable without reading the sequence. */\n protected async runBootSequence(opts: { steps: IBootSequenceStep[] }): Promise<void> {\n const { steps } = opts;\n const logger = this.logger.for(this.initialize.name);\n const t = performance.now();\n\n const stepsEntries = steps.entries();\n for (const [index, step] of stepsEntries) {\n try {\n await executeWithPerformanceMeasure({\n logger: this.logger,\n scope: this.initialize.name,\n description: `Boot step ${index + 1}/${steps.length} ${step.name}`,\n task: () => step.run(),\n });\n } catch (error) {\n logger.error(\n 'Boot step failed | step: %s (%d/%d) | error: %s',\n step.name,\n index + 1,\n steps.length,\n error,\n );\n throw error;\n }\n }\n\n logger.info(\n 'Boot sequence complete | %d step(s) | Took: %s (ms) | %s',\n steps.length,\n performance.now() - t,\n steps.map(step => step.name).join(' -> '),\n );\n }\n\n protected inspectRoutes() {\n const t = performance.now();\n const shouldShowRoutes = this.configs?.debug?.shouldShowRoutes ?? false;\n\n if (!shouldShowRoutes) {\n return;\n }\n\n this.logger.for(this.inspectRoutes.name).info('START | Inspect all application route(s)');\n showApplicationRoutes(this.getServer());\n this.logger\n .for(this.inspectRoutes.name)\n .info('DONE | Inspect all application route(s) | Took: %s (ms)', performance.now() - t);\n }\n\n /**\n * `configured` is the drain's state, mutated in place: a fresh `Set` gives a one-shot complete\n * drain (`RestComponent`); `registerDynamicBindings` passes its persistent per-namespace `Set`,\n * which is why a second sweep touches only what the first one missed.\n */\n async drainByTag<T>(opts: {\n tag: string;\n configured: Set<string>;\n onEach: (opts: { binding: Binding<T> }) => Promise<void>;\n }): Promise<void> {\n const { tag, configured, onEach } = opts;\n\n // A whole batch is drained before re-scanning: the re-scan exists only to pick up bindings a\n // `configure()` added, and asking after every single item makes boot N+1 full scans of the\n // binding map - 3.5ms at 200 controllers, against 0.04ms for this shape.\n let bindings = this.findByTag<T>({ tag, exclude: configured });\n\n while (bindings.length > 0) {\n for (const binding of bindings) {\n // Within a batch a nested `configure()` may already have taken this one.\n if (configured.has(binding.key)) {\n continue;\n }\n\n await onEach({ binding });\n configured.add(binding.key);\n }\n\n // Re-fetch excluding already configured - picks up dynamically added bindings\n bindings = this.findByTag<T>({ tag, exclude: configured });\n }\n }\n\n protected async registerDynamicBindings<T extends IConfigurable = IConfigurable>(\n opts: IRegisterDynamicBindingsOptions<T>,\n ): Promise<void> {\n const logger = this.logger.for(this.registerDynamicBindings.name);\n const { namespace, onBeforeConfigure, onAfterConfigure } = opts;\n\n if (!this.registeredBindings[namespace]) {\n this.registeredBindings[namespace] = new Set<string>();\n }\n const configured = this.registeredBindings[namespace];\n\n await this.drainByTag<T>({\n tag: namespace,\n configured,\n onEach: async ({ binding }) => {\n if (onBeforeConfigure) {\n await onBeforeConfigure({ binding });\n }\n\n const instance = this.get<T>({ key: binding.key, isOptional: false });\n if (!instance) {\n logger.debug('No binding instance | namespace: %s | key: %s', namespace, binding.key);\n return;\n }\n\n if (typeof (instance as Partial<IConfigurable>)?.configure === 'function') {\n const options = this.artifactOptions.get(binding.key);\n await (instance as IConfigurable).configure(options);\n }\n\n // Marked before the after-hook runs, so the hook sees its own binding as configured.\n configured.add(binding.key);\n\n if (onAfterConfigure) {\n await onAfterConfigure({ binding, instance });\n }\n },\n });\n }\n\n /** The same-key guard behind every artifact registration (`component`/`controller`/`service`/`repository`/`dataSource`). `allowOverride` defaults true to match `bind()`'s overwrite behavior; `allowOverride: false` on one registration, or `bootChecks.binding.allowOverride: false` for the whole application, opts into strict mode. */\n protected assertNoBindingCollision(opts: {\n key: string;\n allowOverride?: boolean;\n caller: string;\n }): void {\n const { key, caller } = opts;\n const allowOverride =\n opts.allowOverride ?? this.configs.bootChecks?.binding?.allowOverride ?? true;\n\n if (allowOverride || !this.isBound({ key })) {\n return;\n }\n\n const reason =\n opts.allowOverride === false\n ? `'allowOverride: false' was set and this key collides with an existing binding | Use a distinct 'opts.binding' key, or drop 'allowOverride: false' if overriding is intentional`\n : `'bootChecks.binding.allowOverride' is false and this key collides with an existing binding | Use a distinct 'opts.binding' key, or set 'allowOverride: true' on this registration if overriding is intentional`;\n\n throw getError({\n message: `[${caller}] Binding key already registered: '${key}' | ${reason}`,\n });\n }\n\n /** Resolution order for every registration: explicit `opts` > the class's `@injectable` defaults > the derived key and the kind's default scope. `order` and `when` are `registerArtifacts`' concern, not this one. */\n private registerArtifact<Base>(opts: {\n target: TClass<Base>;\n namespace: TBindingNamespace;\n defaultScope: TBindingScope;\n caller: string;\n opts?: TMixinOpts;\n }): Binding<Base> {\n const { target, namespace, defaultScope, caller } = opts;\n const declared = MetadataRegistry.getInstance().getArtifactMetadata({ target });\n\n if (\n this.runningApplicationHook &&\n this.configs.artifacts &&\n this.configs.bootChecks?.binding?.allowManual === false\n ) {\n throw getError({\n message: `[${caller}] '${target.name}' is registered by hand inside ${this.runningApplicationHook}() while 'configs.artifacts' is set and 'bootChecks.binding.allowManual' is false | Move the class into the generated index (or an explicit entry of 'configs.artifacts'), or allow manual registration`,\n });\n }\n\n const pinned = opts.opts?.binding ?? declared?.binding;\n BindingNamespaces.assertArtifactNamespace({\n namespace: pinned?.namespace ?? namespace,\n artifact: target.name,\n caller,\n });\n\n const { key } = ArtifactBindingKeys.resolve({ target, namespace, binding: pinned });\n\n // What `@inject({ target })` reads back. Only here knows the call site's `binding`, and a\n // class registered by hand has no stereotype metadata to derive one from.\n MetadataRegistry.getInstance().setBindingKey({ target, key });\n\n if (opts.opts?.options !== undefined) {\n this.artifactOptions.set(key, opts.opts.options);\n }\n\n this.assertNoBindingCollision({\n key,\n allowOverride: opts.opts?.allowOverride ?? declared?.allowOverride,\n caller,\n });\n\n return this.bind<Base>({ key })\n .toClass(target)\n .setScope(declared?.scope ?? defaultScope);\n }\n\n configuration<Base extends BaseConfiguration<Options>, Options extends object = {}>(\n target: TClass<Base>,\n opts?: TMixinOpts<Options>,\n ): Binding<Base> {\n return this.registerArtifact({\n target,\n namespace: BindingNamespaces.CONFIGURATION,\n defaultScope: BindingScopes.SINGLETON,\n caller: this.configuration.name,\n opts,\n });\n }\n\n async registerConfigurations(): Promise<void> {\n await executeWithPerformanceMeasure({\n logger: this.logger,\n scope: this.registerConfigurations.name,\n description: 'Register application configurations',\n task: async () => {\n await this.registerDynamicBindings({ namespace: BindingNamespaces.CONFIGURATION });\n },\n });\n }\n\n component<Base extends BaseComponent<Options>, Options extends object = {}>(\n target: TClass<Base>,\n opts?: TMixinOpts<Options>,\n ): Binding<Base> {\n return this.registerArtifact({\n target,\n namespace: BindingNamespaces.COMPONENT,\n defaultScope: BindingScopes.SINGLETON,\n caller: this.component.name,\n opts,\n });\n }\n\n async registerComponents(): Promise<void> {\n await executeWithPerformanceMeasure({\n logger: this.logger,\n scope: this.registerComponents.name,\n description: 'Register application components',\n task: async () => {\n await this.registerDynamicBindings({ namespace: BindingNamespaces.COMPONENT });\n },\n });\n }\n\n /**\n * Second DATASOURCE sweep, for datasources components contributed at any depth. Calls\n * `registerDynamicBindings` directly: `this.registerDataSources()` is polymorphic and an override\n * would run twice. Runs after every component, so a component a datasource registers is never configured.\n */\n async registerContributedDataSources(): Promise<void> {\n await executeWithPerformanceMeasure({\n logger: this.logger,\n scope: this.registerContributedDataSources.name,\n description: 'Register application contributed data sources',\n task: async () => {\n await this.registerDynamicBindings({ namespace: BindingNamespaces.DATASOURCE });\n },\n });\n }\n\n /** REST only - the kernel has no gRPC (it reaches `node:module`). `BaseApplication` adds the gRPC branch on top. */\n async registerControllers(): Promise<void> {\n await executeWithPerformanceMeasure({\n logger: this.logger,\n description: 'Register application REST controllers',\n scope: this.registerControllers.name,\n task: async () => {\n const transports = this.configs.transports ?? [ControllerTransports.REST];\n if (!transports.includes(ControllerTransports.REST)) {\n return;\n }\n\n const restComponent = new RestComponent(this);\n await restComponent.configure();\n },\n });\n }\n\n /** SINGLETON like `component()`: `RestComponent` mounts the one instance it resolves, so a second resolution must be that instance, not an unmounted twin. */\n controller<Base>(target: TClass<Base>, opts?: TMixinOpts): Binding<Base> {\n return this.registerArtifact({\n target,\n namespace: BindingNamespaces.CONTROLLER,\n defaultScope: BindingScopes.SINGLETON,\n caller: this.controller.name,\n opts,\n });\n }\n\n service<Base extends IService>(target: TClass<Base>, opts?: TMixinOpts): Binding<Base> {\n return this.registerArtifact({\n target,\n namespace: BindingNamespaces.SERVICE,\n defaultScope: BindingScopes.TRANSIENT,\n caller: this.service.name,\n opts,\n });\n }\n\n repository<Base extends IRepository>(target: TClass<Base>, opts?: TMixinOpts): Binding<Base> {\n return this.registerArtifact({\n target,\n namespace: BindingNamespaces.REPOSITORY,\n defaultScope: BindingScopes.TRANSIENT,\n caller: this.repository.name,\n opts,\n });\n }\n\n dataSource<Base extends IDataSource<Options>, Options extends object = {}>(\n target: TClass<Base>,\n opts?: TMixinOpts<Options>,\n ): Binding<Base> {\n return this.registerArtifact({\n target,\n namespace: BindingNamespaces.DATASOURCE,\n defaultScope: BindingScopes.SINGLETON,\n caller: this.dataSource.name,\n opts,\n });\n }\n\n /** The boot step body behind `configs.artifacts`, also callable by hand: registers every kind in dependency order across the given indexes. */\n async registerArtifacts(index: TArtifactIndexInput): Promise<void> {\n const resolved = await ArtifactIndexHelper.getInstance().resolve({\n input: index,\n application: this,\n });\n\n const registry = MetadataRegistry.getInstance();\n const kinds: Array<[ReadonlyArray<TClass<AnyType>>, TBindingNamespace]> = [\n [resolved.configurations, BindingNamespaces.CONFIGURATION],\n [resolved.dataSources, BindingNamespaces.DATASOURCE],\n [resolved.components, BindingNamespaces.COMPONENT],\n [resolved.repositories, BindingNamespaces.REPOSITORY],\n [resolved.services, BindingNamespaces.SERVICE],\n [resolved.controllers, BindingNamespaces.CONTROLLER],\n ];\n const collisions = ArtifactBindingKeys.findDerivedCollisions({\n entries: kinds.flatMap(([targets, namespace]) =>\n targets.map(target => ({\n target,\n namespace,\n binding: registry.getArtifactMetadata({ target })?.binding,\n })),\n ),\n });\n\n for (const key of collisions) {\n const message = ArtifactBindingKeys.describeCollision({ key, caller: 'registerArtifacts' });\n\n if (!this.configs.bootChecks?.allowDerivedKeyCollision) {\n throw getError({ message });\n }\n\n this.logger.warn('%s', message);\n }\n\n for (const target of resolved.configurations) {\n this.configuration(target);\n this.bindProvidedKeys({ target });\n }\n\n for (const target of resolved.dataSources) {\n this.dataSource(target);\n }\n\n for (const target of resolved.components) {\n this.component(target);\n this.bindProvidedKeys({ target });\n }\n\n for (const target of resolved.repositories) {\n this.repository(target);\n }\n\n for (const target of resolved.services) {\n this.service(target);\n }\n\n for (const target of resolved.controllers) {\n this.controller(target);\n }\n }\n\n /** Registers every class a stereotype decorated, with no `configs.artifacts` entry anywhere. `when` and `order` apply exactly as they do to a declared index - which is how one process running several applications keeps them apart. */\n async registerDiscoveredArtifacts(): Promise<void> {\n await this.registerArtifacts(ArtifactIndexHelper.getInstance().buildDiscoveredIndex());\n }\n\n /**\n * The artifact boot step. `configs.discoverArtifacts` adds every decorated class in the import\n * graph; `configs.artifacts` adds exactly what it lists. Both together register the union.\n *\n * An absent `artifacts` still registers nothing. Reading it as \"register everything\" would change\n * what an existing application boots with, silently, and the failure would surface as ten times\n * the bindings rather than as an error.\n */\n protected async registerConfiguredArtifacts(): Promise<void> {\n const inputs: TArtifactIndexInput[] = [];\n\n if (this.configs.discoverArtifacts) {\n inputs.push(ArtifactIndexHelper.getInstance().buildDiscoveredIndex());\n }\n\n if (this.configs.artifacts) {\n inputs.push(this.configs.artifacts);\n }\n\n if (inputs.length === 0) {\n return;\n }\n\n await this.registerArtifacts(inputs);\n }\n\n /** Each `@provide` method becomes a lazy provider: the component is resolved (SINGLETON) and the method called on first `get`, so a provided value may depend on datasources or secrets that do not exist yet at registration time. */\n private bindProvidedKeys(opts: { target: TClass<any> }): void {\n const { target } = opts;\n const registry = MetadataRegistry.getInstance();\n const provides = registry.getProvideMetadata({ target });\n if (provides.length === 0) {\n return;\n }\n\n const declared = registry.getArtifactMetadata({ target });\n const defaultNamespace = declared?.type\n ? ArtifactNamespaces.resolve({ type: declared.type })\n : BindingNamespaces.COMPONENT;\n // The key the registration actually bound - a call-site override included.\n const componentKey =\n registry.getBindingKey({ target }) ??\n ArtifactBindingKeys.resolve({\n target,\n namespace: defaultNamespace,\n binding: declared?.binding,\n }).key;\n for (const entry of provides) {\n this.bind({ key: entry.key })\n .toProvider(container => {\n const instance = container.get<Record<string | symbol, () => unknown>>({\n key: componentKey,\n });\n return instance[entry.methodName]();\n })\n .setScope(entry.scope ?? BindingScopes.SINGLETON);\n }\n }\n\n async registerDataSources(): Promise<void> {\n await executeWithPerformanceMeasure({\n logger: this.logger,\n scope: this.registerDataSources.name,\n description: 'Register application data sources',\n task: async () => {\n await this.registerDynamicBindings({ namespace: BindingNamespaces.DATASOURCE });\n },\n });\n }\n\n /**\n * Closes every datasource the boot configured, so a stopped application holds no pool, socket or\n * WASM instance. A failure, or a `close()` still pending after `dataSourceCloseTimeoutMs`, is logged\n * and never stops the rest. A datasource configured by hand is closed by whoever configured it.\n */\n protected async closeDataSources(): Promise<void> {\n const keys = this.registeredBindings[BindingNamespaces.DATASOURCE] ?? new Set<string>();\n const timeoutMs = this.configs.dataSourceCloseTimeoutMs ?? 10_000;\n const logger = this.logger.for(this.closeDataSources.name);\n\n for (const key of keys) {\n try {\n const dataSource = this.get<IDataSource>({ key, isOptional: true });\n if (!dataSource?.close) {\n logger.debug('Nothing to close | key: %s', key);\n continue;\n }\n\n const closing = dataSource.close();\n await RetryHelper.runWithTimeout({ operation: key, timeoutMs, execution: () => closing });\n } catch (error) {\n if (RetryHelper.isRetryTimeoutError(error)) {\n logger.error('Close timed out | key: %s | timeoutMs: %d', key, timeoutMs);\n continue;\n }\n\n logger.error('Failed to close datasource | key: %s | error: %s', key, error);\n continue;\n }\n\n logger.info('Closed datasource | key: %s', key);\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codecs.js","sourceRoot":"","sources":["../../../../../../src/base/auth/authenticate/common/codecs.ts"],"names":[],"mappings":";;;AAAA,sDAAkD;AAGlD,MAAa,yBAAyB;aACpB,gBAAW,GAAkD;QAC3E,GAAG,EAAE,OAAO;QACZ,SAAS,CAAC,IAAI;YACZ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,UAAU,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC1F,CAAC;QACD,WAAW,CAAC,IAAI;YACd,OAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAc,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;gBACjD,MAAM,CAAC,EAAE,EAAE,UAAU,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACjD,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAA,UAAG,EAAC,QAAQ,CAAC,EAAE,CAAC;YACrD,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;IAEF,2CAA2C;IAC3C,MAAM,CAAC,KAAK,CAAc,IAIzB;QACC,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC;IACJ,CAAC;;AAzBH,8DA0BC"}
|
|
1
|
+
{"version":3,"file":"codecs.js","sourceRoot":"","sources":["../../../../../../src/base/auth/authenticate/common/codecs.ts"],"names":[],"mappings":";;;AAAA,sDAAkD;AAGlD,MAAa,yBAAyB;aACpB,gBAAW,GAAkD;QAC3E,GAAG,EAAE,OAAO;QACZ,SAAS,CAAC,IAAI;YACZ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,UAAU,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC1F,CAAC;QACD,WAAW,CAAC,IAAI;YACd,OAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAc,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;gBACjD,MAAM,CAAC,EAAE,EAAE,UAAU,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACjD,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAA,UAAG,EAAC,QAAQ,CAAC,EAAE,CAAC;YACrD,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;IAEF,2CAA2C;IAC3C,MAAM,CAAC,KAAK,CAAc,IAIzB;QACC,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC;IACJ,CAAC;;AAzBH,8DA0BC","sourcesContent":["import { int } from '@venizia/ignis-helpers/core';\nimport type { IJWTTokenPayload, IPayloadFieldCodec } from './types';\n\nexport class AuthenticationFieldCodecs {\n static readonly ROLES_CODEC: IPayloadFieldCodec<IJWTTokenPayload['roles']> = {\n key: 'roles',\n serialize(opts) {\n return JSON.stringify(opts.value.map(el => `${el.id}|${el.identifier}|${el.priority}`));\n },\n deserialize(opts) {\n return (JSON.parse(opts.raw) as string[]).map(el => {\n const [id, identifier, priority] = el.split('|');\n return { id, identifier, priority: int(priority) };\n });\n },\n };\n\n /** Builds a single payload field codec. */\n static build<T = unknown>(opts: {\n key: string;\n serialize: IPayloadFieldCodec<T>['serialize'];\n deserialize: IPayloadFieldCodec<T>['deserialize'];\n }): IPayloadFieldCodec<T> {\n return {\n key: opts.key,\n serialize: opts.serialize,\n deserialize: opts.deserialize,\n };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/constants/authentication.ts"],"names":[],"mappings":";;;AAEA,MAAa,oBAAoB;aACf,UAAK,GAAG,OAAO,CAAC;aAChB,QAAG,GAAG,KAAK,CAAC;aACZ,YAAO,GAAG,SAAS,CAAC;IAEpC,yFAAyF;aACzE,eAAU,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAE3E,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AAVH,oDAWC;AAMD,MAAa,cAAc;IACzB,WAAW;aACK,mBAAc,GAAG,oBAAoB,CAAC,KAAK,CAAC;aAC5C,iBAAY,GAAG,oBAAoB,CAAC,GAAG,CAAC;aACxC,qBAAgB,GAAG,oBAAoB,CAAC,OAAO,CAAC;IAEhE,aAAa;aACG,eAAU,GAAG,OAAO,CAAC;aACrB,gBAAW,GAAG,QAAQ,CAAC;aAEvB,4BAAuB,GAAG,yBAAyB,CAAC;aACpD,wBAAmB,GAAG,qBAAqB,CAAC;aAE5C,iBAAY,GAAG,mBAAmB,CAAC;aACnC,kBAAa,GAAG,eAAe,CAAC;;AAdlD,wCAeC;AAED,MAAa,wBAAwB;aACnB,4BAAuB,GAAG,wBAAwB,CAAC;aACnD,sBAAiB,GAAG,kBAAkB,CAAC;aACvC,uBAAkB,GAAG,mBAAmB,CAAC;;AAH3D,4DAIC;AAED,MAAa,mBAAmB;aACd,QAAG,GAAG,KAAK,CAAC;aACZ,QAAG,GAAG,KAAK,CAAC;aAEZ,eAAU,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAE3D,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AARH,kDASC"}
|
|
1
|
+
{"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/constants/authentication.ts"],"names":[],"mappings":";;;AAEA,MAAa,oBAAoB;aACf,UAAK,GAAG,OAAO,CAAC;aAChB,QAAG,GAAG,KAAK,CAAC;aACZ,YAAO,GAAG,SAAS,CAAC;IAEpC,yFAAyF;aACzE,eAAU,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAE3E,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AAVH,oDAWC;AAMD,MAAa,cAAc;IACzB,WAAW;aACK,mBAAc,GAAG,oBAAoB,CAAC,KAAK,CAAC;aAC5C,iBAAY,GAAG,oBAAoB,CAAC,GAAG,CAAC;aACxC,qBAAgB,GAAG,oBAAoB,CAAC,OAAO,CAAC;IAEhE,aAAa;aACG,eAAU,GAAG,OAAO,CAAC;aACrB,gBAAW,GAAG,QAAQ,CAAC;aAEvB,4BAAuB,GAAG,yBAAyB,CAAC;aACpD,wBAAmB,GAAG,qBAAqB,CAAC;aAE5C,iBAAY,GAAG,mBAAmB,CAAC;aACnC,kBAAa,GAAG,eAAe,CAAC;;AAdlD,wCAeC;AAED,MAAa,wBAAwB;aACnB,4BAAuB,GAAG,wBAAwB,CAAC;aACnD,sBAAiB,GAAG,kBAAkB,CAAC;aACvC,uBAAkB,GAAG,mBAAmB,CAAC;;AAH3D,4DAIC;AAED,MAAa,mBAAmB;aACd,QAAG,GAAG,KAAK,CAAC;aACZ,QAAG,GAAG,KAAK,CAAC;aAEZ,eAAU,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAE3D,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AARH,kDASC","sourcesContent":["import type { TConstValue } from '@venizia/ignis-helpers/common';\n\nexport class AuthenticateStrategy {\n static readonly BASIC = 'basic';\n static readonly JWT = 'jwt';\n static readonly SERVICE = 'service';\n\n /** The strategies the FRAMEWORK ships. An application registers its own beyond these. */\n static readonly SCHEME_SET = new Set([this.BASIC, this.JWT, this.SERVICE]);\n\n static isValid(input: string): boolean {\n return this.SCHEME_SET.has(input);\n }\n}\n\n// `(string & {})` keeps autocomplete for the built-in values while still accepting any name an\n// application registers with `AuthenticationStrategyRegistry`. Same idiom as `TDataSourceDriver`.\nexport type TAuthStrategy = TConstValue<typeof AuthenticateStrategy> | (string & {});\n\nexport class Authentication {\n // Strategy\n static readonly STRATEGY_BASIC = AuthenticateStrategy.BASIC;\n static readonly STRATEGY_JWT = AuthenticateStrategy.JWT;\n static readonly STRATEGY_SERVICE = AuthenticateStrategy.SERVICE;\n\n // Token type\n static readonly TYPE_BASIC = 'Basic';\n static readonly TYPE_BEARER = 'Bearer';\n\n static readonly AUTHENTICATION_STRATEGY = 'authentication.strategy';\n static readonly SKIP_AUTHENTICATION = 'authentication.skip';\n\n static readonly CURRENT_USER = 'auth.current.user';\n static readonly AUDIT_USER_ID = 'audit.user.id';\n}\n\nexport class AuthenticationTokenTypes {\n static readonly TYPE_AUTHORIZATION_CODE = '000_AUTHORIZATION_CODE';\n static readonly TYPE_ACCESS_TOKEN = '100_ACCESS_TOKEN';\n static readonly TYPE_REFRESH_TOKEN = '200_REFRESH_TOKEN';\n}\n\nexport class AuthenticationModes {\n static readonly ANY = 'any';\n static readonly ALL = 'all';\n\n static readonly SCHEME_SET = new Set([this.ANY, this.ALL]);\n\n static isValid(input: string): boolean {\n return this.SCHEME_SET.has(input);\n }\n}\n\nexport type TAuthMode = TConstValue<typeof AuthenticationModes>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,yCAAuB;AACvB,sDAAoC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,yCAAuB;AACvB,sDAAoC","sourcesContent":["export * from './authentication';\nexport * from './jose';\nexport * from './service-assertion';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jose.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/constants/jose.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;aACR,QAAG,GAAG,KAAK,CAAC;aACZ,SAAI,GAAG,MAAM,CAAC;aAEd,eAAU,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE5D,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AARH,sCASC;AAID,MAAa,SAAS;aACJ,WAAM,GAAG,QAAQ,CAAC;aAClB,aAAQ,GAAG,UAAU,CAAC;aAEtB,eAAU,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEnE,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AARH,8BASC;AAID,MAAa,cAAc;aACT,SAAI,GAAG,MAAM,CAAC;aACd,SAAI,GAAG,MAAM,CAAC;aAEd,eAAU,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE7D,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AARH,wCASC;AAID,MAAa,cAAc;aACT,QAAG,GAAG,KAAK,CAAC;aACZ,QAAG,GAAG,KAAK,CAAC;aAEZ,eAAU,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAE3D,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AARH,wCASC"}
|
|
1
|
+
{"version":3,"file":"jose.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/constants/jose.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;aACR,QAAG,GAAG,KAAK,CAAC;aACZ,SAAI,GAAG,MAAM,CAAC;aAEd,eAAU,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE5D,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AARH,sCASC;AAID,MAAa,SAAS;aACJ,WAAM,GAAG,QAAQ,CAAC;aAClB,aAAQ,GAAG,UAAU,CAAC;aAEtB,eAAU,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEnE,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AARH,8BASC;AAID,MAAa,cAAc;aACT,SAAI,GAAG,MAAM,CAAC;aACd,SAAI,GAAG,MAAM,CAAC;aAEd,eAAU,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE7D,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AARH,wCASC;AAID,MAAa,cAAc;aACT,QAAG,GAAG,KAAK,CAAC;aACZ,QAAG,GAAG,KAAK,CAAC;aAEZ,eAAU,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAE3D,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AARH,wCASC","sourcesContent":["import type { TConstValue } from '@venizia/ignis-helpers/common';\n\nexport class JOSEStandards {\n static readonly JWS = 'JWS';\n static readonly JWKS = 'JWKS';\n\n static readonly SCHEME_SET = new Set([this.JWS, this.JWKS]);\n\n static isValid(input: string): boolean {\n return this.SCHEME_SET.has(input);\n }\n}\n\nexport type TJOSEStandard = TConstValue<typeof JOSEStandards>;\n\nexport class JWKSModes {\n static readonly ISSUER = 'issuer';\n static readonly VERIFIER = 'verifier';\n\n static readonly SCHEME_SET = new Set([this.ISSUER, this.VERIFIER]);\n\n static isValid(input: string): boolean {\n return this.SCHEME_SET.has(input);\n }\n}\n\nexport type TJWKSMode = TConstValue<typeof JWKSModes>;\n\nexport class JWKSKeyDrivers {\n static readonly TEXT = 'text';\n static readonly FILE = 'file';\n\n static readonly SCHEME_SET = new Set([this.TEXT, this.FILE]);\n\n static isValid(input: string): boolean {\n return this.SCHEME_SET.has(input);\n }\n}\n\nexport type TJWKSKeyDriver = TConstValue<typeof JWKSKeyDrivers>;\n\nexport class JWKSKeyFormats {\n static readonly PEM = 'pem';\n static readonly JWK = 'jwk';\n\n static readonly SCHEME_SET = new Set([this.PEM, this.JWK]);\n\n static isValid(input: string): boolean {\n return this.SCHEME_SET.has(input);\n }\n}\n\nexport type TJWKSKeyFormat = TConstValue<typeof JWKSKeyFormats>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-assertion.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/constants/service-assertion.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAa,gBAAgB;IAC3B,yFAAyF;aACzE,WAAM,GAAG,qBAAqB,CAAC;IAE/C,uGAAuG;aACvF,QAAG,GAAG,SAAS,CAAC;aAEhB,cAAS,GAAG,OAAO,CAAC;aAEpB,sBAAiB,GAAG,YAAY,CAAC;IACjD,+CAA+C;aAC/B,kCAA6B,GAAG,EAAE,CAAC;IAEnD,sGAAsG;aACtF,mCAA8B,GAAG,EAAE,CAAC;aACpC,oCAA+B,GAAG,CAAC,CAAC;IAEpD,4FAA4F;IAC5F,MAAM,CAAC,mBAAmB,CAAC,IAA0D;QACnF,OAAO,CACL,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,IAAI,gBAAgB,CAAC,8BAA8B,CAC9F,CAAC;IACJ,CAAC;aAEe,kCAA6B,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;aAC/C,6BAAwB,GAAG,EAAE,GAAG,IAAI,CAAC;;AAzBvD,4CA0BC"}
|
|
1
|
+
{"version":3,"file":"service-assertion.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/constants/service-assertion.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAa,gBAAgB;IAC3B,yFAAyF;aACzE,WAAM,GAAG,qBAAqB,CAAC;IAE/C,uGAAuG;aACvF,QAAG,GAAG,SAAS,CAAC;aAEhB,cAAS,GAAG,OAAO,CAAC;aAEpB,sBAAiB,GAAG,YAAY,CAAC;IACjD,+CAA+C;aAC/B,kCAA6B,GAAG,EAAE,CAAC;IAEnD,sGAAsG;aACtF,mCAA8B,GAAG,EAAE,CAAC;aACpC,oCAA+B,GAAG,CAAC,CAAC;IAEpD,4FAA4F;IAC5F,MAAM,CAAC,mBAAmB,CAAC,IAA0D;QACnF,OAAO,CACL,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,IAAI,gBAAgB,CAAC,8BAA8B,CAC9F,CAAC;IACJ,CAAC;aAEe,kCAA6B,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;aAC/C,6BAAwB,GAAG,EAAE,GAAG,IAAI,CAAC;;AAzBvD,4CA0BC","sourcesContent":["/**\n * Wire-level constants of the service assertion. Fixed rather than configurable: both ends of a\n * call must agree on them, and a knob here would let two services disagree silently.\n */\nexport class ServiceAssertion {\n /** Its own header, so the end user's token keeps `Authorization` on the same request. */\n static readonly HEADER = 'x-service-assertion';\n\n /** The JWS `typ`. What stops a user token being replayed as an assertion when one JWKS serves both. */\n static readonly TYP = 'svc+jwt';\n\n static readonly ALGORITHM = 'EdDSA';\n\n static readonly DEFAULT_REST_PATH = '/svc-certs';\n /** How long a minted assertion stays valid. */\n static readonly DEFAULT_SIGN_LIFETIME_SECONDS = 60;\n\n /** The oldest assertion a callee accepts, measured from `iat`. Its own decision, not the caller's. */\n static readonly DEFAULT_ACCEPT_MAX_AGE_SECONDS = 60;\n static readonly DEFAULT_CLOCK_TOLERANCE_SECONDS = 5;\n\n /** Resolves the accepted age for one caller: its own override, then the service default. */\n static resolveAcceptMaxAge(opts: { callerOverride?: number; serviceDefault?: number }): number {\n return (\n opts.callerOverride ?? opts.serviceDefault ?? ServiceAssertion.DEFAULT_ACCEPT_MAX_AGE_SECONDS\n );\n }\n\n static readonly DEFAULT_JWKS_CACHE_MAX_AGE_MS = 10 * 60 * 1000;\n static readonly DEFAULT_JWKS_COOLDOWN_MS = 30 * 1000;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../../../src/base/auth/authenticate/common/errors.ts"],"names":[],"mappings":";;;AAAA,0DAAqD;AAErD,sDAA0D;AAE1D,kJAAkJ;AACrI,QAAA,oBAAoB,GAAG;IAClC,cAAc,EAAE;QACd,OAAO,EAAE;YACP,IAAI,EAAE,8BAA8B;YACpC,IAAI,EAAE,oCAAoC;SAC3C;QACD,UAAU,EAAE,aAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY;QAC9C,QAAQ,EAAE,kBAAW,CAAC,IAAI;KAC3B;IACD,cAAc,EAAE;QACd,OAAO,EAAE;YACP,IAAI,EAAE,kCAAkC;YACxC,IAAI,EAAE,oCAAoC;SAC3C;QACD,UAAU,EAAE,aAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY;QAC9C,QAAQ,EAAE,kBAAW,CAAC,IAAI;KAC3B;IACD,gBAAgB,EAAE;QAChB,OAAO,EAAE;YACP,IAAI,EAAE,gCAAgC;YACtC,IAAI,EAAE,sCAAsC;SAC7C;QACD,UAAU,EAAE,aAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY;QAC9C,QAAQ,EAAE,kBAAW,CAAC,IAAI;KAC3B;IACD,aAAa,EAAE;QACb,OAAO,EAAE,EAAE,IAAI,EAAE,uBAAuB,EAAE,IAAI,EAAE,mCAAmC,EAAE;QACrF,UAAU,EAAE,aAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY;QAC9C,QAAQ,EA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AAC,IAAI;KAC3B;IACD,iBAAiB,EAAE;QACjB,OAAO,EAAE;YACP,IAAI,EAAE,2BAA2B;YACjC,IAAI,EAAE,+CAA+C;SACtD;QACD,UAAU,EAAE,aAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY;QAC9C,QAAQ,EAAE,kBAAW,CAAC,IAAI;KAC3B;IACD,iBAAiB,EAAE;QACjB,OAAO,EAAE;YACP,IAAI,EAAE,2BAA2B;YACjC,IAAI,EAAE,+CAA+C;SACtD;QACD,UAAU,EAAE,aAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY;QAC9C,QAAQ,EAAE,kBAAW,CAAC,IAAI;KAC3B;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE;YACP,IAAI,EAAE,+BAA+B;YACrC,IAAI,EAAE,gDAAgD;SACvD;QACD,UAAU,EAAE,aAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY;QAC9C,QAAQ,EAAE,kBAAW,CAAC,IAAI;KAC3B;IACD,wBAAwB,EAAE;QACxB,OAAO,EAAE;YACP,IAAI,EAAE,+CAA+C;YACrD,IAAI,EAAE,sDAAsD;SAC7D;QACD,UAAU,EAAE,aAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY;QAC9C,QAAQ,EAAE,kBAAW,CAAC,IAAI;KAC3B;IACD,oBAAoB,EAAE;QACpB,OAAO,EAAE;YACP,IAAI,EAAE,yCAAyC;YAC/C,IAAI,EAAE,kDAAkD;SACzD;QACD,UAAU,EAAE,aAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY;QAC9C,QAAQ,EAAE,kBAAW,CAAC,IAAI;KAC3B;CACkD,CAAC"}
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../../../src/base/auth/authenticate/common/errors.ts"],"names":[],"mappings":";;;AAAA,0DAAqD;AAErD,sDAA0D;AAE1D,kJAAkJ;AACrI,QAAA,oBAAoB,GAAG;IAClC,cAAc,EAAE;QACd,OAA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IAAI,EAAE,gDAAgD;SACvD;QACD,UAAU,EAAE,aAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY;QAC9C,QAAQ,EAAE,kBAAW,CAAC,IAAI;KAC3B;IACD,wBAAwB,EAAE;QACxB,OAAO,EAAE;YACP,IAAI,EAAE,+CAA+C;YACrD,IAAI,EAAE,sDAAsD;SAC7D;QACD,UAAU,EAAE,aAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY;QAC9C,QAAQ,EAAE,kBAAW,CAAC,IAAI;KAC3B;IACD,oBAAoB,EAAE;QACpB,OAAO,EAAE;YACP,IAAI,EAAE,yCAAyC;YAC/C,IAAI,EAAE,kDAAkD;SACzD;QACD,UAAU,EAAE,aAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY;QAC9C,QAAQ,EAAE,kBAAW,CAAC,IAAI;KAC3B;CACkD,CAAC","sourcesContent":["import { HTTP } from '@venizia/ignis-helpers/common';\nimport type { TErrorDefinition, TRegisterErrors } from '@venizia/ignis-helpers/core';\nimport { ErrorScopes } from '@venizia/ignis-helpers/core';\n\n/** Codes a client branches on for a failed authentication. A throw site may override `message` for detail; the code and status come from here. */\nexport const AuthenticationErrors = {\n HEADER_MISSING: {\n message: {\n text: 'Missing authorization header',\n code: 'core.authentication.header_missing',\n },\n statusCode: HTTP.ResultCodes.RS_4.Unauthorized,\n category: ErrorScopes.AUTH,\n },\n SCHEME_INVALID: {\n message: {\n text: 'Unsupported authorization scheme',\n code: 'core.authentication.scheme_invalid',\n },\n statusCode: HTTP.ResultCodes.RS_4.Unauthorized,\n category: ErrorScopes.AUTH,\n },\n HEADER_MALFORMED: {\n message: {\n text: 'Malformed authorization header',\n code: 'core.authentication.header_malformed',\n },\n statusCode: HTTP.ResultCodes.RS_4.Unauthorized,\n category: ErrorScopes.AUTH,\n },\n TOKEN_MISSING: {\n message: { text: 'Missing request token', code: 'core.authentication.token_missing' },\n statusCode: HTTP.ResultCodes.RS_4.Unauthorized,\n category: ErrorScopes.AUTH,\n },\n /** Covers expiry, a bad signature and a malformed token alike - the reason rides in `cause`, never in the code a client sees. */\n TOKEN_INVALID: {\n message: { text: 'Invalid or expired token', code: 'core.authentication.token_invalid' },\n statusCode: HTTP.ResultCodes.RS_4.Unauthorized,\n category: ErrorScopes.AUTH,\n },\n TOKEN_PAYLOAD_INVALID: {\n message: {\n text: 'Invalid token payload',\n code: 'core.authentication.token_payload_invalid',\n },\n statusCode: HTTP.ResultCodes.RS_4.Unauthorized,\n category: ErrorScopes.AUTH,\n },\n CREDENTIALS_MALFORMED: {\n message: {\n text: 'Malformed credentials',\n code: 'core.authentication.credentials_malformed',\n },\n statusCode: HTTP.ResultCodes.RS_4.Unauthorized,\n category: ErrorScopes.AUTH,\n },\n CREDENTIALS_INVALID: {\n message: {\n text: 'Invalid username or password',\n code: 'core.authentication.credentials_invalid',\n },\n statusCode: HTTP.ResultCodes.RS_4.Unauthorized,\n category: ErrorScopes.AUTH,\n },\n FAILED: {\n message: { text: 'Authentication failed', code: 'core.authentication.failed' },\n statusCode: HTTP.ResultCodes.RS_4.Unauthorized,\n category: ErrorScopes.AUTH,\n },\n USER_UNRESOLVED: {\n message: {\n text: 'Failed to identify authenticated user',\n code: 'core.authentication.user_unresolved',\n },\n statusCode: HTTP.ResultCodes.RS_4.Unauthorized,\n category: ErrorScopes.AUTH,\n },\n ASSERTION_MISSING: {\n message: {\n text: 'Missing service assertion',\n code: 'core.authentication.service.assertion_missing',\n },\n statusCode: HTTP.ResultCodes.RS_4.Unauthorized,\n category: ErrorScopes.AUTH,\n },\n ASSERTION_INVALID: {\n message: {\n text: 'Invalid service assertion',\n code: 'core.authentication.service.assertion_invalid',\n },\n statusCode: HTTP.ResultCodes.RS_4.Unauthorized,\n category: ErrorScopes.AUTH,\n },\n CALLER_NOT_ALLOWED: {\n message: {\n text: 'Service caller is not allowed',\n code: 'core.authentication.service.caller_not_allowed',\n },\n statusCode: HTTP.ResultCodes.RS_4.Unauthorized,\n category: ErrorScopes.AUTH,\n },\n REQUEST_BINDING_MISMATCH: {\n message: {\n text: 'Service assertion does not match this request',\n code: 'core.authentication.service.request_binding_mismatch',\n },\n statusCode: HTTP.ResultCodes.RS_4.Unauthorized,\n category: ErrorScopes.AUTH,\n },\n PRINCIPAL_UNRESOLVED: {\n message: {\n text: 'Service caller resolved to no principal',\n code: 'core.authentication.service.principal_unresolved',\n },\n statusCode: HTTP.ResultCodes.RS_4.Unauthorized,\n category: ErrorScopes.AUTH,\n },\n} as const satisfies Record<string, TErrorDefinition>;\n\ndeclare module '@venizia/ignis-helpers/core' {\n interface IErrorKeyRegistry extends TRegisterErrors<typeof AuthenticationErrors> {}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/base/auth/authenticate/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,8CAA4B;AAC5B,yCAAuB;AACvB,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/base/auth/authenticate/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,8CAA4B;AAC5B,yCAAuB;AACvB,0CAAwB","sourcesContent":["export * from './errors';\nexport * from './codecs';\nexport * from './constants';\nexport * from './keys';\nexport * from './types';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../../../../src/base/auth/authenticate/common/keys.ts"],"names":[],"mappings":";;;AAAA,MAAa,uBAAuB;aAClB,iBAAY,GAAG,gCAAgC,CAAC;aAChD,gBAAW,GAAG,+BAA+B,CAAC;aAC9C,iBAAY,GAAG,gCAAgC,CAAC;aAChD,kBAAa,GAAG,iCAAiC,CAAC;aAClD,oBAAe,GAAG,mCAAmC,CAAC;aACtD,uBAAkB,GAAG,sCAAsC,CAAC;;AAN9E,0DAOC"}
|
|
1
|
+
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../../../../src/base/auth/authenticate/common/keys.ts"],"names":[],"mappings":";;;AAAA,MAAa,uBAAuB;aAClB,iBAAY,GAAG,gCAAgC,CAAC;aAChD,gBAAW,GAAG,+BAA+B,CAAC;aAC9C,iBAAY,GAAG,gCAAgC,CAAC;aAChD,kBAAa,GAAG,iCAAiC,CAAC;aAClD,oBAAe,GAAG,mCAAmC,CAAC;aACtD,uBAAkB,GAAG,sCAAsC,CAAC;;AAN9E,0DAOC","sourcesContent":["export class AuthenticateBindingKeys {\n static readonly REST_OPTIONS = '@app/authenticate/rest-options';\n static readonly JWT_OPTIONS = '@app/authenticate/jwt-options';\n static readonly JWKS_OPTIONS = '@app/authenticate/jwks-options';\n static readonly BASIC_OPTIONS = '@app/authenticate/basic-options';\n static readonly SERVICE_OPTIONS = '@app/authenticate/service-options';\n static readonly SERVICE_CERTS_PATH = '@app/authenticate/service-certs-path';\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/types/basic.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"basic.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/types/basic.ts"],"names":[],"mappings":"","sourcesContent":["import type { TContext } from '@/base/controllers/common/types';\nimport type { Env } from 'hono';\nimport type { IAuthUser } from './strategy';\n\nexport type TBasicTokenServiceOptions<E extends Env = Env> = {\n /** Callback to verify basic auth credentials. Returns IAuthUser if valid, null otherwise. */\n verifyCredentials: (opts: {\n credentials: { username: string; password: string };\n context: TContext<E, string>;\n }) => Promise<IAuthUser | null>;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,wCAAsB;AACtB,4CAA0B;AAC1B,yCAAuB;AACvB,4CAA0B;AAC1B,6CAA2B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,wCAAsB;AACtB,4CAA0B;AAC1B,yCAAuB;AACvB,4CAA0B;AAC1B,6CAA2B","sourcesContent":["export * from './basic';\nexport * from './jwt';\nexport * from './options';\nexport * from './rest';\nexport * from './service';\nexport * from './strategy';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/types/jwt.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"jwt.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/types/jwt.ts"],"names":[],"mappings":"","sourcesContent":["import type { IdType } from '@/base/models/common';\nimport type { ValueOrPromise } from '@venizia/ignis-helpers/common';\nimport type { AESAlgorithmType, IPayloadCipher } from '@venizia/ignis-helpers/core';\nimport type { JWTPayload } from 'jose';\nimport type { JOSEStandards, JWKSModes, TJWKSKeyDriver, TJWKSKeyFormat } from '../constants';\nimport type { IAuthUser } from './strategy';\n\n/**\n * Claim checks applied when VERIFYING a JWT. Field names and types mirror jose's `JWTVerifyOptions`\n * exactly, so this is a pass-through with no translation layer.\n *\n * Every field is optional and unset by default, which is today's behaviour: nothing is checked\n * beyond the signature and the time claims. In a fleet where every verifier points at the same\n * issuer JWKS, that means a token minted for one service is accepted verbatim by every other -\n * `audience` is what makes \"this token was meant for me\" a cryptographic statement rather than a\n * convention.\n */\nexport interface IJWTVerifyOptions {\n /** Expected `aud`. Setting it makes the claim required. Matching is jose's OVERLAP semantics, not equality: a token carrying `['a','b']` satisfies `audience: 'a'`. Enforce single-valued audiences at issue time if that matters. */\n audience?: string | string[];\n\n /** Expected `iss`. Setting it makes the claim required. */\n issuer?: string | string[];\n\n /** Expected `sub`. Setting it makes the claim required. */\n subject?: string;\n\n /** Clock skew tolerance: seconds, or a jose duration string such as `'30 seconds'`. */\n clockTolerance?: string | number;\n\n /** Accepted JWS `alg` header values. Unset means the accepted algorithm is decided entirely by what the JWKS serves. */\n algorithms?: string[];\n\n /** Caps elapsed time since `iat`. The real replay window for a short-lived assertion, independent of whatever `exp` the caller chose to stamp. */\n maxTokenAge?: string | number;\n\n /** Expected JWS `typ` header. The standard defence against cross-token-type confusion when one JWKS serves more than one kind of token. */\n typ?: string;\n\n /** Claims that must be present, beyond those implied by the checks above. */\n requiredClaims?: string[];\n}\n\n/** Default `iss` / `aud` stamped on every issued token. Configured values are AUTHORITATIVE - see {@link IJWTIssueClaims}. */\nexport interface IJWTSignOptions {\n issuer?: string;\n audience?: string | string[];\n}\n\n/**\n * Per-token registered claims, passed to `generate()`.\n *\n * This is the supported way to vary `aud` or `sub` per token. Putting them on the payload used to\n * work by accident - `iss`, `aud`, `sub` and `jti` ride through the AES envelope in the clear\n * because they are standard JWT fields - but a claim the payload can set is a claim any caller who\n * shapes the payload can forge. These win over {@link IJWTSignOptions}; the payload never does.\n */\nexport interface IJWTIssueClaims {\n issuer?: string;\n audience?: string | string[];\n subject?: string;\n jwtId?: string;\n}\n\nexport interface IJWSTokenServiceOptions {\n headerAlgorithm?: string;\n jwtSecret: string;\n getTokenExpiresFn: TGetTokenExpiresFn;\n aesAlgorithm?: AESAlgorithmType;\n applicationSecret?: string;\n fieldCodecs?: IPayloadFieldCodec[];\n /** Overrides the payload cipher - pass `LegacyAES` to keep reading tokens issued before the PBKDF2 envelope. */\n cipher?: IPayloadCipher;\n\n /** Claim checks applied on verify. Unset means signature and time claims only. */\n verify?: IJWTVerifyOptions;\n\n /** Claims stamped on every issued token. A configured value WINS over one supplied in the payload. */\n sign?: IJWTSignOptions;\n}\n\nexport type TJWKSAlgorithm = 'ES256' | 'RS256' | 'EdDSA';\n\nexport interface IJWKSIssuerOptions {\n mode: typeof JWKSModes.ISSUER;\n algorithm: TJWKSAlgorithm;\n rest?: { path: string };\n keys: {\n driver: TJWKSKeyDriver;\n format: TJWKSKeyFormat;\n private: string; // Key content (text) or file path (file) — PEM or JWK based on format\n public: string; // Key content (text) or file path (file) — PEM or JWK based on format\n };\n kid: string;\n getTokenExpiresFn: TGetTokenExpiresFn;\n aesAlgorithm?: AESAlgorithmType;\n applicationSecret?: string;\n fieldCodecs?: IPayloadFieldCodec[];\n /** Overrides the payload cipher - pass `LegacyAES` to keep reading tokens issued before the PBKDF2 envelope. */\n cipher?: IPayloadCipher;\n\n /** Claim checks applied on verify. Unset means signature and time claims only. */\n verify?: IJWTVerifyOptions;\n\n /** Claims stamped on every issued token. A configured value WINS over one supplied in the payload. */\n sign?: IJWTSignOptions;\n}\n\nexport interface IJWKSVerifierOptions {\n mode: typeof JWKSModes.VERIFIER;\n jwksUrl: string;\n cacheTtlMs?: number; // Default: 43_200_000 (12h)\n cooldownMs?: number; // Default: 30_000 (30s)\n aesAlgorithm?: AESAlgorithmType;\n applicationSecret?: string;\n fieldCodecs?: IPayloadFieldCodec[];\n /** Overrides the payload cipher - pass `LegacyAES` to keep reading tokens issued before the PBKDF2 envelope. */\n cipher?: IPayloadCipher;\n\n /** Claim checks applied on verify. Unset means signature and time claims only. */\n verify?: IJWTVerifyOptions;\n}\n\nexport type TJWKSTokenServiceOptions = IJWKSIssuerOptions | IJWKSVerifierOptions;\n\nexport type TJWTTokenServiceOptions =\n | { standard: typeof JOSEStandards.JWS; options: IJWSTokenServiceOptions }\n | { standard: typeof JOSEStandards.JWKS; options: TJWKSTokenServiceOptions };\n\nexport interface IJWTTokenPayload extends JWTPayload, IAuthUser {\n userId: IdType;\n roles: { id: IdType; identifier: string; priority: number }[];\n\n clientId?: string;\n provider?: string;\n email?: string;\n name?: string;\n\n [extra: string | symbol]: any;\n}\n\nexport interface IPayloadFieldCodec<T = unknown> {\n key: string;\n serialize(opts: { value: T }): string;\n deserialize(opts: { raw: string }): T;\n}\n\nexport type TGetTokenExpiresFn = () => ValueOrPromise<number>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/types/options.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/types/options.ts"],"names":[],"mappings":"","sourcesContent":["import type { TBasicTokenServiceOptions } from './basic';\nimport type { TJWTTokenServiceOptions } from './jwt';\nimport type { TAuthenticationRestOptions } from './rest';\nimport type { IServiceAuthOptions } from './service';\n\n/**\n * Composes the four topic option types into the framework's single authenticate config knob.\n * The only file in this folder allowed more than one sibling import - it is their parent.\n */\nexport interface IAuthenticateOptions {\n restOptions?: TAuthenticationRestOptions;\n jwtOptions?: TJWTTokenServiceOptions;\n basicOptions?: TBasicTokenServiceOptions;\n serviceOptions?: IServiceAuthOptions;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rest.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/types/rest.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"rest.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/types/rest.ts"],"names":[],"mappings":"","sourcesContent":["import type { TAnyObjectSchema } from '@/base/controllers/common/schema-builders';\n\nexport type TDefineAuthControllerOpts = {\n restPath?: string;\n serviceKey: string;\n requireAuthenticatedSignUp?: boolean;\n payload?: {\n signIn?: {\n request: { schema: TAnyObjectSchema };\n response: { schema: TAnyObjectSchema };\n };\n signUp?: {\n request: { schema: TAnyObjectSchema };\n response: { schema: TAnyObjectSchema };\n };\n changePassword?: {\n request: { schema?: TAnyObjectSchema };\n response: { schema: TAnyObjectSchema };\n };\n refreshToken?: {\n response: { schema: TAnyObjectSchema };\n };\n getUserInformation?: {\n response: { schema: TAnyObjectSchema };\n };\n };\n};\n\nexport type TAuthenticationRestOptions = {} & (\n | { useAuthController?: false | undefined }\n | {\n useAuthController: true;\n controllerOpts: TDefineAuthControllerOpts;\n }\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/types/service.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../../../../src/base/auth/authenticate/common/types/service.ts"],"names":[],"mappings":"","sourcesContent":["import type { TContext } from '@/base/controllers/common/types';\nimport type { TNullable, ValueOrPromise } from '@venizia/ignis-helpers/common';\nimport type { Env } from 'hono';\nimport type { JWTPayload } from 'jose';\nimport type { TJWKSKeyDriver, TJWKSKeyFormat } from '../constants';\nimport type { IAuthUser } from './strategy';\n\n/**\n * The request binding, following RFC 9449's `htm`/`htu`. A captured assertion cannot be replayed\n * against a different method or path.\n *\n * `htu` is the percent-ENCODED pathname on both ends. Compare it against\n * `new URL(context.req.url).pathname`, never `context.req.path` - Hono hands that one back DECODED,\n * so any route carrying a space or a non-ASCII slug would never match what the caller signed.\n */\nexport interface IServiceAssertionClaims extends JWTPayload {\n htm: string;\n htu: string;\n}\n\n/**\n * One entry in the caller allowlist: the JWKS url, or that url plus settings for this caller alone.\n */\nexport type TServiceCallerEntry =\n | string\n | {\n jwksUrl: string;\n /** Widens the accepted age for THIS caller only. Falls back to the service-wide setting. */\n acceptMaxAgeSeconds?: number;\n };\n\n/** Service-to-service authentication: an Ed25519 assertion per request, verified against the caller's JWKS. */\nexport interface IServiceAuthOptions<E extends Env = Env> {\n /** What this service calls itself: the `iss` it stamps, and the `aud` it demands. */\n name: string;\n\n /**\n * Present only on a service that CALLS OUT. Absent means verify-only, and no certs route is\n * mounted - which is the common case, since most services are called and never call.\n */\n keys?: {\n driver: TJWKSKeyDriver;\n format: TJWKSKeyFormat;\n /** PEM or JWK by `format`; content for the `text` driver, a path for `file`. */\n private: string;\n public: string;\n kid?: string;\n };\n\n /**\n * Caller name to its JWKS url. THIS IS ALSO THE ALLOWLIST - a name absent from the map cannot\n * call, and an empty map correctly allows nobody.\n *\n * The bare-string form is the common case. The object form exists to widen the accepted age for\n * ONE caller: a nightly batch may legitimately need more slack than an interactive service, and\n * granting it per caller keeps the concession named and visible in config.\n */\n callers?: Record<string, TServiceCallerEntry>;\n\n /** Where the certs route is mounted. Defaults to `ServiceAssertion.DEFAULT_REST_PATH`. */\n rest?: { path: string };\n\n /**\n * How long the assertions this service MINTS stay valid. Only meaningful where `keys` is set.\n */\n signLifetimeSeconds?: number;\n\n /**\n * The oldest assertion this service ACCEPTS, measured from `iat`.\n *\n * Deliberately separate from `signLifetimeSeconds`, and deliberately not requestable by the\n * caller. The caller already controls `exp` - it signs the token - so this is the only bound that\n * survives a compromised caller. A per-caller override belongs in {@link callers}, never in the\n * assertion.\n *\n * Composes with `clockToleranceSeconds`: the real acceptance window is the sum of the two.\n */\n acceptMaxAgeSeconds?: number;\n\n /**\n * Clock skew allowance. A SECURITY knob, not an operational one.\n *\n * Its job is the future case: two machines never agree to the second, and without it a caller one\n * second ahead is refused outright. But it also widens the REPLAY window second for second - a\n * callee accepting an `iat` 5s in its own future keeps accepting that token for the rest of the\n * window too. Measured at the defaults: 65s accepted on our clock, 70s of wall-clock life for a\n * capture minted by a caller running the full tolerance fast.\n */\n clockToleranceSeconds?: number;\n\n jwks?: { cacheMaxAgeMs?: number; cooldownMs?: number };\n\n /**\n * WHO a verified assertion acts as. The framework has already proven the caller; this only maps a\n * caller name onto an application principal. Return `null` to refuse a caller the allowlist\n * admits but the application does not recognise.\n */\n resolvePrincipal: (opts: {\n issuer: string;\n context: TContext<E, string>;\n }) => ValueOrPromise<TNullable<IAuthUser>>;\n}\n"]}
|