@microtronics/studio-cli 0.37.0 → 0.39.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 +21 -7
- package/out/dde/fileGenerators/api.js +32 -17
- package/out/dde/yamlDdePreCompiler.js +7 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.39.0 (2025-11-10)
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Bug Fixes
|
|
6
6
|
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
* add separate schema for single record requests ([a52d269](https://bitbucket.org/microtronics-core/vscode-studio/commits/a52d2692ef2e66dbcf49c4b8154c6a4d28d04b2e))
|
|
8
|
+
* fix response schemas for timeseries ([1b24c1c](https://bitbucket.org/microtronics-core/vscode-studio/commits/1b24c1c3deb867b4ab721b4c498930b2cbbd2526))
|
|
9
|
+
* update test fixtures for dde openapi generation ([9653e18](https://bitbucket.org/microtronics-core/vscode-studio/commits/9653e18477bba138a8906d51bc3118470af092fe))
|
|
10
|
+
|
|
11
|
+
## 0.38.0 (2025-10-23)
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **cli:** dde generation filter out used containers in precompiler ([15a6c3e](https://bitbucket.org/microtronics-core/vscode-studio/commits/15a6c3eebb8245a3673311de64fa493dfc8c2094))
|
|
16
|
+
|
|
17
|
+
## 0.37.0 (2025-10-22)
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **cli:** add write permission for timeseries for type addon ([d8b8f05](https://bitbucket.org/microtronics-core/vscode-studio/commits/d8b8f059873f2c4503aef8b1a39d96707f843884))
|
|
22
|
+
* **cli:** enhance regex for relation validation ([7d995c4](https://bitbucket.org/microtronics-core/vscode-studio/commits/7d995c47bc6c24abdb2af6717f4df50f727a1b7a))
|
|
23
|
+
* **cli:** enhance support for cross-library relations ([3d9a6f7](https://bitbucket.org/microtronics-core/vscode-studio/commits/3d9a6f789758bfccf01963e7386573a54fe11f71))
|
|
24
|
+
* **cli:** improve container title extraction logic ([2a0618a](https://bitbucket.org/microtronics-core/vscode-studio/commits/2a0618aae01ed30c3c854430b0bd5ff4454b6288))
|
|
25
|
+
* **cli:** update `isApp` logic to handle undefined type ([fc9c12d](https://bitbucket.org/microtronics-core/vscode-studio/commits/fc9c12ddebdffe4ca9fbed10359ce9b8265f3e57))
|
|
12
26
|
* **core:** extend regex patterns for relation validation ([5ffe3b4](https://bitbucket.org/microtronics-core/vscode-studio/commits/5ffe3b4cad70a842111a937e5c8bd9306571f688))
|
|
13
27
|
|
|
14
28
|
## 0.36.0 (2025-09-25)
|
|
@@ -298,26 +298,27 @@ function generateSchemasFromContainer(apiDescription, containerDefinition, conte
|
|
|
298
298
|
schema.required = requiredProperties.length ? requiredProperties : undefined;
|
|
299
299
|
apiDescription.components.schemas[schemaName] = schema;
|
|
300
300
|
if (containerDefinition.containerType === ContainerType.hx) {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
items: {
|
|
313
|
-
type: 'string',
|
|
314
|
-
enum: Object.keys(schema.properties)
|
|
315
|
-
}
|
|
316
|
-
}
|
|
301
|
+
const timerSeriesSelect = {
|
|
302
|
+
type: 'object',
|
|
303
|
+
description: `Request schema of "${containerDefinition.title}"`,
|
|
304
|
+
additionalProperties: false,
|
|
305
|
+
properties: {
|
|
306
|
+
select: {
|
|
307
|
+
type: 'array',
|
|
308
|
+
description: 'Optional selection of specific fields of the given container',
|
|
309
|
+
items: {
|
|
310
|
+
type: 'string',
|
|
311
|
+
enum: Object.keys(schema.properties)
|
|
317
312
|
}
|
|
318
313
|
}
|
|
319
|
-
|
|
314
|
+
}
|
|
320
315
|
};
|
|
316
|
+
apiDescription.components.schemas[`${schemaName}RequestSingle`] = timerSeriesSelect;
|
|
317
|
+
apiDescription.components.schemas[`${schemaName}Request`] = {
|
|
318
|
+
allOf: [timeseriesRequestBaseRef, timerSeriesSelect]
|
|
319
|
+
};
|
|
320
|
+
// stamp parameter is always returned if it is a timeseries container
|
|
321
|
+
schema.properties['stamp'] = rapidM2MStampRef;
|
|
321
322
|
}
|
|
322
323
|
}
|
|
323
324
|
function getApiDefinitionForField(field) {
|
|
@@ -606,17 +607,31 @@ function generatePathInformationFromContainer(apiDescription, containerDefinitio
|
|
|
606
607
|
value?.tags?.unshift(...pathOptions.tags);
|
|
607
608
|
});
|
|
608
609
|
apiDescription.paths[pathOptions.path] = methods;
|
|
610
|
+
const histdataSingleResponse = {
|
|
611
|
+
...successfulOperationResponse,
|
|
612
|
+
content: {
|
|
613
|
+
'application/json': {
|
|
614
|
+
schema: {
|
|
615
|
+
$ref: `#/components/schemas/${containerDefinition.title}`
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
};
|
|
609
620
|
const youngestPath = `${pathOptions.path}/youngest`;
|
|
610
621
|
const youngestMethod = {
|
|
611
622
|
get: structuredClone(methods.get)
|
|
612
623
|
};
|
|
613
624
|
youngestMethod.get.summary = `Get the youngest record of "${containerDefinition.title}" container`;
|
|
625
|
+
youngestMethod.get.responses['200'] = histdataSingleResponse;
|
|
626
|
+
youngestMethod.get.parameters[1].schema.$ref = `#/components/schemas/${containerDefinition.title}RequestSingle`;
|
|
614
627
|
apiDescription.paths[youngestPath] = youngestMethod;
|
|
615
628
|
const oldestPath = `${pathOptions.path}/oldest`;
|
|
616
629
|
const oldestMethod = {
|
|
617
630
|
get: structuredClone(methods.get)
|
|
618
631
|
};
|
|
619
632
|
oldestMethod.get.summary = `Get the oldest record of "${containerDefinition.title}" container`;
|
|
633
|
+
oldestMethod.get.responses['200'] = histdataSingleResponse;
|
|
634
|
+
oldestMethod.get.parameters[1].schema.$ref = `#/components/schemas/${containerDefinition.title}RequestSingle`;
|
|
620
635
|
apiDescription.paths[oldestPath] = oldestMethod;
|
|
621
636
|
}
|
|
622
637
|
}
|
|
@@ -290,6 +290,13 @@ var YamlPreCompiler;
|
|
|
290
290
|
[DDEContainerName.relations, DDEContainerName.storage].includes(ddeContainerName)) {
|
|
291
291
|
containerList = SERVER_CONTAINER;
|
|
292
292
|
}
|
|
293
|
+
const previousContainerList = this.previousVersion?.containers;
|
|
294
|
+
// filter out all containers that are already used
|
|
295
|
+
if (previousContainerList) {
|
|
296
|
+
containerList = containerList.filter(containerName => {
|
|
297
|
+
return !Object.hasOwn(previousContainerList, containerName);
|
|
298
|
+
});
|
|
299
|
+
}
|
|
293
300
|
return containerList.find(containerName => {
|
|
294
301
|
return !Object.hasOwn(this.usedContainerNames, containerName);
|
|
295
302
|
});
|