@ddd-tool/domain-designer-generator 0.1.0-beta.6 → 0.1.0-beta.8
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/index.js +780 -776
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
**/
|
|
6
6
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
7
7
|
// @__NO_SIDE_EFFECTS__
|
|
8
|
-
function
|
|
8
|
+
function Bn(e) {
|
|
9
9
|
const n = /* @__PURE__ */ Object.create(null);
|
|
10
10
|
for (const t of e.split(",")) n[t] = 1;
|
|
11
11
|
return (t) => t in n;
|
|
12
12
|
}
|
|
13
13
|
process.env.NODE_ENV !== "production" && Object.freeze({});
|
|
14
14
|
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
15
|
-
const Pe = Object.assign,
|
|
15
|
+
const Pe = Object.assign, Un = Object.prototype.hasOwnProperty, Ve = (e, n) => Un.call(e, n), Y = Array.isArray, te = (e) => dn(e) === "[object Map]", zn = (e) => typeof e == "function", Gn = (e) => typeof e == "string", ue = (e) => typeof e == "symbol", Ee = (e) => e !== null && typeof e == "object", Jn = Object.prototype.toString, dn = (e) => Jn.call(e), mn = (e) => dn(e).slice(8, -1), Ye = (e) => Gn(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Wn = (e) => {
|
|
16
16
|
const n = /* @__PURE__ */ Object.create(null);
|
|
17
17
|
return (t) => n[t] || (n[t] = e(t));
|
|
18
18
|
}, Yn = Wn((e) => e.charAt(0).toUpperCase() + e.slice(1)), q = (e, n) => !Object.is(e, n);
|
|
@@ -192,7 +192,7 @@ const Re = /* @__PURE__ */ new WeakMap(), K = Symbol(
|
|
|
192
192
|
), ae = Symbol(
|
|
193
193
|
process.env.NODE_ENV !== "production" ? "Array iterate" : ""
|
|
194
194
|
);
|
|
195
|
-
function
|
|
195
|
+
function x(e, n, t) {
|
|
196
196
|
if (R && A) {
|
|
197
197
|
let r = Re.get(e);
|
|
198
198
|
r || Re.set(e, r = /* @__PURE__ */ new Map());
|
|
@@ -223,16 +223,16 @@ function V(e, n, t, r, o, s) {
|
|
|
223
223
|
if (qe(), n === "clear")
|
|
224
224
|
p.forEach(_);
|
|
225
225
|
else {
|
|
226
|
-
const C = Y(e),
|
|
226
|
+
const C = Y(e), m = C && Ye(t);
|
|
227
227
|
if (C && t === "length") {
|
|
228
228
|
const i = Number(r);
|
|
229
229
|
p.forEach((a, l) => {
|
|
230
230
|
(l === "length" || l === ae || !ue(l) && l >= i) && _(a);
|
|
231
231
|
});
|
|
232
232
|
} else
|
|
233
|
-
switch ((t !== void 0 || p.has(void 0)) && _(p.get(t)),
|
|
233
|
+
switch ((t !== void 0 || p.has(void 0)) && _(p.get(t)), m && _(p.get(ae)), n) {
|
|
234
234
|
case "add":
|
|
235
|
-
C ?
|
|
235
|
+
C ? m && _(p.get("length")) : (_(p.get(K)), te(e) && _(p.get(He)));
|
|
236
236
|
break;
|
|
237
237
|
case "delete":
|
|
238
238
|
C || (_(p.get(K)), te(e) && _(p.get(He)));
|
|
@@ -245,11 +245,11 @@ function V(e, n, t, r, o, s) {
|
|
|
245
245
|
Ze();
|
|
246
246
|
}
|
|
247
247
|
function J(e) {
|
|
248
|
-
const n =
|
|
249
|
-
return n === e ? n : (
|
|
248
|
+
const n = j(e);
|
|
249
|
+
return n === e ? n : (x(n, "iterate", ae), H(e) ? n : n.map(O));
|
|
250
250
|
}
|
|
251
251
|
function Xe(e) {
|
|
252
|
-
return
|
|
252
|
+
return x(e = j(e), "iterate", ae), e;
|
|
253
253
|
}
|
|
254
254
|
const st = {
|
|
255
255
|
__proto__: null,
|
|
@@ -354,13 +354,13 @@ function D(e, n, t, r, o, s) {
|
|
|
354
354
|
const a = C.apply(e, s);
|
|
355
355
|
return _ ? O(a) : a;
|
|
356
356
|
}
|
|
357
|
-
let
|
|
358
|
-
p !== e && (_ ?
|
|
357
|
+
let m = t;
|
|
358
|
+
p !== e && (_ ? m = function(a, l) {
|
|
359
359
|
return t.call(this, O(a), l, e);
|
|
360
|
-
} : t.length > 2 && (
|
|
360
|
+
} : t.length > 2 && (m = function(a, l) {
|
|
361
361
|
return t.call(this, a, l, e);
|
|
362
362
|
}));
|
|
363
|
-
const i = C.call(p,
|
|
363
|
+
const i = C.call(p, m, r);
|
|
364
364
|
return _ && o ? o(i) : i;
|
|
365
365
|
}
|
|
366
366
|
function cn(e, n, t, r) {
|
|
@@ -373,23 +373,23 @@ function cn(e, n, t, r) {
|
|
|
373
373
|
}), o[n](s, ...r);
|
|
374
374
|
}
|
|
375
375
|
function Oe(e, n, t) {
|
|
376
|
-
const r =
|
|
377
|
-
|
|
376
|
+
const r = j(e);
|
|
377
|
+
x(r, "iterate", ae);
|
|
378
378
|
const o = r[n](...t);
|
|
379
|
-
return (o === -1 || o === !1) && $t(t[0]) ? (t[0] =
|
|
379
|
+
return (o === -1 || o === !1) && $t(t[0]) ? (t[0] = j(t[0]), r[n](...t)) : o;
|
|
380
380
|
}
|
|
381
381
|
function ne(e, n, t = []) {
|
|
382
382
|
nt(), qe();
|
|
383
|
-
const r =
|
|
383
|
+
const r = j(e)[n].apply(e, t);
|
|
384
384
|
return Ze(), tt(), r;
|
|
385
385
|
}
|
|
386
|
-
const at = /* @__PURE__ */
|
|
386
|
+
const at = /* @__PURE__ */ Bn("__proto__,__v_isRef,__isVue"), Cn = new Set(
|
|
387
387
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(ue)
|
|
388
388
|
);
|
|
389
389
|
function it(e) {
|
|
390
390
|
ue(e) || (e = String(e));
|
|
391
|
-
const n =
|
|
392
|
-
return
|
|
391
|
+
const n = j(this);
|
|
392
|
+
return x(n, "has", e), n.hasOwnProperty(e);
|
|
393
393
|
}
|
|
394
394
|
class $n {
|
|
395
395
|
constructor(n = !1, t = !1) {
|
|
@@ -405,7 +405,7 @@ class $n {
|
|
|
405
405
|
if (t === "__v_isShallow")
|
|
406
406
|
return s;
|
|
407
407
|
if (t === "__v_raw")
|
|
408
|
-
return r === (o ? s ? yn :
|
|
408
|
+
return r === (o ? s ? yn : wn : s ? gt : Nn).get(n) || // receiver is not the reactive proxy, but has the same prototype
|
|
409
409
|
// this means the receiver is a user proxy of the reactive proxy
|
|
410
410
|
Object.getPrototypeOf(n) === Object.getPrototypeOf(r) ? n : void 0;
|
|
411
411
|
const p = Y(n);
|
|
@@ -424,7 +424,7 @@ class $n {
|
|
|
424
424
|
// its class methods
|
|
425
425
|
Z(n) ? n : r
|
|
426
426
|
);
|
|
427
|
-
return (ue(t) ? Cn.has(t) : at(t)) || (o ||
|
|
427
|
+
return (ue(t) ? Cn.has(t) : at(t)) || (o || x(n, "get", t), s) ? _ : Z(_) ? p && Ye(t) ? _ : _.value : Ee(_) ? o ? ve(_) : En(_) : _;
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
class ct extends $n {
|
|
@@ -435,7 +435,7 @@ class ct extends $n {
|
|
|
435
435
|
let s = n[t];
|
|
436
436
|
if (!this._isShallow) {
|
|
437
437
|
const C = ee(s);
|
|
438
|
-
if (!H(r) && !ee(r) && (s =
|
|
438
|
+
if (!H(r) && !ee(r) && (s = j(s), r = j(r)), !Y(n) && Z(s) && !Z(r))
|
|
439
439
|
return C ? !1 : (s.value = r, !0);
|
|
440
440
|
}
|
|
441
441
|
const p = Y(n) && Ye(t) ? Number(t) < n.length : Ve(n, t), _ = Reflect.set(
|
|
@@ -444,7 +444,7 @@ class ct extends $n {
|
|
|
444
444
|
r,
|
|
445
445
|
Z(n) ? n : o
|
|
446
446
|
);
|
|
447
|
-
return n ===
|
|
447
|
+
return n === j(o) && (p ? q(r, s) && V(n, "set", t, r, s) : V(n, "add", t, r)), _;
|
|
448
448
|
}
|
|
449
449
|
deleteProperty(n, t) {
|
|
450
450
|
const r = Ve(n, t), o = n[t], s = Reflect.deleteProperty(n, t);
|
|
@@ -452,10 +452,10 @@ class ct extends $n {
|
|
|
452
452
|
}
|
|
453
453
|
has(n, t) {
|
|
454
454
|
const r = Reflect.has(n, t);
|
|
455
|
-
return (!ue(t) || !Cn.has(t)) &&
|
|
455
|
+
return (!ue(t) || !Cn.has(t)) && x(n, "has", t), r;
|
|
456
456
|
}
|
|
457
457
|
ownKeys(n) {
|
|
458
|
-
return
|
|
458
|
+
return x(
|
|
459
459
|
n,
|
|
460
460
|
"iterate",
|
|
461
461
|
Y(n) ? "length" : K
|
|
@@ -482,15 +482,15 @@ class bn extends $n {
|
|
|
482
482
|
const ut = /* @__PURE__ */ new ct(), lt = /* @__PURE__ */ new bn(), pt = /* @__PURE__ */ new bn(!0), Le = (e) => e, pe = (e) => Reflect.getPrototypeOf(e);
|
|
483
483
|
function dt(e, n, t) {
|
|
484
484
|
return function(...r) {
|
|
485
|
-
const o = this.__v_raw, s =
|
|
486
|
-
return !n &&
|
|
485
|
+
const o = this.__v_raw, s = j(o), p = te(s), _ = e === "entries" || e === Symbol.iterator && p, C = e === "keys" && p, m = o[e](...r), i = t ? Le : n ? Me : O;
|
|
486
|
+
return !n && x(
|
|
487
487
|
s,
|
|
488
488
|
"iterate",
|
|
489
489
|
C ? He : K
|
|
490
490
|
), {
|
|
491
491
|
// iterator protocol
|
|
492
492
|
next() {
|
|
493
|
-
const { value: a, done: l } =
|
|
493
|
+
const { value: a, done: l } = m.next();
|
|
494
494
|
return l ? { value: a, done: l } : {
|
|
495
495
|
value: _ ? [i(a[0]), i(a[1])] : i(a),
|
|
496
496
|
done: l
|
|
@@ -509,7 +509,7 @@ function de(e) {
|
|
|
509
509
|
const t = n[0] ? `on key "${n[0]}" ` : "";
|
|
510
510
|
X(
|
|
511
511
|
`${Yn(e)} operation ${t}failed: target is readonly.`,
|
|
512
|
-
|
|
512
|
+
j(this)
|
|
513
513
|
);
|
|
514
514
|
}
|
|
515
515
|
return e === "delete" ? !1 : e === "clear" ? void 0 : this;
|
|
@@ -518,26 +518,26 @@ function de(e) {
|
|
|
518
518
|
function mt(e, n) {
|
|
519
519
|
const t = {
|
|
520
520
|
get(o) {
|
|
521
|
-
const s = this.__v_raw, p =
|
|
522
|
-
e || (q(o, _) &&
|
|
523
|
-
const { has: C } = pe(p),
|
|
521
|
+
const s = this.__v_raw, p = j(s), _ = j(o);
|
|
522
|
+
e || (q(o, _) && x(p, "get", o), x(p, "get", _));
|
|
523
|
+
const { has: C } = pe(p), m = n ? Le : e ? Me : O;
|
|
524
524
|
if (C.call(p, o))
|
|
525
|
-
return
|
|
525
|
+
return m(s.get(o));
|
|
526
526
|
if (C.call(p, _))
|
|
527
|
-
return
|
|
527
|
+
return m(s.get(_));
|
|
528
528
|
s !== p && s.get(o);
|
|
529
529
|
},
|
|
530
530
|
get size() {
|
|
531
531
|
const o = this.__v_raw;
|
|
532
|
-
return !e &&
|
|
532
|
+
return !e && x(j(o), "iterate", K), Reflect.get(o, "size", o);
|
|
533
533
|
},
|
|
534
534
|
has(o) {
|
|
535
|
-
const s = this.__v_raw, p =
|
|
536
|
-
return e || (q(o, _) &&
|
|
535
|
+
const s = this.__v_raw, p = j(s), _ = j(o);
|
|
536
|
+
return e || (q(o, _) && x(p, "has", o), x(p, "has", _)), o === _ ? s.has(o) : s.has(o) || s.has(_);
|
|
537
537
|
},
|
|
538
538
|
forEach(o, s) {
|
|
539
|
-
const p = this, _ = p.__v_raw, C =
|
|
540
|
-
return !e &&
|
|
539
|
+
const p = this, _ = p.__v_raw, C = j(_), m = n ? Le : e ? Me : O;
|
|
540
|
+
return !e && x(C, "iterate", K), _.forEach((i, a) => o.call(s, m(i), m(a), p));
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
543
|
return Pe(
|
|
@@ -549,27 +549,27 @@ function mt(e, n) {
|
|
|
549
549
|
clear: de("clear")
|
|
550
550
|
} : {
|
|
551
551
|
add(o) {
|
|
552
|
-
!n && !H(o) && !ee(o) && (o =
|
|
553
|
-
const s =
|
|
552
|
+
!n && !H(o) && !ee(o) && (o = j(o));
|
|
553
|
+
const s = j(this);
|
|
554
554
|
return pe(s).has.call(s, o) || (s.add(o), V(s, "add", o, o)), this;
|
|
555
555
|
},
|
|
556
556
|
set(o, s) {
|
|
557
|
-
!n && !H(s) && !ee(s) && (s =
|
|
558
|
-
const p =
|
|
559
|
-
let
|
|
560
|
-
|
|
557
|
+
!n && !H(s) && !ee(s) && (s = j(s));
|
|
558
|
+
const p = j(this), { has: _, get: C } = pe(p);
|
|
559
|
+
let m = _.call(p, o);
|
|
560
|
+
m ? process.env.NODE_ENV !== "production" && un(p, _, o) : (o = j(o), m = _.call(p, o));
|
|
561
561
|
const i = C.call(p, o);
|
|
562
|
-
return p.set(o, s),
|
|
562
|
+
return p.set(o, s), m ? q(s, i) && V(p, "set", o, s, i) : V(p, "add", o, s), this;
|
|
563
563
|
},
|
|
564
564
|
delete(o) {
|
|
565
|
-
const s =
|
|
565
|
+
const s = j(this), { has: p, get: _ } = pe(s);
|
|
566
566
|
let C = p.call(s, o);
|
|
567
|
-
C ? process.env.NODE_ENV !== "production" && un(s, p, o) : (o =
|
|
568
|
-
const
|
|
569
|
-
return C && V(s, "delete", o, void 0,
|
|
567
|
+
C ? process.env.NODE_ENV !== "production" && un(s, p, o) : (o = j(o), C = p.call(s, o));
|
|
568
|
+
const m = _ ? _.call(s, o) : void 0, i = s.delete(o);
|
|
569
|
+
return C && V(s, "delete", o, void 0, m), i;
|
|
570
570
|
},
|
|
571
571
|
clear() {
|
|
572
|
-
const o =
|
|
572
|
+
const o = j(this), s = o.size !== 0, p = process.env.NODE_ENV !== "production" ? te(o) ? new Map(o) : new Set(o) : void 0, _ = o.clear();
|
|
573
573
|
return s && V(
|
|
574
574
|
o,
|
|
575
575
|
"clear",
|
|
@@ -604,7 +604,7 @@ const ft = {
|
|
|
604
604
|
get: /* @__PURE__ */ en(!0, !0)
|
|
605
605
|
};
|
|
606
606
|
function un(e, n, t) {
|
|
607
|
-
const r =
|
|
607
|
+
const r = j(t);
|
|
608
608
|
if (r !== t && n.call(e, r)) {
|
|
609
609
|
const o = mn(e);
|
|
610
610
|
X(
|
|
@@ -612,7 +612,7 @@ function un(e, n, t) {
|
|
|
612
612
|
);
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
const
|
|
615
|
+
const Nn = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap();
|
|
616
616
|
function _t(e) {
|
|
617
617
|
switch (e) {
|
|
618
618
|
case "Object":
|
|
@@ -630,13 +630,13 @@ function _t(e) {
|
|
|
630
630
|
function Ct(e) {
|
|
631
631
|
return e.__v_skip || !Object.isExtensible(e) ? 0 : _t(mn(e));
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function En(e) {
|
|
634
634
|
return ee(e) ? e : nn(
|
|
635
635
|
e,
|
|
636
636
|
!1,
|
|
637
637
|
ut,
|
|
638
638
|
ft,
|
|
639
|
-
|
|
639
|
+
Nn
|
|
640
640
|
);
|
|
641
641
|
}
|
|
642
642
|
function ve(e) {
|
|
@@ -645,7 +645,7 @@ function ve(e) {
|
|
|
645
645
|
!0,
|
|
646
646
|
lt,
|
|
647
647
|
ht,
|
|
648
|
-
|
|
648
|
+
wn
|
|
649
649
|
);
|
|
650
650
|
}
|
|
651
651
|
function fe(e) {
|
|
@@ -658,7 +658,7 @@ function fe(e) {
|
|
|
658
658
|
);
|
|
659
659
|
}
|
|
660
660
|
function nn(e, n, t, r, o) {
|
|
661
|
-
if (!
|
|
661
|
+
if (!Ee(e))
|
|
662
662
|
return process.env.NODE_ENV !== "production" && X(
|
|
663
663
|
`value cannot be made ${n ? "readonly" : "reactive"}: ${String(
|
|
664
664
|
e
|
|
@@ -687,11 +687,11 @@ function H(e) {
|
|
|
687
687
|
function $t(e) {
|
|
688
688
|
return e ? !!e.__v_raw : !1;
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function j(e) {
|
|
691
691
|
const n = e && e.__v_raw;
|
|
692
|
-
return n ?
|
|
692
|
+
return n ? j(n) : e;
|
|
693
693
|
}
|
|
694
|
-
const O = (e) =>
|
|
694
|
+
const O = (e) => Ee(e) ? En(e) : e, Me = (e) => Ee(e) ? ve(e) : e;
|
|
695
695
|
function Z(e) {
|
|
696
696
|
return e ? e.__v_isRef === !0 : !1;
|
|
697
697
|
}
|
|
@@ -699,11 +699,11 @@ function ge(e) {
|
|
|
699
699
|
return bt(e, !1);
|
|
700
700
|
}
|
|
701
701
|
function bt(e, n) {
|
|
702
|
-
return Z(e) ? e : new
|
|
702
|
+
return Z(e) ? e : new Nt(e, n);
|
|
703
703
|
}
|
|
704
|
-
class
|
|
704
|
+
class Nt {
|
|
705
705
|
constructor(n, t) {
|
|
706
|
-
this.dep = new Qe(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = t ? n :
|
|
706
|
+
this.dep = new Qe(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = t ? n : j(n), this._value = t ? n : O(n), this.__v_isShallow = t;
|
|
707
707
|
}
|
|
708
708
|
get value() {
|
|
709
709
|
return process.env.NODE_ENV !== "production" ? this.dep.track({
|
|
@@ -714,7 +714,7 @@ class wt {
|
|
|
714
714
|
}
|
|
715
715
|
set value(n) {
|
|
716
716
|
const t = this._rawValue, r = this.__v_isShallow || H(n) || ee(n);
|
|
717
|
-
n = r ? n :
|
|
717
|
+
n = r ? n : j(n), q(n, t) && (this._rawValue = n, this._value = r ? n : O(n), process.env.NODE_ENV !== "production" ? this.dep.trigger({
|
|
718
718
|
target: this,
|
|
719
719
|
type: "set",
|
|
720
720
|
key: "value",
|
|
@@ -723,7 +723,7 @@ class wt {
|
|
|
723
723
|
}) : this.dep.trigger());
|
|
724
724
|
}
|
|
725
725
|
}
|
|
726
|
-
class
|
|
726
|
+
class wt {
|
|
727
727
|
constructor(n, t, r) {
|
|
728
728
|
this.fn = n, this.setter = t, this._value = void 0, this.dep = new Qe(this), this.__v_isRef = !0, this.deps = void 0, this.depsTail = void 0, this.flags = 16, this.globalVersion = re - 1, this.next = void 0, this.effect = this, this.__v_isReadonly = !t, this.isSSR = r;
|
|
729
729
|
}
|
|
@@ -750,18 +750,18 @@ class Nt {
|
|
|
750
750
|
}
|
|
751
751
|
function Ke(e, n, t = !1) {
|
|
752
752
|
let r, o;
|
|
753
|
-
|
|
754
|
-
const s = new
|
|
753
|
+
zn(e) ? r = e : (r = e.get, o = e.set);
|
|
754
|
+
const s = new wt(r, o, t);
|
|
755
755
|
return process.env.NODE_ENV, s;
|
|
756
756
|
}
|
|
757
757
|
const yt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
758
|
-
let
|
|
758
|
+
let Et = (e = 21) => {
|
|
759
759
|
let n = "", t = crypto.getRandomValues(new Uint8Array(e |= 0));
|
|
760
760
|
for (; e--; )
|
|
761
761
|
n += yt[t[e] & 63];
|
|
762
762
|
return n;
|
|
763
763
|
};
|
|
764
|
-
function
|
|
764
|
+
function jt(e, n = !0, t = !1) {
|
|
765
765
|
const r = ge();
|
|
766
766
|
let o;
|
|
767
767
|
const s = ge(!1);
|
|
@@ -769,20 +769,20 @@ function Et(e, n = !0, t = !1) {
|
|
|
769
769
|
};
|
|
770
770
|
const _ = new Proxy(e, {
|
|
771
771
|
apply: function(i, a, l) {
|
|
772
|
-
let
|
|
772
|
+
let h;
|
|
773
773
|
try {
|
|
774
|
-
|
|
774
|
+
h = i(...l);
|
|
775
775
|
} catch (b) {
|
|
776
|
-
|
|
776
|
+
h = b;
|
|
777
777
|
}
|
|
778
|
-
if (
|
|
779
|
-
if (r.value =
|
|
780
|
-
throw p(),
|
|
778
|
+
if (h instanceof Error) {
|
|
779
|
+
if (r.value = h, o = h, n)
|
|
780
|
+
throw p(), h;
|
|
781
781
|
} else
|
|
782
782
|
s.value = !0, r.value = void 0, o = !0, p();
|
|
783
783
|
}
|
|
784
784
|
}), C = () => {
|
|
785
|
-
},
|
|
785
|
+
}, m = new Proxy(
|
|
786
786
|
(i) => {
|
|
787
787
|
r.value = i;
|
|
788
788
|
},
|
|
@@ -803,20 +803,20 @@ function Et(e, n = !0, t = !1) {
|
|
|
803
803
|
}
|
|
804
804
|
let l;
|
|
805
805
|
t && (l = setTimeout(() => {
|
|
806
|
-
const
|
|
807
|
-
r.value =
|
|
806
|
+
const h = new Error("timeout!");
|
|
807
|
+
r.value = h, n && a(h);
|
|
808
808
|
}, t)), p = () => {
|
|
809
809
|
l && (clearTimeout(l), l = void 0), i();
|
|
810
810
|
};
|
|
811
811
|
}),
|
|
812
812
|
callback: _,
|
|
813
|
-
onError:
|
|
813
|
+
onError: m,
|
|
814
814
|
resolved: Ke(() => s.value),
|
|
815
815
|
error: Ke(() => r.value)
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
|
-
function
|
|
819
|
-
return
|
|
818
|
+
function Be() {
|
|
819
|
+
return Et();
|
|
820
820
|
}
|
|
821
821
|
function At() {
|
|
822
822
|
const e = {}, n = {}, t = /* @__PURE__ */ new WeakMap(), r = {};
|
|
@@ -839,7 +839,7 @@ function At() {
|
|
|
839
839
|
createSetupPlugin(o) {
|
|
840
840
|
let s;
|
|
841
841
|
return o instanceof Function ? s = o() : s = o, Object.freeze({
|
|
842
|
-
__id:
|
|
842
|
+
__id: Be(),
|
|
843
843
|
type: "Setup",
|
|
844
844
|
mount(p) {
|
|
845
845
|
if (p.isInitialized.value)
|
|
@@ -851,7 +851,7 @@ function At() {
|
|
|
851
851
|
createHotSwapPlugin(o) {
|
|
852
852
|
let s;
|
|
853
853
|
return o instanceof Function ? s = o() : s = o, Object.freeze({
|
|
854
|
-
__id:
|
|
854
|
+
__id: Be(),
|
|
855
855
|
type: "HotSwap",
|
|
856
856
|
mount: s.mount,
|
|
857
857
|
unmount: s.unmount
|
|
@@ -912,13 +912,13 @@ function Ot(e) {
|
|
|
912
912
|
destroy: e.destroy
|
|
913
913
|
});
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function xt(e) {
|
|
916
916
|
const {
|
|
917
917
|
callback: n,
|
|
918
918
|
onError: t,
|
|
919
919
|
promise: r,
|
|
920
920
|
resolved: o
|
|
921
|
-
} =
|
|
921
|
+
} = jt(() => {
|
|
922
922
|
}, !1, 5e3);
|
|
923
923
|
function s(a) {
|
|
924
924
|
if (o.value === !0)
|
|
@@ -941,13 +941,13 @@ function Tt(e) {
|
|
|
941
941
|
}),
|
|
942
942
|
0
|
|
943
943
|
);
|
|
944
|
-
const C = _.states || {},
|
|
944
|
+
const C = _.states || {}, m = _.commands || {}, i = _.events || {};
|
|
945
945
|
return {
|
|
946
|
-
__id:
|
|
946
|
+
__id: Be(),
|
|
947
947
|
type: "Singleton",
|
|
948
948
|
api: It({
|
|
949
949
|
states: C,
|
|
950
|
-
commands:
|
|
950
|
+
commands: m,
|
|
951
951
|
events: i,
|
|
952
952
|
destroy: () => {
|
|
953
953
|
}
|
|
@@ -962,10 +962,10 @@ Stack : ${a.stack || "unkown"}`);
|
|
|
962
962
|
};
|
|
963
963
|
}
|
|
964
964
|
let me;
|
|
965
|
-
function
|
|
966
|
-
return
|
|
965
|
+
function Tt(e) {
|
|
966
|
+
return xt(() => {
|
|
967
967
|
const n = ge(e), t = ge({});
|
|
968
|
-
let r = () => [], o = () => [], s = () => [], p = () => [], _ = () => [], C = () => [],
|
|
968
|
+
let r = () => [], o = () => [], s = () => [], p = () => [], _ = () => [], C = () => [], m = () => [];
|
|
969
969
|
return {
|
|
970
970
|
states: {
|
|
971
971
|
designer: n,
|
|
@@ -973,7 +973,7 @@ function xt(e) {
|
|
|
973
973
|
},
|
|
974
974
|
commands: {
|
|
975
975
|
genCodeFiles() {
|
|
976
|
-
return
|
|
976
|
+
return m();
|
|
977
977
|
},
|
|
978
978
|
clearCaches() {
|
|
979
979
|
},
|
|
@@ -1020,7 +1020,7 @@ function xt(e) {
|
|
|
1020
1020
|
C = i;
|
|
1021
1021
|
},
|
|
1022
1022
|
_setCodeFileProvider(i) {
|
|
1023
|
-
|
|
1023
|
+
m = i;
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
1026
|
};
|
|
@@ -1031,11 +1031,11 @@ function Ao(e) {
|
|
|
1031
1031
|
if (!me) {
|
|
1032
1032
|
if (!e)
|
|
1033
1033
|
throw new Error("designer is required");
|
|
1034
|
-
me =
|
|
1034
|
+
me = Tt(e), le.registerAgg(me);
|
|
1035
1035
|
}
|
|
1036
1036
|
return me.api;
|
|
1037
1037
|
}
|
|
1038
|
-
function
|
|
1038
|
+
function je(e) {
|
|
1039
1039
|
return e && e._attributes && e._attributes.rule === "Info";
|
|
1040
1040
|
}
|
|
1041
1041
|
function kt(e) {
|
|
@@ -1053,30 +1053,30 @@ function Pt(e) {
|
|
|
1053
1053
|
function Vt(e) {
|
|
1054
1054
|
return e && e._attributes && e._attributes.rule === "ReadModel";
|
|
1055
1055
|
}
|
|
1056
|
-
const
|
|
1056
|
+
const Ue = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
|
|
1057
1057
|
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
1058
1058
|
const Rt = () => {
|
|
1059
1059
|
}, Ht = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
|
|
1060
|
-
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), Ae = Object.assign, k = Array.isArray,
|
|
1060
|
+
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), Ae = Object.assign, k = Array.isArray, G = (e) => typeof e == "function", L = (e) => typeof e == "string", Lt = (e) => typeof e == "symbol", B = (e) => e !== null && typeof e == "object";
|
|
1061
1061
|
let ln;
|
|
1062
1062
|
const Se = () => ln || (ln = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
|
|
1063
1063
|
function tn(e) {
|
|
1064
1064
|
if (k(e)) {
|
|
1065
1065
|
const n = {};
|
|
1066
1066
|
for (let t = 0; t < e.length; t++) {
|
|
1067
|
-
const r = e[t], o = L(r) ?
|
|
1067
|
+
const r = e[t], o = L(r) ? Ut(r) : tn(r);
|
|
1068
1068
|
if (o)
|
|
1069
1069
|
for (const s in o)
|
|
1070
1070
|
n[s] = o[s];
|
|
1071
1071
|
}
|
|
1072
1072
|
return n;
|
|
1073
|
-
} else if (L(e) ||
|
|
1073
|
+
} else if (L(e) || B(e))
|
|
1074
1074
|
return e;
|
|
1075
1075
|
}
|
|
1076
|
-
const Mt = /;(?![^(]*\))/g, Kt = /:([^]+)/,
|
|
1077
|
-
function
|
|
1076
|
+
const Mt = /;(?![^(]*\))/g, Kt = /:([^]+)/, Bt = /\/\*[^]*?\*\//g;
|
|
1077
|
+
function Ut(e) {
|
|
1078
1078
|
const n = {};
|
|
1079
|
-
return e.replace(
|
|
1079
|
+
return e.replace(Bt, "").split(Mt).forEach((t) => {
|
|
1080
1080
|
if (t) {
|
|
1081
1081
|
const r = t.split(Kt);
|
|
1082
1082
|
r.length > 1 && (n[r[0].trim()] = r[1].trim());
|
|
@@ -1092,7 +1092,7 @@ function on(e) {
|
|
|
1092
1092
|
const r = on(e[t]);
|
|
1093
1093
|
r && (n += r + " ");
|
|
1094
1094
|
}
|
|
1095
|
-
else if (
|
|
1095
|
+
else if (B(e))
|
|
1096
1096
|
for (const t in e)
|
|
1097
1097
|
e[t] && (n += t + " ");
|
|
1098
1098
|
return n.trim();
|
|
@@ -1109,21 +1109,21 @@ Symbol(
|
|
|
1109
1109
|
new Set(
|
|
1110
1110
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(Lt)
|
|
1111
1111
|
);
|
|
1112
|
-
function
|
|
1113
|
-
return
|
|
1112
|
+
function jn(e) {
|
|
1113
|
+
return ze(e) ? jn(e.__v_raw) : !!(e && e.__v_isReactive);
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1115
|
+
function ze(e) {
|
|
1116
1116
|
return !!(e && e.__v_isReadonly);
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1118
|
+
function xe(e) {
|
|
1119
1119
|
return !!(e && e.__v_isShallow);
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function Ge(e) {
|
|
1122
1122
|
return e ? !!e.__v_raw : !1;
|
|
1123
1123
|
}
|
|
1124
|
-
function
|
|
1124
|
+
function U(e) {
|
|
1125
1125
|
const n = e && e.__v_raw;
|
|
1126
|
-
return n ?
|
|
1126
|
+
return n ? U(n) : e;
|
|
1127
1127
|
}
|
|
1128
1128
|
function sn(e) {
|
|
1129
1129
|
return e ? e.__v_isRef === !0 : !1;
|
|
@@ -1133,18 +1133,18 @@ function sn(e) {
|
|
|
1133
1133
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1134
1134
|
* @license MIT
|
|
1135
1135
|
**/
|
|
1136
|
-
const
|
|
1137
|
-
function
|
|
1138
|
-
|
|
1136
|
+
const z = [];
|
|
1137
|
+
function zt(e) {
|
|
1138
|
+
z.push(e);
|
|
1139
1139
|
}
|
|
1140
|
-
function
|
|
1141
|
-
|
|
1140
|
+
function Gt() {
|
|
1141
|
+
z.pop();
|
|
1142
1142
|
}
|
|
1143
|
-
let
|
|
1143
|
+
let Te = !1;
|
|
1144
1144
|
function ie(e, ...n) {
|
|
1145
|
-
if (
|
|
1146
|
-
|
|
1147
|
-
const t =
|
|
1145
|
+
if (Te) return;
|
|
1146
|
+
Te = !0;
|
|
1147
|
+
const t = z.length ? z[z.length - 1].component : null, r = t && t.appContext.config.warnHandler, o = Jt();
|
|
1148
1148
|
if (r)
|
|
1149
1149
|
rn(
|
|
1150
1150
|
r,
|
|
@@ -1169,10 +1169,10 @@ function ie(e, ...n) {
|
|
|
1169
1169
|
o.length && s.push(`
|
|
1170
1170
|
`, ...Wt(o));
|
|
1171
1171
|
}
|
|
1172
|
-
|
|
1172
|
+
Te = !1;
|
|
1173
1173
|
}
|
|
1174
1174
|
function Jt() {
|
|
1175
|
-
let e =
|
|
1175
|
+
let e = z[z.length - 1];
|
|
1176
1176
|
if (!e)
|
|
1177
1177
|
return [];
|
|
1178
1178
|
const n = [];
|
|
@@ -1209,7 +1209,7 @@ function qt(e) {
|
|
|
1209
1209
|
}), t.length > 3 && n.push(" ..."), n;
|
|
1210
1210
|
}
|
|
1211
1211
|
function An(e, n, t) {
|
|
1212
|
-
return L(n) ? (n = JSON.stringify(n), t ? n : [`${e}=${n}`]) : typeof n == "number" || typeof n == "boolean" || n == null ? t ? n : [`${e}=${n}`] : sn(n) ? (n = An(e,
|
|
1212
|
+
return L(n) ? (n = JSON.stringify(n), t ? n : [`${e}=${n}`]) : typeof n == "number" || typeof n == "boolean" || n == null ? t ? n : [`${e}=${n}`] : sn(n) ? (n = An(e, U(n.value), !0), t ? n : [`${e}=Ref<`, n, ">"]) : G(n) ? [`${e}=fn${n.name ? `<${n.name}>` : ""}`] : (n = U(n), t ? n : [`${e}=`, n]);
|
|
1213
1213
|
}
|
|
1214
1214
|
const Sn = {
|
|
1215
1215
|
sp: "serverPrefetch hook",
|
|
@@ -1252,15 +1252,15 @@ function rn(e, n, t, r) {
|
|
|
1252
1252
|
}
|
|
1253
1253
|
}
|
|
1254
1254
|
function In(e, n, t, r = !0) {
|
|
1255
|
-
const o = n ? n.vnode : null, { errorHandler: s, throwUnhandledErrorInProduction: p } = n && n.appContext.config ||
|
|
1255
|
+
const o = n ? n.vnode : null, { errorHandler: s, throwUnhandledErrorInProduction: p } = n && n.appContext.config || Ue;
|
|
1256
1256
|
if (n) {
|
|
1257
1257
|
let _ = n.parent;
|
|
1258
|
-
const C = n.proxy,
|
|
1258
|
+
const C = n.proxy, m = process.env.NODE_ENV !== "production" ? Sn[t] : `https://vuejs.org/error-reference/#runtime-${t}`;
|
|
1259
1259
|
for (; _; ) {
|
|
1260
1260
|
const i = _.ec;
|
|
1261
1261
|
if (i) {
|
|
1262
1262
|
for (let a = 0; a < i.length; a++)
|
|
1263
|
-
if (i[a](e, C,
|
|
1263
|
+
if (i[a](e, C, m) === !1)
|
|
1264
1264
|
return;
|
|
1265
1265
|
}
|
|
1266
1266
|
_ = _.parent;
|
|
@@ -1269,7 +1269,7 @@ function In(e, n, t, r = !0) {
|
|
|
1269
1269
|
rn(s, null, 10, [
|
|
1270
1270
|
e,
|
|
1271
1271
|
C,
|
|
1272
|
-
|
|
1272
|
+
m
|
|
1273
1273
|
]);
|
|
1274
1274
|
return;
|
|
1275
1275
|
}
|
|
@@ -1279,12 +1279,12 @@ function In(e, n, t, r = !0) {
|
|
|
1279
1279
|
function Zt(e, n, t, r = !0, o = !1) {
|
|
1280
1280
|
if (process.env.NODE_ENV !== "production") {
|
|
1281
1281
|
const s = Sn[n];
|
|
1282
|
-
if (t &&
|
|
1282
|
+
if (t && zt(t), ie(`Unhandled error${s ? ` during execution of ${s}` : ""}`), t && Gt(), r)
|
|
1283
1283
|
throw e;
|
|
1284
1284
|
} else if (o)
|
|
1285
1285
|
throw e;
|
|
1286
1286
|
}
|
|
1287
|
-
const
|
|
1287
|
+
const T = [];
|
|
1288
1288
|
let F = -1;
|
|
1289
1289
|
const Q = [];
|
|
1290
1290
|
let P = null, W = 0;
|
|
@@ -1292,22 +1292,22 @@ const Qt = /* @__PURE__ */ Promise.resolve();
|
|
|
1292
1292
|
let Je = null;
|
|
1293
1293
|
const Xt = 100;
|
|
1294
1294
|
function eo(e) {
|
|
1295
|
-
let n = F + 1, t =
|
|
1295
|
+
let n = F + 1, t = T.length;
|
|
1296
1296
|
for (; n < t; ) {
|
|
1297
|
-
const r = n + t >>> 1, o =
|
|
1297
|
+
const r = n + t >>> 1, o = T[r], s = ce(o);
|
|
1298
1298
|
s < e || s === e && o.flags & 2 ? n = r + 1 : t = r;
|
|
1299
1299
|
}
|
|
1300
1300
|
return n;
|
|
1301
1301
|
}
|
|
1302
1302
|
function no(e) {
|
|
1303
1303
|
if (!(e.flags & 1)) {
|
|
1304
|
-
const n = ce(e), t =
|
|
1304
|
+
const n = ce(e), t = T[T.length - 1];
|
|
1305
1305
|
!t || // fast path when the job id is larger than the tail
|
|
1306
|
-
!(e.flags & 2) && n >= ce(t) ?
|
|
1306
|
+
!(e.flags & 2) && n >= ce(t) ? T.push(e) : T.splice(eo(n), 0, e), e.flags |= 1, On();
|
|
1307
1307
|
}
|
|
1308
1308
|
}
|
|
1309
1309
|
function On() {
|
|
1310
|
-
Je || (Je = Qt.then(
|
|
1310
|
+
Je || (Je = Qt.then(xn));
|
|
1311
1311
|
}
|
|
1312
1312
|
function to(e) {
|
|
1313
1313
|
k(e) ? Q.push(...e) : P && e.id === -1 ? P.splice(W + 1, 0, e) : e.flags & 1 || (Q.push(e), e.flags |= 1), On();
|
|
@@ -1323,18 +1323,18 @@ function oo(e) {
|
|
|
1323
1323
|
}
|
|
1324
1324
|
for (P = n, process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), W = 0; W < P.length; W++) {
|
|
1325
1325
|
const t = P[W];
|
|
1326
|
-
process.env.NODE_ENV !== "production" &&
|
|
1326
|
+
process.env.NODE_ENV !== "production" && Tn(e, t) || (t.flags & 4 && (t.flags &= -2), t.flags & 8 || t(), t.flags &= -2);
|
|
1327
1327
|
}
|
|
1328
1328
|
P = null, W = 0;
|
|
1329
1329
|
}
|
|
1330
1330
|
}
|
|
1331
1331
|
const ce = (e) => e.id == null ? e.flags & 2 ? -1 : 1 / 0 : e.id;
|
|
1332
|
-
function
|
|
1332
|
+
function xn(e) {
|
|
1333
1333
|
process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map());
|
|
1334
|
-
const n = process.env.NODE_ENV !== "production" ? (t) =>
|
|
1334
|
+
const n = process.env.NODE_ENV !== "production" ? (t) => Tn(e, t) : Rt;
|
|
1335
1335
|
try {
|
|
1336
|
-
for (F = 0; F <
|
|
1337
|
-
const t =
|
|
1336
|
+
for (F = 0; F < T.length; F++) {
|
|
1337
|
+
const t = T[F];
|
|
1338
1338
|
if (t && !(t.flags & 8)) {
|
|
1339
1339
|
if (process.env.NODE_ENV !== "production" && n(t))
|
|
1340
1340
|
continue;
|
|
@@ -1346,14 +1346,14 @@ function Tn(e) {
|
|
|
1346
1346
|
}
|
|
1347
1347
|
}
|
|
1348
1348
|
} finally {
|
|
1349
|
-
for (; F <
|
|
1350
|
-
const t =
|
|
1349
|
+
for (; F < T.length; F++) {
|
|
1350
|
+
const t = T[F];
|
|
1351
1351
|
t && (t.flags &= -2);
|
|
1352
1352
|
}
|
|
1353
|
-
F = -1,
|
|
1353
|
+
F = -1, T.length = 0, oo(e), Je = null, (T.length || Q.length) && xn(e);
|
|
1354
1354
|
}
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1356
|
+
function Tn(e, n) {
|
|
1357
1357
|
const t = e.get(n) || 0;
|
|
1358
1358
|
if (t > Xt) {
|
|
1359
1359
|
const r = n.i, o = r && Hn(r.type);
|
|
@@ -1435,7 +1435,7 @@ const vo = (...e) => Vn(
|
|
|
1435
1435
|
ref: e,
|
|
1436
1436
|
ref_key: n,
|
|
1437
1437
|
ref_for: t
|
|
1438
|
-
}) => (typeof e == "number" && (e = "" + e), e != null ? L(e) || sn(e) ||
|
|
1438
|
+
}) => (typeof e == "number" && (e = "" + e), e != null ? L(e) || sn(e) || G(e) ? { i: $e, r: e, k: n, f: !!t } : e : null);
|
|
1439
1439
|
function go(e, n = null, t = null, r = 0, o = null, s = e === Fn ? 0 : 1, p = !1, _ = !1) {
|
|
1440
1440
|
const C = {
|
|
1441
1441
|
__v_isVNode: !0,
|
|
@@ -1482,10 +1482,10 @@ function Vn(e, n = null, t = null, r = 0, o = null, s = !1) {
|
|
|
1482
1482
|
if (Mn(e) && (e = e.__vccOpts), n) {
|
|
1483
1483
|
n = Co(n);
|
|
1484
1484
|
let { class: _, style: C } = n;
|
|
1485
|
-
_ && !L(_) && (n.class = on(_)),
|
|
1485
|
+
_ && !L(_) && (n.class = on(_)), B(C) && (Ge(C) && !k(C) && (C = Ae({}, C)), n.style = tn(C));
|
|
1486
1486
|
}
|
|
1487
|
-
const p = L(e) ? 1 : po(e) ? 128 : co(e) ? 64 :
|
|
1488
|
-
return process.env.NODE_ENV !== "production" && p & 4 &&
|
|
1487
|
+
const p = L(e) ? 1 : po(e) ? 128 : co(e) ? 64 : B(e) ? 4 : G(e) ? 2 : 0;
|
|
1488
|
+
return process.env.NODE_ENV !== "production" && p & 4 && Ge(e) && (e = U(e), ie(
|
|
1489
1489
|
"Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",
|
|
1490
1490
|
`
|
|
1491
1491
|
Component that was made reactive: `,
|
|
@@ -1502,15 +1502,15 @@ Component that was made reactive: `,
|
|
|
1502
1502
|
);
|
|
1503
1503
|
}
|
|
1504
1504
|
function Co(e) {
|
|
1505
|
-
return e ?
|
|
1505
|
+
return e ? Ge(e) || Dn(e) ? Ae({}, e) : e : null;
|
|
1506
1506
|
}
|
|
1507
1507
|
function be(e, n, t = !1, r = !1) {
|
|
1508
|
-
const { props: o, ref: s, patchFlag: p, children: _, transition: C } = e,
|
|
1508
|
+
const { props: o, ref: s, patchFlag: p, children: _, transition: C } = e, m = n ? bo(o || {}, n) : o, i = {
|
|
1509
1509
|
__v_isVNode: !0,
|
|
1510
1510
|
__v_skip: !0,
|
|
1511
1511
|
type: e.type,
|
|
1512
|
-
props:
|
|
1513
|
-
key:
|
|
1512
|
+
props: m,
|
|
1513
|
+
key: m && Pn(m),
|
|
1514
1514
|
ref: n && n.ref ? (
|
|
1515
1515
|
// #2078 in the case of <component :is="vnode" ref="extra"/>
|
|
1516
1516
|
// if the vnode itself already has a ref, cloneVNode will need to merge
|
|
@@ -1574,7 +1574,7 @@ function an(e, n) {
|
|
|
1574
1574
|
return;
|
|
1575
1575
|
} else
|
|
1576
1576
|
t = 32, !n._ && !Dn(n) && (n._ctx = $e);
|
|
1577
|
-
else
|
|
1577
|
+
else G(n) ? (n = { default: n, _ctx: $e }, t = 32) : (n = String(n), r & 64 ? (t = 16, n = [$o(n)]) : t = 8);
|
|
1578
1578
|
e.children = n, e.shapeFlag |= t;
|
|
1579
1579
|
}
|
|
1580
1580
|
function bo(...e) {
|
|
@@ -1609,9 +1609,9 @@ function bo(...e) {
|
|
|
1609
1609
|
);
|
|
1610
1610
|
}
|
|
1611
1611
|
process.env.NODE_ENV;
|
|
1612
|
-
const
|
|
1612
|
+
const No = /(?:^|[-_])(\w)/g, wo = (e) => e.replace(No, (n) => n.toUpperCase()).replace(/[-_]/g, "");
|
|
1613
1613
|
function Hn(e, n = !0) {
|
|
1614
|
-
return
|
|
1614
|
+
return G(e) ? e.displayName || e.name : e.name || n && e.__name;
|
|
1615
1615
|
}
|
|
1616
1616
|
function Ln(e, n, t = !1) {
|
|
1617
1617
|
let r = Hn(n);
|
|
@@ -1629,10 +1629,10 @@ function Ln(e, n, t = !1) {
|
|
|
1629
1629
|
e.components || e.parent.type.components
|
|
1630
1630
|
) || o(e.appContext.components);
|
|
1631
1631
|
}
|
|
1632
|
-
return r ?
|
|
1632
|
+
return r ? wo(r) : t ? "App" : "Anonymous";
|
|
1633
1633
|
}
|
|
1634
1634
|
function Mn(e) {
|
|
1635
|
-
return
|
|
1635
|
+
return G(e) && "__vccOpts" in e;
|
|
1636
1636
|
}
|
|
1637
1637
|
function yo() {
|
|
1638
1638
|
if (process.env.NODE_ENV === "production" || typeof window > "u")
|
|
@@ -1640,7 +1640,7 @@ function yo() {
|
|
|
1640
1640
|
const e = { style: "color:#3ba776" }, n = { style: "color:#1677ff" }, t = { style: "color:#f5222d" }, r = { style: "color:#eb2f96" }, o = {
|
|
1641
1641
|
__vue_custom_formatter: !0,
|
|
1642
1642
|
header(a) {
|
|
1643
|
-
return
|
|
1643
|
+
return B(a) ? a.__isVue ? ["div", e, "VueInstance"] : sn(a) ? [
|
|
1644
1644
|
"div",
|
|
1645
1645
|
{},
|
|
1646
1646
|
["span", e, i(a)],
|
|
@@ -1648,17 +1648,17 @@ function yo() {
|
|
|
1648
1648
|
// avoid debugger accessing value affecting behavior
|
|
1649
1649
|
_("_value" in a ? a._value : a),
|
|
1650
1650
|
">"
|
|
1651
|
-
] :
|
|
1651
|
+
] : jn(a) ? [
|
|
1652
1652
|
"div",
|
|
1653
1653
|
{},
|
|
1654
|
-
["span", e,
|
|
1654
|
+
["span", e, xe(a) ? "ShallowReactive" : "Reactive"],
|
|
1655
1655
|
"<",
|
|
1656
1656
|
_(a),
|
|
1657
|
-
`>${
|
|
1658
|
-
] :
|
|
1657
|
+
`>${ze(a) ? " (readonly)" : ""}`
|
|
1658
|
+
] : ze(a) ? [
|
|
1659
1659
|
"div",
|
|
1660
1660
|
{},
|
|
1661
|
-
["span", e,
|
|
1661
|
+
["span", e, xe(a) ? "ShallowReadonly" : "Readonly"],
|
|
1662
1662
|
"<",
|
|
1663
1663
|
_(a),
|
|
1664
1664
|
">"
|
|
@@ -1678,9 +1678,9 @@ function yo() {
|
|
|
1678
1678
|
};
|
|
1679
1679
|
function s(a) {
|
|
1680
1680
|
const l = [];
|
|
1681
|
-
a.type.props && a.props && l.push(p("props",
|
|
1682
|
-
const
|
|
1683
|
-
|
|
1681
|
+
a.type.props && a.props && l.push(p("props", U(a.props))), a.setupState !== Ue && l.push(p("setup", a.setupState)), a.data !== Ue && l.push(p("data", U(a.data)));
|
|
1682
|
+
const h = C(a, "computed");
|
|
1683
|
+
h && l.push(p("computed", h));
|
|
1684
1684
|
const b = C(a, "inject");
|
|
1685
1685
|
return b && l.push(p("injected", b)), l.push([
|
|
1686
1686
|
"div",
|
|
@@ -1711,34 +1711,34 @@ function yo() {
|
|
|
1711
1711
|
{
|
|
1712
1712
|
style: "padding-left:1.25em"
|
|
1713
1713
|
},
|
|
1714
|
-
...Object.keys(l).map((
|
|
1714
|
+
...Object.keys(l).map((h) => [
|
|
1715
1715
|
"div",
|
|
1716
1716
|
{},
|
|
1717
|
-
["span", r,
|
|
1718
|
-
_(l[
|
|
1717
|
+
["span", r, h + ": "],
|
|
1718
|
+
_(l[h], !1)
|
|
1719
1719
|
])
|
|
1720
1720
|
]
|
|
1721
1721
|
] : ["span", {}];
|
|
1722
1722
|
}
|
|
1723
1723
|
function _(a, l = !0) {
|
|
1724
|
-
return typeof a == "number" ? ["span", n, a] : typeof a == "string" ? ["span", t, JSON.stringify(a)] : typeof a == "boolean" ? ["span", r, a] :
|
|
1724
|
+
return typeof a == "number" ? ["span", n, a] : typeof a == "string" ? ["span", t, JSON.stringify(a)] : typeof a == "boolean" ? ["span", r, a] : B(a) ? ["object", { object: l ? U(a) : a }] : ["span", t, String(a)];
|
|
1725
1725
|
}
|
|
1726
1726
|
function C(a, l) {
|
|
1727
|
-
const
|
|
1728
|
-
if (
|
|
1727
|
+
const h = a.type;
|
|
1728
|
+
if (G(h))
|
|
1729
1729
|
return;
|
|
1730
1730
|
const b = {};
|
|
1731
1731
|
for (const g in a.ctx)
|
|
1732
|
-
|
|
1732
|
+
m(h, g, l) && (b[g] = a.ctx[g]);
|
|
1733
1733
|
return b;
|
|
1734
1734
|
}
|
|
1735
|
-
function
|
|
1736
|
-
const b = a[
|
|
1737
|
-
if (k(b) && b.includes(l) ||
|
|
1735
|
+
function m(a, l, h) {
|
|
1736
|
+
const b = a[h];
|
|
1737
|
+
if (k(b) && b.includes(l) || B(b) && l in b || a.extends && m(a.extends, l, h) || a.mixins && a.mixins.some((g) => m(g, l, h)))
|
|
1738
1738
|
return !0;
|
|
1739
1739
|
}
|
|
1740
1740
|
function i(a) {
|
|
1741
|
-
return
|
|
1741
|
+
return xe(a) ? "ShallowRef" : a.effect ? "ComputedRef" : "Ref";
|
|
1742
1742
|
}
|
|
1743
1743
|
window.devtoolsFormatters ? window.devtoolsFormatters.push(o) : window.devtoolsFormatters = [o];
|
|
1744
1744
|
}
|
|
@@ -1750,11 +1750,11 @@ process.env.NODE_ENV;
|
|
|
1750
1750
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1751
1751
|
* @license MIT
|
|
1752
1752
|
**/
|
|
1753
|
-
function
|
|
1753
|
+
function Eo() {
|
|
1754
1754
|
yo();
|
|
1755
1755
|
}
|
|
1756
|
-
process.env.NODE_ENV !== "production" &&
|
|
1757
|
-
function
|
|
1756
|
+
process.env.NODE_ENV !== "production" && Eo();
|
|
1757
|
+
function jo(e) {
|
|
1758
1758
|
return Dt(e) || Ft(e) || kt(e) || Pt(e) || Vt(e);
|
|
1759
1759
|
}
|
|
1760
1760
|
var Kn = /* @__PURE__ */ ((e) => (e.Java = "java", e.Kotlin = "kotlin", e.CSharp = "csharp", e.Go = "go", e))(Kn || {});
|
|
@@ -1799,20 +1799,20 @@ class S {
|
|
|
1799
1799
|
this.parentDir = n;
|
|
1800
1800
|
}
|
|
1801
1801
|
}
|
|
1802
|
-
var
|
|
1802
|
+
var Ne;
|
|
1803
1803
|
((e) => {
|
|
1804
1804
|
((n) => {
|
|
1805
1805
|
n.Lombok = "Lombok", n.LombokBuilder = "LombokBuilder", n.RecordValueObject = "RecordValueObject", n.CommandHandler = "CommandHandler", n.Jpa = "Jpa", n.Timezone = "Timezone", n.SpringFramework = "SpringFramework";
|
|
1806
1806
|
})(e.JavaGeneratorAddition || (e.JavaGeneratorAddition = {})), ((n) => {
|
|
1807
1807
|
n.TABLE = "TABLE", n.SEQUENCE = "SEQUENCE", n.IDENTITY = "IDENTITY", n.UUID = "UUID", n.AUTO = "AUTO";
|
|
1808
1808
|
})(e.IdGenStrategy || (e.IdGenStrategy = {}));
|
|
1809
|
-
})(
|
|
1810
|
-
var
|
|
1809
|
+
})(Ne || (Ne = {}));
|
|
1810
|
+
var we;
|
|
1811
1811
|
((e) => {
|
|
1812
1812
|
((n) => {
|
|
1813
1813
|
n.ValueClass = "ValueClass", n.CommandHandler = "CommandHandler", n.Timezone = "Timezone";
|
|
1814
1814
|
})(e.KotlinGeneratorAddition || (e.KotlinGeneratorAddition = {}));
|
|
1815
|
-
})(
|
|
1815
|
+
})(we || (we = {}));
|
|
1816
1816
|
var ye;
|
|
1817
1817
|
((e) => {
|
|
1818
1818
|
((n) => {
|
|
@@ -1835,94 +1835,94 @@ const So = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1835
1835
|
get go() {
|
|
1836
1836
|
return We;
|
|
1837
1837
|
},
|
|
1838
|
-
isStruct:
|
|
1838
|
+
isStruct: jo,
|
|
1839
1839
|
get java() {
|
|
1840
|
-
return
|
|
1840
|
+
return Ne;
|
|
1841
1841
|
},
|
|
1842
1842
|
get kotlin() {
|
|
1843
|
-
return
|
|
1843
|
+
return we;
|
|
1844
1844
|
}
|
|
1845
1845
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1846
|
-
var
|
|
1846
|
+
var w;
|
|
1847
1847
|
((e) => {
|
|
1848
|
-
function n(
|
|
1849
|
-
return
|
|
1848
|
+
function n(m) {
|
|
1849
|
+
return m.trim().split(m.includes("_") || m.includes("-") || m.includes(" ") ? /_|\s|-/ : /(?=[A-Z])/g).map((i) => i.charAt(0).toUpperCase() + i.toLowerCase().slice(1)).join("");
|
|
1850
1850
|
}
|
|
1851
1851
|
e.stringToUpperCamel = n;
|
|
1852
|
-
function t(
|
|
1852
|
+
function t(m) {
|
|
1853
1853
|
let i = !0;
|
|
1854
|
-
return
|
|
1854
|
+
return m.trim().split(m.includes("_") || m.includes("-") || m.includes(" ") ? /_|\s|-/ : /(?=[A-Z])/g).map((a) => i ? (i = !1, a.toLowerCase()) : a.charAt(0).toUpperCase() + a.toLowerCase().slice(1)).join("");
|
|
1855
1855
|
}
|
|
1856
1856
|
e.stringToLowerCamel = t;
|
|
1857
|
-
function r(
|
|
1858
|
-
return
|
|
1857
|
+
function r(m) {
|
|
1858
|
+
return m = m.trim(), m.includes("_") ? m.toLowerCase() : m.includes(" ") || m.includes("-") ? m.split(/\s|-/).join("_").toLowerCase() : s(m);
|
|
1859
1859
|
}
|
|
1860
1860
|
e.stringToLowerSnake = r;
|
|
1861
|
-
function o(
|
|
1862
|
-
return
|
|
1861
|
+
function o(m) {
|
|
1862
|
+
return m.trim().split(/(?=[A-Z])/g).join("_").toUpperCase();
|
|
1863
1863
|
}
|
|
1864
1864
|
e.camelToUpperSnake = o;
|
|
1865
|
-
function s(
|
|
1866
|
-
return
|
|
1865
|
+
function s(m) {
|
|
1866
|
+
return m.trim().split(/(?=[A-Z])/g).join("_").toLowerCase();
|
|
1867
1867
|
}
|
|
1868
1868
|
e.camelToLowerSnake = s;
|
|
1869
|
-
function p(
|
|
1870
|
-
return
|
|
1869
|
+
function p(m) {
|
|
1870
|
+
return m.trim().split("_").map((i) => i.charAt(0).toUpperCase() + i.slice(1)).join("");
|
|
1871
1871
|
}
|
|
1872
1872
|
e.snakeToUpperCamel = p;
|
|
1873
|
-
function _(
|
|
1874
|
-
return
|
|
1873
|
+
function _(m) {
|
|
1874
|
+
return m.trim().charAt(0).toLowerCase() + m.slice(1);
|
|
1875
1875
|
}
|
|
1876
1876
|
e.lowerFirst = _;
|
|
1877
|
-
function C(
|
|
1878
|
-
return
|
|
1877
|
+
function C(m) {
|
|
1878
|
+
return m.trim().charAt(0).toUpperCase() + m.slice(1);
|
|
1879
1879
|
}
|
|
1880
1880
|
e.upperFirst = C;
|
|
1881
|
-
})(
|
|
1882
|
-
const
|
|
1881
|
+
})(w || (w = {}));
|
|
1882
|
+
const E = Ne.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
1883
1883
|
const e = "value", n = "command", t = "event";
|
|
1884
1884
|
function r(o) {
|
|
1885
|
-
return
|
|
1885
|
+
return w.stringToUpperCamel(o._attributes.name);
|
|
1886
1886
|
}
|
|
1887
1887
|
return {
|
|
1888
1888
|
unmount({ api: o }) {
|
|
1889
1889
|
o.commands.clearCaches(), o.commands._setCommandCodeProvider(() => []), o.commands._setFacadeCommandCodeProvider(() => []), o.commands._setAggCodeProvider(() => []), o.commands._setEventCodeProvider(() => []), o.commands._setReadModelCodeProvider(() => []), o.commands._setCodeFileProvider(() => []), o.commands.setContext({});
|
|
1890
1890
|
},
|
|
1891
1891
|
mount({ api: o }) {
|
|
1892
|
-
const s = o.states.context, p = o.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((a) =>
|
|
1892
|
+
const s = o.states.context, p = o.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((a) => w.stringToLowerCamel(a));
|
|
1893
1893
|
function _(a) {
|
|
1894
|
-
return !p.includes(
|
|
1894
|
+
return !p.includes(w.stringToLowerCamel(a._attributes.name));
|
|
1895
1895
|
}
|
|
1896
1896
|
function C(a, l) {
|
|
1897
|
-
return _(l) ?
|
|
1897
|
+
return _(l) ? w.stringToUpperCamel(l._attributes.name) : i(a, l);
|
|
1898
1898
|
}
|
|
1899
|
-
function
|
|
1900
|
-
for (const
|
|
1901
|
-
if (!_(
|
|
1902
|
-
i(a,
|
|
1899
|
+
function m(a, l) {
|
|
1900
|
+
for (const h of l) {
|
|
1901
|
+
if (!_(h)) {
|
|
1902
|
+
i(a, h);
|
|
1903
1903
|
continue;
|
|
1904
1904
|
}
|
|
1905
1905
|
a.add(
|
|
1906
|
-
`${s.value.namespace}.${s.value.moduleName}.${e}.${r(
|
|
1906
|
+
`${s.value.namespace}.${s.value.moduleName}.${e}.${r(h)}`
|
|
1907
1907
|
);
|
|
1908
1908
|
}
|
|
1909
1909
|
}
|
|
1910
1910
|
function i(a, l) {
|
|
1911
|
-
const
|
|
1912
|
-
return /\b(time|timestamp|date|deadline|expire)\b/.test(b) ?
|
|
1911
|
+
const h = s.value.additions, b = w.stringToLowerSnake(l._attributes.name).replace(/_/, " ");
|
|
1912
|
+
return /\b(time|timestamp|date|deadline|expire)\b/.test(b) ? h.has(E.Timezone) ? (a.add("java.time.OffsetDateTime"), "OffsetDateTime") : (a.add("java.time.LocalDateTime"), "LocalDateTime") : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(b) ? "Integer" : /\b(price)$/.test(b) ? (a.add("java.math.BigDecimal"), "BigDecimal") : /^(if|is)\b/.test(b) ? "Boolean" : je(l) && (l._attributes.type === "Id" || l._attributes.type === "Version" || /\b(id|identifier|ver|version)$/.test(b)) ? "Long" : "String";
|
|
1913
1913
|
}
|
|
1914
1914
|
o.commands._setInfoCodeProvider(
|
|
1915
1915
|
(a) => {
|
|
1916
1916
|
const l = /* @__PURE__ */ new Set();
|
|
1917
1917
|
l.add(s.value.nonNullAnnotation);
|
|
1918
|
-
const
|
|
1919
|
-
return g.has(
|
|
1918
|
+
const h = s.value.nonNullAnnotation.split(".").pop(), b = r(a), g = s.value.additions, u = [];
|
|
1919
|
+
return g.has(E.RecordValueObject) ? (g.has(E.Jpa) && (l.add(
|
|
1920
1920
|
s.value.jdkVersion === "8" ? "javax.persistence.Embeddable" : "jakarta.persistence.Embeddable"
|
|
1921
|
-
), u.push("@Embeddable")), u.push(`public record ${b}(@${
|
|
1921
|
+
), u.push("@Embeddable")), u.push(`public record ${b}(@${h} ${i(l, a)} value) {`), u.push(` public ${b} {`), u.push(" // HACK check value"), u.push(" }"), u.push("}")) : g.has(E.Lombok) ? (u.push("@lombok.Getter"), g.has(E.Jpa) && (l.add(
|
|
1922
1922
|
s.value.jdkVersion === "8" ? "javax.persistence.Embeddable" : "jakarta.persistence.Embeddable"
|
|
1923
|
-
), u.push("@Embeddable")), u.push(`public class ${b} {`), u.push(` private final ${i(l, a)} value;`), u.push(""), u.push(` public ${b} (@${
|
|
1923
|
+
), u.push("@Embeddable")), u.push(`public class ${b} {`), u.push(` private final ${i(l, a)} value;`), u.push(""), u.push(` public ${b} (@${h} ${i(l, a)} value) {`), u.push(" // HACK check value"), u.push(" this.value = value;"), u.push(" }"), u.push("}")) : (g.has(E.Jpa) && (l.add(
|
|
1924
1924
|
s.value.jdkVersion === "8" ? "javax.persistence.Embeddable" : "jakarta.persistence.Embeddable"
|
|
1925
|
-
), u.push("@Embeddable")), u.push(`public class ${r(a)} {`), u.push(` private final ${i(l, a)} value;`), u.push(""), u.push(` public ${b} (@${
|
|
1925
|
+
), u.push("@Embeddable")), u.push(`public class ${r(a)} {`), u.push(` private final ${i(l, a)} value;`), u.push(""), u.push(` public ${b} (@${h} ${i(l, a)} value) {`), u.push(" // HACK check value"), u.push(" this.value = value;"), u.push(" }"), u.push(""), u.push(` public ${i(l, a)} getValue() {`), u.push(" return this.value;"), u.push(" }"), u.push("}")), [
|
|
1926
1926
|
{
|
|
1927
1927
|
type: "Info",
|
|
1928
1928
|
imports: l,
|
|
@@ -1933,277 +1933,281 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
|
1933
1933
|
}
|
|
1934
1934
|
), o.commands._setCommandCodeProvider(
|
|
1935
1935
|
(a) => {
|
|
1936
|
-
const l = [],
|
|
1936
|
+
const l = [], h = s.value.additions, b = s.value.nonNullAnnotation.split(".").pop();
|
|
1937
1937
|
{
|
|
1938
1938
|
const g = /* @__PURE__ */ new Set();
|
|
1939
1939
|
g.add(s.value.nonNullAnnotation);
|
|
1940
|
-
const u = r(a),
|
|
1941
|
-
if (
|
|
1942
|
-
|
|
1943
|
-
const
|
|
1944
|
-
for (const
|
|
1945
|
-
const c = r(
|
|
1946
|
-
|
|
1940
|
+
const u = r(a), $ = [], v = Object.values(a.inner);
|
|
1941
|
+
if (m(g, v), h.has(E.RecordValueObject)) {
|
|
1942
|
+
h.has(E.LombokBuilder) && $.push("@lombok.Builder(toBuilder = true)"), $.push(`public record ${u}(`);
|
|
1943
|
+
const d = [];
|
|
1944
|
+
for (const N of v) {
|
|
1945
|
+
const c = r(N);
|
|
1946
|
+
d.push(
|
|
1947
1947
|
` @${b}
|
|
1948
1948
|
${C(
|
|
1949
1949
|
g,
|
|
1950
|
-
|
|
1951
|
-
)} ${
|
|
1950
|
+
N
|
|
1951
|
+
)} ${w.lowerFirst(c)}`
|
|
1952
1952
|
);
|
|
1953
1953
|
}
|
|
1954
|
-
|
|
1955
|
-
`)),
|
|
1956
|
-
} else if (
|
|
1957
|
-
|
|
1958
|
-
for (const
|
|
1959
|
-
const
|
|
1960
|
-
|
|
1961
|
-
` private final ${C(g,
|
|
1954
|
+
$.push(d.join(`,
|
|
1955
|
+
`)), $.push(") {"), $.push(` public ${u} {`), $.push(" // HACK check value"), $.push(" }"), $.push("}");
|
|
1956
|
+
} else if (h.has(E.Lombok)) {
|
|
1957
|
+
$.push("@lombok.AllArgsConstructor"), $.push("@lombok.Getter"), h.has(E.LombokBuilder) && $.push("@lombok.Builder(toBuilder = true)"), $.push(`public class ${u} {`);
|
|
1958
|
+
for (const d of v) {
|
|
1959
|
+
const N = r(d);
|
|
1960
|
+
$.push(` @${b}`), $.push(
|
|
1961
|
+
` private final ${C(g, d)} ${w.lowerFirst(N)};`
|
|
1962
1962
|
);
|
|
1963
1963
|
}
|
|
1964
|
-
|
|
1964
|
+
$.push("}");
|
|
1965
1965
|
} else {
|
|
1966
|
-
|
|
1967
|
-
for (const c of
|
|
1968
|
-
const
|
|
1969
|
-
|
|
1970
|
-
` private final ${C(g, c)} ${
|
|
1966
|
+
$.push(`public class ${u} {`);
|
|
1967
|
+
for (const c of v) {
|
|
1968
|
+
const f = r(c);
|
|
1969
|
+
$.push(` @${b}`), $.push(
|
|
1970
|
+
` private final ${C(g, c)} ${w.lowerFirst(f)};`
|
|
1971
1971
|
);
|
|
1972
1972
|
}
|
|
1973
|
-
|
|
1974
|
-
const
|
|
1975
|
-
for (const c of
|
|
1976
|
-
const
|
|
1977
|
-
|
|
1978
|
-
`@${b} ${i(g, c)} ${
|
|
1979
|
-
),
|
|
1973
|
+
$.push("");
|
|
1974
|
+
const d = [], N = [];
|
|
1975
|
+
for (const c of v) {
|
|
1976
|
+
const f = r(c);
|
|
1977
|
+
d.push(
|
|
1978
|
+
`@${b} ${i(g, c)} ${w.lowerFirst(f)}`
|
|
1979
|
+
), N.push(`this.${w.lowerFirst(f)} = ${w.lowerFirst(f)};`);
|
|
1980
1980
|
}
|
|
1981
|
-
|
|
1982
|
-
`)}`),
|
|
1983
|
-
for (const c of
|
|
1984
|
-
const
|
|
1985
|
-
|
|
1981
|
+
$.push(` public ${u}(${d.join(", ")}) {`), $.push(` ${N.join(`
|
|
1982
|
+
`)}`), $.push(" }");
|
|
1983
|
+
for (const c of v) {
|
|
1984
|
+
const f = r(c);
|
|
1985
|
+
$.push(""), $.push(` public ${C(g, c)} get${f} () {`), $.push(` return this.${w.lowerFirst(f)};`), $.push(" }");
|
|
1986
1986
|
}
|
|
1987
|
-
|
|
1987
|
+
$.push("}");
|
|
1988
1988
|
}
|
|
1989
1989
|
l.push({
|
|
1990
1990
|
type: "Command",
|
|
1991
1991
|
imports: g,
|
|
1992
|
-
content:
|
|
1992
|
+
content: $.join(`
|
|
1993
1993
|
`)
|
|
1994
1994
|
});
|
|
1995
1995
|
}
|
|
1996
|
-
if (!
|
|
1996
|
+
if (!h.has(E.CommandHandler))
|
|
1997
1997
|
return l;
|
|
1998
1998
|
{
|
|
1999
1999
|
const g = /* @__PURE__ */ new Set();
|
|
2000
2000
|
g.add(s.value.nonNullAnnotation);
|
|
2001
|
-
const u = r(a),
|
|
2002
|
-
|
|
2003
|
-
const
|
|
2004
|
-
(
|
|
2001
|
+
const u = r(a), $ = [];
|
|
2002
|
+
h.has(E.SpringFramework) && (g.add("org.springframework.stereotype.Component"), $.push("@Component")), h.has(E.Lombok) && $.push("@lombok.RequiredArgsConstructor"), $.push(`public class ${u}Handler {`);
|
|
2003
|
+
const v = [...o.states.designer.value._getContext().getAssociationMap()[a._attributes.__id]].filter(
|
|
2004
|
+
(d) => d._attributes.rule === "Agg"
|
|
2005
2005
|
);
|
|
2006
|
-
for (const
|
|
2007
|
-
g.add(`${s.value.namespace}.${s.value.moduleName}.${r(
|
|
2008
|
-
|
|
2006
|
+
for (const d of v)
|
|
2007
|
+
g.add(`${s.value.namespace}.${s.value.moduleName}.${r(d)}`), $.push(` public ${r(d)} handle(@${b} ${u} command) {`), $.push(" // HACK Implement"), $.push(" }");
|
|
2008
|
+
$.push("}"), l.push({
|
|
2009
2009
|
type: "CommandHandler",
|
|
2010
2010
|
imports: g,
|
|
2011
|
-
content:
|
|
2011
|
+
content: $.join(`
|
|
2012
2012
|
`)
|
|
2013
2013
|
});
|
|
2014
2014
|
}
|
|
2015
2015
|
return l;
|
|
2016
2016
|
}
|
|
2017
2017
|
), o.commands._setFacadeCommandCodeProvider((a) => {
|
|
2018
|
-
const l = [],
|
|
2018
|
+
const l = [], h = s.value.additions, b = s.value.nonNullAnnotation.split(".").pop();
|
|
2019
2019
|
{
|
|
2020
2020
|
const g = /* @__PURE__ */ new Set();
|
|
2021
2021
|
g.add(s.value.nonNullAnnotation);
|
|
2022
|
-
const u = r(a),
|
|
2023
|
-
if (
|
|
2024
|
-
|
|
2025
|
-
const
|
|
2026
|
-
for (const
|
|
2027
|
-
const c = r(
|
|
2028
|
-
|
|
2022
|
+
const u = r(a), $ = [], v = Object.values(a.inner);
|
|
2023
|
+
if (m(g, v), h.has(E.RecordValueObject)) {
|
|
2024
|
+
h.has(E.LombokBuilder) && $.push("@lombok.Builder(toBuilder = true)"), $.push(`public record ${u}(`);
|
|
2025
|
+
const d = [];
|
|
2026
|
+
for (const N of v) {
|
|
2027
|
+
const c = r(N);
|
|
2028
|
+
d.push(
|
|
2029
2029
|
` @${b}
|
|
2030
2030
|
${C(
|
|
2031
2031
|
g,
|
|
2032
|
-
|
|
2033
|
-
)} ${
|
|
2032
|
+
N
|
|
2033
|
+
)} ${w.lowerFirst(c)}`
|
|
2034
2034
|
);
|
|
2035
2035
|
}
|
|
2036
|
-
|
|
2037
|
-
`)),
|
|
2038
|
-
} else if (
|
|
2039
|
-
|
|
2040
|
-
for (const
|
|
2041
|
-
const
|
|
2042
|
-
|
|
2043
|
-
` private final ${C(g,
|
|
2036
|
+
$.push(d.join(`,
|
|
2037
|
+
`)), $.push(") {"), $.push(` public ${u} {`), $.push(" // HACK check value"), $.push(" }"), $.push("}");
|
|
2038
|
+
} else if (h.has(E.Lombok)) {
|
|
2039
|
+
$.push("@lombok.AllArgsConstructor"), $.push("@lombok.Getter"), h.has(E.LombokBuilder) && $.push("@lombok.Builder(toBuilder = true)"), $.push(`public class ${u} {`);
|
|
2040
|
+
for (const d of v) {
|
|
2041
|
+
const N = r(d);
|
|
2042
|
+
$.push(` @${b}`), $.push(
|
|
2043
|
+
` private final ${C(g, d)} ${w.lowerFirst(N)};`
|
|
2044
2044
|
);
|
|
2045
2045
|
}
|
|
2046
|
-
|
|
2046
|
+
$.push("}");
|
|
2047
2047
|
} else {
|
|
2048
|
-
|
|
2049
|
-
for (const c of
|
|
2050
|
-
const
|
|
2051
|
-
|
|
2052
|
-
` private final ${C(g, c)} ${
|
|
2048
|
+
$.push(`public class ${u} {`);
|
|
2049
|
+
for (const c of v) {
|
|
2050
|
+
const f = r(c);
|
|
2051
|
+
$.push(` @${b}`), $.push(
|
|
2052
|
+
` private final ${C(g, c)} ${w.lowerFirst(f)};`
|
|
2053
2053
|
);
|
|
2054
2054
|
}
|
|
2055
|
-
|
|
2056
|
-
const
|
|
2057
|
-
for (const c of
|
|
2058
|
-
const
|
|
2059
|
-
|
|
2060
|
-
`@${b} ${i(g, c)} ${
|
|
2061
|
-
),
|
|
2055
|
+
$.push("");
|
|
2056
|
+
const d = [], N = [];
|
|
2057
|
+
for (const c of v) {
|
|
2058
|
+
const f = r(c);
|
|
2059
|
+
d.push(
|
|
2060
|
+
`@${b} ${i(g, c)} ${w.lowerFirst(f)}`
|
|
2061
|
+
), N.push(`this.${w.lowerFirst(f)} = ${w.lowerFirst(f)};`);
|
|
2062
2062
|
}
|
|
2063
|
-
|
|
2064
|
-
`)}`),
|
|
2065
|
-
for (const c of
|
|
2066
|
-
const
|
|
2067
|
-
|
|
2063
|
+
$.push(` public ${u}(${d.join(", ")}) {`), $.push(` ${N.join(`
|
|
2064
|
+
`)}`), $.push(" }");
|
|
2065
|
+
for (const c of v) {
|
|
2066
|
+
const f = r(c);
|
|
2067
|
+
$.push(""), $.push(` public ${C(g, c)} get${f} () {`), $.push(` return this.${w.lowerFirst(f)};`), $.push(" }");
|
|
2068
2068
|
}
|
|
2069
|
-
|
|
2069
|
+
$.push("}");
|
|
2070
2070
|
}
|
|
2071
2071
|
l.push({
|
|
2072
2072
|
type: "FacadeCommand",
|
|
2073
2073
|
imports: g,
|
|
2074
|
-
content:
|
|
2074
|
+
content: $.join(`
|
|
2075
2075
|
`)
|
|
2076
2076
|
});
|
|
2077
2077
|
}
|
|
2078
|
-
if (!
|
|
2078
|
+
if (!h.has(E.CommandHandler))
|
|
2079
2079
|
return l;
|
|
2080
2080
|
{
|
|
2081
2081
|
const g = /* @__PURE__ */ new Set();
|
|
2082
2082
|
g.add(s.value.nonNullAnnotation);
|
|
2083
|
-
const u = r(a),
|
|
2084
|
-
|
|
2085
|
-
const
|
|
2086
|
-
(
|
|
2083
|
+
const u = r(a), $ = [];
|
|
2084
|
+
h.has(E.SpringFramework) && (g.add("org.springframework.stereotype.Component"), $.push("@Component")), h.has(E.Lombok) && $.push("@lombok.RequiredArgsConstructor"), $.push(`public class ${u}Handler {`);
|
|
2085
|
+
const v = [...o.states.designer.value._getContext().getAssociationMap()[a._attributes.__id]].filter(
|
|
2086
|
+
(d) => d._attributes.rule === "Agg"
|
|
2087
2087
|
);
|
|
2088
|
-
for (const
|
|
2089
|
-
g.add(`${s.value.namespace}.${s.value.moduleName}.${r(
|
|
2090
|
-
|
|
2088
|
+
for (const d of v)
|
|
2089
|
+
g.add(`${s.value.namespace}.${s.value.moduleName}.${r(d)}`), $.push(` public ${r(d)} handle(@${b} ${u} command) {`), $.push(" // HACK Implement"), $.push(" }");
|
|
2090
|
+
$.push("}"), l.push({
|
|
2091
2091
|
type: "FacadeCommandHandler",
|
|
2092
2092
|
imports: g,
|
|
2093
|
-
content:
|
|
2093
|
+
content: $.join(`
|
|
2094
2094
|
`)
|
|
2095
2095
|
});
|
|
2096
2096
|
}
|
|
2097
2097
|
return l;
|
|
2098
2098
|
}), o.commands._setAggCodeProvider(
|
|
2099
2099
|
(a) => {
|
|
2100
|
-
const l = s.value.additions,
|
|
2100
|
+
const l = s.value.additions, h = o.states.designer.value, b = s.value.nonNullAnnotation.split(".").pop(), g = r(a), u = [], $ = Object.values(a.inner);
|
|
2101
2101
|
{
|
|
2102
2102
|
const v = /* @__PURE__ */ new Set();
|
|
2103
2103
|
v.add(s.value.nonNullAnnotation);
|
|
2104
|
-
const
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2104
|
+
const d = [];
|
|
2105
|
+
d.push(`public interface ${g} {`);
|
|
2106
|
+
for (const c of $) {
|
|
2107
|
+
const f = r(c);
|
|
2108
|
+
v.add(`${s.value.namespace}.${s.value.moduleName}.${e}.${f}`), d.push(` public ${f} get${f}();`), d.push("");
|
|
2108
2109
|
}
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2110
|
+
const N = [...h._getContext().getAssociationMap()[a._attributes.__id]].filter((c) => c._attributes.rule === "Command" || c._attributes.rule === "FacadeCommand");
|
|
2111
|
+
for (const c of N) {
|
|
2112
|
+
const f = r(c);
|
|
2113
|
+
v.add(`${s.value.namespace}.${s.value.moduleName}.${n}.${f}`), d.push(` public void handle${f}(@${b} ${f} command);`), d.push("");
|
|
2114
|
+
}
|
|
2115
|
+
d.push("}"), u.push({
|
|
2112
2116
|
type: "Agg",
|
|
2113
2117
|
imports: v,
|
|
2114
|
-
content:
|
|
2118
|
+
content: d.join(`
|
|
2115
2119
|
`)
|
|
2116
2120
|
});
|
|
2117
2121
|
}
|
|
2118
2122
|
{
|
|
2119
2123
|
const v = /* @__PURE__ */ new Set();
|
|
2120
2124
|
v.add(s.value.nonNullAnnotation);
|
|
2121
|
-
const
|
|
2122
|
-
if (
|
|
2123
|
-
|
|
2124
|
-
l.has(
|
|
2125
|
-
),
|
|
2125
|
+
const d = [];
|
|
2126
|
+
if (m(v, $), l.has(E.Lombok)) {
|
|
2127
|
+
d.push(
|
|
2128
|
+
l.has(E.Jpa) ? "@lombok.NoArgsConstructor" : "@lombok.AllArgsConstructor"
|
|
2129
|
+
), d.push("@lombok.Getter"), l.has(E.Jpa) && (v.add(
|
|
2126
2130
|
s.value.jdkVersion === "8" ? "javax.persistence.Entity" : "jakarta.persistence.Entity"
|
|
2127
|
-
),
|
|
2131
|
+
), d.push("@Entity"), v.add(s.value.jdkVersion === "8" ? "javax.persistence.Table" : "jakarta.persistence.Table"), d.push(`@Table(name = "${w.camelToLowerSnake(g)}")`)), d.push(`public class ${g}Impl implements ${g} {`);
|
|
2128
2132
|
for (const c of $) {
|
|
2129
|
-
const
|
|
2130
|
-
|
|
2131
|
-
s.value.jdkVersion === "8" ? "javax.persistence.
|
|
2132
|
-
), v.add(
|
|
2133
|
-
s.value.jdkVersion === "8" ? "javax.persistence.
|
|
2134
|
-
),
|
|
2133
|
+
const f = r(c);
|
|
2134
|
+
d.push(` @${b}`), l.has(E.Jpa) && (c._attributes.type === "Id" ? (v.add(
|
|
2135
|
+
s.value.jdkVersion === "8" ? "javax.persistence.EmbeddedId" : "jakarta.persistence.EmbeddedId"
|
|
2136
|
+
), d.push(" @EmbeddedId")) : (v.add(
|
|
2137
|
+
s.value.jdkVersion === "8" ? "javax.persistence.Embedded" : "jakarta.persistence.Embedded"
|
|
2138
|
+
), d.push(" @Embedded")), v.add(
|
|
2135
2139
|
s.value.jdkVersion === "8" ? "javax.persistence.AttributeOverride" : "jakarta.persistence.AttributeOverride"
|
|
2136
2140
|
), v.add(
|
|
2137
2141
|
s.value.jdkVersion === "8" ? "javax.persistence.Column" : "jakarta.persistence.Column"
|
|
2138
|
-
),
|
|
2139
|
-
` @AttributeOverride(name = "value", column = @Column(name = "${
|
|
2140
|
-
|
|
2141
|
-
)}"))`
|
|
2142
|
-
)),
|
|
2142
|
+
), d.push(
|
|
2143
|
+
` @AttributeOverride(name = "value", column = @Column(name = "${w.camelToLowerSnake(
|
|
2144
|
+
f
|
|
2145
|
+
)}"${c._attributes.type === "Id" ? ", updatable = false" : ""}))`
|
|
2146
|
+
)), d.push(` private ${C(v, c)} ${w.lowerFirst(f)};`);
|
|
2143
2147
|
}
|
|
2144
|
-
const
|
|
2145
|
-
for (const c of
|
|
2146
|
-
const
|
|
2147
|
-
|
|
2148
|
-
` public void handle${
|
|
2149
|
-
|
|
2148
|
+
const N = [...h._getContext().getAssociationMap()[a._attributes.__id]].filter((c) => c._attributes.rule === "Command" || c._attributes.rule === "FacadeCommand");
|
|
2149
|
+
for (const c of N) {
|
|
2150
|
+
const f = r(c);
|
|
2151
|
+
v.add(`${s.value.namespace}.${s.value.moduleName}.${n}.${f}`), d.push(""), d.push(
|
|
2152
|
+
` public void handle${f}(@${b} ${f} ${w.lowerFirst(
|
|
2153
|
+
f
|
|
2150
2154
|
)}) {`
|
|
2151
|
-
),
|
|
2155
|
+
), d.push(" // HACK need implement"), d.push(" }");
|
|
2152
2156
|
}
|
|
2153
|
-
|
|
2157
|
+
d.push("}");
|
|
2154
2158
|
} else {
|
|
2155
|
-
l.has(
|
|
2159
|
+
l.has(E.Jpa) && (v.add(
|
|
2156
2160
|
s.value.jdkVersion === "8" ? "javax.persistence.Entity" : "jakarta.persistence.Entity"
|
|
2157
|
-
),
|
|
2161
|
+
), d.push("@Entity"), v.add(s.value.jdkVersion === "8" ? "javax.persistence.Table" : "jakarta.persistence.Table"), d.push(`@Table(name = "${w.camelToLowerSnake(g)}")`)), d.push(`public class ${g}Impl implements ${g} {`);
|
|
2158
2162
|
for (const y of $) {
|
|
2159
2163
|
const I = r(y);
|
|
2160
|
-
|
|
2161
|
-
s.value.jdkVersion === "8" ? "javax.persistence.
|
|
2162
|
-
), v.add(
|
|
2163
|
-
s.value.jdkVersion === "8" ? "javax.persistence.
|
|
2164
|
-
),
|
|
2164
|
+
d.push(` @${b}`), l.has(E.Jpa) && (y._attributes.type === "Id" ? (v.add(
|
|
2165
|
+
s.value.jdkVersion === "8" ? "javax.persistence.EmbeddedId" : "jakarta.persistence.EmbeddedId"
|
|
2166
|
+
), d.push(" @EmbeddedId")) : (v.add(
|
|
2167
|
+
s.value.jdkVersion === "8" ? "javax.persistence.Embedded" : "jakarta.persistence.Embedded"
|
|
2168
|
+
), d.push(" @Embedded")), v.add(
|
|
2165
2169
|
s.value.jdkVersion === "8" ? "javax.persistence.AttributeOverride" : "jakarta.persistence.AttributeOverride"
|
|
2166
2170
|
), v.add(
|
|
2167
2171
|
s.value.jdkVersion === "8" ? "javax.persistence.Column" : "jakarta.persistence.Column"
|
|
2168
|
-
),
|
|
2169
|
-
` @AttributeOverride(name = "value", column = @Column(name = "${
|
|
2172
|
+
), d.push(
|
|
2173
|
+
` @AttributeOverride(name = "value", column = @Column(name = "${w.camelToLowerSnake(
|
|
2170
2174
|
I
|
|
2171
|
-
)}"))`
|
|
2172
|
-
)),
|
|
2175
|
+
)}"${y._attributes.type === "Id" ? ", updatable = false" : ""}))`
|
|
2176
|
+
)), d.push(` private ${C(v, y)} ${w.lowerFirst(I)};`);
|
|
2173
2177
|
}
|
|
2174
|
-
|
|
2175
|
-
const
|
|
2178
|
+
d.push("");
|
|
2179
|
+
const N = [], c = [];
|
|
2176
2180
|
for (const y of $) {
|
|
2177
|
-
if (l.has(
|
|
2181
|
+
if (l.has(E.Jpa))
|
|
2178
2182
|
break;
|
|
2179
2183
|
const I = r(y);
|
|
2180
|
-
|
|
2181
|
-
`@${b} ${C(v, y)} ${
|
|
2182
|
-
), c.push(`this.${
|
|
2184
|
+
N.push(
|
|
2185
|
+
`@${b} ${C(v, y)} ${w.lowerFirst(I)}`
|
|
2186
|
+
), c.push(`this.${w.lowerFirst(I)} = ${w.lowerFirst(I)};`);
|
|
2183
2187
|
}
|
|
2184
|
-
|
|
2185
|
-
`)}`),
|
|
2188
|
+
d.push(` public ${g}Impl(${N.join(", ")}) {`), d.push(` ${c.join(`
|
|
2189
|
+
`)}`), d.push(" }");
|
|
2186
2190
|
for (const y of $) {
|
|
2187
2191
|
const I = r(y);
|
|
2188
|
-
|
|
2192
|
+
d.push(""), d.push(` @${b}`), d.push(` public ${C(v, y)} get${I}() {`), d.push(` return this.${w.lowerFirst(I)};`), d.push(" }");
|
|
2189
2193
|
}
|
|
2190
|
-
const
|
|
2194
|
+
const f = [...h._getContext().getAssociationMap()[a._attributes.__id]].filter(
|
|
2191
2195
|
(y) => y._attributes.rule === "Command" || y._attributes.rule === "FacadeCommand"
|
|
2192
2196
|
);
|
|
2193
|
-
for (const y of
|
|
2197
|
+
for (const y of f) {
|
|
2194
2198
|
const I = r(y);
|
|
2195
|
-
|
|
2196
|
-
` public void handle${I}(@${b} ${I} ${
|
|
2199
|
+
v.add(`${s.value.namespace}.${s.value.moduleName}.${n}.${I}`), d.push(""), d.push(
|
|
2200
|
+
` public void handle${I}(@${b} ${I} ${w.lowerFirst(
|
|
2197
2201
|
I
|
|
2198
2202
|
)}) {`
|
|
2199
|
-
),
|
|
2203
|
+
), d.push(" // HACK need implement"), d.push(" }");
|
|
2200
2204
|
}
|
|
2201
|
-
|
|
2205
|
+
d.push("}");
|
|
2202
2206
|
}
|
|
2203
2207
|
u.push({
|
|
2204
2208
|
type: "AggImpl",
|
|
2205
2209
|
imports: v,
|
|
2206
|
-
content:
|
|
2210
|
+
content: d.join(`
|
|
2207
2211
|
`)
|
|
2208
2212
|
});
|
|
2209
2213
|
}
|
|
@@ -2213,50 +2217,50 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
|
2213
2217
|
(a) => {
|
|
2214
2218
|
const l = /* @__PURE__ */ new Set();
|
|
2215
2219
|
l.add(s.value.nonNullAnnotation);
|
|
2216
|
-
const
|
|
2217
|
-
if (
|
|
2218
|
-
b.has(
|
|
2219
|
-
const
|
|
2220
|
-
for (const
|
|
2221
|
-
const
|
|
2222
|
-
|
|
2223
|
-
` @${
|
|
2220
|
+
const h = s.value.nonNullAnnotation.split(".").pop(), b = s.value.additions, g = r(a), u = [], $ = Object.values(a.inner);
|
|
2221
|
+
if (m(l, $), b.has(E.RecordValueObject)) {
|
|
2222
|
+
b.has(E.LombokBuilder) && u.push("@lombok.Builder(toBuilder = true)"), u.push(`public record ${g}(`);
|
|
2223
|
+
const v = [];
|
|
2224
|
+
for (const d of $) {
|
|
2225
|
+
const N = r(d);
|
|
2226
|
+
v.push(
|
|
2227
|
+
` @${h}
|
|
2224
2228
|
${C(
|
|
2225
2229
|
l,
|
|
2226
|
-
|
|
2227
|
-
)} ${
|
|
2230
|
+
d
|
|
2231
|
+
)} ${w.lowerFirst(N)}`
|
|
2228
2232
|
);
|
|
2229
2233
|
}
|
|
2230
|
-
u.push(
|
|
2234
|
+
u.push(v.join(`,
|
|
2231
2235
|
`)), u.push(") {"), u.push(` public ${g} {`), u.push(" // HACK check value"), u.push(" }"), u.push("}");
|
|
2232
|
-
} else if (b.has(
|
|
2233
|
-
u.push("@lombok.AllArgsConstructor"), u.push("@lombok.Getter"), b.has(
|
|
2234
|
-
for (const
|
|
2235
|
-
const
|
|
2236
|
-
u.push(` @${
|
|
2237
|
-
` private final ${C(l,
|
|
2236
|
+
} else if (b.has(E.Lombok)) {
|
|
2237
|
+
u.push("@lombok.AllArgsConstructor"), u.push("@lombok.Getter"), b.has(E.LombokBuilder) && u.push("@lombok.Builder(toBuilder = true)"), u.push(`public class ${g} {`);
|
|
2238
|
+
for (const v of $) {
|
|
2239
|
+
const d = r(v);
|
|
2240
|
+
u.push(` @${h}`), u.push(
|
|
2241
|
+
` private final ${C(l, v)} ${w.lowerFirst(d)};`
|
|
2238
2242
|
);
|
|
2239
2243
|
}
|
|
2240
2244
|
u.push("}");
|
|
2241
2245
|
} else {
|
|
2242
2246
|
u.push(`public class ${g} {`);
|
|
2243
|
-
for (const
|
|
2244
|
-
const c = r(
|
|
2245
|
-
u.push(` @${
|
|
2247
|
+
for (const N of $) {
|
|
2248
|
+
const c = r(N);
|
|
2249
|
+
u.push(` @${h}`), u.push(` private final ${c} ${w.lowerFirst(c)};`);
|
|
2246
2250
|
}
|
|
2247
2251
|
u.push("");
|
|
2248
|
-
const
|
|
2249
|
-
for (const
|
|
2250
|
-
const c = r(
|
|
2251
|
-
|
|
2252
|
-
`@${
|
|
2253
|
-
),
|
|
2252
|
+
const v = [], d = [];
|
|
2253
|
+
for (const N of $) {
|
|
2254
|
+
const c = r(N);
|
|
2255
|
+
v.push(
|
|
2256
|
+
`@${h} ${i(l, N)} ${w.lowerFirst(c)}`
|
|
2257
|
+
), d.push(`this.${w.lowerFirst(c)} = ${w.lowerFirst(c)};`);
|
|
2254
2258
|
}
|
|
2255
|
-
u.push(` public ${g}(${
|
|
2259
|
+
u.push(` public ${g}(${v.join(", ")}) {`), u.push(` ${d.join(`
|
|
2256
2260
|
`)}`), u.push(" }");
|
|
2257
|
-
for (const
|
|
2258
|
-
const c = r(
|
|
2259
|
-
u.push(""), u.push(` public ${c} get${c} () {`), u.push(` return this.${
|
|
2261
|
+
for (const N of $) {
|
|
2262
|
+
const c = r(N);
|
|
2263
|
+
u.push(""), u.push(` public ${c} get${c} () {`), u.push(` return this.${w.lowerFirst(c)};`), u.push(" }");
|
|
2260
2264
|
}
|
|
2261
2265
|
u.push("}");
|
|
2262
2266
|
}
|
|
@@ -2271,156 +2275,156 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
|
2271
2275
|
}
|
|
2272
2276
|
), o.commands._setReadModelCodeProvider(() => []), o.commands._setCodeFileProvider(() => {
|
|
2273
2277
|
const a = [], l = {};
|
|
2274
|
-
function
|
|
2275
|
-
for (const
|
|
2276
|
-
if (!_(
|
|
2278
|
+
function h(v) {
|
|
2279
|
+
for (const d of Object.values(v)) {
|
|
2280
|
+
if (!_(d))
|
|
2277
2281
|
continue;
|
|
2278
|
-
const
|
|
2279
|
-
if (l[`${
|
|
2282
|
+
const N = [...s.value.namespace.split(/\./), s.value.moduleName, e], c = r(d) + ".java";
|
|
2283
|
+
if (l[`${N.join("/")}/${c}`] === !0)
|
|
2280
2284
|
continue;
|
|
2281
|
-
const
|
|
2282
|
-
if (
|
|
2285
|
+
const f = o.commands._genInfoCode(d);
|
|
2286
|
+
if (f.length === 0)
|
|
2283
2287
|
continue;
|
|
2284
|
-
const y = new S(
|
|
2288
|
+
const y = new S(N, c);
|
|
2285
2289
|
y.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${e};`), y.appendContentln("");
|
|
2286
|
-
for (const I of
|
|
2290
|
+
for (const I of f[0].imports)
|
|
2287
2291
|
y.appendContentln(`import ${I};`);
|
|
2288
|
-
y.appendContentln(""), y.appendContentln(
|
|
2292
|
+
y.appendContentln(""), y.appendContentln(f[0].content), a.push(y), l[`${N.join("/")}/${c}`] = !0;
|
|
2289
2293
|
}
|
|
2290
2294
|
}
|
|
2291
2295
|
const b = o.states.designer.value._getContext().getCommands();
|
|
2292
|
-
for (const
|
|
2293
|
-
|
|
2294
|
-
const
|
|
2295
|
-
|
|
2296
|
+
for (const v of b) {
|
|
2297
|
+
h(v.inner);
|
|
2298
|
+
const d = o.commands._genCommandCode(v), N = [...s.value.namespace.split(/\./), s.value.moduleName, n];
|
|
2299
|
+
d.forEach((c) => {
|
|
2296
2300
|
if (c.type === "Command") {
|
|
2297
|
-
const
|
|
2298
|
-
|
|
2301
|
+
const f = new S(N, r(v) + ".java");
|
|
2302
|
+
f.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), f.appendContentln(""), f.addImports(c.imports);
|
|
2299
2303
|
for (const y of c.imports)
|
|
2300
|
-
|
|
2301
|
-
|
|
2304
|
+
f.appendContentln(`import ${y};`);
|
|
2305
|
+
f.appendContentln(""), f.appendContentln(c.content), a.push(f);
|
|
2302
2306
|
} else if (c.type === "CommandHandler") {
|
|
2303
|
-
const
|
|
2304
|
-
|
|
2307
|
+
const f = new S(N, r(v) + "Handler.java");
|
|
2308
|
+
f.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), f.appendContentln(""), f.addImports(c.imports);
|
|
2305
2309
|
for (const y of c.imports)
|
|
2306
|
-
|
|
2307
|
-
|
|
2310
|
+
f.appendContentln(`import ${y};`);
|
|
2311
|
+
f.appendContentln(""), f.appendContentln(c.content), a.push(f);
|
|
2308
2312
|
} else
|
|
2309
2313
|
isNever(c.type);
|
|
2310
2314
|
});
|
|
2311
2315
|
}
|
|
2312
2316
|
const g = o.states.designer.value._getContext().getFacadeCommands();
|
|
2313
|
-
for (const
|
|
2314
|
-
|
|
2315
|
-
const
|
|
2316
|
-
|
|
2317
|
+
for (const v of g) {
|
|
2318
|
+
h(v.inner);
|
|
2319
|
+
const d = o.commands._genFacadeCommandCode(v), N = [...s.value.namespace.split(/\./), s.value.moduleName, n];
|
|
2320
|
+
d.forEach((c) => {
|
|
2317
2321
|
if (c.type === "FacadeCommand") {
|
|
2318
|
-
const
|
|
2319
|
-
|
|
2322
|
+
const f = new S(N, r(v) + ".java");
|
|
2323
|
+
f.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), f.appendContentln(""), f.addImports(c.imports);
|
|
2320
2324
|
for (const y of c.imports)
|
|
2321
|
-
|
|
2322
|
-
|
|
2325
|
+
f.appendContentln(`import ${y};`);
|
|
2326
|
+
f.appendContentln(""), f.appendContentln(c.content), a.push(f);
|
|
2323
2327
|
} else if (c.type === "FacadeCommandHandler") {
|
|
2324
|
-
const
|
|
2325
|
-
|
|
2328
|
+
const f = new S(N, r(v) + "Handler.java");
|
|
2329
|
+
f.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), f.appendContentln(""), f.addImports(c.imports);
|
|
2326
2330
|
for (const y of c.imports)
|
|
2327
|
-
|
|
2328
|
-
|
|
2331
|
+
f.appendContentln(`import ${y};`);
|
|
2332
|
+
f.appendContentln(""), f.appendContentln(c.content), a.push(f);
|
|
2329
2333
|
} else
|
|
2330
2334
|
isNever(c.type);
|
|
2331
2335
|
});
|
|
2332
2336
|
}
|
|
2333
2337
|
const u = o.states.designer.value._getContext().getAggs();
|
|
2334
|
-
for (const
|
|
2335
|
-
|
|
2336
|
-
const
|
|
2337
|
-
|
|
2338
|
+
for (const v of u) {
|
|
2339
|
+
h(v.inner);
|
|
2340
|
+
const d = o.commands._genAggCode(v), N = [...s.value.namespace.split(/\./), s.value.moduleName];
|
|
2341
|
+
d.forEach((c) => {
|
|
2338
2342
|
if (c.type === "Agg") {
|
|
2339
|
-
const
|
|
2340
|
-
|
|
2343
|
+
const f = new S(N, r(v) + ".java");
|
|
2344
|
+
f.appendContentln(`package ${s.value.namespace}.${s.value.moduleName};`), f.appendContentln(""), f.addImports(c.imports);
|
|
2341
2345
|
for (const y of c.imports)
|
|
2342
|
-
|
|
2343
|
-
|
|
2346
|
+
f.appendContentln(`import ${y};`);
|
|
2347
|
+
f.appendContentln(""), f.appendContentln(c.content), a.push(f);
|
|
2344
2348
|
} else if (c.type === "AggImpl") {
|
|
2345
|
-
const
|
|
2346
|
-
|
|
2349
|
+
const f = new S(N, r(v) + "Impl.java");
|
|
2350
|
+
f.appendContentln(`package ${s.value.namespace}.${s.value.moduleName};`), f.appendContentln(""), f.addImports(c.imports);
|
|
2347
2351
|
for (const y of c.imports)
|
|
2348
|
-
|
|
2349
|
-
|
|
2352
|
+
f.appendContentln(`import ${y};`);
|
|
2353
|
+
f.appendContentln(""), f.appendContentln(c.content), a.push(f);
|
|
2350
2354
|
} else
|
|
2351
2355
|
isNever(c.type);
|
|
2352
2356
|
});
|
|
2353
2357
|
}
|
|
2354
|
-
const
|
|
2355
|
-
for (const
|
|
2356
|
-
|
|
2357
|
-
const
|
|
2358
|
-
|
|
2359
|
-
const
|
|
2360
|
-
|
|
2358
|
+
const $ = o.states.designer.value._getContext().getEvents();
|
|
2359
|
+
for (const v of $) {
|
|
2360
|
+
h(v.inner);
|
|
2361
|
+
const d = o.commands._genEventCode(v), N = [...s.value.namespace.split(/\./), s.value.moduleName, t];
|
|
2362
|
+
d.forEach((c) => {
|
|
2363
|
+
const f = new S(N, r(v) + ".java");
|
|
2364
|
+
f.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${t};`), f.appendContentln(""), f.addImports(c.imports);
|
|
2361
2365
|
for (const y of c.imports)
|
|
2362
|
-
|
|
2363
|
-
|
|
2366
|
+
f.appendContentln(`import ${y};`);
|
|
2367
|
+
f.appendContentln(""), f.appendContentln(c.content), a.push(f);
|
|
2364
2368
|
});
|
|
2365
2369
|
}
|
|
2366
2370
|
return a;
|
|
2367
2371
|
});
|
|
2368
2372
|
}
|
|
2369
2373
|
};
|
|
2370
|
-
}), Fe =
|
|
2374
|
+
}), Fe = we.KotlinGeneratorAddition, Oo = le.createHotSwapPlugin(() => ({
|
|
2371
2375
|
unmount({ api: e }) {
|
|
2372
2376
|
e.commands.clearCaches(), e.commands._setCommandCodeProvider(() => []), e.commands._setFacadeCommandCodeProvider(() => []), e.commands._setAggCodeProvider(() => []), e.commands._setEventCodeProvider(() => []), e.commands._setReadModelCodeProvider(() => []), e.commands._setCodeFileProvider(() => []), e.commands.setContext({});
|
|
2373
2377
|
},
|
|
2374
2378
|
mount({ api: e }) {
|
|
2375
|
-
const n = "value", t = e.states.context, r = e.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((
|
|
2376
|
-
function o(
|
|
2377
|
-
return !r.includes(
|
|
2379
|
+
const n = "value", t = e.states.context, r = e.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((m) => w.stringToLowerCamel(m));
|
|
2380
|
+
function o(m) {
|
|
2381
|
+
return !r.includes(w.stringToLowerCamel(m._attributes.name));
|
|
2378
2382
|
}
|
|
2379
|
-
function s(
|
|
2380
|
-
return o(i) ?
|
|
2383
|
+
function s(m, i) {
|
|
2384
|
+
return o(i) ? w.stringToUpperCamel(i._attributes.name) : C(m, i);
|
|
2381
2385
|
}
|
|
2382
|
-
function p(
|
|
2383
|
-
return
|
|
2386
|
+
function p(m) {
|
|
2387
|
+
return w.stringToUpperCamel(m._attributes.name);
|
|
2384
2388
|
}
|
|
2385
|
-
function _(
|
|
2389
|
+
function _(m, i) {
|
|
2386
2390
|
for (const a of i) {
|
|
2387
2391
|
if (!o(a)) {
|
|
2388
|
-
C(
|
|
2392
|
+
C(m, a);
|
|
2389
2393
|
continue;
|
|
2390
2394
|
}
|
|
2391
|
-
|
|
2395
|
+
m.add(
|
|
2392
2396
|
`${t.value.namespace}.${t.value.moduleName}.${n}.${p(a)}`
|
|
2393
2397
|
);
|
|
2394
2398
|
}
|
|
2395
2399
|
}
|
|
2396
|
-
function C(
|
|
2397
|
-
const a = t.value.additions, l =
|
|
2398
|
-
return /\b(time|timestamp|date|deadline|expire)\b/.test(l) ? a.has(Fe.Timezone) ? (
|
|
2400
|
+
function C(m, i) {
|
|
2401
|
+
const a = t.value.additions, l = w.stringToLowerSnake(i._attributes.name).replace(/_/, " ");
|
|
2402
|
+
return /\b(time|timestamp|date|deadline|expire)\b/.test(l) ? a.has(Fe.Timezone) ? (m.add("java.time.OffsetDateTime"), "OffsetDateTime") : (m.add("java.time.LocalDateTime"), "LocalDateTime") : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(l) ? "Integer" : /\b(price)$/.test(l) ? (m.add("java.math.BigDecimal"), "BigDecimal") : /^(if|is)\b/.test(l) ? "Boolean" : je(i) && (i._attributes.type === "Id" || i._attributes.type === "Version") || /\b(id|identifier|ver|version)$/.test(l) ? "Long" : "String";
|
|
2399
2403
|
}
|
|
2400
2404
|
e.commands._setInfoCodeProvider(
|
|
2401
|
-
(
|
|
2402
|
-
const i = /* @__PURE__ */ new Set(), a = p(
|
|
2403
|
-
return l.has(Fe.ValueClass) ? (i.add("kotlin.jvm.JvmInline"),
|
|
2405
|
+
(m) => {
|
|
2406
|
+
const i = /* @__PURE__ */ new Set(), a = p(m), l = t.value.additions, h = [];
|
|
2407
|
+
return l.has(Fe.ValueClass) ? (i.add("kotlin.jvm.JvmInline"), h.push("@JvmInline"), h.push(`value class ${a}(val value: ${C(i, m)})`)) : h.push(`data class ${a}(val value: ${C(i, m)})`), [
|
|
2404
2408
|
{
|
|
2405
2409
|
type: "Info",
|
|
2406
2410
|
imports: i,
|
|
2407
|
-
content:
|
|
2411
|
+
content: h.join(`
|
|
2408
2412
|
`)
|
|
2409
2413
|
}
|
|
2410
2414
|
];
|
|
2411
2415
|
}
|
|
2412
2416
|
), e.commands._setCommandCodeProvider(
|
|
2413
|
-
(
|
|
2417
|
+
(m) => {
|
|
2414
2418
|
const i = [], a = t.value.additions;
|
|
2415
2419
|
{
|
|
2416
|
-
const l = /* @__PURE__ */ new Set(),
|
|
2420
|
+
const l = /* @__PURE__ */ new Set(), h = p(m), b = [], g = Object.values(m.inner);
|
|
2417
2421
|
_(l, g);
|
|
2418
2422
|
const u = [];
|
|
2419
|
-
for (const
|
|
2420
|
-
const
|
|
2421
|
-
u.push(`val ${
|
|
2423
|
+
for (const $ of g) {
|
|
2424
|
+
const v = p($);
|
|
2425
|
+
u.push(`val ${w.lowerFirst(v)}: ${s(l, $)}`);
|
|
2422
2426
|
}
|
|
2423
|
-
b.push(`data class ${
|
|
2427
|
+
b.push(`data class ${h}(${u.join(", ")})`), i.push({
|
|
2424
2428
|
type: "Command",
|
|
2425
2429
|
imports: l,
|
|
2426
2430
|
content: b.join(`
|
|
@@ -2430,13 +2434,13 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
|
2430
2434
|
if (!a.has(Fe.CommandHandler))
|
|
2431
2435
|
return i;
|
|
2432
2436
|
{
|
|
2433
|
-
const l = /* @__PURE__ */ new Set(),
|
|
2434
|
-
b.push(`class ${
|
|
2435
|
-
const g = [...e.states.designer.value._getContext().getAssociationMap()[
|
|
2437
|
+
const l = /* @__PURE__ */ new Set(), h = p(m), b = [];
|
|
2438
|
+
b.push(`class ${h}Handler {`);
|
|
2439
|
+
const g = [...e.states.designer.value._getContext().getAssociationMap()[m._attributes.__id]].filter(
|
|
2436
2440
|
(u) => u._attributes.rule === "Agg"
|
|
2437
2441
|
);
|
|
2438
2442
|
for (const u of g)
|
|
2439
|
-
l.add(`${t.value.namespace}.${t.value.moduleName}.${p(u)}`), b.push(` fun handle(command: ${
|
|
2443
|
+
l.add(`${t.value.namespace}.${t.value.moduleName}.${p(u)}`), b.push(` fun handle(command: ${h}): ${p(u)} {`), b.push(" // HACK Implement"), b.push(" }");
|
|
2440
2444
|
b.push("}"), i.push({
|
|
2441
2445
|
type: "CommandHandler",
|
|
2442
2446
|
imports: l,
|
|
@@ -2447,13 +2451,13 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
|
2447
2451
|
return i;
|
|
2448
2452
|
}
|
|
2449
2453
|
), e.commands._setFacadeCommandCodeProvider(
|
|
2450
|
-
(
|
|
2451
|
-
const i = /* @__PURE__ */ new Set(), a = p(
|
|
2452
|
-
_(i,
|
|
2454
|
+
(m) => {
|
|
2455
|
+
const i = /* @__PURE__ */ new Set(), a = p(m), l = [], h = Object.values(m.inner);
|
|
2456
|
+
_(i, h);
|
|
2453
2457
|
const b = [];
|
|
2454
|
-
for (const g of
|
|
2458
|
+
for (const g of h) {
|
|
2455
2459
|
const u = p(g);
|
|
2456
|
-
b.push(`val ${
|
|
2460
|
+
b.push(`val ${w.lowerFirst(u)}: ${s(i, g)}`);
|
|
2457
2461
|
}
|
|
2458
2462
|
return l.push(`data class ${a}(${b.join(", ")})`), [
|
|
2459
2463
|
{
|
|
@@ -2464,43 +2468,43 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
|
2464
2468
|
}
|
|
2465
2469
|
];
|
|
2466
2470
|
}
|
|
2467
|
-
), e.commands._setAggCodeProvider((
|
|
2468
|
-
const i = /* @__PURE__ */ new Set(), a = e.states.designer.value, l = p(
|
|
2471
|
+
), e.commands._setAggCodeProvider((m) => {
|
|
2472
|
+
const i = /* @__PURE__ */ new Set(), a = e.states.designer.value, l = p(m), h = [], b = Object.values(m.inner);
|
|
2469
2473
|
_(i, b);
|
|
2470
|
-
const g = [], u = [...a._getContext().getAssociationMap()[
|
|
2471
|
-
for (const
|
|
2472
|
-
const
|
|
2473
|
-
g.push(`fun handle(command: ${
|
|
2474
|
+
const g = [], u = [...a._getContext().getAssociationMap()[m._attributes.__id]].filter((v) => v._attributes.rule === "Command" || v._attributes.rule === "FacadeCommand");
|
|
2475
|
+
for (const v of u) {
|
|
2476
|
+
const d = p(v);
|
|
2477
|
+
g.push(`fun handle(command: ${d})`);
|
|
2474
2478
|
}
|
|
2475
|
-
|
|
2476
|
-
`)}`),
|
|
2477
|
-
const
|
|
2478
|
-
for (const
|
|
2479
|
-
const
|
|
2480
|
-
|
|
2479
|
+
h.push(`interface ${l} {`), h.push(` ${g.join(`
|
|
2480
|
+
`)}`), h.push("}"), h.push(""), h.push(`class ${l}Impl(`);
|
|
2481
|
+
const $ = [];
|
|
2482
|
+
for (const v of b) {
|
|
2483
|
+
const d = p(v);
|
|
2484
|
+
$.push(`val ${w.lowerFirst(d)}: ${s(i, v)}`);
|
|
2481
2485
|
}
|
|
2482
|
-
|
|
2483
|
-
`)}`),
|
|
2484
|
-
for (const
|
|
2485
|
-
const
|
|
2486
|
-
|
|
2486
|
+
h.push(` ${$.join(`,
|
|
2487
|
+
`)}`), h.push(`): ${l} {`);
|
|
2488
|
+
for (const v of u) {
|
|
2489
|
+
const d = p(v);
|
|
2490
|
+
h.push(` override fun handle(command: ${d}) {`), h.push(" // HACK Implement"), h.push(" }");
|
|
2487
2491
|
}
|
|
2488
|
-
return
|
|
2492
|
+
return h.push("}"), [
|
|
2489
2493
|
{
|
|
2490
2494
|
type: "Agg",
|
|
2491
2495
|
imports: i,
|
|
2492
|
-
content:
|
|
2496
|
+
content: h.join(`
|
|
2493
2497
|
`)
|
|
2494
2498
|
}
|
|
2495
2499
|
];
|
|
2496
2500
|
}), e.commands._setEventCodeProvider(
|
|
2497
|
-
(
|
|
2498
|
-
const i = /* @__PURE__ */ new Set(), a = p(
|
|
2499
|
-
_(i,
|
|
2501
|
+
(m) => {
|
|
2502
|
+
const i = /* @__PURE__ */ new Set(), a = p(m), l = [], h = Object.values(m.inner);
|
|
2503
|
+
_(i, h);
|
|
2500
2504
|
const b = [];
|
|
2501
|
-
for (const g of
|
|
2505
|
+
for (const g of h) {
|
|
2502
2506
|
const u = p(g);
|
|
2503
|
-
b.push(`val ${
|
|
2507
|
+
b.push(`val ${w.lowerFirst(u)}: ${s(i, g)}`);
|
|
2504
2508
|
}
|
|
2505
2509
|
return l.push(`data class ${a}(${b.join(", ")})`), [
|
|
2506
2510
|
{
|
|
@@ -2512,278 +2516,278 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
|
2512
2516
|
];
|
|
2513
2517
|
}
|
|
2514
2518
|
), e.commands._setReadModelCodeProvider(() => []), e.commands._setCodeFileProvider(() => {
|
|
2515
|
-
const
|
|
2519
|
+
const m = [], i = {};
|
|
2516
2520
|
function a(u) {
|
|
2517
|
-
for (const
|
|
2518
|
-
if (!o(
|
|
2521
|
+
for (const $ of Object.values(u)) {
|
|
2522
|
+
if (!o($))
|
|
2519
2523
|
continue;
|
|
2520
|
-
const
|
|
2521
|
-
if (i[`${
|
|
2524
|
+
const v = [...t.value.namespace.split(/\./), t.value.moduleName, n], d = p($) + ".kt";
|
|
2525
|
+
if (i[`${v.join("/")}/${d}`] === !0)
|
|
2522
2526
|
continue;
|
|
2523
|
-
const
|
|
2524
|
-
if (
|
|
2527
|
+
const N = e.commands._genInfoCode($);
|
|
2528
|
+
if (N.length === 0)
|
|
2525
2529
|
continue;
|
|
2526
|
-
const c = new S(
|
|
2530
|
+
const c = new S(v, d);
|
|
2527
2531
|
c.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}.${n}`), c.appendContentln("");
|
|
2528
|
-
for (const
|
|
2529
|
-
c.appendContentln(`import ${
|
|
2530
|
-
c.appendContentln(""), c.appendContentln(
|
|
2532
|
+
for (const f of N[0].imports)
|
|
2533
|
+
c.appendContentln(`import ${f}`);
|
|
2534
|
+
c.appendContentln(""), c.appendContentln(N[0].content), m.push(c), i[`${v.join("/")}/${d}`] = !0;
|
|
2531
2535
|
}
|
|
2532
2536
|
}
|
|
2533
2537
|
const l = e.states.designer.value._getContext().getCommands();
|
|
2534
2538
|
for (const u of l) {
|
|
2535
2539
|
a(u.inner);
|
|
2536
|
-
const
|
|
2537
|
-
|
|
2538
|
-
c.type === "Command" || c.type === "CommandHandler" ? (
|
|
2540
|
+
const $ = e.commands._genCommandCode(u), v = [...t.value.namespace.split(/\./), t.value.moduleName], d = new S(v, p(u) + ".kt"), N = [];
|
|
2541
|
+
d.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), d.appendContentln(""), $.forEach((c) => {
|
|
2542
|
+
c.type === "Command" || c.type === "CommandHandler" ? (d.addImports(c.imports), N.push(c.content)) : isNever(c.type);
|
|
2539
2543
|
});
|
|
2540
|
-
for (const c of
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
for (const c of
|
|
2544
|
-
|
|
2545
|
-
|
|
2544
|
+
for (const c of d.getImports())
|
|
2545
|
+
d.appendContentln(`import ${c}`);
|
|
2546
|
+
d.appendContentln("");
|
|
2547
|
+
for (const c of N)
|
|
2548
|
+
d.appendContentln(c);
|
|
2549
|
+
m.push(d);
|
|
2546
2550
|
}
|
|
2547
|
-
const
|
|
2548
|
-
for (const u of
|
|
2551
|
+
const h = e.states.designer.value._getContext().getFacadeCommands();
|
|
2552
|
+
for (const u of h) {
|
|
2549
2553
|
a(u.inner);
|
|
2550
|
-
const
|
|
2551
|
-
|
|
2552
|
-
c.type === "FacadeCommand" || c.type === "FacadeCommandHandler" ? (
|
|
2554
|
+
const $ = e.commands._genFacadeCommandCode(u), v = [...t.value.namespace.split(/\./), t.value.moduleName], d = new S(v, p(u) + ".kt"), N = [];
|
|
2555
|
+
d.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), d.appendContentln(""), $.forEach((c) => {
|
|
2556
|
+
c.type === "FacadeCommand" || c.type === "FacadeCommandHandler" ? (d.addImports(c.imports), N.push(c.content)) : isNever(c.type);
|
|
2553
2557
|
});
|
|
2554
|
-
for (const c of
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
for (const c of
|
|
2558
|
-
|
|
2559
|
-
|
|
2558
|
+
for (const c of d.getImports())
|
|
2559
|
+
d.appendContentln(`import ${c}`);
|
|
2560
|
+
d.appendContentln("");
|
|
2561
|
+
for (const c of N)
|
|
2562
|
+
d.appendContentln(c);
|
|
2563
|
+
m.push(d);
|
|
2560
2564
|
}
|
|
2561
2565
|
const b = e.states.designer.value._getContext().getAggs();
|
|
2562
2566
|
for (const u of b) {
|
|
2563
2567
|
a(u.inner);
|
|
2564
|
-
const
|
|
2565
|
-
|
|
2566
|
-
c.type === "Agg" || c.type === "AggImpl" ? (
|
|
2568
|
+
const $ = e.commands._genAggCode(u), v = [...t.value.namespace.split(/\./), t.value.moduleName], d = new S(v, p(u) + ".kt"), N = [];
|
|
2569
|
+
d.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), d.appendContentln(""), $.forEach((c) => {
|
|
2570
|
+
c.type === "Agg" || c.type === "AggImpl" ? (d.addImports(c.imports), N.push(c.content)) : isNever(c.type);
|
|
2567
2571
|
});
|
|
2568
|
-
for (const c of
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
for (const c of
|
|
2572
|
-
|
|
2573
|
-
|
|
2572
|
+
for (const c of d.getImports())
|
|
2573
|
+
d.appendContentln(`import ${c}`);
|
|
2574
|
+
d.appendContentln("");
|
|
2575
|
+
for (const c of N)
|
|
2576
|
+
d.appendContentln(c);
|
|
2577
|
+
m.push(d);
|
|
2574
2578
|
}
|
|
2575
2579
|
const g = e.states.designer.value._getContext().getEvents();
|
|
2576
2580
|
for (const u of g) {
|
|
2577
2581
|
a(u.inner);
|
|
2578
|
-
const
|
|
2579
|
-
|
|
2580
|
-
if (
|
|
2581
|
-
const
|
|
2582
|
-
|
|
2583
|
-
for (const c of
|
|
2584
|
-
|
|
2585
|
-
|
|
2582
|
+
const $ = e.commands._genEventCode(u), v = [...t.value.namespace.split(/\./), t.value.moduleName];
|
|
2583
|
+
$.forEach((d) => {
|
|
2584
|
+
if (d.type === "Event") {
|
|
2585
|
+
const N = new S(v, p(u) + ".kt");
|
|
2586
|
+
N.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), N.appendContentln(""), N.addImports(d.imports);
|
|
2587
|
+
for (const c of d.imports)
|
|
2588
|
+
N.appendContentln(`import ${c}`);
|
|
2589
|
+
N.appendContentln(""), N.appendContentln(d.content), m.push(N);
|
|
2586
2590
|
} else
|
|
2587
|
-
isNever(
|
|
2591
|
+
isNever(d.type);
|
|
2588
2592
|
});
|
|
2589
2593
|
}
|
|
2590
|
-
return
|
|
2594
|
+
return m;
|
|
2591
2595
|
});
|
|
2592
2596
|
}
|
|
2593
|
-
})),
|
|
2597
|
+
})), xo = le.createHotSwapPlugin(() => ({
|
|
2594
2598
|
unmount({ api: e }) {
|
|
2595
2599
|
e.commands.clearCaches(), e.commands._setCommandCodeProvider(() => []), e.commands._setFacadeCommandCodeProvider(() => []), e.commands._setAggCodeProvider(() => []), e.commands._setEventCodeProvider(() => []), e.commands._setReadModelCodeProvider(() => []), e.commands._setCodeFileProvider(() => []), e.commands.setContext({});
|
|
2596
2600
|
},
|
|
2597
2601
|
mount({ api: e }) {
|
|
2598
|
-
const n = e.states.context, t = e.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((C) =>
|
|
2602
|
+
const n = e.states.context, t = e.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((C) => w.stringToLowerCamel(C));
|
|
2599
2603
|
function r(C) {
|
|
2600
|
-
return !t.includes(
|
|
2604
|
+
return !t.includes(w.stringToLowerCamel(C._attributes.name));
|
|
2601
2605
|
}
|
|
2602
|
-
function o(C,
|
|
2603
|
-
return r(
|
|
2606
|
+
function o(C, m) {
|
|
2607
|
+
return r(m) ? w.stringToUpperCamel(m._attributes.name) : _(C, m);
|
|
2604
2608
|
}
|
|
2605
2609
|
function s(C) {
|
|
2606
|
-
return
|
|
2610
|
+
return w.stringToUpperCamel(C._attributes.name);
|
|
2607
2611
|
}
|
|
2608
2612
|
function p(C) {
|
|
2609
|
-
return
|
|
2613
|
+
return w.stringToLowerCamel(C._attributes.name);
|
|
2610
2614
|
}
|
|
2611
|
-
function _(C,
|
|
2612
|
-
const i =
|
|
2613
|
-
return /\b(time|timestamp|date|deadline|expire)\b/.test(i) ? (C.add("time"), "time.Time") : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(i) ? "int" : /\b(price)$/.test(i) ? "string" : /^(if|is)\b/.test(i) ? "bool" :
|
|
2615
|
+
function _(C, m) {
|
|
2616
|
+
const i = w.stringToLowerSnake(m._attributes.name).replace(/_/, " ");
|
|
2617
|
+
return /\b(time|timestamp|date|deadline|expire)\b/.test(i) ? (C.add("time"), "time.Time") : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(i) ? "int" : /\b(price)$/.test(i) ? "string" : /^(if|is)\b/.test(i) ? "bool" : je(m) && (m._attributes.type === "Id" || m._attributes.type === "Version" || /\b(id|identifier|ver|version)$/.test(i)) ? "int64" : "string";
|
|
2614
2618
|
}
|
|
2615
2619
|
e.commands._setInfoCodeProvider(
|
|
2616
2620
|
(C) => {
|
|
2617
|
-
const
|
|
2618
|
-
return i.push(`type ${s(C)} struct {`), i.push(` value ${_(
|
|
2621
|
+
const m = /* @__PURE__ */ new Set(), i = [];
|
|
2622
|
+
return i.push(`type ${s(C)} struct {`), i.push(` value ${_(m, C)}`), i.push("}"), i.push(""), i.push(
|
|
2619
2623
|
`func New${s(C)}(value ${_(
|
|
2620
|
-
|
|
2624
|
+
m,
|
|
2621
2625
|
C
|
|
2622
2626
|
)}) ${s(C)} {`
|
|
2623
2627
|
), i.push(" // HACK check value"), i.push(` return ${s(C)}{value}`), i.push("}"), i.push(
|
|
2624
2628
|
`func (${p(C)} ${s(C)}) GetValue() ${_(
|
|
2625
|
-
|
|
2629
|
+
m,
|
|
2626
2630
|
C
|
|
2627
2631
|
)} {`
|
|
2628
|
-
), i.push(` return ${p(C)}.value`), i.push("}"), [{ type: "Info", imports:
|
|
2632
|
+
), i.push(` return ${p(C)}.value`), i.push("}"), [{ type: "Info", imports: m, content: i.join(`
|
|
2629
2633
|
`) }];
|
|
2630
2634
|
}
|
|
2631
2635
|
), e.commands._setCommandCodeProvider(
|
|
2632
2636
|
(C) => {
|
|
2633
|
-
const
|
|
2634
|
-
l.push(`type ${
|
|
2635
|
-
const
|
|
2636
|
-
for (const u of
|
|
2637
|
+
const m = s(C), i = p(C), a = /* @__PURE__ */ new Set(), l = [];
|
|
2638
|
+
l.push(`type ${m} struct {`);
|
|
2639
|
+
const h = Object.values(C.inner);
|
|
2640
|
+
for (const u of h)
|
|
2637
2641
|
l.push(` ${p(u)} ${o(a, u)}`);
|
|
2638
2642
|
l.push("}");
|
|
2639
|
-
for (const u of
|
|
2643
|
+
for (const u of h)
|
|
2640
2644
|
l.push(
|
|
2641
|
-
`func (${i} ${
|
|
2645
|
+
`func (${i} ${m}) Get${s(u)} () ${o(
|
|
2642
2646
|
a,
|
|
2643
2647
|
u
|
|
2644
2648
|
)} {`
|
|
2645
2649
|
), l.push(` return ${i}.${p(u)}`), l.push("}");
|
|
2646
2650
|
const b = [], g = [];
|
|
2647
|
-
for (const u of
|
|
2651
|
+
for (const u of h)
|
|
2648
2652
|
b.push(`${p(u)} ${o(a, u)}`), g.push(p(u));
|
|
2649
|
-
return l.push(`func New${
|
|
2653
|
+
return l.push(`func New${m}(${b.join(", ")}) ${m} {`), l.push(" // HACK check value"), l.push(` return ${m}{`), l.push(` ${g.join(`,
|
|
2650
2654
|
`)},`), l.push(" }"), l.push("}"), [{ type: "Command", imports: a, content: l.join(`
|
|
2651
2655
|
`) }];
|
|
2652
2656
|
}
|
|
2653
2657
|
), e.commands._setFacadeCommandCodeProvider(
|
|
2654
2658
|
(C) => {
|
|
2655
|
-
const
|
|
2656
|
-
|
|
2659
|
+
const m = s(C), i = p(C), a = Object.values(C.inner), l = /* @__PURE__ */ new Set(), h = [];
|
|
2660
|
+
h.push(`type ${m} struct {`);
|
|
2657
2661
|
for (const u of a)
|
|
2658
|
-
|
|
2659
|
-
|
|
2662
|
+
h.push(` ${p(u)} ${o(l, u)}`);
|
|
2663
|
+
h.push("}");
|
|
2660
2664
|
for (const u of a)
|
|
2661
|
-
|
|
2662
|
-
`func (${i} ${
|
|
2665
|
+
h.push(
|
|
2666
|
+
`func (${i} ${m}) Get${s(u)} () ${o(
|
|
2663
2667
|
l,
|
|
2664
2668
|
u
|
|
2665
2669
|
)} {`
|
|
2666
|
-
),
|
|
2670
|
+
), h.push(` return ${i}.${p(u)}`), h.push("}");
|
|
2667
2671
|
const b = [], g = [];
|
|
2668
2672
|
for (const u of a)
|
|
2669
2673
|
b.push(`${p(u)} ${o(l, u)}`), g.push(p(u));
|
|
2670
|
-
return
|
|
2671
|
-
`)},`),
|
|
2674
|
+
return h.push(`func New${m}(${b.join(", ")}) ${m} {`), h.push(" // HACK check value"), h.push(` return ${m}{`), h.push(` ${g.join(`,
|
|
2675
|
+
`)},`), h.push(" }"), h.push("}"), [
|
|
2672
2676
|
{
|
|
2673
2677
|
type: "FacadeCommand",
|
|
2674
2678
|
imports: l,
|
|
2675
|
-
content:
|
|
2679
|
+
content: h.join(`
|
|
2676
2680
|
`)
|
|
2677
2681
|
}
|
|
2678
2682
|
];
|
|
2679
2683
|
}
|
|
2680
2684
|
), e.commands._setAggCodeProvider((C) => {
|
|
2681
|
-
const
|
|
2685
|
+
const m = e.states.designer.value, i = s(C), a = p(C), l = Object.values(C.inner), h = /* @__PURE__ */ new Set(), b = [];
|
|
2682
2686
|
b.push(`type ${i} struct {`);
|
|
2683
|
-
for (const
|
|
2684
|
-
b.push(` ${p(
|
|
2687
|
+
for (const v of l)
|
|
2688
|
+
b.push(` ${p(v)} ${o(h, v)}`);
|
|
2685
2689
|
b.push("}");
|
|
2686
|
-
for (const
|
|
2690
|
+
for (const v of l)
|
|
2687
2691
|
b.push(
|
|
2688
|
-
`func (${a} ${i}) Get${s(
|
|
2689
|
-
|
|
2690
|
-
|
|
2692
|
+
`func (${a} ${i}) Get${s(v)} () ${o(
|
|
2693
|
+
h,
|
|
2694
|
+
v
|
|
2691
2695
|
)} {`
|
|
2692
|
-
), b.push(` return ${a}.${p(
|
|
2696
|
+
), b.push(` return ${a}.${p(v)}`), b.push("}");
|
|
2693
2697
|
const g = [], u = [];
|
|
2694
|
-
for (const
|
|
2695
|
-
g.push(`${p(
|
|
2698
|
+
for (const v of l)
|
|
2699
|
+
g.push(`${p(v)} ${o(h, v)}`), u.push(p(v));
|
|
2696
2700
|
b.push(`func New${i}(${g.join(", ")}) ${i} {`), b.push(" // HACK check value"), b.push(` return ${i}{`), b.push(` ${u.join(`,
|
|
2697
2701
|
`)},`), b.push(" }"), b.push("}"), b.push("");
|
|
2698
|
-
const
|
|
2699
|
-
for (const
|
|
2700
|
-
const
|
|
2701
|
-
b.push(`func (${a} ${i}) Handle${
|
|
2702
|
+
const $ = [...m._getContext().getAssociationMap()[C._attributes.__id]].filter((v) => v._attributes.rule === "Command" || v._attributes.rule === "FacadeCommand");
|
|
2703
|
+
for (const v of $) {
|
|
2704
|
+
const d = s(v), N = p(v);
|
|
2705
|
+
b.push(`func (${a} ${i}) Handle${d} (${N} ${d}) {`), b.push(" // HACK implement"), b.push("}");
|
|
2702
2706
|
}
|
|
2703
2707
|
return [
|
|
2704
2708
|
{
|
|
2705
2709
|
type: "Agg",
|
|
2706
|
-
imports:
|
|
2710
|
+
imports: h,
|
|
2707
2711
|
content: b.join(`
|
|
2708
2712
|
`)
|
|
2709
2713
|
}
|
|
2710
2714
|
];
|
|
2711
2715
|
}), e.commands._setEventCodeProvider(
|
|
2712
2716
|
(C) => {
|
|
2713
|
-
const
|
|
2714
|
-
|
|
2717
|
+
const m = [], i = /* @__PURE__ */ new Set(), a = Object.values(C.inner), l = s(C), h = p(C);
|
|
2718
|
+
m.push(`type ${l} struct {`);
|
|
2715
2719
|
for (const u of a)
|
|
2716
|
-
|
|
2717
|
-
|
|
2720
|
+
m.push(` ${p(u)} ${o(i, u)}`);
|
|
2721
|
+
m.push("}");
|
|
2718
2722
|
for (const u of a)
|
|
2719
|
-
|
|
2720
|
-
`func (${
|
|
2723
|
+
m.push(
|
|
2724
|
+
`func (${h} ${l}) Get${s(u)} () ${o(
|
|
2721
2725
|
i,
|
|
2722
2726
|
u
|
|
2723
2727
|
)} {`
|
|
2724
|
-
),
|
|
2728
|
+
), m.push(` return ${h}.${p(u)}`), m.push("}");
|
|
2725
2729
|
const b = [], g = [];
|
|
2726
2730
|
for (const u of a)
|
|
2727
2731
|
b.push(`${p(u)} ${o(i, u)}`), g.push(p(u));
|
|
2728
|
-
return
|
|
2729
|
-
`)},`),
|
|
2732
|
+
return m.push(`func New${l}(${b.join(", ")}) ${l} {`), m.push(" // HACK check value"), m.push(` return ${l}{`), m.push(` ${g.join(`,
|
|
2733
|
+
`)},`), m.push(" }"), m.push("}"), [
|
|
2730
2734
|
{
|
|
2731
2735
|
type: "Event",
|
|
2732
2736
|
imports: i,
|
|
2733
|
-
content:
|
|
2737
|
+
content: m.join(`
|
|
2734
2738
|
`)
|
|
2735
2739
|
}
|
|
2736
2740
|
];
|
|
2737
2741
|
}
|
|
2738
2742
|
), e.commands._setCodeFileProvider(() => {
|
|
2739
|
-
const C = [],
|
|
2740
|
-
function g(
|
|
2741
|
-
for (const c of Object.values(
|
|
2743
|
+
const C = [], m = {}, i = [...n.value.namespace.split(/\./), n.value.moduleName], a = new S(i, `${n.value.moduleName}.go`), l = [], h = new S(i, `${n.value.moduleName}_value_object.go`), b = [];
|
|
2744
|
+
function g(N) {
|
|
2745
|
+
for (const c of Object.values(N)) {
|
|
2742
2746
|
if (!r(c))
|
|
2743
2747
|
continue;
|
|
2744
|
-
const
|
|
2745
|
-
if (
|
|
2748
|
+
const f = s(c);
|
|
2749
|
+
if (m[`${i.join("/")}/${f}`] === !0)
|
|
2746
2750
|
continue;
|
|
2747
2751
|
const y = e.commands._genInfoCode(c);
|
|
2748
|
-
y.length !== 0 && (
|
|
2752
|
+
y.length !== 0 && (h.addImports(y[0].imports), b.push(y[0].content), b.push(""), m[`${i.join("/")}/${f}`] = !0);
|
|
2749
2753
|
}
|
|
2750
2754
|
}
|
|
2751
2755
|
const u = e.states.designer.value._getContext().getCommands();
|
|
2752
|
-
for (const
|
|
2753
|
-
g(
|
|
2754
|
-
const c = e.commands._genCommandCode(
|
|
2755
|
-
for (const
|
|
2756
|
-
|
|
2756
|
+
for (const N of u) {
|
|
2757
|
+
g(N.inner);
|
|
2758
|
+
const c = e.commands._genCommandCode(N);
|
|
2759
|
+
for (const f of c)
|
|
2760
|
+
m[f.content] !== !0 && (a.addImports(f.imports), l.push(f.content));
|
|
2757
2761
|
}
|
|
2758
|
-
const
|
|
2759
|
-
for (const
|
|
2760
|
-
g(
|
|
2761
|
-
const c = e.commands._genFacadeCommandCode(
|
|
2762
|
-
for (const
|
|
2763
|
-
|
|
2762
|
+
const $ = e.states.designer.value._getContext().getFacadeCommands();
|
|
2763
|
+
for (const N of $) {
|
|
2764
|
+
g(N.inner);
|
|
2765
|
+
const c = e.commands._genFacadeCommandCode(N);
|
|
2766
|
+
for (const f of c)
|
|
2767
|
+
m[f.content] !== !0 && (a.addImports(f.imports), l.push(f.content));
|
|
2764
2768
|
}
|
|
2765
|
-
const
|
|
2766
|
-
for (const
|
|
2767
|
-
g(
|
|
2768
|
-
const c = e.commands._genAggCode(
|
|
2769
|
-
for (const
|
|
2770
|
-
|
|
2769
|
+
const v = e.states.designer.value._getContext().getAggs();
|
|
2770
|
+
for (const N of v) {
|
|
2771
|
+
g(N.inner);
|
|
2772
|
+
const c = e.commands._genAggCode(N);
|
|
2773
|
+
for (const f of c)
|
|
2774
|
+
m[f.content] !== !0 && (a.addImports(f.imports), l.push(f.content));
|
|
2771
2775
|
}
|
|
2772
|
-
const
|
|
2773
|
-
for (const
|
|
2774
|
-
g(
|
|
2775
|
-
const c = e.commands._genEventCode(
|
|
2776
|
-
for (const
|
|
2777
|
-
|
|
2776
|
+
const d = e.states.designer.value._getContext().getEvents();
|
|
2777
|
+
for (const N of d) {
|
|
2778
|
+
g(N.inner);
|
|
2779
|
+
const c = e.commands._genEventCode(N);
|
|
2780
|
+
for (const f of c)
|
|
2781
|
+
m[f.content] !== !0 && (a.addImports(f.imports), l.push(f.content));
|
|
2778
2782
|
}
|
|
2779
2783
|
return a.appendContentln(`package ${n.value.moduleName}`), a.appendContentln(""), a.getImports().length > 0 && (a.appendContentln("import ("), a.appendContentln(` ${[...a.getImports()].join(`
|
|
2780
2784
|
`)}`), a.appendContentln(")")), a.appendContentln(l.join(`
|
|
2781
|
-
`)),
|
|
2782
|
-
`)}`),
|
|
2783
|
-
`)), C.push(a), C.push(
|
|
2785
|
+
`)), h.appendContentln(`package ${n.value.moduleName}`), h.appendContentln(""), h.getImports().length > 0 && (h.appendContentln("import ("), h.appendContentln(` ${[...h.getImports()].map((N) => `"${N}"`).join(`
|
|
2786
|
+
`)}`), h.appendContentln(")"), h.appendContentln("")), h.appendContentln(b.join(`
|
|
2787
|
+
`)), C.push(a), C.push(h), C;
|
|
2784
2788
|
});
|
|
2785
2789
|
}
|
|
2786
|
-
})), M = ye.CSharpGeneratorAddition,
|
|
2790
|
+
})), M = ye.CSharpGeneratorAddition, To = le.createHotSwapPlugin(() => {
|
|
2787
2791
|
const e = " ";
|
|
2788
2792
|
function n(t, r = 1) {
|
|
2789
2793
|
return t.split(`
|
|
@@ -2795,35 +2799,35 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
|
2795
2799
|
t.commands.clearCaches(), t.commands._setCommandCodeProvider(() => []), t.commands._setFacadeCommandCodeProvider(() => []), t.commands._setAggCodeProvider(() => []), t.commands._setEventCodeProvider(() => []), t.commands._setReadModelCodeProvider(() => []), t.commands._setCodeFileProvider(() => []), t.commands.setContext({});
|
|
2796
2800
|
},
|
|
2797
2801
|
mount({ api: t }) {
|
|
2798
|
-
const r = t.states.context, o = t.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((i) =>
|
|
2802
|
+
const r = t.states.context, o = t.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((i) => w.stringToLowerCamel(i));
|
|
2799
2803
|
function s(i) {
|
|
2800
|
-
return !o.includes(
|
|
2804
|
+
return !o.includes(w.stringToLowerCamel(i._attributes.name));
|
|
2801
2805
|
}
|
|
2802
2806
|
function p(i, a) {
|
|
2803
|
-
return s(a) ?
|
|
2807
|
+
return s(a) ? w.stringToUpperCamel(a._attributes.name) : m(i, a);
|
|
2804
2808
|
}
|
|
2805
2809
|
function _(i) {
|
|
2806
|
-
return
|
|
2810
|
+
return w.stringToUpperCamel(i._attributes.name);
|
|
2807
2811
|
}
|
|
2808
2812
|
function C(i) {
|
|
2809
2813
|
return i.has(M.RecordStruct) ? " struct" : "";
|
|
2810
2814
|
}
|
|
2811
|
-
function
|
|
2812
|
-
const l = r.value.additions,
|
|
2813
|
-
return /\b(time|timestamp|date|deadline|expire)\b/.test(
|
|
2815
|
+
function m(i, a) {
|
|
2816
|
+
const l = r.value.additions, h = w.stringToLowerSnake(a._attributes.name).replace(/_/, " ");
|
|
2817
|
+
return /\b(time|timestamp|date|deadline|expire)\b/.test(h) ? l.has(M.Timezone) ? "System.DateTimeOffset" : "System.DateTime" : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(h) ? "int" : /\b(price)$/.test(h) ? "decimal" : /^(if|is)\b/.test(h) ? "bool" : je(a) && (a._attributes.type === "Id" || a._attributes.type === "Version" || /\b(id|identifier|ver|version)$/.test(h)) ? "long" : "string";
|
|
2814
2818
|
}
|
|
2815
2819
|
t.commands._setInfoCodeProvider(
|
|
2816
2820
|
(i) => {
|
|
2817
|
-
const a = r.value.additions, l = /* @__PURE__ */ new Set(),
|
|
2818
|
-
return
|
|
2819
|
-
`public record${C(a)} ${_(i)}(${
|
|
2821
|
+
const a = r.value.additions, l = /* @__PURE__ */ new Set(), h = [];
|
|
2822
|
+
return h.push(
|
|
2823
|
+
`public record${C(a)} ${_(i)}(${m(
|
|
2820
2824
|
l,
|
|
2821
2825
|
i
|
|
2822
2826
|
)} value);`
|
|
2823
2827
|
), [
|
|
2824
2828
|
{
|
|
2825
2829
|
type: "Info",
|
|
2826
|
-
content:
|
|
2830
|
+
content: h.join(`
|
|
2827
2831
|
`),
|
|
2828
2832
|
imports: l
|
|
2829
2833
|
}
|
|
@@ -2831,21 +2835,21 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
|
2831
2835
|
}
|
|
2832
2836
|
), t.commands._setCommandCodeProvider(
|
|
2833
2837
|
(i) => {
|
|
2834
|
-
const a = [], l = r.value.additions,
|
|
2838
|
+
const a = [], l = r.value.additions, h = /* @__PURE__ */ new Set(), b = _(i);
|
|
2835
2839
|
{
|
|
2836
2840
|
const g = [], u = Object.values(i.inner);
|
|
2837
2841
|
g.push(`public record${C(l)} ${b}`), g.push("(");
|
|
2838
|
-
const
|
|
2839
|
-
for (const
|
|
2840
|
-
const
|
|
2841
|
-
|
|
2842
|
+
const $ = [];
|
|
2843
|
+
for (const v of u) {
|
|
2844
|
+
const d = _(v);
|
|
2845
|
+
$.push(`${p(h, v)} ${w.upperFirst(d)}`);
|
|
2842
2846
|
}
|
|
2843
|
-
g.push(` ${
|
|
2847
|
+
g.push(` ${$.join(`,
|
|
2844
2848
|
`)}`), g.push(")"), g.push("{"), g.push("}"), a.push({
|
|
2845
2849
|
type: "Command",
|
|
2846
2850
|
content: g.join(`
|
|
2847
2851
|
`),
|
|
2848
|
-
imports:
|
|
2852
|
+
imports: h
|
|
2849
2853
|
});
|
|
2850
2854
|
}
|
|
2851
2855
|
{
|
|
@@ -2854,28 +2858,28 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
|
2854
2858
|
type: "CommandHandler",
|
|
2855
2859
|
content: u.join(`
|
|
2856
2860
|
`),
|
|
2857
|
-
imports:
|
|
2861
|
+
imports: h
|
|
2858
2862
|
});
|
|
2859
2863
|
}
|
|
2860
2864
|
return a;
|
|
2861
2865
|
}
|
|
2862
2866
|
), t.commands._setFacadeCommandCodeProvider(
|
|
2863
2867
|
(i) => {
|
|
2864
|
-
const a = [], l = r.value.additions,
|
|
2868
|
+
const a = [], l = r.value.additions, h = /* @__PURE__ */ new Set(), b = _(i);
|
|
2865
2869
|
{
|
|
2866
2870
|
const g = [], u = Object.values(i.inner);
|
|
2867
2871
|
g.push(`public record${C(l)} ${b}`), g.push("(");
|
|
2868
|
-
const
|
|
2869
|
-
for (const
|
|
2870
|
-
const
|
|
2871
|
-
|
|
2872
|
+
const $ = [];
|
|
2873
|
+
for (const v of u) {
|
|
2874
|
+
const d = _(v);
|
|
2875
|
+
$.push(`${p(h, v)} ${w.upperFirst(d)}`);
|
|
2872
2876
|
}
|
|
2873
|
-
g.push(` ${
|
|
2877
|
+
g.push(` ${$.join(`,
|
|
2874
2878
|
`)}`), g.push(")"), g.push("{"), g.push("}"), a.push({
|
|
2875
2879
|
type: "FacadeCommand",
|
|
2876
2880
|
content: g.join(`
|
|
2877
2881
|
`),
|
|
2878
|
-
imports:
|
|
2882
|
+
imports: h
|
|
2879
2883
|
});
|
|
2880
2884
|
}
|
|
2881
2885
|
{
|
|
@@ -2884,23 +2888,23 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
|
2884
2888
|
type: "FacadeCommandHandler",
|
|
2885
2889
|
content: u.join(`
|
|
2886
2890
|
`),
|
|
2887
|
-
imports:
|
|
2891
|
+
imports: h
|
|
2888
2892
|
});
|
|
2889
2893
|
}
|
|
2890
2894
|
return a;
|
|
2891
2895
|
}
|
|
2892
2896
|
), t.commands._setAggCodeProvider(
|
|
2893
2897
|
(i) => {
|
|
2894
|
-
const a = [], l = t.states.designer.value,
|
|
2898
|
+
const a = [], l = t.states.designer.value, h = r.value.additions;
|
|
2895
2899
|
{
|
|
2896
|
-
const b = /* @__PURE__ */ new Set(), g = [], u =
|
|
2900
|
+
const b = /* @__PURE__ */ new Set(), g = [], u = h.has(M.AggInterface) ? ` : ${r.value.aggInterface}` : "";
|
|
2897
2901
|
g.push(`public interface I${_(i)}${u}`), g.push("{");
|
|
2898
|
-
const
|
|
2899
|
-
for (const
|
|
2900
|
-
const
|
|
2901
|
-
|
|
2902
|
+
const $ = [], v = [...l._getContext().getAssociationMap()[i._attributes.__id]].filter((d) => d._attributes.rule === "Command" || d._attributes.rule === "FacadeCommand");
|
|
2903
|
+
for (const d of v) {
|
|
2904
|
+
const N = _(d);
|
|
2905
|
+
$.push(`void Handle${N}(${N} command);`);
|
|
2902
2906
|
}
|
|
2903
|
-
g.push(` ${
|
|
2907
|
+
g.push(` ${$.join(`
|
|
2904
2908
|
|
|
2905
2909
|
`)}`), g.push("}"), g.push(""), a.push({
|
|
2906
2910
|
type: "Agg",
|
|
@@ -2910,56 +2914,56 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
|
2910
2914
|
});
|
|
2911
2915
|
}
|
|
2912
2916
|
{
|
|
2913
|
-
const b = /* @__PURE__ */ new Set(), g = [], u = _(i),
|
|
2914
|
-
if (
|
|
2915
|
-
const
|
|
2916
|
-
for (const
|
|
2917
|
-
const y = _(
|
|
2918
|
-
|
|
2917
|
+
const b = /* @__PURE__ */ new Set(), g = [], u = _(i), $ = Object.values(i.inner), v = h.has(M.AggInterface) ? `, ${r.value.aggInterface}` : "";
|
|
2918
|
+
if (h.has(M.PrimaryConstructor)) {
|
|
2919
|
+
const d = [...l._getContext().getAssociationMap()[i._attributes.__id]].filter((f) => f._attributes.rule === "Command" || f._attributes.rule === "FacadeCommand"), N = [];
|
|
2920
|
+
for (const f of $) {
|
|
2921
|
+
const y = _(f);
|
|
2922
|
+
N.push(`${p(b, f)} ${w.lowerFirst(y)}`);
|
|
2919
2923
|
}
|
|
2920
|
-
g.push(`public class ${u}`), g.push("("), g.push(` ${
|
|
2921
|
-
`)}`), g.push(`): I${u}${
|
|
2922
|
-
for (const
|
|
2923
|
-
const y = _(
|
|
2924
|
+
g.push(`public class ${u}`), g.push("("), g.push(` ${N.join(`,
|
|
2925
|
+
`)}`), g.push(`): I${u}${v}`), g.push("{");
|
|
2926
|
+
for (const f of $) {
|
|
2927
|
+
const y = _(f);
|
|
2924
2928
|
g.push(
|
|
2925
|
-
` public ${p(b,
|
|
2929
|
+
` public ${p(b, f)} ${w.upperFirst(
|
|
2926
2930
|
y
|
|
2927
|
-
)} { get; private set; } = ${
|
|
2931
|
+
)} { get; private set; } = ${w.lowerFirst(y)};`
|
|
2928
2932
|
), g.push("");
|
|
2929
2933
|
}
|
|
2930
2934
|
const c = [];
|
|
2931
|
-
for (const
|
|
2932
|
-
const y = _(
|
|
2935
|
+
for (const f of d) {
|
|
2936
|
+
const y = _(f);
|
|
2933
2937
|
c.push(`public void Handle${y}(${y} command)`), c.push("{"), c.push(" // HACK implement"), c.push("}"), c.push("");
|
|
2934
2938
|
}
|
|
2935
2939
|
g.push(` ${c.join(`
|
|
2936
2940
|
`)}`), g.push("}");
|
|
2937
2941
|
} else {
|
|
2938
|
-
const
|
|
2939
|
-
g.push(`public class ${u} : I${u}${
|
|
2940
|
-
for (const
|
|
2941
|
-
const y = _(
|
|
2942
|
+
const d = [...l._getContext().getAssociationMap()[i._attributes.__id]].filter((f) => f._attributes.rule === "Command" || f._attributes.rule === "FacadeCommand");
|
|
2943
|
+
g.push(`public class ${u} : I${u}${v}`), g.push("{");
|
|
2944
|
+
for (const f of $) {
|
|
2945
|
+
const y = _(f);
|
|
2942
2946
|
g.push(
|
|
2943
|
-
` public ${p(b,
|
|
2947
|
+
` public ${p(b, f)} ${w.lowerFirst(
|
|
2944
2948
|
y
|
|
2945
2949
|
)} { get; private set; }`
|
|
2946
2950
|
);
|
|
2947
2951
|
}
|
|
2948
2952
|
g.push("");
|
|
2949
|
-
const
|
|
2950
|
-
for (const
|
|
2951
|
-
const y = _(
|
|
2952
|
-
|
|
2953
|
+
const N = [];
|
|
2954
|
+
for (const f of $) {
|
|
2955
|
+
const y = _(f);
|
|
2956
|
+
N.push(`${p(b, f)} ${y}`);
|
|
2953
2957
|
}
|
|
2954
|
-
g.push(` public ${u}(${
|
|
2955
|
-
for (const
|
|
2956
|
-
const y = _(
|
|
2957
|
-
g.push(` ${y} = ${
|
|
2958
|
+
g.push(` public ${u}(${N.join(", ")})`), g.push(" {");
|
|
2959
|
+
for (const f of $) {
|
|
2960
|
+
const y = _(f);
|
|
2961
|
+
g.push(` ${y} = ${w.lowerFirst(y)};`);
|
|
2958
2962
|
}
|
|
2959
2963
|
g.push(" }");
|
|
2960
2964
|
const c = [];
|
|
2961
|
-
for (const
|
|
2962
|
-
const y = _(
|
|
2965
|
+
for (const f of d) {
|
|
2966
|
+
const y = _(f);
|
|
2963
2967
|
c.push(`public void Handle${y}(${y} command)`), c.push("{"), c.push(" // HACK implement"), c.push("}"), c.push("");
|
|
2964
2968
|
}
|
|
2965
2969
|
g.push(` ${c.join(`
|
|
@@ -2976,12 +2980,12 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
|
2976
2980
|
}
|
|
2977
2981
|
), t.commands._setEventCodeProvider(
|
|
2978
2982
|
(i) => {
|
|
2979
|
-
const a = r.value.additions, l = _(i),
|
|
2983
|
+
const a = r.value.additions, l = _(i), h = /* @__PURE__ */ new Set(), b = Object.values(i.inner), g = [];
|
|
2980
2984
|
g.push(`public record${C(a)} ${l}`), g.push("(");
|
|
2981
2985
|
const u = [];
|
|
2982
|
-
for (const
|
|
2983
|
-
const
|
|
2984
|
-
u.push(`${p(
|
|
2986
|
+
for (const $ of b) {
|
|
2987
|
+
const v = _($);
|
|
2988
|
+
u.push(`${p(h, $)} ${w.upperFirst(v)}`);
|
|
2985
2989
|
}
|
|
2986
2990
|
return g.push(` ${u.join(`,
|
|
2987
2991
|
`)}`), g.push(")"), g.push("{"), g.push("}"), [
|
|
@@ -2989,83 +2993,83 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
|
2989
2993
|
type: "Event",
|
|
2990
2994
|
content: g.join(`
|
|
2991
2995
|
`),
|
|
2992
|
-
imports:
|
|
2996
|
+
imports: h
|
|
2993
2997
|
}
|
|
2994
2998
|
];
|
|
2995
2999
|
}
|
|
2996
3000
|
), t.commands._setReadModelCodeProvider(() => []), t.commands._setCodeFileProvider(() => {
|
|
2997
|
-
const i = [], a = {}, l = [...r.value.namespace.split(/\./),
|
|
2998
|
-
function
|
|
2999
|
-
for (const
|
|
3000
|
-
if (!s(
|
|
3001
|
+
const i = [], a = {}, l = [...r.value.namespace.split(/\./), w.stringToUpperCamel(r.value.moduleName)];
|
|
3002
|
+
function h(v) {
|
|
3003
|
+
for (const d of Object.values(v)) {
|
|
3004
|
+
if (!s(d))
|
|
3001
3005
|
continue;
|
|
3002
|
-
const
|
|
3003
|
-
if (a[`${l.join("/")}/${
|
|
3006
|
+
const N = _(d) + ".cs";
|
|
3007
|
+
if (a[`${l.join("/")}/${N}`] === !0)
|
|
3004
3008
|
continue;
|
|
3005
|
-
const c = t.commands._genInfoCode(
|
|
3009
|
+
const c = t.commands._genInfoCode(d);
|
|
3006
3010
|
if (c.length === 0)
|
|
3007
3011
|
continue;
|
|
3008
|
-
const
|
|
3012
|
+
const f = new S(l, N);
|
|
3009
3013
|
for (const y of c[0].imports)
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
`namespace ${r.value.namespace}.${
|
|
3013
|
-
),
|
|
3014
|
+
f.appendContentln(`using ${y};`);
|
|
3015
|
+
f.appendContentln(""), f.appendContentln(
|
|
3016
|
+
`namespace ${r.value.namespace}.${w.stringToUpperCamel(r.value.moduleName)}`
|
|
3017
|
+
), f.appendContentln("{"), f.appendContentln(n(c[0].content)), f.appendContentln("}"), i.push(f), a[`${l.join("/")}/${N}`] = !0;
|
|
3014
3018
|
}
|
|
3015
3019
|
}
|
|
3016
3020
|
const b = t.states.designer.value._getContext().getCommands();
|
|
3017
|
-
for (const
|
|
3018
|
-
|
|
3019
|
-
const
|
|
3020
|
-
for (const
|
|
3021
|
-
if (
|
|
3022
|
-
c.addImports(
|
|
3023
|
-
for (const y of
|
|
3021
|
+
for (const v of b) {
|
|
3022
|
+
h(v.inner);
|
|
3023
|
+
const d = _(v) + ".cs", N = t.commands._genCommandCode(v), c = new S(l, d);
|
|
3024
|
+
for (const f of N)
|
|
3025
|
+
if (f.type === "Command") {
|
|
3026
|
+
c.addImports(f.imports);
|
|
3027
|
+
for (const y of f.imports)
|
|
3024
3028
|
c.appendContentln(`using ${y};`);
|
|
3025
3029
|
c.appendContentln(""), c.appendContentln(
|
|
3026
|
-
`namespace ${r.value.namespace}.${
|
|
3027
|
-
), c.appendContentln("{"), c.appendContentln(n(
|
|
3030
|
+
`namespace ${r.value.namespace}.${w.stringToUpperCamel(r.value.moduleName)}`
|
|
3031
|
+
), c.appendContentln("{"), c.appendContentln(n(f.content)), c.appendContentln("}");
|
|
3028
3032
|
}
|
|
3029
3033
|
i.push(c);
|
|
3030
3034
|
}
|
|
3031
3035
|
const g = t.states.designer.value._getContext().getFacadeCommands();
|
|
3032
|
-
for (const
|
|
3033
|
-
|
|
3034
|
-
const
|
|
3035
|
-
c.addImports(
|
|
3036
|
-
for (const
|
|
3037
|
-
c.appendContentln(`using ${
|
|
3036
|
+
for (const v of g) {
|
|
3037
|
+
h(v.inner);
|
|
3038
|
+
const d = _(v) + ".cs", N = t.commands._genFacadeCommandCode(v), c = new S(l, d);
|
|
3039
|
+
c.addImports(N[0].imports);
|
|
3040
|
+
for (const f of N[0].imports)
|
|
3041
|
+
c.appendContentln(`using ${f};`);
|
|
3038
3042
|
c.appendContentln(""), c.appendContentln(
|
|
3039
|
-
`namespace ${r.value.namespace}.${
|
|
3040
|
-
), c.appendContentln("{"), c.appendContentln(n(
|
|
3043
|
+
`namespace ${r.value.namespace}.${w.stringToUpperCamel(r.value.moduleName)}`
|
|
3044
|
+
), c.appendContentln("{"), c.appendContentln(n(N[0].content)), c.appendContentln("}"), i.push(c);
|
|
3041
3045
|
}
|
|
3042
3046
|
const u = t.states.designer.value._getContext().getAggs();
|
|
3043
|
-
for (const
|
|
3044
|
-
|
|
3045
|
-
const
|
|
3046
|
-
for (const
|
|
3047
|
-
c.addImports(
|
|
3048
|
-
for (const y of
|
|
3047
|
+
for (const v of u) {
|
|
3048
|
+
h(v.inner);
|
|
3049
|
+
const d = t.commands._genAggCode(v), N = _(v) + ".cs", c = new S(l, N);
|
|
3050
|
+
for (const f of d) {
|
|
3051
|
+
c.addImports(f.imports);
|
|
3052
|
+
for (const y of f.imports)
|
|
3049
3053
|
c.appendContentln(`using ${y};`);
|
|
3050
3054
|
c.appendContentln("");
|
|
3051
3055
|
}
|
|
3052
3056
|
c.appendContentln(
|
|
3053
|
-
`namespace ${r.value.namespace}.${
|
|
3057
|
+
`namespace ${r.value.namespace}.${w.stringToUpperCamel(r.value.moduleName)}`
|
|
3054
3058
|
), c.appendContentln("{");
|
|
3055
|
-
for (const
|
|
3056
|
-
c.appendContentln(n(
|
|
3059
|
+
for (const f of d)
|
|
3060
|
+
c.appendContentln(n(f.content));
|
|
3057
3061
|
c.appendContentln("}"), i.push(c);
|
|
3058
3062
|
}
|
|
3059
|
-
const
|
|
3060
|
-
for (const
|
|
3061
|
-
|
|
3062
|
-
const
|
|
3063
|
-
c.addImports(
|
|
3064
|
-
for (const
|
|
3065
|
-
c.appendContentln(`using ${
|
|
3063
|
+
const $ = t.states.designer.value._getContext().getEvents();
|
|
3064
|
+
for (const v of $) {
|
|
3065
|
+
h(v.inner);
|
|
3066
|
+
const d = _(v) + ".cs", N = t.commands._genEventCode(v), c = new S(l, d);
|
|
3067
|
+
c.addImports(N[0].imports);
|
|
3068
|
+
for (const f of N[0].imports)
|
|
3069
|
+
c.appendContentln(`using ${f};`);
|
|
3066
3070
|
c.appendContentln(""), c.appendContentln(
|
|
3067
|
-
`namespace ${r.value.namespace}.${
|
|
3068
|
-
), c.appendContentln("{"), c.appendContentln(n(
|
|
3071
|
+
`namespace ${r.value.namespace}.${w.stringToUpperCamel(r.value.moduleName)}`
|
|
3072
|
+
), c.appendContentln("{"), c.appendContentln(n(N[0].content)), c.appendContentln("}"), i.push(c);
|
|
3069
3073
|
}
|
|
3070
3074
|
return i;
|
|
3071
3075
|
});
|
|
@@ -3073,8 +3077,8 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
|
|
|
3073
3077
|
};
|
|
3074
3078
|
});
|
|
3075
3079
|
export {
|
|
3076
|
-
|
|
3077
|
-
|
|
3080
|
+
To as GENERATOR_CSHARP_PLUGIN,
|
|
3081
|
+
xo as GENERATOR_GO_PLUGIN,
|
|
3078
3082
|
Io as GENERATOR_JAVA_PLUGIN,
|
|
3079
3083
|
Oo as GENERATOR_KOTLIN_PLUGIN,
|
|
3080
3084
|
le as GeneratorPliginHelper,
|