@endge/core 4.0.3 → 5.0.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/ReadMe.md +1 -1
- package/dist/core.cjs +242 -246
- package/dist/core.js +11830 -11590
- package/dist/domain/entities/endge/EndgeFederation.d.ts +7 -7
- package/dist/domain/entities/endge/EndgeSlotRegistry.d.ts +4 -4
- package/dist/domain/entities/runtime/ComponentSFCEventBoundary.d.ts +13 -13
- package/dist/domain/entities/runtime/RuntimeHostBase.d.ts +2 -2
- package/dist/domain/entities/runtime/RuntimeHostRegistry.d.ts +2 -2
- package/dist/domain/entities/runtime/hosts/ComponentSFCRuntimeHost.d.ts +1 -1
- package/dist/domain/types/source/composition-source.types.d.ts +4 -2
- package/dist/model/kernel/endge.d.ts +3 -3
- package/dist/model/modules/context/endge-context.d.ts +5 -5
- package/dist/model/modules/context/endge-vars.d.ts +5 -5
- package/dist/model/modules/context/persistence/RuntimeStateController.d.ts +2 -2
- package/dist/model/modules/domain/endge-domain-repository.d.ts +7 -7
- package/dist/model/modules/domain/endge-domain.d.ts +1 -1
- package/dist/model/modules/domain/endge-types.d.ts +2 -2
- package/dist/model/modules/domain/endge-vocabs.d.ts +28 -28
- package/dist/model/modules/events/endge-events.d.ts +1 -1
- package/dist/model/modules/program/endge-compiler.d.ts +5 -5
- package/dist/model/modules/program/endge-program.d.ts +1 -1
- package/dist/model/modules/runtime/core/endge-runtime.d.ts +11 -11
- package/dist/model/modules/runtime/execution/action/action-program-executor.d.ts +7 -7
- package/dist/model/modules/runtime/execution/computation/ComputationGraphExecutor.d.ts +7 -7
- package/dist/model/modules/runtime/execution/computation/ComputationResource.d.ts +5 -5
- package/dist/model/modules/runtime/execution/computation/ComputationResourceRegistry.d.ts +2 -2
- package/dist/model/modules/runtime/execution/computation/EndgeComputation.d.ts +15 -15
- package/dist/model/modules/runtime/execution/endge-converters.d.ts +6 -6
- package/dist/model/modules/runtime/execution/endge-data-view.d.ts +1 -1
- package/dist/model/modules/runtime/operation/endge-operations.d.ts +5 -5
- package/dist/model/modules/runtime/operation/operation-history.d.ts +9 -9
- package/dist/model/modules/ui/endge-ui-registry.d.ts +1 -1
- package/dist/model/modules/ui/endge-ui.d.ts +10 -10
- package/package.json +1 -1
|
@@ -58,11 +58,11 @@ export declare abstract class EndgeFederation {
|
|
|
58
58
|
static tryGetModule<T extends EndgeModule = EndgeModule>(key: string): T | null;
|
|
59
59
|
static hasModule(key: string): boolean;
|
|
60
60
|
protected static get host(): EndgeFederationHost;
|
|
61
|
-
private static
|
|
62
|
-
private static
|
|
63
|
-
private static
|
|
64
|
-
private static
|
|
65
|
-
private static
|
|
66
|
-
private static
|
|
67
|
-
private static
|
|
61
|
+
private static _getFederationId;
|
|
62
|
+
private static _createHost;
|
|
63
|
+
private static _getOrCreateHost;
|
|
64
|
+
private static _requireBootContext;
|
|
65
|
+
private static _installPlugins;
|
|
66
|
+
private static _finalizeModules;
|
|
67
|
+
private static _registry;
|
|
68
68
|
}
|
|
@@ -2,13 +2,13 @@ import { VoidFunction } from '@endge/utils';
|
|
|
2
2
|
export declare class EndgeSlotRegistry<T extends {
|
|
3
3
|
id?: string;
|
|
4
4
|
}> {
|
|
5
|
-
private
|
|
6
|
-
private
|
|
7
|
-
private
|
|
5
|
+
private _items;
|
|
6
|
+
private _byId;
|
|
7
|
+
private _listeners;
|
|
8
8
|
add(item: T): VoidFunction;
|
|
9
9
|
remove(item: T): void;
|
|
10
10
|
list(): readonly T[];
|
|
11
11
|
get(id: string): T | undefined;
|
|
12
12
|
subscribe(cb: () => void): VoidFunction;
|
|
13
|
-
private
|
|
13
|
+
private _emit;
|
|
14
14
|
}
|
|
@@ -3,19 +3,19 @@ import { RComponentSFC_IR_EventBinding } from '../../types/component/sfc/ir.type
|
|
|
3
3
|
import { ComponentSFCEventRuntimeSource, ComponentSFCPortManifest, ComponentSFCRequiredPortBinding } from '../../types/component/sfc/ports.types';
|
|
4
4
|
/** Mount-scoped Event router for one Component SFC artifact boundary. */
|
|
5
5
|
export declare class ComponentSFCEventBoundary {
|
|
6
|
-
private readonly
|
|
6
|
+
private readonly _host;
|
|
7
7
|
readonly componentIdentity: string;
|
|
8
|
-
private readonly
|
|
9
|
-
private readonly
|
|
10
|
-
private readonly
|
|
11
|
-
private readonly
|
|
12
|
-
private readonly
|
|
13
|
-
private readonly
|
|
14
|
-
private readonly
|
|
15
|
-
constructor(
|
|
8
|
+
private readonly _manifest;
|
|
9
|
+
private readonly _parent;
|
|
10
|
+
private readonly _parentSource?;
|
|
11
|
+
private readonly _parentBindings;
|
|
12
|
+
private readonly _parentEventTransform?;
|
|
13
|
+
private readonly _requiredPortBindings;
|
|
14
|
+
private readonly _consumedLocalOnce;
|
|
15
|
+
constructor(_host: ComponentSFCRuntimeHost | null, componentIdentity: string, _manifest: ComponentSFCPortManifest, _parent?: ComponentSFCEventBoundary | null, _parentSource?: ComponentSFCEventRuntimeSource | undefined, _parentBindings?: readonly RComponentSFC_IR_EventBinding[], _parentEventTransform?: ((event: string, payload: unknown) => {
|
|
16
16
|
event: string;
|
|
17
17
|
payload: unknown;
|
|
18
|
-
} | null) | undefined,
|
|
18
|
+
} | null) | undefined, _requiredPortBindings?: readonly ComponentSFCRequiredPortBinding[]);
|
|
19
19
|
createChild(componentIdentity: string, manifest: ComponentSFCPortManifest, source: ComponentSFCEventRuntimeSource, bindings?: readonly RComponentSFC_IR_EventBinding[], transform?: (event: string, payload: unknown) => {
|
|
20
20
|
event: string;
|
|
21
21
|
payload: unknown;
|
|
@@ -30,7 +30,7 @@ export declare class ComponentSFCEventBoundary {
|
|
|
30
30
|
emitChild(source: ComponentSFCEventRuntimeSource, event: string, payload: unknown, trace?: string[], depth?: number): Promise<void>;
|
|
31
31
|
/** Emits an Event declared as own by this component. */
|
|
32
32
|
emitOwn(name: string, payload: unknown, trace?: string[], depth?: number): Promise<void>;
|
|
33
|
-
private
|
|
34
|
-
private
|
|
35
|
-
private
|
|
33
|
+
private _dispatch;
|
|
34
|
+
private _resolveRequiredPortAction;
|
|
35
|
+
private _reportError;
|
|
36
36
|
}
|
|
@@ -117,7 +117,7 @@ export declare abstract class RuntimeHostBase<TType extends RuntimeEntityType, T
|
|
|
117
117
|
readInput(name: string): unknown;
|
|
118
118
|
readInputs(): Readonly<Record<string, unknown>>;
|
|
119
119
|
bindUpdate(binding: RuntimeHostUpdateBinding): () => void;
|
|
120
|
-
private
|
|
120
|
+
private _unbindUpdate;
|
|
121
121
|
/**
|
|
122
122
|
* ACCESS
|
|
123
123
|
*/
|
|
@@ -157,5 +157,5 @@ export declare abstract class RuntimeHostBase<TType extends RuntimeEntityType, T
|
|
|
157
157
|
* ACCESS
|
|
158
158
|
*/
|
|
159
159
|
protected touch(): void;
|
|
160
|
-
private
|
|
160
|
+
private _serializeContext;
|
|
161
161
|
}
|
|
@@ -51,7 +51,7 @@ export declare class RuntimeHostRegistry implements RuntimeHostRegistryLike {
|
|
|
51
51
|
*/
|
|
52
52
|
clearDeleted(): void;
|
|
53
53
|
setDeletedSnapshotLimit(limit: number): void;
|
|
54
|
-
private
|
|
54
|
+
private _trimDeletedSnapshots;
|
|
55
55
|
/**
|
|
56
56
|
* ACCESS
|
|
57
57
|
*/
|
|
@@ -59,5 +59,5 @@ export declare class RuntimeHostRegistry implements RuntimeHostRegistryLike {
|
|
|
59
59
|
/**
|
|
60
60
|
* ACCESS
|
|
61
61
|
*/
|
|
62
|
-
private
|
|
62
|
+
private _entityKey;
|
|
63
63
|
}
|
|
@@ -122,7 +122,7 @@ export declare class ComponentSFCRuntimeHost extends RuntimeHostBase<'component-
|
|
|
122
122
|
syncArtifactState(target: RComponentRenderTarget | null): void;
|
|
123
123
|
/** Backward-compatible alias для старого runtime prepare API. */
|
|
124
124
|
preparePlaceholders(target: RComponentRenderTarget | null): void;
|
|
125
|
-
private
|
|
125
|
+
private _makeArtifactResourcePayload;
|
|
126
126
|
/** Подписывает host на shared Vocab path один раз, включая вложенные SFC artifacts. */
|
|
127
127
|
private _ensureVocabSubscription;
|
|
128
128
|
private _createRuntimeBoundaryNodes;
|
|
@@ -23,10 +23,11 @@ interface CompositionResourceDescriptorBase {
|
|
|
23
23
|
scopePath: string;
|
|
24
24
|
sourceOrder: number;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
type CompositionSourceAssetResourceDescriptor = CompositionResourceDescriptorBase & {
|
|
27
27
|
kind: 'style' | 'i18n';
|
|
28
28
|
identity: string;
|
|
29
|
-
}
|
|
29
|
+
};
|
|
30
|
+
type CompositionOperationHistoryResourceDescriptor = CompositionResourceDescriptorBase & {
|
|
30
31
|
kind: 'operation-history';
|
|
31
32
|
operationHistory: {
|
|
32
33
|
limit: number;
|
|
@@ -34,6 +35,7 @@ export type CompositionResourceDescriptor = CompositionResourceDescriptorBase &
|
|
|
34
35
|
shortcuts: OperationHistoryShortcutDescriptor[] | null;
|
|
35
36
|
};
|
|
36
37
|
};
|
|
38
|
+
export type CompositionResourceDescriptor = CompositionSourceAssetResourceDescriptor | CompositionOperationHistoryResourceDescriptor;
|
|
37
39
|
export interface OperationHistoryShortcutDescriptor {
|
|
38
40
|
command: 'undo' | 'redo';
|
|
39
41
|
triggerSet: {
|
|
@@ -59,8 +59,8 @@ export declare class Endge extends EndgeFederation {
|
|
|
59
59
|
* Возвращает domain только с перечисленными документами, сохраняя полную структуру коллекций.
|
|
60
60
|
* Тип секции обязателен, потому что id сущностей уникален только внутри своей коллекции.
|
|
61
61
|
*/
|
|
62
|
-
private static
|
|
63
|
-
private static
|
|
62
|
+
private static _selectDomain;
|
|
63
|
+
private static _createDomainBundle;
|
|
64
64
|
/** Преобразует domain-документы в переносимые записи backend без локального состояния. */
|
|
65
65
|
private static _portableDocuments;
|
|
66
66
|
/** Переводит legacy Query source в обязательный portable Query v2 contract. */
|
|
@@ -73,7 +73,7 @@ export declare class Endge extends EndgeFederation {
|
|
|
73
73
|
private static _portableIdentityIndex;
|
|
74
74
|
/** Разрешает relation object, runtime id или готовую identity в стабильную identity. */
|
|
75
75
|
private static _portableRelationIdentity;
|
|
76
|
-
private static
|
|
76
|
+
private static _resolveSelectionCollection;
|
|
77
77
|
/**
|
|
78
78
|
* Доступ к централизованному модулю logs, spans и adapters.
|
|
79
79
|
*/
|
|
@@ -142,16 +142,16 @@ export declare class EndgeContext extends EndgeModule {
|
|
|
142
142
|
/** Persists only an explicit preference; the effective default remains configuration-owned. */
|
|
143
143
|
private _serializeForPersistence;
|
|
144
144
|
/** Выбирает storage adapter для заданной persistence policy. */
|
|
145
|
-
private
|
|
145
|
+
private _resolveAdapter;
|
|
146
146
|
private _syncPersistentContextToRaph;
|
|
147
147
|
private _setRaphValueIfChanged;
|
|
148
148
|
/** Возвращает identity активного workspace для persistence scope. */
|
|
149
149
|
private _requireCurrentWorkspace;
|
|
150
150
|
/** Builds a harmless scope for a controller that never reads or writes state. */
|
|
151
|
-
private
|
|
151
|
+
private _getDisabledPersistenceScope;
|
|
152
152
|
/** Вычисляет tenant и user identity текущей сессии. */
|
|
153
|
-
private
|
|
153
|
+
private _resolveSessionIdentity;
|
|
154
154
|
/** Обновляет одно поле scope и публикует изменение контекста. */
|
|
155
|
-
private
|
|
156
|
-
private
|
|
155
|
+
private _setScopeValue;
|
|
156
|
+
private _assertStructuralContextMutable;
|
|
157
157
|
}
|
|
@@ -16,9 +16,9 @@ type EnvRecord = Record<string, unknown>;
|
|
|
16
16
|
* Runtime projections are owned by EndgeRuntime, not by this service.
|
|
17
17
|
*/
|
|
18
18
|
export declare class WorkspaceVariables {
|
|
19
|
-
private readonly
|
|
19
|
+
private readonly _getDefinitions;
|
|
20
20
|
private _envyRecord;
|
|
21
|
-
constructor(
|
|
21
|
+
constructor(_getDefinitions: () => EndgeWorkspaceVar[]);
|
|
22
22
|
/**
|
|
23
23
|
* Устанавливает внешние overrides переменных и сразу пересинхронизирует Raph.
|
|
24
24
|
*/
|
|
@@ -30,7 +30,7 @@ export declare class WorkspaceVariables {
|
|
|
30
30
|
/**
|
|
31
31
|
* Возвращает Domain Vars.
|
|
32
32
|
*/
|
|
33
|
-
private
|
|
33
|
+
private _getDomainVars;
|
|
34
34
|
/**
|
|
35
35
|
* Порядок поиска:
|
|
36
36
|
* 1) ENVY
|
|
@@ -75,8 +75,8 @@ export declare class WorkspaceVariables {
|
|
|
75
75
|
/**
|
|
76
76
|
* Внутренний helper модуля: parse Var Token.
|
|
77
77
|
*/
|
|
78
|
-
private static
|
|
78
|
+
private static _parseVarToken;
|
|
79
79
|
/** Читает variable из внешнего environment без изменения module state. */
|
|
80
|
-
private
|
|
80
|
+
private _getExternalValue;
|
|
81
81
|
}
|
|
82
82
|
export {};
|
|
@@ -19,6 +19,6 @@ export declare class RuntimeStateController implements RuntimeStateControllerLik
|
|
|
19
19
|
set<T>(entityKey: string, section: string, value: T): void;
|
|
20
20
|
remove(entityKey: string, section?: string): void;
|
|
21
21
|
clear(): void;
|
|
22
|
-
private
|
|
23
|
-
private
|
|
22
|
+
private _readDocument;
|
|
23
|
+
private _createDefaultDocument;
|
|
24
24
|
}
|
|
@@ -5,6 +5,11 @@ import { EndgeDomainRepositoryCapabilities } from '../../../domain/types/documen
|
|
|
5
5
|
import { EndgeDocumentServerState, EndgeLiveDomainSnapshot } from '../../../domain/types/document/domain-snapshot.type';
|
|
6
6
|
import { EndgeBootContext } from '../../../domain/types/kernel/bootstrap.types';
|
|
7
7
|
import { EndgeModule } from '../../../domain/entities/endge/EndgeModule';
|
|
8
|
+
/** Explicit error for writes through bundle/plain or a read-only live backend. */
|
|
9
|
+
export declare class EndgeDomainRepositoryReadOnlyError extends Error {
|
|
10
|
+
readonly code = "provider_read_only";
|
|
11
|
+
constructor(provider: string);
|
|
12
|
+
}
|
|
8
13
|
/** Persistence boundary for live service-backend and read-only local sources. */
|
|
9
14
|
export declare class EndgeDomainRepository extends EndgeModule {
|
|
10
15
|
private _loadedSnapshot;
|
|
@@ -50,14 +55,9 @@ export declare class EndgeDomainRepository extends EndgeModule {
|
|
|
50
55
|
private _saveServiceDocument;
|
|
51
56
|
private _applyServiceDocument;
|
|
52
57
|
private _applyServiceFolder;
|
|
53
|
-
private
|
|
54
|
-
private
|
|
58
|
+
private _resolveDocumentIdentity;
|
|
59
|
+
private _getDomainDocumentByType;
|
|
55
60
|
private _removeDomainDocumentByType;
|
|
56
61
|
private _getDomainCollectionKey;
|
|
57
62
|
private _notifyDomainChanged;
|
|
58
63
|
}
|
|
59
|
-
/** Explicit error for writes through bundle/plain or a read-only live backend. */
|
|
60
|
-
export declare class EndgeDomainRepositoryReadOnlyError extends Error {
|
|
61
|
-
readonly code = "provider_read_only";
|
|
62
|
-
constructor(provider: string);
|
|
63
|
-
}
|
|
@@ -1259,7 +1259,7 @@ export declare class EndgeDomain extends EndgeModule {
|
|
|
1259
1259
|
* Нормализует блоки областей страницы: из формата Payload (entity: { relationTo, value }) в entityType/entityIdentity.
|
|
1260
1260
|
* Если блок уже имеет entityType/entityIdentity (после normalizePage в exportAll), не перезаписываем их.
|
|
1261
1261
|
*/
|
|
1262
|
-
private static
|
|
1262
|
+
private static _normalizePageBlocksFromPayload;
|
|
1263
1263
|
/**
|
|
1264
1264
|
* Парсит JSON в объект всех сущностей без добавления в домен.
|
|
1265
1265
|
*/
|
|
@@ -2,11 +2,11 @@ import { EndgeModule } from '../../../domain/entities/endge/EndgeModule';
|
|
|
2
2
|
import { RType } from '../../../domain/entities/reflect/RType';
|
|
3
3
|
/** Effective Type Registry: code-owned built-ins plus persisted user Types. */
|
|
4
4
|
export declare class EndgeTypes extends EndgeModule {
|
|
5
|
-
private readonly
|
|
5
|
+
private readonly _builtins;
|
|
6
6
|
constructor();
|
|
7
7
|
listBuiltins(): RType[];
|
|
8
8
|
listResolved(): RType[];
|
|
9
9
|
getCodeDefinition(identity: string): RType | null;
|
|
10
10
|
getDefinition(identity: string): RType | null;
|
|
11
|
-
private
|
|
11
|
+
private _createBuiltin;
|
|
12
12
|
}
|
|
@@ -11,13 +11,13 @@ export declare class EndgeVocabs extends EndgeModule {
|
|
|
11
11
|
* slug -> namespace
|
|
12
12
|
* Можно оставить для getNamespaceValues (чтобы понимать какие slugs в пространстве)
|
|
13
13
|
*/
|
|
14
|
-
private
|
|
15
|
-
private
|
|
16
|
-
private readonly
|
|
17
|
-
private readonly
|
|
18
|
-
private readonly
|
|
19
|
-
private readonly
|
|
20
|
-
private readonly
|
|
14
|
+
private _index;
|
|
15
|
+
private _byIdCache;
|
|
16
|
+
private readonly _loadedIdentities;
|
|
17
|
+
private readonly _loadedAtByIdentity;
|
|
18
|
+
private readonly _loadedModeByIdentity;
|
|
19
|
+
private readonly _inFlight;
|
|
20
|
+
private readonly _cacheVersions;
|
|
21
21
|
private _loadingRequests;
|
|
22
22
|
loading: boolean;
|
|
23
23
|
/**
|
|
@@ -99,51 +99,51 @@ export declare class EndgeVocabs extends EndgeModule {
|
|
|
99
99
|
throwOnError?: boolean;
|
|
100
100
|
}): Promise<unknown>;
|
|
101
101
|
/** Применяет pipeline source-outputs и проверяет обязательный массив items. */
|
|
102
|
-
private
|
|
102
|
+
private _applyOutputs;
|
|
103
103
|
/** Читает explicit Mock JSON; отсутствие ссылки штатно означает пустой Vocab. */
|
|
104
|
-
private
|
|
104
|
+
private _resolveMockValue;
|
|
105
105
|
/**
|
|
106
106
|
* Нормализует Vocab Id.
|
|
107
107
|
*/
|
|
108
|
-
private
|
|
109
|
-
private
|
|
110
|
-
private
|
|
111
|
-
private
|
|
112
|
-
private
|
|
113
|
-
private
|
|
114
|
-
private
|
|
115
|
-
private
|
|
108
|
+
private _normalizeVocabId;
|
|
109
|
+
private _normalizeReferences;
|
|
110
|
+
private _requireVocabConfig;
|
|
111
|
+
private _loadShared;
|
|
112
|
+
private _bumpCacheVersion;
|
|
113
|
+
private _normalizePolicy;
|
|
114
|
+
private _isFresh;
|
|
115
|
+
private _markLoaded;
|
|
116
116
|
/**
|
|
117
117
|
* Устанавливает By Identity Cache.
|
|
118
118
|
*/
|
|
119
|
-
private
|
|
119
|
+
private _setByIdentityCache;
|
|
120
120
|
/** Пишет canonical identity cache и переходный alias provider.collection. */
|
|
121
|
-
private
|
|
121
|
+
private _setCache;
|
|
122
122
|
/** Читает canonical identity cache с переходным fallback на collection alias. */
|
|
123
|
-
private
|
|
123
|
+
private _getCache;
|
|
124
124
|
/**
|
|
125
125
|
* Разрешает Vocab Config By Id.
|
|
126
126
|
*/
|
|
127
|
-
private
|
|
127
|
+
private _resolveVocabConfigById;
|
|
128
128
|
/**
|
|
129
129
|
* Разрешает Vocab Config By Id Or Identity.
|
|
130
130
|
*/
|
|
131
|
-
private
|
|
132
|
-
private
|
|
131
|
+
private _resolveVocabConfigByIdOrIdentity;
|
|
132
|
+
private _createRuntimeConfig;
|
|
133
133
|
/** Находит runtime config справочника по identity или collection slug. */
|
|
134
|
-
private
|
|
134
|
+
private _resolveVocabConfigByIdentityOrSlug;
|
|
135
135
|
/** Собирает auth headers для обращения к внешнему справочнику. */
|
|
136
|
-
private
|
|
136
|
+
private _resolveAuthHeaders;
|
|
137
137
|
/**
|
|
138
138
|
* Разрешает Base Url.
|
|
139
139
|
*/
|
|
140
|
-
private
|
|
140
|
+
private _resolveBaseUrl;
|
|
141
141
|
/**
|
|
142
142
|
* Внутренний helper модуля: extract Docs.
|
|
143
143
|
*/
|
|
144
|
-
private
|
|
144
|
+
private _extractDocs;
|
|
145
145
|
/**
|
|
146
146
|
* Устанавливает Loading State.
|
|
147
147
|
*/
|
|
148
|
-
private
|
|
148
|
+
private _setLoadingState;
|
|
149
149
|
}
|
|
@@ -25,7 +25,7 @@ import { RQuery } from '../../../domain/entities/reflect/RQuery';
|
|
|
25
25
|
* Компилятор persisted domain model в compiled program artifacts.
|
|
26
26
|
*/
|
|
27
27
|
export declare class EndgeCompiler extends EndgeModule {
|
|
28
|
-
private readonly
|
|
28
|
+
private readonly _handlers;
|
|
29
29
|
private _localDataViewCounter;
|
|
30
30
|
private _localFilterCounter;
|
|
31
31
|
private _componentTagDiagnosticsByIdentity;
|
|
@@ -82,7 +82,7 @@ export declare class EndgeCompiler extends EndgeModule {
|
|
|
82
82
|
*
|
|
83
83
|
* Сейчас используется только для встроенной SFC-регистрации.
|
|
84
84
|
*/
|
|
85
|
-
private
|
|
85
|
+
private _registerHandler;
|
|
86
86
|
/** Создаёт единый immutable context для полного и точечного compiler entry points. */
|
|
87
87
|
private _createCompileContext;
|
|
88
88
|
/**
|
|
@@ -91,21 +91,21 @@ export declare class EndgeCompiler extends EndgeModule {
|
|
|
91
91
|
* Метод отвечает за единый diagnostics span, обработку ошибок и перевод
|
|
92
92
|
* `Endge.program` в error status при неуспешной фазе.
|
|
93
93
|
*/
|
|
94
|
-
private
|
|
94
|
+
private _compilePhase;
|
|
95
95
|
/**
|
|
96
96
|
* Компилирует одну доменную сущность и добавляет artifact в активный `Endge.program`.
|
|
97
97
|
*
|
|
98
98
|
* Само преобразование делегируется handler-у, зарегистрированному для
|
|
99
99
|
* конкретного `ProgramEntityType`.
|
|
100
100
|
*/
|
|
101
|
-
private
|
|
101
|
+
private _compileEntity;
|
|
102
102
|
/**
|
|
103
103
|
* Регистрирует built-in handlers для SFC-компонентов.
|
|
104
104
|
*
|
|
105
105
|
* Сейчас compiler сознательно строит program artifacts только для новой
|
|
106
106
|
* source-first ветки `component-sfc`.
|
|
107
107
|
*/
|
|
108
|
-
private
|
|
108
|
+
private _registerDefaultHandlers;
|
|
109
109
|
/** Stable source order: system documents first, then authored documents by identity. */
|
|
110
110
|
private _orderedStyles;
|
|
111
111
|
/** Возвращает static artifact dependencies внешних computation calls. */
|
|
@@ -121,29 +121,29 @@ export declare class EndgeRuntime extends EndgeModule {
|
|
|
121
121
|
*/
|
|
122
122
|
reset(): Promise<void>;
|
|
123
123
|
/** Projects effective workspace variables into the runtime Raph namespace. */
|
|
124
|
-
private
|
|
124
|
+
private _syncWorkspaceVariablesToRaph;
|
|
125
125
|
/** Restores persisted runtime filter values independently of workspace variables. */
|
|
126
|
-
private
|
|
126
|
+
private _hydrateRuntimeFilters;
|
|
127
127
|
/**
|
|
128
128
|
* Внутренний destroy для host с контролем уведомления подписчиков.
|
|
129
129
|
*/
|
|
130
|
-
private
|
|
131
|
-
private
|
|
132
|
-
private
|
|
130
|
+
private _destroyRuntimeInternal;
|
|
131
|
+
private _syncDestroyedSnapshotLimit;
|
|
132
|
+
private _createDestroyedSnapshot;
|
|
133
133
|
/** Регистрирует host, подключает infrastructure и только затем активирует его. */
|
|
134
|
-
private
|
|
134
|
+
private _registerAndActivateHost;
|
|
135
135
|
/** Creates the lifecycle root lazily again after a full Endge.reset(). */
|
|
136
|
-
private
|
|
136
|
+
private _ensureLifecycleAppScope;
|
|
137
137
|
/**
|
|
138
138
|
* Регистрирует встроенные стратегии в порядке от специальных к общим.
|
|
139
139
|
*/
|
|
140
|
-
private
|
|
140
|
+
private _registerDefaultStrategies;
|
|
141
141
|
/** Разрешает scope запуска: explicit -> parent -> default app. */
|
|
142
|
-
private
|
|
142
|
+
private _resolveAppScope;
|
|
143
143
|
/** Создаёт Raph graph node для AppScope независимо от data namespace. */
|
|
144
|
-
private
|
|
144
|
+
private _ensureScopeNode;
|
|
145
145
|
/** Разрешает и проверяет явно переданный parent host. */
|
|
146
|
-
private
|
|
146
|
+
private _resolveParentHost;
|
|
147
147
|
/** Разрешает artifact reader и запрещает невалидную явную зависимость. */
|
|
148
148
|
private _resolveArtifactReader;
|
|
149
149
|
}
|
|
@@ -3,11 +3,11 @@ import { RuntimeHost } from '../../../../../domain/types/runtime/runtime-host.ty
|
|
|
3
3
|
/** Executes compiler-produced Action IR without interpreting Source. */
|
|
4
4
|
export declare class ActionProgramExecutor {
|
|
5
5
|
run(payload: ActionProgramPayload, input: unknown, parent: RuntimeHost<any, any> | null): Promise<unknown>;
|
|
6
|
-
private
|
|
7
|
-
private
|
|
8
|
-
private
|
|
9
|
-
private
|
|
10
|
-
private
|
|
11
|
-
private
|
|
12
|
-
private
|
|
6
|
+
private _runBlock;
|
|
7
|
+
private _runStep;
|
|
8
|
+
private _runOperation;
|
|
9
|
+
private _evaluate;
|
|
10
|
+
private _findComposition;
|
|
11
|
+
private _requireObject;
|
|
12
|
+
private _optionalObject;
|
|
13
13
|
}
|
|
@@ -16,13 +16,13 @@ export declare class ComputationRuntimeError extends Error {
|
|
|
16
16
|
}
|
|
17
17
|
/** Executes compiler-ordered computation graphs without evaluating authored JS in core. */
|
|
18
18
|
export declare class ComputationGraphExecutor {
|
|
19
|
-
private readonly
|
|
20
|
-
private readonly
|
|
21
|
-
constructor(
|
|
19
|
+
private readonly _sandbox;
|
|
20
|
+
private readonly _dependencies;
|
|
21
|
+
constructor(_sandbox: () => ComputationSandboxAdapter | null, _dependencies?: ComputationDependencyRunner | null);
|
|
22
22
|
runSync(payload: ComputationProgramPayload, input: unknown, identity: string, scope?: ComputationExecutionScope): unknown;
|
|
23
23
|
run(payload: ComputationProgramPayload, input: unknown, identity: string, scope?: ComputationExecutionScope): Promise<unknown>;
|
|
24
|
-
private
|
|
25
|
-
private
|
|
26
|
-
private
|
|
27
|
-
private
|
|
24
|
+
private _executeNode;
|
|
25
|
+
private _evaluate;
|
|
26
|
+
private _evaluateResult;
|
|
27
|
+
private _evaluateNode;
|
|
28
28
|
}
|
|
@@ -3,8 +3,8 @@ type AsyncRunner<T> = (input: unknown) => Promise<T>;
|
|
|
3
3
|
type SyncRunner<T> = (input: unknown) => T;
|
|
4
4
|
/** Renderer-neutral latest-wins state for one computation consumer. */
|
|
5
5
|
export declare class ComputationResourceState<T = unknown> implements ComputationResourceContract<T> {
|
|
6
|
-
private readonly
|
|
7
|
-
private readonly
|
|
6
|
+
private readonly _asyncRunner;
|
|
7
|
+
private readonly _syncRunner;
|
|
8
8
|
private _status;
|
|
9
9
|
private _value;
|
|
10
10
|
private _error;
|
|
@@ -12,7 +12,7 @@ export declare class ComputationResourceState<T = unknown> implements Computatio
|
|
|
12
12
|
private _revision;
|
|
13
13
|
private _disposed;
|
|
14
14
|
private _input;
|
|
15
|
-
constructor(input: unknown,
|
|
15
|
+
constructor(input: unknown, _asyncRunner: AsyncRunner<T>, _syncRunner?: SyncRunner<T> | null);
|
|
16
16
|
get status(): import('../../../../../domain/types/computation/computation-runtime.types').ComputationResourceStatus;
|
|
17
17
|
get loading(): boolean;
|
|
18
18
|
get value(): T | undefined;
|
|
@@ -21,7 +21,7 @@ export declare class ComputationResourceState<T = unknown> implements Computatio
|
|
|
21
21
|
refresh(): Promise<void>;
|
|
22
22
|
subscribe(listener: VoidFunction): VoidFunction;
|
|
23
23
|
dispose(): void;
|
|
24
|
-
private
|
|
25
|
-
private
|
|
24
|
+
private _runSync;
|
|
25
|
+
private _notify;
|
|
26
26
|
}
|
|
27
27
|
export {};
|
|
@@ -2,8 +2,8 @@ import { ComputationResourceState } from './ComputationResource';
|
|
|
2
2
|
import { ComputationResource as ComputationResourceContract } from '../../../../../domain/types/computation/computation-runtime.types';
|
|
3
3
|
/** Host-owned registry that isolates resources by call site and row consumer key. */
|
|
4
4
|
export declare class ComputationResourceRegistry {
|
|
5
|
-
private readonly
|
|
6
|
-
private readonly
|
|
5
|
+
private readonly _resources;
|
|
6
|
+
private readonly _disposers;
|
|
7
7
|
/** Resource inputs currently pulled by the active renderer pass. */
|
|
8
8
|
private readonly _updatingInputs;
|
|
9
9
|
getOrCreate(key: string, input: unknown, create: () => ComputationResourceState, onChange?: VoidFunction): ComputationResourceContract;
|
|
@@ -7,16 +7,16 @@ import { EndgeImplementations } from '../../implementation/endge-implementations
|
|
|
7
7
|
import { ComputationResourceState } from './ComputationResource';
|
|
8
8
|
/** Executes compiled computation graphs and creates renderer-neutral resources. */
|
|
9
9
|
export declare class EndgeComputation {
|
|
10
|
-
private readonly
|
|
11
|
-
private readonly
|
|
12
|
-
private readonly
|
|
13
|
-
private readonly
|
|
14
|
-
private readonly
|
|
15
|
-
private readonly
|
|
16
|
-
private
|
|
17
|
-
private readonly
|
|
18
|
-
private readonly
|
|
19
|
-
constructor(
|
|
10
|
+
private readonly _implementations;
|
|
11
|
+
private readonly _definitions;
|
|
12
|
+
private readonly _providers;
|
|
13
|
+
private readonly _providerDisposers;
|
|
14
|
+
private readonly _definitionDisposers;
|
|
15
|
+
private readonly _bindingDisposers;
|
|
16
|
+
private _sandbox;
|
|
17
|
+
private readonly _executor;
|
|
18
|
+
private readonly _api;
|
|
19
|
+
constructor(_implementations: EndgeImplementations);
|
|
20
20
|
hasDefinition(identity: string): boolean;
|
|
21
21
|
/** Installs a serializable code-owned Computation definition. */
|
|
22
22
|
define(definition: {
|
|
@@ -56,12 +56,12 @@ export declare class EndgeComputation {
|
|
|
56
56
|
private _run;
|
|
57
57
|
private _runSync;
|
|
58
58
|
createResource(identity: string, input: unknown, _consumerKey: string): ComputationResourceState;
|
|
59
|
-
private
|
|
60
|
-
private
|
|
59
|
+
private _requireArtifact;
|
|
60
|
+
private _assertArtifact;
|
|
61
61
|
/** Создает child scope и блокирует runtime recursion или чрезмерно глубокий call graph. */
|
|
62
62
|
private _enterExecution;
|
|
63
|
-
private
|
|
64
|
-
private
|
|
65
|
-
private
|
|
63
|
+
private _runOverrideSync;
|
|
64
|
+
private _runOverride;
|
|
65
|
+
private _resolveProvider;
|
|
66
66
|
reset(): void;
|
|
67
67
|
}
|
|
@@ -4,12 +4,12 @@ import { EndgeImplementations } from '../implementation/endge-implementations';
|
|
|
4
4
|
type ConverterProvider = (value: unknown, options?: Record<string, unknown>) => unknown;
|
|
5
5
|
/** Синхронно координирует definitions, providers и bindings конвертеров. */
|
|
6
6
|
export declare class EndgeConverters {
|
|
7
|
-
private readonly
|
|
8
|
-
private readonly
|
|
9
|
-
private readonly
|
|
10
|
-
private readonly
|
|
11
|
-
private
|
|
12
|
-
constructor(
|
|
7
|
+
private readonly _implementations;
|
|
8
|
+
private readonly _definitions;
|
|
9
|
+
private readonly _providerDisposers;
|
|
10
|
+
private readonly _definitionDisposers;
|
|
11
|
+
private _started;
|
|
12
|
+
constructor(_implementations: EndgeImplementations);
|
|
13
13
|
has(identity: string): boolean;
|
|
14
14
|
define(definition: {
|
|
15
15
|
identity: string;
|