@cyberismo/data-handler 0.0.21 → 0.0.22
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/command-handler.js +13 -24
- package/dist/command-handler.js.map +1 -1
- package/dist/command-manager.d.ts +21 -6
- package/dist/command-manager.js +34 -32
- package/dist/command-manager.js.map +1 -1
- package/dist/commands/calculate.js +101 -46
- package/dist/commands/calculate.js.map +1 -1
- package/dist/commands/create.js +417 -328
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/edit.js +117 -68
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/export.js +301 -252
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/fetch.js +205 -156
- package/dist/commands/fetch.js.map +1 -1
- package/dist/commands/import.js +189 -134
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/migrate.js +91 -45
- package/dist/commands/migrate.js.map +1 -1
- package/dist/commands/move.js +347 -267
- package/dist/commands/move.js.map +1 -1
- package/dist/commands/remove.d.ts +1 -0
- package/dist/commands/remove.js +202 -135
- package/dist/commands/remove.js.map +1 -1
- package/dist/commands/rename.js +233 -187
- package/dist/commands/rename.js.map +1 -1
- package/dist/commands/show.d.ts +8 -8
- package/dist/commands/show.js +477 -372
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/transition.js +119 -73
- package/dist/commands/transition.js.map +1 -1
- package/dist/commands/update.js +8 -3
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/validate.js +1 -1
- package/dist/commands/validate.js.map +1 -1
- package/dist/containers/project/calculation-engine.js +0 -1
- package/dist/containers/project/calculation-engine.js.map +1 -1
- package/dist/containers/project/card-cache.js +1 -1
- package/dist/containers/project/card-cache.js.map +1 -1
- package/dist/containers/project.d.ts +16 -0
- package/dist/containers/project.js +59 -1
- package/dist/containers/project.js.map +1 -1
- package/dist/containers/template.js +1 -1
- package/dist/containers/template.js.map +1 -1
- package/dist/interfaces/command-options.d.ts +1 -0
- package/dist/interfaces/resource-interfaces.d.ts +5 -12
- package/dist/interfaces/resource-interfaces.js.map +1 -1
- package/dist/macros/base-macro.js +1 -1
- package/dist/macros/base-macro.js.map +1 -1
- package/dist/macros/graph/index.js +3 -1
- package/dist/macros/graph/index.js.map +1 -1
- package/dist/macros/index.js +3 -1
- package/dist/macros/index.js.map +1 -1
- package/dist/macros/report/index.js +1 -1
- package/dist/macros/report/index.js.map +1 -1
- package/dist/module-manager.js +5 -3
- package/dist/module-manager.js.map +1 -1
- package/dist/project-settings.js +2 -2
- package/dist/project-settings.js.map +1 -1
- package/dist/resources/card-type-resource.js +1 -1
- package/dist/resources/card-type-resource.js.map +1 -1
- package/dist/resources/create-defaults.js +0 -1
- package/dist/resources/create-defaults.js.map +1 -1
- package/dist/resources/field-type-resource.js +2 -5
- package/dist/resources/field-type-resource.js.map +1 -1
- package/dist/resources/file-resource.js +4 -1
- package/dist/resources/file-resource.js.map +1 -1
- package/dist/resources/folder-resource.d.ts +1 -1
- package/dist/resources/folder-resource.js +4 -1
- package/dist/resources/folder-resource.js.map +1 -1
- package/dist/resources/graph-model-resource.d.ts +1 -8
- package/dist/resources/graph-model-resource.js +0 -14
- package/dist/resources/graph-model-resource.js.map +1 -1
- package/dist/resources/graph-view-resource.d.ts +1 -8
- package/dist/resources/graph-view-resource.js +0 -14
- package/dist/resources/graph-view-resource.js.map +1 -1
- package/dist/resources/link-type-resource.js +1 -1
- package/dist/resources/link-type-resource.js.map +1 -1
- package/dist/resources/report-resource.d.ts +1 -8
- package/dist/resources/report-resource.js +0 -14
- package/dist/resources/report-resource.js.map +1 -1
- package/dist/resources/resource-object.d.ts +11 -1
- package/dist/resources/resource-object.js +19 -2
- package/dist/resources/resource-object.js.map +1 -1
- package/dist/resources/template-resource.d.ts +1 -9
- package/dist/resources/template-resource.js +0 -15
- package/dist/resources/template-resource.js.map +1 -1
- package/dist/resources/workflow-resource.js +1 -1
- package/dist/resources/workflow-resource.js.map +1 -1
- package/dist/utils/card-utils.js +1 -1
- package/dist/utils/card-utils.js.map +1 -1
- package/dist/utils/commit-context.d.ts +23 -0
- package/dist/utils/commit-context.js +30 -0
- package/dist/utils/commit-context.js.map +1 -0
- package/dist/utils/file-utils.js +3 -1
- package/dist/utils/file-utils.js.map +1 -1
- package/dist/utils/git-manager.d.ts +29 -0
- package/dist/utils/git-manager.js +76 -0
- package/dist/utils/git-manager.js.map +1 -0
- package/dist/utils/handlebars-helpers.d.ts +22 -0
- package/dist/utils/handlebars-helpers.js +78 -0
- package/dist/utils/handlebars-helpers.js.map +1 -0
- package/dist/utils/json.js +6 -2
- package/dist/utils/json.js.map +1 -1
- package/dist/utils/log-utils.d.ts +7 -2
- package/dist/utils/log-utils.js +28 -3
- package/dist/utils/log-utils.js.map +1 -1
- package/dist/utils/report.d.ts +0 -19
- package/dist/utils/report.js +4 -67
- package/dist/utils/report.js.map +1 -1
- package/dist/utils/rw-lock.d.ts +71 -0
- package/dist/utils/rw-lock.js +220 -0
- package/dist/utils/rw-lock.js.map +1 -0
- package/dist/utils/user-preferences.js +3 -3
- package/dist/utils/user-preferences.js.map +1 -1
- package/package.json +5 -5
- package/src/command-handler.ts +14 -22
- package/src/command-manager.ts +43 -37
- package/src/commands/calculate.ts +8 -1
- package/src/commands/create.ts +24 -1
- package/src/commands/edit.ts +3 -0
- package/src/commands/export.ts +8 -2
- package/src/commands/fetch.ts +3 -0
- package/src/commands/import.ts +5 -0
- package/src/commands/migrate.ts +2 -0
- package/src/commands/move.ts +34 -0
- package/src/commands/remove.ts +24 -2
- package/src/commands/rename.ts +2 -0
- package/src/commands/show.ts +63 -34
- package/src/commands/transition.ts +2 -0
- package/src/commands/update.ts +9 -3
- package/src/commands/validate.ts +1 -1
- package/src/containers/project/calculation-engine.ts +0 -1
- package/src/containers/project/card-cache.ts +1 -0
- package/src/containers/project.ts +75 -1
- package/src/containers/template.ts +1 -1
- package/src/interfaces/command-options.ts +1 -0
- package/src/interfaces/resource-interfaces.ts +5 -12
- package/src/macros/base-macro.ts +1 -1
- package/src/macros/graph/index.ts +3 -0
- package/src/macros/index.ts +3 -1
- package/src/macros/report/index.ts +1 -0
- package/src/module-manager.ts +5 -2
- package/src/project-settings.ts +2 -1
- package/src/resources/card-type-resource.ts +1 -1
- package/src/resources/create-defaults.ts +0 -1
- package/src/resources/field-type-resource.ts +2 -4
- package/src/resources/file-resource.ts +3 -1
- package/src/resources/folder-resource.ts +7 -2
- package/src/resources/graph-model-resource.ts +1 -25
- package/src/resources/graph-view-resource.ts +1 -25
- package/src/resources/link-type-resource.ts +1 -1
- package/src/resources/report-resource.ts +1 -25
- package/src/resources/resource-object.ts +22 -1
- package/src/resources/template-resource.ts +0 -23
- package/src/resources/workflow-resource.ts +1 -1
- package/src/utils/card-utils.ts +1 -1
- package/src/utils/commit-context.ts +45 -0
- package/src/utils/file-utils.ts +3 -1
- package/src/utils/git-manager.ts +87 -0
- package/src/utils/handlebars-helpers.ts +95 -0
- package/src/utils/json.ts +6 -2
- package/src/utils/log-utils.ts +33 -4
- package/src/utils/report.ts +8 -78
- package/src/utils/rw-lock.ts +279 -0
- package/src/utils/user-preferences.ts +3 -0
package/dist/commands/import.js
CHANGED
|
@@ -10,154 +10,209 @@
|
|
|
10
10
|
details. You should have received a copy of the GNU Affero General Public
|
|
11
11
|
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
12
|
*/
|
|
13
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
14
|
+
var useValue = arguments.length > 2;
|
|
15
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
16
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
17
|
+
}
|
|
18
|
+
return useValue ? value : void 0;
|
|
19
|
+
};
|
|
20
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
21
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
22
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
23
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
24
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
25
|
+
var _, done = false;
|
|
26
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
27
|
+
var context = {};
|
|
28
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
29
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
30
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
31
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
32
|
+
if (kind === "accessor") {
|
|
33
|
+
if (result === void 0) continue;
|
|
34
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
35
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
36
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
37
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
38
|
+
}
|
|
39
|
+
else if (_ = accept(result)) {
|
|
40
|
+
if (kind === "field") initializers.unshift(_);
|
|
41
|
+
else descriptor[key] = _;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
45
|
+
done = true;
|
|
46
|
+
};
|
|
13
47
|
import { ModuleManager } from '../module-manager.js';
|
|
14
48
|
import { readCsvFile } from '../utils/csv.js';
|
|
15
49
|
import { Validate } from './validate.js';
|
|
50
|
+
import { write } from '../utils/rw-lock.js';
|
|
16
51
|
/**
|
|
17
52
|
* Handles all import commands.
|
|
18
53
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
* @param csvFilePath path to the csv file
|
|
38
|
-
* @param parentCardKey the cards in the csv file will be created under this card
|
|
39
|
-
* @returns card keys of the imported cards
|
|
40
|
-
*/
|
|
41
|
-
async importCsv(csvFilePath, parentCardKey) {
|
|
42
|
-
const csv = await readCsvFile(csvFilePath);
|
|
43
|
-
const isValid = Validate.getInstance().validateJson(csv, 'csvSchema');
|
|
44
|
-
if (isValid.length !== 0) {
|
|
45
|
-
throw new Error(isValid);
|
|
54
|
+
let Import = (() => {
|
|
55
|
+
let _instanceExtraInitializers = [];
|
|
56
|
+
let _importCsv_decorators;
|
|
57
|
+
let _importModule_decorators;
|
|
58
|
+
let _updateModule_decorators;
|
|
59
|
+
let _updateAllModules_decorators;
|
|
60
|
+
return class Import {
|
|
61
|
+
static {
|
|
62
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
63
|
+
_importCsv_decorators = [write((csvFilePath) => `Import cards from CSV ${csvFilePath}`)];
|
|
64
|
+
_importModule_decorators = [write((source) => `Import module ${source}`)];
|
|
65
|
+
_updateModule_decorators = [write((moduleName) => `Update module ${moduleName}`)];
|
|
66
|
+
_updateAllModules_decorators = [write(() => 'Update all modules')];
|
|
67
|
+
__esDecorate(this, null, _importCsv_decorators, { kind: "method", name: "importCsv", static: false, private: false, access: { has: obj => "importCsv" in obj, get: obj => obj.importCsv }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
68
|
+
__esDecorate(this, null, _importModule_decorators, { kind: "method", name: "importModule", static: false, private: false, access: { has: obj => "importModule" in obj, get: obj => obj.importModule }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
69
|
+
__esDecorate(this, null, _updateModule_decorators, { kind: "method", name: "updateModule", static: false, private: false, access: { has: obj => "updateModule" in obj, get: obj => obj.updateModule }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
70
|
+
__esDecorate(this, null, _updateAllModules_decorators, { kind: "method", name: "updateAllModules", static: false, private: false, access: { has: obj => "updateAllModules" in obj, get: obj => obj.updateAllModules }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
71
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
46
72
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (description) {
|
|
74
|
-
await this.project.updateCardContent(cardKey, description);
|
|
73
|
+
project = __runInitializers(this, _instanceExtraInitializers);
|
|
74
|
+
createCmd;
|
|
75
|
+
fetchCmd;
|
|
76
|
+
moduleManager;
|
|
77
|
+
/**
|
|
78
|
+
* Creates an instance of Import.
|
|
79
|
+
* @param project Project to use.
|
|
80
|
+
* @param createCmd Instance of Create to use.
|
|
81
|
+
*/
|
|
82
|
+
constructor(project, createCmd, fetchCmd) {
|
|
83
|
+
this.project = project;
|
|
84
|
+
this.createCmd = createCmd;
|
|
85
|
+
this.fetchCmd = fetchCmd;
|
|
86
|
+
this.moduleManager = new ModuleManager(this.project);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Imports cards based on a csv file
|
|
90
|
+
* @param csvFilePath path to the csv file
|
|
91
|
+
* @param parentCardKey the cards in the csv file will be created under this card
|
|
92
|
+
* @returns card keys of the imported cards
|
|
93
|
+
*/
|
|
94
|
+
async importCsv(csvFilePath, parentCardKey) {
|
|
95
|
+
const csv = await readCsvFile(csvFilePath);
|
|
96
|
+
const isValid = Validate.getInstance().validateJson(csv, 'csvSchema');
|
|
97
|
+
if (isValid.length !== 0) {
|
|
98
|
+
throw new Error(isValid);
|
|
75
99
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
100
|
+
const importedCards = [];
|
|
101
|
+
for (const row of csv) {
|
|
102
|
+
const { title, template, description, labels, ...customFields } = row;
|
|
103
|
+
const templateResource = this.project.resources.byType(template, 'templates');
|
|
104
|
+
const templateObject = templateResource.templateObject();
|
|
105
|
+
if (!templateObject) {
|
|
106
|
+
throw new Error(`Template '${template}' not found`);
|
|
107
|
+
}
|
|
108
|
+
const templateCards = templateObject.cards();
|
|
109
|
+
if (templateCards.length !== 1) {
|
|
110
|
+
console.warn(`Template '${template}' for card '${title}' does not have exactly one card. Skipping row.`);
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
// Create card
|
|
114
|
+
const cards = await this.createCmd.createCard(template, parentCardKey);
|
|
115
|
+
if (cards.length !== 1) {
|
|
116
|
+
throw new Error('Card not created');
|
|
117
|
+
}
|
|
118
|
+
const cardKey = cards[0].key;
|
|
119
|
+
const card = this.project.findCard(cardKey);
|
|
120
|
+
if (!card.metadata?.cardType) {
|
|
121
|
+
throw new Error(`Card type not found for card ${cardKey}`);
|
|
122
|
+
}
|
|
123
|
+
const cardType = this.project.resources
|
|
124
|
+
.byType(card.metadata?.cardType, 'cardTypes')
|
|
125
|
+
.show();
|
|
126
|
+
if (description) {
|
|
127
|
+
await this.project.updateCardContent(cardKey, description);
|
|
128
|
+
}
|
|
129
|
+
if (labels) {
|
|
130
|
+
for (const label of labels.split(' ')) {
|
|
131
|
+
try {
|
|
132
|
+
await this.createCmd.createLabel(cardKey, label);
|
|
133
|
+
}
|
|
134
|
+
catch (e) {
|
|
135
|
+
console.error(`Failed to create label ${label}: ${e instanceof Error ? e.message : 'Unknown error'}`);
|
|
136
|
+
}
|
|
83
137
|
}
|
|
84
138
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
139
|
+
await this.project.updateCardMetadataKey(cardKey, 'title', title);
|
|
140
|
+
for (const [key, value] of Object.entries(customFields)) {
|
|
141
|
+
if (cardType.customFields.find((field) => field.name === key)) {
|
|
142
|
+
await this.project.updateCardMetadataKey(cardKey, key, value);
|
|
143
|
+
}
|
|
90
144
|
}
|
|
145
|
+
importedCards.push(cardKey);
|
|
91
146
|
}
|
|
92
|
-
importedCards
|
|
147
|
+
return importedCards;
|
|
93
148
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
149
|
+
/**
|
|
150
|
+
* Imports a module to a project. Copies resources to the project.
|
|
151
|
+
* Resources will be added to a new directory under '.cards/modules'.
|
|
152
|
+
* The name of the new folder will be module's prefix.
|
|
153
|
+
*
|
|
154
|
+
* Note that file references are relative, and thus URI must be
|
|
155
|
+
* 'file:<relative path>', instead of 'file://<relative path>'.
|
|
156
|
+
*
|
|
157
|
+
* @param source Path to module that will be imported
|
|
158
|
+
* @param destination Path to project that will receive the imported module
|
|
159
|
+
* @param options Additional options for module import. Optional.
|
|
160
|
+
* branch: Git branch for module from Git.
|
|
161
|
+
* private: If true, uses credentials to clone the repository
|
|
162
|
+
* @param skipMigrationLog If true, skip logging to migration log (used during project creation)
|
|
163
|
+
*/
|
|
164
|
+
async importModule(source, destination, options, skipMigrationLog = false) {
|
|
165
|
+
// Ensure module list is up to date before importing
|
|
166
|
+
await this.fetchCmd.ensureModuleListUpToDate();
|
|
167
|
+
const beforeImportValidateErrors = await Validate.getInstance().validate(this.project.basePath, () => this.project);
|
|
168
|
+
const gitModule = source.startsWith('https') || source.startsWith('git@');
|
|
169
|
+
const modulePrefix = gitModule
|
|
170
|
+
? await this.moduleManager.importGitModule(source, options)
|
|
171
|
+
: await this.moduleManager.importFileModule(source, destination);
|
|
172
|
+
if (!modulePrefix) {
|
|
173
|
+
throw new Error(`Cannot find prefix for imported module '${source}'. Import cancelled.`);
|
|
174
|
+
}
|
|
175
|
+
const moduleSettings = {
|
|
176
|
+
name: modulePrefix,
|
|
177
|
+
branch: options ? options.branch : undefined,
|
|
178
|
+
private: options ? options.private : undefined,
|
|
179
|
+
location: gitModule ? source : `file:${source}`,
|
|
180
|
+
};
|
|
181
|
+
// Fetch module dependencies.
|
|
182
|
+
await this.moduleManager.updateDependencies(moduleSettings, options?.credentials);
|
|
183
|
+
// Add module as a dependency.
|
|
184
|
+
await this.project.importModule(moduleSettings, skipMigrationLog);
|
|
185
|
+
// Validate the project after module has been imported
|
|
186
|
+
const afterImportValidateErrors = await Validate.getInstance().validate(this.project.basePath, () => this.project);
|
|
187
|
+
if (afterImportValidateErrors.length > beforeImportValidateErrors.length) {
|
|
188
|
+
console.error(`There are new validations errors after importing the module. Check the project`);
|
|
189
|
+
}
|
|
121
190
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
191
|
+
/**
|
|
192
|
+
* Updates a specific imported module.
|
|
193
|
+
* @param moduleName Name (prefix) of module to update.
|
|
194
|
+
* @param credentials Optional credentials for a private module.
|
|
195
|
+
* @throws if module is not part of the project
|
|
196
|
+
*/
|
|
197
|
+
async updateModule(moduleName, credentials) {
|
|
198
|
+
// Ensure module list is up to date before updating
|
|
199
|
+
await this.fetchCmd.ensureModuleListUpToDate();
|
|
200
|
+
const module = this.project.configuration.modules.find((item) => item.name === moduleName);
|
|
201
|
+
if (!module) {
|
|
202
|
+
throw new Error(`Module '${moduleName}' is not part of the project`);
|
|
203
|
+
}
|
|
204
|
+
return this.moduleManager.updateModule(module, credentials);
|
|
136
205
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
// Ensure module list is up to date before updating
|
|
146
|
-
await this.fetchCmd.ensureModuleListUpToDate();
|
|
147
|
-
const module = this.project.configuration.modules.find((item) => item.name === moduleName);
|
|
148
|
-
if (!module) {
|
|
149
|
-
throw new Error(`Module '${moduleName}' is not part of the project`);
|
|
206
|
+
/**
|
|
207
|
+
* Updates all imported modules.
|
|
208
|
+
* @param credentials Optional credentials for private modules.
|
|
209
|
+
*/
|
|
210
|
+
async updateAllModules(credentials) {
|
|
211
|
+
// Ensure module list is up to date before updating all modules
|
|
212
|
+
await this.fetchCmd.ensureModuleListUpToDate();
|
|
213
|
+
return this.moduleManager.updateModules(credentials);
|
|
150
214
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
* Updates all imported modules.
|
|
155
|
-
* @param credentials Optional credentials for private modules.
|
|
156
|
-
*/
|
|
157
|
-
async updateAllModules(credentials) {
|
|
158
|
-
// Ensure module list is up to date before updating all modules
|
|
159
|
-
await this.fetchCmd.ensureModuleListUpToDate();
|
|
160
|
-
return this.moduleManager.updateModules(credentials);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
215
|
+
};
|
|
216
|
+
})();
|
|
217
|
+
export { Import };
|
|
163
218
|
//# sourceMappingURL=import.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../src/commands/import.ts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AC,QAAQ,CAAC,wBAAwB,EAAE,CAAC;YAC/C,OAAO,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QACvD,CAAC;;;SAlMU,MAAM"}
|
package/dist/commands/migrate.js
CHANGED
|
@@ -10,57 +10,103 @@
|
|
|
10
10
|
details. You should have received a copy of the GNU Affero General Public
|
|
11
11
|
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
12
|
*/
|
|
13
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
14
|
+
var useValue = arguments.length > 2;
|
|
15
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
16
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
17
|
+
}
|
|
18
|
+
return useValue ? value : void 0;
|
|
19
|
+
};
|
|
20
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
21
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
22
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
23
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
24
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
25
|
+
var _, done = false;
|
|
26
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
27
|
+
var context = {};
|
|
28
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
29
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
30
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
31
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
32
|
+
if (kind === "accessor") {
|
|
33
|
+
if (result === void 0) continue;
|
|
34
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
35
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
36
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
37
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
38
|
+
}
|
|
39
|
+
else if (_ = accept(result)) {
|
|
40
|
+
if (kind === "field") initializers.unshift(_);
|
|
41
|
+
else descriptor[key] = _;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
45
|
+
done = true;
|
|
46
|
+
};
|
|
13
47
|
import { SCHEMA_VERSION } from '@cyberismo/assets';
|
|
48
|
+
import { write } from '../utils/rw-lock.js';
|
|
14
49
|
/**
|
|
15
50
|
* Command that handles schema migration operations.
|
|
16
51
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Run migrations to bring project to target schema version.
|
|
28
|
-
* @param toVersion Target version (defaults to latest)
|
|
29
|
-
* @param backupDir Optional directory for backups
|
|
30
|
-
* @param timeoutMilliSeconds Optional timeout in milliseconds (defaults to 2 minutes)
|
|
31
|
-
* @returns Migration result
|
|
32
|
-
*/
|
|
33
|
-
async migrate(toVersion, backupDir, timeoutMilliSeconds) {
|
|
34
|
-
const currentVersion = this.project.configuration.schemaVersion;
|
|
35
|
-
if (currentVersion === undefined) {
|
|
36
|
-
throw new Error('Project has no schema version set');
|
|
37
|
-
}
|
|
38
|
-
const targetVersion = toVersion ?? SCHEMA_VERSION;
|
|
39
|
-
// Prevent downgrading
|
|
40
|
-
if (targetVersion < currentVersion) {
|
|
41
|
-
throw new Error(`Cannot downgrade from version ${currentVersion} to ${targetVersion}. Downgrading is not supported.`);
|
|
52
|
+
let Migrate = (() => {
|
|
53
|
+
let _instanceExtraInitializers = [];
|
|
54
|
+
let _migrate_decorators;
|
|
55
|
+
return class Migrate {
|
|
56
|
+
static {
|
|
57
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
58
|
+
_migrate_decorators = [write(() => 'Migrate project')];
|
|
59
|
+
__esDecorate(this, null, _migrate_decorators, { kind: "method", name: "migrate", static: false, private: false, access: { has: obj => "migrate" in obj, get: obj => obj.migrate }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
60
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
42
61
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
62
|
+
project = __runInitializers(this, _instanceExtraInitializers);
|
|
63
|
+
/**
|
|
64
|
+
* Constructs instance of Migrate command.
|
|
65
|
+
* @param project Project instance to use.
|
|
66
|
+
*/
|
|
67
|
+
constructor(project) {
|
|
68
|
+
this.project = project;
|
|
46
69
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Run migrations to bring project to target schema version.
|
|
72
|
+
* @param toVersion Target version (defaults to latest)
|
|
73
|
+
* @param backupDir Optional directory for backups
|
|
74
|
+
* @param timeoutMilliSeconds Optional timeout in milliseconds (defaults to 2 minutes)
|
|
75
|
+
* @returns Migration result
|
|
76
|
+
*/
|
|
77
|
+
async migrate(toVersion, backupDir, timeoutMilliSeconds) {
|
|
78
|
+
const currentVersion = this.project.configuration.schemaVersion;
|
|
79
|
+
if (currentVersion === undefined) {
|
|
80
|
+
throw new Error('Project has no schema version set');
|
|
81
|
+
}
|
|
82
|
+
const targetVersion = toVersion ?? SCHEMA_VERSION;
|
|
83
|
+
// Prevent downgrading
|
|
84
|
+
if (targetVersion < currentVersion) {
|
|
85
|
+
throw new Error(`Cannot downgrade from version ${currentVersion} to ${targetVersion}. Downgrading is not supported.`);
|
|
86
|
+
}
|
|
87
|
+
// Cannot migrate beyond current application schema
|
|
88
|
+
if (targetVersion > SCHEMA_VERSION) {
|
|
89
|
+
throw new Error(`Cannot migrate to version ${targetVersion}. Current application supports up to version ${SCHEMA_VERSION}.`);
|
|
61
90
|
}
|
|
91
|
+
// No migration needed
|
|
92
|
+
if (currentVersion === targetVersion) {
|
|
93
|
+
return {
|
|
94
|
+
success: true,
|
|
95
|
+
message: `Project is already at version ${currentVersion}. No migration needed.`,
|
|
96
|
+
stepsExecuted: [],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
// Prevent skipping migrations when a specific target version is provided
|
|
100
|
+
// If no version specified, migrate to the latest
|
|
101
|
+
if (toVersion !== undefined && toVersion !== SCHEMA_VERSION) {
|
|
102
|
+
// Only allow next sequential version
|
|
103
|
+
if (targetVersion !== currentVersion + 1) {
|
|
104
|
+
throw new Error(`Cannot skip to version ${targetVersion}. Project is at version ${currentVersion}, next version is ${currentVersion + 1}. Migrate one version at a time with 'cyberismo migrate ${currentVersion + 1}', or use 'cyberismo migrate' (without a version) to migrate to the latest version.`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return await this.project.runMigrations(currentVersion, targetVersion, backupDir, timeoutMilliSeconds);
|
|
62
108
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
109
|
+
};
|
|
110
|
+
})();
|
|
111
|
+
export { Migrate };
|
|
66
112
|
//# sourceMappingURL=migrate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE
|
|
1
|
+
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"AAAA;;;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