@endge/core 11.1.0 → 12.0.1
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 +110184 -93417
- package/dist/features/core/kernel/config/kernel.config.d.ts +1 -1
- package/dist/features/core/kernel/config/modules.config.d.ts +6 -1
- package/dist/features/core/kernel/endge.d.ts +10 -1
- package/dist/features/core/kernel/services/EndgeBundleCodec_Service.d.ts +14 -0
- package/dist/features/core/kernel/tools/bundle-json.d.ts +9 -0
- package/dist/features/core/kernel/types/endge-bundle.types.d.ts +13 -0
- package/dist/features/core/modules/bridge/configurator/EndgeBridgeConfigurator_Module.d.ts +1 -1
- package/dist/features/core/modules/bridge/debug/EndgeBridgeDebug_Module.d.ts +12 -27
- package/dist/features/core/modules/bridge/domain/bridge.type.d.ts +4 -0
- package/dist/features/core/modules/compiler/EndgeCompiler_Module.d.ts +2 -0
- package/dist/features/core/modules/compiler/services/component-sfc/component-sfc-expression-ir.d.ts +4 -0
- package/dist/features/core/modules/compiler/services/component-sfc/component-sfc-expression.d.ts +3 -0
- package/dist/features/core/modules/compiler/services/component-sfc/component-sfc-interactions.d.ts +2 -2
- package/dist/features/core/modules/compiler/services/component-sfc/component-sfc-ports.d.ts +2 -0
- package/dist/features/core/modules/compiler/services/component-sfc/component-sfc-script.d.ts +2 -0
- package/dist/features/core/modules/compiler/tools/compiled-program-catalog.d.ts +5 -0
- package/dist/features/core/modules/context/EndgeContext_Module.d.ts +4 -0
- package/dist/features/core/modules/context/persistence/context-state.d.ts +2 -0
- package/dist/features/core/modules/domain/types/component/sfc/ast.types.d.ts +8 -1
- package/dist/features/core/modules/domain/types/component/sfc/expression-ir.types.d.ts +52 -0
- package/dist/features/core/modules/domain/types/component/sfc/ir.types.d.ts +4 -1
- package/dist/features/core/modules/domain/types/computation/computation-program.types.d.ts +2 -0
- package/dist/features/core/modules/domain-repository/EndgeDomainRepository_Module.d.ts +3 -0
- package/dist/features/core/modules/inspection/EndgeInspection_Module.d.ts +84 -0
- package/dist/features/core/modules/inspection/services/InspectionCapture_Service.d.ts +36 -0
- package/dist/features/core/modules/inspection/tools/inspection-recording.d.ts +15 -0
- package/dist/features/core/modules/inspection/types/inspection.types.d.ts +73 -0
- package/dist/features/core/modules/program/EndgeProgram_Module.d.ts +18 -0
- package/dist/features/core/modules/program/domain/types/action-program.types.d.ts +2 -0
- package/dist/features/core/modules/program/domain/types/execution-bundle.types.d.ts +75 -0
- package/dist/features/core/modules/program/domain/types/program.types.d.ts +5 -1
- package/dist/features/core/modules/program/tools/execution-bundle.d.ts +6 -0
- package/dist/features/core/modules/program/tools/portable-program-payload.d.ts +3 -0
- package/dist/features/core/modules/program/tools/restore-program-source.d.ts +3 -0
- package/dist/features/core/modules/runtime/EndgeRuntime_Module.d.ts +2 -0
- package/dist/features/core/modules/runtime/services/component-sfc-expression-evaluate.d.ts +14 -0
- package/dist/features/core/modules/source/domain/types/composition-source.types.d.ts +2 -0
- package/dist/features/core/modules/source/domain/types/configuration-source.types.d.ts +4 -0
- package/dist/features/core/modules/source/domain/types/filter-source.types.d.ts +2 -0
- package/dist/features/core/modules/source/domain/types/simulation-source.types.d.ts +2 -0
- 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 +2 -0
- 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/{domain/documents → source/services}/document-metadata.d.ts +2 -2
- package/dist/main.d.ts +9 -1
- package/package.json +5 -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-v4";
|
|
4
4
|
/** Стабильные scope groups для compiler spans. */
|
|
5
5
|
export declare const ENDGE_COMPILER_SPAN_GROUPS: {
|
|
6
6
|
readonly COMPONENTS: "components";
|
|
@@ -17,6 +17,7 @@ import { EndgeVocabs_Module } from '../../modules/EndgeVocabs_Module';
|
|
|
17
17
|
import { EndgeEvents_Module } from '../../modules/events/EndgeEvents_Module';
|
|
18
18
|
import { EndgeI18n_Module } from '../../modules/i18n/EndgeI18n_Module';
|
|
19
19
|
import { EndgeImplementations_Module } from '../../modules/implementations/EndgeImplementations_Module';
|
|
20
|
+
import { EndgeInspection_Module } from '../../modules/inspection/EndgeInspection_Module';
|
|
20
21
|
import { EndgeMock_Module } from '../../modules/mock/EndgeMock_Module';
|
|
21
22
|
import { EndgeProgram_Module } from '../../modules/program/EndgeProgram_Module';
|
|
22
23
|
import { EndgeRuntime_Module } from '../../modules/runtime/EndgeRuntime_Module';
|
|
@@ -118,6 +119,10 @@ export declare const ENDGE_CORE_MODULES: readonly [{
|
|
|
118
119
|
readonly key: "runtime";
|
|
119
120
|
readonly create: () => EndgeRuntime_Module;
|
|
120
121
|
readonly after: readonly ["compiler", "workspace", "context"];
|
|
122
|
+
}, {
|
|
123
|
+
readonly key: "inspection";
|
|
124
|
+
readonly create: ({ getModule }: import('../../../federation/types/endge-modules.types').EndgeModuleFactoryContext) => EndgeInspection_Module;
|
|
125
|
+
readonly after: readonly ["runtime", "program", "events", "context"];
|
|
121
126
|
}, {
|
|
122
127
|
readonly key: "updates";
|
|
123
128
|
readonly create: () => EndgeUpdates_Module;
|
|
@@ -133,7 +138,7 @@ export declare const ENDGE_CORE_MODULES: readonly [{
|
|
|
133
138
|
}, {
|
|
134
139
|
readonly key: "bridge";
|
|
135
140
|
readonly create: () => EndgeBridge_Module;
|
|
136
|
-
readonly after: readonly ["diagnostics", "runtime", "domain"];
|
|
141
|
+
readonly after: readonly ["diagnostics", "runtime", "domain", "inspection"];
|
|
137
142
|
}, {
|
|
138
143
|
readonly key: "styles";
|
|
139
144
|
readonly create: () => EndgeStyles_Module;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EndgeBootMode } from './types/bootstrap.types';
|
|
2
2
|
import { DiagnosticsSnapshot } from '../modules/diagnostics/domain/types/diagnostics.types';
|
|
3
|
+
import { EndgeLiveDomainSnapshot } from '../modules/domain/types/document/domain-snapshot.type';
|
|
3
4
|
declare const EndgeCore_base: import('../../federation/EndgeFederation').DefinedEndgeFederation<readonly [{
|
|
4
5
|
readonly key: "context";
|
|
5
6
|
readonly create: () => import('../modules/context/EndgeContext_Module').EndgeContext_Module;
|
|
@@ -91,6 +92,10 @@ declare const EndgeCore_base: import('../../federation/EndgeFederation').Defined
|
|
|
91
92
|
readonly key: "runtime";
|
|
92
93
|
readonly create: () => import('../modules/runtime/EndgeRuntime_Module').EndgeRuntime_Module;
|
|
93
94
|
readonly after: readonly ["compiler", "workspace", "context"];
|
|
95
|
+
}, {
|
|
96
|
+
readonly key: "inspection";
|
|
97
|
+
readonly create: ({ getModule }: import('../../../main').EndgeModuleFactoryContext) => import('../modules/inspection/EndgeInspection_Module').EndgeInspection_Module;
|
|
98
|
+
readonly after: readonly ["runtime", "program", "events", "context"];
|
|
94
99
|
}, {
|
|
95
100
|
readonly key: "updates";
|
|
96
101
|
readonly create: () => import('../modules/updates/EndgeUpdates_Module').EndgeUpdates_Module;
|
|
@@ -106,7 +111,7 @@ declare const EndgeCore_base: import('../../federation/EndgeFederation').Defined
|
|
|
106
111
|
}, {
|
|
107
112
|
readonly key: "bridge";
|
|
108
113
|
readonly create: () => import('../modules/bridge/EndgeBridge_Module').EndgeBridge_Module;
|
|
109
|
-
readonly after: readonly ["diagnostics", "runtime", "domain"];
|
|
114
|
+
readonly after: readonly ["diagnostics", "runtime", "domain", "inspection"];
|
|
110
115
|
}, {
|
|
111
116
|
readonly key: "styles";
|
|
112
117
|
readonly create: () => import('../modules/styles/EndgeStyles_Module').EndgeStyles_Module;
|
|
@@ -119,6 +124,10 @@ declare const EndgeCore_base: import('../../federation/EndgeFederation').Defined
|
|
|
119
124
|
declare class EndgeCore extends EndgeCore_base {
|
|
120
125
|
/** Active Core mode is owned by the boot context and is read-only. */
|
|
121
126
|
static get mode(): EndgeBootMode;
|
|
127
|
+
/** Builds the saved authoring state without activating Runtime hosts. */
|
|
128
|
+
static buildSavedProgram(signal?: AbortSignal): Promise<EndgeLiveDomainSnapshot | null>;
|
|
129
|
+
/** Валидирует обе части до установки; файл только с чанками дополняет текущую историю. */
|
|
130
|
+
static installDebuggerBundle(input: unknown): void;
|
|
122
131
|
/** Replaces an inspected application's document and contextual state without activating it. */
|
|
123
132
|
static replaceDebuggerSnapshot(snapshot: DiagnosticsSnapshot): void;
|
|
124
133
|
/** Shared guard before user mutations, including editor synchronization. */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EndgeBundle, EndgeBundleFileFormat } from '../types/endge-bundle.types';
|
|
2
|
+
export declare const ENDGE_BUNDLE_MAX_BYTES: number;
|
|
3
|
+
/** Проверяет общий контейнер независимо от способа доставки и не устанавливает его. */
|
|
4
|
+
export declare function readEndgeBundle(input: unknown): EndgeBundle;
|
|
5
|
+
/** Stateless file boundary. fflate async operations own cancellable workers, never Program/Runtime. */
|
|
6
|
+
export declare class EndgeBundleCodec_Service {
|
|
7
|
+
private readonly _maxBytes;
|
|
8
|
+
constructor(options?: {
|
|
9
|
+
maxDecodedBytes?: number;
|
|
10
|
+
});
|
|
11
|
+
encode(input: EndgeBundle, format?: EndgeBundleFileFormat, signal?: AbortSignal): Promise<Uint8Array>;
|
|
12
|
+
decode(bytes: Uint8Array, signal?: AbortSignal): Promise<EndgeBundle>;
|
|
13
|
+
private _gunzip;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BundleJsonValue } from '../types/endge-bundle.types';
|
|
2
|
+
/** Отдельная копия wire values: не вызывает toJSON/getters и не скрывает неподдержанные значения. */
|
|
3
|
+
export declare function copyBundleJson(value: unknown, syntaxTree?: boolean): BundleJsonValue;
|
|
4
|
+
/** Проверяет object без преобразования типов. */
|
|
5
|
+
export declare function bundleObject(value: unknown, label: string): Record<string, unknown>;
|
|
6
|
+
/** Проверяет непустой идентификатор. */
|
|
7
|
+
export declare function bundleText(value: unknown, label: string): string;
|
|
8
|
+
/** JSON object key order is not part of record identity across runtimes. */
|
|
9
|
+
export declare function equalBundleJson(left: unknown, right: unknown): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InspectionRecording } from '../../modules/inspection/types/inspection.types';
|
|
2
|
+
import { ExecutionBundle } from '../../modules/program/domain/types/execution-bundle.types';
|
|
3
|
+
/** Один контракт для сборки, записи и продолжения записи; codec не владеет состоянием. */
|
|
4
|
+
export interface EndgeBundle {
|
|
5
|
+
format: 'endge-bundle';
|
|
6
|
+
version: 1;
|
|
7
|
+
bundle?: ExecutionBundle;
|
|
8
|
+
inspection?: InspectionRecording;
|
|
9
|
+
}
|
|
10
|
+
export type EndgeBundleFileFormat = 'gzip' | 'json';
|
|
11
|
+
export type BundleJsonValue = null | boolean | number | string | BundleJsonValue[] | {
|
|
12
|
+
[key: string]: BundleJsonValue;
|
|
13
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConfiguratorConnection, ConfiguratorParticipant } from '../domain/bridge.type';
|
|
2
2
|
import { EndgeModule } from '../../../../federation/EndgeModule';
|
|
3
|
-
/** Проекция авторизованных конфигураторов
|
|
3
|
+
/** Проекция авторизованных конфигураторов backend, без page/UI state. */
|
|
4
4
|
export declare class EndgeBridgeConfigurator_Module extends EndgeModule {
|
|
5
5
|
private readonly _byServer;
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { EndgeBundle } from '../../../kernel/types/endge-bundle.types';
|
|
1
2
|
import { BrowserBridge_Adapter } from '../adapters/BrowserBridge_Adapter';
|
|
2
|
-
import { BridgeInspectionSnapshot } from '../domain/bridge-sync.type';
|
|
3
3
|
import { BridgeCommands, BridgeDebugClient, BridgeDebugSession, BridgeMessage, DebugConnectionRequest, SimulationRunResult } from '../domain/bridge.type';
|
|
4
4
|
import { EndgeCommand } from '../../commands/domain/commands.types';
|
|
5
5
|
import { DiagnosticsSnapshot } from '../../diagnostics/domain/types/diagnostics.types';
|
|
@@ -18,12 +18,11 @@ export declare class EndgeBridgeDebug_Module extends EndgeModule {
|
|
|
18
18
|
private readonly _sessions;
|
|
19
19
|
private readonly _incoming;
|
|
20
20
|
private _outgoingSession;
|
|
21
|
-
private
|
|
22
|
-
private
|
|
23
|
-
private
|
|
24
|
-
private
|
|
25
|
-
private
|
|
26
|
-
private _dataDirty;
|
|
21
|
+
private _capture;
|
|
22
|
+
private _deliveryTimer;
|
|
23
|
+
private _pendingChunks;
|
|
24
|
+
private _pendingBytes;
|
|
25
|
+
private _intervalMs;
|
|
27
26
|
private _includeData;
|
|
28
27
|
/**
|
|
29
28
|
* ----------------------------------------
|
|
@@ -48,7 +47,7 @@ export declare class EndgeBridgeDebug_Module extends EndgeModule {
|
|
|
48
47
|
/** Начинает буферизацию событий до импорта согласованного с ними снимка. */
|
|
49
48
|
startContextSync(sessionId: string, options?: {
|
|
50
49
|
includeData: boolean;
|
|
51
|
-
}): Promise<
|
|
50
|
+
}): Promise<EndgeBundle>;
|
|
52
51
|
/** После прямого импорта снимка применяет только более новые события, не вызывая Commands. */
|
|
53
52
|
activateContextSync(sessionId: string, sequence: number): void;
|
|
54
53
|
/** Обновляет Runtime и данные через тот же упорядоченный поток, что и события. */
|
|
@@ -81,29 +80,15 @@ export declare class EndgeBridgeDebug_Module extends EndgeModule {
|
|
|
81
80
|
private _clearPendingConsent;
|
|
82
81
|
/** Проверяет активную сессию и выполняет только явно разрешённые операции. */
|
|
83
82
|
private _execute;
|
|
84
|
-
/**
|
|
85
|
-
private
|
|
86
|
-
|
|
83
|
+
/** Delivery batching never coalesces already captured changes. */
|
|
84
|
+
private _queueChunk;
|
|
85
|
+
private _flushChunks;
|
|
87
86
|
private _receiveEvent;
|
|
88
|
-
|
|
89
|
-
private _applyIncomingEvent;
|
|
90
|
-
/** Снимает буфер и подписку только соответствующего сеанса. */
|
|
87
|
+
private _applyIncomingChunk;
|
|
91
88
|
private _releaseStream;
|
|
92
|
-
/** Привязывает запрос наблюдения к готовому сеансу и проверяет его после ответа. */
|
|
93
89
|
private _requestInspection;
|
|
94
|
-
|
|
90
|
+
setInspectionData(sessionId: string, includeData: boolean): Promise<void>;
|
|
95
91
|
private _validateInterval;
|
|
96
|
-
/** Coalescing топологии не зависит от включения периодических снимков данных. */
|
|
97
|
-
private _scheduleTopology;
|
|
98
|
-
/** Fixed interval не голодает при непрерывных изменениях и пропускает неизменившиеся данные. */
|
|
99
|
-
private _configureDataPublishing;
|
|
100
|
-
/** Ошибка снимка сохраняет предыдущие данные, но явно помечает их как не обновлённые. */
|
|
101
|
-
private _publishSafely;
|
|
102
|
-
/** Размер проверяется до выделения sequence: отклонённый payload не создаёт разрыв потока. */
|
|
103
|
-
private _publishInspection;
|
|
104
|
-
/** Последняя lease снимает дорогую подписку на изменения Raph. */
|
|
105
|
-
private _stopDataPublishing;
|
|
106
|
-
/** Все отложенные публикации принадлежат одному сеансу. */
|
|
107
92
|
private _stopInspectionPublishing;
|
|
108
93
|
/** Проверяет локальную роль и явное разрешение отладки. */
|
|
109
94
|
private _requireConfigurator;
|
|
@@ -9,6 +9,7 @@ export type EndgeBridgeBootOptions = {
|
|
|
9
9
|
serverUrl: string;
|
|
10
10
|
debug?: boolean;
|
|
11
11
|
label?: string;
|
|
12
|
+
allWorkspaces?: boolean;
|
|
12
13
|
};
|
|
13
14
|
export interface BridgeConnectionState {
|
|
14
15
|
serverUrl: string;
|
|
@@ -17,6 +18,7 @@ export interface BridgeConnectionState {
|
|
|
17
18
|
error?: string;
|
|
18
19
|
}
|
|
19
20
|
export interface ConfiguratorConnection {
|
|
21
|
+
workspaceDisplayName?: string;
|
|
20
22
|
serverUrl: string;
|
|
21
23
|
instanceId: string;
|
|
22
24
|
userId: string;
|
|
@@ -30,6 +32,8 @@ export interface ConfiguratorParticipant {
|
|
|
30
32
|
connectionCount: number;
|
|
31
33
|
}
|
|
32
34
|
export interface BridgeDebugClient {
|
|
35
|
+
workspaceIdentity?: string;
|
|
36
|
+
workspaceDisplayName?: string;
|
|
33
37
|
serverUrl: string;
|
|
34
38
|
instanceId: string;
|
|
35
39
|
label: string;
|
|
@@ -98,6 +98,8 @@ export declare class EndgeCompiler_Module extends EndgeModule<EndgeBootContext>
|
|
|
98
98
|
* PRIVATE
|
|
99
99
|
* ----------------------------------------
|
|
100
100
|
*/
|
|
101
|
+
/** Фиксирует только реально используемые code Actions как требования к host этой сборки. */
|
|
102
|
+
private _hostActionRequirements;
|
|
101
103
|
/** Собирает полный registry встроенных compiler handlers для поддерживаемых Domain documents. */
|
|
102
104
|
private _registerDefaultHandlers;
|
|
103
105
|
/**
|
package/dist/features/core/modules/compiler/services/component-sfc/component-sfc-expression-ir.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ComponentSFCExpressionIR } from '../../../domain/types/component/sfc/expression-ir.types';
|
|
2
|
+
import type * as t from '@babel/types';
|
|
3
|
+
/** Lowering уже разобранного AST; parser вызывается только владельцем compile pipeline. */
|
|
4
|
+
export declare function lowerComponentSFCExpression(node: t.Node): ComponentSFCExpressionIR;
|
package/dist/features/core/modules/compiler/services/component-sfc/component-sfc-expression.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Node } from '@babel/types';
|
|
1
2
|
import { EndgeRuntimeContextSnapshot } from '../../../context/domain/context-persistence.types';
|
|
2
3
|
import { RComponentDiagnostic } from '../../../domain/types/component/component-core.types';
|
|
3
4
|
import { RComponentSFC_IR_Value } from '../../../domain/types/component/sfc/ir.types';
|
|
@@ -46,3 +47,5 @@ export declare function resolveComponentSFCExpressionCompletions(request: Compon
|
|
|
46
47
|
export declare function readComponentSFCTranslationFallback(source: string): string | null;
|
|
47
48
|
/** Компилирует expression и извлекает reactive reads для runtime-подписок. */
|
|
48
49
|
export declare function compileComponentSFCExpression(source: string, context?: ComponentSFCExpressionContext): ComponentSFCExpressionCompileResult;
|
|
50
|
+
/** Использует уже разобранный узел script/annotation без повторного parser pass. */
|
|
51
|
+
export declare function compileComponentSFCExpressionAST(ast: Node, source: string, context?: ComponentSFCExpressionContext): ComponentSFCExpressionCompileResult;
|
package/dist/features/core/modules/compiler/services/component-sfc/component-sfc-interactions.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RComponentDependencies, RComponentDiagnostic } from '../../../domain/types/component/component-core.types';
|
|
2
2
|
import { RComponentSFC_AST_Attribute } from '../../../domain/types/component/sfc/ast.types';
|
|
3
|
-
import { RComponentSFC_IR_EventModifier, RComponentSFC_IR_InteractionGroup } from '../../../domain/types/component/sfc/ir.types';
|
|
3
|
+
import { RComponentSFC_IR_EventModifier, RComponentSFC_IR_InteractionGroup, RComponentSFC_IR_Value } from '../../../domain/types/component/sfc/ir.types';
|
|
4
4
|
import { ComponentSFCPortManifest } from '../../../domain/types/component/sfc/ports.types';
|
|
5
5
|
export interface ComponentSFCInteractionCompileContext {
|
|
6
6
|
props: string[];
|
|
7
7
|
locals: string[];
|
|
8
8
|
}
|
|
9
9
|
/** Статически обнаруживает недопустимые сочетания passive и prevent в общих описателях trigger. */
|
|
10
|
-
export declare function hasComponentSFCPassivePreventConflict(
|
|
10
|
+
export declare function hasComponentSFCPassivePreventConflict(value: RComponentSFC_IR_Value, suffixes?: readonly RComponentSFC_IR_EventModifier[]): boolean;
|
|
11
11
|
/** Компилирует одну принадлежащую Source аннотацию `:on` в нейтральные к renderer правила. */
|
|
12
12
|
export declare function compileComponentSFCInteractionAnnotation(attribute: RComponentSFC_AST_Attribute, manifest: ComponentSFCPortManifest | null, context: ComponentSFCInteractionCompileContext, dependencies: RComponentDependencies, diagnostics: RComponentDiagnostic[], ownerPorts?: ComponentSFCPortManifest | null): RComponentSFC_IR_InteractionGroup | null;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { File } from '@babel/types';
|
|
1
2
|
import { RComponentDependencies, RComponentDiagnostic } from '../../../domain/types/component/component-core.types';
|
|
2
3
|
import { RComponentSFC_AST_Script } from '../../../domain/types/component/sfc/ast.types';
|
|
3
4
|
import { ComponentSFCEventAction, ComponentSFCPortManifest, ComponentSFCPortProviderDescriptor, RComponentSFC_IR_PortCall } from '../../../domain/types/component/sfc/ports.types';
|
|
4
5
|
import { TypeSourceDefinition } from '../../../source/domain/types/type-source.types';
|
|
5
6
|
export interface ComponentSFCPortAnalysisOptions {
|
|
7
|
+
scriptSyntax?: File | null;
|
|
6
8
|
resolveProvider?: (identity: string, expectedKind: 'computation' | 'component' | 'action' | 'query') => ComponentSFCPortProviderDescriptor | null;
|
|
7
9
|
resolveTypeDefinition?: (identity: string) => TypeSourceDefinition | null;
|
|
8
10
|
}
|
package/dist/features/core/modules/compiler/services/component-sfc/component-sfc-script.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { File } from '@babel/types';
|
|
1
2
|
import { RComponentContract, RComponentDiagnostic } from '../../../domain/types/component/component-core.types';
|
|
2
3
|
import { RComponentSFC_AST_Script } from '../../../domain/types/component/sfc/ast.types';
|
|
3
4
|
import { RComponentSFC_IR_LocalBinding, RComponentSFC_IR_Prop } from '../../../domain/types/component/sfc/ir.types';
|
|
@@ -5,6 +6,7 @@ import { ProgramMetadataMap } from '../../../program/domain/types/program-metada
|
|
|
5
6
|
import { ComponentSFCPreviewOptions, ComponentSFCPreviewProps } from '../../../program/domain/types/program.types';
|
|
6
7
|
import { TypeSourceDefinition } from '../../../source/domain/types/type-source.types';
|
|
7
8
|
export interface ComponentSFCTypeResolutionOptions {
|
|
9
|
+
scriptSyntax?: File | null;
|
|
8
10
|
resolveTypeDefinition?: (identity: string) => TypeSourceDefinition | null;
|
|
9
11
|
}
|
|
10
12
|
/** Результат анализа script-секции SFC. */
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { EndgeDomain_Module } from '../../domain/EndgeDomain_Module';
|
|
2
|
+
import { CompiledProgramCatalog } from '../../program/domain/types/execution-bundle.types';
|
|
3
|
+
import { ProgramArtifact } from '../../program/domain/types/program.types';
|
|
4
|
+
/** Сохраняет только навигационные дескрипторы полного compile snapshot, без authoring Source. */
|
|
5
|
+
export declare function createCompiledProgramCatalog(domain: EndgeDomain_Module, artifacts: readonly ProgramArtifact[]): CompiledProgramCatalog;
|
|
@@ -79,6 +79,10 @@ export declare class EndgeContext_Module extends EndgeModule<EndgeBootContext> {
|
|
|
79
79
|
loadFromStorage(): EndgeContextSnapshot | undefined;
|
|
80
80
|
/** Возвращает полный persistence scope текущей сессии. */
|
|
81
81
|
getPersistenceScope(): EndgePersistenceScope;
|
|
82
|
+
/** Читает личную настройку явно указанного пользователя host, в том числе в debugger. */
|
|
83
|
+
getUserState<T>(userId: string, key: string, transform?: EndgeContextStateTransform<T>): T | undefined;
|
|
84
|
+
/** Сохраняет личную настройку host, не меняя контекст или данные инспектируемого приложения. */
|
|
85
|
+
setUserState<T>(userId: string, key: string, state: T, transform?: EndgeContextStateTransform<T>): void;
|
|
82
86
|
/** Возвращает dynamic state текущего полного context scope. */
|
|
83
87
|
getState<T>(key: string, transform?: EndgeContextStateTransform<T>): T | undefined;
|
|
84
88
|
/** Сохраняет dynamic state в scope текущих workspace/facet selections/user. */
|
|
@@ -2,6 +2,8 @@ import { EndgePersistenceScope } from '../domain/context-persistence.types';
|
|
|
2
2
|
import { EndgeContextStateTransform } from '../domain/context-state.types';
|
|
3
3
|
/** Строит изолированный ключ dynamic state из полного context scope и ключа потребителя. */
|
|
4
4
|
export declare function buildContextStateStorageKey(scope: EndgePersistenceScope, key: string): string;
|
|
5
|
+
/** Личные настройки host-приложения не зависят от рабочего или инспектируемого context. */
|
|
6
|
+
export declare function buildUserContextStateStorageKey(userId: string, key: string): string;
|
|
5
7
|
export declare function normalizeContextStateKey(value: unknown): string;
|
|
6
8
|
export declare function serializeContextState<T>(state: T, transform?: EndgeContextStateTransform<T>): unknown;
|
|
7
9
|
export declare function deserializeContextState<T>(value: unknown, transform?: EndgeContextStateTransform<T>): T;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { File } from '@babel/types';
|
|
1
2
|
import { RComponentSFC_SourceRange } from './location.types';
|
|
2
3
|
/** Parser-level AST SFC source до построения семантического IR. */
|
|
3
4
|
export interface RComponentSFC_AST {
|
|
@@ -12,6 +13,8 @@ export interface RComponentSFC_AST {
|
|
|
12
13
|
}
|
|
13
14
|
/** AST script setup секции. */
|
|
14
15
|
export interface RComponentSFC_AST_Script {
|
|
16
|
+
/** Compiler-only дерево script; null означает ошибку синтаксиса. Не входит в IR. */
|
|
17
|
+
syntax?: File | null;
|
|
15
18
|
/** Язык script-секции: ts, js или другое значение из source. */
|
|
16
19
|
lang: string | null;
|
|
17
20
|
/** Флаг script setup. Для Endge SFC v1 ожидается true. */
|
|
@@ -71,7 +74,11 @@ export interface RComponentSFC_AST_Template {
|
|
|
71
74
|
range: RComponentSFC_SourceRange;
|
|
72
75
|
}
|
|
73
76
|
/** AST узел template до семантической нормализации. */
|
|
74
|
-
export type RComponentSFC_AST_TemplateNode =
|
|
77
|
+
export type RComponentSFC_AST_TemplateNode = {
|
|
78
|
+
kind: 'comment';
|
|
79
|
+
content: string;
|
|
80
|
+
range: RComponentSFC_SourceRange;
|
|
81
|
+
} | RComponentSFC_AST_ElementNode | RComponentSFC_AST_TextNode | RComponentSFC_AST_InterpolationNode;
|
|
75
82
|
/** AST element-узел template. */
|
|
76
83
|
export interface RComponentSFC_AST_ElementNode {
|
|
77
84
|
/** Тип AST-узла. */
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** Исполняемые SFC expressions. Не содержат parser AST или исходного синтаксиса. */
|
|
2
|
+
export type ComponentSFCExpressionIR = {
|
|
3
|
+
kind: 'literal';
|
|
4
|
+
value: string | number | boolean | null;
|
|
5
|
+
} | {
|
|
6
|
+
kind: 'read';
|
|
7
|
+
name: string;
|
|
8
|
+
} | {
|
|
9
|
+
kind: 'unary';
|
|
10
|
+
operator: string;
|
|
11
|
+
argument: ComponentSFCExpressionIR;
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'binary' | 'logical';
|
|
14
|
+
operator: string;
|
|
15
|
+
left: ComponentSFCExpressionIR;
|
|
16
|
+
right: ComponentSFCExpressionIR;
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'conditional';
|
|
19
|
+
test: ComponentSFCExpressionIR;
|
|
20
|
+
consequent: ComponentSFCExpressionIR;
|
|
21
|
+
alternate: ComponentSFCExpressionIR;
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'member';
|
|
24
|
+
object: ComponentSFCExpressionIR;
|
|
25
|
+
property: ComponentSFCExpressionIR;
|
|
26
|
+
computed: boolean;
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'select';
|
|
29
|
+
object: ComponentSFCExpressionIR;
|
|
30
|
+
key: string;
|
|
31
|
+
value: ComponentSFCExpressionIR;
|
|
32
|
+
} | {
|
|
33
|
+
kind: 'call';
|
|
34
|
+
callee: ComponentSFCExpressionIR;
|
|
35
|
+
arguments: ComponentSFCExpressionIR[];
|
|
36
|
+
} | {
|
|
37
|
+
kind: 'array';
|
|
38
|
+
items: ComponentSFCExpressionIR[];
|
|
39
|
+
} | {
|
|
40
|
+
kind: 'object';
|
|
41
|
+
entries: Array<{
|
|
42
|
+
key: string;
|
|
43
|
+
value: ComponentSFCExpressionIR;
|
|
44
|
+
}>;
|
|
45
|
+
} | {
|
|
46
|
+
kind: 'template';
|
|
47
|
+
parts: string[];
|
|
48
|
+
expressions: ComponentSFCExpressionIR[];
|
|
49
|
+
} | {
|
|
50
|
+
kind: 'unsupported';
|
|
51
|
+
reason?: 'object-property';
|
|
52
|
+
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { RComponentDiagnostic } from '../component-core.types';
|
|
2
|
+
import { ComponentSFCExpressionIR } from './expression-ir.types';
|
|
2
3
|
import { RComponentSFC_SourceRange } from './location.types';
|
|
3
4
|
import { ComponentSFCEventAction, ComponentSFCPortForwardOrigin, ComponentSFCPortManifest, ComponentSFCRequiredPortBinding, RComponentSFC_IR_ComponentPortMarker, RComponentSFC_IR_PortCall } from './ports.types';
|
|
4
5
|
import { EndgeStyleSheetArtifact } from '../../../../styles/domain/types/style.types';
|
|
5
6
|
/** Семантическая модель компонента после compiler pipeline, независимая от DOM и Nova. */
|
|
6
7
|
export interface RComponentSFC_IR {
|
|
7
8
|
/** Версия IR-модели. */
|
|
8
|
-
version:
|
|
9
|
+
version: 2;
|
|
9
10
|
/** Нормализованная модель script setup. */
|
|
10
11
|
script: RComponentSFC_IR_Script;
|
|
11
12
|
/** Нормализованный граф template-узлов: Text, Flex, Box, Component и другие primitives. */
|
|
@@ -321,6 +322,8 @@ export interface RComponentSFC_IR_LiteralValue {
|
|
|
321
322
|
}
|
|
322
323
|
/** Runtime-выражение с зависимостями для реактивного обновления. */
|
|
323
324
|
export interface RComponentSFC_IR_ExpressionValue {
|
|
325
|
+
/** Готовая программа выражения; source используется только инструментами authoring/debug. */
|
|
326
|
+
expression: ComponentSFCExpressionIR;
|
|
324
327
|
/** Тип значения. */
|
|
325
328
|
kind: 'expression';
|
|
326
329
|
/** Исходный текст выражения. */
|
|
@@ -27,6 +27,8 @@ export type ComputationProgramNode = {
|
|
|
27
27
|
};
|
|
28
28
|
/** Готовый для runtime граф, скомпилированный из одного Source-документа defineComputation. */
|
|
29
29
|
export interface ComputationProgramPayload {
|
|
30
|
+
/** Optional parser tree retained for inspection; runtime does not require it. */
|
|
31
|
+
ast?: unknown;
|
|
30
32
|
input: ComputationContractField | null;
|
|
31
33
|
output: ComputationContractField | null;
|
|
32
34
|
sourceDocument: ComputationSourceDocument | null;
|
|
@@ -14,6 +14,7 @@ export declare class EndgeDomainRepositoryReadOnlyError extends Error {
|
|
|
14
14
|
}
|
|
15
15
|
/** Граница persistence для live service-backend и локальных источников только для чтения. */
|
|
16
16
|
export declare class EndgeDomainRepository_Module extends EndgeModule<EndgeBootContext> {
|
|
17
|
+
private _snapshotContext;
|
|
17
18
|
private _generation;
|
|
18
19
|
private _snapshotSequence;
|
|
19
20
|
private _abortController;
|
|
@@ -32,6 +33,8 @@ export declare class EndgeDomainRepository_Module extends EndgeModule<EndgeBootC
|
|
|
32
33
|
setup(ctx: EndgeBootContext): Promise<void>;
|
|
33
34
|
/** Загружает live snapshot через активный transport provider и индексирует server state. */
|
|
34
35
|
loadSnapshot(ctx: EndgeBootContext): Promise<EndgeLiveDomainSnapshot>;
|
|
36
|
+
/** Reloads a consistent saved input for build without touching editor drafts. */
|
|
37
|
+
refreshSnapshot(signal?: AbortSignal): Promise<EndgeLiveDomainSnapshot | null>;
|
|
35
38
|
getLoadedSnapshot(): EndgeLiveDomainSnapshot | null;
|
|
36
39
|
getDocumentServerState(documentType: string, identity: string): EndgeDocumentServerState | null;
|
|
37
40
|
getFacetDocumentServerState(facetIdentity: string, documentIdentity: string): EndgeDocumentServerState | null;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { InspectionCapture, InspectionChunk, InspectionRecord, InspectionRecording } from './types/inspection.types';
|
|
2
|
+
import { EndgeContext_Module } from '../context/EndgeContext_Module';
|
|
3
|
+
import { EndgeEvents_Module } from '../events/EndgeEvents_Module';
|
|
4
|
+
import { EndgeProgram_Module } from '../program/EndgeProgram_Module';
|
|
5
|
+
import { EndgeRuntime_Module } from '../runtime/EndgeRuntime_Module';
|
|
6
|
+
import { EndgeModule } from '../../../federation/EndgeModule';
|
|
7
|
+
/** Общий журнал инспекции и управление временем; наблюдаемое состояние принадлежит Runtime/Context. */
|
|
8
|
+
export declare class EndgeInspection_Module extends EndgeModule {
|
|
9
|
+
private readonly _context;
|
|
10
|
+
private readonly _runtime;
|
|
11
|
+
private readonly _events;
|
|
12
|
+
private readonly _program;
|
|
13
|
+
private readonly _archives;
|
|
14
|
+
private _recording;
|
|
15
|
+
private _records;
|
|
16
|
+
private readonly _bySequence;
|
|
17
|
+
private _receivedState;
|
|
18
|
+
private _receivedRevision;
|
|
19
|
+
private _applied;
|
|
20
|
+
private _appliedState;
|
|
21
|
+
private _follow;
|
|
22
|
+
private _error;
|
|
23
|
+
private _bytes;
|
|
24
|
+
private _local;
|
|
25
|
+
private readonly _captures;
|
|
26
|
+
private _captureProgramId;
|
|
27
|
+
private _runId;
|
|
28
|
+
constructor(_context: EndgeContext_Module, _runtime: EndgeRuntime_Module, _events: EndgeEvents_Module, _program: EndgeProgram_Module);
|
|
29
|
+
get status(): 'idle' | 'recording' | 'stopped' | 'ready' | 'error';
|
|
30
|
+
get availableRange(): {
|
|
31
|
+
first: number;
|
|
32
|
+
last: number;
|
|
33
|
+
} | null;
|
|
34
|
+
get dataAvailable(): boolean;
|
|
35
|
+
get records(): readonly InspectionRecord[];
|
|
36
|
+
get appliedSequence(): number | null;
|
|
37
|
+
get receivedSequence(): number | null;
|
|
38
|
+
get followLive(): boolean;
|
|
39
|
+
get error(): string | null;
|
|
40
|
+
get bytes(): number;
|
|
41
|
+
get isRecording(): boolean;
|
|
42
|
+
get recordingId(): string | null;
|
|
43
|
+
/** Завершённые сеансы хранят только записи; Program остаётся единственным владельцем программы. */
|
|
44
|
+
get archives(): ReadonlyArray<{
|
|
45
|
+
recordingId: string;
|
|
46
|
+
programId: string;
|
|
47
|
+
runId: string;
|
|
48
|
+
records: number;
|
|
49
|
+
}>;
|
|
50
|
+
get gaps(): ReadonlyArray<{
|
|
51
|
+
from: number;
|
|
52
|
+
to: number;
|
|
53
|
+
resumedAt: number;
|
|
54
|
+
}>;
|
|
55
|
+
archiveCurrent(): void;
|
|
56
|
+
exportArchived(recordingId: string): InspectionRecording;
|
|
57
|
+
removeArchived(recordingId: string): void;
|
|
58
|
+
/** Валидация всей записи вместе с semantic replay до изменений текущих owners. */
|
|
59
|
+
prepare(recording: unknown): InspectionRecording;
|
|
60
|
+
open(recording: InspectionRecording): void;
|
|
61
|
+
appendRecording(input: InspectionRecording): void;
|
|
62
|
+
append(chunk: InspectionChunk): void;
|
|
63
|
+
seek(sequence: number): void;
|
|
64
|
+
private _applyState;
|
|
65
|
+
stepForward(): void;
|
|
66
|
+
stepBackward(): void;
|
|
67
|
+
setFollowLive(value: boolean): void;
|
|
68
|
+
exportRecording(): InspectionRecording;
|
|
69
|
+
startRecording(options?: {
|
|
70
|
+
includeData?: boolean;
|
|
71
|
+
}): void;
|
|
72
|
+
stopRecording(): void;
|
|
73
|
+
/** Bridge и local recorder получают независимые leases и не меняют policy друг друга. */
|
|
74
|
+
createCapture(options: {
|
|
75
|
+
includeData?: boolean;
|
|
76
|
+
}, onChunk?: (chunk: InspectionChunk) => void): InspectionCapture;
|
|
77
|
+
clear(): void;
|
|
78
|
+
reset(): void;
|
|
79
|
+
private _captureState;
|
|
80
|
+
private _appendRecords;
|
|
81
|
+
private _replay;
|
|
82
|
+
private _validateTail;
|
|
83
|
+
private _requireDebugger;
|
|
84
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { InspectionCapture, InspectionChunk, InspectionRecording, InspectionState } from '../types/inspection.types';
|
|
2
|
+
/** Один consumer capture: собственные policy, immutable history, sequence и disposer. */
|
|
3
|
+
export declare class InspectionCapture_Service implements InspectionCapture {
|
|
4
|
+
private _includeData;
|
|
5
|
+
private readonly _capture;
|
|
6
|
+
private readonly _onChunk?;
|
|
7
|
+
private readonly _onDataPolicy?;
|
|
8
|
+
private readonly _recording;
|
|
9
|
+
private _state;
|
|
10
|
+
private _revision;
|
|
11
|
+
private _sequence;
|
|
12
|
+
private _bytes;
|
|
13
|
+
private _updates;
|
|
14
|
+
private _stopped;
|
|
15
|
+
private _release;
|
|
16
|
+
constructor(programId: string, runId: string, _includeData: boolean, _capture: (includeData: boolean) => InspectionState, _onChunk?: ((chunk: InspectionChunk) => void) | undefined, _onDataPolicy?: ((includeData: boolean) => void) | undefined);
|
|
17
|
+
get recordingId(): string;
|
|
18
|
+
get dataAvailable(): boolean;
|
|
19
|
+
get error(): string | null;
|
|
20
|
+
get recording(): InspectionRecording;
|
|
21
|
+
get bytes(): number;
|
|
22
|
+
get receivedSequence(): number;
|
|
23
|
+
get count(): number;
|
|
24
|
+
get stopped(): boolean;
|
|
25
|
+
attach(release: () => void): void;
|
|
26
|
+
/** Снимает состояние на границе уведомления owner, не откладывая чтение mutable values. */
|
|
27
|
+
update(event?: {
|
|
28
|
+
name: string;
|
|
29
|
+
payload: unknown;
|
|
30
|
+
}): void;
|
|
31
|
+
setIncludeData(value: boolean): void;
|
|
32
|
+
snapshot(reason?: 'manual' | 'resync'): void;
|
|
33
|
+
stop(): void;
|
|
34
|
+
private _snapshot;
|
|
35
|
+
private _push;
|
|
36
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InspectionChange, InspectionChunk, InspectionRecord, InspectionRecording, InspectionState } from '../types/inspection.types';
|
|
2
|
+
export declare const INSPECTION_MAX_RECORDS = 100000;
|
|
3
|
+
export declare const INSPECTION_MAX_BYTES: number;
|
|
4
|
+
/** Проверяет пассивный snapshot, не создавая ни одного runtime resource. */
|
|
5
|
+
export declare function readInspectionState(input: unknown): InspectionState;
|
|
6
|
+
/** Общий sequenced record reader для файла и Bridge. */
|
|
7
|
+
export declare function readInspectionChunk(input: unknown): InspectionChunk;
|
|
8
|
+
export declare function readInspectionRecording(input: unknown): InspectionRecording;
|
|
9
|
+
/** Детерминированное применение фактов; никогда не вызывает Events/Commands или parser. */
|
|
10
|
+
export declare function reduceInspectionRecord(state: InspectionState | null, revision: number, record: InspectionRecord): {
|
|
11
|
+
state: InspectionState | null;
|
|
12
|
+
revision: number;
|
|
13
|
+
};
|
|
14
|
+
/** Объекты патчатся по ключам, массивы заменяются целиком, отсутствующие значения удаляются явно. */
|
|
15
|
+
export declare function diffInspectionState(previous: InspectionState, next: InspectionState): InspectionChange[];
|