taon 21.0.52 → 21.0.53
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/bin/taon +5 -5
- package/bin/taon-debug +5 -5
- package/bin/taon-debug-brk +4 -4
- package/browser/package.json +1 -1
- package/browser-prod/package.json +1 -1
- package/icon-menu-taon.svg +15 -15
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/package.json +1 -1
- package/lib/ui/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
- package/lib-prod/base-classes/base-abstract-entity.js +33 -0
- package/lib-prod/base-classes/base-angular-service.js +56 -0
- package/lib-prod/base-classes/base-class.js +37 -0
- package/lib-prod/base-classes/base-context.js +21 -0
- package/lib-prod/base-classes/base-controller.js +162 -0
- package/lib-prod/base-classes/base-crud-controller.js +235 -0
- package/lib-prod/base-classes/base-custom-repository.js +20 -0
- package/lib-prod/base-classes/base-electron-service.js +0 -0
- package/lib-prod/base-classes/base-entity.js +32 -0
- package/lib-prod/base-classes/base-file-upload.middleware.js +78 -0
- package/lib-prod/base-classes/base-injector.js +202 -0
- package/lib-prod/base-classes/base-middleware.js +6 -0
- package/lib-prod/base-classes/base-migration.js +23 -0
- package/lib-prod/base-classes/base-provider.js +6 -0
- package/lib-prod/base-classes/base-repository.js +589 -0
- package/lib-prod/base-classes/base-subscriber-for-entity.js +154 -0
- package/lib-prod/base-classes/base.js +0 -0
- package/lib-prod/build-info._auto-generated_.js +14 -0
- package/lib-prod/config/controller-config.js +28 -0
- package/lib-prod/config/controller-options.js +6 -0
- package/lib-prod/config/method-config.js +9 -0
- package/lib-prod/config/param-config.js +9 -0
- package/lib-prod/constants.js +29 -0
- package/lib-prod/context-db-migrations.js +339 -0
- package/lib-prod/create-context.js +152 -0
- package/lib-prod/decorators/classes/controller-decorator.js +21 -0
- package/lib-prod/decorators/classes/entity-decorator.js +49 -0
- package/lib-prod/decorators/classes/middleware-decorator.js +26 -0
- package/lib-prod/decorators/classes/migration-decorator.js +24 -0
- package/lib-prod/decorators/classes/provider-decorator.js +25 -0
- package/lib-prod/decorators/classes/repository-decorator.js +24 -0
- package/lib-prod/decorators/classes/subscriber-decorator.js +25 -0
- package/lib-prod/decorators/decorator-abstract-opt.js +5 -0
- package/lib-prod/decorators/http/http-decorators.js +5 -0
- package/lib-prod/decorators/http/http-methods-decorators.js +144 -0
- package/lib-prod/decorators/http/http-params-decorators.js +68 -0
- package/lib-prod/dependency-injection/di-container.js +31 -0
- package/lib-prod/endpoint-context-storage.js +36 -0
- package/lib-prod/endpoint-context.js +2033 -0
- package/lib-prod/entity-process.js +214 -0
- package/lib-prod/env/env.angular-node-app.js +130 -0
- package/lib-prod/env/env.docs-webapp.js +130 -0
- package/lib-prod/env/env.electron-app.js +130 -0
- package/lib-prod/env/env.mobile-app.js +130 -0
- package/lib-prod/env/env.npm-lib-and-cli-tool.js +130 -0
- package/lib-prod/env/env.vscode-plugin.js +130 -0
- package/lib-prod/env/index.js +6 -0
- package/lib-prod/express-types.js +0 -0
- package/lib-prod/formly/formly.models.js +0 -0
- package/lib-prod/formly/fromly.js +184 -0
- package/lib-prod/formly/type-from-entity.js +58 -0
- package/lib-prod/get-response-value.js +19 -0
- package/lib-prod/global-state/taon-global-state/index.js +5 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.js +20 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.constants.js +10 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js +48 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.entity.js +48 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.js +22 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.models.js +34 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.provider.js +22 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js +47 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.js +29 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js +11 -0
- package/lib-prod/global-state/taon-transaction-registry/index.js +10 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.js +22 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.js +8 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js +41 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.js +56 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.js +22 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.js +10 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.js +22 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.js +36 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.js +29 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js +6 -0
- package/lib-prod/helpers/class-helpers.js +195 -0
- package/lib-prod/helpers/clone-obj.js +21 -0
- package/lib-prod/helpers/taon-helpers.js +129 -0
- package/lib-prod/index._auto-generated_.js +0 -0
- package/lib-prod/index.js +231 -0
- package/lib-prod/inject.js +34 -0
- package/lib-prod/migrations/index.js +1 -0
- package/lib-prod/migrations/migrations_index._auto-generated_.js +0 -0
- package/lib-prod/models.js +109 -0
- package/lib-prod/orm/columns.js +124 -0
- package/lib-prod/orm/index.js +1 -0
- package/lib-prod/package.json +1 -1
- package/lib-prod/realtime/realtime-client.js +196 -0
- package/lib-prod/realtime/realtime-core.js +82 -0
- package/lib-prod/realtime/realtime-server.js +252 -0
- package/lib-prod/realtime/realtime-strategy/index.js +4 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js +226 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js +262 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.js +21 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy.js +14 -0
- package/lib-prod/realtime/realtime-subs-manager.js +96 -0
- package/lib-prod/realtime/realtime.models.js +0 -0
- package/lib-prod/symbols.js +109 -0
- package/lib-prod/ui/index.js +5 -0
- package/lib-prod/ui/taon-admin-mode-configuration/index.js +5 -0
- package/lib-prod/validators.js +74 -0
- package/package.json +1 -1
- package/websql/package.json +1 -1
- package/websql-prod/package.json +1 -1
- package/lib-prod/base-classes/base-abstract-entity.ts +0 -34
- package/lib-prod/base-classes/base-angular-service.ts +0 -107
- package/lib-prod/base-classes/base-class.ts +0 -46
- package/lib-prod/base-classes/base-context.ts +0 -21
- package/lib-prod/base-classes/base-controller.ts +0 -240
- package/lib-prod/base-classes/base-crud-controller.ts +0 -298
- package/lib-prod/base-classes/base-custom-repository.ts +0 -10
- package/lib-prod/base-classes/base-electron-service.ts +0 -60
- package/lib-prod/base-classes/base-entity.ts +0 -28
- package/lib-prod/base-classes/base-file-upload.middleware.ts +0 -92
- package/lib-prod/base-classes/base-injector.ts +0 -278
- package/lib-prod/base-classes/base-middleware.ts +0 -71
- package/lib-prod/base-classes/base-migration.ts +0 -26
- package/lib-prod/base-classes/base-provider.ts +0 -8
- package/lib-prod/base-classes/base-repository.ts +0 -942
- package/lib-prod/base-classes/base-subscriber-for-entity.ts +0 -196
- package/lib-prod/base-classes/base.ts +0 -31
- package/lib-prod/build-info._auto-generated_.ts +0 -27
- package/lib-prod/config/controller-config.ts +0 -58
- package/lib-prod/config/controller-options.ts +0 -19
- package/lib-prod/config/method-config.ts +0 -55
- package/lib-prod/config/param-config.ts +0 -16
- package/lib-prod/constants.ts +0 -63
- package/lib-prod/context-db-migrations.ts +0 -488
- package/lib-prod/create-context.ts +0 -345
- package/lib-prod/decorators/classes/controller-decorator.ts +0 -25
- package/lib-prod/decorators/classes/entity-decorator.ts +0 -57
- package/lib-prod/decorators/classes/middleware-decorator.ts +0 -29
- package/lib-prod/decorators/classes/migration-decorator.ts +0 -27
- package/lib-prod/decorators/classes/provider-decorator.ts +0 -28
- package/lib-prod/decorators/classes/repository-decorator.ts +0 -26
- package/lib-prod/decorators/classes/subscriber-decorator.ts +0 -28
- package/lib-prod/decorators/decorator-abstract-opt.ts +0 -4
- package/lib-prod/decorators/http/http-decorators.ts +0 -26
- package/lib-prod/decorators/http/http-methods-decorators.ts +0 -275
- package/lib-prod/decorators/http/http-params-decorators.ts +0 -105
- package/lib-prod/dependency-injection/di-container.ts +0 -39
- package/lib-prod/endpoint-context-storage.ts +0 -47
- package/lib-prod/endpoint-context.ts +0 -3110
- package/lib-prod/entity-process.ts +0 -286
- package/lib-prod/env/env.angular-node-app.ts +0 -66
- package/lib-prod/env/env.docs-webapp.ts +0 -66
- package/lib-prod/env/env.electron-app.ts +0 -66
- package/lib-prod/env/env.mobile-app.ts +0 -66
- package/lib-prod/env/env.npm-lib-and-cli-tool.ts +0 -66
- package/lib-prod/env/env.vscode-plugin.ts +0 -66
- package/lib-prod/env/index.ts +0 -6
- package/lib-prod/express-types.ts +0 -4
- package/lib-prod/formly/formly.models.ts +0 -7
- package/lib-prod/formly/fromly.ts +0 -261
- package/lib-prod/formly/type-from-entity.ts +0 -80
- package/lib-prod/get-response-value.ts +0 -30
- package/lib-prod/global-state/taon-global-state/index.ts +0 -6
- package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.ts +0 -21
- package/lib-prod/global-state/taon-global-state/taon-global-state.constants.ts +0 -9
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.ts +0 -44
- package/lib-prod/global-state/taon-global-state/taon-global-state.entity.ts +0 -40
- package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.ts +0 -12
- package/lib-prod/global-state/taon-global-state/taon-global-state.models.ts +0 -48
- package/lib-prod/global-state/taon-global-state/taon-global-state.provider.ts +0 -16
- package/lib-prod/global-state/taon-global-state/taon-global-state.repository.ts +0 -47
- package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.ts +0 -18
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.ts +0 -21
- package/lib-prod/global-state/taon-transaction-registry/index.ts +0 -11
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.ts +0 -23
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.ts +0 -7
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.ts +0 -38
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.ts +0 -54
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.ts +0 -12
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.ts +0 -6
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.ts +0 -16
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.ts +0 -29
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.ts +0 -20
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.ts +0 -9
- package/lib-prod/helpers/class-helpers.ts +0 -315
- package/lib-prod/helpers/clone-obj.ts +0 -24
- package/lib-prod/helpers/taon-helpers.ts +0 -181
- package/lib-prod/index._auto-generated_.ts +0 -5
- package/lib-prod/index.ts +0 -323
- package/lib-prod/inject.ts +0 -111
- package/lib-prod/lib-info.md +0 -8
- package/lib-prod/migrations/index.ts +0 -2
- package/lib-prod/migrations/migrations-info.md +0 -6
- package/lib-prod/migrations/migrations_index._auto-generated_.ts +0 -5
- package/lib-prod/models.ts +0 -427
- package/lib-prod/orm/columns.ts +0 -121
- package/lib-prod/orm/index.ts +0 -62
- package/lib-prod/realtime/realtime-client.ts +0 -288
- package/lib-prod/realtime/realtime-core.ts +0 -134
- package/lib-prod/realtime/realtime-server.ts +0 -398
- package/lib-prod/realtime/realtime-strategy/index.ts +0 -4
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.ts +0 -344
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.ts +0 -349
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.ts +0 -30
- package/lib-prod/realtime/realtime-strategy/realtime-strategy.ts +0 -21
- package/lib-prod/realtime/realtime-subs-manager.ts +0 -127
- package/lib-prod/realtime/realtime.models.ts +0 -33
- package/lib-prod/symbols.ts +0 -136
- package/lib-prod/ui/index.ts +0 -1
- package/lib-prod/ui/taon-admin-mode-configuration/index.ts +0 -1
- package/lib-prod/validators.ts +0 -103
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createContext } from "../../create-context";
|
|
2
|
+
import { TAON_GLOBAL_STATE } from "./taon-global-state.entity";
|
|
3
|
+
import { TaonGlobalStateController } from "./taon-global-state.controller";
|
|
4
|
+
import { TaonGlobalStateRepository } from "./taon-global-state.repository";
|
|
5
|
+
import { TaonGlobalStateProvider } from "./taon-global-state.provider";
|
|
6
|
+
import { TaonGlobalStateMiddleware } from "./taon-global-state.middleware";
|
|
7
|
+
import { TaonGlobalStateSubscriber } from "./taon-global-state.subscriber";
|
|
8
|
+
const TaonGlobalStateContext = createContext(() => ({
|
|
9
|
+
contextName: "TaonGlobalStateContext",
|
|
10
|
+
abstract: true,
|
|
11
|
+
entities: { TAON_GLOBAL_STATE },
|
|
12
|
+
controllers: { TaonGlobalStateController },
|
|
13
|
+
repositories: { TaonGlobalStateRepository },
|
|
14
|
+
providers: { TaonGlobalStateProvider },
|
|
15
|
+
middlewares: { TaonGlobalStateMiddleware },
|
|
16
|
+
subscribers: { TaonGlobalStateSubscriber }
|
|
17
|
+
}));
|
|
18
|
+
export {
|
|
19
|
+
TaonGlobalStateContext
|
|
20
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
|
|
12
|
+
import { TaonController } from "../../decorators/classes/controller-decorator";
|
|
13
|
+
import { TaonBaseCrudController } from "../../base-classes/base-crud-controller";
|
|
14
|
+
import { Query } from "../../decorators/http/http-params-decorators";
|
|
15
|
+
import { GET } from "../../decorators/http/http-methods-decorators";
|
|
16
|
+
import { POST } from "../../decorators/http/http-methods-decorators";
|
|
17
|
+
import { TAON_GLOBAL_STATE } from "./taon-global-state.entity";
|
|
18
|
+
import { TaonGlobalStateRepository } from "./taon-global-state.repository";
|
|
19
|
+
let TaonGlobalStateController = class extends TaonBaseCrudController {
|
|
20
|
+
entityClassResolveFn = () => TAON_GLOBAL_STATE;
|
|
21
|
+
taonGlobalStateRepository = this.injectCustomRepo(TaonGlobalStateRepository);
|
|
22
|
+
getStatus() {
|
|
23
|
+
return async () => {
|
|
24
|
+
const stateEntity = await this.taonGlobalStateRepository.getLastStatus();
|
|
25
|
+
return stateEntity.status;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
setDraining(secondsBeforeReadonly = 0) {
|
|
29
|
+
return async () => {
|
|
30
|
+
await this.taonGlobalStateRepository.setDraining(secondsBeforeReadonly);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
__decorateClass([
|
|
35
|
+
GET()
|
|
36
|
+
], TaonGlobalStateController.prototype, "getStatus", 1);
|
|
37
|
+
__decorateClass([
|
|
38
|
+
POST(),
|
|
39
|
+
__decorateParam(0, Query("secondsBeforeReadonly"))
|
|
40
|
+
], TaonGlobalStateController.prototype, "setDraining", 1);
|
|
41
|
+
TaonGlobalStateController = __decorateClass([
|
|
42
|
+
TaonController({
|
|
43
|
+
className: "TaonGlobalStateController"
|
|
44
|
+
})
|
|
45
|
+
], TaonGlobalStateController);
|
|
46
|
+
export {
|
|
47
|
+
TaonGlobalStateController
|
|
48
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
import { CreateDateColumn, CustomColumn } from "../../orm/columns";
|
|
12
|
+
import { TaonGlobalStateDefaultsValues } from "./taon-global-state.constants";
|
|
13
|
+
import { TaonBaseAbstractEntity } from "../../base-classes/base-abstract-entity";
|
|
14
|
+
import { TaonEntity } from "../../decorators/classes/entity-decorator";
|
|
15
|
+
let TAON_GLOBAL_STATE = class extends TaonBaseAbstractEntity {
|
|
16
|
+
//#endregion
|
|
17
|
+
status;
|
|
18
|
+
//#endregion
|
|
19
|
+
createdAt;
|
|
20
|
+
//#endregion
|
|
21
|
+
secondsBeforeReadonly;
|
|
22
|
+
};
|
|
23
|
+
__decorateClass([
|
|
24
|
+
CustomColumn({
|
|
25
|
+
type: "varchar",
|
|
26
|
+
length: 20,
|
|
27
|
+
nullable: false,
|
|
28
|
+
default: TaonGlobalStateDefaultsValues.status
|
|
29
|
+
})
|
|
30
|
+
], TAON_GLOBAL_STATE.prototype, "status", 2);
|
|
31
|
+
__decorateClass([
|
|
32
|
+
CreateDateColumn()
|
|
33
|
+
], TAON_GLOBAL_STATE.prototype, "createdAt", 2);
|
|
34
|
+
__decorateClass([
|
|
35
|
+
CustomColumn({
|
|
36
|
+
type: "int",
|
|
37
|
+
nullable: true
|
|
38
|
+
})
|
|
39
|
+
], TAON_GLOBAL_STATE.prototype, "secondsBeforeReadonly", 2);
|
|
40
|
+
TAON_GLOBAL_STATE = __decorateClass([
|
|
41
|
+
TaonEntity({
|
|
42
|
+
className: "TAON_GLOBAL_STATE",
|
|
43
|
+
createTable: true
|
|
44
|
+
})
|
|
45
|
+
], TAON_GLOBAL_STATE);
|
|
46
|
+
export {
|
|
47
|
+
TAON_GLOBAL_STATE
|
|
48
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
import { TaonBaseMiddleware } from "../../base-classes/base-middleware";
|
|
12
|
+
import { TaonMiddleware } from "../../decorators/classes/middleware-decorator";
|
|
13
|
+
let TaonGlobalStateMiddleware = class extends TaonBaseMiddleware {
|
|
14
|
+
};
|
|
15
|
+
TaonGlobalStateMiddleware = __decorateClass([
|
|
16
|
+
TaonMiddleware({
|
|
17
|
+
className: "TaonGlobalStateMiddleware"
|
|
18
|
+
})
|
|
19
|
+
], TaonGlobalStateMiddleware);
|
|
20
|
+
export {
|
|
21
|
+
TaonGlobalStateMiddleware
|
|
22
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var TaonGlobalStateStatus = /* @__PURE__ */ ((TaonGlobalStateStatus2) => {
|
|
2
|
+
TaonGlobalStateStatus2["NORMAL"] = "normal";
|
|
3
|
+
TaonGlobalStateStatus2["DRAINING"] = "draining";
|
|
4
|
+
TaonGlobalStateStatus2["READONLY"] = "readonly";
|
|
5
|
+
TaonGlobalStateStatus2["MIGRATING"] = "migrating";
|
|
6
|
+
TaonGlobalStateStatus2["FROZEN"] = "frozen";
|
|
7
|
+
return TaonGlobalStateStatus2;
|
|
8
|
+
})(TaonGlobalStateStatus || {});
|
|
9
|
+
const allowedTaonGlobalStatusOrders = {
|
|
10
|
+
["normal" /* NORMAL */]: [
|
|
11
|
+
"draining" /* DRAINING */,
|
|
12
|
+
"frozen" /* FROZEN */
|
|
13
|
+
],
|
|
14
|
+
["draining" /* DRAINING */]: [
|
|
15
|
+
"readonly" /* READONLY */,
|
|
16
|
+
"frozen" /* FROZEN */
|
|
17
|
+
],
|
|
18
|
+
["readonly" /* READONLY */]: [
|
|
19
|
+
"migrating" /* MIGRATING */,
|
|
20
|
+
"normal" /* NORMAL */,
|
|
21
|
+
"frozen" /* FROZEN */
|
|
22
|
+
],
|
|
23
|
+
["migrating" /* MIGRATING */]: [
|
|
24
|
+
"readonly" /* READONLY */
|
|
25
|
+
],
|
|
26
|
+
["frozen" /* FROZEN */]: [
|
|
27
|
+
"readonly" /* READONLY */,
|
|
28
|
+
"normal" /* NORMAL */
|
|
29
|
+
]
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
TaonGlobalStateStatus,
|
|
33
|
+
allowedTaonGlobalStatusOrders
|
|
34
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
import { TaonBaseProvider } from "../../base-classes/base-provider";
|
|
12
|
+
import { TaonProvider } from "../../decorators/classes/provider-decorator";
|
|
13
|
+
let TaonGlobalStateProvider = class extends TaonBaseProvider {
|
|
14
|
+
};
|
|
15
|
+
TaonGlobalStateProvider = __decorateClass([
|
|
16
|
+
TaonProvider({
|
|
17
|
+
className: "TaonGlobalStateProvider"
|
|
18
|
+
})
|
|
19
|
+
], TaonGlobalStateProvider);
|
|
20
|
+
export {
|
|
21
|
+
TaonGlobalStateProvider
|
|
22
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
import { TaonBaseRepository } from "../../base-classes/base-repository";
|
|
12
|
+
import { TaonRepository } from "../../decorators/classes/repository-decorator";
|
|
13
|
+
import { TAON_GLOBAL_STATE } from "./taon-global-state.entity";
|
|
14
|
+
import { TaonGlobalStateStatus } from "./taon-global-state.models";
|
|
15
|
+
import { TaonGlobalStateUtils__NS__assertAllowedTransition } from "./taon-global-state.utils";
|
|
16
|
+
let TaonGlobalStateRepository = class extends TaonBaseRepository {
|
|
17
|
+
entityClassResolveFn = () => TAON_GLOBAL_STATE;
|
|
18
|
+
async getLastStatus() {
|
|
19
|
+
const lastStatus = await this.findOne({
|
|
20
|
+
order: { createdAt: "DESC" }
|
|
21
|
+
});
|
|
22
|
+
return lastStatus;
|
|
23
|
+
}
|
|
24
|
+
async setDraining(secondsBeforeReadonly = 0) {
|
|
25
|
+
await this.transitionTo(TaonGlobalStateStatus.DRAINING);
|
|
26
|
+
if (secondsBeforeReadonly > 0) {
|
|
27
|
+
setTimeout(async () => {
|
|
28
|
+
await this.transitionTo(TaonGlobalStateStatus.READONLY);
|
|
29
|
+
}, secondsBeforeReadonly);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
async transitionTo(next) {
|
|
33
|
+
const current = await this.getLastStatus();
|
|
34
|
+
TaonGlobalStateUtils__NS__assertAllowedTransition(current.status, next);
|
|
35
|
+
const newState = this.create({ status: next });
|
|
36
|
+
await this.save(newState);
|
|
37
|
+
return newState;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
TaonGlobalStateRepository = __decorateClass([
|
|
41
|
+
TaonRepository({
|
|
42
|
+
className: "TaonGlobalStateRepository"
|
|
43
|
+
})
|
|
44
|
+
], TaonGlobalStateRepository);
|
|
45
|
+
export {
|
|
46
|
+
TaonGlobalStateRepository
|
|
47
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
import { TaonBaseSubscriberForEntity } from "../../base-classes/base-subscriber-for-entity";
|
|
12
|
+
import { TaonSubscriber } from "../../decorators/classes/subscriber-decorator";
|
|
13
|
+
import { TAON_GLOBAL_STATE } from "./taon-global-state.entity";
|
|
14
|
+
import { TaonGlobalStateProvider } from "./taon-global-state.provider";
|
|
15
|
+
let TaonGlobalStateSubscriber = class extends TaonBaseSubscriberForEntity {
|
|
16
|
+
taonGlobalStateProvider = this.injectProvider(TaonGlobalStateProvider);
|
|
17
|
+
listenTo() {
|
|
18
|
+
return TAON_GLOBAL_STATE;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
TaonGlobalStateSubscriber = __decorateClass([
|
|
22
|
+
TaonSubscriber({
|
|
23
|
+
className: "TaonGlobalStateSubscriber"
|
|
24
|
+
// allowedEvents: ['afterUpdate'],
|
|
25
|
+
})
|
|
26
|
+
], TaonGlobalStateSubscriber);
|
|
27
|
+
export {
|
|
28
|
+
TaonGlobalStateSubscriber
|
|
29
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
allowedTaonGlobalStatusOrders
|
|
3
|
+
} from "./taon-global-state.models";
|
|
4
|
+
const TaonGlobalStateUtils__NS__assertAllowedTransition = (from, to) => {
|
|
5
|
+
if (!allowedTaonGlobalStatusOrders[from]?.includes(to)) {
|
|
6
|
+
throw new Error(`Invalid state transition: ${from} \u2192 ${to}`);
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
TaonGlobalStateUtils__NS__assertAllowedTransition
|
|
11
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./taon-transaction-registry.abstract.context";
|
|
2
|
+
export * from "./taon-transaction-registry.constants";
|
|
3
|
+
export * from "./taon-transaction-registry.controller";
|
|
4
|
+
export * from "./taon-transaction-registry.entity";
|
|
5
|
+
export * from "./taon-transaction-registry.middleware";
|
|
6
|
+
export * from "./taon-transaction-registry.models";
|
|
7
|
+
export * from "./taon-transaction-registry.provider";
|
|
8
|
+
export * from "./taon-transaction-registry.repository";
|
|
9
|
+
export * from "./taon-transaction-registry.subscriber";
|
|
10
|
+
export * from "./taon-transaction-registry.utils";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TaonBaseContext } from "../../base-classes/base-context";
|
|
2
|
+
import { createContext } from "../../create-context";
|
|
3
|
+
import { TaonTransactionRegistryController } from "./taon-transaction-registry.controller";
|
|
4
|
+
import { TAON_TANSACTION_REGISTRY } from "./taon-transaction-registry.entity";
|
|
5
|
+
import { TaonTransactionRegistryMiddleware } from "./taon-transaction-registry.middleware";
|
|
6
|
+
import { TaonTransactionRegistryProvider } from "./taon-transaction-registry.provider";
|
|
7
|
+
import { TaonTransactionRegistryRepository } from "./taon-transaction-registry.repository";
|
|
8
|
+
import { TaonTransactionRegistrySubscriber } from "./taon-transaction-registry.subscriber";
|
|
9
|
+
const TaonTransactionRegistryContext = createContext(() => ({
|
|
10
|
+
contextName: "TaonTransactionRegistryContext",
|
|
11
|
+
abstract: true,
|
|
12
|
+
contexts: { TaonBaseContext },
|
|
13
|
+
entities: { TAON_TANSACTION_REGISTRY },
|
|
14
|
+
controllers: { TaonTransactionRegistryController },
|
|
15
|
+
repositories: { TaonTransactionRegistryRepository },
|
|
16
|
+
providers: { TaonTransactionRegistryProvider },
|
|
17
|
+
middlewares: { TaonTransactionRegistryMiddleware },
|
|
18
|
+
subscribers: { TaonTransactionRegistrySubscriber }
|
|
19
|
+
}));
|
|
20
|
+
export {
|
|
21
|
+
TaonTransactionRegistryContext
|
|
22
|
+
};
|
package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
|
|
12
|
+
import { TaonController } from "../../decorators/classes/controller-decorator";
|
|
13
|
+
import { TaonBaseCrudController } from "../../base-classes/base-crud-controller";
|
|
14
|
+
import { Query } from "../../decorators/http/http-params-decorators";
|
|
15
|
+
import { POST } from "../../decorators/http/http-methods-decorators";
|
|
16
|
+
import { TAON_TANSACTION_REGISTRY } from "./taon-transaction-registry.entity";
|
|
17
|
+
import { TaonTransactionRegistryRepository } from "./taon-transaction-registry.repository";
|
|
18
|
+
let TaonTransactionRegistryController = class extends TaonBaseCrudController {
|
|
19
|
+
entityClassResolveFn = () => TAON_TANSACTION_REGISTRY;
|
|
20
|
+
taonTransactionRegistryRepository = this.injectCustomRepo(
|
|
21
|
+
TaonTransactionRegistryRepository
|
|
22
|
+
);
|
|
23
|
+
startTransaction(yourName) {
|
|
24
|
+
return async (req, res) => {
|
|
25
|
+
return void 0;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
};
|
|
30
|
+
__decorateClass([
|
|
31
|
+
POST(),
|
|
32
|
+
__decorateParam(0, Query("serviceName"))
|
|
33
|
+
], TaonTransactionRegistryController.prototype, "startTransaction", 1);
|
|
34
|
+
TaonTransactionRegistryController = __decorateClass([
|
|
35
|
+
TaonController({
|
|
36
|
+
className: "TaonTransactionRegistryController"
|
|
37
|
+
})
|
|
38
|
+
], TaonTransactionRegistryController);
|
|
39
|
+
export {
|
|
40
|
+
TaonTransactionRegistryController
|
|
41
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
import {
|
|
12
|
+
CreateDateColumn,
|
|
13
|
+
NumberColumn,
|
|
14
|
+
String100Column,
|
|
15
|
+
String20Column
|
|
16
|
+
} from "../../orm/columns";
|
|
17
|
+
import { DateTimeColumn } from "../../orm/columns";
|
|
18
|
+
import { TaonBaseAbstractEntity } from "../../base-classes/base-abstract-entity";
|
|
19
|
+
import { TaonEntity } from "../../decorators/classes/entity-decorator";
|
|
20
|
+
import { TaonTransactionRegistryState } from "./taon-transaction-registry.models";
|
|
21
|
+
let TAON_TANSACTION_REGISTRY = class extends TaonBaseAbstractEntity {
|
|
22
|
+
//#endregion
|
|
23
|
+
workerIndex;
|
|
24
|
+
//#endregion
|
|
25
|
+
contextName;
|
|
26
|
+
//#endregion
|
|
27
|
+
startedAt;
|
|
28
|
+
//#endregion
|
|
29
|
+
finishedAt;
|
|
30
|
+
//#endregion
|
|
31
|
+
state;
|
|
32
|
+
};
|
|
33
|
+
__decorateClass([
|
|
34
|
+
NumberColumn()
|
|
35
|
+
], TAON_TANSACTION_REGISTRY.prototype, "workerIndex", 2);
|
|
36
|
+
__decorateClass([
|
|
37
|
+
String100Column()
|
|
38
|
+
], TAON_TANSACTION_REGISTRY.prototype, "contextName", 2);
|
|
39
|
+
__decorateClass([
|
|
40
|
+
CreateDateColumn()
|
|
41
|
+
], TAON_TANSACTION_REGISTRY.prototype, "startedAt", 2);
|
|
42
|
+
__decorateClass([
|
|
43
|
+
DateTimeColumn()
|
|
44
|
+
], TAON_TANSACTION_REGISTRY.prototype, "finishedAt", 2);
|
|
45
|
+
__decorateClass([
|
|
46
|
+
String20Column(TaonTransactionRegistryState.RUNNING)
|
|
47
|
+
], TAON_TANSACTION_REGISTRY.prototype, "state", 2);
|
|
48
|
+
TAON_TANSACTION_REGISTRY = __decorateClass([
|
|
49
|
+
TaonEntity({
|
|
50
|
+
className: "TAON_TANSACTION_REGISTRY",
|
|
51
|
+
createTable: true
|
|
52
|
+
})
|
|
53
|
+
], TAON_TANSACTION_REGISTRY);
|
|
54
|
+
export {
|
|
55
|
+
TAON_TANSACTION_REGISTRY
|
|
56
|
+
};
|
package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
import { TaonBaseMiddleware } from "../../base-classes/base-middleware";
|
|
12
|
+
import { TaonMiddleware } from "../../decorators/classes/middleware-decorator";
|
|
13
|
+
let TaonTransactionRegistryMiddleware = class extends TaonBaseMiddleware {
|
|
14
|
+
};
|
|
15
|
+
TaonTransactionRegistryMiddleware = __decorateClass([
|
|
16
|
+
TaonMiddleware({
|
|
17
|
+
className: "TaonTransactionRegistryMiddleware"
|
|
18
|
+
})
|
|
19
|
+
], TaonTransactionRegistryMiddleware);
|
|
20
|
+
export {
|
|
21
|
+
TaonTransactionRegistryMiddleware
|
|
22
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var TaonTransactionRegistryState = /* @__PURE__ */ ((TaonTransactionRegistryState2) => {
|
|
2
|
+
TaonTransactionRegistryState2["RUNNING"] = "running";
|
|
3
|
+
TaonTransactionRegistryState2["COMMITTED"] = "committed";
|
|
4
|
+
TaonTransactionRegistryState2["ROLLED_BACK"] = "rolled_back";
|
|
5
|
+
TaonTransactionRegistryState2["ABANDONED"] = "abandoned";
|
|
6
|
+
return TaonTransactionRegistryState2;
|
|
7
|
+
})(TaonTransactionRegistryState || {});
|
|
8
|
+
export {
|
|
9
|
+
TaonTransactionRegistryState
|
|
10
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
import { TaonBaseProvider } from "../../base-classes/base-provider";
|
|
12
|
+
import { TaonProvider } from "../../decorators/classes/provider-decorator";
|
|
13
|
+
let TaonTransactionRegistryProvider = class extends TaonBaseProvider {
|
|
14
|
+
};
|
|
15
|
+
TaonTransactionRegistryProvider = __decorateClass([
|
|
16
|
+
TaonProvider({
|
|
17
|
+
className: "TaonTransactionRegistryProvider"
|
|
18
|
+
})
|
|
19
|
+
], TaonTransactionRegistryProvider);
|
|
20
|
+
export {
|
|
21
|
+
TaonTransactionRegistryProvider
|
|
22
|
+
};
|
package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
import { TaonBaseRepository } from "../../base-classes/base-repository";
|
|
12
|
+
import { TaonRepository } from "../../decorators/classes/repository-decorator";
|
|
13
|
+
import { Raw } from "taon-typeorm/lib-prod";
|
|
14
|
+
import { TAON_TANSACTION_REGISTRY } from "./taon-transaction-registry.entity";
|
|
15
|
+
let TaonTransactionRegistryRepository = class extends TaonBaseRepository {
|
|
16
|
+
entityClassResolveFn = () => TAON_TANSACTION_REGISTRY;
|
|
17
|
+
/**
|
|
18
|
+
* TODO remove this demo example method
|
|
19
|
+
*/
|
|
20
|
+
async countEntitesWithEvenId() {
|
|
21
|
+
const result = await this.count({
|
|
22
|
+
where: {
|
|
23
|
+
id: Raw((alias) => `${alias} % 2 = 0`)
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
TaonTransactionRegistryRepository = __decorateClass([
|
|
30
|
+
TaonRepository({
|
|
31
|
+
className: "TaonTransactionRegistryRepository"
|
|
32
|
+
})
|
|
33
|
+
], TaonTransactionRegistryRepository);
|
|
34
|
+
export {
|
|
35
|
+
TaonTransactionRegistryRepository
|
|
36
|
+
};
|
package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
import { TaonBaseSubscriberForEntity } from "../../base-classes/base-subscriber-for-entity";
|
|
12
|
+
import { TaonSubscriber } from "../../decorators/classes/subscriber-decorator";
|
|
13
|
+
import { TAON_TANSACTION_REGISTRY } from "./taon-transaction-registry.entity";
|
|
14
|
+
import { TaonTransactionRegistryProvider } from "./taon-transaction-registry.provider";
|
|
15
|
+
let TaonTransactionRegistrySubscriber = class extends TaonBaseSubscriberForEntity {
|
|
16
|
+
taonTransactionRegistryProvider = this.injectProvider(TaonTransactionRegistryProvider);
|
|
17
|
+
listenTo() {
|
|
18
|
+
return TAON_TANSACTION_REGISTRY;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
TaonTransactionRegistrySubscriber = __decorateClass([
|
|
22
|
+
TaonSubscriber({
|
|
23
|
+
className: "TaonTransactionRegistrySubscriber"
|
|
24
|
+
// allowedEvents: ['afterUpdate'],
|
|
25
|
+
})
|
|
26
|
+
], TaonTransactionRegistrySubscriber);
|
|
27
|
+
export {
|
|
28
|
+
TaonTransactionRegistrySubscriber
|
|
29
|
+
};
|