@elyx-code/project-logic-tree 0.0.6927 → 0.0.6929

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.d.ts CHANGED
@@ -9994,7 +9994,16 @@ export declare enum BaseValueDescriptorIds {
9994
9994
  isPreexistingRowTransformerUpToDate: boolean;
9995
9995
  };
9996
9996
 
9997
- export declare function checkParentEntryPointRequiresTermination(self: PassThroughCallableEntityState): boolean;
9997
+ /**
9998
+ * Checks whether a the scope owner requires all branches to end in return.
9999
+ *
10000
+ * This could be because of its type signature or because there is already one or more returns that would create a race condition
10001
+ * for any branches not connected to it.
10002
+ *
10003
+ * @param {PassThroughCallableEntityState} self
10004
+ * @returns
10005
+ */
10006
+ export declare function checkParentEntryPointRequiresEndingBranchesInReturn(self: PassThroughCallableEntityState): boolean;
9998
10007
 
9999
10008
  export declare function checkReachesOrIsTarget(entity: ExecutableEntityState, target: CallableEntityState): 'success' | 'error' | 'entry' | 'loop-body' | 'same-entity' | null;
10000
10009
 
@@ -35188,6 +35197,13 @@ export declare enum BaseValueDescriptorIds {
35188
35197
  }[];
35189
35198
  };
35190
35199
 
35200
+ /**
35201
+ * Validates that if the entity implements a descriptor with return values,
35202
+ * it has a termination on every branch
35203
+ *
35204
+ * @param {EntryPointEntityState} self
35205
+ * @returns {EntityError[]}
35206
+ */
35191
35207
  export declare function validateEntryPointsTermination(self: EntryPointEntityState): EntityError[];
35192
35208
 
35193
35209
  export declare function validateErrorCaller(data: ElementGenerationTarget, callerEntity: CallerEntityState): {
package/dist/index.js CHANGED
@@ -179529,17 +179529,23 @@ function M6i(s) {
179529
179529
  );
179530
179530
  }
179531
179531
  function S6(s) {
179532
- var r, a, c, e;
179532
+ var a, c, e, f;
179533
179533
  if (s.type !== d.InternalCall) {
179534
179534
  if (!jt.includes(s.parent.type))
179535
179535
  return !1;
179536
- const h = ((r = s.parent.implements) == null ? void 0 : r.getDataType(null)) || null;
179537
- return !(!h || ((a = h.entity) == null ? void 0 : a.id) === re["primitive-entity"].void.id);
179536
+ const h = s.parent;
179537
+ if (!!h.returnStatements.length)
179538
+ return !0;
179539
+ const b = ((a = h.implements) == null ? void 0 : a.getDataType(null)) || null;
179540
+ return !(!b || ((c = b.entity) == null ? void 0 : c.id) === re["primitive-entity"].void.id);
179538
179541
  }
179539
179542
  if (!jt.includes(s.parent.parent.type))
179540
179543
  return !1;
179541
- const i = ((c = s.parent.parent.implements) == null ? void 0 : c.getDataType(null)) || null;
179542
- return !(!i || ((e = i.entity) == null ? void 0 : e.id) === re["primitive-entity"].void.id);
179544
+ const p = s.parent.parent;
179545
+ if (!!p.returnStatements.length)
179546
+ return !0;
179547
+ const r = ((e = p.implements) == null ? void 0 : e.getDataType(null)) || null;
179548
+ return !(!r || ((f = r.entity) == null ? void 0 : f.id) === re["primitive-entity"].void.id);
179543
179549
  }
179544
179550
  function A1(s) {
179545
179551
  var f, h;
@@ -198749,9 +198755,11 @@ function yr(s, p = /* @__PURE__ */ new Set()) {
198749
198755
  ...jDi(s.outputs)
198750
198756
  ].reduce((c, e) => [...c, ...yr(e, p)], []);
198751
198757
  if (sp.includes(s.type)) {
198752
- const i = PC(
198753
- s.inputs
198754
- ), a = ct(s).reduce(
198758
+ const i = [
198759
+ ...PC(
198760
+ s.inputs
198761
+ )
198762
+ ], a = ct(s).reduce(
198755
198763
  (c, e) => {
198756
198764
  const f = ht(e);
198757
198765
  return [
@@ -198764,7 +198772,7 @@ function yr(s, p = /* @__PURE__ */ new Set()) {
198764
198772
  },
198765
198773
  []
198766
198774
  );
198767
- return i.push(...a), i.reduce((c, e) => [...c, ...yr(e, p)], []);
198775
+ return i.push(...a), i.reduce((c, e) => [...c, ...yr(e)], []);
198768
198776
  }
198769
198777
  if (s.type === d.FunctionDeclaration) {
198770
198778
  const i = [
@@ -218911,7 +218919,7 @@ export {
218911
218919
  cqi as checkIsOnlyNull,
218912
218920
  tu as checkIsRequiredValue,
218913
218921
  vDi as checkIsRowTransformerUpToDate,
218914
- S6 as checkParentEntryPointRequiresTermination,
218922
+ S6 as checkParentEntryPointRequiresEndingBranchesInReturn,
218915
218923
  E5i as checkReachesOrIsTarget,
218916
218924
  _s as checkScopeCompatibility,
218917
218925
  C1 as checkShouldInputOrOutputBePartOfFinalVariableObjectValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elyx-code/project-logic-tree",
3
- "version": "0.0.6927",
3
+ "version": "0.0.6929",
4
4
  "author": "Sergio Herrero",
5
5
  "license": "UNLICENSED",
6
6
  "description": "An installable module which contains the type definitions and ephemeral state management for a projects' logic tree data structure",