@kontur.candy/generator 5.73.6 → 5.74.0-expl-note-preview.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/index.js +4 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -69853,7 +69853,7 @@ class KCXmlGeneratorBase {
|
|
|
69853
69853
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaInstanceCountExpression) {
|
|
69854
69854
|
const modelPath = (0,_DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_7__.adjustPathMultiplicity)(this.schema, this.extendedSchemaInfo, prefix.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createFromMask)(this.removeAttributePrefix(this.removeMultiplicity(expression.select)), "auto", _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each)).normalize());
|
|
69855
69855
|
const finalPath = modelPath.trimLastStarIfLastToken();
|
|
69856
|
-
deps.push(new
|
|
69856
|
+
deps.push(new RegularDependency(finalPath));
|
|
69857
69857
|
return gcf(x => x.instanceCount, `"${finalPath.toLegacyPath()}"`);
|
|
69858
69858
|
}
|
|
69859
69859
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaWhenExpression) {
|
|
@@ -73649,8 +73649,9 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
73649
73649
|
const adjustedSelectPath = this.preparePathAndAdjustMultiplicity(prefix, selectPath).trimLastStarIfLastToken();
|
|
73650
73650
|
const splitInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, adjustedSelectPath);
|
|
73651
73651
|
if (!splitInfo.differentPath.isContainIteration()) {
|
|
73652
|
-
const childrenExpression =
|
|
73653
|
-
return childrenExpression;
|
|
73652
|
+
const childrenExpression = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(adjustedSelectPath.toCurrentIteration().normalize(), "children");
|
|
73653
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.LenExpression(childrenExpression);
|
|
73654
|
+
// return new DecimalLiteralExpression();
|
|
73654
73655
|
} else {
|
|
73655
73656
|
throw new Error(`Instance count with nested multiplicity is not supported: target: ${target.path}, select path: ${selectPath}}`);
|
|
73656
73657
|
}
|
|
@@ -78368,8 +78369,6 @@ function naiveConvertJsConditionToKCLangCondition(condition) {
|
|
|
78368
78369
|
applyReplacements([[/^false$/g, "1 == 0"]]);
|
|
78369
78370
|
applyReplacements([/ === /g, " == "]);
|
|
78370
78371
|
applyReplacements([/ !== /g, " != "]);
|
|
78371
|
-
applyReplacements([/\s!\(/g, " not ("]);
|
|
78372
|
-
applyReplacements([/^!\(/g, "not ("]);
|
|
78373
78372
|
// const tripleEqFalse = /===\s*false/g;
|
|
78374
78373
|
// applyReplacements([tripleEqFalse, "as string == 'true'"]);
|
|
78375
78374
|
|