@luminix/core 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.js CHANGED
@@ -1,8 +1,8 @@
1
- var he = Object.defineProperty;
2
- var le = (o, t, e) => t in o ? he(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
3
- var p = (o, t, e) => le(o, typeof t != "symbol" ? t + "" : t, e);
4
- import { reader as ce, PropertyBag as _, EventSource as A, Collection as b, Query as S, Obj as d, Str as m, Reducible as re, isValidationError as de, Macroable as ie, Client as pe, ServiceProvider as ge, MakeFacade as M, Application as ye, Response as me } from "@luminix/support";
5
- class fe {
1
+ var le = Object.defineProperty;
2
+ var ce = (o, t, e) => t in o ? le(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
3
+ var p = (o, t, e) => ce(o, typeof t != "symbol" ? t + "" : t, e);
4
+ import { reader as de, PropertyBag as _, EventSource as A, Collection as b, Query as S, Obj as d, Str as m, Reducible as ie, isValidationError as pe, Macroable as ne, Client as ge, ServiceProvider as ye, MakeFacade as M, Application as me, Response as fe } from "@luminix/support";
5
+ class we {
6
6
  constructor(t, e, i) {
7
7
  p(this, "_user");
8
8
  this.config = t, this.model = e, this.route = i;
@@ -51,13 +51,13 @@ class fe {
51
51
  return ((t = this.user()) == null ? void 0 : t.getKey()) || null;
52
52
  }
53
53
  }
54
- class we {
54
+ class ve {
55
55
  constructor() {
56
56
  p(this, "bags");
57
57
  const t = {};
58
58
  document.querySelectorAll('#luminix-embed [id^="luminix-error"]').forEach((i) => {
59
59
  const c = i.id.replace("luminix-error::", "");
60
- t[c] = ce(c, "error");
60
+ t[c] = de(c, "error");
61
61
  }), this.bags = {
62
62
  default: new _(t)
63
63
  };
@@ -81,7 +81,7 @@ class we {
81
81
  this.bag(t).set(".", {});
82
82
  }
83
83
  }
84
- class ve {
84
+ class be {
85
85
  constructor(t) {
86
86
  this._debug = t;
87
87
  }
@@ -110,14 +110,14 @@ class ve {
110
110
  this._debug && console.debug(...t);
111
111
  }
112
112
  }
113
- var k, j;
114
- class be extends (j = Error, k = Symbol.toStringTag, j) {
113
+ var j, O;
114
+ class xe extends (O = Error, j = Symbol.toStringTag, O) {
115
115
  constructor(e) {
116
116
  super(`[Luminix] Model "${e}" does not have a primary key`);
117
- p(this, k, "ModelWithoutPrimaryKeyException");
117
+ p(this, j, "ModelWithoutPrimaryKeyException");
118
118
  }
119
119
  }
120
- class xe extends A {
120
+ class Me extends A {
121
121
  constructor(e, i, s = {}) {
122
122
  super();
123
123
  p(this, "bag");
@@ -262,7 +262,7 @@ class xe extends A {
262
262
  async find(e) {
263
263
  const i = this.services.model.schema(this.abstract).primaryKey;
264
264
  if (!i)
265
- throw new be(this.abstract);
265
+ throw new xe(this.abstract);
266
266
  const s = await this.where(i, e).limit(1).exec(1);
267
267
  return this.emit("success", {
268
268
  response: s,
@@ -289,25 +289,25 @@ class xe extends A {
289
289
  }), l;
290
290
  }
291
291
  }
292
- var O, B;
293
- class f extends (B = TypeError, O = Symbol.toStringTag, B) {
292
+ var B, C;
293
+ class f extends (C = TypeError, B = Symbol.toStringTag, C) {
294
294
  constructor(e, i = "Model") {
295
295
  super(`[Luminix] "${e}" expects ${i}`);
296
- p(this, O, "NotModelException");
296
+ p(this, B, "NotModelException");
297
297
  }
298
298
  }
299
- var C, I;
300
- class Me extends (I = Error, C = Symbol.toStringTag, I) {
299
+ var I, P;
300
+ class Ee extends (P = Error, I = Symbol.toStringTag, P) {
301
301
  constructor(e, i, s, c) {
302
302
  super(`[Luminix] Could not determine inverse relation for "${i}" in model "${e}". Please specify a relation in model "${s}" of type ${c} that points back to "${e}".`);
303
- p(this, C, "NoInverseRelationException");
303
+ p(this, I, "NoInverseRelationException");
304
304
  }
305
305
  }
306
- var P, Q;
307
- class Ee extends (Q = Error, P = Symbol.toStringTag, Q) {
306
+ var Q, D;
307
+ class $e extends (D = Error, Q = Symbol.toStringTag, D) {
308
308
  constructor(e) {
309
309
  super(`[Luminix] Relation "${e}" is not supported`);
310
- p(this, P, "UnsupportedRelationException");
310
+ p(this, Q, "UnsupportedRelationException");
311
311
  }
312
312
  }
313
313
  class R {
@@ -345,13 +345,13 @@ class R {
345
345
  MorphToMany: ["MorphToMany"]
346
346
  }, this.parent, e, this.getRelated());
347
347
  if (!(e in i))
348
- throw new Ee(e);
348
+ throw new $e(e);
349
349
  for (const s in t) {
350
350
  const c = t[s];
351
351
  if ((c.model === this.parent.getType() || ["MorphOne", "MorphMany"].includes(e)) && i[e].includes(c.type))
352
352
  return s;
353
353
  }
354
- throw new Me(this.parent.getType(), e, this.getRelated().getSchemaName(), i[e].join(" or "));
354
+ throw new Ee(this.parent.getType(), e, this.getRelated().getSchemaName(), i[e].join(" or "));
355
355
  }
356
356
  set(t) {
357
357
  if (t !== null && !d.isModel(t) && !(t instanceof b && t.every(d.isModel)))
@@ -434,28 +434,28 @@ class R {
434
434
  // return this.query().find(id);
435
435
  // }
436
436
  }
437
- var D, H;
438
- class E extends (H = Error, D = Symbol.toStringTag, H) {
437
+ var H, L;
438
+ class E extends (L = Error, H = Symbol.toStringTag, L) {
439
439
  constructor(e) {
440
440
  super(`[Luminix] Expected ${e} to be reducible.`);
441
- p(this, D, "NotReducibleException");
441
+ p(this, H, "NotReducibleException");
442
442
  }
443
443
  }
444
- var L, J;
445
- class $e extends (J = Error, L = Symbol.toStringTag, J) {
444
+ var J, U;
445
+ class Se extends (U = Error, J = Symbol.toStringTag, U) {
446
446
  constructor() {
447
447
  super("[Luminix] Method not implemented.");
448
- p(this, L, "MethodNotImplementedException");
448
+ p(this, J, "MethodNotImplementedException");
449
449
  }
450
450
  }
451
- var U, F;
452
- class ne extends (F = Error, U = Symbol.toStringTag, F) {
451
+ var F, G;
452
+ class oe extends (G = Error, F = Symbol.toStringTag, G) {
453
453
  constructor(e, i) {
454
454
  super(`[Luminix] Model "${e}" must be persisted before calling "${i}"`);
455
- p(this, U, "ModelNotPersistedException");
455
+ p(this, F, "ModelNotPersistedException");
456
456
  }
457
457
  }
458
- function Se(o, t, e, i, s) {
458
+ function _e(o, t, e, i, s) {
459
459
  var c, y, l;
460
460
  return l = class extends (y = A, c = Symbol.toStringTag, y) {
461
461
  constructor(r = {}) {
@@ -740,7 +740,7 @@ function Se(o, t, e, i, s) {
740
740
  }
741
741
  async refresh(r) {
742
742
  if (!this.exists)
743
- throw new ne(s, "refresh");
743
+ throw new oe(s, "refresh");
744
744
  const n = await i.call(
745
745
  this.getRouteForRefresh(),
746
746
  r,
@@ -775,7 +775,7 @@ function Se(o, t, e, i, s) {
775
775
  }
776
776
  }
777
777
  async push() {
778
- throw new $e();
778
+ throw new Se();
779
779
  }
780
780
  async delete() {
781
781
  try {
@@ -842,7 +842,7 @@ function Se(o, t, e, i, s) {
842
842
  return e.schema(s);
843
843
  }
844
844
  static query() {
845
- return new xe(
845
+ return new Me(
846
846
  { config: o, route: i, model: e },
847
847
  s
848
848
  );
@@ -929,7 +929,7 @@ function Se(o, t, e, i, s) {
929
929
  }
930
930
  }, p(l, "name", m.studly(s)), l;
931
931
  }
932
- function _e(o, t, e) {
932
+ function Te(o, t, e) {
933
933
  var i, s;
934
934
  return class extends (s = e, i = Symbol.toStringTag, s) {
935
935
  constructor(y = {}) {
@@ -963,21 +963,21 @@ function _e(o, t, e) {
963
963
  }
964
964
  };
965
965
  }
966
- var G, V;
967
- class K extends (V = Error, G = Symbol.toStringTag, V) {
966
+ var V, W;
967
+ class K extends (W = Error, V = Symbol.toStringTag, W) {
968
968
  constructor(e) {
969
969
  super(`[Luminix] Model "${e}" not found`);
970
- p(this, G, "ModelNotFoundException");
970
+ p(this, V, "ModelNotFoundException");
971
971
  }
972
972
  }
973
- var W, z;
974
- class T extends (z = TypeError, W = Symbol.toStringTag, z) {
973
+ var z, X;
974
+ class T extends (X = TypeError, z = Symbol.toStringTag, X) {
975
975
  constructor(e, i, s) {
976
976
  super(`[Luminix] "${e}" expects a related model of type "${i}". Received "${s}" instead.`);
977
- p(this, W, "ModelInvalidRelatedTypeException");
977
+ p(this, z, "ModelInvalidRelatedTypeException");
978
978
  }
979
979
  }
980
- class oe extends R {
980
+ class ae extends R {
981
981
  constructor(t, e, i, s = null) {
982
982
  if (!d.isModel(s) && s !== null)
983
983
  throw new f("BelongsTo.constructor()", "Model or null");
@@ -1002,7 +1002,7 @@ class oe extends R {
1002
1002
  if (t.getType() !== this.getRelated().getSchemaName())
1003
1003
  throw new T("BelongsTo.associate()", this.getRelated().getSchemaName(), t.getType());
1004
1004
  if (!t.exists)
1005
- throw new ne(this.getRelated().getSchemaName(), "save");
1005
+ throw new oe(this.getRelated().getSchemaName(), "save");
1006
1006
  return this.parent.update({
1007
1007
  [this.getForeignKey()]: t.getKey()
1008
1008
  });
@@ -1013,7 +1013,7 @@ class oe extends R {
1013
1013
  });
1014
1014
  }
1015
1015
  }
1016
- class ae extends R {
1016
+ class ue extends R {
1017
1017
  constructor(t, e, i, s = null) {
1018
1018
  if (s !== null && !(s instanceof b && s.every(d.isModel)))
1019
1019
  throw new f("BelongsToMany.constructor()", "Collection<Model> or null");
@@ -1122,7 +1122,7 @@ class N extends R {
1122
1122
  t.setAttribute(this.getForeignKey(), this.parent.getKey()), await t.save();
1123
1123
  }
1124
1124
  }
1125
- class Te extends N {
1125
+ class Re extends N {
1126
1126
  constructor(t, e, i, s = null) {
1127
1127
  if (!d.isModel(s) && s !== null)
1128
1128
  throw new f("HasOne.constructor()", "Model or null");
@@ -1141,7 +1141,10 @@ class Te extends N {
1141
1141
  await this.saveQuietly(t), this.items = t;
1142
1142
  }
1143
1143
  }
1144
- class Re extends N {
1144
+ function k(o) {
1145
+ return new b(o);
1146
+ }
1147
+ class Ae extends N {
1145
1148
  constructor(t, e, i, s = null) {
1146
1149
  if (s !== null && !(s instanceof b && s.every(d.isModel)))
1147
1150
  throw new f("HasMany.constructor()", "Collection<Model> or null");
@@ -1173,15 +1176,13 @@ class Re extends N {
1173
1176
  await Promise.all(t.map((e) => (e.setAttribute(this.getForeignKey(), this.parent.getKey()), e.save())));
1174
1177
  }
1175
1178
  async saveMany(t) {
1176
- await this.saveManyQuietly(t);
1177
- const e = await this.all();
1178
- this.items ? this.items.splice(0, this.items.count(), ...e) : this.items = e;
1179
+ await this.saveManyQuietly(t), this.items ? this.items.splice(0, this.items.count(), ...t) : this.items = k(t);
1179
1180
  }
1180
1181
  async save(t) {
1181
- await this.saveQuietly(t), this.items === null ? this.items = await this.all() : this.items.push(t);
1182
+ await this.saveQuietly(t), this.items === null ? this.items = k([t]) : this.items.push(t);
1182
1183
  }
1183
1184
  }
1184
- class ue extends N {
1185
+ class he extends N {
1185
1186
  query() {
1186
1187
  const t = this.getRelated().query();
1187
1188
  t.once("success", (i) => {
@@ -1199,7 +1200,7 @@ class ue extends N {
1199
1200
  t.setAttribute(e + "_id", this.parent.getKey()), t.setAttribute(e + "_type", this.parent.getType()), await t.save();
1200
1201
  }
1201
1202
  }
1202
- class Ae extends ue {
1203
+ class Ne extends he {
1203
1204
  constructor(t, e, i, s = null) {
1204
1205
  if (s !== null && !(s instanceof b && s.every(d.isModel)))
1205
1206
  throw new f("MorphMany.constructor()", "Collection<Model> or null");
@@ -1239,7 +1240,7 @@ class Ae extends ue {
1239
1240
  this.items ? this.items.splice(0, this.items.count(), ...e) : this.items = e;
1240
1241
  }
1241
1242
  }
1242
- class Ne extends ue {
1243
+ class qe extends he {
1243
1244
  constructor(t, e, i, s = null) {
1244
1245
  if (super(t, e, i, s), this.services = t, this.meta = e, this.parent = i, this.items = s, s !== null && !d.isModel(s))
1245
1246
  throw new f("MorphOne.constructor()", "Model or null");
@@ -1257,7 +1258,7 @@ class Ne extends ue {
1257
1258
  await this.saveQuietly(t), this.items = t;
1258
1259
  }
1259
1260
  }
1260
- class qe extends oe {
1261
+ class Ke extends ae {
1261
1262
  getRelated() {
1262
1263
  return this.services.model.make(
1263
1264
  this.parent.getAttribute(this.getName() + "_type")
@@ -1286,24 +1287,24 @@ class qe extends oe {
1286
1287
  });
1287
1288
  }
1288
1289
  }
1289
- class Ke extends ae {
1290
+ class ke extends ue {
1290
1291
  query() {
1291
1292
  const t = super.query(), e = this.guessInverseRelation();
1292
1293
  return t.where(e + "_id", this.parent.getKey()), t.where(e + "_type", this.parent.getType()), t.lock(`where.${e}_id`), t.lock(`where.${e}_type`), t;
1293
1294
  }
1294
1295
  }
1295
- var X, Y;
1296
- class ke extends (Y = A, X = Symbol.toStringTag, Y) {
1296
+ var Y, Z;
1297
+ class je extends (Z = A, Y = Symbol.toStringTag, Z) {
1297
1298
  constructor(e) {
1298
1299
  super();
1299
1300
  p(this, "_models", {});
1300
- p(this, X, "ModelService");
1301
+ p(this, Y, "ModelService");
1301
1302
  this._schema = e;
1302
1303
  }
1303
1304
  boot(e) {
1304
1305
  this._schema && Object.keys(this._schema).forEach((i) => {
1305
1306
  const s = this[`model${m.studly(i)}`], c = this.model(
1306
- Se(
1307
+ _e(
1307
1308
  e.make("config"),
1308
1309
  e.make("log"),
1309
1310
  e.make("model"),
@@ -1312,7 +1313,7 @@ class ke extends (Y = A, X = Symbol.toStringTag, Y) {
1312
1313
  ),
1313
1314
  i
1314
1315
  ), y = s(c);
1315
- this._models[i] = _e(e.make("model"), i, y);
1316
+ this._models[i] = Te(e.make("model"), i, y);
1316
1317
  });
1317
1318
  }
1318
1319
  schema(e) {
@@ -1327,29 +1328,29 @@ class ke extends (Y = A, X = Symbol.toStringTag, Y) {
1327
1328
  }
1328
1329
  getRelationConstructors(e) {
1329
1330
  return this.relationMap({
1330
- BelongsTo: oe,
1331
- BelongsToMany: ae,
1332
- HasOne: Te,
1333
- HasMany: Re,
1334
- MorphMany: Ae,
1335
- MorphOne: Ne,
1336
- MorphTo: qe,
1337
- MorphToMany: Ke
1331
+ BelongsTo: ae,
1332
+ BelongsToMany: ue,
1333
+ HasOne: Re,
1334
+ HasMany: Ae,
1335
+ MorphMany: Ne,
1336
+ MorphOne: qe,
1337
+ MorphTo: Ke,
1338
+ MorphToMany: ke
1338
1339
  }, e);
1339
1340
  }
1340
1341
  toString() {
1341
1342
  return "model";
1342
1343
  }
1343
1344
  }
1344
- const je = re(ke);
1345
- var Z, ee;
1346
- class Oe extends (ee = Error, Z = Symbol.toStringTag, ee) {
1345
+ const Oe = ie(je);
1346
+ var ee, te;
1347
+ class Be extends (te = Error, ee = Symbol.toStringTag, te) {
1347
1348
  constructor(e) {
1348
1349
  super(`[Luminix] Route "${e}" not found`);
1349
- p(this, Z, "RouteNotFoundException");
1350
+ p(this, ee, "RouteNotFoundException");
1350
1351
  }
1351
1352
  }
1352
- class Be {
1353
+ class Ce {
1353
1354
  constructor(t, e, i, s = "") {
1354
1355
  this.routes = t, this.error = e, this.http = i, this.appUrl = s;
1355
1356
  }
@@ -1368,7 +1369,7 @@ class Be {
1368
1369
  }
1369
1370
  get(t) {
1370
1371
  if (!this.exists(t))
1371
- throw new Oe(t);
1372
+ throw new Be(t);
1372
1373
  return d.get(this.routes, t);
1373
1374
  }
1374
1375
  url(t) {
@@ -1404,7 +1405,7 @@ class Be {
1404
1405
  const n = y[0] ?? r.method;
1405
1406
  this.error.clear(i);
1406
1407
  const a = await u[n](l);
1407
- if (de(a)) {
1408
+ if (pe(a)) {
1408
1409
  const h = a.json("errors");
1409
1410
  this.error.set(Object.entries(h).reduce((g, [w, v]) => (g[w] = v.join(" "), g), {}), i);
1410
1411
  } else a.failed() && this.error.set(
@@ -1422,10 +1423,10 @@ class Be {
1422
1423
  return "route";
1423
1424
  }
1424
1425
  }
1425
- const Ce = re(Be);
1426
- class Ie {
1426
+ const Ie = ie(Ce);
1427
+ class Pe {
1427
1428
  getClient() {
1428
- return new pe();
1429
+ return new ge();
1429
1430
  }
1430
1431
  baseUrl(t) {
1431
1432
  return this.getClient().baseUrl(t);
@@ -1478,12 +1479,12 @@ class Ie {
1478
1479
  return this.getClient().delete(t, e);
1479
1480
  }
1480
1481
  }
1481
- const Pe = ie(Ie);
1482
- var te, se;
1483
- class Qe extends (se = ge, te = Symbol.toStringTag, se) {
1482
+ const Qe = ne(Pe);
1483
+ var se, re;
1484
+ class De extends (re = ye, se = Symbol.toStringTag, re) {
1484
1485
  constructor() {
1485
1486
  super(...arguments);
1486
- p(this, te, "LuminixServiceProvider");
1487
+ p(this, se, "LuminixServiceProvider");
1487
1488
  }
1488
1489
  register() {
1489
1490
  this.registerServices(), this.registerMacros(), this.app.on("ready", () => {
@@ -1494,24 +1495,24 @@ class Qe extends (se = ge, te = Symbol.toStringTag, se) {
1494
1495
  this.app.make("model").boot(this.app);
1495
1496
  }
1496
1497
  registerServices() {
1497
- this.app.singleton("auth", () => new fe(
1498
+ this.app.singleton("auth", () => new we(
1498
1499
  this.app.make("config"),
1499
1500
  this.app.make("model"),
1500
1501
  this.app.make("route")
1501
1502
  )), this.app.singleton("config", () => {
1502
1503
  const e = new _(d.omit(this.app.configuration, "manifest"));
1503
1504
  return e.has("auth.user") || e.set("auth.user", null), e.lock("auth.user"), e;
1504
- }), this.app.singleton("error", () => new we()), this.app.singleton("http", () => new Pe()), this.app.singleton("log", () => {
1505
+ }), this.app.singleton("error", () => new ve()), this.app.singleton("http", () => new Qe()), this.app.singleton("log", () => {
1505
1506
  var e;
1506
- return new ve(((e = this.app.configuration.app) == null ? void 0 : e.debug) ?? !1);
1507
+ return new be(((e = this.app.configuration.app) == null ? void 0 : e.debug) ?? !1);
1507
1508
  }), this.app.singleton("model", () => {
1508
1509
  var e;
1509
- return new je(
1510
+ return new Oe(
1510
1511
  ((e = this.app.configuration.manifest) == null ? void 0 : e.models) ?? {}
1511
1512
  );
1512
1513
  }), this.app.singleton("route", () => {
1513
1514
  var e, i;
1514
- return new Ce(
1515
+ return new Ie(
1515
1516
  ((e = this.app.configuration.manifest) == null ? void 0 : e.routes) ?? {},
1516
1517
  this.app.make("error"),
1517
1518
  () => this.app.make("http"),
@@ -1525,29 +1526,29 @@ class Qe extends (se = ge, te = Symbol.toStringTag, se) {
1525
1526
  });
1526
1527
  }
1527
1528
  }
1528
- class De {
1529
+ class He {
1529
1530
  constructor() {
1530
1531
  p(this, "app");
1531
1532
  }
1532
1533
  getFacadeAccessor() {
1533
- return this.app || (this.app = new (ie(ye))([
1534
- Qe
1534
+ return this.app || (this.app = new (ne(me))([
1535
+ De
1535
1536
  ])), this.app;
1536
1537
  }
1537
1538
  down() {
1538
1539
  this.app && (this.app.flush(), delete this.app);
1539
1540
  }
1541
+ setInstance(t) {
1542
+ this.down(), this.app = t;
1543
+ }
1540
1544
  }
1541
- const x = M(De);
1545
+ const x = M(He);
1542
1546
  function $(o = void 0) {
1543
1547
  return typeof o != "string" ? x : x.make(o);
1544
1548
  }
1545
- function Xe() {
1549
+ function Ye() {
1546
1550
  return $("auth");
1547
1551
  }
1548
- function Ye(o) {
1549
- return new b(o);
1550
- }
1551
1552
  function Ze(o, t) {
1552
1553
  const e = $("config");
1553
1554
  return typeof o > "u" ? e : e.get(o, t);
@@ -1567,48 +1568,48 @@ function rt(o, t = !1) {
1567
1568
  const e = $("route");
1568
1569
  return o ? t ? e.url([o, t]) : e.url(o) : e;
1569
1570
  }
1570
- class He {
1571
+ class Le {
1571
1572
  getFacadeAccessor() {
1572
1573
  return "auth";
1573
1574
  }
1574
1575
  }
1575
- const it = M(He, x);
1576
- class Le {
1576
+ const it = M(Le, x);
1577
+ class Je {
1577
1578
  getFacadeAccessor() {
1578
1579
  return "config";
1579
1580
  }
1580
1581
  }
1581
- const nt = M(Le, x), ot = (o) => o instanceof me && o.unprocessableEntity() && typeof o.json("message") == "string" && typeof o.json("errors") == "object" && o.json("errors") !== null && Object.values(o.json("errors")).every((t) => Array.isArray(t) && t.every((e) => typeof e == "string"));
1582
- class Je {
1582
+ const nt = M(Je, x), ot = (o) => o instanceof fe && o.unprocessableEntity() && typeof o.json("message") == "string" && typeof o.json("errors") == "object" && o.json("errors") !== null && Object.values(o.json("errors")).every((t) => Array.isArray(t) && t.every((e) => typeof e == "string"));
1583
+ class Ue {
1583
1584
  getFacadeAccessor() {
1584
1585
  return "error";
1585
1586
  }
1586
1587
  }
1587
- const at = M(Je, x);
1588
- class Ue {
1588
+ const at = M(Ue, x);
1589
+ class Fe {
1589
1590
  getFacadeAccessor() {
1590
1591
  return "http";
1591
1592
  }
1592
1593
  }
1593
- const ut = M(Ue, x);
1594
- class Fe {
1594
+ const ut = M(Fe, x);
1595
+ class Ge {
1595
1596
  getFacadeAccessor() {
1596
1597
  return "log";
1597
1598
  }
1598
1599
  }
1599
- const ht = M(Fe, x);
1600
- class Ge {
1600
+ const ht = M(Ge, x);
1601
+ class Ve {
1601
1602
  getFacadeAccessor() {
1602
1603
  return "model";
1603
1604
  }
1604
1605
  }
1605
- const lt = M(Ge, x);
1606
- class Ve {
1606
+ const lt = M(Ve, x);
1607
+ class We {
1607
1608
  getFacadeAccessor() {
1608
1609
  return "route";
1609
1610
  }
1610
1611
  }
1611
- const ct = M(Ve, x);
1612
+ const ct = M(We, x);
1612
1613
  class dt {
1613
1614
  constructor() {
1614
1615
  p(this, "name");
@@ -1630,8 +1631,8 @@ export {
1630
1631
  dt as Plugin,
1631
1632
  ct as Route,
1632
1633
  $ as app,
1633
- Xe as auth,
1634
- Ye as collect,
1634
+ Ye as auth,
1635
+ k as collect,
1635
1636
  Ze as config,
1636
1637
  et as error,
1637
1638
  ot as isValidationError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luminix/core",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "> Projeto em desenvolvimento",
5
5
  "module": "dist/core.js",
6
6
  "types": "types/index.d.ts",
@@ -4,6 +4,7 @@ declare class AppFacade implements HasFacadeAccessor {
4
4
  protected app?: Application;
5
5
  getFacadeAccessor(): string | object;
6
6
  down(): void;
7
+ setInstance(app: Application): void;
7
8
  }
8
9
  declare const App: FacadeOf<Application<AppContainers> & AppMacros & MacroableInterface<AppMacros>, AppFacade>;
9
10
  export default App;