@elyx-code/project-logic-tree 0.0.6819 → 0.0.6821

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
@@ -12555,6 +12555,7 @@ export declare enum BaseValueDescriptorIds {
12555
12555
  RecommendedImplementFunctionCallAction = "recommended-implement-function-call-action",
12556
12556
  RecommendedImplementVariableDeclarationAction = "recommended-implement-variable-declaration-action",
12557
12557
  RecommendedImplementVariableInstanceAction = "recommended-implement-variable-instance-action",
12558
+ RecommendedImplementInternalCallAction = "recommended-implement-internal-call-action",
12558
12559
  RecommendedImplementConditionAction = "recommended-implement-condition-action",
12559
12560
  InvalidReferenceObjectStructure = "invalid-reference-object-structure",
12560
12561
  ContainsSingleButShouldBeReferenceList = "contains-single-but-should-be-reference-list",
@@ -15093,6 +15094,49 @@ export declare enum BaseValueDescriptorIds {
15093
15094
 
15094
15095
  export declare function generateActionExample(actionName: string, properties: Record<string, string>): string;
15095
15096
 
15097
+ export declare function generateAllAvailableMethodsThatCanBeCalledAsInternalCallsExplanation(project: ProjectState): {
15098
+ explanations: {
15099
+ id: GenerationExplanationIds.AllAvailableMethodsThatCanBeCalledAsInternalCalls | GenerationExplanationIds.ReasonsForMethodsNotAvailableAsInternalCalls;
15100
+ message: string;
15101
+ }[];
15102
+ };
15103
+
15104
+ /**
15105
+ * Add explanation about all available methods on this variable's data-type entity.
15106
+ * And if none, all the available methods on existing variables in the project that could be used.
15107
+ * And if none, then all the available methods in the project that could be implemented as internal calls.
15108
+ *
15109
+ * If the given declaration id does exist in the given variable's data-type entity, skip.
15110
+ *
15111
+ * @param {string} declarationId
15112
+ * @param {VariableState | null} variableEntityState
15113
+ * @returns {{
15114
+ * explanations: {
15115
+ * id: GenerationExplanationIds.AvailableInternalCallsForGivenVariablesDataTypeEntity
15116
+ * | GenerationExplanationIds.AvailableInternalCallsOfAnyDeclarationInAllInstanciatedVariablesDataTypeEntities
15117
+ * | GenerationExplanationIds.AllAvailableMethodsThatCanBeCalledAsInternalCalls
15118
+ * | GenerationExplanationIds.ReasonsForMethodsNotAvailableAsInternalCalls
15119
+ * | GenerationExplanationIds.NonAvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables
15120
+ * | GenerationExplanationIds.AvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables
15121
+ * | GenerationExplanationIds.InternalCalls;
15122
+ * message: string;
15123
+ * }[];
15124
+ * }}
15125
+ */
15126
+ export declare function generateAvailableInternalCallsExplanation(project: ProjectState, declarationId: string | null, variableEntityState: VariableState | null): {
15127
+ explanations: {
15128
+ id: GenerationExplanationIds.AvailableInternalCallsForGivenVariablesDataTypeEntity | GenerationExplanationIds.AvailableInternalCallsOfAnyDeclarationInAllInstanciatedVariablesDataTypeEntities | GenerationExplanationIds.AllAvailableMethodsThatCanBeCalledAsInternalCalls | GenerationExplanationIds.ReasonsForMethodsNotAvailableAsInternalCalls | GenerationExplanationIds.NonAvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables | GenerationExplanationIds.AvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables | GenerationExplanationIds.InternalCalls;
15129
+ message: string;
15130
+ }[];
15131
+ };
15132
+
15133
+ export declare function generateAvailableInternalCallsOfAnyDeclarationInAllInstanciatedVariablesDataTypeEntitiesExplanation(project: ProjectState): {
15134
+ explanations: {
15135
+ id: GenerationExplanationIds.AvailableInternalCallsOfAnyDeclarationInAllInstanciatedVariablesDataTypeEntities;
15136
+ message: string;
15137
+ }[];
15138
+ };
15139
+
15096
15140
  export declare function generateCaughtErrorOutputLogLines(entity: PassThroughCallableEntityWithOutputsState, options?: IPrintEntityOptions & {
15097
15141
  prefix?: string;
15098
15142
  }): {
@@ -15369,7 +15413,20 @@ export declare enum BaseValueDescriptorIds {
15369
15413
  OutputMapsAutogeneration = "output-maps-autogeneration-explanation",
15370
15414
  AvailableOutputMapsForGivenParentCallableEntity = "available-output-maps-for-given-parent-callable-entity-explanation",
15371
15415
  InputMapsAutogeneration = "input-maps-autogeneration-explanation",
15372
- AvailableInputMapsForGivenParentCallableEntity = "available-input-maps-for-given-parent-callable-entity-explanation"
15416
+ InternalCallsAutogeneration = "internal-calls-autogeneration-explanation",
15417
+ AvailableInputMapsForGivenParentCallableEntity = "available-input-maps-for-given-parent-callable-entity-explanation",
15418
+ AvailableInternalCallsForGivenVariablesDataTypeEntity = "available-internal-calls-for-given-variables-data-type-entity-explanation",
15419
+ NonAvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables = "non-available-internal-calls-with-same-declaration-in-existing-instanciated-variables-explanation",
15420
+ AvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables = "available-internal-calls-with-same-declaration-in-existing-instanciated-variables-explanation",
15421
+ AvailableInternalCallsOfAnyDeclarationInAllInstanciatedVariablesDataTypeEntities = "available-internal-calls-of-any-declaration-in-all-instanciated-variables-data-type-entities-explanation",
15422
+ AllAvailableMethodsThatCanBeCalledAsInternalCalls = "all-available-methods-that-can-be-called-as-internal-calls",
15423
+ InternalCalls = "internal-calls-explanation",
15424
+ ReasonsForMethodsNotAvailableAsInternalCalls = "reasons-for-methods-not-available-as-internal-calls-explanation",
15425
+ AllNonInteractiveDefinitionEntities = "all-non-interactive-definition-entities-explanation",
15426
+ AllStaticAndAbstractDefinitionEntities = "all-static-and-abstract-definition-entities-explanation",
15427
+ AllStaticNonAbstractDefinitionEntities = "all-static-non-abstract-definition-entities-explanation",
15428
+ AllAbstractNonStaticDefinitionEntities = "all-abstract-non-static-definition-entities-explanation",
15429
+ AllInstanciatableDefinitionEntities = "all-instantiatable-definition-entities-explanation"
15373
15430
  }
15374
15431
 
15375
15432
  /** lodash-like get(obj, path, defaultValue) with precise "missing" detection */
@@ -18647,6 +18704,14 @@ export declare enum BaseValueDescriptorIds {
18647
18704
 
18648
18705
  export declare function getIntegrationIdFromEntity(entity: DefinitionEntityState | BuiltInBaseEntityState | ActionDescriptorState | OperationState): ExternalIntegrationNames | null;
18649
18706
 
18707
+ export declare function getIsGivenDeclarationIdAvailableInAnInstanciatedVarAndExplanation(declarationId: string, project: ProjectState): {
18708
+ explanations: {
18709
+ id: GenerationExplanationIds.NonAvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables | GenerationExplanationIds.AvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables;
18710
+ message: string;
18711
+ }[];
18712
+ available: boolean;
18713
+ };
18714
+
18650
18715
  export declare function getIsInteractive(entity: DefinitionEntityState | BuiltInBaseEntityState | PrimitiveEntityState | PropertyState | InputMapState | OutputMapState): boolean;
18651
18716
 
18652
18717
  /**
@@ -22576,6 +22641,10 @@ export declare enum BaseValueDescriptorIds {
22576
22641
  }
22577
22642
  export { installedProjectValidation }
22578
22643
 
22644
+ export declare const INTERNAL_CALLS_AUTOGENERATION_EXPLANATION = "Internal calls are automatically generated for any method of an applicable definition-entity that is the 'entity' of a data-type of a variable-declaration. So they never need to be created manually.\nTo use an internal call, it is almost always the only correct way, to create a dedicated variable-instance for it, with the 'implement_internal_call' generation action, which will create and instance and wire the call all in once and avoiding generation conflics.";
22645
+
22646
+ export declare const INTERNAL_CALLS_EXPLANATION = "An internal call is a callable entity type that can be called on a variable-instance to trigger the logic of a method (function-declaration in a definition-entity) of its data-type 'entity'.\nInternal calls are equivalent to method calls in other programing languages like Javascript, where you need a class instance initialized with the right state, then you call the method on it.\nIn our case, first we need a 'variable-declaration' with a data-type that has its 'entity' field pointing to a 'definition-entity' that contains a 'function-declaration' method called somewhere earlier in the same scopes' callstack.\nThis variable-declaration acts as the initialization of the class. Only then we can use a SEPARATE variable-instance to call the internal-call on.\nThis is equivalent to calling 'new' on a class to create an instance in Javascript, then calling a method on that instance in the next step. The internal call will have access to the state of the variable-declaration.";
22647
+
22579
22648
  export declare enum InternalCallDependencyField {
22580
22649
  Declaration = "declaration"
22581
22650
  }
@@ -30911,6 +30980,8 @@ export declare enum BaseValueDescriptorIds {
30911
30980
 
30912
30981
  export declare function readValueFromWriter(entity: ValueReadingEntityState, context: IValueResolutionContext, onlyDefault?: boolean): IDynamicValue | null;
30913
30982
 
30983
+ export declare const REASONS_FOR_METHODS_NOT_AVAILABLE_AS_INTERNAL_CALLS_EXPLANATION = "Not all methods of a definition-entity are available as internal calls. For a method to be available as an internal call its parent definition-entity needs to be the 'entity' of a data-type of a variable. It needs to belong to an 'interactive' definition-entity. It needs to not be part of an abstract definition-entity.";
30984
+
30914
30985
  export declare function rebaseStack<T = any>(undoableStackValueIndex: number, history: T[], newItem: T): number;
30915
30986
 
30916
30987
  export declare function recursivelyMakeAllEditableAndDeletableFromGiven(entity: UserManagedEntityState, changeSet: ChangeSet | null): void;