@rockster/core 0.0.2 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/access/access.module.d.ts +11 -0
- package/access/access.module.js +56 -0
- package/access/access.module.js.map +1 -0
- package/access/constants.d.ts +2 -0
- package/access/constants.js +6 -0
- package/access/constants.js.map +1 -0
- package/access/controllers/controllers.d.ts +7 -0
- package/access/controllers/controllers.js +18 -0
- package/access/controllers/controllers.js.map +1 -0
- package/access/controllers/scope-access-profile.controller.d.ts +17 -0
- package/access/controllers/scope-access-profile.controller.js +111 -0
- package/access/controllers/scope-access-profile.controller.js.map +1 -0
- package/access/controllers/scope-group-user.controller.d.ts +20 -0
- package/access/controllers/scope-group-user.controller.js +132 -0
- package/access/controllers/scope-group-user.controller.js.map +1 -0
- package/access/controllers/scope-group.controller.d.ts +22 -0
- package/access/controllers/scope-group.controller.js +177 -0
- package/access/controllers/scope-group.controller.js.map +1 -0
- package/access/controllers/scope-key.controller.d.ts +7 -0
- package/access/controllers/scope-key.controller.js +45 -0
- package/access/controllers/scope-key.controller.js.map +1 -0
- package/access/controllers/scope-owner.controller.d.ts +9 -0
- package/access/controllers/scope-owner.controller.js +80 -0
- package/access/controllers/scope-owner.controller.js.map +1 -0
- package/access/controllers/scope-user.controller.d.ts +14 -0
- package/access/controllers/scope-user.controller.js +109 -0
- package/access/controllers/scope-user.controller.js.map +1 -0
- package/access/decorators/context-params.decorator.d.ts +2 -0
- package/access/decorators/context-params.decorator.js +13 -0
- package/access/decorators/context-params.decorator.js.map +1 -0
- package/access/decorators/index.d.ts +2 -0
- package/access/decorators/index.js +19 -0
- package/access/decorators/index.js.map +1 -0
- package/access/decorators/scope-context-id-resolver.decorator.d.ts +10 -0
- package/access/decorators/scope-context-id-resolver.decorator.js +22 -0
- package/access/decorators/scope-context-id-resolver.decorator.js.map +1 -0
- package/access/entities/entities.d.ts +8 -0
- package/access/entities/entities.js +22 -0
- package/access/entities/entities.js.map +1 -0
- package/access/entities/index.d.ts +7 -0
- package/access/entities/index.js +24 -0
- package/access/entities/index.js.map +1 -0
- package/access/entities/scope-access-profile-key.d.ts +6 -0
- package/access/entities/scope-access-profile-key.js +40 -0
- package/access/entities/scope-access-profile-key.js.map +1 -0
- package/access/entities/scope-access-profile.d.ts +6 -0
- package/access/entities/scope-access-profile.js +37 -0
- package/access/entities/scope-access-profile.js.map +1 -0
- package/access/entities/scope-access.d.ts +9 -0
- package/access/entities/scope-access.js +58 -0
- package/access/entities/scope-access.js.map +1 -0
- package/access/entities/scope-group-user.d.ts +7 -0
- package/access/entities/scope-group-user.js +47 -0
- package/access/entities/scope-group-user.js.map +1 -0
- package/access/entities/scope-group.d.ts +12 -0
- package/access/entities/scope-group.js +72 -0
- package/access/entities/scope-group.js.map +1 -0
- package/access/entities/scope-key.d.ts +5 -0
- package/access/entities/scope-key.js +35 -0
- package/access/entities/scope-key.js.map +1 -0
- package/access/entities/scope-owner.d.ts +7 -0
- package/access/entities/scope-owner.js +45 -0
- package/access/entities/scope-owner.js.map +1 -0
- package/access/env.d.ts +10 -0
- package/access/env.js +10 -0
- package/access/env.js.map +1 -0
- package/access/functions/assert-context-admin-access.d.ts +15 -0
- package/access/functions/assert-context-admin-access.js +62 -0
- package/access/functions/assert-context-admin-access.js.map +1 -0
- package/access/functions/assert-master-or-owner.d.ts +9 -0
- package/access/functions/assert-master-or-owner.js +40 -0
- package/access/functions/assert-master-or-owner.js.map +1 -0
- package/access/functions/assert-scope-action-access.d.ts +32 -0
- package/access/functions/assert-scope-action-access.js +189 -0
- package/access/functions/assert-scope-action-access.js.map +1 -0
- package/access/functions/build-scope-resolver-initial-data.d.ts +4 -0
- package/access/functions/build-scope-resolver-initial-data.js +17 -0
- package/access/functions/build-scope-resolver-initial-data.js.map +1 -0
- package/access/functions/describe-action-scope.d.ts +9 -0
- package/access/functions/describe-action-scope.js +27 -0
- package/access/functions/describe-action-scope.js.map +1 -0
- package/access/functions/get-context-id-service.d.ts +1 -0
- package/access/functions/get-context-id-service.js +8 -0
- package/access/functions/get-context-id-service.js.map +1 -0
- package/access/functions/get-is-owner.d.ts +1 -0
- package/access/functions/get-is-owner.js +8 -0
- package/access/functions/get-is-owner.js.map +1 -0
- package/access/functions/get-user-keys.d.ts +2 -0
- package/access/functions/get-user-keys.js +10 -0
- package/access/functions/get-user-keys.js.map +1 -0
- package/access/functions/index.d.ts +8 -0
- package/access/functions/index.js +25 -0
- package/access/functions/index.js.map +1 -0
- package/access/functions/init-scope-service-executors.d.ts +3 -0
- package/access/functions/init-scope-service-executors.js +38 -0
- package/access/functions/init-scope-service-executors.js.map +1 -0
- package/access/functions/normalize-scope-keys.d.ts +4 -0
- package/access/functions/normalize-scope-keys.js +17 -0
- package/access/functions/normalize-scope-keys.js.map +1 -0
- package/access/functions/register-scope.d.ts +19 -0
- package/access/functions/register-scope.js +94 -0
- package/access/functions/register-scope.js.map +1 -0
- package/access/functions/resolve-scope-context-id.d.ts +9 -0
- package/access/functions/resolve-scope-context-id.js +71 -0
- package/access/functions/resolve-scope-context-id.js.map +1 -0
- package/access/functions/warn-if-public.d.ts +12 -0
- package/access/functions/warn-if-public.js +20 -0
- package/access/functions/warn-if-public.js.map +1 -0
- package/access/index.d.ts +7 -0
- package/access/index.js +24 -0
- package/access/index.js.map +1 -0
- package/access/interfaces/index.d.ts +3 -0
- package/access/interfaces/index.js +20 -0
- package/access/interfaces/index.js.map +1 -0
- package/access/interfaces/resolve-scope-context-id.d.ts +21 -0
- package/access/interfaces/resolve-scope-context-id.js +3 -0
- package/access/interfaces/resolve-scope-context-id.js.map +1 -0
- package/access/interfaces/scope-service-registry.d.ts +21 -0
- package/access/interfaces/scope-service-registry.js +3 -0
- package/access/interfaces/scope-service-registry.js.map +1 -0
- package/access/interfaces/scope-service.d.ts +11 -0
- package/{database/interfaces/protector.js → access/interfaces/scope-service.js} +1 -1
- package/access/interfaces/scope-service.js.map +1 -0
- package/access/models/scope-access-profile-keys-update.d.ts +5 -0
- package/access/models/scope-access-profile-keys-update.js +27 -0
- package/access/models/scope-access-profile-keys-update.js.map +1 -0
- package/access/models/scope-context.d.ts +4 -0
- package/access/models/scope-context.js +27 -0
- package/access/models/scope-context.js.map +1 -0
- package/access/models/scope-group-apply-access-profile.d.ts +6 -0
- package/access/models/scope-group-apply-access-profile.js +32 -0
- package/access/models/scope-group-apply-access-profile.js.map +1 -0
- package/access/models/scope-keys-update.d.ts +7 -0
- package/access/models/scope-keys-update.js +38 -0
- package/access/models/scope-keys-update.js.map +1 -0
- package/access/models/scope-owner.d.ts +5 -0
- package/access/models/scope-owner.js +32 -0
- package/access/models/scope-owner.js.map +1 -0
- package/access/models/scope-user-mapped.d.ts +9 -0
- package/access/models/scope-user-mapped.js +48 -0
- package/access/models/scope-user-mapped.js.map +1 -0
- package/access/models/scope-user.d.ts +9 -0
- package/access/models/scope-user.js +51 -0
- package/access/models/scope-user.js.map +1 -0
- package/access/queries/scope-access-profile.query.d.ts +1 -0
- package/access/queries/scope-access-profile.query.js +10 -0
- package/access/queries/scope-access-profile.query.js.map +1 -0
- package/access/queries/scope-group-user.query.d.ts +1 -0
- package/access/queries/scope-group-user.query.js +26 -0
- package/access/queries/scope-group-user.query.js.map +1 -0
- package/access/queries/scope-group.query.d.ts +1 -0
- package/access/queries/scope-group.query.js +19 -0
- package/access/queries/scope-group.query.js.map +1 -0
- package/access/services/index.d.ts +7 -0
- package/access/services/index.js +24 -0
- package/access/services/index.js.map +1 -0
- package/access/services/scope-access-profile.service.d.ts +13 -0
- package/access/services/scope-access-profile.service.js +75 -0
- package/access/services/scope-access-profile.service.js.map +1 -0
- package/access/services/scope-access.service.d.ts +11 -0
- package/access/services/scope-access.service.js +89 -0
- package/access/services/scope-access.service.js.map +1 -0
- package/access/services/scope-group-user.service.d.ts +8 -0
- package/access/services/scope-group-user.service.js +49 -0
- package/access/services/scope-group-user.service.js.map +1 -0
- package/access/services/scope-group.service.d.ts +17 -0
- package/access/services/scope-group.service.js +75 -0
- package/access/services/scope-group.service.js.map +1 -0
- package/access/services/scope-key.service.d.ts +9 -0
- package/access/services/scope-key.service.js +52 -0
- package/access/services/scope-key.service.js.map +1 -0
- package/access/services/scope-owner.service.d.ts +10 -0
- package/access/services/scope-owner.service.js +60 -0
- package/access/services/scope-owner.service.js.map +1 -0
- package/access/services/scope-service.d.ts +10 -0
- package/access/services/scope-service.js +52 -0
- package/access/services/scope-service.js.map +1 -0
- package/command/functions/execute-post.js +5 -7
- package/command/functions/execute-post.js.map +1 -1
- package/command/services/post-action-builder.js +21 -17
- package/command/services/post-action-builder.js.map +1 -1
- package/command/services/remove-action-builder.js +32 -22
- package/command/services/remove-action-builder.js.map +1 -1
- package/common/entities/base-entity.js +2 -0
- package/common/entities/base-entity.js.map +1 -1
- package/common/interfaces/enum/object-type.d.ts +2 -1
- package/common/interfaces/enum/object-type.js +1 -0
- package/common/interfaces/enum/object-type.js.map +1 -1
- package/controllers/constants/controller-transaction.d.ts +2 -0
- package/controllers/constants/controller-transaction.js +6 -0
- package/controllers/constants/controller-transaction.js.map +1 -0
- package/controllers/controller.controller.d.ts +1 -1
- package/controllers/controller.controller.js +4 -4
- package/controllers/controller.controller.js.map +1 -1
- package/controllers/decorators/controller.decorator.js +8 -0
- package/controllers/decorators/controller.decorator.js.map +1 -1
- package/controllers/decorators/index.d.ts +1 -0
- package/controllers/decorators/index.js +1 -0
- package/controllers/decorators/index.js.map +1 -1
- package/controllers/decorators/transaction.decorator.d.ts +7 -0
- package/controllers/decorators/transaction.decorator.js +23 -0
- package/controllers/decorators/transaction.decorator.js.map +1 -0
- package/controllers/interfaces/controller-object.d.ts +1 -0
- package/controllers/interfaces/controller-options.d.ts +1 -0
- package/controllers/interfaces/controller-property.d.ts +9 -0
- package/controllers/services/default-action-builder.js +14 -0
- package/controllers/services/default-action-builder.js.map +1 -1
- package/controllers/services/restful-action-builder.js +25 -1
- package/controllers/services/restful-action-builder.js.map +1 -1
- package/core/contexts/request-context.d.ts +5 -0
- package/core/contexts/request-context.js +6 -0
- package/core/contexts/request-context.js.map +1 -0
- package/core/core.controller.d.ts +1 -0
- package/core/core.controller.js +15 -2
- package/core/core.controller.js.map +1 -1
- package/core/functions/create-interceptor.js +2 -2
- package/core/functions/create-interceptor.js.map +1 -1
- package/core/functions/resolve-action-transactional.d.ts +3 -0
- package/core/functions/resolve-action-transactional.js +10 -0
- package/core/functions/resolve-action-transactional.js.map +1 -0
- package/core/interfaces/action-def.d.ts +2 -5
- package/core/interfaces/action-docs.d.ts +15 -0
- package/core/interfaces/action-handle.d.ts +5 -0
- package/core/interfaces/action-handle.js +3 -0
- package/core/interfaces/action-handle.js.map +1 -0
- package/core/interfaces/core-options.d.ts +1 -0
- package/core/interfaces/interceptor.d.ts +1 -1
- package/core/interfaces/object.d.ts +3 -2
- package/core/interfaces/request-context.d.ts +7 -2
- package/core/services/request-executor.d.ts +8 -0
- package/core/services/request-executor.js +88 -0
- package/core/services/request-executor.js.map +1 -1
- package/core/services/request-router.js +5 -4
- package/core/services/request-router.js.map +1 -1
- package/database/database.controller.d.ts +1 -3
- package/database/database.controller.js +1 -5
- package/database/database.controller.js.map +1 -1
- package/database/decorators/entity.decorator.d.ts +3 -1
- package/database/decorators/entity.decorator.js +14 -5
- package/database/decorators/entity.decorator.js.map +1 -1
- package/database/decorators/external-column.decorator.d.ts +17 -0
- package/database/decorators/external-column.decorator.js +30 -0
- package/database/decorators/external-column.decorator.js.map +1 -0
- package/database/decorators/index.d.ts +1 -0
- package/database/decorators/index.js +1 -0
- package/database/decorators/index.js.map +1 -1
- package/database/decorators/protect-entity.decorator.d.ts +1 -0
- package/database/decorators/protect-entity.decorator.js +2 -3
- package/database/decorators/protect-entity.decorator.js.map +1 -1
- package/database/decorators/protected-entity.decorator.d.ts +1 -0
- package/database/decorators/protected-entity.decorator.js +2 -16
- package/database/decorators/protected-entity.decorator.js.map +1 -1
- package/database/decorators/relation.decorator.d.ts +2 -2
- package/database/decorators/relation.decorator.js.map +1 -1
- package/database/extensions/select-query-builder.d.ts +1 -5
- package/database/extensions/select-query-builder.js.map +1 -1
- package/database/functions/find-relation.d.ts +2 -1
- package/database/functions/find-relation.js +3 -3
- package/database/functions/find-relation.js.map +1 -1
- package/database/functions/generate-entity-id.d.ts +2 -0
- package/database/functions/{generate-id.js → generate-entity-id.js} +3 -3
- package/database/functions/generate-entity-id.js.map +1 -0
- package/database/functions/get-relations.d.ts +1 -1
- package/database/functions/inject-repository-handle.js +4 -3
- package/database/functions/inject-repository-handle.js.map +1 -1
- package/database/functions/use-transaction.d.ts +1 -0
- package/database/functions/use-transaction.js +2 -6
- package/database/functions/use-transaction.js.map +1 -1
- package/database/interfaces/entity-dto-object.d.ts +7 -0
- package/database/interfaces/entity-dto-object.js +3 -0
- package/database/interfaces/entity-dto-object.js.map +1 -0
- package/database/interfaces/entity-object.d.ts +0 -6
- package/database/interfaces/entity-property.d.ts +12 -0
- package/database/interfaces/index.d.ts +0 -1
- package/database/interfaces/index.js +0 -1
- package/database/interfaces/index.js.map +1 -1
- package/database/interfaces/path.d.ts +6 -2
- package/database/interfaces/repository.d.ts +8 -8
- package/database/interfaces/virtual-select.d.ts +4 -0
- package/database/interfaces/virtual-select.js +3 -0
- package/database/interfaces/virtual-select.js.map +1 -0
- package/database/services/repository.service.d.ts +1 -1
- package/database/services/repository.service.js +3 -6
- package/database/services/repository.service.js.map +1 -1
- package/docs/docs.module.js +3 -1
- package/docs/docs.module.js.map +1 -1
- package/docs/migrations/1747584000000-CreateDocsTables.d.ts +5 -0
- package/docs/migrations/1747584000000-CreateDocsTables.js +90 -0
- package/docs/migrations/1747584000000-CreateDocsTables.js.map +1 -0
- package/docs/migrations/migrations.d.ts +2 -0
- package/docs/migrations/migrations.js +8 -0
- package/docs/migrations/migrations.js.map +1 -0
- package/docs/queries/docs-controller-action.query.d.ts +1 -1
- package/docs/queries/docs-controller.query.d.ts +1 -1
- package/docs/queries/docs-model.query.d.ts +1 -1
- package/docs/queries/docs-model.query.js +1 -1
- package/docs/queries/docs-model.query.js.map +1 -1
- package/docs/queries/docs-version.query.d.ts +1 -1
- package/docs/services/docs-version.service.js +6 -3
- package/docs/services/docs-version.service.js.map +1 -1
- package/forms/queries/form.query.d.ts +1 -1
- package/forms/queries/property.query.d.ts +1 -1
- package/global.d.ts +2 -0
- package/global.js +2 -1
- package/global.js.map +1 -1
- package/http/http.controller.d.ts +2 -0
- package/http/http.controller.js +3 -2
- package/http/http.controller.js.map +1 -1
- package/index.d.ts +5 -2
- package/index.js +4 -7
- package/index.js.map +1 -1
- package/jobs/jobs.controller.d.ts +2 -0
- package/jobs/jobs.controller.js +22 -16
- package/jobs/jobs.controller.js.map +1 -1
- package/package.json +70 -69
- package/query/functions/add-join.js +8 -16
- package/query/functions/add-join.js.map +1 -1
- package/query/functions/collect-external-column-owners.d.ts +10 -0
- package/query/functions/collect-external-column-owners.js +100 -0
- package/query/functions/collect-external-column-owners.js.map +1 -0
- package/query/functions/create-query-builder.js +47 -28
- package/query/functions/create-query-builder.js.map +1 -1
- package/query/functions/create-query-cache-hash.d.ts +16 -0
- package/query/functions/create-query-cache-hash.js +70 -0
- package/query/functions/create-query-cache-hash.js.map +1 -0
- package/query/functions/create-query.d.ts +8 -3
- package/query/functions/create-query.js +12 -9
- package/query/functions/create-query.js.map +1 -1
- package/query/functions/describe-query-filter.js +3 -2
- package/query/functions/describe-query-filter.js.map +1 -1
- package/query/functions/execute-query.js +89 -9
- package/query/functions/execute-query.js.map +1 -1
- package/query/functions/expand-select-with-external-dependencies.d.ts +9 -0
- package/query/functions/expand-select-with-external-dependencies.js +34 -0
- package/query/functions/expand-select-with-external-dependencies.js.map +1 -0
- package/query/functions/external-column-owner-path.d.ts +5 -0
- package/query/functions/external-column-owner-path.js +18 -0
- package/query/functions/external-column-owner-path.js.map +1 -0
- package/query/functions/get-entity-object-class.d.ts +2 -0
- package/query/functions/get-entity-object-class.js +12 -0
- package/query/functions/get-entity-object-class.js.map +1 -0
- package/query/functions/get-native-select.js +3 -0
- package/query/functions/get-native-select.js.map +1 -1
- package/query/functions/load-properties.d.ts +20 -2
- package/query/functions/load-properties.js +190 -40
- package/query/functions/load-properties.js.map +1 -1
- package/query/functions/map-query-property-to-column-name.js +1 -1
- package/query/functions/map-query-property-to-column-name.js.map +1 -1
- package/query/functions/query-structure-cache.d.ts +24 -0
- package/query/functions/query-structure-cache.js +66 -0
- package/query/functions/query-structure-cache.js.map +1 -0
- package/query/interfaces/query.d.ts +44 -1
- package/query/services/query-action-builder.d.ts +4 -1
- package/query/services/query-action-builder.js +26 -12
- package/query/services/query-action-builder.js.map +1 -1
- package/remote-logs/dtos/index.d.ts +2 -0
- package/remote-logs/dtos/index.js +19 -0
- package/remote-logs/dtos/index.js.map +1 -0
- package/remote-logs/dtos/remote-log-hooks.dto.d.ts +72 -0
- package/remote-logs/dtos/remote-log-hooks.dto.js +280 -0
- package/remote-logs/dtos/remote-log-hooks.dto.js.map +1 -0
- package/remote-logs/dtos/remote-log-search.dto.d.ts +34 -0
- package/remote-logs/dtos/remote-log-search.dto.js +146 -0
- package/remote-logs/dtos/remote-log-search.dto.js.map +1 -0
- package/remote-logs/environment.d.ts +4 -0
- package/remote-logs/environment.js +5 -0
- package/remote-logs/environment.js.map +1 -0
- package/remote-logs/index.d.ts +3 -0
- package/remote-logs/index.js +20 -0
- package/remote-logs/index.js.map +1 -0
- package/remote-logs/interfaces/index.d.ts +1 -0
- package/remote-logs/interfaces/index.js +18 -0
- package/remote-logs/interfaces/index.js.map +1 -0
- package/remote-logs/interfaces/remote-logs-module-options.d.ts +8 -0
- package/remote-logs/interfaces/remote-logs-module-options.js +3 -0
- package/remote-logs/interfaces/remote-logs-module-options.js.map +1 -0
- package/remote-logs/remote-logs-hooks.controller.d.ts +60 -0
- package/remote-logs/remote-logs-hooks.controller.js +331 -0
- package/remote-logs/remote-logs-hooks.controller.js.map +1 -0
- package/remote-logs/remote-logs.controller.d.ts +8 -0
- package/remote-logs/remote-logs.controller.js +41 -0
- package/remote-logs/remote-logs.controller.js.map +1 -0
- package/remote-logs/remote-logs.module.d.ts +12 -0
- package/remote-logs/remote-logs.module.js +107 -0
- package/remote-logs/remote-logs.module.js.map +1 -0
- package/remote-logs/services/opensearch.service.d.ts +13 -0
- package/remote-logs/services/opensearch.service.js +167 -0
- package/remote-logs/services/opensearch.service.js.map +1 -0
- package/security/auth.controller.js +4 -4
- package/security/auth.controller.js.map +1 -1
- package/security/env.js.map +1 -1
- package/security/functions/add-protected.d.ts +2 -2
- package/security/functions/add-protected.js +8 -5
- package/security/functions/add-protected.js.map +1 -1
- package/security/functions/create-authentication-interceptor.d.ts +44 -0
- package/security/functions/create-authentication-interceptor.js +114 -0
- package/security/functions/create-authentication-interceptor.js.map +1 -0
- package/security/functions/find-auth-context.d.ts +1 -2
- package/security/functions/find-auth-context.js +6 -11
- package/security/functions/find-auth-context.js.map +1 -1
- package/security/index.d.ts +1 -0
- package/security/index.js +1 -0
- package/security/index.js.map +1 -1
- package/security/interfaces/authorization-schema.d.ts +3 -1
- package/security/requests/security.request.js +1 -1
- package/security/requests/security.request.js.map +1 -1
- package/security/services/authorization.service.d.ts +5 -3
- package/security/services/authorization.service.js +56 -37
- package/security/services/authorization.service.js.map +1 -1
- package/storage/services/routes.service.js +1 -1
- package/storage/services/routes.service.js.map +1 -1
- package/tasks/constants.d.ts +3 -0
- package/tasks/constants.js +2 -1
- package/tasks/constants.js.map +1 -1
- package/tasks/controllers/task.controller.d.ts +3 -2
- package/tasks/controllers/task.controller.js +11 -40
- package/tasks/controllers/task.controller.js.map +1 -1
- package/tasks/decorators/index.d.ts +1 -0
- package/tasks/decorators/index.js +1 -0
- package/tasks/decorators/index.js.map +1 -1
- package/tasks/decorators/task-payload.decorator.d.ts +1 -0
- package/tasks/decorators/task-payload.decorator.js +12 -0
- package/tasks/decorators/task-payload.decorator.js.map +1 -0
- package/tasks/decorators/task.decorator.js +6 -2
- package/tasks/decorators/task.decorator.js.map +1 -1
- package/tasks/functions/compile-all-task-post-hooks.d.ts +1 -0
- package/tasks/functions/compile-all-task-post-hooks.js +27 -0
- package/tasks/functions/compile-all-task-post-hooks.js.map +1 -0
- package/tasks/functions/compile-task-hook-handle.d.ts +6 -0
- package/tasks/functions/compile-task-hook-handle.js +67 -0
- package/tasks/functions/compile-task-hook-handle.js.map +1 -0
- package/tasks/functions/create-task-hook.d.ts +9 -0
- package/tasks/functions/create-task-hook.js +13 -0
- package/tasks/functions/create-task-hook.js.map +1 -0
- package/tasks/functions/{create-task-message-receptor.d.ts → create-task-message-post.d.ts} +1 -1
- package/tasks/functions/{create-task-message-receptor.js → create-task-message-post.js} +10 -3
- package/tasks/functions/create-task-message-post.js.map +1 -0
- package/tasks/functions/register-task-post-hook-interceptors.d.ts +3 -0
- package/tasks/functions/register-task-post-hook-interceptors.js +86 -0
- package/tasks/functions/register-task-post-hook-interceptors.js.map +1 -0
- package/tasks/functions/run-task-post-hooks.d.ts +11 -0
- package/tasks/functions/run-task-post-hooks.js +18 -0
- package/tasks/functions/run-task-post-hooks.js.map +1 -0
- package/tasks/functions/task-message-operations.d.ts +18 -0
- package/tasks/functions/task-message-operations.js +100 -0
- package/tasks/functions/task-message-operations.js.map +1 -0
- package/tasks/functions/validate-task-payload.d.ts +2 -0
- package/tasks/functions/validate-task-payload.js +19 -0
- package/tasks/functions/validate-task-payload.js.map +1 -0
- package/tasks/hook-constants.d.ts +2 -0
- package/tasks/hook-constants.js +6 -0
- package/tasks/hook-constants.js.map +1 -0
- package/tasks/index.d.ts +3 -0
- package/tasks/index.js +3 -0
- package/tasks/index.js.map +1 -1
- package/tasks/interfaces/compiled-task-post-hooks.d.ts +17 -0
- package/tasks/interfaces/compiled-task-post-hooks.js +3 -0
- package/tasks/interfaces/compiled-task-post-hooks.js.map +1 -0
- package/tasks/interfaces/index.d.ts +3 -0
- package/tasks/interfaces/index.js +3 -0
- package/tasks/interfaces/index.js.map +1 -1
- package/tasks/interfaces/task-hook.d.ts +16 -0
- package/tasks/interfaces/task-hook.js +8 -0
- package/tasks/interfaces/task-hook.js.map +1 -0
- package/tasks/interfaces/task-object.d.ts +6 -2
- package/tasks/interfaces/task-post-hook.d.ts +2 -0
- package/tasks/interfaces/task-post-hook.js +3 -0
- package/tasks/interfaces/task-post-hook.js.map +1 -0
- package/tasks/interfaces/task-post-intercept.d.ts +1 -8
- package/tasks/interfaces/task-runner.d.ts +2 -1
- package/tasks/interfaces/task-settings.d.ts +7 -0
- package/tasks/services/task-runner.service.d.ts +24 -3
- package/tasks/services/task-runner.service.js +68 -28
- package/tasks/services/task-runner.service.js.map +1 -1
- package/translations/controllers/translation.controller.js +12 -9
- package/translations/controllers/translation.controller.js.map +1 -1
- package/translations/functions/create-translation-values.js +2 -5
- package/translations/functions/create-translation-values.js.map +1 -1
- package/translations/migrations/1723760669185-CreateTranslationTables.js +3 -3
- package/translations/migrations/1723760669185-CreateTranslationTables.js.map +1 -1
- package/translations/queries/translation-config.query.d.ts +1 -1
- package/translations/queries/translation-values.query.d.ts +1 -1
- package/translations/queries/translation-values.query.js +1 -1
- package/translations/queries/translation-values.query.js.map +1 -1
- package/translations/translations.controller.d.ts +1 -1
- package/translations/translations.controller.js +4 -4
- package/translations/translations.controller.js.map +1 -1
- package/database/functions/generate-id.d.ts +0 -2
- package/database/functions/generate-id.js.map +0 -1
- package/database/functions/use-protector.d.ts +0 -2
- package/database/functions/use-protector.js +0 -11
- package/database/functions/use-protector.js.map +0 -1
- package/database/interfaces/protector.d.ts +0 -51
- package/database/interfaces/protector.js.map +0 -1
- package/database/services/protect-builder.d.ts +0 -59
- package/database/services/protect-builder.js +0 -524
- package/database/services/protect-builder.js.map +0 -1
- package/security/functions/add-protect.d.ts +0 -2
- package/security/functions/add-protect.js +0 -11
- package/security/functions/add-protect.js.map +0 -1
- package/tasks/functions/create-task-message-receptor.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute-query.js","sourceRoot":"./","sources":["query/functions/execute-query.ts"],"names":[],"mappings":";;;AAAA,iEAA4D;
|
|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
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Dictionary } from "@rockster/common";
|
|
2
|
+
import type { Logger } from "@rockster/logger";
|
|
3
|
+
import type { QueryProperty } from "../interfaces/query";
|
|
4
|
+
/**
|
|
5
|
+
* Adds DB query paths listed on external columns' `externalDependencyQueryPaths` when those paths are selected.
|
|
6
|
+
* Runs to a fixpoint so chained requirements are included. Used only for SQL/joins; keep the original
|
|
7
|
+
* `query.select` for `transform` so dependency fields are not exposed unless the client asked for them.
|
|
8
|
+
*/
|
|
9
|
+
export declare function expandSelectWithExternalDependencies(properties: Dictionary<QueryProperty>, select: string[], logger?: Logger): string[];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.expandSelectWithExternalDependencies = expandSelectWithExternalDependencies;
|
|
4
|
+
/**
|
|
5
|
+
* Adds DB query paths listed on external columns' `externalDependencyQueryPaths` when those paths are selected.
|
|
6
|
+
* Runs to a fixpoint so chained requirements are included. Used only for SQL/joins; keep the original
|
|
7
|
+
* `query.select` for `transform` so dependency fields are not exposed unless the client asked for them.
|
|
8
|
+
*/
|
|
9
|
+
function expandSelectWithExternalDependencies(properties, select, logger) {
|
|
10
|
+
const set = new Set(select);
|
|
11
|
+
let changed = true;
|
|
12
|
+
while (changed) {
|
|
13
|
+
changed = false;
|
|
14
|
+
for (const path of [...set]) {
|
|
15
|
+
const deps = properties[path]?.externalDependencyQueryPaths;
|
|
16
|
+
if (!deps?.length) {
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
for (const dep of deps) {
|
|
20
|
+
if (set.has(dep)) {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
if (!properties[dep]) {
|
|
24
|
+
logger?.warn(`External column dependency "${dep}" (for selected "${path}") is not a registered query path`);
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
set.add(dep);
|
|
28
|
+
changed = true;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return [...set];
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=expand-select-with-external-dependencies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expand-select-with-external-dependencies.js","sourceRoot":"./","sources":["query/functions/expand-select-with-external-dependencies.ts"],"names":[],"mappings":";;AASA,oFA8BC;AAnCD;;;;GAIG;AACH,SAAgB,oCAAoC,CACjD,UAAqC,EACrC,MAAgB,EAChB,MAAe;IAEf,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,OAAO,OAAO,EAAE,CAAC;QACd,OAAO,GAAG,KAAK,CAAC;QAChB,KAAK,MAAM,IAAI,IAAI,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,EAAE,4BAA4B,CAAC;YAC5D,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;gBACjB,SAAS;YACZ,CAAC;YACD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;gBACtB,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;oBAChB,SAAS;gBACZ,CAAC;gBACD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;oBACpB,MAAM,EAAE,IAAI,CACT,+BAA+B,GAAG,oBAAoB,IAAI,mCAAmC,CAC/F,CAAC;oBACF,SAAS;gBACZ,CAAC;gBACD,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACb,OAAO,GAAG,IAAI,CAAC;YAClB,CAAC;QACJ,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Segments to walk from each root query row to the object that owns an external column.
|
|
3
|
+
* Empty when the owner is the root entity row (e.g. root-level `status`).
|
|
4
|
+
*/
|
|
5
|
+
export declare function toExternalOwnerWalkSegments(ownerFullPath: string, rootAlias: string): string[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toExternalOwnerWalkSegments = toExternalOwnerWalkSegments;
|
|
4
|
+
/**
|
|
5
|
+
* Segments to walk from each root query row to the object that owns an external column.
|
|
6
|
+
* Empty when the owner is the root entity row (e.g. root-level `status`).
|
|
7
|
+
*/
|
|
8
|
+
function toExternalOwnerWalkSegments(ownerFullPath, rootAlias) {
|
|
9
|
+
if (ownerFullPath === rootAlias) {
|
|
10
|
+
return [];
|
|
11
|
+
}
|
|
12
|
+
const prefix = `${rootAlias}.`;
|
|
13
|
+
if (ownerFullPath.startsWith(prefix)) {
|
|
14
|
+
return ownerFullPath.slice(prefix.length).split(".").filter(Boolean);
|
|
15
|
+
}
|
|
16
|
+
return ownerFullPath.split(".").filter(Boolean);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=external-column-owner-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-column-owner-path.js","sourceRoot":"./","sources":["query/functions/external-column-owner-path.ts"],"names":[],"mappings":";;AAIA,kEAYC;AAhBD;;;GAGG;AACH,SAAgB,2BAA2B,CACxC,aAAqB,EACrB,SAAiB;IAEjB,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,EAAE,CAAC;IACb,CAAC;IACD,MAAM,MAAM,GAAG,GAAG,SAAS,GAAG,CAAC;IAC/B,IAAI,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QACpC,OAAO,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEntityObjectClass = void 0;
|
|
4
|
+
const object_type_1 = require("../../common/interfaces/enum/object-type");
|
|
5
|
+
const getEntityObjectClass = (target) => {
|
|
6
|
+
const object = core.storage.findObject(target);
|
|
7
|
+
return object?.type === object_type_1.ObjectType.entityDto
|
|
8
|
+
? object.entity()
|
|
9
|
+
: object?.objectClass;
|
|
10
|
+
};
|
|
11
|
+
exports.getEntityObjectClass = getEntityObjectClass;
|
|
12
|
+
//# sourceMappingURL=get-entity-object-class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-entity-object-class.js","sourceRoot":"./","sources":["query/functions/get-entity-object-class.ts"],"names":[],"mappings":";;;AACA,0EAAsE;AAE/D,MAAM,oBAAoB,GAAG,CAAC,MAAoB,EAAE,EAAE;IAC1D,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC/C,OAAO,MAAM,EAAE,IAAI,KAAK,wBAAU,CAAC,SAAS;QACzC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE;QACjB,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC;AAC5B,CAAC,CAAA;AALY,QAAA,oBAAoB,wBAKhC"}
|
|
@@ -7,6 +7,9 @@ const getNativeSelect = (target, select) => {
|
|
|
7
7
|
const mapper = new Map();
|
|
8
8
|
const arry = [];
|
|
9
9
|
select.forEach(item => {
|
|
10
|
+
const queryProperty = queryObject.properties[item];
|
|
11
|
+
if (queryProperty?.isExternal)
|
|
12
|
+
return;
|
|
10
13
|
const columnName = (0, map_query_property_to_column_name_1.mapQueryPropertyToColumnName)(queryObject, item);
|
|
11
14
|
arry.pushIfNotExists(columnName);
|
|
12
15
|
mapper.set(item, columnName);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-native-select.js","sourceRoot":"./","sources":["query/functions/get-native-select.ts"],"names":[],"mappings":";;;AAGA,2FAAmF;AAE5E,MAAM,eAAe,GAAG,CAC5B,MAAoB,EACpB,MAAgB,EACjB,EAAE;IACD,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAA6B,CAAC;IAChF,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IACzC,MAAM,IAAI,GAAG,EAAc,CAAC;IAC5B,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACnB,MAAM,UAAU,GAAG,IAAA,gEAA4B,EAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACnE,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"get-native-select.js","sourceRoot":"./","sources":["query/functions/get-native-select.ts"],"names":[],"mappings":";;;AAGA,2FAAmF;AAE5E,MAAM,eAAe,GAAG,CAC5B,MAAoB,EACpB,MAAgB,EACjB,EAAE;IACD,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAA6B,CAAC;IAChF,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IACzC,MAAM,IAAI,GAAG,EAAc,CAAC;IAC5B,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACnB,MAAM,aAAa,GAAG,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACnD,IAAI,aAAa,EAAE,UAAU;YAAE,OAAO;QACtC,MAAM,UAAU,GAAG,IAAA,gEAA4B,EAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACnE,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QACjC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AAC1C,CAAC,CAAA;AAfY,QAAA,eAAe,mBAe3B"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { Dictionary, Instantiable } from "@rockster/common";
|
|
2
2
|
import { Paths } from "../../database/interfaces/path";
|
|
3
3
|
import { QueryPath, QueryProperty, QueryPropertyType, QueryRelationConfig } from "../interfaces/query";
|
|
4
|
+
/** When traversing an object/relation property marked @ExternalColumn, descendants inherit its resolver. */
|
|
5
|
+
export type ExternalSubtreeContext = {
|
|
6
|
+
resolver: Instantiable;
|
|
7
|
+
/** Full query path to the entity row that owns `columnKey`. */
|
|
8
|
+
ownerFullPath: string;
|
|
9
|
+
columnKey: string;
|
|
10
|
+
/** Full query paths for DB columns required alongside this external column (selectDependencies). */
|
|
11
|
+
dependencyQueryPaths: string[];
|
|
12
|
+
};
|
|
4
13
|
export type LoadPropertiesArgs = {
|
|
5
14
|
type: QueryPropertyType;
|
|
6
15
|
target: Instantiable;
|
|
@@ -14,6 +23,15 @@ export type LoadPropertiesArgs = {
|
|
|
14
23
|
secure?: boolean;
|
|
15
24
|
initializedObjects?: string[];
|
|
16
25
|
rootEntity: Instantiable;
|
|
17
|
-
|
|
26
|
+
rootOrRelationPath?: string;
|
|
27
|
+
isRelation?: boolean;
|
|
28
|
+
/** Root query alias (first path segment); used for external owner walk segments. */
|
|
29
|
+
rootAlias: string;
|
|
30
|
+
externalSubtree?: ExternalSubtreeContext;
|
|
31
|
+
/**
|
|
32
|
+
* SQL table aliases used by {@link joinOne}/{@link joinMany} across the whole query tree.
|
|
33
|
+
* Root initializes this (includes the root alias); duplicate join `alias` values throw.
|
|
34
|
+
*/
|
|
35
|
+
usedJoinSqlAliases?: Set<string>;
|
|
18
36
|
};
|
|
19
|
-
export declare const loadProperties: ({ type, target, alias, entityAlias, properties, parent, paths, relation, fullPath, secure, initializedObjects, rootEntity,
|
|
37
|
+
export declare const loadProperties: ({ type, target, alias, entityAlias, properties, parent, paths, relation, fullPath, secure, initializedObjects, rootEntity, rootOrRelationPath, rootAlias, externalSubtree, usedJoinSqlAliases: usedJoinSqlAliasesArg }: LoadPropertiesArgs) => void;
|
|
@@ -4,44 +4,147 @@ exports.loadProperties = void 0;
|
|
|
4
4
|
const class_pipe_1 = require("@rockster/class-pipe");
|
|
5
5
|
const object_type_1 = require("../../common/interfaces/enum/object-type");
|
|
6
6
|
const get_id_property_1 = require("../../database/functions/get-id-property");
|
|
7
|
-
const
|
|
8
|
-
|
|
7
|
+
const get_entity_object_class_1 = require("./get-entity-object-class");
|
|
8
|
+
const external_column_owner_path_1 = require("./external-column-owner-path");
|
|
9
|
+
/**
|
|
10
|
+
* Multiple FK columns can reference the same entity (e.g. {@code routerAId} and {@code routerBId} → InfraClientRouter).
|
|
11
|
+
* Picking the first matching {@code @Relation} makes every join use the same column (wrong hydration / duplicate data).
|
|
12
|
+
* Prefer the path key from {@link joinOne} paths ({@code routerA}, {@code routerB}) via Rockster {@link IEntityProperty.directAlias}
|
|
13
|
+
* or common {@code pathProperty + "Id"} naming.
|
|
14
|
+
*/
|
|
15
|
+
function resolveJoinLinkProperty(path, pathProperty, targetObjectClass, pathObjectClass) {
|
|
16
|
+
const explicitKey = path.linkProperty;
|
|
17
|
+
if (explicitKey) {
|
|
18
|
+
if (path.type === "indirect") {
|
|
19
|
+
const match = core.storage
|
|
20
|
+
.getProperties(pathObjectClass)
|
|
21
|
+
.find((p) => p.isRelation &&
|
|
22
|
+
p.getRelationType() === targetObjectClass &&
|
|
23
|
+
(p.propertyKey === explicitKey || p.columnName === explicitKey));
|
|
24
|
+
if (match) {
|
|
25
|
+
return match;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
const match = core.storage
|
|
30
|
+
.getProperties(targetObjectClass)
|
|
31
|
+
.find((p) => p.isRelation &&
|
|
32
|
+
p.getRelationType() === pathObjectClass &&
|
|
33
|
+
(p.propertyKey === explicitKey || p.columnName === explicitKey));
|
|
34
|
+
if (match) {
|
|
35
|
+
return match;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (path.type === "indirect") {
|
|
40
|
+
const candidates = core.storage
|
|
41
|
+
.getProperties(pathObjectClass)
|
|
42
|
+
.filter((p) => p.isRelation && p.getRelationType() === targetObjectClass);
|
|
43
|
+
return disambiguateRelationCandidates(candidates, pathProperty);
|
|
44
|
+
}
|
|
45
|
+
const candidates = core.storage
|
|
46
|
+
.getProperties(targetObjectClass)
|
|
47
|
+
.filter((p) => p.isRelation && p.getRelationType() === pathObjectClass);
|
|
48
|
+
return disambiguateRelationCandidates(candidates, pathProperty);
|
|
49
|
+
}
|
|
50
|
+
function disambiguateRelationCandidates(candidates, pathProperty) {
|
|
51
|
+
if (candidates.length === 0) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
if (candidates.length === 1) {
|
|
55
|
+
return candidates[0];
|
|
56
|
+
}
|
|
57
|
+
const byDirectAlias = candidates.find((p) => p.directAlias === pathProperty);
|
|
58
|
+
if (byDirectAlias) {
|
|
59
|
+
return byDirectAlias;
|
|
60
|
+
}
|
|
61
|
+
const byFk = candidates.find((p) => p.propertyKey === `${pathProperty}Id`);
|
|
62
|
+
if (byFk) {
|
|
63
|
+
return byFk;
|
|
64
|
+
}
|
|
65
|
+
const byName = candidates.find((p) => p.propertyKey === pathProperty);
|
|
66
|
+
if (byName) {
|
|
67
|
+
return byName;
|
|
68
|
+
}
|
|
69
|
+
throw new Error(`Ambiguous relation for path key "${pathProperty}" among: ${candidates
|
|
70
|
+
.map((c) => c.propertyKey)
|
|
71
|
+
.join(", ")}. ` + `Set linkProperty on joinOne or align path keys with @Relation FK names / directAlias.`);
|
|
72
|
+
}
|
|
73
|
+
function resolveExternalColumnClass(ep, entityLabel, propertyKey) {
|
|
74
|
+
const Resolver = ep.getExternalResolver?.();
|
|
75
|
+
if (!Resolver) {
|
|
76
|
+
throw new Error(`External column "${propertyKey}" on ${entityLabel} must use ExternalColumn(() => ResolverClass); the callback returned nothing`);
|
|
77
|
+
}
|
|
78
|
+
return Resolver;
|
|
79
|
+
}
|
|
80
|
+
const loadProperties = ({ type, target, alias, entityAlias, properties, parent, paths, relation, fullPath = '', secure, initializedObjects = [], rootEntity, rootOrRelationPath, rootAlias, externalSubtree, usedJoinSqlAliases: usedJoinSqlAliasesArg }) => {
|
|
81
|
+
const usedJoinSqlAliases = usedJoinSqlAliasesArg ??
|
|
82
|
+
(type === "root"
|
|
83
|
+
? new Set([entityAlias ?? alias])
|
|
84
|
+
: (() => {
|
|
85
|
+
throw new Error("loadProperties: join alias registry missing; this is an internal error");
|
|
86
|
+
})());
|
|
9
87
|
const currentPath = fullPath ? `${fullPath}.${alias}` : alias;
|
|
10
|
-
;
|
|
11
88
|
const initializedObjectKey = `${currentPath}:${target.name}`;
|
|
89
|
+
const targetObjectClass = (0, get_entity_object_class_1.getEntityObjectClass)(target);
|
|
90
|
+
const entityOwnerLabel = targetObjectClass?.name
|
|
91
|
+
?? (typeof target?.name === 'string'
|
|
92
|
+
? target.name
|
|
93
|
+
: 'Entity');
|
|
12
94
|
if (initializedObjects.includes(initializedObjectKey))
|
|
13
95
|
return;
|
|
14
96
|
initializedObjects.push(initializedObjectKey);
|
|
15
|
-
const targetProperties = (0, class_pipe_1.getExposeProperties)(target)
|
|
16
|
-
targetProperties
|
|
17
|
-
.filter((property) => {
|
|
97
|
+
const targetProperties = (0, class_pipe_1.getExposeProperties)(target).filter((property) => {
|
|
18
98
|
if (property.subtype) {
|
|
19
99
|
const object = core.storage.findObject(property.subtype);
|
|
20
|
-
const isEntity = object?.type === object_type_1.ObjectType.entity;
|
|
100
|
+
const isEntity = object?.type === object_type_1.ObjectType.entity || object?.type === object_type_1.ObjectType.entityDto;
|
|
21
101
|
return !isEntity;
|
|
22
102
|
}
|
|
23
103
|
return true;
|
|
24
|
-
})
|
|
25
|
-
|
|
104
|
+
});
|
|
105
|
+
for (const targetProperty of targetProperties) {
|
|
26
106
|
const propertyKey = targetProperty.propertyKey;
|
|
27
107
|
const globalPath = `${currentPath}.${propertyKey}`;
|
|
28
108
|
let columnName;
|
|
29
|
-
const entityProperty =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
109
|
+
const entityProperty = targetObjectClass
|
|
110
|
+
? core
|
|
111
|
+
.storage
|
|
112
|
+
.getProperties(targetObjectClass)
|
|
113
|
+
.find((property) => {
|
|
114
|
+
return property.propertyKey === propertyKey;
|
|
115
|
+
})
|
|
116
|
+
: undefined;
|
|
33
117
|
if (entityProperty) {
|
|
34
118
|
columnName = entityProperty.columnName;
|
|
35
119
|
}
|
|
36
|
-
if (type === 'root' && !entityProperty)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
120
|
+
if (type === 'root' && !entityProperty)
|
|
121
|
+
continue;
|
|
122
|
+
const subtype = targetProperty.type === class_pipe_1.PropertyType.object && targetProperty.subtype;
|
|
123
|
+
const multitype = targetProperty.ifChecks?.length > 0;
|
|
124
|
+
const hasIfChecks = targetProperty.ifChecks?.length > 0;
|
|
125
|
+
const objectTypes = subtype || multitype
|
|
126
|
+
? hasIfChecks
|
|
43
127
|
? targetProperty.ifChecks.map((ifCheck) => ifCheck.type)
|
|
44
|
-
: [targetProperty.subtype]
|
|
128
|
+
: [targetProperty.subtype].filter(Boolean)
|
|
129
|
+
: [];
|
|
130
|
+
/**
|
|
131
|
+
* @IsIn(enum) can surface as `object` + enum subtype; that is not an @Entity graph.
|
|
132
|
+
* External columns like that must register a single leaf, not recurse into the enum.
|
|
133
|
+
* Real external objects (Person entity, etc.) still recurse when subtype resolves in storage.
|
|
134
|
+
*/
|
|
135
|
+
const shouldRecurseEmbedded = (subtype || multitype) &&
|
|
136
|
+
(!entityProperty?.isExternal ||
|
|
137
|
+
objectTypes.some((ot) => !!(0, get_entity_object_class_1.getEntityObjectClass)(ot)));
|
|
138
|
+
if (shouldRecurseEmbedded) {
|
|
139
|
+
const anchorDepPaths = (entityProperty?.externalSelectDependencies ?? []).map((d) => `${currentPath}.${d}`);
|
|
140
|
+
const nextSubtree = entityProperty?.isExternal
|
|
141
|
+
? {
|
|
142
|
+
resolver: resolveExternalColumnClass(entityProperty, entityOwnerLabel, propertyKey),
|
|
143
|
+
ownerFullPath: currentPath,
|
|
144
|
+
columnKey: propertyKey,
|
|
145
|
+
dependencyQueryPaths: anchorDepPaths,
|
|
146
|
+
}
|
|
147
|
+
: externalSubtree;
|
|
45
148
|
objectTypes.forEach((objectType) => {
|
|
46
149
|
(0, exports.loadProperties)({
|
|
47
150
|
type: 'embedded',
|
|
@@ -52,20 +155,45 @@ const loadProperties = ({ type, target, alias, entityAlias, properties, parent,
|
|
|
52
155
|
initializedObjects,
|
|
53
156
|
entityAlias: entityAlias,
|
|
54
157
|
rootEntity,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
158
|
+
rootAlias,
|
|
159
|
+
usedJoinSqlAliases,
|
|
160
|
+
externalSubtree: nextSubtree,
|
|
58
161
|
parent: {
|
|
59
162
|
alias,
|
|
60
163
|
target,
|
|
61
164
|
type,
|
|
62
165
|
parent,
|
|
63
166
|
entityAlias
|
|
64
|
-
}
|
|
167
|
+
},
|
|
168
|
+
rootOrRelationPath: type === "embedded"
|
|
169
|
+
? rootOrRelationPath
|
|
170
|
+
: `${entityAlias}.${targetProperty.propertyKey}`
|
|
65
171
|
});
|
|
66
172
|
});
|
|
67
173
|
}
|
|
68
174
|
else {
|
|
175
|
+
const directExternal = !!entityProperty?.isExternal;
|
|
176
|
+
const inheritedExternal = !!externalSubtree;
|
|
177
|
+
const isExternal = directExternal || inheritedExternal;
|
|
178
|
+
const resolver = directExternal && entityProperty
|
|
179
|
+
? resolveExternalColumnClass(entityProperty, entityOwnerLabel, propertyKey)
|
|
180
|
+
: externalSubtree?.resolver;
|
|
181
|
+
const ownerFullPath = directExternal
|
|
182
|
+
? currentPath
|
|
183
|
+
: externalSubtree?.ownerFullPath ?? currentPath;
|
|
184
|
+
const externalColumnKey = directExternal
|
|
185
|
+
? propertyKey
|
|
186
|
+
: externalSubtree?.columnKey ?? propertyKey;
|
|
187
|
+
const externalDependencyQueryPaths = isExternal
|
|
188
|
+
? [
|
|
189
|
+
...new Set([
|
|
190
|
+
...(externalSubtree?.dependencyQueryPaths ?? []),
|
|
191
|
+
...(directExternal && entityProperty
|
|
192
|
+
? (entityProperty.externalSelectDependencies ?? []).map((d) => `${currentPath}.${d}`)
|
|
193
|
+
: []),
|
|
194
|
+
]),
|
|
195
|
+
]
|
|
196
|
+
: undefined;
|
|
69
197
|
properties[globalPath] = {
|
|
70
198
|
path: {
|
|
71
199
|
target,
|
|
@@ -75,54 +203,77 @@ const loadProperties = ({ type, target, alias, entityAlias, properties, parent,
|
|
|
75
203
|
parent,
|
|
76
204
|
secure,
|
|
77
205
|
entityAlias,
|
|
78
|
-
|
|
206
|
+
rootOrRelationPath
|
|
79
207
|
},
|
|
80
208
|
isUUID: targetProperty.type === class_pipe_1.PropertyType.string
|
|
81
209
|
&& targetProperty.validatorsConfigs?.some((cfg) => cfg.type === 'isUUID') || false,
|
|
82
210
|
columnName,
|
|
83
211
|
isArray: !!targetProperty.isArray,
|
|
84
212
|
isJson: type === 'embedded',
|
|
213
|
+
isExternal,
|
|
214
|
+
externalResolver: resolver,
|
|
215
|
+
externalOwnerWalkSegments: isExternal
|
|
216
|
+
? (0, external_column_owner_path_1.toExternalOwnerWalkSegments)(ownerFullPath, rootAlias)
|
|
217
|
+
: undefined,
|
|
218
|
+
externalColumnKey: isExternal ? externalColumnKey : undefined,
|
|
219
|
+
externalDependencyQueryPaths,
|
|
85
220
|
fullPath: globalPath,
|
|
86
221
|
name: propertyKey,
|
|
87
222
|
type: targetProperty.type
|
|
88
223
|
};
|
|
89
224
|
}
|
|
90
|
-
}
|
|
225
|
+
}
|
|
91
226
|
if (paths) {
|
|
92
227
|
const idProperty = (0, get_id_property_1.getIdProperty)(target);
|
|
93
228
|
const pathKeys = Object.keys(paths);
|
|
94
229
|
for (const pathProperty of pathKeys) {
|
|
95
230
|
const path = paths[pathProperty];
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
: core.storage.getProperties(target).find((p) => p.isRelation && p.getRelationType() === path.target()));
|
|
231
|
+
const pathObjectClass = (0, get_entity_object_class_1.getEntityObjectClass)(path.target());
|
|
232
|
+
const linkProperty = resolveJoinLinkProperty(path, pathProperty, targetObjectClass, pathObjectClass);
|
|
99
233
|
if (!linkProperty && !path.condition) {
|
|
100
|
-
const line1 = `Unable to find linkProperty to ${path.alias}:${
|
|
234
|
+
const line1 = `Unable to find linkProperty to ${path.alias}:${pathObjectClass?.name} into query:${target.name}`;
|
|
101
235
|
const line2 = `Use @Relation(() => <target>) to define`;
|
|
102
236
|
throw new Error(`${line1}\n${line2}`);
|
|
103
237
|
}
|
|
104
|
-
const
|
|
238
|
+
const joinSqlAlias = path.alias;
|
|
239
|
+
if (usedJoinSqlAliases.has(joinSqlAlias)) {
|
|
240
|
+
throw new Error(`Duplicate query join SQL alias "${joinSqlAlias}" (paths key "${pathProperty}" under "${currentPath}"). ` +
|
|
241
|
+
`Each joinOne/joinMany must use a globally unique alias in this query (e.g. routerDataCenter vs serverDataCenter).`);
|
|
242
|
+
}
|
|
243
|
+
usedJoinSqlAliases.add(joinSqlAlias);
|
|
244
|
+
const targetIdProperty = (0, get_id_property_1.getIdProperty)(pathObjectClass);
|
|
245
|
+
const joinEntityAlias = joinSqlAlias;
|
|
105
246
|
const condition = path.condition ?? (() => {
|
|
106
|
-
const linkName =
|
|
247
|
+
const linkName = linkProperty.columnName;
|
|
107
248
|
return path.type === "direct"
|
|
108
|
-
? `"${entityAlias}"."${linkName}" = "${
|
|
109
|
-
: `"${entityAlias}"."${idProperty.columnName}" = "${
|
|
249
|
+
? `"${entityAlias}"."${linkName}" = "${joinEntityAlias}"."${targetIdProperty.columnName}"`
|
|
250
|
+
: `"${entityAlias}"."${idProperty.columnName}" = "${joinEntityAlias}"."${linkName}"`;
|
|
110
251
|
})();
|
|
111
252
|
(0, exports.loadProperties)({
|
|
112
253
|
alias: pathProperty,
|
|
113
|
-
entityAlias:
|
|
254
|
+
entityAlias: joinEntityAlias,
|
|
114
255
|
properties,
|
|
115
256
|
target: path.target(),
|
|
116
257
|
type: "relation",
|
|
117
258
|
paths: path.paths,
|
|
118
259
|
secure: path.secure,
|
|
119
260
|
rootEntity,
|
|
261
|
+
fullPath: currentPath,
|
|
262
|
+
initializedObjects,
|
|
263
|
+
rootAlias,
|
|
264
|
+
usedJoinSqlAliases,
|
|
265
|
+
externalSubtree,
|
|
120
266
|
relation: {
|
|
121
267
|
type: path.type,
|
|
122
|
-
|
|
268
|
+
/**
|
|
269
|
+
* TypeORM maps onto `parentJoinAlias.entityProperty`. The parent side must be this node's
|
|
270
|
+
* SQL join alias (`entityAlias`), not the path key (`alias`). Keys match for most joins, but
|
|
271
|
+
* `joinOne({ alias: "dcRouterA", ... })` under path `routerA` must map as `dcRouterA.server`,
|
|
272
|
+
* not `routerA.server` (there is no query alias `routerA`).
|
|
273
|
+
*/
|
|
274
|
+
mapTo: `${entityAlias}.${pathProperty}`,
|
|
123
275
|
condition,
|
|
124
276
|
},
|
|
125
|
-
fullPath: currentPath,
|
|
126
277
|
parent: {
|
|
127
278
|
alias,
|
|
128
279
|
target,
|
|
@@ -130,8 +281,7 @@ const loadProperties = ({ type, target, alias, entityAlias, properties, parent,
|
|
|
130
281
|
relation,
|
|
131
282
|
parent,
|
|
132
283
|
entityAlias
|
|
133
|
-
}
|
|
134
|
-
initializedObjects
|
|
284
|
+
}
|
|
135
285
|
});
|
|
136
286
|
}
|
|
137
287
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-properties.js","sourceRoot":"./","sources":["query/functions/load-properties.ts"],"names":[],"mappings":";;;AAAA,qDAAyE;AAWzE,0EAAsE;AACtE,8EAAyE;
|
|
1
|
+
{"version":3,"file":"load-properties.js","sourceRoot":"./","sources":["query/functions/load-properties.ts"],"names":[],"mappings":";;;AAAA,qDAAyE;AAWzE,0EAAsE;AACtE,8EAAyE;AACzE,uEAAiE;AACjE,6EAA2E;AAY3E;;;;;GAKG;AACH,SAAS,uBAAuB,CAC7B,IAA6D,EAC7D,YAAoB,EACpB,iBAA2C,EAC3C,eAAyC;IAEzC,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC;IACtC,IAAI,WAAW,EAAE,CAAC;QACf,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO;iBACtB,aAAa,CAAC,eAAe,CAAC;iBAC9B,IAAI,CACF,CAAC,CAAgC,EAAE,EAAE,CAClC,CAAC,CAAC,UAAU;gBACZ,CAAC,CAAC,eAAe,EAAE,KAAK,iBAAiB;gBACzC,CAAC,CAAC,CAAC,WAAW,KAAK,WAAW,IAAI,CAAC,CAAC,UAAU,KAAK,WAAW,CAAC,CACvB,CAAC;YAClD,IAAI,KAAK,EAAE,CAAC;gBACT,OAAO,KAAK,CAAC;YAChB,CAAC;QACJ,CAAC;aAAM,CAAC;YACL,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO;iBACtB,aAAa,CAAC,iBAAiB,CAAC;iBAChC,IAAI,CACF,CAAC,CAAgC,EAAE,EAAE,CAClC,CAAC,CAAC,UAAU;gBACZ,CAAC,CAAC,eAAe,EAAE,KAAK,eAAe;gBACvC,CAAC,CAAC,CAAC,WAAW,KAAK,WAAW,IAAI,CAAC,CAAC,UAAU,KAAK,WAAW,CAAC,CACvB,CAAC;YAClD,IAAI,KAAK,EAAE,CAAC;gBACT,OAAO,KAAK,CAAC;YAChB,CAAC;QACJ,CAAC;IACJ,CAAC;IACD,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QAC5B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,YAAY,CAAC;YAErC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,CAAC,GAAG,EAAE;gBACvC,MAAM,QAAQ,GAAG,YAAY,CAAC,UAAU,CAAC;gBACzC,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ;oBAC1B,CAAC,CAAC,IAAI,WAAW,MAAM,QAAQ,QAAQ,eAAe,MAAM,gBAAgB,CAAC,UAAU,GAAG;oBAC1F,CAAC,CAAC,IAAI,WAAW,MAAM,UAAU,CAAC,UAAU,QAAQ,eAAe,MAAM,QAAQ,GAAG,CAAA;YAC1F,CAAC,CAAC,EAAE,CAAC;YAEL,IAAA,sBAAc,EAAC;gBACZ,KAAK,EAAE,YAAY;gBACnB,WAAW,EAAE,eAAe;gBAC5B,UAAU;gBACV,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;gBACrB,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,UAAU;gBACV,QAAQ,EAAE,WAAW;gBACrB,kBAAkB;gBAClB,SAAS;gBACT,kBAAkB;gBAClB,eAAe;gBACf,QAAQ,EAAE;oBACP,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf;;;;;uBAKG;oBACH,KAAK,EAAE,GAAG,WAAW,IAAI,YAAY,EAAE;oBACvC,SAAS;iBACX;gBACD,MAAM,EAAE;oBACL,KAAK;oBACL,MAAM;oBACN,IAAI;oBACJ,QAAQ;oBACR,MAAM;oBACN,WAAW;iBACb;aACH,CAAC,CAAC;QACN,CAAC;IACJ,CAAC;AACJ,CAAC,CAAC;AA/QW,QAAA,cAAc,kBA+QzB"}
|
|
@@ -9,7 +9,7 @@ const mapQueryPropertyToColumnName = (queryObject, item) => {
|
|
|
9
9
|
case "root":
|
|
10
10
|
return `${queryProperty.path.entityAlias}.${queryProperty.name}`;
|
|
11
11
|
case "embedded":
|
|
12
|
-
return queryProperty.path.
|
|
12
|
+
return queryProperty.path.rootOrRelationPath;
|
|
13
13
|
default:
|
|
14
14
|
throw new Error(`${item} not found on query`);
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-query-property-to-column-name.js","sourceRoot":"./","sources":["query/functions/map-query-property-to-column-name.ts"],"names":[],"mappings":";;;AAGO,MAAM,4BAA4B,GAAG,CAAC,WAAqC,EAAE,IAAY,EAAE,EAAE;IAEjG,MAAM,eAAe,GAAG,WAAW,CAAC,UAAU,CAAC;IAC/C,MAAM,aAAa,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAE5C,
|
|
1
|
+
{"version":3,"file":"map-query-property-to-column-name.js","sourceRoot":"./","sources":["query/functions/map-query-property-to-column-name.ts"],"names":[],"mappings":";;;AAGO,MAAM,4BAA4B,GAAG,CAAC,WAAqC,EAAE,IAAY,EAAE,EAAE;IAEjG,MAAM,eAAe,GAAG,WAAW,CAAC,UAAU,CAAC;IAC/C,MAAM,aAAa,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAE5C,QAAQ,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAC/B,KAAK,UAAU,CAAC;QAChB,KAAK,MAAM;YACR,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,IAAI,aAAa,CAAC,IAAI,EAAE,CAAC;QACpE,KAAK,UAAU;YACZ,OAAO,aAAa,CAAC,IAAI,CAAC,kBAAkB,CAAC;QAChD;YACG,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,qBAAqB,CAAC,CAAC;IACpD,CAAC;AACJ,CAAC,CAAA;AAdY,QAAA,4BAA4B,gCAcxC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { QueryPath } from '../interfaces/query';
|
|
2
|
+
/**
|
|
3
|
+
* Returns cached native select (asArry, asMap) for the given structure hash, or undefined.
|
|
4
|
+
* Caller receives copies so cache entries are never mutated.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getCachedNativeSelect(structureHash: string): {
|
|
7
|
+
asArry: string[];
|
|
8
|
+
asMap: Map<string, string>;
|
|
9
|
+
} | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Stores native select result for the given structure hash.
|
|
12
|
+
* Evicts oldest entry when at MAX_ENTRIES (LRU).
|
|
13
|
+
*/
|
|
14
|
+
export declare function setCachedNativeSelect(structureHash: string, asArry: string[], asMap: Map<string, string>): void;
|
|
15
|
+
/**
|
|
16
|
+
* Returns cached join plan (array of QueryPath) for the given join structure hash.
|
|
17
|
+
* Paths are applied to a fresh QB each request – we never cache the QB or EntityManager.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getCachedJoinPlan(joinStructureHash: string): QueryPath[] | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Stores join plan (order of paths to apply) for the given join structure hash.
|
|
22
|
+
* Evicts oldest entry when at MAX_ENTRIES (LRU).
|
|
23
|
+
*/
|
|
24
|
+
export declare function setCachedJoinPlan(joinStructureHash: string, paths: QueryPath[]): void;
|