@cyberismo/data-handler 0.0.14 → 0.0.16
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/card-metadata-updater.js +8 -4
- package/dist/card-metadata-updater.js.map +1 -1
- package/dist/command-handler.d.ts +4 -0
- package/dist/command-handler.js +29 -19
- package/dist/command-handler.js.map +1 -1
- package/dist/command-manager.d.ts +25 -2
- package/dist/command-manager.js +30 -5
- package/dist/command-manager.js.map +1 -1
- package/dist/commands/create.d.ts +1 -1
- package/dist/commands/create.js +45 -93
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/edit.d.ts +1 -15
- package/dist/commands/edit.js +15 -89
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/export.d.ts +11 -2
- package/dist/commands/export.js +58 -58
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/import.d.ts +9 -1
- package/dist/commands/import.js +17 -11
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/move.d.ts +1 -2
- package/dist/commands/move.js +107 -146
- package/dist/commands/move.js.map +1 -1
- package/dist/commands/remove.d.ts +8 -1
- package/dist/commands/remove.js +17 -48
- package/dist/commands/remove.js.map +1 -1
- package/dist/commands/rename.d.ts +4 -9
- package/dist/commands/rename.js +34 -108
- package/dist/commands/rename.js.map +1 -1
- package/dist/commands/show.d.ts +22 -34
- package/dist/commands/show.js +103 -151
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/transition.d.ts +9 -2
- package/dist/commands/transition.js +49 -44
- package/dist/commands/transition.js.map +1 -1
- package/dist/commands/update.d.ts +18 -12
- package/dist/commands/update.js +34 -18
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/validate.d.ts +18 -10
- package/dist/commands/validate.js +101 -47
- package/dist/commands/validate.js.map +1 -1
- package/dist/containers/card-container.d.ts +87 -24
- package/dist/containers/card-container.js +183 -279
- package/dist/containers/card-container.js.map +1 -1
- package/dist/containers/project/calculation-engine.d.ts +13 -4
- package/dist/containers/project/calculation-engine.js +79 -77
- package/dist/containers/project/calculation-engine.js.map +1 -1
- package/dist/containers/project/card-cache.d.ts +146 -0
- package/dist/containers/project/card-cache.js +411 -0
- package/dist/containers/project/card-cache.js.map +1 -0
- package/dist/containers/project/project-paths.d.ts +5 -4
- package/dist/containers/project/project-paths.js +16 -12
- package/dist/containers/project/project-paths.js.map +1 -1
- package/dist/containers/project/resource-cache.d.ts +169 -0
- package/dist/containers/project/resource-cache.js +507 -0
- package/dist/containers/project/resource-cache.js.map +1 -0
- package/dist/containers/project/resource-handler.d.ts +129 -0
- package/dist/containers/project/resource-handler.js +206 -0
- package/dist/containers/project/resource-handler.js.map +1 -0
- package/dist/containers/project.d.ts +114 -195
- package/dist/containers/project.js +425 -535
- package/dist/containers/project.js.map +1 -1
- package/dist/containers/template.d.ts +22 -32
- package/dist/containers/template.js +113 -115
- package/dist/containers/template.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/folder-content-interfaces.d.ts +7 -4
- package/dist/interfaces/folder-content-interfaces.js +3 -3
- package/dist/interfaces/folder-content-interfaces.js.map +1 -1
- package/dist/interfaces/macros.d.ts +1 -0
- package/dist/interfaces/macros.js +1 -1
- package/dist/interfaces/macros.js.map +1 -1
- package/dist/interfaces/project-interfaces.d.ts +7 -5
- package/dist/interfaces/project-interfaces.js.map +1 -1
- package/dist/interfaces/resource-interfaces.d.ts +25 -22
- package/dist/interfaces/resource-interfaces.js +3 -0
- package/dist/interfaces/resource-interfaces.js.map +1 -1
- package/dist/macros/common.d.ts +10 -10
- package/dist/macros/createCards/index.d.ts +0 -13
- package/dist/macros/createCards/index.js.map +1 -1
- package/dist/macros/createCards/types.d.ts +44 -0
- package/dist/macros/createCards/types.js +15 -0
- package/dist/macros/createCards/types.js.map +1 -0
- package/dist/macros/graph/index.d.ts +2 -6
- package/dist/macros/graph/index.js +14 -28
- package/dist/macros/graph/index.js.map +1 -1
- package/dist/macros/graph/types.d.ts +23 -0
- package/dist/macros/graph/types.js +15 -0
- package/dist/macros/graph/types.js.map +1 -0
- package/dist/macros/image/index.d.ts +8 -16
- package/dist/macros/image/index.js +36 -33
- package/dist/macros/image/index.js.map +1 -1
- package/dist/macros/image/types.d.ts +38 -0
- package/dist/macros/image/types.js +15 -0
- package/dist/macros/image/types.js.map +1 -0
- package/dist/macros/include/index.d.ts +1 -6
- package/dist/macros/include/index.js +4 -7
- package/dist/macros/include/index.js.map +1 -1
- package/dist/macros/include/types.d.ts +31 -0
- package/dist/macros/include/types.js +15 -0
- package/dist/macros/include/types.js.map +1 -0
- package/dist/macros/index.d.ts +1 -1
- package/dist/macros/index.js +2 -2
- package/dist/macros/index.js.map +1 -1
- package/dist/macros/percentage/index.d.ts +0 -6
- package/dist/macros/percentage/index.js.map +1 -1
- package/dist/macros/percentage/types.d.ts +31 -0
- package/dist/macros/percentage/types.js +15 -0
- package/dist/macros/percentage/types.js.map +1 -0
- package/dist/macros/report/index.d.ts +0 -3
- package/dist/macros/report/index.js +3 -6
- package/dist/macros/report/index.js.map +1 -1
- package/dist/macros/report/types.d.ts +19 -0
- package/dist/macros/report/types.js +15 -0
- package/dist/macros/report/types.js.map +1 -0
- package/dist/macros/scoreCard/index.d.ts +0 -6
- package/dist/macros/scoreCard/index.js.map +1 -1
- package/dist/macros/scoreCard/types.d.ts +31 -0
- package/dist/macros/scoreCard/types.js +15 -0
- package/dist/macros/scoreCard/types.js.map +1 -0
- package/dist/macros/types.d.ts +25 -0
- package/dist/macros/types.js +2 -0
- package/dist/macros/types.js.map +1 -0
- package/dist/macros/vega/index.d.ts +0 -4
- package/dist/macros/vega/index.js.map +1 -1
- package/dist/macros/vega/types.d.ts +20 -0
- package/dist/macros/vega/types.js +2 -0
- package/dist/macros/vega/types.js.map +1 -0
- package/dist/macros/vegalite/index.d.ts +0 -4
- package/dist/macros/vegalite/index.js.map +1 -1
- package/dist/macros/vegalite/types.d.ts +20 -0
- package/dist/macros/vegalite/types.js +15 -0
- package/dist/macros/vegalite/types.js.map +1 -0
- package/dist/macros/xref/index.d.ts +0 -3
- package/dist/macros/xref/index.js +5 -14
- package/dist/macros/xref/index.js.map +1 -1
- package/dist/macros/xref/types.d.ts +19 -0
- package/dist/macros/xref/types.js +15 -0
- package/dist/macros/xref/types.js.map +1 -0
- package/dist/module-manager.d.ts +16 -3
- package/dist/module-manager.js +55 -23
- package/dist/module-manager.js.map +1 -1
- package/dist/project-settings.d.ts +16 -3
- package/dist/project-settings.js +79 -14
- package/dist/project-settings.js.map +1 -1
- package/dist/resources/calculation-resource.d.ts +6 -33
- package/dist/resources/calculation-resource.js +11 -60
- package/dist/resources/calculation-resource.js.map +1 -1
- package/dist/resources/card-type-resource.d.ts +10 -22
- package/dist/resources/card-type-resource.js +46 -66
- package/dist/resources/card-type-resource.js.map +1 -1
- package/dist/resources/create-defaults.d.ts +3 -2
- package/dist/resources/create-defaults.js +3 -2
- package/dist/resources/create-defaults.js.map +1 -1
- package/dist/resources/field-type-resource.d.ts +8 -22
- package/dist/resources/field-type-resource.js +35 -60
- package/dist/resources/field-type-resource.js.map +1 -1
- package/dist/resources/file-resource.d.ts +14 -35
- package/dist/resources/file-resource.js +22 -301
- package/dist/resources/file-resource.js.map +1 -1
- package/dist/resources/folder-resource.d.ts +44 -66
- package/dist/resources/folder-resource.js +102 -149
- package/dist/resources/folder-resource.js.map +1 -1
- package/dist/resources/graph-model-resource.d.ts +9 -34
- package/dist/resources/graph-model-resource.js +18 -64
- package/dist/resources/graph-model-resource.js.map +1 -1
- package/dist/resources/graph-view-resource.d.ts +9 -29
- package/dist/resources/graph-view-resource.js +13 -48
- package/dist/resources/graph-view-resource.js.map +1 -1
- package/dist/resources/link-type-resource.d.ts +9 -23
- package/dist/resources/link-type-resource.js +11 -33
- package/dist/resources/link-type-resource.js.map +1 -1
- package/dist/resources/report-resource.d.ts +10 -23
- package/dist/resources/report-resource.js +20 -67
- package/dist/resources/report-resource.js.map +1 -1
- package/dist/resources/resource-object.d.ts +143 -23
- package/dist/resources/resource-object.js +369 -48
- package/dist/resources/resource-object.js.map +1 -1
- package/dist/resources/template-resource.d.ts +10 -17
- package/dist/resources/template-resource.js +19 -27
- package/dist/resources/template-resource.js.map +1 -1
- package/dist/resources/workflow-resource.d.ts +9 -25
- package/dist/resources/workflow-resource.js +25 -55
- package/dist/resources/workflow-resource.js.map +1 -1
- package/dist/utils/card-utils.d.ts +69 -19
- package/dist/utils/card-utils.js +179 -30
- package/dist/utils/card-utils.js.map +1 -1
- package/dist/utils/clingo-fact-builder.d.ts +25 -14
- package/dist/utils/clingo-fact-builder.js +27 -5
- package/dist/utils/clingo-fact-builder.js.map +1 -1
- package/dist/utils/clingo-facts.js +14 -7
- package/dist/utils/clingo-facts.js.map +1 -1
- package/dist/utils/clingo-parser.js +1 -1
- package/dist/utils/clingo-parser.js.map +1 -1
- package/dist/utils/constants.d.ts +2 -0
- package/dist/utils/constants.js +4 -0
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/csv.js +1 -1
- package/dist/utils/csv.js.map +1 -1
- package/dist/utils/resource-utils.d.ts +1 -0
- package/dist/utils/resource-utils.js +2 -1
- package/dist/utils/resource-utils.js.map +1 -1
- package/package.json +11 -11
- package/src/card-metadata-updater.ts +9 -7
- package/src/command-handler.ts +35 -23
- package/src/command-manager.ts +32 -19
- package/src/commands/create.ts +59 -160
- package/src/commands/edit.ts +16 -132
- package/src/commands/export.ts +71 -81
- package/src/commands/import.ts +26 -18
- package/src/commands/move.ts +143 -179
- package/src/commands/remove.ts +20 -59
- package/src/commands/rename.ts +45 -156
- package/src/commands/show.ts +153 -211
- package/src/commands/transition.ts +53 -58
- package/src/commands/update.ts +44 -23
- package/src/commands/validate.ts +108 -82
- package/src/containers/card-container.ts +200 -360
- package/src/containers/project/calculation-engine.ts +81 -105
- package/src/containers/project/card-cache.ts +497 -0
- package/src/containers/project/project-paths.ts +21 -13
- package/src/containers/project/resource-cache.ts +648 -0
- package/src/containers/project/resource-handler.ts +265 -0
- package/src/containers/project.ts +551 -693
- package/src/containers/template.ts +129 -142
- package/src/index.ts +1 -0
- package/src/interfaces/folder-content-interfaces.ts +14 -7
- package/src/interfaces/macros.ts +2 -0
- package/src/interfaces/project-interfaces.ts +14 -7
- package/src/interfaces/resource-interfaces.ts +30 -27
- package/src/macros/createCards/index.ts +1 -12
- package/src/macros/createCards/types.ts +46 -0
- package/src/macros/graph/index.ts +27 -52
- package/src/macros/graph/types.ts +24 -0
- package/src/macros/image/index.ts +50 -61
- package/src/macros/image/types.ts +39 -0
- package/src/macros/include/index.ts +6 -15
- package/src/macros/include/types.ts +32 -0
- package/src/macros/index.ts +2 -2
- package/src/macros/percentage/index.ts +1 -7
- package/src/macros/percentage/types.ts +32 -0
- package/src/macros/report/index.ts +4 -13
- package/src/macros/report/types.ts +20 -0
- package/src/macros/scoreCard/index.ts +1 -7
- package/src/macros/scoreCard/types.ts +32 -0
- package/src/macros/types.ts +48 -0
- package/src/macros/vega/index.ts +1 -4
- package/src/macros/vega/types.ts +21 -0
- package/src/macros/vegalite/index.ts +1 -4
- package/src/macros/vegalite/types.ts +22 -0
- package/src/macros/xref/index.ts +6 -20
- package/src/macros/xref/types.ts +20 -0
- package/src/module-manager.ts +79 -22
- package/src/project-settings.ts +84 -15
- package/src/resources/calculation-resource.ts +21 -91
- package/src/resources/card-type-resource.ts +74 -109
- package/src/resources/create-defaults.ts +3 -2
- package/src/resources/field-type-resource.ts +61 -104
- package/src/resources/file-resource.ts +33 -441
- package/src/resources/folder-resource.ts +130 -207
- package/src/resources/graph-model-resource.ts +36 -95
- package/src/resources/graph-view-resource.ts +28 -70
- package/src/resources/link-type-resource.ts +23 -53
- package/src/resources/report-resource.ts +34 -96
- package/src/resources/resource-object.ts +511 -66
- package/src/resources/template-resource.ts +32 -44
- package/src/resources/workflow-resource.ts +42 -85
- package/src/utils/card-utils.ts +217 -31
- package/src/utils/clingo-fact-builder.ts +28 -16
- package/src/utils/clingo-facts.ts +16 -7
- package/src/utils/clingo-parser.ts +1 -1
- package/src/utils/constants.ts +6 -0
- package/src/utils/csv.ts +1 -1
- package/src/utils/resource-utils.ts +2 -1
- package/dist/containers/project/resource-collector.d.ts +0 -87
- package/dist/containers/project/resource-collector.js +0 -337
- package/dist/containers/project/resource-collector.js.map +0 -1
- package/src/containers/project/resource-collector.ts +0 -396
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Cyberismo
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2024
|
|
4
|
-
|
|
5
|
-
This program is free software: you can redistribute it and/or modify it under
|
|
6
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
7
|
-
the Free Software Foundation. This program is distributed in the hope that it
|
|
8
|
-
will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
|
9
|
-
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
10
|
-
See the GNU Affero General Public License for more details.
|
|
11
|
-
You should have received a copy of the GNU Affero General Public
|
|
12
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
13
|
-
*/
|
|
14
|
-
import { readdirSync } from 'node:fs';
|
|
15
|
-
import { readdir } from 'node:fs/promises';
|
|
16
|
-
import { extname, join } from 'node:path';
|
|
17
|
-
import { resourceName } from '../../utils/resource-utils.js';
|
|
18
|
-
import { stripExtension } from '../../utils/file-utils.js';
|
|
19
|
-
/**
|
|
20
|
-
* Defines where resources are collected from.
|
|
21
|
-
* all - everywhere
|
|
22
|
-
* importOnly - only from imported modules
|
|
23
|
-
* localOnly - only from the project itself; excluding imported modules
|
|
24
|
-
*/
|
|
25
|
-
export var ResourcesFrom;
|
|
26
|
-
(function (ResourcesFrom) {
|
|
27
|
-
ResourcesFrom["all"] = "all";
|
|
28
|
-
ResourcesFrom["importedOnly"] = "imported";
|
|
29
|
-
ResourcesFrom["localOnly"] = "local";
|
|
30
|
-
})(ResourcesFrom || (ResourcesFrom = {}));
|
|
31
|
-
// This class collects resources that have these types of files.
|
|
32
|
-
const allowedExtensions = ['.lp', '.json'];
|
|
33
|
-
// Helper class to contain collected resources.
|
|
34
|
-
class ResourceCollection {
|
|
35
|
-
calculations = [];
|
|
36
|
-
cardTypes = [];
|
|
37
|
-
fieldTypes = [];
|
|
38
|
-
graphModels = [];
|
|
39
|
-
graphViews = [];
|
|
40
|
-
linkTypes = [];
|
|
41
|
-
reports = [];
|
|
42
|
-
templates = [];
|
|
43
|
-
workflows = [];
|
|
44
|
-
/**
|
|
45
|
-
* Returns resource array of a give type.
|
|
46
|
-
* @param type Resource array type to return.
|
|
47
|
-
* @returns resource array of a give type.
|
|
48
|
-
*/
|
|
49
|
-
resourceArray(type, moduleName) {
|
|
50
|
-
let resources = [];
|
|
51
|
-
if (type === 'calculations')
|
|
52
|
-
resources = this.calculations;
|
|
53
|
-
else if (type === 'cardTypes')
|
|
54
|
-
resources = this.cardTypes;
|
|
55
|
-
else if (type === 'fieldTypes')
|
|
56
|
-
resources = this.fieldTypes;
|
|
57
|
-
else if (type === 'graphViews')
|
|
58
|
-
resources = this.graphViews;
|
|
59
|
-
else if (type === 'graphModels')
|
|
60
|
-
resources = this.graphModels;
|
|
61
|
-
else if (type === 'linkTypes')
|
|
62
|
-
resources = this.linkTypes;
|
|
63
|
-
else if (type === 'reports')
|
|
64
|
-
resources = this.reports;
|
|
65
|
-
else if (type === 'templates')
|
|
66
|
-
resources = this.templates;
|
|
67
|
-
else if (type === 'workflows')
|
|
68
|
-
resources = this.workflows;
|
|
69
|
-
else
|
|
70
|
-
throw new Error(`Unknown resource type '${type}'`);
|
|
71
|
-
if (moduleName) {
|
|
72
|
-
resources = resources.filter((item) => {
|
|
73
|
-
const { prefix } = resourceName(item.name);
|
|
74
|
-
return moduleName === prefix;
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
return resources;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* This class handles local and modules resources.
|
|
82
|
-
*/
|
|
83
|
-
export class ResourceCollector {
|
|
84
|
-
project;
|
|
85
|
-
local = new ResourceCollection();
|
|
86
|
-
modules = new ResourceCollection();
|
|
87
|
-
modulesCollected = false;
|
|
88
|
-
paths;
|
|
89
|
-
constructor(project) {
|
|
90
|
-
this.project = project;
|
|
91
|
-
this.paths = this.project.paths;
|
|
92
|
-
}
|
|
93
|
-
// Add resources of a given type to an array.
|
|
94
|
-
async addResources(resources, requestedType) {
|
|
95
|
-
if (requestedType === 'modules') {
|
|
96
|
-
return resources.map((resource) => ({
|
|
97
|
-
name: resource.name,
|
|
98
|
-
path: resource.parentPath,
|
|
99
|
-
}));
|
|
100
|
-
}
|
|
101
|
-
const isValidFile = (item) => item.isFile() && allowedExtensions.includes(extname(item.name));
|
|
102
|
-
const processResource = async (resource) => {
|
|
103
|
-
const resourcePath = join(this.paths.modulesFolder, resource.name, requestedType);
|
|
104
|
-
try {
|
|
105
|
-
const files = await readdir(resourcePath, { withFileTypes: true });
|
|
106
|
-
return files.filter(isValidFile).map((item) => ({
|
|
107
|
-
name: `${resource.name}/${requestedType}/${stripExtension(item.name)}`,
|
|
108
|
-
path: item.parentPath,
|
|
109
|
-
}));
|
|
110
|
-
}
|
|
111
|
-
catch {
|
|
112
|
-
return [];
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
const results = await Promise.all(resources.map(processResource));
|
|
116
|
-
return results.flat();
|
|
117
|
-
}
|
|
118
|
-
// Collects all module resources.
|
|
119
|
-
async addModuleResources() {
|
|
120
|
-
if (!this.modulesCollected) {
|
|
121
|
-
const moduleDirectories = await readdir(this.paths.modulesFolder, {
|
|
122
|
-
withFileTypes: true,
|
|
123
|
-
});
|
|
124
|
-
const modules = moduleDirectories.filter((item) => item.isDirectory());
|
|
125
|
-
this.modules.calculations = [
|
|
126
|
-
...(await this.addResources(modules, 'calculations')),
|
|
127
|
-
];
|
|
128
|
-
this.modules.cardTypes = [
|
|
129
|
-
...(await this.addResources(modules, 'cardTypes')),
|
|
130
|
-
];
|
|
131
|
-
this.modules.fieldTypes = [
|
|
132
|
-
...(await this.addResources(modules, 'fieldTypes')),
|
|
133
|
-
];
|
|
134
|
-
this.modules.graphModels = [
|
|
135
|
-
...(await this.addResources(modules, 'graphModels')),
|
|
136
|
-
];
|
|
137
|
-
this.modules.graphViews = [
|
|
138
|
-
...(await this.addResources(modules, 'graphViews')),
|
|
139
|
-
];
|
|
140
|
-
this.modules.linkTypes = [
|
|
141
|
-
...(await this.addResources(modules, 'linkTypes')),
|
|
142
|
-
];
|
|
143
|
-
this.modules.reports = [...(await this.addResources(modules, 'reports'))];
|
|
144
|
-
this.modules.templates = [
|
|
145
|
-
...(await this.addResources(modules, 'templates')),
|
|
146
|
-
];
|
|
147
|
-
this.modules.workflows = [
|
|
148
|
-
...(await this.addResources(modules, 'workflows')),
|
|
149
|
-
];
|
|
150
|
-
this.modulesCollected = true;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
// Adds a resource type from all modules.
|
|
154
|
-
async addResourcesFromModules(type, moduleName) {
|
|
155
|
-
try {
|
|
156
|
-
// 'modules' is a bit special; it is collected separately from actual resources.
|
|
157
|
-
if (type === 'modules') {
|
|
158
|
-
const moduleDirectories = await readdir(this.paths.modulesFolder, {
|
|
159
|
-
withFileTypes: true,
|
|
160
|
-
});
|
|
161
|
-
const modules = moduleDirectories.filter((item) => item.isDirectory());
|
|
162
|
-
return [...(await this.addResources(modules, 'modules'))];
|
|
163
|
-
}
|
|
164
|
-
await this.addModuleResources();
|
|
165
|
-
return this.modules.resourceArray(type, moduleName);
|
|
166
|
-
}
|
|
167
|
-
catch {
|
|
168
|
-
return [];
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
// Joins local resources and module resources together to one array.
|
|
172
|
-
joinResources(from, localCollection, moduleCollection) {
|
|
173
|
-
if (from === ResourcesFrom.localOnly) {
|
|
174
|
-
return localCollection;
|
|
175
|
-
}
|
|
176
|
-
if (from === ResourcesFrom.importedOnly) {
|
|
177
|
-
return moduleCollection;
|
|
178
|
-
}
|
|
179
|
-
return [...localCollection, ...moduleCollection];
|
|
180
|
-
}
|
|
181
|
-
// Returns local resources of a given type.
|
|
182
|
-
localResources(type) {
|
|
183
|
-
if (type === 'modules') {
|
|
184
|
-
return [];
|
|
185
|
-
}
|
|
186
|
-
else {
|
|
187
|
-
return this.local.resourceArray(type);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
// Collects certain kinds of resources.
|
|
191
|
-
resourcesSync(type) {
|
|
192
|
-
const resourceFolder = this.project.paths.resourcePath(type);
|
|
193
|
-
const resources = [];
|
|
194
|
-
let entries = [];
|
|
195
|
-
try {
|
|
196
|
-
entries = readdirSync(resourceFolder, { withFileTypes: true });
|
|
197
|
-
}
|
|
198
|
-
catch {
|
|
199
|
-
return [];
|
|
200
|
-
}
|
|
201
|
-
resources.push(...entries
|
|
202
|
-
.filter((entry) => entry.isFile() && allowedExtensions.includes(extname(entry.name)))
|
|
203
|
-
.map((entry) => {
|
|
204
|
-
entry.name = stripExtension(entry.name);
|
|
205
|
-
return {
|
|
206
|
-
name: `${this.project.projectPrefix}/${type}/${entry.name}`,
|
|
207
|
-
path: entry.parentPath,
|
|
208
|
-
};
|
|
209
|
-
}));
|
|
210
|
-
return resources;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Collects all local resources.
|
|
214
|
-
*/
|
|
215
|
-
collectLocalResources() {
|
|
216
|
-
const resourceTypes = [
|
|
217
|
-
'calculations',
|
|
218
|
-
'cardTypes',
|
|
219
|
-
'fieldTypes',
|
|
220
|
-
'graphModels',
|
|
221
|
-
'graphViews',
|
|
222
|
-
'linkTypes',
|
|
223
|
-
'reports',
|
|
224
|
-
'templates',
|
|
225
|
-
'workflows',
|
|
226
|
-
];
|
|
227
|
-
resourceTypes.forEach((type) => {
|
|
228
|
-
this.local[type] = this.resourcesSync(type);
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* Collect specific resource from modules.
|
|
233
|
-
* @param type Type of resource (e.g. 'templates').
|
|
234
|
-
* @param moduleName Name of the module to collect resources from
|
|
235
|
-
* @returns array of collected items.
|
|
236
|
-
*/
|
|
237
|
-
async collectResourcesFromModules(type, moduleName) {
|
|
238
|
-
return (await this.addResourcesFromModules(type, moduleName)).map((item) => stripExtension(item.name));
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Add a given 'resource' to the local resource arrays.
|
|
242
|
-
* @param resource Resource to add.
|
|
243
|
-
*/
|
|
244
|
-
add(resource) {
|
|
245
|
-
// Helper to avoid adding duplicate entries.
|
|
246
|
-
function addItem(array, item) {
|
|
247
|
-
if (!array.includes(item)) {
|
|
248
|
-
item.name = stripExtension(item.name);
|
|
249
|
-
array.push(item);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
const { type } = resourceName(resource.name);
|
|
253
|
-
switch (type) {
|
|
254
|
-
case 'calculations':
|
|
255
|
-
addItem(this.local.calculations, resource);
|
|
256
|
-
break;
|
|
257
|
-
case 'cardTypes':
|
|
258
|
-
addItem(this.local.cardTypes, resource);
|
|
259
|
-
break;
|
|
260
|
-
case 'fieldTypes':
|
|
261
|
-
addItem(this.local.fieldTypes, resource);
|
|
262
|
-
break;
|
|
263
|
-
case 'graphModels':
|
|
264
|
-
addItem(this.local.graphModels, resource);
|
|
265
|
-
break;
|
|
266
|
-
case 'graphViews':
|
|
267
|
-
addItem(this.local.graphViews, resource);
|
|
268
|
-
break;
|
|
269
|
-
case 'linkTypes':
|
|
270
|
-
addItem(this.local.linkTypes, resource);
|
|
271
|
-
break;
|
|
272
|
-
case 'reports':
|
|
273
|
-
addItem(this.local.reports, resource);
|
|
274
|
-
break;
|
|
275
|
-
case 'templates':
|
|
276
|
-
addItem(this.local.templates, resource);
|
|
277
|
-
break;
|
|
278
|
-
case 'workflows':
|
|
279
|
-
addItem(this.local.workflows, resource);
|
|
280
|
-
break;
|
|
281
|
-
default: {
|
|
282
|
-
throw new Error(`Resource type '${type}' not handled in 'addResource'`);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Re-collects local resources.
|
|
288
|
-
*/
|
|
289
|
-
changed() {
|
|
290
|
-
this.collectLocalResources();
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Re-collects imported module resources.
|
|
294
|
-
*/
|
|
295
|
-
async moduleImported() {
|
|
296
|
-
this.modulesCollected = false;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Removes a resource from Project.
|
|
300
|
-
* @param resource Resource to remove.
|
|
301
|
-
* @returns the modified array.
|
|
302
|
-
*/
|
|
303
|
-
remove(resource) {
|
|
304
|
-
const { type } = resourceName(resource.name);
|
|
305
|
-
const arrayToModify = this.local
|
|
306
|
-
.resourceArray(type)
|
|
307
|
-
.filter((item) => item.name !== resource.name);
|
|
308
|
-
this.collectLocalResources();
|
|
309
|
-
return arrayToModify;
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* Checks if resource of 'type' with 'name' exists.
|
|
313
|
-
* @param type Type of resource (e.g. 'templates').
|
|
314
|
-
* @param name Name of the resource.
|
|
315
|
-
* @returns true, if resource exits, false otherwise.
|
|
316
|
-
*/
|
|
317
|
-
async resourceExists(type, name) {
|
|
318
|
-
if (!name) {
|
|
319
|
-
return false;
|
|
320
|
-
}
|
|
321
|
-
return (await this.resources(type)).some((item) => item.name === name);
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Returns resources of 'type'. Returned resources are either local, or from modules or all of them.
|
|
325
|
-
* @param type Type of resource (e.g. 'templates').
|
|
326
|
-
* @param from Defines where resources are collected from.
|
|
327
|
-
* @returns Array of resources.
|
|
328
|
-
*/
|
|
329
|
-
async resources(type, from = ResourcesFrom.all) {
|
|
330
|
-
const moduleResources = from !== ResourcesFrom.localOnly
|
|
331
|
-
? await this.addResourcesFromModules(type)
|
|
332
|
-
: [];
|
|
333
|
-
const localResourcesOfType = this.localResources(type);
|
|
334
|
-
return this.joinResources(from, localResourcesOfType, moduleResources);
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
//# sourceMappingURL=resource-collector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resource-collector.js","sourceRoot":"","sources":["../../../src/containers/project/resource-collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;EAYE;AAEF,OAAO,EAAe,WAAW,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAQ1C,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,4BAAW,CAAA;IACX,0CAAyB,CAAA;IACzB,oCAAmB,CAAA;AACrB,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAED,gEAAgE;AAChE,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAE3C,+CAA+C;AAC/C,MAAM,kBAAkB;IACf,YAAY,GAAe,EAAE,CAAC;IAC9B,SAAS,GAAe,EAAE,CAAC;IAC3B,UAAU,GAAe,EAAE,CAAC;IAC5B,WAAW,GAAe,EAAE,CAAC;IAC7B,UAAU,GAAe,EAAE,CAAC;IAC5B,SAAS,GAAe,EAAE,CAAC;IAC3B,OAAO,GAAe,EAAE,CAAC;IACzB,SAAS,GAAe,EAAE,CAAC;IAC3B,SAAS,GAAe,EAAE,CAAC;IAElC;;;;OAIG;IACI,aAAa,CAClB,IAAwB,EACxB,UAAmB;QAEnB,IAAI,SAAS,GAAe,EAAE,CAAC;QAE/B,IAAI,IAAI,KAAK,cAAc;YAAE,SAAS,GAAG,IAAI,CAAC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