@comet/cms-api 8.20.2 → 9.0.0-beta.1
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/lib/common/decorators/crud-generator.decorator.d.ts +1 -3
- package/lib/common/decorators/crud-generator.decorator.d.ts.map +1 -1
- package/lib/common/decorators/crud-generator.decorator.js +2 -2
- package/lib/common/decorators/crud-generator.decorator.js.map +1 -1
- package/lib/dam/dam.module.d.ts.map +1 -1
- package/lib/dam/dam.module.js +0 -2
- package/lib/dam/dam.module.js.map +1 -1
- package/lib/dam/files/entities/file.entity.d.ts.map +1 -1
- package/lib/dam/files/entities/file.entity.js +3 -4
- package/lib/dam/files/entities/file.entity.js.map +1 -1
- package/lib/dependencies/dependencies.module.d.ts.map +1 -1
- package/lib/dependencies/dependencies.module.js +3 -2
- package/lib/dependencies/dependencies.module.js.map +1 -1
- package/lib/dependencies/dependencies.resolver.factory.d.ts +1 -1
- package/lib/dependencies/dependencies.resolver.factory.d.ts.map +1 -1
- package/lib/dependencies/dependencies.resolver.factory.js +2 -2
- package/lib/dependencies/dependencies.resolver.factory.js.map +1 -1
- package/lib/dependencies/dependencies.service.d.ts +21 -15
- package/lib/dependencies/dependencies.service.d.ts.map +1 -1
- package/lib/dependencies/dependencies.service.js +125 -81
- package/lib/dependencies/dependencies.service.js.map +1 -1
- package/lib/dependencies/dependents.resolver.factory.d.ts +1 -1
- package/lib/dependencies/dependents.resolver.factory.d.ts.map +1 -1
- package/lib/dependencies/dependents.resolver.factory.js +2 -2
- package/lib/dependencies/dependents.resolver.factory.js.map +1 -1
- package/lib/dependencies/discover.service.d.ts +2 -1
- package/lib/dependencies/discover.service.d.ts.map +1 -1
- package/lib/dependencies/discover.service.js +1 -0
- package/lib/dependencies/discover.service.js.map +1 -1
- package/lib/dependencies/dto/dependencies.args.d.ts +3 -0
- package/lib/dependencies/dto/dependencies.args.d.ts.map +1 -1
- package/lib/dependencies/dto/dependencies.args.js +15 -0
- package/lib/dependencies/dto/dependencies.args.js.map +1 -1
- package/lib/dependencies/dto/dependencies.filter.d.ts +14 -2
- package/lib/dependencies/dto/dependencies.filter.d.ts.map +1 -1
- package/lib/dependencies/dto/dependencies.filter.js +81 -6
- package/lib/dependencies/dto/dependencies.filter.js.map +1 -1
- package/lib/dependencies/dto/dependency-sort.d.ts +13 -0
- package/lib/dependencies/dto/dependency-sort.d.ts.map +1 -0
- package/lib/dependencies/dto/dependency-sort.js +45 -0
- package/lib/dependencies/dto/dependency-sort.js.map +1 -0
- package/lib/dependencies/entities/block-index-dependency.object.d.ts +23 -0
- package/lib/dependencies/entities/block-index-dependency.object.d.ts.map +1 -0
- package/lib/dependencies/entities/block-index-dependency.object.js +102 -0
- package/lib/dependencies/entities/block-index-dependency.object.js.map +1 -0
- package/lib/entity-info/entity-info.decorator.d.ts +9 -0
- package/lib/entity-info/entity-info.decorator.d.ts.map +1 -0
- package/lib/{common/entityInfo → entity-info}/entity-info.decorator.js +3 -3
- package/lib/entity-info/entity-info.decorator.js.map +1 -0
- package/lib/entity-info/entity-info.module.d.ts.map +1 -0
- package/lib/{common/entityInfo → entity-info}/entity-info.module.js +3 -1
- package/lib/entity-info/entity-info.module.js.map +1 -0
- package/lib/entity-info/entity-info.object.d.ts +8 -0
- package/lib/entity-info/entity-info.object.d.ts.map +1 -0
- package/lib/{common/entityInfo → entity-info}/entity-info.object.js +18 -0
- package/lib/entity-info/entity-info.object.js.map +1 -0
- package/lib/entity-info/entity-info.service.d.ts +18 -0
- package/lib/entity-info/entity-info.service.d.ts.map +1 -0
- package/lib/entity-info/entity-info.service.js +160 -0
- package/lib/entity-info/entity-info.service.js.map +1 -0
- package/lib/file-uploads/file-uploads.service.d.ts +1 -0
- package/lib/file-uploads/file-uploads.service.d.ts.map +1 -1
- package/lib/file-uploads/file-uploads.service.js +3 -0
- package/lib/file-uploads/file-uploads.service.js.map +1 -1
- package/lib/index.d.ts +1 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -9
- package/lib/index.js.map +1 -1
- package/lib/mikro-orm/migrations/Migration20250531565156.d.ts +5 -0
- package/lib/mikro-orm/migrations/Migration20250531565156.d.ts.map +1 -0
- package/lib/mikro-orm/migrations/Migration20250531565156.js +52 -0
- package/lib/mikro-orm/migrations/Migration20250531565156.js.map +1 -0
- package/lib/mikro-orm/migrations/Migration20250531565157.d.ts +5 -0
- package/lib/mikro-orm/migrations/Migration20250531565157.d.ts.map +1 -0
- package/lib/mikro-orm/migrations/Migration20250531565157.js +50 -0
- package/lib/mikro-orm/migrations/Migration20250531565157.js.map +1 -0
- package/lib/mikro-orm/migrations/Migration20251126093305.d.ts +6 -0
- package/lib/mikro-orm/migrations/Migration20251126093305.d.ts.map +1 -0
- package/lib/mikro-orm/migrations/Migration20251126093305.js +26 -0
- package/lib/mikro-orm/migrations/Migration20251126093305.js.map +1 -0
- package/lib/mikro-orm/mikro-orm.module.d.ts.map +1 -1
- package/lib/mikro-orm/mikro-orm.module.js +6 -0
- package/lib/mikro-orm/mikro-orm.module.js.map +1 -1
- package/lib/page-tree/entities/page-tree-node-base.entity.d.ts.map +1 -1
- package/lib/page-tree/entities/page-tree-node-base.entity.js +2 -0
- package/lib/page-tree/entities/page-tree-node-base.entity.js.map +1 -1
- package/lib/page-tree/page-tree.module.d.ts.map +1 -1
- package/lib/page-tree/page-tree.module.js +3 -2
- package/lib/page-tree/page-tree.module.js.map +1 -1
- package/lib/redirects/dto/redirects.filter.d.ts +5 -0
- package/lib/redirects/dto/redirects.filter.d.ts.map +1 -1
- package/lib/redirects/dto/redirects.filter.js +14 -0
- package/lib/redirects/dto/redirects.filter.js.map +1 -1
- package/lib/redirects/entities/redirect-entity.factory.js +3 -3
- package/lib/redirects/entities/redirect-entity.factory.js.map +1 -1
- package/lib/redirects/redirects.enum.d.ts +2 -1
- package/lib/redirects/redirects.enum.d.ts.map +1 -1
- package/lib/redirects/redirects.enum.js +1 -0
- package/lib/redirects/redirects.enum.js.map +1 -1
- package/lib/redirects/redirects.util.d.ts +1 -1
- package/lib/redirects/redirects.util.d.ts.map +1 -1
- package/lib/redirects/redirects.util.js +15 -0
- package/lib/redirects/redirects.util.js.map +1 -1
- package/lib/tsconfig.build.tsbuildinfo +1 -1
- package/lib/warnings/warning.module.js +1 -1
- package/lib/warnings/warning.module.js.map +1 -1
- package/lib/warnings/warning.resolver.d.ts +2 -2
- package/lib/warnings/warning.resolver.d.ts.map +1 -1
- package/lib/warnings/warning.resolver.js +3 -9
- package/lib/warnings/warning.resolver.js.map +1 -1
- package/package.json +5 -5
- package/lib/common/entityInfo/entity-info.decorator.d.ts +0 -15
- package/lib/common/entityInfo/entity-info.decorator.d.ts.map +0 -1
- package/lib/common/entityInfo/entity-info.decorator.js.map +0 -1
- package/lib/common/entityInfo/entity-info.module.d.ts.map +0 -1
- package/lib/common/entityInfo/entity-info.module.js.map +0 -1
- package/lib/common/entityInfo/entity-info.object.d.ts +0 -5
- package/lib/common/entityInfo/entity-info.object.d.ts.map +0 -1
- package/lib/common/entityInfo/entity-info.object.js.map +0 -1
- package/lib/common/entityInfo/entity-info.service.d.ts +0 -9
- package/lib/common/entityInfo/entity-info.service.d.ts.map +0 -1
- package/lib/common/entityInfo/entity-info.service.js +0 -56
- package/lib/common/entityInfo/entity-info.service.js.map +0 -1
- package/lib/dam/files/files-entity-info.service.d.ts +0 -12
- package/lib/dam/files/files-entity-info.service.d.ts.map +0 -1
- package/lib/dam/files/files-entity-info.service.js +0 -43
- package/lib/dam/files/files-entity-info.service.js.map +0 -1
- package/lib/page-tree/page-tree-node-document-entity-info.service.d.ts +0 -12
- package/lib/page-tree/page-tree-node-document-entity-info.service.d.ts.map +0 -1
- package/lib/page-tree/page-tree-node-document-entity-info.service.js +0 -45
- package/lib/page-tree/page-tree-node-document-entity-info.service.js.map +0 -1
- /package/lib/{common/entityInfo → entity-info}/entity-info.module.d.ts +0 -0
|
@@ -15,7 +15,6 @@ export interface CrudGeneratorHooksService {
|
|
|
15
15
|
}) => Promise<MutationError[]>;
|
|
16
16
|
}
|
|
17
17
|
export interface CrudGeneratorOptions {
|
|
18
|
-
targetDirectory: string;
|
|
19
18
|
requiredPermission: Permission | Permission[];
|
|
20
19
|
create?: boolean;
|
|
21
20
|
update?: boolean;
|
|
@@ -29,9 +28,8 @@ export interface CrudGeneratorOptions {
|
|
|
29
28
|
paging?: boolean;
|
|
30
29
|
}
|
|
31
30
|
export declare const CRUD_GENERATOR_METADATA_KEY = "data:crudGeneratorOptions";
|
|
32
|
-
export declare function CrudGenerator({
|
|
31
|
+
export declare function CrudGenerator({ requiredPermission, create, update, delete: deleteMutation, list, single, position, hooksService, paging, }: CrudGeneratorOptions): ClassDecorator;
|
|
33
32
|
export interface CrudSingleGeneratorOptions {
|
|
34
|
-
targetDirectory: string;
|
|
35
33
|
requiredPermission: Permission | Permission[];
|
|
36
34
|
}
|
|
37
35
|
export declare const CRUD_SINGLE_GENERATOR_METADATA_KEY = "data:crudSingleGeneratorOptions";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crud-generator.decorator.d.ts","sourceRoot":"","sources":["../../../src/common/decorators/crud-generator.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAChF,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,yBAAyB;IAEtC,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;QAAE,WAAW,EAAE,WAAW,CAAC;QAAC,KAAK,EAAE,GAAG,CAAC;QAAC,IAAI,EAAE,GAAG,CAAA;KAAE,KAAK,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IAE7H,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,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AAC;IACjB,QAAQ,CAAC,EAAE;QAAE,aAAa,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACvC,YAAY,CAAC,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAC/C,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,2BAA2B,8BAA8B,CAAC;AAEvE,wBAAgB,aAAa,CAAC,EAC1B,kBAAkB,EAClB,MAAa,EACb,MAAa,EACb,MAAM,EAAE,cAAqB,EAC7B,IAAW,EACX,MAAa,EACb,QAAQ,EACR,YAAY,EACZ,MAAa,GAChB,EAAE,oBAAoB,GAAG,cAAc,CASvC;AAED,MAAM,WAAW,0BAA0B;IACvC,kBAAkB,EAAE,UAAU,GAAG,UAAU,EAAE,CAAC;CACjD;AAED,eAAO,MAAM,kCAAkC,oCAAoC,CAAC;AAEpF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,cAAc,CAKvF;AAED,MAAM,WAAW,gBAAgB;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,uBAAuB,mBAAmB,CAAC;AAExD,wBAAgB,SAAS,CAAC,EACtB,YAAmB,EACnB,oBAA4B,EAC5B,MAAa,EACb,MAAa,EACb,IAAW,EACX,KAAY,GACf,GAAE,gBAAqB,GAAG,iBAAiB,CAU3C"}
|
|
@@ -5,10 +5,10 @@ exports.CrudGenerator = CrudGenerator;
|
|
|
5
5
|
exports.CrudSingleGenerator = CrudSingleGenerator;
|
|
6
6
|
exports.CrudField = CrudField;
|
|
7
7
|
exports.CRUD_GENERATOR_METADATA_KEY = "data:crudGeneratorOptions";
|
|
8
|
-
function CrudGenerator({
|
|
8
|
+
function CrudGenerator({ requiredPermission, create = true, update = true, delete: deleteMutation = true, list = true, single = true, position, hooksService, paging = true, }) {
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
10
10
|
return function (target) {
|
|
11
|
-
Reflect.defineMetadata(exports.CRUD_GENERATOR_METADATA_KEY, {
|
|
11
|
+
Reflect.defineMetadata(exports.CRUD_GENERATOR_METADATA_KEY, { requiredPermission, create, update, delete: deleteMutation, list, single, position, hooksService, paging }, target);
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
exports.CRUD_SINGLE_GENERATOR_METADATA_KEY = "data:crudSingleGeneratorOptions";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crud-generator.decorator.js","sourceRoot":"","sources":["../../../src/common/decorators/crud-generator.decorator.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"crud-generator.decorator.js","sourceRoot":"","sources":["../../../src/common/decorators/crud-generator.decorator.ts"],"names":[],"mappings":";;;AA2BA,sCAmBC;AAQD,kDAKC;AAaD,8BAiBC;AAhEY,QAAA,2BAA2B,GAAG,2BAA2B,CAAC;AAEvE,SAAgB,aAAa,CAAC,EAC1B,kBAAkB,EAClB,MAAM,GAAG,IAAI,EACb,MAAM,GAAG,IAAI,EACb,MAAM,EAAE,cAAc,GAAG,IAAI,EAC7B,IAAI,GAAG,IAAI,EACX,MAAM,GAAG,IAAI,EACb,QAAQ,EACR,YAAY,EACZ,MAAM,GAAG,IAAI,GACM;IACnB,sEAAsE;IACtE,OAAO,UAAU,MAAgB;QAC7B,OAAO,CAAC,cAAc,CAClB,mCAA2B,EAC3B,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,EAC5G,MAAM,CACT,CAAC;IACN,CAAC,CAAC;AACN,CAAC;AAMY,QAAA,kCAAkC,GAAG,iCAAiC,CAAC;AAEpF,SAAgB,mBAAmB,CAAC,OAAmC;IACnE,sEAAsE;IACtE,OAAO,UAAU,MAAgB;QAC7B,OAAO,CAAC,cAAc,CAAC,0CAAkC,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAChF,CAAC,CAAC;AACN,CAAC;AAWY,QAAA,uBAAuB,GAAG,gBAAgB,CAAC;AAExD,SAAgB,SAAS,CAAC,EACtB,YAAY,GAAG,IAAI,EACnB,oBAAoB,GAAG,KAAK,EAC5B,MAAM,GAAG,IAAI,EACb,MAAM,GAAG,IAAI,EACb,IAAI,GAAG,IAAI,EACX,KAAK,GAAG,IAAI,MACM,EAAE;IACpB,8DAA8D;IAC9D,OAAO,UAAU,MAAW,EAAE,WAA4B;QACtD,OAAO,CAAC,cAAc,CAClB,+BAAuB,EACvB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,EACnE,MAAM,CAAC,WAAW,EAClB,WAAW,CACd,CAAC;IACN,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dam.module.d.ts","sourceRoot":"","sources":["../../src/dam/dam.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAkB,IAAI,EAAiB,MAAM,gBAAgB,CAAC;AAWpF,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMzC,OAAO,EAAiC,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE5F,OAAO,EAAsB,eAAe,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"dam.module.d.ts","sourceRoot":"","sources":["../../src/dam/dam.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAkB,IAAI,EAAiB,MAAM,gBAAgB,CAAC;AAWpF,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMzC,OAAO,EAAiC,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE5F,OAAO,EAAsB,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAiBrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,UAAU,gBAAgB;IACtB,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/D,KAAK,CAAC,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;CAC9B;AAED,qBAEa,SAAS;IAClB,MAAM,CAAC,QAAQ,CAAC,EACZ,KAAK,EACL,MAAsC,EACtC,IAA0C,EAC1C,GAAG,OAAO,EACb,EAAE,gBAAgB,GAAG,aAAa;CA4FtC"}
|
package/lib/dam/dam.module.js
CHANGED
|
@@ -44,7 +44,6 @@ const file_warning_service_1 = require("./files/file-warning.service");
|
|
|
44
44
|
const files_controller_1 = require("./files/files.controller");
|
|
45
45
|
const files_resolver_1 = require("./files/files.resolver");
|
|
46
46
|
const files_service_1 = require("./files/files.service");
|
|
47
|
-
const files_entity_info_service_1 = require("./files/files-entity-info.service");
|
|
48
47
|
const folders_controller_1 = require("./files/folders.controller");
|
|
49
48
|
const folders_resolver_1 = require("./files/folders.resolver");
|
|
50
49
|
const folders_service_1 = require("./files/folders.service");
|
|
@@ -100,7 +99,6 @@ let DamModule = DamModule_1 = class DamModule {
|
|
|
100
99
|
fileValidationServiceProvider,
|
|
101
100
|
FilesResolver,
|
|
102
101
|
FileDependentsResolver,
|
|
103
|
-
files_entity_info_service_1.FilesEntityInfoService,
|
|
104
102
|
files_service_1.FilesService,
|
|
105
103
|
file_licenses_resolver_1.FileLicensesResolver,
|
|
106
104
|
FoldersResolver,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dam.module.js","sourceRoot":"","sources":["../../src/dam/dam.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8CAAmD;AACnD,2CAAoF;AACpF,6CAAsD;AAEtD,0BAA+F;AAC/F,mFAA8E;AAC9E,iEAA6D;AAC7D,gIAAuH;AACvH,0GAAmG;AACnG,sGAA+F;AAC/F,4GAAqG;AACrG,mGAA8F;AAE9F,mDAA0E;AAC1E,mEAAoE;AACpE,iEAA4D;AAC5D,kHAAkH;AAClH,uHAA2G;AAC3G,8DAA4F;AAC5F,0EAAkE;AAClE,kEAAqF;AACrF,qEAAiE;AACjE,2EAAsE;AACtE,uEAAkE;AAClE,+DAAiE;AACjE,2DAA6D;AAC7D,yDAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"dam.module.js","sourceRoot":"","sources":["../../src/dam/dam.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8CAAmD;AACnD,2CAAoF;AACpF,6CAAsD;AAEtD,0BAA+F;AAC/F,mFAA8E;AAC9E,iEAA6D;AAC7D,gIAAuH;AACvH,0GAAmG;AACnG,sGAA+F;AAC/F,4GAAqG;AACrG,mGAA8F;AAE9F,mDAA0E;AAC1E,mEAAoE;AACpE,iEAA4D;AAC5D,kHAAkH;AAClH,uHAA2G;AAC3G,8DAA4F;AAC5F,0EAAkE;AAClE,kEAAqF;AACrF,qEAAiE;AACjE,2EAAsE;AACtE,uEAAkE;AAClE,+DAAiE;AACjE,2DAA6D;AAC7D,yDAAqD;AACrD,mEAAqE;AACrE,+DAAiE;AACjE,6DAAyD;AACzD,sGAAkG;AAClG,qFAAyE;AACzE,kEAAoE;AACpE,4DAAwD;AACxD,6GAA4G;AAC5G,yGAAmG;AACnG,yGAAwG;AAYjG,IAAM,SAAS,iBAAf,MAAM,SAAS;IAClB,MAAM,CAAC,QAAQ,CAAC,EAKG;;YALH,EACZ,KAAK,EACL,MAAM,GAAG,IAAA,kCAAkB,EAAC,EAAE,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AC9D;YACD,OAAO,EAAE;gBACL,4BAAY;gBACZ,gCAAc;gBACd,8BAAa;gBACb,iBAAiB;gBACjB,yEAAiC;gBACjC,qEAA+B;gBAC/B,qEAA+B;aAClC;SACJ,CAAC;IACN,CAAC;CACJ,CAAA;AAlGY,8BAAS;oBAAT,SAAS;IAFrB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,SAAS,CAkGrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.entity.d.ts","sourceRoot":"","sources":["../../../../src/dam/files/entities/file.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,EAGV,UAAU,EAOV,aAAa,EAGhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAMtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iEAAiE,CAAC;
|
|
1
|
+
{"version":3,"file":"file.entity.d.ts","sourceRoot":"","sources":["../../../../src/dam/files/entities/file.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,EAGV,UAAU,EAOV,aAAa,EAGhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAMtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iEAAiE,CAAC;AAEtG,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC7C,CAAC,aAAa,CAAC,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,yBAAyB,GAAG,0BAA0B,CAAC;IAC7H,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uBAAuB,EAAE,UAAU,CAAC,mBAAmB,CAAC,CAAC;IACzD,wBAAwB,EAAE,UAAU,CAAC,mBAAmB,CAAC,CAAC;CAC7D;AAED,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAAC,MAAM,EAAE,IAAI,CAAC,eAAe,CAAC,CAAA;CAAE,GAAG,IAAI,CAAC,aAAa,CAAC,CAgI3I;AAED,eAAO,MAAM,WAAW,YAAY,CAAC;AAErC,eAAO,MAAM,eAAe,YAAY,CAAC"}
|
|
@@ -14,11 +14,10 @@ exports.createFileEntity = createFileEntity;
|
|
|
14
14
|
const postgresql_1 = require("@mikro-orm/postgresql");
|
|
15
15
|
const graphql_1 = require("@nestjs/graphql");
|
|
16
16
|
const uuid_1 = require("uuid");
|
|
17
|
-
const entity_info_decorator_1 = require("../../../
|
|
17
|
+
const entity_info_decorator_1 = require("../../../entity-info/entity-info.decorator");
|
|
18
18
|
const create_warnings_decorator_1 = require("../../../warnings/decorators/create-warnings.decorator");
|
|
19
19
|
const dam_media_alternative_entity_1 = require("../dam-media-alternatives/entities/dam-media-alternative.entity");
|
|
20
20
|
const file_warning_service_1 = require("../file-warning.service");
|
|
21
|
-
const files_entity_info_service_1 = require("../files-entity-info.service");
|
|
22
21
|
const file_image_entity_1 = require("./file-image.entity");
|
|
23
22
|
const license_embeddable_1 = require("./license.embeddable");
|
|
24
23
|
function createFileEntity({ Scope, Folder }) {
|
|
@@ -170,7 +169,7 @@ function createFileEntity({ Scope, Folder }) {
|
|
|
170
169
|
__metadata("design:type", Object)
|
|
171
170
|
], DamFile.prototype, "scope", void 0);
|
|
172
171
|
DamFile = __decorate([
|
|
173
|
-
(0, entity_info_decorator_1.EntityInfo)(
|
|
172
|
+
(0, entity_info_decorator_1.EntityInfo)(`SELECT "name", "secondaryInformation", "visible", "id", 'DamFile' AS "entityName" FROM "DamFileEntityInfo"`),
|
|
174
173
|
(0, postgresql_1.Entity)({ tableName: exports.FILE_TABLE_NAME }),
|
|
175
174
|
(0, graphql_1.ObjectType)("DamFile")
|
|
176
175
|
], DamFile);
|
|
@@ -180,7 +179,7 @@ function createFileEntity({ Scope, Folder }) {
|
|
|
180
179
|
let DamFile = class DamFile extends FileBase {
|
|
181
180
|
};
|
|
182
181
|
DamFile = __decorate([
|
|
183
|
-
(0, entity_info_decorator_1.EntityInfo)(
|
|
182
|
+
(0, entity_info_decorator_1.EntityInfo)(`SELECT "name", "secondaryInformation", "visible", "id", 'DamFile' AS "entityName" FROM "DamFileEntityInfo"`),
|
|
184
183
|
(0, postgresql_1.Entity)({ tableName: exports.FILE_TABLE_NAME }),
|
|
185
184
|
(0, graphql_1.ObjectType)("DamFile")
|
|
186
185
|
], DamFile);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.entity.js","sourceRoot":"","sources":["../../../../src/dam/files/entities/file.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"file.entity.js","sourceRoot":"","sources":["../../../../src/dam/files/entities/file.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoDA,4CAgIC;AApLD,sDAc+B;AAE/B,6CAA6D;AAC7D,+BAAkC;AAElC,sFAAwE;AACxE,sGAAwF;AAExF,kHAAsG;AACtG,kEAA6D;AAC7D,2DAAmD;AAEnD,6DAA+C;AA0B/C,SAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAsE;IAIlH,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,uBAAU;QAAjC;;YAGI,OAAE,GAAW,IAAA,SAAI,GAAE,CAAC;YAyDpB,aAAQ,GAAY,KAAK,CAAC;YAqB1B,cAAS,GAAS,IAAI,IAAI,EAAE,CAAC;YAO7B,cAAS,GAAS,IAAI,IAAI,EAAE,CAAC;YAW7B,4BAAuB,GAAoC,IAAI,uBAAU,CAAsB,IAAI,CAAC,CAAC;YAGrG,6BAAwB,GAAoC,IAAI,uBAAU,CAAsB,IAAI,CAAC,CAAC;YAEtG,yCAAyC;QAC7C,CAAC;KAAA,CAAA;IAtGG;QAFC,IAAA,uBAAU,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QAClC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;wCACI;IASpB;QAPC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACvC,IAAA,sBAAS,EAAC;YACP,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM;YACpB,UAAU,EAAE,CAAC,MAAuB,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK;YACrD,UAAU,EAAE,UAAU;YACtB,QAAQ,EAAE,IAAI;SACjB,CAAC;;4CACuB;IAIzB;QAFC,IAAA,eAAK,GAAE;QACP,IAAA,qBAAQ,EAAC,E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"file":"dependencies.module.d.ts","sourceRoot":"","sources":["../../src/dependencies/dependencies.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dependencies.module.d.ts","sourceRoot":"","sources":["../../src/dependencies/dependencies.module.ts"],"names":[],"mappings":"AASA,qBAMa,kBAAkB;CAAG"}
|
|
@@ -9,9 +9,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.DependenciesModule = void 0;
|
|
10
10
|
const nestjs_1 = require("@mikro-orm/nestjs");
|
|
11
11
|
const common_1 = require("@nestjs/common");
|
|
12
|
-
const entity_info_module_1 = require("../
|
|
12
|
+
const entity_info_module_1 = require("../entity-info/entity-info.module");
|
|
13
13
|
const dependencies_service_1 = require("./dependencies.service");
|
|
14
14
|
const discover_service_1 = require("./discover.service");
|
|
15
|
+
const block_index_dependency_object_1 = require("./entities/block-index-dependency.object");
|
|
15
16
|
const block_index_refresh_entity_1 = require("./entities/block-index-refresh.entity");
|
|
16
17
|
let DependenciesModule = class DependenciesModule {
|
|
17
18
|
};
|
|
@@ -19,7 +20,7 @@ exports.DependenciesModule = DependenciesModule;
|
|
|
19
20
|
exports.DependenciesModule = DependenciesModule = __decorate([
|
|
20
21
|
(0, common_1.Global)(),
|
|
21
22
|
(0, common_1.Module)({
|
|
22
|
-
imports: [nestjs_1.MikroOrmModule.forFeature([block_index_refresh_entity_1.BlockIndexRefresh]), entity_info_module_1.EntityInfoModule],
|
|
23
|
+
imports: [nestjs_1.MikroOrmModule.forFeature([block_index_refresh_entity_1.BlockIndexRefresh, block_index_dependency_object_1.BlockIndexDependencyObject]), entity_info_module_1.EntityInfoModule],
|
|
23
24
|
providers: [discover_service_1.DiscoverService, dependencies_service_1.DependenciesService],
|
|
24
25
|
exports: [discover_service_1.DiscoverService, dependencies_service_1.DependenciesService],
|
|
25
26
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencies.module.js","sourceRoot":"","sources":["../../src/dependencies/dependencies.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,8CAAmD;AACnD,2CAAgD;AAEhD,
|
|
1
|
+
{"version":3,"file":"dependencies.module.js","sourceRoot":"","sources":["../../src/dependencies/dependencies.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,8CAAmD;AACnD,2CAAgD;AAEhD,0EAAqE;AACrE,iEAA6D;AAC7D,yDAAqD;AACrD,4FAAsF;AACtF,sFAA0E;AAQnE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,gDAAkB;6BAAlB,kBAAkB;IAN9B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE,CAAC,uBAAc,CAAC,UAAU,CAAC,CAAC,8CAAiB,EAAE,0DAA0B,CAAC,CAAC,EAAE,qCAAgB,CAAC;QACvG,SAAS,EAAE,CAAC,kCAAe,EAAE,0CAAmB,CAAC;QACjD,OAAO,EAAE,CAAC,kCAAe,EAAE,0CAAmB,CAAC;KAClD,CAAC;GACW,kBAAkB,CAAG"}
|
|
@@ -11,7 +11,7 @@ export declare class DependenciesResolverFactory {
|
|
|
11
11
|
readonly dependenciesService: DependenciesService;
|
|
12
12
|
dependencies(node: AnyEntity<{
|
|
13
13
|
id: string;
|
|
14
|
-
}>, { filter, offset, limit, forceRefresh }: DependenciesArgs): Promise<PaginatedDependencies>;
|
|
14
|
+
}>, { filter, sort, offset, limit, forceRefresh }: DependenciesArgs): Promise<PaginatedDependencies>;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencies.resolver.factory.d.ts","sourceRoot":"","sources":["../../src/dependencies/dependencies.resolver.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAItC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,qBAAa,2BAA2B;IACpC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC;kCAIlB,mBAAmB;0CAAnB,mBAAmB;+BAIzC,SAAS,CAAC;gBAAE,EAAE,EAAE,MAAM,CAAA;aAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"dependencies.resolver.factory.d.ts","sourceRoot":"","sources":["../../src/dependencies/dependencies.resolver.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAItC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,qBAAa,2BAA2B;IACpC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC;kCAIlB,mBAAmB;0CAAnB,mBAAmB;+BAIzC,SAAS,CAAC;gBAAE,EAAE,EAAE,MAAM,CAAA;aAAE,CAAC,iDACc,gBAAgB,GACxE,OAAO,CAAC,qBAAqB,CAAC;;;CAO5C"}
|
|
@@ -34,8 +34,8 @@ class DependenciesResolverFactory {
|
|
|
34
34
|
this.dependenciesService = dependenciesService;
|
|
35
35
|
}
|
|
36
36
|
dependencies(node_1, _a) {
|
|
37
|
-
return __awaiter(this, arguments, void 0, function* (node, { filter, offset, limit, forceRefresh }) {
|
|
38
|
-
return this.dependenciesService.getDependencies(node, filter,
|
|
37
|
+
return __awaiter(this, arguments, void 0, function* (node, { filter, sort, offset, limit, forceRefresh }) {
|
|
38
|
+
return this.dependenciesService.getDependencies(node, { filter, offset, limit, forceRefresh, sort });
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencies.resolver.factory.js","sourceRoot":"","sources":["../../src/dependencies/dependencies.resolver.factory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA,6CAAuE;AAEvE,gHAAkG;AAClG,iEAA6D;AAC7D,+DAA2D;AAC3D,yEAAqE;AAErE,MAAa,2BAA2B;IAC7B,AAAP,MAAM,CAAC,MAAM,CAA4C,QAAW;QAChE,IAEM,oBAAoB,GAF1B,MAEM,oBAAoB;YACtB,YAAqB,mBAAwC;gBAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;YAAG,CAAC;YAG3D,YAAY;qEACJ,IAA+B,EACjC,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAoB;
|
|
1
|
+
{"version":3,"file":"dependencies.resolver.factory.js","sourceRoot":"","sources":["../../src/dependencies/dependencies.resolver.factory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA,6CAAuE;AAEvE,gHAAkG;AAClG,iEAA6D;AAC7D,+DAA2D;AAC3D,yEAAqE;AAErE,MAAa,2BAA2B;IAC7B,AAAP,MAAM,CAAC,MAAM,CAA4C,QAAW;QAChE,IAEM,oBAAoB,GAF1B,MAEM,oBAAoB;YACtB,YAAqB,mBAAwC;gBAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;YAAG,CAAC;YAG3D,YAAY;qEACJ,IAA+B,EACjC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAoB;oBAEvE,OAAO,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;gBACzG,CAAC;aAAA;SACJ,CAAA;QANS;YADL,IAAA,sBAAY,EAAC,GAAG,EAAE,CAAC,8CAAqB,CAAC;YAErC,WAAA,IAAA,gBAAM,GAAE,CAAA;YACR,WAAA,IAAA,cAAI,GAAE,CAAA;;qDAAgD,oCAAgB;;gEAG1E;QATC,oBAAoB;YAFzB,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,QAAQ,CAAC;YACxB,IAAA,kDAAkB,EAAC,cAAc,CAAC;6CAEW,0CAAmB;WAD3D,oBAAoB,CAUzB;QAED,OAAO,oBAAoB,CAAC;IAChC,CAAC;CACJ;AAlBD,kEAkBC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AnyEntity, EntityManager } from "@mikro-orm/postgresql";
|
|
2
|
-
import { EntityInfoService } from "../
|
|
2
|
+
import { EntityInfoService } from "../entity-info/entity-info.service";
|
|
3
3
|
import { DiscoverService } from "./discover.service";
|
|
4
4
|
import { DependencyFilter, DependentFilter } from "./dto/dependencies.filter";
|
|
5
|
+
import { DependencySort } from "./dto/dependency-sort";
|
|
5
6
|
import { PaginatedDependencies } from "./dto/paginated-dependencies";
|
|
6
7
|
export declare class DependenciesService {
|
|
7
8
|
private readonly discoverService;
|
|
@@ -11,6 +12,7 @@ export declare class DependenciesService {
|
|
|
11
12
|
private readonly logger;
|
|
12
13
|
constructor(discoverService: DiscoverService, entityInfoService: EntityInfoService, entityManager: EntityManager);
|
|
13
14
|
createViews(): Promise<void>;
|
|
15
|
+
dropViews(): Promise<void>;
|
|
14
16
|
private createDependenciesView;
|
|
15
17
|
private createBlockIndexView;
|
|
16
18
|
/**
|
|
@@ -40,28 +42,32 @@ export declare class DependenciesService {
|
|
|
40
42
|
}> | {
|
|
41
43
|
entityName: string;
|
|
42
44
|
id: string;
|
|
43
|
-
}, filter?: DependentFilter & {
|
|
44
|
-
rootEntityName?: string;
|
|
45
|
-
}, paginationArgs?: {
|
|
46
|
-
offset: number;
|
|
47
|
-
limit: number;
|
|
48
45
|
}, options?: {
|
|
49
|
-
|
|
46
|
+
filter?: DependentFilter & {
|
|
47
|
+
rootEntityName?: string;
|
|
48
|
+
};
|
|
49
|
+
offset?: number;
|
|
50
|
+
limit?: number;
|
|
51
|
+
forceRefresh?: boolean;
|
|
52
|
+
sort?: DependencySort[];
|
|
50
53
|
}): Promise<PaginatedDependencies>;
|
|
51
54
|
getDependencies(root: AnyEntity<{
|
|
52
55
|
id: string;
|
|
53
56
|
}> | {
|
|
54
57
|
entityName: string;
|
|
55
58
|
id: string;
|
|
56
|
-
}, filter?: DependencyFilter & {
|
|
57
|
-
targetEntityName?: string;
|
|
58
|
-
}, paginationArgs?: {
|
|
59
|
-
offset: number;
|
|
60
|
-
limit: number;
|
|
61
59
|
}, options?: {
|
|
62
|
-
|
|
60
|
+
filter?: DependencyFilter & {
|
|
61
|
+
targetEntityName?: string;
|
|
62
|
+
};
|
|
63
|
+
offset?: number;
|
|
64
|
+
limit?: number;
|
|
65
|
+
forceRefresh?: boolean;
|
|
66
|
+
sort?: DependencySort[];
|
|
63
67
|
}): Promise<PaginatedDependencies>;
|
|
64
|
-
private
|
|
65
|
-
private
|
|
68
|
+
private remapFilter;
|
|
69
|
+
private remapColumnName;
|
|
70
|
+
private remapSort;
|
|
71
|
+
private mapToResult;
|
|
66
72
|
}
|
|
67
73
|
//# sourceMappingURL=dependencies.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencies.service.d.ts","sourceRoot":"","sources":["../../src/dependencies/dependencies.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAc,aAAa,
|
|
1
|
+
{"version":3,"file":"dependencies.service.d.ts","sourceRoot":"","sources":["../../src/dependencies/dependencies.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,S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;QACf,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,IAAI,CAAC,EAAE,cAAc,EAAE,CAAC;KAC3B,GACF,OAAO,CAAC,qBAAqB,CAAC;IAsB3B,eAAe,CACjB,IAAI,EAAE,SAAS,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,EACpE,OAAO,CAAC,EAAE;QACN,MAAM,CAAC,EAAE,gBAAgB,GAAG;YAAE,gBAAgB,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,IAAI,CAAC,EAAE,cAAc,EAAE,CAAC;KAC3B,GACF,OAAO,CAAC,qBAAqB,CAAC;IAuBjC,OAAO,CAAC,WAAW;IA2BnB,OAAO,CAAC,eAAe;IAcvB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,WAAW;CAOtB"}
|
|
@@ -17,6 +17,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
17
17
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
21
|
+
var t = {};
|
|
22
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
23
|
+
t[p] = s[p];
|
|
24
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
25
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
26
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
27
|
+
t[p[i]] = s[p[i]];
|
|
28
|
+
}
|
|
29
|
+
return t;
|
|
30
|
+
};
|
|
20
31
|
var DependenciesService_1;
|
|
21
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
33
|
exports.DependenciesService = void 0;
|
|
@@ -24,9 +35,13 @@ const postgresql_1 = require("@mikro-orm/postgresql");
|
|
|
24
35
|
const common_1 = require("@nestjs/common");
|
|
25
36
|
const date_fns_1 = require("date-fns");
|
|
26
37
|
const uuid_1 = require("uuid");
|
|
27
|
-
const
|
|
38
|
+
const mikro_orm_1 = require("../common/filter/mikro-orm");
|
|
39
|
+
const string_filter_1 = require("../common/filter/string.filter");
|
|
40
|
+
const entity_info_service_1 = require("../entity-info/entity-info.service");
|
|
28
41
|
const discover_service_1 = require("./discover.service");
|
|
42
|
+
const dependency_1 = require("./dto/dependency");
|
|
29
43
|
const paginated_dependencies_1 = require("./dto/paginated-dependencies");
|
|
44
|
+
const block_index_dependency_object_1 = require("./entities/block-index-dependency.object");
|
|
30
45
|
// Advisory lock key for block_index_dependencies refresh deduplication.
|
|
31
46
|
const BLOCK_INDEX_REFRESH_LOCK_KEY = 4201;
|
|
32
47
|
let DependenciesService = DependenciesService_1 = class DependenciesService {
|
|
@@ -39,8 +54,17 @@ let DependenciesService = DependenciesService_1 = class DependenciesService {
|
|
|
39
54
|
}
|
|
40
55
|
createViews() {
|
|
41
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
yield this.
|
|
57
|
+
yield this.dropViews();
|
|
43
58
|
yield this.createBlockIndexView();
|
|
59
|
+
yield this.entityInfoService.createEntityInfoView();
|
|
60
|
+
yield this.createDependenciesView();
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
dropViews() {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
yield this.connection.execute(`DROP MATERIALIZED VIEW IF EXISTS "block_index_dependencies"`);
|
|
66
|
+
yield this.connection.execute(`DROP VIEW IF EXISTS "block_index"`);
|
|
67
|
+
yield this.entityInfoService.dropEntityInfoView();
|
|
44
68
|
});
|
|
45
69
|
}
|
|
46
70
|
createDependenciesView() {
|
|
@@ -59,24 +83,34 @@ let DependenciesService = DependenciesService_1 = class DependenciesService {
|
|
|
59
83
|
const { metadata, column, graphqlObjectType } = rootBlockEntity;
|
|
60
84
|
const primary = metadata.primaryKeys[0];
|
|
61
85
|
const select = `SELECT
|
|
62
|
-
"${metadata.tableName}"."${primary}"
|
|
63
|
-
'${metadata.name}'
|
|
64
|
-
'${graphqlObjectType}'
|
|
65
|
-
'${metadata.tableName}'
|
|
66
|
-
'${column}'
|
|
67
|
-
'${primary}'
|
|
68
|
-
indexObj->>'blockname'
|
|
69
|
-
indexObj->>'jsonPath'
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
targetTableData->>'
|
|
74
|
-
targetTableData->>'
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
86
|
+
"${metadata.tableName}"."${primary}" "rootId",
|
|
87
|
+
'${metadata.name}' "rootEntityName",
|
|
88
|
+
'${graphqlObjectType}' "rootGraphqlObjectType",
|
|
89
|
+
'${metadata.tableName}' "rootTableName",
|
|
90
|
+
'${column}' "rootColumnName",
|
|
91
|
+
'${primary}' "rootPrimaryKey",
|
|
92
|
+
indexObj->>'blockname' "blockname",
|
|
93
|
+
indexObj->>'jsonPath' "jsonPath",
|
|
94
|
+
indexObj->>'visible' "blockVisible",
|
|
95
|
+
COALESCE(ei_root."visible", true) "entityVisible",
|
|
96
|
+
((indexObj->>'visible')::boolean AND COALESCE(ei_root."visible", true)) "visible",
|
|
97
|
+
targetTableData->>'entityName' "targetEntityName",
|
|
98
|
+
targetTableData->>'graphqlObjectType' "targetGraphqlObjectType",
|
|
99
|
+
targetTableData->>'tableName' "targetTableName",
|
|
100
|
+
targetTableData->>'primary' "targetPrimaryKey",
|
|
101
|
+
dependenciesObj->>'id' "targetId",
|
|
102
|
+
ei_root."name" "rootName",
|
|
103
|
+
ei_root."secondaryInformation" "rootSecondaryInformation",
|
|
104
|
+
ei_target."name" "targetName",
|
|
105
|
+
ei_target."secondaryInformation" "targetSecondaryInformation"
|
|
106
|
+
FROM "${metadata.tableName}"
|
|
107
|
+
CROSS JOIN LATERAL json_array_elements("${metadata.tableName}"."${column}"->'index') indexObj
|
|
108
|
+
CROSS JOIN LATERAL json_array_elements(indexObj->'dependencies') dependenciesObj
|
|
109
|
+
CROSS JOIN LATERAL json_extract_path('${JSON.stringify(targetEntitiesNameData)}', dependenciesObj->>'targetEntityName') targetTableData
|
|
110
|
+
LEFT JOIN "EntityInfo" as ei_root ON ei_root."id" = "${metadata.tableName}"."${primary}"::text
|
|
111
|
+
AND ei_root."entityName" = '${metadata.name}'
|
|
112
|
+
LEFT JOIN "EntityInfo" as ei_target ON ei_target."id" = dependenciesObj->>'id'
|
|
113
|
+
AND ei_target."entityName" = dependenciesObj->>'targetEntityName'`;
|
|
80
114
|
indexSelects.push(select);
|
|
81
115
|
}
|
|
82
116
|
if (indexSelects.length === 0) {
|
|
@@ -237,82 +271,92 @@ let DependenciesService = DependenciesService_1 = class DependenciesService {
|
|
|
237
271
|
}
|
|
238
272
|
});
|
|
239
273
|
}
|
|
240
|
-
getDependents(target,
|
|
274
|
+
getDependents(target, options) {
|
|
241
275
|
return __awaiter(this, void 0, void 0, function* () {
|
|
242
|
-
var _a
|
|
276
|
+
var _a;
|
|
243
277
|
yield this.refreshViews({ force: options === null || options === void 0 ? void 0 : options.forceRefresh });
|
|
278
|
+
const _b = (_a = options === null || options === void 0 ? void 0 : options.filter) !== null && _a !== void 0 ? _a : {}, { rootEntityName } = _b, filter = __rest(_b, ["rootEntityName"]);
|
|
244
279
|
const entityName = "entityName" in target ? target.entityName : target.constructor.name;
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
const entityInfo = yield this.entityInfoService.getEntityInfo(instance);
|
|
254
|
-
dependency = Object.assign(Object.assign({}, dependency), entityInfo);
|
|
255
|
-
}
|
|
256
|
-
ret.push(dependency);
|
|
280
|
+
const where = (0, mikro_orm_1.filtersToMikroOrmQuery)(this.remapFilter(filter, "dependents"));
|
|
281
|
+
where.targetEntityName = entityName;
|
|
282
|
+
where.targetId = target.id;
|
|
283
|
+
if (rootEntityName)
|
|
284
|
+
where.rootEntityName = rootEntityName;
|
|
285
|
+
const findOptions = { offset: options === null || options === void 0 ? void 0 : options.offset, limit: options === null || options === void 0 ? void 0 : options.limit };
|
|
286
|
+
if (options === null || options === void 0 ? void 0 : options.sort) {
|
|
287
|
+
findOptions.orderBy = (0, mikro_orm_1.gqlSortToMikroOrmOrderBy)(this.remapSort(options.sort, "dependents"));
|
|
257
288
|
}
|
|
258
|
-
const
|
|
259
|
-
const
|
|
260
|
-
return new paginated_dependencies_1.PaginatedDependencies(
|
|
289
|
+
const [entities, totalCount] = yield this.entityManager.findAndCount(block_index_dependency_object_1.BlockIndexDependencyObject, where, findOptions);
|
|
290
|
+
const results = entities.map((entity) => this.mapToResult(entity, "dependents"));
|
|
291
|
+
return new paginated_dependencies_1.PaginatedDependencies(results, totalCount);
|
|
261
292
|
});
|
|
262
293
|
}
|
|
263
|
-
getDependencies(root,
|
|
294
|
+
getDependencies(root, options) {
|
|
264
295
|
return __awaiter(this, void 0, void 0, function* () {
|
|
265
|
-
var _a
|
|
296
|
+
var _a;
|
|
266
297
|
yield this.refreshViews({ force: options === null || options === void 0 ? void 0 : options.forceRefresh });
|
|
298
|
+
const _b = (_a = options === null || options === void 0 ? void 0 : options.filter) !== null && _a !== void 0 ? _a : {}, { targetEntityName } = _b, filter = __rest(_b, ["targetEntityName"]);
|
|
267
299
|
const entityName = "entityName" in root ? root.entityName : root.constructor.name;
|
|
268
|
-
const
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
const entityInfo = yield this.entityInfoService.getEntityInfo(instance);
|
|
277
|
-
dependency = Object.assign(Object.assign({}, dependency), entityInfo);
|
|
278
|
-
}
|
|
279
|
-
ret.push(dependency);
|
|
300
|
+
const where = (0, mikro_orm_1.filtersToMikroOrmQuery)(this.remapFilter(filter, "dependencies"));
|
|
301
|
+
where.rootEntityName = entityName;
|
|
302
|
+
where.rootId = root.id;
|
|
303
|
+
if (targetEntityName)
|
|
304
|
+
where.targetEntityName = targetEntityName;
|
|
305
|
+
const findOptions = { offset: options === null || options === void 0 ? void 0 : options.offset, limit: options === null || options === void 0 ? void 0 : options.limit };
|
|
306
|
+
if (options === null || options === void 0 ? void 0 : options.sort) {
|
|
307
|
+
findOptions.orderBy = (0, mikro_orm_1.gqlSortToMikroOrmOrderBy)(this.remapSort(options.sort, "dependencies"));
|
|
280
308
|
}
|
|
281
|
-
const
|
|
282
|
-
const
|
|
283
|
-
return new paginated_dependencies_1.PaginatedDependencies(
|
|
309
|
+
const [entities, totalCount] = yield this.entityManager.findAndCount(block_index_dependency_object_1.BlockIndexDependencyObject, where, findOptions);
|
|
310
|
+
const results = entities.map((entity) => this.mapToResult(entity, "dependencies"));
|
|
311
|
+
return new paginated_dependencies_1.PaginatedDependencies(results, totalCount);
|
|
284
312
|
});
|
|
285
313
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
qb.andWhere({ rootId: filter.rootId });
|
|
314
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
315
|
+
remapFilter(filter, context) {
|
|
316
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
317
|
+
const remapped = {};
|
|
318
|
+
for (const [key, value] of Object.entries(filter)) {
|
|
319
|
+
if (value === undefined)
|
|
320
|
+
continue;
|
|
321
|
+
if (key === "and" || key === "or") {
|
|
322
|
+
remapped[key] = value.map((f) => this.remapFilter(f, context));
|
|
323
|
+
continue;
|
|
324
|
+
}
|
|
325
|
+
const mappedKey = this.remapColumnName(key, context);
|
|
326
|
+
// Convert plain string values to StringFilter so filtersToMikroOrmQuery can handle them
|
|
327
|
+
if (typeof value === "string") {
|
|
328
|
+
const stringFilter = new string_filter_1.StringFilter();
|
|
329
|
+
stringFilter.equal = value;
|
|
330
|
+
remapped[mappedKey] = stringFilter;
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
remapped[mappedKey] = value;
|
|
334
|
+
}
|
|
308
335
|
}
|
|
309
|
-
|
|
310
|
-
|
|
336
|
+
return remapped;
|
|
337
|
+
}
|
|
338
|
+
remapColumnName(key, context) {
|
|
339
|
+
const prefix = context === "dependents" ? "root" : "target";
|
|
340
|
+
switch (key) {
|
|
341
|
+
case "name":
|
|
342
|
+
return `${prefix}Name`;
|
|
343
|
+
case "secondaryInformation":
|
|
344
|
+
return `${prefix}SecondaryInformation`;
|
|
345
|
+
case "graphqlObjectType":
|
|
346
|
+
return `${prefix}GraphqlObjectType`;
|
|
347
|
+
default:
|
|
348
|
+
return key;
|
|
311
349
|
}
|
|
312
|
-
return qb;
|
|
313
350
|
}
|
|
314
|
-
|
|
315
|
-
return
|
|
351
|
+
remapSort(sort, context) {
|
|
352
|
+
return sort.map(({ field, direction }) => ({ field: this.remapColumnName(field, context), direction }));
|
|
353
|
+
}
|
|
354
|
+
mapToResult(entity, context) {
|
|
355
|
+
const result = new dependency_1.Dependency();
|
|
356
|
+
Object.assign(result, entity);
|
|
357
|
+
result.name = context === "dependents" ? entity.rootName : entity.targetName;
|
|
358
|
+
result.secondaryInformation = context === "dependents" ? entity.rootSecondaryInformation : entity.targetSecondaryInformation;
|
|
359
|
+
return result;
|
|
316
360
|
}
|
|
317
361
|
};
|
|
318
362
|
exports.DependenciesService = DependenciesService;
|