@ddd-tool/domain-designer-generator 0.0.0-alpha.7 → 0.0.0-alpha.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.
Files changed (2) hide show
  1. package/index.js +155 -155
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -13,8 +13,8 @@ function fo(e) {
13
13
  const H = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
14
14
  process.env.NODE_ENV !== "production" && Object.freeze([]);
15
15
  const oe = () => {
16
- }, ho = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
17
- (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), F = Object.assign, mo = Object.prototype.hasOwnProperty, S = (e, t) => mo.call(e, t), E = Array.isArray, _e = (e) => ot(e) === "[object Map]", go = (e) => ot(e) === "[object Set]", x = (e) => typeof e == "function", K = (e) => typeof e == "string", Ve = (e) => typeof e == "symbol", P = (e) => e !== null && typeof e == "object", _o = (e) => (P(e) || x(e)) && x(e.then) && x(e.catch), vo = Object.prototype.toString, ot = (e) => vo.call(e), mn = (e) => ot(e).slice(8, -1), Co = (e) => ot(e) === "[object Object]", kt = (e) => K(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, bo = (e) => {
16
+ }, mo = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
17
+ (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), F = Object.assign, ho = Object.prototype.hasOwnProperty, S = (e, t) => ho.call(e, t), E = Array.isArray, _e = (e) => ot(e) === "[object Map]", go = (e) => ot(e) === "[object Set]", x = (e) => typeof e == "function", K = (e) => typeof e == "string", Ve = (e) => typeof e == "symbol", P = (e) => e !== null && typeof e == "object", _o = (e) => (P(e) || x(e)) && x(e.then) && x(e.catch), vo = Object.prototype.toString, ot = (e) => vo.call(e), hn = (e) => ot(e).slice(8, -1), Co = (e) => ot(e) === "[object Object]", kt = (e) => K(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, bo = (e) => {
18
18
  const t = /* @__PURE__ */ Object.create(null);
19
19
  return (n) => t[n] || (t[n] = e(n));
20
20
  }, No = bo((e) => e.charAt(0).toUpperCase() + e.slice(1)), ee = (e, t) => !Object.is(e, t), wo = (e, t, n, o = !1) => {
@@ -718,7 +718,7 @@ const Mo = {
718
718
  function an(e, t, n) {
719
719
  const o = C(n);
720
720
  if (o !== n && t.call(e, o)) {
721
- const s = mn(e);
721
+ const s = hn(e);
722
722
  G(
723
723
  `Reactive ${s} contains both the raw and reactive versions of the same object${s === "Map" ? " as keys" : ""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
724
724
  );
@@ -740,7 +740,7 @@ function Uo(e) {
740
740
  }
741
741
  }
742
742
  function Bo(e) {
743
- return e.__v_skip || !Object.isExtensible(e) ? 0 : Uo(mn(e));
743
+ return e.__v_skip || !Object.isExtensible(e) ? 0 : Uo(hn(e));
744
744
  }
745
745
  function Dn(e) {
746
746
  return J(e) ? e : Gt(
@@ -903,8 +903,8 @@ function ts(e, t, n = H) {
903
903
  "A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types."
904
904
  );
905
905
  }, f = (b) => s ? b : T(b) || s === !1 || s === 0 ? Q(b, 1) : Q(b);
906
- let i, u, p, _, g = !1, m = !1;
907
- if (I(e) ? (u = () => e.value, g = T(e)) : ve(e) ? (u = () => f(e), g = !0) : E(e) ? (m = !0, g = e.some((b) => ve(b) || T(b)), u = () => e.map((b) => {
906
+ let i, u, p, _, g = !1, h = !1;
907
+ if (I(e) ? (u = () => e.value, g = T(e)) : ve(e) ? (u = () => f(e), g = !0) : E(e) ? (h = !0, g = e.some((b) => ve(b) || T(b)), u = () => e.map((b) => {
908
908
  if (I(b))
909
909
  return b.value;
910
910
  if (ve(b))
@@ -932,21 +932,21 @@ function ts(e, t, n = H) {
932
932
  const b = u, L = s === !0 ? 1 / 0 : s;
933
933
  u = () => Q(b(), L);
934
934
  }
935
- const h = () => {
935
+ const m = () => {
936
936
  i.stop();
937
937
  };
938
938
  if (r && t) {
939
939
  const b = t;
940
940
  t = (...L) => {
941
- b(...L), h();
941
+ b(...L), m();
942
942
  };
943
943
  }
944
- let v = m ? new Array(e.length).fill(Fe) : Fe;
944
+ let v = h ? new Array(e.length).fill(Fe) : Fe;
945
945
  const y = (b) => {
946
946
  if (!(!(i.flags & 1) || !i.dirty && !b))
947
947
  if (t) {
948
948
  const L = i.run();
949
- if (s || g || (m ? L.some((ut, Pe) => ee(ut, v[Pe])) : ee(L, v))) {
949
+ if (s || g || (h ? L.some((ut, Pe) => ee(ut, v[Pe])) : ee(L, v))) {
950
950
  p && p();
951
951
  const ut = ne;
952
952
  ne = i;
@@ -954,7 +954,7 @@ function ts(e, t, n = H) {
954
954
  const Pe = [
955
955
  L,
956
956
  // pass undefined as the old value when it's changed for the first time
957
- v === Fe ? void 0 : m && v[0] === Fe ? [] : v,
957
+ v === Fe ? void 0 : h && v[0] === Fe ? [] : v,
958
958
  _
959
959
  ];
960
960
  l ? l(t, 3, Pe) : (
@@ -977,7 +977,7 @@ function ts(e, t, n = H) {
977
977
  for (const L of b) L();
978
978
  Ue.delete(i);
979
979
  }
980
- }, process.env.NODE_ENV !== "production" && (i.onTrack = n.onTrack, i.onTrigger = n.onTrigger), t ? o ? y(!0) : v = i.run() : a ? a(y.bind(null, !0), !0) : i.run(), h.pause = i.pause.bind(i), h.resume = i.resume.bind(i), h.stop = h, h;
980
+ }, process.env.NODE_ENV !== "production" && (i.onTrack = n.onTrack, i.onTrigger = n.onTrigger), t ? o ? y(!0) : v = i.run() : a ? a(y.bind(null, !0), !0) : i.run(), m.pause = i.pause.bind(i), m.resume = i.resume.bind(i), m.stop = m, m;
981
981
  }
982
982
  function Q(e, t = 1 / 0, n) {
983
983
  if (t <= 0 || !P(e) || e.__v_skip || (n = n || /* @__PURE__ */ new Set(), n.has(e)))
@@ -1011,10 +1011,10 @@ function ns(e) {
1011
1011
  function os() {
1012
1012
  re.pop();
1013
1013
  }
1014
- let ht = !1;
1014
+ let mt = !1;
1015
1015
  function $(e, ...t) {
1016
- if (ht) return;
1017
- ht = !0, rt();
1016
+ if (mt) return;
1017
+ mt = !0, rt();
1018
1018
  const n = re.length ? re[re.length - 1].component : null, o = n && n.appContext.config.warnHandler, s = ss();
1019
1019
  if (o)
1020
1020
  at(
@@ -1040,7 +1040,7 @@ function $(e, ...t) {
1040
1040
  s.length && r.push(`
1041
1041
  `, ...rs(s));
1042
1042
  }
1043
- it(), ht = !1;
1043
+ it(), mt = !1;
1044
1044
  }
1045
1045
  function ss() {
1046
1046
  let e = re[re.length - 1];
@@ -1256,11 +1256,11 @@ function jn(e, t) {
1256
1256
  }
1257
1257
  return e.set(t, n + 1), !1;
1258
1258
  }
1259
- const mt = /* @__PURE__ */ new Map();
1259
+ const ht = /* @__PURE__ */ new Map();
1260
1260
  process.env.NODE_ENV !== "production" && (st().__VUE_HMR_RUNTIME__ = {
1261
1261
  createRecord: gt(ds),
1262
- rerender: gt(hs),
1263
- reload: gt(ms)
1262
+ rerender: gt(ms),
1263
+ reload: gt(hs)
1264
1264
  });
1265
1265
  const We = /* @__PURE__ */ new Map();
1266
1266
  function ds(e, t) {
@@ -1272,26 +1272,26 @@ function ds(e, t) {
1272
1272
  function Ge(e) {
1273
1273
  return Gn(e) ? e.__vccOpts : e;
1274
1274
  }
1275
- function hs(e, t) {
1275
+ function ms(e, t) {
1276
1276
  const n = We.get(e);
1277
1277
  n && (n.initialDef.render = t, [...n.instances].forEach((o) => {
1278
1278
  t && (o.render = t, Ge(o.type).render = t), o.renderCache = [], o.update();
1279
1279
  }));
1280
1280
  }
1281
- function ms(e, t) {
1281
+ function hs(e, t) {
1282
1282
  const n = We.get(e);
1283
1283
  if (!n) return;
1284
1284
  t = Ge(t), cn(n.initialDef, t);
1285
1285
  const o = [...n.instances];
1286
1286
  for (let s = 0; s < o.length; s++) {
1287
1287
  const r = o[s], a = Ge(r.type);
1288
- let c = mt.get(a);
1289
- c || (a !== n.initialDef && cn(a, t), mt.set(a, c = /* @__PURE__ */ new Set())), c.add(r), r.appContext.propsCache.delete(r.type), r.appContext.emitsCache.delete(r.type), r.appContext.optionsCache.delete(r.type), r.ceReload ? (c.add(r), r.ceReload(t.styles), c.delete(r)) : r.parent ? qt(() => {
1288
+ let c = ht.get(a);
1289
+ c || (a !== n.initialDef && cn(a, t), ht.set(a, c = /* @__PURE__ */ new Set())), c.add(r), r.appContext.propsCache.delete(r.type), r.appContext.emitsCache.delete(r.type), r.appContext.optionsCache.delete(r.type), r.ceReload ? (c.add(r), r.ceReload(t.styles), c.delete(r)) : r.parent ? qt(() => {
1290
1290
  r.parent.update(), c.delete(r);
1291
1291
  }) : r.appContext.reload ? r.appContext.reload() : typeof window < "u" && window.location.reload(), r.root.ce && r !== r.root && r.root.ce._removeChildStyle(a);
1292
1292
  }
1293
1293
  Rn(() => {
1294
- mt.clear();
1294
+ ht.clear();
1295
1295
  });
1296
1296
  }
1297
1297
  function cn(e, t) {
@@ -1609,7 +1609,7 @@ function Rs(e, t) {
1609
1609
  t && t.pendingBranch ? E(e) ? t.effects.push(...e) : t.effects.push(e) : Rn(e);
1610
1610
  }
1611
1611
  const Ln = Symbol.for("v-fgt"), Fs = Symbol.for("v-txt"), js = Symbol.for("v-cmt");
1612
- let me = null;
1612
+ let he = null;
1613
1613
  function ks(e) {
1614
1614
  return e ? e.__v_isVNode === !0 : !1;
1615
1615
  }
@@ -1652,13 +1652,13 @@ function Ms(e, t = null, n = null, o = 0, s = null, r = e === Ln ? 0 : 1, a = !1
1652
1652
  };
1653
1653
  return c ? (Yt(l, n), r & 128 && e.normalize(l)) : n && (l.shapeFlag |= K(n) ? 8 : 16), process.env.NODE_ENV !== "production" && l.key !== l.key && $("VNode created with invalid key (NaN). VNode type:", l.type), // avoid a block node from tracking itself
1654
1654
  !a && // has current parent block
1655
- me && // presence of a patch flag indicates this node needs patching on updates.
1655
+ he && // presence of a patch flag indicates this node needs patching on updates.
1656
1656
  // component nodes also should always be patched, because even if the
1657
1657
  // component doesn't need to update, it needs to persist the instance on to
1658
1658
  // the next vnode so that it can be properly unmounted later.
1659
1659
  (l.patchFlag > 0 || r & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
1660
1660
  // vnode should not be considered dynamic due to handler caching.
1661
- l.patchFlag !== 32 && me.push(l), l;
1661
+ l.patchFlag !== 32 && he.push(l), l;
1662
1662
  }
1663
1663
  const Ls = process.env.NODE_ENV !== "production" ? Hs : zn;
1664
1664
  function zn(e, t = null, n = null, o = 0, s = null, r = !1) {
@@ -1669,7 +1669,7 @@ function zn(e, t = null, n = null, o = 0, s = null, r = !1) {
1669
1669
  !0
1670
1670
  /* mergeRef: true */
1671
1671
  );
1672
- return n && Yt(c, n), !r && me && (c.shapeFlag & 6 ? me[me.indexOf(e)] = c : me.push(c)), c.patchFlag = -2, c;
1672
+ return n && Yt(c, n), !r && he && (c.shapeFlag & 6 ? he[he.indexOf(e)] = c : he.push(c)), c.patchFlag = -2, c;
1673
1673
  }
1674
1674
  if (Gn(e) && (e = e.__vccOpts), t) {
1675
1675
  t = Ks(t);
@@ -1778,7 +1778,7 @@ function Us(...e) {
1778
1778
  t.class !== o.class && (t.class = Mt([t.class, o.class]));
1779
1779
  else if (s === "style")
1780
1780
  t.style = Ht([t.style, o.style]);
1781
- else if (ho(s)) {
1781
+ else if (mo(s)) {
1782
1782
  const r = t[s], a = o[s];
1783
1783
  a && r !== a && !(E(r) && r.includes(a)) && (t[s] = r ? [].concat(r, a) : a);
1784
1784
  } else s !== "" && (t[s] = o[s]);
@@ -2276,8 +2276,8 @@ function fr(e) {
2276
2276
  const It = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
2277
2277
  process.env.NODE_ENV !== "production" && Object.freeze([]);
2278
2278
  const dr = () => {
2279
- }, hr = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
2280
- (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), ct = Object.assign, z = Array.isArray, ue = (e) => typeof e == "function", te = (e) => typeof e == "string", mr = (e) => typeof e == "symbol", ie = (e) => e !== null && typeof e == "object";
2279
+ }, mr = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
2280
+ (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), ct = Object.assign, z = Array.isArray, ue = (e) => typeof e == "function", te = (e) => typeof e == "string", hr = (e) => typeof e == "symbol", ie = (e) => e !== null && typeof e == "object";
2281
2281
  let dn;
2282
2282
  const lt = () => dn || (dn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
2283
2283
  function Qt(e) {
@@ -2327,7 +2327,7 @@ Symbol(
2327
2327
  process.env.NODE_ENV !== "production" ? "Array iterate" : ""
2328
2328
  );
2329
2329
  new Set(
2330
- /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(mr)
2330
+ /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(hr)
2331
2331
  );
2332
2332
  function qn(e) {
2333
2333
  return Pt(e) ? qn(e.__v_raw) : !!(e && e.__v_isReactive);
@@ -2507,7 +2507,7 @@ function Sr(e, t, n, o = !0, s = !1) {
2507
2507
  const k = [];
2508
2508
  let W = -1;
2509
2509
  const be = [];
2510
- let Y = null, he = 0;
2510
+ let Y = null, me = 0;
2511
2511
  const Or = /* @__PURE__ */ Promise.resolve();
2512
2512
  let Rt = null;
2513
2513
  const xr = 100;
@@ -2530,7 +2530,7 @@ function Xn() {
2530
2530
  Rt || (Rt = Or.then(eo));
2531
2531
  }
2532
2532
  function Vr(e) {
2533
- z(e) ? be.push(...e) : Y && e.id === -1 ? Y.splice(he + 1, 0, e) : e.flags & 1 || (be.push(e), e.flags |= 1), Xn();
2533
+ z(e) ? be.push(...e) : Y && e.id === -1 ? Y.splice(me + 1, 0, e) : e.flags & 1 || (be.push(e), e.flags |= 1), Xn();
2534
2534
  }
2535
2535
  function Ir(e) {
2536
2536
  if (be.length) {
@@ -2541,11 +2541,11 @@ function Ir(e) {
2541
2541
  Y.push(...t);
2542
2542
  return;
2543
2543
  }
2544
- for (Y = t, process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), he = 0; he < Y.length; he++) {
2545
- const n = Y[he];
2544
+ for (Y = t, process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), me = 0; me < Y.length; me++) {
2545
+ const n = Y[me];
2546
2546
  process.env.NODE_ENV !== "production" && to(e, n) || (n.flags & 4 && (n.flags &= -2), n.flags & 8 || n(), n.flags &= -2);
2547
2547
  }
2548
- Y = null, he = 0;
2548
+ Y = null, me = 0;
2549
2549
  }
2550
2550
  }
2551
2551
  const Ae = (e) => e.id == null ? e.flags & 2 ? -1 : 1 / 0 : e.id;
@@ -2610,12 +2610,12 @@ function Tr(e, t) {
2610
2610
  function Rr(e, t) {
2611
2611
  const n = Ze.get(e);
2612
2612
  if (!n) return;
2613
- t = Qe(t), hn(n.initialDef, t);
2613
+ t = Qe(t), mn(n.initialDef, t);
2614
2614
  const o = [...n.instances];
2615
2615
  for (let s = 0; s < o.length; s++) {
2616
2616
  const r = o[s], a = Qe(r.type);
2617
2617
  let c = bt.get(a);
2618
- c || (a !== n.initialDef && hn(a, t), bt.set(a, c = /* @__PURE__ */ new Set())), c.add(r), r.appContext.propsCache.delete(r.type), r.appContext.emitsCache.delete(r.type), r.appContext.optionsCache.delete(r.type), r.ceReload ? (c.add(r), r.ceReload(t.styles), c.delete(r)) : r.parent ? Ar(() => {
2618
+ c || (a !== n.initialDef && mn(a, t), bt.set(a, c = /* @__PURE__ */ new Set())), c.add(r), r.appContext.propsCache.delete(r.type), r.appContext.emitsCache.delete(r.type), r.appContext.optionsCache.delete(r.type), r.ceReload ? (c.add(r), r.ceReload(t.styles), c.delete(r)) : r.parent ? Ar(() => {
2619
2619
  r.parent.update(), c.delete(r);
2620
2620
  }) : r.appContext.reload ? r.appContext.reload() : typeof window < "u" && window.location.reload(), r.root.ce && r !== r.root && r.root.ce._removeChildStyle(a);
2621
2621
  }
@@ -2623,7 +2623,7 @@ function Rr(e, t) {
2623
2623
  bt.clear();
2624
2624
  });
2625
2625
  }
2626
- function hn(e, t) {
2626
+ function mn(e, t) {
2627
2627
  ct(e, t);
2628
2628
  for (const n in e)
2629
2629
  n !== "__file" && !(n in t) && delete e[n];
@@ -2815,7 +2815,7 @@ function qr(...e) {
2815
2815
  t.class !== o.class && (t.class = Xt([t.class, o.class]));
2816
2816
  else if (s === "style")
2817
2817
  t.style = Qt([t.style, o.style]);
2818
- else if (hr(s)) {
2818
+ else if (mr(s)) {
2819
2819
  const r = t[s], a = o[s];
2820
2820
  a && r !== a && !(z(r) && r.includes(a)) && (t[s] = r ? [].concat(r, a) : a);
2821
2821
  } else s !== "" && (t[s] = o[s]);
@@ -3146,9 +3146,9 @@ const D = tt.JavaGeneratorAddition, oi = Zt.createHotSwapPlugin(() => {
3146
3146
  l.has(D.LombokBuilder) && u.push("@lombok.Builder(toBuilder = true)"), u.push(`public record ${i}(`);
3147
3147
  const _ = [];
3148
3148
  for (const g of p) {
3149
- const m = t(g);
3149
+ const h = t(g);
3150
3150
  _.push(` @${d}
3151
- ${m} ${N.lowerFirst(m)}`);
3151
+ ${h} ${N.lowerFirst(h)}`);
3152
3152
  }
3153
3153
  u.push(_.join(`,
3154
3154
  `)), u.push(") {"), u.push(` public ${i} {`), u.push(" // HACK check value"), u.push(" }"), u.push("}");
@@ -3161,21 +3161,21 @@ const D = tt.JavaGeneratorAddition, oi = Zt.createHotSwapPlugin(() => {
3161
3161
  u.push("}");
3162
3162
  } else {
3163
3163
  u.push(`public class ${i} {`);
3164
- for (const m of p) {
3165
- const h = t(m);
3166
- u.push(` @${d}`), u.push(` private final ${s(f, m)} ${N.lowerFirst(h)};`);
3164
+ for (const h of p) {
3165
+ const m = t(h);
3166
+ u.push(` @${d}`), u.push(` private final ${s(f, h)} ${N.lowerFirst(m)};`);
3167
3167
  }
3168
3168
  u.push("");
3169
3169
  const _ = [], g = [];
3170
- for (const m of p) {
3171
- const h = t(m);
3172
- _.push(`@${d} ${s(f, m)} ${N.lowerFirst(h)}`), g.push(`this.${N.lowerFirst(h)} = ${N.lowerFirst(h)};`);
3170
+ for (const h of p) {
3171
+ const m = t(h);
3172
+ _.push(`@${d} ${s(f, h)} ${N.lowerFirst(m)}`), g.push(`this.${N.lowerFirst(m)} = ${N.lowerFirst(m)};`);
3173
3173
  }
3174
3174
  u.push(` public ${i}(${_.join(", ")}) {`), u.push(` ${g.join(`
3175
3175
  `)}`), u.push(" }");
3176
- for (const m of p) {
3177
- const h = t(m);
3178
- u.push(""), u.push(` public ${s(f, m)} get${h} () {`), u.push(` return this.${N.lowerFirst(h)};`), u.push(" }");
3176
+ for (const h of p) {
3177
+ const m = t(h);
3178
+ u.push(""), u.push(` public ${s(f, h)} get${m} () {`), u.push(` return this.${N.lowerFirst(m)};`), u.push(" }");
3179
3179
  }
3180
3180
  u.push("}");
3181
3181
  }
@@ -3213,10 +3213,10 @@ const D = tt.JavaGeneratorAddition, oi = Zt.createHotSwapPlugin(() => {
3213
3213
  {
3214
3214
  const u = /* @__PURE__ */ new Set();
3215
3215
  u.add(o.value.nonNullAnnotation);
3216
- const p = [], _ = [], g = [...l._getContext().getAssociationMap()[a._attributes.__id]].filter((m) => m._attributes.rule === "Command" || m._attributes.rule === "FacadeCommand");
3217
- for (const m of g) {
3218
- const h = t(m);
3219
- _.push(`public void handle${h}(@${d} ${h} command);`);
3216
+ const p = [], _ = [], g = [...l._getContext().getAssociationMap()[a._attributes.__id]].filter((h) => h._attributes.rule === "Command" || h._attributes.rule === "FacadeCommand");
3217
+ for (const h of g) {
3218
+ const m = t(h);
3219
+ _.push(`public void handle${m}(@${d} ${m} command);`);
3220
3220
  }
3221
3221
  p.push(`public interface ${f} {`), p.push(` ${_.join(`
3222
3222
 
@@ -3237,16 +3237,16 @@ const D = tt.JavaGeneratorAddition, oi = Zt.createHotSwapPlugin(() => {
3237
3237
  );
3238
3238
  if (c.has(D.Lombok)) {
3239
3239
  p.push("@lombok.AllArgsConstructor"), p.push("@lombok.Getter"), p.push(`public class ${f}Impl implements ${f} {`);
3240
- for (const m of _) {
3241
- const h = t(m);
3242
- p.push(` @${d}`), p.push(` private ${h} ${N.lowerFirst(h)};`);
3240
+ for (const h of _) {
3241
+ const m = t(h);
3242
+ p.push(` @${d}`), p.push(` private ${m} ${N.lowerFirst(m)};`);
3243
3243
  }
3244
- const g = [...l._getContext().getAssociationMap()[a._attributes.__id]].filter((m) => m._attributes.rule === "Command" || m._attributes.rule === "FacadeCommand");
3245
- for (const m of g) {
3246
- const h = t(m);
3244
+ const g = [...l._getContext().getAssociationMap()[a._attributes.__id]].filter((h) => h._attributes.rule === "Command" || h._attributes.rule === "FacadeCommand");
3245
+ for (const h of g) {
3246
+ const m = t(h);
3247
3247
  p.push(""), p.push(
3248
- ` public void handle${h}(@${d} ${h} ${N.lowerFirst(
3249
- h
3248
+ ` public void handle${m}(@${d} ${m} ${N.lowerFirst(
3249
+ m
3250
3250
  )}) {`
3251
3251
  ), p.push(" // HACK need implement"), p.push(" }");
3252
3252
  }
@@ -3258,21 +3258,21 @@ const D = tt.JavaGeneratorAddition, oi = Zt.createHotSwapPlugin(() => {
3258
3258
  p.push(` @${d}`), p.push(` private ${y} ${N.lowerFirst(y)};`);
3259
3259
  }
3260
3260
  p.push("");
3261
- const g = [], m = [];
3261
+ const g = [], h = [];
3262
3262
  for (const v of _) {
3263
3263
  const y = t(v);
3264
- g.push(`@${d} ${y} ${N.lowerFirst(y)}`), m.push(`this.${N.lowerFirst(y)} = ${N.lowerFirst(y)};`);
3264
+ g.push(`@${d} ${y} ${N.lowerFirst(y)}`), h.push(`this.${N.lowerFirst(y)} = ${N.lowerFirst(y)};`);
3265
3265
  }
3266
- p.push(` public ${f}(${g.join(", ")}) {`), p.push(` ${m.join(`
3266
+ p.push(` public ${f}(${g.join(", ")}) {`), p.push(` ${h.join(`
3267
3267
  `)}`), p.push(" }");
3268
3268
  for (const v of _) {
3269
3269
  const y = t(v);
3270
3270
  p.push(""), p.push(` @${d}`), p.push(` public ${y} get${y}() {`), p.push(` return this.${N.lowerFirst(y)};`), p.push(" }");
3271
3271
  }
3272
- const h = [...l._getContext().getAssociationMap()[a._attributes.__id]].filter(
3272
+ const m = [...l._getContext().getAssociationMap()[a._attributes.__id]].filter(
3273
3273
  (v) => v._attributes.rule === "Command" || v._attributes.rule === "FacadeCommand"
3274
3274
  );
3275
- for (const v of h) {
3275
+ for (const v of m) {
3276
3276
  const y = t(v);
3277
3277
  p.push(""), p.push(
3278
3278
  ` public void handle${y}(@${d} ${y} ${N.lowerFirst(
@@ -3320,20 +3320,20 @@ const D = tt.JavaGeneratorAddition, oi = Zt.createHotSwapPlugin(() => {
3320
3320
  } else {
3321
3321
  i.push(`public class ${f} {`);
3322
3322
  for (const g of u) {
3323
- const m = t(g);
3324
- i.push(` @${l}`), i.push(` private final ${m} ${N.lowerFirst(m)};`);
3323
+ const h = t(g);
3324
+ i.push(` @${l}`), i.push(` private final ${h} ${N.lowerFirst(h)};`);
3325
3325
  }
3326
3326
  i.push("");
3327
3327
  const p = [], _ = [];
3328
3328
  for (const g of u) {
3329
- const m = t(g);
3330
- p.push(`@${l} ${s(c, g)} ${N.lowerFirst(m)}`), _.push(`this.${N.lowerFirst(m)} = ${N.lowerFirst(m)};`);
3329
+ const h = t(g);
3330
+ p.push(`@${l} ${s(c, g)} ${N.lowerFirst(h)}`), _.push(`this.${N.lowerFirst(h)} = ${N.lowerFirst(h)};`);
3331
3331
  }
3332
3332
  i.push(` public ${f}(${p.join(", ")}) {`), i.push(` ${_.join(`
3333
3333
  `)}`), i.push(" }");
3334
3334
  for (const g of u) {
3335
- const m = t(g);
3336
- i.push(""), i.push(` public ${m} get${m} () {`), i.push(` return this.${N.lowerFirst(m)};`), i.push(" }");
3335
+ const h = t(g);
3336
+ i.push(""), i.push(` public ${h} get${h} () {`), i.push(` return this.${N.lowerFirst(h)};`), i.push(" }");
3337
3337
  }
3338
3338
  i.push("}");
3339
3339
  }
@@ -3350,86 +3350,86 @@ const D = tt.JavaGeneratorAddition, oi = Zt.createHotSwapPlugin(() => {
3350
3350
  const a = [], c = {};
3351
3351
  function l(p) {
3352
3352
  for (const _ of Object.values(p)) {
3353
- const g = [...o.value.namespace.split(/\./), o.value.moduleName, e], m = t(_) + ".java";
3354
- if (c[`${g}/${m}`] === !0)
3353
+ const g = [...o.value.namespace.split(/\./), o.value.moduleName, e], h = t(_) + ".java";
3354
+ if (c[`${g}/${h}`] === !0)
3355
3355
  continue;
3356
- const h = n.commands._genInfoCode(_);
3357
- if (h.length === 0)
3356
+ const m = n.commands._genInfoCode(_);
3357
+ if (m.length === 0)
3358
3358
  continue;
3359
- const v = new R(g, m);
3359
+ const v = new R(g, h);
3360
3360
  v.appendContentln(`package ${o.value.namespace}.${o.value.moduleName}.${e};`), v.appendContentln("");
3361
- for (const y of h[0].imports)
3361
+ for (const y of m[0].imports)
3362
3362
  v.appendContentln(`import ${y};`);
3363
- v.appendContentln(""), v.appendContentln(h[0].content), a.push(v), c[`${g}/${m}`] = !0;
3363
+ v.appendContentln(""), v.appendContentln(m[0].content), a.push(v), c[`${g}/${h}`] = !0;
3364
3364
  }
3365
3365
  }
3366
3366
  const d = n.states.designer.value._getContext().getCommands();
3367
3367
  for (const p of d) {
3368
3368
  l(p.inner);
3369
3369
  const _ = n.commands._genCommandCode(p), g = [...o.value.namespace.split(/\./), o.value.moduleName];
3370
- _.forEach((m) => {
3371
- if (m.type === "Command") {
3372
- const h = new R(g, t(p) + ".java");
3373
- h.appendContentln(`package ${o.value.namespace}.${o.value.moduleName};`), h.appendContentln(""), h.addImports(m.imports);
3374
- for (const v of m.imports)
3375
- h.appendContentln(`import ${v};`);
3376
- h.appendContentln(""), h.appendContentln(m.content), a.push(h);
3377
- } else if (m.type === "CommandHandler") {
3378
- const h = new R(g, t(p) + "Handler.java");
3379
- h.appendContentln(`package ${o.value.namespace}.${o.value.moduleName};`), h.appendContentln(""), h.addImports(m.imports);
3380
- for (const v of m.imports)
3381
- h.appendContentln(`import ${v};`);
3382
- h.appendContentln(""), h.appendContentln(m.content), a.push(h);
3370
+ _.forEach((h) => {
3371
+ if (h.type === "Command") {
3372
+ const m = new R(g, t(p) + ".java");
3373
+ m.appendContentln(`package ${o.value.namespace}.${o.value.moduleName};`), m.appendContentln(""), m.addImports(h.imports);
3374
+ for (const v of h.imports)
3375
+ m.appendContentln(`import ${v};`);
3376
+ m.appendContentln(""), m.appendContentln(h.content), a.push(m);
3377
+ } else if (h.type === "CommandHandler") {
3378
+ const m = new R(g, t(p) + "Handler.java");
3379
+ m.appendContentln(`package ${o.value.namespace}.${o.value.moduleName};`), m.appendContentln(""), m.addImports(h.imports);
3380
+ for (const v of h.imports)
3381
+ m.appendContentln(`import ${v};`);
3382
+ m.appendContentln(""), m.appendContentln(h.content), a.push(m);
3383
3383
  } else
3384
- isNever(m.type);
3384
+ isNever(h.type);
3385
3385
  });
3386
3386
  }
3387
3387
  const f = n.states.designer.value._getContext().getFacadeCommands();
3388
3388
  for (const p of f) {
3389
3389
  l(p.inner);
3390
3390
  const _ = n.commands._genFacadeCommandCode(p), g = [...o.value.namespace.split(/\./), o.value.moduleName];
3391
- _.forEach((m) => {
3392
- if (m.type === "FacadeCommand") {
3393
- const h = new R(g, t(p) + ".java");
3394
- h.appendContentln(`package ${o.value.namespace}.${o.value.moduleName};`), h.appendContentln(""), h.addImports(m.imports);
3395
- for (const v of m.imports)
3396
- h.appendContentln(`import ${v};`);
3397
- h.appendContentln(""), h.appendContentln(m.content), a.push(h);
3391
+ _.forEach((h) => {
3392
+ if (h.type === "FacadeCommand") {
3393
+ const m = new R(g, t(p) + ".java");
3394
+ m.appendContentln(`package ${o.value.namespace}.${o.value.moduleName};`), m.appendContentln(""), m.addImports(h.imports);
3395
+ for (const v of h.imports)
3396
+ m.appendContentln(`import ${v};`);
3397
+ m.appendContentln(""), m.appendContentln(h.content), a.push(m);
3398
3398
  } else
3399
- isNever(m.type);
3399
+ isNever(h.type);
3400
3400
  });
3401
3401
  }
3402
3402
  const i = n.states.designer.value._getContext().getAggs();
3403
3403
  for (const p of i) {
3404
3404
  l(p.inner);
3405
3405
  const _ = n.commands._genAggCode(p), g = [...o.value.namespace.split(/\./), o.value.moduleName];
3406
- _.forEach((m) => {
3407
- if (m.type === "Agg") {
3408
- const h = new R(g, t(p) + ".java");
3409
- h.appendContentln(`package ${o.value.namespace}.${o.value.moduleName};`), h.appendContentln(""), h.addImports(m.imports);
3410
- for (const v of m.imports)
3411
- h.appendContentln(`import ${v};`);
3412
- h.appendContentln(""), h.appendContentln(m.content), a.push(h);
3413
- } else if (m.type === "AggImpl") {
3414
- const h = new R(g, t(p) + "Impl.java");
3415
- h.appendContentln(`package ${o.value.namespace}.${o.value.moduleName};`), h.appendContentln(""), h.addImports(m.imports);
3416
- for (const v of m.imports)
3417
- h.appendContentln(`import ${v};`);
3418
- h.appendContentln(""), h.appendContentln(m.content), a.push(h);
3406
+ _.forEach((h) => {
3407
+ if (h.type === "Agg") {
3408
+ const m = new R(g, t(p) + ".java");
3409
+ m.appendContentln(`package ${o.value.namespace}.${o.value.moduleName};`), m.appendContentln(""), m.addImports(h.imports);
3410
+ for (const v of h.imports)
3411
+ m.appendContentln(`import ${v};`);
3412
+ m.appendContentln(""), m.appendContentln(h.content), a.push(m);
3413
+ } else if (h.type === "AggImpl") {
3414
+ const m = new R(g, t(p) + "Impl.java");
3415
+ m.appendContentln(`package ${o.value.namespace}.${o.value.moduleName};`), m.appendContentln(""), m.addImports(h.imports);
3416
+ for (const v of h.imports)
3417
+ m.appendContentln(`import ${v};`);
3418
+ m.appendContentln(""), m.appendContentln(h.content), a.push(m);
3419
3419
  } else
3420
- isNever(m.type);
3420
+ isNever(h.type);
3421
3421
  });
3422
3422
  }
3423
3423
  const u = n.states.designer.value._getContext().getEvents();
3424
3424
  for (const p of u) {
3425
3425
  l(p.inner);
3426
3426
  const _ = n.commands._genEventCode(p), g = [...o.value.namespace.split(/\./), o.value.moduleName];
3427
- _.forEach((m) => {
3428
- const h = new R(g, t(p) + ".java");
3429
- h.appendContentln(`package ${o.value.namespace}.${o.value.moduleName};`), h.appendContentln(""), h.addImports(m.imports);
3430
- for (const v of m.imports)
3431
- h.appendContentln(`import ${v};`);
3432
- h.appendContentln(""), h.appendContentln(m.content), a.push(h);
3427
+ _.forEach((h) => {
3428
+ const m = new R(g, t(p) + ".java");
3429
+ m.appendContentln(`package ${o.value.namespace}.${o.value.moduleName};`), m.appendContentln(""), m.addImports(h.imports);
3430
+ for (const v of h.imports)
3431
+ m.appendContentln(`import ${v};`);
3432
+ m.appendContentln(""), m.appendContentln(h.content), a.push(m);
3433
3433
  });
3434
3434
  }
3435
3435
  return a;
@@ -3582,28 +3582,28 @@ const D = tt.JavaGeneratorAddition, oi = Zt.createHotSwapPlugin(() => {
3582
3582
  const _ = [...n.value.namespace.split(/\./), n.value.moduleName, t], g = o(p) + ".kt";
3583
3583
  if (a[`${_}/${g}`] === !0)
3584
3584
  continue;
3585
- const m = e.commands._genInfoCode(p);
3586
- if (m.length === 0)
3585
+ const h = e.commands._genInfoCode(p);
3586
+ if (h.length === 0)
3587
3587
  continue;
3588
- const h = new R(_, g);
3589
- h.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}.${t}`), h.appendContentln("");
3590
- for (const v of m[0].imports)
3591
- h.appendContentln(`import ${v}`);
3592
- h.appendContentln(""), h.appendContentln(m[0].content), r.push(h), a[`${_}/${g}`] = !0;
3588
+ const m = new R(_, g);
3589
+ m.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}.${t}`), m.appendContentln("");
3590
+ for (const v of h[0].imports)
3591
+ m.appendContentln(`import ${v}`);
3592
+ m.appendContentln(""), m.appendContentln(h[0].content), r.push(m), a[`${_}/${g}`] = !0;
3593
3593
  }
3594
3594
  }
3595
3595
  const l = e.states.designer.value._getContext().getCommands();
3596
3596
  for (const u of l) {
3597
3597
  c(u.inner);
3598
- const p = e.commands._genCommandCode(u), _ = [...n.value.namespace.split(/\./), n.value.moduleName], g = new R(_, o(u) + ".kt"), m = [];
3599
- g.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`), g.appendContentln(""), p.forEach((h) => {
3600
- h.type === "Command" || h.type === "CommandHandler" ? (g.addImports(h.imports), m.push(h.content)) : isNever(h.type);
3598
+ const p = e.commands._genCommandCode(u), _ = [...n.value.namespace.split(/\./), n.value.moduleName], g = new R(_, o(u) + ".kt"), h = [];
3599
+ g.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`), g.appendContentln(""), p.forEach((m) => {
3600
+ m.type === "Command" || m.type === "CommandHandler" ? (g.addImports(m.imports), h.push(m.content)) : isNever(m.type);
3601
3601
  });
3602
- for (const h of g.getImports())
3603
- g.appendContentln(`import ${h}`);
3602
+ for (const m of g.getImports())
3603
+ g.appendContentln(`import ${m}`);
3604
3604
  g.appendContentln("");
3605
- for (const h of m)
3606
- g.appendContentln(h);
3605
+ for (const m of h)
3606
+ g.appendContentln(m);
3607
3607
  r.push(g);
3608
3608
  }
3609
3609
  const d = e.states.designer.value._getContext().getFacadeCommands();
@@ -3612,11 +3612,11 @@ const D = tt.JavaGeneratorAddition, oi = Zt.createHotSwapPlugin(() => {
3612
3612
  const p = e.commands._genFacadeCommandCode(u), _ = [...n.value.namespace.split(/\./), n.value.moduleName];
3613
3613
  p.forEach((g) => {
3614
3614
  if (g.type === "FacadeCommand") {
3615
- const m = new R(_, o(u) + ".kt");
3616
- m.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`), m.appendContentln(""), m.addImports(g.imports);
3617
- for (const h of g.imports)
3618
- m.appendContentln(`import ${h}`);
3619
- m.appendContentln(""), m.appendContentln(g.content), r.push(m);
3615
+ const h = new R(_, o(u) + ".kt");
3616
+ h.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`), h.appendContentln(""), h.addImports(g.imports);
3617
+ for (const m of g.imports)
3618
+ h.appendContentln(`import ${m}`);
3619
+ h.appendContentln(""), h.appendContentln(g.content), r.push(h);
3620
3620
  } else
3621
3621
  isNever(g.type);
3622
3622
  });
@@ -3624,15 +3624,15 @@ const D = tt.JavaGeneratorAddition, oi = Zt.createHotSwapPlugin(() => {
3624
3624
  const f = e.states.designer.value._getContext().getAggs();
3625
3625
  for (const u of f) {
3626
3626
  c(u.inner);
3627
- const p = e.commands._genAggCode(u), _ = [...n.value.namespace.split(/\./), n.value.moduleName], g = new R(_, o(u) + ".kt"), m = [];
3628
- p.forEach((h) => {
3629
- h.type === "Agg" || h.type === "AggImpl" ? (g.addImports(h.imports), m.push(h.content)) : isNever(h.type);
3627
+ const p = e.commands._genAggCode(u), _ = [...n.value.namespace.split(/\./), n.value.moduleName], g = new R(_, o(u) + ".kt"), h = [];
3628
+ g.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`), g.appendContentln(""), p.forEach((m) => {
3629
+ m.type === "Agg" || m.type === "AggImpl" ? (g.addImports(m.imports), h.push(m.content)) : isNever(m.type);
3630
3630
  });
3631
- for (const h of g.getImports())
3632
- g.appendContentln(`import ${h}`);
3631
+ for (const m of g.getImports())
3632
+ g.appendContentln(`import ${m}`);
3633
3633
  g.appendContentln("");
3634
- for (const h of m)
3635
- g.appendContentln(h);
3634
+ for (const m of h)
3635
+ g.appendContentln(m);
3636
3636
  r.push(g);
3637
3637
  }
3638
3638
  const i = e.states.designer.value._getContext().getEvents();
@@ -3641,11 +3641,11 @@ const D = tt.JavaGeneratorAddition, oi = Zt.createHotSwapPlugin(() => {
3641
3641
  const p = e.commands._genEventCode(u), _ = [...n.value.namespace.split(/\./), n.value.moduleName];
3642
3642
  p.forEach((g) => {
3643
3643
  if (g.type === "Event") {
3644
- const m = new R(_, o(u) + ".kt");
3645
- m.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`), m.appendContentln(""), m.addImports(g.imports);
3646
- for (const h of g.imports)
3647
- m.appendContentln(`import ${h}`);
3648
- m.appendContentln(""), m.appendContentln(g.content), r.push(m);
3644
+ const h = new R(_, o(u) + ".kt");
3645
+ h.appendContentln(`package ${n.value.namespace}.${n.value.moduleName}`), h.appendContentln(""), h.addImports(g.imports);
3646
+ for (const m of g.imports)
3647
+ h.appendContentln(`import ${m}`);
3648
+ h.appendContentln(""), h.appendContentln(g.content), r.push(h);
3649
3649
  } else
3650
3650
  isNever(g.type);
3651
3651
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddd-tool/domain-designer-generator",
3
- "version": "0.0.0-alpha.7",
3
+ "version": "0.0.0-alpha.8",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "keywords": [],