@elyx-code/project-logic-tree 0.0.6103 → 0.0.6105
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
|
@@ -32830,6 +32830,14 @@ const Me = class Me {
|
|
|
32830
32830
|
modifiedData: i
|
|
32831
32831
|
};
|
|
32832
32832
|
}
|
|
32833
|
+
get resultsAsList() {
|
|
32834
|
+
const e = this.outputsDeclarations[0];
|
|
32835
|
+
if (e) {
|
|
32836
|
+
const t = e.getDataType();
|
|
32837
|
+
return t ? t.isList === !0 : !0;
|
|
32838
|
+
}
|
|
32839
|
+
return !0;
|
|
32840
|
+
}
|
|
32833
32841
|
validateGeneratedUpdate(e) {
|
|
32834
32842
|
const t = [];
|
|
32835
32843
|
return e.parent && t.push(
|
package/dist/index.umd.cjs
CHANGED
|
@@ -69,7 +69,7 @@ ${F}`,issue:null})):a.push(new b({id:`${r.id}--${S.NoOverlapWithImplementedSigna
|
|
|
69
69
|
Adding a new return would make the implementation invalid. There are no returns in the descriptor with the same name.
|
|
70
70
|
${D}
|
|
71
71
|
${F}`,issue:null}))}}}}return a.push(...s.errors,...o,...Le(r)),{errors:a,modifiedData:r}}validateGeneratedUpdate(e){const t=[];let r=JSON.parse(JSON.stringify(e));const a=Ya(r,this);return r=a.modifiedData,t.push(...a.errors),r.parent&&t.push(new b({id:`${this.id}--${h.InvalidParentUpdate}`,code:h.InvalidParentUpdate,severity:T.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated, as it would mean moving the '${this.type}' entity to another parent entity.
|
|
72
|
-
This is likely an incorrect strategy, either the '${this.type}' entity doesn't need to be updated or it should be deleted and a new one created in the desired parent.`,issue:null})),{errors:t,modifiedData:r}}addSelfToProject(){var a;const e=[this],t=[],r=[];if(this.parent.addOutputDeclaration(this),e.push(this.parent),(a=this.readsValue)==null||a.addValueReader(this),this.readsValue&&e.push(this.readsValue),this.parent&&[n.BreakStatement,n.ContinueStatement].includes(this.parent.type)){const s=this.parent.parent,{updated:o,added:l,removed:p}=s.syncChildren();e.push(...o),t.push(...l),r.push(...p)}return{updated:E(e),added:E(t),removed:E(r),self:this}}setParent(e){return this.parent=e,this}setImplements(e){return this.implements=e,this}initChildren(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.dataType&&(this.dataType=g(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),this.initialData.implements){const e=g(this.initialData.implements,this.project);this.implements=e}return qa.initReadsValue(this),this}setValueWriter(e){return this.readsValue=e,this}removeValueWriter(){return this.readsValue=null,this}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.index=e.index||(e.index!==0?this.index:0),this.name=e.name||this.name,this.description=e.description||this.description,this.required=e.required||this.required,this.isError=e.isError||this.isError,this}async load(){return this}async create(){return this}async update(e){return this.sync(e),Za(e,this),this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const r=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.dataType){const s=this.dataType.remove({ignoreUpstream:!0,seenEntities:t});r.push(...s.affected),a.push(...s.removed)}return{affected:E(r),removed:E(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.dataType){const r=this.dataType.restore({seenEntities:e});t.push(...r.affected)}return{affected:[],self:this}}toFlat(e=new Set){var r;return e.has(this.id)?[]:(e.add(this.id),[this,...((r=this.dataType)==null?void 0:r.toFlat(e))||[]])}toFlatIds(e=new Set){var r;return e.has(this.id)?[]:(e.add(this.id),[this.id,...((r=this.dataType)==null?void 0:r.toFlatIds(e))||[]])}toJSON(){var e,t,r;return{id:this.id,version:this.version,name:this.name,description:this.description,type:this.type,index:this.index,required:this.required,isError:this.isError,dataType:((e=this.dataType)==null?void 0:e.toJSON())||null,implements:((t=this.implements)==null?void 0:t.toJSON())||null,readsValue:((r=this.readsValue)==null?void 0:r.toReference())||null,parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t,r;return{id:this.id,version:this.version,name:this.name,description:this.description,type:this.type,index:this.index,required:this.required,isError:this.isError,readsValue:((e=this.readsValue)==null?void 0:e.toReference())||null,implements:((t=this.implements)==null?void 0:t.toReference())||null,dataType:((r=this.dataType)==null?void 0:r.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var r;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((r=this.dataType)==null?void 0:r.toFlatJSON(e))||[]])}toGenerationTarget(){var e;return{id:this.id,name:this.name,description:this.description,type:this.type,isError:this.isError,readsValue:(e=this.readsValue)==null?void 0:e.id,required:this.required,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){var r,a;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((r=this.readsValue)==null?void 0:r.toFlatGenerationTarget(e))||[],...((a=this.dataType)==null?void 0:a.toFlatGenerationTarget(e))||[]])}clearErrors(){var e;return this.errors=[],(e=this.dataType)==null||e.clearErrors(),this}validate(){const e=H2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){var t;return[...this.errors,...((t=this.dataType)==null?void 0:t.getErrors())||[]]}getShallowErrors(){return this.errors}getDefaultValue(){var e;return((e=this.dataType)==null?void 0:e.defaultValue)||null}clone(e=null,t=null,r=!0){var f;const a=this.toJSON(),s=t||Ze(C(this,this.project),n.ReturnDeclaration,this.project);a.dataType=null;const o=s.split("-id"),l=o[o.length-1||0]||s;a.id=s;const p=qt(a,this.project);e?p.setParent(e):p.setParent(this.parent),r&&p.subscribe(),p.initChildren();const y=(f=this.dataType)==null?void 0:f.clone(p,l+"--data-type-id",r);return p.dataType=y||null,p}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}inferDataType(){const e=fu(this);if(e){const t=e.clone(this);t&&(t.inferred=!0,this.setDataType(t))}return this}getCounterparts(){let e=[];if([n.BreakStatement,n.ContinueStatement].includes(this.parent.type)){const t=this.parent.parent;e=[...t.breakStatements,...t.continueStatements].flatMap(s=>s.outputs).filter(s=>C(s,this.project)===C(this,this.project)&&s.id!==this.id)}else if(this.parent.type===n.ReturnStatement&&[n.FunctionDeclaration,n.GlobalEvent].includes(this.parent.parent.type)&&this.parent.parent.implements){const r=this.parent.parent.returnStatements.flatMap(a=>a.outputs);this.implements?e=r.filter(s=>{var o;return this.implements.id===((o=s.implements)==null?void 0:o.id)}):e=r.filter(s=>C(s,this.project)===C(this,this.project)&&s.id!==this.id)}return e}inferDataTypeFromCounterparts(){var r,a;const e=this.getCounterparts(),t=e.find(s=>{var o;return(o=s.dataType)==null?void 0:o.isResolved});if(t)this.setDataType(t.dataType);else for(let s=0;s<e.length;s++){const o=e[s];if((!o.dataType||!o.dataType.isResolved||(r=o.dataType)!=null&&r.inferred)&&o.readsValue&&o.inferDataType(),(a=o.dataType)!=null&&a.isResolved){this.setDataType(o.dataType);break}}return this}getDataType(){var e;return(!this.dataType||!this.dataType.isResolved||(e=this.dataType)!=null&&e.inferred)&&this.readsValue?this.inferDataType():this.inferDataTypeFromCounterparts(),this.dataType}};c(Ie,"MUTABLE_BASE_PROPERTIES",["name","description","required","isError"]),c(Ie,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(Ie,"BASE_PROPERTIES",[...Ie.MUTABLE_BASE_PROPERTIES,...Ie.INMUTABLE_BASE_PROPERTIES]),c(Ie,"MUTABLE_META_PROPERTIES",[...Ie.MUTABLE_BASE_PROPERTIES,"index"]),c(Ie,"INMUTABLE_META_PROPERTIES",[...Ie.INMUTABLE_BASE_PROPERTIES]),c(Ie,"META_PROPERTIES",[...Ie.MUTABLE_META_PROPERTIES,...Ie.INMUTABLE_META_PROPERTIES]),c(Ie,"MUTABLE_UPSTREAM_PROPERTIES",["readsValue"]),c(Ie,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","dataType"]),c(Ie,"UPSTREAM_PROPERTIES",[...Ie.MUTABLE_UPSTREAM_PROPERTIES,...Ie.INMUTABLE_UPSTREAM_PROPERTIES]),c(Ie,"MUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Ie,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Ie,"DOWNSTREAM_PROPERTIES",[...Ie.MUTABLE_DOWNSTREAM_PROPERTIES,...Ie.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(Ie,"PROPERTIES",[...Ie.META_PROPERTIES,...Ie.UPSTREAM_PROPERTIES,...Ie.DOWNSTREAM_PROPERTIES]);let Nt=Ie;function z2(i){var o;const e=L6(),t=i.toJSON();e.safeParse(t).success,i.inputsDeclarations.forEach(l=>l.validate()),i.inputs.forEach(l=>l.validate()),i.outputsDeclarations.forEach(l=>l.validate()),i.outputs.forEach(l=>l.validate()),(o=i.error)==null||o.validate();const s=[...wn(i)];if(i.id==="search-person-by-id-id"){const l=H({id:`${i.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(i,i.project)}" with id "${i.id}" implements a non-abstract property "${C(i,i.project)}" with id "${i.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:i});s.push(l.error)}return ie(i.errors,s)}const Ge=class Ge{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"x");c(this,"y");c(this,"query");c(this,"type",n.Search);c(this,"successCalls",[]);c(this,"errorCalls",[]);c(this,"inputsDeclarations",[]);c(this,"inputs",[]);c(this,"outputsDeclarations",[]);c(this,"outputs",[]);c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"error",null);c(this,"parent");c(this,"errors",[]);c(this,"project");c(this,"initialized",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.x=e.x,this.y=e.y,this.name=e.name,this.query=e.query,this.description=e.description}static fromGenerationTarget(e,t){let r=t;if(e.parent){const y=N(e.parent);r=t.get(y)}const a=e.calledByEntry.map(y=>{const f=N(y);return t.get(f)}),s=e.calledBySuccess.map(y=>{const f=N(y);return t.get(f)}),o=e.calledByError.map(y=>{const f=N(y);return t.get(f)}),l={id:e.id,version:1,type:n.Search,name:e.name,description:e.description,query:e.query,calledByEntry:a,calledBySuccess:s,calledByError:o,errorCalls:[],successCalls:[],inputsDeclarations:[],inputs:[],outputsDeclarations:[],outputs:[],error:null,x:0,y:0,parent:r},p=g(l,t);return p.setParent(r),p.initChildren(),p}static validateGenerationTarget(e,t){let r=JSON.parse(JSON.stringify(e));const a=[],s=Ye(r,{parent:{list:!1,types:[...ut,n.Project],optional:!0}},t);return r=s.modifiedData,a.push(...s.errors,...Le(r)),{errors:a,modifiedData:r}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new b({id:`${this.id}--${h.InvalidParentUpdate}`,code:h.InvalidParentUpdate,severity:T.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated. The 'parent' on a callable entity, is its scope. It scope is auto-calculated implicitly by the its caller.
|
|
72
|
+
This is likely an incorrect strategy, either the '${this.type}' entity doesn't need to be updated or it should be deleted and a new one created in the desired parent.`,issue:null})),{errors:t,modifiedData:r}}addSelfToProject(){var a;const e=[this],t=[],r=[];if(this.parent.addOutputDeclaration(this),e.push(this.parent),(a=this.readsValue)==null||a.addValueReader(this),this.readsValue&&e.push(this.readsValue),this.parent&&[n.BreakStatement,n.ContinueStatement].includes(this.parent.type)){const s=this.parent.parent,{updated:o,added:l,removed:p}=s.syncChildren();e.push(...o),t.push(...l),r.push(...p)}return{updated:E(e),added:E(t),removed:E(r),self:this}}setParent(e){return this.parent=e,this}setImplements(e){return this.implements=e,this}initChildren(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.dataType&&(this.dataType=g(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),this.initialData.implements){const e=g(this.initialData.implements,this.project);this.implements=e}return qa.initReadsValue(this),this}setValueWriter(e){return this.readsValue=e,this}removeValueWriter(){return this.readsValue=null,this}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.index=e.index||(e.index!==0?this.index:0),this.name=e.name||this.name,this.description=e.description||this.description,this.required=e.required||this.required,this.isError=e.isError||this.isError,this}async load(){return this}async create(){return this}async update(e){return this.sync(e),Za(e,this),this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const r=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.dataType){const s=this.dataType.remove({ignoreUpstream:!0,seenEntities:t});r.push(...s.affected),a.push(...s.removed)}return{affected:E(r),removed:E(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.dataType){const r=this.dataType.restore({seenEntities:e});t.push(...r.affected)}return{affected:[],self:this}}toFlat(e=new Set){var r;return e.has(this.id)?[]:(e.add(this.id),[this,...((r=this.dataType)==null?void 0:r.toFlat(e))||[]])}toFlatIds(e=new Set){var r;return e.has(this.id)?[]:(e.add(this.id),[this.id,...((r=this.dataType)==null?void 0:r.toFlatIds(e))||[]])}toJSON(){var e,t,r;return{id:this.id,version:this.version,name:this.name,description:this.description,type:this.type,index:this.index,required:this.required,isError:this.isError,dataType:((e=this.dataType)==null?void 0:e.toJSON())||null,implements:((t=this.implements)==null?void 0:t.toJSON())||null,readsValue:((r=this.readsValue)==null?void 0:r.toReference())||null,parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t,r;return{id:this.id,version:this.version,name:this.name,description:this.description,type:this.type,index:this.index,required:this.required,isError:this.isError,readsValue:((e=this.readsValue)==null?void 0:e.toReference())||null,implements:((t=this.implements)==null?void 0:t.toReference())||null,dataType:((r=this.dataType)==null?void 0:r.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var r;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((r=this.dataType)==null?void 0:r.toFlatJSON(e))||[]])}toGenerationTarget(){var e;return{id:this.id,name:this.name,description:this.description,type:this.type,isError:this.isError,readsValue:(e=this.readsValue)==null?void 0:e.id,required:this.required,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){var r,a;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((r=this.readsValue)==null?void 0:r.toFlatGenerationTarget(e))||[],...((a=this.dataType)==null?void 0:a.toFlatGenerationTarget(e))||[]])}clearErrors(){var e;return this.errors=[],(e=this.dataType)==null||e.clearErrors(),this}validate(){const e=H2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){var t;return[...this.errors,...((t=this.dataType)==null?void 0:t.getErrors())||[]]}getShallowErrors(){return this.errors}getDefaultValue(){var e;return((e=this.dataType)==null?void 0:e.defaultValue)||null}clone(e=null,t=null,r=!0){var f;const a=this.toJSON(),s=t||Ze(C(this,this.project),n.ReturnDeclaration,this.project);a.dataType=null;const o=s.split("-id"),l=o[o.length-1||0]||s;a.id=s;const p=qt(a,this.project);e?p.setParent(e):p.setParent(this.parent),r&&p.subscribe(),p.initChildren();const y=(f=this.dataType)==null?void 0:f.clone(p,l+"--data-type-id",r);return p.dataType=y||null,p}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}inferDataType(){const e=fu(this);if(e){const t=e.clone(this);t&&(t.inferred=!0,this.setDataType(t))}return this}getCounterparts(){let e=[];if([n.BreakStatement,n.ContinueStatement].includes(this.parent.type)){const t=this.parent.parent;e=[...t.breakStatements,...t.continueStatements].flatMap(s=>s.outputs).filter(s=>C(s,this.project)===C(this,this.project)&&s.id!==this.id)}else if(this.parent.type===n.ReturnStatement&&[n.FunctionDeclaration,n.GlobalEvent].includes(this.parent.parent.type)&&this.parent.parent.implements){const r=this.parent.parent.returnStatements.flatMap(a=>a.outputs);this.implements?e=r.filter(s=>{var o;return this.implements.id===((o=s.implements)==null?void 0:o.id)}):e=r.filter(s=>C(s,this.project)===C(this,this.project)&&s.id!==this.id)}return e}inferDataTypeFromCounterparts(){var r,a;const e=this.getCounterparts(),t=e.find(s=>{var o;return(o=s.dataType)==null?void 0:o.isResolved});if(t)this.setDataType(t.dataType);else for(let s=0;s<e.length;s++){const o=e[s];if((!o.dataType||!o.dataType.isResolved||(r=o.dataType)!=null&&r.inferred)&&o.readsValue&&o.inferDataType(),(a=o.dataType)!=null&&a.isResolved){this.setDataType(o.dataType);break}}return this}getDataType(){var e;return(!this.dataType||!this.dataType.isResolved||(e=this.dataType)!=null&&e.inferred)&&this.readsValue?this.inferDataType():this.inferDataTypeFromCounterparts(),this.dataType}};c(Ie,"MUTABLE_BASE_PROPERTIES",["name","description","required","isError"]),c(Ie,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(Ie,"BASE_PROPERTIES",[...Ie.MUTABLE_BASE_PROPERTIES,...Ie.INMUTABLE_BASE_PROPERTIES]),c(Ie,"MUTABLE_META_PROPERTIES",[...Ie.MUTABLE_BASE_PROPERTIES,"index"]),c(Ie,"INMUTABLE_META_PROPERTIES",[...Ie.INMUTABLE_BASE_PROPERTIES]),c(Ie,"META_PROPERTIES",[...Ie.MUTABLE_META_PROPERTIES,...Ie.INMUTABLE_META_PROPERTIES]),c(Ie,"MUTABLE_UPSTREAM_PROPERTIES",["readsValue"]),c(Ie,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","dataType"]),c(Ie,"UPSTREAM_PROPERTIES",[...Ie.MUTABLE_UPSTREAM_PROPERTIES,...Ie.INMUTABLE_UPSTREAM_PROPERTIES]),c(Ie,"MUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Ie,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Ie,"DOWNSTREAM_PROPERTIES",[...Ie.MUTABLE_DOWNSTREAM_PROPERTIES,...Ie.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(Ie,"PROPERTIES",[...Ie.META_PROPERTIES,...Ie.UPSTREAM_PROPERTIES,...Ie.DOWNSTREAM_PROPERTIES]);let Nt=Ie;function z2(i){var o;const e=L6(),t=i.toJSON();e.safeParse(t).success,i.inputsDeclarations.forEach(l=>l.validate()),i.inputs.forEach(l=>l.validate()),i.outputsDeclarations.forEach(l=>l.validate()),i.outputs.forEach(l=>l.validate()),(o=i.error)==null||o.validate();const s=[...wn(i)];if(i.id==="search-person-by-id-id"){const l=H({id:`${i.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(i,i.project)}" with id "${i.id}" implements a non-abstract property "${C(i,i.project)}" with id "${i.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:i});s.push(l.error)}return ie(i.errors,s)}const Ge=class Ge{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"x");c(this,"y");c(this,"query");c(this,"type",n.Search);c(this,"successCalls",[]);c(this,"errorCalls",[]);c(this,"inputsDeclarations",[]);c(this,"inputs",[]);c(this,"outputsDeclarations",[]);c(this,"outputs",[]);c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"error",null);c(this,"parent");c(this,"errors",[]);c(this,"project");c(this,"initialized",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.x=e.x,this.y=e.y,this.name=e.name,this.query=e.query,this.description=e.description}static fromGenerationTarget(e,t){let r=t;if(e.parent){const y=N(e.parent);r=t.get(y)}const a=e.calledByEntry.map(y=>{const f=N(y);return t.get(f)}),s=e.calledBySuccess.map(y=>{const f=N(y);return t.get(f)}),o=e.calledByError.map(y=>{const f=N(y);return t.get(f)}),l={id:e.id,version:1,type:n.Search,name:e.name,description:e.description,query:e.query,calledByEntry:a,calledBySuccess:s,calledByError:o,errorCalls:[],successCalls:[],inputsDeclarations:[],inputs:[],outputsDeclarations:[],outputs:[],error:null,x:0,y:0,parent:r},p=g(l,t);return p.setParent(r),p.initChildren(),p}static validateGenerationTarget(e,t){let r=JSON.parse(JSON.stringify(e));const a=[],s=Ye(r,{parent:{list:!1,types:[...ut,n.Project],optional:!0}},t);return r=s.modifiedData,a.push(...s.errors,...Le(r)),{errors:a,modifiedData:r}}get resultsAsList(){const e=this.outputsDeclarations[0];if(e){const t=e.getDataType();return t?t.isList===!0:!0}return!0}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new b({id:`${this.id}--${h.InvalidParentUpdate}`,code:h.InvalidParentUpdate,severity:T.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated. The 'parent' on a callable entity, is its scope. It scope is auto-calculated implicitly by the its caller.
|
|
73
73
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
74
74
|
You shouldn't have to manually update a 'parent' property. The equivalent result is to change its callers, the value writters of its inputs, or the value readers of its outputs.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){const e=[this],t=[],r=[];return this.parent===this.project&&this.project.addSearch(this),this.successCalls.forEach(a=>{a.addSuccessCaller(this),e.push(a)}),this.errorCalls.forEach(a=>{a.addErrorCaller(this),e.push(a)}),this.calledByEntry.forEach(a=>{a.addCall(this),e.push(a)}),this.calledBySuccess.forEach(a=>{a.addSuccessCall(this),e.push(a)}),this.calledByError.forEach(a=>{a.addErrorCall(this),e.push(a)}),{updated:E(e),added:E(t),removed:E(r),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}removeInput(e){const t=this.inputs.findIndex(a=>a.id===e.id);t>-1&&this.inputs.splice(t,1);const r=this.inputsDeclarations.findIndex(a=>{var s;return a.id===((s=e.declaration)==null?void 0:s.id)});return r>-1&&this.inputsDeclarations.splice(r,1),this}addInput(e){return this.inputs.includes(e)?this:(this.inputs.push(e),this)}addInputDeclaration(e){return this.inputsDeclarations.includes(e)?this:(this.inputsDeclarations.push(e),this.syncInputMaps(),this)}removeInputDeclaration(e){const t=this.inputsDeclarations.findIndex(r=>r.id===e.id);return t>-1&&this.inputsDeclarations.splice(t,1),this}addOutputDeclaration(e){return this.outputsDeclarations.includes(e)?this:(this.outputsDeclarations.push(e),this)}removeOutputDeclaration(e){const t=this.outputsDeclarations.findIndex(r=>r.id===e.id);return t>-1&&this.outputsDeclarations.splice(t,1),this}addOutput(e){return this.outputs.includes(e)?this:(this.outputs.push(e),this)}removeOutput(e){const t=this.outputs.findIndex(r=>r.id===e.id);return t>-1&&this.outputs.splice(t,1),this}addSuccessCaller(e){return this.calledBySuccess.find(t=>t.id===e.id)||this.calledBySuccess.push(e),this}addErrorCaller(e){return this.calledByError.find(t=>t.id===e.id)||this.calledByError.push(e),this}addEntryCaller(e){return this.calledByEntry.find(t=>t.id===e.id)||this.calledByEntry.push(e),this}addErrorCall(e){return this.errorCalls.push(e),this}addSuccessCall(e){return this.successCalls.push(e),this}removeCall(e){const t=this.successCalls.findIndex(a=>a.id===e.id);t>-1&&this.successCalls.splice(t,1);const r=this.errorCalls.findIndex(a=>a.id===e.id);return r>-1&&this.errorCalls.splice(r,1),this}removeCaller(e){return this.calledBySuccess=this.calledBySuccess.filter(t=>t.id!==e.id),this.calledByError=this.calledByError.filter(t=>t.id!==e.id),this.calledByEntry=this.calledByEntry.filter(t=>t.id!==e.id),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.successCalls=this.initialData.successCalls.map(e=>{const t=g(e,this.project);return[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=g(e,this.project);return t.addErrorCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputsDeclarations=this.initialData.inputsDeclarations.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.inputs=this.initialData.inputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputsDeclarations=this.initialData.outputsDeclarations.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.error&&(this.error=g(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this.syncInputMaps(),this)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.x=e.x||this.x,this.y=e.y||this.y,this.name=e.name||this.name,this.query=e.query||this.query,this.description=e.description||this.description,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const r=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.inputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});r.push(...o),a.push(...l)}),this.inputsDeclarations.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});r.push(...o),a.push(...l)}),this.outputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});r.push(...o),a.push(...l)}),this.outputsDeclarations.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});r.push(...o),a.push(...l)}),this.error){const{affected:s,removed:o}=this.error.remove({ignoreUpstream:!0,seenEntities:t});r.push(...s),a.push(...o)}return this.successCalls.forEach(s=>{r.push(s),s.removeCaller(this)}),this.errorCalls.forEach(s=>{r.push(s),s.removeCaller(this)}),e||this.calledBy.forEach(s=>{r.push(s),s.removeCall(this)}),{affected:E(r),removed:E(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.inputsDeclarations.forEach(r=>{const{affected:a}=r.restore({seenEntities:e});t.push(...a)}),this.inputs.forEach(r=>{const{affected:a}=r.restore({seenEntities:e});t.push(...a)}),this.outputsDeclarations.forEach(r=>{const{affected:a}=r.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(r=>{const{affected:a}=r.restore({seenEntities:e});t.push(...a)}),this.successCalls.forEach(r=>{t.push(r),r.addSuccessCaller(this)}),this.errorCalls.forEach(r=>{t.push(r),r.addErrorCaller(this)}),this.calledBySuccess.forEach(r=>{t.push(r),r.addSuccessCall(this)}),this.calledByError.forEach(r=>{t.push(r),r.addErrorCall(this)}),this.calledByEntry.forEach(r=>{t.push(r),r.addCall(this)}),{affected:E(t),self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.successCalls.flatMap(r=>r.toFlat(e)),...this.errorCalls.flatMap(r=>r.toFlat(e)),...this.inputs.flatMap(r=>r.toFlat(e)),...this.inputsDeclarations.flatMap(r=>r.toFlat(e)),...this.outputs.flatMap(r=>r.toFlat(e)),...this.outputsDeclarations.flatMap(r=>r.toFlat(e)),...this.calledBy.flatMap(r=>r.toFlat(e)),...this.error?this.error.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.successCalls.flatMap(r=>r.toFlatIds(e)),...this.errorCalls.flatMap(r=>r.toFlatIds(e)),...this.inputs.flatMap(r=>r.toFlatIds(e)),...this.inputsDeclarations.flatMap(r=>r.toFlatIds(e)),...this.outputs.flatMap(r=>r.toFlatIds(e)),...this.outputsDeclarations.flatMap(r=>r.toFlatIds(e)),...this.calledBy.flatMap(r=>r.toFlatIds(e)),...this.error?this.error.toFlatIds(e):[]])}toJSON(){var e;return{id:this.id,version:this.version,type:this.type,name:this.name,query:this.query,description:this.description,x:this.x,y:this.y,successCalls:this.successCalls.map(t=>t.toJSON()),errorCalls:this.errorCalls.map(t=>t.toJSON()),calledBySuccess:this.calledBySuccess.map(t=>t.toReference()),calledByError:this.calledByError.map(t=>t.toReference()),calledByEntry:this.calledByEntry.map(t=>t.toReference()),inputsDeclarations:this.inputsDeclarations.map(t=>t.toJSON()),inputs:this.inputs.map(t=>t.toJSON()),outputsDeclarations:this.outputsDeclarations.map(t=>t.toJSON()),outputs:this.outputs.map(t=>t.toJSON()),parent:this.parent.toReference(),error:((e=this.error)==null?void 0:e.toJSON())||null}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,query:this.query,x:this.x,y:this.y,inputs:this.inputs.map(e=>e.toReference()),inputsDeclarations:this.inputsDeclarations.map(e=>e.toReference()),outputs:this.outputs.map(e=>e.toReference()),outputsDeclarations:this.outputsDeclarations.map(e=>e.toReference()),successCalls:this.successCalls.map(e=>e.toReference()),errorCalls:this.errorCalls.map(e=>e.toReference()),calledBySuccess:this.calledBySuccess.map(e=>e.toReference()),calledByError:this.calledByError.map(e=>e.toReference()),calledByEntry:this.calledByEntry.map(e=>e.toReference()),error:this.error?this.error.toReference():null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.successCalls.flatMap(r=>r.toFlatJSON(e)),...this.errorCalls.flatMap(r=>r.toFlatJSON(e)),...this.inputs.flatMap(r=>r.toFlatJSON(e)),...this.inputsDeclarations.flatMap(r=>r.toFlatJSON(e)),...this.outputs.flatMap(r=>r.toFlatJSON(e)),...this.outputsDeclarations.flatMap(r=>r.toFlatJSON(e)),...this.calledBy.flatMap(r=>r.toFlatJSON(e)),...this.error?this.error.toFlatJSON(e):[]])}toGenerationTarget(){const e=this.parent.type===n.Project?void 0:this.parent.id;return{id:this.id,name:this.name,description:this.description,type:this.type,query:this.query,calledByEntry:this.calledByEntry.map(t=>t.id),calledBySuccess:this.calledBySuccess.map(t=>t.id),calledByError:this.calledByError.map(t=>t.id),parent:e}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.successCalls.flatMap(r=>r.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(r=>r.toFlatGenerationTarget(e)),...this.inputs.flatMap(r=>r.toFlatGenerationTarget(e)),...this.inputsDeclarations.flatMap(r=>r.toFlatGenerationTarget(e)),...this.outputs.flatMap(r=>r.toFlatGenerationTarget(e)),...this.outputsDeclarations.flatMap(r=>r.toFlatGenerationTarget(e)),...this.error?this.error.toFlatGenerationTarget(e):[]])}clearErrors(){var e;return this.errors=[],this.inputsDeclarations.forEach(t=>t.clearErrors()),this.inputs.forEach(t=>t.clearErrors()),this.outputs.forEach(t=>t.clearErrors()),this.successCalls.forEach(t=>t.clearErrors()),this.errorCalls.forEach(t=>t.clearErrors()),(e=this.error)==null||e.clearErrors(),this}validate(){const e=z2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.inputsDeclarations.flatMap(t=>t.getErrors()),...this.inputs.flatMap(t=>t.getErrors()),...this.outputsDeclarations.flatMap(t=>t.getErrors()),...this.outputs.flatMap(t=>t.getErrors()),...this.error?this.error.getErrors():[]]}getShallowErrors(){return this.errors}clone(e){return new Ge(this.toJSON(),this.project)}syncInputMaps(){const e=[],t=[],r=[];return this.inputsDeclarations.forEach(a=>{if(!this.inputs.find(o=>{var l;return((l=o.declaration)==null?void 0:l.id)===a.id})){const o={id:this.id+"--"+_.UUID.uuid(),version:1,type:n.InputMap,declaration:a.toJSON(),readsValue:null,defaultValue:null,index:this.inputs.length,name:null,description:null,parent:this.toReference()},l=g(o,this.project);l.setParent(this),l.initChildren(),l.addSelfToProject(),e.push(this),t.push(l)}}),this.inputs.forEach(a=>{if(!this.inputsDeclarations.find(o=>{var l;return o.id===((l=a.declaration)==null?void 0:l.id)})){const{affected:o,removed:l}=a.remove();e.push(...o),r.push(...l)}}),{updated:E(e),added:E(t),removed:E(r),self:this}}};c(Ge,"MUTABLE_BASE_PROPERTIES",["name","description","query"]),c(Ge,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(Ge,"BASE_PROPERTIES",[...Ge.MUTABLE_BASE_PROPERTIES,...Ge.INMUTABLE_BASE_PROPERTIES]),c(Ge,"MUTABLE_META_PROPERTIES",[...Ge.MUTABLE_BASE_PROPERTIES,"x","y"]),c(Ge,"INMUTABLE_META_PROPERTIES",[...Ge.INMUTABLE_BASE_PROPERTIES]),c(Ge,"META_PROPERTIES",[...Ge.MUTABLE_META_PROPERTIES,...Ge.INMUTABLE_META_PROPERTIES]),c(Ge,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),c(Ge,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),c(Ge,"UPSTREAM_PROPERTIES",[...Ge.MUTABLE_UPSTREAM_PROPERTIES,...Ge.INMUTABLE_UPSTREAM_PROPERTIES]),c(Ge,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","inputsDeclarations","inputs","outputsDeclarations","outputs","error"]),c(Ge,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Ge,"DOWNSTREAM_PROPERTIES",[...Ge.MUTABLE_DOWNSTREAM_PROPERTIES,...Ge.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(Ge,"PROPERTIES",[...Nt.META_PROPERTIES,...Nt.UPSTREAM_PROPERTIES,...Nt.DOWNSTREAM_PROPERTIES]);let $r=Ge;function Z2(i){const e=S3(),t=i.toJSON();e.safeParse(t).success,i.functions.forEach(s=>s.validate()),i.events.forEach(s=>s.validate());const a=[];return ie(i.errors,a)}const De=class De{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"x");c(this,"y");c(this,"type",n.InstalledProject);c(this,"implements");c(this,"functions",[]);c(this,"events",[]);c(this,"parent");c(this,"errors",[]);c(this,"project");c(this,"initialized",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.description=e.description,this.x=e.x,this.y=e.y,this.implements=e.implements}static fromGenerationTarget(e,t){const r=t,a={id:e.id,version:1,name:e.name,type:n.InstalledProject,description:e.description,functions:[],events:[],implements:{entityId:e.implements,entityType:n.Project,type:n.GenericReference,id:_.UUID.uuid()},x:0,y:0,parent:r},s=g(a,t);return s.setParent(r),s.initChildren(),s}static validateGenerationTarget(e,t){let r=JSON.parse(JSON.stringify(e));const a=[];return a.push(...Le(r)),{errors:a,modifiedData:r}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new b({id:`${this.id}--${h.InvalidParentUpdate}`,code:h.InvalidParentUpdate,severity:T.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated. The 'parent' on an installed project, must be the root project as it is a globally declared entity.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){const e=[this],t=[],r=[];return{updated:E(e),added:E(t),removed:E(r),self:this}}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.functions=this.initialData.functions.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.events=this.initialData.events.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.x=e.x||this.x,this.y=e.y||this.y,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const r=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),this.functions.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!1,seenEntities:t});r.push(...o),a.push(...l)}),this.events.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!1,seenEntities:t});r.push(...o),a.push(...l)}),{affected:[],removed:[]})}restore({seenEntities:e}={seenEntities:new Set}){return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.functions.forEach(t=>{t.restore({seenEntities:e})}),this.events.forEach(t=>{t.restore({seenEntities:e})}),{affected:[],self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.functions.flatMap(r=>r.toFlat(e)),...this.events.flatMap(r=>r.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.functions.flatMap(r=>r.toFlatIds(e)),...this.events.flatMap(r=>r.toFlatIds(e))])}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,implements:this.implements,functions:this.functions.map(e=>e.toJSON()),events:this.events.map(e=>e.toJSON()),parent:this.parent.toReference(),x:this.x,y:this.y}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,x:this.x,y:this.y,implements:this.implements,functions:this.functions.map(e=>e.toReference()),events:this.events.map(e=>e.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.functions.flatMap(r=>r.toFlatJSON(e)),...this.events.flatMap(r=>r.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,name:this.name,description:this.description,type:this.type,implements:this.implements.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.functions.flatMap(r=>r.toFlatGenerationTarget(e)),...this.events.flatMap(r=>r.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.functions.forEach(e=>e.clearErrors()),this.events.forEach(e=>e.clearErrors()),this}validate(){const e=Z2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.functions.flatMap(t=>t.getErrors()),...this.events.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(){return new De(this.toJSON(),this.project)}};c(De,"MUTABLE_BASE_PROPERTIES",[]),c(De,"INMUTABLE_BASE_PROPERTIES",["id","version","name","description","type"]),c(De,"BASE_PROPERTIES",[...De.MUTABLE_BASE_PROPERTIES,...De.INMUTABLE_BASE_PROPERTIES]),c(De,"MUTABLE_META_PROPERTIES",["x","y"]),c(De,"INMUTABLE_META_PROPERTIES",[...De.INMUTABLE_BASE_PROPERTIES]),c(De,"META_PROPERTIES",[...De.MUTABLE_META_PROPERTIES,...De.INMUTABLE_META_PROPERTIES]),c(De,"MUTABLE_UPSTREAM_PROPERTIES",[]),c(De,"INMUTABLE_UPSTREAM_PROPERTIES",["implements","parent"]),c(De,"UPSTREAM_PROPERTIES",[...De.MUTABLE_UPSTREAM_PROPERTIES,...De.INMUTABLE_UPSTREAM_PROPERTIES]),c(De,"MUTABLE_DOWNSTREAM_PROPERTIES",["functions","events"]),c(De,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(De,"DOWNSTREAM_PROPERTIES",[...De.MUTABLE_DOWNSTREAM_PROPERTIES,...De.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(De,"PROPERTIES",[...De.META_PROPERTIES,...De.UPSTREAM_PROPERTIES,...De.DOWNSTREAM_PROPERTIES]);let Fr=De;function K2(i){var l;const e=U6(),t=i.toJSON();e.safeParse(t).success,i.inputs.forEach(p=>p.validate()),i.outputs.forEach(p=>p.validate()),(l=i.error)==null||l.validate();const a=wn(i),s=X2(i),o=[...a,...s];return ie(i.errors,o)}function X2(i){const e=[],t=No(i.parent),r=t==null?void 0:t.entity;if(!r)e.push(H({id:`${i.id}--${S.InternalCallParentMissingDataType}`,code:S.InternalCallParentMissingDataType,severity:T.Error,message:`Entity of type "${i.type}" with id "${i.id}", belongs to a variable whose data type entity doesn't contain its declaration method (function-declaration) its id "${i.declaration}".`,issue:null,entity:i}).error);else if(![n.CustomEntity,n.BuiltInBaseEntity,n.PrimitiveEntity].includes(r.type))e.push(H({id:`${i.id}--${S.InternalCallParentDeclarationEntityInvalidType}`,code:S.InternalCallParentDeclarationEntityInvalidType,severity:T.Error,message:`Entity of type "${i.type}" with id "${i.id}", belongs to a variable whose data type 'entity' is not a custom entity, built-in base entity or primitive entity.
|
|
75
75
|
This variable's data-type has an 'entity' field that references an entity with id '${r.id}' and of type '${r.type}'.`,issue:null,entity:i}).error);else{const a=Ju(r),s=[];[n.CustomEntity,n.BuiltInBaseEntity,n.PrimitiveEntity].includes(r.type)&&s.push(...r.getAllInteractiveMethods());let o="";a?r.methods.length?o=`
|
|
@@ -51,6 +51,7 @@ export declare class SearchState implements ISearch, BaseState, UserManagedEntit
|
|
|
51
51
|
errors: EntityGenerationError[];
|
|
52
52
|
modifiedData: ISearchGenerationTarget;
|
|
53
53
|
};
|
|
54
|
+
get resultsAsList(): boolean;
|
|
54
55
|
validateGeneratedUpdate(data: Partial<ISearchGenerationTarget>): {
|
|
55
56
|
errors: EntityGenerationError[];
|
|
56
57
|
modifiedData: Partial<ISearchGenerationTarget>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elyx-code/project-logic-tree",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6105",
|
|
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",
|