@microtronics/studio-cli 0.12.1 → 0.12.2
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 +7 -0
- package/dist/studio-cli.d.ts +2 -1
- package/out/manifest.js +4 -3
- package/out/package/package.js +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## 0.12.2 (2025-01-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **studio-cli:** only validate publish related settings during publishing ([82a624a](https://bitbucket.org/microtronics-core/vscode-studio/commits/82a624a3937f0382f096a940f05720b41b3d658a))
|
|
9
|
+
|
|
3
10
|
## 0.12.1 (2025-01-21)
|
|
4
11
|
|
|
5
12
|
|
package/dist/studio-cli.d.ts
CHANGED
|
@@ -2052,8 +2052,9 @@ export declare namespace Manifest {
|
|
|
2052
2052
|
* @param fs
|
|
2053
2053
|
* @param manifest
|
|
2054
2054
|
* @param env
|
|
2055
|
+
* @param publish - validate publish related options
|
|
2055
2056
|
*/
|
|
2056
|
-
export function validateManifest(cwd: URI, fs: LocalFS, manifest: Manifest.Manifest | null, env?: Globals.ENV): Promise<void>;
|
|
2057
|
+
export function validateManifest(cwd: URI, fs: LocalFS, manifest: Manifest.Manifest | null, publish: boolean, env?: Globals.ENV): Promise<void>;
|
|
2057
2058
|
export function validateLibraryName(libraryName: string): false | "Library name can only contain 'a' through 'z', '0' through '9', '_' and '-'. The Library name must start with an alphabetic or numeric character." | "The library name is beyond permissible length of 20 characters.";
|
|
2058
2059
|
export function validateProjectName(name: string, isLibrary?: boolean): Promise<false | "Library name can only contain 'a' through 'z', '0' through '9', '_' and '-'. The Library name must start with an alphabetic or numeric character." | "The library name is beyond permissible length of 20 characters." | "Project name can only contain 'A' through 'Z', 'a' through 'z', '0' through '9', ' ', '_' and '-'. The Project name must start with an alphabetic or numeric character." | "The project name is beyond permissible length of 40 characters.">;
|
|
2059
2060
|
export function validateDescription(description: string): Promise<false | "The description must have at least 5 characters.">;
|
package/out/manifest.js
CHANGED
|
@@ -100,8 +100,9 @@ var Manifest;
|
|
|
100
100
|
* @param fs
|
|
101
101
|
* @param manifest
|
|
102
102
|
* @param env
|
|
103
|
+
* @param publish - validate publish related options
|
|
103
104
|
*/
|
|
104
|
-
async function validateManifest(cwd, fs, manifest, env = globals_1.Globals.ENV.production) {
|
|
105
|
+
async function validateManifest(cwd, fs, manifest, publish, env = globals_1.Globals.ENV.production) {
|
|
105
106
|
if (!manifest) {
|
|
106
107
|
manifest = await read(cwd, fs);
|
|
107
108
|
}
|
|
@@ -110,8 +111,8 @@ var Manifest;
|
|
|
110
111
|
validateBLOSettings(manifest);
|
|
111
112
|
if (!manifest.library) {
|
|
112
113
|
validateEngineSettings(manifest);
|
|
113
|
-
// only validate
|
|
114
|
-
if (
|
|
114
|
+
// only validate during publish process
|
|
115
|
+
if (publish) {
|
|
115
116
|
await validateApplicationIcon(cwd, fs, manifest);
|
|
116
117
|
}
|
|
117
118
|
}
|
package/out/package/package.js
CHANGED
|
@@ -67,7 +67,7 @@ var Package;
|
|
|
67
67
|
if (!Object.values(apm_1.APM.TagPhase).includes(releasePhase)) {
|
|
68
68
|
throw new Error(`ReleasePhase: ${releasePhase} is not a valid release phase`);
|
|
69
69
|
}
|
|
70
|
-
await manifest_1.Manifest.validateManifest(cwd, fs, null, env);
|
|
70
|
+
await manifest_1.Manifest.validateManifest(cwd, fs, null, true, env);
|
|
71
71
|
const application = await apm_1.APM.validateAccess(cwd, fs, token, false, env);
|
|
72
72
|
if (!application) {
|
|
73
73
|
return;
|
|
@@ -90,7 +90,7 @@ var Package;
|
|
|
90
90
|
*/
|
|
91
91
|
async function releaseLibrary(cwd, fs, token, env = globals_1.Globals.ENV.production) {
|
|
92
92
|
const manifest = await manifest_1.Manifest.read(cwd, fs);
|
|
93
|
-
await manifest_1.Manifest.validateManifest(cwd, fs, manifest, env);
|
|
93
|
+
await manifest_1.Manifest.validateManifest(cwd, fs, manifest, true, env);
|
|
94
94
|
await validateSpecificSettings(token, manifest);
|
|
95
95
|
// build the complete project
|
|
96
96
|
await buildAll(cwd, fs);
|
|
@@ -190,7 +190,7 @@ async function buildDDE(cwd, fs) {
|
|
|
190
190
|
console.log(message);
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
|
-
|
|
193
|
+
throwIfDiagnosticsHaveError(apm_1.APM.Part.dde, result.diagnostics);
|
|
194
194
|
if (result.ddeJSON) {
|
|
195
195
|
await dde_1.DDE.exportMyDatanetXML(cwd, fs, result.ddeJSON);
|
|
196
196
|
await dde_1.DDE.exportHistoryJson(cwd, fs, result.ddeJSON);
|
|
@@ -205,9 +205,9 @@ async function buildDDE(cwd, fs) {
|
|
|
205
205
|
async function buildDLO(cwd, fs) {
|
|
206
206
|
const compiler = new compiler_1.DloCompiler();
|
|
207
207
|
const { diagnostics } = await compiler.compile(cwd, fs);
|
|
208
|
-
|
|
208
|
+
throwIfDiagnosticsHaveError(apm_1.APM.Part.dlo, diagnostics);
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function throwIfDiagnosticsHaveError(apmPart, diagnostics) {
|
|
211
211
|
diagnostics.forEach(diagnostic => {
|
|
212
212
|
if (diagnostic.level === 'error') {
|
|
213
213
|
throw new Error(`APM part '${apmPart}' has errors. Aborted.`);
|