entropic-bond 1.53.13 → 1.53.14

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.
@@ -59,11 +59,11 @@ function z() {
59
59
  }
60
60
  return U(Y);
61
61
  }
62
- const H = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), $ = { randomUUID: H };
62
+ const H = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), V = { randomUUID: H };
63
63
  function J(i, e, t) {
64
64
  var s;
65
- if ($.randomUUID && !i)
66
- return $.randomUUID();
65
+ if (V.randomUUID && !i)
66
+ return V.randomUUID();
67
67
  i = i || {};
68
68
  const r = i.random ?? ((s = i.rng) == null ? void 0 : s.call(i)) ?? z();
69
69
  if (r.length < 16)
@@ -82,8 +82,8 @@ const B = (d = class {
82
82
  * @param factory the constructor of the registered class
83
83
  * @param annotation an annotation associated with the class
84
84
  */
85
- static registerFactory(e, t, r) {
86
- this._factoryMap[e] = { factory: t, annotation: r };
85
+ static registerFactory(e, t, r, s = !1) {
86
+ this._factoryMap[e] = { factory: t, annotation: r, isLegacy: s };
87
87
  }
88
88
  /**
89
89
  * Returns the constructor of a registered class
@@ -107,6 +107,15 @@ const B = (d = class {
107
107
  * @see classFactory
108
108
  */
109
109
  static registeredClasses() {
110
+ return Object.entries(this._factoryMap).filter(([, e]) => !e.isLegacy).map(([e]) => e);
111
+ }
112
+ /**
113
+ * Returns the names of all registered classes, including legacy names
114
+ * @returns the names of all registered classes, including legacy names
115
+ * @see registerFactory
116
+ * @see classFactory
117
+ */
118
+ static registeredClassesAndLegacyNames() {
110
119
  return Object.keys(this._factoryMap);
111
120
  }
112
121
  /**
@@ -117,7 +126,7 @@ const B = (d = class {
117
126
  * @see classFactory
118
127
  */
119
128
  static classesExtending(e) {
120
- return Object.entries(this._factoryMap).filter(([, t]) => new t.factory() instanceof e).map(([t]) => t);
129
+ return Object.entries(this._factoryMap).filter(([, t]) => new t.factory() instanceof e && !t.isLegacy).map(([t]) => t);
121
130
  }
122
131
  /**
123
132
  * Returns the annotation associated with a registered class
@@ -364,7 +373,7 @@ const B = (d = class {
364
373
  * @returns the references collection
365
374
  */
366
375
  static getSystemRegisteredReferencesWithCachedProps() {
367
- return d.registeredClasses().reduce((r, s) => {
376
+ return d.registeredClassesAndLegacyNames().reduce((r, s) => {
368
377
  const o = d.createInstance(s).getPersistentProperties().filter(
369
378
  (c) => {
370
379
  var h;
@@ -376,10 +385,10 @@ const B = (d = class {
376
385
  }
377
386
  }, d._factoryMap = {}, d);
378
387
  G([
379
- D
388
+ R
380
389
  ], B.prototype, "_id");
381
390
  let l = B;
382
- function D(i, e) {
391
+ function R(i, e) {
383
392
  return y()(i, e);
384
393
  }
385
394
  function oe(i) {
@@ -436,7 +445,7 @@ function K(i, e) {
436
445
  }
437
446
  function le(i) {
438
447
  return (e) => {
439
- l.registerFactory(i, e);
448
+ l.registerFactory(i, e, void 0, !0);
440
449
  };
441
450
  }
442
451
  function de(i, e) {
@@ -696,7 +705,7 @@ E.error = {
696
705
  persistentNeedForSubCollection: "The document parameter for a sub-collection should be a Persistent instace",
697
706
  invalidQueryOrder: "Cannot add where calls after or calls"
698
707
  };
699
- let R = E;
708
+ let O = E;
700
709
  class X {
701
710
  constructor(e) {
702
711
  this.queryObject = { operations: [] }, this.model = e;
@@ -722,7 +731,7 @@ class X {
722
731
  */
723
732
  where(e, t, r, s) {
724
733
  var n, o, c;
725
- if ((o = (n = this.queryObject.operations) == null ? void 0 : n.at(-1)) != null && o.aggregate && !s) throw new Error(R.error.invalidQueryOrder);
734
+ if ((o = (n = this.queryObject.operations) == null ? void 0 : n.at(-1)) != null && o.aggregate && !s) throw new Error(O.error.invalidQueryOrder);
726
735
  return (c = this.queryObject.operations) == null || c.push({
727
736
  property: e,
728
737
  operator: t,
@@ -756,7 +765,7 @@ class X {
756
765
  */
757
766
  whereDeepProp(e, t, r, s) {
758
767
  var h, a, u;
759
- if ((a = (h = this.queryObject.operations) == null ? void 0 : h.at(-1)) != null && a.aggregate && !s) throw new Error(R.error.invalidQueryOrder);
768
+ if ((a = (h = this.queryObject.operations) == null ? void 0 : h.at(-1)) != null && a.aggregate && !s) throw new Error(O.error.invalidQueryOrder);
760
769
  const n = e.split(".");
761
770
  let o = {}, c = n.length > 1 ? o : r;
762
771
  return n.slice(1).forEach((g, v) => {
@@ -946,7 +955,7 @@ const P = class P {
946
955
  */
947
956
  static getModel(e) {
948
957
  if (!P._dataSource) throw new Error(this.error.shouldBeRegistered);
949
- return new R(P._dataSource, e);
958
+ return new O(P._dataSource, e);
950
959
  }
951
960
  /**
952
961
  * Retrieves a model for a subcollection
@@ -956,7 +965,7 @@ const P = class P {
956
965
  */
957
966
  static getModelForSubCollection(e, t) {
958
967
  if (!P._dataSource) throw new Error(this.error.shouldBeRegistered);
959
- return new R(P._dataSource, e, t);
968
+ return new O(P._dataSource, e, t);
960
969
  }
961
970
  /**
962
971
  * Populates property references with actual data from the store.
@@ -1079,9 +1088,9 @@ class S {
1079
1088
  o.map(async (a) => {
1080
1089
  var u, g;
1081
1090
  (g = (u = r.prop.cachedPropsConfig) == null ? void 0 : u.cachedProps) == null || g.forEach(async (v) => {
1082
- var N, M, V;
1083
- const j = (N = e.before) == null ? void 0 : N[v], k = (M = e.after) == null ? void 0 : M[v];
1084
- j !== k && (a[`_${r.prop.name}`][`_${v}`] = k, await s.save(a), (V = this.onUpdate) == null || V.call(this, a, r.prop));
1091
+ var k, L, M;
1092
+ const j = (k = e.before) == null ? void 0 : k[v], N = (L = e.after) == null ? void 0 : L[v];
1093
+ j !== N && (a[`_${r.prop.name}`][`_${v}`] = N, await s.save(a), (M = this.onUpdate) == null || M.call(this, a, r.prop));
1085
1094
  });
1086
1095
  })
1087
1096
  ]);
@@ -1343,7 +1352,7 @@ let A = class extends w {
1343
1352
  A = re([
1344
1353
  ee("MockCloudStorage", () => new A())
1345
1354
  ], A);
1346
- var se = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, O = (i, e, t, r) => {
1355
+ var se = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, D = (i, e, t, r) => {
1347
1356
  for (var s = r > 1 ? void 0 : r ? ie(e, t) : e, n = i.length - 1, o; n >= 0; n--)
1348
1357
  (o = i[n]) && (s = (r ? o(e, t, s) : o(s)) || s);
1349
1358
  return r && s && se(e, t, s), s;
@@ -1395,22 +1404,22 @@ let C = class extends l {
1395
1404
  return this._onChange.subscribe(i);
1396
1405
  }
1397
1406
  };
1398
- O([
1399
- D
1407
+ D([
1408
+ R
1400
1409
  ], C.prototype, "_reference", 2);
1401
- O([
1402
- D
1410
+ D([
1411
+ R
1403
1412
  ], C.prototype, "_url", 2);
1404
- O([
1405
- D
1413
+ D([
1414
+ R
1406
1415
  ], C.prototype, "_cloudStorageProviderName", 2);
1407
- O([
1408
- D
1416
+ D([
1417
+ R
1409
1418
  ], C.prototype, "_originalFileName", 2);
1410
- O([
1411
- D
1419
+ D([
1420
+ R
1412
1421
  ], C.prototype, "_mimeType", 2);
1413
- C = O([
1422
+ C = D([
1414
1423
  K("StoredFile")
1415
1424
  ], C);
1416
1425
  class W {
@@ -1541,7 +1550,7 @@ const p = class p extends W {
1541
1550
  }
1542
1551
  };
1543
1552
  p.error = { shouldBeRegistered: "You should register an auth service before using Auth." }, p._instance = void 0;
1544
- let L = p;
1553
+ let $ = p;
1545
1554
  class _e extends W {
1546
1555
  constructor() {
1547
1556
  super(...arguments), this.pendingPromises = [], this._fakeRegisteredUsers = {};
@@ -1733,7 +1742,7 @@ function Ce(i, e) {
1733
1742
  return e.split(".").reduce((t, r) => t[r], i);
1734
1743
  }
1735
1744
  export {
1736
- L as Auth,
1745
+ $ as Auth,
1737
1746
  _e as AuthMock,
1738
1747
  W as AuthService,
1739
1748
  T as CloudFunctions,
@@ -1743,7 +1752,7 @@ export {
1743
1752
  me as EntropicComponent,
1744
1753
  ge as JsonDataSource,
1745
1754
  A as MockCloudStorage,
1746
- R as Model,
1755
+ O as Model,
1747
1756
  I as Observable,
1748
1757
  l as Persistent,
1749
1758
  X as Query,
@@ -1755,7 +1764,7 @@ export {
1755
1764
  ne as StoredFileEvent,
1756
1765
  be as camelCase,
1757
1766
  Ce as getDeepValue,
1758
- D as persistent,
1767
+ R as persistent,
1759
1768
  y as persistentParser,
1760
1769
  ue as persistentPureReference,
1761
1770
  he as persistentPureReferenceWithCachedProps,