@codemation/node-example 0.0.27 → 0.0.29
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 +14 -0
- package/dist/index.d.cts +9 -10
- package/dist/index.d.ts +9 -10
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @codemation/node-example
|
|
2
2
|
|
|
3
|
+
## 0.0.29
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`88844f7`](https://github.com/MadeRelevant/codemation/commit/88844f75a48fe051e4cb895c710408855de14da4)]:
|
|
8
|
+
- @codemation/core@0.7.0
|
|
9
|
+
|
|
10
|
+
## 0.0.28
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`3044e73`](https://github.com/MadeRelevant/codemation/commit/3044e73fd3cfb33f8e2cbc579c10baf97ed94658), [`418434a`](https://github.com/MadeRelevant/codemation/commit/418434a6a2ad88a6254a94cb70e6f14b886df348), [`3774fd8`](https://github.com/MadeRelevant/codemation/commit/3774fd80bc357c7eb39957f6963c692f322c38eb), [`00bc135`](https://github.com/MadeRelevant/codemation/commit/00bc1351e2dd6222d5101dbff3602a76ead33ce1)]:
|
|
15
|
+
- @codemation/core@0.6.0
|
|
16
|
+
|
|
3
17
|
## 0.0.27
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.d.cts
CHANGED
|
@@ -129,8 +129,10 @@ interface NodeExecutionContext<TConfig extends NodeConfigBase = NodeConfigBase>
|
|
|
129
129
|
binary: NodeBinaryAttachmentService;
|
|
130
130
|
}
|
|
131
131
|
/**
|
|
132
|
-
* Per-item runnable node: return JSON, an array to fan-out on `main`, or {@link emitPorts}
|
|
133
|
-
* Engine applies `inputSchema.parse(item.json)` and passes the result as `args.input`
|
|
132
|
+
* Per-item runnable node: return JSON, an array to fan-out on `main`, an explicit `Item`, or {@link emitPorts}
|
|
133
|
+
* for multi-port emission. Engine applies `inputSchema.parse(item.json)` and passes the result as `args.input`
|
|
134
|
+
* (wire `item.json` is unchanged). Transform helpers may opt into binary preservation, while routers and
|
|
135
|
+
* pass-through nodes should return explicit items when they need to preserve full item state.
|
|
134
136
|
*/
|
|
135
137
|
interface RunnableNodeExecuteArgs<TConfig extends RunnableNodeConfig<any, any> = RunnableNodeConfig<any, any>, TInputJson$1 = unknown> {
|
|
136
138
|
readonly input: TInputJson$1;
|
|
@@ -156,6 +158,9 @@ interface RunnableNode<TConfig extends RunnableNodeConfig<any, any> = RunnableNo
|
|
|
156
158
|
//#region ../core/src/contracts/workflowTypes.d.ts
|
|
157
159
|
type WorkflowId = string;
|
|
158
160
|
type NodeId = string;
|
|
161
|
+
type NodeIdRef<TJson = unknown> = NodeId & Readonly<{
|
|
162
|
+
__codemationNodeJson?: TJson;
|
|
163
|
+
}>;
|
|
159
164
|
type OutputPortKey = string;
|
|
160
165
|
type InputPortKey = string;
|
|
161
166
|
type NodeKind = "trigger" | "node";
|
|
@@ -195,7 +200,6 @@ interface NodeConfigBase {
|
|
|
195
200
|
}
|
|
196
201
|
declare const runnableNodeInputType: unique symbol;
|
|
197
202
|
declare const runnableNodeOutputType: unique symbol;
|
|
198
|
-
type LineageCarryPolicy = "emitOnly" | "carryThrough";
|
|
199
203
|
/**
|
|
200
204
|
* Runnable node: **`TInputJson`** is what **`inputSchema`** validates on **`item.json`** (the wire payload).
|
|
201
205
|
* **`TOutputJson`** is emitted `item.json` on outputs.
|
|
@@ -209,11 +213,6 @@ interface RunnableNodeConfig<TInputJson$1 = unknown, TOutputJson$1 = unknown> ex
|
|
|
209
213
|
* Resolution order: node instance `inputSchema`, then config `inputSchema`, then `z.unknown()`.
|
|
210
214
|
*/
|
|
211
215
|
readonly inputSchema?: ZodType<TInputJson$1>;
|
|
212
|
-
/**
|
|
213
|
-
* Overrides default lineage propagation for `execute` outputs (binary/meta/paired).
|
|
214
|
-
* Routers with multiple {@link RunnableNode#outputPorts} default to **`carryThrough`**; others default to **`emitOnly`**.
|
|
215
|
-
*/
|
|
216
|
-
readonly lineageCarry?: LineageCarryPolicy;
|
|
217
216
|
/**
|
|
218
217
|
* When an activation receives **zero** input items, the engine normally runs `execute` zero times.
|
|
219
218
|
* Set to **`runOnce`** to run `execute` once with an empty `items` batch (and a synthetic wire item for schema parsing).
|
|
@@ -266,8 +265,8 @@ interface ParentExecutionRef {
|
|
|
266
265
|
}
|
|
267
266
|
interface RunDataSnapshot {
|
|
268
267
|
getOutputs(nodeId: NodeId): NodeOutputs | undefined;
|
|
269
|
-
getOutputItems(nodeId: NodeId
|
|
270
|
-
getOutputItem(nodeId: NodeId
|
|
268
|
+
getOutputItems<TJson = unknown>(nodeId: NodeId | NodeIdRef<TJson>, output?: OutputPortKey): Items<TJson>;
|
|
269
|
+
getOutputItem<TJson = unknown>(nodeId: NodeId | NodeIdRef<TJson>, itemIndex: number, output?: OutputPortKey): Item<TJson> | undefined;
|
|
271
270
|
}
|
|
272
271
|
interface NodeErrorHandlerArgs<TConfig extends NodeConfigBase = NodeConfigBase> {
|
|
273
272
|
readonly kind: "single" | "multi";
|
package/dist/index.d.ts
CHANGED
|
@@ -129,8 +129,10 @@ interface NodeExecutionContext<TConfig extends NodeConfigBase = NodeConfigBase>
|
|
|
129
129
|
binary: NodeBinaryAttachmentService;
|
|
130
130
|
}
|
|
131
131
|
/**
|
|
132
|
-
* Per-item runnable node: return JSON, an array to fan-out on `main`, or {@link emitPorts}
|
|
133
|
-
* Engine applies `inputSchema.parse(item.json)` and passes the result as `args.input`
|
|
132
|
+
* Per-item runnable node: return JSON, an array to fan-out on `main`, an explicit `Item`, or {@link emitPorts}
|
|
133
|
+
* for multi-port emission. Engine applies `inputSchema.parse(item.json)` and passes the result as `args.input`
|
|
134
|
+
* (wire `item.json` is unchanged). Transform helpers may opt into binary preservation, while routers and
|
|
135
|
+
* pass-through nodes should return explicit items when they need to preserve full item state.
|
|
134
136
|
*/
|
|
135
137
|
interface RunnableNodeExecuteArgs<TConfig extends RunnableNodeConfig<any, any> = RunnableNodeConfig<any, any>, TInputJson$1 = unknown> {
|
|
136
138
|
readonly input: TInputJson$1;
|
|
@@ -156,6 +158,9 @@ interface RunnableNode<TConfig extends RunnableNodeConfig<any, any> = RunnableNo
|
|
|
156
158
|
//#region ../core/src/contracts/workflowTypes.d.ts
|
|
157
159
|
type WorkflowId = string;
|
|
158
160
|
type NodeId = string;
|
|
161
|
+
type NodeIdRef<TJson = unknown> = NodeId & Readonly<{
|
|
162
|
+
__codemationNodeJson?: TJson;
|
|
163
|
+
}>;
|
|
159
164
|
type OutputPortKey = string;
|
|
160
165
|
type InputPortKey = string;
|
|
161
166
|
type NodeKind = "trigger" | "node";
|
|
@@ -195,7 +200,6 @@ interface NodeConfigBase {
|
|
|
195
200
|
}
|
|
196
201
|
declare const runnableNodeInputType: unique symbol;
|
|
197
202
|
declare const runnableNodeOutputType: unique symbol;
|
|
198
|
-
type LineageCarryPolicy = "emitOnly" | "carryThrough";
|
|
199
203
|
/**
|
|
200
204
|
* Runnable node: **`TInputJson`** is what **`inputSchema`** validates on **`item.json`** (the wire payload).
|
|
201
205
|
* **`TOutputJson`** is emitted `item.json` on outputs.
|
|
@@ -209,11 +213,6 @@ interface RunnableNodeConfig<TInputJson$1 = unknown, TOutputJson$1 = unknown> ex
|
|
|
209
213
|
* Resolution order: node instance `inputSchema`, then config `inputSchema`, then `z.unknown()`.
|
|
210
214
|
*/
|
|
211
215
|
readonly inputSchema?: ZodType<TInputJson$1>;
|
|
212
|
-
/**
|
|
213
|
-
* Overrides default lineage propagation for `execute` outputs (binary/meta/paired).
|
|
214
|
-
* Routers with multiple {@link RunnableNode#outputPorts} default to **`carryThrough`**; others default to **`emitOnly`**.
|
|
215
|
-
*/
|
|
216
|
-
readonly lineageCarry?: LineageCarryPolicy;
|
|
217
216
|
/**
|
|
218
217
|
* When an activation receives **zero** input items, the engine normally runs `execute` zero times.
|
|
219
218
|
* Set to **`runOnce`** to run `execute` once with an empty `items` batch (and a synthetic wire item for schema parsing).
|
|
@@ -266,8 +265,8 @@ interface ParentExecutionRef {
|
|
|
266
265
|
}
|
|
267
266
|
interface RunDataSnapshot {
|
|
268
267
|
getOutputs(nodeId: NodeId): NodeOutputs | undefined;
|
|
269
|
-
getOutputItems(nodeId: NodeId
|
|
270
|
-
getOutputItem(nodeId: NodeId
|
|
268
|
+
getOutputItems<TJson = unknown>(nodeId: NodeId | NodeIdRef<TJson>, output?: OutputPortKey): Items<TJson>;
|
|
269
|
+
getOutputItem<TJson = unknown>(nodeId: NodeId | NodeIdRef<TJson>, itemIndex: number, output?: OutputPortKey): Item<TJson> | undefined;
|
|
271
270
|
}
|
|
272
271
|
interface NodeErrorHandlerArgs<TConfig extends NodeConfigBase = NodeConfigBase> {
|
|
273
272
|
readonly kind: "single" | "multi";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codemation/node-example",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@codemation/core": "0.
|
|
31
|
+
"@codemation/core": "0.7.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^25.3.5",
|