@elyx-code/project-logic-tree 0.0.6238 → 0.0.6240

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/index.js CHANGED
@@ -30335,7 +30335,7 @@ class I {
30335
30335
  if (this.removed[a.id])
30336
30336
  return this;
30337
30337
  if (this.added[a.id])
30338
- return this;
30338
+ return a.captureVersion(), this;
30339
30339
  if (this.affected[a.id] && delete this.affected[a.id], !this.hasUpdated(a.id)) {
30340
30340
  a.increaseVersion(this.timestamp);
30341
30341
  const { added: h, updated: c, removed: T, affected: E } = a.recursiveCaptureUpstreamVersions(this.timestamp);
@@ -49754,14 +49754,14 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
49754
49754
  calledByEntry: i.calledByEntry || [],
49755
49755
  calledBySuccess: i.calledBySuccess || [],
49756
49756
  calledByError: i.calledByError || [],
49757
- declaration: this.toJSON(),
49757
+ declaration: this.toReference(),
49758
49758
  x: 0,
49759
49759
  y: 0
49760
49760
  }, l = P(
49761
49761
  s,
49762
49762
  this.project
49763
49763
  );
49764
- return l.setParent(e, null), l.initChildren(null), t == null || t.add(l, A.Added), e === this.project && this.project.addVariableInstance(l), t == null || t.attemptAutoclose("create-instance", this.id), l;
49764
+ return l.hydrateAncestors(), l.setParent(e, t), t == null || t.add(l, A.Added), l.addSelfToProject(t), l.initChildren(t), e === this.project && this.project.addVariableInstance(l), t == null || t.attemptAutoclose("create-instance", this.id), l;
49765
49765
  }
49766
49766
  // If a variable has a data type that represents an object, like KeyValue or a definition entity
49767
49767
  // Its variables can be set as inputs into the entity
@@ -72432,14 +72432,18 @@ async function Vq(r, a = Sa) {
72432
72432
  }
72433
72433
  return console.log("Fetching project from external API"), new Promise(
72434
72434
  async (i) => {
72435
- if (e.onFetch) {
72436
- const s = await e.onFetch(r.id);
72437
- if (s) {
72438
- i({ data: s });
72439
- return;
72440
- }
72441
- } else
72442
- i({ data: null });
72435
+ try {
72436
+ if (e.onFetch) {
72437
+ const s = await e.onFetch(r.id);
72438
+ if (s) {
72439
+ i({ data: s });
72440
+ return;
72441
+ }
72442
+ } else
72443
+ i({ data: null });
72444
+ } catch (s) {
72445
+ console.error("Error fetching project: ", s), i({ data: null });
72446
+ }
72443
72447
  }
72444
72448
  );
72445
72449
  }