@openforis/arena-core 2.5.14 → 2.6.0
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/error/index.d.ts +1 -0
- package/dist/error/index.js +3 -1
- package/dist/error/index.js.map +1 -1
- package/dist/error/systemErrorKeys.d.ts +52 -0
- package/dist/error/systemErrorKeys.js +56 -0
- package/dist/error/systemErrorKeys.js.map +1 -0
- package/dist/esm/error/index.js +1 -0
- package/dist/esm/error/index.js.map +1 -1
- package/dist/esm/error/systemErrorKeys.js +53 -0
- package/dist/esm/error/systemErrorKeys.js.map +1 -0
- package/dist/esm/expression/javascript/evaluator.js +2 -2
- package/dist/esm/expression/javascript/evaluator.js.map +1 -1
- package/dist/esm/expression/javascript/global.js +2 -2
- package/dist/esm/expression/javascript/global.js.map +1 -1
- package/dist/esm/expression/javascript/node/array.js +2 -2
- package/dist/esm/expression/javascript/node/array.js.map +1 -1
- package/dist/esm/expression/javascript/node/binary.js +2 -2
- package/dist/esm/expression/javascript/node/binary.js.map +1 -1
- package/dist/esm/expression/javascript/node/call.js +5 -5
- package/dist/esm/expression/javascript/node/call.js.map +1 -1
- package/dist/esm/expression/javascript/node/compound.js +2 -2
- package/dist/esm/expression/javascript/node/compound.js.map +1 -1
- package/dist/esm/expression/javascript/node/conditional.js +2 -2
- package/dist/esm/expression/javascript/node/conditional.js.map +1 -1
- package/dist/esm/expression/javascript/node/identifier.js +2 -2
- package/dist/esm/expression/javascript/node/identifier.js.map +1 -1
- package/dist/esm/expression/javascript/node/this.js +2 -2
- package/dist/esm/expression/javascript/node/this.js.map +1 -1
- package/dist/esm/expression/javascript/node/unary.js +2 -2
- package/dist/esm/expression/javascript/node/unary.js.map +1 -1
- package/dist/esm/geo/points/transform.js +5 -5
- package/dist/esm/geo/points/transform.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/job/JobBase.js +2 -2
- package/dist/esm/job/JobBase.js.map +1 -1
- package/dist/esm/node/nodeValues.js +1 -1
- package/dist/esm/node/nodeValues.js.map +1 -1
- package/dist/esm/nodeDefExpressionEvaluator/functions.js +12 -10
- package/dist/esm/nodeDefExpressionEvaluator/functions.js.map +1 -1
- package/dist/esm/nodeDefExpressionEvaluator/node/identifier.js +2 -2
- package/dist/esm/nodeDefExpressionEvaluator/node/identifier.js.map +1 -1
- package/dist/esm/record/_records/recordCompletion.js +3 -3
- package/dist/esm/record/_records/recordCompletion.js.map +1 -1
- package/dist/esm/record/_records/recordGetters.js +148 -261
- package/dist/esm/record/_records/recordGetters.js.map +1 -1
- package/dist/esm/record/_records/recordPagesValidation.js +5 -5
- package/dist/esm/record/_records/recordPagesValidation.js.map +1 -1
- package/dist/esm/record/_records/recordUtils.js +4 -4
- package/dist/esm/record/_records/recordUtils.js.map +1 -1
- package/dist/esm/record/nodePointers.js +1 -1
- package/dist/esm/record/nodePointers.js.map +1 -1
- package/dist/esm/record/recordCloner.js +1 -1
- package/dist/esm/record/recordCloner.js.map +1 -1
- package/dist/esm/record/recordExpressionEvaluator/functions.js +4 -9
- package/dist/esm/record/recordExpressionEvaluator/functions.js.map +1 -1
- package/dist/esm/record/recordExpressionEvaluator/node/identifier/identifier.js +7 -7
- package/dist/esm/record/recordExpressionEvaluator/node/identifier/identifier.js.map +1 -1
- package/dist/esm/record/recordExpressionEvaluator/node/identifier/nodesFinder.js +2 -2
- package/dist/esm/record/recordExpressionEvaluator/node/identifier/nodesFinder.js.map +1 -1
- package/dist/esm/record/recordExpressionEvaluator/recordExpressionEvaluator.js +1 -1
- package/dist/esm/record/recordExpressionEvaluator/recordExpressionEvaluator.js.map +1 -1
- package/dist/esm/record/recordFixer.js +7 -7
- package/dist/esm/record/recordFixer.js.map +1 -1
- package/dist/esm/record/recordNodesUpdater/recordExpressionValueConverter.js +2 -2
- package/dist/esm/record/recordNodesUpdater/recordExpressionValueConverter.js.map +1 -1
- package/dist/esm/record/recordNodesUpdater/recordNodeDependentsApplicableUpdater.js +20 -24
- package/dist/esm/record/recordNodesUpdater/recordNodeDependentsApplicableUpdater.js.map +1 -1
- package/dist/esm/record/recordNodesUpdater/recordNodeDependentsCodeAttributesUpdater.js +1 -1
- package/dist/esm/record/recordNodesUpdater/recordNodeDependentsCodeAttributesUpdater.js.map +1 -1
- package/dist/esm/record/recordNodesUpdater/recordNodeDependentsCountUpdater.js +1 -1
- package/dist/esm/record/recordNodesUpdater/recordNodeDependentsCountUpdater.js.map +1 -1
- package/dist/esm/record/recordNodesUpdater/recordNodeDependentsDefaultValuesUpdater.js +5 -10
- package/dist/esm/record/recordNodesUpdater/recordNodeDependentsDefaultValuesUpdater.js.map +1 -1
- package/dist/esm/record/recordNodesUpdater/recordNodeDependentsEnumeratedEntitiesUpdater.js +3 -3
- package/dist/esm/record/recordNodesUpdater/recordNodeDependentsEnumeratedEntitiesUpdater.js.map +1 -1
- package/dist/esm/record/recordNodesUpdater/recordNodeDependentsEnumeratingItemsUpdater.js +4 -8
- package/dist/esm/record/recordNodesUpdater/recordNodeDependentsEnumeratingItemsUpdater.js.map +1 -1
- package/dist/esm/record/recordNodesUpdater/recordNodeDependentsFileNamesEvaluator.js +4 -8
- package/dist/esm/record/recordNodesUpdater/recordNodeDependentsFileNamesEvaluator.js.map +1 -1
- package/dist/esm/record/recordNodesUpdater/recordNodesCreator.js +2 -2
- package/dist/esm/record/recordNodesUpdater/recordNodesCreator.js.map +1 -1
- package/dist/esm/record/recordNodesUpdater/recordNodesDeleter.js +1 -1
- package/dist/esm/record/recordNodesUpdater/recordNodesDeleter.js.map +1 -1
- package/dist/esm/record/recordNodesUpdater/recordNodesDependentsUpdaterCommons.js +2 -2
- package/dist/esm/record/recordNodesUpdater/recordNodesDependentsUpdaterCommons.js.map +1 -1
- package/dist/esm/record/recordNodesUpdater/recordNodesUpdater.js +1 -1
- package/dist/esm/record/recordNodesUpdater/recordNodesUpdater.js.map +1 -1
- package/dist/esm/record/recordPrettyPrinter.js +19 -26
- package/dist/esm/record/recordPrettyPrinter.js.map +1 -1
- package/dist/esm/record/recordUpdater.js +4 -4
- package/dist/esm/record/recordUpdater.js.map +1 -1
- package/dist/esm/record/recordValidator/attributeKeyValidator.js +4 -4
- package/dist/esm/record/recordValidator/attributeKeyValidator.js.map +1 -1
- package/dist/esm/record/recordValidator/attributeUniqueValidator.js +1 -1
- package/dist/esm/record/recordValidator/attributeUniqueValidator.js.map +1 -1
- package/dist/esm/record/recordValidator/attributeValidator.js +8 -16
- package/dist/esm/record/recordValidator/attributeValidator.js.map +1 -1
- package/dist/esm/record/recordValidator/countValidator.js +2 -2
- package/dist/esm/record/recordValidator/countValidator.js.map +1 -1
- package/dist/esm/record/recordValidator/recordValidator.js +2 -5
- package/dist/esm/record/recordValidator/recordValidator.js.map +1 -1
- package/dist/esm/survey/nodeDefsFixer.js +3 -3
- package/dist/esm/survey/nodeDefsFixer.js.map +1 -1
- package/dist/esm/survey/surveys/nodeDefs.js +5 -5
- package/dist/esm/survey/surveys/nodeDefs.js.map +1 -1
- package/dist/esm/tests/builder/recordBuilder/attributeBuilder.js +1 -1
- package/dist/esm/tests/builder/recordBuilder/attributeBuilder.js.map +1 -1
- package/dist/expression/javascript/evaluator.js +1 -1
- package/dist/expression/javascript/evaluator.js.map +1 -1
- package/dist/expression/javascript/global.js +1 -1
- package/dist/expression/javascript/global.js.map +1 -1
- package/dist/expression/javascript/node/array.js +1 -1
- package/dist/expression/javascript/node/array.js.map +1 -1
- package/dist/expression/javascript/node/binary.js +1 -1
- package/dist/expression/javascript/node/binary.js.map +1 -1
- package/dist/expression/javascript/node/call.js +4 -4
- package/dist/expression/javascript/node/call.js.map +1 -1
- package/dist/expression/javascript/node/compound.js +1 -1
- package/dist/expression/javascript/node/compound.js.map +1 -1
- package/dist/expression/javascript/node/conditional.js +1 -1
- package/dist/expression/javascript/node/conditional.js.map +1 -1
- package/dist/expression/javascript/node/identifier.js +1 -1
- package/dist/expression/javascript/node/identifier.js.map +1 -1
- package/dist/expression/javascript/node/this.js +1 -1
- package/dist/expression/javascript/node/this.js.map +1 -1
- package/dist/expression/javascript/node/unary.js +1 -1
- package/dist/expression/javascript/node/unary.js.map +1 -1
- package/dist/geo/points/transform.js +4 -4
- package/dist/geo/points/transform.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/job/JobBase.js +1 -1
- package/dist/job/JobBase.js.map +1 -1
- package/dist/node/nodeValues.js +1 -1
- package/dist/node/nodeValues.js.map +1 -1
- package/dist/nodeDefExpressionEvaluator/functions.js +11 -9
- package/dist/nodeDefExpressionEvaluator/functions.js.map +1 -1
- package/dist/nodeDefExpressionEvaluator/node/identifier.js +1 -1
- package/dist/nodeDefExpressionEvaluator/node/identifier.js.map +1 -1
- package/dist/record/_records/recordCompletion.js +3 -3
- package/dist/record/_records/recordCompletion.js.map +1 -1
- package/dist/record/_records/recordGetters.d.ts +39 -165
- package/dist/record/_records/recordGetters.js +174 -260
- package/dist/record/_records/recordGetters.js.map +1 -1
- package/dist/record/_records/recordPagesValidation.js +5 -5
- package/dist/record/_records/recordPagesValidation.js.map +1 -1
- package/dist/record/_records/recordUtils.js +4 -4
- package/dist/record/_records/recordUtils.js.map +1 -1
- package/dist/record/nodePointers.js +1 -1
- package/dist/record/nodePointers.js.map +1 -1
- package/dist/record/recordCloner.js +1 -1
- package/dist/record/recordCloner.js.map +1 -1
- package/dist/record/recordExpressionEvaluator/functions.js +4 -9
- package/dist/record/recordExpressionEvaluator/functions.js.map +1 -1
- package/dist/record/recordExpressionEvaluator/node/identifier/identifier.js +6 -6
- package/dist/record/recordExpressionEvaluator/node/identifier/identifier.js.map +1 -1
- package/dist/record/recordExpressionEvaluator/node/identifier/nodesFinder.js +2 -2
- package/dist/record/recordExpressionEvaluator/node/identifier/nodesFinder.js.map +1 -1
- package/dist/record/recordExpressionEvaluator/recordExpressionEvaluator.js +1 -1
- package/dist/record/recordExpressionEvaluator/recordExpressionEvaluator.js.map +1 -1
- package/dist/record/recordFixer.js +7 -7
- package/dist/record/recordFixer.js.map +1 -1
- package/dist/record/recordNodesUpdater/recordExpressionValueConverter.js +2 -2
- package/dist/record/recordNodesUpdater/recordExpressionValueConverter.js.map +1 -1
- package/dist/record/recordNodesUpdater/recordNodeDependentsApplicableUpdater.js +20 -24
- package/dist/record/recordNodesUpdater/recordNodeDependentsApplicableUpdater.js.map +1 -1
- package/dist/record/recordNodesUpdater/recordNodeDependentsCodeAttributesUpdater.js +1 -1
- package/dist/record/recordNodesUpdater/recordNodeDependentsCodeAttributesUpdater.js.map +1 -1
- package/dist/record/recordNodesUpdater/recordNodeDependentsCountUpdater.js +1 -1
- package/dist/record/recordNodesUpdater/recordNodeDependentsCountUpdater.js.map +1 -1
- package/dist/record/recordNodesUpdater/recordNodeDependentsDefaultValuesUpdater.js +5 -10
- package/dist/record/recordNodesUpdater/recordNodeDependentsDefaultValuesUpdater.js.map +1 -1
- package/dist/record/recordNodesUpdater/recordNodeDependentsEnumeratedEntitiesUpdater.js +3 -3
- package/dist/record/recordNodesUpdater/recordNodeDependentsEnumeratedEntitiesUpdater.js.map +1 -1
- package/dist/record/recordNodesUpdater/recordNodeDependentsEnumeratingItemsUpdater.js +4 -8
- package/dist/record/recordNodesUpdater/recordNodeDependentsEnumeratingItemsUpdater.js.map +1 -1
- package/dist/record/recordNodesUpdater/recordNodeDependentsFileNamesEvaluator.js +4 -8
- package/dist/record/recordNodesUpdater/recordNodeDependentsFileNamesEvaluator.js.map +1 -1
- package/dist/record/recordNodesUpdater/recordNodesCreator.js +1 -1
- package/dist/record/recordNodesUpdater/recordNodesCreator.js.map +1 -1
- package/dist/record/recordNodesUpdater/recordNodesDeleter.js +1 -1
- package/dist/record/recordNodesUpdater/recordNodesDeleter.js.map +1 -1
- package/dist/record/recordNodesUpdater/recordNodesDependentsUpdaterCommons.js +2 -2
- package/dist/record/recordNodesUpdater/recordNodesDependentsUpdaterCommons.js.map +1 -1
- package/dist/record/recordNodesUpdater/recordNodesUpdater.js +1 -1
- package/dist/record/recordNodesUpdater/recordNodesUpdater.js.map +1 -1
- package/dist/record/recordPrettyPrinter.js +19 -26
- package/dist/record/recordPrettyPrinter.js.map +1 -1
- package/dist/record/recordUpdater.js +3 -3
- package/dist/record/recordUpdater.js.map +1 -1
- package/dist/record/recordValidator/attributeKeyValidator.js +4 -4
- package/dist/record/recordValidator/attributeKeyValidator.js.map +1 -1
- package/dist/record/recordValidator/attributeUniqueValidator.js +1 -1
- package/dist/record/recordValidator/attributeUniqueValidator.js.map +1 -1
- package/dist/record/recordValidator/attributeValidator.js +8 -16
- package/dist/record/recordValidator/attributeValidator.js.map +1 -1
- package/dist/record/recordValidator/countValidator.js +2 -2
- package/dist/record/recordValidator/countValidator.js.map +1 -1
- package/dist/record/recordValidator/recordValidator.js +2 -5
- package/dist/record/recordValidator/recordValidator.js.map +1 -1
- package/dist/record/records.d.ts +31 -146
- package/dist/survey/nodeDefsFixer.js +2 -2
- package/dist/survey/nodeDefsFixer.js.map +1 -1
- package/dist/survey/surveys/nodeDefs.js +4 -4
- package/dist/survey/surveys/nodeDefs.js.map +1 -1
- package/dist/tests/builder/recordBuilder/attributeBuilder.js +1 -1
- package/dist/tests/builder/recordBuilder/attributeBuilder.js.map +1 -1
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ const getGlobalObjectProperty = (name, object) => {
|
|
|
19
19
|
if (object && globalObjectsArray.includes(object)) {
|
|
20
20
|
const property = object[name];
|
|
21
21
|
if (!property) {
|
|
22
|
-
throw new error_1.SystemError(
|
|
22
|
+
throw new error_1.SystemError(error_1.SystemErrorKeys.expression.undefinedFunction, { name });
|
|
23
23
|
}
|
|
24
24
|
return property;
|
|
25
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.js","sourceRoot":"","sources":["../../../src/expression/javascript/global.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"global.js","sourceRoot":"","sources":["../../../src/expression/javascript/global.ts"],"names":[],"mappings":";;;AACA,uCAA0D;AAE1D,MAAM,uBAAuB,GAAoB;IAC/C,KAAK;IACL,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,MAAM;IACN,MAAM;CACP,CAAA;AACD,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAA;AAE1D,MAAM,uBAAuB,GAAG,CAAC,IAAY,EAAE,MAAW,EAAO,EAAE;IACxE,MAAM,YAAY,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAA;IAClD,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,YAAY,CAAA;IACrB,CAAC;IACD,IAAI,MAAM,IAAI,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;QAE7B,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,mBAAW,CAAC,uBAAe,CAAC,UAAU,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;QAC/E,CAAC;QACD,OAAO,QAAQ,CAAA;IACjB,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAdY,QAAA,uBAAuB,GAAvB,uBAAuB,CAcnC","sourcesContent":["import { Dictionary } from '../../common'\nimport { SystemError, SystemErrorKeys } from '../../error'\n\nconst globalObjectsDictionary: Dictionary<any> = {\n Array,\n Boolean,\n Date,\n Math,\n Number,\n String,\n}\nconst globalObjectsArray = Object.values(globalObjectsDictionary)\n\nexport const getGlobalObjectProperty = (name: string, object: any): any => {\n const globalObject = globalObjectsDictionary[name]\n if (globalObject) {\n return globalObject\n }\n if (object && globalObjectsArray.includes(object)) {\n const property = object[name]\n\n if (!property) {\n throw new SystemError(SystemErrorKeys.expression.undefinedFunction, { name })\n }\n return property\n }\n return null\n}\n"]}
|
|
@@ -5,7 +5,7 @@ const error_1 = require("../../../error");
|
|
|
5
5
|
const node_1 = require("../../node");
|
|
6
6
|
class ArrayEvaluator extends node_1.ExpressionNodeEvaluator {
|
|
7
7
|
evaluate() {
|
|
8
|
-
return Promise.reject(new error_1.SystemError(
|
|
8
|
+
return Promise.reject(new error_1.SystemError(error_1.SystemErrorKeys.expression.notSupported, { type: 'array' }));
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
exports.ArrayEvaluator = ArrayEvaluator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/array.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/array.ts"],"names":[],"mappings":";;;AAAA,0CAA6D;AAE7D,qCAAqE;AAErE,oBAAyD,SAAQ,8BAA2C;IAC1G,QAAQ;QACN,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,mBAAW,CAAC,uBAAe,CAAC,UAAU,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;IACpG,CAAC;CACF","sourcesContent":["import { SystemError, SystemErrorKeys } from '../../../error'\nimport { ExpressionContext } from '../../context'\nimport { ArrayExpression, ExpressionNodeEvaluator } from '../../node'\n\nexport class ArrayEvaluator<C extends ExpressionContext> extends ExpressionNodeEvaluator<C, ArrayExpression> {\n evaluate(): Promise<any> {\n return Promise.reject(new SystemError(SystemErrorKeys.expression.notSupported, { type: 'array' }))\n }\n}\n"]}
|
|
@@ -57,7 +57,7 @@ class BinaryEvaluator extends node_1.ExpressionNodeEvaluator {
|
|
|
57
57
|
const { left, right, operator } = expressionNode;
|
|
58
58
|
const fn = binaryOperators[operator];
|
|
59
59
|
if (!fn) {
|
|
60
|
-
throw new error_1.SystemError(
|
|
60
|
+
throw new error_1.SystemError(error_1.SystemErrorKeys.expression.booleanOperatorNotSupported, { operator });
|
|
61
61
|
}
|
|
62
62
|
const leftResult = yield this.evaluator.evaluateNode(left, this.context);
|
|
63
63
|
const rightResult = yield this.evaluator.evaluateNode(right, this.context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/binary.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"binary.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/binary.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA6D;AAC7D,0CAAwC;AAExC,qCAAsE;AAEtE,MAAM,gBAAgB,GAAwD;IAC5E,4DAA4D;IAC5D,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;IAC/B,4BAA4B;IAC5B,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;IACvB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;IACvB,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC;IACpB,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC;IACpB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC;IACtB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC;IACtB,qCAAqC;IACrC,6CAA6C;IAC7C,6BAA6B;IAC7B,6BAA6B;CAC9B,CAAA;AAED,MAAM,mBAAmB,GAA6D;IACpF,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC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ACzD,gCAAgC;YAChC,4DAA4D;YAC5D,MAAM,OAAO,GAAG,CAAC,QAAQ,KAAK,IAAI,IAAI,SAAS,GAAG,CAAC,CAAC,IAAI,SAAS,KAAK,CAAC,CAAA;YAEvE,OAAO,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;QACrD,CAAC;KAAA;CACF","sourcesContent":["import { SystemError, SystemErrorKeys } from '../../../error'\nimport { Objects } from '../../../utils'\nimport { ExpressionContext } from '../../context'\nimport { BinaryExpression, ExpressionNodeEvaluator } from '../../node'\n\nconst booleanOperators: { [operator: string]: (a: any, b: any) => boolean } = {\n // Short-circuiting operators (we coerce the output to bool)\n '||': (a, b) => Boolean(a || b),\n '&&': (a, b) => Boolean(a && b),\n // Normal boolean operators:\n '==': (a, b) => a === b,\n '!=': (a, b) => a !== b,\n '<': (a, b) => a < b,\n '>': (a, b) => a > b,\n '<=': (a, b) => a <= b,\n '>=': (a, b) => a >= b,\n // Only allow one kind of equalities.\n // some hidden dependencies on === and !==...\n // '===': (a, b) => a === b,\n // '!==': (a, b) => a !== b,\n}\n\nconst arithmeticOperators: { [operator: string]: (a: number, b: number) => number } = {\n '+': (a, b) => a + b,\n '-': (a, b) => a - b,\n '*': (a, b) => a * b,\n '/': (a, b) => a / b,\n '%': (a, b) => a % b,\n '**': (a, b) => a ** b,\n // Don't allow bitwise operators:\n // '|': (a, b) => a | b,\n // '^': (a, b) => a ^ b,\n // '&': (a, b) => a & b,\n // Don't allow shifts either:\n // '<<': (a, b) => a << b,\n // '>>': (a, b) => a >> b,\n // '>>>': (a, b) => a >>> b,\n}\n\nconst stringOperators: { [operatos: string]: (a: string, b: string) => string } = {\n '+': (a, b) => a + b,\n}\n\nconst binaryOperators = {\n ...booleanOperators,\n ...arithmeticOperators,\n}\n\nconst isNumber = (value: any) => !Objects.isNil(value) && value.constructor === Number\nconst isString = (value: any) => !Objects.isNil(value) && value.constructor === String\n\nexport class BinaryEvaluator<C extends ExpressionContext> extends ExpressionNodeEvaluator<C, BinaryExpression> {\n async evaluate(expressionNode: BinaryExpression): Promise<any> {\n const { left, right, operator } = expressionNode\n\n const fn = binaryOperators[operator]\n if (!fn) {\n throw new SystemError(SystemErrorKeys.expression.booleanOperatorNotSupported, { operator })\n }\n\n const leftResult = await this.evaluator.evaluateNode(left, this.context)\n const rightResult = await this.evaluator.evaluateNode(right, this.context)\n\n // string operators\n if (operator in stringOperators) {\n if (isString(leftResult) || isString(rightResult)) {\n // string concatenation with null or undefined gives null (like arithmetic operations with null)\n if (Objects.isNil(leftResult) || Objects.isNil(rightResult)) {\n return null\n }\n const strFn = stringOperators[operator]\n return strFn(leftResult as string, rightResult as string)\n }\n // operator can be in arithmeticOperators (+), do not return anything now\n }\n\n // Arithmetic operators will always return nulls for any non-numeric inputs\n if (operator in arithmeticOperators) {\n if (isNumber(leftResult) && isNumber(rightResult)) {\n return fn(leftResult as number, rightResult as number)\n }\n return null\n }\n\n const nullCount = [leftResult, rightResult].filter((result) => result === null || result === undefined).length\n\n // Boolean operators:\n // Like ternary logic, but logical OR has special handling.\n // The expression is boolean if either value is not null.\n // Otherwise the result is null.\n // All other operators return null if either operand is null\n const isValid = (operator === '||' && nullCount < 2) || nullCount === 0\n\n return isValid ? fn(leftResult, rightResult) : null\n }\n}\n"]}
|
|
@@ -25,7 +25,7 @@ class CallEvaluator extends node_1.ExpressionNodeEvaluator {
|
|
|
25
25
|
}
|
|
26
26
|
// No complex expressions may be put in place of a function body.
|
|
27
27
|
// Only a plain identifier is allowed.
|
|
28
|
-
throw new error_1.SystemError(
|
|
28
|
+
throw new error_1.SystemError(error_1.SystemErrorKeys.expression.invalidCalleeType, { type: callee.type });
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
evaluateMember(expressionNode, callee) {
|
|
@@ -62,7 +62,7 @@ class CallEvaluator extends node_1.ExpressionNodeEvaluator {
|
|
|
62
62
|
const args = yield Promise.all(exprArgs.map((arg) => this.evaluator.evaluateNode(arg, contextArg)));
|
|
63
63
|
return globalFn(...args);
|
|
64
64
|
}
|
|
65
|
-
throw new error_1.SystemError(
|
|
65
|
+
throw new error_1.SystemError(error_1.SystemErrorKeys.expression.undefinedFunction, { name: fnName });
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
evaluateCustomIdentifier(expressionNode, fnName) {
|
|
@@ -73,9 +73,9 @@ class CallEvaluator extends node_1.ExpressionNodeEvaluator {
|
|
|
73
73
|
const expressionFunction = this.evaluator.functions[fnName];
|
|
74
74
|
const { minArity, maxArity, evaluateArgsToNodes, executor } = expressionFunction;
|
|
75
75
|
if (numArgs < minArity)
|
|
76
|
-
throw new error_1.SystemError(
|
|
76
|
+
throw new error_1.SystemError(error_1.SystemErrorKeys.expression.functionHasTooFewArguments, { fnName, minArity, numArgs });
|
|
77
77
|
if (maxArity !== undefined && maxArity >= 0 && numArgs > maxArity)
|
|
78
|
-
throw new error_1.SystemError(
|
|
78
|
+
throw new error_1.SystemError(error_1.SystemErrorKeys.expression.functionHasTooManyArguments, { fnName, maxArity, numArgs });
|
|
79
79
|
// evaluate arguments
|
|
80
80
|
const argsContext = Object.assign(Object.assign({}, this.context), { evaluateToNode: evaluateArgsToNodes });
|
|
81
81
|
const args = yield Promise.all(exprArgs.map((arg) => this.evaluator.evaluateNode(arg, argsContext)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/call.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"call.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/call.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA6D;AAG7D,qCAMmB;AACnB,sCAAmD;AAEnD,mBAAwD,SAAQ,8BAA0C;IAClG,QAAQ,CAAC,cAA8B;;YAC3C,MAAM,EAAE,MAAM,EAAE,GAAG,cAAc,CAAA;YAEjC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,cAAc,CAAA;YAC9C,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAA;YAE/B,MAAM,kBAAkB,GAA0B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;YAElF,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,mBAAmB,EAAE,QAAQ,EAAE,GAAG,kBAAkB,CAAA;YAEhF,IAAI,OAAO,GAAG,QAAQ;gBACpB,MAAM,IAAI,mBAAW,CAAC,uBAAe,CAAC,UAAU,CAAC,0BAA0B,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAA;YAC7G,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,IAAI,CAAC,IAAI,OAAO,GAAG,QAAQ;gBAC/D,MAAM,IAAI,mBAAW,CAAC,uBAAe,CAAC,UAAU,CAAC,2BAA2B,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAA;YAE9G,qBAAqB;YACrB,MAAM,WAAW,mCAAQ,IAAI,CAAC,OAAO,KAAE,cAAc,EAAE,mBAAmB,GAAE,CAAA;YAC5E,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;YAEpG,uEAAuE;YACvE,wEAAwE;YACxE,sCAAsC;YACtC,OAAO,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;QACxC,CAAC;KAAA;CACF","sourcesContent":["import { SystemError, SystemErrorKeys } from '../../../error'\nimport { ExpressionContext } from '../../context'\nimport { ExpressionFunction } from '../../function'\nimport {\n CallExpression,\n ExpressionNodeEvaluator,\n ExpressionNodeType,\n IdentifierExpression,\n MemberExpression,\n} from '../../node'\nimport { getGlobalObjectProperty } from '../global'\n\nexport class CallEvaluator<C extends ExpressionContext> extends ExpressionNodeEvaluator<C, CallExpression> {\n async evaluate(expressionNode: CallExpression): Promise<any> {\n const { callee } = expressionNode\n\n if (callee.type === ExpressionNodeType.Member) {\n return this.evaluateMember(expressionNode, callee)\n } else if (callee.type === ExpressionNodeType.Identifier) {\n return this.evaluateIdentifier(expressionNode, callee)\n }\n\n // No complex expressions may be put in place of a function body.\n // Only a plain identifier is allowed.\n throw new SystemError(SystemErrorKeys.expression.invalidCalleeType, { type: callee.type })\n }\n\n private async evaluateMember(expressionNode: CallExpression, callee: MemberExpression): Promise<any> {\n const { arguments: exprArgs } = expressionNode\n\n // global function (e.g. Math.round(...))\n const fn = await this.evaluator.evaluateNode(callee, this.context)\n if (fn) {\n const { object: calleeObj } = callee\n const fnObject = await this.evaluator.evaluateNode(calleeObj, this.context)\n const argsEvaluated = await Promise.all(exprArgs.map((arg) => this.evaluator.evaluateNode(arg, this.context)))\n const args = argsEvaluated.flat()\n return fn.call(fnObject, ...args)\n }\n return null\n }\n\n private async evaluateIdentifier(expressionNode: CallExpression, callee: IdentifierExpression): Promise<any> {\n // Arguments is a reserved word in strict mode\n const { arguments: exprArgs } = expressionNode\n const { object: contextObject } = this.context\n\n const { name: fnName } = callee\n\n const functionInfo = this.evaluator.functions[fnName]\n if (functionInfo) {\n // The function is among the custom functions.\n return this.evaluateCustomIdentifier(expressionNode, fnName)\n }\n // identifier is a global object\n const globalFn = getGlobalObjectProperty(fnName, contextObject)\n if (globalFn !== null) {\n // global functions like String, Number, must be invoked passing node value as argument, not the node itself\n const contextArg = { ...this.context, evaluateToNode: false }\n const args = await Promise.all(exprArgs.map((arg) => this.evaluator.evaluateNode(arg, contextArg)))\n return globalFn(...args)\n }\n\n throw new SystemError(SystemErrorKeys.expression.undefinedFunction, { name: fnName })\n }\n\n private async evaluateCustomIdentifier(expressionNode: CallExpression, fnName: string): Promise<any> {\n // Arguments is a reserved word in strict mode\n const { arguments: exprArgs } = expressionNode\n const numArgs = exprArgs.length\n\n const expressionFunction: ExpressionFunction<C> = this.evaluator.functions[fnName]\n\n const { minArity, maxArity, evaluateArgsToNodes, executor } = expressionFunction\n\n if (numArgs < minArity)\n throw new SystemError(SystemErrorKeys.expression.functionHasTooFewArguments, { fnName, minArity, numArgs })\n if (maxArity !== undefined && maxArity >= 0 && numArgs > maxArity)\n throw new SystemError(SystemErrorKeys.expression.functionHasTooManyArguments, { fnName, maxArity, numArgs })\n\n // evaluate arguments\n const argsContext = { ...this.context, evaluateToNode: evaluateArgsToNodes }\n const args = await Promise.all(exprArgs.map((arg) => this.evaluator.evaluateNode(arg, argsContext)))\n\n // Currently there are no side effects from function evaluation so it's\n // safe to call the function even when we're just parsing the expression\n // to find all identifiers being used.\n return executor(this.context)(...args)\n }\n}\n"]}
|
|
@@ -5,7 +5,7 @@ const error_1 = require("../../../error");
|
|
|
5
5
|
const node_1 = require("../../node");
|
|
6
6
|
class CompoundEvaluator extends node_1.ExpressionNodeEvaluator {
|
|
7
7
|
evaluate() {
|
|
8
|
-
return Promise.reject(new error_1.SystemError(
|
|
8
|
+
return Promise.reject(new error_1.SystemError(error_1.SystemErrorKeys.expression.notSupported, { type: 'compound' }));
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
exports.CompoundEvaluator = CompoundEvaluator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compound.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/compound.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"compound.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/compound.ts"],"names":[],"mappings":";;;AAAA,0CAA6D;AAE7D,qCAAwE;AAExE,uBAA4D,SAAQ,8BAA8C;IAChH,QAAQ;QACN,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,mBAAW,CAAC,uBAAe,CAAC,UAAU,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC,CAAA;IACvG,CAAC;CACF","sourcesContent":["import { SystemError, SystemErrorKeys } from '../../../error'\nimport { ExpressionContext } from '../../context'\nimport { CompoundExpression, ExpressionNodeEvaluator } from '../../node'\n\nexport class CompoundEvaluator<C extends ExpressionContext> extends ExpressionNodeEvaluator<C, CompoundExpression> {\n evaluate(): Promise<any> {\n return Promise.reject(new SystemError(SystemErrorKeys.expression.notSupported, { type: 'compound' }))\n }\n}\n"]}
|
|
@@ -5,7 +5,7 @@ const error_1 = require("../../../error");
|
|
|
5
5
|
const node_1 = require("../../node");
|
|
6
6
|
class ConditionalEvaluator extends node_1.ExpressionNodeEvaluator {
|
|
7
7
|
evaluate() {
|
|
8
|
-
return Promise.reject(new error_1.SystemError(
|
|
8
|
+
return Promise.reject(new error_1.SystemError(error_1.SystemErrorKeys.expression.notSupported, { type: 'conditional' }));
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
exports.ConditionalEvaluator = ConditionalEvaluator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conditional.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/conditional.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"conditional.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/conditional.ts"],"names":[],"mappings":";;;AAAA,0CAA6D;AAE7D,qCAA2E;AAE3E,0BAA+D,SAAQ,8BAGtE;IACC,QAAQ;QACN,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,mBAAW,CAAC,uBAAe,CAAC,UAAU,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC,CAAA;IAC1G,CAAC;CACF","sourcesContent":["import { SystemError, SystemErrorKeys } from '../../../error'\nimport { ExpressionContext } from '../../context'\nimport { ConditionalExpression, ExpressionNodeEvaluator } from '../../node'\n\nexport class ConditionalEvaluator<C extends ExpressionContext> extends ExpressionNodeEvaluator<\n C,\n ConditionalExpression\n> {\n evaluate(): Promise<any> {\n return Promise.reject(new SystemError(SystemErrorKeys.expression.notSupported, { type: 'conditional' }))\n }\n}\n"]}
|
|
@@ -37,7 +37,7 @@ class IdentifierEvaluator extends node_1.ExpressionNodeEvaluator {
|
|
|
37
37
|
if (property) {
|
|
38
38
|
return Promise.resolve(property.value);
|
|
39
39
|
}
|
|
40
|
-
return Promise.reject(new error_1.SystemError(
|
|
40
|
+
return Promise.reject(new error_1.SystemError(error_1.SystemErrorKeys.expression.identifierNotFound, { name: expressionNode.name }));
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
exports.IdentifierEvaluator = IdentifierEvaluator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifier.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/identifier.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"identifier.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/identifier.ts"],"names":[],"mappings":";;;AAAA,0CAA6D;AAE7D,qCAA0E;AAC1E,sCAAmD;AAEnD,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,MAAW,EAAE,EAAE;IACtD,MAAM,IAAI,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,IAAI,CAAC,CAAA;IAC3B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,SAAS,CAAA;IAClB,CAAC;IACD,OAAO,OAAO,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AAC9D,CAAC,CAAA;AAED,yBAA8D,SAAQ,8BAAgD;IACpH;;;;;;OAMG;IACO,0BAA0B,CAAC,cAAoC;QACvE,MAAM,EAAE,IAAI,EAAE,GAAG,cAAc,CAAA;QAC/B,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC,OAAO,CAAA;QAE9C,MAAM,UAAU,GAAG,IAAA,gCAAuB,EAAC,IAAI,EAAE,aAAa,CAAC,CAAA;QAC/D,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;YACxB,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAAA;QAC9B,CAAC;QACD,MAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAA;QAC7D,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,CAAA;QAClC,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,QAAQ,CAAC,cAAoC;QAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,0BAA0B,CAAC,cAAc,CAAC,CAAA;QAChE,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QACxC,CAAC;QACD,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,mBAAW,CAAC,uBAAe,CAAC,UAAU,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IACtH,CAAC;CACF","sourcesContent":["import { SystemError, SystemErrorKeys } from '../../../error'\nimport { ExpressionContext } from '../../context'\nimport { ExpressionNodeEvaluator, IdentifierExpression } from '../../node'\nimport { getGlobalObjectProperty } from '../global'\n\nconst getNativeProperty = (name: string, object: any) => {\n const prop = object?.[name]\n if (prop === undefined) {\n return undefined\n }\n return typeof prop === 'function' ? prop.bind(object) : prop\n}\n\nexport class IdentifierEvaluator<C extends ExpressionContext> extends ExpressionNodeEvaluator<C, IdentifierExpression> {\n /**\n * Looks for the identifier among global or native properties, without throwing when it is not found\n * (creating errors captures stack traces, which is expensive when it happens for every evaluated identifier).\n *\n * @param expressionNode - The identifier expression node.\n * @returns The property value wrapped in an object, or null if the identifier has not been found.\n */\n protected findGlobalOrNativeProperty(expressionNode: IdentifierExpression): { value: any } | null {\n const { name } = expressionNode\n const { object: contextObject } = this.context\n\n const globalProp = getGlobalObjectProperty(name, contextObject)\n if (globalProp !== null) {\n return { value: globalProp }\n }\n const nativeProperty = getNativeProperty(name, contextObject)\n if (nativeProperty !== undefined) {\n return { value: nativeProperty }\n }\n return null\n }\n\n evaluate(expressionNode: IdentifierExpression): Promise<any> {\n const property = this.findGlobalOrNativeProperty(expressionNode)\n if (property) {\n return Promise.resolve(property.value)\n }\n return Promise.reject(new SystemError(SystemErrorKeys.expression.identifierNotFound, { name: expressionNode.name }))\n }\n}\n"]}
|
|
@@ -5,7 +5,7 @@ const error_1 = require("../../../error");
|
|
|
5
5
|
const node_1 = require("../../node");
|
|
6
6
|
class ThisEvaluator extends node_1.ExpressionNodeEvaluator {
|
|
7
7
|
evaluate() {
|
|
8
|
-
return Promise.reject(new error_1.SystemError(
|
|
8
|
+
return Promise.reject(new error_1.SystemError(error_1.SystemErrorKeys.expression.notSupported, { type: 'this' }));
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
exports.ThisEvaluator = ThisEvaluator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"this.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/this.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"this.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/this.ts"],"names":[],"mappings":";;;AAAA,0CAA6D;AAE7D,qCAAoE;AAEpE,mBAAwD,SAAQ,8BAA0C;IACxG,QAAQ;QACN,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,mBAAW,CAAC,uBAAe,CAAC,UAAU,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;IACnG,CAAC;CACF","sourcesContent":["import { SystemError, SystemErrorKeys } from '../../../error'\nimport { ExpressionContext } from '../../context'\nimport { ExpressionNodeEvaluator, ThisExpression } from '../../node'\n\nexport class ThisEvaluator<C extends ExpressionContext> extends ExpressionNodeEvaluator<C, ThisExpression> {\n evaluate(): Promise<any> {\n return Promise.reject(new SystemError(SystemErrorKeys.expression.notSupported, { type: 'this' }))\n }\n}\n"]}
|
|
@@ -30,7 +30,7 @@ class UnaryEvaluator extends node_1.ExpressionNodeEvaluator {
|
|
|
30
30
|
const { argument, operator } = expressionNode;
|
|
31
31
|
const fn = unaryOperators[operator];
|
|
32
32
|
if (!fn) {
|
|
33
|
-
throw new error_1.SystemError(
|
|
33
|
+
throw new error_1.SystemError(error_1.SystemErrorKeys.expression.unaryOperatorNotSupported, { operator });
|
|
34
34
|
}
|
|
35
35
|
const res = yield this.evaluator.evaluateNode(argument, this.context);
|
|
36
36
|
return fn(res);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unary.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/unary.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"unary.js","sourceRoot":"","sources":["../../../../src/expression/javascript/node/unary.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA6D;AAE7D,qCAAqE;AAErE,MAAM,cAAc,GAAuC;IACzD,wCAAwC;IACxC,wBAAwB;IACxB,GAAG,EAAE,CAAC,CAAM,EAAkB,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAEzG,qEAAqE;IACrE,yDAAyD;IACzD,GAAG,EAAE,CAAC,CAAM,EAAiB,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAEhE,uEAAuE;IACvE,wDAAwD;IACxD,uDAAuD;IACvD,oCAAoC;CACrC,CAAA;AAED,oBAAyD,SAAQ,8BAA2C;IACpG,QAAQ,CAAC,cAA+B;;YAC5C,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAA;YAC7C,MAAM,EAAE,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAA;YAEnC,IAAI,CAAC,EAAE,EAAE,CAAC;gBACR,MAAM,IAAI,mBAAW,CAAC,uBAAe,CAAC,UAAU,CAAC,yBAAyB,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAA;YAC3F,CAAC;YAED,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;YACrE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAA;QAChB,CAAC;KAAA;CACF","sourcesContent":["import { SystemError, SystemErrorKeys } from '../../../error'\nimport { ExpressionContext } from '../../context'\nimport { ExpressionNodeEvaluator, UnaryExpression } from '../../node'\n\nconst unaryOperators: { [key: string]: (x: any) => any } = {\n // Only accept bools and nulls as input.\n // Otherwise return null\n '!': (x: any): boolean | null => (x === null || x === undefined || x.constructor === Boolean ? !x : null),\n\n // Negation: Only accept normal finite numbers, otherwise return null\n // NOTE: Under JS semantics, we would have -\"123\" -> -123\n '-': (x: any): number | null => (Number.isFinite(x) ? -x : null),\n\n // Don't allow the unary + operator now. Define semantics for it first.\n // Under JS semantics, \"+\" coerces a string to a number.\n // Maybe we should just have `parseNumber` in `stdlib`?\n // '+': x => R.isNil(x) ? null : +x,\n}\n\nexport class UnaryEvaluator<C extends ExpressionContext> extends ExpressionNodeEvaluator<C, UnaryExpression> {\n async evaluate(expressionNode: UnaryExpression): Promise<any> {\n const { argument, operator } = expressionNode\n const fn = unaryOperators[operator]\n\n if (!fn) {\n throw new SystemError(SystemErrorKeys.expression.unaryOperatorNotSupported, { operator })\n }\n\n const res = await this.evaluator.evaluateNode(argument, this.context)\n return fn(res)\n }\n}\n"]}
|
|
@@ -32,7 +32,7 @@ const getConverter = (wktFrom, wktTo) => {
|
|
|
32
32
|
*/
|
|
33
33
|
const transformOrThrow = (point, srsCodeTo, srsIndex = srs_1.DEFAULT_SRS_INDEX) => {
|
|
34
34
|
if (!(0, isFilled_1.isFilled)(point))
|
|
35
|
-
throw new error_1.SystemError(
|
|
35
|
+
throw new error_1.SystemError(error_1.SystemErrorKeys.geo.pointNotFilled);
|
|
36
36
|
const { srs: srsCodeFrom } = point;
|
|
37
37
|
if (srsCodeFrom === srsCodeTo) {
|
|
38
38
|
// projection is not needed
|
|
@@ -40,17 +40,17 @@ const transformOrThrow = (point, srsCodeTo, srsIndex = srs_1.DEFAULT_SRS_INDEX)
|
|
|
40
40
|
}
|
|
41
41
|
const srsFrom = (0, getSrs_1.getSrs)({ code: srsCodeFrom, srsIndex });
|
|
42
42
|
if (!srsFrom)
|
|
43
|
-
throw new error_1.SystemError(
|
|
43
|
+
throw new error_1.SystemError(error_1.SystemErrorKeys.geo.srsNotFound, { code: srsCodeFrom });
|
|
44
44
|
const srsTo = (0, getSrs_1.getSrs)({ code: srsCodeTo, srsIndex });
|
|
45
45
|
if (!srsTo)
|
|
46
|
-
throw new error_1.SystemError(
|
|
46
|
+
throw new error_1.SystemError(error_1.SystemErrorKeys.geo.srsNotFound, { code: srsCodeTo });
|
|
47
47
|
try {
|
|
48
48
|
const { x, y } = point;
|
|
49
49
|
const [long, lat] = getConverter(srsFrom.wkt, srsTo.wkt).forward([Number(x), Number(y)]);
|
|
50
50
|
return pointFactory_1.PointFactory.createInstance(Object.assign(Object.assign({}, point), { srs: srsCodeTo, x: long, y: lat }));
|
|
51
51
|
}
|
|
52
52
|
catch (error) {
|
|
53
|
-
throw new error_1.SystemError(
|
|
53
|
+
throw new error_1.SystemError(error_1.SystemErrorKeys.geo.transformFailed, { srsFrom: srsCodeFrom, srsTo: srsCodeTo }, { cause: error });
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
exports.transformOrThrow = transformOrThrow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/geo/points/transform.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA6C;AAE7C,
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/geo/points/transform.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA6C;AAE7C,uCAA0D;AAC1D,mCAAuD;AAEvD,kDAA8C;AAC9C,yCAAqC;AACrC,qCAAiC;AAEjC,oGAAoG;AACpG,MAAM,eAAe,GAAG,IAAI,GAAG,EAAqB,CAAA;AAEpD,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,KAAa,EAAa,EAAE;IACjE,MAAM,GAAG,GAAG,GAAG,OAAO,KAAK,KAAK,EAAE,CAAA;IAClC,IAAI,SAAS,GAAG,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACxC,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,SAAS,GAAG,IAAA,eAAK,EAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QACjC,eAAe,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAA;IACrC,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA;AAED;;;;;;;;GAQG;AACI,MAAM,gBAAgB,GAAG,CAAC,KAAY,EAAE,SAAiB,EAAE,QAAQ,GAAa,uBAAiB,EAAS,EAAE;IACjH,IAAI,CAAC,IAAA,mBAAQ,EAAC,KAAK,CAAC;QAAE,MAAM,IAAI,mBAAW,CAAC,uBAAe,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;IAE/E,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,KAAK,CAAA;IAElC,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9B,2BAA2B;QAC3B,OAAO,KAAK,CAAA;IACd,CAAC;IACD,MAAM,OAAO,GAAG,IAAA,eAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAA;IACvD,IAAI,CAAC,OAAO;QAAE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CAAC,CAAA;IACrD,CAAC;eAAO,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC,CAAA;AANY,QAAA,SAAS,GAAT,SAAS,CAMrB","sourcesContent":["import proj4, { type Converter } from 'proj4'\n\nimport { SystemError, SystemErrorKeys } from '../../error'\nimport { DEFAULT_SRS_INDEX, SRSIndex } from '../../srs'\nimport { Point } from '../point'\nimport { PointFactory } from '../pointFactory'\nimport { isFilled } from './isFilled'\nimport { getSrs } from './getSrs'\n\n// proj4 parses both WKT strings every time it is called with them: cache the converters by WKT pair\nconst convertersCache = new Map<string, Converter>()\n\nconst getConverter = (wktFrom: string, wktTo: string): Converter => {\n const key = `${wktFrom}\\n${wktTo}`\n let converter = convertersCache.get(key)\n if (!converter) {\n converter = proj4(wktFrom, wktTo)\n convertersCache.set(key, converter)\n }\n return converter\n}\n\n/**\n * Transforms the specified point from one SRS into another, throwing a SystemError with the reason when it cannot.\n *\n * @param point - The point to transform.\n * @param srsCodeTo - The SRS code to transform the point into.\n * @param srsIndex - SRSs indexed by SRS code.\n * @returns The transformed point (the point itself if it is already in the target SRS).\n * @throws {SystemError} `geo.pointNotFilled`, `geo.srsNotFound` (with the `code` param) or `geo.transformFailed`.\n */\nexport const transformOrThrow = (point: Point, srsCodeTo: string, srsIndex: SRSIndex = DEFAULT_SRS_INDEX): Point => {\n if (!isFilled(point)) throw new SystemError(SystemErrorKeys.geo.pointNotFilled)\n\n const { srs: srsCodeFrom } = point\n\n if (srsCodeFrom === srsCodeTo) {\n // projection is not needed\n return point\n }\n const srsFrom = getSrs({ code: srsCodeFrom, srsIndex })\n if (!srsFrom) throw new SystemError(SystemErrorKeys.geo.srsNotFound, { code: srsCodeFrom })\n\n const srsTo = getSrs({ code: srsCodeTo, srsIndex })\n if (!srsTo) throw new SystemError(SystemErrorKeys.geo.srsNotFound, { code: srsCodeTo })\n\n try {\n const { x, y } = point\n const [long, lat] = getConverter(srsFrom.wkt, srsTo.wkt).forward([Number(x), Number(y)])\n\n return PointFactory.createInstance({ ...point, srs: srsCodeTo, x: long, y: lat })\n } catch (error) {\n throw new SystemError(\n SystemErrorKeys.geo.transformFailed,\n { srsFrom: srsCodeFrom, srsTo: srsCodeTo },\n { cause: error }\n )\n }\n}\n\n/**\n * Transforms the specified point from one SRS into another.\n * Use `transformOrThrow` to know why a point cannot be transformed.\n *\n * @param point - The point to transform.\n * @param srsCodeTo - The SRS code to transform the point into.\n * @param srsIndex - SRSs indexed by SRS code.\n * @returns The transformed point, or null if the point is not filled, an SRS is unknown or the transformation fails.\n */\nexport const transform = (point: Point, srsCodeTo: string, srsIndex: SRSIndex = DEFAULT_SRS_INDEX): Point | null => {\n try {\n return transformOrThrow(point, srsCodeTo, srsIndex)\n } catch {\n return null\n }\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export type { FlatDataExportOptions, ArenaExportInfoFactoryParams, ArenaExportIn
|
|
|
12
12
|
export { FlatDataExportDefaultOptions, FlatDataExportOption, FlatDataFiles, FlatDataExportModel, FlatDataExportColumnDataType, ArenaExportInfoFactory, UniqueFileNamesGenerator, } from './dataExport';
|
|
13
13
|
export { DataQueryMode, DataQuerySummaries } from './dataQuery';
|
|
14
14
|
export type { DataQuery, DataQuerySummary, DataQuerySummaryProps } from './dataQuery';
|
|
15
|
-
export { SystemError } from './error';
|
|
15
|
+
export { SystemError, SystemErrorKeys } from './error';
|
|
16
16
|
export { ExpressionNodeType, ExpressionNodeEvaluator, ExpressionVariable, JavascriptExpressionEvaluator, JavascriptExpressionParser, } from './expression';
|
|
17
17
|
export type { ArrayExpression, BinaryExpression, CallExpression, CompoundExpression, ConditionalExpression, ExpressionContext, ExpressionEvaluator, ExpressionFunction, ExpressionFunctions, AnyExpressionNode, ExpressionNode, ExpressionNodeEvaluatorConstructor, MemberExpression, IdentifierExpression, LiteralExpression, SequenceExpression, ThisExpression, UnaryExpression, } from './expression';
|
|
18
18
|
export { ExtraPropDataType, ExtraPropsDataGenerator } from './extraProp';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.ValidatorErrorKeys = exports.Validator = exports.ValidationSeverity = exports.Validations = exports.ValidationResults = exports.ValidationResultFactory = exports.ValidationFactory = exports.FieldValidators = exports.Versions = exports.UUIDs = exports.UnitOfTime = exports.Strings = exports.RetryProcessor = exports.Queue = exports.Promises = exports.Objects = exports.Numbers = exports.FileProcessor = exports.FileNames = exports.Dates = exports.DateFormats = exports.Arrays = exports.RecordNodeBuilders = exports.RecordBuilder = exports.SurveyObjectBuilders = exports.SurveyBuilder = exports.VernacularNameFactory = exports.TaxonGenerator = void 0;
|
|
3
|
+
exports.NodeKeys = exports.NodeFactory = exports.Messages = exports.MessageTargetUserType = exports.MessageStatus = exports.MessagePropsKey = exports.MessageNotificationType = exports.LanguagesISO639part2 = exports.Languages = exports.LanguageCode = exports.JobStatus = exports.JobEventType = exports.JobBase = exports.Points = exports.PointFactory = exports.ExtraPropsDataGenerator = exports.ExtraPropDataType = exports.JavascriptExpressionParser = exports.JavascriptExpressionEvaluator = exports.ExpressionVariable = exports.ExpressionNodeEvaluator = exports.ExpressionNodeType = exports.SystemErrorKeys = exports.SystemError = exports.DataQuerySummaries = exports.DataQueryMode = exports.UniqueFileNamesGenerator = exports.ArenaExportInfoFactory = exports.FlatDataExportColumnDataType = exports.FlatDataExportModel = exports.FlatDataFiles = exports.FlatDataExportOption = exports.FlatDataExportDefaultOptions = exports.TraverseMethod = exports.ChainNodeDefFactory = exports.ChainStatusExec = exports.ChainFactory = exports.CategoryItems = exports.Categories = exports.CategoryLevelFactory = exports.CategoryItemFactory = exports.CategoryImportColumnType = exports.CategoryFactory = exports.Users = exports.UserFactory = exports.UserTitle = exports.Permission = exports.UserStatus = exports.AuthGroupName = exports.Authorizer = void 0;
|
|
4
|
+
exports.TaxonomyFactory = exports.Taxonomies = exports.Taxa = exports.defaultCycle = exports.surveySecurityDefaults = exports.surveyDocImagePropKeys = exports.Surveys = exports.SurveySecurityProp = exports.SurveyRefDataFactory = exports.SurveyFileType = exports.SurveyFileFactory = exports.SurveyFactory = exports.SurveyDependencyType = exports.SurveyDocPlace = exports.SurveyDocImageFactory = exports.SurveyDocImages = exports.NodeDefsFixer = exports.SRSFactory = exports.DEFAULT_SRS_INDEX = exports.DEFAULT_SRS = exports.ServiceType = exports.ServiceRegistry = exports.RecordValidations = exports.RecordValidator = exports.RecordUpdateResult = exports.RecordUpdater = exports.RecordPrettyPrinter = exports.RecordNodesUpdater = exports.RecordExpressionEvaluator = exports.RECORD_STEP_DEFAULT = exports.Records = exports.RecordFixer = exports.RecordFactory = exports.RecordCloner = exports.NodePointers = exports.NodeDefExpressionValidator = exports.NodeDefExpressionEvaluator = exports.FormHeaderColor = exports.NodeDefTextRenderType = exports.NodeDefTextInputType = exports.NodeDefFileType = exports.NodeDefEntityRenderType = exports.NodeDefs = exports.NodeDefFactory = exports.NodeDefType = exports.NodeDefCountType = exports.NodeValues = exports.NodeValueFormatter = exports.Nodes = exports.NodeMetaKeys = void 0;
|
|
5
|
+
exports.ValidatorErrorKeys = exports.Validator = exports.ValidationSeverity = exports.Validations = exports.ValidationResults = exports.ValidationResultFactory = exports.ValidationFactory = exports.FieldValidators = exports.Versions = exports.UUIDs = exports.UnitOfTime = exports.Strings = exports.RetryProcessor = exports.Queue = exports.Promises = exports.Objects = exports.Numbers = exports.FileProcessor = exports.FileNames = exports.Dates = exports.DateFormats = exports.Arrays = exports.RecordNodeBuilders = exports.RecordBuilder = exports.SurveyObjectBuilders = exports.SurveyBuilder = exports.VernacularNameFactory = exports.TaxonGenerator = exports.TaxonFactory = void 0;
|
|
6
6
|
var auth_1 = require("./auth");
|
|
7
7
|
Object.defineProperty(exports, "Authorizer", { enumerable: true, get: function () { return auth_1.Authorizer; } });
|
|
8
8
|
Object.defineProperty(exports, "AuthGroupName", { enumerable: true, get: function () { return auth_1.AuthGroupName; } });
|
|
@@ -38,6 +38,7 @@ Object.defineProperty(exports, "DataQueryMode", { enumerable: true, get: functio
|
|
|
38
38
|
Object.defineProperty(exports, "DataQuerySummaries", { enumerable: true, get: function () { return dataQuery_1.DataQuerySummaries; } });
|
|
39
39
|
var error_1 = require("./error");
|
|
40
40
|
Object.defineProperty(exports, "SystemError", { enumerable: true, get: function () { return error_1.SystemError; } });
|
|
41
|
+
Object.defineProperty(exports, "SystemErrorKeys", { enumerable: true, get: function () { return error_1.SystemErrorKeys; } });
|
|
41
42
|
var expression_1 = require("./expression");
|
|
42
43
|
Object.defineProperty(exports, "ExpressionNodeType", { enumerable: true, get: function () { return expression_1.ExpressionNodeType; } });
|
|
43
44
|
Object.defineProperty(exports, "ExpressionNodeEvaluator", { enumerable: true, get: function () { return expression_1.ExpressionNodeEvaluator; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAEA,+BAAyG;AAAhG,kGAAA,UAAU,OAAA;AAAE,qGAAA,aAAa,OAAA;AAAE,kGAAA,UAAU,OAAA;AAAE,kGAAA,UAAU,OAAA;AAAE,iGAAA,SAAS,OAAA;AAAE,mGAAA,WAAW,OAAA;AAAE,6FAAA,KAAK,OAAA;AAwBzF,uCAAiH;AAAxG,2GAAA,eAAe,OAAA;AAAE,oHAAA,wBAAwB,OAAA;AAAE,+GAAA,mBAAmB,OAAA;AAAE,gHAAA,oBAAoB,OAAA;AAe7F,uCAAsD;AAA7C,sGAAA,UAAU,OAAA;AAAE,yGAAA,aAAa,OAAA;AAElC,iCAA4E;AAAnE,qGAAA,YAAY,OAAA;AAAE,wGAAA,eAAe,OAAA;AAAE,4GAAA,mBAAmB,OAAA;AAY3D,mCAAyC;AAAhC,wGAAA,cAAc,OAAA;AAIvB,2CAQqB;AAPnB,0HAAA,4BA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qBAAqB,OAAA;AAe/F,+DAAmF;AAA1E,8GAAA,aAAa,OAAA;AAAE,qHAAA,oBAAoB,OAAA;AAC5C,+DAAiF;AAAxE,8GAAA,aAAa,OAAA;AAAE,mHAAA,kBAAkB,OAAA;AAE1C,iCAegB;AAdd,+FAAA,MAAM,OAAA;AACN,oGAAA,WAAW,OAAA;AACX,8FAAA,KAAK,OAAA;AACL,kGAAA,SAAS,OAAA;AACT,sGAAA,aAAa,OAAA;AACb,gGAAA,OAAO,OAAA;AACP,gGAAA,OAAO,OAAA;AACP,iGAAA,QAAQ,OAAA;AACR,8FAAA,KAAK,OAAA;AACL,uGAAA,cAAc,OAAA;AACd,gGAAA,OAAO,OAAA;AACP,mGAAA,UAAU,OAAA;AACV,8FAAA,KAAK,OAAA;AACL,iGAAA,QAAQ,OAAA;AAKV,2CASqB;AARnB,6GAAA,eAAe,OAAA;AACf,+GAAA,iBAAiB,OAAA;AACjB,qHAAA,uBAAuB,OAAA;AACvB,+GAAA,iBAAiB,OAAA;AACjB,yGAAA,WAAW,OAAA;AACX,gHAAA,kBAAkB,OAAA;AAClB,uGAAA,SAAS,OAAA;AACT,gHAAA,kBAAkB,OAAA","sourcesContent":["export type { AppInfo } from './app'\n\nexport { Authorizer, AuthGroupName, UserStatus, Permission, UserTitle, UserFactory, Users } from './auth'\nexport type {\n AuthGroup,\n User,\n UserAuthGroup,\n UserAuthGroupProps,\n AuthToken,\n UserAuthTokenPayload,\n UserAuthTokenService,\n UserPrefs,\n UserPrefSurveys,\n UserProps,\n UserAuthRefreshToken,\n UserAuthRefreshTokenProps,\n UserAuthRefreshTokenPayload,\n UserService,\n UserTokenPayload,\n DownloadAuthTokenPayload,\n UserGroup,\n UserGroupProps,\n UserGroupQualifier,\n UserInvitation,\n} from './auth'\n\nexport { CategoryFactory, CategoryImportColumnType, CategoryItemFactory, CategoryLevelFactory } from './category'\nexport type {\n CategoryItemProps,\n Category,\n CategoryItem,\n CategoryLevel,\n CategoryLevelProps,\n CategoryImportSummary,\n CategoryImportSummaryColumn,\n CategoryItemService,\n CategoryLevelService,\n CategoryProps,\n CategoryService,\n} from './category'\n\nexport { Categories, CategoryItems } from './category'\n\nexport { ChainFactory, ChainStatusExec, ChainNodeDefFactory } from './chain'\nexport type {\n Chain,\n ChainProps,\n ChainService,\n ChainNodeDef,\n ChainNodeDefProps,\n ChainNodeDefService,\n ChainNodeDefAggregate,\n ChainNodeDefAggregateProps,\n} from './chain'\n\nexport { TraverseMethod } from './common'\nexport type { ArenaObject, ArenaService, Dictionary, Factory, I18n } from './common'\n\nexport type { FlatDataExportOptions, ArenaExportInfoFactoryParams, ArenaExportInfo } from './dataExport'\nexport {\n FlatDataExportDefaultOptions,\n FlatDataExportOption,\n FlatDataFiles,\n FlatDataExportModel,\n FlatDataExportColumnDataType,\n ArenaExportInfoFactory,\n UniqueFileNamesGenerator,\n} from './dataExport'\n\nexport { DataQueryMode, DataQuerySummaries } from './dataQuery'\nexport type { DataQuery, DataQuerySummary, DataQuerySummaryProps } from './dataQuery'\n\nexport { SystemError } from './error'\n\nexport {\n ExpressionNodeType,\n ExpressionNodeEvaluator,\n ExpressionVariable,\n JavascriptExpressionEvaluator,\n JavascriptExpressionParser,\n} from './expression'\nexport type {\n ArrayExpression,\n BinaryExpression,\n CallExpression,\n CompoundExpression,\n ConditionalExpression,\n ExpressionContext,\n ExpressionEvaluator,\n ExpressionFunction,\n ExpressionFunctions,\n AnyExpressionNode,\n ExpressionNode,\n ExpressionNodeEvaluatorConstructor,\n MemberExpression,\n IdentifierExpression,\n LiteralExpression,\n SequenceExpression,\n ThisExpression,\n UnaryExpression,\n} from './expression'\n\nexport { ExtraPropDataType, ExtraPropsDataGenerator } from './extraProp'\nexport type { ExtraPropDef, ExtraPropDefs } from './extraProp'\n\nexport { PointFactory, Points } from './geo'\nexport type { Point } from './geo'\n\nexport { JobBase, JobEventType, JobStatus } from './job'\nexport type { Job, JobContext, JobEvent, JobSerialized, JobTxClient } from './job'\n\nexport { LanguageCode, Languages, LanguagesISO639part2 } from './language'\nexport type { Labels } from './language'\n\nexport type { Logger } from './logger'\n\nexport type { Message } from './message'\nexport { MessageNotificationType, MessagePropsKey, MessageStatus, MessageTargetUserType, Messages } from './message'\n\nexport { NodeFactory, NodeKeys, NodeMetaKeys, Nodes, NodeValueFormatter, NodeValues } from './node'\nexport type {\n ArenaRecordNode,\n Node,\n NodeMeta,\n NodePointer,\n NodeRefData,\n NodeService,\n NodesMap,\n NodeValueCode,\n NodeValueCoordinate,\n NodeValueFile,\n NodeValueTaxon,\n} from './node'\n\nexport {\n NodeDefCountType,\n NodeDefType,\n NodeDefFactory,\n NodeDefs,\n NodeDefEntityRenderType,\n NodeDefFileType,\n NodeDefTextInputType,\n NodeDefTextRenderType,\n FormHeaderColor,\n} from './nodeDef'\n\nexport { NodeDefExpressionEvaluator, NodeDefExpressionValidator } from './nodeDefExpressionEvaluator'\nexport type { CategoryItemProvider, TaxonProvider } from './nodeDefExpressionEvaluator'\n\nexport type {\n NodeDef,\n NodeDefLayout,\n NodeDefMeta,\n NodeDefProps,\n NodeDefPropsWithLayout,\n NodeDefBoolean,\n NodeDefBooleanProps,\n NodeDefCode,\n NodeDefCodeLayout,\n NodeDefCodeProps,\n NodeDefCoordinate,\n NodeDefCoordinateProps,\n NodeDefDate,\n NodeDefDecimal,\n NodeDefDecimalProps,\n NodeDefEntity,\n NodeDefEntityChildPosition,\n NodeDefEntityLayout,\n NodeDefEntityProps,\n NodeDefPrintOrientation,\n NodeDefFile,\n NodeDefFileProps,\n NodeDefFormHeader,\n NodeDefFormHeaderProps,\n NodeDefInteger,\n NodeDefPropsAdvanced,\n NodeDefTaxon,\n NodeDefTaxonProps,\n NodeDefText,\n NodeDefTextProps,\n NodeDefTextLayout,\n NodeDefTime,\n NodeDefTimeProps,\n NodeDefExpression,\n NodeDefMap,\n NodeDefService,\n NodeDefValidations,\n} from './nodeDef'\n\nexport {\n NodePointers,\n RecordCloner,\n RecordFactory,\n RecordFixer,\n Records,\n RECORD_STEP_DEFAULT,\n RecordExpressionEvaluator,\n RecordNodesUpdater,\n RecordPrettyPrinter,\n RecordUpdater,\n RecordUpdateResult,\n RecordValidator,\n RecordValidations,\n} from './record'\nexport type {\n AttributeValidatorParams,\n AttributesValidatorParams,\n NodeCreateParams,\n NodesUpdateParams,\n ArenaRecord,\n Record,\n RecordExpressionContext,\n RecordExpressionEvaluationContext,\n RecordService,\n RecordUpdateOptions,\n RecordValidatorParams,\n SortedAttributesValidatorParams,\n} from './record'\n\nexport { ServiceRegistry, ServiceType } from './registry'\nexport type { ServiceTypeMap } from './registry'\n\nexport { DEFAULT_SRS, DEFAULT_SRS_INDEX, SRSFactory } from './srs'\nexport type { SRS, SRSIndex } from './srs'\n\nexport {\n NodeDefsFixer,\n SurveyDocImages,\n SurveyDocImageFactory,\n SurveyDocPlace,\n SurveyDependencyType,\n SurveyFactory,\n SurveyFileFactory,\n SurveyFileType,\n SurveyRefDataFactory,\n SurveySecurityProp,\n Surveys,\n surveyDocImagePropKeys,\n surveySecurityDefaults,\n defaultCycle,\n} from './survey'\nexport type {\n Survey,\n SurveyCycle,\n SurveyDependency,\n SurveyDependencyGraph,\n SurveyDocImage,\n SurveyDocImageFactoryParams,\n SurveyDocImageProps,\n SurveyFile,\n SurveyFileFactoryParams,\n SurveyFileProps,\n SurveyProps,\n SurveyRefData,\n SurveySecurity,\n SurveyService,\n} from './survey'\n\nexport { Taxa, Taxonomies, TaxonomyFactory, TaxonFactory, TaxonGenerator, VernacularNameFactory } from './taxonomy'\nexport type {\n VernacularNameParams,\n TaxonomyFactoryParams,\n TaxonFactoryParams,\n Taxonomy,\n TaxonomyService,\n VernacularNameProps,\n VernacularName,\n TaxonProps,\n Taxon,\n TaxonomyProps,\n TaxonService,\n} from './taxonomy'\n\nexport { SurveyBuilder, SurveyObjectBuilders } from './tests/builder/surveyBuilder'\nexport { RecordBuilder, RecordNodeBuilders } from './tests/builder/recordBuilder'\n\nexport {\n Arrays,\n DateFormats,\n Dates,\n FileNames,\n FileProcessor,\n Numbers,\n Objects,\n Promises,\n Queue,\n RetryProcessor,\n Strings,\n UnitOfTime,\n UUIDs,\n Versions,\n} from './utils'\n\nexport type { FileProcessorConstructorArgs, MutationOptions, ParsedVersion } from './utils'\n\nexport {\n FieldValidators,\n ValidationFactory,\n ValidationResultFactory,\n ValidationResults,\n Validations,\n ValidationSeverity,\n Validator,\n ValidatorErrorKeys,\n} from './validation'\nexport type {\n DissocFieldValidationOptions,\n FieldValidator,\n Validation,\n ValidationFields,\n ValidationResult,\n ValidationCounts,\n} from './validation'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAEA,+BAAyG;AAAhG,kGAAA,UAAU,OAAA;AAAE,qGAAA,aAAa,OAAA;AAAE,kGAAA,UAAU,OAAA;AAAE,kGAAA,UAAU,OAAA;AAAE,iGAAA,SAAS,OAAA;AAAE,mGAAA,WAAW,OAAA;AAAE,6FAAA,KAAK,OAAA;AAwBzF,uCAAiH;AAAxG,2GAAA,eAAe,OAAA;AAAE,oHAAA,wBAAwB,OAAA;AAAE,+GAAA,mBAAmB,OAAA;AAAE,gHAAA,oBAAoB,OAAA;AAe7F,uCAAsD;AAA7C,sGAAA,UAAU,OAAA;AAAE,yGAAA,aAAa,OAAA;AAElC,iCAA4E;AAAnE,qGAAA,YAAY,OAAA;AAAE,wGAAA,eAAe,OAAA;AAAE,4GAAA,mBAAmB,OAAA;AAY3D,mCAAyC;AAAhC,wGAAA,cAAc,OAAA;AAIvB,2CAQqB;AAPnB,0HAAA,4BAA4B,OAAA;AAC5B,kHAAA,oBAAoB,OAAA;AACpB,2GAAA,aAAa,OAAA;AACb,iHAAA,mBAAmB,OAAA;AACnB,0HAAA,4BAA4B,OAAA;AAC5B,oHAAA,sBAAsB,OAAA;AACtB,sHAAA,wBAAwB,OAAA;AAG1B,yCAA+D;AAAtD,0GAAA,aAAa,OAAA;AAAE,+GAAA,kBAAkB,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A;AACX,8FAAA,KAAK,OAAA;AACL,kGAAA,SAAS,OAAA;AACT,sGAAA,aAAa,OAAA;AACb,gGAAA,OAAO,OAAA;AACP,gGAAA,OAAO,OAAA;AACP,iGAAA,QAAQ,OAAA;AACR,8FAAA,KAAK,OAAA;AACL,uGAAA,cAAc,OAAA;AACd,gGAAA,OAAO,OAAA;AACP,mGAAA,UAAU,OAAA;AACV,8FAAA,KAAK,OAAA;AACL,iGAAA,QAAQ,OAAA;AAKV,2CASqB;AARnB,6GAAA,eAAe,OAAA;AACf,+GAAA,iBAAiB,OAAA;AACjB,qHAAA,uBAAuB,OAAA;AACvB,+GAAA,iBAAiB,OAAA;AACjB,yGAAA,WAAW,OAAA;AACX,gHAAA,kBAAkB,OAAA;AAClB,uGAAA,SAAS,OAAA;AACT,gHAAA,kBAAkB,OAAA","sourcesContent":["export type { AppInfo } from './app'\n\nexport { Authorizer, AuthGroupName, UserStatus, Permission, UserTitle, UserFactory, Users } from './auth'\nexport type {\n AuthGroup,\n User,\n UserAuthGroup,\n UserAuthGroupProps,\n AuthToken,\n UserAuthTokenPayload,\n UserAuthTokenService,\n UserPrefs,\n UserPrefSurveys,\n UserProps,\n UserAuthRefreshToken,\n UserAuthRefreshTokenProps,\n UserAuthRefreshTokenPayload,\n UserService,\n UserTokenPayload,\n DownloadAuthTokenPayload,\n UserGroup,\n UserGroupProps,\n UserGroupQualifier,\n UserInvitation,\n} from './auth'\n\nexport { CategoryFactory, CategoryImportColumnType, CategoryItemFactory, CategoryLevelFactory } from './category'\nexport type {\n CategoryItemProps,\n Category,\n CategoryItem,\n CategoryLevel,\n CategoryLevelProps,\n CategoryImportSummary,\n CategoryImportSummaryColumn,\n CategoryItemService,\n CategoryLevelService,\n CategoryProps,\n CategoryService,\n} from './category'\n\nexport { Categories, CategoryItems } from './category'\n\nexport { ChainFactory, ChainStatusExec, ChainNodeDefFactory } from './chain'\nexport type {\n Chain,\n ChainProps,\n ChainService,\n ChainNodeDef,\n ChainNodeDefProps,\n ChainNodeDefService,\n ChainNodeDefAggregate,\n ChainNodeDefAggregateProps,\n} from './chain'\n\nexport { TraverseMethod } from './common'\nexport type { ArenaObject, ArenaService, Dictionary, Factory, I18n } from './common'\n\nexport type { FlatDataExportOptions, ArenaExportInfoFactoryParams, ArenaExportInfo } from './dataExport'\nexport {\n FlatDataExportDefaultOptions,\n FlatDataExportOption,\n FlatDataFiles,\n FlatDataExportModel,\n FlatDataExportColumnDataType,\n ArenaExportInfoFactory,\n UniqueFileNamesGenerator,\n} from './dataExport'\n\nexport { DataQueryMode, DataQuerySummaries } from './dataQuery'\nexport type { DataQuery, DataQuerySummary, DataQuerySummaryProps } from './dataQuery'\n\nexport { SystemError, SystemErrorKeys } from './error'\n\nexport {\n ExpressionNodeType,\n ExpressionNodeEvaluator,\n ExpressionVariable,\n JavascriptExpressionEvaluator,\n JavascriptExpressionParser,\n} from './expression'\nexport type {\n ArrayExpression,\n BinaryExpression,\n CallExpression,\n CompoundExpression,\n ConditionalExpression,\n ExpressionContext,\n ExpressionEvaluator,\n ExpressionFunction,\n ExpressionFunctions,\n AnyExpressionNode,\n ExpressionNode,\n ExpressionNodeEvaluatorConstructor,\n MemberExpression,\n IdentifierExpression,\n LiteralExpression,\n SequenceExpression,\n ThisExpression,\n UnaryExpression,\n} from './expression'\n\nexport { ExtraPropDataType, ExtraPropsDataGenerator } from './extraProp'\nexport type { ExtraPropDef, ExtraPropDefs } from './extraProp'\n\nexport { PointFactory, Points } from './geo'\nexport type { Point } from './geo'\n\nexport { JobBase, JobEventType, JobStatus } from './job'\nexport type { Job, JobContext, JobEvent, JobSerialized, JobTxClient } from './job'\n\nexport { LanguageCode, Languages, LanguagesISO639part2 } from './language'\nexport type { Labels } from './language'\n\nexport type { Logger } from './logger'\n\nexport type { Message } from './message'\nexport { MessageNotificationType, MessagePropsKey, MessageStatus, MessageTargetUserType, Messages } from './message'\n\nexport { NodeFactory, NodeKeys, NodeMetaKeys, Nodes, NodeValueFormatter, NodeValues } from './node'\nexport type {\n ArenaRecordNode,\n Node,\n NodeMeta,\n NodePointer,\n NodeRefData,\n NodeService,\n NodesMap,\n NodeValueCode,\n NodeValueCoordinate,\n NodeValueFile,\n NodeValueTaxon,\n} from './node'\n\nexport {\n NodeDefCountType,\n NodeDefType,\n NodeDefFactory,\n NodeDefs,\n NodeDefEntityRenderType,\n NodeDefFileType,\n NodeDefTextInputType,\n NodeDefTextRenderType,\n FormHeaderColor,\n} from './nodeDef'\n\nexport { NodeDefExpressionEvaluator, NodeDefExpressionValidator } from './nodeDefExpressionEvaluator'\nexport type { CategoryItemProvider, TaxonProvider } from './nodeDefExpressionEvaluator'\n\nexport type {\n NodeDef,\n NodeDefLayout,\n NodeDefMeta,\n NodeDefProps,\n NodeDefPropsWithLayout,\n NodeDefBoolean,\n NodeDefBooleanProps,\n NodeDefCode,\n NodeDefCodeLayout,\n NodeDefCodeProps,\n NodeDefCoordinate,\n NodeDefCoordinateProps,\n NodeDefDate,\n NodeDefDecimal,\n NodeDefDecimalProps,\n NodeDefEntity,\n NodeDefEntityChildPosition,\n NodeDefEntityLayout,\n NodeDefEntityProps,\n NodeDefPrintOrientation,\n NodeDefFile,\n NodeDefFileProps,\n NodeDefFormHeader,\n NodeDefFormHeaderProps,\n NodeDefInteger,\n NodeDefPropsAdvanced,\n NodeDefTaxon,\n NodeDefTaxonProps,\n NodeDefText,\n NodeDefTextProps,\n NodeDefTextLayout,\n NodeDefTime,\n NodeDefTimeProps,\n NodeDefExpression,\n NodeDefMap,\n NodeDefService,\n NodeDefValidations,\n} from './nodeDef'\n\nexport {\n NodePointers,\n RecordCloner,\n RecordFactory,\n RecordFixer,\n Records,\n RECORD_STEP_DEFAULT,\n RecordExpressionEvaluator,\n RecordNodesUpdater,\n RecordPrettyPrinter,\n RecordUpdater,\n RecordUpdateResult,\n RecordValidator,\n RecordValidations,\n} from './record'\nexport type {\n AttributeValidatorParams,\n AttributesValidatorParams,\n NodeCreateParams,\n NodesUpdateParams,\n ArenaRecord,\n Record,\n RecordExpressionContext,\n RecordExpressionEvaluationContext,\n RecordService,\n RecordUpdateOptions,\n RecordValidatorParams,\n SortedAttributesValidatorParams,\n} from './record'\n\nexport { ServiceRegistry, ServiceType } from './registry'\nexport type { ServiceTypeMap } from './registry'\n\nexport { DEFAULT_SRS, DEFAULT_SRS_INDEX, SRSFactory } from './srs'\nexport type { SRS, SRSIndex } from './srs'\n\nexport {\n NodeDefsFixer,\n SurveyDocImages,\n SurveyDocImageFactory,\n SurveyDocPlace,\n SurveyDependencyType,\n SurveyFactory,\n SurveyFileFactory,\n SurveyFileType,\n SurveyRefDataFactory,\n SurveySecurityProp,\n Surveys,\n surveyDocImagePropKeys,\n surveySecurityDefaults,\n defaultCycle,\n} from './survey'\nexport type {\n Survey,\n SurveyCycle,\n SurveyDependency,\n SurveyDependencyGraph,\n SurveyDocImage,\n SurveyDocImageFactoryParams,\n SurveyDocImageProps,\n SurveyFile,\n SurveyFileFactoryParams,\n SurveyFileProps,\n SurveyProps,\n SurveyRefData,\n SurveySecurity,\n SurveyService,\n} from './survey'\n\nexport { Taxa, Taxonomies, TaxonomyFactory, TaxonFactory, TaxonGenerator, VernacularNameFactory } from './taxonomy'\nexport type {\n VernacularNameParams,\n TaxonomyFactoryParams,\n TaxonFactoryParams,\n Taxonomy,\n TaxonomyService,\n VernacularNameProps,\n VernacularName,\n TaxonProps,\n Taxon,\n TaxonomyProps,\n TaxonService,\n} from './taxonomy'\n\nexport { SurveyBuilder, SurveyObjectBuilders } from './tests/builder/surveyBuilder'\nexport { RecordBuilder, RecordNodeBuilders } from './tests/builder/recordBuilder'\n\nexport {\n Arrays,\n DateFormats,\n Dates,\n FileNames,\n FileProcessor,\n Numbers,\n Objects,\n Promises,\n Queue,\n RetryProcessor,\n Strings,\n UnitOfTime,\n UUIDs,\n Versions,\n} from './utils'\n\nexport type { FileProcessorConstructorArgs, MutationOptions, ParsedVersion } from './utils'\n\nexport {\n FieldValidators,\n ValidationFactory,\n ValidationResultFactory,\n ValidationResults,\n Validations,\n ValidationSeverity,\n Validator,\n ValidatorErrorKeys,\n} from './validation'\nexport type {\n DissocFieldValidationOptions,\n FieldValidator,\n Validation,\n ValidationFields,\n ValidationResult,\n ValidationCounts,\n} from './validation'\n"]}
|
package/dist/job/JobBase.js
CHANGED