@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.
- package/dist/package.json +65 -57
- package/dist/prisma/seed/generateSeedApi.js +1 -1
- package/dist/prisma/seed/generateSeedApi.js.map +1 -1
- package/dist/src/__tests__/utils/prepareProject.js +4 -4
- package/dist/src/__tests__/utils/prepareProject.js.map +1 -1
- package/dist/src/__tests__/utils/schema/schema.mocks.d.ts +1 -4
- package/dist/src/__tests__/utils/schema/schema.mocks.js +4 -7
- package/dist/src/__tests__/utils/schema/schema.mocks.js.map +1 -1
- package/dist/src/api/rest-api/revision/dto/create-table.dto.js +1 -1
- package/dist/src/api/rest-api/revision/dto/create-table.dto.js.map +1 -1
- package/dist/src/api/rest-api/row/dto/update-row.dto.js +1 -1
- package/dist/src/api/rest-api/row/dto/update-row.dto.js.map +1 -1
- package/dist/src/api/rest-api/row/model/row.model.js +1 -1
- package/dist/src/api/rest-api/row/model/row.model.js.map +1 -1
- package/dist/src/api/rest-api/share/model/order-by.model.d.ts +13 -0
- package/dist/src/api/rest-api/share/model/order-by.model.js +39 -0
- package/dist/src/api/rest-api/share/model/order-by.model.js.map +1 -0
- package/dist/src/api/rest-api/share/utils/mapToPrismaOrderBy.d.ts +3 -0
- package/dist/src/api/rest-api/share/utils/mapToPrismaOrderBy.js +12 -0
- package/dist/src/api/rest-api/share/utils/mapToPrismaOrderBy.js.map +1 -0
- package/dist/src/api/rest-api/share/validators/is-unique-order-by-fields.validator.d.ts +2 -0
- package/dist/src/api/rest-api/share/validators/is-unique-order-by-fields.validator.js +28 -0
- package/dist/src/api/rest-api/share/validators/is-unique-order-by-fields.validator.js.map +1 -0
- package/dist/src/api/rest-api/table/dto/create-row.dto.js +1 -1
- package/dist/src/api/rest-api/table/dto/create-row.dto.js.map +1 -1
- package/dist/src/api/rest-api/table/dto/get-table-rows.dto.d.ts +2 -0
- package/dist/src/api/rest-api/table/dto/get-table-rows.dto.js +28 -1
- package/dist/src/api/rest-api/table/dto/get-table-rows.dto.js.map +1 -1
- package/dist/src/api/rest-api/table/table-by-id.controller.d.ts +1 -1
- package/dist/src/api/rest-api/table/table-by-id.controller.js +8 -4
- package/dist/src/api/rest-api/table/table-by-id.controller.js.map +1 -1
- package/dist/src/app-mode.d.ts +4 -0
- package/dist/src/app-mode.js +5 -0
- package/dist/src/app-mode.js.map +1 -0
- package/dist/src/app.module.js +1 -1
- package/dist/src/app.module.js.map +1 -1
- package/dist/src/core/app-options.module.d.ts +5 -0
- package/dist/src/core/app-options.module.js +27 -0
- package/dist/src/core/app-options.module.js.map +1 -0
- package/dist/src/core/core.module.d.ts +3 -0
- package/dist/src/core/core.module.js +40 -33
- package/dist/src/core/core.module.js.map +1 -1
- package/dist/src/features/auth/strategy/jwt.strategy.d.ts +3 -1
- package/dist/src/features/draft/commands/handlers/__tests__/utils.js +10 -20
- package/dist/src/features/draft/commands/handlers/__tests__/utils.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.d.ts +1 -3
- package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.js +4 -4
- package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.js.map +1 -1
- package/dist/src/features/draft/draft.handler.d.ts +1 -2
- package/dist/src/features/draft/draft.handler.js.map +1 -1
- package/dist/src/features/plugin/index.d.ts +9 -0
- package/dist/src/features/plugin/index.js +22 -0
- package/dist/src/features/plugin/index.js.map +1 -0
- package/dist/src/features/plugin/plugin.list.service.d.ts +8 -1
- package/dist/src/features/plugin/plugin.list.service.js +23 -2
- package/dist/src/features/plugin/plugin.list.service.js.map +1 -1
- package/dist/src/features/plugin/plugin.module.js +3 -3
- package/dist/src/features/plugin/plugin.module.js.map +1 -1
- package/dist/src/features/plugin/row-created-at/row-created-at.plugin.d.ts +11 -0
- package/dist/src/features/plugin/row-created-at/row-created-at.plugin.js +61 -0
- package/dist/src/features/plugin/row-created-at/row-created-at.plugin.js.map +1 -0
- package/dist/src/features/plugin/row-created-id/row-created-id.plugin.d.ts +11 -0
- package/dist/src/features/plugin/row-created-id/row-created-id.plugin.js +61 -0
- package/dist/src/features/plugin/row-created-id/row-created-id.plugin.js.map +1 -0
- package/dist/src/features/plugin/row-hash/row-hash.plugin.d.ts +11 -0
- package/dist/src/features/plugin/row-hash/row-hash.plugin.js +61 -0
- package/dist/src/features/plugin/row-hash/row-hash.plugin.js.map +1 -0
- package/dist/src/features/plugin/row-id/row-id.plugin.d.ts +11 -0
- package/dist/src/features/plugin/row-id/row-id.plugin.js +61 -0
- package/dist/src/features/plugin/row-id/row-id.plugin.js.map +1 -0
- package/dist/src/features/plugin/row-schema-hash/row-schema-hash.plugin.d.ts +11 -0
- package/dist/src/features/plugin/row-schema-hash/row-schema-hash.plugin.js +61 -0
- package/dist/src/features/plugin/row-schema-hash/row-schema-hash.plugin.js.map +1 -0
- package/dist/src/features/plugin/row-updated-at/row-updated-at.plugin.d.ts +11 -0
- package/dist/src/features/plugin/row-updated-at/row-updated-at.plugin.js +61 -0
- package/dist/src/features/plugin/row-updated-at/row-updated-at.plugin.js.map +1 -0
- package/dist/src/features/plugin/row-version-id/row-version-id.plugin.d.ts +11 -0
- package/dist/src/features/plugin/row-version-id/row-version-id.plugin.js +61 -0
- package/dist/src/features/plugin/row-version-id/row-version-id.plugin.js.map +1 -0
- package/dist/src/features/plugin/types.d.ts +4 -4
- package/dist/src/features/project/commands/handlers/__tests__/utils.js +9 -8
- package/dist/src/features/project/commands/handlers/__tests__/utils.js.map +1 -1
- package/dist/src/features/share/json-schema-store.service.js +9 -2
- package/dist/src/features/share/json-schema-store.service.js.map +1 -1
- package/dist/src/features/share/json-schema-validator.service.d.ts +1 -0
- package/dist/src/features/share/json-schema-validator.service.js +24 -2
- package/dist/src/features/share/json-schema-validator.service.js.map +1 -1
- package/dist/src/features/share/schema/meta-schema.d.ts +1 -0
- package/dist/src/features/share/schema/meta-schema.js +45 -19
- package/dist/src/features/share/schema/meta-schema.js.map +1 -1
- package/dist/src/features/share/schema/plugins/index.d.ts +8 -0
- package/dist/src/features/share/schema/plugins/index.js +25 -0
- package/dist/src/features/share/schema/plugins/index.js.map +1 -0
- package/dist/src/features/share/schema/plugins/row-created-at.schema.d.ts +4 -0
- package/dist/src/features/share/schema/plugins/row-created-at.schema.js +15 -0
- package/dist/src/features/share/schema/plugins/row-created-at.schema.js.map +1 -0
- package/dist/src/features/share/schema/plugins/row-created-id.schema.d.ts +4 -0
- package/dist/src/features/share/schema/plugins/row-created-id.schema.js +15 -0
- package/dist/src/features/share/schema/plugins/row-created-id.schema.js.map +1 -0
- package/dist/src/features/share/schema/plugins/row-hash.schema.d.ts +4 -0
- package/dist/src/features/share/schema/plugins/row-hash.schema.js +15 -0
- package/dist/src/features/share/schema/plugins/row-hash.schema.js.map +1 -0
- package/dist/src/features/share/schema/plugins/row-id.schema.d.ts +4 -0
- package/dist/src/features/share/schema/plugins/row-id.schema.js +15 -0
- package/dist/src/features/share/schema/plugins/row-id.schema.js.map +1 -0
- package/dist/src/features/share/schema/plugins/row-schema-hash.schema.d.ts +4 -0
- package/dist/src/features/share/schema/plugins/row-schema-hash.schema.js +15 -0
- package/dist/src/features/share/schema/plugins/row-schema-hash.schema.js.map +1 -0
- package/dist/src/features/share/schema/plugins/row-updated-at.schema.d.ts +4 -0
- package/dist/src/features/share/schema/plugins/row-updated-at.schema.js +15 -0
- package/dist/src/features/share/schema/plugins/row-updated-at.schema.js.map +1 -0
- package/dist/src/features/share/schema/plugins/row-version-id.schema.d.ts +4 -0
- package/dist/src/features/share/schema/plugins/row-version-id.schema.js +15 -0
- package/dist/src/features/share/schema/plugins/row-version-id.schema.js.map +1 -0
- package/dist/src/features/share/schema/shared-fields.d.ts +11 -0
- package/dist/src/features/share/schema/shared-fields.js +15 -0
- package/dist/src/features/share/schema/shared-fields.js.map +1 -0
- package/dist/src/features/share/schema-ids.consts.d.ts +7 -0
- package/dist/src/features/share/schema-ids.consts.js +7 -0
- package/dist/src/features/share/schema-ids.consts.js.map +1 -1
- package/dist/src/features/share/utils/schema/lib/createJsonSchemaStore.d.ts +2 -1
- package/dist/src/features/share/utils/schema/lib/createJsonSchemaStore.js +22 -4
- package/dist/src/features/share/utils/schema/lib/createJsonSchemaStore.js.map +1 -1
- package/dist/src/features/share/utils/schema/model/schema/json-array.store.d.ts +3 -0
- package/dist/src/features/share/utils/schema/model/schema/json-array.store.js +3 -0
- package/dist/src/features/share/utils/schema/model/schema/json-array.store.js.map +1 -1
- package/dist/src/features/share/utils/schema/model/schema/json-boolean.store.d.ts +4 -0
- package/dist/src/features/share/utils/schema/model/schema/json-boolean.store.js +4 -0
- package/dist/src/features/share/utils/schema/model/schema/json-boolean.store.js.map +1 -1
- package/dist/src/features/share/utils/schema/model/schema/json-number.store.d.ts +4 -0
- package/dist/src/features/share/utils/schema/model/schema/json-number.store.js +4 -0
- package/dist/src/features/share/utils/schema/model/schema/json-number.store.js.map +1 -1
- package/dist/src/features/share/utils/schema/model/schema/json-object.store.d.ts +3 -0
- package/dist/src/features/share/utils/schema/model/schema/json-object.store.js +3 -0
- package/dist/src/features/share/utils/schema/model/schema/json-object.store.js.map +1 -1
- package/dist/src/features/share/utils/schema/model/schema/json-string.store.d.ts +8 -0
- package/dist/src/features/share/utils/schema/model/schema/json-string.store.js +12 -5
- package/dist/src/features/share/utils/schema/model/schema/json-string.store.js.map +1 -1
- package/dist/src/features/share/utils/schema/types/schema.types.d.ts +20 -0
- package/dist/src/features/table/queries/handlers/get-rows-by-table.handler.js +8 -9
- package/dist/src/features/table/queries/handlers/get-rows-by-table.handler.js.map +1 -1
- package/dist/src/features/table/queries/impl/get-rows-by-table.query.d.ts +3 -0
- package/dist/src/features/table/queries/impl/get-rows-by-table.query.js.map +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +1 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/infrastructure/health/database.check.d.ts +1 -1
- package/dist/src/infrastructure/health/notification.check.d.ts +1 -1
- package/dist/src/infrastructure/notification/endpoint-notification.service.d.ts +2 -2
- package/dist/src/infrastructure/notification/endpoint-notification.service.js +1 -2
- package/dist/src/infrastructure/notification/endpoint-notification.service.js.map +1 -1
- package/dist/src/infrastructure/notification/in-memory-notification-client.d.ts +7 -0
- package/dist/src/infrastructure/notification/in-memory-notification-client.js +13 -0
- package/dist/src/infrastructure/notification/in-memory-notification-client.js.map +1 -0
- package/dist/src/infrastructure/notification/notification-client.interface.d.ts +3 -0
- package/dist/src/infrastructure/notification/notification-client.interface.js +3 -0
- package/dist/src/infrastructure/notification/notification-client.interface.js.map +1 -0
- package/dist/src/infrastructure/notification/notification.module.js +13 -20
- package/dist/src/infrastructure/notification/notification.module.js.map +1 -1
- package/dist/src/infrastructure/notification/redis-notification-client.d.ts +7 -0
- package/dist/src/infrastructure/notification/redis-notification-client.js +13 -0
- package/dist/src/infrastructure/notification/redis-notification-client.js.map +1 -0
- package/dist/src/main.js +7 -1
- package/dist/src/main.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +65 -57
- package/dist/src/infrastructure/notification/in-memory-client.d.ts +0 -10
- package/dist/src/infrastructure/notification/in-memory-client.js +0 -24
- package/dist/src/infrastructure/notification/in-memory-client.js.map +0 -1
- package/dist/src/infrastructure/notification/in-memory-server.d.ts +0 -6
- package/dist/src/infrastructure/notification/in-memory-server.js +0 -19
- package/dist/src/infrastructure/notification/in-memory-server.js.map +0 -1
- package/dist/src/infrastructure/notification/notification-event-emitter.d.ts +0 -2
- package/dist/src/infrastructure/notification/notification-event-emitter.js +0 -6
- package/dist/src/infrastructure/notification/notification-event-emitter.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-by-id.controller.js","sourceRoot":"","sources":["../../../../../src/api/rest-api/table/table-by-id.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"table-by-id.controller.js","source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|
@@ -21,7 +21,7 @@ exports.AppModule = AppModule = __decorate([
|
|
|
21
21
|
(0, common_1.Module)({
|
|
22
22
|
imports: [
|
|
23
23
|
config_1.ConfigModule.forRoot(),
|
|
24
|
-
core_module_1.CoreModule,
|
|
24
|
+
core_module_1.CoreModule.forRoot({ mode: 'microservice' }),
|
|
25
25
|
metrics_api_module_1.MetricsApiModule,
|
|
26
26
|
graceful_shutdown_module_1.GracefulShutdownModule,
|
|
27
27
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA8C;AAC9C,uCAA+C;AAC/C,kGAAgG;AAChG,oDAAkD;AAClD,0GAAuG;AACvG,wFAAqF;AAW9E,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IATrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,qBAAY,CAAC,OAAO,EAAE;YACtB,wBAAU;
|
|
1
|
+
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA8C;AAC9C,uCAA+C;AAC/C,kGAAgG;AAChG,oDAAkD;AAClD,0GAAuG;AACvG,wFAAqF;AAW9E,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IATrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,qBAAY,CAAC,OAAO,EAAE;YACtB,wBAAU,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;YAC5C,qCAAgB;YAChB,iDAAsB;SACvB;QACD,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,sBAAe,EAAE,QAAQ,EAAE,wCAAkB,EAAE,CAAC;KACxE,CAAC;GACW,SAAS,CAAG"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 AppOptionsModule_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.AppOptionsModule = void 0;
|
|
11
|
+
const common_1 = require("@nestjs/common");
|
|
12
|
+
const app_mode_1 = require("../app-mode");
|
|
13
|
+
let AppOptionsModule = AppOptionsModule_1 = class AppOptionsModule {
|
|
14
|
+
static forRoot(options) {
|
|
15
|
+
return {
|
|
16
|
+
module: AppOptionsModule_1,
|
|
17
|
+
providers: [{ provide: app_mode_1.APP_OPTIONS_TOKEN, useValue: options }],
|
|
18
|
+
exports: [app_mode_1.APP_OPTIONS_TOKEN],
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.AppOptionsModule = AppOptionsModule;
|
|
23
|
+
exports.AppOptionsModule = AppOptionsModule = AppOptionsModule_1 = __decorate([
|
|
24
|
+
(0, common_1.Global)(),
|
|
25
|
+
(0, common_1.Module)({})
|
|
26
|
+
], AppOptionsModule);
|
|
27
|
+
//# sourceMappingURL=app-options.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-options.module.js","sourceRoot":"","sources":["../../../src/core/app-options.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,0CAA6D;AAItD,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAC3B,MAAM,CAAC,OAAO,CAAC,OAAmB;QAChC,OAAO;YACL,MAAM,EAAE,kBAAgB;YACxB,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,4BAAiB,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;YAC9D,OAAO,EAAE,CAAC,4BAAiB,CAAC;SAC7B,CAAC;IACJ,CAAC;CACF,CAAA;AARY,4CAAgB;2BAAhB,gBAAgB;IAF5B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,gBAAgB,CAQ5B"}
|
|
@@ -5,12 +5,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
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
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
+
var CoreModule_1;
|
|
8
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
10
|
exports.CoreModule = void 0;
|
|
10
11
|
const common_1 = require("@nestjs/common");
|
|
11
12
|
const config_1 = require("@nestjs/config");
|
|
12
13
|
const core_1 = require("@nestjs/core");
|
|
13
14
|
const schedule_1 = require("@nestjs/schedule");
|
|
15
|
+
const app_options_module_1 = require("./app-options.module");
|
|
14
16
|
const auth_module_1 = require("../features/auth/auth.module");
|
|
15
17
|
const branch_module_1 = require("../features/branch/branch.module");
|
|
16
18
|
const clean_module_1 = require("../infrastructure/clean/clean.module");
|
|
@@ -30,40 +32,45 @@ const revision_module_1 = require("../features/revision/revision.module");
|
|
|
30
32
|
const row_module_1 = require("../features/row/row.module");
|
|
31
33
|
const table_module_1 = require("../features/table/table.module");
|
|
32
34
|
const user_module_1 = require("../features/user/user.module");
|
|
33
|
-
let CoreModule = class CoreModule {
|
|
35
|
+
let CoreModule = CoreModule_1 = class CoreModule {
|
|
36
|
+
static forRoot(options) {
|
|
37
|
+
return {
|
|
38
|
+
module: CoreModule_1,
|
|
39
|
+
imports: [
|
|
40
|
+
app_options_module_1.AppOptionsModule.forRoot(options),
|
|
41
|
+
auth_module_1.AuthModule,
|
|
42
|
+
config_1.ConfigModule.forRoot(),
|
|
43
|
+
database_module_1.DatabaseModule,
|
|
44
|
+
graphql_api_module_1.GraphqlApiModule,
|
|
45
|
+
rest_api_module_1.RestApiModule,
|
|
46
|
+
core_1.RouterModule.register([
|
|
47
|
+
{
|
|
48
|
+
path: '/api',
|
|
49
|
+
module: rest_api_module_1.RestApiModule,
|
|
50
|
+
},
|
|
51
|
+
]),
|
|
52
|
+
schedule_1.ScheduleModule.forRoot(),
|
|
53
|
+
configuration_module_1.ConfigurationModule,
|
|
54
|
+
clean_module_1.CleanModule,
|
|
55
|
+
notification_module_1.NotificationModule,
|
|
56
|
+
health_module_1.HealthModule,
|
|
57
|
+
email_module_1.EmailModule,
|
|
58
|
+
user_module_1.UserModule,
|
|
59
|
+
organization_module_1.OrganizationModule,
|
|
60
|
+
project_module_1.ProjectModule,
|
|
61
|
+
branch_module_1.BranchModule,
|
|
62
|
+
revision_module_1.RevisionModule,
|
|
63
|
+
table_module_1.TableModule,
|
|
64
|
+
row_module_1.RowModule,
|
|
65
|
+
draft_module_1.DraftModule,
|
|
66
|
+
endpoint_module_1.EndpointModule,
|
|
67
|
+
metrics_module_1.MetricsModule,
|
|
68
|
+
],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
34
71
|
};
|
|
35
72
|
exports.CoreModule = CoreModule;
|
|
36
|
-
exports.CoreModule = CoreModule = __decorate([
|
|
37
|
-
(0, common_1.Module)({
|
|
38
|
-
imports: [
|
|
39
|
-
auth_module_1.AuthModule,
|
|
40
|
-
config_1.ConfigModule.forRoot(),
|
|
41
|
-
database_module_1.DatabaseModule,
|
|
42
|
-
graphql_api_module_1.GraphqlApiModule,
|
|
43
|
-
rest_api_module_1.RestApiModule,
|
|
44
|
-
core_1.RouterModule.register([
|
|
45
|
-
{
|
|
46
|
-
path: '/api',
|
|
47
|
-
module: rest_api_module_1.RestApiModule,
|
|
48
|
-
},
|
|
49
|
-
]),
|
|
50
|
-
schedule_1.ScheduleModule.forRoot(),
|
|
51
|
-
configuration_module_1.ConfigurationModule,
|
|
52
|
-
clean_module_1.CleanModule,
|
|
53
|
-
notification_module_1.NotificationModule,
|
|
54
|
-
health_module_1.HealthModule,
|
|
55
|
-
email_module_1.EmailModule,
|
|
56
|
-
user_module_1.UserModule,
|
|
57
|
-
organization_module_1.OrganizationModule,
|
|
58
|
-
project_module_1.ProjectModule,
|
|
59
|
-
branch_module_1.BranchModule,
|
|
60
|
-
revision_module_1.RevisionModule,
|
|
61
|
-
table_module_1.TableModule,
|
|
62
|
-
row_module_1.RowModule,
|
|
63
|
-
draft_module_1.DraftModule,
|
|
64
|
-
endpoint_module_1.EndpointModule,
|
|
65
|
-
metrics_module_1.MetricsModule,
|
|
66
|
-
],
|
|
67
|
-
})
|
|
73
|
+
exports.CoreModule = CoreModule = CoreModule_1 = __decorate([
|
|
74
|
+
(0, common_1.Module)({})
|
|
68
75
|
], CoreModule);
|
|
69
76
|
//# sourceMappingURL=core.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.module.js","sourceRoot":"","sources":["../../../src/core/core.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"core.module.js","sourceRoot":"","sources":["../../../src/core/core.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AACvD,2CAA8C;AAC9C,uCAA4C;AAC5C,+CAAkD;AAElD,6DAA+D;AAE/D,8DAA2D;AAC3D,oEAAiE;AACjE,uEAAoE;AACpE,+FAA4F;AAC5F,gFAA6E;AAC7E,iEAA8D;AAC9D,uEAAoE;AACpE,0EAAuE;AACvE,8EAA0E;AAC1E,0EAAuE;AACvE,6EAA0E;AAC1E,4FAAyF;AACzF,sFAAmF;AACnF,uEAAoE;AACpE,qEAAiE;AACjE,0EAAuE;AACvE,2DAAwD;AACxD,iEAA8D;AAC9D,8DAA2D;AAGpD,IAAM,UAAU,kBAAhB,MAAM,UAAU;IACrB,MAAM,CAAC,OAAO,CAAC,OAAmB;QAChC,OAAO;YACL,MAAM,EAAE,YAAU;YAClB,OAAO,EAAE;gBACP,qCAAgB,CAAC,OAAO,CAAC,OAAO,CAAC;gBACjC,wBAAU;gBACV,qBAAY,CAAC,OAAO,EAAE;gBACtB,gCAAc;gBACd,qCAAgB;gBAChB,+BAAa;gBACb,mBAAY,CAAC,QAAQ,CAAC;oBACpB;wBACE,IAAI,EAAE,MAAM;wBACZ,MAAM,EAAE,+BAAa;qBACtB;iBACF,CAAC;gBACF,yBAAc,CAAC,OAAO,EAAE;gBACxB,0CAAmB;gBACnB,0BAAW;gBACX,wCAAkB;gBAClB,4BAAY;gBACZ,0BAAW;gBACX,wBAAU;gBACV,wCAAkB;gBAClB,8BAAa;gBACb,4BAAY;gBACZ,gCAAc;gBACd,0BAAW;gBACX,sBAAS;gBACT,0BAAW;gBACX,gCAAc;gBACd,8BAAa;aACd;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AApCY,gCAAU;qBAAV,UAAU;IADtB,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,UAAU,CAoCtB"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Strategy } from 'passport-jwt';
|
|
2
2
|
import { JwtSecretService } from '../../../features/auth/jwt-secret.service';
|
|
3
3
|
import { IAuthUser } from '../../../features/auth/types';
|
|
4
|
-
declare const JwtStrategy_base: new (...args:
|
|
4
|
+
declare const JwtStrategy_base: new (...args: [opt: import("passport-jwt").StrategyOptionsWithRequest] | [opt: import("passport-jwt").StrategyOptionsWithoutRequest]) => Strategy & {
|
|
5
|
+
validate(...args: any[]): unknown;
|
|
6
|
+
};
|
|
5
7
|
export declare class JwtStrategy extends JwtStrategy_base {
|
|
6
8
|
constructor(jwtSecret: JwtSecretService);
|
|
7
9
|
validate(payload: any): Promise<IAuthUser>;
|
|
@@ -19,8 +19,6 @@ const get_rows_handler_1 = require("../../../../row/queries/handlers/get-rows.ha
|
|
|
19
19
|
const json_schema_validator_service_1 = require("../../../../share/json-schema-validator.service");
|
|
20
20
|
const get_revision_handler_1 = require("../../../../revision/queries/commands/get-revision.handler");
|
|
21
21
|
const get_row_by_id_handler_1 = require("../../../../row/queries/handlers/get-row-by-id.handler");
|
|
22
|
-
const handlers_3 = require("../../../../share/commands/handlers");
|
|
23
|
-
const handlers_4 = require("../../../../share/queries/handlers");
|
|
24
22
|
const schema_ids_consts_1 = require("../../../../share/schema-ids.consts");
|
|
25
23
|
const share_module_1 = require("../../../../share/share.module");
|
|
26
24
|
const share_transactional_commands_1 = require("../../../../share/share.transactional.commands");
|
|
@@ -34,6 +32,7 @@ const s3_service_1 = require("../../../../../infrastructure/database/s3.service"
|
|
|
34
32
|
const transaction_prisma_service_1 = require("../../../../../infrastructure/database/transaction-prisma.service");
|
|
35
33
|
const endpoint_notification_service_1 = require("../../../../../infrastructure/notification/endpoint-notification.service");
|
|
36
34
|
const notification_module_1 = require("../../../../../infrastructure/notification/notification.module");
|
|
35
|
+
const app_options_module_1 = require("../../../../../core/app-options.module");
|
|
37
36
|
exports.testSchema = (0, schema_mocks_1.getObjectSchema)({
|
|
38
37
|
ver: (0, schema_mocks_1.getNumberSchema)(),
|
|
39
38
|
});
|
|
@@ -84,15 +83,6 @@ const getTestLinkedSchema = (tableId) => ({
|
|
|
84
83
|
});
|
|
85
84
|
exports.getTestLinkedSchema = getTestLinkedSchema;
|
|
86
85
|
const createTestingModule = async () => {
|
|
87
|
-
const ANOTHER_QUERIES = [
|
|
88
|
-
get_revision_handler_1.GetRevisionHandler,
|
|
89
|
-
get_branch_by_id_handler_1.GetBranchByIdHandler,
|
|
90
|
-
get_table_by_id_handler_1.GetTableByIdHandler,
|
|
91
|
-
get_row_by_id_handler_1.GetRowByIdHandler,
|
|
92
|
-
get_rows_handler_1.GetRowsHandler,
|
|
93
|
-
get_row_handler_1.GetRowHandler,
|
|
94
|
-
get_rows_by_table_handler_1.GetRowsByTableHandler,
|
|
95
|
-
];
|
|
96
86
|
const mockS3 = {
|
|
97
87
|
isAvailable: true,
|
|
98
88
|
uploadFile: jest.fn().mockResolvedValue({
|
|
@@ -106,6 +96,7 @@ const createTestingModule = async () => {
|
|
|
106
96
|
cqrs_1.CqrsModule,
|
|
107
97
|
share_module_1.ShareModule,
|
|
108
98
|
plugin_module_1.PluginModule,
|
|
99
|
+
app_options_module_1.AppOptionsModule.forRoot({ mode: 'monolith' }),
|
|
109
100
|
notification_module_1.NotificationModule,
|
|
110
101
|
cache_manager_1.CacheModule.register(),
|
|
111
102
|
],
|
|
@@ -118,23 +109,22 @@ const createTestingModule = async () => {
|
|
|
118
109
|
...queries_1.ORGANIZATIONS_QUERIES,
|
|
119
110
|
...handlers_2.PROJECT_QUERIES,
|
|
120
111
|
...handlers_1.BRANCH_QUERIES_HANDLERS,
|
|
121
|
-
|
|
112
|
+
get_revision_handler_1.GetRevisionHandler,
|
|
113
|
+
get_branch_by_id_handler_1.GetBranchByIdHandler,
|
|
114
|
+
get_table_by_id_handler_1.GetTableByIdHandler,
|
|
115
|
+
get_row_by_id_handler_1.GetRowByIdHandler,
|
|
116
|
+
get_rows_handler_1.GetRowsHandler,
|
|
117
|
+
get_row_handler_1.GetRowHandler,
|
|
118
|
+
get_rows_by_table_handler_1.GetRowsByTableHandler,
|
|
122
119
|
],
|
|
123
120
|
})
|
|
124
121
|
.overrideProvider(s3_service_1.S3Service)
|
|
125
122
|
.useValue(mockS3)
|
|
126
123
|
.compile();
|
|
124
|
+
await module.init();
|
|
127
125
|
const prismaService = module.get(prisma_service_1.PrismaService);
|
|
128
126
|
const commandBus = module.get(cqrs_1.CommandBus);
|
|
129
|
-
commandBus.register([...index_1.DRAFT_COMMANDS_HANDLERS, ...handlers_3.SHARE_COMMANDS_HANDLERS]);
|
|
130
127
|
const queryBus = module.get(cqrs_1.QueryBus);
|
|
131
|
-
queryBus.register([
|
|
132
|
-
...handlers_4.SHARE_QUERIES_HANDLERS,
|
|
133
|
-
...queries_1.ORGANIZATIONS_QUERIES,
|
|
134
|
-
...handlers_2.PROJECT_QUERIES,
|
|
135
|
-
...handlers_1.BRANCH_QUERIES_HANDLERS,
|
|
136
|
-
...ANOTHER_QUERIES,
|
|
137
|
-
]);
|
|
138
128
|
const transactionService = module.get(transaction_prisma_service_1.TransactionPrismaService);
|
|
139
129
|
const shareTransactionalQueries = module.get(share_transactional_queries_1.ShareTransactionalQueries);
|
|
140
130
|
const shareTransactionalCommands = module.get(share_transactional_commands_1.ShareTransactionalCommands);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../src/features/draft/commands/handlers/__tests__/utils.ts"],"names":[],"mappings":";;;AAAA,yDAAoD;AACpD,uCAAgE;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../src/features/draft/commands/handlers/__tests__/utils.ts"],"names":[],"mappings":";;;AAAA,yDAAoD;AACpD,uCAAgE;AAChE,6CAAsD;AACtD,qFAKiD;AACjD,mEAAgF;AAChF,4GAAsG;AACtG,oCAAqF;AACrF,0EAA+E;AAC/E,kEAAyE;AACzE,wFAA6F;AAC7F,8DAA0E;AAC1E,oEAAiE;AACjE,mEAAwE;AACxE,sFAAkF;AAClF,wFAAoF;AACpF,mGAA8F;AAC9F,qGAAiG;AACjG,kGAA4F;AAC5F,2EAAuE;AACvE,iEAA8D;AAC9D,iGAA6F;AAC7F,+FAA2F;AAC3F,oFAG4D;AAC5D,4GAAsG;AACtG,wGAAkG;AAClG,4FAA6E;AAC7E,0FAA2E;AAC3E,kFAAmE;AACnE,kHAAkG;AAClG,4HAA4G;AAC5G,wGAAyF;AACzF,+EAA+D;AAElD,QAAA,UAAU,GAAqB,IAAA,8BAAe,EAAC;IAC1D,GAAG,EAAE,IAAA,8BAAe,GAAE;CACvB,CAAC,CAAC;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GAAG,MAAM,CAAC,GAAG,CAAC,yDAA0B,CAAC,CAAC;IAC1E,MAAM,0BAA0B,GAAG,MAAM,CAAC,GAAG,CAAC,yDAA0B,CAAC,CAAC;IAC1E,MAAM,2BAA2B,GAAG,MAAM,CAAC,GAAG,CAAC,2DAA2B,CAAC,CAAC;IAC5E,OAAO;QACL,MAAM;QACN,aAAa;QACb,UAAU;QACV,QAAQ;QACR,kBAAkB;QAClB,yBAAyB;QACzB,0BAA0B;QAC1B,0BAA0B;QAC1B,2BAA2B;KAC5B,CAAC;AACJ,CAAC,CAAC;AAhEW,QAAA,mBAAmB,uBAgE9B;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"}
|
|
@@ -2,7 +2,6 @@ import { ICommandHandler } from '@nestjs/cqrs';
|
|
|
2
2
|
import { IdService } from '../../../../../infrastructure/database/id.service';
|
|
3
3
|
import { TransactionPrismaService } from '../../../../../infrastructure/database/transaction-prisma.service';
|
|
4
4
|
import { GetOrCreateDraftRowsCommand } from '../../../../../features/draft/commands/impl/transactional/get-or-create-draft-rows.command';
|
|
5
|
-
import { DraftRevisionRequestDto } from '../../../../../features/draft/draft-request-dto/draft-revision-request.dto';
|
|
6
5
|
import { DraftRowsRequestDto } from '../../../../../features/draft/draft-request-dto/rows-request.dto';
|
|
7
6
|
import { DraftTableRequestDto } from '../../../../../features/draft/draft-request-dto/table-request.dto';
|
|
8
7
|
import { ShareTransactionalQueries } from '../../../../../features/share/share.transactional.queries';
|
|
@@ -10,10 +9,9 @@ export declare class GetOrCreateDraftRowsHandler implements ICommandHandler<GetO
|
|
|
10
9
|
private readonly transactionService;
|
|
11
10
|
private readonly idService;
|
|
12
11
|
private readonly shareTransactionalQueries;
|
|
13
|
-
private readonly revisionRequestDto;
|
|
14
12
|
private readonly tableRequestDto;
|
|
15
13
|
private readonly rowsRequestDto;
|
|
16
|
-
constructor(transactionService: TransactionPrismaService, idService: IdService, shareTransactionalQueries: ShareTransactionalQueries,
|
|
14
|
+
constructor(transactionService: TransactionPrismaService, idService: IdService, shareTransactionalQueries: ShareTransactionalQueries, tableRequestDto: DraftTableRequestDto, rowsRequestDto: DraftRowsRequestDto);
|
|
17
15
|
private get transaction();
|
|
18
16
|
execute({ rowIds }: GetOrCreateDraftRowsCommand): Promise<void>;
|
|
19
17
|
private cloneRows;
|
package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.js
CHANGED
|
@@ -15,16 +15,14 @@ const cqrs_1 = require("@nestjs/cqrs");
|
|
|
15
15
|
const id_service_1 = require("../../../../../infrastructure/database/id.service");
|
|
16
16
|
const transaction_prisma_service_1 = require("../../../../../infrastructure/database/transaction-prisma.service");
|
|
17
17
|
const get_or_create_draft_rows_command_1 = require("../../impl/transactional/get-or-create-draft-rows.command");
|
|
18
|
-
const draft_revision_request_dto_1 = require("../../../draft-request-dto/draft-revision-request.dto");
|
|
19
18
|
const rows_request_dto_1 = require("../../../draft-request-dto/rows-request.dto");
|
|
20
19
|
const table_request_dto_1 = require("../../../draft-request-dto/table-request.dto");
|
|
21
20
|
const share_transactional_queries_1 = require("../../../../share/share.transactional.queries");
|
|
22
21
|
let GetOrCreateDraftRowsHandler = class GetOrCreateDraftRowsHandler {
|
|
23
|
-
constructor(transactionService, idService, shareTransactionalQueries,
|
|
22
|
+
constructor(transactionService, idService, shareTransactionalQueries, tableRequestDto, rowsRequestDto) {
|
|
24
23
|
this.transactionService = transactionService;
|
|
25
24
|
this.idService = idService;
|
|
26
25
|
this.shareTransactionalQueries = shareTransactionalQueries;
|
|
27
|
-
this.revisionRequestDto = revisionRequestDto;
|
|
28
26
|
this.tableRequestDto = tableRequestDto;
|
|
29
27
|
this.rowsRequestDto = rowsRequestDto;
|
|
30
28
|
}
|
|
@@ -53,6 +51,7 @@ let GetOrCreateDraftRowsHandler = class GetOrCreateDraftRowsHandler {
|
|
|
53
51
|
const rows = await this.transaction.row.findMany({
|
|
54
52
|
where: { OR: readonlyRows.map((row) => ({ versionId: row.versionId })) },
|
|
55
53
|
select: {
|
|
54
|
+
createdAt: true,
|
|
56
55
|
data: true,
|
|
57
56
|
meta: true,
|
|
58
57
|
hash: true,
|
|
@@ -66,6 +65,7 @@ let GetOrCreateDraftRowsHandler = class GetOrCreateDraftRowsHandler {
|
|
|
66
65
|
throw new common_1.BadRequestException('Invalid cloning rows');
|
|
67
66
|
}
|
|
68
67
|
const generatedRows = rows.map((row) => ({
|
|
68
|
+
createdAt: row.createdAt,
|
|
69
69
|
data: row.data,
|
|
70
70
|
meta: row.meta,
|
|
71
71
|
hash: row.hash,
|
|
@@ -76,6 +76,7 @@ let GetOrCreateDraftRowsHandler = class GetOrCreateDraftRowsHandler {
|
|
|
76
76
|
previousVersionId: row.versionId,
|
|
77
77
|
}));
|
|
78
78
|
const inputs = generatedRows.map((row) => ({
|
|
79
|
+
createdAt: row.createdAt,
|
|
79
80
|
versionId: row.versionId,
|
|
80
81
|
createdId: row.createdId,
|
|
81
82
|
id: row.id,
|
|
@@ -134,7 +135,6 @@ exports.GetOrCreateDraftRowsHandler = GetOrCreateDraftRowsHandler = __decorate([
|
|
|
134
135
|
__metadata("design:paramtypes", [transaction_prisma_service_1.TransactionPrismaService,
|
|
135
136
|
id_service_1.IdService,
|
|
136
137
|
share_transactional_queries_1.ShareTransactionalQueries,
|
|
137
|
-
draft_revision_request_dto_1.DraftRevisionRequestDto,
|
|
138
138
|
table_request_dto_1.DraftTableRequestDto,
|
|
139
139
|
rows_request_dto_1.DraftRowsRequestDto])
|
|
140
140
|
], GetOrCreateDraftRowsHandler);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-or-create-draft-rows.handler.js","sourceRoot":"","sources":["../../../../../../../src/features/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAqD;AACrD,uCAA+D;AAE/D,kFAAmE;AACnE,kHAAkG;AAClG,gHAA8H;AAC9H,
|
|
1
|
+
{"version":3,"file":"get-or-create-draft-rows.handler.js","sourceRoot":"","sources":["../../../../../../../src/features/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAqD;AACrD,uCAA+D;AAE/D,kFAAmE;AACnE,kHAAkG;AAClG,gHAA8H;AAC9H,kFAA4F;AAC5F,oFAA8F;AAE9F,+FAA2F;AAGpF,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IAGtC,YACmB,kBAA4C,EAC5C,SAAoB,EACpB,yBAAoD,EACpD,eAAqC,EACrC,cAAmC;QAJnC,uBAAkB,GAAlB,kBAAkB,CAA0B;QAC5C,cAAS,GAAT,SAAS,CAAW;QACpB,8BAAyB,GAAzB,yBAAyB,CAA2B;QACpD,oBAAe,GAAf,eAAe,CAAsB;QACrC,mBAAc,GAAd,cAAc,CAAqB;IACnD,CAAC;IAEJ,IAAY,WAAW;QACrB,OAAO,IAAI,CAAC,kBAAkB,CAAC,cAAc,EAAE,CAAC;IAClD,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAA+B;QACnD,IAAI,CAAC,cAAc,CAAC,IAAI,GAAG,EAAE,CAAC;QAE9B,MAAM,YAAY,GAChB,MAAM,IAAI,CAAC,yBAAyB,CAAC,sBAAsB,CACzD,IAAI,CAAC,eAAe,CAAC,SAAS,EAC9B,MAAM,CACP,CAAC;QAEJ,MAAM,eAAe,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACpE,MAAM,YAAY,GAAG,YAAY,CAAC,MAAM,CAAC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import { TransactionPrismaService } from '../../infrastructure/database/transaction-prisma.service';
|
|
4
3
|
import { DraftContextService } from '../../features/draft/draft-context.service';
|
|
5
|
-
export declare abstract class DraftHandler<T extends ICommand, Result = unknown>
|
|
4
|
+
export declare abstract class DraftHandler<T extends ICommand, Result = unknown> {
|
|
6
5
|
protected transactionService: TransactionPrismaService;
|
|
7
6
|
protected draftContext: DraftContextService;
|
|
8
7
|
protected constructor(transactionService: TransactionPrismaService, draftContext: DraftContextService);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draft.handler.js","sourceRoot":"","sources":["../../../../src/features/draft/draft.handler.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"draft.handler.js","sourceRoot":"","sources":["../../../../src/features/draft/draft.handler.ts"],"names":[],"mappings":";;;AAIA,MAAsB,YAAY;IAChC,YACY,kBAA4C,EAC5C,YAAiC;QADjC,uBAAkB,GAAlB,kBAAkB,CAA0B;QAC5C,iBAAY,GAAZ,YAAY,CAAqB;IAC1C,CAAC;IAEJ,IAAc,WAAW;QACvB,OAAO,IAAI,CAAC,kBAAkB,CAAC,cAAc,EAAE,CAAC;IAClD,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,KAAQ;QACpB,MAAM,kBAAkB,GAAG,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC;QAC5D,MAAM,MAAM,GAAW,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE;YACtD,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;YACzD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;QAEH,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAExC,OAAO,MAAM,CAAC;IAChB,CAAC;CAKF;AAzBD,oCAyBC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FilePlugin } from '../../features/plugin/file/file.plugin';
|
|
2
|
+
import { RowCreatedAtPlugin } from '../../features/plugin/row-created-at/row-created-at.plugin';
|
|
3
|
+
import { RowCreatedIdPlugin } from '../../features/plugin/row-created-id/row-created-id.plugin';
|
|
4
|
+
import { RowHashPlugin } from '../../features/plugin/row-hash/row-hash.plugin';
|
|
5
|
+
import { RowIdPlugin } from '../../features/plugin/row-id/row-id.plugin';
|
|
6
|
+
import { RowSchemaHashPlugin } from '../../features/plugin/row-schema-hash/row-schema-hash.plugin';
|
|
7
|
+
import { RowUpdatedAtPlugin } from '../../features/plugin/row-updated-at/row-updated-at.plugin';
|
|
8
|
+
import { RowVersionIdPlugin } from '../../features/plugin/row-version-id/row-version-id.plugin';
|
|
9
|
+
export declare const PLUGINS: (typeof FilePlugin | typeof RowCreatedAtPlugin | typeof RowCreatedIdPlugin | typeof RowHashPlugin | typeof RowIdPlugin | typeof RowSchemaHashPlugin | typeof RowUpdatedAtPlugin | typeof RowVersionIdPlugin)[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PLUGINS = void 0;
|
|
4
|
+
const file_plugin_1 = require("./file/file.plugin");
|
|
5
|
+
const row_created_at_plugin_1 = require("./row-created-at/row-created-at.plugin");
|
|
6
|
+
const row_created_id_plugin_1 = require("./row-created-id/row-created-id.plugin");
|
|
7
|
+
const row_hash_plugin_1 = require("./row-hash/row-hash.plugin");
|
|
8
|
+
const row_id_plugin_1 = require("./row-id/row-id.plugin");
|
|
9
|
+
const row_schema_hash_plugin_1 = require("./row-schema-hash/row-schema-hash.plugin");
|
|
10
|
+
const row_updated_at_plugin_1 = require("./row-updated-at/row-updated-at.plugin");
|
|
11
|
+
const row_version_id_plugin_1 = require("./row-version-id/row-version-id.plugin");
|
|
12
|
+
exports.PLUGINS = [
|
|
13
|
+
file_plugin_1.FilePlugin,
|
|
14
|
+
row_id_plugin_1.RowIdPlugin,
|
|
15
|
+
row_created_id_plugin_1.RowCreatedIdPlugin,
|
|
16
|
+
row_version_id_plugin_1.RowVersionIdPlugin,
|
|
17
|
+
row_created_at_plugin_1.RowCreatedAtPlugin,
|
|
18
|
+
row_updated_at_plugin_1.RowUpdatedAtPlugin,
|
|
19
|
+
row_hash_plugin_1.RowHashPlugin,
|
|
20
|
+
row_schema_hash_plugin_1.RowSchemaHashPlugin,
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/plugin/index.ts"],"names":[],"mappings":";;;AAAA,oDAAkE;AAClE,kFAA8F;AAC9F,kFAA8F;AAC9F,gEAA6E;AAC7E,0DAAuE;AACvE,qFAAiG;AACjG,kFAA8F;AAC9F,kFAA8F;AAEjF,QAAA,OAAO,GAAG;IACrB,wBAAU;IACV,2BAAW;IACX,0CAAkB;IAClB,0CAAkB;IAClB,0CAAkB;IAClB,0CAAkB;IAClB,+BAAa;IACb,4CAAmB;CACpB,CAAC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { FilePlugin } from '../../features/plugin/file/file.plugin';
|
|
2
|
+
import { RowCreatedAtPlugin } from '../../features/plugin/row-created-at/row-created-at.plugin';
|
|
3
|
+
import { RowCreatedIdPlugin } from '../../features/plugin/row-created-id/row-created-id.plugin';
|
|
4
|
+
import { RowHashPlugin } from '../../features/plugin/row-hash/row-hash.plugin';
|
|
5
|
+
import { RowIdPlugin } from '../../features/plugin/row-id/row-id.plugin';
|
|
6
|
+
import { RowSchemaHashPlugin } from '../../features/plugin/row-schema-hash/row-schema-hash.plugin';
|
|
7
|
+
import { RowUpdatedAtPlugin } from '../../features/plugin/row-updated-at/row-updated-at.plugin';
|
|
8
|
+
import { RowVersionIdPlugin } from '../../features/plugin/row-version-id/row-version-id.plugin';
|
|
2
9
|
import { IPluginService } from '../../features/plugin/types';
|
|
3
10
|
export declare class PluginListService {
|
|
4
11
|
readonly orderedPlugins: IPluginService[];
|
|
5
|
-
constructor(filePlugin: FilePlugin);
|
|
12
|
+
constructor(filePlugin: FilePlugin, rowIdPlugin: RowIdPlugin, rowCreatedIdPlugin: RowCreatedIdPlugin, rowVersionIdPlugin: RowVersionIdPlugin, rowCreatedAtPlugin: RowCreatedAtPlugin, rowUpdatedAtPlugin: RowUpdatedAtPlugin, rowHashPlugin: RowHashPlugin, rowSchemaHashPlugin: RowSchemaHashPlugin);
|
|
6
13
|
}
|
|
@@ -12,15 +12,36 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.PluginListService = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const file_plugin_1 = require("./file/file.plugin");
|
|
15
|
+
const row_created_at_plugin_1 = require("./row-created-at/row-created-at.plugin");
|
|
16
|
+
const row_created_id_plugin_1 = require("./row-created-id/row-created-id.plugin");
|
|
17
|
+
const row_hash_plugin_1 = require("./row-hash/row-hash.plugin");
|
|
18
|
+
const row_id_plugin_1 = require("./row-id/row-id.plugin");
|
|
19
|
+
const row_schema_hash_plugin_1 = require("./row-schema-hash/row-schema-hash.plugin");
|
|
20
|
+
const row_updated_at_plugin_1 = require("./row-updated-at/row-updated-at.plugin");
|
|
21
|
+
const row_version_id_plugin_1 = require("./row-version-id/row-version-id.plugin");
|
|
15
22
|
let PluginListService = class PluginListService {
|
|
16
|
-
constructor(filePlugin) {
|
|
23
|
+
constructor(filePlugin, rowIdPlugin, rowCreatedIdPlugin, rowVersionIdPlugin, rowCreatedAtPlugin, rowUpdatedAtPlugin, rowHashPlugin, rowSchemaHashPlugin) {
|
|
17
24
|
this.orderedPlugins = [];
|
|
25
|
+
this.orderedPlugins.push(rowIdPlugin);
|
|
26
|
+
this.orderedPlugins.push(rowCreatedIdPlugin);
|
|
27
|
+
this.orderedPlugins.push(rowVersionIdPlugin);
|
|
28
|
+
this.orderedPlugins.push(rowCreatedAtPlugin);
|
|
29
|
+
this.orderedPlugins.push(rowUpdatedAtPlugin);
|
|
30
|
+
this.orderedPlugins.push(rowHashPlugin);
|
|
31
|
+
this.orderedPlugins.push(rowSchemaHashPlugin);
|
|
18
32
|
this.orderedPlugins.push(filePlugin);
|
|
19
33
|
}
|
|
20
34
|
};
|
|
21
35
|
exports.PluginListService = PluginListService;
|
|
22
36
|
exports.PluginListService = PluginListService = __decorate([
|
|
23
37
|
(0, common_1.Injectable)(),
|
|
24
|
-
__metadata("design:paramtypes", [file_plugin_1.FilePlugin
|
|
38
|
+
__metadata("design:paramtypes", [file_plugin_1.FilePlugin,
|
|
39
|
+
row_id_plugin_1.RowIdPlugin,
|
|
40
|
+
row_created_id_plugin_1.RowCreatedIdPlugin,
|
|
41
|
+
row_version_id_plugin_1.RowVersionIdPlugin,
|
|
42
|
+
row_created_at_plugin_1.RowCreatedAtPlugin,
|
|
43
|
+
row_updated_at_plugin_1.RowUpdatedAtPlugin,
|
|
44
|
+
row_hash_plugin_1.RowHashPlugin,
|
|
45
|
+
row_schema_hash_plugin_1.RowSchemaHashPlugin])
|
|
25
46
|
], PluginListService);
|
|
26
47
|
//# sourceMappingURL=plugin.list.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.list.service.js","sourceRoot":"","sources":["../../../../src/features/plugin/plugin.list.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oDAAkE;
|
|
1
|
+
{"version":3,"file":"plugin.list.service.js","sourceRoot":"","sources":["../../../../src/features/plugin/plugin.list.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oDAAkE;AAClE,kFAA8F;AAC9F,kFAA8F;AAC9F,gEAA6E;AAC7E,0DAAuE;AACvE,qFAAiG;AACjG,kFAA8F;AAC9F,kFAA8F;AAIvF,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAG5B,YACE,UAAsB,EACtB,WAAwB,EACxB,kBAAsC,EACtC,kBAAsC,EACtC,kBAAsC,EACtC,kBAAsC,EACtC,aAA4B,EAC5B,mBAAwC;QAV1B,mBAAc,GAAqB,EAAE,CAAC;QAYpD,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACtC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAC7C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAC7C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAC7C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAC7C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACxC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAC9C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;CACF,CAAA;AAtBY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAKG,wBAAU;QACT,2BAAW;QACJ,0CAAkB;QAClB,0CAAkB;QAClB,0CAAkB;QAClB,0CAAkB;QACvB,+BAAa;QACP,4CAAmB;GAX/B,iBAAiB,CAsB7B"}
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.PluginModule = void 0;
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
11
|
const config_1 = require("@nestjs/config");
|
|
12
|
-
const
|
|
12
|
+
const index_1 = require("./index");
|
|
13
13
|
const plugin_list_service_1 = require("./plugin.list.service");
|
|
14
14
|
const plugin_service_1 = require("./plugin.service");
|
|
15
15
|
const share_module_1 = require("../share/share.module");
|
|
@@ -20,8 +20,8 @@ exports.PluginModule = PluginModule;
|
|
|
20
20
|
exports.PluginModule = PluginModule = __decorate([
|
|
21
21
|
(0, common_1.Module)({
|
|
22
22
|
imports: [database_module_1.DatabaseModule, share_module_1.ShareModule, config_1.ConfigModule],
|
|
23
|
-
providers: [
|
|
24
|
-
exports: [plugin_service_1.PluginService,
|
|
23
|
+
providers: [...index_1.PLUGINS, plugin_list_service_1.PluginListService, plugin_service_1.PluginService],
|
|
24
|
+
exports: [plugin_service_1.PluginService, ...index_1.PLUGINS],
|
|
25
25
|
})
|
|
26
26
|
], PluginModule);
|
|
27
27
|
//# sourceMappingURL=plugin.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.module.js","sourceRoot":"","sources":["../../../../src/features/plugin/plugin.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"plugin.module.js","sourceRoot":"","sources":["../../../../src/features/plugin/plugin.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA8C;AAC9C,mCAAoD;AACpD,+DAA4E;AAC5E,qDAAmE;AACnE,wDAA8D;AAC9D,mFAA6E;AAOtE,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IALxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,gCAAc,EAAE,0BAAW,EAAE,qBAAY,CAAC;QACpD,SAAS,EAAE,CAAC,GAAG,eAAO,EAAE,uCAAiB,EAAE,8BAAa,CAAC;QACzD,OAAO,EAAE,CAAC,8BAAa,EAAE,GAAG,eAAO,CAAC;KACrC,CAAC;GACW,YAAY,CAAG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InternalAfterCreateRowOptions, InternalAfterMigrateRowsOptions, InternalAfterUpdateRowOptions, InternalComputeRowsOptions, IPluginService } from '../../../features/plugin/types';
|
|
2
|
+
export declare class RowCreatedAtPlugin 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 setCreatedAt;
|
|
11
|
+
}
|