@fnet/cli 0.3.14 → 0.4.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.
Files changed (26) hide show
  1. package/dist/fnet/index.js +12 -12
  2. package/package.json +1 -1
  3. package/template/fnet/node/src/default/blocks/assign.js.njk +10 -48
  4. package/template/fnet/node/src/default/blocks/call.js.njk +110 -156
  5. package/template/fnet/node/src/default/blocks/for.js.njk +59 -95
  6. package/template/fnet/node/src/default/blocks/form.js.njk +21 -59
  7. package/template/fnet/node/src/default/blocks/http.js.njk +125 -147
  8. package/template/fnet/node/src/default/blocks/modules.js.njk +10 -52
  9. package/template/fnet/node/src/default/blocks/new.js.njk +40 -85
  10. package/template/fnet/node/src/default/blocks/next.js.njk +10 -32
  11. package/template/fnet/node/src/default/blocks/output.js.njk +10 -48
  12. package/template/fnet/node/src/default/blocks/parallel.js.njk +60 -106
  13. package/template/fnet/node/src/default/blocks/pipeline.js.njk +100 -137
  14. package/template/fnet/node/src/default/blocks/raise.js.njk +9 -25
  15. package/template/fnet/node/src/default/blocks/retry.js.njk +63 -87
  16. package/template/fnet/node/src/default/blocks/return.js.njk +13 -25
  17. package/template/fnet/node/src/default/blocks/schedule.js.njk +56 -73
  18. package/template/fnet/node/src/default/blocks/signal.js.njk +10 -32
  19. package/template/fnet/node/src/default/blocks/steps.js.njk +32 -55
  20. package/template/fnet/node/src/default/blocks/switch.js.njk +37 -74
  21. package/template/fnet/node/src/default/blocks/tryexcept.js.njk +58 -52
  22. package/template/fnet/node/src/default/blocks/wait.js.njk +10 -30
  23. package/template/fnet/node/src/default/macros/block-body-header.js.njk +1 -1
  24. package/template/fnet/node/src/default/macros/block-next.js.njk +0 -1
  25. package/template/fnet/node/src/default/types/block.js.njk +133 -0
  26. package/template/fnet/node/src/default/workflow.js.njk +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fnet/cli",
3
- "version": "0.3.14",
3
+ "version": "0.4.0",
4
4
  "files": [
5
5
  "dist",
6
6
  "template"
@@ -1,53 +1,15 @@
1
- {% include "src/default/macros/block-header.js.njk" %}
1
+ {% set assign=true %}
2
+ {% set signal=true %}
3
+ {% set resolve=true %}
2
4
 
3
- {% include "src/default/macros/block-next-header.js.njk" %}
5
+ {% import "src/default/types/block.js.njk" as block with context %}
4
6
 
5
- {% include "src/default/macros/block-modules-header.js.njk" %}
7
+ {% call block.header() %}
8
+ {% endcall %}
6
9
 
7
- export default function Block(context){
10
+ {% call block.definition() %}
8
11
 
9
- {% include "src/default/macros/block-body-header.js.njk" %}
12
+ {% endcall %}
10
13
 
11
- this.run= function (){
12
-
13
- {% include "src/default/macros/block-entry-args.js.njk" %}
14
-
15
- return new Promise(async (resolve,reject)=>{
16
-
17
- {% include "src/default/macros/block-run-header.js.njk" %}
18
-
19
- {% include "src/default/macros/page.js.njk" %}
20
-
21
- {% include "src/default/macros/block-modules.js.njk" %}
22
-
23
- {% if context.next and context.transform.wait==='next' %}
24
- flow.waitForNext({
25
- key:'{{indexKey}}',
26
- next: async () => {
27
- {% include "src/default/macros/block-next.js.njk" %}
28
- }
29
- });
30
- {% endif %}
31
-
32
- {% for assign in context.transform.assign %}
33
- flow.set({{assign.key | safe}},{{assign.value | safe}});
34
- {% endfor%}
35
-
36
- {% include "src/default/macros/block-signal.js.njk" %}
37
-
38
- {% if context.transform.return %}
39
- resolve({type:'return',value: {{context.transform.return | safe}}});
40
- {% elseif context.next and context.transform.wait!=='next'%}
41
- {% include "src/default/macros/block-next.js.njk" %}
42
- {% elseif not context.next%}
43
- resolve();
44
- {% endif %}
45
-
46
- {% include "src/default/macros/block-run-footer.js.njk" %}
47
- });
48
- }
49
-
50
- Object.freeze(this);
51
- }
52
-
53
- {% include "src/default/macros/block-footer.js.njk" %}
14
+ {% call block.footer()%}
15
+ {% endcall %}
@@ -1,156 +1,110 @@
1
- {% include "src/default/macros/block-header.js.njk" %}
2
-
3
- {% include "src/default/macros/block-next-header.js.njk" %}
4
-
5
- {% include "src/default/macros/block-library-header.js.njk" %}
6
-
7
- {% include "src/default/macros/block-modules-header.js.njk" %}
8
-
9
- export default function Block(context){
10
-
11
- {% include "src/default/macros/block-body-header.js.njk" %}
12
-
13
- this.run= function (){
14
-
15
- {% include "src/default/macros/block-entry-args.js.njk" %}
16
-
17
- return new Promise(async (resolve,reject)=>{
18
-
19
-
20
- try{
21
- {% include "src/default/macros/block-run-header.js.njk" %}
22
-
23
- {% include "src/default/macros/page.js.njk" %}
24
-
25
- {% include "src/default/macros/block-modules.js.njk" %}
26
-
27
- {% if context.next and context.transform.wait==='next' %}
28
- flow.waitForNext({
29
- key:'{{indexKey}}',
30
- next: async () => {
31
- {% include "src/default/macros/block-next.js.njk" %}
32
- }
33
- });
34
- {% endif %}
35
-
36
- {# NEW: Check if 'new' keyword is present for constructor call #}
37
- {% if context.transform.new !== undefined %}
38
- {# Constructor instantiation with 'new' keyword #}
39
- {% if context.lib.type==='atom' and context.lib.atom.protocol!=='use:' %}
40
- const LibClass=LIBRARY;
41
- {% elseif context.lib.atom.protocol==='use:' %}
42
- {# For use:e:: protocol, call value is the class name (e.g., use:e::Map → Map) #}
43
- const LibClass={{context.transform.import}};
44
- if(!LibClass) throw new Error('[use] Couldnt find class.');
45
- {% else %}
46
- throw new Error('Cannot instantiate: unsupported lib type.');
47
- {% endif %}
48
-
49
- {# Create instance with constructor args #}
50
- {% if context.transform.new %}
51
- const constructorArgs = {{ context.transform.new | safe }};
52
- const instance = Array.isArray(constructorArgs) ? new LibClass(...constructorArgs) : new LibClass(constructorArgs);
53
- {% else %}
54
- const instance = new LibClass();
55
- {% endif %}
56
-
57
- {# If 'call' is specified, get the method from instance #}
58
- {% if context.transform.call %}
59
- const callLib = instance.{{context.transform.call}};
60
- {% else %}
61
- {# No method call, just return the instance #}
62
- const callLib = () => instance;
63
- {% endif %}
64
-
65
- {% else %}
66
- {# EXISTING: Normal function/method call (no 'new') #}
67
- {% if context.lib.type==='atom'%}
68
- {% if context.transform.libExp %}
69
- const lib={{context.transform.libExp}};
70
- {% else %}
71
- const lib=LIBRARY;
72
- {% endif %}
73
- {% elseif context.lib.type==='subworkflow' %}
74
- const lib={{context.lib.codeKey}};
75
- {% elseif target.atom.protocol==='use:' %}
76
- const lib={{context.transform.call}};
77
- if(!lib) throw new Error('[use] Couldnt find lib.');
78
- {% else %}
79
- const lib=undefined;
80
- throw new Error('Couldn file lib.');
81
- {% endif %}
82
-
83
- {% if context.lib.atom.doc.subtype==='workflow'%}
84
- const Workflow=lib;
85
- const workflow=new Workflow({app:engine.app,caller:c});
86
- const callLib = workflow.run.bind(workflow);
87
- {% elseif context.lib.type==='subworkflow'%}
88
- const Workflow=lib;
89
- const workflow=new Workflow({engine,flow,caller:c});
90
- const callLib = workflow.run.bind(workflow);
91
- {% else %}
92
- const callLib = lib;
93
- {% endif %}
94
- {% endif %}
95
-
96
- {# Execute the call #}
97
- {% if context.transform.args %}
98
- {% if context.lib.type==='subworkflow' %}
99
- const callArgs ={ params: {{ context.transform.args | safe }} };
100
- {% else %}
101
- const callArgs ={{ context.transform.args | safe }} ;
102
- {% endif %}
103
-
104
- {% if context.transform.new !== undefined %}
105
- {# For constructor calls, use instance as context #}
106
- const result = Array.isArray(callArgs)? await callLib.apply(instance,callArgs): await callLib.call(instance,callArgs);
107
- {% else %}
108
- {# For regular calls, use _this as context #}
109
- {% if context.transform.context !== undefined %}
110
- const result = Array.isArray(callArgs)? await callLib.apply({{context.transform.context | safe}},callArgs): await callLib.call({{context.transform.context | safe}},callArgs);
111
- {% else %}
112
- const result = Array.isArray(callArgs)? await callLib.apply(_this,callArgs): await callLib.call(_this,callArgs);
113
- {% endif %}
114
-
115
- {% endif %}
116
-
117
- {% else %}
118
- {% if context.transform.new !== undefined %}
119
- const result = await callLib.call(instance);
120
- {% else %}
121
- {% if context.transform.context !== undefined %}
122
- const result = await callLib.call({{context.transform.context | safe}});
123
- {% else %}
124
- const result = await callLib.call(_this);
125
- {% endif %}
126
- {% endif %}
127
- {% endif %}
128
-
129
- {% for assign in context.transform.result %}
130
- flow.set({{assign.key | safe}},{{assign.value | safe}});
131
- {% endfor%}
132
-
133
- {% include "src/default/macros/block-assign.js.njk" %}
134
-
135
- {% include "src/default/macros/block-signal.js.njk" %}
136
-
137
- {% if context.transform.return %}
138
- resolve({type:'return',value: {{context.transform.return | safe}}});
139
- {% elseif context.next and context.transform.wait!=='next'%}
140
- {% include "src/default/macros/block-next.js.njk" %}
141
- {% elseif not context.next%}
142
- resolve();
143
- {% endif %}
144
-
145
- {% include "src/default/macros/block-run-footer.js.njk" %}
146
- }
147
- catch(error){
148
- onError? onError(error) : reject(error);
149
- }
150
- });
151
- }
152
-
153
- Object.freeze(this);
154
- }
155
-
156
- {% include "src/default/macros/block-footer.js.njk" %}
1
+ {% set assign=true %}
2
+ {% set signal=true %}
3
+ {% set resolve=true %}
4
+ {% set result=true %}
5
+
6
+ {% import "src/default/types/block.js.njk" as block with context %}
7
+
8
+ {% call block.header() %}
9
+ {% include "src/default/macros/block-library-header.js.njk" %}
10
+ {% endcall %}
11
+
12
+ {% call block.definition() %}
13
+
14
+ {# NEW: Check if 'new' keyword is present for constructor call #}
15
+ {% if context.transform.new !== undefined %}
16
+ {# Constructor instantiation with 'new' keyword #}
17
+ {% if context.lib.type==='atom' and context.lib.atom.protocol!=='use:' %}
18
+ const LibClass=LIBRARY;
19
+ {% elseif context.lib.atom.protocol==='use:' %}
20
+ {# For use:e:: protocol, call value is the class name (e.g., use:e::Map → Map) #}
21
+ const LibClass={{context.transform.import}};
22
+ if(!LibClass) throw new Error('[use] Couldnt find class.');
23
+ {% else %}
24
+ throw new Error('Cannot instantiate: unsupported lib type.');
25
+ {% endif %}
26
+
27
+ {# Create instance with constructor args #}
28
+ {% if context.transform.new %}
29
+ const constructorArgs = {{ context.transform.new | safe }};
30
+ const instance = Array.isArray(constructorArgs) ? new LibClass(...constructorArgs) : new LibClass(constructorArgs);
31
+ {% else %}
32
+ const instance = new LibClass();
33
+ {% endif %}
34
+
35
+ {# If 'call' is specified, get the method from instance #}
36
+ {% if context.transform.call %}
37
+ const callLib = instance.{{context.transform.call}};
38
+ {% else %}
39
+ {# No method call, just return the instance #}
40
+ const callLib = () => instance;
41
+ {% endif %}
42
+
43
+ {% else %}
44
+ {# EXISTING: Normal function/method call (no 'new') #}
45
+ {% if context.lib.type==='atom'%}
46
+ {% if context.transform.libExp %}
47
+ const lib={{context.transform.libExp}};
48
+ {% else %}
49
+ const lib=LIBRARY;
50
+ {% endif %}
51
+ {% elseif context.lib.type==='subworkflow' %}
52
+ const lib={{context.lib.codeKey}};
53
+ {% elseif target.atom.protocol==='use:' %}
54
+ const lib={{context.transform.call}};
55
+ if(!lib) throw new Error('[use] Couldnt find lib.');
56
+ {% else %}
57
+ const lib=undefined;
58
+ throw new Error('Couldn file lib.');
59
+ {% endif %}
60
+
61
+ {% if context.lib.atom.doc.subtype==='workflow'%}
62
+ const Workflow=lib;
63
+ const workflow=new Workflow({app:engine.app,caller:c});
64
+ const callLib = workflow.run.bind(workflow);
65
+ {% elseif context.lib.type==='subworkflow'%}
66
+ const Workflow=lib;
67
+ const workflow=new Workflow({engine,flow,caller:c});
68
+ const callLib = workflow.run.bind(workflow);
69
+ {% else %}
70
+ const callLib = lib;
71
+ {% endif %}
72
+ {% endif %}
73
+
74
+ {# Execute the call #}
75
+ {% if context.transform.args %}
76
+ {% if context.lib.type==='subworkflow' %}
77
+ const callArgs ={ params: {{ context.transform.args | safe }} };
78
+ {% else %}
79
+ const callArgs ={{ context.transform.args | safe }} ;
80
+ {% endif %}
81
+
82
+ {% if context.transform.new !== undefined %}
83
+ {# For constructor calls, use instance as context #}
84
+ const result = Array.isArray(callArgs)? await callLib.apply(instance,callArgs): await callLib.call(instance,callArgs);
85
+ {% else %}
86
+ {# For regular calls, use _this as context #}
87
+ {% if context.transform.context !== undefined %}
88
+ const result = Array.isArray(callArgs)? await callLib.apply({{context.transform.context | safe}},callArgs): await callLib.call({{context.transform.context | safe}},callArgs);
89
+ {% else %}
90
+ const result = Array.isArray(callArgs)? await callLib.apply(_this,callArgs): await callLib.call(_this,callArgs);
91
+ {% endif %}
92
+
93
+ {% endif %}
94
+
95
+ {% else %}
96
+ {% if context.transform.new !== undefined %}
97
+ const result = await callLib.call(instance);
98
+ {% else %}
99
+ {% if context.transform.context !== undefined %}
100
+ const result = await callLib.call({{context.transform.context | safe}});
101
+ {% else %}
102
+ const result = await callLib.call(_this);
103
+ {% endif %}
104
+ {% endif %}
105
+ {% endif %}
106
+
107
+ {% endcall %}
108
+
109
+ {% call block.footer()%}
110
+ {% endcall %}
@@ -1,107 +1,71 @@
1
+ {% set assign=true %}
2
+ {% set signal=true %}
3
+ {% set resolve=true %}
4
+
5
+ {% import "src/default/types/block.js.njk" as block with context %}
6
+
7
+ {% call block.header() %}
8
+ {% if childs.length %}
9
+ {% if not childs[0].definition.dynamic %}
10
+ // FIRST CHILD: {{childs[0].indexKey}}
11
+ import {{childs[0].codeKey}} from "./{{childs[0].codeKey}}.js";
12
+ {% endif %}
13
+ {% endif%}
14
+ {% endcall %}
15
+
16
+ {% call block.definition() %}
17
+
18
+ {% if childs.length %}
19
+ {% if childs[0].definition.dynamic %}
20
+ // FIRST CHILD: {{childs[0].indexKey}}
21
+ const { default: {{childs[0].codeKey}} } = await import("./{{childs[0].codeKey}}.js");
22
+ {% endif %}
23
+ {% endif%}
24
+
25
+ for await(const {{context.transform.for.as | safe}} of {{context.transform.for.in | safe}}){
26
+ // Create Proxy for closure-like variable resolution
27
+ // Local variable shadows parent, but parent scope accessible via Proxy fallback
28
+ const localForVar = { {{context.transform.for.as | safe}}: {{context.transform.for.as | safe}} };
29
+ const forProxy = new Proxy(localForVar, {
30
+ get(target, prop) {
31
+ // Check local scope first (shadowing)
32
+ if (prop in target) return target[prop];
33
+ // Fallback to parent scope
34
+ return c.for?.[prop];
35
+ }
36
+ });
1
37
 
2
- {% include "src/default/macros/block-header.js.njk" %}
3
-
4
- {% include "src/default/macros/block-next-header.js.njk" %}
5
-
6
- {% include "src/default/macros/block-modules-header.js.njk" %}
7
-
8
- {% if childs.length %}
9
- {% if not childs[0].definition.dynamic %}
10
- // FIRST CHILD: {{childs[0].indexKey}}
11
- import {{childs[0].codeKey}} from "./{{childs[0].codeKey}}.js";
12
- {% endif %}
13
- {% endif%}
38
+ // Create new context with updated for
39
+ const loopContext = { ...c, for: forProxy };
14
40
 
15
- export default function Block(context) {
41
+ {% if childs.length %}
42
+ let current= new {{childs[0].codeKey}}({ parent:_this, engine, flow, caller:loopContext });
43
+ let currentArgs=args;
16
44
 
17
- {% include "src/default/macros/block-body-header.js.njk" %}
45
+ do {
18
46
 
19
- this.run= function (){
20
-
21
- {% include "src/default/macros/block-entry-args.js.njk" %}
47
+ {% if workflow.parent.context.atom.doc.features.print_runners %}
48
+ console.log(new Date().toLocaleString(),' * ',_this.constructor.IndexKey,' -> ',current.constructor.IndexKey);
49
+ {% endif %}
22
50
 
23
- return new Promise(async (resolve,reject)=>{
24
-
25
- {% include "src/default/macros/block-run-header.js.njk" %}
26
-
27
- {% include "src/default/macros/page.js.njk" %}
28
-
29
- {% include "src/default/macros/block-modules.js.njk" %}
51
+ const nextBlock= typeof currentArgs==='undefined'? await current.run()
52
+ : Array.isArray(currentArgs)? await current.run.apply(current,currentArgs) : await current.run.call(current, currentArgs) ;
30
53
 
31
- {% if childs.length %}
32
- {% if childs[0].definition.dynamic %}
33
- // FIRST CHILD: {{childs[0].indexKey}}
34
- const { default: {{childs[0].codeKey}} } = await import("./{{childs[0].codeKey}}.js");
35
- {% endif %}
36
- {% endif%}
37
-
38
- for await(const {{context.transform.for.as | safe}} of {{context.transform.for.in | safe}}){
39
- // Create Proxy for closure-like variable resolution
40
- // Local variable shadows parent, but parent scope accessible via Proxy fallback
41
- const localForVar = { {{context.transform.for.as | safe}}: {{context.transform.for.as | safe}} };
42
- const forProxy = new Proxy(localForVar, {
43
- get(target, prop) {
44
- // Check local scope first (shadowing)
45
- if (prop in target) return target[prop];
46
- // Fallback to parent scope
47
- return c.for?.[prop];
48
- }
49
- });
50
-
51
- // Create new context with updated for
52
- const loopContext = { ...c, for: forProxy };
53
-
54
- {% if childs.length %}
55
- let current= new {{childs[0].codeKey}}({ parent:_this, engine, flow, caller:loopContext });
56
- let currentArgs=args;
57
-
58
- do {
59
-
60
- {% if workflow.parent.context.atom.doc.features.print_runners %}
61
- console.log(new Date().toLocaleString(),' * ',_this.constructor.IndexKey,' -> ',current.constructor.IndexKey);
62
- {% endif %}
63
-
64
- try {
65
- const nextBlock= typeof currentArgs==='undefined'? await current.run()
66
- : Array.isArray(currentArgs)? await current.run.apply(current,currentArgs) : await current.run.call(current, currentArgs) ;
67
-
68
- if(nextBlock?.type==='return') return resolve(nextBlock);
69
- else if(nextBlock?.type!=='block') break;
70
-
71
- if(nextBlock.toType.ParentTypeId!==_this.constructor.TypeId)
72
- return resolve(nextBlock);
73
-
74
- current=new nextBlock.toType({ parent:_this, engine, flow, caller:loopContext, onError, error });
75
- currentArgs=nextBlock.input;
76
- } catch (err) {
77
- if (onError) {
78
- return onError(err);
79
- }
80
- throw err;
81
- }
82
-
83
- } while(true);
84
-
85
- {% endif %}
86
- }
54
+ if(nextBlock?.type==='return') return resolve(nextBlock);
55
+ else if(nextBlock?.type!=='block') break;
87
56
 
88
- {% include "src/default/macros/block-assign.js.njk" %}
57
+ if(nextBlock.toType.ParentTypeId!==_this.constructor.TypeId)
58
+ return resolve(nextBlock);
89
59
 
90
- {% include "src/default/macros/block-signal.js.njk" %}
60
+ current=new nextBlock.toType({ parent:_this, engine, flow, caller:loopContext, error });
61
+ currentArgs=nextBlock.input;
91
62
 
92
- {% if context.transform.return %}
93
- resolve({type:'return',value: {{context.transform.return | safe}}});
94
- {% elseif context.next %}
95
- {% include "src/default/macros/block-next.js.njk" %}
96
- {% else %}
97
- resolve();
98
- {% endif %}
63
+ } while(true);
99
64
 
100
- {% include "src/default/macros/block-run-footer.js.njk" %}
101
- });
102
- }
65
+ {% endif %}
66
+ }
103
67
 
104
- Object.freeze(this);
105
- }
68
+ {% endcall %}
106
69
 
107
- {% include "src/default/macros/block-footer.js.njk" %}
70
+ {% call block.footer()%}
71
+ {% endcall %}
@@ -1,69 +1,31 @@
1
- import React from "react";
1
+ {% set waitForNext=true %}
2
+ {% set assign=true %}
3
+ {% set signal=true %}
2
4
 
3
- {% include "src/default/macros/block-header.js.njk" %}
5
+ {% import "src/default/types/block.js.njk" as block with context %}
4
6
 
5
- {% include "src/default/macros/block-next-header.js.njk" %}
7
+ {% call block.header() %}
6
8
 
7
- {% include "src/default/macros/block-library-header.js.njk" %}
9
+ {% include "src/default/macros/block-library-header.js.njk" %}
8
10
 
9
- {% include "src/default/macros/block-modules-header.js.njk" %}
11
+ import React from "react";
10
12
 
11
- export default function Block(context){
12
-
13
- {% include "src/default/macros/block-body-header.js.njk" %}
13
+ {% endcall %}
14
14
 
15
- this.run= function (){
16
-
17
- {% include "src/default/macros/block-entry-args.js.njk" %}
15
+ {% call block.definition() %}
18
16
 
19
- return new Promise(async (resolve,reject)=>{
17
+ {% if context.lib.type==='atom'%}
18
+ const formLib=LIBRARY;
19
+ {% elseif context.lib.type==='subworkflow' %}
20
+ const formLib={{context.lib.codeKey}};
21
+ {% else %}
22
+ const formLib=undefined;
23
+ throw new Error('Couldnt find form.');
24
+ {% endif %}
20
25
 
26
+ {% include "src/default/macros/block-run-form.js.njk" %}
21
27
 
22
- try{
23
- {% include "src/default/macros/block-run-header.js.njk" %}
24
-
25
- {% include "src/default/macros/page.js.njk" %}
28
+ {% endcall %}
26
29
 
27
- {% include "src/default/macros/block-modules.js.njk" %}
28
-
29
- flow.waitForNext({
30
- key:'{{indexKey}}',
31
- next: async () => {
32
- {% if context.transform.return %}
33
- resolve({type:'return',value: {{context.transform.return | safe}}});
34
- {% elseif context.next %}
35
- {% include "src/default/macros/block-next.js.njk" %}
36
- {% else %}
37
- resolve();
38
- {% endif %}
39
- }
40
- });
41
-
42
- {% if context.lib.type==='atom'%}
43
- const formLib=LIBRARY;
44
- {% elseif context.lib.type==='subworkflow' %}
45
- const formLib={{context.lib.codeKey}};
46
- {% else %}
47
- const formLib=undefined;
48
- throw new Error('Couldnt find form.');
49
- {% endif %}
50
-
51
- {% include "src/default/macros/block-run-form.js.njk" %}
52
-
53
- {% include "src/default/macros/block-assign.js.njk" %}
54
-
55
- {% include "src/default/macros/block-signal.js.njk" %}
56
-
57
- {% include "src/default/macros/block-run-footer.js.njk" %}
58
- }
59
- catch(error){
60
- reject(error);
61
- }
62
-
63
- });
64
- }
65
-
66
- Object.freeze(this);
67
- }
68
-
69
- {% include "src/default/macros/block-footer.js.njk" %}
30
+ {% call block.footer()%}
31
+ {% endcall %}