@endge/core 10.0.0 → 11.1.0
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/core.js +38624 -38584
- package/dist/features/core/kernel/config/kernel.config.d.ts +2 -2
- package/dist/features/core/kernel/constants/kernel.constants.d.ts +1 -3
- package/dist/features/core/kernel/types/bootstrap.types.d.ts +1 -1
- package/dist/features/core/modules/bridge/config/bridge.config.d.ts +12 -0
- package/dist/features/core/modules/bridge/debug/EndgeBridgeDebug_Module.d.ts +4 -1
- package/dist/features/core/modules/commands/domain/commands.types.d.ts +3 -8
- package/dist/features/core/modules/commands/services/context/SetFacetCommand.d.ts +9 -0
- package/dist/features/core/modules/commands/types/context-command-target.type.d.ts +1 -3
- package/dist/features/core/modules/compiler/EndgeCompiler_Module.d.ts +3 -6
- package/dist/features/core/modules/compiler/services/action/action-compile.d.ts +2 -0
- package/dist/features/core/modules/compiler/services/computation/computation-compile.d.ts +2 -0
- package/dist/features/core/modules/configuration/EndgeConfiguration_Module.d.ts +2 -2
- package/dist/features/core/modules/configuration/domain/endge-configuration.d.ts +1 -1
- package/dist/features/core/modules/configuration/domain/tooltip.config.d.ts +1 -1
- package/dist/features/core/modules/configuration/domain/types/configuration.type.d.ts +3 -1
- package/dist/features/core/modules/context/EndgeContext_Module.d.ts +15 -21
- package/dist/features/core/modules/context/domain/context-persistence.types.d.ts +8 -8
- package/dist/features/core/modules/domain/EndgeDomain_Module.d.ts +18 -201
- package/dist/features/core/modules/domain/documents/document-metadata.d.ts +7 -0
- package/dist/features/core/modules/domain/documents/domain-document-descriptors.d.ts +4 -10
- package/dist/features/core/modules/domain/documents/service-document-serializer.d.ts +0 -1
- package/dist/features/core/modules/domain/entities/RComponentBase.d.ts +0 -1
- package/dist/features/core/modules/domain/entities/RComposition.d.ts +1 -1
- package/dist/features/core/modules/domain/entities/REntity.d.ts +2 -0
- package/dist/features/core/modules/domain/entities/RFacet.d.ts +14 -0
- package/dist/features/core/modules/domain/entities/RFacetDocument.d.ts +12 -0
- package/dist/features/core/modules/domain/entities/RFolder.d.ts +5 -0
- package/dist/features/core/modules/domain/entities/RWorkspace.d.ts +3 -1
- package/dist/features/core/modules/domain/types/document/codegen.types.d.ts +14 -4
- package/dist/features/core/modules/domain/types/document/document-metadata.types.d.ts +38 -0
- package/dist/features/core/modules/domain/types/document/document.types.d.ts +4 -15
- package/dist/features/core/modules/domain/types/document/domain-export.type.d.ts +4 -7
- package/dist/features/core/modules/domain/types/document/domain-provider.type.d.ts +68 -1
- package/dist/features/core/modules/domain/types/document/domain-snapshot.type.d.ts +6 -1
- package/dist/features/core/modules/domain/types/document/query.types.d.ts +0 -48
- package/dist/features/core/modules/domain-repository/EndgeDomainRepository_Module.d.ts +31 -4
- package/dist/features/core/modules/events/domain/events.types.d.ts +1 -3
- package/dist/features/core/modules/i18n/services/composition-i18n-catalog-projection.d.ts +1 -3
- package/dist/features/core/modules/program/domain/types/program.types.d.ts +1 -1
- package/dist/features/core/modules/runtime/EndgeRuntime_Module.d.ts +2 -6
- package/dist/features/core/modules/runtime/domain/execution-context.types.d.ts +5 -12
- package/dist/features/core/modules/runtime/domain/runtime-entity-map.types.d.ts +0 -3
- package/dist/features/core/modules/runtime/domain/runtime-host.types.d.ts +0 -4
- package/dist/features/core/modules/runtime/domain/runtime.types.d.ts +1 -2
- package/dist/features/core/modules/runtime/execution/endge-simulation.d.ts +1 -1
- package/dist/features/core/modules/runtime/hosts/CompositionRuntimeHost.d.ts +2 -3
- package/dist/features/core/modules/runtime/hosts/SimulationRuntimeHost.d.ts +2 -2
- package/dist/features/core/modules/runtime/services/strategies/CompositionRuntimeStrategy.d.ts +1 -1
- package/dist/features/core/modules/runtime/services/transports/BrowserWebSocketStreamTransportFactory.d.ts +6 -0
- package/dist/features/core/modules/source/EndgeSource_Module.d.ts +2 -2
- package/dist/features/core/modules/source/domain/types/composition-source.types.d.ts +14 -1
- package/dist/features/core/modules/source/domain/types/configuration-source.types.d.ts +2 -0
- package/dist/features/core/modules/source/domain/types/simulation-source.types.d.ts +4 -6
- package/dist/features/core/modules/source/domain/types/source-engine.types.d.ts +9 -4
- package/dist/features/core/modules/source/domain/types/store-source.types.d.ts +2 -0
- package/dist/features/core/modules/source/domain/types/stream-source.types.d.ts +15 -1
- package/dist/features/core/modules/source/domain/types/type-source.types.d.ts +2 -0
- package/dist/features/core/modules/source/domain/types/update-source.types.d.ts +2 -0
- package/dist/features/core/modules/source/services/SimulationSourceResolver.d.ts +3 -2
- package/dist/features/core/modules/source/services/compilers/action-source-compile.d.ts +2 -0
- package/dist/features/core/modules/source/services/compilers/composition-source-compile.d.ts +1 -1
- package/dist/features/core/modules/source/services/component-sfc/component-sfc-metadata-source-patch.d.ts +2 -2
- package/dist/features/core/modules/source/services/strategies/CompositionSourceEngineStrategy.d.ts +2 -2
- package/dist/features/core/modules/source/services/strategies/SimulationSourceEngineStrategy.d.ts +2 -2
- package/dist/features/core/modules/source/templates/simulation.default.source.d.ts +1 -1
- package/dist/features/core/modules/workspace/domain/workspace.types.d.ts +5 -0
- package/dist/main.d.ts +4 -9
- package/package.json +2 -2
- package/dist/features/core/modules/commands/services/context/SetEnvironmentCommand.d.ts +0 -9
- package/dist/features/core/modules/commands/services/context/SetProjectCommand.d.ts +0 -9
- package/dist/features/core/modules/commands/services/context/SetTenantCommand.d.ts +0 -9
- package/dist/features/core/modules/domain/entities/REnvironment.d.ts +0 -9
- package/dist/features/core/modules/domain/entities/RParameter.d.ts +0 -11
- package/dist/features/core/modules/domain/entities/RProject.d.ts +0 -64
- package/dist/features/core/modules/domain/entities/RQueryFilter.d.ts +0 -12
- package/dist/features/core/modules/domain/entities/RTenant.d.ts +0 -10
- package/dist/features/core/modules/runtime/domain/runtime-project-session.types.d.ts +0 -31
- package/dist/features/core/modules/runtime/execution/endge-project.d.ts +0 -6
- package/dist/features/core/modules/runtime/hosts/ProjectRuntimeHost.d.ts +0 -21
- package/dist/features/core/modules/runtime/services/strategies/ProjectRuntimeStrategy.d.ts +0 -9
- package/dist/features/core/modules/source/templates/project.default.source.d.ts +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EndgeLiveDomainDocument, EndgeLiveDomainSnapshot, EndgeWorkspaceServerState } from './domain-snapshot.type';
|
|
2
2
|
/** Канонические коллекции persisted-домена нового backend. */
|
|
3
|
-
export type EndgeDomainCollection = '
|
|
3
|
+
export type EndgeDomainCollection = 'facets' | 'facet-documents' | 'folders' | 'types' | 'queries' | 'data-views' | 'compositions' | 'stores' | 'streams' | 'simulations' | 'updates' | 'mocks' | 'components' | 'actions' | 'filters' | 'converters' | 'computations' | 'vocabs' | 'i18n-bundles' | 'auth-profiles' | 'navigations' | 'styles' | 'configurations';
|
|
4
4
|
/** Возможности выбранного источника домена. */
|
|
5
5
|
export interface EndgeDomainProviderCapabilities {
|
|
6
6
|
snapshot: true;
|
|
@@ -25,6 +25,25 @@ export interface EndgeDocumentMutationResult {
|
|
|
25
25
|
document: EndgeLiveDomainDocument;
|
|
26
26
|
etag: string | null;
|
|
27
27
|
}
|
|
28
|
+
/** Minimal deleted-document metadata returned by the workspace archive. */
|
|
29
|
+
export interface EndgeArchivedDocument {
|
|
30
|
+
type: EndgeDomainCollection;
|
|
31
|
+
identity: string;
|
|
32
|
+
displayName: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
deletedAt: string;
|
|
35
|
+
revision: number;
|
|
36
|
+
}
|
|
37
|
+
export interface EndgeArchiveListRequest {
|
|
38
|
+
workspaceIdentity: string;
|
|
39
|
+
limit?: number;
|
|
40
|
+
cursor?: string;
|
|
41
|
+
signal?: AbortSignal;
|
|
42
|
+
}
|
|
43
|
+
export interface EndgeArchivePage {
|
|
44
|
+
items: EndgeArchivedDocument[];
|
|
45
|
+
nextCursor?: string;
|
|
46
|
+
}
|
|
28
47
|
/** Документ с optimistic revision для атомарного перемещения. */
|
|
29
48
|
export interface EndgeDocumentMoveRequestItem {
|
|
30
49
|
collection: EndgeDomainCollection;
|
|
@@ -36,6 +55,7 @@ export interface EndgeDocumentsMoveRequest {
|
|
|
36
55
|
workspaceIdentity: string;
|
|
37
56
|
documents: EndgeDocumentMoveRequestItem[];
|
|
38
57
|
folderIdentity: string;
|
|
58
|
+
placement: 'frontend' | 'workspace';
|
|
39
59
|
signal?: AbortSignal;
|
|
40
60
|
}
|
|
41
61
|
/** Актуальный документ и его transport-коллекция после перемещения. */
|
|
@@ -60,6 +80,41 @@ export interface EndgeWorkspaceMutationResult {
|
|
|
60
80
|
};
|
|
61
81
|
etag: string | null;
|
|
62
82
|
}
|
|
83
|
+
export interface EndgeFacetListRequest {
|
|
84
|
+
workspaceIdentity: string;
|
|
85
|
+
includeDeleted?: boolean;
|
|
86
|
+
signal?: AbortSignal;
|
|
87
|
+
}
|
|
88
|
+
export interface EndgeFacetDocumentListRequest extends EndgeFacetListRequest {
|
|
89
|
+
facetIdentity: string;
|
|
90
|
+
}
|
|
91
|
+
export interface EndgeFacetMutationRequest {
|
|
92
|
+
workspaceIdentity: string;
|
|
93
|
+
identity: string;
|
|
94
|
+
document?: Record<string, unknown>;
|
|
95
|
+
expectedRevision?: number;
|
|
96
|
+
signal?: AbortSignal;
|
|
97
|
+
}
|
|
98
|
+
export interface EndgeFacetDocumentMutationRequest extends EndgeFacetMutationRequest {
|
|
99
|
+
facetIdentity: string;
|
|
100
|
+
}
|
|
101
|
+
export interface EndgeFacetReorderItem {
|
|
102
|
+
identity: string;
|
|
103
|
+
expectedRevision: number;
|
|
104
|
+
}
|
|
105
|
+
export interface EndgeFacetReorderRequest {
|
|
106
|
+
workspaceIdentity: string;
|
|
107
|
+
items: EndgeFacetReorderItem[];
|
|
108
|
+
signal?: AbortSignal;
|
|
109
|
+
}
|
|
110
|
+
export interface EndgeFacetMutationResult {
|
|
111
|
+
document: EndgeLiveDomainDocument;
|
|
112
|
+
etag: string | null;
|
|
113
|
+
}
|
|
114
|
+
export interface EndgeFacetReorderResult {
|
|
115
|
+
documents: EndgeLiveDomainDocument[];
|
|
116
|
+
etag: string | null;
|
|
117
|
+
}
|
|
63
118
|
/** Транспортно-независимый источник полного workspace snapshot. */
|
|
64
119
|
export interface EndgeDomainProvider {
|
|
65
120
|
readonly id: string;
|
|
@@ -70,8 +125,20 @@ export interface EndgeDomainProvider {
|
|
|
70
125
|
updateDocument: (request: EndgeDocumentMutationRequest) => Promise<EndgeDocumentMutationResult>;
|
|
71
126
|
softDeleteDocument: (request: EndgeDocumentMutationRequest) => Promise<EndgeDocumentMutationResult>;
|
|
72
127
|
restoreDocument: (request: EndgeDocumentMutationRequest) => Promise<EndgeDocumentMutationResult>;
|
|
128
|
+
listArchivedDocuments?: (request: EndgeArchiveListRequest) => Promise<EndgeArchivePage>;
|
|
73
129
|
moveDocuments?: (request: EndgeDocumentsMoveRequest) => Promise<EndgeDocumentsMoveResult>;
|
|
74
130
|
updateWorkspace: (request: EndgeWorkspaceMutationRequest) => Promise<EndgeWorkspaceMutationResult>;
|
|
131
|
+
listFacets?: (request: EndgeFacetListRequest) => Promise<EndgeLiveDomainDocument[]>;
|
|
132
|
+
createFacet?: (request: EndgeFacetMutationRequest) => Promise<EndgeFacetMutationResult>;
|
|
133
|
+
updateFacet?: (request: EndgeFacetMutationRequest) => Promise<EndgeFacetMutationResult>;
|
|
134
|
+
softDeleteFacet?: (request: EndgeFacetMutationRequest) => Promise<EndgeFacetMutationResult>;
|
|
135
|
+
restoreFacet?: (request: EndgeFacetMutationRequest) => Promise<EndgeFacetMutationResult>;
|
|
136
|
+
reorderFacets?: (request: EndgeFacetReorderRequest) => Promise<EndgeFacetReorderResult>;
|
|
137
|
+
listFacetDocuments?: (request: EndgeFacetDocumentListRequest) => Promise<EndgeLiveDomainDocument[]>;
|
|
138
|
+
createFacetDocument?: (request: EndgeFacetDocumentMutationRequest) => Promise<EndgeFacetMutationResult>;
|
|
139
|
+
updateFacetDocument?: (request: EndgeFacetDocumentMutationRequest) => Promise<EndgeFacetMutationResult>;
|
|
140
|
+
softDeleteFacetDocument?: (request: EndgeFacetDocumentMutationRequest) => Promise<EndgeFacetMutationResult>;
|
|
141
|
+
restoreFacetDocument?: (request: EndgeFacetDocumentMutationRequest) => Promise<EndgeFacetMutationResult>;
|
|
75
142
|
}
|
|
76
143
|
export type EndgeDomainRepositoryProviderId = 'service-backend' | 'bundle' | 'plain';
|
|
77
144
|
/** Публичные возможности активного источника persisted domain. */
|
|
@@ -26,7 +26,12 @@ export type EndgeLiveDomainDocument = Record<string, unknown> & {
|
|
|
26
26
|
};
|
|
27
27
|
/** Коллекции документов live snapshot нового backend. */
|
|
28
28
|
export type EndgeLivePortableDocuments = {
|
|
29
|
-
[K in keyof EndgePortableDocuments]: EndgeLiveDomainDocument[];
|
|
29
|
+
[K in Exclude<keyof EndgePortableDocuments, 'facets' | 'facet-documents'>]: EndgeLiveDomainDocument[];
|
|
30
|
+
} & {
|
|
31
|
+
/** Optional only for backward-compatible materialization of pre-v6 in-memory snapshots. */
|
|
32
|
+
'facets'?: EndgeLiveDomainDocument[];
|
|
33
|
+
/** Optional only for backward-compatible materialization of pre-v6 in-memory snapshots. */
|
|
34
|
+
'facet-documents'?: EndgeLiveDomainDocument[];
|
|
30
35
|
};
|
|
31
36
|
/** Консистентный live snapshot одного workspace. */
|
|
32
37
|
export type EndgeLiveDomainSnapshot = Omit<EndgeDomainBundle, 'documents' | 'workspace'> & {
|
|
@@ -15,51 +15,3 @@ export interface RQueryAuth {
|
|
|
15
15
|
/** Имя query-параметра (если sendAs='query', по умолчанию 'access_token'). */
|
|
16
16
|
queryParamName?: string;
|
|
17
17
|
}
|
|
18
|
-
/** Режим применения списка фильтров запроса (пока только слияние по порядку). */
|
|
19
|
-
export type RQueryFilterApplyMode = 'merge';
|
|
20
|
-
export type FilterFieldType = 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'select' | 'multi-select';
|
|
21
|
-
export interface FilterStaticValue {
|
|
22
|
-
label: string;
|
|
23
|
-
value: string;
|
|
24
|
-
}
|
|
25
|
-
export interface FilterDynamicSource {
|
|
26
|
-
type: 'payload' | 'vocabs' | 'query';
|
|
27
|
-
collection?: string;
|
|
28
|
-
mapLabel?: string;
|
|
29
|
-
mapValue?: string;
|
|
30
|
-
queryIdentity?: string;
|
|
31
|
-
}
|
|
32
|
-
export interface FilterFieldSchema {
|
|
33
|
-
key: string;
|
|
34
|
-
label: string;
|
|
35
|
-
description?: string;
|
|
36
|
-
required?: boolean;
|
|
37
|
-
multiple?: boolean;
|
|
38
|
-
type: FilterFieldType;
|
|
39
|
-
staticValues?: FilterStaticValue[];
|
|
40
|
-
dynamicSource?: FilterDynamicSource | null;
|
|
41
|
-
}
|
|
42
|
-
export interface RuntimeFilterLink {
|
|
43
|
-
identity: string;
|
|
44
|
-
displayName: string;
|
|
45
|
-
description?: string;
|
|
46
|
-
}
|
|
47
|
-
/** Схема параметра (коллекция parameters в Payload). */
|
|
48
|
-
export interface RParameterSchema {
|
|
49
|
-
identity: string;
|
|
50
|
-
displayName: string;
|
|
51
|
-
description?: string | null;
|
|
52
|
-
fields: FilterFieldSchema[];
|
|
53
|
-
runtimeFilters?: RuntimeFilterLink[];
|
|
54
|
-
folder?: string | null;
|
|
55
|
-
folderId?: string | number | null;
|
|
56
|
-
author?: string;
|
|
57
|
-
active: boolean;
|
|
58
|
-
deletedAt?: string | null;
|
|
59
|
-
meta?: Record<string, unknown>;
|
|
60
|
-
}
|
|
61
|
-
export declare class RuntimeFilterLinkEntity {
|
|
62
|
-
identity: string;
|
|
63
|
-
displayName: string;
|
|
64
|
-
description?: string;
|
|
65
|
-
}
|
|
@@ -2,8 +2,10 @@ import { EndgeBootContext } from '../../kernel/types/bootstrap.types';
|
|
|
2
2
|
import { DocumentCreateRequest, DocumentCreateResult } from '../domain/types/document/document-create.type';
|
|
3
3
|
import { EndgeDomainDocumentMove } from '../domain/types/document/document-move.type';
|
|
4
4
|
import { DomainDocumentType } from '../domain/types/document/document.types';
|
|
5
|
-
import { EndgeDomainRepositoryCapabilities } from '../domain/types/document/domain-provider.type';
|
|
6
|
-
import { EndgeDocumentServerState, EndgeLiveDomainSnapshot } from '../domain/types/document/domain-snapshot.type';
|
|
5
|
+
import { EndgeArchivedDocument, EndgeArchivePage, EndgeDomainRepositoryCapabilities } from '../domain/types/document/domain-provider.type';
|
|
6
|
+
import { EndgeDocumentServerState, EndgeLiveDomainDocument, EndgeLiveDomainSnapshot } from '../domain/types/document/domain-snapshot.type';
|
|
7
|
+
import { RFacet } from '../domain/entities/RFacet';
|
|
8
|
+
import { RFacetDocument } from '../domain/entities/RFacetDocument';
|
|
7
9
|
import { EndgeModule } from '../../../federation/EndgeModule';
|
|
8
10
|
/** Явная ошибка записи через bundle/plain или live backend только для чтения. */
|
|
9
11
|
export declare class EndgeDomainRepositoryReadOnlyError extends Error {
|
|
@@ -32,6 +34,7 @@ export declare class EndgeDomainRepository_Module extends EndgeModule<EndgeBootC
|
|
|
32
34
|
loadSnapshot(ctx: EndgeBootContext): Promise<EndgeLiveDomainSnapshot>;
|
|
33
35
|
getLoadedSnapshot(): EndgeLiveDomainSnapshot | null;
|
|
34
36
|
getDocumentServerState(documentType: string, identity: string): EndgeDocumentServerState | null;
|
|
37
|
+
getFacetDocumentServerState(facetIdentity: string, documentIdentity: string): EndgeDocumentServerState | null;
|
|
35
38
|
reset(): void;
|
|
36
39
|
isDocumentIdentityAvailable(documentType: DomainDocumentType, identity: string): Promise<boolean>;
|
|
37
40
|
createDocument(request: DocumentCreateRequest): Promise<DocumentCreateResult>;
|
|
@@ -41,22 +44,46 @@ export declare class EndgeDomainRepository_Module extends EndgeModule<EndgeBootC
|
|
|
41
44
|
}): Promise<void>;
|
|
42
45
|
deleteDocument(documentIdOrIdentity: string, documentType: DomainDocumentType): Promise<void>;
|
|
43
46
|
restoreDocument(documentIdOrIdentity: string, documentType: DomainDocumentType): Promise<void>;
|
|
44
|
-
|
|
47
|
+
/** Lists deleted generic documents for the active service workspace. */
|
|
48
|
+
listArchivedDocuments(cursor?: string, limit?: number): Promise<EndgeArchivePage>;
|
|
49
|
+
/** Restores a tombstone returned by listArchivedDocuments. */
|
|
50
|
+
restoreArchivedDocument(item: EndgeArchivedDocument): Promise<EndgeLiveDomainDocument>;
|
|
51
|
+
changeDocumentFolder(documentId: string | number, documentType: DomainDocumentType, folderIdOrIdentity: string | number | null, placement?: 'frontend' | 'workspace'): Promise<void>;
|
|
45
52
|
/** Атомарно переносит несколько persisted-документов в одну папку. */
|
|
46
|
-
changeDocumentsFolder(documents: readonly EndgeDomainDocumentMove[], folderIdOrIdentity: string | number): Promise<number>;
|
|
53
|
+
changeDocumentsFolder(documents: readonly EndgeDomainDocumentMove[], folderIdOrIdentity: string | number, placement?: 'frontend' | 'workspace'): Promise<number>;
|
|
47
54
|
saveFolder(folderId: string): Promise<void>;
|
|
48
55
|
deleteFolder(folderIdentity: string): Promise<void>;
|
|
49
56
|
restoreFolder(folderIdentity: string): Promise<void>;
|
|
57
|
+
listFacets(includeDeleted?: boolean): Promise<RFacet[]>;
|
|
58
|
+
createFacet(document: Record<string, unknown>): Promise<RFacet>;
|
|
59
|
+
updateFacet(identity: string, document: Record<string, unknown>): Promise<RFacet>;
|
|
60
|
+
deleteFacet(identity: string): Promise<RFacet>;
|
|
61
|
+
restoreFacet(identity: string): Promise<RFacet>;
|
|
62
|
+
reorderFacets(identities: readonly string[]): Promise<RFacet[]>;
|
|
63
|
+
listFacetDocuments(facetIdentity: string, includeDeleted?: boolean): Promise<RFacetDocument[]>;
|
|
64
|
+
createFacetDocument(facetIdentity: string, document: Record<string, unknown>): Promise<RFacetDocument>;
|
|
65
|
+
updateFacetDocument(facetIdentity: string, identity: string, document: Record<string, unknown>): Promise<RFacetDocument>;
|
|
66
|
+
deleteFacetDocument(facetIdentity: string, identity: string): Promise<RFacetDocument>;
|
|
67
|
+
restoreFacetDocument(facetIdentity: string, identity: string): Promise<RFacetDocument>;
|
|
50
68
|
toJSON(): Record<string, unknown>;
|
|
51
69
|
/** Не позволяет позднему ответу предыдущего контекста изменить новый Domain. */
|
|
52
70
|
private _captureGeneration;
|
|
53
71
|
private _indexSnapshotServerState;
|
|
54
72
|
private _serverStateKey;
|
|
73
|
+
private _facetDocumentServerStateKey;
|
|
55
74
|
private _requireDocumentServerState;
|
|
56
75
|
private _findServerIdentity;
|
|
76
|
+
private _requireFacetDocumentServerState;
|
|
77
|
+
private _materializeFacet;
|
|
78
|
+
private _materializeFacetDocument;
|
|
79
|
+
private _applyFacet;
|
|
80
|
+
private _applyFacetDocument;
|
|
81
|
+
private _mutateFacetLifecycle;
|
|
82
|
+
private _mutateFacetDocumentLifecycle;
|
|
57
83
|
private _assertMutationsSupported;
|
|
58
84
|
private _serviceProvider;
|
|
59
85
|
private _requireServiceProvider;
|
|
86
|
+
private _requireFacetProviderOperation;
|
|
60
87
|
private _serviceWorkspaceIdentity;
|
|
61
88
|
private _serviceFolderIds;
|
|
62
89
|
private _saveServiceDocument;
|
|
@@ -12,9 +12,7 @@ export interface ContextValueChange<T> {
|
|
|
12
12
|
/** Статические события Endge Core о фактически произошедших изменениях. */
|
|
13
13
|
export interface EndgeCoreEventMap {
|
|
14
14
|
'context:workspace-changed': ContextValueChange<string | null>;
|
|
15
|
-
'context:
|
|
16
|
-
'context:project-changed': ContextValueChange<string>;
|
|
17
|
-
'context:environment-changed': ContextValueChange<string>;
|
|
15
|
+
'context:facets-changed': ContextValueChange<Readonly<Record<string, string>>>;
|
|
18
16
|
'context:user-changed': ContextValueChange<string>;
|
|
19
17
|
'context:locale-changed': ContextValueChange<string>;
|
|
20
18
|
'context:theme-changed': ContextValueChange<string>;
|
|
@@ -10,12 +10,10 @@ export interface CompositionI18nCatalogProjectionOccurrence {
|
|
|
10
10
|
export interface CompositionI18nCatalogProjectionInput {
|
|
11
11
|
artifacts: RuntimeArtifactReader;
|
|
12
12
|
rootIdentities: readonly string[];
|
|
13
|
-
rootEntityType?: 'composition' | 'project';
|
|
14
|
-
targetEntityType?: 'composition' | 'project';
|
|
15
13
|
targetIdentity: string;
|
|
16
14
|
}
|
|
17
15
|
/**
|
|
18
16
|
* Проецирует фактические каталоги i18n только из скомпилированных артефактов Composition.
|
|
19
17
|
* RuntimeHost, lifecycle-хуки и пользовательский runtime source не выполняются.
|
|
20
18
|
*/
|
|
21
|
-
export declare function
|
|
19
|
+
export declare function compositionI18nCatalogs(input: CompositionI18nCatalogProjectionInput): CompositionI18nCatalogProjectionOccurrence[];
|
|
@@ -14,7 +14,7 @@ export type { ActionProgramPayload } from './action-program.types';
|
|
|
14
14
|
export type { ConfigurationProgramPayload } from '../../../source/domain/types/configuration-source.types';
|
|
15
15
|
export type ProgramArtifactKey = string;
|
|
16
16
|
/** Тип доменной сущности, для которой compiler может построить program artifact. */
|
|
17
|
-
export type ProgramEntityType = 'type' | 'component-sfc' | 'computation' | 'action' | 'query' | 'vocab' | 'data-view' | 'store' | 'stream' | 'simulation' | 'update' | 'filter' | 'composition' | '
|
|
17
|
+
export type ProgramEntityType = 'type' | 'component-sfc' | 'computation' | 'action' | 'query' | 'vocab' | 'data-view' | 'store' | 'stream' | 'simulation' | 'update' | 'filter' | 'composition' | 'style' | 'configuration';
|
|
18
18
|
/** Итоговый статус artifact после компиляции и валидации. */
|
|
19
19
|
export type ProgramArtifactStatus = 'valid' | 'warning' | 'error';
|
|
20
20
|
/** Возможность, которую artifact предоставляет runtime/render слоям. */
|
|
@@ -11,7 +11,6 @@ import { EndgeDataMode } from '../workspace/domain/workspace.types';
|
|
|
11
11
|
import { EndgeRuntimeScopes_Module } from './EndgeRuntimeScopes_Module';
|
|
12
12
|
import { EndgeComposition } from './execution/endge-composition';
|
|
13
13
|
import { EndgeDataView } from './execution/endge-data-view';
|
|
14
|
-
import { EndgeProject } from './execution/endge-project';
|
|
15
14
|
import { EndgeQuery } from './execution/endge-query';
|
|
16
15
|
import { EndgeSimulation } from './execution/endge-simulation';
|
|
17
16
|
import { EndgeOperations_Module } from './operation/EndgeOperations_Module';
|
|
@@ -22,7 +21,6 @@ export declare class EndgeRuntime_Module extends EndgeModule<EndgeBootContext> {
|
|
|
22
21
|
readonly query: EndgeQuery;
|
|
23
22
|
readonly dataView: EndgeDataView;
|
|
24
23
|
readonly composition: EndgeComposition;
|
|
25
|
-
readonly project: EndgeProject;
|
|
26
24
|
readonly simulation: EndgeSimulation;
|
|
27
25
|
readonly operations: EndgeOperations_Module;
|
|
28
26
|
readonly scopes: EndgeRuntimeScopes_Module;
|
|
@@ -70,6 +68,8 @@ export declare class EndgeRuntime_Module extends EndgeModule<EndgeBootContext> {
|
|
|
70
68
|
executeAsync(model: RuntimeExecutableModel, options?: RuntimeExecuteOptions): Promise<AnyRuntimeHost | null>;
|
|
71
69
|
/** Разрешает data mode по ближайшему Composition override с fallback на общий Endge context. */
|
|
72
70
|
resolveDataMode(host: RuntimeHost<any, any> | null | undefined): EndgeDataMode;
|
|
71
|
+
/** Монтирует единственную startup Composition текущего Workspace без legacy fallback. */
|
|
72
|
+
mountStartup(options?: Parameters<EndgeComposition['mount']>[1]): Promise<import('../source/domain/types/composition-source.types').CompositionSession<import('./hosts/CompositionRuntimeHost').CompositionRuntimeHost>>;
|
|
73
73
|
/**
|
|
74
74
|
* Регистрирует стратегию запуска runtime-сущности.
|
|
75
75
|
*/
|
|
@@ -167,10 +167,6 @@ export declare class EndgeRuntime_Module extends EndgeModule<EndgeBootContext> {
|
|
|
167
167
|
reset(): Promise<void>;
|
|
168
168
|
/** Проецирует фактические переменные workspace в runtime namespace Raph. */
|
|
169
169
|
private _syncWorkspaceVariablesToRaph;
|
|
170
|
-
/** Восстанавливает сохранённые значения runtime-фильтров независимо от переменных workspace. */
|
|
171
|
-
private _hydrateRuntimeFilters;
|
|
172
|
-
/** Однократно переносит прежний глобальный storage runtime-фильтров. */
|
|
173
|
-
private _migrateLegacyRuntimeFilters;
|
|
174
170
|
/**
|
|
175
171
|
* Внутренний destroy для host с контролем уведомления подписчиков.
|
|
176
172
|
*/
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
/** Structural context одного полного boot/build lifecycle. */
|
|
2
2
|
export interface EndgeExecutionContext {
|
|
3
|
-
|
|
4
|
-
projectIdentity: string;
|
|
5
|
-
environmentIdentity: string;
|
|
3
|
+
readonly facets: Readonly<Record<string, string>>;
|
|
6
4
|
}
|
|
7
|
-
export interface
|
|
8
|
-
identity: string;
|
|
9
|
-
allowedEnvironmentIds: readonly number[];
|
|
10
|
-
}
|
|
11
|
-
export interface EndgeExecutionContextEnvironmentCandidate {
|
|
12
|
-
id: string | number;
|
|
5
|
+
export interface EndgeExecutionContextFacetCandidate {
|
|
13
6
|
identity: string;
|
|
7
|
+
position: number;
|
|
8
|
+
documents: readonly string[];
|
|
14
9
|
}
|
|
15
10
|
export interface EndgeExecutionContextResolutionInput {
|
|
16
11
|
explicit?: Partial<EndgeExecutionContext>;
|
|
17
|
-
|
|
18
|
-
projects: readonly EndgeExecutionContextProjectCandidate[];
|
|
19
|
-
environments: readonly EndgeExecutionContextEnvironmentCandidate[];
|
|
12
|
+
facets: readonly EndgeExecutionContextFacetCandidate[];
|
|
20
13
|
}
|
|
@@ -3,7 +3,6 @@ import { RComponentSFC } from '../../domain/entities/RComponentSFC';
|
|
|
3
3
|
import { RComposition } from '../../domain/entities/RComposition';
|
|
4
4
|
import { RFilter } from '../../domain/entities/RFilter';
|
|
5
5
|
import { RPage } from '../../domain/entities/RPage';
|
|
6
|
-
import { RProject } from '../../domain/entities/RProject';
|
|
7
6
|
import { RQuery } from '../../domain/entities/RQuery';
|
|
8
7
|
import { RSimulation } from '../../domain/entities/RSimulation';
|
|
9
8
|
import { RStore } from '../../domain/entities/RStore';
|
|
@@ -14,8 +13,6 @@ import { RStream } from '../../domain/entities/RStream';
|
|
|
14
13
|
export interface RuntimeEntityModelMap {
|
|
15
14
|
/** Владелец отдельного запуска target с локальными подменами. */
|
|
16
15
|
'simulation': RSimulation;
|
|
17
|
-
/** Доменная модель проекта. */
|
|
18
|
-
'project': RProject;
|
|
19
16
|
/** Доменная модель страницы. */
|
|
20
17
|
'page': RPage;
|
|
21
18
|
/** Доменная модель SFC-компонента нового API. */
|
|
@@ -76,9 +76,6 @@ export interface ComponentSFCRuntimeHostContext extends RuntimeHostContextBase {
|
|
|
76
76
|
export interface PageRuntimeHostContext extends RuntimeHostContextBase {
|
|
77
77
|
lastRenderAt: string | null;
|
|
78
78
|
}
|
|
79
|
-
export interface ProjectRuntimeHostContext extends RuntimeHostContextBase {
|
|
80
|
-
lastRefreshAt: string | null;
|
|
81
|
-
}
|
|
82
79
|
export interface RuntimeHostContextMap {
|
|
83
80
|
'simulation': RuntimeHostContextBase;
|
|
84
81
|
'action': ActionRuntimeHostContext;
|
|
@@ -89,7 +86,6 @@ export interface RuntimeHostContextMap {
|
|
|
89
86
|
'stream': StreamRuntimeHostContext;
|
|
90
87
|
'component-sfc': ComponentSFCRuntimeHostContext;
|
|
91
88
|
'page': PageRuntimeHostContext;
|
|
92
|
-
'project': ProjectRuntimeHostContext;
|
|
93
89
|
}
|
|
94
90
|
export type RuntimeHostContext<TType extends RuntimeEntityType> = RuntimeHostContextMap[TType];
|
|
95
91
|
export interface RuntimeHostSnapshot {
|
|
@@ -3,7 +3,6 @@ import { RComponentSFC } from '../../domain/entities/RComponentSFC';
|
|
|
3
3
|
import { RComposition } from '../../domain/entities/RComposition';
|
|
4
4
|
import { RFilter } from '../../domain/entities/RFilter';
|
|
5
5
|
import { RPage } from '../../domain/entities/RPage';
|
|
6
|
-
import { RProject } from '../../domain/entities/RProject';
|
|
7
6
|
import { RQuery } from '../../domain/entities/RQuery';
|
|
8
7
|
import { RSimulation } from '../../domain/entities/RSimulation';
|
|
9
8
|
import { RStore } from '../../domain/entities/RStore';
|
|
@@ -13,7 +12,7 @@ import { RuntimeHostRegistrySnapshot } from './runtime-registry.types';
|
|
|
13
12
|
* Виды runtime
|
|
14
13
|
*/
|
|
15
14
|
export type RuntimeKind = 'query' | 'filter' | 'composition' | 'store' | 'stream' | 'action' | 'simulation' | 'runtime';
|
|
16
|
-
export type RuntimeExecutableModel = RQuery | RAction |
|
|
15
|
+
export type RuntimeExecutableModel = RQuery | RAction | RPage | RComponentSFC | RFilter | RComposition | RStore | RStream | RSimulation;
|
|
17
16
|
export interface EndgeRuntimeSnapshot extends RuntimeHostRegistrySnapshot {
|
|
18
17
|
generatedAt: number;
|
|
19
18
|
scopes: import('./runtime-scope.types').RuntimeScopeSnapshot[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SimulationMountOptions, SimulationRuntimeSession } from '../domain/simulation-runtime.types';
|
|
2
|
-
/** Запускает Simulation через
|
|
2
|
+
/** Запускает Simulation с Composition target через общий runtime registry и lifecycle. */
|
|
3
3
|
export declare class EndgeSimulation {
|
|
4
4
|
mount(identity: string, options?: SimulationMountOptions): Promise<SimulationRuntimeSession>;
|
|
5
5
|
}
|
|
@@ -9,7 +9,7 @@ import { StoreMutationPlan } from '../../source/domain/types/update-source.types
|
|
|
9
9
|
import { RuntimeHostBase } from '../RuntimeHostBase';
|
|
10
10
|
import { RuntimeScope } from '../RuntimeScope';
|
|
11
11
|
/** Runtime orchestration host: children, bindings, hooks и public handles. */
|
|
12
|
-
export declare class CompositionRuntimeHost
|
|
12
|
+
export declare class CompositionRuntimeHost extends RuntimeHostBase<'composition', RuntimeHostContext<'composition'>, CompositionProgramPayload> {
|
|
13
13
|
private _mountPromise;
|
|
14
14
|
private _destroyPromise;
|
|
15
15
|
private _children;
|
|
@@ -41,8 +41,7 @@ export declare class CompositionRuntimeHost<TType extends 'composition' | 'proje
|
|
|
41
41
|
private _mountCancelled;
|
|
42
42
|
constructor(input: {
|
|
43
43
|
id: string;
|
|
44
|
-
model: RuntimeEntityModelMap[
|
|
45
|
-
entityType?: TType;
|
|
44
|
+
model: RuntimeEntityModelMap['composition'];
|
|
46
45
|
parent?: RuntimeHost<any, any> | null;
|
|
47
46
|
meta?: Record<string, unknown>;
|
|
48
47
|
artifactReader: RuntimeArtifactReader;
|
|
@@ -26,7 +26,7 @@ export declare class SimulationRuntimeHost extends RuntimeHostBase<'simulation',
|
|
|
26
26
|
meta: Record<string, unknown>;
|
|
27
27
|
artifacts: RuntimeArtifactReader;
|
|
28
28
|
}): SimulationRuntimeHost | null;
|
|
29
|
-
get target(): CompositionRuntimeHost
|
|
29
|
+
get target(): CompositionRuntimeHost | null;
|
|
30
30
|
/** Проверяет occurrence, а не глобальную identity Query. */
|
|
31
31
|
hasRequest(host: RuntimeHost<any, any>): boolean;
|
|
32
32
|
/** Каждое выполнение получает новый response; mutation Query не меняет шаблон следующего вызова. */
|
|
@@ -40,7 +40,7 @@ export declare class SimulationRuntimeHost extends RuntimeHostBase<'simulation',
|
|
|
40
40
|
openStream(host: RuntimeHost<any, any>, callbacks: Parameters<StreamTransportFactory['open']>[1]): import('../domain/stream-runtime.types').StreamTransportConnection;
|
|
41
41
|
private _requestKey;
|
|
42
42
|
/** Создаёт target штатной strategy; вложенные manual nodes сохраняют свои policies. */
|
|
43
|
-
activateTarget(): Promise<CompositionRuntimeHost
|
|
43
|
+
activateTarget(): Promise<CompositionRuntimeHost>;
|
|
44
44
|
deactivateTarget(): Promise<void>;
|
|
45
45
|
pause(): Promise<void>;
|
|
46
46
|
resume(): Promise<void>;
|
package/dist/features/core/modules/runtime/services/strategies/CompositionRuntimeStrategy.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ export declare class CompositionRuntimeStrategy implements RuntimeStrategy<RComp
|
|
|
5
5
|
readonly id = "runtime:composition";
|
|
6
6
|
readonly entityType: "composition";
|
|
7
7
|
supports(model: unknown): model is RComposition;
|
|
8
|
-
create(ctx: Parameters<RuntimeStrategy<RComposition, CompositionRuntimeHost>['create']>[0]): CompositionRuntimeHost
|
|
8
|
+
create(ctx: Parameters<RuntimeStrategy<RComposition, CompositionRuntimeHost>['create']>[0]): CompositionRuntimeHost | null;
|
|
9
9
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StreamTransportConnection, StreamTransportFactory } from '../../domain/stream-runtime.types';
|
|
2
|
+
/** Владеет WebSocket, повторной подпиской и таймером переподключения одного Stream. */
|
|
3
|
+
export declare class BrowserWebSocketStreamTransportFactory implements StreamTransportFactory {
|
|
4
|
+
/** Открывает JSON transport; close отменяет reconnect и все callbacks соединения. */
|
|
5
|
+
open(artifact: Parameters<StreamTransportFactory['open']>[0], callbacks: Parameters<StreamTransportFactory['open']>[1]): StreamTransportConnection;
|
|
6
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SourceDocumentReference, SourceEngineCompileResult, SourceEngineGenerateResult, SourceEngineStrategy, SourceKind, SourceLanguageCompletion, SourceLanguageContext, SourceLanguageInlineHint, SourceLanguageSemanticHighlight, SourceLanguageSignatureHelp, SourceLanguageStrategy, SourceLanguageValidationResult, SourceParseResult, SourcePatchResult, SourcePatchStrategy } from './domain/types/source-engine.types';
|
|
1
|
+
import { SourceDocumentReference, SourceEngineCompileContext, SourceEngineCompileResult, SourceEngineGenerateResult, SourceEngineStrategy, SourceKind, SourceLanguageCompletion, SourceLanguageContext, SourceLanguageInlineHint, SourceLanguageSemanticHighlight, SourceLanguageSignatureHelp, SourceLanguageStrategy, SourceLanguageValidationResult, SourceParseResult, SourcePatchResult, SourcePatchStrategy } from './domain/types/source-engine.types';
|
|
2
2
|
import { EndgeModule } from '../../../federation/EndgeModule';
|
|
3
3
|
/** Модуль authoring-операций над source-документами Endge. */
|
|
4
4
|
export declare class EndgeSource_Module extends EndgeModule {
|
|
@@ -28,7 +28,7 @@ export declare class EndgeSource_Module extends EndgeModule {
|
|
|
28
28
|
/** Генерирует source для указанного source-kind через зарегистрированную strategy. */
|
|
29
29
|
generate(sourceKind: SourceKind | string, model: unknown): SourceEngineGenerateResult;
|
|
30
30
|
/** Компилирует source указанного source-kind в normalized document и artifact payload. */
|
|
31
|
-
compile(sourceKind: SourceKind | string, source: string): SourceEngineCompileResult;
|
|
31
|
+
compile(sourceKind: SourceKind | string, source: string, context?: SourceEngineCompileContext): SourceEngineCompileResult;
|
|
32
32
|
/** Парсит source указанного source-kind в normalized editor document. */
|
|
33
33
|
parse<TDocument = unknown>(sourceKind: SourceKind | string, source: string): SourceParseResult<TDocument>;
|
|
34
34
|
/** Патчит source указанного source-kind, сохраняя нетронутые участки авторского кода. */
|
|
@@ -163,6 +163,19 @@ export interface CompositionRuntimeDescriptor {
|
|
|
163
163
|
};
|
|
164
164
|
kind: CompositionRuntimeKind;
|
|
165
165
|
identity: string;
|
|
166
|
+
/** Compiler-resolved selector metadata. Runtime executes only kind/identity above. */
|
|
167
|
+
contextSwitch?: {
|
|
168
|
+
selected: 'default' | number;
|
|
169
|
+
default: {
|
|
170
|
+
kind: CompositionRuntimeKind;
|
|
171
|
+
identity: string;
|
|
172
|
+
};
|
|
173
|
+
cases: Array<{
|
|
174
|
+
when: Readonly<Record<string, string>>;
|
|
175
|
+
kind: CompositionRuntimeKind;
|
|
176
|
+
identity: string;
|
|
177
|
+
}>;
|
|
178
|
+
};
|
|
166
179
|
/** Явный override в месте вызова runtime. */
|
|
167
180
|
activationOverride: CompositionActivationDescriptor | null;
|
|
168
181
|
/** Compiler-linked activation, которую runtime применяет без интерпретации source. */
|
|
@@ -375,7 +388,7 @@ export interface CompositionRuntimeOutputHandle {
|
|
|
375
388
|
output?: string;
|
|
376
389
|
}
|
|
377
390
|
/** Публичный контракт Composition host без зависимости Domain от concrete Model runtime. */
|
|
378
|
-
export interface CompositionRuntimeHostHandle
|
|
391
|
+
export interface CompositionRuntimeHostHandle extends RuntimeHost<'composition', any, CompositionProgramPayload> {
|
|
379
392
|
mountGraph: () => Promise<void>;
|
|
380
393
|
getChild: (name: string) => RuntimeHost<any, any> | null;
|
|
381
394
|
getChildren: () => CompositionRuntimeChildHandle[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProgramMetadataMap } from '../../../program/domain/types/program-metadata.types';
|
|
1
2
|
import { ProgramDiagnostic } from '../../../program/domain/types/program.types';
|
|
2
3
|
import { TypeSourceExpression } from './type-source.types';
|
|
3
4
|
/** Сохраняемое JSON-сериализуемое значение конфигурации. */
|
|
@@ -33,6 +34,7 @@ export interface ConfigurationSourceCompileResult {
|
|
|
33
34
|
document: ConfigurationSourceDocument | null;
|
|
34
35
|
/** Best-effort проекция AST для визуального исправления, когда семантическая диагностика блокирует компиляцию. */
|
|
35
36
|
draftDocument?: ConfigurationSourceDocument | null;
|
|
37
|
+
metadata: ProgramMetadataMap;
|
|
36
38
|
diagnostics: Omit<ProgramDiagnostic, 'entityRef'>[];
|
|
37
39
|
}
|
|
38
40
|
export interface EndgeConfigurationSchemaEntry {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProgramMetadataMap } from '../../../program/domain/types/program-metadata.types';
|
|
1
2
|
import { ProgramDependency, ProgramDiagnostic } from '../../../program/domain/types/program.types';
|
|
2
3
|
/** Декларация подмены response Query. Генерация выполняется при запуске Simulation. */
|
|
3
4
|
export interface SimulationMockRequest {
|
|
@@ -28,13 +29,10 @@ export interface SimulationRuntimeOverride {
|
|
|
28
29
|
request?: SimulationMockRequest;
|
|
29
30
|
stream?: SimulationMockStream;
|
|
30
31
|
}
|
|
31
|
-
export
|
|
32
|
+
export interface SimulationTargetReference {
|
|
32
33
|
entityType: 'composition';
|
|
33
34
|
identity: string;
|
|
34
|
-
}
|
|
35
|
-
entityType: 'project';
|
|
36
|
-
identity: string;
|
|
37
|
-
};
|
|
35
|
+
}
|
|
38
36
|
export interface SimulationSourceDocument {
|
|
39
37
|
target: SimulationTargetReference;
|
|
40
38
|
/** Режим неподменённых источников. Отсутствие значения сохраняет наследование. */
|
|
@@ -49,6 +47,7 @@ export interface SimulationSourceCompileResult {
|
|
|
49
47
|
ast: unknown | null;
|
|
50
48
|
document: SimulationSourceDocument | null;
|
|
51
49
|
artifact: SimulationSourceArtifact | null;
|
|
50
|
+
metadata: ProgramMetadataMap;
|
|
52
51
|
diagnostics: Omit<ProgramDiagnostic, 'entityRef'>[];
|
|
53
52
|
dependencies: ProgramDependency[];
|
|
54
53
|
locations: Record<string, {
|
|
@@ -66,7 +65,6 @@ export interface SimulationSourceInput {
|
|
|
66
65
|
isPrimitive?: boolean;
|
|
67
66
|
}
|
|
68
67
|
export interface SimulationSourceCatalog {
|
|
69
|
-
projects: readonly SimulationSourceInput[];
|
|
70
68
|
compositions: readonly SimulationSourceInput[];
|
|
71
69
|
queries: readonly SimulationSourceInput[];
|
|
72
70
|
types: readonly SimulationSourceInput[];
|
|
@@ -2,6 +2,11 @@ import { I18nCatalogProvenance, I18nRuntimeCatalog } from '../../../i18n/domain/
|
|
|
2
2
|
import { TypeSourceDefinition } from './type-source.types';
|
|
3
3
|
/** Канонический тип source-документа, для которого выбирается source strategy. */
|
|
4
4
|
export type SourceKind = 'action' | 'query' | 'vocab' | 'data-view' | 'filter' | 'composition' | 'store' | 'stream' | 'simulation' | 'update' | 'computation' | 'style' | 'type' | 'configuration';
|
|
5
|
+
/** Compiler-owned structural context for context-sensitive Source resolution. */
|
|
6
|
+
export interface SourceEngineCompileContext {
|
|
7
|
+
sourceVersion?: number;
|
|
8
|
+
executionContext?: Readonly<Record<string, string>>;
|
|
9
|
+
}
|
|
5
10
|
/** Тип нейтральной source completion без привязки к Monaco или другому editor API. */
|
|
6
11
|
export type SourceLanguageCompletionKind = 'keyword' | 'function' | 'property' | 'value' | 'snippet';
|
|
7
12
|
/** Позиция курсора внутри source-документа. */
|
|
@@ -37,10 +42,10 @@ export interface SourceLanguageContext {
|
|
|
37
42
|
}>;
|
|
38
43
|
/** Identity документа, владеющего текущей диагностикой Source. */
|
|
39
44
|
ownerIdentity?: string;
|
|
40
|
-
/** Фактические каталоги переводов для всех текущих вхождений
|
|
45
|
+
/** Фактические каталоги переводов для всех текущих вхождений стартовой Composition. */
|
|
41
46
|
i18n?: SourceLanguageI18nContext;
|
|
42
47
|
}
|
|
43
|
-
/** Одно статически спроецированное вхождение Composition в текущем
|
|
48
|
+
/** Одно статически спроецированное вхождение Composition в текущем дереве. */
|
|
44
49
|
export interface SourceLanguageI18nOccurrence {
|
|
45
50
|
id: string;
|
|
46
51
|
catalogsByScope: Readonly<Record<string, I18nRuntimeCatalog>>;
|
|
@@ -78,7 +83,7 @@ export interface SourceLanguageSignatureHelp {
|
|
|
78
83
|
}>;
|
|
79
84
|
}
|
|
80
85
|
/** Логический тип внешнего доменного документа, на который ссылается source. */
|
|
81
|
-
export type SourceDocumentReferenceTarget = 'action' | 'auth-profile' | 'component' | 'composition' | 'computation' | 'converter' | 'data-view' | 'filter' | 'i18n-bundles' | '
|
|
86
|
+
export type SourceDocumentReferenceTarget = 'action' | 'auth-profile' | 'component' | 'composition' | 'computation' | 'converter' | 'data-view' | 'filter' | 'i18n-bundles' | 'mock' | 'query' | 'store' | 'stream' | 'update' | 'style' | 'type' | 'vocabs';
|
|
82
87
|
/** Семантическая ссылка из source на внешний доменный документ. */
|
|
83
88
|
export interface SourceDocumentReference {
|
|
84
89
|
/** Логический тип цели; UI может уточнить concrete document type через domain. */
|
|
@@ -189,7 +194,7 @@ export interface SourceEngineStrategy {
|
|
|
189
194
|
/** Генерирует source из persisted/legacy модели. */
|
|
190
195
|
generate?: (model: unknown) => SourceEngineGenerateResult;
|
|
191
196
|
/** Компилирует source в normalized document и artifact payload. */
|
|
192
|
-
compile?: (source: string) => SourceEngineCompileResult;
|
|
197
|
+
compile?: (source: string, context?: SourceEngineCompileContext) => SourceEngineCompileResult;
|
|
193
198
|
}
|
|
194
199
|
/** Нейтральный token pattern source-языка, не завязанный на Monaco API. */
|
|
195
200
|
export interface SourceLanguageTokenPattern {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EndgeMockReference } from '../../../mock/domain/types/mock-data.type';
|
|
2
|
+
import { ProgramMetadataMap } from '../../../program/domain/types/program-metadata.types';
|
|
2
3
|
import { ProgramDiagnostic } from '../../../program/domain/types/program.types';
|
|
3
4
|
import { DataViewRef } from './data-view-source.types';
|
|
4
5
|
import { SourceFieldDefinition } from './source-expression.types';
|
|
@@ -39,5 +40,6 @@ export interface StoreSourceCompileResult {
|
|
|
39
40
|
ast: unknown | null;
|
|
40
41
|
document: StoreSourceDocument | null;
|
|
41
42
|
artifact: StoreSourceArtifact | null;
|
|
43
|
+
metadata: ProgramMetadataMap;
|
|
42
44
|
diagnostics: Omit<ProgramDiagnostic, 'entityRef'>[];
|
|
43
45
|
}
|