@elyx-code/project-logic-tree 0.0.6350 → 0.0.6352
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 +135 -9
- package/dist/index.js +19506 -19050
- package/dist/index.umd.cjs +185 -185
- 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
|
+
export 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[];
|
|
@@ -3399,6 +3417,8 @@ declare function fromNameToTableDescription(tableName: string, project: ProjectS
|
|
|
3399
3417
|
|
|
3400
3418
|
declare function fromOrderByClauseToSortStatements(orderByClause: OrderByClause, _selectStatement: SelectStmt, _allColumns: IColumnMapping[], state: SearchStatementState): SortStatement[];
|
|
3401
3419
|
|
|
3420
|
+
export declare function fromPublishingDisabledCodeToReadable(code: PUBLISHING_DISABLED_REASONS): string;
|
|
3421
|
+
|
|
3402
3422
|
declare function fromSelectClauseColumnsToColumnMappings(selectClause: SelectClause, objectName?: string): IShallowColumnMapping[];
|
|
3403
3423
|
|
|
3404
3424
|
declare function fromSelectClauseToLiteralValueSelections(selectClause: SelectClause, state: SearchStatementState, _debug?: boolean): ColumnRef[];
|
|
@@ -6460,6 +6480,8 @@ export declare function getEventEntityTypeSchema(): z_2.ZodUnion<[z_2.ZodObject<
|
|
|
6460
6480
|
type: import("../../..").EntityType.GlobalEvent;
|
|
6461
6481
|
}>, z_2.ZodRecord<z_2.ZodString, z_2.ZodAny>]>;
|
|
6462
6482
|
|
|
6483
|
+
export declare function getEventNameFromDefinition(event: ProjectPublicationEventName): string;
|
|
6484
|
+
|
|
6463
6485
|
export declare function getExecutableEntityReferenceSchema(): z_2.ZodUnion<[z_2.ZodUnion<[z_2.ZodUnion<[z_2.ZodObject<{
|
|
6464
6486
|
id: z_2.ZodString;
|
|
6465
6487
|
type: z_2.ZodLiteral<import("../../..").EntityType.GenericReference>;
|
|
@@ -6754,6 +6776,8 @@ export declare function getHeadIfPartOfDetachedBranch(entity: CanvasEntityState,
|
|
|
6754
6776
|
|
|
6755
6777
|
export declare function getHighestScope(scopeOwnerA: EntityWithLogicScopeState, scopeOwnerB: EntityWithLogicScopeState, project: ProjectState): EntityWithLogicScopeState | null;
|
|
6756
6778
|
|
|
6779
|
+
export declare function getHTTPAPINameFromProjectId(projectId: string): string;
|
|
6780
|
+
|
|
6757
6781
|
export declare function getImplementedBuiltInEntity(entity: DefinitionEntityState): BuiltInBaseEntityState | null;
|
|
6758
6782
|
|
|
6759
6783
|
export declare function getIsInteractive(entity: DefinitionEntityState | BuiltInBaseEntityState | PrimitiveEntityState): boolean;
|
|
@@ -7280,6 +7304,8 @@ export declare function getRelatedCanvasElementsOnTheLeftFromTransfer(entity: Dr
|
|
|
7280
7304
|
|
|
7281
7305
|
export declare function getRelatedCanvasElementsOnTheRight(entity: CanvasEntityState | ProjectState | InternalCallState, respectCollapse?: boolean): CanvasEntityState[];
|
|
7282
7306
|
|
|
7307
|
+
export declare function getRelationalDBInstanceNameFromEntityId(entityId: string): string;
|
|
7308
|
+
|
|
7283
7309
|
export declare function getRootEntryPointScopeOwner(entity: EntityState | Element_2 | ElementTransfer | ElementGenerationTarget | ElementShallowTransfer, project: ProjectState): EntityWithLogicScopeState | null;
|
|
7284
7310
|
|
|
7285
7311
|
export declare function getScopeOwner(entity: EntityState | Element_2 | ElementTransfer | ElementGenerationTarget | ElementShallowTransfer, project: ProjectState, _initialEntity?: EntityState | Element_2 | ElementTransfer | ElementGenerationTarget | ElementShallowTransfer | null): EntityWithLogicScopeState | ProjectState | null;
|
|
@@ -7299,6 +7325,8 @@ declare function getSelectStatementFromProgram(program: Program): SelectStmt | n
|
|
|
7299
7325
|
|
|
7300
7326
|
export declare function getStateClassFromType(entityType: EntityType): EntityStateConstructor | null;
|
|
7301
7327
|
|
|
7328
|
+
export declare function getStepNameFromDefinition(stepType: PublishingSequenceStep): string;
|
|
7329
|
+
|
|
7302
7330
|
export declare function getTerminationReferenceSchema(): z_2.ZodUnion<[z_2.ZodObject<{
|
|
7303
7331
|
id: z_2.ZodString;
|
|
7304
7332
|
type: z_2.ZodLiteral<import("../../..").EntityType.GenericReference>;
|
|
@@ -8807,6 +8835,7 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
|
|
|
8807
8835
|
persistedExecutionResults: IValueStoreClient;
|
|
8808
8836
|
socket: IWebsocketsClient;
|
|
8809
8837
|
events: Events;
|
|
8838
|
+
publication: PublicationRun | null;
|
|
8810
8839
|
onProjectHeadLoadedCallback: null | ((projectState: ProjectState) => void);
|
|
8811
8840
|
onLogicLoadingCompleteCallback: null | ((chunk: any) => void);
|
|
8812
8841
|
onRenderedCallback: null | (() => void);
|
|
@@ -8823,15 +8852,11 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
|
|
|
8823
8852
|
onProjectSetupError(callback: (error: any) => void): void;
|
|
8824
8853
|
removeValueByOwnerId(entityId: EntityId): void;
|
|
8825
8854
|
removeValue(dynamicValue: IDynamicValue): void;
|
|
8826
|
-
handleIncommingWebsocketMessage(message:
|
|
8827
|
-
|
|
8828
|
-
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
channels: IChannelConnections[];
|
|
8832
|
-
sessionId: string;
|
|
8833
|
-
};
|
|
8834
|
-
}): void;
|
|
8855
|
+
handleIncommingWebsocketMessage(message: ILiveMessageDTO): Promise<void>;
|
|
8856
|
+
handleNotificationChannelsMessage(message: ILiveMessageDTO<DTOAction.NotificationChannels, string, {
|
|
8857
|
+
channels: IChannelConnections[];
|
|
8858
|
+
sessionId: string;
|
|
8859
|
+
}>): void;
|
|
8835
8860
|
handlePersistChangeSetMessage(message: PersistChangeSetEntityActionRequestPayload): void;
|
|
8836
8861
|
getLogic(options?: {
|
|
8837
8862
|
mockLogic?: ProjectState;
|
|
@@ -8847,6 +8872,8 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
|
|
|
8847
8872
|
removeTest(): Promise<void>;
|
|
8848
8873
|
copyEntities(entities: CanvasEntityState[]): Promise<ChangeSet>;
|
|
8849
8874
|
resolveInitialChildrenPositions(parent: CanvasEntityState | null, children: CanvasEntityState[], changeSet: ChangeSet | null): CanvasEntityState[];
|
|
8875
|
+
publish(): Promise<void>;
|
|
8876
|
+
loadActivePublication(publicationId: string): Promise<IPublication>;
|
|
8850
8877
|
}
|
|
8851
8878
|
|
|
8852
8879
|
export declare interface IEntityActionRequestPayload<P extends {
|
|
@@ -9314,6 +9341,14 @@ export declare interface IModuleInjection {
|
|
|
9314
9341
|
|
|
9315
9342
|
export declare function implement(self: DefinitionEntityState | BuiltInBaseEntityState, newEntityName: string, changeSet: ChangeSet | null, newId?: string): DefinitionEntityState;
|
|
9316
9343
|
|
|
9344
|
+
export declare class ImplicitGlobalInfrastructureResource extends InfrastructureResource {
|
|
9345
|
+
resourceType: InfrastructureResourceType.CompiledLocalCodebase | InfrastructureResourceType.CloudHostedCodebase;
|
|
9346
|
+
details: InfrastructureResourceDetails | null;
|
|
9347
|
+
status: InfrastructureResourceStatus;
|
|
9348
|
+
constructor(publicationRun: PublicationRun, resourceType: InfrastructureResourceType.CompiledLocalCodebase | InfrastructureResourceType.CloudHostedCodebase, provider: CloudProviders);
|
|
9349
|
+
resolveDeterministicResourceId(): string;
|
|
9350
|
+
}
|
|
9351
|
+
|
|
9317
9352
|
export declare type IncompatibleScope = IIncompatibleParallelInProjectScope | IIncompatibleParallelInCommonParentScope | IIncompatibleAIsGlobalBIsNotScope | IIncompatibleBIsGlobalAIsNotScope;
|
|
9318
9353
|
|
|
9319
9354
|
export declare function inferArgumentDeclarationDataType(entity: ArgumentDeclarationState, _changeSet?: ChangeSet | null): DataTypeState | null;
|
|
@@ -9334,6 +9369,30 @@ export declare function inferVariableDeclarationDataType(entity: VariableDeclara
|
|
|
9334
9369
|
|
|
9335
9370
|
export declare function inferVariableInstanceDataType(entity: VariableInstanceState, changeSet?: ChangeSet | null): DataTypeState | null;
|
|
9336
9371
|
|
|
9372
|
+
export declare class InfrastructureResource implements IInfrastructureResource {
|
|
9373
|
+
provisionedBy: PublicationStep;
|
|
9374
|
+
publicationRun: PublicationRun;
|
|
9375
|
+
resourceType: InfrastructureResourceType;
|
|
9376
|
+
provider: CloudProviders;
|
|
9377
|
+
resourceId: string;
|
|
9378
|
+
details: InfrastructureResourceDetails | null;
|
|
9379
|
+
status: InfrastructureResourceStatus;
|
|
9380
|
+
constructor(publicationRun: PublicationRun, resourceType: InfrastructureResourceType, provider: CloudProviders);
|
|
9381
|
+
setDetails(details: InfrastructureResourceDetails): void;
|
|
9382
|
+
setStatus(status: InfrastructureResourceStatus): void;
|
|
9383
|
+
setProvisionedBy(step: PublicationStep): void;
|
|
9384
|
+
}
|
|
9385
|
+
|
|
9386
|
+
export declare enum InfrastructureResourceStatus {
|
|
9387
|
+
Ready = "ready",
|
|
9388
|
+
Provisioning = "provisioning",
|
|
9389
|
+
Queued = "queued",
|
|
9390
|
+
ProvisioningFailed = "provisioning-failed",
|
|
9391
|
+
Deleting = "deleting",
|
|
9392
|
+
DeletingFailed = "deleting-failed",
|
|
9393
|
+
Deleted = "deleted"
|
|
9394
|
+
}
|
|
9395
|
+
|
|
9337
9396
|
export declare function initBaseProjectEntity(data: IProjectTransfer): ProjectState;
|
|
9338
9397
|
|
|
9339
9398
|
export declare function initProject(data: IProjectTransfer, { enrich, }?: {
|
|
@@ -12549,6 +12608,69 @@ declare namespace propertyValidation {
|
|
|
12549
12608
|
}
|
|
12550
12609
|
export { propertyValidation }
|
|
12551
12610
|
|
|
12611
|
+
export declare class PublicationRun implements IPublication {
|
|
12612
|
+
id: string;
|
|
12613
|
+
projectAutoIncrementPublicationCount: number;
|
|
12614
|
+
projectPublishedSemanticVersion: string;
|
|
12615
|
+
projectVersion: string;
|
|
12616
|
+
projectId: string;
|
|
12617
|
+
cloudProvider: CloudProviders;
|
|
12618
|
+
triggeredBy: string;
|
|
12619
|
+
createdAt: string;
|
|
12620
|
+
updatedAt: string;
|
|
12621
|
+
status: PublicationStatus;
|
|
12622
|
+
steps: PublicationStep[];
|
|
12623
|
+
editor: IEditor;
|
|
12624
|
+
explicitResources: Map<string, ExplicitInfrastructureResource>;
|
|
12625
|
+
implicitGlobalResources: Map<InfrastructureResourceType.CompiledLocalCodebase | InfrastructureResourceType.CloudHostedCodebase, ImplicitGlobalInfrastructureResource | null>;
|
|
12626
|
+
finalGlobalEvent: ProjectPublicationEventName | null;
|
|
12627
|
+
finalStatus: PublicationStatus.Success | PublicationStatus.Failed | null;
|
|
12628
|
+
constructor(data: IPublication, editor: IEditor);
|
|
12629
|
+
get project(): ProjectState;
|
|
12630
|
+
getInfraTypes(resourceTypes: InfrastructureResourceType[]): PublicationStep[];
|
|
12631
|
+
getStepsTypes(stepTypes: PublishingSequenceStep[]): PublicationStep[];
|
|
12632
|
+
toIds(steps: PublicationStep[]): string[];
|
|
12633
|
+
getResourceForEntity(entity: DefinitionEntityState): InfrastructureResource | null;
|
|
12634
|
+
init(): Promise<void>;
|
|
12635
|
+
initResources(): Promise<void>;
|
|
12636
|
+
setSteps(steps: IDeploymentStepDefinition[], emittedAt: string): void;
|
|
12637
|
+
addStep(step: IDeploymentStepDefinition, emittedAt: string): void;
|
|
12638
|
+
/**
|
|
12639
|
+
* Reorder this.steps so that:
|
|
12640
|
+
* - each step appears after all of its dependencies,
|
|
12641
|
+
* - unrelated steps keep their relative order (by old index),
|
|
12642
|
+
* - and indexes are reassigned consecutively (0,1,2…).
|
|
12643
|
+
*
|
|
12644
|
+
* Throws if there is a cycle in the dependency graph.
|
|
12645
|
+
*/
|
|
12646
|
+
orderSteps(): void;
|
|
12647
|
+
getNextParallelizableSteps(): PublicationStep[];
|
|
12648
|
+
onUpdate(message: ILiveMessageDTO): void;
|
|
12649
|
+
}
|
|
12650
|
+
|
|
12651
|
+
export declare class PublicationStep implements IDeploymentStepDefinition<InfrastructureResource> {
|
|
12652
|
+
stepType: PublishingSequenceStep;
|
|
12653
|
+
id: string;
|
|
12654
|
+
resourceType: InfrastructureResourceType;
|
|
12655
|
+
index: number;
|
|
12656
|
+
dependency: string[];
|
|
12657
|
+
lastEvent: ProjectPublicationEventName | null;
|
|
12658
|
+
lasEventTimestamp: string | null;
|
|
12659
|
+
status: PublicationStatus;
|
|
12660
|
+
publicationRun: PublicationRun;
|
|
12661
|
+
resource: ExplicitInfrastructureResource | ImplicitGlobalInfrastructureResource;
|
|
12662
|
+
constructor(stepType: PublishingSequenceStep, id: string, resourceType: InfrastructureResourceType, initialStatus: PublicationStatus, dependency: string[], index: number, lasEventTimestamp: string, publicationRun: PublicationRun, resource: ExplicitInfrastructureResource | ImplicitGlobalInfrastructureResource);
|
|
12663
|
+
toJSON(): IDeploymentStepDefinition;
|
|
12664
|
+
update(step: IDeploymentStepDefinition): Promise<void>;
|
|
12665
|
+
}
|
|
12666
|
+
|
|
12667
|
+
export declare enum PUBLISHING_DISABLED_REASONS {
|
|
12668
|
+
NO_LOGIC = "NO_LOGIC",
|
|
12669
|
+
NO_NAME = "NO_NAME",
|
|
12670
|
+
NO_CHANGES = "NO_CHANGES",
|
|
12671
|
+
PROJECT_PUBLICATION_ALREADY_ONGOING = "PROJECT_PUBLICATION_ALREADY_ONGOING"
|
|
12672
|
+
}
|
|
12673
|
+
|
|
12552
12674
|
export declare const READ_ONLY_ENTITY_PERSISTANCE_REPOSITORY: IReadOnlyEntityPersistanceRepository;
|
|
12553
12675
|
|
|
12554
12676
|
export declare const READABLE_ENTITY_TYPES: {
|
|
@@ -12850,6 +12972,10 @@ export declare function resolvePrimitiveEntityName(primitiveEntity: {
|
|
|
12850
12972
|
|
|
12851
12973
|
export declare function resolvePropertyValue(entity: PropertyState, context: IValueResolutionContext): IDynamicValue | null;
|
|
12852
12974
|
|
|
12975
|
+
export declare function resolvePublicationStepStatusFromType(eventType: PublicationStatus | 'skipped'): string;
|
|
12976
|
+
|
|
12977
|
+
export declare function resolveResourceNameFromType(resourceType: InfrastructureResourceType): string;
|
|
12978
|
+
|
|
12853
12979
|
export declare function resolveReturnDeclarationValue(entity: ReturnDeclarationState, context: IValueResolutionContext): IDynamicValue | null;
|
|
12854
12980
|
|
|
12855
12981
|
export declare function resolveSearchName(search: SearchState): string;
|