@revisium/core 1.0.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/dist/package.json +65 -57
  2. package/dist/prisma/seed/generateSeedApi.js +1 -1
  3. package/dist/prisma/seed/generateSeedApi.js.map +1 -1
  4. package/dist/src/__tests__/utils/prepareProject.js +4 -4
  5. package/dist/src/__tests__/utils/prepareProject.js.map +1 -1
  6. package/dist/src/__tests__/utils/schema/schema.mocks.d.ts +1 -4
  7. package/dist/src/__tests__/utils/schema/schema.mocks.js +4 -7
  8. package/dist/src/__tests__/utils/schema/schema.mocks.js.map +1 -1
  9. package/dist/src/api/rest-api/revision/dto/create-table.dto.js +1 -1
  10. package/dist/src/api/rest-api/revision/dto/create-table.dto.js.map +1 -1
  11. package/dist/src/api/rest-api/row/dto/update-row.dto.js +1 -1
  12. package/dist/src/api/rest-api/row/dto/update-row.dto.js.map +1 -1
  13. package/dist/src/api/rest-api/row/model/row.model.js +1 -1
  14. package/dist/src/api/rest-api/row/model/row.model.js.map +1 -1
  15. package/dist/src/api/rest-api/share/model/order-by.model.d.ts +13 -0
  16. package/dist/src/api/rest-api/share/model/order-by.model.js +39 -0
  17. package/dist/src/api/rest-api/share/model/order-by.model.js.map +1 -0
  18. package/dist/src/api/rest-api/share/utils/mapToPrismaOrderBy.d.ts +3 -0
  19. package/dist/src/api/rest-api/share/utils/mapToPrismaOrderBy.js +12 -0
  20. package/dist/src/api/rest-api/share/utils/mapToPrismaOrderBy.js.map +1 -0
  21. package/dist/src/api/rest-api/share/validators/is-unique-order-by-fields.validator.d.ts +2 -0
  22. package/dist/src/api/rest-api/share/validators/is-unique-order-by-fields.validator.js +28 -0
  23. package/dist/src/api/rest-api/share/validators/is-unique-order-by-fields.validator.js.map +1 -0
  24. package/dist/src/api/rest-api/table/dto/create-row.dto.js +1 -1
  25. package/dist/src/api/rest-api/table/dto/create-row.dto.js.map +1 -1
  26. package/dist/src/api/rest-api/table/dto/get-table-rows.dto.d.ts +2 -0
  27. package/dist/src/api/rest-api/table/dto/get-table-rows.dto.js +28 -1
  28. package/dist/src/api/rest-api/table/dto/get-table-rows.dto.js.map +1 -1
  29. package/dist/src/api/rest-api/table/table-by-id.controller.d.ts +1 -1
  30. package/dist/src/api/rest-api/table/table-by-id.controller.js +8 -4
  31. package/dist/src/api/rest-api/table/table-by-id.controller.js.map +1 -1
  32. package/dist/src/app-mode.d.ts +4 -0
  33. package/dist/src/app-mode.js +5 -0
  34. package/dist/src/app-mode.js.map +1 -0
  35. package/dist/src/app.module.js +1 -1
  36. package/dist/src/app.module.js.map +1 -1
  37. package/dist/src/core/app-options.module.d.ts +5 -0
  38. package/dist/src/core/app-options.module.js +27 -0
  39. package/dist/src/core/app-options.module.js.map +1 -0
  40. package/dist/src/core/core.module.d.ts +3 -0
  41. package/dist/src/core/core.module.js +40 -33
  42. package/dist/src/core/core.module.js.map +1 -1
  43. package/dist/src/features/auth/strategy/jwt.strategy.d.ts +3 -1
  44. package/dist/src/features/draft/commands/handlers/__tests__/utils.js +10 -20
  45. package/dist/src/features/draft/commands/handlers/__tests__/utils.js.map +1 -1
  46. package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.d.ts +1 -3
  47. package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.js +4 -4
  48. package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.js.map +1 -1
  49. package/dist/src/features/draft/draft.handler.d.ts +1 -2
  50. package/dist/src/features/draft/draft.handler.js.map +1 -1
  51. package/dist/src/features/plugin/index.d.ts +9 -0
  52. package/dist/src/features/plugin/index.js +22 -0
  53. package/dist/src/features/plugin/index.js.map +1 -0
  54. package/dist/src/features/plugin/plugin.list.service.d.ts +8 -1
  55. package/dist/src/features/plugin/plugin.list.service.js +23 -2
  56. package/dist/src/features/plugin/plugin.list.service.js.map +1 -1
  57. package/dist/src/features/plugin/plugin.module.js +3 -3
  58. package/dist/src/features/plugin/plugin.module.js.map +1 -1
  59. package/dist/src/features/plugin/row-created-at/row-created-at.plugin.d.ts +11 -0
  60. package/dist/src/features/plugin/row-created-at/row-created-at.plugin.js +61 -0
  61. package/dist/src/features/plugin/row-created-at/row-created-at.plugin.js.map +1 -0
  62. package/dist/src/features/plugin/row-created-id/row-created-id.plugin.d.ts +11 -0
  63. package/dist/src/features/plugin/row-created-id/row-created-id.plugin.js +61 -0
  64. package/dist/src/features/plugin/row-created-id/row-created-id.plugin.js.map +1 -0
  65. package/dist/src/features/plugin/row-hash/row-hash.plugin.d.ts +11 -0
  66. package/dist/src/features/plugin/row-hash/row-hash.plugin.js +61 -0
  67. package/dist/src/features/plugin/row-hash/row-hash.plugin.js.map +1 -0
  68. package/dist/src/features/plugin/row-id/row-id.plugin.d.ts +11 -0
  69. package/dist/src/features/plugin/row-id/row-id.plugin.js +61 -0
  70. package/dist/src/features/plugin/row-id/row-id.plugin.js.map +1 -0
  71. package/dist/src/features/plugin/row-schema-hash/row-schema-hash.plugin.d.ts +11 -0
  72. package/dist/src/features/plugin/row-schema-hash/row-schema-hash.plugin.js +61 -0
  73. package/dist/src/features/plugin/row-schema-hash/row-schema-hash.plugin.js.map +1 -0
  74. package/dist/src/features/plugin/row-updated-at/row-updated-at.plugin.d.ts +11 -0
  75. package/dist/src/features/plugin/row-updated-at/row-updated-at.plugin.js +61 -0
  76. package/dist/src/features/plugin/row-updated-at/row-updated-at.plugin.js.map +1 -0
  77. package/dist/src/features/plugin/row-version-id/row-version-id.plugin.d.ts +11 -0
  78. package/dist/src/features/plugin/row-version-id/row-version-id.plugin.js +61 -0
  79. package/dist/src/features/plugin/row-version-id/row-version-id.plugin.js.map +1 -0
  80. package/dist/src/features/plugin/types.d.ts +4 -4
  81. package/dist/src/features/project/commands/handlers/__tests__/utils.js +9 -8
  82. package/dist/src/features/project/commands/handlers/__tests__/utils.js.map +1 -1
  83. package/dist/src/features/share/json-schema-store.service.js +9 -2
  84. package/dist/src/features/share/json-schema-store.service.js.map +1 -1
  85. package/dist/src/features/share/json-schema-validator.service.d.ts +1 -0
  86. package/dist/src/features/share/json-schema-validator.service.js +24 -2
  87. package/dist/src/features/share/json-schema-validator.service.js.map +1 -1
  88. package/dist/src/features/share/schema/meta-schema.d.ts +1 -0
  89. package/dist/src/features/share/schema/meta-schema.js +45 -19
  90. package/dist/src/features/share/schema/meta-schema.js.map +1 -1
  91. package/dist/src/features/share/schema/plugins/index.d.ts +8 -0
  92. package/dist/src/features/share/schema/plugins/index.js +25 -0
  93. package/dist/src/features/share/schema/plugins/index.js.map +1 -0
  94. package/dist/src/features/share/schema/plugins/row-created-at.schema.d.ts +4 -0
  95. package/dist/src/features/share/schema/plugins/row-created-at.schema.js +15 -0
  96. package/dist/src/features/share/schema/plugins/row-created-at.schema.js.map +1 -0
  97. package/dist/src/features/share/schema/plugins/row-created-id.schema.d.ts +4 -0
  98. package/dist/src/features/share/schema/plugins/row-created-id.schema.js +15 -0
  99. package/dist/src/features/share/schema/plugins/row-created-id.schema.js.map +1 -0
  100. package/dist/src/features/share/schema/plugins/row-hash.schema.d.ts +4 -0
  101. package/dist/src/features/share/schema/plugins/row-hash.schema.js +15 -0
  102. package/dist/src/features/share/schema/plugins/row-hash.schema.js.map +1 -0
  103. package/dist/src/features/share/schema/plugins/row-id.schema.d.ts +4 -0
  104. package/dist/src/features/share/schema/plugins/row-id.schema.js +15 -0
  105. package/dist/src/features/share/schema/plugins/row-id.schema.js.map +1 -0
  106. package/dist/src/features/share/schema/plugins/row-schema-hash.schema.d.ts +4 -0
  107. package/dist/src/features/share/schema/plugins/row-schema-hash.schema.js +15 -0
  108. package/dist/src/features/share/schema/plugins/row-schema-hash.schema.js.map +1 -0
  109. package/dist/src/features/share/schema/plugins/row-updated-at.schema.d.ts +4 -0
  110. package/dist/src/features/share/schema/plugins/row-updated-at.schema.js +15 -0
  111. package/dist/src/features/share/schema/plugins/row-updated-at.schema.js.map +1 -0
  112. package/dist/src/features/share/schema/plugins/row-version-id.schema.d.ts +4 -0
  113. package/dist/src/features/share/schema/plugins/row-version-id.schema.js +15 -0
  114. package/dist/src/features/share/schema/plugins/row-version-id.schema.js.map +1 -0
  115. package/dist/src/features/share/schema/shared-fields.d.ts +11 -0
  116. package/dist/src/features/share/schema/shared-fields.js +15 -0
  117. package/dist/src/features/share/schema/shared-fields.js.map +1 -0
  118. package/dist/src/features/share/schema-ids.consts.d.ts +7 -0
  119. package/dist/src/features/share/schema-ids.consts.js +7 -0
  120. package/dist/src/features/share/schema-ids.consts.js.map +1 -1
  121. package/dist/src/features/share/utils/schema/lib/createJsonSchemaStore.d.ts +2 -1
  122. package/dist/src/features/share/utils/schema/lib/createJsonSchemaStore.js +22 -4
  123. package/dist/src/features/share/utils/schema/lib/createJsonSchemaStore.js.map +1 -1
  124. package/dist/src/features/share/utils/schema/model/schema/json-array.store.d.ts +3 -0
  125. package/dist/src/features/share/utils/schema/model/schema/json-array.store.js +3 -0
  126. package/dist/src/features/share/utils/schema/model/schema/json-array.store.js.map +1 -1
  127. package/dist/src/features/share/utils/schema/model/schema/json-boolean.store.d.ts +4 -0
  128. package/dist/src/features/share/utils/schema/model/schema/json-boolean.store.js +4 -0
  129. package/dist/src/features/share/utils/schema/model/schema/json-boolean.store.js.map +1 -1
  130. package/dist/src/features/share/utils/schema/model/schema/json-number.store.d.ts +4 -0
  131. package/dist/src/features/share/utils/schema/model/schema/json-number.store.js +4 -0
  132. package/dist/src/features/share/utils/schema/model/schema/json-number.store.js.map +1 -1
  133. package/dist/src/features/share/utils/schema/model/schema/json-object.store.d.ts +3 -0
  134. package/dist/src/features/share/utils/schema/model/schema/json-object.store.js +3 -0
  135. package/dist/src/features/share/utils/schema/model/schema/json-object.store.js.map +1 -1
  136. package/dist/src/features/share/utils/schema/model/schema/json-string.store.d.ts +8 -0
  137. package/dist/src/features/share/utils/schema/model/schema/json-string.store.js +12 -5
  138. package/dist/src/features/share/utils/schema/model/schema/json-string.store.js.map +1 -1
  139. package/dist/src/features/share/utils/schema/types/schema.types.d.ts +20 -0
  140. package/dist/src/features/table/queries/handlers/get-rows-by-table.handler.js +8 -9
  141. package/dist/src/features/table/queries/handlers/get-rows-by-table.handler.js.map +1 -1
  142. package/dist/src/features/table/queries/impl/get-rows-by-table.query.d.ts +3 -0
  143. package/dist/src/features/table/queries/impl/get-rows-by-table.query.js.map +1 -1
  144. package/dist/src/index.d.ts +0 -1
  145. package/dist/src/index.js +1 -3
  146. package/dist/src/index.js.map +1 -1
  147. package/dist/src/infrastructure/health/database.check.d.ts +1 -1
  148. package/dist/src/infrastructure/health/notification.check.d.ts +1 -1
  149. package/dist/src/infrastructure/notification/endpoint-notification.service.d.ts +2 -2
  150. package/dist/src/infrastructure/notification/endpoint-notification.service.js +1 -2
  151. package/dist/src/infrastructure/notification/endpoint-notification.service.js.map +1 -1
  152. package/dist/src/infrastructure/notification/in-memory-notification-client.d.ts +7 -0
  153. package/dist/src/infrastructure/notification/in-memory-notification-client.js +13 -0
  154. package/dist/src/infrastructure/notification/in-memory-notification-client.js.map +1 -0
  155. package/dist/src/infrastructure/notification/notification-client.interface.d.ts +3 -0
  156. package/dist/src/infrastructure/notification/notification-client.interface.js +3 -0
  157. package/dist/src/infrastructure/notification/notification-client.interface.js.map +1 -0
  158. package/dist/src/infrastructure/notification/notification.module.js +13 -20
  159. package/dist/src/infrastructure/notification/notification.module.js.map +1 -1
  160. package/dist/src/infrastructure/notification/redis-notification-client.d.ts +7 -0
  161. package/dist/src/infrastructure/notification/redis-notification-client.js +13 -0
  162. package/dist/src/infrastructure/notification/redis-notification-client.js.map +1 -0
  163. package/dist/src/main.js +7 -1
  164. package/dist/src/main.js.map +1 -1
  165. package/dist/tsconfig.build.tsbuildinfo +1 -1
  166. package/package.json +65 -57
  167. package/dist/src/infrastructure/notification/in-memory-client.d.ts +0 -10
  168. package/dist/src/infrastructure/notification/in-memory-client.js +0 -24
  169. package/dist/src/infrastructure/notification/in-memory-client.js.map +0 -1
  170. package/dist/src/infrastructure/notification/in-memory-server.d.ts +0 -6
  171. package/dist/src/infrastructure/notification/in-memory-server.js +0 -19
  172. package/dist/src/infrastructure/notification/in-memory-server.js.map +0 -1
  173. package/dist/src/infrastructure/notification/notification-event-emitter.d.ts +0 -2
  174. package/dist/src/infrastructure/notification/notification-event-emitter.js +0 -6
  175. package/dist/src/infrastructure/notification/notification-event-emitter.js.map +0 -1
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RowCreatedAtPlugin = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const schema_ids_consts_1 = require("../../share/schema-ids.consts");
15
+ const createJsonValueStore_1 = require("../../share/utils/schema/lib/createJsonValueStore");
16
+ const traverseValue_1 = require("../../share/utils/schema/lib/traverseValue");
17
+ const schema_types_1 = require("../../share/utils/schema/types/schema.types");
18
+ let RowCreatedAtPlugin = class RowCreatedAtPlugin {
19
+ constructor() {
20
+ this.isAvailable = true;
21
+ }
22
+ afterCreateRow(options) {
23
+ this.setCreatedAt(options.valueStore, '');
24
+ }
25
+ afterUpdateRow(options) {
26
+ this.setCreatedAt(options.valueStore, '');
27
+ }
28
+ computeRows(options) {
29
+ for (const row of options.rows) {
30
+ const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
31
+ this.setCreatedAt(valueStore, row.createdAt.toISOString());
32
+ row.data = valueStore.getPlainValue();
33
+ }
34
+ }
35
+ afterMigrateRows(options) {
36
+ for (const row of options.rows) {
37
+ const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
38
+ this.setCreatedAt(valueStore, '');
39
+ row.data = valueStore.getPlainValue();
40
+ }
41
+ }
42
+ forEachRow(valueStore, callback) {
43
+ (0, traverseValue_1.traverseValue)(valueStore, (item) => {
44
+ if (item.schema.$ref === schema_ids_consts_1.SystemSchemaIds.RowCreatedAt &&
45
+ item.type === schema_types_1.JsonSchemaTypeName.String) {
46
+ callback(item);
47
+ }
48
+ });
49
+ }
50
+ setCreatedAt(valueStore, value) {
51
+ this.forEachRow(valueStore, (item) => {
52
+ item.value = value;
53
+ });
54
+ }
55
+ };
56
+ exports.RowCreatedAtPlugin = RowCreatedAtPlugin;
57
+ exports.RowCreatedAtPlugin = RowCreatedAtPlugin = __decorate([
58
+ (0, common_1.Injectable)(),
59
+ __metadata("design:paramtypes", [])
60
+ ], RowCreatedAtPlugin);
61
+ //# sourceMappingURL=row-created-at.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row-created-at.plugin.js","sourceRoot":"","sources":["../../../../../src/features/plugin/row-created-at/row-created-at.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAQ5C,qEAAuE;AACvE,4FAAgG;AAChG,8EAAkF;AAGlF,8EAAwF;AAGjF,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAG7B;QAFgB,gBAAW,GAAG,IAAI,CAAC;IAEpB,CAAC;IAET,cAAc,CAAC,OAAsC;QAC1D,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC5C,CAAC;IAEM,cAAc,CAAC,OAAsC;QAC1D,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,EAA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AC;CACF,CAAA;AA5DY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;;GACA,kBAAkB,CA4D9B"}
@@ -0,0 +1,11 @@
1
+ import { InternalAfterCreateRowOptions, InternalAfterMigrateRowsOptions, InternalAfterUpdateRowOptions, InternalComputeRowsOptions, IPluginService } from '../../../features/plugin/types';
2
+ export declare class RowCreatedIdPlugin implements IPluginService {
3
+ readonly isAvailable = true;
4
+ constructor();
5
+ afterCreateRow(options: InternalAfterCreateRowOptions): void;
6
+ afterUpdateRow(options: InternalAfterUpdateRowOptions): void;
7
+ computeRows(options: InternalComputeRowsOptions): void;
8
+ afterMigrateRows(options: InternalAfterMigrateRowsOptions): void;
9
+ private forEachRow;
10
+ private setCreatedId;
11
+ }
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RowCreatedIdPlugin = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const schema_ids_consts_1 = require("../../share/schema-ids.consts");
15
+ const createJsonValueStore_1 = require("../../share/utils/schema/lib/createJsonValueStore");
16
+ const traverseValue_1 = require("../../share/utils/schema/lib/traverseValue");
17
+ const schema_types_1 = require("../../share/utils/schema/types/schema.types");
18
+ let RowCreatedIdPlugin = class RowCreatedIdPlugin {
19
+ constructor() {
20
+ this.isAvailable = true;
21
+ }
22
+ afterCreateRow(options) {
23
+ this.setCreatedId(options.valueStore, '');
24
+ }
25
+ afterUpdateRow(options) {
26
+ this.setCreatedId(options.valueStore, '');
27
+ }
28
+ computeRows(options) {
29
+ for (const row of options.rows) {
30
+ const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
31
+ this.setCreatedId(valueStore, row.createdId);
32
+ row.data = valueStore.getPlainValue();
33
+ }
34
+ }
35
+ afterMigrateRows(options) {
36
+ for (const row of options.rows) {
37
+ const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
38
+ this.setCreatedId(valueStore, '');
39
+ row.data = valueStore.getPlainValue();
40
+ }
41
+ }
42
+ forEachRow(valueStore, callback) {
43
+ (0, traverseValue_1.traverseValue)(valueStore, (item) => {
44
+ if (item.schema.$ref === schema_ids_consts_1.SystemSchemaIds.RowCreatedId &&
45
+ item.type === schema_types_1.JsonSchemaTypeName.String) {
46
+ callback(item);
47
+ }
48
+ });
49
+ }
50
+ setCreatedId(valueStore, value) {
51
+ this.forEachRow(valueStore, (item) => {
52
+ item.value = value;
53
+ });
54
+ }
55
+ };
56
+ exports.RowCreatedIdPlugin = RowCreatedIdPlugin;
57
+ exports.RowCreatedIdPlugin = RowCreatedIdPlugin = __decorate([
58
+ (0, common_1.Injectable)(),
59
+ __metadata("design:paramtypes", [])
60
+ ], RowCreatedIdPlugin);
61
+ //# sourceMappingURL=row-created-id.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row-created-id.plugin.js","sourceRoot":"","sources":["../../../../../src/features/plugin/row-created-id/row-created-id.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAQ5C,qEAAuE;AACvE,4FAAgG;AAChG,8EAAkF;AAGlF,8EAAwF;AAGjF,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAG7B;QAFgB,gBAAW,GAAG,IAAI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C,CAAC;IACL,CAAC;IAEO,YAAY,CAAC,UAA0B,EAAE,KAAa;QAC5D,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA5DY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;;GACA,kBAAkB,CA4D9B"}
@@ -0,0 +1,11 @@
1
+ import { InternalAfterCreateRowOptions, InternalAfterMigrateRowsOptions, InternalAfterUpdateRowOptions, InternalComputeRowsOptions, IPluginService } from '../../../features/plugin/types';
2
+ export declare class RowHashPlugin implements IPluginService {
3
+ readonly isAvailable = true;
4
+ constructor();
5
+ afterCreateRow(options: InternalAfterCreateRowOptions): void;
6
+ afterUpdateRow(options: InternalAfterUpdateRowOptions): void;
7
+ computeRows(options: InternalComputeRowsOptions): void;
8
+ afterMigrateRows(options: InternalAfterMigrateRowsOptions): void;
9
+ private forEachRow;
10
+ private setHash;
11
+ }
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RowHashPlugin = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const schema_ids_consts_1 = require("../../share/schema-ids.consts");
15
+ const createJsonValueStore_1 = require("../../share/utils/schema/lib/createJsonValueStore");
16
+ const traverseValue_1 = require("../../share/utils/schema/lib/traverseValue");
17
+ const schema_types_1 = require("../../share/utils/schema/types/schema.types");
18
+ let RowHashPlugin = class RowHashPlugin {
19
+ constructor() {
20
+ this.isAvailable = true;
21
+ }
22
+ afterCreateRow(options) {
23
+ this.setHash(options.valueStore, '');
24
+ }
25
+ afterUpdateRow(options) {
26
+ this.setHash(options.valueStore, '');
27
+ }
28
+ computeRows(options) {
29
+ for (const row of options.rows) {
30
+ const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
31
+ this.setHash(valueStore, row.hash);
32
+ row.data = valueStore.getPlainValue();
33
+ }
34
+ }
35
+ afterMigrateRows(options) {
36
+ for (const row of options.rows) {
37
+ const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
38
+ this.setHash(valueStore, '');
39
+ row.data = valueStore.getPlainValue();
40
+ }
41
+ }
42
+ forEachRow(valueStore, callback) {
43
+ (0, traverseValue_1.traverseValue)(valueStore, (item) => {
44
+ if (item.schema.$ref === schema_ids_consts_1.SystemSchemaIds.RowHash &&
45
+ item.type === schema_types_1.JsonSchemaTypeName.String) {
46
+ callback(item);
47
+ }
48
+ });
49
+ }
50
+ setHash(valueStore, value) {
51
+ this.forEachRow(valueStore, (item) => {
52
+ item.value = value;
53
+ });
54
+ }
55
+ };
56
+ exports.RowHashPlugin = RowHashPlugin;
57
+ exports.RowHashPlugin = RowHashPlugin = __decorate([
58
+ (0, common_1.Injectable)(),
59
+ __metadata("design:paramtypes", [])
60
+ ], RowHashPlugin);
61
+ //# sourceMappingURL=row-hash.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row-hash.plugin.js","sourceRoot":"","sources":["../../../../../src/features/plugin/row-hash/row-hash.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAQ5C,qEAAu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AI,CAAC,IAAI,KAAK,iCAAkB,CAAC,MAAM,EACvC,CAAC;gBACD,QAAQ,CAAC,IAAI,CAAC,CAAC;YACjB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,OAAO,CAAC,UAA0B,EAAE,KAAa;QACvD,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA5DY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;;GACA,aAAa,CA4DzB"}
@@ -0,0 +1,11 @@
1
+ import { InternalAfterCreateRowOptions, InternalAfterMigrateRowsOptions, InternalAfterUpdateRowOptions, InternalComputeRowsOptions, IPluginService } from '../../../features/plugin/types';
2
+ export declare class RowIdPlugin implements IPluginService {
3
+ readonly isAvailable = true;
4
+ constructor();
5
+ afterCreateRow(options: InternalAfterCreateRowOptions): void;
6
+ afterUpdateRow(options: InternalAfterUpdateRowOptions): void;
7
+ computeRows(options: InternalComputeRowsOptions): void;
8
+ afterMigrateRows(options: InternalAfterMigrateRowsOptions): void;
9
+ private forEachRow;
10
+ private setId;
11
+ }
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RowIdPlugin = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const schema_ids_consts_1 = require("../../share/schema-ids.consts");
15
+ const createJsonValueStore_1 = require("../../share/utils/schema/lib/createJsonValueStore");
16
+ const traverseValue_1 = require("../../share/utils/schema/lib/traverseValue");
17
+ const schema_types_1 = require("../../share/utils/schema/types/schema.types");
18
+ let RowIdPlugin = class RowIdPlugin {
19
+ constructor() {
20
+ this.isAvailable = true;
21
+ }
22
+ afterCreateRow(options) {
23
+ this.setId(options.valueStore, '');
24
+ }
25
+ afterUpdateRow(options) {
26
+ this.setId(options.valueStore, '');
27
+ }
28
+ computeRows(options) {
29
+ for (const row of options.rows) {
30
+ const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
31
+ this.setId(valueStore, row.id);
32
+ row.data = valueStore.getPlainValue();
33
+ }
34
+ }
35
+ afterMigrateRows(options) {
36
+ for (const row of options.rows) {
37
+ const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
38
+ this.setId(valueStore, '');
39
+ row.data = valueStore.getPlainValue();
40
+ }
41
+ }
42
+ forEachRow(valueStore, callback) {
43
+ (0, traverseValue_1.traverseValue)(valueStore, (item) => {
44
+ if (item.schema.$ref === schema_ids_consts_1.SystemSchemaIds.RowId &&
45
+ item.type === schema_types_1.JsonSchemaTypeName.String) {
46
+ callback(item);
47
+ }
48
+ });
49
+ }
50
+ setId(valueStore, value) {
51
+ this.forEachRow(valueStore, (item) => {
52
+ item.value = value;
53
+ });
54
+ }
55
+ };
56
+ exports.RowIdPlugin = RowIdPlugin;
57
+ exports.RowIdPlugin = RowIdPlugin = __decorate([
58
+ (0, common_1.Injectable)(),
59
+ __metadata("design:paramtypes", [])
60
+ ], RowIdPlugin);
61
+ //# sourceMappingURL=row-id.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row-id.plugin.js","sourceRoot":"","s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AAI,EAAE,EAAE;YACjC,IACE,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,mCAAe,CAAC,KAAK;gBAC1C,IAAI,CAAC,IAAI,KAAK,iCAAkB,CAAC,MAAM,EACvC,CAAC;gBACD,QAAQ,CAAC,IAAI,CAAC,CAAC;YACjB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,UAA0B,EAAE,KAAa;QACrD,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA5DY,kCAAW;sBAAX,WAAW;IADvB,IAAA,mBAAU,GAAE;;GACA,WAAW,CA4DvB"}
@@ -0,0 +1,11 @@
1
+ import { InternalAfterCreateRowOptions, InternalAfterMigrateRowsOptions, InternalAfterUpdateRowOptions, InternalComputeRowsOptions, IPluginService } from '../../../features/plugin/types';
2
+ export declare class RowSchemaHashPlugin implements IPluginService {
3
+ readonly isAvailable = true;
4
+ constructor();
5
+ afterCreateRow(options: InternalAfterCreateRowOptions): void;
6
+ afterUpdateRow(options: InternalAfterUpdateRowOptions): void;
7
+ computeRows(options: InternalComputeRowsOptions): void;
8
+ afterMigrateRows(options: InternalAfterMigrateRowsOptions): void;
9
+ private forEachRow;
10
+ private setSchemaHash;
11
+ }
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RowSchemaHashPlugin = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const schema_ids_consts_1 = require("../../share/schema-ids.consts");
15
+ const createJsonValueStore_1 = require("../../share/utils/schema/lib/createJsonValueStore");
16
+ const traverseValue_1 = require("../../share/utils/schema/lib/traverseValue");
17
+ const schema_types_1 = require("../../share/utils/schema/types/schema.types");
18
+ let RowSchemaHashPlugin = class RowSchemaHashPlugin {
19
+ constructor() {
20
+ this.isAvailable = true;
21
+ }
22
+ afterCreateRow(options) {
23
+ this.setSchemaHash(options.valueStore, '');
24
+ }
25
+ afterUpdateRow(options) {
26
+ this.setSchemaHash(options.valueStore, '');
27
+ }
28
+ computeRows(options) {
29
+ for (const row of options.rows) {
30
+ const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
31
+ this.setSchemaHash(valueStore, row.schemaHash);
32
+ row.data = valueStore.getPlainValue();
33
+ }
34
+ }
35
+ afterMigrateRows(options) {
36
+ for (const row of options.rows) {
37
+ const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
38
+ this.setSchemaHash(valueStore, '');
39
+ row.data = valueStore.getPlainValue();
40
+ }
41
+ }
42
+ forEachRow(valueStore, callback) {
43
+ (0, traverseValue_1.traverseValue)(valueStore, (item) => {
44
+ if (item.schema.$ref === schema_ids_consts_1.SystemSchemaIds.RowSchemaHash &&
45
+ item.type === schema_types_1.JsonSchemaTypeName.String) {
46
+ callback(item);
47
+ }
48
+ });
49
+ }
50
+ setSchemaHash(valueStore, value) {
51
+ this.forEachRow(valueStore, (item) => {
52
+ item.value = value;
53
+ });
54
+ }
55
+ };
56
+ exports.RowSchemaHashPlugin = RowSchemaHashPlugin;
57
+ exports.RowSchemaHashPlugin = RowSchemaHashPlugin = __decorate([
58
+ (0, common_1.Injectable)(),
59
+ __metadata("design:paramtypes", [])
60
+ ], RowSchemaHashPlugin);
61
+ //# sourceMappingURL=row-schema-hash.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row-schema-hash.plugin.js","sourceRoot":"","sources":["../../../../../src/features/plugin/row-schema-hash/row-schema-hash.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAQ5C,qEAAuE;AACvE,4FAAgG;AAChG,8EAAkF;AAGlF,8EAAwF;AAGjF,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAG9B;QAFgB,gBAAW,GAAG,IAAI,CAAC;IAEpB,CAAC;IAET,cAAc,CAAC,OAAsC;QAC1D,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;IAEM,cAAc,CAAC,OAAsC;QAC1D,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;IAEM,WAAW,CAAC,OAAmC;QACpD,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YAC/B,MAAM,UAAU,GAAG,IAAA,2CAAoB,EACrC,OAAO,CAAC,WAAW,EACnB,EAAE,EACF,GAAG,CAAC,IAAI,CACT,CAAC;YAEF,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;YAE/C,GAAG,CAAC,IAAI,GAAG,UAAU,CAAC,aAAa,EAAE,CAAC;QACxC,CAAC;IACH,CAAC;IAEM,gBAAgB,CAAC,OAAwC;QAC9D,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YAC/B,MAAM,UAAU,GAAG,IAAA,2CAAoB,EACrC,OAAO,CAAC,WAAW,EACnB,EAAE,EACF,GAAG,CAAC,IAAI,CACT,CAAC;YAEF,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YAEnC,GAAG,CAAC,IAAI,GAAG,UAAU,CAAC,aAAa,EAAE,CAAC;QACxC,CAAC;IACH,CAAC;IAEO,UAAU,CAChB,UAA0B,EAC1B,QAA+C;QAE/C,IAAA,6BAAa,EAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACjC,IACE,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,mCAAe,CAAC,aAAa;gBAClD,IAAI,CAAC,IAAI,KAAK,iCAAkB,CAAC,MAAM,EACvC,CAAC;gBACD,QAAQ,CAAC,IAAI,CAAC,CAAC;YACjB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,aAAa,CAAC,UAA0B,EAAE,KAAa;QAC7D,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA5DY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;;GACA,mBAAmB,CA4D/B"}
@@ -0,0 +1,11 @@
1
+ import { InternalAfterCreateRowOptions, InternalAfterMigrateRowsOptions, InternalAfterUpdateRowOptions, InternalComputeRowsOptions, IPluginService } from '../../../features/plugin/types';
2
+ export declare class RowUpdatedAtPlugin implements IPluginService {
3
+ readonly isAvailable = true;
4
+ constructor();
5
+ afterCreateRow(options: InternalAfterCreateRowOptions): void;
6
+ afterUpdateRow(options: InternalAfterUpdateRowOptions): void;
7
+ computeRows(options: InternalComputeRowsOptions): void;
8
+ afterMigrateRows(options: InternalAfterMigrateRowsOptions): void;
9
+ private forEachRow;
10
+ private setUpdatedAt;
11
+ }
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RowUpdatedAtPlugin = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const schema_ids_consts_1 = require("../../share/schema-ids.consts");
15
+ const createJsonValueStore_1 = require("../../share/utils/schema/lib/createJsonValueStore");
16
+ const traverseValue_1 = require("../../share/utils/schema/lib/traverseValue");
17
+ const schema_types_1 = require("../../share/utils/schema/types/schema.types");
18
+ let RowUpdatedAtPlugin = class RowUpdatedAtPlugin {
19
+ constructor() {
20
+ this.isAvailable = true;
21
+ }
22
+ afterCreateRow(options) {
23
+ this.setUpdatedAt(options.valueStore, '');
24
+ }
25
+ afterUpdateRow(options) {
26
+ this.setUpdatedAt(options.valueStore, '');
27
+ }
28
+ computeRows(options) {
29
+ for (const row of options.rows) {
30
+ const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
31
+ this.setUpdatedAt(valueStore, row.updatedAt.toISOString());
32
+ row.data = valueStore.getPlainValue();
33
+ }
34
+ }
35
+ afterMigrateRows(options) {
36
+ for (const row of options.rows) {
37
+ const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
38
+ this.setUpdatedAt(valueStore, '');
39
+ row.data = valueStore.getPlainValue();
40
+ }
41
+ }
42
+ forEachRow(valueStore, callback) {
43
+ (0, traverseValue_1.traverseValue)(valueStore, (item) => {
44
+ if (item.schema.$ref === schema_ids_consts_1.SystemSchemaIds.RowUpdatedAt &&
45
+ item.type === schema_types_1.JsonSchemaTypeName.String) {
46
+ callback(item);
47
+ }
48
+ });
49
+ }
50
+ setUpdatedAt(valueStore, value) {
51
+ this.forEachRow(valueStore, (item) => {
52
+ item.value = value;
53
+ });
54
+ }
55
+ };
56
+ exports.RowUpdatedAtPlugin = RowUpdatedAtPlugin;
57
+ exports.RowUpdatedAtPlugin = RowUpdatedAtPlugin = __decorate([
58
+ (0, common_1.Injectable)(),
59
+ __metadata("design:paramtypes", [])
60
+ ], RowUpdatedAtPlugin);
61
+ //# sourceMappingURL=row-updated-at.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row-updated-at.plugin.js","sourceRoot":"","sources":["../../../../../src/features/plugin/row-updated-at/row-updated-at.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAQ5C,qEAAuE;AACvE,4FAAgG;AAChG,8EAAkF;AAGlF,8EAAwF;AAGjF,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAG7B;QAFgB,gBAAW,GAAG,IAAI,CAAC;IAEpB,CAAC;IAET,cAAc,CAAC,OAAsC;QAC1D,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC5C,CAAC;IAEM,cAAc,CAAC,OAAsC;QAC1D,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC5C,CAAC;IAEM,WAAW,CAAC,OAAmC;QACpD,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YAC/B,MAAM,UAAU,GAAG,IAAA,2CAAoB,EACrC,OAAO,CAAC,WAAW,EACnB,EAAE,EACF,GAAG,CAAC,IAAI,CACT,CAAC;YAEF,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC;YAE3D,GAAG,CAAC,IAAI,GAAG,UAAU,CAAC,aAAa,EAAE,CAAC;QACxC,CAAC;IACH,CAAC;IAEM,gBAAgB,CAAC,OAAwC;QAC9D,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YAC/B,MAAM,UAAU,GAAG,IAAA,2CAAoB,EACrC,OAAO,CAAC,WAAW,EACnB,EAAE,EACF,GAAG,CAAC,IAAI,CACT,CAAC;YAEF,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YAElC,GAAG,CAAC,IAAI,GAAG,UAAU,CAAC,aAAa,EAAE,CAAC;QACxC,CAAC;IACH,CAAC;IAEO,UAAU,CAChB,UAA0B,EAC1B,QAA+C;QAE/C,IAAA,6BAAa,EAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACjC,IACE,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,mCAAe,CAAC,YAAY;gBACjD,IAAI,CAAC,IAAI,KAAK,iCAAkB,CAAC,MAAM,EACvC,CAAC;gBACD,QAAQ,CAAC,IAAI,CAAC,CAAC;YACjB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,YAAY,CAAC,UAA0B,EAAE,KAAa;QAC5D,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA5DY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;;GACA,kBAAkB,CA4D9B"}
@@ -0,0 +1,11 @@
1
+ import { InternalAfterCreateRowOptions, InternalAfterMigrateRowsOptions, InternalAfterUpdateRowOptions, InternalComputeRowsOptions, IPluginService } from '../../../features/plugin/types';
2
+ export declare class RowVersionIdPlugin implements IPluginService {
3
+ readonly isAvailable = true;
4
+ constructor();
5
+ afterCreateRow(options: InternalAfterCreateRowOptions): void;
6
+ afterUpdateRow(options: InternalAfterUpdateRowOptions): void;
7
+ computeRows(options: InternalComputeRowsOptions): void;
8
+ afterMigrateRows(options: InternalAfterMigrateRowsOptions): void;
9
+ private forEachRow;
10
+ private setVersionId;
11
+ }
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RowVersionIdPlugin = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const schema_ids_consts_1 = require("../../share/schema-ids.consts");
15
+ const createJsonValueStore_1 = require("../../share/utils/schema/lib/createJsonValueStore");
16
+ const traverseValue_1 = require("../../share/utils/schema/lib/traverseValue");
17
+ const schema_types_1 = require("../../share/utils/schema/types/schema.types");
18
+ let RowVersionIdPlugin = class RowVersionIdPlugin {
19
+ constructor() {
20
+ this.isAvailable = true;
21
+ }
22
+ afterCreateRow(options) {
23
+ this.setVersionId(options.valueStore, '');
24
+ }
25
+ afterUpdateRow(options) {
26
+ this.setVersionId(options.valueStore, '');
27
+ }
28
+ computeRows(options) {
29
+ for (const row of options.rows) {
30
+ const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
31
+ this.setVersionId(valueStore, row.versionId);
32
+ row.data = valueStore.getPlainValue();
33
+ }
34
+ }
35
+ afterMigrateRows(options) {
36
+ for (const row of options.rows) {
37
+ const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
38
+ this.setVersionId(valueStore, '');
39
+ row.data = valueStore.getPlainValue();
40
+ }
41
+ }
42
+ forEachRow(valueStore, callback) {
43
+ (0, traverseValue_1.traverseValue)(valueStore, (item) => {
44
+ if (item.schema.$ref === schema_ids_consts_1.SystemSchemaIds.RowVersionId &&
45
+ item.type === schema_types_1.JsonSchemaTypeName.String) {
46
+ callback(item);
47
+ }
48
+ });
49
+ }
50
+ setVersionId(valueStore, value) {
51
+ this.forEachRow(valueStore, (item) => {
52
+ item.value = value;
53
+ });
54
+ }
55
+ };
56
+ exports.RowVersionIdPlugin = RowVersionIdPlugin;
57
+ exports.RowVersionIdPlugin = RowVersionIdPlugin = __decorate([
58
+ (0, common_1.Injectable)(),
59
+ __metadata("design:paramtypes", [])
60
+ ], RowVersionIdPlugin);
61
+ //# sourceMappingURL=row-version-id.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row-version-id.plugin.js","sourceRoot":"","sources":["../../../../../src/features/plugin/row-version-id/row-version-id.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAQ5C,qEAAuE;AACvE,4FAAgG;AAChG,8EAAkF;AAGlF,8EAAwF;AAGjF,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAG7B;QAFgB,gBAAW,GAAG,IAAI,CAAC;IAEpB,CAAC;IAET,cAAc,CAAC,OAAsC;QAC1D,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC5C,CAAC;IAEM,cAAc,CAAC,OAAsC;QAC1D,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC5C,CAAC;IAEM,WAAW,CAAC,OAAmC;QACpD,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YAC/B,MAAM,UAAU,GAAG,IAAA,2CAAoB,EACrC,OA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PluginService {
42
42
  isAvailable: boolean;
43
- afterCreateRow(options: InternalAfterCreateRowOptions): Promise<void>;
44
- afterUpdateRow(options: InternalAfterUpdateRowOptions): Promise<void>;
45
- computeRows(options: InternalComputeRowsOptions): Promise<void>;
46
- afterMigrateRows(options: InternalAfterMigrateRowsOptions): Promise<void>;
43
+ afterCreateRow(options: InternalAfterCreateRowOptions): Promise<void> | void;
44
+ afterUpdateRow(options: InternalAfterUpdateRowOptions): Promise<void> | void;
45
+ computeRows(options: InternalComputeRowsOptions): Promise<void> | void;
46
+ afterMigrateRows(options: InternalAfterMigrateRowsOptions): Promise<void> | void;
47
47
  }
@@ -5,9 +5,9 @@ const cqrs_1 = require("@nestjs/cqrs");
5
5
  const testing_1 = require("@nestjs/testing");
6
6
  const async_hooks_1 = require("async_hooks");
7
7
  const nanoid_1 = require("nanoid");
8
+ const app_options_module_1 = require("../../../../../core/app-options.module");
8
9
  const index_1 = require("../index");
9
10
  const handlers_1 = require("../../../queries/handlers");
10
- const handlers_2 = require("../../../../share/queries/handlers");
11
11
  const share_module_1 = require("../../../../share/share.module");
12
12
  const share_transactional_queries_1 = require("../../../../share/share.transactional.queries");
13
13
  const system_tables_consts_1 = require("../../../../share/system-tables.consts");
@@ -18,7 +18,13 @@ const endpoint_notification_service_1 = require("../../../../../infrastructure/n
18
18
  const notification_module_1 = require("../../../../../infrastructure/notification/notification.module");
19
19
  const createTestingModule = async () => {
20
20
  const module = await testing_1.Test.createTestingModule({
21
- imports: [database_module_1.DatabaseModule, cqrs_1.CqrsModule, share_module_1.ShareModule, notification_module_1.NotificationModule],
21
+ imports: [
22
+ database_module_1.DatabaseModule,
23
+ cqrs_1.CqrsModule,
24
+ share_module_1.ShareModule,
25
+ app_options_module_1.AppOptionsModule.forRoot({ mode: 'monolith' }),
26
+ notification_module_1.NotificationModule,
27
+ ],
22
28
  providers: [
23
29
  {
24
30
  provide: async_hooks_1.AsyncLocalStorage,
@@ -28,14 +34,9 @@ const createTestingModule = async () => {
28
34
  ...handlers_1.PROJECT_QUERIES,
29
35
  ],
30
36
  }).compile();
37
+ await module.init();
31
38
  const prismaService = module.get(prisma_service_1.PrismaService);
32
39
  const commandBus = module.get(cqrs_1.CommandBus);
33
- commandBus.register([...index_1.PROJECT_HANDLERS]);
34
- const queryBus = module.get(cqrs_1.QueryBus);
35
- queryBus.register([
36
- ...handlers_2.SHARE_QUERIES_HANDLERS,
37
- ...handlers_1.PROJECT_QUERIES,
38
- ]);
39
40
  const transactionService = module.get(transaction_prisma_service_1.TransactionPrismaService);
40
41
  const shareTransactionalQueries = module.get(share_transactional_queries_1.ShareTransactionalQueries);
41
42
  const endpointNotificationService = module.get(endpoint_notification_service_1.EndpointNotificationService);
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../src/features/project/commands/handlers/__tests__/utils.ts"],"names":[],"mappings":";;;AAAA,uCAAgE;AAEhE,6CAAsD;AACtD,6CAAgD;AAChD,mCAAgC;AAChC,oCAAgF;AAChF,wDAAwE;AACxE,iEAA6E;AAC7E,iEAA8D;AAC9D,+FAA2F;AAC3F,iFAAuE;AACvE,4FAA6E;AAC7E,0FAA2E;AAC3E,kHAAkG;AAClG,4HAA4G;AAC5G,wGAAyF;AAElF,MAAM,mBAAmB,GAAG,KAAK,IAAI,EAAE;IAC5C,MAAM,MAAM,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;QAC3D,OAAO,EAAE,CAAC,gCAAc,EAAE,iBAAU,EAAE,0BAAW,EAAE,wCAAkB,CAAC;QACtE,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,+BAAiB;gBAC1B,QAAQ,EAAE,IAAI,+BAAiB,EAAE;aAClC;YACD,GAAG,wBAAgB;YACnB,GAAG,0BAAe;SACnB;KACF,CAAC,CAAC,OAAO,EAAE,CAAC;IAEb,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,8BAAa,CAAC,CAAC;IAEhD,MAAM,UAAU,GAAG,MAAM,C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B,SAAS,EAAE,kBAAkB;YAC7B,QAAQ,EAAE,IAAI;YACd,SAAS,EAAE;gBACT,OAAO,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE;aAChC;SACF;KACF,CAAC,CAAC;IACH,MAAM,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC;QAC/B,IAAI,EAAE;YACJ,EAAE,EAAE,OAAO;YACX,SAAS,EAAE,cAAc;YACzB,SAAS,EAAE,mBAAmB;YAC9B,QAAQ,EAAE,KAAK;YACf,SAAS,EAAE;gBACT,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,EAAE;aACjC;SACF;KACF,CAAC,CAAC;IAEH,OAAO;QACL,cAAc;QACd,SAAS;QACT,WAAW;QACX,QAAQ;QACR,UAAU;QACV,cAAc;QACd,eAAe;QACf,eAAe;QACf,gBAAgB;QAChB,oBAAoB;QACpB,oBAAoB;QACpB,OAAO;QACP,cAAc;QACd,kBAAkB;QAClB,mBAAmB;KACpB,CAAC;AACJ,CAAC,CAAC;AA9GW,QAAA,cAAc,kBA8GzB;AAEK,MAAM,UAAU,GAAG,CAAI,iBAAoB,EAAE,EAAE,CACpD,iBAAiB,YAAY,KAAK;IAChC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,CAAC;IAChD,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AAHxC,QAAA,UAAU,cAG8B"}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../src/features/project/commands/handlers/__tests__/utils.ts"],"names":[],"mappings":";;;AAAA,uCAAsD;AACtD,6CAAsD;AACtD,6CAAgD;AAChD,mCAAgC;AAChC,+EAA+D;AAC/D,oCAAgF;AAChF,wDAAwE;AACxE,iEAA8D;AAC9D,+FAA2F;AAC3F,iFAAuE;AACvE,4FAA6E;AAC7E,0FAA2E;AAC3E,kHAAkG;AAClG,4HAA4G;AAC5G,wGAAy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