@microtronics/studio-cli 0.27.3 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/studio-cli.d.ts +41 -13
- package/out/api.js +4 -2
- package/out/dde/dde.js +103 -26
- package/out/dde/yamlDdePreCompiler.js +3 -51
- package/out/defaultFiles.js +6 -1
- package/out/dlo/CustomWasmFS.js +227 -0
- package/out/dlo/compiler.js +40 -40
- package/out/dlo/dlo.js +2 -1
- package/out/dlo/dlocc.js +188 -238
- package/out/main.js +5 -1
- package/out/package/apm.js +4 -1
- package/out/package/package.js +21 -4
- package/package.json +1 -1
package/out/main.js
CHANGED
|
@@ -84,8 +84,12 @@ program
|
|
|
84
84
|
program
|
|
85
85
|
.command('build')
|
|
86
86
|
.addOption(new commander_1.Option('-p --part <APM part>', 'APM part that should be build').choices(Object.values(apm_1.APM.Part)))
|
|
87
|
+
.allowExcessArguments(true)
|
|
88
|
+
.addOption(optionStudioEnv)
|
|
89
|
+
.addOption(optionStudioToken)
|
|
87
90
|
.action(opts => {
|
|
88
|
-
|
|
91
|
+
const { env, token } = getDefaultOptions(opts);
|
|
92
|
+
main((0, api_1.build)(cwd, cliFS_1.cliFS, logger, env, token, opts.part));
|
|
89
93
|
});
|
|
90
94
|
const releasePhaseArguments = Object.values(apm_1.APM.TagPhase);
|
|
91
95
|
program
|
package/out/package/apm.js
CHANGED
|
@@ -285,7 +285,10 @@ async function addAdditionalFiles(cwd, fs, apmBuffer) {
|
|
|
285
285
|
const reportTemplateBlob = new Blob([await fs.readFile(reportTemplate)]);
|
|
286
286
|
apmBuffer.append(`bin/pov/mdn_report_template.json`, reportTemplateBlob);
|
|
287
287
|
}
|
|
288
|
+
// pass the current versions history json to the apm tag
|
|
288
289
|
const historyPath = vscode_uri_1.Utils.joinPath(cwd, defaultFiles_1.DefaultFiles.filePaths.dist.historyJson);
|
|
289
|
-
|
|
290
|
+
if (await fs.stat(historyPath)) {
|
|
291
|
+
apmBuffer.append(`src/dde/history.json`, new Blob([await fs.readFile(historyPath)]));
|
|
292
|
+
}
|
|
290
293
|
}
|
|
291
294
|
//# sourceMappingURL=apm.js.map
|
package/out/package/package.js
CHANGED
|
@@ -36,8 +36,9 @@ var Package;
|
|
|
36
36
|
* @param selectedParts - choose a specific part that should be build or if true all parts are build
|
|
37
37
|
* @param errorWithDiagnostics
|
|
38
38
|
*/
|
|
39
|
-
async function buildAll(cwd, fs, logger, selectedParts = true, errorWithDiagnostics) {
|
|
39
|
+
async function buildAll(cwd, fs, logger, env, apiToken, selectedParts = true, errorWithDiagnostics) {
|
|
40
40
|
selectedParts = normalizeSelectedParts(logger, selectedParts);
|
|
41
|
+
await preBuild(cwd, fs, logger, env, apiToken, selectedParts);
|
|
41
42
|
const mergedDiagnostics = {
|
|
42
43
|
[apm_1.APM.Part.dde]: [],
|
|
43
44
|
[apm_1.APM.Part.dlo]: [],
|
|
@@ -133,7 +134,7 @@ var Package;
|
|
|
133
134
|
return;
|
|
134
135
|
}
|
|
135
136
|
// build the complete project
|
|
136
|
-
await buildAll(cwd, fs, logger);
|
|
137
|
+
await buildAll(cwd, fs, logger, env, token);
|
|
137
138
|
// update the store apm with the actual name/description/...
|
|
138
139
|
await apm_1.APM.updateProfile(cwd, fs, token, env);
|
|
139
140
|
const tagContent = await apm_1.APM.createTag(cwd, fs, releasePhase);
|
|
@@ -162,7 +163,7 @@ var Package;
|
|
|
162
163
|
await manifest_1.Manifest.validateBasicManifest(cwd, fs, manifest);
|
|
163
164
|
await validatePublishSettings(cwd, fs, token, env);
|
|
164
165
|
// build the complete project
|
|
165
|
-
await buildAll(cwd, fs, logger);
|
|
166
|
+
await buildAll(cwd, fs, logger, env, token);
|
|
166
167
|
const archive = await library_1.Library.createArchive(cwd, fs);
|
|
167
168
|
await library_1.Library.publishPackage(cwd, fs, token, archive, env);
|
|
168
169
|
logger.done(`Library "${manifest.publisher}/${manifest.name}" with version "${manifest.version}" published!`);
|
|
@@ -264,6 +265,22 @@ function normalizeSelectedParts(logger, selectedParts) {
|
|
|
264
265
|
}
|
|
265
266
|
return selectedParts;
|
|
266
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* Prepares the build process by performing pre-build operations based on the selected parts.
|
|
270
|
+
*
|
|
271
|
+
* @param {URI} cwd - The current working directory for the build process.
|
|
272
|
+
* @param {LocalFS} fs - The file system abstraction used for file operations.
|
|
273
|
+
* @param {Log.Logger} logger - The logger instance for logging messages during the process.
|
|
274
|
+
* @param {Globals.ENV} env - The environment variables and configuration for the process.
|
|
275
|
+
* @param {string|null} apiToken - The API token used for authentication, or null if not required.
|
|
276
|
+
* @param {APM.Part[]} selectedParts - An array of selected parts indicating specific build steps to execute.
|
|
277
|
+
* @return {Promise<void>} A promise that resolves when the pre-build process completes.
|
|
278
|
+
*/
|
|
279
|
+
async function preBuild(cwd, fs, logger, env, apiToken, selectedParts) {
|
|
280
|
+
if (selectedParts.includes(apm_1.APM.Part.dde)) {
|
|
281
|
+
await dde_1.DDE.fetchPreviousHistoryJson(cwd, fs, logger, env, apiToken);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
267
284
|
/**
|
|
268
285
|
* Generates all needed files out of the dde declaration
|
|
269
286
|
* @param cwd
|
|
@@ -288,7 +305,7 @@ async function buildDDE(cwd, fs, logger) {
|
|
|
288
305
|
return result.diagnostics;
|
|
289
306
|
}
|
|
290
307
|
async function buildDLO(cwd, fs, logger) {
|
|
291
|
-
const compiler = new compiler_1.DloCompiler(logger);
|
|
308
|
+
const compiler = new compiler_1.DloCompiler(cwd, fs, logger);
|
|
292
309
|
const { diagnostics } = await compiler.compile(cwd, fs);
|
|
293
310
|
return diagnostics;
|
|
294
311
|
}
|