@uns-kit/temporal 0.0.18 → 0.0.19

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 Aljoša Vister
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Aljoša Vister
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,48 +1,48 @@
1
- # @uns-kit/temporal
2
-
3
- `@uns-kit/temporal` bridges Temporal.io workflows into the Unified Namespace. The plugin registers a `createTemporalProxy` method on `UnsProxyProcess`, tracks workflow metadata, and republishes workflow results via UNS topics.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- pnpm add @uns-kit/temporal
9
- # or
10
- npm install @uns-kit/temporal
11
- ```
12
-
13
- Install `@uns-kit/core` as well—the plugin augments its runtime.
14
-
15
- ## Example
16
-
17
- ```ts
18
- import UnsProxyProcess from "@uns-kit/core/uns/uns-proxy-process";
19
- import { UnsAttributeType } from "@uns-kit/core/uns/uns-interfaces";
20
- import type { UnsProxyProcessWithTemporal } from "@uns-kit/temporal";
21
- import "@uns-kit/temporal";
22
-
23
- async function main() {
24
- const process = new UnsProxyProcess("mqtt-broker:1883", { processName: "temporal-demo" }) as UnsProxyProcessWithTemporal;
25
-
26
- const temporal = await process.createTemporalProxy("line-etl", "temporal:7233", "line-namespace");
27
- await temporal.initializeTemporalProxy({
28
- topic: "factory/",
29
- attribute: "line-status",
30
- attributeType: UnsAttributeType.Data,
31
- });
32
-
33
- await temporal.startWorkflow("TransformLineData", { coil_id: "42" }, "ETL_LINE_TASK_QUEUE");
34
- }
35
-
36
- void main();
37
- ```
38
-
39
- ## Scripts
40
-
41
- ```bash
42
- pnpm run typecheck
43
- pnpm run build
44
- ```
45
-
46
- ## License
47
-
48
- MIT © Aljoša Vister
1
+ # @uns-kit/temporal
2
+
3
+ `@uns-kit/temporal` bridges Temporal.io workflows into the Unified Namespace. The plugin registers a `createTemporalProxy` method on `UnsProxyProcess`, tracks workflow metadata, and republishes workflow results via UNS topics.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add @uns-kit/temporal
9
+ # or
10
+ npm install @uns-kit/temporal
11
+ ```
12
+
13
+ Install `@uns-kit/core` as well—the plugin augments its runtime.
14
+
15
+ ## Example
16
+
17
+ ```ts
18
+ import UnsProxyProcess from "@uns-kit/core/uns/uns-proxy-process";
19
+ import { UnsAttributeType } from "@uns-kit/core/uns/uns-interfaces";
20
+ import type { UnsProxyProcessWithTemporal } from "@uns-kit/temporal";
21
+ import "@uns-kit/temporal";
22
+
23
+ async function main() {
24
+ const process = new UnsProxyProcess("mqtt-broker:1883", { processName: "temporal-demo" }) as UnsProxyProcessWithTemporal;
25
+
26
+ const temporal = await process.createTemporalProxy("line-etl", "temporal:7233", "line-namespace");
27
+ await temporal.initializeTemporalProxy({
28
+ topic: "factory/",
29
+ attribute: "line-status",
30
+ attributeType: UnsAttributeType.Data,
31
+ });
32
+
33
+ await temporal.startWorkflow("TransformLineData", { coil_id: "42" }, "ETL_LINE_TASK_QUEUE");
34
+ }
35
+
36
+ void main();
37
+ ```
38
+
39
+ ## Scripts
40
+
41
+ ```bash
42
+ pnpm run typecheck
43
+ pnpm run build
44
+ ```
45
+
46
+ ## License
47
+
48
+ MIT © Aljoša Vister
@@ -86,7 +86,7 @@ export default class UnsTemporalProxy extends UnsProxy {
86
86
  }
87
87
  };
88
88
  const workflowOptions = {
89
- args: [workflowInput],
89
+ args: [workflowInput], // single JSON object
90
90
  taskQueue,
91
91
  workflowId: workflowId ?? `${this.instanceNameWithSuffix}-${Math.floor(Date.now() / 1000)}`
92
92
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uns-kit/temporal",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
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.36"
35
+ "@uns-kit/core": "0.0.37"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "tsc -p tsconfig.build.json",