@uns-kit/temporal 0.0.8 → 0.0.9

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.
Files changed (2) hide show
  1. package/README.md +15 -10
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -16,19 +16,24 @@ Install `@uns-kit/core` as well—the plugin augments its runtime.
16
16
 
17
17
  ```ts
18
18
  import UnsProxyProcess from "@uns-kit/core/uns/uns-proxy-process";
19
- import unsTemporalPlugin, { type UnsProxyProcessWithTemporal } from "@uns-kit/temporal";
19
+ import { UnsAttributeType } from "@uns-kit/core/uns/uns-interfaces";
20
+ import type { UnsProxyProcessWithTemporal } from "@uns-kit/temporal";
21
+ import "@uns-kit/temporal";
20
22
 
21
- const process = new UnsProxyProcess("mqtt-broker:1883", { processName: "temporal-demo" }) as UnsProxyProcessWithTemporal;
22
- unsTemporalPlugin;
23
+ async function main() {
24
+ const process = new UnsProxyProcess("mqtt-broker:1883", { processName: "temporal-demo" }) as UnsProxyProcessWithTemporal;
23
25
 
24
- const temporal = await process.createTemporalProxy("hv-etl", "temporal:7233", "hv-namespace");
25
- await temporal.initializeTemporalProxy({
26
- topic: "factory/",
27
- attribute: "hv-status",
28
- attributeType: UnsAttributeType.Data,
29
- });
26
+ const temporal = await process.createTemporalProxy("hv-etl", "temporal:7233", "hv-namespace");
27
+ await temporal.initializeTemporalProxy({
28
+ topic: "factory/",
29
+ attribute: "hv-status",
30
+ attributeType: UnsAttributeType.Data,
31
+ });
30
32
 
31
- await temporal.startWorkflow("TransformHvSclData", { coil_id: "42" }, "ETL_HV_SCL_TASK_QUEUE");
33
+ await temporal.startWorkflow("TransformHvSclData", { coil_id: "42" }, "ETL_HV_SCL_TASK_QUEUE");
34
+ }
35
+
36
+ void main();
32
37
  ```
33
38
 
34
39
  ## Scripts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uns-kit/temporal",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Temporal.io integration plugin for UnsProxyProcess, wiring workflows into the UNS.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -32,7 +32,7 @@
32
32
  "types": "dist/index.d.ts",
33
33
  "dependencies": {
34
34
  "@temporalio/client": "^1.13.0",
35
- "@uns-kit/core": "0.0.20"
35
+ "@uns-kit/core": "0.0.21"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "tsc -p tsconfig.build.json",