@elyx-code/project-logic-tree 0.0.6350 → 0.0.6351
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 +114 -9
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { BinaryExpr } from 'sql-parser-cst';
|
|
2
|
+
import { CloudProviders } from '@elyx-code/definitions';
|
|
2
3
|
import { DTOAction } from '@elyx-code/definitions';
|
|
3
4
|
import { Events } from '@elyx-code/common-ts-utils';
|
|
4
5
|
import { Expr } from 'sql-parser-cst';
|
|
5
6
|
import { ForSystemTimeAsOfExpr } from 'sql-parser-cst';
|
|
6
7
|
import { FromClause } from 'sql-parser-cst';
|
|
8
|
+
import { IDeploymentStepDefinition } from '@elyx-code/definitions';
|
|
9
|
+
import { IInfrastructureResource } from '@elyx-code/definitions';
|
|
7
10
|
import { ILiveMessageDTO } from '@elyx-code/definitions';
|
|
11
|
+
import { InfrastructureResourceDetails } from '@elyx-code/definitions';
|
|
12
|
+
import { InfrastructureResourceType } from '@elyx-code/definitions';
|
|
13
|
+
import { IPublication } from '@elyx-code/definitions';
|
|
8
14
|
import { JoinExpr } from 'sql-parser-cst';
|
|
9
15
|
import { Keyword } from 'sql-parser-cst';
|
|
10
16
|
import { LimitClause } from 'sql-parser-cst';
|
|
@@ -12,6 +18,9 @@ import { OrderByClause } from 'sql-parser-cst';
|
|
|
12
18
|
import { PivotExpr } from 'sql-parser-cst';
|
|
13
19
|
import { PostgresqlOperatorExpr } from 'sql-parser-cst';
|
|
14
20
|
import { Program } from 'sql-parser-cst';
|
|
21
|
+
import { ProjectPublicationEventName } from '@elyx-code/definitions';
|
|
22
|
+
import { PublicationStatus } from '@elyx-code/definitions';
|
|
23
|
+
import { PublishingSequenceStep } from '@elyx-code/definitions';
|
|
15
24
|
import { SafeParseReturnType } from 'zod';
|
|
16
25
|
import { SelectClause } from 'sql-parser-cst';
|
|
17
26
|
import { SelectStmt } from 'sql-parser-cst';
|
|
@@ -3207,6 +3216,15 @@ export declare enum ExecutionTerminationType {
|
|
|
3207
3216
|
Return = "return"
|
|
3208
3217
|
}
|
|
3209
3218
|
|
|
3219
|
+
declare class ExplicitInfrastructureResource extends InfrastructureResource {
|
|
3220
|
+
resourceType: InfrastructureResourceType.HttpApi | InfrastructureResourceType.RelationalDatabase;
|
|
3221
|
+
owners: Map<EntityId, DefinitionEntityState>;
|
|
3222
|
+
details: InfrastructureResourceDetails | null;
|
|
3223
|
+
status: InfrastructureResourceStatus;
|
|
3224
|
+
constructor(publicationRun: PublicationRun, owners: DefinitionEntityState[], resourceType: InfrastructureResourceType.HttpApi | InfrastructureResourceType.RelationalDatabase, provider: CloudProviders);
|
|
3225
|
+
resolveDeterministicResourceId(): string;
|
|
3226
|
+
}
|
|
3227
|
+
|
|
3210
3228
|
export declare function filterOutDuplicateEntities(entities: (EntityState | Element_2 | ElementTransfer | ElementShallowTransfer | ElementGenerationTarget)[]): (Element_2 | ElementTransfer | ElementShallowTransfer | ElementGenerationTarget | EntityState)[];
|
|
3211
3229
|
|
|
3212
3230
|
export declare function filterOutDuplicateErrors(errors: (EntityGenerationError | EntityError)[]): EntityGenerationError[] | EntityError[];
|
|
@@ -8807,6 +8825,7 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
|
|
|
8807
8825
|
persistedExecutionResults: IValueStoreClient;
|
|
8808
8826
|
socket: IWebsocketsClient;
|
|
8809
8827
|
events: Events;
|
|
8828
|
+
publication: PublicationRun | null;
|
|
8810
8829
|
onProjectHeadLoadedCallback: null | ((projectState: ProjectState) => void);
|
|
8811
8830
|
onLogicLoadingCompleteCallback: null | ((chunk: any) => void);
|
|
8812
8831
|
onRenderedCallback: null | (() => void);
|
|
@@ -8823,15 +8842,11 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
|
|
|
8823
8842
|
onProjectSetupError(callback: (error: any) => void): void;
|
|
8824
8843
|
removeValueByOwnerId(entityId: EntityId): void;
|
|
8825
8844
|
removeValue(dynamicValue: IDynamicValue): void;
|
|
8826
|
-
handleIncommingWebsocketMessage(message:
|
|
8827
|
-
|
|
8828
|
-
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
channels: IChannelConnections[];
|
|
8832
|
-
sessionId: string;
|
|
8833
|
-
};
|
|
8834
|
-
}): void;
|
|
8845
|
+
handleIncommingWebsocketMessage(message: ILiveMessageDTO): Promise<void>;
|
|
8846
|
+
handleNotificationChannelsMessage(message: ILiveMessageDTO<DTOAction.NotificationChannels, string, {
|
|
8847
|
+
channels: IChannelConnections[];
|
|
8848
|
+
sessionId: string;
|
|
8849
|
+
}>): void;
|
|
8835
8850
|
handlePersistChangeSetMessage(message: PersistChangeSetEntityActionRequestPayload): void;
|
|
8836
8851
|
getLogic(options?: {
|
|
8837
8852
|
mockLogic?: ProjectState;
|
|
@@ -8847,6 +8862,8 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
|
|
|
8847
8862
|
removeTest(): Promise<void>;
|
|
8848
8863
|
copyEntities(entities: CanvasEntityState[]): Promise<ChangeSet>;
|
|
8849
8864
|
resolveInitialChildrenPositions(parent: CanvasEntityState | null, children: CanvasEntityState[], changeSet: ChangeSet | null): CanvasEntityState[];
|
|
8865
|
+
publish(): Promise<void>;
|
|
8866
|
+
loadActivePublication(publicationId: string): Promise<IPublication>;
|
|
8850
8867
|
}
|
|
8851
8868
|
|
|
8852
8869
|
export declare interface IEntityActionRequestPayload<P extends {
|
|
@@ -9314,6 +9331,14 @@ export declare interface IModuleInjection {
|
|
|
9314
9331
|
|
|
9315
9332
|
export declare function implement(self: DefinitionEntityState | BuiltInBaseEntityState, newEntityName: string, changeSet: ChangeSet | null, newId?: string): DefinitionEntityState;
|
|
9316
9333
|
|
|
9334
|
+
declare class ImplicitGlobalInfrastructureResource extends InfrastructureResource {
|
|
9335
|
+
resourceType: InfrastructureResourceType.CompiledLocalCodebase | InfrastructureResourceType.CloudHostedCodebase;
|
|
9336
|
+
details: InfrastructureResourceDetails | null;
|
|
9337
|
+
status: InfrastructureResourceStatus;
|
|
9338
|
+
constructor(publicationRun: PublicationRun, resourceType: InfrastructureResourceType.CompiledLocalCodebase | InfrastructureResourceType.CloudHostedCodebase, provider: CloudProviders);
|
|
9339
|
+
resolveDeterministicResourceId(): string;
|
|
9340
|
+
}
|
|
9341
|
+
|
|
9317
9342
|
export declare type IncompatibleScope = IIncompatibleParallelInProjectScope | IIncompatibleParallelInCommonParentScope | IIncompatibleAIsGlobalBIsNotScope | IIncompatibleBIsGlobalAIsNotScope;
|
|
9318
9343
|
|
|
9319
9344
|
export declare function inferArgumentDeclarationDataType(entity: ArgumentDeclarationState, _changeSet?: ChangeSet | null): DataTypeState | null;
|
|
@@ -9334,6 +9359,30 @@ export declare function inferVariableDeclarationDataType(entity: VariableDeclara
|
|
|
9334
9359
|
|
|
9335
9360
|
export declare function inferVariableInstanceDataType(entity: VariableInstanceState, changeSet?: ChangeSet | null): DataTypeState | null;
|
|
9336
9361
|
|
|
9362
|
+
declare class InfrastructureResource implements IInfrastructureResource {
|
|
9363
|
+
provisionedBy: PublicationStep;
|
|
9364
|
+
publicationRun: PublicationRun;
|
|
9365
|
+
resourceType: InfrastructureResourceType;
|
|
9366
|
+
provider: CloudProviders;
|
|
9367
|
+
resourceId: string;
|
|
9368
|
+
details: InfrastructureResourceDetails | null;
|
|
9369
|
+
status: InfrastructureResourceStatus;
|
|
9370
|
+
constructor(publicationRun: PublicationRun, resourceType: InfrastructureResourceType, provider: CloudProviders);
|
|
9371
|
+
setDetails(details: InfrastructureResourceDetails): void;
|
|
9372
|
+
setStatus(status: InfrastructureResourceStatus): void;
|
|
9373
|
+
setProvisionedBy(step: PublicationStep): void;
|
|
9374
|
+
}
|
|
9375
|
+
|
|
9376
|
+
declare enum InfrastructureResourceStatus {
|
|
9377
|
+
Ready = "ready",
|
|
9378
|
+
Provisioning = "provisioning",
|
|
9379
|
+
Queued = "queued",
|
|
9380
|
+
ProvisioningFailed = "provisioning-failed",
|
|
9381
|
+
Deleting = "deleting",
|
|
9382
|
+
DeletingFailed = "deleting-failed",
|
|
9383
|
+
Deleted = "deleted"
|
|
9384
|
+
}
|
|
9385
|
+
|
|
9337
9386
|
export declare function initBaseProjectEntity(data: IProjectTransfer): ProjectState;
|
|
9338
9387
|
|
|
9339
9388
|
export declare function initProject(data: IProjectTransfer, { enrich, }?: {
|
|
@@ -12549,6 +12598,62 @@ declare namespace propertyValidation {
|
|
|
12549
12598
|
}
|
|
12550
12599
|
export { propertyValidation }
|
|
12551
12600
|
|
|
12601
|
+
declare class PublicationRun implements IPublication {
|
|
12602
|
+
id: string;
|
|
12603
|
+
projectAutoIncrementPublicationCount: number;
|
|
12604
|
+
projectPublishedSemanticVersion: string;
|
|
12605
|
+
projectVersion: string;
|
|
12606
|
+
projectId: string;
|
|
12607
|
+
cloudProvider: CloudProviders;
|
|
12608
|
+
triggeredBy: string;
|
|
12609
|
+
createdAt: string;
|
|
12610
|
+
updatedAt: string;
|
|
12611
|
+
status: PublicationStatus;
|
|
12612
|
+
steps: PublicationStep[];
|
|
12613
|
+
editor: IEditor;
|
|
12614
|
+
explicitResources: Map<string, ExplicitInfrastructureResource>;
|
|
12615
|
+
implicitGlobalResources: Map<InfrastructureResourceType.CompiledLocalCodebase | InfrastructureResourceType.CloudHostedCodebase, ImplicitGlobalInfrastructureResource | null>;
|
|
12616
|
+
finalGlobalEvent: ProjectPublicationEventName | null;
|
|
12617
|
+
finalStatus: PublicationStatus.Success | PublicationStatus.Failed | null;
|
|
12618
|
+
constructor(data: IPublication, editor: IEditor);
|
|
12619
|
+
get project(): ProjectState;
|
|
12620
|
+
getInfraTypes(resourceTypes: InfrastructureResourceType[]): PublicationStep[];
|
|
12621
|
+
getStepsTypes(stepTypes: PublishingSequenceStep[]): PublicationStep[];
|
|
12622
|
+
toIds(steps: PublicationStep[]): string[];
|
|
12623
|
+
getResourceForEntity(entity: DefinitionEntityState): InfrastructureResource | null;
|
|
12624
|
+
init(): Promise<void>;
|
|
12625
|
+
initResources(): Promise<void>;
|
|
12626
|
+
setSteps(steps: IDeploymentStepDefinition[], emittedAt: string): void;
|
|
12627
|
+
addStep(step: IDeploymentStepDefinition, emittedAt: string): void;
|
|
12628
|
+
/**
|
|
12629
|
+
* Reorder this.steps so that:
|
|
12630
|
+
* - each step appears after all of its dependencies,
|
|
12631
|
+
* - unrelated steps keep their relative order (by old index),
|
|
12632
|
+
* - and indexes are reassigned consecutively (0,1,2…).
|
|
12633
|
+
*
|
|
12634
|
+
* Throws if there is a cycle in the dependency graph.
|
|
12635
|
+
*/
|
|
12636
|
+
orderSteps(): void;
|
|
12637
|
+
getNextParallelizableSteps(): PublicationStep[];
|
|
12638
|
+
onUpdate(message: ILiveMessageDTO): void;
|
|
12639
|
+
}
|
|
12640
|
+
|
|
12641
|
+
declare class PublicationStep implements IDeploymentStepDefinition<InfrastructureResource> {
|
|
12642
|
+
stepType: PublishingSequenceStep;
|
|
12643
|
+
id: string;
|
|
12644
|
+
resourceType: InfrastructureResourceType;
|
|
12645
|
+
index: number;
|
|
12646
|
+
dependency: string[];
|
|
12647
|
+
lastEvent: ProjectPublicationEventName | null;
|
|
12648
|
+
lasEventTimestamp: string | null;
|
|
12649
|
+
status: PublicationStatus;
|
|
12650
|
+
publicationRun: PublicationRun;
|
|
12651
|
+
resource: ExplicitInfrastructureResource | ImplicitGlobalInfrastructureResource;
|
|
12652
|
+
constructor(stepType: PublishingSequenceStep, id: string, resourceType: InfrastructureResourceType, initialStatus: PublicationStatus, dependency: string[], index: number, lasEventTimestamp: string, publicationRun: PublicationRun, resource: ExplicitInfrastructureResource | ImplicitGlobalInfrastructureResource);
|
|
12653
|
+
toJSON(): IDeploymentStepDefinition;
|
|
12654
|
+
update(step: IDeploymentStepDefinition): Promise<void>;
|
|
12655
|
+
}
|
|
12656
|
+
|
|
12552
12657
|
export declare const READ_ONLY_ENTITY_PERSISTANCE_REPOSITORY: IReadOnlyEntityPersistanceRepository;
|
|
12553
12658
|
|
|
12554
12659
|
export declare const READABLE_ENTITY_TYPES: {
|
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.6351",
|
|
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",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@elyx-code/common-ts-utils": "^0.0.103",
|
|
29
|
-
"@elyx-code/definitions": "^0.0.
|
|
29
|
+
"@elyx-code/definitions": "^0.0.7977",
|
|
30
30
|
"axios": "^1.6.5",
|
|
31
31
|
"dayjs": "^1.11.13",
|
|
32
32
|
"i": "^0.3.7",
|