chartmind 1.0.5 → 1.0.7

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/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # 🧠 chartmind
2
2
 
3
+ [![NPM Version][npm-chartmind-version]][npm-chartmind-url]
3
4
  [![Code Style: Google][gts-badge-image]][gts-github-url]
4
5
  [![codecov][codecov-badge]][codecov-project]
5
6
 
@@ -97,7 +98,7 @@ async function start() {
97
98
  ['counter', 1]
98
99
  ]);
99
100
 
100
- await chartManager.startProcess(chartName, chartContext);
101
+ await chartManager.startChartInstanceByName(chartName, chartContext);
101
102
 
102
103
  console.log(chartContext.get('counter')); // Output: 2
103
104
  } catch(error: unknown) {
@@ -130,12 +131,13 @@ In the background, the corresponding chart ID is stored in the symbol. The engin
130
131
 
131
132
  The following table describes the available symbol properties, on which symbols these can be used, valid values, and descriptions:
132
133
 
133
- Name | Symbol(s) | Possible Values | Description | Required
134
- ---------|------------------------|-------------------------|-----------------------|:----------:
135
- type | Start, End, Connection, Decision, Process, Predefined process | start, end, connection, decision, process, predefined | Defines how the symbol will be interpreted by the engine. | Always
136
- condition | Connection | e.g. counter % 2 === 0 or text === 'foo' | Controls the flow from a decision symbol. Every connection must have a condition except the one marked as default. | All outgoing connections from a decision symbol must have a condition, except the one marked as default.
137
- default | Connection | 1 | Marks a connection as the default path. If all other conditions evaluate to false, this path is taken. Only one default should exist. | At least one outgoing connection from a decision symbol must be marked as the default.
138
- executable | Process | e.g. increment-counter | Key for the class registered in the registry. | Always
134
+ Name | Symbol(s) | Possible Values | Description
135
+ ---------|------------------------|-------------------------|-----------------------
136
+ type | Start, End, Connection, Decision, Process, Predefined process | start, end, connection, decision, process, predefined | Defines how the symbol will be interpreted by the engine.
137
+ condition | Connection | e.g. counter % 2 === 0 or text === 'foo' | Controls the flow from a `decision` symbol. All outgoing connections must have a condition, except the one marked as default.
138
+ default | Connection | 1 | Controls the flow from a `decision` symbol. Marks a connection as the default path. If all other conditions evaluate to false, this path is taken. Just one outgoing connection must be marked as the default.
139
+ executable | Process | e.g. increment-counter | Key for the class registered in the registry.
140
+ data | Process | any data in JSON format | Is added to the context before the class is executed. These values are not removed after execution but remain in the context until the chart is completed.
139
141
 
140
142
  All of these properties are pre-configured in the provided symbol library.
141
143
  Only the `type` field is already filled — the rest must be completed manually for each symbol.
@@ -158,4 +160,6 @@ This project is licensed under the [MIT License][license].
158
160
  [gts-badge-image]: https://img.shields.io/badge/code%20style-google-blueviolet.svg
159
161
  [gts-github-url]: https://github.com/google/gts
160
162
  [codecov-badge]: https://codecov.io/gh/zniptr/chartmind/graph/badge.svg
161
- [codecov-project]: https://codecov.io/gh/zniptr/chartmind
163
+ [codecov-project]: https://codecov.io/gh/zniptr/chartmind
164
+ [npm-chartmind-version]: https://img.shields.io/npm/v/chartmind
165
+ [npm-chartmind-url]: https://www.npmjs.com/package/chartmind
@@ -23,8 +23,9 @@ class DecisionAction extends base_action_1.BaseAction {
23
23
  this.evaluateCondition(connection.condition, chartContext));
24
24
  }
25
25
  evaluateCondition(condition, chartContext) {
26
- chartContext.context.forEach((value, key) => (condition = condition.replaceAll(key.toString(), String(value))));
27
- return eval(condition);
26
+ const keys = Array.from(chartContext.context.keys());
27
+ const values = Array.from(chartContext.context.values());
28
+ return new Function(...keys, `return ${condition}`)(...values);
28
29
  }
29
30
  getDefaultConnection(connections) {
30
31
  return connections.find(connections => connections.default === '1');
@@ -1 +1 @@
1
- {"version":3,"file":"decision-action.js","sourceRoot":"","sources":["../../../../src/engine/actions/decision-action.ts"],"names":[],"mappings":";;;AAGA,+CAAyC;AAEzC,MAAa,cAAe,SAAQ,wBAAU;IACrC,KAAK,CAAC,OAAO;QAClB,2DAA2D;IAC7D,CAAC;IAEM,OAAO,CAAC,YAA0B;QACvC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QA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M,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;QAEzD,OAAO,IAAI,QAAQ,CAAC,GAAG,IAAI,EAAE,UAAU,SAAS,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;IACjE,CAAC;IAEO,oBAAoB,CAC1B,WAA+B;QAE/B,OAAO,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,KAAK,GAAG,CAAC,CAAC;IACtE,CAAC;CACF;AAlDD,wCAkDC"}
@@ -3,5 +3,6 @@ import { BaseAction } from './base-action';
3
3
  import { SymbolChart } from '../../types/symbol-chart.type';
4
4
  export declare class ProcessAction extends BaseAction {
5
5
  execute(chartContext: ChartContext): Promise<void>;
6
+ private addDataToContext;
6
7
  getNext(): SymbolChart | undefined;
7
8
  }
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProcessAction = void 0;
4
4
  const base_action_1 = require("./base-action");
5
5
  const executable_registry_1 = require("../registry/executable-registry");
6
+ const he_1 = require("he");
6
7
  class ProcessAction extends base_action_1.BaseAction {
7
8
  async execute(chartContext) {
8
9
  const processSymbol = this.symbol;
10
+ this.addDataToContext(processSymbol.data, chartContext);
9
11
  const executableName = processSymbol.executable;
10
12
  const Executable = executable_registry_1.ExecutableRegistry.instance.getExecutableByName(executableName);
11
13
  if (Executable) {
@@ -18,6 +20,17 @@ class ProcessAction extends base_action_1.BaseAction {
18
20
  // console.log(`SymbolProcess ${this.symbol.label} executed.`);
19
21
  return;
20
22
  }
23
+ addDataToContext(data, chartContext) {
24
+ if (!data) {
25
+ return;
26
+ }
27
+ const unescapedData = (0, he_1.decode)(data);
28
+ const parsedData = JSON.parse(unescapedData);
29
+ const keys = Object.keys(parsedData);
30
+ for (const key of keys) {
31
+ chartContext.setVariable(key, parsedData[key]);
32
+ }
33
+ }
21
34
  getNext() {
22
35
  const connection = this.chart.getConnectionBySourceId(this.symbol.id);
23
36
  if (!connection || !connection.mxCell.target) {
@@ -1 +1 @@
1
- {"version":3,"file":"process-action.js","sourceRoot":"","sources":["../../../../src/engine/actions/process-action.ts"],"names":[],"mappings":";;;AACA,+CAAyC;AAEzC,yEAAmE;AAGnE,MAAa,aAAc,SAAQ,wBAAU;IACpC,KAAK,CAAC,OAAO,CAAC,YAA0B;QAC7C,MAAM,aAAa,GAAG,IAAI,CAAC,MAAuB,CAAC;QACnD,MAAM,cAAc,GAAG,aAAa,CAAC,UAAU,CAAC;QAChD,MAAM,UAAU,GACd,wCAAkB,CAAC,QAAQ,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;QAElE,IAAI,UAAU,EAAE,CAAC;YACf,MAAM,QAAQ,GAAG,IAAI,UAAU,EAAE,CAAC;YAElC,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YAC9C,IAAI,MAAM,YAAY,OAAO,EAAE,CAAC;gBAC9B,MAAM,MAAM,CAAC;YACf,CAAC;QACH,CAAC;QAED,+DAA+D;QAC/D,OAAO;IACT,CAAC;IAEM,OAAO;QACZ,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAEtE,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YAC7C,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC5D,CAAC;CACF;AA7BD,sCA6BC"}
1
+ {"version":3,"file":"process-action.js","sourceRoot":"","sources":["../../../../src/engine/actions/process-action.ts"],"names":[],"mappings":";;;AACA,+CAAyC;AAEzC,yEAAmE;AAEnE,2BAA0B;AAE1B,MAAa,aAAc,SAAQ,wBAAU;IACpC,KAAK,CAA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,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC5D,CAAC;CACF;AAjDD,sCAiDC"}
@@ -7,13 +7,13 @@
7
7
  */
8
8
  export declare class ChartContext {
9
9
  private _context;
10
- constructor(context: Map<String, unknown>);
10
+ constructor(context: Map<string, unknown>);
11
11
  /**
12
12
  * Gets the underlying context map containing all variables.
13
13
  *
14
14
  * @returns The map of variable names to their corresponding values.
15
15
  */
16
- get context(): Map<String, unknown>;
16
+ get context(): Map<string, unknown>;
17
17
  /**
18
18
  * Sets a variable in the context.
19
19
  *
@@ -46,7 +46,30 @@ export declare class ChartManager {
46
46
  * @returns The current instance of {@link ChartManager} to allow method chaining.
47
47
  */
48
48
  validateChartByName(name: string): ChartManager;
49
- startChartInstanceByName(name: string, context: Map<String, unknown>): Promise<void>;
50
- startChartInstanceById(id: string, context: Map<String, unknown>): Promise<void>;
49
+ /**
50
+ * Starts a chart instance by its registered name.
51
+ *
52
+ * Looks up the chart by the provided name and, if found, starts the chart instance
53
+ * using the given context. Throws an error if the chart name is unknown.
54
+ *
55
+ * @param name - The name of the chart to start.
56
+ * @param context - A map containing context data to be passed to the chart instance.
57
+ * @returns A promise that resolves when the chart instance has been started.
58
+ * @throws {Error} If the chart with the specified name does not exist.
59
+ */
60
+ startChartInstanceByName(name: string, context: Map<string, unknown>): Promise<void>;
61
+ /**
62
+ * Starts a chart instance by its unique identifier.
63
+ *
64
+ * Iterates through the available charts and, if a chart with the specified `id` is found,
65
+ * starts the chart using the provided execution `context`. If no chart with the given `id`
66
+ * exists, an error is thrown.
67
+ *
68
+ * @param id - The unique identifier of the chart to start.
69
+ * @param context - A map containing contextual information required to start the chart.
70
+ * @returns A promise that resolves when the chart has been started, or rejects if the chart ID is unknown.
71
+ * @throws {Error} If no chart with the specified `id` is found.
72
+ */
73
+ startChartInstanceById(id: string, context: Map<string, unknown>): Promise<void>;
51
74
  private startChart;
52
75
  }
@@ -83,6 +83,17 @@ class ChartManager {
83
83
  }
84
84
  return this;
85
85
  }
86
+ /**
87
+ * Starts a chart instance by its registered name.
88
+ *
89
+ * Looks up the chart by the provided name and, if found, starts the chart instance
90
+ * using the given context. Throws an error if the chart name is unknown.
91
+ *
92
+ * @param name - The name of the chart to start.
93
+ * @param context - A map containing context data to be passed to the chart instance.
94
+ * @returns A promise that resolves when the chart instance has been started.
95
+ * @throws {Error} If the chart with the specified name does not exist.
96
+ */
86
97
  async startChartInstanceByName(name, context) {
87
98
  const chart = this.charts.get(name);
88
99
  if (!chart) {
@@ -90,6 +101,18 @@ class ChartManager {
90
101
  }
91
102
  return this.startChart(chart, context);
92
103
  }
104
+ /**
105
+ * Starts a chart instance by its unique identifier.
106
+ *
107
+ * Iterates through the available charts and, if a chart with the specified `id` is found,
108
+ * starts the chart using the provided execution `context`. If no chart with the given `id`
109
+ * exists, an error is thrown.
110
+ *
111
+ * @param id - The unique identifier of the chart to start.
112
+ * @param context - A map containing contextual information required to start the chart.
113
+ * @returns A promise that resolves when the chart has been started, or rejects if the chart ID is unknown.
114
+ * @throws {Error} If no chart with the specified `id` is found.
115
+ */
93
116
  async startChartInstanceById(id, context) {
94
117
  const charts = this.charts.values();
95
118
  for (const chart of charts) {
@@ -1 +1 @@
1
- {"version":3,"file":"chart-manager.js","sourceRoot":"","sources":["../../../../../src/engine/chart/manager/chart-manager.ts"],"names":[],"mappings":";;;AAAA,4DAAsD;AACtD,+DAAyD;AACzD,mEAA6D;AAC7D,0DAAoD;AACpD,yDAAmD;AAInD;;;;;;;;;;GAUG;AACH,MAAa,YAAY;IACN,MAAM,GAAuB,IAAI,GAAG,EAAiB,CAAC;IAE/D,cAAc,CAAiB;IAC/B,WAAW,CAAc;IACzB,WAAW,CAAc;IAEjC;QACE,IAAI,CAAC,cAAc,GAAG,IAAI,gCAAc,EAAE,CAAC;QAC3C,IAAI,CAAC,WAAW,GAAG,IAAI,0BAAW,EAAE,CAAC;QACrC,IAAI,CAAC,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,CAAC;QAEnE,OAAO,aAAa,CAAC,GAAG,EAAE,CAAC;IAC7B,CAAC;CACF;AA9ID,oCA8IC"}
@@ -1,4 +1,5 @@
1
1
  import { Symbol } from './symbol.interface';
2
2
  export interface SymbolProcess extends Symbol {
3
3
  executable: string;
4
+ data?: string;
4
5
  }
package/package.json CHANGED
@@ -1,52 +1,58 @@
1
- {
2
- "name": "chartmind",
3
- "version": "1.0.5",
4
- "description": "Flowchart execution engine for drawio charts",
5
- "main": "build/src/index.js",
6
- "module": "build/src/index.js",
7
- "types": "build/src/index.d.ts",
8
- "scripts": {
9
- "test": "npm run test:unit && npm run test:e2e",
10
- "test:unit": "jest --config jest.unit.config.ts",
11
- "test:e2e": "jest --config jest.e2e.config.ts",
12
- "lint": "gts lint",
13
- "clean": "gts clean",
14
- "compile": "tsc",
15
- "fix": "gts fix",
16
- "prepare": "npm run compile",
17
- "pretest": "npm run compile",
18
- "posttest": "npm run lint"
19
- },
20
- "keywords": [
21
- "flow",
22
- "chart",
23
- "drawio",
24
- "draw",
25
- "diagram",
26
- "engine"
27
- ],
28
- "repository": {
29
- "type": "git",
30
- "url": "https://github.com/zniptr/chartmind"
31
- },
32
- "author": "Timo Martin",
33
- "license": "MIT",
34
- "type": "commonjs",
35
- "devDependencies": {
36
- "@types/jest": "^29.5.14",
37
- "gts": "^6.0.2",
38
- "jest": "^30.0.0",
39
- "ts-jest": "^29.4.0",
40
- "ts-node": "^10.9.2",
41
- "typescript": "^5.8.3"
42
- },
43
- "dependencies": {
44
- "fast-xml-parser": "^5.2.5"
45
- },
46
- "files": [
47
- "build/src"
48
- ],
49
- "engines": {
50
- "node": ">=10.10.0"
51
- }
52
- }
1
+ {
2
+ "name": "chartmind",
3
+ "version": "1.0.7",
4
+ "description": "Flowchart execution engine for drawio charts",
5
+ "main": "build/src/index.js",
6
+ "module": "build/src/index.js",
7
+ "types": "build/src/index.d.ts",
8
+ "scripts": {
9
+ "test": "npm run test:unit && npm run test:e2e",
10
+ "test:unit": "jest --config jest.unit.config.ts",
11
+ "test:e2e": "jest --config jest.e2e.config.ts",
12
+ "lint": "gts lint",
13
+ "clean": "gts clean",
14
+ "compile": "tsc",
15
+ "fix": "gts fix",
16
+ "prepare": "npm run compile",
17
+ "pretest": "npm run compile",
18
+ "posttest": "npm run lint"
19
+ },
20
+ "keywords": [
21
+ "flow",
22
+ "chart",
23
+ "flowchart",
24
+ "drawio",
25
+ "draw",
26
+ "diagram",
27
+ "diagrams",
28
+ "engine",
29
+ "workflow",
30
+ "typescript"
31
+ ],
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "https://github.com/zniptr/chartmind"
35
+ },
36
+ "author": "Timo Martin",
37
+ "license": "MIT",
38
+ "type": "commonjs",
39
+ "devDependencies": {
40
+ "@types/he": "^1.2.3",
41
+ "@types/jest": "^29.5.14",
42
+ "gts": "^6.0.2",
43
+ "jest": "^30.0.0",
44
+ "ts-jest": "^29.4.0",
45
+ "ts-node": "^10.9.2",
46
+ "typescript": "^5.8.3"
47
+ },
48
+ "dependencies": {
49
+ "fast-xml-parser": "^5.2.5",
50
+ "he": "^1.2.0"
51
+ },
52
+ "files": [
53
+ "build/src"
54
+ ],
55
+ "engines": {
56
+ "node": ">=10.10.0"
57
+ }
58
+ }