@lowdefy/operators 3.22.0 → 4.0.0-alpha.1

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 (75) hide show
  1. package/dist/common/and.js +8 -24
  2. package/dist/common/args.js +10 -31
  3. package/dist/common/array.js +244 -153
  4. package/dist/common/change_case.js +114 -160
  5. package/dist/common/date.js +33 -54
  6. package/dist/common/divide.js +16 -36
  7. package/dist/common/eq.js +10 -28
  8. package/dist/common/function.js +27 -59
  9. package/dist/common/get.js +21 -46
  10. package/dist/common/gt.js +10 -28
  11. package/dist/common/gte.js +10 -28
  12. package/dist/common/if.js +9 -26
  13. package/dist/common/if_none.js +13 -32
  14. package/dist/common/index.js +39 -53
  15. package/dist/common/json.js +53 -57
  16. package/dist/common/log.js +5 -18
  17. package/dist/common/lt.js +10 -28
  18. package/dist/common/lte.js +10 -28
  19. package/dist/common/math.js +255 -194
  20. package/dist/common/mql.js +93 -102
  21. package/dist/common/ne.js +10 -28
  22. package/dist/common/not.js +3 -16
  23. package/dist/common/number.js +130 -108
  24. package/dist/common/nunjucks.js +24 -44
  25. package/dist/common/object.js +89 -98
  26. package/dist/common/operator.js +33 -44
  27. package/dist/common/or.js +8 -24
  28. package/dist/common/product.js +11 -29
  29. package/dist/common/random.js +74 -109
  30. package/dist/common/regex.js +26 -49
  31. package/dist/common/string.js +270 -171
  32. package/dist/common/subtract.js +13 -32
  33. package/dist/common/sum.js +11 -29
  34. package/dist/common/switch.js +30 -0
  35. package/dist/common/type.js +36 -67
  36. package/dist/common/uri.js +29 -46
  37. package/dist/common/user.js +10 -35
  38. package/dist/common/uuid.js +48 -59
  39. package/dist/common/yaml.js +56 -63
  40. package/dist/getFromArray.js +22 -44
  41. package/dist/getFromObject.js +25 -70
  42. package/dist/index.js +14 -20
  43. package/dist/node/base64.js +31 -48
  44. package/dist/node/diff.js +30 -47
  45. package/dist/node/hash.js +55 -71
  46. package/dist/node/index.js +6 -14
  47. package/dist/{web/list_contexts.js → node/payload.js} +9 -16
  48. package/dist/node/secret.js +32 -53
  49. package/dist/nodeParser.js +95 -146
  50. package/dist/runClass.js +57 -82
  51. package/dist/runInstance.js +60 -84
  52. package/dist/web/_index.js +25 -0
  53. package/dist/web/actions.js +10 -31
  54. package/dist/web/base64.js +29 -46
  55. package/dist/{common/_index.js → web/event.js} +10 -30
  56. package/dist/web/event_log.js +10 -35
  57. package/dist/web/format.js +15 -37
  58. package/dist/web/global.js +25 -0
  59. package/dist/web/index.js +17 -21
  60. package/dist/{common/event.js → web/input.js} +10 -31
  61. package/dist/web/js.js +10 -30
  62. package/dist/web/location.js +44 -59
  63. package/dist/web/media.js +46 -75
  64. package/dist/web/menu.js +10 -28
  65. package/dist/web/request.js +19 -40
  66. package/dist/web/request_details.js +10 -35
  67. package/dist/web/state.js +25 -0
  68. package/dist/web/url_query.js +25 -0
  69. package/dist/webParser.js +115 -157
  70. package/package.json +16 -15
  71. package/dist/common/global.js +0 -50
  72. package/dist/common/input.js +0 -50
  73. package/dist/common/state.js +0 -50
  74. package/dist/common/url_query.js +0 -50
  75. package/dist/getFromOtherContext.js +0 -96
package/dist/web/menu.js CHANGED
@@ -1,14 +1,3 @@
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
1
  /*
13
2
  Copyright 2020-2021 Lowdefy, Inc
14
3
 
@@ -23,21 +12,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
23
12
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
13
  See the License for the specific language governing permissions and
25
14
  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
- });
15
+ */ import getFromArray from '../getFromArray.js';
16
+ function _menu({ params , menus , location }) {
17
+ return getFromArray({
18
+ params,
19
+ array: menus,
20
+ key: 'menuId',
21
+ operator: '_menu',
22
+ location
23
+ });
40
24
  }
41
-
42
- var _default = _menu;
43
- exports.default = _default;
25
+ export default _menu;
@@ -1,12 +1,3 @@
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
1
  /*
11
2
  Copyright 2020-2021 Lowdefy, Inc
12
3
 
@@ -21,36 +12,24 @@ var _helpers = require("@lowdefy/helpers");
21
12
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
13
  See the License for the specific language governing permissions and
23
14
  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);
15
+ */ import { applyArrayIndices, get, serializer, type } from '@lowdefy/helpers';
16
+ function _request({ arrayIndices , params , requests , location }) {
17
+ if (!type.isString(params)) {
18
+ throw new Error(`Operator Error: _request accepts a string value. Received: ${JSON.stringify(params)} at ${location}.`);
43
19
  }
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;
20
+ const splitKey = params.split('.');
21
+ const [requestId, ...keyParts] = splitKey;
22
+ if (requestId in requests && !requests[requestId].loading) {
23
+ if (splitKey.length === 1) {
24
+ return serializer.copy(requests[requestId].response);
25
+ }
26
+ const key = keyParts.reduce((acc, value)=>acc === '' ? value : acc.concat('.', value)
27
+ , '');
28
+ return get(requests[requestId].response, applyArrayIndices(arrayIndices, key), {
29
+ copy: true,
30
+ default: null
31
+ });
32
+ }
33
+ return null;
53
34
  }
54
-
55
- var _default = _request;
56
- exports.default = _default;
35
+ export default _request;
@@ -1,14 +1,3 @@
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
1
  /*
13
2
  Copyright 2020-2021 Lowdefy, Inc
14
3
 
@@ -23,28 +12,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
23
12
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
13
  See the License for the specific language governing permissions and
25
14
  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
- });
15
+ */ import getFromObject from '../getFromObject.js';
16
+ function _request_details({ params , requests , arrayIndices , location }) {
17
+ return getFromObject({
18
+ arrayIndices,
19
+ location,
20
+ object: requests,
21
+ operator: '_request_details',
22
+ params
23
+ });
47
24
  }
48
-
49
- var _default = _request_details;
50
- exports.default = _default;
25
+ export default _request_details;
@@ -0,0 +1,25 @@
1
+ /*
2
+ Copyright 2020-2021 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 '../getFromObject.js';
16
+ function _state({ arrayIndices , location , params , state }) {
17
+ return getFromObject({
18
+ arrayIndices,
19
+ location,
20
+ object: state,
21
+ operator: '_state',
22
+ params
23
+ });
24
+ }
25
+ export default _state;
@@ -0,0 +1,25 @@
1
+ /*
2
+ Copyright 2020-2021 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 '../getFromObject.js';
16
+ function _url_query({ arrayIndices , location , params , urlQuery }) {
17
+ return getFromObject({
18
+ arrayIndices,
19
+ location,
20
+ object: urlQuery,
21
+ operator: '_url_query',
22
+ params
23
+ });
24
+ }
25
+ export default _url_query;
package/dist/webParser.js CHANGED
@@ -1,161 +1,119 @@
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
- var _common = _interopRequireDefault(require("./common"));
11
-
12
- var _web = _interopRequireDefault(require("./web"));
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
17
-
18
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
19
-
20
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
21
-
22
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
23
-
24
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
25
-
26
- class WebParser {
27
- constructor(_ref) {
28
- var {
29
- context,
30
- contexts
31
- } = _ref;
32
- this.context = context;
33
- this.contexts = contexts;
34
- this.init = this.init.bind(this);
35
- this.parse = this.parse.bind(this);
36
- this.operators = _objectSpread(_objectSpread({}, _common.default), _web.default);
37
- this.operations = {};
38
- }
39
-
40
- init() {
41
- var _this = this;
42
-
43
- return _asyncToGenerator(function* () {
44
- if (!_helpers.type.isObject(_this.context.lowdefy)) {
45
- throw new Error('context.lowdefy must be an object.');
46
- }
47
-
48
- if (!_helpers.type.isArray(_this.context.operators)) {
49
- throw new Error('context.operators must be an array.');
50
- }
51
-
52
- yield Promise.all(_this.context.operators.map( /*#__PURE__*/function () {
53
- var _ref2 = _asyncToGenerator(function* (operator) {
54
- if (_this.operators[operator]) {
55
- var fn = yield import("./".concat(_this.operators[operator], ".js"));
56
- _this.operations[operator] = fn.default;
57
-
58
- if (_this.operations[operator].init) {
59
- yield _this.operations[operator].init();
1
+ /*
2
+ Copyright 2020-2021 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 { applyArrayIndices, serializer, type } from '@lowdefy/helpers';
16
+ import commonOperators from './common/index.js';
17
+ import webOperators from './web/index.js';
18
+ let WebParser = class WebParser {
19
+ async init() {
20
+ if (!type.isObject(this.context._internal.lowdefy)) {
21
+ throw new Error('context._internal.lowdefy must be an object.');
22
+ }
23
+ if (!type.isArray(this.context._internal.operators)) {
24
+ throw new Error('context._internal.operators must be an array.');
25
+ }
26
+ const operators = this.operators;
27
+ const operations = this.operations;
28
+ await Promise.all(this.context._internal.operators.map(async (operator)=>{
29
+ if (operators[operator]) {
30
+ const fn = await import(`./${operators[operator]}.js`);
31
+ operations[operator] = fn.default;
32
+ if (operations[operator].init) {
33
+ await operations[operator].init();
34
+ }
60
35
  }
61
- }
62
- });
63
-
64
- return function (_x) {
65
- return _ref2.apply(this, arguments);
66
- };
67
- }()));
68
- })();
69
- }
70
-
71
- parse(_ref3) {
72
- var {
73
- actions,
74
- args,
75
- arrayIndices,
76
- event,
77
- input,
78
- location
79
- } = _ref3;
80
-
81
- if (_helpers.type.isUndefined(input)) {
82
- return {
83
- output: input,
84
- errors: []
85
- };
36
+ }));
86
37
  }
87
-
88
- if (event && !_helpers.type.isObject(event)) {
89
- throw new Error('Operator parser event must be a object.');
90
- }
91
-
92
- if (args && !_helpers.type.isArray(args)) {
93
- throw new Error('Operator parser args must be an array.');
38
+ parse({ actions , args , arrayIndices , event , input , location }) {
39
+ const operations = this.operations;
40
+ const context = this.context;
41
+ if (type.isUndefined(input)) {
42
+ return {
43
+ output: input,
44
+ errors: []
45
+ };
46
+ }
47
+ if (event && !type.isObject(event)) {
48
+ throw new Error('Operator parser event must be a object.');
49
+ }
50
+ if (args && !type.isArray(args)) {
51
+ throw new Error('Operator parser args must be an array.');
52
+ }
53
+ if (location && !type.isString(location)) {
54
+ throw new Error('Operator parser location must be a string.');
55
+ }
56
+ const errors = [];
57
+ const { inputs , lowdefyGlobal , menus , urlQuery , user } = context._internal.lowdefy;
58
+ const reviver = (_, value)=>{
59
+ if (type.isObject(value) && Object.keys(value).length === 1) {
60
+ const key = Object.keys(value)[0];
61
+ const [op, methodName] = key.split('.');
62
+ try {
63
+ if (!type.isUndefined(operations[op])) {
64
+ const res = operations[op]({
65
+ eventLog: context.eventLog,
66
+ actions,
67
+ args,
68
+ arrayIndices,
69
+ context: context,
70
+ env: 'web',
71
+ event,
72
+ input: inputs ? inputs[context.id] : {
73
+ },
74
+ location: location ? applyArrayIndices(arrayIndices, location) : null,
75
+ lowdefyGlobal: lowdefyGlobal || {
76
+ },
77
+ menus: menus || {
78
+ },
79
+ methodName,
80
+ operations: operations,
81
+ params: value[key],
82
+ requests: context.requests,
83
+ state: context.state,
84
+ urlQuery: urlQuery || {
85
+ },
86
+ user: user || {
87
+ },
88
+ parser: this
89
+ });
90
+ return res;
91
+ }
92
+ } catch (e) {
93
+ errors.push(e);
94
+ console.error(e);
95
+ return null;
96
+ }
97
+ }
98
+ return value;
99
+ };
100
+ return {
101
+ output: serializer.copy(input, {
102
+ reviver
103
+ }),
104
+ errors
105
+ };
94
106
  }
95
-
96
- if (location && !_helpers.type.isString(location)) {
97
- throw new Error('Operator parser location must be a string.');
107
+ constructor({ context }){
108
+ this.context = context;
109
+ this.init = this.init.bind(this);
110
+ this.parse = this.parse.bind(this);
111
+ this.operators = {
112
+ ...commonOperators,
113
+ ...webOperators
114
+ };
115
+ this.operations = {
116
+ };
98
117
  }
99
-
100
- var errors = [];
101
- var {
102
- inputs,
103
- lowdefyGlobal,
104
- menus,
105
- urlQuery,
106
- user
107
- } = this.context.lowdefy;
108
-
109
- var reviver = (_, value) => {
110
- if (_helpers.type.isObject(value) && Object.keys(value).length === 1) {
111
- var key = Object.keys(value)[0];
112
- var [op, methodName] = key.split('.');
113
-
114
- try {
115
- if (!_helpers.type.isUndefined(this.operations[op])) {
116
- var res = this.operations[op]({
117
- eventLog: this.context.eventLog,
118
- actions,
119
- args,
120
- arrayIndices,
121
- context: this.context,
122
- contexts: this.contexts,
123
- env: 'web',
124
- event,
125
- input: inputs ? inputs[this.context.id] : {},
126
- location: location ? (0, _helpers.applyArrayIndices)(arrayIndices, location) : null,
127
- lowdefyGlobal: lowdefyGlobal || {},
128
- menus: menus || {},
129
- methodName,
130
- operations: this.operations,
131
- params: value[key],
132
- requests: this.context.requests,
133
- state: this.context.state,
134
- urlQuery: urlQuery || {},
135
- user: user || {},
136
- parser: this
137
- });
138
- return res;
139
- }
140
- } catch (e) {
141
- errors.push(e);
142
- console.error(e);
143
- return null;
144
- }
145
- }
146
-
147
- return value;
148
- };
149
-
150
- return {
151
- output: _helpers.serializer.copy(input, {
152
- reviver
153
- }),
154
- errors
155
- };
156
- }
157
-
158
- }
159
-
160
- var _default = WebParser;
161
- exports.default = _default;
118
+ };
119
+ export default WebParser;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/operators",
3
- "version": "3.22.0",
3
+ "version": "4.0.0-alpha.1",
4
4
  "licence": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -24,36 +24,37 @@
24
24
  "type": "git",
25
25
  "url": "https://github.com/lowdefy/lowdefy.git"
26
26
  },
27
- "main": "dist/index.js",
27
+ "type": "module",
28
+ "exports": "./dist/index.js",
28
29
  "files": [
29
30
  "dist/*"
30
31
  ],
31
32
  "scripts": {
32
- "build": "babel src --out-dir dist",
33
+ "build": "yarn clean && yarn swc",
33
34
  "clean": "rm -rf dist",
35
+ "prepare": "yarn build",
36
+ "swc": "swc src --out-dir dist --config-file ../../.swcrc",
34
37
  "test": "jest --coverage --testTimeout=10000",
35
- "test:watch": "jest --coverage --watch",
36
- "prepare": "yarn build"
38
+ "test:watch": "jest --coverage --watch"
37
39
  },
38
40
  "dependencies": {
39
- "@lowdefy/format": "3.22.0",
40
- "@lowdefy/helpers": "3.22.0",
41
- "@lowdefy/nunjucks": "3.22.0",
41
+ "@lowdefy/format": "4.0.0-alpha.1",
42
+ "@lowdefy/helpers": "4.0.0-alpha.1",
43
+ "@lowdefy/nunjucks": "4.0.0-alpha.1",
42
44
  "change-case": "4.1.2",
43
45
  "deep-diff": "1.0.2",
44
46
  "js-yaml": "4.1.0",
45
- "mingo": "4.1.2",
47
+ "mingo": "4.2.0",
46
48
  "uuid": "8.3.2"
47
49
  },
48
50
  "devDependencies": {
49
- "@babel/cli": "7.14.3",
50
- "@babel/core": "7.14.3",
51
- "@babel/preset-env": "7.14.4",
52
- "babel-jest": "26.6.3",
53
- "jest": "26.6.3"
51
+ "@swc/cli": "0.1.52",
52
+ "@swc/core": "1.2.112",
53
+ "@swc/jest": "0.2.9",
54
+ "jest": "27.3.1"
54
55
  },
55
56
  "publishConfig": {
56
57
  "access": "public"
57
58
  },
58
- "gitHead": "af37daa86e1ba73397eb65f65cacbcbb5461ec79"
59
+ "gitHead": "c97a8fa6b5a641e7d50df09f5601a9c586eeb65a"
59
60
  }
@@ -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 _global(_ref) {
28
- var {
29
- arrayIndices,
30
- context,
31
- contexts,
32
- env,
33
- location,
34
- lowdefyGlobal,
35
- params
36
- } = _ref;
37
- return (0, _getFromObject.default)({
38
- arrayIndices,
39
- context,
40
- contexts,
41
- env,
42
- location,
43
- object: lowdefyGlobal,
44
- operator: '_global',
45
- params
46
- });
47
- }
48
-
49
- var _default = _global;
50
- 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 _input(_ref) {
28
- var {
29
- arrayIndices,
30
- context,
31
- contexts,
32
- env,
33
- input,
34
- location,
35
- params
36
- } = _ref;
37
- return (0, _getFromObject.default)({
38
- arrayIndices,
39
- context,
40
- contexts,
41
- env,
42
- location,
43
- object: input,
44
- operator: '_input',
45
- params
46
- });
47
- }
48
-
49
- var _default = _input;
50
- exports.default = _default;