comfy-ts 2.9.0 → 2.10.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
@@ -110,7 +110,7 @@ function createNodeStorage() {
110
110
  }
111
111
  //#endregion
112
112
  //#region package.json
113
- var version = "2.9.0";
113
+ var version = "2.10.0";
114
114
  //#endregion
115
115
  //#region src/litegraph/LiteGraphLinkID.ts
116
116
  const asLiteGraphLinkID = (id) => id;
@@ -1587,8 +1587,15 @@ var ComfyNode = class ComfyNode {
1587
1587
  }
1588
1588
  _getExpectedTypeForField(name) {
1589
1589
  const input = this.$schema.inputs.find((i) => i.nameInComfy === name);
1590
- if (input == null) throw new Error("🔴 input not found asdf");
1591
- return input.typeName;
1590
+ if (input != null) return input.typeName;
1591
+ const dot = name.indexOf(".");
1592
+ const decl = dot > 0 ? this.$schema.inputs.find((i) => i.nameInComfy === name.slice(0, dot)) : void 0;
1593
+ if (decl != null) {
1594
+ const kind = classifySchemaInput(decl);
1595
+ const slotType = containerInstanceSlotType(decl.opts);
1596
+ if (kind.kind === "dynamic-container" && kind.instanceNames.includes(name.slice(dot + 1)) && slotType != null) return slotType;
1597
+ }
1598
+ throw new Error(`🔴 no input "${name}" on ${this.$schema.nodeKey}: cannot tell which output of the linked node to use`);
1592
1599
  }
1593
1600
  _getOutputForTypeOrCrash(type) {
1594
1601
  const i = this.$schema.outputs.find((i) => i.typeName === type);