@microtronics/studio-cli 0.14.0 → 0.15.1

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 CHANGED
@@ -1,5 +1,19 @@
1
1
 
2
2
 
3
+ ## 0.15.1 (2025-01-31)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **studio-cli:** didn't allow that allowedBackends are null ([6335dab](https://bitbucket.org/microtronics-core/vscode-studio/commits/6335dab9eb7e783faa4354da304989f3adc79be0))
9
+
10
+ ## 0.15.0 (2025-01-31)
11
+
12
+
13
+ ### Features
14
+
15
+ * **studio-cli:** removed `allowedBackends` and `target` from manifest.registry ([99398ae](https://bitbucket.org/microtronics-core/vscode-studio/commits/99398ae8e475946204d49045b8fff83c2f013e6d))
16
+
3
17
  ## 0.14.0 (2025-01-29)
4
18
 
5
19
 
@@ -175,15 +175,11 @@ declare interface components {
175
175
  targetSystem: components["schemas"]["TargetSystem"];
176
176
  /** @description ONE specific parameter for the organizationId */
177
177
  organizationId?: string;
178
- /**
179
- * @description Defines which servers are allowed to see this application. If null, the application wont be shared with anyone
180
- * @default null
181
- */
182
- allowedBackends: ("*" | string[]) | null;
178
+ /** @description Defines which servers are allowed to see this application. If null, the application wont be shared with anyone */
179
+ allowedBackends?: ("*" | string[]) | null;
183
180
  };
184
181
  ApplicationInformationBase: {
185
- /** @description The actual released version of the application */
186
- version: number;
182
+ version: components["parameters"]["ApplicationVersion"];
187
183
  publisherId: components["parameters"]["PublisherId"];
188
184
  } & components["schemas"]["NewApplication"];
189
185
  ApplicationListInformation: {
@@ -200,8 +196,7 @@ declare interface components {
200
196
  ApplicationVersion: {
201
197
  /** @description The name of the application when this version wos released */
202
198
  name: string;
203
- /** @description The version number */
204
- version: number;
199
+ version: components["parameters"]["ApplicationVersion"];
205
200
  /**
206
201
  * Format: date-time
207
202
  * @description Date when this version was published
@@ -2049,7 +2044,14 @@ export declare namespace Manifest {
2049
2044
  };
2050
2045
  registry?: {
2051
2046
  id?: string;
2052
- allowedBackends?: null | '*' | string[];
2047
+ /**
2048
+ * @deprecated
2049
+ */
2050
+ allowedBackends?: Registry.ApiNewApplication['allowedBackends'];
2051
+ /**
2052
+ * @deprecated
2053
+ */
2054
+ target?: Registry.ApiNewApplication['targetSystem'];
2053
2055
  };
2054
2056
  pov?: {
2055
2057
  details?: ApmPartScripts;
package/out/manifest.js CHANGED
@@ -90,6 +90,7 @@ var Manifest;
90
90
  manifestCache.clear();
91
91
  // patch the options if they are not valid for a specific device profile
92
92
  patchDloCompileOptionsBasedOnDpid(manifest);
93
+ removeDeprecatedOptions(manifest);
93
94
  return fs.writeFile(vscode_uri_1.Utils.joinPath(cwd, STUDIO_JSON_NAME), JSON.stringify(manifest, null, '\t'));
94
95
  }
95
96
  Manifest.write = write;
@@ -193,6 +194,9 @@ var Manifest;
193
194
  if (allowedBackends === undefined) {
194
195
  return 'Allowed backends not specified yet';
195
196
  }
197
+ if (allowedBackends === null) {
198
+ return null;
199
+ }
196
200
  if (Array.isArray(allowedBackends) || allowedBackends?.includes(';')) {
197
201
  const validationArray = allowedBackends?.includes(';') ? allowedBackends.split(';') : allowedBackends;
198
202
  for (const domain of validationArray) {
@@ -328,4 +332,10 @@ function patchDloCompileOptionsBasedOnDpid(manifest) {
328
332
  });
329
333
  }
330
334
  }
335
+ function removeDeprecatedOptions(manifest) {
336
+ if (manifest.registry) {
337
+ delete manifest.registry.allowedBackends;
338
+ delete manifest.registry.target;
339
+ }
340
+ }
331
341
  //# sourceMappingURL=manifest.js.map
@@ -173,12 +173,12 @@ var APM;
173
173
  async function registerNew(cwd, fs, token, manifest, env) {
174
174
  // only myDatanet -> ONE support not needed.
175
175
  const backendTarget = 'myDatanet';
176
- const { publisher, name, description, registry } = manifest;
176
+ const { publisher, name, description } = manifest;
177
177
  const newApplication = {
178
178
  name: name,
179
179
  targetSystem: backendTarget,
180
180
  description: description || '',
181
- allowedBackends: registry?.allowedBackends ?? null
181
+ allowedBackends: null
182
182
  };
183
183
  // create new application
184
184
  const projectId = await registryAPI_1.Registry.createNewApplication(token, publisher, newApplication, env);
@@ -186,8 +186,7 @@ var APM;
186
186
  throw new Error('Failed to initialize application');
187
187
  }
188
188
  manifest.registry = {
189
- id: projectId,
190
- allowedBackends: newApplication.allowedBackends
189
+ id: projectId
191
190
  };
192
191
  // write the updated manifest to disk
193
192
  await manifest_1.Manifest.write(cwd, fs, manifest);
@@ -206,8 +205,6 @@ var APM;
206
205
  const { name, publisher, description, registry } = await manifest_1.Manifest.read(cwd, fs);
207
206
  const applicationId = registry?.id;
208
207
  await registryAPI_1.Registry.updateExistingApplication(token, publisher, applicationId, {
209
- // @ts-ignore
210
- allowedBackends: registry.allowedBackends,
211
208
  description: description,
212
209
  name: name,
213
210
  targetSystem: 'myDatanet'
@@ -154,7 +154,7 @@ var Package;
154
154
  */
155
155
  async function validatePublishSettings(cwd, fs, token) {
156
156
  const manifest = await manifest_1.Manifest.read(cwd, fs);
157
- const { name, publisher, description, registry } = manifest;
157
+ const { name, publisher, description } = manifest;
158
158
  const invalidName = manifest_1.Manifest.validateProjectName(name, manifest_1.Manifest.isLibraryProject(manifest));
159
159
  if (invalidName) {
160
160
  throw new Error(`name: ${invalidName}`);
@@ -171,10 +171,6 @@ var Package;
171
171
  if (!manifest_1.Manifest.isLibraryProject(manifest)) {
172
172
  await manifest_1.Manifest.validateApplicationIcon(cwd, fs, manifest);
173
173
  manifest_1.Manifest.validateEngineSettings(manifest);
174
- const invalidBackends = await manifest_1.Manifest.validateRegistryAllowedBackends(registry?.allowedBackends);
175
- if (invalidBackends) {
176
- throw new Error(`registry: ${invalidBackends}`);
177
- }
178
174
  }
179
175
  }
180
176
  Package.validatePublishSettings = validatePublishSettings;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microtronics/studio-cli",
3
- "version": "0.14.0",
3
+ "version": "0.15.1",
4
4
  "description": "Microtronics Studio CLI Tool",
5
5
  "main": "./out/api.js",
6
6
  "typings": "./dist/studio-cli.d.ts",
@@ -61,7 +61,7 @@
61
61
  "cross-env": "^7.0.3",
62
62
  "mocha": "^10.8.2",
63
63
  "mocha-junit-reporter": "^2.2.1",
64
- "openapi-typescript": "^7.4.3",
64
+ "openapi-typescript": "^7.6.0",
65
65
  "ts-node": "^10.9.2",
66
66
  "typescript": "^5.6.3"
67
67
  },