@lowdefy/operators-js 4.0.0-alpha.6 → 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/index.js +17 -0
- package/dist/operators/build/env.js +25 -0
- package/dist/operators/client/_index.js +1 -1
- package/dist/operators/client/actions.js +1 -1
- package/dist/operators/client/base64.js +1 -1
- package/dist/operators/client/event.js +1 -1
- package/dist/operators/client/event_log.js +1 -1
- package/dist/operators/client/global.js +1 -1
- package/dist/operators/client/input.js +1 -1
- package/dist/operators/client/location.js +2 -1
- package/dist/operators/client/media.js +1 -1
- package/dist/operators/client/menu.js +1 -1
- package/dist/operators/client/request.js +1 -1
- package/dist/operators/client/request_details.js +1 -1
- package/dist/operators/client/state.js +1 -1
- package/dist/operators/client/url_query.js +1 -1
- package/dist/operators/server/base64.js +1 -1
- package/dist/operators/server/hash.js +1 -1
- package/dist/operators/server/payload.js +1 -1
- package/dist/operators/server/secret.js +1 -1
- package/dist/operators/shared/and.js +1 -1
- package/dist/operators/shared/args.js +1 -1
- package/dist/operators/shared/array.js +1 -1
- package/dist/operators/shared/date.js +1 -1
- package/dist/operators/shared/divide.js +1 -1
- package/dist/operators/shared/eq.js +1 -1
- package/dist/operators/shared/function.js +5 -20
- package/dist/operators/shared/get.js +1 -1
- package/dist/operators/shared/gt.js +1 -1
- package/dist/operators/shared/gte.js +1 -1
- package/dist/operators/shared/if.js +1 -1
- package/dist/operators/shared/if_none.js +1 -1
- package/dist/operators/shared/json.js +1 -1
- package/dist/operators/shared/log.js +1 -1
- package/dist/operators/shared/lt.js +1 -1
- package/dist/operators/shared/lte.js +1 -1
- package/dist/operators/shared/math.js +1 -1
- package/dist/operators/shared/ne.js +1 -1
- package/dist/operators/shared/not.js +1 -1
- package/dist/operators/shared/number.js +1 -1
- package/dist/operators/shared/object.js +1 -1
- package/dist/operators/shared/operator.js +1 -1
- package/dist/operators/shared/or.js +1 -1
- package/dist/operators/shared/product.js +1 -1
- package/dist/operators/shared/random.js +1 -1
- package/dist/operators/shared/regex.js +1 -1
- package/dist/operators/shared/string.js +1 -1
- package/dist/operators/shared/subtract.js +1 -1
- package/dist/operators/shared/sum.js +1 -1
- package/dist/operators/shared/switch.js +1 -1
- package/dist/operators/shared/type.js +1 -1
- package/dist/operators/shared/uri.js +1 -1
- package/dist/operators/shared/user.js +1 -1
- package/dist/operatorsBuild.js +86 -0
- package/dist/operatorsClient.js +1 -1
- package/dist/operatorsServer.js +1 -1
- package/dist/types.js +1 -1
- package/package.json +14 -7
package/dist/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import * as operatorsClient from './operatorsClient.js';
|
|
16
|
+
import * as operatorsServer from './operatorsServer.js';
|
|
17
|
+
export { operatorsClient, operatorsServer };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import { getFromObject } from '@lowdefy/operators';
|
|
16
|
+
function _env({ arrayIndices , env , location , params }) {
|
|
17
|
+
return getFromObject({
|
|
18
|
+
arrayIndices,
|
|
19
|
+
location,
|
|
20
|
+
object: env,
|
|
21
|
+
operator: '_env',
|
|
22
|
+
params
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export default _env;
|
|
@@ -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.
|
|
@@ -27,6 +27,7 @@ const validProperties = [
|
|
|
27
27
|
'search',
|
|
28
28
|
'hash',
|
|
29
29
|
];
|
|
30
|
+
// TODO: Fix with new router and link
|
|
30
31
|
function _location({ arrayIndices , context , location , params }) {
|
|
31
32
|
if (!window || !window.location) {
|
|
32
33
|
throw new Error(`Operator Error: Browser window.location not available for _location. Received: ${JSON.stringify(params)} at ${location}.`);
|
|
@@ -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.
|
|
@@ -12,30 +12,15 @@
|
|
|
12
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
function removeUnderscore(_, value) {
|
|
17
|
-
if (type.isObject(value) && Object.keys(value).length === 1) {
|
|
18
|
-
const key = Object.keys(value)[0];
|
|
19
|
-
if (key.startsWith('__')) {
|
|
20
|
-
const newKey = key.substring(1);
|
|
21
|
-
return {
|
|
22
|
-
[newKey]: value[key]
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return value;
|
|
27
|
-
}
|
|
28
|
-
function _function({ arrayIndices , event , location , params , parser }) {
|
|
29
|
-
const preparedParams = serializer.copy(params, {
|
|
30
|
-
reviver: removeUnderscore
|
|
31
|
-
});
|
|
15
|
+
*/ function _function({ arrayIndices , event , location , operatorPrefix , params , parser }) {
|
|
32
16
|
return (...args)=>{
|
|
33
17
|
const { output , errors } = parser.parse({
|
|
34
18
|
arrayIndices,
|
|
35
19
|
args,
|
|
36
20
|
event,
|
|
37
|
-
input:
|
|
38
|
-
location
|
|
21
|
+
input: params,
|
|
22
|
+
location,
|
|
23
|
+
operatorPrefix: `_${operatorPrefix}`
|
|
39
24
|
});
|
|
40
25
|
if (errors.length > 0) {
|
|
41
26
|
throw new Error(errors[0]);
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import _and from './operators/shared/and.js';
|
|
16
|
+
import _args from './operators/shared/args.js';
|
|
17
|
+
import _array from './operators/shared/array.js';
|
|
18
|
+
import _date from './operators/shared/date.js';
|
|
19
|
+
import _divide from './operators/shared/divide.js';
|
|
20
|
+
import _eq from './operators/shared/eq.js';
|
|
21
|
+
import _function from './operators/shared/function.js';
|
|
22
|
+
import _get from './operators/shared/get.js';
|
|
23
|
+
import _gt from './operators/shared/gt.js';
|
|
24
|
+
import _gte from './operators/shared/gte.js';
|
|
25
|
+
import _if_none from './operators/shared/if_none.js';
|
|
26
|
+
import _if from './operators/shared/if.js';
|
|
27
|
+
import _json from './operators/shared/json.js';
|
|
28
|
+
import _log from './operators/shared/log.js';
|
|
29
|
+
import _lt from './operators/shared/lt.js';
|
|
30
|
+
import _lte from './operators/shared/lte.js';
|
|
31
|
+
import _math from './operators/shared/math.js';
|
|
32
|
+
import _ne from './operators/shared/ne.js';
|
|
33
|
+
import _not from './operators/shared/not.js';
|
|
34
|
+
import _number from './operators/shared/number.js';
|
|
35
|
+
import _object from './operators/shared/object.js';
|
|
36
|
+
import _operator from './operators/shared/operator.js';
|
|
37
|
+
import _or from './operators/shared/or.js';
|
|
38
|
+
import _product from './operators/shared/product.js';
|
|
39
|
+
import _random from './operators/shared/random.js';
|
|
40
|
+
import _regex from './operators/shared/regex.js';
|
|
41
|
+
import _string from './operators/shared/string.js';
|
|
42
|
+
import _subtract from './operators/shared/subtract.js';
|
|
43
|
+
import _sum from './operators/shared/sum.js';
|
|
44
|
+
import _switch from './operators/shared/switch.js';
|
|
45
|
+
import _type from './operators/shared/type.js';
|
|
46
|
+
import _uri from './operators/shared/uri.js';
|
|
47
|
+
import _base64 from './operators/server/base64.js';
|
|
48
|
+
import _hash from './operators/server/hash.js';
|
|
49
|
+
import _env from './operators/build/env.js';
|
|
50
|
+
export default {
|
|
51
|
+
_and,
|
|
52
|
+
_args,
|
|
53
|
+
_array,
|
|
54
|
+
_base64,
|
|
55
|
+
_date,
|
|
56
|
+
_divide,
|
|
57
|
+
_env,
|
|
58
|
+
_eq,
|
|
59
|
+
_function,
|
|
60
|
+
_get,
|
|
61
|
+
_gt,
|
|
62
|
+
_gte,
|
|
63
|
+
_hash,
|
|
64
|
+
_if_none,
|
|
65
|
+
_if,
|
|
66
|
+
_json,
|
|
67
|
+
_log,
|
|
68
|
+
_lt,
|
|
69
|
+
_lte,
|
|
70
|
+
_math,
|
|
71
|
+
_ne,
|
|
72
|
+
_not,
|
|
73
|
+
_number,
|
|
74
|
+
_object,
|
|
75
|
+
_operator,
|
|
76
|
+
_or,
|
|
77
|
+
_product,
|
|
78
|
+
_random,
|
|
79
|
+
_regex,
|
|
80
|
+
_string,
|
|
81
|
+
_subtract,
|
|
82
|
+
_sum,
|
|
83
|
+
_switch,
|
|
84
|
+
_type,
|
|
85
|
+
_uri
|
|
86
|
+
};
|
package/dist/operatorsClient.js
CHANGED
package/dist/operatorsServer.js
CHANGED
package/dist/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/operators-js",
|
|
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",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"lowdefy",
|
|
9
|
-
"lowdefy operator"
|
|
9
|
+
"lowdefy operator",
|
|
10
|
+
"lowdefy plugin"
|
|
10
11
|
],
|
|
11
12
|
"bugs": {
|
|
12
13
|
"url": "https://github.com/lowdefy/lowdefy/issues"
|
|
@@ -19,6 +20,10 @@
|
|
|
19
20
|
{
|
|
20
21
|
"name": "Gerrie van Wyk",
|
|
21
22
|
"url": "https://github.com/Gervwyk"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "Johann Möller",
|
|
26
|
+
"url": "https://github.com/JohannMoller"
|
|
22
27
|
}
|
|
23
28
|
],
|
|
24
29
|
"repository": {
|
|
@@ -27,6 +32,8 @@
|
|
|
27
32
|
},
|
|
28
33
|
"type": "module",
|
|
29
34
|
"exports": {
|
|
35
|
+
".": "./dist/index.js",
|
|
36
|
+
"./operators/build": "./dist/operatorsBuild.js",
|
|
30
37
|
"./operators/client": "./dist/operatorsClient.js",
|
|
31
38
|
"./operators/server": "./dist/operatorsServer.js",
|
|
32
39
|
"./types": "./dist/types.js"
|
|
@@ -42,17 +49,17 @@
|
|
|
42
49
|
"test": "jest --coverage"
|
|
43
50
|
},
|
|
44
51
|
"dependencies": {
|
|
45
|
-
"@lowdefy/helpers": "4.0.0-alpha.
|
|
46
|
-
"@lowdefy/operators": "4.0.0-alpha.
|
|
52
|
+
"@lowdefy/helpers": "4.0.0-alpha.9",
|
|
53
|
+
"@lowdefy/operators": "4.0.0-alpha.9"
|
|
47
54
|
},
|
|
48
55
|
"devDependencies": {
|
|
49
56
|
"@swc/cli": "0.1.55",
|
|
50
|
-
"@swc/core": "1.2.
|
|
57
|
+
"@swc/core": "1.2.135",
|
|
51
58
|
"@swc/jest": "0.2.17",
|
|
52
|
-
"jest": "27.
|
|
59
|
+
"jest": "27.5.1"
|
|
53
60
|
},
|
|
54
61
|
"publishConfig": {
|
|
55
62
|
"access": "public"
|
|
56
63
|
},
|
|
57
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "98b544eca231bdcfca6c3a8601a891835d5ce571"
|
|
58
65
|
}
|