@microtronics/studio-cli 0.21.1 → 0.23.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 +17 -2
- package/dist/studio-cli.d.ts +5 -0
- package/out/manifest.js +1 -1
- package/out/package/apm.js +18 -5
- package/out/registryAPI.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.23.0 (2025-02-25)
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
###
|
|
6
|
+
### Features
|
|
7
7
|
|
|
8
|
+
* **studio-cli:** support to create an application with an existing id ([3dbde64](https://bitbucket.org/microtronics-core/vscode-studio/commits/3dbde64241244a2493b8452ed47f3a37dc90cc71))
|
|
9
|
+
* **studio-cli:** use semver api calls for `wynni` environment ([3fa1af3](https://bitbucket.org/microtronics-core/vscode-studio/commits/3fa1af3343c6cda3b73862797ee37d4c696da547))
|
|
10
|
+
|
|
11
|
+
## 0.22.0 (2025-02-25)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **studio-cli:** use semver api calls for `wynni` environment ([dcc6695](https://bitbucket.org/microtronics-core/vscode-studio/commits/dcc6695ecf7b76acea9d70f5d85b125167d4c874))
|
|
17
|
+
|
|
18
|
+
## 0.21.1 (2025-02-25)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
8
23
|
* **studio-cli:** use correct env name `wynni` ([ac5f9c3](https://bitbucket.org/microtronics-core/vscode-studio/commits/ac5f9c3e32d212dab42a99ff228c243eaf4c001c))
|
|
9
24
|
|
|
10
25
|
## 0.21.0 (2025-02-25)
|
package/dist/studio-cli.d.ts
CHANGED
|
@@ -167,6 +167,11 @@ declare interface components {
|
|
|
167
167
|
*/
|
|
168
168
|
TargetSystem: "myDatanet" | "ONE" | "MT360";
|
|
169
169
|
NewApplication: {
|
|
170
|
+
/**
|
|
171
|
+
* Format: uuid
|
|
172
|
+
* @description Only in "wynni" environment available! Allows creating an application with an predefined id
|
|
173
|
+
*/
|
|
174
|
+
id?: string;
|
|
170
175
|
/** @description The project name */
|
|
171
176
|
name: string;
|
|
172
177
|
type?: components["schemas"]["ApplicationType"];
|
package/out/manifest.js
CHANGED
|
@@ -412,7 +412,7 @@ function validateAddonSupported(manifest) {
|
|
|
412
412
|
* @param env
|
|
413
413
|
*/
|
|
414
414
|
function validateProjectVersion(manifest, env) {
|
|
415
|
-
if (
|
|
415
|
+
if ([globals_1.Globals.ENV.lucky, globals_1.Globals.ENV.wynni].includes(env) || Manifest.isLibrary(manifest)) {
|
|
416
416
|
if (!preload_1.default.valid(manifest.version)) {
|
|
417
417
|
throw new Error('"version" has to be a semantic version string!"');
|
|
418
418
|
}
|
package/out/package/apm.js
CHANGED
|
@@ -163,10 +163,22 @@ var APM;
|
|
|
163
163
|
if (!publisher) {
|
|
164
164
|
return null;
|
|
165
165
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
166
|
+
try {
|
|
167
|
+
return {
|
|
168
|
+
id: applicationId,
|
|
169
|
+
...(await registryAPI_1.Registry.getExistingApplication(token, publisher, applicationId, env))
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
catch (e) {
|
|
173
|
+
if (e?.message === 'Could not find given application') {
|
|
174
|
+
// create the app with the given id!
|
|
175
|
+
applicationId = await registerNew(cwd, fs, token, manifest, env);
|
|
176
|
+
return {
|
|
177
|
+
id: applicationId,
|
|
178
|
+
...(await registryAPI_1.Registry.getExistingApplication(token, publisher, applicationId, env))
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
}
|
|
170
182
|
}
|
|
171
183
|
return null;
|
|
172
184
|
}
|
|
@@ -182,8 +194,9 @@ var APM;
|
|
|
182
194
|
async function registerNew(cwd, fs, token, manifest, env) {
|
|
183
195
|
// only myDatanet -> ONE support not needed.
|
|
184
196
|
const backendTarget = 'myDatanet';
|
|
185
|
-
const { publisher, name, description } = manifest;
|
|
197
|
+
const { publisher, name, description, registry } = manifest;
|
|
186
198
|
const newApplication = {
|
|
199
|
+
id: registry?.id,
|
|
187
200
|
// @ts-ignore
|
|
188
201
|
type: manifest.type || manifest_1.Manifest.ProjectTypes.app,
|
|
189
202
|
name: name,
|
package/out/registryAPI.js
CHANGED
|
@@ -313,7 +313,7 @@ var Registry;
|
|
|
313
313
|
* @param env
|
|
314
314
|
*/
|
|
315
315
|
function headerBasedOnEnv(env) {
|
|
316
|
-
if (
|
|
316
|
+
if ([globals_1.Globals.ENV.lucky, globals_1.Globals.ENV.wynni].includes(env)) {
|
|
317
317
|
return { 'X-Semver': 'true' };
|
|
318
318
|
}
|
|
319
319
|
return {};
|