taon 0.0.0 → 18.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +115 -0
- package/assets/shared/shared_folder_info.txt +7 -0
- package/bin/start.js +279 -0
- package/bin/taon +6 -5
- package/bin/taon-debug +5 -5
- package/bin/taon-debug-brk +5 -4
- package/browser/README.md +24 -0
- package/browser/esm2022/lib/base-classes/base-abstract-entity.mjs +18 -0
- package/browser/esm2022/lib/base-classes/base-class.mjs +17 -0
- package/browser/esm2022/lib/base-classes/base-context.mjs +14 -0
- package/browser/esm2022/lib/base-classes/base-controller.mjs +18 -0
- package/browser/esm2022/lib/base-classes/base-crud-controller.mjs +279 -0
- package/browser/esm2022/lib/base-classes/base-entity.mjs +18 -0
- package/browser/esm2022/lib/base-classes/base-injector.mjs +160 -0
- package/browser/esm2022/lib/base-classes/base-provider.mjs +6 -0
- package/browser/esm2022/lib/base-classes/base-repository.mjs +514 -0
- package/browser/esm2022/lib/base-classes/base-subscriber-for-entity.mjs +137 -0
- package/browser/esm2022/lib/base-classes/base-subscriber.mjs +27 -0
- package/browser/esm2022/lib/base-classes/base.mjs +26 -0
- package/browser/esm2022/lib/constants.mjs +4 -0
- package/browser/esm2022/lib/create-context.mjs +87 -0
- package/browser/esm2022/lib/decorators/classes/controller-decorator.mjs +15 -0
- package/browser/esm2022/lib/decorators/classes/entity-decorator.mjs +27 -0
- package/browser/esm2022/lib/decorators/classes/provider-decorator.mjs +15 -0
- package/browser/esm2022/lib/decorators/classes/repository-decorator.mjs +15 -0
- package/browser/esm2022/lib/decorators/classes/subscriber-decorator.mjs +41 -0
- package/browser/esm2022/lib/decorators/http/http-decorators.mjs +22 -0
- package/browser/esm2022/lib/decorators/http/http-methods-decorators.mjs +78 -0
- package/browser/esm2022/lib/decorators/http/http-params-decorators.mjs +47 -0
- package/browser/esm2022/lib/dependency-injection/di-container.mjs +32 -0
- package/browser/esm2022/lib/endpoint-context.mjs +1746 -0
- package/browser/esm2022/lib/entity-process.mjs +207 -0
- package/browser/esm2022/lib/env.mjs +6 -0
- package/browser/esm2022/lib/get-response-value.mjs +41 -0
- package/browser/esm2022/lib/helpers/class-helpers.mjs +183 -0
- package/browser/esm2022/lib/helpers/taon-helpers.mjs +120 -0
- package/browser/esm2022/lib/index.mjs +79 -0
- package/browser/esm2022/lib/inject.mjs +70 -0
- package/browser/esm2022/lib/models.mjs +77 -0
- package/browser/esm2022/lib/orm.mjs +6 -0
- package/browser/esm2022/lib/realtime/realtime-client.mjs +129 -0
- package/browser/esm2022/lib/realtime/realtime-core.mjs +54 -0
- package/browser/esm2022/lib/realtime/realtime-server.mjs +274 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/index.mjs +7 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.mjs +98 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.mjs +45 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.mjs +40 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.mjs +25 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.mjs +4 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc.mjs +49 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.mjs +5 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.mjs +50 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.mjs +48 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.mjs +35 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.mjs +43 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.mjs +4 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock.mjs +28 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-socket-io.mjs +33 -0
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy.mjs +10 -0
- package/browser/esm2022/lib/realtime/realtime-subs-manager.mjs +79 -0
- package/browser/esm2022/lib/realtime/realtime.models.mjs +4 -0
- package/browser/esm2022/lib/storage.mjs +5 -0
- package/browser/esm2022/lib/symbols.mjs +89 -0
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.mjs +4 -0
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.mjs +32 -0
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.mjs +167 -0
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin.service.mjs +64 -0
- package/browser/esm2022/lib/validators.mjs +76 -0
- package/browser/esm2022/public-api.mjs +2 -0
- package/browser/esm2022/taon.mjs +5 -0
- package/browser/fesm2022/taon.mjs +4901 -0
- package/browser/fesm2022/taon.mjs.map +1 -0
- package/browser/index.d.ts +6 -0
- package/browser/lib/base-classes/base-abstract-entity.d.ts +7 -0
- package/browser/lib/base-classes/base-class.d.ts +9 -0
- package/browser/lib/base-classes/base-context.d.ts +17 -0
- package/browser/lib/base-classes/base-controller.d.ts +8 -0
- package/browser/lib/base-classes/base-crud-controller.d.ts +28 -0
- package/browser/lib/base-classes/base-entity.d.ts +8 -0
- package/browser/lib/base-classes/base-injector.d.ts +60 -0
- package/browser/lib/base-classes/base-provider.d.ts +4 -0
- package/browser/lib/base-classes/base-repository.d.ts +249 -0
- package/browser/lib/base-classes/base-subscriber-for-entity.d.ts +82 -0
- package/browser/lib/base-classes/base-subscriber.d.ts +5 -0
- package/browser/lib/base-classes/base.d.ts +36 -0
- package/browser/lib/constants.d.ts +2 -0
- package/browser/lib/create-context.d.ts +25 -0
- package/browser/lib/decorators/classes/controller-decorator.d.ts +13 -0
- package/browser/lib/decorators/classes/entity-decorator.d.ts +17 -0
- package/browser/lib/decorators/classes/provider-decorator.d.ts +5 -0
- package/browser/lib/decorators/classes/repository-decorator.d.ts +5 -0
- package/browser/lib/decorators/classes/subscriber-decorator.d.ts +6 -0
- package/browser/lib/decorators/http/http-decorators.d.ts +18 -0
- package/browser/lib/decorators/http/http-methods-decorators.d.ts +15 -0
- package/browser/lib/decorators/http/http-params-decorators.d.ts +6 -0
- package/browser/lib/dependency-injection/di-container.d.ts +6 -0
- package/browser/lib/endpoint-context.d.ts +117 -0
- package/browser/lib/entity-process.d.ts +40 -0
- package/browser/lib/env.d.ts +3 -0
- package/browser/lib/get-response-value.d.ts +7 -0
- package/browser/lib/helpers/class-helpers.d.ts +19 -0
- package/browser/lib/helpers/taon-helpers.d.ts +17 -0
- package/browser/lib/index.d.ts +113 -0
- package/browser/lib/inject.d.ts +9 -0
- package/browser/lib/models.d.ts +175 -0
- package/browser/lib/orm.d.ts +3 -0
- package/browser/lib/realtime/realtime-client.d.ts +32 -0
- package/browser/lib/realtime/realtime-core.d.ts +41 -0
- package/browser/lib/realtime/realtime-server.d.ts +14 -0
- package/browser/lib/realtime/realtime-strategy/index.d.ts +5 -0
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +22 -0
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +17 -0
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +11 -0
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +11 -0
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +14 -0
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +23 -0
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +3 -0
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +17 -0
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +18 -0
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +12 -0
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +14 -0
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +12 -0
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +15 -0
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +17 -0
- package/browser/lib/realtime/realtime-strategy/realtime-strategy.d.ts +13 -0
- package/browser/lib/realtime/realtime-subs-manager.d.ts +15 -0
- package/browser/lib/realtime/realtime.models.d.ts +14 -0
- package/browser/lib/storage.d.ts +2 -0
- package/browser/lib/symbols.d.ts +73 -0
- package/browser/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts +6 -0
- package/browser/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +18 -0
- package/browser/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.d.ts +51 -0
- package/browser/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +25 -0
- package/browser/lib/validators.d.ts +8 -0
- package/browser/package.json +25 -0
- package/browser/public-api.d.ts +2 -0
- package/cli.d.ts +1 -0
- package/cli.js +24 -0
- package/cli.js.map +1 -0
- package/client/README.md +24 -0
- package/client/esm2022/lib/base-classes/base-abstract-entity.mjs +18 -0
- package/client/esm2022/lib/base-classes/base-class.mjs +17 -0
- package/client/esm2022/lib/base-classes/base-context.mjs +14 -0
- package/client/esm2022/lib/base-classes/base-controller.mjs +18 -0
- package/client/esm2022/lib/base-classes/base-crud-controller.mjs +279 -0
- package/client/esm2022/lib/base-classes/base-entity.mjs +18 -0
- package/client/esm2022/lib/base-classes/base-injector.mjs +160 -0
- package/client/esm2022/lib/base-classes/base-provider.mjs +6 -0
- package/client/esm2022/lib/base-classes/base-repository.mjs +514 -0
- package/client/esm2022/lib/base-classes/base-subscriber-for-entity.mjs +137 -0
- package/client/esm2022/lib/base-classes/base-subscriber.mjs +27 -0
- package/client/esm2022/lib/base-classes/base.mjs +26 -0
- package/client/esm2022/lib/constants.mjs +4 -0
- package/client/esm2022/lib/create-context.mjs +87 -0
- package/client/esm2022/lib/decorators/classes/controller-decorator.mjs +15 -0
- package/client/esm2022/lib/decorators/classes/entity-decorator.mjs +27 -0
- package/client/esm2022/lib/decorators/classes/provider-decorator.mjs +15 -0
- package/client/esm2022/lib/decorators/classes/repository-decorator.mjs +15 -0
- package/client/esm2022/lib/decorators/classes/subscriber-decorator.mjs +41 -0
- package/client/esm2022/lib/decorators/http/http-decorators.mjs +22 -0
- package/client/esm2022/lib/decorators/http/http-methods-decorators.mjs +78 -0
- package/client/esm2022/lib/decorators/http/http-params-decorators.mjs +47 -0
- package/client/esm2022/lib/dependency-injection/di-container.mjs +32 -0
- package/client/esm2022/lib/endpoint-context.mjs +1746 -0
- package/client/esm2022/lib/entity-process.mjs +207 -0
- package/client/esm2022/lib/env.mjs +6 -0
- package/client/esm2022/lib/get-response-value.mjs +41 -0
- package/client/esm2022/lib/helpers/class-helpers.mjs +183 -0
- package/client/esm2022/lib/helpers/taon-helpers.mjs +120 -0
- package/client/esm2022/lib/index.mjs +79 -0
- package/client/esm2022/lib/inject.mjs +70 -0
- package/client/esm2022/lib/models.mjs +77 -0
- package/client/esm2022/lib/orm.mjs +6 -0
- package/client/esm2022/lib/realtime/realtime-client.mjs +129 -0
- package/client/esm2022/lib/realtime/realtime-core.mjs +54 -0
- package/client/esm2022/lib/realtime/realtime-server.mjs +274 -0
- package/client/esm2022/lib/realtime/realtime-strategy/index.mjs +7 -0
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.mjs +98 -0
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.mjs +45 -0
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.mjs +40 -0
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.mjs +25 -0
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.mjs +4 -0
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc.mjs +49 -0
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.mjs +5 -0
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.mjs +50 -0
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.mjs +48 -0
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.mjs +35 -0
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.mjs +43 -0
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.mjs +4 -0
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock.mjs +28 -0
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-socket-io.mjs +33 -0
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy.mjs +10 -0
- package/client/esm2022/lib/realtime/realtime-subs-manager.mjs +79 -0
- package/client/esm2022/lib/realtime/realtime.models.mjs +4 -0
- package/client/esm2022/lib/storage.mjs +5 -0
- package/client/esm2022/lib/symbols.mjs +89 -0
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.mjs +4 -0
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.mjs +32 -0
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.mjs +167 -0
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin.service.mjs +64 -0
- package/client/esm2022/lib/validators.mjs +76 -0
- package/client/esm2022/public-api.mjs +2 -0
- package/client/esm2022/taon.mjs +5 -0
- package/client/fesm2022/taon.mjs +4901 -0
- package/client/fesm2022/taon.mjs.map +1 -0
- package/client/index.d.ts +6 -0
- package/client/lib/base-classes/base-abstract-entity.d.ts +7 -0
- package/client/lib/base-classes/base-class.d.ts +9 -0
- package/client/lib/base-classes/base-context.d.ts +17 -0
- package/client/lib/base-classes/base-controller.d.ts +8 -0
- package/client/lib/base-classes/base-crud-controller.d.ts +28 -0
- package/client/lib/base-classes/base-entity.d.ts +8 -0
- package/client/lib/base-classes/base-injector.d.ts +60 -0
- package/client/lib/base-classes/base-provider.d.ts +4 -0
- package/client/lib/base-classes/base-repository.d.ts +249 -0
- package/client/lib/base-classes/base-subscriber-for-entity.d.ts +82 -0
- package/client/lib/base-classes/base-subscriber.d.ts +5 -0
- package/client/lib/base-classes/base.d.ts +36 -0
- package/client/lib/constants.d.ts +2 -0
- package/client/lib/create-context.d.ts +25 -0
- package/client/lib/decorators/classes/controller-decorator.d.ts +13 -0
- package/client/lib/decorators/classes/entity-decorator.d.ts +17 -0
- package/client/lib/decorators/classes/provider-decorator.d.ts +5 -0
- package/client/lib/decorators/classes/repository-decorator.d.ts +5 -0
- package/client/lib/decorators/classes/subscriber-decorator.d.ts +6 -0
- package/client/lib/decorators/http/http-decorators.d.ts +18 -0
- package/client/lib/decorators/http/http-methods-decorators.d.ts +15 -0
- package/client/lib/decorators/http/http-params-decorators.d.ts +6 -0
- package/client/lib/dependency-injection/di-container.d.ts +6 -0
- package/client/lib/endpoint-context.d.ts +117 -0
- package/client/lib/entity-process.d.ts +40 -0
- package/client/lib/env.d.ts +3 -0
- package/client/lib/get-response-value.d.ts +7 -0
- package/client/lib/helpers/class-helpers.d.ts +19 -0
- package/client/lib/helpers/taon-helpers.d.ts +17 -0
- package/client/lib/index.d.ts +113 -0
- package/client/lib/inject.d.ts +9 -0
- package/client/lib/models.d.ts +175 -0
- package/client/lib/orm.d.ts +3 -0
- package/client/lib/realtime/realtime-client.d.ts +32 -0
- package/client/lib/realtime/realtime-core.d.ts +41 -0
- package/client/lib/realtime/realtime-server.d.ts +14 -0
- package/client/lib/realtime/realtime-strategy/index.d.ts +5 -0
- package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +22 -0
- package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +17 -0
- package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +11 -0
- package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +11 -0
- package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +14 -0
- package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +23 -0
- package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +3 -0
- package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +17 -0
- package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +18 -0
- package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +12 -0
- package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +14 -0
- package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +12 -0
- package/client/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +15 -0
- package/client/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +17 -0
- package/client/lib/realtime/realtime-strategy/realtime-strategy.d.ts +13 -0
- package/client/lib/realtime/realtime-subs-manager.d.ts +15 -0
- package/client/lib/realtime/realtime.models.d.ts +14 -0
- package/client/lib/storage.d.ts +2 -0
- package/client/lib/symbols.d.ts +73 -0
- package/client/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts +6 -0
- package/client/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +18 -0
- package/client/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.d.ts +51 -0
- package/client/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +25 -0
- package/client/lib/validators.d.ts +8 -0
- package/client/public-api.d.ts +2 -0
- package/index.d.ts +1 -0
- package/index.js +5 -1
- package/index.js.map +1 -0
- package/lib/base-classes/base-abstract-entity.d.ts +6 -0
- package/lib/base-classes/base-abstract-entity.js +40 -0
- package/lib/base-classes/base-abstract-entity.js.map +1 -0
- package/lib/base-classes/base-class.d.ts +8 -0
- package/lib/base-classes/base-class.js +35 -0
- package/lib/base-classes/base-class.js.map +1 -0
- package/lib/base-classes/base-context.d.ts +16 -0
- package/lib/base-classes/base-context.js +15 -0
- package/lib/base-classes/base-context.js.map +1 -0
- package/lib/base-classes/base-controller.d.ts +7 -0
- package/lib/base-classes/base-controller.js +24 -0
- package/lib/base-classes/base-controller.js.map +1 -0
- package/lib/base-classes/base-crud-controller.d.ts +27 -0
- package/lib/base-classes/base-crud-controller.js +385 -0
- package/lib/base-classes/base-crud-controller.js.map +1 -0
- package/lib/base-classes/base-entity.d.ts +7 -0
- package/lib/base-classes/base-entity.js +25 -0
- package/lib/base-classes/base-entity.js.map +1 -0
- package/lib/base-classes/base-injector.d.ts +59 -0
- package/lib/base-classes/base-injector.js +220 -0
- package/lib/base-classes/base-injector.js.map +1 -0
- package/lib/base-classes/base-provider.d.ts +3 -0
- package/lib/base-classes/base-provider.js +14 -0
- package/lib/base-classes/base-provider.js.map +1 -0
- package/lib/base-classes/base-repository.d.ts +254 -0
- package/lib/base-classes/base-repository.js +780 -0
- package/lib/base-classes/base-repository.js.map +1 -0
- package/lib/base-classes/base-subscriber-for-entity.d.ts +81 -0
- package/lib/base-classes/base-subscriber-for-entity.js +136 -0
- package/lib/base-classes/base-subscriber-for-entity.js.map +1 -0
- package/lib/base-classes/base-subscriber.d.ts +4 -0
- package/lib/base-classes/base-subscriber.js +25 -0
- package/lib/base-classes/base-subscriber.js.map +1 -0
- package/lib/base-classes/base.d.ts +35 -0
- package/lib/base-classes/base.js +27 -0
- package/lib/base-classes/base.js.map +1 -0
- package/lib/build-info._auto-generated_.d.ts +1 -0
- package/lib/build-info._auto-generated_.js +5 -0
- package/lib/build-info._auto-generated_.js.map +1 -0
- package/lib/constants.d.ts +1 -0
- package/lib/constants.js +3 -0
- package/lib/constants.js.map +1 -0
- package/lib/create-context.d.ts +24 -0
- package/lib/create-context.js +183 -0
- package/lib/create-context.js.map +1 -0
- package/lib/decorators/classes/controller-decorator.d.ts +12 -0
- package/lib/decorators/classes/controller-decorator.js +24 -0
- package/lib/decorators/classes/controller-decorator.js.map +1 -0
- package/lib/decorators/classes/entity-decorator.d.ts +16 -0
- package/lib/decorators/classes/entity-decorator.js +39 -0
- package/lib/decorators/classes/entity-decorator.js.map +1 -0
- package/lib/decorators/classes/provider-decorator.d.ts +4 -0
- package/lib/decorators/classes/provider-decorator.js +24 -0
- package/lib/decorators/classes/provider-decorator.js.map +1 -0
- package/lib/decorators/classes/repository-decorator.d.ts +4 -0
- package/lib/decorators/classes/repository-decorator.js +24 -0
- package/lib/decorators/classes/repository-decorator.js.map +1 -0
- package/lib/decorators/classes/subscriber-decorator.d.ts +5 -0
- package/lib/decorators/classes/subscriber-decorator.js +75 -0
- package/lib/decorators/classes/subscriber-decorator.js.map +1 -0
- package/lib/decorators/http/http-decorators.d.ts +17 -0
- package/lib/decorators/http/http-decorators.js +23 -0
- package/lib/decorators/http/http-decorators.js.map +1 -0
- package/lib/decorators/http/http-methods-decorators.d.ts +14 -0
- package/lib/decorators/http/http-methods-decorators.js +91 -0
- package/lib/decorators/http/http-methods-decorators.js.map +1 -0
- package/lib/decorators/http/http-params-decorators.d.ts +5 -0
- package/lib/decorators/http/http-params-decorators.js +55 -0
- package/lib/decorators/http/http-params-decorators.js.map +1 -0
- package/lib/dependency-injection/di-container.d.ts +5 -0
- package/lib/dependency-injection/di-container.js +40 -0
- package/lib/dependency-injection/di-container.js.map +1 -0
- package/lib/endpoint-context.d.ts +117 -0
- package/lib/endpoint-context.js +2128 -0
- package/lib/endpoint-context.js.map +1 -0
- package/lib/entity-process.d.ts +39 -0
- package/lib/entity-process.js +261 -0
- package/lib/entity-process.js.map +1 -0
- package/lib/env.d.ts +2 -0
- package/lib/env.js +7 -0
- package/lib/env.js.map +1 -0
- package/lib/formly/formly-group-wrapper-component.d.ts +5 -0
- package/lib/formly/formly-group-wrapper-component.js +28 -0
- package/lib/formly/formly-group-wrapper-component.js.map +1 -0
- package/lib/formly/formly-repeat-component.d.ts +5 -0
- package/lib/formly/formly-repeat-component.js +47 -0
- package/lib/formly/formly-repeat-component.js.map +1 -0
- package/lib/formly/formly.models.d.ts +1 -0
- package/lib/formly/formly.models.js +3 -0
- package/lib/formly/formly.models.js.map +1 -0
- package/lib/formly/fromly.d.ts +16 -0
- package/lib/formly/fromly.js +213 -0
- package/lib/formly/fromly.js.map +1 -0
- package/lib/formly/type-from-entity.d.ts +20 -0
- package/lib/formly/type-from-entity.js +65 -0
- package/lib/formly/type-from-entity.js.map +1 -0
- package/lib/get-response-value.d.ts +6 -0
- package/lib/get-response-value.js +65 -0
- package/lib/get-response-value.js.map +1 -0
- package/lib/helpers/class-helpers.d.ts +18 -0
- package/lib/helpers/class-helpers.js +227 -0
- package/lib/helpers/class-helpers.js.map +1 -0
- package/lib/helpers/taon-helpers.d.ts +16 -0
- package/lib/helpers/taon-helpers.js +144 -0
- package/lib/helpers/taon-helpers.js.map +1 -0
- package/lib/index.d.ts +112 -0
- package/lib/index.js +113 -0
- package/lib/index.js.map +1 -0
- package/lib/inject.d.ts +8 -0
- package/lib/inject.js +84 -0
- package/lib/inject.js.map +1 -0
- package/lib/models.d.ts +180 -0
- package/lib/models.js +107 -0
- package/lib/models.js.map +1 -0
- package/lib/orm.d.ts +51 -0
- package/lib/orm.js +79 -0
- package/lib/orm.js.map +1 -0
- package/lib/realtime/realtime-client.d.ts +31 -0
- package/lib/realtime/realtime-client.js +158 -0
- package/lib/realtime/realtime-client.js.map +1 -0
- package/lib/realtime/realtime-core.d.ts +40 -0
- package/lib/realtime/realtime-core.js +72 -0
- package/lib/realtime/realtime-core.js.map +1 -0
- package/lib/realtime/realtime-server.d.ts +13 -0
- package/lib/realtime/realtime-server.js +193 -0
- package/lib/realtime/realtime-server.js.map +1 -0
- package/lib/realtime/realtime-strategy/index.d.ts +4 -0
- package/lib/realtime/realtime-strategy/index.js +8 -0
- package/lib/realtime/realtime-strategy/index.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.d.ts +0 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.js +5 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +22 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.js +139 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +16 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.js +68 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +10 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.js +56 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +10 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.js +50 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +13 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.js +3 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +22 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc.js +68 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +2 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.js +6 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +16 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.js +54 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +17 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.js +52 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +11 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.js +39 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +13 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.js +46 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +11 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.js +3 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +14 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock.js +42 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +17 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.js +48 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy.d.ts +12 -0
- package/lib/realtime/realtime-strategy/realtime-strategy.js +14 -0
- package/lib/realtime/realtime-strategy/realtime-strategy.js.map +1 -0
- package/lib/realtime/realtime-subs-manager.d.ts +14 -0
- package/lib/realtime/realtime-subs-manager.js +102 -0
- package/lib/realtime/realtime-subs-manager.js.map +1 -0
- package/lib/realtime/realtime.models.d.ts +13 -0
- package/lib/realtime/realtime.models.js +3 -0
- package/lib/realtime/realtime.models.js.map +1 -0
- package/lib/storage.d.ts +1 -0
- package/lib/storage.js +6 -0
- package/lib/storage.js.map +1 -0
- package/lib/symbols.d.ts +72 -0
- package/lib/symbols.js +91 -0
- package/lib/symbols.js.map +1 -0
- package/lib/ui/directives/firedev-inject-html.directive.d.ts +6 -0
- package/lib/ui/directives/firedev-long-press.directive.d.ts +22 -0
- package/lib/ui/directives/index.d.ts +4 -0
- package/lib/ui/directives/index.js +5 -0
- package/lib/ui/directives/index.js.map +1 -0
- package/lib/ui/directives/safe.pipe.d.ts +7 -0
- package/lib/ui/directives/view-mode.d.ts +5 -0
- package/lib/ui/directives/view-mode.js +10 -0
- package/lib/ui/directives/view-mode.js.map +1 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.d.ts +2 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js +5 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js.map +1 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.d.ts +31 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.d.ts +2 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.d.ts +1 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js +5 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js.map +1 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/taon-db-admin.component.d.ts +9 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.d.ts +2 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js +5 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js.map +1 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.d.ts +14 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.d.ts +2 -0
- package/lib/ui/taon-admin-mode-configuration/index.d.ts +4 -0
- package/lib/ui/taon-admin-mode-configuration/index.js +5 -0
- package/lib/ui/taon-admin-mode-configuration/index.js.map +1 -0
- package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts +5 -0
- package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.js +3 -0
- package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.js.map +1 -0
- package/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +14 -0
- package/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.d.ts +47 -0
- package/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.d.ts +2 -0
- package/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +21 -0
- package/lib/ui/taon-github-fork-me-corner/index.d.ts +2 -0
- package/lib/ui/taon-github-fork-me-corner/index.js +5 -0
- package/lib/ui/taon-github-fork-me-corner/index.js.map +1 -0
- package/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.component.d.ts +3 -0
- package/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.module.d.ts +2 -0
- package/lib/ui/taon-github-fork-me-ribbon/index.d.ts +2 -0
- package/lib/ui/taon-github-fork-me-ribbon/index.js +5 -0
- package/lib/ui/taon-github-fork-me-ribbon/index.js.map +1 -0
- package/lib/ui/taon-github-fork-me-ribbon/taon-github-fork-me-ribbon.component.d.ts +3 -0
- package/lib/ui/taon-github-fork-me-ribbon/taon-github-fork-me-ribbon.module.d.ts +2 -0
- package/lib/ui/taon-notifications/index.d.ts +4 -0
- package/lib/ui/taon-notifications/index.js +11 -0
- package/lib/ui/taon-notifications/index.js.map +1 -0
- package/lib/ui/taon-notifications/taon-notifications.component.d.ts +9 -0
- package/lib/ui/taon-notifications/taon-notifications.models.d.ts +6 -0
- package/lib/ui/taon-notifications/taon-notifications.models.js +5 -0
- package/lib/ui/taon-notifications/taon-notifications.models.js.map +1 -0
- package/lib/ui/taon-notifications/taon-notifications.module.d.ts +2 -0
- package/lib/ui/taon-notifications/taon-notifications.service.d.ts +11 -0
- package/lib/ui/taon-progress-bar/index.d.ts +2 -0
- package/lib/ui/taon-progress-bar/index.js +5 -0
- package/lib/ui/taon-progress-bar/index.js.map +1 -0
- package/lib/ui/taon-progress-bar/taon-progress-bar.component.d.ts +14 -0
- package/lib/ui/taon-progress-bar/taon-progress-bar.module.d.ts +2 -0
- package/lib/ui/taon-session-passcode/index.d.ts +1 -0
- package/lib/ui/taon-session-passcode/index.js +5 -0
- package/lib/ui/taon-session-passcode/index.js.map +1 -0
- package/lib/ui/taon-session-passcode/taon-session-passcode.component.d.ts +35 -0
- package/lib/ui/taon.models.d.ts +11 -0
- package/lib/ui/taon.models.js +3 -0
- package/lib/ui/taon.models.js.map +1 -0
- package/lib/ui/toan-full-material.module.d.ts +2 -0
- package/lib/validators.d.ts +7 -0
- package/lib/validators.js +53 -0
- package/lib/validators.js.map +1 -0
- package/old-app .d.ts +0 -0
- package/old-app .js +115 -0
- package/old-app .js.map +1 -0
- package/package.json +74 -11
- package/playground.d.ts +0 -0
- package/playground.js +172 -0
- package/playground.js.map +1 -0
- package/src.d.ts +6 -0
- package/taon.jsonc +48 -0
- package/tmp-environment.json +392 -0
- package/websql/README.md +24 -0
- package/websql/esm2022/lib/base-classes/base-abstract-entity.mjs +25 -0
- package/websql/esm2022/lib/base-classes/base-class.mjs +17 -0
- package/websql/esm2022/lib/base-classes/base-context.mjs +14 -0
- package/websql/esm2022/lib/base-classes/base-controller.mjs +18 -0
- package/websql/esm2022/lib/base-classes/base-crud-controller.mjs +238 -0
- package/websql/esm2022/lib/base-classes/base-entity.mjs +16 -0
- package/websql/esm2022/lib/base-classes/base-injector.mjs +160 -0
- package/websql/esm2022/lib/base-classes/base-provider.mjs +6 -0
- package/websql/esm2022/lib/base-classes/base-repository.mjs +431 -0
- package/websql/esm2022/lib/base-classes/base-subscriber-for-entity.mjs +137 -0
- package/websql/esm2022/lib/base-classes/base-subscriber.mjs +27 -0
- package/websql/esm2022/lib/base-classes/base.mjs +26 -0
- package/websql/esm2022/lib/constants.mjs +4 -0
- package/websql/esm2022/lib/create-context.mjs +86 -0
- package/websql/esm2022/lib/decorators/classes/controller-decorator.mjs +15 -0
- package/websql/esm2022/lib/decorators/classes/entity-decorator.mjs +25 -0
- package/websql/esm2022/lib/decorators/classes/provider-decorator.mjs +15 -0
- package/websql/esm2022/lib/decorators/classes/repository-decorator.mjs +15 -0
- package/websql/esm2022/lib/decorators/classes/subscriber-decorator.mjs +41 -0
- package/websql/esm2022/lib/decorators/http/http-decorators.mjs +22 -0
- package/websql/esm2022/lib/decorators/http/http-methods-decorators.mjs +78 -0
- package/websql/esm2022/lib/decorators/http/http-params-decorators.mjs +47 -0
- package/websql/esm2022/lib/dependency-injection/di-container.mjs +32 -0
- package/websql/esm2022/lib/endpoint-context.mjs +1506 -0
- package/websql/esm2022/lib/entity-process.mjs +207 -0
- package/websql/esm2022/lib/env.mjs +6 -0
- package/websql/esm2022/lib/get-response-value.mjs +45 -0
- package/websql/esm2022/lib/helpers/class-helpers.mjs +183 -0
- package/websql/esm2022/lib/helpers/taon-helpers.mjs +120 -0
- package/websql/esm2022/lib/index.mjs +81 -0
- package/websql/esm2022/lib/inject.mjs +70 -0
- package/websql/esm2022/lib/models.mjs +70 -0
- package/websql/esm2022/lib/orm.mjs +60 -0
- package/websql/esm2022/lib/realtime/realtime-client.mjs +129 -0
- package/websql/esm2022/lib/realtime/realtime-core.mjs +54 -0
- package/websql/esm2022/lib/realtime/realtime-server.mjs +158 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/index.mjs +7 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.mjs +98 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.mjs +45 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.mjs +40 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.mjs +25 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.mjs +4 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc.mjs +48 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.mjs +5 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.mjs +50 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.mjs +48 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.mjs +35 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.mjs +43 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.mjs +4 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock.mjs +28 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-socket-io.mjs +33 -0
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy.mjs +10 -0
- package/websql/esm2022/lib/realtime/realtime-subs-manager.mjs +79 -0
- package/websql/esm2022/lib/realtime/realtime.models.mjs +4 -0
- package/websql/esm2022/lib/storage.mjs +5 -0
- package/websql/esm2022/lib/symbols.mjs +89 -0
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.mjs +4 -0
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.mjs +32 -0
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.mjs +167 -0
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin.service.mjs +64 -0
- package/websql/esm2022/lib/validators.mjs +76 -0
- package/websql/esm2022/public-api.mjs +2 -0
- package/websql/esm2022/taon.mjs +5 -0
- package/websql/fesm2022/taon.mjs +4595 -0
- package/websql/fesm2022/taon.mjs.map +1 -0
- package/websql/index.d.ts +6 -0
- package/websql/lib/base-classes/base-abstract-entity.d.ts +7 -0
- package/websql/lib/base-classes/base-class.d.ts +9 -0
- package/websql/lib/base-classes/base-context.d.ts +17 -0
- package/websql/lib/base-classes/base-controller.d.ts +8 -0
- package/websql/lib/base-classes/base-crud-controller.d.ts +28 -0
- package/websql/lib/base-classes/base-entity.d.ts +8 -0
- package/websql/lib/base-classes/base-injector.d.ts +60 -0
- package/websql/lib/base-classes/base-provider.d.ts +4 -0
- package/websql/lib/base-classes/base-repository.d.ts +255 -0
- package/websql/lib/base-classes/base-subscriber-for-entity.d.ts +82 -0
- package/websql/lib/base-classes/base-subscriber.d.ts +5 -0
- package/websql/lib/base-classes/base.d.ts +36 -0
- package/websql/lib/constants.d.ts +2 -0
- package/websql/lib/create-context.d.ts +25 -0
- package/websql/lib/decorators/classes/controller-decorator.d.ts +13 -0
- package/websql/lib/decorators/classes/entity-decorator.d.ts +17 -0
- package/websql/lib/decorators/classes/provider-decorator.d.ts +5 -0
- package/websql/lib/decorators/classes/repository-decorator.d.ts +5 -0
- package/websql/lib/decorators/classes/subscriber-decorator.d.ts +6 -0
- package/websql/lib/decorators/http/http-decorators.d.ts +18 -0
- package/websql/lib/decorators/http/http-methods-decorators.d.ts +15 -0
- package/websql/lib/decorators/http/http-params-decorators.d.ts +6 -0
- package/websql/lib/dependency-injection/di-container.d.ts +6 -0
- package/websql/lib/endpoint-context.d.ts +117 -0
- package/websql/lib/entity-process.d.ts +40 -0
- package/websql/lib/env.d.ts +3 -0
- package/websql/lib/get-response-value.d.ts +7 -0
- package/websql/lib/helpers/class-helpers.d.ts +19 -0
- package/websql/lib/helpers/taon-helpers.d.ts +17 -0
- package/websql/lib/index.d.ts +113 -0
- package/websql/lib/inject.d.ts +9 -0
- package/websql/lib/models.d.ts +181 -0
- package/websql/lib/orm.d.ts +52 -0
- package/websql/lib/realtime/realtime-client.d.ts +32 -0
- package/websql/lib/realtime/realtime-core.d.ts +41 -0
- package/websql/lib/realtime/realtime-server.d.ts +14 -0
- package/websql/lib/realtime/realtime-strategy/index.d.ts +5 -0
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +22 -0
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +17 -0
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +11 -0
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +11 -0
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +14 -0
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +23 -0
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +3 -0
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +17 -0
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +18 -0
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +12 -0
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +14 -0
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +12 -0
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +15 -0
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +17 -0
- package/websql/lib/realtime/realtime-strategy/realtime-strategy.d.ts +13 -0
- package/websql/lib/realtime/realtime-subs-manager.d.ts +15 -0
- package/websql/lib/realtime/realtime.models.d.ts +14 -0
- package/websql/lib/storage.d.ts +2 -0
- package/websql/lib/symbols.d.ts +73 -0
- package/websql/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts +6 -0
- package/websql/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +18 -0
- package/websql/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.d.ts +51 -0
- package/websql/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +25 -0
- package/websql/lib/validators.d.ts +8 -0
- package/websql/package.json +25 -0
- package/websql/public-api.d.ts +2 -0
|
@@ -0,0 +1,780 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseRepository = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var tnp_core_1 = require("tnp-core");
|
|
6
|
+
var tnp_core_2 = require("tnp-core");
|
|
7
|
+
var class_helpers_1 = require("../helpers/class-helpers");
|
|
8
|
+
var taon_type_sql_1 = require("taon-type-sql");
|
|
9
|
+
var repository_decorator_1 = require("../decorators/classes/repository-decorator");
|
|
10
|
+
var base_injector_1 = require("./base-injector");
|
|
11
|
+
//#endregion
|
|
12
|
+
var INDEX_KEYS_NO_FOR_UPDATE = ['id'];
|
|
13
|
+
var BaseRepository = /** @class */ (function (_super) {
|
|
14
|
+
tslib_1.__extends(BaseRepository, _super);
|
|
15
|
+
function BaseRepository(
|
|
16
|
+
// Injected through BaseCrudController
|
|
17
|
+
__entityClassResolveFn) {
|
|
18
|
+
var _this = _super.call(this) || this;
|
|
19
|
+
_this.__entityClassResolveFn = __entityClassResolveFn;
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
_this.entityClassResolveFn = __entityClassResolveFn;
|
|
22
|
+
return _this;
|
|
23
|
+
}
|
|
24
|
+
Object.defineProperty(BaseRepository.prototype, "dbQuery", {
|
|
25
|
+
get: function () {
|
|
26
|
+
var _a, _b;
|
|
27
|
+
//#region @websqlFunc
|
|
28
|
+
if (!this.__dbQuery) {
|
|
29
|
+
if (!this.__endpoint_context__) {
|
|
30
|
+
return; // TODO
|
|
31
|
+
throw new Error("[BaseRepository] Context not inited for class ".concat(class_helpers_1.ClassHelpers.getName(this)));
|
|
32
|
+
}
|
|
33
|
+
var connection = (_a = this.__endpoint_context__) === null || _a === void 0 ? void 0 : _a.connection;
|
|
34
|
+
if (!connection) {
|
|
35
|
+
throw new Error("[BaseRepository] Database not inited for context ".concat((_b = this.__endpoint_context__) === null || _b === void 0 ? void 0 : _b.contextName));
|
|
36
|
+
}
|
|
37
|
+
this.__dbQuery = new taon_type_sql_1.MySqlQuerySource(connection);
|
|
38
|
+
}
|
|
39
|
+
return this.__dbQuery;
|
|
40
|
+
//#endregion
|
|
41
|
+
},
|
|
42
|
+
enumerable: false,
|
|
43
|
+
configurable: true
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(BaseRepository.prototype, "connection", {
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region connection
|
|
48
|
+
get: function () {
|
|
49
|
+
var _a;
|
|
50
|
+
//#region @websqlFunc
|
|
51
|
+
return (_a = this.__endpoint_context__) === null || _a === void 0 ? void 0 : _a.connection;
|
|
52
|
+
//#endregion
|
|
53
|
+
},
|
|
54
|
+
enumerable: false,
|
|
55
|
+
configurable: true
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(BaseRepository.prototype, "repository", {
|
|
58
|
+
//#endregion
|
|
59
|
+
get: function () {
|
|
60
|
+
//#region @websqlFunc
|
|
61
|
+
return this.__repository;
|
|
62
|
+
//#endregion
|
|
63
|
+
},
|
|
64
|
+
enumerable: false,
|
|
65
|
+
configurable: true
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(BaseRepository.prototype, "target", {
|
|
68
|
+
/**
|
|
69
|
+
* target for repository
|
|
70
|
+
*/
|
|
71
|
+
get: function () {
|
|
72
|
+
var _a;
|
|
73
|
+
//#region @websqlFunc
|
|
74
|
+
return (_a = this === null || this === void 0 ? void 0 : this.repository) === null || _a === void 0 ? void 0 : _a.target;
|
|
75
|
+
//#endregion
|
|
76
|
+
},
|
|
77
|
+
enumerable: false,
|
|
78
|
+
configurable: true
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(BaseRepository.prototype, "repo", {
|
|
81
|
+
/**
|
|
82
|
+
* alias to repository
|
|
83
|
+
*/
|
|
84
|
+
get: function () {
|
|
85
|
+
//#region @websqlFunc
|
|
86
|
+
return this.repository;
|
|
87
|
+
//#endregion
|
|
88
|
+
},
|
|
89
|
+
enumerable: false,
|
|
90
|
+
configurable: true
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(BaseRepository.prototype, "repositoryExists", {
|
|
93
|
+
get: function () {
|
|
94
|
+
//#region @websqlFunc
|
|
95
|
+
return !!this.__repository;
|
|
96
|
+
//#endregion
|
|
97
|
+
},
|
|
98
|
+
enumerable: false,
|
|
99
|
+
configurable: true
|
|
100
|
+
});
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region init
|
|
103
|
+
BaseRepository.prototype.__init = function (context) {
|
|
104
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
105
|
+
var entityClassFn, ctx, connection, _a;
|
|
106
|
+
return tslib_1.__generator(this, function (_b) {
|
|
107
|
+
switch (_b.label) {
|
|
108
|
+
case 0:
|
|
109
|
+
//#region @websql
|
|
110
|
+
if (this.__repository) {
|
|
111
|
+
return [2 /*return*/];
|
|
112
|
+
}
|
|
113
|
+
entityClassFn = this.entityClassResolveFn();
|
|
114
|
+
if (!entityClassFn) {
|
|
115
|
+
tnp_core_1.Helpers.warn("Entity class not provided for repository ".concat(class_helpers_1.ClassHelpers.getName(this)));
|
|
116
|
+
return [2 /*return*/];
|
|
117
|
+
}
|
|
118
|
+
ctx = this.__endpoint_context__;
|
|
119
|
+
if (ctx.remoteHost) {
|
|
120
|
+
return [2 /*return*/];
|
|
121
|
+
}
|
|
122
|
+
connection = ctx.connection;
|
|
123
|
+
if (!connection) {
|
|
124
|
+
throw new Error("\n\n Connection not found for context ".concat(ctx.contextName, "\n\n\n Maybe you forgot to init database ?\n\n Taon.createContext({\n ...\n database:true\n ...\n })\n\n "));
|
|
125
|
+
}
|
|
126
|
+
if (!entityClassFn) {
|
|
127
|
+
tnp_core_1.Helpers.warn("Entity class not found for repository ".concat(class_helpers_1.ClassHelpers.getName(this)));
|
|
128
|
+
return [2 /*return*/];
|
|
129
|
+
}
|
|
130
|
+
_a = this;
|
|
131
|
+
return [4 /*yield*/, connection.getRepository(class_helpers_1.ClassHelpers.getOrginalClass(entityClassFn))];
|
|
132
|
+
case 1:
|
|
133
|
+
_a.__repository = (_b.sent());
|
|
134
|
+
return [2 /*return*/];
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region crud operations / typeorm / has id
|
|
141
|
+
/**
|
|
142
|
+
* Checks if entity has an id.
|
|
143
|
+
* If entity composite compose ids, it will check them all.
|
|
144
|
+
*/
|
|
145
|
+
BaseRepository.prototype.hasId = function (entity) {
|
|
146
|
+
return this.repo.hasId(entity);
|
|
147
|
+
};
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region crud operations / typeorm / get id
|
|
150
|
+
/**
|
|
151
|
+
* Gets entity mixed id.
|
|
152
|
+
*/
|
|
153
|
+
BaseRepository.prototype.getId = function (entity) {
|
|
154
|
+
return this.repo.getId(entity);
|
|
155
|
+
};
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region crud operations / typeorm / create & bulk create
|
|
158
|
+
/**
|
|
159
|
+
Saves a given entity in the database.
|
|
160
|
+
* If entity does not exist in the database then inserts, otherwise updates.
|
|
161
|
+
*/
|
|
162
|
+
BaseRepository.prototype.save = function (item, options) {
|
|
163
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
164
|
+
var model, id;
|
|
165
|
+
return tslib_1.__generator(this, function (_a) {
|
|
166
|
+
switch (_a.label) {
|
|
167
|
+
case 0: return [4 /*yield*/, this.repo.create(item)];
|
|
168
|
+
case 1:
|
|
169
|
+
model = _a.sent();
|
|
170
|
+
return [4 /*yield*/, this.repo.save(model, options)];
|
|
171
|
+
case 2:
|
|
172
|
+
model = _a.sent();
|
|
173
|
+
id = model.id;
|
|
174
|
+
return [4 /*yield*/, this.repo.findOne({
|
|
175
|
+
where: { id: id },
|
|
176
|
+
})];
|
|
177
|
+
case 3:
|
|
178
|
+
model = _a.sent();
|
|
179
|
+
return [2 /*return*/, model];
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* alias to save
|
|
186
|
+
* -> it will actuall create new entity in db
|
|
187
|
+
* in oposite to typeorm create method
|
|
188
|
+
*/
|
|
189
|
+
BaseRepository.prototype.create = function (item, options) {
|
|
190
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
191
|
+
return tslib_1.__generator(this, function (_a) {
|
|
192
|
+
return [2 /*return*/, this.save(item, options)];
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
BaseRepository.prototype.bulkSave = function (items, options) {
|
|
197
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
198
|
+
var models, index, item, model;
|
|
199
|
+
return tslib_1.__generator(this, function (_a) {
|
|
200
|
+
switch (_a.label) {
|
|
201
|
+
case 0:
|
|
202
|
+
models = [];
|
|
203
|
+
index = 0;
|
|
204
|
+
_a.label = 1;
|
|
205
|
+
case 1:
|
|
206
|
+
if (!(index < items.length)) return [3 /*break*/, 4];
|
|
207
|
+
item = items[index];
|
|
208
|
+
return [4 /*yield*/, this.save(item, options)];
|
|
209
|
+
case 2:
|
|
210
|
+
model = _a.sent();
|
|
211
|
+
models.push(model);
|
|
212
|
+
_a.label = 3;
|
|
213
|
+
case 3:
|
|
214
|
+
index++;
|
|
215
|
+
return [3 /*break*/, 1];
|
|
216
|
+
case 4: return [2 /*return*/, models];
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
BaseRepository.prototype.bulkCreate = function (items, options) {
|
|
222
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
223
|
+
return tslib_1.__generator(this, function (_a) {
|
|
224
|
+
return [2 /*return*/, this.bulkSave(items, options)];
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
//#region old typeorm version
|
|
229
|
+
// /**
|
|
230
|
+
// * Creates a new entity instance.
|
|
231
|
+
// */
|
|
232
|
+
// create(): Entity;
|
|
233
|
+
// /**
|
|
234
|
+
// * Creates new entities and copies all entity properties from given objects into their new entities.
|
|
235
|
+
// * Note that it copies only properties that are present in entity schema.
|
|
236
|
+
// */
|
|
237
|
+
// create(entityLikeArray: Entity[]): Entity[];
|
|
238
|
+
// /**
|
|
239
|
+
// * Creates a new entity instance and copies all entity properties from this object into a new entity.
|
|
240
|
+
// * Note that it copies only properties that are present in entity schema.
|
|
241
|
+
// */
|
|
242
|
+
// create(entityLike: Entity): Entity;
|
|
243
|
+
/**
|
|
244
|
+
* Saves all given entities in the database.
|
|
245
|
+
* If entities do not exist in the database then inserts, otherwise updates.
|
|
246
|
+
*/
|
|
247
|
+
// save<T extends DeepPartial<Entity>>(
|
|
248
|
+
// entities: T[],
|
|
249
|
+
// options: SaveOptions & {
|
|
250
|
+
// reload: false;
|
|
251
|
+
// },
|
|
252
|
+
// ): Promise<T[]>;
|
|
253
|
+
// /**
|
|
254
|
+
// * Saves all given entities in the database.
|
|
255
|
+
// * If entities do not exist in the database then inserts, otherwise updates.
|
|
256
|
+
// */
|
|
257
|
+
// save<T extends DeepPartial<Entity>>(
|
|
258
|
+
// entities: T[],
|
|
259
|
+
// options?: SaveOptions,
|
|
260
|
+
// ): Promise<(T & Entity)[]>;
|
|
261
|
+
// /**
|
|
262
|
+
// * Saves a given entity in the database.
|
|
263
|
+
// * If entity does not exist in the database then inserts, otherwise updates.
|
|
264
|
+
// */
|
|
265
|
+
// save<T extends DeepPartial<Entity>>(
|
|
266
|
+
// entity: T,
|
|
267
|
+
// options: SaveOptions & {
|
|
268
|
+
// reload: false;
|
|
269
|
+
// },
|
|
270
|
+
// ): Promise<T>;
|
|
271
|
+
// /**
|
|
272
|
+
// * Saves a given entity in the database.
|
|
273
|
+
// * If entity does not exist in the database then inserts, otherwise updates.
|
|
274
|
+
// */
|
|
275
|
+
// save<T extends DeepPartial<Entity>>(
|
|
276
|
+
// entity: T,
|
|
277
|
+
// options?: SaveOptions,
|
|
278
|
+
// ): Promise<T & Entity> {
|
|
279
|
+
// return this.repo.save(entity, options);
|
|
280
|
+
// }
|
|
281
|
+
//#endregion
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region crud operations / typeorm / merge
|
|
284
|
+
/**
|
|
285
|
+
* Merges multiple entities (or entity-like objects) into a given entity.
|
|
286
|
+
*/
|
|
287
|
+
BaseRepository.prototype.merge = function (mergeIntoEntity) {
|
|
288
|
+
var _a;
|
|
289
|
+
var entityLikes = [];
|
|
290
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
291
|
+
entityLikes[_i - 1] = arguments[_i];
|
|
292
|
+
}
|
|
293
|
+
return (_a = this.repo).merge.apply(_a, tslib_1.__spreadArray([mergeIntoEntity], tslib_1.__read(entityLikes), false));
|
|
294
|
+
};
|
|
295
|
+
//#endregion
|
|
296
|
+
//#region crud operations / typeorm / preload
|
|
297
|
+
/**
|
|
298
|
+
* Creates a new entity from the given plain javascript object. If entity already exist in the database, then
|
|
299
|
+
* it loads it (and everything related to it), replaces all values with the new ones from the given object
|
|
300
|
+
* and returns this new entity. This new entity is actually a loaded from the db entity with all properties
|
|
301
|
+
* replaced from the new object.
|
|
302
|
+
*
|
|
303
|
+
* Note that given entity-like object must have an entity id / primary key to find entity by.
|
|
304
|
+
* Returns undefined if entity with given id was not found.
|
|
305
|
+
*/
|
|
306
|
+
BaseRepository.prototype.preload = function (entityLike) {
|
|
307
|
+
return this.repo.preload(entityLike);
|
|
308
|
+
};
|
|
309
|
+
//#endregion
|
|
310
|
+
//#region crud operations / typeorm / remove (delete) & bulk remove (delete)
|
|
311
|
+
/**
|
|
312
|
+
* Removes a given entities from the database.
|
|
313
|
+
*/
|
|
314
|
+
BaseRepository.prototype.remove = function (idOrEntity) {
|
|
315
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
316
|
+
var deletedEntity, idCopy;
|
|
317
|
+
return tslib_1.__generator(this, function (_a) {
|
|
318
|
+
switch (_a.label) {
|
|
319
|
+
case 0:
|
|
320
|
+
//#region @websqlFunc
|
|
321
|
+
if (tnp_core_2._.isObject(idOrEntity)) {
|
|
322
|
+
idOrEntity = idOrEntity.id;
|
|
323
|
+
}
|
|
324
|
+
return [4 /*yield*/, this.repo.findOne({
|
|
325
|
+
where: { id: idOrEntity },
|
|
326
|
+
})];
|
|
327
|
+
case 1:
|
|
328
|
+
deletedEntity = _a.sent();
|
|
329
|
+
idCopy = deletedEntity.id;
|
|
330
|
+
return [4 /*yield*/, this.repo.remove(deletedEntity)];
|
|
331
|
+
case 2:
|
|
332
|
+
_a.sent();
|
|
333
|
+
deletedEntity.id = idCopy;
|
|
334
|
+
return [2 /*return*/, deletedEntity];
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
});
|
|
338
|
+
};
|
|
339
|
+
/**
|
|
340
|
+
* alias to remove
|
|
341
|
+
*/
|
|
342
|
+
BaseRepository.prototype.delete = function (idOrEntity) {
|
|
343
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
344
|
+
return tslib_1.__generator(this, function (_a) {
|
|
345
|
+
return [2 /*return*/, this.remove(idOrEntity)];
|
|
346
|
+
});
|
|
347
|
+
});
|
|
348
|
+
};
|
|
349
|
+
/**
|
|
350
|
+
* alias to removeById
|
|
351
|
+
*/
|
|
352
|
+
BaseRepository.prototype.deleteById = function (id) {
|
|
353
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
354
|
+
return tslib_1.__generator(this, function (_a) {
|
|
355
|
+
return [2 /*return*/, this.remove(id)];
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
};
|
|
359
|
+
BaseRepository.prototype.bulkRemove = function (idsOrEntities) {
|
|
360
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
361
|
+
var models, index, id, model;
|
|
362
|
+
return tslib_1.__generator(this, function (_a) {
|
|
363
|
+
switch (_a.label) {
|
|
364
|
+
case 0:
|
|
365
|
+
//#region @websqlFunc
|
|
366
|
+
idsOrEntities = idsOrEntities.map(function (id) {
|
|
367
|
+
return tnp_core_2._.isObject(id) ? id.id : id;
|
|
368
|
+
});
|
|
369
|
+
models = [];
|
|
370
|
+
index = 0;
|
|
371
|
+
_a.label = 1;
|
|
372
|
+
case 1:
|
|
373
|
+
if (!(index < idsOrEntities.length)) return [3 /*break*/, 4];
|
|
374
|
+
id = idsOrEntities[index];
|
|
375
|
+
return [4 /*yield*/, this.remove(id)];
|
|
376
|
+
case 2:
|
|
377
|
+
model = _a.sent();
|
|
378
|
+
models.push(model);
|
|
379
|
+
_a.label = 3;
|
|
380
|
+
case 3:
|
|
381
|
+
index++;
|
|
382
|
+
return [3 /*break*/, 1];
|
|
383
|
+
case 4: return [2 /*return*/, models];
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
};
|
|
388
|
+
BaseRepository.prototype.bulkDelete = function (ids) {
|
|
389
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
390
|
+
return tslib_1.__generator(this, function (_a) {
|
|
391
|
+
return [2 /*return*/, this.bulkRemove(ids)];
|
|
392
|
+
});
|
|
393
|
+
});
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* Records the delete date of a given entity.
|
|
397
|
+
*/
|
|
398
|
+
BaseRepository.prototype.softRemove = function (entity, options) {
|
|
399
|
+
return this.repo.softRemove(entity, options);
|
|
400
|
+
};
|
|
401
|
+
/**
|
|
402
|
+
* Recovers a given entity in the database.
|
|
403
|
+
*/
|
|
404
|
+
BaseRepository.prototype.recover = function (entity, options) {
|
|
405
|
+
return this.repo.recover(entity, options);
|
|
406
|
+
};
|
|
407
|
+
//#endregion
|
|
408
|
+
//#region crud operations / typeorm / insert
|
|
409
|
+
/**
|
|
410
|
+
* Inserts a given entity into the database.
|
|
411
|
+
* Unlike save method executes a primitive operation without cascades, relations and other operations included.
|
|
412
|
+
* Executes fast and efficient INSERT query.
|
|
413
|
+
* Does not check if entity exist in the database, so query will fail if duplicate entity is being inserted.
|
|
414
|
+
*/
|
|
415
|
+
BaseRepository.prototype.insert = function (entity) {
|
|
416
|
+
return this.repo.insert(entity);
|
|
417
|
+
};
|
|
418
|
+
//#endregion
|
|
419
|
+
//#region crud operations / typeorm / update & build update
|
|
420
|
+
BaseRepository.prototype.update = function (item) {
|
|
421
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
422
|
+
var id;
|
|
423
|
+
return tslib_1.__generator(this, function (_a) {
|
|
424
|
+
switch (_a.label) {
|
|
425
|
+
case 0:
|
|
426
|
+
id = item.id;
|
|
427
|
+
return [4 /*yield*/, this.updateById(id, item)];
|
|
428
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
});
|
|
432
|
+
};
|
|
433
|
+
BaseRepository.prototype.updateById = function (id, item) {
|
|
434
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
435
|
+
var allowedPropsToUpdate, _loop_1, this_1, key, i, key, toSet, model;
|
|
436
|
+
var _a;
|
|
437
|
+
return tslib_1.__generator(this, function (_b) {
|
|
438
|
+
switch (_b.label) {
|
|
439
|
+
case 0:
|
|
440
|
+
allowedPropsToUpdate = [];
|
|
441
|
+
_loop_1 = function (key) {
|
|
442
|
+
if (tnp_core_2._.isObject(item) &&
|
|
443
|
+
item.hasOwnProperty(key) &&
|
|
444
|
+
typeof item[key] !== 'object' &&
|
|
445
|
+
!tnp_core_2._.isUndefined(this_1.repo.metadata.ownColumns.find(function (c) { return c.propertyName === key; }))) {
|
|
446
|
+
allowedPropsToUpdate.push(key);
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
this_1 = this;
|
|
450
|
+
for (key in item) {
|
|
451
|
+
_loop_1(key);
|
|
452
|
+
}
|
|
453
|
+
i = 0;
|
|
454
|
+
_b.label = 1;
|
|
455
|
+
case 1:
|
|
456
|
+
if (!(i < allowedPropsToUpdate.length)) return [3 /*break*/, 4];
|
|
457
|
+
key = allowedPropsToUpdate[i];
|
|
458
|
+
if (!!INDEX_KEYS_NO_FOR_UPDATE.includes(key.toLowerCase())) return [3 /*break*/, 3];
|
|
459
|
+
toSet = item[key];
|
|
460
|
+
// const tableName = tableNameFrom(this.entity as any);
|
|
461
|
+
return [4 /*yield*/, this.repo.update({
|
|
462
|
+
id: id,
|
|
463
|
+
}, (_a = {},
|
|
464
|
+
_a[key] = toSet,
|
|
465
|
+
_a))];
|
|
466
|
+
case 2:
|
|
467
|
+
// const tableName = tableNameFrom(this.entity as any);
|
|
468
|
+
_b.sent();
|
|
469
|
+
_b.label = 3;
|
|
470
|
+
case 3:
|
|
471
|
+
i++;
|
|
472
|
+
return [3 /*break*/, 1];
|
|
473
|
+
case 4: return [4 /*yield*/, this.repo.findOne({
|
|
474
|
+
where: { id: id },
|
|
475
|
+
})];
|
|
476
|
+
case 5:
|
|
477
|
+
model = _b.sent();
|
|
478
|
+
return [2 /*return*/, model];
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
});
|
|
482
|
+
};
|
|
483
|
+
BaseRepository.prototype.bulkUpdate = function (items) {
|
|
484
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
485
|
+
var models, index, item, id, model;
|
|
486
|
+
return tslib_1.__generator(this, function (_a) {
|
|
487
|
+
switch (_a.label) {
|
|
488
|
+
case 0:
|
|
489
|
+
models = [];
|
|
490
|
+
index = 0;
|
|
491
|
+
_a.label = 1;
|
|
492
|
+
case 1:
|
|
493
|
+
if (!(index < items.length)) return [3 /*break*/, 4];
|
|
494
|
+
item = items[index];
|
|
495
|
+
id = item.id;
|
|
496
|
+
return [4 /*yield*/, this.updateById(id, item)];
|
|
497
|
+
case 2:
|
|
498
|
+
model = _a.sent();
|
|
499
|
+
models.push(model);
|
|
500
|
+
_a.label = 3;
|
|
501
|
+
case 3:
|
|
502
|
+
index++;
|
|
503
|
+
return [3 /*break*/, 1];
|
|
504
|
+
case 4: return [2 /*return*/, { models: models }];
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
});
|
|
508
|
+
};
|
|
509
|
+
//#region tpeorm update version
|
|
510
|
+
// this version suck and will not return update entity
|
|
511
|
+
// /**
|
|
512
|
+
// * Updates entity partially. Entity can be found by a given conditions.
|
|
513
|
+
// * Unlike save method executes a primitive operation without cascades, relations and other operations included.
|
|
514
|
+
// * Executes fast and efficient UPDATE query.
|
|
515
|
+
// * Does not check if entity exist in the database.
|
|
516
|
+
// */
|
|
517
|
+
// update(
|
|
518
|
+
// criteria:
|
|
519
|
+
// | string
|
|
520
|
+
// | string[]
|
|
521
|
+
// | number
|
|
522
|
+
// | number[]
|
|
523
|
+
// | Date
|
|
524
|
+
// | Date[]
|
|
525
|
+
// | ObjectID
|
|
526
|
+
// | ObjectID[]
|
|
527
|
+
// | FindOptionsWhere<Entity>,
|
|
528
|
+
// partialEntity: QueryDeepPartialEntity<Entity>,
|
|
529
|
+
// ): Promise<UpdateResult> {
|
|
530
|
+
// return this.repo.update(criteria, partialEntity);
|
|
531
|
+
// }
|
|
532
|
+
//#endregion
|
|
533
|
+
//#endregion
|
|
534
|
+
//#region crud operations / typeorm / upsert
|
|
535
|
+
/**
|
|
536
|
+
* Inserts a given entity into the database, unless a unique constraint conflicts then updates the entity
|
|
537
|
+
* Unlike save method executes a primitive operation without cascades, relations and other operations included.
|
|
538
|
+
* Executes fast and efficient INSERT ... ON CONFLICT DO UPDATE/ON DUPLICATE KEY UPDATE query.
|
|
539
|
+
*/
|
|
540
|
+
BaseRepository.prototype.upsert = function (entityOrEntities, conflictPathsOrOptions) {
|
|
541
|
+
return this.repo.upsert(entityOrEntities, conflictPathsOrOptions);
|
|
542
|
+
};
|
|
543
|
+
//#endregion
|
|
544
|
+
//#region crud operations / typeorm / soft delete
|
|
545
|
+
/**
|
|
546
|
+
* Records the delete date of entities by a given criteria.
|
|
547
|
+
* Unlike save method executes a primitive operation without cascades, relations and other operations included.
|
|
548
|
+
* Executes fast and efficient SOFT-DELETE query.
|
|
549
|
+
* Does not check if entity exist in the database.
|
|
550
|
+
*/
|
|
551
|
+
BaseRepository.prototype.softDelete = function (criteria) {
|
|
552
|
+
return this.repo.softDelete(criteria);
|
|
553
|
+
};
|
|
554
|
+
//#endregion
|
|
555
|
+
//#region crud operations / typeorm / restore
|
|
556
|
+
/**
|
|
557
|
+
* Restores entities by a given criteria.
|
|
558
|
+
* Unlike save method executes a primitive operation without cascades, relations and other operations included.
|
|
559
|
+
* Executes fast and efficient SOFT-DELETE query.
|
|
560
|
+
* Does not check if entity exist in the database.
|
|
561
|
+
*/
|
|
562
|
+
BaseRepository.prototype.restore = function (criteria) {
|
|
563
|
+
return this.repo.restore(criteria);
|
|
564
|
+
};
|
|
565
|
+
//#endregion
|
|
566
|
+
//#region crud operations / typeorm / count
|
|
567
|
+
/**
|
|
568
|
+
* Counts entities that match given options.
|
|
569
|
+
* Useful for pagination.
|
|
570
|
+
*/
|
|
571
|
+
BaseRepository.prototype.count = function (options) {
|
|
572
|
+
return this.repo.count(options);
|
|
573
|
+
};
|
|
574
|
+
//#endregion
|
|
575
|
+
//#region crud operations / typeorm / count by
|
|
576
|
+
/**
|
|
577
|
+
* Counts entities that match given conditions.
|
|
578
|
+
* Useful for pagination.
|
|
579
|
+
*/
|
|
580
|
+
BaseRepository.prototype.countBy = function (where) {
|
|
581
|
+
return this.repo.countBy(where);
|
|
582
|
+
};
|
|
583
|
+
//#endregion
|
|
584
|
+
//#region crud operations / typeorm / find
|
|
585
|
+
/**
|
|
586
|
+
* Finds entities that match given find options.
|
|
587
|
+
*/
|
|
588
|
+
BaseRepository.prototype.find = function (options) {
|
|
589
|
+
return this.repo.find(options);
|
|
590
|
+
};
|
|
591
|
+
//#endregion
|
|
592
|
+
//#region crud operations / typeorm / find by
|
|
593
|
+
/**
|
|
594
|
+
* Finds entities that match given find options.
|
|
595
|
+
*/
|
|
596
|
+
BaseRepository.prototype.findBy = function (where) {
|
|
597
|
+
return this.repo.findBy(where);
|
|
598
|
+
};
|
|
599
|
+
//#endregion
|
|
600
|
+
//#region crud operations / typeorm / find and count
|
|
601
|
+
// async findAndCount(options: { take: number; skip: number }) {
|
|
602
|
+
// const { take, skip } = options;
|
|
603
|
+
// const [result, total] = await this.repo.findAndCount({
|
|
604
|
+
// // where: { name: Like('%' + keyword + '%') },
|
|
605
|
+
// // order: { name: "DESC" },
|
|
606
|
+
// take: take,
|
|
607
|
+
// skip: skip,
|
|
608
|
+
// });
|
|
609
|
+
// return { result, total };
|
|
610
|
+
// }
|
|
611
|
+
//
|
|
612
|
+
/**
|
|
613
|
+
* Finds entities that match given find options.
|
|
614
|
+
* Also counts all entities that match given conditions,
|
|
615
|
+
* but ignores pagination settings (from and take options).
|
|
616
|
+
*/
|
|
617
|
+
BaseRepository.prototype.findAndCount = function (options) {
|
|
618
|
+
return this.repo.findAndCount(options);
|
|
619
|
+
};
|
|
620
|
+
//#endregion
|
|
621
|
+
//#region crud operations / typeorm / find and count by
|
|
622
|
+
/**
|
|
623
|
+
* Finds entities that match given WHERE conditions.
|
|
624
|
+
* Also counts all entities that match given conditions,
|
|
625
|
+
* but ignores pagination settings (from and take options).
|
|
626
|
+
*/
|
|
627
|
+
BaseRepository.prototype.findAndCountBy = function (where) {
|
|
628
|
+
return this.repo.findAndCountBy(where);
|
|
629
|
+
};
|
|
630
|
+
//#endregion
|
|
631
|
+
//#region crud operations / typeorm / find by ids
|
|
632
|
+
/**
|
|
633
|
+
* Finds entities with ids.
|
|
634
|
+
* Optionally find options or conditions can be applied.
|
|
635
|
+
*
|
|
636
|
+
* @deprecated use `findBy` method instead in conjunction with `In` operator, for example:
|
|
637
|
+
*
|
|
638
|
+
* .findBy({
|
|
639
|
+
* id: In([1, 2, 3])
|
|
640
|
+
* })
|
|
641
|
+
*/
|
|
642
|
+
BaseRepository.prototype.findByIds = function (ids) {
|
|
643
|
+
return this.repo.findByIds(ids);
|
|
644
|
+
};
|
|
645
|
+
//#endregion
|
|
646
|
+
//#region crud operations / typeorm / find one
|
|
647
|
+
/**
|
|
648
|
+
* Finds first entity by a given find options.
|
|
649
|
+
* If entity was not found in the database - returns null.
|
|
650
|
+
*/
|
|
651
|
+
BaseRepository.prototype.findOne = function (options) {
|
|
652
|
+
return this.repo.findOne(options);
|
|
653
|
+
};
|
|
654
|
+
//#endregion
|
|
655
|
+
//#region crud operations / typeorm / find one by
|
|
656
|
+
/**
|
|
657
|
+
* Finds first entity that matches given where condition.
|
|
658
|
+
* If entity was not found in the database - returns null.
|
|
659
|
+
*/
|
|
660
|
+
BaseRepository.prototype.findOneBy = function (where) {
|
|
661
|
+
return this.repo.findOneBy(where);
|
|
662
|
+
};
|
|
663
|
+
//#endregion
|
|
664
|
+
//#region crud operations / typeorm / find one or fail
|
|
665
|
+
/**
|
|
666
|
+
* Finds first entity that matches given id.
|
|
667
|
+
* If entity was not found in the database - returns null.
|
|
668
|
+
*
|
|
669
|
+
* @deprecated use `findOneBy` method instead in conjunction with `In` operator, for example:
|
|
670
|
+
*
|
|
671
|
+
* .findOneBy({
|
|
672
|
+
* id: 1 // where "id" is your primary column name
|
|
673
|
+
* })
|
|
674
|
+
*/
|
|
675
|
+
BaseRepository.prototype.findOneById = function (id) {
|
|
676
|
+
return this.repo.findOneById(id);
|
|
677
|
+
};
|
|
678
|
+
//#endregion
|
|
679
|
+
//#region crud operations / typeorm / find one or fail
|
|
680
|
+
/**
|
|
681
|
+
* Finds first entity by a given find options.
|
|
682
|
+
* If entity was not found in the database - rejects with error.
|
|
683
|
+
*/
|
|
684
|
+
BaseRepository.prototype.findOneOrFail = function (options) {
|
|
685
|
+
return this.repo.findOneOrFail(options);
|
|
686
|
+
};
|
|
687
|
+
//#endregion
|
|
688
|
+
//#region crud operations / typeorm / find one by or fail
|
|
689
|
+
/**
|
|
690
|
+
* Finds first entity that matches given where condition.
|
|
691
|
+
* If entity was not found in the database - rejects with error.
|
|
692
|
+
*/
|
|
693
|
+
BaseRepository.prototype.findOneByOrFail = function (where) {
|
|
694
|
+
return this.repo.findOneByOrFail(where);
|
|
695
|
+
};
|
|
696
|
+
//#endregion
|
|
697
|
+
//#region crud operations / typeorm / query
|
|
698
|
+
/**
|
|
699
|
+
* Executes a raw SQL query and returns a raw database results.
|
|
700
|
+
* Raw query execution is supported only by relational databases (MongoDB is not supported).
|
|
701
|
+
*/
|
|
702
|
+
BaseRepository.prototype.query = function (query, parameters) {
|
|
703
|
+
return this.repo.query(query, parameters);
|
|
704
|
+
};
|
|
705
|
+
//#endregion
|
|
706
|
+
//#region crud operations / typeorm / clear
|
|
707
|
+
/**
|
|
708
|
+
* Clears all the data from the given table/collection (truncates/drops it).
|
|
709
|
+
*
|
|
710
|
+
* Note: this method uses TRUNCATE and may not work as you expect in transactions on some platforms.
|
|
711
|
+
* @see https://stackoverflow.com/a/5972738/925151
|
|
712
|
+
*/
|
|
713
|
+
BaseRepository.prototype.clear = function () {
|
|
714
|
+
return this.repo.clear();
|
|
715
|
+
};
|
|
716
|
+
//#endregion
|
|
717
|
+
//#region crud operations / typeorm / increment
|
|
718
|
+
/**
|
|
719
|
+
* Increments some column by provided value of the entities matched given conditions.
|
|
720
|
+
*/
|
|
721
|
+
BaseRepository.prototype.increment = function (conditions, propertyPath, value) {
|
|
722
|
+
return this.repo.increment(conditions, propertyPath, value);
|
|
723
|
+
};
|
|
724
|
+
//#endregion
|
|
725
|
+
//#region crud operations / typeorm / decrement
|
|
726
|
+
/**
|
|
727
|
+
* Decrements some column by provided value of the entities matched given conditions.
|
|
728
|
+
*/
|
|
729
|
+
BaseRepository.prototype.decrement = function (conditions, propertyPath, value) {
|
|
730
|
+
return this.repo.decrement(conditions, propertyPath, value);
|
|
731
|
+
};
|
|
732
|
+
//#endregion
|
|
733
|
+
//#region crud operations / get all
|
|
734
|
+
/**
|
|
735
|
+
* @deprecated use findAndCount instead
|
|
736
|
+
*/
|
|
737
|
+
BaseRepository.prototype.getAll = function () {
|
|
738
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
739
|
+
var totalCount, models;
|
|
740
|
+
return tslib_1.__generator(this, function (_a) {
|
|
741
|
+
switch (_a.label) {
|
|
742
|
+
case 0: return [4 /*yield*/, this.repo.count()];
|
|
743
|
+
case 1:
|
|
744
|
+
totalCount = _a.sent();
|
|
745
|
+
return [4 /*yield*/, this.repo.find()];
|
|
746
|
+
case 2:
|
|
747
|
+
models = _a.sent();
|
|
748
|
+
// console.log('models', models);
|
|
749
|
+
// console.log('totalCount', totalCount);
|
|
750
|
+
return [2 /*return*/, { models: models, totalCount: totalCount }];
|
|
751
|
+
}
|
|
752
|
+
});
|
|
753
|
+
});
|
|
754
|
+
};
|
|
755
|
+
//#endregion
|
|
756
|
+
//#region crud operations / get by id
|
|
757
|
+
BaseRepository.prototype.getBy = function (id) {
|
|
758
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
759
|
+
var model;
|
|
760
|
+
return tslib_1.__generator(this, function (_a) {
|
|
761
|
+
switch (_a.label) {
|
|
762
|
+
case 0: return [4 /*yield*/, this.repo.findOne({
|
|
763
|
+
where: { id: id },
|
|
764
|
+
})];
|
|
765
|
+
case 1: return [4 /*yield*/, _a.sent()];
|
|
766
|
+
case 2:
|
|
767
|
+
model = _a.sent();
|
|
768
|
+
return [2 /*return*/, model];
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
});
|
|
772
|
+
};
|
|
773
|
+
BaseRepository = tslib_1.__decorate([
|
|
774
|
+
(0, repository_decorator_1.TaonRepository)({ className: 'BaseRepository' }),
|
|
775
|
+
tslib_1.__metadata("design:paramtypes", [Function])
|
|
776
|
+
], BaseRepository);
|
|
777
|
+
return BaseRepository;
|
|
778
|
+
}(base_injector_1.BaseInjector));
|
|
779
|
+
exports.BaseRepository = BaseRepository;
|
|
780
|
+
//# sourceMappingURL=base-repository.js.map
|