@fnet/cli 0.120.0 → 0.122.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/dist/fnet/index.js +1 -1
- package/dist/fnode/{index.BccmKJid.js → index.B1OhKt7p.js} +1 -1
- package/dist/fnode/{index.C297FGrE.js → index.BgwaIU1c.js} +1 -1
- package/dist/fnode/index.js +1 -1
- package/package.json +1 -1
- package/template/fnet/bun/src/default/blocks/assign.js.njk +1 -1
- package/template/fnet/bun/src/default/blocks/call.js.njk +5 -1
- package/template/fnet/bun/src/default/blocks/for.js.njk +2 -2
- package/template/fnet/bun/src/default/blocks/form.js.njk +6 -1
- package/template/fnet/bun/src/default/blocks/jump.js.njk +1 -1
- package/template/fnet/bun/src/default/blocks/modules.js.njk +1 -1
- package/template/fnet/bun/src/default/blocks/operation.js.njk +1 -1
- package/template/fnet/bun/src/default/blocks/raise.js.njk +5 -1
- package/template/fnet/bun/src/default/blocks/return.js.njk +1 -1
- package/template/fnet/bun/src/default/blocks/steps.js.njk +2 -2
- package/template/fnet/bun/src/default/blocks/switch.js.njk +3 -4
- package/template/fnet/bun/src/default/blocks/tryexcept.js.njk +4 -4
- package/template/fnet/bun/src/default/macros/block-entry-args.js.njk +2 -0
- package/template/fnet/bun/src/default/macros/block-next.js.njk +2 -2
- package/template/fnet/bun/src/default/workflow.js.njk +1 -1
- package/template/fnet/node/package.json.njk +3 -1
- package/template/fnet/node/src/default/blocks/assign.js.njk +1 -1
- package/template/fnet/node/src/default/blocks/call.js.njk +6 -1
- package/template/fnet/node/src/default/blocks/for.js.njk +2 -2
- package/template/fnet/node/src/default/blocks/form.js.njk +6 -1
- package/template/fnet/node/src/default/blocks/jump.js.njk +1 -1
- package/template/fnet/node/src/default/blocks/modules.js.njk +1 -1
- package/template/fnet/node/src/default/blocks/operation.js.njk +1 -1
- package/template/fnet/node/src/default/blocks/raise.js.njk +5 -1
- package/template/fnet/node/src/default/blocks/return.js.njk +1 -1
- package/template/fnet/node/src/default/blocks/steps.js.njk +2 -2
- package/template/fnet/node/src/default/blocks/switch.js.njk +2 -2
- package/template/fnet/node/src/default/blocks/tryexcept.js.njk +3 -4
- package/template/fnet/node/src/default/macros/block-entry-args.js.njk +2 -0
- package/template/fnet/node/src/default/macros/block-next.js.njk +2 -2
- package/template/fnet/node/src/default/workflow.js.njk +1 -1
- package/template/fnode/bun/package.json.njk +3 -1
- package/template/fnode/node/package.json.njk +3 -1
|
@@ -6,7 +6,7 @@ export default function Block(context){
|
|
|
6
6
|
|
|
7
7
|
this.run= function (){
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
{% include "src/default/macros/block-entry-args.js.njk" %}
|
|
10
10
|
|
|
11
11
|
return new Promise(async (resolve,reject)=>{
|
|
12
12
|
{% include "src/default/macros/block-run-header.js.njk" %}
|
|
@@ -6,7 +6,7 @@ export default function Block(context){
|
|
|
6
6
|
|
|
7
7
|
this.run= function (){
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
{% include "src/default/macros/block-entry-args.js.njk" %}
|
|
10
10
|
|
|
11
11
|
return new Promise(async (resolve,reject)=>{
|
|
12
12
|
{% include "src/default/macros/block-run-header.js.njk" %}
|
|
@@ -15,6 +15,10 @@ export default function Block(context){
|
|
|
15
15
|
|
|
16
16
|
const raise = {{context.transform.raise | safe}};
|
|
17
17
|
|
|
18
|
+
{% for assign in context.transform.assign %}
|
|
19
|
+
flow.set({{assign.key | safe}},{{assign.value | safe}});
|
|
20
|
+
{% endfor%}
|
|
21
|
+
|
|
18
22
|
onError? onError(new Error(raise?.message||raise||"Unknown error")) : reject(new Error(raise?.message||raise||"Unknown error"));
|
|
19
23
|
});
|
|
20
24
|
}
|
|
@@ -6,7 +6,7 @@ export default function Block(context){
|
|
|
6
6
|
|
|
7
7
|
this.run= function (){
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
{% include "src/default/macros/block-entry-args.js.njk" %}
|
|
10
10
|
|
|
11
11
|
return new Promise(async (resolve,reject)=>{
|
|
12
12
|
{% include "src/default/macros/block-run-header.js.njk" %}
|
|
@@ -8,7 +8,7 @@ export default function Block(context){
|
|
|
8
8
|
|
|
9
9
|
this.run= function (){
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
{% include "src/default/macros/block-entry-args.js.njk" %}
|
|
12
12
|
|
|
13
13
|
return new Promise(async (resolve,reject)=>{
|
|
14
14
|
|
|
@@ -40,7 +40,7 @@ export default function Block(context){
|
|
|
40
40
|
return resolve(nextBlock);
|
|
41
41
|
|
|
42
42
|
current=new nextBlock.toType({ parent:_this, engine, flow, caller:c, onError, error });
|
|
43
|
-
currentArgs=nextBlock.
|
|
43
|
+
currentArgs=nextBlock.input;
|
|
44
44
|
|
|
45
45
|
} while(true);
|
|
46
46
|
|
|
@@ -19,7 +19,7 @@ export default function Block(context) {
|
|
|
19
19
|
|
|
20
20
|
this.run= function (){
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
{% include "src/default/macros/block-entry-args.js.njk" %}
|
|
23
23
|
|
|
24
24
|
return new Promise(async (resolve,reject)=>{
|
|
25
25
|
|
|
@@ -51,7 +51,7 @@ export default function Block(context) {
|
|
|
51
51
|
console.log(new Date().toLocaleString(),' * ',_this.constructor.IndexKey,' -> ',current.constructor.IndexKey);
|
|
52
52
|
{% endif %}
|
|
53
53
|
|
|
54
|
-
return resolve(await current.run.apply(current,args));
|
|
54
|
+
return resolve(Array.isArray(args)? await current.run.apply(current,args) : await current.run.call(current,args));
|
|
55
55
|
}
|
|
56
56
|
{% endfor%}
|
|
57
57
|
|
|
@@ -18,7 +18,7 @@ export default function Block(context) {
|
|
|
18
18
|
|
|
19
19
|
this.run= function (){
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
{% include "src/default/macros/block-entry-args.js.njk" %}
|
|
22
22
|
|
|
23
23
|
return new Promise(async (resolve,reject)=>{
|
|
24
24
|
|
|
@@ -41,8 +41,7 @@ export default function Block(context) {
|
|
|
41
41
|
console.log(new Date().toLocaleString(),' * ',_this.constructor.IndexKey,' -> ',current.constructor.IndexKey);
|
|
42
42
|
{% endif %}
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
current.run.apply(current,args).then(resolve);
|
|
44
|
+
Array.isArray(args)? current.run.apply(current,args).then(resolve):current.run.call(current,args).then(resolve);
|
|
46
45
|
};
|
|
47
46
|
|
|
48
47
|
{% if context.try.definition.dynamic %}
|
|
@@ -55,7 +54,7 @@ export default function Block(context) {
|
|
|
55
54
|
console.log(new Date().toLocaleString(),' * ',_this.constructor.IndexKey,' -> ',current.constructor.IndexKey);
|
|
56
55
|
{% endif %}
|
|
57
56
|
|
|
58
|
-
return resolve(await current.run.apply(current,args));
|
|
57
|
+
return resolve(Array.isArray(args)? await current.run.apply(current,args) : await current.run.call(current,args));
|
|
59
58
|
}
|
|
60
59
|
catch({{context.except.context.transform.as | safe}}){
|
|
61
60
|
throw new Error('Error must not reach here!');
|
|
@@ -13,8 +13,8 @@ return resolve ({
|
|
|
13
13
|
fromClosure: c,
|
|
14
14
|
toType:{{context.next.codeKey}},
|
|
15
15
|
onError,
|
|
16
|
-
{% if context.transform.
|
|
17
|
-
|
|
16
|
+
{% if context.transform.output %}
|
|
17
|
+
input: {{context.transform.output | safe}},
|
|
18
18
|
{% endif %}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -103,7 +103,7 @@ export default class Workflow extends Object {
|
|
|
103
103
|
throw new Error('Unknown situation');
|
|
104
104
|
|
|
105
105
|
current=new nextBlock.toType({ parent:this, engine:this.engine, flow:this, caller:c });
|
|
106
|
-
currentArgs=nextBlock.
|
|
106
|
+
currentArgs=nextBlock.input;
|
|
107
107
|
|
|
108
108
|
} while(true);
|
|
109
109
|
|