@lowdefy/operators 4.0.0-alpha.8 → 4.0.0-alpha.9
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/getFromArray.js +1 -1
- package/dist/getFromObject.js +1 -1
- package/dist/index.js +1 -1
- package/dist/nodeParser.js +1 -8
- package/dist/runClass.js +1 -1
- package/dist/runInstance.js +1 -1
- package/dist/webParser.js +4 -14
- package/package.json +3 -3
package/dist/getFromArray.js
CHANGED
package/dist/getFromObject.js
CHANGED
package/dist/index.js
CHANGED
package/dist/nodeParser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -14,13 +14,6 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import { serializer, type } from '@lowdefy/helpers';
|
|
16
16
|
let NodeParser = class NodeParser {
|
|
17
|
-
async init() {
|
|
18
|
-
await Promise.all(Object.values(this.operators).map(async (operator)=>{
|
|
19
|
-
if (operator.init) {
|
|
20
|
-
await operator.init();
|
|
21
|
-
}
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
24
17
|
parse({ args , input , location , operatorPrefix ='_' }) {
|
|
25
18
|
const env = this.env;
|
|
26
19
|
const operators = this.operators;
|
package/dist/runClass.js
CHANGED
package/dist/runInstance.js
CHANGED
package/dist/webParser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -14,16 +14,6 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import { applyArrayIndices, serializer, type } from '@lowdefy/helpers';
|
|
16
16
|
let WebParser = class WebParser {
|
|
17
|
-
async init() {
|
|
18
|
-
if (!type.isObject(this.context._internal.lowdefy)) {
|
|
19
|
-
throw new Error('context._internal.lowdefy must be an object.');
|
|
20
|
-
}
|
|
21
|
-
await Promise.all(Object.values(this.operators).map(async (operator)=>{
|
|
22
|
-
if (operator.init) {
|
|
23
|
-
await operator.init();
|
|
24
|
-
}
|
|
25
|
-
}));
|
|
26
|
-
}
|
|
27
17
|
parse({ actions , args , arrayIndices , event , input , location , operatorPrefix ='_' }) {
|
|
28
18
|
const operators = this.operators;
|
|
29
19
|
const context = this.context;
|
|
@@ -56,14 +46,15 @@ let WebParser = class WebParser {
|
|
|
56
46
|
actions,
|
|
57
47
|
args,
|
|
58
48
|
arrayIndices,
|
|
59
|
-
context
|
|
49
|
+
context,
|
|
60
50
|
event,
|
|
61
51
|
input: inputs ? inputs[context.id] : {},
|
|
62
52
|
location: applyArrayIndices(arrayIndices, location),
|
|
63
53
|
lowdefyGlobal: lowdefyGlobal || {},
|
|
64
54
|
menus: menus || {},
|
|
65
55
|
methodName,
|
|
66
|
-
operators
|
|
56
|
+
operators,
|
|
57
|
+
operatorPrefix,
|
|
67
58
|
params: value[key],
|
|
68
59
|
requests: context.requests,
|
|
69
60
|
state: context.state,
|
|
@@ -87,7 +78,6 @@ let WebParser = class WebParser {
|
|
|
87
78
|
}
|
|
88
79
|
constructor({ context , operators }){
|
|
89
80
|
this.context = context;
|
|
90
|
-
this.init = this.init.bind(this);
|
|
91
81
|
this.parse = this.parse.bind(this);
|
|
92
82
|
this.operators = operators;
|
|
93
83
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/operators",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.9",
|
|
4
4
|
"licence": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"test:watch": "jest --coverage --watch"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@lowdefy/helpers": "4.0.0-alpha.
|
|
45
|
+
"@lowdefy/helpers": "4.0.0-alpha.9"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@swc/cli": "0.1.55",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "98b544eca231bdcfca6c3a8601a891835d5ce571"
|
|
57
57
|
}
|