@lowdefy/operators 3.23.2 → 4.0.0-alpha.6
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 +22 -44
- package/dist/getFromObject.js +25 -70
- package/dist/index.js +18 -20
- package/dist/nodeParser.js +83 -146
- package/dist/runClass.js +57 -82
- package/dist/runInstance.js +60 -84
- package/dist/webParser.js +94 -157
- package/package.json +13 -19
- package/dist/common/_index.js +0 -45
- package/dist/common/and.js +0 -39
- package/dist/common/args.js +0 -46
- package/dist/common/array.js +0 -170
- package/dist/common/change_case.js +0 -185
- package/dist/common/date.js +0 -75
- package/dist/common/divide.js +0 -51
- package/dist/common/eq.js +0 -43
- package/dist/common/event.js +0 -46
- package/dist/common/function.js +0 -78
- package/dist/common/get.js +0 -61
- package/dist/common/global.js +0 -50
- package/dist/common/gt.js +0 -43
- package/dist/common/gte.js +0 -43
- package/dist/common/if.js +0 -41
- package/dist/common/if_none.js +0 -47
- package/dist/common/index.js +0 -69
- package/dist/common/input.js +0 -50
- package/dist/common/json.js +0 -64
- package/dist/common/log.js +0 -33
- package/dist/common/lt.js +0 -43
- package/dist/common/lte.js +0 -43
- package/dist/common/math.js +0 -210
- package/dist/common/mql.js +0 -124
- package/dist/common/ne.js +0 -43
- package/dist/common/not.js +0 -31
- package/dist/common/number.js +0 -125
- package/dist/common/nunjucks.js +0 -60
- package/dist/common/object.js +0 -118
- package/dist/common/operator.js +0 -49
- package/dist/common/or.js +0 -39
- package/dist/common/product.js +0 -45
- package/dist/common/random.js +0 -132
- package/dist/common/regex.js +0 -65
- package/dist/common/state.js +0 -50
- package/dist/common/string.js +0 -188
- package/dist/common/subtract.js +0 -47
- package/dist/common/sum.js +0 -45
- package/dist/common/switch.js +0 -49
- package/dist/common/type.js +0 -82
- package/dist/common/uri.js +0 -67
- package/dist/common/url_query.js +0 -50
- package/dist/common/user.js +0 -50
- package/dist/common/uuid.js +0 -76
- package/dist/common/yaml.js +0 -70
- package/dist/getFromOtherContext.js +0 -96
- package/dist/node/base64.js +0 -69
- package/dist/node/diff.js +0 -66
- package/dist/node/hash.js +0 -100
- package/dist/node/index.js +0 -29
- package/dist/node/secret.js +0 -54
- package/dist/web/actions.js +0 -46
- package/dist/web/base64.js +0 -67
- package/dist/web/event_log.js +0 -50
- package/dist/web/format.js +0 -52
- package/dist/web/index.js +0 -36
- package/dist/web/js.js +0 -45
- package/dist/web/list_contexts.js +0 -31
- package/dist/web/location.js +0 -74
- package/dist/web/media.js +0 -90
- package/dist/web/menu.js +0 -43
- package/dist/web/request.js +0 -56
- package/dist/web/request_details.js +0 -50
package/dist/web/menu.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _getFromArray = _interopRequireDefault(require("../getFromArray"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
/*
|
|
13
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
14
|
-
|
|
15
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
16
|
-
you may not use this file except in compliance with the License.
|
|
17
|
-
You may obtain a copy of the License at
|
|
18
|
-
|
|
19
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
20
|
-
|
|
21
|
-
Unless required by applicable law or agreed to in writing, software
|
|
22
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
23
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
24
|
-
See the License for the specific language governing permissions and
|
|
25
|
-
limitations under the License.
|
|
26
|
-
*/
|
|
27
|
-
function _menu(_ref) {
|
|
28
|
-
var {
|
|
29
|
-
params,
|
|
30
|
-
menus,
|
|
31
|
-
location
|
|
32
|
-
} = _ref;
|
|
33
|
-
return (0, _getFromArray.default)({
|
|
34
|
-
params,
|
|
35
|
-
array: menus,
|
|
36
|
-
key: 'menuId',
|
|
37
|
-
operator: '_menu',
|
|
38
|
-
location
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
var _default = _menu;
|
|
43
|
-
exports.default = _default;
|
package/dist/web/request.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _helpers = require("@lowdefy/helpers");
|
|
9
|
-
|
|
10
|
-
/*
|
|
11
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
12
|
-
|
|
13
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
14
|
-
you may not use this file except in compliance with the License.
|
|
15
|
-
You may obtain a copy of the License at
|
|
16
|
-
|
|
17
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
-
|
|
19
|
-
Unless required by applicable law or agreed to in writing, software
|
|
20
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
21
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
22
|
-
See the License for the specific language governing permissions and
|
|
23
|
-
limitations under the License.
|
|
24
|
-
*/
|
|
25
|
-
function _request(_ref) {
|
|
26
|
-
var {
|
|
27
|
-
arrayIndices,
|
|
28
|
-
params,
|
|
29
|
-
requests,
|
|
30
|
-
location
|
|
31
|
-
} = _ref;
|
|
32
|
-
|
|
33
|
-
if (!_helpers.type.isString(params)) {
|
|
34
|
-
throw new Error("Operator Error: _request accepts a string value. Received: ".concat(JSON.stringify(params), " at ").concat(location, "."));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
var splitKey = params.split('.');
|
|
38
|
-
var [requestId, ...keyParts] = splitKey;
|
|
39
|
-
|
|
40
|
-
if (requestId in requests && !requests[requestId].loading) {
|
|
41
|
-
if (splitKey.length === 1) {
|
|
42
|
-
return _helpers.serializer.copy(requests[requestId].response);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
var key = keyParts.reduce((acc, value) => acc === '' ? value : acc.concat('.', value), '');
|
|
46
|
-
return (0, _helpers.get)(requests[requestId].response, (0, _helpers.applyArrayIndices)(arrayIndices, key), {
|
|
47
|
-
copy: true,
|
|
48
|
-
default: null
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
var _default = _request;
|
|
56
|
-
exports.default = _default;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _getFromObject = _interopRequireDefault(require("../getFromObject"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
/*
|
|
13
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
14
|
-
|
|
15
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
16
|
-
you may not use this file except in compliance with the License.
|
|
17
|
-
You may obtain a copy of the License at
|
|
18
|
-
|
|
19
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
20
|
-
|
|
21
|
-
Unless required by applicable law or agreed to in writing, software
|
|
22
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
23
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
24
|
-
See the License for the specific language governing permissions and
|
|
25
|
-
limitations under the License.
|
|
26
|
-
*/
|
|
27
|
-
function _request_details(_ref) {
|
|
28
|
-
var {
|
|
29
|
-
params,
|
|
30
|
-
requests,
|
|
31
|
-
context,
|
|
32
|
-
contexts,
|
|
33
|
-
arrayIndices,
|
|
34
|
-
location,
|
|
35
|
-
env
|
|
36
|
-
} = _ref;
|
|
37
|
-
return (0, _getFromObject.default)({
|
|
38
|
-
arrayIndices,
|
|
39
|
-
context,
|
|
40
|
-
contexts,
|
|
41
|
-
env,
|
|
42
|
-
location,
|
|
43
|
-
object: requests,
|
|
44
|
-
operator: '_request_details',
|
|
45
|
-
params
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
var _default = _request_details;
|
|
50
|
-
exports.default = _default;
|