@uns-kit/cli 2.0.81 → 3.0.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/dist/index.js CHANGED
@@ -516,6 +516,7 @@ const AGENT_MIGRATION_BLOCK = [
516
516
  "- Before changing any `@uns-kit/*` version, record the installed source version and intended target version.",
517
517
  "- After installing the target version, read `node_modules/@uns-kit/core/MIGRATIONS.md` and apply every migration whose version boundary is crossed. Do not apply unrelated migrations.",
518
518
  "- When crossing `<2.0.71` to `>=2.0.71`, inspect MQTT proxy ownership and follow the documented shutdown migration. Process-owned and standalone proxies have different shutdown paths.",
519
+ "- When crossing `<3.0.0` to `>=3.0.0`, migrate MQTT `message.table.columns` publishers from named arrays to named objects and consumers to object-entry iteration. Keep schema `tableColumns` and Assistant/UI table formats unchanged.",
519
520
  AGENT_MIGRATION_END,
520
521
  ].join("\n");
521
522
  async function ensureAgentMigrationGuidance(targetDir) {
@@ -81,6 +81,7 @@ export function generateAgentsMarkdown(bundle) {
81
81
  "- Before changing any `@uns-kit/*` version, record the installed source version and intended target version.",
82
82
  "- After installing the target version, read `node_modules/@uns-kit/core/MIGRATIONS.md` and apply every migration whose version boundary is crossed. Do not apply unrelated migrations.",
83
83
  "- When crossing `<2.0.71` to `>=2.0.71`, inspect MQTT proxy ownership and follow the documented shutdown migration. Process-owned and standalone proxies have different shutdown paths.",
84
+ "- When crossing `<3.0.0` to `>=3.0.0`, migrate MQTT `message.table.columns` publishers from named arrays to named objects and consumers to object-entry iteration. Keep schema `tableColumns` and Assistant/UI table formats unchanged.",
84
85
  "<!-- uns-kit:migrations:end -->",
85
86
  "",
86
87
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uns-kit/cli",
3
- "version": "2.0.81",
3
+ "version": "3.0.0",
4
4
  "description": "Command line scaffolding tool for UNS applications",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -26,14 +26,14 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "azure-devops-node-api": "^15.1.1",
29
- "@uns-kit/core": "2.0.81"
29
+ "@uns-kit/core": "3.0.0"
30
30
  },
31
31
  "unsKitPackages": {
32
- "@uns-kit/core": "2.0.81",
33
- "@uns-kit/api": "2.0.81",
34
- "@uns-kit/cron": "2.0.81",
35
- "@uns-kit/database": "2.0.81",
36
- "@uns-kit/assistant-workflow": "2.0.81"
32
+ "@uns-kit/core": "3.0.0",
33
+ "@uns-kit/api": "3.0.0",
34
+ "@uns-kit/cron": "3.0.0",
35
+ "@uns-kit/database": "3.0.0",
36
+ "@uns-kit/assistant-workflow": "3.0.0"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "tsc -p tsconfig.build.json",
@@ -26,4 +26,5 @@ Pointers for AI/code-assist tools when working in this generated project.
26
26
  - Before changing any `@uns-kit/*` version, record the installed source version and intended target version.
27
27
  - After installing the target version, read `node_modules/@uns-kit/core/MIGRATIONS.md` and apply every migration whose version boundary is crossed. Do not apply unrelated migrations.
28
28
  - When crossing `<2.0.71` to `>=2.0.71`, inspect MQTT proxy ownership and follow the documented shutdown migration. Process-owned and standalone proxies have different shutdown paths.
29
+ - When crossing `<3.0.0` to `>=3.0.0`, migrate MQTT `message.table.columns` publishers from named arrays to named objects and consumers to object-entry iteration. Keep schema `tableColumns` and Assistant/UI table formats unchanged.
29
30
  <!-- uns-kit:migrations:end -->
@@ -26,4 +26,5 @@ Pointers for AI/code-assist tools when working in this generated project.
26
26
  - Before changing any `@uns-kit/*` version, record the installed source version and intended target version.
27
27
  - After installing the target version, read `node_modules/@uns-kit/core/MIGRATIONS.md` and apply every migration whose version boundary is crossed. Do not apply unrelated migrations.
28
28
  - When crossing `<2.0.71` to `>=2.0.71`, inspect MQTT proxy ownership and follow the documented shutdown migration. Process-owned and standalone proxies have different shutdown paths.
29
+ - When crossing `<3.0.0` to `>=3.0.0`, migrate MQTT `message.table.columns` publishers from named arrays to named objects and consumers to object-entry iteration. Keep schema `tableColumns` and Assistant/UI table formats unchanged.
29
30
  <!-- uns-kit:migrations:end -->
@@ -11,7 +11,7 @@ import {
11
11
  GeneratedObjectTypeDescriptions,
12
12
  } from "../uns/uns-dictionary.generated.js";
13
13
  import { GeneratedAssets, resolveGeneratedAsset } from "../uns/uns-assets.js";
14
- import type { IUnsTableColumn, IUnsTableColumnMetadata } from "@uns-kit/core/uns/uns-interfaces.js";
14
+ import type { IUnsTableColumns, IUnsTableColumnMetadata } from "@uns-kit/core/uns/uns-interfaces.js";
15
15
  import type { ISO8601 } from "@uns-kit/core/uns/uns-interfaces.js";
16
16
  import { GeneratedPhysicalMeasurements } from "../uns/uns-measurements.generated.js";
17
17
 
@@ -60,11 +60,11 @@ mqttInput.event.on("input", async (event) => {
60
60
  const intervalStart: ISO8601 = new Date(eventDate.getTime() - 1000).toISOString() as ISO8601;
61
61
  const intervalEnd: ISO8601 = eventDate.toISOString() as ISO8601;
62
62
  const dataGroup = "sensor_table";
63
- const columns: IUnsTableColumn[] = [
64
- { name: "current", type: "double", value: currentValue, uom: GeneratedPhysicalMeasurements.Ampere },
65
- { name: "voltage", type: "double", value: sensorValue },
66
- { name: "active_energy_total", type: "double", value: currentValue, uom: GeneratedPhysicalMeasurements.KiloWattHour },
67
- ];
63
+ const columns: IUnsTableColumns = {
64
+ current: { type: "double", value: currentValue, uom: GeneratedPhysicalMeasurements.Ampere },
65
+ voltage: { type: "double", value: sensorValue },
66
+ active_energy_total: { type: "double", value: currentValue, uom: GeneratedPhysicalMeasurements.KiloWattHour },
67
+ };
68
68
  const tableColumns: IUnsTableColumnMetadata[] = [
69
69
  {
70
70
  name: "active_energy_total",
@@ -33,7 +33,7 @@ import UnsMqttProxy from "@uns-kit/core/uns-mqtt/uns-mqtt-proxy.js";
33
33
  import { registerAttributeDescriptions, registerObjectTypeDescriptions } from "@uns-kit/core/uns/uns-dictionary-registry.js";
34
34
  import { UnsPacket } from "@uns-kit/core/uns/uns-packet.js";
35
35
  import { UnsTopics } from "@uns-kit/core/uns/uns-topics.js";
36
- import type { ISO8601, IUnsMessage, IUnsTableColumn } from "@uns-kit/core/uns/uns-interfaces.js";
36
+ import type { ISO8601, IUnsMessage, IUnsTableColumns } from "@uns-kit/core/uns/uns-interfaces.js";
37
37
  import {
38
38
  GeneratedAttributes,
39
39
  GeneratedAttributeDescriptions,
@@ -152,11 +152,11 @@ function buildIterations(
152
152
  ];
153
153
  }
154
154
 
155
- function buildColumns(producedKg: number, scrapKg: number): IUnsTableColumn[] {
156
- return [
157
- { name: "producedKg", type: "double", value: producedKg, uom: GeneratedPhysicalMeasurements.Kilogram },
158
- { name: "scrapKg", type: "double", value: scrapKg, uom: GeneratedPhysicalMeasurements.Kilogram },
159
- ];
155
+ function buildColumns(producedKg: number, scrapKg: number): IUnsTableColumns {
156
+ return {
157
+ producedKg: { type: "double", value: producedKg, uom: GeneratedPhysicalMeasurements.Kilogram },
158
+ scrapKg: { type: "double", value: scrapKg, uom: GeneratedPhysicalMeasurements.Kilogram },
159
+ };
160
160
  }
161
161
 
162
162
  function simulateProducedKg(bucketIndex: number, iteration: number): number {
@@ -319,7 +319,7 @@ async function main() {
319
319
  windowStart: ISO8601;
320
320
  windowEnd: ISO8601;
321
321
  deleted?: boolean;
322
- columns: IUnsTableColumn[];
322
+ columns: IUnsTableColumns;
323
323
  };
324
324
  }> = [];
325
325