fig-tree-evaluator 2.10.0 → 2.11.4
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/README.md +3 -2
- package/build/index.cjs.js +1 -0
- package/build/index.d.ts +121 -4
- package/build/index.esm.js +1 -0
- package/package.json +14 -5
- package/build/FigTreeEvaluator.d.ts +0 -26
- package/build/FigTreeEvaluator.js +0 -121
- package/build/cache.d.ts +0 -27
- package/build/cache.js +0 -63
- package/build/evaluate.d.ts +0 -2
- package/build/evaluate.js +0 -87
- package/build/helpers.d.ts +0 -23
- package/build/helpers.js +0 -137
- package/build/index.js +0 -29
- package/build/operators/AND/data.d.ts +0 -4
- package/build/operators/AND/data.js +0 -22
- package/build/operators/AND/index.d.ts +0 -1
- package/build/operators/AND/index.js +0 -5
- package/build/operators/AND/operator.d.ts +0 -3
- package/build/operators/AND/operator.js +0 -53
- package/build/operators/BUILD_OBJECT/data.d.ts +0 -4
- package/build/operators/BUILD_OBJECT/data.js +0 -22
- package/build/operators/BUILD_OBJECT/index.d.ts +0 -1
- package/build/operators/BUILD_OBJECT/index.js +0 -17
- package/build/operators/BUILD_OBJECT/operator.d.ts +0 -2
- package/build/operators/BUILD_OBJECT/operator.js +0 -64
- package/build/operators/CONDITIONAL/data.d.ts +0 -4
- package/build/operators/CONDITIONAL/data.js +0 -36
- package/build/operators/CONDITIONAL/index.d.ts +0 -1
- package/build/operators/CONDITIONAL/index.js +0 -17
- package/build/operators/CONDITIONAL/operator.d.ts +0 -2
- package/build/operators/CONDITIONAL/operator.js +0 -59
- package/build/operators/COUNT/data.d.ts +0 -4
- package/build/operators/COUNT/data.js +0 -22
- package/build/operators/COUNT/index.d.ts +0 -1
- package/build/operators/COUNT/index.js +0 -17
- package/build/operators/COUNT/operator.d.ts +0 -2
- package/build/operators/COUNT/operator.js +0 -52
- package/build/operators/CUSTOM_FUNCTIONS/data.d.ts +0 -4
- package/build/operators/CUSTOM_FUNCTIONS/data.js +0 -43
- package/build/operators/CUSTOM_FUNCTIONS/index.d.ts +0 -1
- package/build/operators/CUSTOM_FUNCTIONS/index.js +0 -17
- package/build/operators/CUSTOM_FUNCTIONS/operator.d.ts +0 -2
- package/build/operators/CUSTOM_FUNCTIONS/operator.js +0 -65
- package/build/operators/DIVIDE/data.d.ts +0 -4
- package/build/operators/DIVIDE/data.js +0 -43
- package/build/operators/DIVIDE/index.d.ts +0 -1
- package/build/operators/DIVIDE/index.js +0 -17
- package/build/operators/DIVIDE/operator.d.ts +0 -2
- package/build/operators/DIVIDE/operator.js +0 -63
- package/build/operators/EQUAL/data.d.ts +0 -4
- package/build/operators/EQUAL/data.js +0 -29
- package/build/operators/EQUAL/index.d.ts +0 -1
- package/build/operators/EQUAL/index.js +0 -17
- package/build/operators/EQUAL/operator.d.ts +0 -2
- package/build/operators/EQUAL/operator.js +0 -58
- package/build/operators/GET/data.d.ts +0 -4
- package/build/operators/GET/data.js +0 -50
- package/build/operators/GET/index.d.ts +0 -1
- package/build/operators/GET/index.js +0 -5
- package/build/operators/GET/operator.d.ts +0 -3
- package/build/operators/GET/operator.js +0 -91
- package/build/operators/GRAPHQL/data.d.ts +0 -4
- package/build/operators/GRAPHQL/data.js +0 -57
- package/build/operators/GRAPHQL/index.d.ts +0 -1
- package/build/operators/GRAPHQL/index.js +0 -17
- package/build/operators/GRAPHQL/operator.d.ts +0 -8
- package/build/operators/GRAPHQL/operator.js +0 -86
- package/build/operators/GREATER_THAN/data.d.ts +0 -4
- package/build/operators/GREATER_THAN/data.js +0 -29
- package/build/operators/GREATER_THAN/index.d.ts +0 -1
- package/build/operators/GREATER_THAN/index.js +0 -17
- package/build/operators/GREATER_THAN/operator.d.ts +0 -2
- package/build/operators/GREATER_THAN/operator.js +0 -54
- package/build/operators/LESS_THAN/data.d.ts +0 -4
- package/build/operators/LESS_THAN/data.js +0 -29
- package/build/operators/LESS_THAN/index.d.ts +0 -1
- package/build/operators/LESS_THAN/index.js +0 -17
- package/build/operators/LESS_THAN/operator.d.ts +0 -2
- package/build/operators/LESS_THAN/operator.js +0 -54
- package/build/operators/MATCH/data.d.ts +0 -4
- package/build/operators/MATCH/data.js +0 -29
- package/build/operators/MATCH/index.d.ts +0 -1
- package/build/operators/MATCH/index.js +0 -17
- package/build/operators/MATCH/operator.d.ts +0 -2
- package/build/operators/MATCH/operator.js +0 -72
- package/build/operators/MULTIPLY/data.d.ts +0 -4
- package/build/operators/MULTIPLY/data.js +0 -22
- package/build/operators/MULTIPLY/index.d.ts +0 -1
- package/build/operators/MULTIPLY/index.js +0 -17
- package/build/operators/MULTIPLY/operator.d.ts +0 -2
- package/build/operators/MULTIPLY/operator.js +0 -53
- package/build/operators/NOT_EQUAL/data.d.ts +0 -4
- package/build/operators/NOT_EQUAL/data.js +0 -29
- package/build/operators/NOT_EQUAL/index.d.ts +0 -1
- package/build/operators/NOT_EQUAL/index.js +0 -17
- package/build/operators/NOT_EQUAL/operator.d.ts +0 -2
- package/build/operators/NOT_EQUAL/operator.js +0 -58
- package/build/operators/OBJECT_PROPERTIES/data.d.ts +0 -4
- package/build/operators/OBJECT_PROPERTIES/data.js +0 -37
- package/build/operators/OBJECT_PROPERTIES/index.d.ts +0 -1
- package/build/operators/OBJECT_PROPERTIES/index.js +0 -17
- package/build/operators/OBJECT_PROPERTIES/operator.d.ts +0 -2
- package/build/operators/OBJECT_PROPERTIES/operator.js +0 -62
- package/build/operators/OR/data.d.ts +0 -4
- package/build/operators/OR/data.js +0 -22
- package/build/operators/OR/index.d.ts +0 -1
- package/build/operators/OR/index.js +0 -17
- package/build/operators/OR/operator.d.ts +0 -2
- package/build/operators/OR/operator.js +0 -49
- package/build/operators/PASSTHRU/data.d.ts +0 -4
- package/build/operators/PASSTHRU/data.js +0 -22
- package/build/operators/PASSTHRU/index.d.ts +0 -1
- package/build/operators/PASSTHRU/index.js +0 -17
- package/build/operators/PASSTHRU/operator.d.ts +0 -2
- package/build/operators/PASSTHRU/operator.js +0 -53
- package/build/operators/PG_SQL/data.d.ts +0 -4
- package/build/operators/PG_SQL/data.js +0 -43
- package/build/operators/PG_SQL/index.d.ts +0 -1
- package/build/operators/PG_SQL/index.js +0 -17
- package/build/operators/PG_SQL/operator.d.ts +0 -2
- package/build/operators/PG_SQL/operator.js +0 -83
- package/build/operators/PLUS/data.d.ts +0 -4
- package/build/operators/PLUS/data.js +0 -29
- package/build/operators/PLUS/index.d.ts +0 -1
- package/build/operators/PLUS/index.js +0 -17
- package/build/operators/PLUS/operator.d.ts +0 -2
- package/build/operators/PLUS/operator.js +0 -63
- package/build/operators/POST/data.d.ts +0 -4
- package/build/operators/POST/data.js +0 -50
- package/build/operators/POST/index.d.ts +0 -1
- package/build/operators/POST/index.js +0 -17
- package/build/operators/POST/operator.d.ts +0 -2
- package/build/operators/POST/operator.js +0 -72
- package/build/operators/REGEX/data.d.ts +0 -4
- package/build/operators/REGEX/data.js +0 -29
- package/build/operators/REGEX/index.d.ts +0 -1
- package/build/operators/REGEX/index.js +0 -17
- package/build/operators/REGEX/operator.d.ts +0 -2
- package/build/operators/REGEX/operator.js +0 -59
- package/build/operators/SPLIT/data.d.ts +0 -4
- package/build/operators/SPLIT/data.js +0 -43
- package/build/operators/SPLIT/index.d.ts +0 -1
- package/build/operators/SPLIT/index.js +0 -17
- package/build/operators/SPLIT/operator.d.ts +0 -2
- package/build/operators/SPLIT/operator.js +0 -69
- package/build/operators/STRING_SUBSTITUTION/data.d.ts +0 -4
- package/build/operators/STRING_SUBSTITUTION/data.js +0 -50
- package/build/operators/STRING_SUBSTITUTION/index.d.ts +0 -1
- package/build/operators/STRING_SUBSTITUTION/index.js +0 -17
- package/build/operators/STRING_SUBSTITUTION/operator.d.ts +0 -2
- package/build/operators/STRING_SUBSTITUTION/operator.js +0 -112
- package/build/operators/SUBTRACT/data.d.ts +0 -4
- package/build/operators/SUBTRACT/data.js +0 -36
- package/build/operators/SUBTRACT/index.d.ts +0 -1
- package/build/operators/SUBTRACT/index.js +0 -17
- package/build/operators/SUBTRACT/operator.d.ts +0 -2
- package/build/operators/SUBTRACT/operator.js +0 -54
- package/build/operators/_operatorAliases.json +0 -92
- package/build/operators/_operatorUtils.d.ts +0 -24
- package/build/operators/_operatorUtils.js +0 -122
- package/build/operators/index.d.ts +0 -24
- package/build/operators/index.js +0 -40
- package/build/shorthandSyntax.d.ts +0 -2
- package/build/shorthandSyntax.js +0 -55
- package/build/typeCheck.d.ts +0 -12
- package/build/typeCheck.js +0 -54
- package/build/types.d.ts +0 -96
- package/build/types.js +0 -29
- package/build/version.d.ts +0 -1
- package/build/version.js +0 -4
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.GET = exports.parseChildrenGET = void 0;
|
|
36
|
-
const _operatorUtils_1 = require("../_operatorUtils");
|
|
37
|
-
const data_1 = __importStar(require("./data"));
|
|
38
|
-
const evaluate = (expression, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
|
-
var _a, _b, _c;
|
|
40
|
-
const [urlObj, parameters, returnProperty, headers, useCache] = (yield (0, _operatorUtils_1.evaluateArray)([
|
|
41
|
-
expression.url,
|
|
42
|
-
expression.parameters,
|
|
43
|
-
expression.returnProperty,
|
|
44
|
-
expression.headers,
|
|
45
|
-
expression.useCache,
|
|
46
|
-
], config));
|
|
47
|
-
const { url, headers: headersObj } = urlObj instanceof Object ? urlObj : { url: urlObj, headers: null };
|
|
48
|
-
config.typeChecker([
|
|
49
|
-
...(0, _operatorUtils_1.getTypeCheckInput)(data_1.default.parameters, {
|
|
50
|
-
url,
|
|
51
|
-
returnProperty,
|
|
52
|
-
headers,
|
|
53
|
-
parameters,
|
|
54
|
-
useCache,
|
|
55
|
-
}),
|
|
56
|
-
{
|
|
57
|
-
name: 'headers',
|
|
58
|
-
value: headersObj,
|
|
59
|
-
expectedType: ['object', 'null'],
|
|
60
|
-
},
|
|
61
|
-
]);
|
|
62
|
-
const baseUrl = (_a = config.options.baseEndpoint) !== null && _a !== void 0 ? _a : '';
|
|
63
|
-
const httpHeaders = Object.assign(Object.assign(Object.assign({}, (_b = config.options) === null || _b === void 0 ? void 0 : _b.headers), headersObj), headers);
|
|
64
|
-
const shouldUseCache = (_c = useCache !== null && useCache !== void 0 ? useCache : config.options.useCache) !== null && _c !== void 0 ? _c : true;
|
|
65
|
-
const result = yield config.cache.useCache(shouldUseCache, (url, params, headers, returnProperty) => __awaiter(void 0, void 0, void 0, function* () {
|
|
66
|
-
const response = yield (0, _operatorUtils_1.axiosRequest)({
|
|
67
|
-
url,
|
|
68
|
-
params,
|
|
69
|
-
headers,
|
|
70
|
-
});
|
|
71
|
-
return (0, _operatorUtils_1.extractAndSimplify)(response, returnProperty);
|
|
72
|
-
}), (0, _operatorUtils_1.isFullUrl)(url) ? url : (0, _operatorUtils_1.joinUrlParts)(baseUrl, url), parameters, httpHeaders, returnProperty);
|
|
73
|
-
return result;
|
|
74
|
-
});
|
|
75
|
-
const parseChildren = (expression, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
76
|
-
const [url = '', fieldNames, ...rest] = (yield (0, _operatorUtils_1.evaluateArray)(expression.children, config));
|
|
77
|
-
const fieldKeys = Array.isArray(fieldNames) ? fieldNames : [fieldNames];
|
|
78
|
-
const values = rest.slice(0, fieldKeys.length);
|
|
79
|
-
const parameters = (0, _operatorUtils_1.zipArraysToObject)(fieldKeys, values);
|
|
80
|
-
const output = Object.assign(Object.assign({}, expression), { url, parameters });
|
|
81
|
-
if (rest.length > fieldKeys.length)
|
|
82
|
-
output.returnProperty = rest.pop();
|
|
83
|
-
return output;
|
|
84
|
-
});
|
|
85
|
-
exports.parseChildrenGET = parseChildren;
|
|
86
|
-
exports.GET = {
|
|
87
|
-
propertyAliases: data_1.propertyAliases,
|
|
88
|
-
operatorData: data_1.default,
|
|
89
|
-
evaluate,
|
|
90
|
-
parseChildren,
|
|
91
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.propertyAliases = void 0;
|
|
4
|
-
const _operatorUtils_1 = require("../_operatorUtils");
|
|
5
|
-
const description = 'GraphQL request';
|
|
6
|
-
const aliases = ['graphQl', 'graphql', 'gql'];
|
|
7
|
-
const parameters = [
|
|
8
|
-
{
|
|
9
|
-
name: 'query',
|
|
10
|
-
description: 'GraphQL query string',
|
|
11
|
-
aliases: [],
|
|
12
|
-
required: true,
|
|
13
|
-
type: 'string',
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: 'url',
|
|
17
|
-
description: 'Endpoint for the GraphQL request (if not already provided in options)',
|
|
18
|
-
aliases: ['endpoint'],
|
|
19
|
-
required: false,
|
|
20
|
-
type: ['string', 'null'],
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'headers',
|
|
24
|
-
description: 'HTTP Headers (if not already provided in options)',
|
|
25
|
-
aliases: [],
|
|
26
|
-
required: false,
|
|
27
|
-
type: 'object',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: 'variables',
|
|
31
|
-
description: 'Values for the variables used in query (key-value pairs)',
|
|
32
|
-
aliases: [],
|
|
33
|
-
required: false,
|
|
34
|
-
type: 'object',
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: 'returnNode',
|
|
38
|
-
description: 'Property path to extract from the query response',
|
|
39
|
-
aliases: ['outputNode', 'returnProperty'],
|
|
40
|
-
required: false,
|
|
41
|
-
type: 'string',
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
name: 'useCache',
|
|
45
|
-
description: 'Whether or not the FigTree cache is used',
|
|
46
|
-
aliases: [],
|
|
47
|
-
required: false,
|
|
48
|
-
type: 'boolean',
|
|
49
|
-
},
|
|
50
|
-
];
|
|
51
|
-
exports.propertyAliases = (0, _operatorUtils_1.getPropertyAliases)(parameters);
|
|
52
|
-
const operatorData = {
|
|
53
|
-
description,
|
|
54
|
-
aliases,
|
|
55
|
-
parameters,
|
|
56
|
-
};
|
|
57
|
-
exports.default = operatorData;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './operator';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./operator"), exports);
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.GRAPHQL = void 0;
|
|
36
|
-
const _operatorUtils_1 = require("../_operatorUtils");
|
|
37
|
-
const data_1 = __importStar(require("./data"));
|
|
38
|
-
const evaluate = (expression, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
|
-
var _a, _b, _c, _d, _e, _f;
|
|
40
|
-
const [query, urlObj, variables, returnNode, headers, useCache] = (yield (0, _operatorUtils_1.evaluateArray)([
|
|
41
|
-
expression.query,
|
|
42
|
-
expression.url,
|
|
43
|
-
expression.variables,
|
|
44
|
-
expression.returnNode,
|
|
45
|
-
expression.headers,
|
|
46
|
-
expression.useCache,
|
|
47
|
-
], config));
|
|
48
|
-
const { url, headers: headersObj } = urlObj instanceof Object ? urlObj : { url: urlObj, headers: null };
|
|
49
|
-
config.typeChecker([
|
|
50
|
-
...(0, _operatorUtils_1.getTypeCheckInput)(data_1.default.parameters, {
|
|
51
|
-
url,
|
|
52
|
-
query,
|
|
53
|
-
variables,
|
|
54
|
-
returnNode,
|
|
55
|
-
headers,
|
|
56
|
-
useCache,
|
|
57
|
-
}),
|
|
58
|
-
{ name: 'headers', value: headersObj, expectedType: ['object', 'null'] },
|
|
59
|
-
]);
|
|
60
|
-
const endpoint = !url || url.toLowerCase() === 'graphqlendpoint' ? '' : url;
|
|
61
|
-
const baseEndpoint = (_c = (_b = (_a = config.options.graphQLConnection) === null || _a === void 0 ? void 0 : _a.endpoint) !== null && _b !== void 0 ? _b : config.options.baseEndpoint) !== null && _c !== void 0 ? _c : '';
|
|
62
|
-
const fullUrl = (0, _operatorUtils_1.isFullUrl)(endpoint) ? endpoint : (0, _operatorUtils_1.joinUrlParts)(baseEndpoint, endpoint);
|
|
63
|
-
const data = { query, variables };
|
|
64
|
-
const shouldUseCache = (_d = useCache !== null && useCache !== void 0 ? useCache : config.options.useCache) !== null && _d !== void 0 ? _d : true;
|
|
65
|
-
const result = yield config.cache.useCache(shouldUseCache, (url, data, headers, returnNode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
66
|
-
const response = yield (0, _operatorUtils_1.axiosRequest)({ url, method: 'post', data, headers });
|
|
67
|
-
return (0, _operatorUtils_1.extractAndSimplify)(response.data, returnNode);
|
|
68
|
-
}), fullUrl, data, Object.assign(Object.assign(Object.assign(Object.assign({}, (_e = config.options.graphQLConnection) === null || _e === void 0 ? void 0 : _e.headers), (_f = config.options) === null || _f === void 0 ? void 0 : _f.headers), headersObj), headers), returnNode);
|
|
69
|
-
return result;
|
|
70
|
-
});
|
|
71
|
-
const parseChildren = (expression, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
72
|
-
const [query, url = '', fieldNames, ...rest] = (yield (0, _operatorUtils_1.evaluateArray)(expression.children, config));
|
|
73
|
-
const fieldKeys = Array.isArray(fieldNames) ? fieldNames : [fieldNames];
|
|
74
|
-
const values = rest.slice(0, fieldKeys.length);
|
|
75
|
-
const variables = (0, _operatorUtils_1.zipArraysToObject)(fieldKeys, values);
|
|
76
|
-
const output = Object.assign(Object.assign({}, expression), { query, url, variables });
|
|
77
|
-
if (rest.length > fieldKeys.length)
|
|
78
|
-
output.returnNode = rest.pop();
|
|
79
|
-
return output;
|
|
80
|
-
});
|
|
81
|
-
exports.GRAPHQL = {
|
|
82
|
-
propertyAliases: data_1.propertyAliases,
|
|
83
|
-
operatorData: data_1.default,
|
|
84
|
-
evaluate,
|
|
85
|
-
parseChildren,
|
|
86
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.propertyAliases = void 0;
|
|
4
|
-
const _operatorUtils_1 = require("../_operatorUtils");
|
|
5
|
-
const description = 'Test if a value is greater than (or equal to) another value';
|
|
6
|
-
const aliases = ['>', 'greaterThan', 'higher', 'larger'];
|
|
7
|
-
const parameters = [
|
|
8
|
-
{
|
|
9
|
-
name: 'values',
|
|
10
|
-
description: 'Array of values - 1st element will be compared to the second',
|
|
11
|
-
aliases: [],
|
|
12
|
-
required: true,
|
|
13
|
-
type: 'array',
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: 'strict',
|
|
17
|
-
description: 'Whether value must be strictly greater than (i.e. not equal) (default: false)',
|
|
18
|
-
aliases: [],
|
|
19
|
-
required: false,
|
|
20
|
-
type: 'boolean',
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
exports.propertyAliases = (0, _operatorUtils_1.getPropertyAliases)(parameters);
|
|
24
|
-
const operatorData = {
|
|
25
|
-
description,
|
|
26
|
-
aliases,
|
|
27
|
-
parameters,
|
|
28
|
-
};
|
|
29
|
-
exports.default = operatorData;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './operator';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./operator"), exports);
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.GREATER_THAN = void 0;
|
|
36
|
-
const operator_1 = require("../AND/operator");
|
|
37
|
-
const _operatorUtils_1 = require("../_operatorUtils");
|
|
38
|
-
const data_1 = __importStar(require("./data"));
|
|
39
|
-
const evaluate = (expression, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
40
|
-
const [values, strict = true] = (yield (0, _operatorUtils_1.evaluateArray)([expression.values, expression.strict], config));
|
|
41
|
-
config.typeChecker((0, _operatorUtils_1.getTypeCheckInput)(data_1.default.parameters, { values, strict }));
|
|
42
|
-
if (values.length < 2)
|
|
43
|
-
throw new Error('- Not enough values provided');
|
|
44
|
-
const [first, second] = values;
|
|
45
|
-
if (first === second && !strict)
|
|
46
|
-
return true;
|
|
47
|
-
return first > second;
|
|
48
|
-
});
|
|
49
|
-
exports.GREATER_THAN = {
|
|
50
|
-
propertyAliases: data_1.propertyAliases,
|
|
51
|
-
operatorData: data_1.default,
|
|
52
|
-
evaluate,
|
|
53
|
-
parseChildren: operator_1.parseChildren,
|
|
54
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.propertyAliases = void 0;
|
|
4
|
-
const _operatorUtils_1 = require("../_operatorUtils");
|
|
5
|
-
const description = 'Test if a value is smaller than (or equal to) another value';
|
|
6
|
-
const aliases = ['<', 'lessThan', 'lower', 'smaller'];
|
|
7
|
-
const parameters = [
|
|
8
|
-
{
|
|
9
|
-
name: 'values',
|
|
10
|
-
description: 'Array of values - 1st element will be compared to the second',
|
|
11
|
-
aliases: [],
|
|
12
|
-
required: true,
|
|
13
|
-
type: 'array',
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: 'strict',
|
|
17
|
-
description: 'Whether value must be strictly smaller than (i.e. not equal) (default: false)',
|
|
18
|
-
aliases: [],
|
|
19
|
-
required: false,
|
|
20
|
-
type: 'boolean',
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
exports.propertyAliases = (0, _operatorUtils_1.getPropertyAliases)(parameters);
|
|
24
|
-
const operatorData = {
|
|
25
|
-
description,
|
|
26
|
-
aliases,
|
|
27
|
-
parameters,
|
|
28
|
-
};
|
|
29
|
-
exports.default = operatorData;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './operator';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./operator"), exports);
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.LESS_THAN = void 0;
|
|
36
|
-
const operator_1 = require("../AND/operator");
|
|
37
|
-
const _operatorUtils_1 = require("../_operatorUtils");
|
|
38
|
-
const data_1 = __importStar(require("./data"));
|
|
39
|
-
const evaluate = (expression, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
40
|
-
const [values, strict = true] = (yield (0, _operatorUtils_1.evaluateArray)([expression.values, expression.strict], config));
|
|
41
|
-
config.typeChecker((0, _operatorUtils_1.getTypeCheckInput)(data_1.default.parameters, { values, strict }));
|
|
42
|
-
if (values.length < 2)
|
|
43
|
-
throw new Error('- Not enough values provided');
|
|
44
|
-
const [first, second] = values;
|
|
45
|
-
if (first === second && !strict)
|
|
46
|
-
return true;
|
|
47
|
-
return first < second;
|
|
48
|
-
});
|
|
49
|
-
exports.LESS_THAN = {
|
|
50
|
-
propertyAliases: data_1.propertyAliases,
|
|
51
|
-
operatorData: data_1.default,
|
|
52
|
-
evaluate,
|
|
53
|
-
parseChildren: operator_1.parseChildren,
|
|
54
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.propertyAliases = void 0;
|
|
4
|
-
const _operatorUtils_1 = require("../_operatorUtils");
|
|
5
|
-
const description = 'Return different values depending on a matching expression';
|
|
6
|
-
const aliases = ['match', 'switch'];
|
|
7
|
-
const parameters = [
|
|
8
|
-
{
|
|
9
|
-
name: 'matchExpression',
|
|
10
|
-
description: 'Expression to match against',
|
|
11
|
-
aliases: ['match'],
|
|
12
|
-
required: true,
|
|
13
|
-
type: ['string', 'number', 'boolean'],
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: 'branches',
|
|
17
|
-
description: 'Object whose keys are compared against the match expression. The value of the matching key is returned',
|
|
18
|
-
aliases: ['arms', 'cases'],
|
|
19
|
-
required: false,
|
|
20
|
-
type: ['object', 'array'],
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
exports.propertyAliases = (0, _operatorUtils_1.getPropertyAliases)(parameters);
|
|
24
|
-
const operatorData = {
|
|
25
|
-
description,
|
|
26
|
-
aliases,
|
|
27
|
-
parameters,
|
|
28
|
-
};
|
|
29
|
-
exports.default = operatorData;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './operator';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./operator"), exports);
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.MATCH = void 0;
|
|
36
|
-
const _operatorUtils_1 = require("../_operatorUtils");
|
|
37
|
-
const evaluate_1 = require("../../evaluate");
|
|
38
|
-
const helpers_1 = require("../../helpers");
|
|
39
|
-
const data_1 = __importStar(require("./data"));
|
|
40
|
-
const evaluate = (expression, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
-
var _a;
|
|
42
|
-
const matchExpression = (yield (0, evaluate_1.evaluatorFunction)(expression.matchExpression, config));
|
|
43
|
-
config.typeChecker({
|
|
44
|
-
name: 'matchExpression',
|
|
45
|
-
value: matchExpression,
|
|
46
|
-
expectedType: ['string', 'number', 'boolean'],
|
|
47
|
-
});
|
|
48
|
-
const branches = Array.isArray(expression.branches)
|
|
49
|
-
? (0, _operatorUtils_1.singleArrayToObject)(expression.branches)
|
|
50
|
-
: (_a = expression.branches) !== null && _a !== void 0 ? _a : {};
|
|
51
|
-
const branchObject = ((0, helpers_1.isOperatorNode)(branches) ? yield (0, evaluate_1.evaluatorFunction)(branches, config) : branches);
|
|
52
|
-
if (!(0, helpers_1.isObject)(branchObject))
|
|
53
|
-
throw new Error("Branches don't evaluate to an object");
|
|
54
|
-
if (matchExpression in branchObject)
|
|
55
|
-
return yield (0, evaluate_1.evaluatorFunction)(branchObject[matchExpression], config);
|
|
56
|
-
if ('fallback' in branchObject)
|
|
57
|
-
return yield (0, evaluate_1.evaluatorFunction)(branchObject.fallback, config);
|
|
58
|
-
if (matchExpression in expression)
|
|
59
|
-
return yield (0, evaluate_1.evaluatorFunction)(expression[matchExpression], config);
|
|
60
|
-
throw new Error(`No match found for ${matchExpression}`);
|
|
61
|
-
});
|
|
62
|
-
const parseChildren = (expression, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
63
|
-
const [matchExpression, ...elements] = expression.children;
|
|
64
|
-
const branches = (0, _operatorUtils_1.singleArrayToObject)(yield (0, _operatorUtils_1.evaluateArray)(elements, config));
|
|
65
|
-
return Object.assign(Object.assign({}, expression), { matchExpression, branches });
|
|
66
|
-
});
|
|
67
|
-
exports.MATCH = {
|
|
68
|
-
propertyAliases: data_1.propertyAliases,
|
|
69
|
-
operatorData: data_1.default,
|
|
70
|
-
evaluate,
|
|
71
|
-
parseChildren,
|
|
72
|
-
};
|