@valerypopoff/rivet2-core 2.27.0 → 2.27.1

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.
@@ -21,7 +21,7 @@ export function applyGraphBoundaryPortOrder(boundaryItems, portOrder) {
21
21
  if (!portOrder?.length) {
22
22
  return [...boundaryItems];
23
23
  }
24
- const itemsById = new Map(boundaryItems.map((item) => [item.id, item]));
24
+ const itemsById = new Map(boundaryItems.map((item) => [item.portId ?? item.id, item]));
25
25
  const usedIds = new Set();
26
26
  const orderedItems = [];
27
27
  for (const id of portOrder) {
@@ -36,7 +36,7 @@ export function applyGraphBoundaryPortOrder(boundaryItems, portOrder) {
36
36
  usedIds.add(id);
37
37
  }
38
38
  for (const item of boundaryItems) {
39
- if (!usedIds.has(item.id)) {
39
+ if (!usedIds.has(item.portId ?? item.id)) {
40
40
  orderedItems.push(item);
41
41
  }
42
42
  }
@@ -26,6 +26,7 @@ export type GraphBoundaryCache = WeakMap<NodeGraph, GraphBoundary>;
26
26
  export declare function getGraphBoundary(project: Project, graphId: GraphId | undefined, cache?: GraphBoundaryCache): GraphBoundary | undefined;
27
27
  export declare function applyGraphBoundaryPortOrder<T extends {
28
28
  id: string;
29
+ portId?: string;
29
30
  }>(boundaryItems: readonly T[], portOrder: readonly string[] | undefined): T[];
30
31
  export declare function getGraphBoundaryInputDefinitions(boundary: GraphBoundary, inputPortOrder?: readonly string[]): NodeInputDefinition[];
31
32
  export declare function getGraphBoundaryOutputDefinitions(boundary: GraphBoundary, outputPortOrder?: readonly string[]): NodeOutputDefinition[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valerypopoff/rivet2-core",
3
- "version": "2.27.0",
3
+ "version": "2.27.1",
4
4
  "license": "MIT",
5
5
  "main": "dist/cjs/bundle.cjs",
6
6
  "module": "dist/esm/index.js",