Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
145 lines (145 loc) · 4.64 KB
/
Copy pathpackage.json
File metadata and controls
145 lines (145 loc) · 4.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
{
"name": "@cocreate/workflows",
"version": "1.0.0",
"description": "Declarative client actions and tenant-scoped server execution for CoCreate workflows.",
"keywords": [
"cocreate",
"workflows",
"ast",
"client",
"server",
"orchestration"
],
"publishConfig": {
"access": "public"
},
"cocreate": {
"environment": [
"client",
"server"
],
"interface": {
"schemaVersion": 1,
"summary": "Loads and executes organization-scoped workflow records using CoCreate AST.",
"client": {
"declarative": {
"binding": {
"selectors": [
"[workflow]"
],
"triggers": [
"Actions invocation",
"native events from {workflowName}-on"
],
"initializesExistingElements": true,
"observesAddedNodes": true,
"observesWorkflowAttribute": true
},
"attributes": [
{
"name": "workflow",
"valueType": "comma-separated string",
"role": "Declares one or more workflow names and scopes each workflow action to its container."
},
{
"name": "{name}-key",
"valueType": "string",
"role": "Maps element values into the first object in the named workflow input array. If keyed values were collected, the evaluated response is passed to setData."
},
{
"name": "{workflowName}",
"valueType": "CoCreate attribute marker",
"role": "Marks this element as a workflow event source and contributes its mapped attributes and live value as an input object."
},
{
"name": "{workflowName}-on",
"valueType": "comma or whitespace-separated event names",
"role": "Registers native event listeners on the marked element and runs the workflow using only that element's data; input and change are debounced for 1 second."
}
],
"actions": [
{
"name": "{workflowName}",
"description": "Runs the named workflow for its nearest declaring container."
}
]
},
"api": {
"defaultExport": "WorkflowsClient",
"exports": [
"default",
"init"
],
"methods": [
{
"name": "init",
"signature": "init(elements?)",
"description": "Registers workflow actions and native {workflowName}-on event listeners for existing or supplied workflow containers."
}
]
}
},
"server": {
"workflowRecord": {
"response": {
"valueType": "AST object",
"description": "Optional client-side response AST. The client evaluates it with $this set to the event source and $payload set to the returned envelope. Its result is passed to setData only when the request collected {name}-key values."
}
},
"api": {
"defaultExport": "Workflows",
"exports": [
"default",
"init",
"run"
],
"methods": [
{
"name": "init",
"signature": "init(Server)",
"description": "Binds server services and returns the workflow handler for registration on the workflow socket event."
},
{
"name": "run",
"signature": "run({ method: 'workflow.<name>', <name>, organization_id, host })",
"description": "Resolves a workflow by method name, executes ordered actions with $data referencing the original envelope, and appends errors to envelope.error."
}
],
"initResultMethods": [
"run"
]
}
}
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/CoCreateJS/CoCreate-workflows.git"
},
"author": "CoCreate LLC",
"license": "AGPL-3.0",
"bugs": {
"url": "https://github.com/CoCreateJS/CoCreate-workflows/issues"
},
"homepage": "https://cocreate.app/docs/workflows",
"type": "module",
"main": "./src/server.js",
"browser": "./src/client.js",
"exports": {
".": {
"node": "./src/server.js",
"deno": "./src/server.js",
"browser": "./src/client.js",
"default": "./src/server.js"
}
},
"scripts": {
"test": "node --test"
},
"dependencies": {
"@cocreate/actions": "^1.27.0",
"@cocreate/observer": "^1.25.0",
"@cocreate/socket-client": "^1.45.0",
"@cocreate/utils": "^1.57.0"
}
}