@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 { EndgeMockProvider } from '../../modules/mock/domain/types/mock-data.type';
|
|
2
2
|
export { DEFAULT_FALLBACK_LOCALE, DEFAULT_LOCALE, DEFAULT_SCOPE, DEFAULT_THEME, DEFAULT_TIMEZONE, } from '../constants/kernel.constants';
|
|
3
|
-
export declare const ENDGE_COMPILER_VERSION = "program-
|
|
3
|
+
export declare const ENDGE_COMPILER_VERSION = "program-v3";
|
|
4
4
|
/** Стабильные scope groups для compiler spans. */
|
|
5
5
|
export declare const ENDGE_COMPILER_SPAN_GROUPS: {
|
|
6
6
|
readonly COMPONENTS: "components";
|
|
@@ -13,7 +13,7 @@ export declare const ENDGE_COMPILER_SPAN_GROUPS: {
|
|
|
13
13
|
/** Runtime fallback limits для nested computation execution. */
|
|
14
14
|
export declare const ENDGE_COMPUTATION_MAX_CALL_DEPTH = 32;
|
|
15
15
|
export declare const ENDGE_COMPUTATION_MAX_CALLS = 256;
|
|
16
|
-
export declare const CONTEXT_STORAGE_KEY = "endge:context:
|
|
16
|
+
export declare const CONTEXT_STORAGE_KEY = "endge:context:v2";
|
|
17
17
|
export declare const LEGACY_CONTEXT_STORAGE_KEY = "EndgeContext_Module";
|
|
18
18
|
export declare const LEGACY_THEME_STORAGE_KEY = "endge:theme";
|
|
19
19
|
export declare const LEGACY_TIMEZONE_STORAGE_KEY = "endge:isLocalTime";
|
|
@@ -3,8 +3,6 @@ export declare const DEFAULT_FALLBACK_LOCALE = "en";
|
|
|
3
3
|
export declare const DEFAULT_THEME = "dark";
|
|
4
4
|
export declare const DEFAULT_TIMEZONE = "local";
|
|
5
5
|
export declare const DEFAULT_SCOPE: {
|
|
6
|
-
readonly
|
|
7
|
-
readonly projectId: "default";
|
|
8
|
-
readonly environmentId: "dev";
|
|
6
|
+
readonly facetSelections: readonly [];
|
|
9
7
|
readonly userId: "anonymous";
|
|
10
8
|
};
|
|
@@ -15,7 +15,7 @@ export type EndgeDataProvider = 'default' | 'bundle' | 'plain';
|
|
|
15
15
|
/**
|
|
16
16
|
* Конфигурация загрузки движка
|
|
17
17
|
* Определяет workspace, данные которого должны быть активированы из persisted Domain.
|
|
18
|
-
*
|
|
18
|
+
* Выборы динамических фасетов передаются отдельно через EndgeBootContext.context.
|
|
19
19
|
*/
|
|
20
20
|
export interface EndgeLoadScope {
|
|
21
21
|
workspaceIdentity?: string;
|
|
@@ -25,6 +25,18 @@ export declare const BRIDGE_SNAPSHOT_OPTIONS: {
|
|
|
25
25
|
readonly includeRaphData: true;
|
|
26
26
|
readonly includeRaphGraph: true;
|
|
27
27
|
};
|
|
28
|
+
/** Структура Domain и Runtime без рабочих данных, render payload и графа Raph. */
|
|
29
|
+
export declare const BRIDGE_STRUCTURE_SNAPSHOT_OPTIONS: {
|
|
30
|
+
readonly includeTelemetry: false;
|
|
31
|
+
readonly includeProblems: false;
|
|
32
|
+
readonly includeProgram: false;
|
|
33
|
+
readonly includeRaphData: false;
|
|
34
|
+
readonly includeRaphGraph: false;
|
|
35
|
+
readonly includeConfiguration: true;
|
|
36
|
+
readonly includeEffectiveConfiguration: true;
|
|
37
|
+
readonly includeDomain: true;
|
|
38
|
+
readonly includeRuntime: true;
|
|
39
|
+
};
|
|
28
40
|
/** Нормализует точный backend URL без credentials, query и fragment. */
|
|
29
41
|
export declare function normalizeBridgeServer(raw: string): string;
|
|
30
42
|
/** Разбирает CSV environment value на стороне host до передачи массива в boot. */
|
|
@@ -24,6 +24,7 @@ export declare class EndgeBridgeDebug_Module extends EndgeModule {
|
|
|
24
24
|
private _dataTimer;
|
|
25
25
|
private _topologyTimer;
|
|
26
26
|
private _dataDirty;
|
|
27
|
+
private _includeData;
|
|
27
28
|
/**
|
|
28
29
|
* ----------------------------------------
|
|
29
30
|
* PUBLIC
|
|
@@ -45,7 +46,9 @@ export declare class EndgeBridgeDebug_Module extends EndgeModule {
|
|
|
45
46
|
/** Запрашивает snapshot существующего diagnostics collector без скачивания файла. */
|
|
46
47
|
getSnapshot(sessionId: string): Promise<DiagnosticsSnapshot>;
|
|
47
48
|
/** Начинает буферизацию событий до импорта согласованного с ними снимка. */
|
|
48
|
-
startContextSync(sessionId: string
|
|
49
|
+
startContextSync(sessionId: string, options?: {
|
|
50
|
+
includeData: boolean;
|
|
51
|
+
}): Promise<BridgeInspectionSnapshot>;
|
|
49
52
|
/** После прямого импорта снимка применяет только более новые события, не вызывая Commands. */
|
|
50
53
|
activateContextSync(sessionId: string, sequence: number): void;
|
|
51
54
|
/** Обновляет Runtime и данные через тот же упорядоченный поток, что и события. */
|
|
@@ -8,14 +8,9 @@ export interface EndgeCommandMap {
|
|
|
8
8
|
'context:set-workspace': {
|
|
9
9
|
workspace: string | null;
|
|
10
10
|
};
|
|
11
|
-
'context:set-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
'context:set-project': {
|
|
15
|
-
project: string;
|
|
16
|
-
};
|
|
17
|
-
'context:set-environment': {
|
|
18
|
-
environment: string;
|
|
11
|
+
'context:set-facet': {
|
|
12
|
+
facet: string;
|
|
13
|
+
document: string;
|
|
19
14
|
};
|
|
20
15
|
'context:set-user': {
|
|
21
16
|
user: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EndgeCommandHandler } from '../../types/command-executor.type';
|
|
2
|
+
import { EndgeContextCommandTarget } from '../../types/context-command-target.type';
|
|
3
|
+
/** Применяет запрос выбора документа произвольного динамического фасета. */
|
|
4
|
+
export declare class SetFacetCommand implements EndgeCommandHandler {
|
|
5
|
+
readonly type: "context:set-facet";
|
|
6
|
+
private readonly _context;
|
|
7
|
+
constructor(context: Pick<EndgeContextCommandTarget, 'setFacetSelection'>);
|
|
8
|
+
execute(payload: unknown): void | Promise<void>;
|
|
9
|
+
}
|
|
@@ -2,9 +2,7 @@ import { EndgeDataMode } from '../../workspace/domain/workspace.types';
|
|
|
2
2
|
/** Владелец локальных операций: Core setters либо штатные операции приложения с reset/boot. */
|
|
3
3
|
export interface EndgeContextCommandTarget {
|
|
4
4
|
setCurrentWorkspace: (workspace: string | null) => void | Promise<void>;
|
|
5
|
-
|
|
6
|
-
setCurrentProject: (project: string) => void | Promise<void>;
|
|
7
|
-
setCurrentEnvironment: (environment: string) => void | Promise<void>;
|
|
5
|
+
setFacetSelection: (facet: string, document: string) => void | Promise<void>;
|
|
8
6
|
setCurrentUser: (user: string) => void | Promise<void>;
|
|
9
7
|
setCurrentLocale: (locale: string | null) => void | Promise<void>;
|
|
10
8
|
setCurrentTheme: (theme: string | null) => void | Promise<void>;
|
|
@@ -2,7 +2,6 @@ import { EndgeBootContext } from '../../kernel/types/bootstrap.types';
|
|
|
2
2
|
import { RSimulation } from '../domain/entities/RSimulation';
|
|
3
3
|
import { RStore } from '../domain/entities/RStore';
|
|
4
4
|
import { RStream } from '../domain/entities/RStream';
|
|
5
|
-
import { RStyle } from '../domain/entities/RStyle';
|
|
6
5
|
import { RType } from '../domain/entities/RType';
|
|
7
6
|
import { RUpdate } from '../domain/entities/RUpdate';
|
|
8
7
|
import { RVocabs } from '../domain/entities/RVocabs';
|
|
@@ -21,8 +20,8 @@ import { RComposition } from '../domain/entities/RComposition';
|
|
|
21
20
|
import { RComputation } from '../domain/entities/RComputation';
|
|
22
21
|
import { RDataView } from '../domain/entities/RDataView';
|
|
23
22
|
import { RFilter } from '../domain/entities/RFilter';
|
|
24
|
-
import { RProject } from '../domain/entities/RProject';
|
|
25
23
|
import { RQuery } from '../domain/entities/RQuery';
|
|
24
|
+
import { RStyle } from '../domain/entities/RStyle';
|
|
26
25
|
import { EndgeModule } from '../../../federation/EndgeModule';
|
|
27
26
|
/**
|
|
28
27
|
* Компилятор persisted domain model в compiled program artifacts.
|
|
@@ -87,10 +86,6 @@ export declare class EndgeCompiler_Module extends EndgeModule<EndgeBootContext>
|
|
|
87
86
|
buildFilter(entity: RFilter): ProgramArtifact<FilterProgramPayload>;
|
|
88
87
|
/** Компилирует один Composition source в Endge.program. */
|
|
89
88
|
buildComposition(entity: RComposition): ProgramArtifact<CompositionProgramPayload>;
|
|
90
|
-
/** Компилирует корневой граф проекта под собственной project identity. */
|
|
91
|
-
buildProject(entity: RProject): ProgramArtifact<CompositionProgramPayload>;
|
|
92
|
-
/** Создаёт isolated project artifact для Preview без публикации в общей program. */
|
|
93
|
-
compileProjectArtifact(entity: RProject): ProgramArtifact<CompositionProgramPayload>;
|
|
94
89
|
/**
|
|
95
90
|
* Компилирует transient Composition artifact без публикации в Endge.program.
|
|
96
91
|
* Используется runtime session overlays, которым нельзя менять общий build.
|
|
@@ -239,6 +234,8 @@ export declare class EndgeCompiler_Module extends EndgeModule<EndgeBootContext>
|
|
|
239
234
|
private _resolveFilterSource;
|
|
240
235
|
/** Возвращает сохраненный Composition source. */
|
|
241
236
|
private _resolveCompositionSource;
|
|
237
|
+
/** Возвращает immutable selections в generic Source key space. */
|
|
238
|
+
private _sourceExecutionContext;
|
|
242
239
|
/** Создает пустой query payload для error-artifact. */
|
|
243
240
|
private _makeEmptyQueryPayload;
|
|
244
241
|
/** Создает пустой Filter payload для error-artifact. */
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { RAction } from '../../../domain/entities/RAction';
|
|
2
|
+
import { ProgramMetadataMap } from '../../../program/domain/types/program-metadata.types';
|
|
2
3
|
import { ActionProgramPayload, ProgramDependency, ProgramDiagnostic } from '../../../program/domain/types/program.types';
|
|
3
4
|
export interface ActionCompileResult {
|
|
4
5
|
payload: ActionProgramPayload;
|
|
6
|
+
metadata: ProgramMetadataMap;
|
|
5
7
|
diagnostics: Omit<ProgramDiagnostic, 'entityRef'>[];
|
|
6
8
|
dependencies: ProgramDependency[];
|
|
7
9
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComputationProgramPayload } from '../../../domain/types/computation/computation-program.types';
|
|
2
|
+
import { ProgramMetadataMap } from '../../../program/domain/types/program-metadata.types';
|
|
2
3
|
import { ProgramDiagnostic } from '../../../program/domain/types/program.types';
|
|
3
4
|
import * as t from '@babel/types';
|
|
4
5
|
type DiagnosticDraft = Omit<ProgramDiagnostic, 'entityRef'>;
|
|
@@ -7,6 +8,7 @@ export interface ComputationCompileInput {
|
|
|
7
8
|
}
|
|
8
9
|
export interface ComputationCompileResult {
|
|
9
10
|
payload: ComputationProgramPayload;
|
|
11
|
+
metadata: ProgramMetadataMap;
|
|
10
12
|
diagnostics: DiagnosticDraft[];
|
|
11
13
|
}
|
|
12
14
|
/** Компилирует source defineComputation в детерминированный выходной граф. */
|
|
@@ -5,7 +5,7 @@ import { EndgeModule } from '../../../federation/EndgeModule';
|
|
|
5
5
|
export declare class EndgeConfiguration_Module extends EndgeModule<EndgeBootContext> {
|
|
6
6
|
private _current;
|
|
7
7
|
private _buildContext;
|
|
8
|
-
/** Разрешает Workspace
|
|
8
|
+
/** Разрешает Workspace и выбранные документы активных фасетов до compiler build. */
|
|
9
9
|
build(ctx: EndgeBootContext): void;
|
|
10
10
|
/** Очищает effective configuration перед следующим boot. */
|
|
11
11
|
reset(): void;
|
|
@@ -29,5 +29,5 @@ export declare class EndgeConfiguration_Module extends EndgeModule<EndgeBootCont
|
|
|
29
29
|
resolveUpstream(layer: EndgeConfigurationLayer): EndgeConfiguration;
|
|
30
30
|
/** Строит preview без изменения активной конфигурации запуска. */
|
|
31
31
|
preview(upstream: EndgeConfiguration, contribution: EndgeConfigurationContribution): EndgeConfiguration;
|
|
32
|
-
private
|
|
32
|
+
private _activeFacets;
|
|
33
33
|
}
|
|
@@ -6,7 +6,7 @@ export declare function createDefaultEndgeConfiguration(): EndgeConfiguration;
|
|
|
6
6
|
export declare function normalizeEndgeConfiguration(input: unknown): EndgeConfiguration;
|
|
7
7
|
/** Нормализует contribution сущности; пустое значение означает чистое наследование. */
|
|
8
8
|
export declare function normalizeEndgeConfigurationContribution(input: unknown): EndgeConfigurationContribution;
|
|
9
|
-
/** Применяет один
|
|
9
|
+
/** Применяет один contribution Workspace или выбранного фасетного документа к upstream configuration. */
|
|
10
10
|
export declare function applyEndgeConfigurationContribution(upstream: EndgeConfiguration, contribution: EndgeConfigurationContribution): EndgeConfiguration;
|
|
11
11
|
/** Возвращает стабильный hash полного build context без platform crypto API. */
|
|
12
12
|
export declare function createEndgeContextHash(input: unknown): string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { EndgeTooltipConfiguration } from './types/configuration.type';
|
|
2
|
-
/** Системные defaults, применяемые до
|
|
2
|
+
/** Системные defaults, применяемые до Workspace и выбранных фасетных документов. */
|
|
3
3
|
export declare const DEFAULT_ENDGE_TOOLTIP_CONFIGURATION: Readonly<EndgeTooltipConfiguration>;
|
|
@@ -168,7 +168,9 @@ export type EndgeConfigurationContribution = {
|
|
|
168
168
|
mode: 'replace';
|
|
169
169
|
value: EndgeConfiguration;
|
|
170
170
|
};
|
|
171
|
-
export type EndgeConfigurationLayer = 'workspace' |
|
|
171
|
+
export type EndgeConfigurationLayer = 'workspace' | {
|
|
172
|
+
facetIdentity: string;
|
|
173
|
+
};
|
|
172
174
|
/** Immutable input, передаваемый compiler strategies. */
|
|
173
175
|
export interface EndgeBuildContext {
|
|
174
176
|
workspaceIdentity: string;
|
|
@@ -9,7 +9,7 @@ import { EndgeDataMode } from '../workspace/domain/workspace.types';
|
|
|
9
9
|
import { RuntimeStateController } from './persistence/RuntimeStateController';
|
|
10
10
|
import { EndgeModule } from '../../../federation/EndgeModule';
|
|
11
11
|
/**
|
|
12
|
-
* Контекст выполнения Endge: текущий workspace/
|
|
12
|
+
* Контекст выполнения Endge: текущий workspace/dynamic facets/user scope
|
|
13
13
|
* и координатор persistence-инфраструктуры приложения.
|
|
14
14
|
*/
|
|
15
15
|
export declare class EndgeContext_Module extends EndgeModule<EndgeBootContext> {
|
|
@@ -18,9 +18,7 @@ export declare class EndgeContext_Module extends EndgeModule<EndgeBootContext> {
|
|
|
18
18
|
private readonly _stateListeners;
|
|
19
19
|
private _contextPersistence;
|
|
20
20
|
private _currentWorkspace;
|
|
21
|
-
private
|
|
22
|
-
private _currentProject;
|
|
23
|
-
private _currentEnvironment;
|
|
21
|
+
private _facetSelections;
|
|
24
22
|
private _currentUser;
|
|
25
23
|
private _currentLocale;
|
|
26
24
|
private _pendingLocale;
|
|
@@ -52,10 +50,10 @@ export declare class EndgeContext_Module extends EndgeModule<EndgeBootContext> {
|
|
|
52
50
|
registerStorageAdapter(adapter: EndgeStorageAdapter): void;
|
|
53
51
|
/** Настраивает persistence текущего контекста. */
|
|
54
52
|
configurePersistence(config: EndgeContextPersistenceConfig): void;
|
|
55
|
-
/** Устанавливает provider актуальных
|
|
53
|
+
/** Устанавливает provider актуальных user identity и обязательных session facet selections. */
|
|
56
54
|
setSessionIdentityProvider(provider: EndgeSessionIdentityProvider | null): void;
|
|
57
|
-
/** Показывает, что
|
|
58
|
-
|
|
55
|
+
/** Показывает, что выбор документа фасета задан authenticated session provider. */
|
|
56
|
+
isFacetLockedBySession(facetIdentity: string): boolean;
|
|
59
57
|
/** Сериализует текущий execution scope в snapshot. */
|
|
60
58
|
createDiagnosticsSnapshot(): Record<string, unknown>;
|
|
61
59
|
serialize(): EndgeContextSnapshot;
|
|
@@ -83,7 +81,7 @@ export declare class EndgeContext_Module extends EndgeModule<EndgeBootContext> {
|
|
|
83
81
|
getPersistenceScope(): EndgePersistenceScope;
|
|
84
82
|
/** Возвращает dynamic state текущего полного context scope. */
|
|
85
83
|
getState<T>(key: string, transform?: EndgeContextStateTransform<T>): T | undefined;
|
|
86
|
-
/** Сохраняет dynamic state в scope текущих workspace/
|
|
84
|
+
/** Сохраняет dynamic state в scope текущих workspace/facet selections/user. */
|
|
87
85
|
setState<T>(key: string, state: T, transform?: EndgeContextStateTransform<T>): void;
|
|
88
86
|
/** Удаляет dynamic state только из текущего полного context scope. */
|
|
89
87
|
removeState(key: string): void;
|
|
@@ -103,16 +101,14 @@ export declare class EndgeContext_Module extends EndgeModule<EndgeBootContext> {
|
|
|
103
101
|
getCurrentWorkspace(): string | null;
|
|
104
102
|
/** Устанавливает текущий workspace и сохраняет контекст. */
|
|
105
103
|
setCurrentWorkspace(identity: string | null): void;
|
|
106
|
-
/** Возвращает
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
|
|
114
|
-
/** Возвращает identity текущего environment. */
|
|
115
|
-
getCurrentEnvironment(): string;
|
|
104
|
+
/** Возвращает immutable map выбранных документов по identity фасета. */
|
|
105
|
+
getFacetSelections(): Readonly<Record<string, string>>;
|
|
106
|
+
/** Возвращает выбранный документ фасета либо null, если фасет не имеет выбора. */
|
|
107
|
+
getFacetSelection(facetIdentity: string): string | null;
|
|
108
|
+
/** Устанавливает один выбор до следующего structural boot. */
|
|
109
|
+
setFacetSelection(facetIdentity: string, documentIdentity: string | null): void;
|
|
110
|
+
/** Заменяет structural map до следующего boot. */
|
|
111
|
+
setFacetSelections(selections: Readonly<Record<string, string>>): void;
|
|
116
112
|
/** Возвращает immutable structural coordinates текущего boot lifecycle. */
|
|
117
113
|
getExecutionContext(): EndgeExecutionContext;
|
|
118
114
|
/**
|
|
@@ -121,8 +117,6 @@ export declare class EndgeContext_Module extends EndgeModule<EndgeBootContext> {
|
|
|
121
117
|
* безопасно перейти на первую доступную сущность, если Domain изменился.
|
|
122
118
|
*/
|
|
123
119
|
resolveExecutionContext(input: EndgeExecutionContextResolutionInput): EndgeExecutionContext;
|
|
124
|
-
/** Устанавливает текущий environment и сохраняет контекст. */
|
|
125
|
-
setCurrentEnvironment(identity: string | null): void;
|
|
126
120
|
/** Возвращает identity текущего user с учётом session provider. */
|
|
127
121
|
getCurrentUser(): string;
|
|
128
122
|
/** Устанавливает fallback identity текущего user. */
|
|
@@ -181,7 +175,7 @@ export declare class EndgeContext_Module extends EndgeModule<EndgeBootContext> {
|
|
|
181
175
|
private _requireCurrentWorkspace;
|
|
182
176
|
/** Создаёт безопасный scope для контроллера, который не читает и не изменяет состояние. */
|
|
183
177
|
private _getDisabledPersistenceScope;
|
|
184
|
-
/** Вычисляет
|
|
178
|
+
/** Вычисляет user identity текущей сессии. */
|
|
185
179
|
private _resolveSessionIdentity;
|
|
186
180
|
/** Обновляет одно поле scope и публикует изменение контекста. */
|
|
187
181
|
private _setScopeValue;
|
|
@@ -8,9 +8,7 @@ export interface EndgeContextPersistenceConfig {
|
|
|
8
8
|
}
|
|
9
9
|
export interface EndgeContextSnapshot {
|
|
10
10
|
workspace: string | null;
|
|
11
|
-
|
|
12
|
-
project: string | null;
|
|
13
|
-
environment: string | null;
|
|
11
|
+
facets: Readonly<Record<string, string>>;
|
|
14
12
|
user: string | null;
|
|
15
13
|
locale: string | null;
|
|
16
14
|
theme: string | null;
|
|
@@ -46,15 +44,17 @@ export interface EndgeRuntimeContextSnapshot extends EndgeContextSnapshot {
|
|
|
46
44
|
}
|
|
47
45
|
export interface EndgePersistenceScope {
|
|
48
46
|
workspaceId: string;
|
|
49
|
-
|
|
50
|
-
projectId: string;
|
|
51
|
-
environmentId: string;
|
|
47
|
+
facetSelections: readonly EndgePersistenceFacetSelection[];
|
|
52
48
|
userId: string;
|
|
53
49
|
}
|
|
50
|
+
export interface EndgePersistenceFacetSelection {
|
|
51
|
+
facetIdentity: string;
|
|
52
|
+
documentIdentity: string;
|
|
53
|
+
}
|
|
54
54
|
export type EndgePersistenceScopeResolver = () => EndgePersistenceScope;
|
|
55
55
|
export interface EndgeSessionIdentity {
|
|
56
56
|
userId?: string | null;
|
|
57
|
-
|
|
57
|
+
facetSelections?: Readonly<Record<string, string>>;
|
|
58
58
|
}
|
|
59
59
|
export interface EndgeSessionIdentityProvider {
|
|
60
60
|
getCurrentIdentity: () => EndgeSessionIdentity | null;
|
|
@@ -67,7 +67,7 @@ export interface EndgeStorageAdapter {
|
|
|
67
67
|
remove: (key: string) => void;
|
|
68
68
|
}
|
|
69
69
|
export interface RuntimeStateDocument {
|
|
70
|
-
version:
|
|
70
|
+
version: 2;
|
|
71
71
|
scope: EndgePersistenceScope;
|
|
72
72
|
runtimeId: string;
|
|
73
73
|
state: Record<string, Record<string, unknown>>;
|