@veridid/workflow-parser 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 VeriDID
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # workflow-parser
2
+
3
+ Workflow Parser is a TypeScript Node.js module for parsing and managing workflow definitions in a PostgreSQL database. It retrieves workflows and instances, parses data, and handles state transitions. Ideal for managing complex workflows and integrating action-menu features.
4
+
5
+ ## Key Features
6
+
7
+ - **Database Integration:** Connects to a PostgreSQL database to store and manage workflow definitions and instances.
8
+ - **Workflow Management:** Supports defining workflows with states, transitions, actions, and display data.
9
+ - **State Parsing:** Parses workflows to handle state transitions based on predefined conditions.
10
+ - **Modular Design:** Can be easily integrated into different applications, including NestJS projects.
11
+
12
+ ## development
13
+
14
+ ```sh
15
+ npm run build
16
+ ```
17
+
18
+ and
19
+
20
+ Must be logged into npm
21
+
22
+ ```sh
23
+ npm publish
24
+ ```
25
+
26
+ ## Installation
27
+
28
+ ```sh
29
+ npm install @@nas-veridid/workflow-parser
30
+ ```
31
+
32
+ or
33
+
34
+ ```sh
35
+ yarn add @@nas-veridid/workflow-parser
36
+ ```
@@ -0,0 +1,16 @@
1
+ CREATE TABLE workflows (
2
+ "workflowID" VARCHAR(255) PRIMARY KEY,
3
+ name VARCHAR(255) NOT NULL,
4
+ "formatVersion" VARCHAR(50) NOT NULL,
5
+ "initialState" VARCHAR(255) NOT NULL,
6
+ render JSONB NOT NULL,
7
+ states JSONB NOT NULL
8
+ );
9
+
10
+ CREATE TABLE instances (
11
+ "instanceID" UUID PRIMARY KEY DEFAULT gen_random_uuid(),
12
+ "workflowID" VARCHAR(255) REFERENCES workflows("workflowID"),
13
+ "connectionID" VARCHAR(255),
14
+ "currentState" VARCHAR(255),
15
+ "stateData" JSONB
16
+ );
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@veridid/workflow-parser",
3
+ "version": "0.3.0",
4
+ "description": "Workflow Parser is a TypeScript Node.js module for parsing and managing workflow definitions in a PostgreSQL database.",
5
+ "main": "dist/index.js",
6
+ "scripts": {
7
+ "build": "mkdir -p dist && cp src/schema.sql dist/",
8
+ "start": "node dist/index.js",
9
+ "prepublishOnly": "npm run build",
10
+ "test": "echo \"Error: no test specified\" && exit 1"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/VeriDID/workflow-parser.git"
15
+ },
16
+ "keywords": [
17
+ "workflow",
18
+ "parser",
19
+ "action-menu"
20
+ ],
21
+ "author": "Nas Til",
22
+ "license": "Apache-2.0",
23
+ "bugs": {
24
+ "url": "https://github.com/VeriDID/workflow-parser/issues"
25
+ },
26
+ "homepage": "https://github.com/VeriDID/workflow-parser#readme",
27
+ "dependencies": {
28
+ "dotenv": "^16.4.5",
29
+ "pg": "^8.12.0",
30
+ "uuid": "^10.0.0"
31
+ },
32
+ "devDependencies": {
33
+ "@types/dotenv": "^8.2.0",
34
+ "@types/node": "^20.14.2",
35
+ "@types/pg": "^8.11.6",
36
+ "@types/uuid": "^9.0.8",
37
+ "typescript": "^5.4.5"
38
+ },
39
+ "files": [
40
+ "dist"
41
+ ]
42
+ }