@workglow/util 0.0.69 → 0.0.70

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/browser.js CHANGED
@@ -608,7 +608,7 @@ class DirectedAcyclicGraph extends DirectedGraph {
608
608
  // src/json-schema/FromSchema.ts
609
609
  var FromSchemaDefaultOptions = {
610
610
  parseNotKeyword: true,
611
- parseIfThenElseKeywords: false,
611
+ parseIfThenElseKeywords: true,
612
612
  keepDefaultedPropertiesOptional: true,
613
613
  references: false,
614
614
  deserialize: false
@@ -1433,14 +1433,23 @@ class WorkerServer {
1433
1433
  });
1434
1434
  }
1435
1435
  functions = {};
1436
+ requestControllers = new Map;
1437
+ completedRequests = new Set;
1436
1438
  postResult = (id, result) => {
1439
+ if (this.completedRequests.has(id)) {
1440
+ return;
1441
+ }
1442
+ this.completedRequests.add(id);
1437
1443
  const transferables = extractTransferables(result);
1438
1444
  postMessage({ id, type: "complete", data: result }, transferables);
1439
1445
  };
1440
1446
  postError = (id, errorMessage) => {
1447
+ if (this.completedRequests.has(id)) {
1448
+ return;
1449
+ }
1450
+ this.completedRequests.add(id);
1441
1451
  postMessage({ id, type: "error", data: errorMessage });
1442
1452
  };
1443
- requestControllers = new Map;
1444
1453
  registerFunction(name, fn) {
1445
1454
  this.functions[name] = fn;
1446
1455
  }
@@ -1455,7 +1464,10 @@ class WorkerServer {
1455
1464
  }
1456
1465
  async handleAbort(id) {
1457
1466
  if (this.requestControllers.has(id)) {
1458
- this.requestControllers.get(id)?.abort();
1467
+ const controller = this.requestControllers.get(id);
1468
+ controller?.abort();
1469
+ this.requestControllers.delete(id);
1470
+ this.postError(id, "Operation aborted");
1459
1471
  }
1460
1472
  }
1461
1473
  async handleCall(id, functionName, [input, model]) {
@@ -1468,7 +1480,9 @@ class WorkerServer {
1468
1480
  this.requestControllers.set(id, abortController);
1469
1481
  const fn = this.functions[functionName];
1470
1482
  const postProgress = (progress, message, details) => {
1471
- postMessage({ id, type: "progress", data: { progress, message, details } });
1483
+ if (!this.completedRequests.has(id)) {
1484
+ postMessage({ id, type: "progress", data: { progress, message, details } });
1485
+ }
1472
1486
  };
1473
1487
  const result = await fn(input, model, postProgress, abortController.signal);
1474
1488
  this.postResult(id, result);
@@ -1476,6 +1490,9 @@ class WorkerServer {
1476
1490
  this.postError(id, error.message);
1477
1491
  } finally {
1478
1492
  this.requestControllers.delete(id);
1493
+ setTimeout(() => {
1494
+ this.completedRequests.delete(id);
1495
+ }, 1000);
1479
1496
  }
1480
1497
  }
1481
1498
  }
@@ -1551,4 +1568,4 @@ export {
1551
1568
  BaseError
1552
1569
  };
1553
1570
 
1554
- //# debugId=A3226C09B36150EC64756E2164756E21
1571
+ //# debugId=C407F56AAA12137164756E2164756E21
@@ -10,18 +10,18 @@
10
10
  "// original source: https://github.com/SegFaultx64/typescript-graph\n// previous fork: https://github.com/sroussey/typescript-graph\n// license: MIT\n\nimport { EventEmitter } from \"../events/EventEmitter\";\nimport { NodeAlreadyExistsError, NodeDoesntExistError } from \"./errors\";\n\n/**\n * This is the default [[Graph.constructor | `nodeIdentity`]] function it is simply imported from [object-hash](https://www.npmjs.com/package/object-hash)\n */\n\n/**\n * # Graph\n *\n * A `Graph` is is a simple undirected graph. On it's own it isn't too useful but it forms the basic functionality for the [[`DirectedGraph`]] and [[`DirectedAcyclicGraph`]].\n *\n * ## Creating a Graph\n *\n * You can create a graph to contain any type of node, for example:\n *\n * ```typescript\n * type NodeType = { a: Number, b: string }\n * const graph = new Graph<NodeType>()\n *\n * // Add a node of the defined type\n * const node: string = graph.insert({ a: 10, b: 'string' })\n *\n * // Get the node back\n * const nodeValue: NodeType | undefined = graph.getNode(node);\n * ```\n *\n * ### Defining a custom node identity\n *\n * When you create a graph you likely want to create include a custom `nodeIdentity` function.\n * This function tells the graph how to uniquely identify nodes in a graph,\n * default is to simply use an [[hash]] which means that functionality like [[`replace`]] will not work.\n *\n * ```typescript\n * type NodeType = { count: number, name: string }\n * const graph = new Graph<NodeType>((n) => n.name)\n *\n * // Add a node\n * graph.insert({ count: 5, name: 'node1' })\n * // This will throw an error even though `count` is different because they share a name.\n * graph.insert({ count: 20, name: 'node1' })\n * ```\n *\n * ### Adding an edge\n *\n * Graphs without edges aren't very useful. Inserting edges is done using the node identity string returned by the node identity function.\n *\n * ```typescript\n * const node1: string = graph.insert({ count: 5, name: 'node1' })\n * const node2: string = graph.insert({ count: 20, name: 'node2' })\n *\n * graph.addEdge(node1, node2)\n *\n * // This will throw an error since there is no node with the later name.\n * graph.addEdge(node1, 'not a real node')\n * ```\n *\n * In an undirected graph the order in which you input the node names doesn't matter,\n * but in directed graphs the \"from node\" comes first and the \"to node\" will come second.\n *\n * ### Replacing a node\n *\n * If a node already exists you can update it using [[`replace`]]. `nodeIdentity(newNode)` must be equal to `nodeIdentity(oldNode)`.\n *\n * ```typescript\n * const node1: string = graph.insert({ count: 5, name: 'node1' })\n * const node2: string = graph.insert({ count: 20, name: 'node2' })\n *\n * // This will work because the name has not changed.\n * graph.replace({ count: 15, name: 'node1' })\n *\n * // This will not work because the name has changed.\n * graph.replace({ count: 20, name: 'node3' })\n * ```\n *\n * [[`replace`]] will throw a [[`NodeDoesntExistError`]] exception if you are trying to replace a node that is missing from the graph.\n *\n * ### Upsert\n *\n * Often you will want to create a node node if it doesn't exist and update it does. This can be achieved using [[`upsert`]].\n *\n * ```typescript\n * const node1: string = graph.insert({ count: 5, name: 'node1' })\n *\n * // Both of these will work, the first updating node1 and the second creating a node.\n * const node2: string = graph.upsert({ count: 15, name: 'node1' })\n * const node3: string = graph.upsert({ count: 25, name: 'node3' })\n * ```\n *\n * [[`upsert`]] always return the node identity string of the inserted or updated node. At presented there is no way to tell if the node was created or updated.\n *\n * @typeParam Node `Node` is the node type of the graph. Nodes can be anything in all the included examples they are simple objects.\n * @typeParam Edge `Edge` is the edge type of the graph. Edges can be of any type, but must be truethy and by default they are `true` which is a simple boolean.\n * @typeParam NodeId `NodeId` is the identity type of the node, by default it is a `unknown`, though most will use `string` or `number`.\n * @typeParam EdgeId `EdgeId` is the identity type of the edge, by default it is a `unknown`, though most will use `string` or `number`.\n */\n\nexport type AdjacencyValue<Edge> = null | Array<Edge>;\nexport type AdjacencyMatrix<Edge> = Array<Array<AdjacencyValue<Edge>>>;\n\n/**\n * Events that can be emitted by the TaskGraph\n */\nexport type GraphEvents<NodeId, EdgeId> = keyof GraphEventListeners<NodeId, EdgeId>;\n\nexport type GraphEventListeners<NodeId, EdgeId> = {\n \"node-added\": (node: NodeId) => void;\n \"node-removed\": (node: NodeId) => void;\n \"node-replaced\": (node: NodeId) => void;\n \"edge-added\": (edge: EdgeId) => void;\n \"edge-removed\": (edge: EdgeId) => void;\n \"edge-replaced\": (edge: EdgeId) => void;\n};\n\nexport type GraphEventListener<\n NodeId,\n EdgeId,\n Event extends GraphEvents<NodeId, EdgeId>,\n> = GraphEventListeners<NodeId, EdgeId>[Event];\n\nexport type GraphEventParameters<\n NodeId,\n EdgeId,\n Event extends GraphEvents<NodeId, EdgeId>,\n> = Parameters<GraphEventListeners<NodeId, EdgeId>[Event]>;\n\nexport class Graph<Node, Edge = true, NodeId = unknown, EdgeId = unknown> {\n protected nodes: Map<NodeId, Node>;\n protected adjacency: AdjacencyMatrix<Edge>;\n protected nodeIdentity: (t: Node) => NodeId;\n protected edgeIdentity: (t: Edge, n1: NodeId, n2: NodeId) => EdgeId;\n\n constructor(\n nodeIdentity: (node: Node) => NodeId,\n edgeIdentity: (edge: Edge, node1Identity: NodeId, node2Identit: NodeId) => EdgeId\n ) {\n this.nodes = new Map();\n this.adjacency = [];\n this.nodeIdentity = nodeIdentity;\n this.edgeIdentity = edgeIdentity;\n }\n\n events = new EventEmitter<GraphEventListeners<NodeId, EdgeId>>();\n on<Event extends GraphEvents<NodeId, EdgeId>>(\n name: Event,\n fn: GraphEventListener<NodeId, EdgeId, Event>\n ) {\n this.events.on.call(this.events, name, fn);\n }\n off<Event extends GraphEvents<NodeId, EdgeId>>(\n name: Event,\n fn: GraphEventListener<NodeId, EdgeId, Event>\n ) {\n this.events.off.call(this.events, name, fn);\n }\n emit<Event extends GraphEvents<NodeId, EdgeId>>(\n name: Event,\n ...args: Parameters<GraphEventListener<NodeId, EdgeId, Event>>\n ) {\n this.events.emit<Event>(name, ...args);\n }\n\n /**\n * Add a node to the graph if it doesn't already exist. If it does, throw a [[`NodeAlreadyExistsError`]].\n *\n * @param node The node to be added\n * @returns A `string` that is the identity of the newly inserted node. This is created by applying the [[constructor | `nodeIdentity`]].\n */\n insert(node: Node): NodeId {\n const id = this.nodeIdentity(node);\n const isOverwrite = this.nodes.has(id);\n\n if (isOverwrite) {\n throw new NodeAlreadyExistsError(node, this.nodes.get(id), id);\n }\n\n this.nodes.set(id, node);\n this.adjacency.map((adj) => adj.push(null));\n this.adjacency.push(new Array<AdjacencyValue<Edge>>(this.adjacency.length + 1).fill(null));\n\n this.emit(\"node-added\", id);\n\n return id;\n }\n\n /**\n * This replaces an existing node in the graph with an updated version.\n * Throws a [[`NodeDoesNotExistsError`]] if no node with the same identity already exists.\n *\n * __Caveat_:_ The default identity function means that this will never work since if the node changes it will have a different [[`hash`]].\n *\n * @param node The new node that is replacing the old one.\n */\n replace(node: Node): void {\n const id = this.nodeIdentity(node);\n const isOverwrite = this.nodes.has(id);\n\n if (!isOverwrite) {\n throw new NodeDoesntExistError(id);\n }\n\n this.nodes.set(id, node);\n\n this.emit(\"node-replaced\", id);\n }\n\n /**\n * This essentially combines the behavior of [[`insert`]] and [[`replace`]].\n * If the node doesn't exist, create it. If the node already exists, replace it with the updated version.\n *\n * @param node The node to insert or update\n * @returns The identity string of the node inserted or updated.\n */\n upsert(node: Node): NodeId {\n const id = this.nodeIdentity(node);\n const isOverwrite = this.nodes.has(id);\n\n this.nodes.set(id, node);\n\n if (!isOverwrite) {\n this.adjacency.map((adj) => adj.push(null));\n this.adjacency.push(new Array<AdjacencyValue<Edge>>(this.adjacency.length + 1).fill(null));\n this.emit(\"node-added\", id);\n } else {\n this.emit(\"node-replaced\", id);\n }\n\n return id;\n }\n\n /**\n * Create an edge between two nodes in the graph.\n * Throws a [[`NodeDoesNotExistsError`]] if no either of the nodes you are attempting to connect do not exist.\n *\n * @param node1Identity The first node to connect (in [[`DirectedGraph`]]s and [[`DirectedAcyclicGraph`]]s this is the `source` node.)\n * @param node2Identity The second node to connect (in [[`DirectedGraph`]]s and [[`DirectedAcyclicGraph`]]s this is the `target` node)\n * @param edge The edge to be added. By default this is `true` but it can be any type.\n */\n addEdge(node1Identity: NodeId, node2Identity: NodeId, edge?: Edge): EdgeId {\n if (edge === undefined) {\n edge = true as Edge;\n }\n const node1Exists = this.nodes.has(node1Identity);\n const node2Exists = this.nodes.has(node2Identity);\n\n if (!node1Exists) {\n throw new NodeDoesntExistError(node1Identity);\n }\n\n if (!node2Exists) {\n throw new NodeDoesntExistError(node2Identity);\n }\n\n const node1Index = Array.from(this.nodes.keys()).indexOf(node1Identity);\n const node2Index = Array.from(this.nodes.keys()).indexOf(node2Identity);\n\n if (this.adjacency[node1Index][node2Index] === null) {\n this.adjacency[node1Index][node2Index] = [edge];\n } else {\n if (!this.adjacency[node1Index][node2Index]!.includes(edge)) {\n this.adjacency[node1Index][node2Index]!.push(edge);\n }\n }\n\n const id = this.edgeIdentity(edge, node1Identity, node2Identity);\n this.emit(\"edge-added\", id);\n\n return id;\n }\n\n /**\n * This simply returns all the nodes stored in the graph\n *\n * @param compareFunc An optional function that indicates the sort order of the returned array\n */\n getNodes(compareFunc?: (a: Node, b: Node) => number): Node[] {\n const temp = Array.from(this.nodes.values());\n\n if (compareFunc !== undefined) {\n return temp.sort(compareFunc);\n }\n\n return temp;\n }\n\n /**\n * Returns a specific node given the node identity returned from the [[`insert`]] function\n */\n getNode(nodeIdentity: NodeId): Node | undefined {\n return this.nodes.get(nodeIdentity);\n }\n\n /**\n * Returns true if the node exists in the graph.\n */\n hasNode(nodeIdentity: NodeId): boolean {\n return this.nodes.has(nodeIdentity);\n }\n\n /**\n * Returns all edges in the graph as an array of tuples.\n */\n getEdges(): Array<[node1Identity: NodeId, node2Identity: NodeId, edge: Edge]> {\n const toReturn: Array<[node1Identity: NodeId, node2Identity: NodeId, edge: Edge]> = [];\n\n const nodeKeys = Array.from(this.nodes.keys());\n this.adjacency.forEach((row, rowIndex) => {\n const node1Identity = nodeKeys[rowIndex];\n if (node1Identity != null) {\n row.forEach((edges, colIndex) => {\n if (edges !== null) {\n const node2Identity = nodeKeys[colIndex];\n if (node2Identity != null) {\n for (const edge of edges) {\n toReturn.push([node1Identity, node2Identity, edge]);\n }\n }\n }\n });\n }\n });\n\n return toReturn;\n }\n\n /**\n * Returns the out edges for a specific node.\n */\n outEdges(\n node1Identity: NodeId\n ): Array<[node1Identity: NodeId, node2Identity: NodeId, edge: Edge]> {\n const nodeKeys = Array.from(this.nodes.keys());\n const nodeIndex = nodeKeys.indexOf(node1Identity);\n\n const toReturn: Array<[node1Identity: NodeId, node2Identity: NodeId, edge: Edge]> = [];\n\n this.adjacency[nodeIndex].forEach((edges, colIndex) => {\n if (edges !== null) {\n const node2Identity = nodeKeys[colIndex];\n if (node2Identity != null) {\n for (const edge of edges) {\n toReturn.push([node1Identity, node2Identity, edge]);\n }\n }\n }\n });\n\n return toReturn;\n }\n\n /**\n * Returns the in edges for a specific node.\n */\n inEdges(\n node2Identity: NodeId\n ): Array<[node1Identity: NodeId, node2Identity: NodeId, edge: Edge]> {\n const nodeKeys = Array.from(this.nodes.keys());\n const node2Index = nodeKeys.indexOf(node2Identity);\n\n const toReturn: Array<[node1Identity: NodeId, node2Identity: NodeId, edge: Edge]> = [];\n\n this.adjacency.forEach((row, rowIndex) => {\n const node1Identity = nodeKeys[rowIndex];\n const edges = row[node2Index];\n if (edges !== null) {\n for (const edge of edges) {\n toReturn.push([node1Identity, node2Identity, edge]);\n }\n }\n });\n\n return toReturn;\n }\n\n /**\n * Returns the edges for a specific node.\n */\n nodeEdges(\n nodeIdentity: NodeId\n ): Array<[node1Identity: NodeId, node2Identity: NodeId, edge: Edge]> {\n return [...this.outEdges(nodeIdentity), ...this.inEdges(nodeIdentity)];\n }\n\n /**\n * Deletes an edge between two nodes in the graph.\n * Throws a [[`NodeDoesNotExistsError`]] if either of the nodes do not exist.\n *\n * @param node1Identity The identity of the first node (in [[`DirectedGraph`]]s and [[`DirectedAcyclicGraph`]]s this is the `from` node.)\n * @param node2Identity The identity of the second node (in [[`DirectedGraph`]]s and [[`DirectedAcyclicGraph`]]s this is the `to` node)\n * @param edgeIdentity The identity of the edge to be deleted. If not provided, all edges between the two nodes will be deleted.\n */\n removeEdge(node1Identity: NodeId, node2Identity: NodeId, edgeIdentity?: EdgeId): void {\n const node1Exists = this.nodes.has(node1Identity);\n const node2Exists = this.nodes.has(node2Identity);\n\n if (!node1Exists) {\n throw new NodeDoesntExistError(node1Identity);\n }\n\n if (!node2Exists) {\n throw new NodeDoesntExistError(node2Identity);\n }\n\n const node1Index = Array.from(this.nodes.keys()).indexOf(node1Identity);\n const node2Index = Array.from(this.nodes.keys()).indexOf(node2Identity);\n\n if (edgeIdentity === undefined) {\n this.adjacency[node1Index][node2Index] = null;\n } else {\n // Remove the corresponding column from the adjacency matrix\n // this is not an optimized way to do this but we have edge as an opaque type\n for (const row of this.adjacency) {\n for (const edgelist of row) {\n if (edgelist !== null) {\n for (let edgeIndex = 0; edgeIndex < edgelist.length; edgeIndex++) {\n if (\n this.edgeIdentity(edgelist[edgeIndex], node1Identity, node2Identity) ===\n edgeIdentity\n ) {\n edgelist.splice(edgeIndex, 1);\n }\n }\n }\n }\n }\n }\n this.emit(\"edge-removed\", edgeIdentity as EdgeId);\n }\n\n /**\n * Deletes a node from the graph, along with any edges associated with it.\n * Throws a [[`NodeDoesNotExistsError`]] if the node does not exist.\n *\n * @param nodeIdentity The identity of the node to be deleted.\n */\n remove(nodeIdentity: NodeId): void {\n if (!this.nodes.has(nodeIdentity)) {\n throw new NodeDoesntExistError(nodeIdentity);\n }\n\n // Remove the node from the nodes map\n this.nodes.delete(nodeIdentity);\n\n // Find the index of the node in the adjacency matrix\n const nodeIndex = Array.from(this.nodes.keys()).indexOf(nodeIdentity);\n\n // Remove the corresponding row from the adjacency matrix\n this.adjacency.splice(nodeIndex, 1);\n\n // Remove the corresponding column from the adjacency matrix\n this.adjacency.forEach((row) => row.splice(nodeIndex, 1));\n\n this.emit(\"node-removed\", nodeIdentity);\n }\n\n /**\n * @alias remove\n */\n removeNode(nodeIdentity: NodeId): void {\n return this.remove(nodeIdentity);\n }\n\n /**\n * @alias insert\n */\n addNode(node: Node): NodeId {\n return this.insert(node);\n }\n\n /**\n * Add nodes in bulk\n */\n addNodes(nodes: Node[]): NodeId[] {\n return nodes.map((node) => this.insert(node));\n }\n\n /**\n * Add edges\n * @param edges An array of tuples, each tuple containing the identity of the source node, the identity of the target node, and the edge to add.\n */\n addEdges(\n edges: Array<[node1Identity: NodeId, node2Identity: NodeId, edge?: Edge | undefined]>\n ): EdgeId[] {\n return edges.map(([node1Identity, node2Identity, edge]) =>\n this.addEdge(node1Identity, node2Identity, edge)\n );\n }\n}\n",
11
11
  "// original source: https://github.com/SegFaultx64/typescript-graph\n// previous fork: https://github.com/sroussey/typescript-graph\n// license: MIT\n\nimport { NodeDoesntExistError } from \"./errors\";\nimport { type AdjacencyMatrix, Graph } from \"./graph\";\n\n/**\n * # DirectedGraph\n *\n * A DirectedGraph is similar a [[`Graph`]] but with additional functionality.\n *\n * @typeParam Node `Node` is the node type of the graph. Nodes can be anything in all the included examples they are simple objects.\n * @typeParam Edge `Edge` is the edge type of the graph. Edges can be of any type, but must be truethy and by default they are `true` which is a simple boolean.\n * @typeParam NodeId `NodeId` is the identity type of the node, by default it is a `unknown`, though most will use `string` or `number`.\n * @typeParam EdgeId `EdgeId` is the identity type of the edge, by default it is a `unknown`, though most will use `string` or `number`.\n */\nexport class DirectedGraph<Node, Edge = true, NodeId = unknown, EdgeId = unknown> extends Graph<\n Node,\n Edge,\n NodeId,\n EdgeId\n> {\n /** Caches if the graph contains a cycle. If `undefined` then it is unknown. */\n protected hasCycle: boolean | undefined = false;\n\n /**\n * Returns `true` if there are no cycles in the graph.\n * This relies on a cached value so calling it multiple times without adding edges to the graph should be O(1) after the first call.\n * Non-cached calls are potentially expensive, the implementation is based on Kahn's algorithim which is O(|EdgeCount| + |NodeCount|).\n */\n isAcyclic(): boolean {\n if (this.hasCycle !== undefined) {\n return !this.hasCycle;\n }\n\n const nodeIndices = Array.from(this.nodes.keys());\n const nodeInDegrees = new Map(\n Array.from(this.nodes.keys()).map((n) => [n, this.indegreeOfNode(n)])\n );\n\n const toSearch = Array.from(nodeInDegrees).filter((pair) => pair[1] === 0);\n\n let visitedNodes = 0;\n\n while (toSearch.length > 0) {\n const cur = toSearch.pop();\n if (cur === undefined) {\n continue;\n }\n\n const nodeIndex = nodeIndices.indexOf(cur[0]);\n this.adjacency[nodeIndex].forEach((hasAdj, index) => {\n if (hasAdj !== null) {\n const currentInDegree = nodeInDegrees.get(nodeIndices[index]);\n if (currentInDegree !== undefined) {\n nodeInDegrees.set(nodeIndices[index], currentInDegree - 1);\n if (currentInDegree - 1 === 0) {\n toSearch.push([nodeIndices[index], currentInDegree - 1]);\n }\n }\n }\n });\n\n visitedNodes++;\n }\n\n this.hasCycle = !(visitedNodes === this.nodes.size);\n\n return visitedNodes === this.nodes.size;\n }\n\n /**\n * The indegree of a node is the number of edges that point to it. This will always be an integer.\n *\n * Throws a [[`NodeDoesntExistError`]] the node does not exist.\n *\n * @param nodeID The string of the node identity of the node to calculate indegree for.\n */\n indegreeOfNode(nodeID: NodeId): number {\n const nodeIdentities = Array.from(this.nodes.keys());\n const indexOfNode = nodeIdentities.indexOf(nodeID);\n\n if (indexOfNode === -1) {\n throw new NodeDoesntExistError(nodeID);\n }\n\n return this.adjacency.reduce<number>((carry, row) => {\n return carry + (row[indexOfNode] == null ? 0 : 1);\n }, 0);\n }\n\n /**\n * Add a directed edge to the graph.\n *\n * @param sourceNodeIdentity The identity string of the node the edge should run from.\n * @param targetNodeIdentity The identity string of the node the edge should run to.\n * @param edge The edge to add to the graph. If not provided it defaults to `true`.\n * @param skipUpdatingCyclicality This boolean indicates if the cache of the cyclicality of the graph should be updated.\n * If `false` is passed the cycle cache will be invalidated because we can not assure that a cycle has not been created.\n */\n addEdge(\n sourceNodeIdentity: NodeId,\n targetNodeIdentity: NodeId,\n edge?: Edge,\n skipUpdatingCyclicality: boolean = false\n ): EdgeId {\n if (edge === undefined) {\n edge = true as Edge;\n }\n if (this.hasCycle === false && !skipUpdatingCyclicality) {\n this.hasCycle = this.wouldAddingEdgeCreateCycle(sourceNodeIdentity, targetNodeIdentity);\n } else if (skipUpdatingCyclicality) {\n this.hasCycle = undefined;\n }\n\n return super.addEdge(sourceNodeIdentity, targetNodeIdentity, edge);\n }\n\n /**\n * Depth first search to see if one node is reachable from another following the directed edges.\n *\n * __Caveat:__ This will return false if `startNode` and `endNode` are the same node and there is not a cycle or a loop edge connecting them.\n *\n * @param startNode The string identity of the node to start at.\n * @param endNode The string identity of the node we are attempting to reach.\n */\n canReachFrom(startNode: NodeId, endNode: NodeId): boolean {\n const nodeIdentities = Array.from(this.nodes.keys());\n const startNodeIndex = nodeIdentities.indexOf(startNode);\n const endNodeIndex = nodeIdentities.indexOf(endNode);\n\n if (this.adjacency[startNodeIndex][endNodeIndex] != null) {\n return true;\n }\n\n return this.adjacency[startNodeIndex].reduce<boolean>((carry, edge, index) => {\n if (carry || edge === null) {\n return carry;\n }\n\n return this.canReachFrom(nodeIdentities[index], endNode);\n }, false);\n }\n\n /**\n * Checks if adding the specified edge would create a cycle.\n * Returns true in O(1) if the graph already contains a known cycle, or if `sourceNodeIdentity` and `targetNodeIdentity` are the same.\n *\n * @param sourceNodeIdentity The string identity of the node the edge is from.\n * @param targetNodeIdentity The string identity of the node the edge is to.\n */\n wouldAddingEdgeCreateCycle(sourceNodeIdentity: NodeId, targetNodeIdentity: NodeId): boolean {\n return (\n this.hasCycle ||\n sourceNodeIdentity === targetNodeIdentity ||\n this.canReachFrom(targetNodeIdentity, sourceNodeIdentity)\n );\n }\n\n /**\n * Given a starting node this returns a new [[`DirectedGraph`]] containing all the nodes that can be reached.\n * Throws a [[`NodeDoesntExistError`]] if the start node does not exist.\n *\n * @param startNodeIdentity The string identity of the node from which the subgraph search should start.\n */\n getSubGraphStartingFrom(startNodeIdentity: NodeId): DirectedGraph<Node, Edge, NodeId, EdgeId> {\n const nodeIndices = Array.from(this.nodes.keys());\n const initalNode = this.nodes.get(startNodeIdentity);\n\n if (initalNode == null) {\n throw new NodeDoesntExistError(startNodeIdentity);\n }\n\n const recur = (startNodeIdentity: NodeId, nodesToInclude: Node[]): Node[] => {\n let toReturn = [...nodesToInclude];\n const nodeIndex = nodeIndices.indexOf(startNodeIdentity);\n this.adjacency[nodeIndex].forEach((hasAdj, index) => {\n if (\n hasAdj !== null &&\n nodesToInclude.find((n) => this.nodeIdentity(n) === nodeIndices[index]) == null\n ) {\n const newNode = this.nodes.get(nodeIndices[index]);\n\n if (newNode != null) {\n toReturn = [...recur(nodeIndices[index], toReturn), newNode];\n }\n }\n });\n\n return toReturn;\n };\n\n const newGraph = new DirectedGraph<Node, Edge, NodeId, EdgeId>(\n this.nodeIdentity,\n this.edgeIdentity\n );\n const nodeList = recur(startNodeIdentity, [initalNode]);\n const includeIdents = nodeList.map((t) => this.nodeIdentity(t));\n Array.from(this.nodes.values()).forEach((n) => {\n if (includeIdents.includes(this.nodeIdentity(n))) {\n newGraph.insert(n);\n }\n });\n newGraph.adjacency = this.subAdj(nodeList);\n return newGraph;\n }\n\n private subAdj(include: Node[]): AdjacencyMatrix<Edge> {\n const includeIdents = include.map((t) => this.nodeIdentity(t));\n const nodeIndices = Array.from(this.nodes.keys());\n\n return this.adjacency.reduce<AdjacencyMatrix<Edge>>((carry, cur, index) => {\n if (includeIdents.includes(nodeIndices[index])) {\n return [...carry, cur.filter((_, index) => includeIdents.includes(nodeIndices[index]))];\n } else {\n return carry;\n }\n }, []);\n }\n\n /**\n * Returns all edges in the graph as an array of tuples.\n */\n getEdges(): Array<[sourceNodeIdentity: NodeId, targetNodeIdentity: NodeId, edge: Edge]> {\n return super.getEdges();\n }\n\n /**\n * Deletes an edge between two nodes in the graph.\n * Throws a [[`NodeDoesNotExistsError`]] if either of the nodes do not exist.\n *\n * @param sourceNodeIdentity The identity of the source node\n * @param targetNodeIdentity The identity of the target node\n * @param edgeIdentity The identity of the edge to be deleted. If not provided, all edges between the two nodes will be deleted.\n */\n removeEdge(sourceNodeIdentity: NodeId, targetNodeIdentity: NodeId, edgeIdentity?: EdgeId): void {\n super.removeEdge(sourceNodeIdentity, targetNodeIdentity, edgeIdentity);\n\n // Invalidate the cycle cache as the graph structure has changed\n this.hasCycle = undefined;\n }\n\n /**\n * Deletes a node from the graph, along with any edges associated with it.\n * Throws a [[`NodeDoesNotExistsError`]] if the node does not exist.\n *\n * @param nodeIdentity The identity of the node to be deleted.\n */\n remove(nodeIdentity: NodeId): void {\n super.remove(nodeIdentity);\n\n // Invalidate the cycle cache as the graph structure has changed\n this.hasCycle = undefined;\n }\n\n /**\n * Add edges\n * @param edges An array of tuples, each tuple containing the identity of the source node, the identity of the target node, and the edge to add.\n */\n addEdges(\n edges: Array<[sourceNodeIdentity: NodeId, targetNodeIdentity: NodeId, edge?: Edge | undefined]>\n ): EdgeId[] {\n return super.addEdges(edges);\n }\n}\n",
12
12
  "// original source: https://github.com/SegFaultx64/typescript-graph\n// previous fork: https://github.com/sroussey/typescript-graph\n// license: MIT\n\nimport { DirectedGraph } from \"./directedGraph\";\nimport { CycleError } from \"./errors\";\n\n/**\n * # DirectedAcyclicGraph\n *\n * A DirectedAcyclicGraph is builds on a [[`DirectedGraph`]] but enforces acyclicality. You cannot add an edge to a DirectedAcyclicGraph that would create a cycle.\n *\n * @typeParam Node `Node` is the node type of the graph. Nodes can be anything in all the included examples they are simple objects.\n * @typeParam Edge `Edge` is the edge type of the graph. Edges can be of any type, but must be truethy and by default they are `true` which is a simple boolean.\n * @typeParam NodeId `NodeId` is the identity type of the node, by default it is a `unknown`, though most will use `string` or `number`.\n * @typeParam EdgeId `EdgeId` is the identity type of the edge, by default it is a `unknown`, though most will use `string` or `number`.\n */\nexport class DirectedAcyclicGraph<\n Node,\n Edge = true,\n NodeId = unknown,\n EdgeId = unknown,\n> extends DirectedGraph<Node, Edge, NodeId, EdgeId> {\n private _topologicallySortedNodes?: Node[];\n\n /**\n * Converts an existing directed graph into a directed acyclic graph.\n * Throws a {@linkcode CycleError} if the graph attempting to be converted contains a cycle.\n * @param graph The source directed graph to convert into a DAG\n */\n static fromDirectedGraph<Node, Edge, NodeId, EdgeId>(\n graph: DirectedGraph<Node, Edge, NodeId, EdgeId>\n ): DirectedAcyclicGraph<Node, Edge, NodeId, EdgeId> {\n if (!graph.isAcyclic()) {\n throw new CycleError(\"Can't convert that graph to a DAG because it contains a cycle\");\n }\n const toRet = new DirectedAcyclicGraph<Node, Edge, NodeId, EdgeId>(\n // @ts-expect-error\n graph.nodeIdentity,\n // @ts-expect-error\n graph.edgeIdentity\n );\n\n toRet.nodes = (graph as any).nodes;\n toRet.adjacency = (graph as any).adjacency;\n\n return toRet;\n }\n\n /**\n * Adds an edge to the graph similarly to [[`DirectedGraph.addEdge`]] but maintains correctness of the acyclic graph.\n * Thows a [[`CycleError`]] if adding the requested edge would create a cycle.\n * Adding an edge invalidates the cache of topologically sorted nodes, rather than updating it.\n *\n * @param sourceNodeIdentity The identity string of the node the edge should run from.\n * @param targetNodeIdentity The identity string of the node the edge should run to.\n * @param edge The edge to add to the graph. If not provided it defaults to `true`.\n */\n addEdge(sourceNodeIdentity: NodeId, targetNodeIdentity: NodeId, edge?: Edge): EdgeId {\n if (edge === undefined) {\n edge = true as Edge;\n }\n if (this.wouldAddingEdgeCreateCycle(sourceNodeIdentity, targetNodeIdentity)) {\n throw new CycleError(\n `Can't add edge from ${String(sourceNodeIdentity)} to ${String(\n targetNodeIdentity\n )} it would create a cycle`\n );\n }\n\n // Invalidate cache of toposorted nodes\n this._topologicallySortedNodes = undefined;\n return super.addEdge(sourceNodeIdentity, targetNodeIdentity, edge, true);\n }\n\n /**\n * Inserts a node into the graph and maintains topologic sort cache by prepending the node\n * (since all newly created nodes have an [[ indegreeOfNode | indegree ]] of zero.)\n *\n * @param node The node to insert\n */\n insert(node: Node): NodeId {\n if (this._topologicallySortedNodes !== undefined) {\n this._topologicallySortedNodes = [node, ...this._topologicallySortedNodes];\n }\n\n return super.insert(node);\n }\n\n /**\n * Topologically sort the nodes using Kahn's algorithm. Uses a cache which means that repeated calls should be O(1) after the first call.\n * Non-cached calls are potentially expensive, Kahn's algorithim is O(|EdgeCount| + |NodeCount|).\n * There may be more than one valid topological sort order for a single graph,\n * so just because two graphs are the same does not mean that order of the resultant arrays will be.\n *\n * @returns An array of nodes sorted by the topological order.\n */\n topologicallySortedNodes(): Node[] {\n if (this._topologicallySortedNodes !== undefined) {\n return this._topologicallySortedNodes;\n }\n\n const nodeIndices = Array.from(this.nodes.keys());\n const nodeInDegrees = new Map(\n Array.from(this.nodes.keys()).map((n) => [n, this.indegreeOfNode(n)])\n );\n\n const adjCopy = this.adjacency.map((a) => [...a]);\n\n const toSearch = Array.from(nodeInDegrees).filter((pair) => pair[1] === 0);\n\n if (toSearch.length === this.nodes.size) {\n const arrayOfNodes = Array.from(this.nodes.values());\n this._topologicallySortedNodes = arrayOfNodes;\n return arrayOfNodes;\n }\n\n const toReturn: Node[] = [];\n\n while (toSearch.length > 0) {\n const n = toSearch.pop();\n if (n === undefined) {\n throw new Error(\"Unexpected empty array\");\n }\n const curNode = this.nodes.get(n[0]);\n if (curNode == null) {\n throw new Error(\"This should never happen\");\n }\n toReturn.push(curNode);\n\n adjCopy[nodeIndices.indexOf(n[0])]?.forEach((edge, index) => {\n if (edge !== null) {\n adjCopy[nodeIndices.indexOf(n[0])][index] = null;\n const target = nodeInDegrees.get(nodeIndices[index]);\n if (target !== undefined) {\n nodeInDegrees.set(nodeIndices[index], target - 1);\n if (target - 1 === 0) {\n toSearch.push([nodeIndices[index], 0]);\n }\n } else {\n throw new Error(\"This should never happen\");\n }\n }\n });\n }\n\n // Update cache\n this._topologicallySortedNodes = toReturn;\n\n // we shouldn't need to account for the error case of there being a cycle because it shouldn't\n // be possible to instantiate this class in a state (or put it in a state) where there is a cycle.\n\n return toReturn;\n }\n\n /**\n * Given a starting node this returns a new [[`DirectedA`]] containing all the nodes that can be reached.\n * Throws a [[`NodeDoesntExistError`]] if the start node does not exist.\n *\n * @param startNodeIdentity The string identity of the node from which the subgraph search should start.\n */\n getSubGraphStartingFrom(\n startNodeIdentity: NodeId\n ): DirectedAcyclicGraph<Node, Edge, NodeId, EdgeId> {\n return DirectedAcyclicGraph.fromDirectedGraph(super.getSubGraphStartingFrom(startNodeIdentity));\n }\n\n /**\n * Deletes an edge between two nodes in the graph.\n * Throws a [[`NodeDoesNotExistsError`]] if either of the nodes do not exist.\n *\n * @param sourceNodeIdentity The identity of the source node\n * @param targetNodeIdentity The identity of the target node\n * @param edgeIdentity The identity of the edge to be deleted. If not provided, all edges between the two nodes will be deleted.\n */\n removeEdge(sourceNodeIdentity: NodeId, targetNodeIdentity: NodeId, edgeIdentity?: EdgeId): void {\n super.removeEdge(sourceNodeIdentity, targetNodeIdentity, edgeIdentity);\n\n // Invalidate the topologically sorted nodes cache\n this._topologicallySortedNodes = undefined;\n }\n\n /**\n * Deletes a node from the graph, along with any edges associated with it.\n * Throws a [[`NodeDoesNotExistsError`]] if the node does not exist.\n *\n * @param nodeIdentity The identity of the node to be deleted.\n */\n remove(nodeIdentity: NodeId): void {\n super.remove(nodeIdentity);\n\n // Invalidate the topologically sorted nodes cache\n this._topologicallySortedNodes = undefined;\n }\n}\n",
13
- "/**\n * @license\n * Copyright 2025 Steven Roussey <sroussey@gmail.com>\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n FromExtendedSchema,\n FromExtendedSchemaOptions,\n FromSchemaOptions,\n} from \"@sroussey/json-schema-to-ts\";\nimport type { JsonSchema, JsonSchemaCustomProps } from \"./JsonSchema\";\n\nexport { FromSchemaOptions };\n\n/**\n * Removes the [$JSONSchema] symbol property from a type\n * This is needed because json-schema-to-ts adds this property which cannot be serialized\n */\nexport type StripJSONSchema<T> = T extends object\n ? {\n [K in keyof T as K extends symbol ? never : K]: T[K];\n }\n : T;\n\nexport const FromSchemaDefaultOptions = {\n parseNotKeyword: true,\n parseIfThenElseKeywords: false,\n keepDefaultedPropertiesOptional: true,\n references: false,\n deserialize: false,\n} as const satisfies FromSchemaOptions;\n\nexport type FromSchema<\n SCHEMA extends JsonSchema<EXTENSION>,\n OPTIONS extends FromExtendedSchemaOptions<EXTENSION> = typeof FromSchemaDefaultOptions,\n EXTENSION extends JsonSchemaCustomProps = JsonSchemaCustomProps,\n> = StripJSONSchema<FromExtendedSchema<EXTENSION, SCHEMA, OPTIONS>>;\n\n/**\n * IncludeProps - Returns a new schema with only the specified properties\n *\n * This is a schema transformer that returns a new schema object.\n * Use with FromSchema like: FromSchema<IncludeProps<typeof schema, typeof [\"prop1\", \"prop2\"]>>\n *\n * @template Schema - The JSON schema object (with 'as const')\n * @template Keys - Readonly array type of property keys to include (use typeof [\"key1\", \"key2\"] as const)\n *\n * @example\n * const schema = {\n * type: \"object\",\n * properties: {\n * name: { type: \"string\" },\n * age: { type: \"number\" },\n * email: { type: \"string\" }\n * },\n * required: [\"name\"],\n * additionalProperties: false\n * } as const;\n *\n * type Filtered = FromSchema<IncludeProps<typeof schema, typeof [\"name\", \"age\"]>>;\n * // => { name: string, age?: number }\n */\nexport type IncludeProps<\n Schema extends { readonly type: \"object\"; readonly properties: Record<string, unknown> },\n Keys extends readonly (keyof Schema[\"properties\"])[],\n> = Omit<Schema, \"properties\" | \"required\"> & {\n readonly properties: {\n readonly [K in Extract<keyof Schema[\"properties\"], Keys[number]>]: Schema[\"properties\"][K];\n };\n} & (Schema extends { readonly required: readonly (infer R extends string)[] }\n ? { readonly required: readonly Extract<R, Keys[number]>[] }\n : {});\n\n/**\n * ExcludeProps - Returns a new schema without the specified properties\n *\n * This is a schema transformer that returns a new schema object.\n * Use with FromSchema like: FromSchema<ExcludeProps<typeof schema, typeof [\"prop1\", \"prop2\"]>>\n *\n * @template Schema - The JSON schema object (with 'as const')\n * @template Keys - Readonly array type of property keys to exclude (use typeof [\"key1\", \"key2\"] as const)\n *\n * @example\n * const schema = {\n * type: \"object\",\n * properties: {\n * name: { type: \"string\" },\n * age: { type: \"number\" },\n * email: { type: \"string\" }\n * },\n * required: [\"name\"],\n * additionalProperties: false\n * } as const;\n *\n * type Filtered = FromSchema<ExcludeProps<typeof schema, typeof [\"email\"]>>;\n * // => { name: string, age?: number }\n */\nexport type ExcludeProps<\n Schema extends { readonly type: \"object\"; readonly properties: Record<string, unknown> },\n Keys extends readonly (keyof Schema[\"properties\"])[],\n> = Omit<Schema, \"properties\" | \"required\"> & {\n readonly properties: {\n readonly [K in Exclude<keyof Schema[\"properties\"], Keys[number]>]: Schema[\"properties\"][K];\n };\n} & (Schema extends { readonly required: readonly (infer R extends string)[] }\n ? { readonly required: readonly Exclude<R, Keys[number]>[] }\n : {});\n",
13
+ "/**\n * @license\n * Copyright 2025 Steven Roussey <sroussey@gmail.com>\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n FromExtendedSchema,\n FromExtendedSchemaOptions,\n FromSchemaOptions,\n} from \"@sroussey/json-schema-to-ts\";\nimport type { JsonSchema, JsonSchemaCustomProps } from \"./JsonSchema\";\n\nexport { FromSchemaOptions };\n\n/**\n * Removes the [$JSONSchema] symbol property from a type\n * This is needed because json-schema-to-ts adds this property which cannot be serialized\n */\nexport type StripJSONSchema<T> = T extends object\n ? {\n [K in keyof T as K extends symbol ? never : K]: T[K];\n }\n : T;\n\nexport const FromSchemaDefaultOptions = {\n parseNotKeyword: true,\n parseIfThenElseKeywords: true,\n keepDefaultedPropertiesOptional: true,\n references: false,\n deserialize: false,\n} as const satisfies FromSchemaOptions;\n\nexport type FromSchema<\n SCHEMA extends JsonSchema<EXTENSION>,\n OPTIONS extends FromExtendedSchemaOptions<EXTENSION> = typeof FromSchemaDefaultOptions,\n EXTENSION extends JsonSchemaCustomProps = JsonSchemaCustomProps,\n> = StripJSONSchema<FromExtendedSchema<EXTENSION, SCHEMA, OPTIONS>>;\n\n/**\n * IncludeProps - Returns a new schema with only the specified properties\n *\n * This is a schema transformer that returns a new schema object.\n * Use with FromSchema like: FromSchema<IncludeProps<typeof schema, typeof [\"prop1\", \"prop2\"]>>\n *\n * @template Schema - The JSON schema object (with 'as const')\n * @template Keys - Readonly array type of property keys to include (use typeof [\"key1\", \"key2\"] as const)\n *\n * @example\n * const schema = {\n * type: \"object\",\n * properties: {\n * name: { type: \"string\" },\n * age: { type: \"number\" },\n * email: { type: \"string\" }\n * },\n * required: [\"name\"],\n * additionalProperties: false\n * } as const;\n *\n * type Filtered = FromSchema<IncludeProps<typeof schema, typeof [\"name\", \"age\"]>>;\n * // => { name: string, age?: number }\n */\nexport type IncludeProps<\n Schema extends { readonly type: \"object\"; readonly properties: Record<string, unknown> },\n Keys extends readonly (keyof Schema[\"properties\"])[],\n> = Omit<Schema, \"properties\" | \"required\"> & {\n readonly properties: {\n readonly [K in Extract<keyof Schema[\"properties\"], Keys[number]>]: Schema[\"properties\"][K];\n };\n} & (Schema extends { readonly required: readonly (infer R extends string)[] }\n ? { readonly required: readonly Extract<R, Keys[number]>[] }\n : {});\n\n/**\n * ExcludeProps - Returns a new schema without the specified properties\n *\n * This is a schema transformer that returns a new schema object.\n * Use with FromSchema like: FromSchema<ExcludeProps<typeof schema, typeof [\"prop1\", \"prop2\"]>>\n *\n * @template Schema - The JSON schema object (with 'as const')\n * @template Keys - Readonly array type of property keys to exclude (use typeof [\"key1\", \"key2\"] as const)\n *\n * @example\n * const schema = {\n * type: \"object\",\n * properties: {\n * name: { type: \"string\" },\n * age: { type: \"number\" },\n * email: { type: \"string\" }\n * },\n * required: [\"name\"],\n * additionalProperties: false\n * } as const;\n *\n * type Filtered = FromSchema<ExcludeProps<typeof schema, typeof [\"email\"]>>;\n * // => { name: string, age?: number }\n */\nexport type ExcludeProps<\n Schema extends { readonly type: \"object\"; readonly properties: Record<string, unknown> },\n Keys extends readonly (keyof Schema[\"properties\"])[],\n> = Omit<Schema, \"properties\" | \"required\"> & {\n readonly properties: {\n readonly [K in Exclude<keyof Schema[\"properties\"], Keys[number]>]: Schema[\"properties\"][K];\n };\n} & (Schema extends { readonly required: readonly (infer R extends string)[] }\n ? { readonly required: readonly Exclude<R, Keys[number]>[] }\n : {});\n",
14
14
  "/**\n * @license\n * Copyright 2025 Steven Roussey <sroussey@gmail.com>\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Semantic Compatibility Utilities for Task Graph Dataflows\n *\n * In this project, task graphs have connections between tasks called dataflows.\n * These dataflows have different kinds of compatibility checks:\n *\n * **Static Compatibility:**\n * Static rules help decide if an edge should be connected at all. A connection\n * is statically compatible if:\n * - The source and target are the same exact type\n * - The source connects to the equivalent of \"any\" (target accepts anything)\n * - The source type is acceptable to the target (e.g., a string to something\n * that accepts oneOf[string[], string])\n *\n * **Runtime Compatibility:**\n * Assuming the connection is allowed at design time (passes static check),\n * runtime rules determine if they are compatible during execution.\n *\n * Currently, there is one runtime compatibility check:\n * - If both input and output schemas have 'format' annotations attached,\n * the format annotation has the format /\\w+(:\\w+)?/ where the first part\n * is the \"name\" and if alone matches any other with the same \"name\".\n * If there is a second part, then that narrows the type.\n * - Format checks apply to all types (strings, arrays, etc.), not just strings\n * - A schema with format can connect to a schema with no format (source has format, target doesn't)\n * - A schema with no format cannot connect to a schema with format (source doesn't have format, target does)\n *\n * Example: In the AI package, 'format':'model' and 'format': 'model:EmbeddingTask'\n * are used on string types. An input with property `model` and 'format':'model'\n * connects to a target with property `model` and 'format':'model:EmbeddingTask' --\n * this compatibility is called \"runtime\". It first passes the static check as\n * compatible and then notices a difference in format runtime.\n *\n * Format is also used on array types, e.g., 'format':'Float64Array' on arrays\n * containing Float64 numbers.\n *\n * Only connections that pass the runtime check will pass data at runtime.\n */\n\nimport type { JsonSchema } from \"./JsonSchema\";\n\n/**\n * Checks if two format strings are compatible.\n * Format: /\\w+(:\\w+)?/ where first part is the \"name\" and optional second part narrows the type.\n * - Same name without narrowing: static compatible\n * - Source name matches target narrowed name: runtime compatible\n * - Different names or incompatible narrowing: incompatible\n */\nfunction areFormatStringsCompatible(\n sourceFormat: string,\n targetFormat: string\n): \"static\" | \"runtime\" | \"incompatible\" {\n const formatPattern = /^\\w+(:\\w+)?$/;\n if (!formatPattern.test(sourceFormat) || !formatPattern.test(targetFormat)) {\n return \"incompatible\";\n }\n\n const [sourceName, sourceNarrow] = sourceFormat.split(\":\");\n const [targetName, targetNarrow] = targetFormat.split(\":\");\n\n // Different base names are incompatible\n if (sourceName !== targetName) {\n return \"incompatible\";\n }\n\n // Same name, no narrowing on either: static compatible\n if (!sourceNarrow && !targetNarrow) {\n return \"static\";\n }\n\n // Source has narrowing, target doesn't: static compatible (source is more specific)\n if (sourceNarrow && !targetNarrow) {\n return \"static\";\n }\n\n // Target has narrowing, source doesn't: runtime compatible (target is more specific)\n if (!sourceNarrow && targetNarrow) {\n return \"runtime\";\n }\n\n // Both have narrowing: must match exactly for static, otherwise incompatible\n if (sourceNarrow === targetNarrow) {\n return \"static\";\n }\n\n return \"incompatible\";\n}\n\n/**\n * Checks if a source type is statically compatible with a target type.\n * Handles cases like string to oneOf[string[], string] or string to any.\n */\nfunction isTypeStaticallyCompatible(sourceType: unknown, targetType: unknown): boolean {\n // Target accepts any type (no type constraint)\n if (!targetType) {\n return true;\n }\n\n // Source has no type constraint\n if (!sourceType) {\n return false;\n }\n\n // Convert to arrays for comparison\n const sourceTypes = Array.isArray(sourceType) ? sourceType : [sourceType];\n const targetTypes = Array.isArray(targetType) ? targetType : [targetType];\n\n // Check if any source type matches any target type\n return sourceTypes.some((st) => targetTypes.includes(st as any));\n}\n\n/**\n * Merges allOf schemas into a single schema representing their intersection.\n * For example: allOf: [{ type: \"string\", format: \"model\" }, { type: \"string\" }]\n * becomes: { type: \"string\", format: \"model\" }\n */\nfunction mergeAllOfSchemas(schemas: JsonSchema[]): JsonSchema | null {\n if (schemas.length === 0) return null;\n if (schemas.length === 1) return schemas[0] as JsonSchema;\n\n let merged: Record<string, unknown> = {};\n\n for (const schema of schemas) {\n if (typeof schema === \"boolean\") {\n if (schema === false) return false; // false in allOf makes the whole thing false\n // true in allOf doesn't add constraints, so we can skip it\n continue;\n }\n\n // At this point, schema is an object\n const schemaObj = schema as Record<string, unknown>;\n\n // Merge type\n if (schemaObj.type !== undefined) {\n if (merged.type === undefined) {\n merged.type = schemaObj.type;\n } else if (merged.type !== schemaObj.type) {\n // Types must be compatible - if they're different primitives, it's incompatible\n const mergedTypes = Array.isArray(merged.type) ? merged.type : [merged.type];\n const schemaTypes = Array.isArray(schemaObj.type) ? schemaObj.type : [schemaObj.type];\n const commonTypes = mergedTypes.filter((t: unknown) => schemaTypes.includes(t));\n if (commonTypes.length === 0) {\n return false; // Incompatible types\n }\n merged.type = commonTypes.length === 1 ? commonTypes[0] : commonTypes;\n }\n }\n\n // Merge format - use the most specific one (the one with narrowing if any)\n const schemaFormat = schemaObj.format as string | undefined;\n const mergedFormat = merged.format as string | undefined;\n if (schemaFormat) {\n if (!mergedFormat) {\n merged.format = schemaFormat;\n } else {\n // Both have formats - check if they're compatible\n const formatCompat = areFormatStringsCompatible(mergedFormat, schemaFormat);\n if (formatCompat === \"incompatible\") {\n return false; // Incompatible formats\n }\n // Use the more specific format (the one with narrowing, or either if both same)\n const mergedHasNarrow = mergedFormat.includes(\":\");\n const schemaHasNarrow = schemaFormat.includes(\":\");\n if (schemaHasNarrow && !mergedHasNarrow) {\n merged.format = schemaFormat;\n } else if (!schemaHasNarrow && mergedHasNarrow) {\n // Keep merged format (it's more specific)\n } else if (mergedFormat !== schemaFormat) {\n // Both have narrowing and they're different - should be caught by areFormatStringsCompatible\n return false;\n }\n }\n }\n\n // Merge properties for objects\n if (schemaObj.properties && typeof schemaObj.properties === \"object\") {\n if (!merged.properties) {\n merged.properties = {};\n }\n const mergedProps = merged.properties as Record<string, JsonSchema>;\n const schemaProps = schemaObj.properties as Record<string, JsonSchema>;\n for (const [key, value] of Object.entries(schemaProps)) {\n if (mergedProps[key]) {\n // Recursively merge nested schemas\n const nestedMerged = mergeAllOfSchemas([mergedProps[key], value]);\n if (nestedMerged === null || nestedMerged === false) {\n return false;\n }\n mergedProps[key] = nestedMerged as JsonSchema;\n } else {\n mergedProps[key] = value;\n }\n }\n }\n\n // Merge required arrays\n if (schemaObj.required && Array.isArray(schemaObj.required)) {\n if (!merged.required) {\n merged.required = [];\n }\n const mergedRequired = merged.required as string[];\n const schemaRequired = schemaObj.required as string[];\n // Intersection of required arrays\n merged.required = mergedRequired.filter((r) => schemaRequired.includes(r));\n }\n\n // Merge additionalProperties - most restrictive wins\n if (schemaObj.additionalProperties !== undefined) {\n if (merged.additionalProperties === undefined) {\n merged.additionalProperties = schemaObj.additionalProperties;\n } else if (merged.additionalProperties === true && schemaObj.additionalProperties === false) {\n merged.additionalProperties = false; // false is more restrictive\n }\n }\n\n // Merge items for arrays\n if (schemaObj.items !== undefined) {\n if (merged.items === undefined) {\n merged.items = schemaObj.items;\n } else {\n // Recursively merge item schemas\n const mergedItems = mergeAllOfSchemas([\n merged.items as JsonSchema,\n schemaObj.items as JsonSchema,\n ]);\n if (mergedItems === null || mergedItems === false) {\n return false;\n }\n merged.items = mergedItems;\n }\n }\n }\n\n return merged as JsonSchema;\n}\n\n/**\n * Checks if a source schema is compatible with a target schema in a oneOf/anyOf union.\n */\nfunction isCompatibleWithUnion(\n sourceSchema: JsonSchema,\n unionSchemas: JsonSchema[]\n): \"static\" | \"runtime\" | \"incompatible\" {\n let hasStatic = false;\n let hasRuntime = false;\n\n for (const unionSchema of unionSchemas) {\n const compatibility = areSemanticallyCompatible(sourceSchema, unionSchema);\n if (compatibility === \"static\") {\n hasStatic = true;\n } else if (compatibility === \"runtime\") {\n hasRuntime = true;\n }\n }\n\n if (hasStatic) return \"static\";\n if (hasRuntime) return \"runtime\";\n return \"incompatible\";\n}\n\n/**\n * Checks if two JSON schemas are semantically compatible.\n * Returns:\n * - \"static\": Compatible at design time, no runtime check needed\n * - \"runtime\": Compatible at design time, but needs runtime semantic check\n * - \"incompatible\": Not compatible\n */\nexport function areSemanticallyCompatible(\n sourceSchema: JsonSchema,\n targetSchema: JsonSchema\n): \"static\" | \"runtime\" | \"incompatible\" {\n // Handle undefined schemas (non-existent ports)\n if (sourceSchema === undefined || targetSchema === undefined) {\n return \"incompatible\";\n }\n\n // Handle boolean schemas\n if (typeof targetSchema === \"boolean\") {\n if (targetSchema === false) return \"incompatible\";\n if (targetSchema === true) return \"static\"; // target accepts anything\n return \"incompatible\";\n }\n\n if (typeof sourceSchema === \"boolean\") {\n if (sourceSchema === false) return \"incompatible\";\n // sourceSchema === true means source can be anything, which is compatible with any target, but may not be at runtime\n if (sourceSchema === true) return \"runtime\";\n }\n\n // Handle allOf in source (intersection types - merge all schemas first)\n if (sourceSchema.allOf && Array.isArray(sourceSchema.allOf)) {\n const mergedSchema = mergeAllOfSchemas(sourceSchema.allOf);\n if (mergedSchema === null || mergedSchema === false) {\n return \"incompatible\";\n }\n // Check compatibility of the merged schema against the target\n return areSemanticallyCompatible(mergedSchema, targetSchema);\n }\n\n // Check type compatibility first\n const sourceType = sourceSchema.type;\n const targetType = targetSchema.type;\n\n // Handle oneOf/anyOf in source first\n if (sourceSchema.oneOf && Array.isArray(sourceSchema.oneOf)) {\n let hasStatic = false;\n let hasRuntime = false;\n\n for (const sourceOption of sourceSchema.oneOf) {\n const compatibility = areSemanticallyCompatible(sourceOption as JsonSchema, targetSchema);\n if (compatibility === \"static\") {\n hasStatic = true;\n } else if (compatibility === \"runtime\") {\n hasRuntime = true;\n }\n }\n\n // If any option requires runtime check, the whole thing requires runtime check\n if (hasRuntime) return \"runtime\";\n if (hasStatic) return \"static\";\n return \"incompatible\";\n }\n\n if (sourceSchema.anyOf && Array.isArray(sourceSchema.anyOf)) {\n let hasStatic = false;\n let hasRuntime = false;\n\n for (const sourceOption of sourceSchema.anyOf) {\n const compatibility = areSemanticallyCompatible(sourceOption as JsonSchema, targetSchema);\n if (compatibility === \"static\") {\n hasStatic = true;\n } else if (compatibility === \"runtime\") {\n hasRuntime = true;\n }\n }\n\n // If any option requires runtime check, the whole thing requires runtime check\n if (hasRuntime) return \"runtime\";\n if (hasStatic) return \"static\";\n return \"incompatible\";\n }\n\n // Handle oneOf/anyOf in target (e.g., oneOf[string[], string])\n if (targetSchema.oneOf && Array.isArray(targetSchema.oneOf)) {\n return isCompatibleWithUnion(sourceSchema, targetSchema.oneOf);\n }\n\n if (targetSchema.anyOf && Array.isArray(targetSchema.anyOf)) {\n return isCompatibleWithUnion(sourceSchema, targetSchema.anyOf);\n }\n\n // Handle allOf in target (intersection types - source must be compatible with all)\n if (targetSchema.allOf && Array.isArray(targetSchema.allOf)) {\n let hasStatic = false;\n let hasRuntime = false;\n\n for (const allOfSchema of targetSchema.allOf) {\n const compatibility = areSemanticallyCompatible(sourceSchema, allOfSchema as JsonSchema);\n if (compatibility === \"incompatible\") {\n return \"incompatible\";\n } else if (compatibility === \"static\") {\n hasStatic = true;\n } else if (compatibility === \"runtime\") {\n hasRuntime = true;\n }\n }\n\n if (hasRuntime) return \"runtime\";\n if (hasStatic) return \"static\";\n return \"incompatible\";\n }\n\n // Handle object types - check if properties are compatible\n if (sourceType === \"object\" && targetType === \"object\") {\n const sourceProperties = sourceSchema.properties;\n const targetProperties = targetSchema.properties;\n\n // If target has no properties constraint, it accepts any object\n if (!targetProperties) {\n return \"static\";\n }\n\n // If source has no properties but target does, check if target allows additional properties\n if (!sourceProperties) {\n // If target doesn't allow additional properties, incompatible\n if (targetSchema.additionalProperties === false) {\n return \"incompatible\";\n }\n // Otherwise, source (any object) is compatible with target that allows additional properties\n return \"static\";\n }\n\n // Check if all required target properties are present and compatible in source\n const targetRequired = targetSchema.required || [];\n let hasStatic = true;\n let hasRuntime = false;\n\n for (const propName of targetRequired) {\n const targetProp = (targetProperties as Record<string, JsonSchema>)?.[propName];\n const sourceProp = (sourceProperties as Record<string, JsonSchema>)?.[propName];\n\n // If target requires a property that source doesn't have, incompatible\n if (!sourceProp) {\n return \"incompatible\";\n }\n\n // Check compatibility of the property\n if (targetProp) {\n const propCompatibility = areSemanticallyCompatible(sourceProp, targetProp);\n if (propCompatibility === \"incompatible\") {\n return \"incompatible\";\n } else if (propCompatibility === \"runtime\") {\n hasRuntime = true;\n hasStatic = false;\n }\n }\n }\n\n // Check if target allows additional properties\n if (targetSchema.additionalProperties === false) {\n // Target doesn't allow additional properties, so source can't have extra properties\n const sourcePropNames = Object.keys(sourceProperties as Record<string, JsonSchema>);\n const targetPropNames = Object.keys(targetProperties as Record<string, JsonSchema>);\n const extraProps = sourcePropNames.filter((name) => !targetPropNames.includes(name));\n if (extraProps.length > 0) {\n return \"incompatible\";\n }\n }\n\n if (hasRuntime) return \"runtime\";\n return \"static\";\n }\n\n // Handle array types - check compatibility of array items and array format\n if (sourceType === \"array\" && targetType === \"array\") {\n // First check format on the array schema itself (e.g., format: \"Float64Array\")\n const sourceFormat = (sourceSchema as any)?.format;\n const targetFormat = (targetSchema as any)?.format;\n\n let formatCompatibility: \"static\" | \"runtime\" | \"incompatible\" | null = null;\n\n // Both have format: check compatibility using prefix matching\n if (sourceFormat && targetFormat) {\n formatCompatibility = areFormatStringsCompatible(sourceFormat, targetFormat);\n // If formats are incompatible, the arrays are incompatible\n if (formatCompatibility === \"incompatible\") {\n return \"incompatible\";\n }\n }\n\n // Source has format, target doesn't: static compatible (source is more specific)\n if (sourceFormat && !targetFormat) {\n return \"static\";\n }\n\n // Source doesn't have format, target does: incompatible (target requires format)\n if (!sourceFormat && targetFormat) {\n return \"incompatible\";\n }\n\n // Now check array items compatibility\n const sourceItems = sourceSchema.items;\n const targetItems = targetSchema.items;\n\n // If both have items schemas, recursively check compatibility\n if (\n sourceItems &&\n typeof sourceItems === \"object\" &&\n !Array.isArray(sourceItems) &&\n targetItems &&\n typeof targetItems === \"object\" &&\n !Array.isArray(targetItems)\n ) {\n const itemsCompatibility = areSemanticallyCompatible(\n sourceItems as JsonSchema,\n targetItems as JsonSchema\n );\n // If format requires runtime check, return runtime (more restrictive)\n if (formatCompatibility === \"runtime\") {\n return \"runtime\";\n }\n return itemsCompatibility;\n }\n\n // If target accepts any array items, it's statically compatible\n if (!targetItems) {\n return \"static\";\n }\n\n // If source has no items but target does, incompatible\n if (!sourceItems) {\n return \"incompatible\";\n }\n\n // If target items is an array (tuple), check if source is compatible with any item\n if (Array.isArray(targetItems)) {\n return isCompatibleWithUnion(sourceItems as JsonSchema, targetItems as JsonSchema[]);\n }\n\n // Fallback to static if we can't determine\n return \"static\";\n }\n\n // If source has no type constraint, it can be anything (compatible with any target)\n // But we need to check if target has constraints that might require runtime checks\n if (!sourceType) {\n // Source accepts any type, but target might have format requiring runtime check\n const targetFormat = (targetSchema as any)?.format;\n if (targetFormat) {\n return \"runtime\";\n }\n return \"static\";\n }\n\n // Check if types are statically compatible\n if (!targetType) {\n // Target has no type constraint, it accepts anything\n // But we still need to check format - if target requires format, source must have it\n const targetFormat = (targetSchema as any)?.format;\n if (targetFormat) {\n // Target requires format, check if source has it\n const sourceFormat = (sourceSchema as any)?.format;\n if (!sourceFormat) {\n return \"incompatible\";\n }\n // Both have format, check compatibility\n return areFormatStringsCompatible(sourceFormat, targetFormat);\n }\n return \"static\";\n }\n\n if (!isTypeStaticallyCompatible(sourceType, targetType)) {\n return \"incompatible\";\n }\n\n // If types are compatible, check format compatibility\n // Format checks apply to all types, not just strings\n // Access format field directly (it's a standard JSON Schema field)\n const sourceFormat = (sourceSchema as any)?.format;\n const targetFormat = (targetSchema as any)?.format;\n\n // Both have format: check compatibility using prefix matching\n if (sourceFormat && targetFormat) {\n return areFormatStringsCompatible(sourceFormat, targetFormat);\n }\n\n // Source has format, target doesn't: static compatible (source is more specific)\n if (sourceFormat && !targetFormat) {\n return \"static\";\n }\n\n // Source doesn't have format, target does: incompatible (target requires format)\n if (!sourceFormat && targetFormat) {\n return \"incompatible\";\n }\n\n // Neither has format: static compatible\n return \"static\";\n}\n\n/**\n * Checks if two object schemas are semantically compatible.\n * This is a helper function for checking object-level schema compatibility.\n */\nexport function areObjectSchemasSemanticallyCompatible(\n sourceSchema: JsonSchema,\n targetSchema: JsonSchema\n): \"static\" | \"runtime\" | \"incompatible\" {\n return areSemanticallyCompatible(sourceSchema, targetSchema);\n}\n",
15
15
  "/**\n * @license\n * Copyright 2025 Steven Roussey <sroussey@gmail.com>\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport { compileSchema } from \"json-schema-library\";\nexport type { SchemaNode } from \"json-schema-library\";\n",
16
16
  "/**\n * @license\n * Copyright 2025 Steven Roussey <sroussey@gmail.com>\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport function forceArray<T = any>(input: T | T[]): T[] {\n if (Array.isArray(input)) return input;\n return [input];\n}\n\nexport async function sleep(ms: number) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Takes an array of objects and collects values for each property into arrays\n * @param input Array of objects to process\n * @returns Object with arrays of values for each property\n */\nexport function collectPropertyValues<Input>(input: Input[]): { [K in keyof Input]: Input[K][] } {\n const output = {} as { [K in keyof Input]: Input[K][] };\n\n (input || []).forEach((item) => {\n Object.keys(item as object).forEach((key) => {\n const value = item[key as keyof Input];\n if (output[key as keyof Input]) {\n output[key as keyof Input].push(value);\n } else {\n output[key as keyof Input] = [value];\n }\n });\n });\n\n return output;\n}\n\nexport function toSQLiteTimestamp(date: Date | null | undefined) {\n if (!date) return null;\n const pad = (number: number) => (number < 10 ? \"0\" + number : number);\n\n const year = date.getUTCFullYear();\n const month = pad(date.getUTCMonth() + 1); // getUTCMonth() returns months from 0-11\n const day = pad(date.getUTCDate());\n const hours = pad(date.getUTCHours());\n const minutes = pad(date.getUTCMinutes());\n const seconds = pad(date.getUTCSeconds());\n\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\n}\n\nexport function deepEqual(a: any, b: any): boolean {\n if (a === b) {\n return true;\n }\n\n if (typeof a !== \"object\" || typeof b !== \"object\" || a == null || b == null) {\n return false;\n }\n\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n for (const key of keysA) {\n if (!keysB.includes(key)) {\n return false;\n }\n\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n\n return true;\n}\n\nexport function sortObject(obj: Record<string, any>): Record<string, any> {\n return Object.keys(obj)\n .sort()\n .reduce(\n (result, key) => {\n result[key] = obj[key];\n return result;\n },\n {} as Record<string, any>\n );\n}\n\nexport function serialize(obj: Record<string, any>): string {\n const sortedObj = sortObject(obj);\n return JSON.stringify(sortedObj);\n}\n",
17
17
  "/**\n * @license\n * Copyright 2025 Steven Roussey <sroussey@gmail.com>\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport type Cursor<T> = {\n length: number;\n next: () => IteratorResult<T>;\n [Symbol.iterator]: () => Iterator<T>;\n};\n/**\n * Creates a proxy that treats an object-of-arrays as an array-of-objects.\n * It lazily computes each row when accessed and lets you update or add new rows.\n *\n * When adding a new object (either via .push or assignment to the next index),\n * the underlying arrays are updated accordingly.\n *\n * @param data An object whose properties are arrays (assumed to have equal lengths)\n * @returns A proxy that behaves like an array of objects backed by the input arrays\n */\nexport function objectOfArraysAsArrayOfObjects<T extends Record<string, any>>(data: {\n [K in keyof T]: T[K][];\n}): Array<T> & { cursor: () => Cursor<T> } {\n // Get all keys from the object-of-arrays.\n const keys = Object.keys(data) as (keyof T)[];\n // confirm that all arrays have the same length\n const length = data[keys[0]].length;\n for (const key of keys) {\n if (data[key].length !== length) {\n console.error(\"All arrays must have the same length\", key, data[key].length, length, data);\n throw new Error(\"All arrays must have the same length\");\n }\n }\n\n const indexSymbol = Symbol(\"index\");\n\n /**\n * Creates a live row proxy for the given index.\n * The proxy intercepts get/set operations so that reads and writes\n * go directly to data[key][index].\n */\n function createRowProxy(index: number): T & { [indexSymbol]: number } {\n let currentIndex = index;\n return new Proxy({} as T & { [indexSymbol]: number }, {\n get(_target, prop, receiver) {\n if (currentIndex < 0 || currentIndex >= data[keys[0]].length) {\n return undefined;\n }\n if (typeof prop === \"string\" && keys.includes(prop as keyof T)) {\n return data[prop as keyof T][currentIndex];\n }\n if (prop === indexSymbol) {\n return currentIndex;\n }\n return Reflect.get(_target, prop, receiver);\n },\n set(_target, prop, value, receiver) {\n if (currentIndex < 0 || currentIndex >= data[keys[0]].length) {\n return false;\n }\n if (typeof prop === \"string\" && keys.includes(prop as keyof T)) {\n data[prop as keyof T][currentIndex] = value;\n return true;\n }\n if (prop === indexSymbol) {\n currentIndex = value;\n return true;\n }\n return Reflect.set(_target, prop, value, receiver);\n },\n ownKeys(_target) {\n return keys as string[];\n },\n getOwnPropertyDescriptor(_target, prop) {\n if (typeof prop === \"string\" && keys.includes(prop as keyof T)) {\n return { enumerable: true, configurable: true };\n }\n return undefined;\n },\n });\n }\n\n function createCursor(): Cursor<T> {\n // Determine the keys and the effective number of rows.\n let currentIndex = 0;\n\n // The cursor object that will be updated for each row.\n const cursor = createRowProxy(0);\n\n const obj = {\n get length() {\n return data[keys[0]].length;\n },\n /**\n * Returns the next row via the cursor.\n */\n next(): IteratorResult<T> {\n if (currentIndex < length) {\n cursor[indexSymbol] = currentIndex;\n currentIndex++;\n return { done: false, value: cursor };\n } else {\n return { done: true, value: undefined as any };\n }\n },\n /**\n * Makes the object iterable.\n */\n [Symbol.iterator](): Iterator<T> {\n // Reset the cursor for a fresh iteration.\n currentIndex = 0;\n cursor[indexSymbol] = currentIndex;\n return obj;\n },\n };\n return obj as Cursor<T>;\n }\n\n // Helper: shallow equality comparison between two rows.\n function shallowEqual(index: number, row: T): boolean {\n for (const key of keys) {\n if (data[key][index] !== row[key]) return false;\n }\n return true;\n }\n\n return new Proxy([] as Array<T>, {\n get(target, prop, receiver) {\n // Always return the current length dynamically.\n if (prop === \"length\") {\n return data[keys[0]].length;\n }\n\n // Create a cursor iterator.\n if (prop === \"cursor\") {\n return function () {\n return createCursor();\n };\n }\n\n // Override reverse to reverse the underlying arrays.\n if (prop === \"reverse\") {\n return function () {\n for (const key of keys) {\n data[key].reverse();\n }\n return receiver;\n };\n }\n\n // Override push to add a new object to the underlying arrays.\n if (prop === \"push\") {\n return function (...args: T[]) {\n for (const item of args) {\n for (const key of keys) {\n data[key].push(item[key]);\n }\n }\n return data[keys[0]].length;\n };\n }\n\n // Override pop to remove the last row from the underlying arrays and return it.\n if (prop === \"pop\") {\n return function () {\n const len = data[keys[0]].length;\n if (len === 0) return undefined;\n const poppedRow = {} as T;\n // Remove last element from each array and assemble the row to return.\n for (const key of keys) {\n poppedRow[key] = data[key].pop() as T[keyof T];\n }\n return poppedRow;\n };\n }\n\n // Override unshift to add a new row (or rows) at the beginning.\n if (prop === \"unshift\") {\n return function (...args: T[]) {\n // To preserve order, iterate from the last argument to the first.\n for (let i = args.length - 1; i >= 0; i--) {\n const item = args[i];\n for (const key of keys) {\n data[key].unshift(item[key]);\n }\n }\n return data[keys[0]].length;\n };\n }\n\n // Override shift to remove the first row from the underlying arrays and return it.\n if (prop === \"shift\") {\n return function () {\n if (data[keys[0]].length === 0) return undefined;\n const shiftedRow = {} as T;\n for (const key of keys) {\n shiftedRow[key] = data[key].shift() as T[keyof T];\n }\n return shiftedRow;\n };\n }\n\n // Override splice to remove or replace elements at a specific index.\n if (prop === \"splice\") {\n return function (start: number, deleteCount?: number, ...items: T[]) {\n const len = data[keys[0]].length;\n // Normalize start index.\n if (start < 0) {\n start = len + start;\n if (start < 0) start = 0;\n }\n if (deleteCount === undefined) {\n deleteCount = len - start;\n }\n // For each key, perform splice and capture removed elements.\n const removedByKey: { [K in keyof T]: T[K][] } = {} as any;\n for (const key of keys) {\n removedByKey[key] = data[key].splice(\n start,\n deleteCount,\n ...items.map((item) => item[key])\n );\n }\n // Combine removed elements into an array of objects.\n const removed: T[] = [];\n for (let i = 0; i < deleteCount; i++) {\n const row = {} as T;\n for (const key of keys) {\n row[key] = removedByKey[key][i];\n }\n removed.push(row);\n }\n return removed;\n };\n }\n\n // Override sort to sort the underlying arrays.\n // TODO(str): This is a bit of a hack. We should probably use a more efficient\n // way to do this.\n if (prop === \"sort\") {\n return function (compareFn?: (a: T, b: T) => number) {\n // Build an array of rows.\n const rows = [...receiver];\n // Sort rows.\n rows.sort(compareFn);\n // Write back sorted rows.\n for (const key of keys) {\n data[key] = rows.map((row) => row[key]);\n }\n return receiver;\n };\n }\n\n // Non-mutating Methods: now rewritten as follows.\n if (prop === \"includes\") {\n return function (searchElement: T, fromIndex?: number) {\n const len = data[keys[0]].length;\n let start = fromIndex ?? 0;\n if (start < 0) {\n start = Math.max(0, len + start);\n }\n for (let i = start; i < len; i++) {\n if (shallowEqual(i, searchElement)) return true;\n }\n return false;\n };\n }\n if (prop === \"indexOf\") {\n return function (searchElement: T, fromIndex?: number) {\n const len = data[keys[0]].length;\n let start = fromIndex ?? 0;\n if (start < 0) {\n start = Math.max(0, len + start);\n }\n for (let i = start; i < len; i++) {\n if (shallowEqual(i, searchElement)) return i;\n }\n return -1;\n };\n }\n if (prop === \"lastIndexOf\") {\n return function (searchElement: T, fromIndex?: number) {\n const len = data[keys[0]].length;\n // Default start index is the last element.\n let start = fromIndex ?? len - 1;\n if (start < 0) {\n start = len + start;\n }\n for (let i = start; i >= 0; i--) {\n if (shallowEqual(i, searchElement)) return i;\n }\n return -1;\n };\n }\n\n // Non-mutating methods implemented via an array of object row proxies.\n if (prop === \"forEach\") {\n return function (callback: (value: T, index: number, array: T[]) => void, thisArg?: any) {\n return [...receiver].forEach(callback, thisArg);\n };\n }\n if (prop === \"map\") {\n return function (callback: (value: T, index: number, array: T[]) => any, thisArg?: any) {\n return [...receiver].map(callback, thisArg);\n };\n }\n if (prop === \"filter\") {\n return function (\n callback: (value: T, index: number, array: T[]) => boolean,\n thisArg?: any\n ) {\n return [...receiver].filter(callback, thisArg);\n };\n }\n if (prop === \"reduce\") {\n return function (\n callback: (accumulator: any, currentValue: T, currentIndex: number, array: T[]) => any,\n initialValue?: any\n ) {\n return [...receiver].reduce(callback, initialValue);\n };\n }\n if (prop === \"find\") {\n return function (\n callback: (value: T, index: number, array: T[]) => boolean,\n thisArg?: any\n ) {\n return [...receiver].find(callback, thisArg);\n };\n }\n if (prop === \"every\") {\n return function (\n callback: (value: T, index: number, array: T[]) => boolean,\n thisArg?: any\n ) {\n return [...receiver].every(callback, thisArg);\n };\n }\n if (prop === \"some\") {\n return function (\n callback: (value: T, index: number, array: T[]) => boolean,\n thisArg?: any\n ) {\n return [...receiver].some(callback, thisArg);\n };\n }\n\n // When a numeric index is accessed, build and return the corresponding row.\n if (typeof prop === \"string\" && !isNaN(Number(prop))) {\n const index = Number(prop);\n if (index < 0 || index >= data[keys[0]].length) {\n return undefined;\n }\n return createRowProxy(index);\n }\n\n // Allow iteration over the rows.\n if (prop === Symbol.iterator) {\n return function* () {\n for (let i = 0; i < data[keys[0]].length; i++) {\n yield createRowProxy(i);\n }\n };\n }\n\n // Delegate any other property access.\n return Reflect.get(target, prop, receiver);\n },\n set(target, prop, value, receiver) {\n // Intercept numeric index assignments.\n if (typeof prop === \"string\" && !isNaN(Number(prop))) {\n const index = Number(prop);\n if (index === data[keys[0]].length) {\n // Appending a new row.\n for (const key of keys) {\n data[key].push(value[key]);\n }\n return true;\n } else if (index < data[keys[0]].length) {\n // Updating an existing row.\n for (const key of keys) {\n if (value.hasOwnProperty(key)) {\n data[key][index] = value[key];\n }\n }\n return true;\n }\n }\n return Reflect.set(target, prop, value, receiver);\n },\n // Intercept deletion of properties to remove a row from each underlying array.\n deleteProperty(target, prop) {\n if (typeof prop === \"string\" && !isNaN(Number(prop))) {\n const index = Number(prop);\n if (index >= 0 && index < data[keys[0]].length) {\n // Remove the element at this index from every underlying array.\n for (const key of keys) {\n // slice mutates the array in place\n data[key].splice(index, 1);\n }\n return true;\n }\n }\n return Reflect.deleteProperty(target, prop);\n },\n }) as Array<T> & { cursor: () => Cursor<T> };\n}\n",
18
18
  "/**\n * @license\n * Copyright 2025 Steven Roussey <sroussey@gmail.com>\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { createServiceToken, globalServiceRegistry } from \"../di\";\n\nexport class WorkerManager {\n private workers: Map<string, Worker> = new Map();\n private readyWorkers: Map<string, Promise<void>> = new Map();\n\n registerWorker(name: string, worker: Worker) {\n if (this.workers.has(name)) throw new Error(`Worker ${name} is already registered.`);\n this.workers.set(name, worker);\n\n this.workers.set(name, worker);\n worker.addEventListener(\"error\", (event) => {\n console.error(\"Worker Error:\", event.message, \"at\", event.filename, \"line:\", event.lineno);\n });\n worker.addEventListener(\"messageerror\", (event) => {\n console.error(\"Worker message error:\", event);\n });\n\n const readyPromise = new Promise<void>((resolve) => {\n const handleReady = (event: MessageEvent) => {\n if (event.data?.type === \"ready\") {\n worker.removeEventListener(\"message\", handleReady);\n resolve();\n }\n };\n\n worker.addEventListener(\"message\", handleReady);\n });\n\n this.readyWorkers.set(name, readyPromise);\n }\n\n getWorker(name: string): Worker {\n const worker = this.workers.get(name);\n if (!worker) throw new Error(`Worker ${name} not found.`);\n return worker;\n }\n\n async callWorkerFunction<T>(\n workerName: string,\n functionName: string,\n args: any[],\n options?: {\n signal?: AbortSignal;\n onProgress?: (progress: number, message?: string, details?: any) => void;\n }\n ): Promise<T> {\n const worker = this.workers.get(workerName);\n if (!worker) throw new Error(`Worker ${workerName} not found.`);\n await this.readyWorkers.get(workerName);\n\n return new Promise((resolve, reject) => {\n const requestId = crypto.randomUUID();\n\n const handleMessage = (event: MessageEvent) => {\n const { id, type, data } = event.data;\n if (id !== requestId) return;\n if (type === \"progress\" && options?.onProgress) {\n options.onProgress(data.progress, data.message, data.details);\n } else if (type === \"complete\") {\n cleanup();\n resolve(data);\n } else if (type === \"error\") {\n cleanup();\n reject(new Error(data));\n }\n };\n\n const handleAbort = () => {\n worker.postMessage({ id: requestId, type: \"abort\" });\n };\n\n const cleanup = () => {\n worker.removeEventListener(\"message\", handleMessage);\n options?.signal?.removeEventListener(\"abort\", handleAbort);\n };\n\n worker.addEventListener(\"message\", handleMessage);\n\n if (options?.signal) {\n options.signal.addEventListener(\"abort\", handleAbort, { once: true });\n }\n\n worker.postMessage({ id: requestId, type: \"call\", functionName, args });\n });\n }\n}\n\nexport const WORKER_MANAGER = createServiceToken<WorkerManager>(\"worker.manager\");\n\nglobalServiceRegistry.register(WORKER_MANAGER, () => new WorkerManager(), true);\n",
19
- "/**\n * @license\n * Copyright 2025 Steven Roussey <sroussey@gmail.com>\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { parentPort } from \"@workglow/util\";\nimport { createServiceToken, globalServiceRegistry } from \"../di\";\n\n/**\n * Extracts transferables from an object.\n * @param obj - The object to extract transferables from.\n * @returns An array of transferables.\n */\nfunction extractTransferables(obj: any) {\n const transferables: Transferable[] = [];\n\n function findTransferables(value: any) {\n if (value instanceof Float32Array || value instanceof Int16Array) {\n transferables.push(value.buffer);\n } else if (value && typeof value === \"object\") {\n Object.values(value).forEach(findTransferables);\n }\n }\n\n findTransferables(obj);\n return transferables;\n}\n\n/**\n * WorkerServer is a class that handles messages from the main thread to the worker.\n * It is used to register functions that can be called from the main thread.\n * It also handles the transfer of transferables to the main thread.\n */\nexport class WorkerServer {\n constructor() {\n parentPort?.addEventListener(\"message\", async (event) => {\n const msg = {\n type: event.type,\n // @ts-ignore - Ignore type mismatch between standard MessageEvent and our message type\n data: event.data,\n };\n await this.handleMessage(msg);\n });\n }\n\n private functions: Record<string, (...args: any[]) => Promise<any>> = {};\n\n private postResult = (id: string, result: any) => {\n const transferables = extractTransferables(result);\n // @ts-ignore - Ignore type mismatch between standard Transferable and Bun.Transferable\n postMessage({ id, type: \"complete\", data: result }, transferables);\n };\n\n private postError = (id: string, errorMessage: string) => {\n postMessage({ id, type: \"error\", data: errorMessage });\n };\n\n // Keep track of each request’s AbortController\n private requestControllers = new Map<string, AbortController>();\n\n registerFunction(name: string, fn: (...args: any[]) => Promise<any>) {\n this.functions[name] = fn;\n }\n\n // Handle messages from the main thread\n async handleMessage(event: { type: string; data: any }) {\n const { id, type, functionName, args } = event.data;\n if (type === \"abort\") {\n return await this.handleAbort(id);\n }\n if (type === \"call\") {\n return await this.handleCall(id, functionName, args);\n }\n }\n\n async handleAbort(id: string) {\n if (this.requestControllers.has(id)) {\n this.requestControllers.get(id)?.abort();\n }\n }\n\n async handleCall(id: string, functionName: string, [input, model]: [any, any]) {\n if (!(functionName in this.functions)) {\n this.postError(id, `Function ${functionName} not found`);\n return;\n }\n\n try {\n const abortController = new AbortController();\n this.requestControllers.set(id, abortController);\n\n const fn = this.functions[functionName];\n const postProgress = (progress: number, message?: string, details?: any) => {\n postMessage({ id, type: \"progress\", data: { progress, message, details } });\n };\n const result = await fn(input, model, postProgress, abortController.signal);\n this.postResult(id, result);\n } catch (error: any) {\n this.postError(id, error.message);\n } finally {\n this.requestControllers.delete(id);\n }\n }\n}\n\nexport const WORKER_SERVER = createServiceToken<WorkerServer>(\"worker.server\");\n\nglobalServiceRegistry.register(WORKER_SERVER, () => new WorkerServer(), true);\n",
19
+ "/**\n * @license\n * Copyright 2025 Steven Roussey <sroussey@gmail.com>\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { parentPort } from \"@workglow/util\";\nimport { createServiceToken, globalServiceRegistry } from \"../di\";\n\n/**\n * Extracts transferables from an object.\n * @param obj - The object to extract transferables from.\n * @returns An array of transferables.\n */\nfunction extractTransferables(obj: any) {\n const transferables: Transferable[] = [];\n\n function findTransferables(value: any) {\n if (value instanceof Float32Array || value instanceof Int16Array) {\n transferables.push(value.buffer);\n } else if (value && typeof value === \"object\") {\n Object.values(value).forEach(findTransferables);\n }\n }\n\n findTransferables(obj);\n return transferables;\n}\n\n/**\n * WorkerServer is a class that handles messages from the main thread to the worker.\n * It is used to register functions that can be called from the main thread.\n * It also handles the transfer of transferables to the main thread.\n */\nexport class WorkerServer {\n constructor() {\n parentPort?.addEventListener(\"message\", async (event) => {\n const msg = {\n type: event.type,\n // @ts-ignore - Ignore type mismatch between standard MessageEvent and our message type\n data: event.data,\n };\n await this.handleMessage(msg);\n });\n }\n\n private functions: Record<string, (...args: any[]) => Promise<any>> = {};\n\n // Keep track of each request's AbortController\n private requestControllers = new Map<string, AbortController>();\n // Keep track of requests that have already been responded to\n private completedRequests = new Set<string>();\n\n private postResult = (id: string, result: any) => {\n if (this.completedRequests.has(id)) {\n return; // Already responded to this request\n }\n this.completedRequests.add(id);\n const transferables = extractTransferables(result);\n // @ts-ignore - Ignore type mismatch between standard Transferable and Bun.Transferable\n postMessage({ id, type: \"complete\", data: result }, transferables);\n };\n\n private postError = (id: string, errorMessage: string) => {\n if (this.completedRequests.has(id)) {\n return; // Already responded to this request\n }\n this.completedRequests.add(id);\n postMessage({ id, type: \"error\", data: errorMessage });\n };\n\n registerFunction(name: string, fn: (...args: any[]) => Promise<any>) {\n this.functions[name] = fn;\n }\n\n // Handle messages from the main thread\n async handleMessage(event: { type: string; data: any }) {\n const { id, type, functionName, args } = event.data;\n if (type === \"abort\") {\n return await this.handleAbort(id);\n }\n if (type === \"call\") {\n return await this.handleCall(id, functionName, args);\n }\n }\n\n async handleAbort(id: string) {\n if (this.requestControllers.has(id)) {\n const controller = this.requestControllers.get(id);\n controller?.abort();\n this.requestControllers.delete(id);\n // Send error response back to main thread so the promise rejects\n this.postError(id, \"Operation aborted\");\n }\n }\n\n async handleCall(id: string, functionName: string, [input, model]: [any, any]) {\n if (!(functionName in this.functions)) {\n this.postError(id, `Function ${functionName} not found`);\n return;\n }\n\n try {\n const abortController = new AbortController();\n this.requestControllers.set(id, abortController);\n\n const fn = this.functions[functionName];\n const postProgress = (progress: number, message?: string, details?: any) => {\n // Don't send progress updates after the request is completed/aborted\n if (!this.completedRequests.has(id)) {\n postMessage({ id, type: \"progress\", data: { progress, message, details } });\n }\n };\n const result = await fn(input, model, postProgress, abortController.signal);\n this.postResult(id, result);\n } catch (error: any) {\n this.postError(id, error.message);\n } finally {\n this.requestControllers.delete(id);\n // Clean up completed requests set after a delay to handle any race conditions\n // where abort message might arrive shortly after completion\n setTimeout(() => {\n this.completedRequests.delete(id);\n }, 1000);\n }\n }\n}\n\nexport const WORKER_SERVER = createServiceToken<WorkerServer>(\"worker.server\");\n\nglobalServiceRegistry.register(WORKER_SERVER, () => new WorkerServer(), true);\n",
20
20
  "/**\n * @license\n * Copyright 2025 Steven Roussey <sroussey@gmail.com>\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Browser environment\n\nexport async function compress(\n input: string | Uint8Array,\n algorithm: \"gzip\" | \"br\" = \"gzip\"\n): Promise<Uint8Array> {\n const sourceBlob = new Blob([typeof input === \"string\" ? input : new Uint8Array(input)]);\n const compressedStream = sourceBlob\n .stream()\n .pipeThrough(new CompressionStream(algorithm as CompressionFormat));\n const compressedBuffer = await new Response(compressedStream).arrayBuffer();\n return new Uint8Array(compressedBuffer);\n}\n\nexport async function decompress(\n input: Uint8Array,\n algorithm: \"gzip\" | \"br\" = \"gzip\"\n): Promise<string> {\n const sourceBlob = new Blob([new Uint8Array(input)]);\n const decompressedStream = sourceBlob\n .stream()\n .pipeThrough(new DecompressionStream(algorithm as CompressionFormat));\n return await new Response(decompressedStream).text();\n}\n",
21
21
  "/**\n * @license\n * Copyright 2025 Steven Roussey <sroussey@gmail.com>\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Browser environment\n\nimport { serialize } from \"../utilities/Misc\";\n\nexport async function sha256(data: string) {\n const encoder = new TextEncoder();\n return window.crypto.subtle.digest(\"SHA-256\", encoder.encode(data)).then((hashBuffer) => {\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n return hashArray.map((b) => b.toString(16).padStart(2, \"0\")).join(\"\");\n });\n}\n\nexport async function makeFingerprint(input: any): Promise<string> {\n const serializedObj = serialize(input);\n const hash = await sha256(serializedObj);\n return hash;\n}\n\nexport function uuid4() {\n return crypto.randomUUID();\n}\n",
22
22
  "const Worker = globalThis.Worker;\nconst parentPort = self;\nexport { Worker, parentP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,WAAW,KAAK,CAAC,CAAC;AAAA,EACnD,MAAM,qBAAqB,WACxB,OAAO,EACP,YAAY,IAAI,oBAAoB,SAA8B,CAAC;AAAA,EACtE,OAAO,MAAM,IAAI,SAAS,kBAAkB,EAAE,KAAK;AAAA;;AClBrD,eAAsB,MAAM,CAAC,MAAc;AAAA,EACzC,MAAM,UAAU,IAAI;AAAA,EACpB,OAAO,OAAO,OAAO,OAAO,OAAO,WAAW,QAAQ,OAAO,IAAI,CAAC,EAAE,KAAK,CAAC,eAAe;AAAA,IACvF,MAAM,YAAY,MAAM,KAAK,IAAI,WAAW,UAAU,CAAC;AAAA,IACvD,OAAO,UAAU,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,EAAE,KAAK,EAAE;AAAA,GACrE;AAAA;AAGH,eAAsB,eAAe,CAAC,OAA6B;AAAA,EACjE,MAAM,gBAAgB,UAAU,KAAK;AAAA,EACrC,MAAM,OAAO,MAAM,OAAO,aAAa;AAAA,EACvC,OAAO;AAAA;AAGF,SAAS,KAAK,GAAG;AAAA,EACtB,OAAO,OAAO,WAAW;AAAA;;ACzB3B,IAAM,SAAS,WAAW;AAC1B,IAAM,cAAa;",
25
+ "debugId": "C407F56AAA12137164756E2164756E21",
26
26
  "names": []
27
27
  }
package/dist/bun.js CHANGED
@@ -609,7 +609,7 @@ class DirectedAcyclicGraph extends DirectedGraph {
609
609
  // src/json-schema/FromSchema.ts
610
610
  var FromSchemaDefaultOptions = {
611
611
  parseNotKeyword: true,
612
- parseIfThenElseKeywords: false,
612
+ parseIfThenElseKeywords: true,
613
613
  keepDefaultedPropertiesOptional: true,
614
614
  references: false,
615
615
  deserialize: false
@@ -1434,14 +1434,23 @@ class WorkerServer {
1434
1434
  });
1435
1435
  }
1436
1436
  functions = {};
1437
+ requestControllers = new Map;
1438
+ completedRequests = new Set;
1437
1439
  postResult = (id, result) => {
1440
+ if (this.completedRequests.has(id)) {
1441
+ return;
1442
+ }
1443
+ this.completedRequests.add(id);
1438
1444
  const transferables = extractTransferables(result);
1439
1445
  postMessage({ id, type: "complete", data: result }, transferables);
1440
1446
  };
1441
1447
  postError = (id, errorMessage) => {
1448
+ if (this.completedRequests.has(id)) {
1449
+ return;
1450
+ }
1451
+ this.completedRequests.add(id);
1442
1452
  postMessage({ id, type: "error", data: errorMessage });
1443
1453
  };
1444
- requestControllers = new Map;
1445
1454
  registerFunction(name, fn) {
1446
1455
  this.functions[name] = fn;
1447
1456
  }
@@ -1456,7 +1465,10 @@ class WorkerServer {
1456
1465
  }
1457
1466
  async handleAbort(id) {
1458
1467
  if (this.requestControllers.has(id)) {
1459
- this.requestControllers.get(id)?.abort();
1468
+ const controller = this.requestControllers.get(id);
1469
+ controller?.abort();
1470
+ this.requestControllers.delete(id);
1471
+ this.postError(id, "Operation aborted");
1460
1472
  }
1461
1473
  }
1462
1474
  async handleCall(id, functionName, [input, model]) {
@@ -1469,7 +1481,9 @@ class WorkerServer {
1469
1481
  this.requestControllers.set(id, abortController);
1470
1482
  const fn = this.functions[functionName];
1471
1483
  const postProgress = (progress, message, details) => {
1472
- postMessage({ id, type: "progress", data: { progress, message, details } });
1484
+ if (!this.completedRequests.has(id)) {
1485
+ postMessage({ id, type: "progress", data: { progress, message, details } });
1486
+ }
1473
1487
  };
1474
1488
  const result = await fn(input, model, postProgress, abortController.signal);
1475
1489
  this.postResult(id, result);
@@ -1477,6 +1491,9 @@ class WorkerServer {
1477
1491
  this.postError(id, error.message);
1478
1492
  } finally {
1479
1493
  this.requestControllers.delete(id);
1494
+ setTimeout(() => {
1495
+ this.completedRequests.delete(id);
1496
+ }, 1000);
1480
1497
  }
1481
1498
  }
1482
1499
  }
@@ -1555,4 +1572,4 @@ export {
1555
1572
  BaseError
1556
1573
  };
1557
1574
 
1558
- //# debugId=A2B0C1B7B1A109CA64756E2164756E21
1575
+ //# debugId=20D5BBDCD7ADF36A64756E2164756E21