@cyberismo/data-handler 0.0.15 → 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 +7 -1
- package/dist/card-metadata-updater.js.map +1 -1
- package/dist/command-handler.d.ts +4 -0
- package/dist/command-handler.js +19 -3
- package/dist/command-handler.js.map +1 -1
- package/dist/command-manager.d.ts +24 -1
- package/dist/command-manager.js +27 -3
- package/dist/command-manager.js.map +1 -1
- package/dist/commands/create.d.ts +1 -1
- package/dist/commands/create.js +34 -36
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/export.d.ts +11 -2
- package/dist/commands/export.js +54 -41
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/import.d.ts +9 -1
- package/dist/commands/import.js +15 -7
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/move.js +0 -1
- package/dist/commands/move.js.map +1 -1
- package/dist/commands/remove.d.ts +8 -1
- package/dist/commands/remove.js +8 -4
- package/dist/commands/remove.js.map +1 -1
- package/dist/commands/rename.d.ts +4 -9
- package/dist/commands/rename.js +32 -101
- package/dist/commands/rename.js.map +1 -1
- package/dist/commands/show.d.ts +16 -10
- package/dist/commands/show.js +71 -55
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/transition.d.ts +9 -2
- package/dist/commands/transition.js +25 -17
- package/dist/commands/transition.js.map +1 -1
- package/dist/commands/update.d.ts +16 -12
- package/dist/commands/update.js +19 -17
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/validate.d.ts +17 -9
- package/dist/commands/validate.js +96 -35
- package/dist/commands/validate.js.map +1 -1
- package/dist/containers/project/calculation-engine.d.ts +7 -4
- package/dist/containers/project/calculation-engine.js +61 -66
- package/dist/containers/project/calculation-engine.js.map +1 -1
- 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 +38 -153
- package/dist/containers/project.js +129 -405
- package/dist/containers/project.js.map +1 -1
- package/dist/containers/template.d.ts +8 -2
- package/dist/containers/template.js +20 -15
- package/dist/containers/template.js.map +1 -1
- package/dist/interfaces/folder-content-interfaces.d.ts +5 -3
- package/dist/interfaces/folder-content-interfaces.js +3 -3
- package/dist/interfaces/folder-content-interfaces.js.map +1 -1
- package/dist/interfaces/project-interfaces.d.ts +2 -4
- package/dist/interfaces/project-interfaces.js.map +1 -1
- package/dist/interfaces/resource-interfaces.d.ts +14 -1
- package/dist/interfaces/resource-interfaces.js.map +1 -1
- package/dist/macros/graph/index.js +12 -26
- package/dist/macros/graph/index.js.map +1 -1
- 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/report/index.js +3 -6
- package/dist/macros/report/index.js.map +1 -1
- package/dist/module-manager.d.ts +16 -3
- package/dist/module-manager.js +51 -19
- 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 +4 -3
- package/dist/resources/calculation-resource.js +11 -5
- package/dist/resources/calculation-resource.js.map +1 -1
- package/dist/resources/card-type-resource.d.ts +6 -1
- package/dist/resources/card-type-resource.js +34 -23
- 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 +4 -1
- package/dist/resources/field-type-resource.js +22 -23
- package/dist/resources/field-type-resource.js.map +1 -1
- package/dist/resources/file-resource.d.ts +5 -9
- package/dist/resources/file-resource.js +6 -11
- package/dist/resources/file-resource.js.map +1 -1
- package/dist/resources/folder-resource.d.ts +29 -32
- package/dist/resources/folder-resource.js +59 -78
- package/dist/resources/folder-resource.js.map +1 -1
- package/dist/resources/graph-model-resource.d.ts +4 -1
- package/dist/resources/graph-model-resource.js +11 -4
- package/dist/resources/graph-model-resource.js.map +1 -1
- package/dist/resources/graph-view-resource.d.ts +5 -2
- package/dist/resources/graph-view-resource.js +7 -3
- package/dist/resources/graph-view-resource.js.map +1 -1
- package/dist/resources/link-type-resource.d.ts +5 -2
- package/dist/resources/link-type-resource.js +5 -2
- package/dist/resources/link-type-resource.js.map +1 -1
- package/dist/resources/report-resource.d.ts +6 -7
- package/dist/resources/report-resource.js +14 -23
- package/dist/resources/report-resource.js.map +1 -1
- package/dist/resources/resource-object.d.ts +93 -8
- package/dist/resources/resource-object.js +162 -110
- package/dist/resources/resource-object.js.map +1 -1
- package/dist/resources/template-resource.d.ts +7 -3
- package/dist/resources/template-resource.js +10 -3
- package/dist/resources/template-resource.js.map +1 -1
- package/dist/resources/workflow-resource.d.ts +5 -2
- package/dist/resources/workflow-resource.js +18 -22
- package/dist/resources/workflow-resource.js.map +1 -1
- package/dist/utils/card-utils.d.ts +2 -2
- package/dist/utils/card-utils.js +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 +3 -4
- package/dist/utils/clingo-facts.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 +8 -8
- package/src/card-metadata-updater.ts +6 -2
- package/src/command-handler.ts +24 -5
- package/src/command-manager.ts +29 -17
- package/src/commands/create.ts +43 -78
- package/src/commands/export.ts +63 -52
- package/src/commands/import.ts +24 -14
- package/src/commands/move.ts +0 -1
- package/src/commands/remove.ts +11 -7
- package/src/commands/rename.ts +43 -149
- package/src/commands/show.ts +113 -78
- package/src/commands/transition.ts +26 -28
- package/src/commands/update.ts +25 -22
- package/src/commands/validate.ts +108 -67
- package/src/containers/project/calculation-engine.ts +61 -93
- 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 +178 -522
- package/src/containers/template.ts +24 -19
- package/src/interfaces/folder-content-interfaces.ts +7 -6
- package/src/interfaces/project-interfaces.ts +7 -6
- package/src/interfaces/resource-interfaces.ts +18 -3
- package/src/macros/graph/index.ts +26 -47
- package/src/macros/index.ts +2 -2
- package/src/macros/report/index.ts +3 -9
- package/src/module-manager.ts +74 -17
- package/src/project-settings.ts +83 -14
- package/src/resources/calculation-resource.ts +18 -18
- package/src/resources/card-type-resource.ts +50 -50
- package/src/resources/create-defaults.ts +3 -2
- package/src/resources/field-type-resource.ts +41 -55
- package/src/resources/file-resource.ts +10 -36
- package/src/resources/folder-resource.ts +69 -120
- package/src/resources/graph-model-resource.ts +20 -22
- package/src/resources/graph-view-resource.ts +15 -17
- package/src/resources/link-type-resource.ts +10 -13
- package/src/resources/report-resource.ts +21 -43
- package/src/resources/resource-object.ts +194 -152
- package/src/resources/template-resource.ts +17 -16
- package/src/resources/workflow-resource.ts +25 -44
- package/src/utils/card-utils.ts +2 -2
- package/src/utils/clingo-fact-builder.ts +28 -16
- package/src/utils/clingo-facts.ts +3 -4
- package/src/utils/resource-utils.ts +2 -1
- package/dist/containers/project/resource-collector.d.ts +0 -110
- package/dist/containers/project/resource-collector.js +0 -344
- package/dist/containers/project/resource-collector.js.map +0 -1
- package/src/containers/project/resource-collector.ts +0 -404
|
@@ -13,44 +13,42 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { CardContainer } from './card-container.js';
|
|
15
15
|
import { CalculationEngine } from './project/calculation-engine.js';
|
|
16
|
-
import { type Card, type CardAttachment, CardLocation, type CardListContainer, type CardMetadata, type FetchCardDetails, type MetadataContent, type ModuleContent, type ModuleSetting, type ProjectFetchCardDetails, type ProjectMetadata
|
|
16
|
+
import { type Card, type CardAttachment, CardLocation, type CardListContainer, type CardMetadata, type FetchCardDetails, type MetadataContent, type ModuleContent, type ModuleSetting, type ProjectFetchCardDetails, type ProjectMetadata } from '../interfaces/project-interfaces.js';
|
|
17
17
|
import { ProjectConfiguration } from '../project-settings.js';
|
|
18
18
|
import { ProjectPaths } from './project/project-paths.js';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
19
|
+
import { ResourcesFrom } from './project/resource-cache.js';
|
|
20
|
+
import { ResourceHandler } from './project/resource-handler.js';
|
|
21
21
|
import type { Template } from './template.js';
|
|
22
|
-
import { CalculationResource } from '../resources/calculation-resource.js';
|
|
23
|
-
import { CardTypeResource } from '../resources/card-type-resource.js';
|
|
24
|
-
import { FieldTypeResource } from '../resources/field-type-resource.js';
|
|
25
|
-
import { GraphModelResource } from '../resources/graph-model-resource.js';
|
|
26
|
-
import { GraphViewResource } from '../resources/graph-view-resource.js';
|
|
27
|
-
import { LinkTypeResource } from '../resources/link-type-resource.js';
|
|
28
|
-
import { ReportResource } from '../resources/report-resource.js';
|
|
29
|
-
import { TemplateResource } from '../resources/template-resource.js';
|
|
30
|
-
import { WorkflowResource } from '../resources/workflow-resource.js';
|
|
31
22
|
export { ResourcesFrom };
|
|
23
|
+
/**
|
|
24
|
+
* Options for Project initialization.
|
|
25
|
+
* autoSave - If project configuration changes are saved automatically. Default true.
|
|
26
|
+
* watchResourceChanges - If project refresh automatically to filesystem changes. Default false.
|
|
27
|
+
*/
|
|
28
|
+
export interface ProjectOptions {
|
|
29
|
+
autoSave?: boolean;
|
|
30
|
+
watchResourceChanges?: boolean;
|
|
31
|
+
}
|
|
32
32
|
/**
|
|
33
33
|
* Represents project folder.
|
|
34
34
|
*/
|
|
35
35
|
export declare class Project extends CardContainer {
|
|
36
|
-
private
|
|
36
|
+
private options;
|
|
37
37
|
calculationEngine: CalculationEngine;
|
|
38
|
-
private createdResources;
|
|
39
38
|
private logger;
|
|
40
39
|
private projectPaths;
|
|
41
|
-
private
|
|
40
|
+
private resourceHandler;
|
|
42
41
|
private resourceWatcher;
|
|
43
42
|
private settings;
|
|
44
43
|
private validator;
|
|
45
|
-
constructor(path: string,
|
|
44
|
+
constructor(path: string, options?: ProjectOptions);
|
|
46
45
|
private changeParent;
|
|
47
46
|
private findModule;
|
|
48
47
|
private handleAttachmentChange;
|
|
49
48
|
private parentFromPath;
|
|
50
49
|
private removeCachedChildren;
|
|
51
|
-
private replaceCacheValue;
|
|
52
|
-
private resourcesOfType;
|
|
53
50
|
private updateCachedChildren;
|
|
51
|
+
private validateCard;
|
|
54
52
|
/**
|
|
55
53
|
* Populate template cards into the card cache.
|
|
56
54
|
*/
|
|
@@ -59,12 +57,6 @@ export declare class Project extends CardContainer {
|
|
|
59
57
|
* Populate both the project cards, and all template cards into card cache.
|
|
60
58
|
*/
|
|
61
59
|
protected populateCardsCache(): Promise<void>;
|
|
62
|
-
/**
|
|
63
|
-
* Add a given 'resource' to the local resource arrays.
|
|
64
|
-
* @param resource Resource to add.
|
|
65
|
-
* @param data JSON data for the resource.
|
|
66
|
-
*/
|
|
67
|
-
addResource(resource: Resource, data: JSON): void;
|
|
68
60
|
/**
|
|
69
61
|
* Returns all template cards from the project. This includes all module templates' cards.
|
|
70
62
|
* @returns all the template cards from the project
|
|
@@ -82,17 +74,6 @@ export declare class Project extends CardContainer {
|
|
|
82
74
|
* @returns Array of attachments from cards at the specified path
|
|
83
75
|
*/
|
|
84
76
|
attachmentsByPath(path: string): CardAttachment[];
|
|
85
|
-
/**
|
|
86
|
-
* Returns all the attachments in the template cards.
|
|
87
|
-
* @returns all the attachments in the template cards.
|
|
88
|
-
*/
|
|
89
|
-
attachmentsFromTemplates(): Promise<CardAttachment[]>;
|
|
90
|
-
/**
|
|
91
|
-
* Returns an array of all the calculation files (*.lp) in the project.
|
|
92
|
-
* @param from Defines where resources are collected from.
|
|
93
|
-
* @returns array of all calculation files in the project.
|
|
94
|
-
*/
|
|
95
|
-
calculations(from?: ResourcesFrom): Promise<Resource[]>;
|
|
96
77
|
/**
|
|
97
78
|
* Returns path to a card's attachment folder.
|
|
98
79
|
* @param cardKey card key
|
|
@@ -107,13 +88,6 @@ export declare class Project extends CardContainer {
|
|
|
107
88
|
* @throws If trying to add attachment to module card, or if attachment is not found
|
|
108
89
|
*/
|
|
109
90
|
createCardAttachment(cardKey: string, attachmentName: string, attachmentData: string | Buffer): Promise<void>;
|
|
110
|
-
/**
|
|
111
|
-
* Removes an attachment from a card.
|
|
112
|
-
* @param cardKey The card to remove attachment from
|
|
113
|
-
* @param fileName The name of the attachment file to remove
|
|
114
|
-
* @throws if trying to remove module card attachment, or the attachment was not found.
|
|
115
|
-
*/
|
|
116
|
-
removeCardAttachment(cardKey: string, fileName: string): Promise<void>;
|
|
117
91
|
/**
|
|
118
92
|
* Returns path to a card's folder.
|
|
119
93
|
* @param cardKey card key
|
|
@@ -126,12 +100,6 @@ export declare class Project extends CardContainer {
|
|
|
126
100
|
* @returns Card data to the given card keys
|
|
127
101
|
*/
|
|
128
102
|
cardKeysToCards(cardIds: string[]): Card[];
|
|
129
|
-
/**
|
|
130
|
-
* Accessor for cards cache.
|
|
131
|
-
* Used by template container (it needs to access project's cache, not their own instance).
|
|
132
|
-
* @note Should not be used directly (other than Template).
|
|
133
|
-
*/
|
|
134
|
-
get cardsCache(): import("./project/card-cache.js").CardCache;
|
|
135
103
|
/**
|
|
136
104
|
* Returns an array of all the cards in the project.
|
|
137
105
|
* @note These are project cards only, by default (unless path dictates otherwise).
|
|
@@ -141,25 +109,17 @@ export declare class Project extends CardContainer {
|
|
|
141
109
|
*/
|
|
142
110
|
cards(path?: string, details?: FetchCardDetails): Card[];
|
|
143
111
|
/**
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* @
|
|
112
|
+
* Accessor for cards cache.
|
|
113
|
+
* Used by template container (it needs to access project's cache, not their own instance).
|
|
114
|
+
* @note Should not be used directly (other than Template).
|
|
147
115
|
*/
|
|
148
|
-
|
|
116
|
+
get cardsCache(): import("./project/card-cache.js").CardCache;
|
|
149
117
|
/**
|
|
150
118
|
* Returns children of a given card; as Card array
|
|
151
119
|
* @param card Parent card to fetch children from
|
|
152
120
|
* @returns children of a given card; as Card array
|
|
153
121
|
*/
|
|
154
122
|
childrenCards(card: Card): Card[];
|
|
155
|
-
/**
|
|
156
|
-
* Updates all local resources.
|
|
157
|
-
*/
|
|
158
|
-
collectLocalResources(): void;
|
|
159
|
-
/**
|
|
160
|
-
* Updates all imported module resources.
|
|
161
|
-
*/
|
|
162
|
-
collectModuleResources(): void;
|
|
163
123
|
/**
|
|
164
124
|
* Returns project configuration.
|
|
165
125
|
* @returns project configuration.
|
|
@@ -175,18 +135,6 @@ export declare class Project extends CardContainer {
|
|
|
175
135
|
* Cleanups project when it is being closed.
|
|
176
136
|
*/
|
|
177
137
|
dispose(): void;
|
|
178
|
-
/**
|
|
179
|
-
* Returns an array of all the field types in the project.
|
|
180
|
-
* @param from Defines where resources are collected from.
|
|
181
|
-
* @returns array of all field types in the project.
|
|
182
|
-
*/
|
|
183
|
-
fieldTypes(from?: ResourcesFrom): Promise<Resource[]>;
|
|
184
|
-
/**
|
|
185
|
-
* Finds root of a project
|
|
186
|
-
* @param path Path where to start looking for the project root.
|
|
187
|
-
* @returns path to a project root, or empty string.
|
|
188
|
-
*/
|
|
189
|
-
static findProjectRoot(path: string): Promise<string>;
|
|
190
138
|
/**
|
|
191
139
|
* Returns specific card.
|
|
192
140
|
* @param cardToFind Card key to find
|
|
@@ -195,17 +143,11 @@ export declare class Project extends CardContainer {
|
|
|
195
143
|
*/
|
|
196
144
|
findCard(cardToFind: string, details?: ProjectFetchCardDetails): Card;
|
|
197
145
|
/**
|
|
198
|
-
*
|
|
199
|
-
* @param
|
|
200
|
-
* @returns
|
|
201
|
-
*/
|
|
202
|
-
graphModels(from?: ResourcesFrom): Promise<Resource[]>;
|
|
203
|
-
/**
|
|
204
|
-
* Returns an array of all the graph views in the project.
|
|
205
|
-
* @param from Defines where resources are collected from.
|
|
206
|
-
* @returns array of all the graph views in the project.
|
|
146
|
+
* Finds root of a project
|
|
147
|
+
* @param path Path where to start looking for the project root.
|
|
148
|
+
* @returns path to a project root, or empty string.
|
|
207
149
|
*/
|
|
208
|
-
|
|
150
|
+
static findProjectRoot(path: string): Promise<string>;
|
|
209
151
|
/**
|
|
210
152
|
* When card changes.
|
|
211
153
|
* @param changedCard Card that was changed.
|
|
@@ -239,12 +181,6 @@ export declare class Project extends CardContainer {
|
|
|
239
181
|
* @returns true, if in the given path there is a project; false otherwise
|
|
240
182
|
*/
|
|
241
183
|
static isCreated(path: string): boolean;
|
|
242
|
-
/**
|
|
243
|
-
* Returns an array of all the link types in the project.
|
|
244
|
-
* @param from Defines where resources are collected from.
|
|
245
|
-
* @returns array of all link types in the project.
|
|
246
|
-
*/
|
|
247
|
-
linkTypes(from?: ResourcesFrom): Promise<Resource[]>;
|
|
248
184
|
/**
|
|
249
185
|
* Returns an array of cards in the project, in the templates or both.
|
|
250
186
|
* Cards don't have content and nor metadata.
|
|
@@ -265,11 +201,6 @@ export declare class Project extends CardContainer {
|
|
|
265
201
|
* @returns module details, or undefined if module cannot be found.
|
|
266
202
|
*/
|
|
267
203
|
module(moduleName: string): Promise<ModuleContent | undefined>;
|
|
268
|
-
/**
|
|
269
|
-
* Returns list of modules in the project.
|
|
270
|
-
* @returns list of modules in the project.
|
|
271
|
-
*/
|
|
272
|
-
modules(): Promise<Resource[]>;
|
|
273
204
|
/**
|
|
274
205
|
* Returns a new unique card key with project prefix (e.g. test_x649it4x).
|
|
275
206
|
* Random part of string will be always 8 characters in base-36 (0-9a-z)
|
|
@@ -304,61 +235,28 @@ export declare class Project extends CardContainer {
|
|
|
304
235
|
*/
|
|
305
236
|
get projectPrefix(): string;
|
|
306
237
|
/**
|
|
307
|
-
*
|
|
238
|
+
* Returns all prefixes used in the project (project's own plus all from imported modules).
|
|
308
239
|
* @returns all prefixes used in the project.
|
|
309
|
-
* @todo - move the module prefix fetch to resource-collector.
|
|
310
|
-
* Make it use cached value that is only changed when module is removed/imported.
|
|
311
|
-
*/
|
|
312
|
-
projectPrefixes(): Promise<string[]>;
|
|
313
|
-
/**
|
|
314
|
-
* Removes a module from the project
|
|
315
|
-
* @param module Module (name) to remove.
|
|
316
|
-
*/
|
|
317
|
-
removeModule(moduleName: string): Promise<void>;
|
|
318
|
-
/**
|
|
319
|
-
* Removes a resource from Project.
|
|
320
|
-
* @param resource Resource to remove.
|
|
321
240
|
*/
|
|
322
|
-
|
|
241
|
+
projectPrefixes(): string[];
|
|
323
242
|
/**
|
|
324
|
-
*
|
|
325
|
-
* @param
|
|
326
|
-
* @
|
|
327
|
-
|
|
328
|
-
reports(from?: ResourcesFrom): Promise<Resource[]>;
|
|
329
|
-
/**
|
|
330
|
-
* Returns handlebar files from reports.
|
|
331
|
-
* @param from Defines where report handlebar files are collected from.
|
|
332
|
-
* @returns handlebar files from reports.
|
|
333
|
-
*/
|
|
334
|
-
reportHandlerBarFiles(from?: ResourcesFrom): Promise<string[]>;
|
|
335
|
-
/**
|
|
336
|
-
* Returns metadata from a given resource
|
|
337
|
-
* @param name Name of a resource
|
|
338
|
-
* @returns Metadata from the resource.
|
|
339
|
-
*/
|
|
340
|
-
resource<Type>(name: string): Type | undefined;
|
|
341
|
-
/**
|
|
342
|
-
* Returns resource cache.
|
|
243
|
+
* Removes an attachment from a card.
|
|
244
|
+
* @param cardKey The card to remove attachment from
|
|
245
|
+
* @param fileName The name of the attachment file to remove
|
|
246
|
+
* @throws if trying to remove module card attachment, or the attachment was not found.
|
|
343
247
|
*/
|
|
344
|
-
|
|
248
|
+
removeCardAttachment(cardKey: string, fileName: string): Promise<void>;
|
|
345
249
|
/**
|
|
346
|
-
*
|
|
347
|
-
* @
|
|
348
|
-
* @param
|
|
349
|
-
* @returns boolean, true if resource exists; false otherwise.
|
|
250
|
+
* Removes a module from the project cache and configuration.
|
|
251
|
+
* @note that ModuleManager removes the actual files.
|
|
252
|
+
* @param moduleName Module name to remove.
|
|
350
253
|
*/
|
|
351
|
-
|
|
254
|
+
removeModule(moduleName: string): Promise<void>;
|
|
352
255
|
/**
|
|
353
|
-
*
|
|
354
|
-
* @
|
|
355
|
-
* To manipulate the resource (create files, delete files etc), use the resource object's API.
|
|
356
|
-
* @param project Project from which resources are created from.
|
|
357
|
-
* @param name Resource name
|
|
358
|
-
* @throws if called with unsupported resource type.
|
|
359
|
-
* @returns Created resource.
|
|
256
|
+
* Accessor for resource handler.
|
|
257
|
+
* @returns Resource handler instance.
|
|
360
258
|
*/
|
|
361
|
-
|
|
259
|
+
get resources(): ResourceHandler;
|
|
362
260
|
/**
|
|
363
261
|
* Shows details of a project.
|
|
364
262
|
* @returns details of a project.
|
|
@@ -375,12 +273,6 @@ export declare class Project extends CardContainer {
|
|
|
375
273
|
* @returns List of cards from template.
|
|
376
274
|
*/
|
|
377
275
|
templateCards(templateName: string): Card[];
|
|
378
|
-
/**
|
|
379
|
-
* Array of templates in the project.
|
|
380
|
-
* @param from Defines where resources are collected from.
|
|
381
|
-
* @returns array of all templates in the project.
|
|
382
|
-
*/
|
|
383
|
-
templates(from?: ResourcesFrom): Promise<Resource[]>;
|
|
384
276
|
/**
|
|
385
277
|
* Update a card's content.
|
|
386
278
|
* @param cardKey card key to update.
|
|
@@ -406,11 +298,4 @@ export declare class Project extends CardContainer {
|
|
|
406
298
|
* @param changedMetadata changed content for the card
|
|
407
299
|
*/
|
|
408
300
|
updateCardMetadata(card: Card, changedMetadata: CardMetadata): Promise<void>;
|
|
409
|
-
private validateCard;
|
|
410
|
-
/**
|
|
411
|
-
* Array of workflows in the project.
|
|
412
|
-
* @param from Defines where resources are collected from.
|
|
413
|
-
* @returns array of all workflows in the project.
|
|
414
|
-
*/
|
|
415
|
-
workflows(from?: ResourcesFrom): Promise<Resource[]>;
|
|
416
301
|
}
|