taon 21.0.53 → 21.0.54
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/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 +17 -31
- package/lib-prod/base-classes/base-angular-service.js +83 -55
- package/lib-prod/base-classes/base-class.js +33 -35
- package/lib-prod/base-classes/base-context.js +17 -19
- package/lib-prod/base-classes/base-controller.js +146 -154
- package/lib-prod/base-classes/base-crud-controller.js +250 -221
- package/lib-prod/base-classes/base-custom-repository.js +7 -18
- package/lib-prod/base-classes/base-electron-service.js +49 -0
- package/lib-prod/base-classes/base-entity.js +20 -30
- package/lib-prod/base-classes/base-file-upload.middleware.js +72 -75
- package/lib-prod/base-classes/base-injector.js +176 -194
- package/lib-prod/base-classes/base-middleware.js +8 -5
- package/lib-prod/base-classes/base-migration.js +19 -22
- package/lib-prod/base-classes/base-provider.js +7 -5
- package/lib-prod/base-classes/base-repository.js +601 -573
- package/lib-prod/base-classes/base-subscriber-for-entity.js +143 -152
- package/lib-prod/base-classes/base.js +18 -0
- package/lib-prod/build-info._auto-generated_.js +26 -14
- package/lib-prod/config/controller-config.js +24 -24
- package/lib-prod/config/controller-options.js +2 -5
- package/lib-prod/config/method-config.js +6 -8
- package/lib-prod/config/param-config.js +2 -8
- package/lib-prod/constants.js +29 -25
- package/lib-prod/context-db-migrations.js +327 -324
- package/lib-prod/create-context.js +211 -146
- package/lib-prod/decorators/classes/controller-decorator.js +16 -20
- package/lib-prod/decorators/classes/entity-decorator.js +26 -47
- package/lib-prod/decorators/classes/middleware-decorator.js +14 -24
- package/lib-prod/decorators/classes/migration-decorator.js +13 -22
- package/lib-prod/decorators/classes/provider-decorator.js +13 -23
- package/lib-prod/decorators/classes/repository-decorator.js +13 -22
- package/lib-prod/decorators/classes/subscriber-decorator.js +13 -23
- package/lib-prod/decorators/decorator-abstract-opt.js +1 -4
- package/lib-prod/decorators/http/http-decorators.js +20 -5
- package/lib-prod/decorators/http/http-methods-decorators.js +91 -133
- package/lib-prod/decorators/http/http-params-decorators.js +36 -62
- package/lib-prod/dependency-injection/di-container.js +28 -29
- package/lib-prod/endpoint-context-storage.js +27 -32
- package/lib-prod/endpoint-context.js +2294 -1930
- package/lib-prod/entity-process.js +209 -198
- package/lib-prod/env/env.angular-node-app.js +66 -130
- package/lib-prod/env/env.docs-webapp.js +66 -130
- package/lib-prod/env/env.electron-app.js +66 -130
- package/lib-prod/env/env.mobile-app.js +66 -130
- package/lib-prod/env/env.npm-lib-and-cli-tool.js +66 -130
- package/lib-prod/env/env.vscode-plugin.js +66 -130
- package/lib-prod/env/index.js +6 -6
- package/lib-prod/express-types.js +1 -0
- package/lib-prod/formly/formly.models.js +1 -0
- package/lib-prod/formly/fromly.js +196 -175
- package/lib-prod/formly/type-from-entity.js +45 -52
- package/lib-prod/get-response-value.js +21 -18
- package/lib-prod/global-state/taon-global-state/index.js +6 -5
- package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.js +18 -19
- package/lib-prod/global-state/taon-global-state/taon-global-state.constants.js +6 -9
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js +40 -46
- package/lib-prod/global-state/taon-global-state/taon-global-state.entity.js +33 -46
- package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.js +10 -20
- package/lib-prod/global-state/taon-global-state/taon-global-state.models.js +43 -33
- package/lib-prod/global-state/taon-global-state/taon-global-state.provider.js +10 -20
- package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js +43 -44
- package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.js +20 -27
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js +10 -10
- package/lib-prod/global-state/taon-transaction-registry/index.js +11 -10
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.js +20 -21
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.js +4 -7
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js +34 -39
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.js +34 -54
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.js +10 -20
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.js +7 -10
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.js +10 -20
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.js +29 -34
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.js +20 -27
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js +4 -5
- package/lib-prod/helpers/class-helpers.js +210 -177
- package/lib-prod/helpers/clone-obj.js +16 -20
- package/lib-prod/helpers/taon-helpers.js +132 -114
- package/lib-prod/index._auto-generated_.js +5 -0
- package/lib-prod/index.js +248 -227
- package/lib-prod/inject.js +88 -33
- package/lib-prod/migrations/index.js +2 -1
- package/lib-prod/migrations/migrations_index._auto-generated_.js +3 -0
- package/lib-prod/models.js +72 -103
- package/lib-prod/orm/columns.js +58 -118
- package/lib-prod/orm/index.js +56 -1
- package/lib-prod/package.json +1 -1
- package/lib-prod/realtime/realtime-client.js +188 -186
- package/lib-prod/realtime/realtime-core.js +77 -78
- package/lib-prod/realtime/realtime-server.js +225 -240
- package/lib-prod/realtime/realtime-strategy/index.js +4 -4
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js +273 -219
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js +267 -240
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.js +26 -20
- package/lib-prod/realtime/realtime-strategy/realtime-strategy.js +10 -13
- package/lib-prod/realtime/realtime-subs-manager.js +82 -90
- package/lib-prod/realtime/realtime.models.js +2 -0
- package/lib-prod/symbols.js +104 -105
- package/lib-prod/ui/index.js +1 -5
- package/lib-prod/ui/taon-admin-mode-configuration/index.js +1 -5
- package/lib-prod/validators.js +43 -37
- package/lib-prod.split-namespaces.json +31 -91
- package/package.json +1 -1
- package/websql/package.json +1 -1
- package/websql-prod/package.json +1 -1
|
@@ -1,154 +1,145 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { TaonBaseInjector } from './base-injector';
|
|
2
|
+
import { TaonSubscriber } from '../decorators/classes/subscriber-decorator';
|
|
3
|
+
let TaonBaseSubscriberForEntity = class TaonBaseSubscriberForEntity extends TaonBaseInjector {
|
|
4
|
+
/**
|
|
5
|
+
* Called after entity is loaded.
|
|
6
|
+
*/
|
|
7
|
+
afterLoad(entity) {
|
|
8
|
+
this.ctx.logDb &&
|
|
9
|
+
console.log(`AFTER ENTITY LOADED: `, entity);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Called before query execution.
|
|
13
|
+
*/
|
|
14
|
+
beforeQuery(event) {
|
|
15
|
+
// BeforeQueryEvent<any>
|
|
16
|
+
this.ctx.logDb &&
|
|
17
|
+
console.log(`BEFORE QUERY: `, event.query);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Called after query execution.
|
|
21
|
+
*/
|
|
22
|
+
afterQuery(event) {
|
|
23
|
+
// AfterQueryEvent<any>
|
|
24
|
+
this.ctx.logDb &&
|
|
25
|
+
console.log(`AFTER QUERY: `, event.query);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Called before entity insertion.
|
|
29
|
+
*/
|
|
30
|
+
beforeInsert(event) {
|
|
31
|
+
this.ctx.logDb &&
|
|
32
|
+
console.log(`BEFORE ENTITY INSERTED: `, event.entity);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Called after entity insertion.
|
|
36
|
+
*/
|
|
37
|
+
afterInsert(event) {
|
|
38
|
+
this.ctx.logDb &&
|
|
39
|
+
console.log(`AFTER ENTITY INSERTED: `, event.entity);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Called before entity update.
|
|
43
|
+
*/
|
|
44
|
+
beforeUpdate(event) {
|
|
45
|
+
this.ctx.logDb &&
|
|
46
|
+
console.log(`BEFORE ENTITY UPDATED: `, event.entity);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Called after entity update.
|
|
50
|
+
*/
|
|
51
|
+
afterUpdate(event) {
|
|
52
|
+
this.ctx.logDb &&
|
|
53
|
+
console.log(`AFTER ENTITY UPDATED: `, event.entity);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Called before entity removal.
|
|
57
|
+
*/
|
|
58
|
+
beforeRemove(event) {
|
|
59
|
+
this.ctx.logDb &&
|
|
60
|
+
console.log(`BEFORE ENTITY WITH ID ${event.entityId} REMOVED: `, event.entity);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Called after entity removal.
|
|
64
|
+
*/
|
|
65
|
+
afterRemove(event) {
|
|
66
|
+
this.ctx.logDb &&
|
|
67
|
+
console.log(`AFTER ENTITY WITH ID ${event.entityId} REMOVED: `, event.entity);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Called before entity removal.
|
|
71
|
+
*/
|
|
72
|
+
beforeSoftRemove(event) {
|
|
73
|
+
this.ctx.logDb &&
|
|
74
|
+
console.log(`BEFORE ENTITY WITH ID ${event.entityId} SOFT REMOVED: `, event.entity);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Called after entity removal.
|
|
78
|
+
*/
|
|
79
|
+
afterSoftRemove(event) {
|
|
80
|
+
this.ctx.logDb &&
|
|
81
|
+
console.log(`AFTER ENTITY WITH ID ${event.entityId} SOFT REMOVED: `, event.entity);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Called before entity recovery.
|
|
85
|
+
*/
|
|
86
|
+
beforeRecover(event) {
|
|
87
|
+
this.ctx.logDb &&
|
|
88
|
+
console.log(`BEFORE ENTITY WITH ID ${event.entityId} RECOVERED: `, event.entity);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Called after entity recovery.
|
|
92
|
+
*/
|
|
93
|
+
afterRecover(event) {
|
|
94
|
+
this.ctx.logDb &&
|
|
95
|
+
console.log(`AFTER ENTITY WITH ID ${event.entityId} RECOVERED: `, event.entity);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Called before transaction start.
|
|
99
|
+
*/
|
|
100
|
+
beforeTransactionStart(event) {
|
|
101
|
+
this.ctx.logDb &&
|
|
102
|
+
console.log(`BEFORE TRANSACTION STARTED: `, event);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Called after transaction start.
|
|
106
|
+
*/
|
|
107
|
+
afterTransactionStart(event) {
|
|
108
|
+
this.ctx.logDb &&
|
|
109
|
+
console.log(`AFTER TRANSACTION STARTED: `, event);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Called before transaction commit.
|
|
113
|
+
*/
|
|
114
|
+
beforeTransactionCommit(event) {
|
|
115
|
+
this.ctx.logDb &&
|
|
116
|
+
console.log(`BEFORE TRANSACTION COMMITTED: `, event);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Called after transaction commit.
|
|
120
|
+
*/
|
|
121
|
+
afterTransactionCommit(event) {
|
|
122
|
+
this.ctx.logDb &&
|
|
123
|
+
console.log(`AFTER TRANSACTION COMMITTED: `, event);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Called before transaction rollback.
|
|
127
|
+
*/
|
|
128
|
+
beforeTransactionRollback(event) {
|
|
129
|
+
this.ctx.logDb &&
|
|
130
|
+
console.log(`BEFORE TRANSACTION ROLLBACK: `, event);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Called after transaction rollback.
|
|
134
|
+
*/
|
|
135
|
+
afterTransactionRollback(event) {
|
|
136
|
+
this.ctx.logDb &&
|
|
137
|
+
console.log(`AFTER TRANSACTION ROLLBACK: `, event);
|
|
138
|
+
}
|
|
10
139
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* Called after entity is loaded.
|
|
16
|
-
*/
|
|
17
|
-
afterLoad(entity) {
|
|
18
|
-
this.ctx.logDb && console.log(`AFTER ENTITY LOADED: `, entity);
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Called before query execution.
|
|
22
|
-
*/
|
|
23
|
-
beforeQuery(event) {
|
|
24
|
-
this.ctx.logDb && console.log(`BEFORE QUERY: `, event.query);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Called after query execution.
|
|
28
|
-
*/
|
|
29
|
-
afterQuery(event) {
|
|
30
|
-
this.ctx.logDb && console.log(`AFTER QUERY: `, event.query);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Called before entity insertion.
|
|
34
|
-
*/
|
|
35
|
-
beforeInsert(event) {
|
|
36
|
-
this.ctx.logDb && console.log(`BEFORE ENTITY INSERTED: `, event.entity);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Called after entity insertion.
|
|
40
|
-
*/
|
|
41
|
-
afterInsert(event) {
|
|
42
|
-
this.ctx.logDb && console.log(`AFTER ENTITY INSERTED: `, event.entity);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Called before entity update.
|
|
46
|
-
*/
|
|
47
|
-
beforeUpdate(event) {
|
|
48
|
-
this.ctx.logDb && console.log(`BEFORE ENTITY UPDATED: `, event.entity);
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Called after entity update.
|
|
52
|
-
*/
|
|
53
|
-
afterUpdate(event) {
|
|
54
|
-
this.ctx.logDb && console.log(`AFTER ENTITY UPDATED: `, event.entity);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Called before entity removal.
|
|
58
|
-
*/
|
|
59
|
-
beforeRemove(event) {
|
|
60
|
-
this.ctx.logDb && console.log(
|
|
61
|
-
`BEFORE ENTITY WITH ID ${event.entityId} REMOVED: `,
|
|
62
|
-
event.entity
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Called after entity removal.
|
|
67
|
-
*/
|
|
68
|
-
afterRemove(event) {
|
|
69
|
-
this.ctx.logDb && console.log(
|
|
70
|
-
`AFTER ENTITY WITH ID ${event.entityId} REMOVED: `,
|
|
71
|
-
event.entity
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Called before entity removal.
|
|
76
|
-
*/
|
|
77
|
-
beforeSoftRemove(event) {
|
|
78
|
-
this.ctx.logDb && console.log(
|
|
79
|
-
`BEFORE ENTITY WITH ID ${event.entityId} SOFT REMOVED: `,
|
|
80
|
-
event.entity
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Called after entity removal.
|
|
85
|
-
*/
|
|
86
|
-
afterSoftRemove(event) {
|
|
87
|
-
this.ctx.logDb && console.log(
|
|
88
|
-
`AFTER ENTITY WITH ID ${event.entityId} SOFT REMOVED: `,
|
|
89
|
-
event.entity
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Called before entity recovery.
|
|
94
|
-
*/
|
|
95
|
-
beforeRecover(event) {
|
|
96
|
-
this.ctx.logDb && console.log(
|
|
97
|
-
`BEFORE ENTITY WITH ID ${event.entityId} RECOVERED: `,
|
|
98
|
-
event.entity
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Called after entity recovery.
|
|
103
|
-
*/
|
|
104
|
-
afterRecover(event) {
|
|
105
|
-
this.ctx.logDb && console.log(
|
|
106
|
-
`AFTER ENTITY WITH ID ${event.entityId} RECOVERED: `,
|
|
107
|
-
event.entity
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Called before transaction start.
|
|
112
|
-
*/
|
|
113
|
-
beforeTransactionStart(event) {
|
|
114
|
-
this.ctx.logDb && console.log(`BEFORE TRANSACTION STARTED: `, event);
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Called after transaction start.
|
|
118
|
-
*/
|
|
119
|
-
afterTransactionStart(event) {
|
|
120
|
-
this.ctx.logDb && console.log(`AFTER TRANSACTION STARTED: `, event);
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Called before transaction commit.
|
|
124
|
-
*/
|
|
125
|
-
beforeTransactionCommit(event) {
|
|
126
|
-
this.ctx.logDb && console.log(`BEFORE TRANSACTION COMMITTED: `, event);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Called after transaction commit.
|
|
130
|
-
*/
|
|
131
|
-
afterTransactionCommit(event) {
|
|
132
|
-
this.ctx.logDb && console.log(`AFTER TRANSACTION COMMITTED: `, event);
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Called before transaction rollback.
|
|
136
|
-
*/
|
|
137
|
-
beforeTransactionRollback(event) {
|
|
138
|
-
this.ctx.logDb && console.log(`BEFORE TRANSACTION ROLLBACK: `, event);
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Called after transaction rollback.
|
|
142
|
-
*/
|
|
143
|
-
afterTransactionRollback(event) {
|
|
144
|
-
this.ctx.logDb && console.log(`AFTER TRANSACTION ROLLBACK: `, event);
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
TaonBaseSubscriberForEntity = __decorateClass([
|
|
148
|
-
TaonSubscriber({
|
|
149
|
-
className: "TaonBaseSubscriberForEntity"
|
|
150
|
-
})
|
|
140
|
+
TaonBaseSubscriberForEntity = __decorate([
|
|
141
|
+
TaonSubscriber({
|
|
142
|
+
className: 'TaonBaseSubscriberForEntity',
|
|
143
|
+
})
|
|
151
144
|
], TaonBaseSubscriberForEntity);
|
|
152
|
-
export {
|
|
153
|
-
TaonBaseSubscriberForEntity
|
|
154
|
-
};
|
|
145
|
+
export { TaonBaseSubscriberForEntity };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
// TODO new 5.8 typescript is not allowing this
|
|
3
|
+
// export namespace Base {
|
|
4
|
+
// export import Controller = controller.TaonBaseController;
|
|
5
|
+
// export import CrudController = crudController.TaonBaseCrudController;
|
|
6
|
+
// export import Entity = entity.TaonBaseEntity;
|
|
7
|
+
// export import AbstractEntity = abstractEntity.TaonBaseAbstractEntity;
|
|
8
|
+
// export import AbstractEntityOmitKeys = abstractEntity.AbstractEntityOmitKeys;
|
|
9
|
+
// export import Provider = provider.TaonBaseProvider;
|
|
10
|
+
// export import Class = baseClass.TaonBaseClass;
|
|
11
|
+
// export import Repository = repository.TaonBaseRepository;
|
|
12
|
+
// export import CustomRepository = customRepository.TaonBaseCustomRepository;
|
|
13
|
+
// export import SubscriberForEntity = baseSubscriberEntity.TaonBaseSubscriberForEntity;
|
|
14
|
+
// export import Migration = baseMigration.TaonBaseMigration;
|
|
15
|
+
// export import Middleware = baseMiddleware.TaonBaseMiddleware;
|
|
16
|
+
// export import AngularService = baseService.TaonBaseAngularService;
|
|
17
|
+
// export const Context = baseContext.TaonBaseContext;
|
|
18
|
+
// }
|
|
@@ -1,14 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
2
|
+
/**
|
|
3
|
+
* Autogenerated by current cli tool
|
|
4
|
+
*/
|
|
5
|
+
export const BUILD_FRAMEWORK_CLI_NAME = 'tnp';
|
|
6
|
+
/**
|
|
7
|
+
* This value can be change in taon.jsonc (appId)
|
|
8
|
+
*/
|
|
9
|
+
export const APP_ID = 'dev.taon.app';
|
|
10
|
+
/**
|
|
11
|
+
* Autogenerated by current cli tool
|
|
12
|
+
*/
|
|
13
|
+
export const BUILD_BASE_HREF = '';
|
|
14
|
+
/**
|
|
15
|
+
* This value can be change in taon.jsonc (overrideNpmName)
|
|
16
|
+
*/
|
|
17
|
+
export const PROJECT_NPM_NAME = 'taon';
|
|
18
|
+
/**
|
|
19
|
+
* Taon version from you project taon.json
|
|
20
|
+
*/
|
|
21
|
+
export const CURRENT_PACKAGE_TAON_VERSION = 'v21';
|
|
22
|
+
/**
|
|
23
|
+
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
24
|
+
*/
|
|
25
|
+
export const CURRENT_PACKAGE_VERSION = '21.0.54';
|
|
26
|
+
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
// return cloneObj<ControllerConfig>(override, ControllerConfig);
|
|
6
|
-
// }
|
|
1
|
+
// import { cloneObj } from '../helpers/clone-obj';
|
|
2
|
+
import { TaonControllerOptions } from './controller-options';
|
|
3
|
+
// import { ParamConfig } from './param-config';
|
|
4
|
+
export class ControllerConfig extends TaonControllerOptions {
|
|
7
5
|
}
|
|
8
|
-
const controllerConfigFrom = (partial) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
export const controllerConfigFrom = (partial) => {
|
|
7
|
+
const newObj = partial || {};
|
|
8
|
+
newObj.methods = newObj.methods || {};
|
|
9
|
+
for (const methodName in newObj.methods) {
|
|
10
|
+
if (newObj.methods.hasOwnProperty(methodName)) {
|
|
11
|
+
// newObj.methods[methodName] = new MethodConfig().clone(
|
|
12
|
+
// newObj.methods[methodName],
|
|
13
|
+
// );
|
|
14
|
+
newObj.methods[methodName] = newObj.methods[methodName] || {};
|
|
15
|
+
const params = newObj.methods[methodName].parameters || {};
|
|
16
|
+
newObj.methods[methodName].parameters = params
|
|
17
|
+
? params
|
|
18
|
+
: {};
|
|
19
|
+
for (const paramName in params) {
|
|
20
|
+
if (params.hasOwnProperty(paramName)) {
|
|
21
|
+
params[paramName] = params[paramName] || {};
|
|
22
|
+
// params[paramName] = new ParamConfig().clone(params[paramName]);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
19
25
|
}
|
|
20
|
-
}
|
|
21
26
|
}
|
|
22
|
-
|
|
23
|
-
return newObj;
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
ControllerConfig,
|
|
27
|
-
controllerConfigFrom
|
|
27
|
+
return newObj;
|
|
28
28
|
};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { DecoratorAbstractOpt } from
|
|
2
|
-
class TaonControllerOptions extends DecoratorAbstractOpt {
|
|
1
|
+
import { DecoratorAbstractOpt } from '../decorators/decorator-abstract-opt';
|
|
2
|
+
export class TaonControllerOptions extends DecoratorAbstractOpt {
|
|
3
3
|
}
|
|
4
|
-
export {
|
|
5
|
-
TaonControllerOptions
|
|
6
|
-
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
//#region models / method config
|
|
2
|
+
/**
|
|
3
|
+
* @link './decorators/http/http-methods-decorators.ts' TaonHttpDecoratorOptions
|
|
4
|
+
*/
|
|
5
|
+
export class MethodConfig {
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
MethodConfig
|
|
9
|
-
};
|
|
7
|
+
//#endregion
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// public clone(override?: Partial<ParamConfig>): ParamConfig {
|
|
4
|
-
// return cloneObj<ParamConfig>(override, ParamConfig);
|
|
5
|
-
// }
|
|
1
|
+
// import { cloneObj } from '../helpers/clone-obj';
|
|
2
|
+
export class ParamConfig {
|
|
6
3
|
}
|
|
7
|
-
export {
|
|
8
|
-
ParamConfig
|
|
9
|
-
};
|
package/lib-prod/constants.js
CHANGED
|
@@ -1,29 +1,33 @@
|
|
|
1
|
-
const TaonEntityKeysToOmitArr = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
export const TaonEntityKeysToOmitArr = [
|
|
2
|
+
'ctrl',
|
|
3
|
+
'clone',
|
|
4
|
+
'__endpoint_context__',
|
|
5
|
+
'ctx',
|
|
6
|
+
'inject',
|
|
7
|
+
'_',
|
|
8
|
+
'relation',
|
|
9
|
+
'relations',
|
|
10
|
+
'inject',
|
|
11
|
+
'injectRepo',
|
|
12
|
+
'injectCustomRepository',
|
|
13
|
+
'injectCustomRepo',
|
|
14
|
+
'injectController',
|
|
15
|
+
'injectCtrl',
|
|
16
|
+
'injectProvider',
|
|
17
|
+
'injectMiddleware',
|
|
18
18
|
];
|
|
19
19
|
let TAON_CONTEXT;
|
|
20
|
+
/* */
|
|
21
|
+
/* */
|
|
20
22
|
let CURRENT_HOST_BACKEND_PORT;
|
|
23
|
+
/* */
|
|
24
|
+
/* */
|
|
25
|
+
/* */
|
|
26
|
+
/* */
|
|
21
27
|
let CURRENT_HOST_URL;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
apiPrefix
|
|
29
|
-
};
|
|
28
|
+
/* */
|
|
29
|
+
/* */
|
|
30
|
+
/* */
|
|
31
|
+
/* */
|
|
32
|
+
export { TAON_CONTEXT, CURRENT_HOST_BACKEND_PORT, CURRENT_HOST_URL };
|
|
33
|
+
export const apiPrefix = 'api';
|