@endge/core 1.2.5
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 +21 -0
- package/dist/core.js +85019 -0
- package/dist/domain/data-source-graphql.d.ts +4 -0
- package/dist/domain/data-source-mock.d.ts +4 -0
- package/dist/domain/data-source-rest.d.ts +4 -0
- package/dist/domain/declare/jsx.d.ts +68 -0
- package/dist/domain/declare/scenario.d.ts +19 -0
- package/dist/domain/dependency-graph.d.ts +19 -0
- package/dist/domain/entities/action-flow/REndgeFlow.d.ts +27 -0
- package/dist/domain/entities/data/DataSource.d.ts +8 -0
- package/dist/domain/entities/data/DependencyEdge.d.ts +48 -0
- package/dist/domain/entities/data/DependencyGraph.d.ts +25 -0
- package/dist/domain/entities/data/DependencyNode.d.ts +30 -0
- package/dist/domain/entities/debug/MemoryStore.d.ts +34 -0
- package/dist/domain/entities/debug/tools/base.d.ts +5 -0
- package/dist/domain/entities/debug/tools/tree.d.ts +12 -0
- package/dist/domain/entities/diagnostics/DiagnosticsRecordStore.d.ts +33 -0
- package/dist/domain/entities/diagnostics/DiagnosticsScopeHandle.d.ts +21 -0
- package/dist/domain/entities/diagnostics/DiagnosticsSpan.d.ts +9 -0
- package/dist/domain/entities/diagnostics/DiagnosticsTrace.d.ts +9 -0
- package/dist/domain/entities/endge/EndgeActionJsonScript.d.ts +2 -0
- package/dist/domain/entities/endge/EndgeApi.d.ts +23 -0
- package/dist/domain/entities/endge/EndgeEvent.d.ts +33 -0
- package/dist/domain/entities/endge/EndgeFederation.d.ts +64 -0
- package/dist/domain/entities/endge/EndgeModule.d.ts +36 -0
- package/dist/domain/entities/endge/EndgeModuleController.d.ts +18 -0
- package/dist/domain/entities/endge/EndgeSlotRegistry.d.ts +14 -0
- package/dist/domain/entities/reflect/RAction.d.ts +30 -0
- package/dist/domain/entities/reflect/RBehaviorBinding.d.ts +19 -0
- package/dist/domain/entities/reflect/RComponent.d.ts +25 -0
- package/dist/domain/entities/reflect/RComponentBase.d.ts +39 -0
- package/dist/domain/entities/reflect/RComponentDSL.d.ts +14 -0
- package/dist/domain/entities/reflect/RComponentTable.d.ts +21 -0
- package/dist/domain/entities/reflect/RComponentTableColumn.d.ts +64 -0
- package/dist/domain/entities/reflect/RConverter.d.ts +14 -0
- package/dist/domain/entities/reflect/REntity.d.ts +47 -0
- package/dist/domain/entities/reflect/REnvironment.d.ts +6 -0
- package/dist/domain/entities/reflect/RField.d.ts +9 -0
- package/dist/domain/entities/reflect/RFilter.d.ts +11 -0
- package/dist/domain/entities/reflect/RFolder.d.ts +23 -0
- package/dist/domain/entities/reflect/RI18nBundle.d.ts +16 -0
- package/dist/domain/entities/reflect/RIntegration.d.ts +13 -0
- package/dist/domain/entities/reflect/RNavigation.d.ts +24 -0
- package/dist/domain/entities/reflect/RPage.d.ts +45 -0
- package/dist/domain/entities/reflect/RPageTemplate.d.ts +32 -0
- package/dist/domain/entities/reflect/RParameter.d.ts +13 -0
- package/dist/domain/entities/reflect/RPolicy.d.ts +7 -0
- package/dist/domain/entities/reflect/RPresentationBinding.d.ts +20 -0
- package/dist/domain/entities/reflect/RProject.d.ts +68 -0
- package/dist/domain/entities/reflect/RQuery.d.ts +43 -0
- package/dist/domain/entities/reflect/RQueryFilter.d.ts +12 -0
- package/dist/domain/entities/reflect/RQueryRest.d.ts +21 -0
- package/dist/domain/entities/reflect/RScenario.d.ts +20 -0
- package/dist/domain/entities/reflect/RSettings.d.ts +49 -0
- package/dist/domain/entities/reflect/RStyle.d.ts +7 -0
- package/dist/domain/entities/reflect/RTenant.d.ts +8 -0
- package/dist/domain/entities/reflect/RType.d.ts +17 -0
- package/dist/domain/entities/reflect/RVersion.d.ts +29 -0
- package/dist/domain/entities/reflect/RView.d.ts +21 -0
- package/dist/domain/entities/reflect/RVocabs.d.ts +16 -0
- package/dist/domain/entities/runtime/RuntimeBindingScope.d.ts +48 -0
- package/dist/domain/entities/runtime/RuntimeContext.d.ts +26 -0
- package/dist/domain/entities/runtime/RuntimeEnvironment.d.ts +12 -0
- package/dist/domain/entities/runtime/RuntimeHostBase.d.ts +100 -0
- package/dist/domain/entities/runtime/RuntimeHostFactory.d.ts +15 -0
- package/dist/domain/entities/runtime/RuntimeHostRegistry.d.ts +56 -0
- package/dist/domain/entities/runtime/RuntimeScope.d.ts +45 -0
- package/dist/domain/entities/runtime/hosts/ActionRuntimeHost.d.ts +30 -0
- package/dist/domain/entities/runtime/hosts/ComponentRuntimeHost.d.ts +22 -0
- package/dist/domain/entities/runtime/hosts/PageRuntimeHost.d.ts +22 -0
- package/dist/domain/entities/runtime/hosts/ProjectRuntimeHost.d.ts +22 -0
- package/dist/domain/entities/runtime/hosts/QueryRuntimeHost.d.ts +22 -0
- package/dist/domain/entities/runtime/hosts/TableRuntimeHost.d.ts +22 -0
- package/dist/domain/entities/runtime/hosts/ViewRuntimeHost.d.ts +22 -0
- package/dist/domain/script-api/expose.d.ts +6 -0
- package/dist/domain/script-api/mount.d.ts +7 -0
- package/dist/domain/script-api/query.d.ts +7 -0
- package/dist/domain/script-api/watch.d.ts +7 -0
- package/dist/domain/services/AbstractSyntaxTree_JSX.d.ts +30 -0
- package/dist/domain/services/AbstractSyntaxTree_TS.d.ts +18 -0
- package/dist/domain/services/GraphQLBuilderService.d.ts +19 -0
- package/dist/domain/services/ScenarioScriptBuilderService.d.ts +19 -0
- package/dist/domain/services/auth.d.ts +17 -0
- package/dist/domain/services/component-render-host.d.ts +20 -0
- package/dist/domain/types/action.types.d.ts +65 -0
- package/dist/domain/types/api.types.d.ts +29 -0
- package/dist/domain/types/auth.types.d.ts +82 -0
- package/dist/domain/types/bootstrap.types.d.ts +35 -0
- package/dist/domain/types/codegen.types.d.ts +23 -0
- package/dist/domain/types/component.types.d.ts +8 -0
- package/dist/domain/types/configuration-contract.types.d.ts +53 -0
- package/dist/domain/types/debug/base.types.d.ts +74 -0
- package/dist/domain/types/debug/events.types.d.ts +3 -0
- package/dist/domain/types/debug/tree.types.d.ts +27 -0
- package/dist/domain/types/diagnostics.types.d.ts +235 -0
- package/dist/domain/types/document.types.d.ts +93 -0
- package/dist/domain/types/endge-flow-runtime.types.d.ts +28 -0
- package/dist/domain/types/endge-flow.types.d.ts +110 -0
- package/dist/domain/types/events.types.d.ts +29 -0
- package/dist/domain/types/faceted-cascade.d.ts +300 -0
- package/dist/domain/types/filter.types.d.ts +39 -0
- package/dist/domain/types/flow-condition.types.d.ts +39 -0
- package/dist/domain/types/forge.types.d.ts +30 -0
- package/dist/domain/types/jsx.types.d.ts +16 -0
- package/dist/domain/types/models.types.d.ts +7 -0
- package/dist/domain/types/navigation.types.d.ts +27 -0
- package/dist/domain/types/query.types.d.ts +66 -0
- package/dist/domain/types/resolve.types.d.ts +70 -0
- package/dist/domain/types/runtime-entity-map.types.d.ts +28 -0
- package/dist/domain/types/runtime-host.types.d.ts +168 -0
- package/dist/domain/types/runtime-registry.types.d.ts +38 -0
- package/dist/domain/types/runtime.types.d.ts +103 -0
- package/dist/domain/types/schema.types.d.ts +92 -0
- package/dist/domain/types/settings.types.d.ts +117 -0
- package/dist/domain/types/styles.types.d.ts +25 -0
- package/dist/domain/types/table.types.d.ts +15 -0
- package/dist/domain/types/types.d.ts +99 -0
- package/dist/domain/types/ui-composition.types.d.ts +201 -0
- package/dist/domain/types/ui.types.d.ts +17 -0
- package/dist/main.d.ts +154 -0
- package/dist/model/config/contracts/behavior/component.d.ts +2 -0
- package/dist/model/config/contracts/behavior/index.d.ts +8 -0
- package/dist/model/config/contracts/behavior/page-template.d.ts +2 -0
- package/dist/model/config/contracts/behavior/page.d.ts +30 -0
- package/dist/model/config/contracts/behavior/project.d.ts +2 -0
- package/dist/model/config/contracts/behavior/query.d.ts +2 -0
- package/dist/model/config/contracts/behavior/view.d.ts +2 -0
- package/dist/model/config/contracts/configuration/index.d.ts +3 -0
- package/dist/model/config/contracts/configuration/navigation.d.ts +3 -0
- package/dist/model/config/contracts/index.d.ts +17 -0
- package/dist/model/config/contracts/presentation/component.d.ts +2 -0
- package/dist/model/config/contracts/presentation/index.d.ts +8 -0
- package/dist/model/config/contracts/presentation/page-template.d.ts +2 -0
- package/dist/model/config/contracts/presentation/page.d.ts +2 -0
- package/dist/model/config/contracts/presentation/project.d.ts +2 -0
- package/dist/model/config/contracts/presentation/query.d.ts +2 -0
- package/dist/model/config/contracts/presentation/view.d.ts +2 -0
- package/dist/model/config/debug.d.ts +11 -0
- package/dist/model/config/events.d.ts +16 -0
- package/dist/model/config/index.d.ts +7 -0
- package/dist/model/config/persistance_config.d.ts +6 -0
- package/dist/model/config/storage_config.d.ts +4 -0
- package/dist/model/config/ui-composition-defaults.d.ts +523 -0
- package/dist/model/db/repositories/Actions_Repository.d.ts +35 -0
- package/dist/model/db/repositories/BehaviorBindings_Repository.d.ts +16 -0
- package/dist/model/db/repositories/Components_Repository.d.ts +64 -0
- package/dist/model/db/repositories/Converters_Repository.d.ts +40 -0
- package/dist/model/db/repositories/Environments_Repository.d.ts +35 -0
- package/dist/model/db/repositories/Filters_Repository.d.ts +56 -0
- package/dist/model/db/repositories/Folders_Repository.d.ts +30 -0
- package/dist/model/db/repositories/I18nBundles_Repository.d.ts +47 -0
- package/dist/model/db/repositories/Integrations_Repository.d.ts +40 -0
- package/dist/model/db/repositories/Navigations_Repository.d.ts +40 -0
- package/dist/model/db/repositories/PageTemplates_Repository.d.ts +56 -0
- package/dist/model/db/repositories/Pages_Repository.d.ts +89 -0
- package/dist/model/db/repositories/Parameters_Repository.d.ts +56 -0
- package/dist/model/db/repositories/Policies_Repository.d.ts +35 -0
- package/dist/model/db/repositories/PresentationBindings_Repository.d.ts +14 -0
- package/dist/model/db/repositories/Projects_Repository.d.ts +38 -0
- package/dist/model/db/repositories/Queries_Repository.d.ts +45 -0
- package/dist/model/db/repositories/Scenarios_Repository.d.ts +41 -0
- package/dist/model/db/repositories/Settings_Repository.d.ts +48 -0
- package/dist/model/db/repositories/Styles_Repository.d.ts +51 -0
- package/dist/model/db/repositories/Tenants_Repository.d.ts +39 -0
- package/dist/model/db/repositories/Types_Repository.d.ts +48 -0
- package/dist/model/db/repositories/Versions_Repository.d.ts +15 -0
- package/dist/model/db/repositories/Views_Repository.d.ts +65 -0
- package/dist/model/db/repositories/Vocabs_Repository.d.ts +59 -0
- package/dist/model/db/repositories/payload-api.d.ts +10 -0
- package/dist/model/db/schema-database/BaseSchemaRepositoriy.d.ts +19 -0
- package/dist/model/db/schema-database/PayloadSchemaAdapter.d.ts +34 -0
- package/dist/model/db/schema-database/SchemaStorageAdapter.d.ts +40 -0
- package/dist/model/endge/endge-app.d.ts +47 -0
- package/dist/model/endge/endge-auth.d.ts +56 -0
- package/dist/model/endge/endge-bind.d.ts +32 -0
- package/dist/model/endge/endge-bindings-behavior.d.ts +39 -0
- package/dist/model/endge/endge-bindings-presentation.d.ts +30 -0
- package/dist/model/endge/endge-bootstrap.d.ts +23 -0
- package/dist/model/endge/endge-console.d.ts +35 -0
- package/dist/model/endge/endge-contracts.d.ts +77 -0
- package/dist/model/endge/endge-debug.d.ts +37 -0
- package/dist/model/endge/endge-diagnostics.d.ts +111 -0
- package/dist/model/endge/endge-domain.d.ts +519 -0
- package/dist/model/endge/endge-events.d.ts +25 -0
- package/dist/model/endge/endge-extract.d.ts +84 -0
- package/dist/model/endge/endge-flow-registry.d.ts +21 -0
- package/dist/model/endge/endge-flow.d.ts +51 -0
- package/dist/model/endge/endge-query.d.ts +20 -0
- package/dist/model/endge/endge-render.d.ts +17 -0
- package/dist/model/endge/endge-reports.d.ts +22 -0
- package/dist/model/endge/endge-runtime-debugger.d.ts +60 -0
- package/dist/model/endge/endge-runtime.d.ts +87 -0
- package/dist/model/endge/endge-schema-database.d.ts +217 -0
- package/dist/model/endge/endge-script.d.ts +42 -0
- package/dist/model/endge/endge-sse.d.ts +19 -0
- package/dist/model/endge/endge-store.d.ts +41 -0
- package/dist/model/endge/endge-styles.d.ts +45 -0
- package/dist/model/endge/endge-testing.d.ts +16 -0
- package/dist/model/endge/endge-ui-registry.d.ts +50 -0
- package/dist/model/endge/endge-ui.d.ts +43 -0
- package/dist/model/endge/endge-updates.d.ts +34 -0
- package/dist/model/endge/endge-vars.d.ts +50 -0
- package/dist/model/endge/endge-vocabs.d.ts +47 -0
- package/dist/model/endge/endge.d.ts +98 -0
- package/dist/model/factories/DataSourceFactory.d.ts +14 -0
- package/dist/model/factories/DocumentFactory.d.ts +24 -0
- package/dist/model/helpers/endge-resolve-engine.d.ts +93 -0
- package/dist/model/helpers/raph-phases/endge-runtime-boundary.d.ts +13 -0
- package/dist/model/helpers/raph-phases/queries-phase.d.ts +7 -0
- package/dist/model/helpers/raph-phases/tables-phase.d.ts +7 -0
- package/dist/model/seed/actions/console_log.d.ts +3 -0
- package/dist/model/seed/actions/load_vocabs.d.ts +3 -0
- package/dist/model/seed/converters/arrays/split.d.ts +2 -0
- package/dist/model/seed/converters/arrays/to-array.d.ts +2 -0
- package/dist/model/seed/converters/date/date-to-date-string.d.ts +2 -0
- package/dist/model/seed/converters/date/date-to-iso-string.d.ts +2 -0
- package/dist/model/seed/converters/date/date-to-iso-z.d.ts +2 -0
- package/dist/model/seed/converters/date/date-to-time-string.d.ts +2 -0
- package/dist/model/seed/converters/date/iso-string-to-date.d.ts +2 -0
- package/dist/model/seed/converters/date/iso-string-to-time-string.d.ts +2 -0
- package/dist/model/seed/converters/date/string-to-date.d.ts +2 -0
- package/dist/model/seed/converters/date/time-string-to-date.d.ts +2 -0
- package/dist/model/seed/converters/date/timestamp-to-date.d.ts +2 -0
- package/dist/model/seed/converters/date/weekdays-range.d.ts +5 -0
- package/dist/model/seed/converters/json/json-parse.d.ts +2 -0
- package/dist/model/seed/converters/json/json-stringify.d.ts +2 -0
- package/dist/model/seed/converters/numbers/number-to-string.d.ts +2 -0
- package/dist/model/seed/converters/numbers/string-to-number.d.ts +2 -0
- package/dist/model/seed/converters/strings/default-if-empty.d.ts +2 -0
- package/dist/model/seed/converters/strings/string-to-boolean.d.ts +2 -0
- package/dist/model/seed/converters/strings/string-trim.d.ts +2 -0
- package/dist/model/services/Auth_Service.d.ts +23 -0
- package/dist/tmp/hierarchial-faceted-configuration-cascade/tmp.d.ts +82 -0
- package/dist/tools/ScheduleUpdate-sse-generator.d.ts +9 -0
- package/dist/tools/graphql-parser.d.ts +5 -0
- package/dist/tools/mock-generator.d.ts +16 -0
- package/dist/tools/openapi-parser.d.ts +4 -0
- package/dist/tools/table.d.ts +4 -0
- package/dist/tools/updates-generator.d.ts +12 -0
- package/package.json +71 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Глобальный JSX-контекст для скриптов DSL
|
|
3
|
+
*/
|
|
4
|
+
declare const $: Record<string, any>;
|
|
5
|
+
declare namespace JSX {
|
|
6
|
+
interface IntrinsicElements {
|
|
7
|
+
Text: {
|
|
8
|
+
children?: any;
|
|
9
|
+
bold?: boolean;
|
|
10
|
+
italic?: boolean;
|
|
11
|
+
underline?: boolean;
|
|
12
|
+
strike?: boolean;
|
|
13
|
+
color?: string;
|
|
14
|
+
bg?: string;
|
|
15
|
+
size?: string | number;
|
|
16
|
+
align?: string;
|
|
17
|
+
weight?: string;
|
|
18
|
+
shadow?: string;
|
|
19
|
+
uppercase?: boolean;
|
|
20
|
+
lowercase?: boolean;
|
|
21
|
+
capitalize?: boolean;
|
|
22
|
+
class?: string;
|
|
23
|
+
};
|
|
24
|
+
Layout: {
|
|
25
|
+
children?: any;
|
|
26
|
+
direction?: 'row' | 'column';
|
|
27
|
+
gap?: string | number;
|
|
28
|
+
align?: string;
|
|
29
|
+
justify?: string;
|
|
30
|
+
wrap?: boolean | string;
|
|
31
|
+
class?: string;
|
|
32
|
+
};
|
|
33
|
+
Icon: {
|
|
34
|
+
name: string;
|
|
35
|
+
size?: string | number;
|
|
36
|
+
color?: string;
|
|
37
|
+
class?: string;
|
|
38
|
+
};
|
|
39
|
+
Button: {
|
|
40
|
+
children?: any;
|
|
41
|
+
variant?: 'solid' | 'outline' | 'ghost';
|
|
42
|
+
color?: string;
|
|
43
|
+
onClick?: () => void;
|
|
44
|
+
class?: string;
|
|
45
|
+
};
|
|
46
|
+
Box: {
|
|
47
|
+
children?: any;
|
|
48
|
+
padding?: string;
|
|
49
|
+
margin?: string;
|
|
50
|
+
shadow?: string;
|
|
51
|
+
border?: string;
|
|
52
|
+
rounded?: boolean;
|
|
53
|
+
bg?: string;
|
|
54
|
+
class?: string;
|
|
55
|
+
};
|
|
56
|
+
Spacer: {
|
|
57
|
+
size?: string | number;
|
|
58
|
+
};
|
|
59
|
+
Image: {
|
|
60
|
+
src: string;
|
|
61
|
+
alt?: string;
|
|
62
|
+
width?: string | number;
|
|
63
|
+
height?: string | number;
|
|
64
|
+
rounded?: boolean;
|
|
65
|
+
class?: string;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Декларация контекста для setup-скрипта сценария
|
|
3
|
+
*/
|
|
4
|
+
declare const UnsafeEndge: {
|
|
5
|
+
domain: any;
|
|
6
|
+
extract: any;
|
|
7
|
+
render: any;
|
|
8
|
+
store: any;
|
|
9
|
+
script: any;
|
|
10
|
+
};
|
|
11
|
+
declare function query(queryId: string): {
|
|
12
|
+
to(storeKey: string): Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
declare function watch(queryId: string, seconds?: number): {
|
|
15
|
+
to(storeKey: string): Promise<void>;
|
|
16
|
+
};
|
|
17
|
+
declare function mount(componentId: string): {
|
|
18
|
+
from(storeKey: string): Promise<void>;
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DataPath } from '@endge/raph';
|
|
2
|
+
export declare class DependencyGraphBuilder {
|
|
3
|
+
id?: string;
|
|
4
|
+
parentId?: string;
|
|
5
|
+
vars: Set<string>;
|
|
6
|
+
fns: Set<string>;
|
|
7
|
+
varsPaths: Map<string, DataPath>;
|
|
8
|
+
children: DependencyGraphBuilder[];
|
|
9
|
+
constructor(id?: string);
|
|
10
|
+
/**
|
|
11
|
+
* Добавляет зависимости из JSX-строки (DSL-шаблон, Vue SFC, ...)
|
|
12
|
+
*/
|
|
13
|
+
addJSX(jsxCode: string): void;
|
|
14
|
+
private _walkAndNormalize;
|
|
15
|
+
private _normalizeDirectives;
|
|
16
|
+
private _generateVarPaths;
|
|
17
|
+
private _collectVars;
|
|
18
|
+
private _normalizeInterpolations;
|
|
19
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EndgeFlowDefinition, EndgeFlowNodeDefinition } from '../../types/endge-flow.types';
|
|
2
|
+
declare class REndgeFlowNode {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
blockId: string;
|
|
6
|
+
kind: EndgeFlowNodeDefinition['kind'];
|
|
7
|
+
params: Record<string, unknown>;
|
|
8
|
+
meta: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
declare class REndgeFlowEdge {
|
|
11
|
+
id: string;
|
|
12
|
+
sourceNodeId: string;
|
|
13
|
+
sourcePortId: string;
|
|
14
|
+
targetNodeId: string;
|
|
15
|
+
targetPortId: string;
|
|
16
|
+
label: string | null;
|
|
17
|
+
}
|
|
18
|
+
export declare class REndgeFlow {
|
|
19
|
+
version: number;
|
|
20
|
+
entrypoint: string;
|
|
21
|
+
nodes: REndgeFlowNode[];
|
|
22
|
+
edges: REndgeFlowEdge[];
|
|
23
|
+
static createDefault(): REndgeFlow;
|
|
24
|
+
static fromPlain(json: Partial<EndgeFlowDefinition>): REndgeFlow;
|
|
25
|
+
toPlain(): EndgeFlowDefinition;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { DependencyNode } from './DependencyNode';
|
|
2
|
+
/**
|
|
3
|
+
* Представляет связь (ребро) в графе зависимостей между родительским компонентом
|
|
4
|
+
* и дочерним компонентом (или между двумя узлами одного компонента).
|
|
5
|
+
*
|
|
6
|
+
* Эта структура позволяет отследить, как данные из одного узла (переменной, поля)
|
|
7
|
+
* передаются или используются другим узлом (например, входом подкомпонента).
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // Пример 1: Прямая передача переменной из родителя в дочерний компонент
|
|
11
|
+
* const edge: DependencyEdge = {
|
|
12
|
+
* from: parentVarNode, // узел переменной "var1" в родителе
|
|
13
|
+
* to: childVarNode, // узел переменной "var_inner" в подкомпоненте
|
|
14
|
+
* path: new DataPath('$'), // эквивалентная передача без изменений
|
|
15
|
+
* }
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // Пример 2: Передача вложенного значения из объекта
|
|
19
|
+
* const edge: DependencyEdge = {
|
|
20
|
+
* from: parentVarNode, // родительский узел "user"
|
|
21
|
+
* to: childVarNode, // подкомпонентный узел "city"
|
|
22
|
+
* path: new DataPath('address.city'), // путь до вложенного свойства
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* // Пример 3: Передача с переименованием (aliasMap может помочь явно указать соответствие)
|
|
27
|
+
* const edge: DependencyEdge = {
|
|
28
|
+
* from: parentVarNode,
|
|
29
|
+
* to: childVarNode,
|
|
30
|
+
* path: new DataPath('$'),
|
|
31
|
+
* }
|
|
32
|
+
*/
|
|
33
|
+
export interface DependencyEdge {
|
|
34
|
+
/**
|
|
35
|
+
* Информационное имя связи для отладки
|
|
36
|
+
*/
|
|
37
|
+
name?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Узел-источник (родительский узел или переменная),
|
|
40
|
+
* из которого берутся данные для передачи.
|
|
41
|
+
*/
|
|
42
|
+
from: DependencyNode;
|
|
43
|
+
/**
|
|
44
|
+
* Узел-приемник (дочерний узел или вход подкомпонента),
|
|
45
|
+
* который будет использовать переданные данные.
|
|
46
|
+
*/
|
|
47
|
+
to: DependencyNode;
|
|
48
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DependencyNode } from './DependencyNode';
|
|
2
|
+
import { RField } from '../reflect/RField';
|
|
3
|
+
import { DependencyEdge } from './DependencyEdge';
|
|
4
|
+
export declare class DependencyGraph {
|
|
5
|
+
private root;
|
|
6
|
+
private edges;
|
|
7
|
+
private errors;
|
|
8
|
+
private inputFields;
|
|
9
|
+
private exportedNames;
|
|
10
|
+
constructor(inputFields: Record<string, RField>, exportedNames: Set<string>);
|
|
11
|
+
getRoot(): DependencyNode;
|
|
12
|
+
getEdges(): DependencyEdge[];
|
|
13
|
+
getAllErrors(): string[];
|
|
14
|
+
addExpression(expression: string): void;
|
|
15
|
+
private _extractParts;
|
|
16
|
+
private _addPartsChain;
|
|
17
|
+
/**
|
|
18
|
+
* Ищет узел в графе по выражению вида "driver.lastName"
|
|
19
|
+
* (разбивает на части и идёт по дереву)
|
|
20
|
+
*/
|
|
21
|
+
findNodeByPath(expression: string): DependencyNode | undefined;
|
|
22
|
+
findOrCreateNode(name: string, type?: string): DependencyNode;
|
|
23
|
+
findNodeByName(name: string, currentNode?: DependencyNode): DependencyNode | undefined;
|
|
24
|
+
addEdge(edge: DependencyEdge): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { RField } from '../reflect/RField';
|
|
2
|
+
import { DataPath } from '@endge/raph';
|
|
3
|
+
/**
|
|
4
|
+
* Узел зависимости
|
|
5
|
+
*/
|
|
6
|
+
export declare class DependencyNode {
|
|
7
|
+
name: string;
|
|
8
|
+
type: string;
|
|
9
|
+
children: DependencyNode[];
|
|
10
|
+
markers: Set<string>;
|
|
11
|
+
params: Map<string, Set<any>>;
|
|
12
|
+
/**
|
|
13
|
+
* Добавляет дочерний узел в дерево.
|
|
14
|
+
* Если такой уже есть (по name и type), мержит их детей и параметры.
|
|
15
|
+
*/
|
|
16
|
+
addChild(newChild: DependencyNode): void;
|
|
17
|
+
/**
|
|
18
|
+
* Создаёт новый DependencyNode из RField.
|
|
19
|
+
*/
|
|
20
|
+
static fromRField(field: RField): DependencyNode;
|
|
21
|
+
/**
|
|
22
|
+
* Создаёт дерево DependencyNode по dataPath.
|
|
23
|
+
* Обрабатывает параметры (params) и сохраняет их в виде множества.
|
|
24
|
+
*/
|
|
25
|
+
static fromDataPath(dataPath: DataPath, baseType: string, parentNode?: DependencyNode): DependencyNode;
|
|
26
|
+
/**
|
|
27
|
+
* Помечает все узлы, которые соответствуют GraphQL-ответу.
|
|
28
|
+
*/
|
|
29
|
+
markTouchedPaths(currentType: string, marker: string): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { LogRecord } from '../../types/debug/base.types';
|
|
2
|
+
/**
|
|
3
|
+
* Простое in-memory хранилище логов с ограничением по количеству
|
|
4
|
+
* и политикой удаления при переполнении.
|
|
5
|
+
*/
|
|
6
|
+
export declare class MemoryStore {
|
|
7
|
+
private limit;
|
|
8
|
+
private overflowPolicy;
|
|
9
|
+
private records;
|
|
10
|
+
constructor(limit?: number, overflowPolicy?: 'drop-oldest' | 'drop-new');
|
|
11
|
+
/**
|
|
12
|
+
* Добавляет запись в буфер.
|
|
13
|
+
* Если превышен лимит - применяет overflowPolicy:
|
|
14
|
+
* - 'drop-oldest': удаляет первые элементы
|
|
15
|
+
* - 'drop-new': игнорирует новую запись
|
|
16
|
+
*/
|
|
17
|
+
push(record: LogRecord): void;
|
|
18
|
+
/**
|
|
19
|
+
* Возвращает все записи (копию массива).
|
|
20
|
+
*/
|
|
21
|
+
all(): LogRecord[];
|
|
22
|
+
/**
|
|
23
|
+
* Полностью очищает буфер.
|
|
24
|
+
*/
|
|
25
|
+
clear(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Устанавливает новый лимит и политику.
|
|
28
|
+
*/
|
|
29
|
+
setLimit(limit: number, policy?: 'drop-oldest' | 'drop-new'): void;
|
|
30
|
+
/**
|
|
31
|
+
* Текущее количество записей.
|
|
32
|
+
*/
|
|
33
|
+
size(): number;
|
|
34
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LogRecord } from '../../../types/debug/base.types';
|
|
2
|
+
import { LogNode } from '../../../types/debug/tree.types';
|
|
3
|
+
/**
|
|
4
|
+
* Строит дерево:
|
|
5
|
+
* - span_start - создаём SpanNode; если есть parentSpanId - вставляем как ребёнка, иначе в корень
|
|
6
|
+
* - span_end - дополняем соответствующий SpanNode (endTs/durMs)
|
|
7
|
+
* - event - кладём внутрь спана по corr.spanId; если не нашли - в корень (fallback)
|
|
8
|
+
*
|
|
9
|
+
* Никаких Trace-узлов здесь нет - корневыми узлами считаются «root spans»
|
|
10
|
+
* (те, у которых нет corr.parentSpanId).
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildLogTree(records: LogRecord[]): LogNode[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DiagnosticsRecord, DiagnosticsRecordKind } from '../../types/diagnostics.types';
|
|
2
|
+
export declare class DiagnosticsRecordStore {
|
|
3
|
+
private _capacity;
|
|
4
|
+
private _slots;
|
|
5
|
+
private _head;
|
|
6
|
+
private _length;
|
|
7
|
+
private readonly _byId;
|
|
8
|
+
private readonly _traceIndex;
|
|
9
|
+
private readonly _entityIndex;
|
|
10
|
+
private readonly _channelIndex;
|
|
11
|
+
private readonly _recordsByKind;
|
|
12
|
+
private readonly _recordsByChannel;
|
|
13
|
+
constructor(capacity: number);
|
|
14
|
+
get size(): number;
|
|
15
|
+
setCapacity(nextCapacity: number): void;
|
|
16
|
+
append(record: DiagnosticsRecord): DiagnosticsRecord | null;
|
|
17
|
+
clear(): void;
|
|
18
|
+
toArray(limit?: number): DiagnosticsRecord[];
|
|
19
|
+
getById(recordId: number): DiagnosticsRecord | null;
|
|
20
|
+
getByTraceId(traceId: string, limit?: number): DiagnosticsRecord[];
|
|
21
|
+
getByEntity(type: string, id: string, limit?: number): DiagnosticsRecord[];
|
|
22
|
+
getByChannel(channel: string, limit?: number): DiagnosticsRecord[];
|
|
23
|
+
getRecordsByKind(): Partial<Record<DiagnosticsRecordKind, number>>;
|
|
24
|
+
getRecordsByChannel(): Record<string, number>;
|
|
25
|
+
private recordsFromIndex;
|
|
26
|
+
private addIndexes;
|
|
27
|
+
private removeRecord;
|
|
28
|
+
private addToIndex;
|
|
29
|
+
private removeFromIndex;
|
|
30
|
+
private toEntityKey;
|
|
31
|
+
private normalizeChannel;
|
|
32
|
+
private bumpCount;
|
|
33
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DiagnosticsAttrs, DiagnosticsContextRef, DiagnosticsEventOptions, DiagnosticsLevel, DiagnosticsMeasurementOptions, DiagnosticsScopeOptions, DiagnosticsScopeWriter, DiagnosticsSnapshotOptions } from '../../types/diagnostics.types';
|
|
2
|
+
export declare abstract class DiagnosticsScopeHandle {
|
|
3
|
+
protected readonly diagnostics: DiagnosticsScopeWriter;
|
|
4
|
+
protected readonly active: boolean;
|
|
5
|
+
protected readonly traceId: string;
|
|
6
|
+
protected readonly spanId: string | undefined;
|
|
7
|
+
protected readonly channel: string | undefined;
|
|
8
|
+
protected readonly level: DiagnosticsLevel;
|
|
9
|
+
protected readonly startedAt: number;
|
|
10
|
+
protected readonly attrs: DiagnosticsAttrs | undefined;
|
|
11
|
+
protected readonly entities: DiagnosticsScopeOptions['entities'];
|
|
12
|
+
protected readonly context: DiagnosticsContextRef | undefined;
|
|
13
|
+
protected _closed: boolean;
|
|
14
|
+
protected constructor(diagnostics: DiagnosticsScopeWriter, active: boolean, traceId: string, spanId: string | undefined, channel: string | undefined, level: DiagnosticsLevel, startedAt: number, attrs: DiagnosticsAttrs | undefined, entities: DiagnosticsScopeOptions['entities'], context: DiagnosticsContextRef | undefined);
|
|
15
|
+
get isActive(): boolean;
|
|
16
|
+
event(message: string, options?: DiagnosticsEventOptions): void;
|
|
17
|
+
measurement(name: string, value: number, options?: DiagnosticsMeasurementOptions): void;
|
|
18
|
+
snapshot(name: string, options?: DiagnosticsSnapshotOptions): void;
|
|
19
|
+
protected mergeContext(base: DiagnosticsContextRef | undefined, patch: Partial<DiagnosticsContextRef> | undefined): DiagnosticsContextRef | undefined;
|
|
20
|
+
protected normalizeChannel(value: string | undefined): string | undefined;
|
|
21
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DiagnosticsScopeHandle } from './DiagnosticsScopeHandle';
|
|
2
|
+
import { DiagnosticsAttrs, DiagnosticsContextRef, DiagnosticsLevel, DiagnosticsScopeOptions, DiagnosticsSpanOwner } from '../../types/diagnostics.types';
|
|
3
|
+
export declare class DiagnosticsSpan extends DiagnosticsScopeHandle {
|
|
4
|
+
private readonly _name;
|
|
5
|
+
private readonly _parentSpanId;
|
|
6
|
+
constructor(diagnostics: DiagnosticsSpanOwner, active: boolean, traceId: string, spanId: string | undefined, parentSpanId: string | undefined, name: string, channel: string | undefined, level: DiagnosticsLevel, startedAt: number, attrs: DiagnosticsAttrs | undefined, entities: DiagnosticsScopeOptions['entities'], context: DiagnosticsContextRef | undefined);
|
|
7
|
+
span(name: string, options?: DiagnosticsScopeOptions): DiagnosticsSpan;
|
|
8
|
+
end(attrs?: DiagnosticsAttrs): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DiagnosticsScopeHandle } from './DiagnosticsScopeHandle';
|
|
2
|
+
import { DiagnosticsSpan } from './DiagnosticsSpan';
|
|
3
|
+
import { DiagnosticsAttrs, DiagnosticsContextRef, DiagnosticsLevel, DiagnosticsScopeOptions, DiagnosticsTraceOwner } from '../../types/diagnostics.types';
|
|
4
|
+
export declare class DiagnosticsTrace extends DiagnosticsScopeHandle {
|
|
5
|
+
private readonly _name;
|
|
6
|
+
constructor(diagnostics: DiagnosticsTraceOwner, active: boolean, traceId: string, name: string, channel: string | undefined, level: DiagnosticsLevel, startedAt: number, attrs: DiagnosticsAttrs | undefined, entities: DiagnosticsScopeOptions['entities'], context: DiagnosticsContextRef | undefined);
|
|
7
|
+
span(name: string, options?: DiagnosticsScopeOptions): DiagnosticsSpan;
|
|
8
|
+
end(attrs?: DiagnosticsAttrs): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { HttpMethod, RequestOptions, ServiceDescriptor } from '../../types/api.types';
|
|
2
|
+
export declare function makeForm(data: Record<string, unknown>): URLSearchParams;
|
|
3
|
+
/**
|
|
4
|
+
* Лёгкая axios-обёртка: JSON по умолчанию, query/headers/abort, генератор сервисов.
|
|
5
|
+
*/
|
|
6
|
+
export declare class EndgeApi {
|
|
7
|
+
private defaultHeaders;
|
|
8
|
+
private readonly client;
|
|
9
|
+
constructor(baseUrl: string, defaultHeaders?: Record<string, string>);
|
|
10
|
+
/** При необходимости можно динамически добавить/переопределить заголовки по умолчанию */
|
|
11
|
+
setDefaultHeaders(next: Record<string, string>): void;
|
|
12
|
+
/** Базовый метод запроса (axios.request) */
|
|
13
|
+
request<T>(method: HttpMethod, path: string, opts?: RequestOptions): Promise<T>;
|
|
14
|
+
get<T>(path: string, opts?: Omit<RequestOptions, 'body'>): Promise<T>;
|
|
15
|
+
post<T>(path: string, body?: unknown, opts?: Omit<RequestOptions, 'body'>): Promise<T>;
|
|
16
|
+
put<T>(path: string, body?: unknown, opts?: Omit<RequestOptions, 'body'>): Promise<T>;
|
|
17
|
+
patch<T>(path: string, body?: unknown, opts?: Omit<RequestOptions, 'body'>): Promise<T>;
|
|
18
|
+
delete<T>(path: string, opts?: Omit<RequestOptions, 'body'>): Promise<T>;
|
|
19
|
+
/**
|
|
20
|
+
* Генератор сервиса: по декларации возвращает объект с методами-эндпоинтами.
|
|
21
|
+
*/
|
|
22
|
+
service<T extends Record<string, any>>(descriptor: ServiceDescriptor): T;
|
|
23
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Базовая оболочка события, которую можно "отменить".
|
|
3
|
+
* Отмена может быть использована эмиттером для stopPropagation.
|
|
4
|
+
*/
|
|
5
|
+
export interface EndgeEventBase<T = unknown> {
|
|
6
|
+
readonly isCanceled: boolean;
|
|
7
|
+
readonly payload: T;
|
|
8
|
+
cancel: () => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Базовый класс события (cancellable envelope).
|
|
12
|
+
*/
|
|
13
|
+
export declare class EndgeEvent<T> implements EndgeEventBase<T> {
|
|
14
|
+
readonly payload: T;
|
|
15
|
+
isCanceled: boolean;
|
|
16
|
+
constructor(payload: T);
|
|
17
|
+
cancel(): void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Опции эмита (для stopPropagation).
|
|
21
|
+
*/
|
|
22
|
+
export interface EndgeEmitOptions {
|
|
23
|
+
/**
|
|
24
|
+
* Если true - прекращает вызов следующих слушателей после cancel().
|
|
25
|
+
*/
|
|
26
|
+
stopOnCancel?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* События ядра (строго типизированные) - подставь свой интерфейс payloads.
|
|
30
|
+
* Например:
|
|
31
|
+
* export interface EndgeEventPayloads { 'app:init': {}; ... }
|
|
32
|
+
*/
|
|
33
|
+
export type EndgeEventPayloads = Record<string, unknown>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export type EndgeFederationModule = object;
|
|
2
|
+
interface EndgeFederationHost {
|
|
3
|
+
isConfigured: boolean;
|
|
4
|
+
isSetup: boolean;
|
|
5
|
+
isInitialized: boolean;
|
|
6
|
+
isHydrating: boolean;
|
|
7
|
+
initPromise: Promise<void> | null;
|
|
8
|
+
modules: Map<string, EndgeFederationModule>;
|
|
9
|
+
state: Map<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Общая статическая федерация модулей.
|
|
13
|
+
* Хост федерации живёт в `globalThis`, поэтому один и тот же класс
|
|
14
|
+
* остаётся singleton даже при загрузке из разных пакетов/бандлов.
|
|
15
|
+
*/
|
|
16
|
+
export declare abstract class EndgeFederation {
|
|
17
|
+
protected static readonly federationId: string;
|
|
18
|
+
protected static readonly storageKey: string | null;
|
|
19
|
+
private static readonly REGISTRY_KEY;
|
|
20
|
+
static get isInitialized(): boolean;
|
|
21
|
+
static get isLoadingFromStorage(): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Хук для одноразовой регистрации модулей в порядке вызова.
|
|
24
|
+
*/
|
|
25
|
+
protected static configureFederation(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Регистрирует модуль в федерации.
|
|
28
|
+
* Порядок регистрации определяет дальнейший порядок `setup/init/reset`.
|
|
29
|
+
*/
|
|
30
|
+
static registerModule<T extends EndgeFederationModule>(key: string, module: T): T;
|
|
31
|
+
/**
|
|
32
|
+
* Выполняет `setup()` для всех модулей один раз до первого `init()`.
|
|
33
|
+
*/
|
|
34
|
+
static setup(): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Общий guard для одноразовой инициализации федерации.
|
|
37
|
+
*/
|
|
38
|
+
protected static runInitialization(task: () => Promise<void>): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Выполняет `init()` для всех зарегистрированных модулей.
|
|
41
|
+
*/
|
|
42
|
+
protected static initModules(): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Выполняет `reset()` у всех модулей и сбрасывает состояние федерации.
|
|
45
|
+
*/
|
|
46
|
+
protected static resetModules(): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Сохраняет сериализуемое состояние всех модулей в storage федерации.
|
|
49
|
+
*/
|
|
50
|
+
static saveToStorage(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Восстанавливает состояние модулей из storage федерации.
|
|
53
|
+
*/
|
|
54
|
+
static loadFromStorage(): Record<string, unknown>;
|
|
55
|
+
protected static getModule<T>(key: string): T;
|
|
56
|
+
protected static getState<T>(key: string, factory: () => T): T;
|
|
57
|
+
protected static setState<T>(key: string, value: T): T;
|
|
58
|
+
protected static get host(): EndgeFederationHost;
|
|
59
|
+
private static runLifecycle;
|
|
60
|
+
private static getFederationId;
|
|
61
|
+
private static createHost;
|
|
62
|
+
private static registry;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Subscribable } from '@endge/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Базовый модуль федерации.
|
|
4
|
+
* Все модули являются `Subscribable` и при необходимости могут уведомлять подписчиков через `notify()`.
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class EndgeModule extends Subscribable {
|
|
7
|
+
/**
|
|
8
|
+
* Подготавливает модуль к работе до основного `init()`.
|
|
9
|
+
* Используется для одноразовой настройки зависимостей, подписок и runtime-структур.
|
|
10
|
+
* Метод можно не переопределять.
|
|
11
|
+
*/
|
|
12
|
+
setup(): void | Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Инициализирует модуль после `setup()` и после восстановления состояния федерации из storage.
|
|
15
|
+
* Основная загрузка данных и запуск runtime-логики должны происходить здесь.
|
|
16
|
+
* Метод можно не переопределять.
|
|
17
|
+
*/
|
|
18
|
+
init(): void | Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Сбрасывает runtime-состояние модуля.
|
|
21
|
+
* После `reset()` федерация может быть повторно инициализирована тем же набором модулей.
|
|
22
|
+
* Метод можно не переопределять.
|
|
23
|
+
*/
|
|
24
|
+
reset(): void | Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Возвращает сериализуемый snapshot модуля для сохранения федерацией.
|
|
27
|
+
* Если модулю нечего сохранять, можно вернуть `undefined` или не переопределять метод.
|
|
28
|
+
*/
|
|
29
|
+
serialize(): unknown;
|
|
30
|
+
/**
|
|
31
|
+
* Восстанавливает состояние модуля из snapshot, полученного из storage федерации.
|
|
32
|
+
* `undefined` означает отсутствие сохранённого состояния и должен обрабатываться как дефолтный сценарий.
|
|
33
|
+
* Метод можно не переопределять.
|
|
34
|
+
*/
|
|
35
|
+
deserialize(_payload: unknown): void;
|
|
36
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class EndgeModuleController {
|
|
2
|
+
/** Зарегистрированные подмодули: ключ -> модуль */
|
|
3
|
+
private _modules;
|
|
4
|
+
/** Флаг инициализации контроллера */
|
|
5
|
+
private _isInitialized;
|
|
6
|
+
/**
|
|
7
|
+
* Регистрирует подмодуль
|
|
8
|
+
*/
|
|
9
|
+
registerModule(key: string, module: any): void;
|
|
10
|
+
/**
|
|
11
|
+
* Инициализация всех модулей
|
|
12
|
+
*/
|
|
13
|
+
init(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Сброс состояния всех модулей
|
|
16
|
+
*/
|
|
17
|
+
reset(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VoidFunction } from '@endge/utils';
|
|
2
|
+
export declare class EndgeSlotRegistry<T extends {
|
|
3
|
+
id?: string;
|
|
4
|
+
}> {
|
|
5
|
+
private items;
|
|
6
|
+
private byId;
|
|
7
|
+
private listeners;
|
|
8
|
+
add(item: T): VoidFunction;
|
|
9
|
+
remove(item: T): void;
|
|
10
|
+
list(): readonly T[];
|
|
11
|
+
get(id: string): T | undefined;
|
|
12
|
+
subscribe(cb: () => void): VoidFunction;
|
|
13
|
+
private emit;
|
|
14
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ActionCompiledFlow, ActionDefinition, ActionStepHandler, FlowValidationIssue } from '../../types/action.types';
|
|
2
|
+
import { DuplicateOptions, REntity } from './REntity';
|
|
3
|
+
import { RField } from './RField';
|
|
4
|
+
/**
|
|
5
|
+
* Действие хранится как flow-описание.
|
|
6
|
+
* Атомарное действие = flow из одного шага.
|
|
7
|
+
*/
|
|
8
|
+
export declare class RAction extends REntity {
|
|
9
|
+
definition: ActionDefinition;
|
|
10
|
+
input: RField | null;
|
|
11
|
+
output: RField | null;
|
|
12
|
+
private readonly stepHandlers;
|
|
13
|
+
private _compiledFlow;
|
|
14
|
+
setStepHandler(runtimeId: string, fn: ActionStepHandler | undefined): void;
|
|
15
|
+
getStepHandler(runtimeId: string): ActionStepHandler | undefined;
|
|
16
|
+
hasStepHandler(runtimeId: string): boolean;
|
|
17
|
+
clearStepHandlers(): void;
|
|
18
|
+
private _normalizeDefinition;
|
|
19
|
+
private _buildCompiledFlow;
|
|
20
|
+
private _validateFlow;
|
|
21
|
+
private _fieldToPlain;
|
|
22
|
+
get compiledFlow(): ActionCompiledFlow | null;
|
|
23
|
+
getValidationIssues(): FlowValidationIssue[];
|
|
24
|
+
validate(): FlowValidationIssue[];
|
|
25
|
+
getCompiledRuntimeNodeId(runtimeId: string): string | null;
|
|
26
|
+
compile(): void;
|
|
27
|
+
run(): void;
|
|
28
|
+
toPlain(): Record<string, unknown>;
|
|
29
|
+
duplicate(options: DuplicateOptions): RAction;
|
|
30
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EndgeBindingMode } from '../../types/resolve.types';
|
|
2
|
+
import { REntity } from './REntity';
|
|
3
|
+
/** Сущность биндинга поведения (коллекция behavior-bindings). */
|
|
4
|
+
export declare class RBehaviorBinding extends REntity {
|
|
5
|
+
projectId: number | null;
|
|
6
|
+
ownerType: string;
|
|
7
|
+
ownerId: number | null;
|
|
8
|
+
targetType: string;
|
|
9
|
+
targetId: number | null;
|
|
10
|
+
eventName: string;
|
|
11
|
+
scriptRef: string;
|
|
12
|
+
mode: EndgeBindingMode;
|
|
13
|
+
priority: number;
|
|
14
|
+
isEnabled: boolean;
|
|
15
|
+
environmentId: number | null;
|
|
16
|
+
isInherited: boolean;
|
|
17
|
+
originBindingId: number | null;
|
|
18
|
+
toPlain(): Record<string, unknown>;
|
|
19
|
+
}
|