@codemation/node-example 0.0.37 → 0.0.38

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 CHANGED
@@ -1,5 +1,34 @@
1
1
  # @codemation/node-example
2
2
 
3
+ ## 0.0.38
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [8285ec0]
8
+ - Updated dependencies [8285ec0]
9
+ - Updated dependencies [8285ec0]
10
+ - Updated dependencies [8285ec0]
11
+ - Updated dependencies [8285ec0]
12
+ - Updated dependencies [8285ec0]
13
+ - Updated dependencies [e4d3e1a]
14
+ - Updated dependencies [7b50018]
15
+ - Updated dependencies [8285ec0]
16
+ - Updated dependencies [8285ec0]
17
+ - Updated dependencies [8285ec0]
18
+ - Updated dependencies [8285ec0]
19
+ - Updated dependencies [8285ec0]
20
+ - Updated dependencies [8285ec0]
21
+ - Updated dependencies [e4d3e1a]
22
+ - Updated dependencies [0082ab5]
23
+ - Updated dependencies [8285ec0]
24
+ - Updated dependencies [8285ec0]
25
+ - Updated dependencies [8285ec0]
26
+ - Updated dependencies [8285ec0]
27
+ - Updated dependencies [8285ec0]
28
+ - Updated dependencies [8285ec0]
29
+ - Updated dependencies [8285ec0]
30
+ - @codemation/core@0.11.0
31
+
3
32
  ## 0.0.37
4
33
 
5
34
  ### Patch Changes
package/LICENSE CHANGED
@@ -1,37 +1 @@
1
- Codemation Pre-Stable License
2
-
3
- Copyright (c) Made Relevant B.V. All rights reserved.
4
-
5
- 1. Definitions
6
-
7
- "Software" means the Codemation source code, documentation, and artifacts in this repository and any published npm packages in the Codemation monorepo.
8
-
9
- "Stable Version" means the first published release of the package `@codemation/core` on the public npm registry with version 1.0.0 or higher.
10
-
11
- 2. Permitted use (before Stable Version)
12
-
13
- Until a Stable Version exists, you may use, copy, modify, and distribute the Software only for non-commercial purposes, including personal learning, research, evaluation, and internal use within your organization that does not charge third parties for access to the Software or a product or service whose primary value is the Software.
14
-
15
- 3. Restrictions (before Stable Version)
16
-
17
- Until a Stable Version exists, you must not:
18
-
19
- a) Sell, rent, lease, or sublicense the Software or a derivative work for a fee;
20
-
21
- b) Offer the Software or a derivative work as part of a paid product or service (including hosting, support, or consulting) where the Software is a material part of the offering;
22
-
23
- c) Use the Software or a derivative work primarily to generate revenue or commercial advantage for you or others.
24
-
25
- These restrictions apply to all versions published before a Stable Version, even if a later Stable Version is released under different terms.
26
-
27
- 4. After Stable Version
28
-
29
- The maintainers may publish a Stable Version under different license terms. If they do, those terms apply only to that Stable Version and subsequent releases they designate; they do not automatically apply to earlier pre-stable versions.
30
-
31
- 5. No warranty
32
-
33
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34
-
35
- 6. Third-party components
36
-
37
- The Software may include third-party components under their own licenses. Those licenses govern those components.
1
+ ../../LICENSE
package/dist/index.cjs CHANGED
@@ -62,6 +62,12 @@ var ExampleUppercase = class {
62
62
  this.cfg = cfg;
63
63
  this.id = id;
64
64
  }
65
+ inspectorSummary() {
66
+ return [{
67
+ label: "Field",
68
+ value: this.cfg.field
69
+ }];
70
+ }
65
71
  };
66
72
 
67
73
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["ExampleUppercaseNode","name: string","cfg: { field: TField }","id?: string"],"sources":["../src/ExampleUppercaseNode.ts","../src/uppercase.ts"],"sourcesContent":["import type { Item, RunnableNode, RunnableNodeExecuteArgs } from \"@codemation/core\";\n\nimport { node } from \"@codemation/core\";\n\nimport { ExampleUppercase } from \"./uppercase\";\n\n@node({ packageName: \"@codemation/node-example\" })\nexport class ExampleUppercaseNode implements RunnableNode<ExampleUppercase<Record<string, unknown>, string>> {\n kind = \"node\" as const;\n outputPorts = [\"main\"] as const;\n\n execute(args: RunnableNodeExecuteArgs<ExampleUppercase<Record<string, unknown>, string>>): unknown {\n const item = args.item as Item;\n const json = typeof item.json === \"object\" && item.json !== null ? (item.json as Record<string, unknown>) : {};\n const value = String(json[args.ctx.config.cfg.field] ?? \"\");\n return { ...item, json: { ...json, [args.ctx.config.cfg.field]: value.toUpperCase() } };\n }\n}\n","import type { RunnableNodeConfig, TypeToken } from \"@codemation/core\";\n\nimport { ExampleUppercaseNode } from \"./ExampleUppercaseNode\";\n\nexport class ExampleUppercase<\n TInputJson extends Record<string, unknown> = Record<string, unknown>,\n TField extends keyof TInputJson & string = keyof TInputJson & string,\n> implements RunnableNodeConfig<TInputJson, TInputJson> {\n readonly kind = \"node\" as const;\n readonly type: TypeToken<unknown> = ExampleUppercaseNode;\n constructor(\n public readonly name: string,\n public readonly cfg: { field: TField },\n public readonly id?: string,\n ) {}\n}\n\nexport { ExampleUppercaseNode } from \"./ExampleUppercaseNode\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,iCAAMA,uBAAgG;CAC3G,OAAO;CACP,cAAc,CAAC,OAAO;CAEtB,QAAQ,MAA2F;EACjG,MAAM,OAAO,KAAK;EAClB,MAAM,OAAO,OAAO,KAAK,SAAS,YAAY,KAAK,SAAS,OAAQ,KAAK,OAAmC,EAAE;EAC9G,MAAM,QAAQ,OAAO,KAAK,KAAK,IAAI,OAAO,IAAI,UAAU,GAAG;AAC3D,SAAO;GAAE,GAAG;GAAM,MAAM;IAAE,GAAG;KAAO,KAAK,IAAI,OAAO,IAAI,QAAQ,MAAM,aAAa;IAAE;GAAE;;;+DATrF,EAAE,aAAa,4BAA4B,CAAC;;;;ACFlD,IAAa,mBAAb,MAGwD;CACtD,AAAS,OAAO;CAChB,AAAS,OAA2B;CACpC,YACE,AAAgBC,MAChB,AAAgBC,KAChB,AAAgBC,IAChB;EAHgB;EACA;EACA"}
1
+ {"version":3,"file":"index.cjs","names":["ExampleUppercaseNode","name: string","cfg: { field: TField }","id?: string"],"sources":["../src/ExampleUppercaseNode.ts","../src/uppercase.ts"],"sourcesContent":["import type { Item, RunnableNode, RunnableNodeExecuteArgs } from \"@codemation/core\";\n\nimport { node } from \"@codemation/core\";\n\nimport { ExampleUppercase } from \"./uppercase\";\n\n@node({ packageName: \"@codemation/node-example\" })\nexport class ExampleUppercaseNode implements RunnableNode<ExampleUppercase<Record<string, unknown>, string>> {\n kind = \"node\" as const;\n outputPorts = [\"main\"] as const;\n\n execute(args: RunnableNodeExecuteArgs<ExampleUppercase<Record<string, unknown>, string>>): unknown {\n const item = args.item as Item;\n const json = typeof item.json === \"object\" && item.json !== null ? (item.json as Record<string, unknown>) : {};\n const value = String(json[args.ctx.config.cfg.field] ?? \"\");\n return { ...item, json: { ...json, [args.ctx.config.cfg.field]: value.toUpperCase() } };\n }\n}\n","import type { NodeInspectorSummaryRow, RunnableNodeConfig, TypeToken } from \"@codemation/core\";\n\nimport { ExampleUppercaseNode } from \"./ExampleUppercaseNode\";\n\nexport class ExampleUppercase<\n TInputJson extends Record<string, unknown> = Record<string, unknown>,\n TField extends keyof TInputJson & string = keyof TInputJson & string,\n> implements RunnableNodeConfig<TInputJson, TInputJson> {\n readonly kind = \"node\" as const;\n readonly type: TypeToken<unknown> = ExampleUppercaseNode;\n constructor(\n public readonly name: string,\n public readonly cfg: { field: TField },\n public readonly id?: string,\n ) {}\n\n inspectorSummary(): ReadonlyArray<NodeInspectorSummaryRow> {\n return [{ label: \"Field\", value: this.cfg.field }];\n }\n}\n\nexport { ExampleUppercaseNode } from \"./ExampleUppercaseNode\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,iCAAMA,uBAAgG;CAC3G,OAAO;CACP,cAAc,CAAC,OAAO;CAEtB,QAAQ,MAA2F;EACjG,MAAM,OAAO,KAAK;EAClB,MAAM,OAAO,OAAO,KAAK,SAAS,YAAY,KAAK,SAAS,OAAQ,KAAK,OAAmC,EAAE;EAC9G,MAAM,QAAQ,OAAO,KAAK,KAAK,IAAI,OAAO,IAAI,UAAU,GAAG;AAC3D,SAAO;GAAE,GAAG;GAAM,MAAM;IAAE,GAAG;KAAO,KAAK,IAAI,OAAO,IAAI,QAAQ,MAAM,aAAa;IAAE;GAAE;;;+DATrF,EAAE,aAAa,4BAA4B,CAAC;;;;ACFlD,IAAa,mBAAb,MAGwD;CACtD,AAAS,OAAO;CAChB,AAAS,OAA2B;CACpC,YACE,AAAgBC,MAChB,AAAgBC,KAChB,AAAgBC,IAChB;EAHgB;EACA;EACA;;CAGlB,mBAA2D;AACzD,SAAO,CAAC;GAAE,OAAO;GAAS,OAAO,KAAK,IAAI;GAAO,CAAC"}
package/dist/index.d.cts CHANGED
@@ -60,6 +60,8 @@ type ConnectionInvocationAppendArgs = Readonly<{
60
60
  status: NodeExecutionStatus;
61
61
  managedInput?: JsonValue;
62
62
  managedOutput?: JsonValue;
63
+ statusLabel?: string;
64
+ subjectName?: string;
63
65
  error?: NodeExecutionError;
64
66
  queuedAt?: string;
65
67
  startedAt?: string;
@@ -143,6 +145,26 @@ interface NodeConfigBase {
143
145
  * configs (e.g. `AssertionNodeConfig`, `StringEqualsAssertionNodeConfig`).
144
146
  */
145
147
  readonly emitsAssertions?: true;
148
+ /**
149
+ * Static configuration summary surfaced in the workflow inspector — the design-time
150
+ * "what does this node do" panel that renders before any run telemetry exists.
151
+ *
152
+ * Return 2–6 short label/value pairs derived from this config (method + url for an HTTP
153
+ * call, model + tool list for an agent, schedule + timezone for a cron trigger, etc.).
154
+ * Values are truncated by the UI; aim for one line each. Return `undefined` to opt out
155
+ * — the inspector hides the section when no rows are produced.
156
+ *
157
+ * Implement on the config class instance so the function can read sibling config fields.
158
+ * `defineNode({ inspectorSummary })` plumbs through to this.
159
+ */
160
+ inspectorSummary?(): ReadonlyArray<NodeInspectorSummaryRow> | undefined;
161
+ }
162
+ /**
163
+ * One row of a node's static configuration summary. See {@link NodeConfigBase.inspectorSummary}.
164
+ */
165
+ interface NodeInspectorSummaryRow {
166
+ readonly label: string;
167
+ readonly value: string;
146
168
  }
147
169
  declare const runnableNodeInputType: unique symbol;
148
170
  declare const runnableNodeOutputType: unique symbol;
@@ -238,6 +260,29 @@ interface NodeErrorHandler {
238
260
  }
239
261
  type NodeErrorHandlerSpec = TypeToken<NodeErrorHandler> | NodeErrorHandler;
240
262
  //#endregion
263
+ //#region ../core/src/contracts/CostTrackingTelemetryContract.d.ts
264
+ type CostTrackingComponent = "chat" | "ocr" | "rag";
265
+ interface CostTrackingUsageRecord {
266
+ readonly component: CostTrackingComponent;
267
+ readonly provider: string;
268
+ readonly operation: string;
269
+ readonly pricingKey: string;
270
+ readonly usageUnit: string;
271
+ readonly quantity: number;
272
+ readonly modelName?: string;
273
+ readonly attributes?: TelemetryAttributes;
274
+ }
275
+ interface CostTrackingPriceQuote {
276
+ readonly currency: string;
277
+ readonly currencyScale: number;
278
+ readonly estimatedAmountMinor: number;
279
+ readonly estimateKind: "catalog";
280
+ }
281
+ interface CostTrackingTelemetry {
282
+ captureUsage(args: CostTrackingUsageRecord): Promise<CostTrackingPriceQuote | undefined>;
283
+ forScope(scope: TelemetryScope): CostTrackingTelemetry;
284
+ }
285
+ //#endregion
241
286
  //#region ../core/src/contracts/telemetryTypes.d.ts
242
287
  type TelemetryAttributePrimitive = string | number | boolean | null;
243
288
  interface TelemetryAttributes {
@@ -318,29 +363,6 @@ interface ExecutionTelemetry extends TelemetryScope {
318
363
  }>): NodeExecutionTelemetry;
319
364
  }
320
365
  //#endregion
321
- //#region ../core/src/contracts/CostTrackingTelemetryContract.d.ts
322
- type CostTrackingComponent = "chat" | "ocr" | "rag";
323
- interface CostTrackingUsageRecord {
324
- readonly component: CostTrackingComponent;
325
- readonly provider: string;
326
- readonly operation: string;
327
- readonly pricingKey: string;
328
- readonly usageUnit: string;
329
- readonly quantity: number;
330
- readonly modelName?: string;
331
- readonly attributes?: TelemetryAttributes;
332
- }
333
- interface CostTrackingPriceQuote {
334
- readonly currency: string;
335
- readonly currencyScale: number;
336
- readonly estimatedAmountMinor: number;
337
- readonly estimateKind: "catalog";
338
- }
339
- interface CostTrackingTelemetry {
340
- captureUsage(args: CostTrackingUsageRecord): Promise<CostTrackingPriceQuote | undefined>;
341
- forScope(scope: TelemetryScope): CostTrackingTelemetry;
342
- }
343
- //#endregion
344
366
  //#region ../core/src/contracts/collectionTypes.d.ts
345
367
  /**
346
368
  * Represents a typed store for a single collection.
@@ -549,6 +571,7 @@ declare class ExampleUppercase<TInputJson$1 extends Record<string, unknown> = Re
549
571
  constructor(name: string, cfg: {
550
572
  field: TField;
551
573
  }, id?: string | undefined);
574
+ inspectorSummary(): ReadonlyArray<NodeInspectorSummaryRow>;
552
575
  }
553
576
  //#endregion
554
577
  export { ExampleUppercase, ExampleUppercaseNode };
package/dist/index.d.ts CHANGED
@@ -60,6 +60,8 @@ type ConnectionInvocationAppendArgs = Readonly<{
60
60
  status: NodeExecutionStatus;
61
61
  managedInput?: JsonValue;
62
62
  managedOutput?: JsonValue;
63
+ statusLabel?: string;
64
+ subjectName?: string;
63
65
  error?: NodeExecutionError;
64
66
  queuedAt?: string;
65
67
  startedAt?: string;
@@ -143,6 +145,26 @@ interface NodeConfigBase {
143
145
  * configs (e.g. `AssertionNodeConfig`, `StringEqualsAssertionNodeConfig`).
144
146
  */
145
147
  readonly emitsAssertions?: true;
148
+ /**
149
+ * Static configuration summary surfaced in the workflow inspector — the design-time
150
+ * "what does this node do" panel that renders before any run telemetry exists.
151
+ *
152
+ * Return 2–6 short label/value pairs derived from this config (method + url for an HTTP
153
+ * call, model + tool list for an agent, schedule + timezone for a cron trigger, etc.).
154
+ * Values are truncated by the UI; aim for one line each. Return `undefined` to opt out
155
+ * — the inspector hides the section when no rows are produced.
156
+ *
157
+ * Implement on the config class instance so the function can read sibling config fields.
158
+ * `defineNode({ inspectorSummary })` plumbs through to this.
159
+ */
160
+ inspectorSummary?(): ReadonlyArray<NodeInspectorSummaryRow> | undefined;
161
+ }
162
+ /**
163
+ * One row of a node's static configuration summary. See {@link NodeConfigBase.inspectorSummary}.
164
+ */
165
+ interface NodeInspectorSummaryRow {
166
+ readonly label: string;
167
+ readonly value: string;
146
168
  }
147
169
  declare const runnableNodeInputType: unique symbol;
148
170
  declare const runnableNodeOutputType: unique symbol;
@@ -238,6 +260,29 @@ interface NodeErrorHandler {
238
260
  }
239
261
  type NodeErrorHandlerSpec = TypeToken<NodeErrorHandler> | NodeErrorHandler;
240
262
  //#endregion
263
+ //#region ../core/src/contracts/CostTrackingTelemetryContract.d.ts
264
+ type CostTrackingComponent = "chat" | "ocr" | "rag";
265
+ interface CostTrackingUsageRecord {
266
+ readonly component: CostTrackingComponent;
267
+ readonly provider: string;
268
+ readonly operation: string;
269
+ readonly pricingKey: string;
270
+ readonly usageUnit: string;
271
+ readonly quantity: number;
272
+ readonly modelName?: string;
273
+ readonly attributes?: TelemetryAttributes;
274
+ }
275
+ interface CostTrackingPriceQuote {
276
+ readonly currency: string;
277
+ readonly currencyScale: number;
278
+ readonly estimatedAmountMinor: number;
279
+ readonly estimateKind: "catalog";
280
+ }
281
+ interface CostTrackingTelemetry {
282
+ captureUsage(args: CostTrackingUsageRecord): Promise<CostTrackingPriceQuote | undefined>;
283
+ forScope(scope: TelemetryScope): CostTrackingTelemetry;
284
+ }
285
+ //#endregion
241
286
  //#region ../core/src/contracts/telemetryTypes.d.ts
242
287
  type TelemetryAttributePrimitive = string | number | boolean | null;
243
288
  interface TelemetryAttributes {
@@ -318,29 +363,6 @@ interface ExecutionTelemetry extends TelemetryScope {
318
363
  }>): NodeExecutionTelemetry;
319
364
  }
320
365
  //#endregion
321
- //#region ../core/src/contracts/CostTrackingTelemetryContract.d.ts
322
- type CostTrackingComponent = "chat" | "ocr" | "rag";
323
- interface CostTrackingUsageRecord {
324
- readonly component: CostTrackingComponent;
325
- readonly provider: string;
326
- readonly operation: string;
327
- readonly pricingKey: string;
328
- readonly usageUnit: string;
329
- readonly quantity: number;
330
- readonly modelName?: string;
331
- readonly attributes?: TelemetryAttributes;
332
- }
333
- interface CostTrackingPriceQuote {
334
- readonly currency: string;
335
- readonly currencyScale: number;
336
- readonly estimatedAmountMinor: number;
337
- readonly estimateKind: "catalog";
338
- }
339
- interface CostTrackingTelemetry {
340
- captureUsage(args: CostTrackingUsageRecord): Promise<CostTrackingPriceQuote | undefined>;
341
- forScope(scope: TelemetryScope): CostTrackingTelemetry;
342
- }
343
- //#endregion
344
366
  //#region ../core/src/contracts/collectionTypes.d.ts
345
367
  /**
346
368
  * Represents a typed store for a single collection.
@@ -549,6 +571,7 @@ declare class ExampleUppercase<TInputJson$1 extends Record<string, unknown> = Re
549
571
  constructor(name: string, cfg: {
550
572
  field: TField;
551
573
  }, id?: string | undefined);
574
+ inspectorSummary(): ReadonlyArray<NodeInspectorSummaryRow>;
552
575
  }
553
576
  //#endregion
554
577
  export { ExampleUppercase, ExampleUppercaseNode };
package/dist/index.js CHANGED
@@ -38,6 +38,12 @@ var ExampleUppercase = class {
38
38
  this.cfg = cfg;
39
39
  this.id = id;
40
40
  }
41
+ inspectorSummary() {
42
+ return [{
43
+ label: "Field",
44
+ value: this.cfg.field
45
+ }];
46
+ }
41
47
  };
42
48
 
43
49
  //#endregion
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ExampleUppercaseNode","name: string","cfg: { field: TField }","id?: string"],"sources":["../src/ExampleUppercaseNode.ts","../src/uppercase.ts"],"sourcesContent":["import type { Item, RunnableNode, RunnableNodeExecuteArgs } from \"@codemation/core\";\n\nimport { node } from \"@codemation/core\";\n\nimport { ExampleUppercase } from \"./uppercase\";\n\n@node({ packageName: \"@codemation/node-example\" })\nexport class ExampleUppercaseNode implements RunnableNode<ExampleUppercase<Record<string, unknown>, string>> {\n kind = \"node\" as const;\n outputPorts = [\"main\"] as const;\n\n execute(args: RunnableNodeExecuteArgs<ExampleUppercase<Record<string, unknown>, string>>): unknown {\n const item = args.item as Item;\n const json = typeof item.json === \"object\" && item.json !== null ? (item.json as Record<string, unknown>) : {};\n const value = String(json[args.ctx.config.cfg.field] ?? \"\");\n return { ...item, json: { ...json, [args.ctx.config.cfg.field]: value.toUpperCase() } };\n }\n}\n","import type { RunnableNodeConfig, TypeToken } from \"@codemation/core\";\n\nimport { ExampleUppercaseNode } from \"./ExampleUppercaseNode\";\n\nexport class ExampleUppercase<\n TInputJson extends Record<string, unknown> = Record<string, unknown>,\n TField extends keyof TInputJson & string = keyof TInputJson & string,\n> implements RunnableNodeConfig<TInputJson, TInputJson> {\n readonly kind = \"node\" as const;\n readonly type: TypeToken<unknown> = ExampleUppercaseNode;\n constructor(\n public readonly name: string,\n public readonly cfg: { field: TField },\n public readonly id?: string,\n ) {}\n}\n\nexport { ExampleUppercaseNode } from \"./ExampleUppercaseNode\";\n"],"mappings":";;;;;;;;;;;;AAOO,iCAAMA,uBAAgG;CAC3G,OAAO;CACP,cAAc,CAAC,OAAO;CAEtB,QAAQ,MAA2F;EACjG,MAAM,OAAO,KAAK;EAClB,MAAM,OAAO,OAAO,KAAK,SAAS,YAAY,KAAK,SAAS,OAAQ,KAAK,OAAmC,EAAE;EAC9G,MAAM,QAAQ,OAAO,KAAK,KAAK,IAAI,OAAO,IAAI,UAAU,GAAG;AAC3D,SAAO;GAAE,GAAG;GAAM,MAAM;IAAE,GAAG;KAAO,KAAK,IAAI,OAAO,IAAI,QAAQ,MAAM,aAAa;IAAE;GAAE;;;mCAT1F,KAAK,EAAE,aAAa,4BAA4B,CAAC;;;;ACFlD,IAAa,mBAAb,MAGwD;CACtD,AAAS,OAAO;CAChB,AAAS,OAA2B;CACpC,YACE,AAAgBC,MAChB,AAAgBC,KAChB,AAAgBC,IAChB;EAHgB;EACA;EACA"}
1
+ {"version":3,"file":"index.js","names":["ExampleUppercaseNode","name: string","cfg: { field: TField }","id?: string"],"sources":["../src/ExampleUppercaseNode.ts","../src/uppercase.ts"],"sourcesContent":["import type { Item, RunnableNode, RunnableNodeExecuteArgs } from \"@codemation/core\";\n\nimport { node } from \"@codemation/core\";\n\nimport { ExampleUppercase } from \"./uppercase\";\n\n@node({ packageName: \"@codemation/node-example\" })\nexport class ExampleUppercaseNode implements RunnableNode<ExampleUppercase<Record<string, unknown>, string>> {\n kind = \"node\" as const;\n outputPorts = [\"main\"] as const;\n\n execute(args: RunnableNodeExecuteArgs<ExampleUppercase<Record<string, unknown>, string>>): unknown {\n const item = args.item as Item;\n const json = typeof item.json === \"object\" && item.json !== null ? (item.json as Record<string, unknown>) : {};\n const value = String(json[args.ctx.config.cfg.field] ?? \"\");\n return { ...item, json: { ...json, [args.ctx.config.cfg.field]: value.toUpperCase() } };\n }\n}\n","import type { NodeInspectorSummaryRow, RunnableNodeConfig, TypeToken } from \"@codemation/core\";\n\nimport { ExampleUppercaseNode } from \"./ExampleUppercaseNode\";\n\nexport class ExampleUppercase<\n TInputJson extends Record<string, unknown> = Record<string, unknown>,\n TField extends keyof TInputJson & string = keyof TInputJson & string,\n> implements RunnableNodeConfig<TInputJson, TInputJson> {\n readonly kind = \"node\" as const;\n readonly type: TypeToken<unknown> = ExampleUppercaseNode;\n constructor(\n public readonly name: string,\n public readonly cfg: { field: TField },\n public readonly id?: string,\n ) {}\n\n inspectorSummary(): ReadonlyArray<NodeInspectorSummaryRow> {\n return [{ label: \"Field\", value: this.cfg.field }];\n }\n}\n\nexport { ExampleUppercaseNode } from \"./ExampleUppercaseNode\";\n"],"mappings":";;;;;;;;;;;;AAOO,iCAAMA,uBAAgG;CAC3G,OAAO;CACP,cAAc,CAAC,OAAO;CAEtB,QAAQ,MAA2F;EACjG,MAAM,OAAO,KAAK;EAClB,MAAM,OAAO,OAAO,KAAK,SAAS,YAAY,KAAK,SAAS,OAAQ,KAAK,OAAmC,EAAE;EAC9G,MAAM,QAAQ,OAAO,KAAK,KAAK,IAAI,OAAO,IAAI,UAAU,GAAG;AAC3D,SAAO;GAAE,GAAG;GAAM,MAAM;IAAE,GAAG;KAAO,KAAK,IAAI,OAAO,IAAI,QAAQ,MAAM,aAAa;IAAE;GAAE;;;mCAT1F,KAAK,EAAE,aAAa,4BAA4B,CAAC;;;;ACFlD,IAAa,mBAAb,MAGwD;CACtD,AAAS,OAAO;CAChB,AAAS,OAA2B;CACpC,YACE,AAAgBC,MAChB,AAAgBC,KAChB,AAAgBC,IAChB;EAHgB;EACA;EACA;;CAGlB,mBAA2D;AACzD,SAAO,CAAC;GAAE,OAAO;GAAS,OAAO,KAAK,IAAI;GAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemation/node-example",
3
- "version": "0.0.37",
3
+ "version": "0.0.38",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -28,7 +28,7 @@
28
28
  }
29
29
  },
30
30
  "dependencies": {
31
- "@codemation/core": "0.10.2"
31
+ "@codemation/core": "0.11.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^25.3.5",
package/src/uppercase.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { RunnableNodeConfig, TypeToken } from "@codemation/core";
1
+ import type { NodeInspectorSummaryRow, RunnableNodeConfig, TypeToken } from "@codemation/core";
2
2
 
3
3
  import { ExampleUppercaseNode } from "./ExampleUppercaseNode";
4
4
 
@@ -13,6 +13,10 @@ export class ExampleUppercase<
13
13
  public readonly cfg: { field: TField },
14
14
  public readonly id?: string,
15
15
  ) {}
16
+
17
+ inspectorSummary(): ReadonlyArray<NodeInspectorSummaryRow> {
18
+ return [{ label: "Field", value: this.cfg.field }];
19
+ }
16
20
  }
17
21
 
18
22
  export { ExampleUppercaseNode } from "./ExampleUppercaseNode";