@zenwave360/dsl 1.10.0-next.10.1 → 1.10.0-next.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/kotlin/dsl-kotlin.mjs
CHANGED
|
@@ -61,6 +61,7 @@ import {
|
|
|
61
61
|
to2cs3ny02qtbcb as to,
|
|
62
62
|
mapOf1xd03cq9cnmy8 as mapOf,
|
|
63
63
|
isIntArrayeijsubfngq38 as isIntArray,
|
|
64
|
+
substringBeforeLastqh7oeuvefdek as substringBeforeLast,
|
|
64
65
|
hashCodeq5arwsb9dgti as hashCode,
|
|
65
66
|
equals2au1ep9vhcato as equals,
|
|
66
67
|
getKClassFromExpression348iqjl4fnx2f as getKClassFromExpression,
|
|
@@ -13802,8 +13803,20 @@ function problem($this, path, value, error) {
|
|
|
13802
13803
|
return mapOf([to('path', path), to('location', location), to('value', value), to('message', message)]);
|
|
13803
13804
|
}
|
|
13804
13805
|
function getLocation($this, path) {
|
|
13805
|
-
var
|
|
13806
|
-
|
|
13806
|
+
var candidate = path;
|
|
13807
|
+
$l$loop: while (true) {
|
|
13808
|
+
// Inline function 'kotlin.text.isNotEmpty' call
|
|
13809
|
+
var this_0 = candidate;
|
|
13810
|
+
if (!(charSequenceLength(this_0) > 0)) {
|
|
13811
|
+
break $l$loop;
|
|
13812
|
+
}
|
|
13813
|
+
var tmp = JSONPath_instance.k44($this, "$.locations.['" + candidate + "']");
|
|
13814
|
+
var location = (!(tmp == null) ? isIntArray(tmp) : false) ? tmp : null;
|
|
13815
|
+
if (!(location == null))
|
|
13816
|
+
return location;
|
|
13817
|
+
candidate = substringBeforeLast(candidate, _Char___init__impl__6a9atx(46), '');
|
|
13818
|
+
}
|
|
13819
|
+
return null;
|
|
13807
13820
|
}
|
|
13808
13821
|
function ZdlModel(delegate) {
|
|
13809
13822
|
delegate = delegate === VOID ? buildMap() : delegate;
|
|
@@ -14785,12 +14798,14 @@ protoOf(ZdlListenerImpl).y1m = function (ctx) {
|
|
|
14785
14798
|
this.o45_1.n44('aggregates', aggregateName, this.p45_1.db());
|
|
14786
14799
|
var name = this.p45_1.db().p1('name');
|
|
14787
14800
|
var location = 'aggregates.' + toString_1(name);
|
|
14801
|
+
this.r45_1 = location;
|
|
14788
14802
|
this.o45_1.y44(location, ZdlListenerUtils_getInstance().k46(ctx));
|
|
14789
14803
|
this.o45_1.y44(location + '.name', ZdlListenerUtils_getInstance().k46(ctx.j2v()));
|
|
14790
14804
|
this.o45_1.y44(location + '.aggregateRoot', ZdlListenerUtils_getInstance().k46(ctx.k2v()));
|
|
14791
14805
|
};
|
|
14792
14806
|
protoOf(ZdlListenerImpl).z1m = function (ctx) {
|
|
14793
14807
|
this.p45_1.ib();
|
|
14808
|
+
this.r45_1 = null;
|
|
14794
14809
|
};
|
|
14795
14810
|
protoOf(ZdlListenerImpl).e1n = function (ctx) {
|
|
14796
14811
|
var tmp = ZdlListenerUtils_getInstance();
|
|
@@ -14798,6 +14813,7 @@ protoOf(ZdlListenerImpl).e1n = function (ctx) {
|
|
|
14798
14813
|
var aggregateName = ensureNotNull(tmp.l46((tmp_0 instanceof AggregateContext ? tmp_0 : THROW_CCE()).j2v()));
|
|
14799
14814
|
var commandName = ensureNotNull(ZdlListenerUtils_getInstance().l46(ctx.p2w()));
|
|
14800
14815
|
var location = 'aggregates.' + aggregateName + '.commands.' + commandName;
|
|
14816
|
+
this.r45_1 = location;
|
|
14801
14817
|
var tmp0_safe_receiver = ctx.q2w();
|
|
14802
14818
|
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w2g();
|
|
14803
14819
|
var parameter = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.bh();
|
|
@@ -14852,6 +14868,10 @@ protoOf(ZdlListenerImpl).f1n = function (ctx) {
|
|
|
14852
14868
|
tmp0.t1(tmp2, value);
|
|
14853
14869
|
}
|
|
14854
14870
|
this.p45_1.ib();
|
|
14871
|
+
var tmp_2 = ZdlListenerUtils_getInstance();
|
|
14872
|
+
var tmp_3 = ctx.wm();
|
|
14873
|
+
var aggregateName_0 = ensureNotNull(tmp_2.l46((tmp_3 instanceof AggregateContext ? tmp_3 : THROW_CCE()).j2v()));
|
|
14874
|
+
this.r45_1 = 'aggregates.' + aggregateName_0;
|
|
14855
14875
|
};
|
|
14856
14876
|
protoOf(ZdlListenerImpl).k1n = function (ctx) {
|
|
14857
14877
|
var serviceName = ensureNotNull(ZdlListenerUtils_getInstance().l46(ctx.x2x()));
|
|
@@ -14861,12 +14881,14 @@ protoOf(ZdlListenerImpl).k1n = function (ctx) {
|
|
|
14861
14881
|
this.o45_1.n44('services', serviceName, this.p45_1.db());
|
|
14862
14882
|
var name = this.p45_1.db().p1('name');
|
|
14863
14883
|
var location = 'services.' + toString_1(name);
|
|
14884
|
+
this.r45_1 = location;
|
|
14864
14885
|
this.o45_1.y44(location, ZdlListenerUtils_getInstance().k46(ctx));
|
|
14865
14886
|
this.o45_1.y44(location + '.name', ZdlListenerUtils_getInstance().k46(ctx.x2x()));
|
|
14866
14887
|
this.o45_1.y44(location + '.aggregates', ZdlListenerUtils_getInstance().k46(ctx.y2x()));
|
|
14867
14888
|
};
|
|
14868
14889
|
protoOf(ZdlListenerImpl).l1n = function (ctx) {
|
|
14869
14890
|
this.p45_1.ib();
|
|
14891
|
+
this.r45_1 = null;
|
|
14870
14892
|
};
|
|
14871
14893
|
protoOf(ZdlListenerImpl).q1n = function (ctx) {
|
|
14872
14894
|
var tmp = ZdlListenerUtils_getInstance();
|
|
@@ -14874,6 +14896,7 @@ protoOf(ZdlListenerImpl).q1n = function (ctx) {
|
|
|
14874
14896
|
var serviceName = ensureNotNull(tmp.l46((tmp_0 instanceof ServiceContext ? tmp_0 : THROW_CCE()).x2x()));
|
|
14875
14897
|
var methodName = ensureNotNull(ZdlListenerUtils_getInstance().l46(ctx.d2z()));
|
|
14876
14898
|
var location = 'services.' + serviceName + '.methods.' + methodName;
|
|
14899
|
+
this.r45_1 = location;
|
|
14877
14900
|
var naturalId = !(ctx.e2z() == null) ? true : null;
|
|
14878
14901
|
var methodParamId = !(ctx.f2z() == null) ? 'id' : null;
|
|
14879
14902
|
var tmp0_safe_receiver = ctx.f2z();
|
|
@@ -14940,6 +14963,10 @@ protoOf(ZdlListenerImpl).r1n = function (ctx) {
|
|
|
14940
14963
|
tmp0.t1(tmp2, value);
|
|
14941
14964
|
}
|
|
14942
14965
|
this.p45_1.ib();
|
|
14966
|
+
var tmp_2 = ZdlListenerUtils_getInstance();
|
|
14967
|
+
var tmp_3 = ctx.wm();
|
|
14968
|
+
var serviceName_0 = ensureNotNull(tmp_2.l46((tmp_3 instanceof ServiceContext ? tmp_3 : THROW_CCE()).x2x()));
|
|
14969
|
+
this.r45_1 = 'services.' + serviceName_0;
|
|
14943
14970
|
};
|
|
14944
14971
|
protoOf(ZdlListenerImpl).s1l = function (ctx) {
|
|
14945
14972
|
var name = ctx.r2o().bh();
|
|
@@ -15978,29 +16005,23 @@ function validateServices($this, model) {
|
|
|
15978
16005
|
}
|
|
15979
16006
|
function validateServiceMethodTransition($this, model, serviceKey, methodName, method, serviceAggregates) {
|
|
15980
16007
|
var mPath = path($this, ['services', serviceKey, 'methods', methodName == null ? '' : methodName]);
|
|
15981
|
-
var
|
|
15982
|
-
var
|
|
15983
|
-
|
|
15984
|
-
model.a45(mPath + '.options.transition.value.from', null, 'state transitions require an id parameter');
|
|
15985
|
-
return Unit_instance;
|
|
15986
|
-
}
|
|
15987
|
-
var tmp_0;
|
|
16008
|
+
var fromStates = JSONPath_instance.k44(method, 'transition.from');
|
|
16009
|
+
var toState = JSONPath_instance.k44(method, 'transition.to');
|
|
16010
|
+
var tmp;
|
|
15988
16011
|
if (serviceAggregates.j() === 1) {
|
|
15989
|
-
|
|
16012
|
+
tmp = serviceAggregates.k(0);
|
|
15990
16013
|
} else {
|
|
15991
|
-
var
|
|
15992
|
-
var returnType = (!(
|
|
15993
|
-
var
|
|
15994
|
-
var parameter = (!(
|
|
15995
|
-
|
|
16014
|
+
var tmp_0 = method.p1('returnType');
|
|
16015
|
+
var returnType = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
|
|
16016
|
+
var tmp_1 = method.p1('parameter');
|
|
16017
|
+
var parameter = (!(tmp_1 == null) ? typeof tmp_1 === 'string' : false) ? tmp_1 : null;
|
|
16018
|
+
tmp = !(returnType == null) && serviceAggregates.j1(returnType) ? returnType : !(parameter == null) && serviceAggregates.j1(parameter) ? parameter : null;
|
|
15996
16019
|
}
|
|
15997
|
-
var targetEntity =
|
|
16020
|
+
var targetEntity = tmp;
|
|
15998
16021
|
if (targetEntity == null) {
|
|
15999
16022
|
model.a45(mPath + '.options.transition.value', null, 'cannot determine target entity for state transition');
|
|
16000
16023
|
return Unit_instance;
|
|
16001
16024
|
}
|
|
16002
|
-
var fromStates = JSONPath_instance.k44(method, 'transition.from');
|
|
16003
|
-
var toState = JSONPath_instance.k44(method, 'transition.to');
|
|
16004
16025
|
var enumValues = getEntityLifecycleEnumValues($this, model, targetEntity);
|
|
16005
16026
|
if (enumValues == null) {
|
|
16006
16027
|
model.a45(mPath + '.options.transition.value', targetEntity, 'entity %s does not have a @lifecycle annotation');
|