@microtronics/studio-cli 0.19.0 → 0.19.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,3 +1,7 @@
1
+
2
+
3
+ ## 0.19.1 (2025-02-20)
4
+
1
5
  # Changelog
2
6
 
3
7
  ## 0.19.0 (2025-02-19)
@@ -2070,7 +2070,7 @@ export declare namespace Manifest {
2070
2070
  type: ProjectTypes;
2071
2071
  legacyProject?: boolean;
2072
2072
  icon?: string;
2073
- dpid: DeviceProfiles;
2073
+ dpid?: DeviceProfiles;
2074
2074
  engines?: {
2075
2075
  backend?: string;
2076
2076
  hwfw?: string[];
@@ -101,6 +101,9 @@ function generateAutoIncFromMap(ddeMap, globalDefines, manifest) {
101
101
  pwn(`#define ${name} ${quotes}${value}${quotes}`);
102
102
  }
103
103
  const { dpid, registry } = manifest;
104
+ if (!dpid) {
105
+ throw new Error('Setting "dpid" is required to generate dlo files');
106
+ }
104
107
  const { auto_inc } = DeviceProfiles_1.DeviceProfiles[dpid];
105
108
  addDefinition(`APM_DPID`, `${dpid}`);
106
109
  addDefinition(`APM_DPID_${dpid}`, `1`);
package/out/manifest.js CHANGED
@@ -399,8 +399,11 @@ function validateAddonSupported(manifest) {
399
399
  if (!backend || backend < ADDON_SUPPORTED) {
400
400
  throw new Error(`Project type "addon" requires "engines.backend" to be ">=${ADDON_SUPPORTED}"`);
401
401
  }
402
- if (Manifest.isAddon(manifest) && manifest.dlo) {
403
- throw new Error('For project type "addon", "dlo" is not allowed!"');
402
+ if (manifest.dlo) {
403
+ throw new Error('For project type "addon", "dlo" is not supported!"');
404
+ }
405
+ if (manifest.dpid) {
406
+ throw new Error('For project type "addon", "dpid" is not supported!"');
404
407
  }
405
408
  }
406
409
  /**
@@ -210,8 +210,10 @@ async function buildDDE(cwd, fs) {
210
210
  await dde_1.DDE.exportHistoryJson(cwd, fs, result.ddeJSON);
211
211
  }
212
212
  await dde_1.DDE.exportOpenApi(cwd, fs, result.ddeJSON);
213
- await dde_1.DDE.exportAutoDloFiles(cwd, fs, result.ddeJSON);
214
- await dlo_1.DLO.exportDloConfig(cwd, fs);
213
+ if (await manifest_1.Manifest.isApmPartEnabled(cwd, fs, apm_1.APM.Part.dlo, manifest)) {
214
+ await dde_1.DDE.exportAutoDloFiles(cwd, fs, result.ddeJSON);
215
+ await dlo_1.DLO.exportDloConfig(cwd, fs);
216
+ }
215
217
  }
216
218
  else {
217
219
  throw new Error('Project has errors!');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microtronics/studio-cli",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Microtronics Studio CLI Tool",
5
5
  "main": "./out/api.js",
6
6
  "typings": "./dist/studio-cli.d.ts",