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.
Files changed (114) hide show
  1. package/bin/taon +5 -5
  2. package/bin/taon-debug +5 -5
  3. package/bin/taon-debug-brk +4 -4
  4. package/browser/package.json +1 -1
  5. package/browser-prod/package.json +1 -1
  6. package/lib/build-info._auto-generated_.d.ts +1 -1
  7. package/lib/build-info._auto-generated_.js +1 -1
  8. package/lib/package.json +1 -1
  9. package/lib/ui/index.js +2 -2
  10. package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
  11. package/lib-prod/base-classes/base-abstract-entity.js +17 -31
  12. package/lib-prod/base-classes/base-angular-service.js +83 -55
  13. package/lib-prod/base-classes/base-class.js +33 -35
  14. package/lib-prod/base-classes/base-context.js +17 -19
  15. package/lib-prod/base-classes/base-controller.js +146 -154
  16. package/lib-prod/base-classes/base-crud-controller.js +250 -221
  17. package/lib-prod/base-classes/base-custom-repository.js +7 -18
  18. package/lib-prod/base-classes/base-electron-service.js +49 -0
  19. package/lib-prod/base-classes/base-entity.js +20 -30
  20. package/lib-prod/base-classes/base-file-upload.middleware.js +72 -75
  21. package/lib-prod/base-classes/base-injector.js +176 -194
  22. package/lib-prod/base-classes/base-middleware.js +8 -5
  23. package/lib-prod/base-classes/base-migration.js +19 -22
  24. package/lib-prod/base-classes/base-provider.js +7 -5
  25. package/lib-prod/base-classes/base-repository.js +601 -573
  26. package/lib-prod/base-classes/base-subscriber-for-entity.js +143 -152
  27. package/lib-prod/base-classes/base.js +18 -0
  28. package/lib-prod/build-info._auto-generated_.js +26 -14
  29. package/lib-prod/config/controller-config.js +24 -24
  30. package/lib-prod/config/controller-options.js +2 -5
  31. package/lib-prod/config/method-config.js +6 -8
  32. package/lib-prod/config/param-config.js +2 -8
  33. package/lib-prod/constants.js +29 -25
  34. package/lib-prod/context-db-migrations.js +327 -324
  35. package/lib-prod/create-context.js +211 -146
  36. package/lib-prod/decorators/classes/controller-decorator.js +16 -20
  37. package/lib-prod/decorators/classes/entity-decorator.js +26 -47
  38. package/lib-prod/decorators/classes/middleware-decorator.js +14 -24
  39. package/lib-prod/decorators/classes/migration-decorator.js +13 -22
  40. package/lib-prod/decorators/classes/provider-decorator.js +13 -23
  41. package/lib-prod/decorators/classes/repository-decorator.js +13 -22
  42. package/lib-prod/decorators/classes/subscriber-decorator.js +13 -23
  43. package/lib-prod/decorators/decorator-abstract-opt.js +1 -4
  44. package/lib-prod/decorators/http/http-decorators.js +20 -5
  45. package/lib-prod/decorators/http/http-methods-decorators.js +91 -133
  46. package/lib-prod/decorators/http/http-params-decorators.js +36 -62
  47. package/lib-prod/dependency-injection/di-container.js +28 -29
  48. package/lib-prod/endpoint-context-storage.js +27 -32
  49. package/lib-prod/endpoint-context.js +2294 -1930
  50. package/lib-prod/entity-process.js +209 -198
  51. package/lib-prod/env/env.angular-node-app.js +66 -130
  52. package/lib-prod/env/env.docs-webapp.js +66 -130
  53. package/lib-prod/env/env.electron-app.js +66 -130
  54. package/lib-prod/env/env.mobile-app.js +66 -130
  55. package/lib-prod/env/env.npm-lib-and-cli-tool.js +66 -130
  56. package/lib-prod/env/env.vscode-plugin.js +66 -130
  57. package/lib-prod/env/index.js +6 -6
  58. package/lib-prod/express-types.js +1 -0
  59. package/lib-prod/formly/formly.models.js +1 -0
  60. package/lib-prod/formly/fromly.js +196 -175
  61. package/lib-prod/formly/type-from-entity.js +45 -52
  62. package/lib-prod/get-response-value.js +21 -18
  63. package/lib-prod/global-state/taon-global-state/index.js +6 -5
  64. package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.js +18 -19
  65. package/lib-prod/global-state/taon-global-state/taon-global-state.constants.js +6 -9
  66. package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js +40 -46
  67. package/lib-prod/global-state/taon-global-state/taon-global-state.entity.js +33 -46
  68. package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.js +10 -20
  69. package/lib-prod/global-state/taon-global-state/taon-global-state.models.js +43 -33
  70. package/lib-prod/global-state/taon-global-state/taon-global-state.provider.js +10 -20
  71. package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js +43 -44
  72. package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.js +20 -27
  73. package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js +10 -10
  74. package/lib-prod/global-state/taon-transaction-registry/index.js +11 -10
  75. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.js +20 -21
  76. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.js +4 -7
  77. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js +34 -39
  78. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.js +34 -54
  79. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.js +10 -20
  80. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.js +7 -10
  81. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.js +10 -20
  82. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.js +29 -34
  83. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.js +20 -27
  84. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js +4 -5
  85. package/lib-prod/helpers/class-helpers.js +210 -177
  86. package/lib-prod/helpers/clone-obj.js +16 -20
  87. package/lib-prod/helpers/taon-helpers.js +132 -114
  88. package/lib-prod/index._auto-generated_.js +5 -0
  89. package/lib-prod/index.js +248 -227
  90. package/lib-prod/inject.js +88 -33
  91. package/lib-prod/migrations/index.js +2 -1
  92. package/lib-prod/migrations/migrations_index._auto-generated_.js +3 -0
  93. package/lib-prod/models.js +72 -103
  94. package/lib-prod/orm/columns.js +58 -118
  95. package/lib-prod/orm/index.js +56 -1
  96. package/lib-prod/package.json +1 -1
  97. package/lib-prod/realtime/realtime-client.js +188 -186
  98. package/lib-prod/realtime/realtime-core.js +77 -78
  99. package/lib-prod/realtime/realtime-server.js +225 -240
  100. package/lib-prod/realtime/realtime-strategy/index.js +4 -4
  101. package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js +273 -219
  102. package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js +267 -240
  103. package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.js +26 -20
  104. package/lib-prod/realtime/realtime-strategy/realtime-strategy.js +10 -13
  105. package/lib-prod/realtime/realtime-subs-manager.js +82 -90
  106. package/lib-prod/realtime/realtime.models.js +2 -0
  107. package/lib-prod/symbols.js +104 -105
  108. package/lib-prod/ui/index.js +1 -5
  109. package/lib-prod/ui/taon-admin-mode-configuration/index.js +1 -5
  110. package/lib-prod/validators.js +43 -37
  111. package/lib-prod.split-namespaces.json +31 -91
  112. package/package.json +1 -1
  113. package/websql/package.json +1 -1
  114. package/websql-prod/package.json +1 -1
package/bin/taon CHANGED
@@ -1,5 +1,5 @@
1
- #!/usr/bin/env -S node --no-deprecation
2
- //#region @backend
3
- // --stack-trace-limit=10000
4
- require('./start');
5
- //#endregion
1
+ #!/usr/bin/env -S node --no-deprecation
2
+ //#region @backend
3
+ // --stack-trace-limit=10000
4
+ require('./start');
5
+ //#endregion
package/bin/taon-debug CHANGED
@@ -1,5 +1,5 @@
1
- #!/usr/bin/env -S node --inspect --stack-trace-limit=10000 --no-deprecation
2
- //#region @backend
3
- // --stack-trace-limit=10000
4
- require('./start');
5
- //#endregion
1
+ #!/usr/bin/env -S node --inspect --stack-trace-limit=10000 --no-deprecation
2
+ //#region @backend
3
+ // --stack-trace-limit=10000
4
+ require('./start');
5
+ //#endregion
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env -S node --inspect-brk --stack-trace-limit=10000 --no-deprecation
2
- //#region @backend
3
- require('./start');
4
- //#endregion
1
+ #!/usr/bin/env -S node --inspect-brk --stack-trace-limit=10000 --no-deprecation
2
+ //#region @backend
3
+ require('./start');
4
+ //#endregion
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taon/browser",
3
- "version": "21.0.53",
3
+ "version": "21.0.54",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taon/browser-prod",
3
- "version": "21.0.53",
3
+ "version": "21.0.54",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0"
@@ -21,4 +21,4 @@ export declare const CURRENT_PACKAGE_TAON_VERSION = "v21";
21
21
  /**
22
22
  * Autogenerated by current cli tool. Use *tnp release* to bump version.
23
23
  */
24
- export declare const CURRENT_PACKAGE_VERSION = "21.0.53";
24
+ export declare const CURRENT_PACKAGE_VERSION = "21.0.54";
@@ -25,6 +25,6 @@ exports.CURRENT_PACKAGE_TAON_VERSION = 'v21';
25
25
  /**
26
26
  * Autogenerated by current cli tool. Use *tnp release* to bump version.
27
27
  */
28
- exports.CURRENT_PACKAGE_VERSION = '21.0.53';
28
+ exports.CURRENT_PACKAGE_VERSION = '21.0.54';
29
29
  // THIS FILE IS GENERATED - DO NOT MODIFY
30
30
  //# sourceMappingURL=build-info._auto-generated_.js.map
package/lib/package.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "taon/lib",
3
- "version": "21.0.53"
3
+ "version": "21.0.54"
4
4
  }
package/lib/ui/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dummy1769816121898 = dummy1769816121898;
4
- function dummy1769816121898() { }
3
+ exports.dummy1769878175346 = dummy1769878175346;
4
+ function dummy1769878175346() { }
5
5
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dummy1769816122455 = dummy1769816122455;
4
- function dummy1769816122455() { }
3
+ exports.dummy1769878176428 = dummy1769878176428;
4
+ function dummy1769878176428() { }
5
5
  //# sourceMappingURL=index.js.map
@@ -1,33 +1,19 @@
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;
1
+ import { Entity, VersionColumn } from 'taon-typeorm/lib-prod'; // @websql
2
+ import { PrimaryGeneratedColumn, } from '../orm';
3
+ import { TaonBaseEntity } from './base-entity';
4
+ //#region @websql
5
+ let TaonBaseAbstractEntity = class TaonBaseAbstractEntity extends TaonBaseEntity {
10
6
  };
11
- import { Entity, VersionColumn } from "taon-typeorm/lib-prod";
12
- import {
13
- PrimaryGeneratedColumn
14
- } from "../orm";
15
- import { TaonBaseEntity } from "./base-entity";
16
- let TaonBaseAbstractEntity = class extends TaonBaseEntity {
17
- //#endregion
18
- id;
19
- //#endregion
20
- version;
21
- };
22
- __decorateClass([
23
- PrimaryGeneratedColumn()
24
- ], TaonBaseAbstractEntity.prototype, "id", 2);
25
- __decorateClass([
26
- VersionColumn()
27
- ], TaonBaseAbstractEntity.prototype, "version", 2);
28
- TaonBaseAbstractEntity = __decorateClass([
29
- Entity()
7
+ __decorate([
8
+ PrimaryGeneratedColumn()
9
+ //#endregion
10
+ ], TaonBaseAbstractEntity.prototype, "id", void 0);
11
+ __decorate([
12
+ VersionColumn()
13
+ //#endregion
14
+ ], TaonBaseAbstractEntity.prototype, "version", void 0);
15
+ TaonBaseAbstractEntity = __decorate([
16
+ Entity()
17
+ //#endregion
30
18
  ], TaonBaseAbstractEntity);
31
- export {
32
- TaonBaseAbstractEntity
33
- };
19
+ export { TaonBaseAbstractEntity };
@@ -1,56 +1,84 @@
1
- import { inject as taonInject } from "../inject";
2
- class TaonBaseAngularService {
3
- /* */
4
- /* */
5
- /* */
6
- /* */
7
- /* */
8
- /* */
9
- /* */
10
- /* */
11
- /* */
12
- /* */
13
- /* */
14
- /* */
15
- /* */
16
- /* */
17
- /* */
18
- /* */
19
- /* */
20
- constructor() {
21
- }
22
- /**
23
- * Returns true if the application is running in SSR (server-side rendering) mode only.
24
- */
25
- get isSsrPlatform() {
26
- return false;
27
- }
28
- /**
29
- * Returns true if the application is running in browser-only mode.
30
- */
31
- get isBrowserPlatform() {
32
- return false;
33
- }
34
- /**
35
- * @deprecated
36
- * Returns the host URL for the backend service
37
- * that is running on localhost (normal NodeJS/ExpressJS mode).
38
- */
39
- get host() {
40
- return void 0;
41
- }
42
- injectController(ctor, overrideCurrentContext) {
43
- return taonInject(() => {
44
- let currentContext;
45
- if (!currentContext) {
46
- throw new Error(
47
- "No context available. Make sure to initialize the context before injecting controllers."
48
- );
49
- }
50
- return currentContext ? currentContext.getClass(ctor) : void 0;
51
- });
52
- }
1
+ /* */
2
+ /* */
3
+ /* */
4
+ import { inject as taonInject } from '../inject';
5
+ /**
6
+ * TODO prevent calling methods when not initialized
7
+ * with init(ctx)
8
+ */
9
+ /* */
10
+ /* */
11
+ export class TaonBaseAngularService {
12
+ /* */
13
+ /* */
14
+ /* */
15
+ /* */
16
+ /* */
17
+ /* */
18
+ /* */
19
+ /* */
20
+ /* */
21
+ /* */
22
+ /* */
23
+ /* */
24
+ /* */
25
+ /* */
26
+ /* */
27
+ /* */
28
+ /* */
29
+ constructor() {
30
+ /* */
31
+ /* */
32
+ /* */
33
+ /* */
34
+ /* */
35
+ /* */
36
+ /* */
37
+ }
38
+ /**
39
+ * Returns true if the application is running in SSR (server-side rendering) mode only.
40
+ */
41
+ get isSsrPlatform() {
42
+ /* */
43
+ /* */
44
+ return false;
45
+ }
46
+ /**
47
+ * Returns true if the application is running in browser-only mode.
48
+ */
49
+ get isBrowserPlatform() {
50
+ /* */
51
+ /* */
52
+ return false;
53
+ }
54
+ /**
55
+ * @deprecated
56
+ * Returns the host URL for the backend service
57
+ * that is running on localhost (normal NodeJS/ExpressJS mode).
58
+ */
59
+ get host() {
60
+ /* */
61
+ /* */
62
+ /* */
63
+ /* */
64
+ /* */
65
+ return void 0;
66
+ }
67
+ injectController(ctor,
68
+ /**
69
+ * optional override context
70
+ */
71
+ overrideCurrentContext) {
72
+ return taonInject(() => {
73
+ let currentContext;
74
+ /* */
75
+ /* */
76
+ /* */
77
+ /* */
78
+ if (!currentContext) {
79
+ throw new Error('No context available. Make sure to initialize the context before injecting controllers.');
80
+ }
81
+ return currentContext ? currentContext.getClass(ctor) : void 0;
82
+ });
83
+ }
53
84
  }
54
- export {
55
- TaonBaseAngularService
56
- };
@@ -1,37 +1,35 @@
1
- import { ___NS__cloneDeep, ___NS__isFunction, ___NS__isString } from "tnp-core/lib-prod";
2
- import { ClassHelpers__NS__getClassFnFromObject } from "../helpers/class-helpers";
3
- import { cloneObj } from "../helpers/clone-obj";
4
- class TaonBaseClass {
5
- //#region class initialization hook
6
- /**
7
- * class initialization hook
8
- * taon after class instance creation
9
- */
10
- async _() {
11
- }
12
- //#endregion
13
- //#region clone
14
- /**
15
- *
16
- * @param overrideObjOrFn if object is provided it will override values in cloned object,
17
- * if function is provided it will be called with old cloned values and should return
18
- * object with values to override
19
- * @returns cloned instance of the class
20
- */
21
- clone(overrideObjOrFn) {
22
- if (___NS__isString(overrideObjOrFn)) {
23
- console.log(overrideObjOrFn);
24
- throw new Error("String is not supported as .clone() method argument");
1
+ import { ___NS__cloneDeep, ___NS__isFunction, ___NS__isString } from 'tnp-core/lib-prod';
2
+ import { ClassHelpers__NS__getClassFnFromObject } from '../helpers/class-helpers';
3
+ import { cloneObj } from '../helpers/clone-obj';
4
+ //#endregion
5
+ export class TaonBaseClass {
6
+ //#region class initialization hook
7
+ /**
8
+ * class initialization hook
9
+ * taon after class instance creation
10
+ */
11
+ async _() { }
12
+ //#endregion
13
+ //#region clone
14
+ /**
15
+ *
16
+ * @param overrideObjOrFn if object is provided it will override values in cloned object,
17
+ * if function is provided it will be called with old cloned values and should return
18
+ * object with values to override
19
+ * @returns cloned instance of the class
20
+ */
21
+ clone(overrideObjOrFn) {
22
+ if (___NS__isString(overrideObjOrFn)) {
23
+ console.log(overrideObjOrFn);
24
+ throw new Error('String is not supported as .clone() method argument');
25
+ }
26
+ const classFn = ClassHelpers__NS__getClassFnFromObject(this);
27
+ if (___NS__isFunction(overrideObjOrFn)) {
28
+ // console.log('clone with fn');
29
+ const oldValues = (___NS__cloneDeep(this) || {});
30
+ return cloneObj(overrideObjOrFn(oldValues), classFn);
31
+ }
32
+ // console.log('clone normal');
33
+ return cloneObj(overrideObjOrFn, classFn);
25
34
  }
26
- const classFn = ClassHelpers__NS__getClassFnFromObject(this);
27
- if (___NS__isFunction(overrideObjOrFn)) {
28
- const oldValues = ___NS__cloneDeep(this) || {};
29
- return cloneObj(overrideObjOrFn(oldValues), classFn);
30
- }
31
- return cloneObj(overrideObjOrFn, classFn);
32
- }
33
- //#endregion
34
35
  }
35
- export {
36
- TaonBaseClass
37
- };
@@ -1,21 +1,19 @@
1
- import { createContext } from "../create-context";
2
- import { TaonGlobalStateContext } from "../global-state/taon-global-state/taon-global-state.abstract.context";
3
- import { TaonBaseFileUploadMiddleware } from "./base-file-upload.middleware";
4
- import { TaonBaseRepository } from "./base-repository";
1
+ import { createContext } from '../create-context';
2
+ import { TaonGlobalStateContext } from '../global-state/taon-global-state/taon-global-state.abstract.context';
3
+ import { TaonBaseFileUploadMiddleware } from './base-file-upload.middleware';
4
+ import { TaonBaseRepository } from './base-repository';
5
5
  const TaonBaseContext = createContext(() => ({
6
- contextName: "TaonBaseContext",
7
- abstract: true,
8
- contexts: {
9
- TaonGlobalStateContext
10
- },
11
- middlewares: {
12
- TaonBaseFileUploadMiddleware
13
- },
14
- repositories: {
15
- // @ts-ignore
16
- TaonBaseRepository
17
- }
6
+ contextName: 'TaonBaseContext',
7
+ abstract: true,
8
+ contexts: {
9
+ TaonGlobalStateContext,
10
+ },
11
+ middlewares: {
12
+ TaonBaseFileUploadMiddleware,
13
+ },
14
+ repositories: {
15
+ // @ts-ignore
16
+ TaonBaseRepository,
17
+ },
18
18
  }));
19
- export {
20
- TaonBaseContext
21
- };
19
+ export { TaonBaseContext };