graphai 0.6.15 → 0.6.17

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.
@@ -65,7 +65,10 @@ const propStringFunction = (result, propId) => {
65
65
  if (propId === "toUpperCase()") {
66
66
  return result.toUpperCase();
67
67
  }
68
- // split()
68
+ const match = propId.match(/^split\(([-_:;.,\s\n]+)\)$/);
69
+ if (match) {
70
+ return result.split(match[1]);
71
+ }
69
72
  }
70
73
  return undefined;
71
74
  };
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cleanResult = exports.cleanResultInner = exports.resultOf = exports.resultsOf = void 0;
4
- const utils_1 = require("../utils/utils");
5
- const data_source_1 = require("../utils/data_source");
4
+ const utils_1 = require("./utils");
5
+ const data_source_1 = require("./data_source");
6
6
  const resultsOfInner = (input, nodes, propFunctions, isSelfNode = false) => {
7
7
  if (Array.isArray(input)) {
8
8
  return input.map((inp) => resultsOfInner(inp, nodes, propFunctions, isSelfNode));
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.agentValidator = void 0;
4
- const common_1 = require("../validators/common");
4
+ const common_1 = require("./common");
5
5
  const agentValidator = (graphAgentIds, agentIds) => {
6
6
  graphAgentIds.forEach((agentId) => {
7
7
  // agentId or dynamic agentId
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.computedNodeValidator = void 0;
4
- const common_1 = require("../validators/common");
4
+ const common_1 = require("./common");
5
5
  const computedNodeValidator = (nodeData) => {
6
6
  Object.keys(nodeData).forEach((key) => {
7
7
  if (!common_1.computedNodeAttributeKeys.includes(key)) {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.graphDataValidator = exports.graphNodesValidator = void 0;
4
- const common_1 = require("../validators/common");
4
+ const common_1 = require("./common");
5
5
  const graphNodesValidator = (data) => {
6
6
  if (data.nodes === undefined) {
7
7
  throw new common_1.ValidationError("Invalid Graph Data: no nodes");
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.nodeValidator = void 0;
4
- const common_1 = require("../validators/common");
4
+ const common_1 = require("./common");
5
5
  const nodeValidator = (nodeData) => {
6
6
  if (nodeData.agent && nodeData.value) {
7
7
  throw new common_1.ValidationError("Cannot set both agent and value");
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.relationValidator = void 0;
4
4
  const utils_1 = require("../utils/utils");
5
- const common_1 = require("../validators/common");
6
5
  const nodeUtils_1 = require("../utils/nodeUtils");
6
+ const common_1 = require("./common");
7
7
  const relationValidator = (graphData, staticNodeIds, computedNodeIds) => {
8
8
  const nodeIds = new Set(Object.keys(graphData.nodes));
9
9
  const pendings = {};
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.staticNodeValidator = void 0;
4
- const common_1 = require("../validators/common");
4
+ const common_1 = require("./common");
5
5
  const staticNodeValidator = (nodeData) => {
6
6
  Object.keys(nodeData).forEach((key) => {
7
7
  if (!common_1.staticNodeAttributeKeys.includes(key)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphai",
3
- "version": "0.6.15",
3
+ "version": "0.6.17",
4
4
  "description": "Asynchronous data flow execution engine for agentic AI apps.",
5
5
  "main": "lib/bundle.cjs.js",
6
6
  "module": "lib/bundle.esm.js",