@ecopages/core 0.2.0-beta.26 → 0.2.0-beta.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +98 -74
- package/src/adapters/bun/server-adapter.js +2 -2
- package/src/adapters/node/server-adapter.js +2 -2
- package/src/adapters/shared/hmr-entrypoint-registrar.d.ts +10 -0
- package/src/adapters/shared/hmr-entrypoint-registrar.js +34 -10
- package/src/adapters/shared/runtime-server-lifecycle.js +1 -1
- package/src/adapters/shared/server-static-builder.d.ts +2 -1
- package/src/adapters/shared/server-static-builder.js +16 -14
- package/src/adapters/shared/shared-hmr-manager.d.ts +11 -4
- package/src/adapters/shared/shared-hmr-manager.js +22 -3
- package/src/build/README.md +92 -46
- package/src/build/app-build-manifest-runtime.d.ts +28 -2
- package/src/build/app-build-manifest-runtime.js +26 -10
- package/src/build/{browser-runtime-plugin.d.ts → browser/browser-runtime-plugin.d.ts} +1 -1
- package/src/build/{browser-runtime-plugin.js → browser/browser-runtime-plugin.js} +1 -1
- package/src/build/{jsx-ownership-plugins.d.ts → browser/jsx-ownership-plugins.d.ts} +2 -2
- package/src/build/{jsx-ownership-plugins.js → browser/jsx-ownership-plugins.js} +2 -2
- package/src/build/build-adapter.d.ts +18 -21
- package/src/build/build-adapter.js +8 -43
- package/src/build/{build-input-fingerprint.d.ts → cache/build-input-fingerprint.d.ts} +3 -3
- package/src/build/cache/cache-constants.d.ts +4 -0
- package/src/build/cache/cache-constants.js +6 -0
- package/src/build/cache/cache-keys.d.ts +22 -0
- package/src/build/cache/cache-keys.js +63 -0
- package/src/build/{dev-browser-script-cache.d.ts → cache/dev-browser-script-cache.d.ts} +2 -2
- package/src/build/{dev-browser-script-cache.js → cache/dev-browser-script-cache.js} +4 -4
- package/src/build/{pages-unified-graph-build.d.ts → cache/pages-unified-graph-build.d.ts} +1 -1
- package/src/build/{pages-unified-graph-build.js → cache/pages-unified-graph-build.js} +18 -26
- package/src/build/{production-build-cache.d.ts → cache/production-build-cache.d.ts} +1 -1
- package/src/build/{production-build-cache.js → cache/production-build-cache.js} +2 -2
- package/src/build/{server-entry-build-cache.d.ts → cache/server-entry-build-cache.d.ts} +3 -4
- package/src/build/{server-entry-build-cache.js → cache/server-entry-build-cache.js} +16 -12
- package/src/build/{build-contracts.d.ts → contracts/build-contracts.d.ts} +1 -2
- package/src/build/contracts/build-manifest.d.ts +90 -0
- package/src/build/{build-manifest.js → contracts/build-manifest.js} +2 -2
- package/src/build/{rolldown-adapter-helpers.d.ts → rolldown/rolldown-adapter-helpers.d.ts} +20 -3
- package/src/build/{rolldown-adapter-helpers.js → rolldown/rolldown-adapter-helpers.js} +26 -6
- package/src/build/{rolldown-build-adapter.d.ts → rolldown/rolldown-build-adapter.d.ts} +1 -1
- package/src/build/{rolldown-plugin-bridge.d.ts → rolldown/rolldown-plugin-bridge.d.ts} +2 -2
- package/src/build/{rolldown-plugin-bridge.js → rolldown/rolldown-plugin-bridge.js} +1 -1
- package/src/build/{rolldown-source-transform-pass.d.ts → rolldown/rolldown-source-transform-pass.d.ts} +1 -1
- package/src/build/{rolldown-source-transform-pass.js → rolldown/rolldown-source-transform-pass.js} +4 -1
- package/src/build/{runtime-build-output-normalizer.js → rolldown/runtime-build-output-normalizer.js} +2 -2
- package/src/build/{build-profile-options.d.ts → runtime/build-profile-options.d.ts} +2 -2
- package/src/build/runtime/build-request-identity.d.ts +17 -0
- package/src/build/runtime/build-request-identity.js +54 -0
- package/src/build/runtime/build-request-policy.d.ts +59 -0
- package/src/build/runtime/build-request-policy.js +46 -0
- package/src/build/{build-runtime.d.ts → runtime/build-runtime.d.ts} +8 -4
- package/src/build/{build-runtime.js → runtime/build-runtime.js} +11 -11
- package/src/build/{deduping-build-executor.d.ts → runtime/deduping-build-executor.d.ts} +2 -9
- package/src/build/runtime/deduping-build-executor.js +34 -0
- package/src/build/{parallel-build-executor.d.ts → runtime/parallel-build-executor.d.ts} +1 -1
- package/src/build/{serialized-build-executor.d.ts → runtime/serialized-build-executor.d.ts} +1 -1
- package/src/config/config-builder.d.ts +1 -1
- package/src/diagnostics/startup-trace.d.ts +49 -2
- package/src/diagnostics/startup-trace.js +140 -8
- package/src/eco/eco.js +2 -2
- package/src/eco/eco.utils.d.ts +1 -1
- package/src/eco/eco.utils.js +1 -1
- package/src/hmr/client/hmr-runtime.js +2 -2
- package/src/hmr/hmr-file-change-prep.d.ts +10 -0
- package/src/hmr/hmr-file-change-prep.js +17 -0
- package/src/plugins/alias-resolver-plugin.d.ts +1 -1
- package/src/plugins/eco-component-meta-plugin.d.ts +1 -1
- package/src/plugins/foreign-jsx-override-plugin.d.ts +1 -1
- package/src/plugins/integration-plugin.d.ts +16 -5
- package/src/plugins/integration-plugin.js +11 -1
- package/src/plugins/processor.d.ts +36 -8
- package/src/plugins/source-transform.d.ts +1 -1
- package/src/route-renderer/GRAPH.md +22 -28
- package/src/route-renderer/README.md +12 -7
- package/src/route-renderer/orchestration/{document-shell-render.service.d.ts → document-shell/document-shell-render.service.d.ts} +19 -2
- package/src/route-renderer/orchestration/{document-shell-render.service.js → document-shell/document-shell-render.service.js} +28 -0
- package/src/route-renderer/orchestration/{layout-shell-props.service.d.ts → document-shell/layout-shell-props.service.d.ts} +1 -1
- package/src/route-renderer/orchestration/{component-render-context.d.ts → foreign-child/component-render-context.d.ts} +5 -5
- package/src/route-renderer/orchestration/{component-render-context.js → foreign-child/component-render-context.js} +1 -1
- package/src/route-renderer/orchestration/{render-output.utils.d.ts → foreign-child/foreign-child-output.utils.d.ts} +15 -7
- package/src/route-renderer/orchestration/{render-output.utils.js → foreign-child/foreign-child-output.utils.js} +31 -26
- package/src/route-renderer/orchestration/{foreign-subtree-execution.service.d.ts → foreign-child/foreign-subtree-execution.service.d.ts} +5 -5
- package/src/route-renderer/orchestration/{foreign-subtree-execution.service.js → foreign-child/foreign-subtree-execution.service.js} +7 -3
- package/src/route-renderer/orchestration/foreign-child/owning-renderer-resolution.d.ts +19 -0
- package/src/route-renderer/orchestration/foreign-child/owning-renderer-resolution.js +35 -0
- package/src/route-renderer/orchestration/integration-renderer.d.ts +14 -97
- package/src/route-renderer/orchestration/integration-renderer.js +90 -247
- package/src/route-renderer/orchestration/integration-renderer.test-fixtures.d.ts +75 -0
- package/src/route-renderer/orchestration/integration-renderer.test-fixtures.js +177 -0
- package/src/route-renderer/orchestration/{component-graph-collectors.d.ts → ownership-graph/component-graph-collectors.d.ts} +4 -4
- package/src/route-renderer/orchestration/{component-graph-collectors.js → ownership-graph/component-graph-collectors.js} +1 -1
- package/src/route-renderer/orchestration/{component-graph.d.ts → ownership-graph/component-graph.d.ts} +1 -3
- package/src/route-renderer/orchestration/{component-graph.js → ownership-graph/component-graph.js} +0 -2
- package/src/route-renderer/orchestration/{ownership-validation.service.d.ts → ownership-graph/ownership-validation.service.d.ts} +2 -2
- package/src/route-renderer/orchestration/{ownership-validation.service.js → ownership-graph/ownership-validation.service.js} +3 -4
- package/src/route-renderer/orchestration/{global-injector-assets.service.d.ts → page-browser-graph/global-injector-assets.service.d.ts} +3 -3
- package/src/route-renderer/orchestration/{global-injector-assets.service.js → page-browser-graph/global-injector-assets.service.js} +2 -2
- package/src/route-renderer/orchestration/{page-browser-graph-contribution.loader.d.ts → page-browser-graph/page-browser-graph-contribution.loader.d.ts} +1 -1
- package/src/route-renderer/orchestration/page-browser-graph/page-browser-graph-merge.utils.d.ts +12 -0
- package/src/route-renderer/orchestration/page-browser-graph/page-browser-graph-merge.utils.js +29 -0
- package/src/route-renderer/orchestration/page-browser-graph/page-browser-graph-session.d.ts +106 -0
- package/src/route-renderer/orchestration/page-browser-graph/page-browser-graph-session.js +436 -0
- package/src/route-renderer/orchestration/{page-browser-graph.service.d.ts → page-browser-graph/page-browser-graph.service.d.ts} +12 -6
- package/src/route-renderer/orchestration/{page-browser-graph.service.js → page-browser-graph/page-browser-graph.service.js} +91 -42
- package/src/route-renderer/orchestration/{processed-asset-dedupe.d.ts → page-browser-graph/processed-asset-dedupe.d.ts} +1 -1
- package/src/route-renderer/orchestration/{integration-route-render-adapter.d.ts → route-pipeline/integration-route-render-adapter.d.ts} +3 -10
- package/src/route-renderer/orchestration/{integration-route-render-adapter.js → route-pipeline/integration-route-render-adapter.js} +1 -3
- package/src/route-renderer/orchestration/route-pipeline/marker-artifact.utils.d.ts +6 -0
- package/src/route-renderer/orchestration/route-pipeline/marker-artifact.utils.js +27 -0
- package/src/route-renderer/orchestration/{route-html-finalization.service.d.ts → route-pipeline/route-html-finalization.service.d.ts} +2 -3
- package/src/route-renderer/orchestration/route-pipeline/route-html-finalization.service.js +21 -0
- package/src/route-renderer/orchestration/{route-prepared-options.builder.d.ts → route-pipeline/route-prepared-options.builder.d.ts} +3 -4
- package/src/route-renderer/orchestration/{route-prepared-options.builder.js → route-pipeline/route-prepared-options.builder.js} +3 -12
- package/src/route-renderer/orchestration/{route-prepared-options.utils.js → route-pipeline/route-prepared-options.utils.js} +1 -1
- package/src/route-renderer/orchestration/{route-render-orchestrator.d.ts → route-pipeline/route-render-orchestrator.d.ts} +8 -17
- package/src/route-renderer/orchestration/{route-render-orchestrator.js → route-pipeline/route-render-orchestrator.js} +12 -19
- package/src/route-renderer/orchestration/string-markup-renderer.js +1 -1
- package/src/services/assets/asset-processing-service/asset-processing.service.js +1 -1
- package/src/services/assets/asset-processing-service/assets.types.d.ts +1 -1
- package/src/services/assets/asset-processing-service/browser-runtime-asset.factory.d.ts +1 -1
- package/src/services/assets/asset-processing-service/processors/base/base-script-processor.d.ts +0 -2
- package/src/services/assets/asset-processing-service/processors/base/base-script-processor.js +2 -15
- package/src/services/assets/asset-processing-service/processors/script/content-script.processor.js +1 -1
- package/src/services/assets/browser-bundle.service.d.ts +27 -31
- package/src/services/assets/browser-bundle.service.js +12 -23
- package/src/services/html/html-transformer.service.js +1 -1
- package/src/services/invalidation/development-invalidation.service.d.ts +5 -0
- package/src/services/invalidation/development-invalidation.service.js +8 -9
- package/src/services/module-loading/app-server-module-transpiler.service.d.ts +8 -0
- package/src/services/module-loading/app-server-module-transpiler.service.js +1 -7
- package/src/services/module-loading/page-module-import.service.d.ts +1 -1
- package/src/services/module-loading/page-module-import.service.js +40 -28
- package/src/services/module-loading/route-module-build-cache.store.js +1 -1
- package/src/services/module-loading/route-module-build-manifest.d.ts +2 -9
- package/src/services/module-loading/route-module-build-manifest.js +12 -43
- package/src/services/module-loading/server-module-transpiler.service.d.ts +1 -1
- package/src/static-site-generator/README.md +1 -1
- package/src/static-site-generator/production-page-browser-graph-prebuild.d.ts +28 -0
- package/src/static-site-generator/production-page-browser-graph-prebuild.js +22 -0
- package/src/static-site-generator/static-build-invalidation.d.ts +2 -2
- package/src/static-site-generator/static-build-invalidation.js +3 -3
- package/src/static-site-generator/static-site-generator.js +23 -1
- package/src/types/internal-types.d.ts +10 -4
- package/src/types/public-types.d.ts +59 -10
- package/src/watchers/project-watcher.d.ts +3 -3
- package/src/watchers/project-watcher.js +15 -5
- package/src/build/build-manifest.d.ts +0 -33
- package/src/build/deduping-build-executor.js +0 -56
- package/src/build/runtime-build-executor.d.ts +0 -14
- package/src/build/runtime-build-executor.js +0 -16
- package/src/route-renderer/orchestration/declared-ownership-graph.d.ts +0 -1
- package/src/route-renderer/orchestration/declared-ownership-graph.js +0 -8
- package/src/route-renderer/orchestration/route-html-finalization.service.js +0 -26
- package/src/route-renderer/orchestration/template-serialization.d.ts +0 -38
- package/src/route-renderer/orchestration/template-serialization.js +0 -45
- /package/src/build/{browser-runtime-manifest.d.ts → browser/browser-runtime-manifest.d.ts} +0 -0
- /package/src/build/{browser-runtime-manifest.js → browser/browser-runtime-manifest.js} +0 -0
- /package/src/build/{browser-runtime-plugin-helpers.d.ts → browser/browser-runtime-plugin-helpers.d.ts} +0 -0
- /package/src/build/{browser-runtime-plugin-helpers.js → browser/browser-runtime-plugin-helpers.js} +0 -0
- /package/src/build/{lit-static-render-worker-context.d.ts → browser/lit-static-render-worker-context.d.ts} +0 -0
- /package/src/build/{lit-static-render-worker-context.js → browser/lit-static-render-worker-context.js} +0 -0
- /package/src/build/{build-input-fingerprint.js → cache/build-input-fingerprint.js} +0 -0
- /package/src/build/{build-contracts.js → contracts/build-contracts.js} +0 -0
- /package/src/build/{build-types.d.ts → contracts/build-types.d.ts} +0 -0
- /package/src/build/{build-types.js → contracts/build-types.js} +0 -0
- /package/src/build/{rolldown-build-adapter.js → rolldown/rolldown-build-adapter.js} +0 -0
- /package/src/build/{rolldown-build-invocation-metrics.d.ts → rolldown/rolldown-build-invocation-metrics.d.ts} +0 -0
- /package/src/build/{rolldown-build-invocation-metrics.js → rolldown/rolldown-build-invocation-metrics.js} +0 -0
- /package/src/build/{runtime-build-output-normalizer.d.ts → rolldown/runtime-build-output-normalizer.d.ts} +0 -0
- /package/src/build/{server-side-css-shim-plugin.d.ts → rolldown/server-side-css-shim-plugin.d.ts} +0 -0
- /package/src/build/{server-side-css-shim-plugin.js → rolldown/server-side-css-shim-plugin.js} +0 -0
- /package/src/build/{build-profile-options.js → runtime/build-profile-options.js} +0 -0
- /package/src/build/{parallel-build-executor.js → runtime/parallel-build-executor.js} +0 -0
- /package/src/build/{serialized-build-executor.js → runtime/serialized-build-executor.js} +0 -0
- /package/src/route-renderer/orchestration/{layout-shell-props.service.js → document-shell/layout-shell-props.service.js} +0 -0
- /package/src/route-renderer/orchestration/{page-browser-graph-contribution.loader.js → page-browser-graph/page-browser-graph-contribution.loader.js} +0 -0
- /package/src/route-renderer/orchestration/{processed-asset-dedupe.js → page-browser-graph/processed-asset-dedupe.js} +0 -0
- /package/src/route-renderer/orchestration/{route-prepared-options.utils.d.ts → route-pipeline/route-prepared-options.utils.d.ts} +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { IntegrationRenderer, type HtmlDocumentContribution, type RenderToResponseContext } from './integration-renderer.js';
|
|
2
|
+
import { getComponentRenderContext, type ForeignChildRuntime } from './foreign-child/component-render-context.js';
|
|
3
|
+
import type { EcoPagesAppConfig } from '../../types/internal-types.js';
|
|
4
|
+
import type { AssetProcessingService, ProcessedAsset } from '../../services/assets/asset-processing-service/index.js';
|
|
5
|
+
import type { ComponentRenderInput, ComponentRenderResult, EcoPagesElement, IntegrationRendererRenderOptions, EcoPageFile, RouteRendererBody, RouteRendererOptions, EcoComponent, HtmlTemplateProps } from '../../types/public-types.js';
|
|
6
|
+
import type { PagePackageResult } from '../../types/public-types.js';
|
|
7
|
+
export declare function createUnresolvedMarkerArtifact(nodeId: string, componentRef: string, propsRef: string): string;
|
|
8
|
+
export declare function createMockIntegrationPlugin(plugin: {
|
|
9
|
+
name: string;
|
|
10
|
+
} & Record<string, unknown>): EcoPagesAppConfig['integrations'][number];
|
|
11
|
+
export declare const testAppConfig: EcoPagesAppConfig;
|
|
12
|
+
export declare const testAssetService: AssetProcessingService;
|
|
13
|
+
/**
|
|
14
|
+
* Concrete implementation with ed file loading for testing purposes.
|
|
15
|
+
*/
|
|
16
|
+
export declare class TestIntegrationRenderer extends IntegrationRenderer<EcoPagesElement> {
|
|
17
|
+
name: string;
|
|
18
|
+
ForeignChildRuntimeCreationCount: number;
|
|
19
|
+
ForeignChildRenderCount: number;
|
|
20
|
+
UseFailFastForeignChildRuntime: boolean;
|
|
21
|
+
PageModule: EcoPageFile | null;
|
|
22
|
+
HtmlTemplate: EcoComponent<HtmlTemplateProps> | null;
|
|
23
|
+
RenderedBody: RouteRendererBody;
|
|
24
|
+
RenderBodyFactory: ((context: ReturnType<typeof getComponentRenderContext>) => RouteRendererBody | Promise<RouteRendererBody>) | null;
|
|
25
|
+
MockComponentRenderResult: ComponentRenderResult | null;
|
|
26
|
+
ImportedFiles: string[];
|
|
27
|
+
HtmlContributions: HtmlDocumentContribution[];
|
|
28
|
+
render(_options: IntegrationRendererRenderOptions<EcoPagesElement>): Promise<RouteRendererBody>;
|
|
29
|
+
renderComponent(_input: ComponentRenderInput): Promise<ComponentRenderResult>;
|
|
30
|
+
renderComponentWithForeignChildren(input: ComponentRenderInput): Promise<ComponentRenderResult>;
|
|
31
|
+
renderToResponse<P>(view: EcoComponent<P>, props: P, ctx: RenderToResponseContext): Promise<Response>;
|
|
32
|
+
protected importPageFile(_file: string): Promise<EcoPageFile>;
|
|
33
|
+
protected getHtmlTemplate(): Promise<EcoComponent<HtmlTemplateProps>>;
|
|
34
|
+
protected resolveDependencies(_components: (EcoComponent | Partial<EcoComponent>)[]): Promise<ProcessedAsset[]>;
|
|
35
|
+
testPrepareRenderOptions(options: RouteRendererOptions): Promise<IntegrationRendererRenderOptions<EcoPagesElement>>;
|
|
36
|
+
testShouldDelegateForeignChild(input: {
|
|
37
|
+
currentIntegration: string;
|
|
38
|
+
targetIntegration?: string;
|
|
39
|
+
}): boolean;
|
|
40
|
+
testHasForeignChildDescendants(component: EcoComponent): boolean;
|
|
41
|
+
testGetHtmlTemplate(): Promise<import("../../index.browser.js").EcoFunctionComponent<HtmlTemplateProps<EcoPagesElement>, any>>;
|
|
42
|
+
testBaseGetHtmlTemplate(): Promise<import("../../index.browser.js").EcoFunctionComponent<HtmlTemplateProps<EcoPagesElement>, any>>;
|
|
43
|
+
testGetRendererBootstrapDependencies(partial?: boolean): ProcessedAsset[];
|
|
44
|
+
testFinalizeDocumentShellHtml(options: {
|
|
45
|
+
html: string;
|
|
46
|
+
partial?: boolean;
|
|
47
|
+
htmlContributions?: HtmlDocumentContribution[];
|
|
48
|
+
}): Promise<string>;
|
|
49
|
+
testTransformRouteResponse(response: Response, htmlContributions?: HtmlDocumentContribution[], pagePackage?: PagePackageResult): Promise<RouteRendererBody>;
|
|
50
|
+
appendTestProcessedDependencies(assets: ProcessedAsset[]): ProcessedAsset[];
|
|
51
|
+
setTestPagePackage(pagePackage: PagePackageResult): void;
|
|
52
|
+
getTestPagePackage(): PagePackageResult | undefined;
|
|
53
|
+
getTestProcessedDependencies(): ProcessedAsset[];
|
|
54
|
+
testRenderPartialViewResponse<P>(input: {
|
|
55
|
+
view: EcoComponent<P>;
|
|
56
|
+
props: P;
|
|
57
|
+
ctx?: RenderToResponseContext;
|
|
58
|
+
renderInline?: () => Promise<BodyInit>;
|
|
59
|
+
transformHtml?: (html: string) => string;
|
|
60
|
+
}): Promise<Response>;
|
|
61
|
+
testRenderViewWithDocumentShell<P>(input: {
|
|
62
|
+
view: EcoComponent<P>;
|
|
63
|
+
props: P;
|
|
64
|
+
ctx?: RenderToResponseContext;
|
|
65
|
+
layout?: EcoComponent;
|
|
66
|
+
}): Promise<Response>;
|
|
67
|
+
testRenderForeignSubtree(input: ComponentRenderInput): Promise<import("../../index.browser.js").ForeignSubtreeRenderPayload>;
|
|
68
|
+
protected createForeignChildRuntime(options: {
|
|
69
|
+
renderInput: ComponentRenderInput;
|
|
70
|
+
rendererCache: Map<string, IntegrationRenderer<any>>;
|
|
71
|
+
}): ForeignChildRuntime;
|
|
72
|
+
protected getHtmlDocumentContributions(_options?: {
|
|
73
|
+
partial?: boolean;
|
|
74
|
+
}): HtmlDocumentContribution[] | undefined;
|
|
75
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { vi } from "vitest";
|
|
2
|
+
import { resolveInnermostPageLayout } from "./document-shell/layout-shell-props.service.js";
|
|
3
|
+
import { finalizeDocumentShellHtml } from "./document-shell/document-shell-render.service.js";
|
|
4
|
+
import {
|
|
5
|
+
IntegrationRenderer
|
|
6
|
+
} from "./integration-renderer.js";
|
|
7
|
+
import { getComponentRenderContext } from "./foreign-child/component-render-context.js";
|
|
8
|
+
import { toForeignSubtreeRenderPayload } from "./foreign-child/foreign-subtree-execution.service.js";
|
|
9
|
+
function createUnresolvedMarkerArtifact(nodeId, componentRef, propsRef) {
|
|
10
|
+
return `<eco-marker data-eco-node-id="${nodeId}" data-eco-component-ref="${componentRef}" data-eco-props-ref="${propsRef}"></eco-marker>`;
|
|
11
|
+
}
|
|
12
|
+
function createMockIntegrationPlugin(plugin) {
|
|
13
|
+
return {
|
|
14
|
+
setConfig: vi.fn(),
|
|
15
|
+
setRuntimeOrigin: vi.fn(),
|
|
16
|
+
setup: vi.fn(async () => {
|
|
17
|
+
}),
|
|
18
|
+
...plugin
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const testAppConfig = {
|
|
22
|
+
absolutePaths: {
|
|
23
|
+
pagesDir: "/app/pages",
|
|
24
|
+
htmlTemplatePath: "/app/index.ghtml.ts"
|
|
25
|
+
},
|
|
26
|
+
integrations: [],
|
|
27
|
+
defaultMetadata: {
|
|
28
|
+
title: "Default Title",
|
|
29
|
+
description: "Default Description"
|
|
30
|
+
},
|
|
31
|
+
srcDir: "/app"
|
|
32
|
+
};
|
|
33
|
+
const testAssetService = {
|
|
34
|
+
processDependencies: vi.fn(() => Promise.resolve([]))
|
|
35
|
+
};
|
|
36
|
+
class TestIntegrationRenderer extends IntegrationRenderer {
|
|
37
|
+
name = "test-renderer";
|
|
38
|
+
ForeignChildRuntimeCreationCount = 0;
|
|
39
|
+
ForeignChildRenderCount = 0;
|
|
40
|
+
UseFailFastForeignChildRuntime = false;
|
|
41
|
+
PageModule = null;
|
|
42
|
+
HtmlTemplate = null;
|
|
43
|
+
RenderedBody = "<html><body>Test Page</body></html>";
|
|
44
|
+
RenderBodyFactory = null;
|
|
45
|
+
MockComponentRenderResult = null;
|
|
46
|
+
ImportedFiles = [];
|
|
47
|
+
HtmlContributions = [];
|
|
48
|
+
async render(_options) {
|
|
49
|
+
if (this.RenderBodyFactory) {
|
|
50
|
+
return await this.RenderBodyFactory(getComponentRenderContext());
|
|
51
|
+
}
|
|
52
|
+
return this.RenderedBody;
|
|
53
|
+
}
|
|
54
|
+
async renderComponent(_input) {
|
|
55
|
+
if (this.MockComponentRenderResult) {
|
|
56
|
+
return this.MockComponentRenderResult;
|
|
57
|
+
}
|
|
58
|
+
return super.renderComponent(_input);
|
|
59
|
+
}
|
|
60
|
+
async renderComponentWithForeignChildren(input) {
|
|
61
|
+
this.ForeignChildRenderCount += 1;
|
|
62
|
+
return await super.renderComponentWithForeignChildren(input);
|
|
63
|
+
}
|
|
64
|
+
async renderToResponse(view, props, ctx) {
|
|
65
|
+
const viewFn = view;
|
|
66
|
+
const content = viewFn(props);
|
|
67
|
+
let body;
|
|
68
|
+
if (ctx.partial) {
|
|
69
|
+
body = content;
|
|
70
|
+
} else {
|
|
71
|
+
const Layout = resolveInnermostPageLayout(view.config?.layouts);
|
|
72
|
+
const children = Layout ? Layout({ children: content }) : content;
|
|
73
|
+
body = `<!DOCTYPE html><html><body>${children}</body></html>`;
|
|
74
|
+
}
|
|
75
|
+
const headers = new Headers({ "Content-Type": "text/html; charset=utf-8" });
|
|
76
|
+
if (ctx.headers) {
|
|
77
|
+
for (const [key, value] of Object.entries(ctx.headers)) {
|
|
78
|
+
headers.set(key, value);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return new Response(body, {
|
|
82
|
+
status: ctx.status ?? 200,
|
|
83
|
+
headers
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
async importPageFile(_file) {
|
|
87
|
+
this.ImportedFiles.push(_file);
|
|
88
|
+
if (!this.PageModule) throw new Error("Mock page module not set");
|
|
89
|
+
return this.PageModule;
|
|
90
|
+
}
|
|
91
|
+
async getHtmlTemplate() {
|
|
92
|
+
if (!this.HtmlTemplate) throw new Error("Mock HTML template not set");
|
|
93
|
+
return this.HtmlTemplate;
|
|
94
|
+
}
|
|
95
|
+
async resolveDependencies(_components) {
|
|
96
|
+
return [];
|
|
97
|
+
}
|
|
98
|
+
async testPrepareRenderOptions(options) {
|
|
99
|
+
return this.prepareRenderOptions(options);
|
|
100
|
+
}
|
|
101
|
+
testShouldDelegateForeignChild(input) {
|
|
102
|
+
return this.foreignSubtreeExecutionService.shouldDelegateForeignChild(input);
|
|
103
|
+
}
|
|
104
|
+
testHasForeignChildDescendants(component) {
|
|
105
|
+
return this.hasForeignChildDescendants(component);
|
|
106
|
+
}
|
|
107
|
+
async testGetHtmlTemplate() {
|
|
108
|
+
return this.getHtmlTemplate();
|
|
109
|
+
}
|
|
110
|
+
async testBaseGetHtmlTemplate() {
|
|
111
|
+
return super.getHtmlTemplate();
|
|
112
|
+
}
|
|
113
|
+
testGetRendererBootstrapDependencies(partial = false) {
|
|
114
|
+
return this.getRendererBootstrapDependencies(partial);
|
|
115
|
+
}
|
|
116
|
+
async testFinalizeDocumentShellHtml(options) {
|
|
117
|
+
this.appendProcessedDependencies(this.getRendererBootstrapDependencies(options.partial));
|
|
118
|
+
return finalizeDocumentShellHtml(this.htmlTransformer, {
|
|
119
|
+
html: options.html,
|
|
120
|
+
partial: options.partial,
|
|
121
|
+
htmlContributions: options.htmlContributions ?? this.getHtmlDocumentContributions({ partial: options.partial ?? false })
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
async testTransformRouteResponse(response, htmlContributions, pagePackage) {
|
|
125
|
+
const adapter = this.createRouteRenderOrchestratorAdapter();
|
|
126
|
+
return adapter.transformRouteResponse(response, htmlContributions, pagePackage);
|
|
127
|
+
}
|
|
128
|
+
appendTestProcessedDependencies(assets) {
|
|
129
|
+
return this.appendProcessedDependencies(assets);
|
|
130
|
+
}
|
|
131
|
+
setTestPagePackage(pagePackage) {
|
|
132
|
+
this.htmlTransformer.setPagePackage(pagePackage);
|
|
133
|
+
}
|
|
134
|
+
getTestPagePackage() {
|
|
135
|
+
return this.htmlTransformer.getPagePackage();
|
|
136
|
+
}
|
|
137
|
+
getTestProcessedDependencies() {
|
|
138
|
+
return this.htmlTransformer.getProcessedDependencies();
|
|
139
|
+
}
|
|
140
|
+
async testRenderPartialViewResponse(input) {
|
|
141
|
+
return this.renderPartialViewResponse({
|
|
142
|
+
view: input.view,
|
|
143
|
+
props: input.props,
|
|
144
|
+
ctx: input.ctx ?? { partial: true },
|
|
145
|
+
renderInline: input.renderInline,
|
|
146
|
+
transformHtml: input.transformHtml
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
async testRenderViewWithDocumentShell(input) {
|
|
150
|
+
return this.renderViewWithDocumentShell({
|
|
151
|
+
view: input.view,
|
|
152
|
+
props: input.props,
|
|
153
|
+
ctx: input.ctx ?? {},
|
|
154
|
+
layout: input.layout
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
async testRenderForeignSubtree(input) {
|
|
158
|
+
return toForeignSubtreeRenderPayload(await this.renderComponentWithForeignChildren(input));
|
|
159
|
+
}
|
|
160
|
+
createForeignChildRuntime(options) {
|
|
161
|
+
this.ForeignChildRuntimeCreationCount += 1;
|
|
162
|
+
if (this.UseFailFastForeignChildRuntime) {
|
|
163
|
+
return this.createFailFastForeignChildRuntime();
|
|
164
|
+
}
|
|
165
|
+
return super.createForeignChildRuntime(options);
|
|
166
|
+
}
|
|
167
|
+
getHtmlDocumentContributions(_options) {
|
|
168
|
+
return this.HtmlContributions;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
export {
|
|
172
|
+
TestIntegrationRenderer,
|
|
173
|
+
createMockIntegrationPlugin,
|
|
174
|
+
createUnresolvedMarkerArtifact,
|
|
175
|
+
testAppConfig,
|
|
176
|
+
testAssetService
|
|
177
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { EcoPagesAppConfig } from '
|
|
2
|
-
import type { EcoComponent, ResolvedLazyTrigger } from '
|
|
3
|
-
import type { AssetDefinition } from '
|
|
4
|
-
import type { AssetProcessingService, ProcessedAsset } from '
|
|
1
|
+
import type { EcoPagesAppConfig } from '../../../types/internal-types.js';
|
|
2
|
+
import type { EcoComponent, ResolvedLazyTrigger } from '../../../types/public-types.js';
|
|
3
|
+
import type { AssetDefinition } from '../../../services/assets/asset-processing-service/index.js';
|
|
4
|
+
import type { AssetProcessingService, ProcessedAsset } from '../../../services/assets/asset-processing-service/index.js';
|
|
5
5
|
export declare function collectIntegrationNamesFromGraph(components: (EcoComponent | Partial<EcoComponent>)[], currentIntegrationName: string): Set<string>;
|
|
6
6
|
export declare function collectResolvedLazyTriggersFromGraph(components: (EcoComponent | Partial<EcoComponent>)[], currentIntegrationName: string): ResolvedLazyTrigger[];
|
|
7
7
|
export declare function hasForeignChildDescendantsInGraph(component: EcoComponent, currentIntegrationName: string): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { AssetFactory } from "
|
|
2
|
+
import { AssetFactory } from "../../../services/assets/asset-processing-service/index.js";
|
|
3
3
|
import { walkComponentGraph } from "./component-graph.js";
|
|
4
4
|
function toGraphRoots(components) {
|
|
5
5
|
return components.filter(Boolean).map((component) => ({ component }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EcoComponent, OwnershipPlanNodeSource } from '
|
|
1
|
+
import type { EcoComponent, OwnershipPlanNodeSource } from '../../../types/public-types.js';
|
|
2
2
|
export type DeclaredOwnershipRoot = {
|
|
3
3
|
component: EcoComponent;
|
|
4
4
|
source: Extract<OwnershipPlanNodeSource, 'page' | 'layout' | 'html-template'>;
|
|
@@ -32,5 +32,3 @@ export declare function mapComponentGraph<T>(input: {
|
|
|
32
32
|
currentIntegrationName: string;
|
|
33
33
|
mapNode: (node: DeclaredOwnershipNodeInput, children: T[]) => T;
|
|
34
34
|
}): T[];
|
|
35
|
-
/** @deprecated Use `mapComponentGraph` from `component-graph.ts`. */
|
|
36
|
-
export declare const mapDeclaredOwnershipGraph: typeof mapComponentGraph;
|
package/src/route-renderer/orchestration/{component-graph.js → ownership-graph/component-graph.js}
RENAMED
|
@@ -90,9 +90,7 @@ function mapComponentGraph(input) {
|
|
|
90
90
|
({ component, source }) => mapComponent(component, source, input.currentIntegrationName, /* @__PURE__ */ new Set())
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
|
-
const mapDeclaredOwnershipGraph = mapComponentGraph;
|
|
94
93
|
export {
|
|
95
94
|
mapComponentGraph,
|
|
96
|
-
mapDeclaredOwnershipGraph,
|
|
97
95
|
walkComponentGraph
|
|
98
96
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { EcoPagesAppConfig } from '
|
|
2
|
-
import type { OwnershipPlanNodeSource, OwnershipValidationError, EcoComponent } from '
|
|
1
|
+
import type { EcoPagesAppConfig } from '../../../types/internal-types.js';
|
|
2
|
+
import type { OwnershipPlanNodeSource, OwnershipValidationError, EcoComponent } from '../../../types/public-types.js';
|
|
3
3
|
type OwnershipValidationInput = {
|
|
4
4
|
currentIntegrationName: string;
|
|
5
5
|
roots: Array<{
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { assertEcoDeclaredComponent } from "
|
|
2
|
-
import {
|
|
3
|
-
import { walkComponentGraph } from "./component-graph.js";
|
|
1
|
+
import { assertEcoDeclaredComponent } from "../../../eco/eco-declared-component.js";
|
|
2
|
+
import { mapComponentGraph, walkComponentGraph } from "./component-graph.js";
|
|
4
3
|
class OwnershipValidationService {
|
|
5
4
|
appConfig;
|
|
6
5
|
/**
|
|
@@ -14,7 +13,7 @@ class OwnershipValidationService {
|
|
|
14
13
|
*/
|
|
15
14
|
validate(input) {
|
|
16
15
|
this.assertDeclaredComponentDependencies(input);
|
|
17
|
-
return
|
|
16
|
+
return mapComponentGraph({
|
|
18
17
|
roots: input.roots,
|
|
19
18
|
currentIntegrationName: input.currentIntegrationName,
|
|
20
19
|
mapNode: ({ component, integrationName, componentId, isForeignToParent }, children) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { EcoPagesAppConfig } from '
|
|
2
|
-
import type { ResolvedLazyTrigger } from '
|
|
3
|
-
import { type AssetProcessingService, type ProcessedAsset } from '
|
|
1
|
+
import type { EcoPagesAppConfig } from '../../../types/internal-types.js';
|
|
2
|
+
import type { ResolvedLazyTrigger } from '../../../types/public-types.js';
|
|
3
|
+
import { type AssetProcessingService, type ProcessedAsset } from '../../../services/assets/asset-processing-service/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Builds processed global-injector map and bootstrap assets for resolved lazy triggers.
|
|
6
6
|
*/
|
|
@@ -2,8 +2,8 @@ import { createRequire } from "node:module";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import {
|
|
4
4
|
AssetFactory
|
|
5
|
-
} from "
|
|
6
|
-
import { buildGlobalInjectorBootstrapContent, buildGlobalInjectorMapScript } from "
|
|
5
|
+
} from "../../../services/assets/asset-processing-service/index.js";
|
|
6
|
+
import { buildGlobalInjectorBootstrapContent, buildGlobalInjectorMapScript } from "../../../eco/global-injector-map.js";
|
|
7
7
|
async function buildGlobalInjectorAssets(appConfig, assetProcessingService, triggers, currentIntegrationName) {
|
|
8
8
|
const appProjectDir = appConfig.rootDir ?? appConfig.absolutePaths?.projectDir ?? process.cwd();
|
|
9
9
|
const appPackageRequire = createRequire(path.join(appProjectDir, "package.json"));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EcoPageFile, PageBrowserGraphContribution, PageBrowserGraphContributionContext } from '
|
|
1
|
+
import type { EcoPageFile, PageBrowserGraphContribution, PageBrowserGraphContributionContext } from '../../../types/public-types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Loads a page module once and collects declarative browser-graph requirements.
|
|
4
4
|
*
|
package/src/route-renderer/orchestration/page-browser-graph/page-browser-graph-merge.utils.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ProcessedAsset } from '../../../services/assets/asset-processing-service/index.js';
|
|
2
|
+
import type { PageBrowserGraphResult, PagePackageResult } from '../../../types/public-types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Merges a page browser graph into an existing page package (or processed dependencies).
|
|
5
|
+
*
|
|
6
|
+
* Deduplicates entry/chunk assets against the existing package and rebuilds the
|
|
7
|
+
* package so downstream HTML finalization sees one canonical graph.
|
|
8
|
+
*/
|
|
9
|
+
export declare function mergePageBrowserGraph(currentPagePackage: PagePackageResult | undefined, processedDependencies: ProcessedAsset[], pageBrowserGraph: PageBrowserGraphResult): {
|
|
10
|
+
pagePackage: PagePackageResult;
|
|
11
|
+
mergedGraph: PageBrowserGraphResult;
|
|
12
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createPagePackage } from "../../../services/assets/asset-processing-service/index.js";
|
|
2
|
+
import { buildProcessedAssetDedupeKey, dedupeProcessedAssets } from "./processed-asset-dedupe.js";
|
|
3
|
+
function mergePageBrowserGraph(currentPagePackage, processedDependencies, pageBrowserGraph) {
|
|
4
|
+
const mergedGraph = currentPagePackage?.pageBrowserGraph ? {
|
|
5
|
+
entryAssets: dedupeProcessedAssets([
|
|
6
|
+
...currentPagePackage.pageBrowserGraph.entryAssets,
|
|
7
|
+
...pageBrowserGraph.entryAssets
|
|
8
|
+
]),
|
|
9
|
+
chunkAssets: dedupeProcessedAssets([
|
|
10
|
+
...currentPagePackage.pageBrowserGraph.chunkAssets,
|
|
11
|
+
...pageBrowserGraph.chunkAssets
|
|
12
|
+
])
|
|
13
|
+
} : pageBrowserGraph;
|
|
14
|
+
const pageBrowserGraphAssetKeys = new Set(
|
|
15
|
+
[...mergedGraph.entryAssets, ...mergedGraph.chunkAssets].map((asset) => buildProcessedAssetDedupeKey(asset))
|
|
16
|
+
);
|
|
17
|
+
const baseAssets = currentPagePackage ? currentPagePackage.assets.filter(
|
|
18
|
+
(asset) => !pageBrowserGraphAssetKeys.has(buildProcessedAssetDedupeKey(asset))
|
|
19
|
+
) : processedDependencies;
|
|
20
|
+
return {
|
|
21
|
+
pagePackage: createPagePackage(dedupeProcessedAssets(baseAssets), {
|
|
22
|
+
pageBrowserGraph: mergedGraph
|
|
23
|
+
}),
|
|
24
|
+
mergedGraph
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
mergePageBrowserGraph
|
|
29
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { EcoPagesAppConfig } from '../../../types/internal-types.js';
|
|
2
|
+
import type { PageBrowserGraphContribution, PageBrowserGraphResult } from '../../../types/public-types.js';
|
|
3
|
+
import type { ProcessedAsset } from '../../../services/assets/asset-processing-service/assets.types.js';
|
|
4
|
+
export type GraphPolicy = 'development' | 'production';
|
|
5
|
+
export type GraphKey = {
|
|
6
|
+
integrationName: string;
|
|
7
|
+
routeFile: string;
|
|
8
|
+
entryFingerprint: string;
|
|
9
|
+
policy: GraphPolicy;
|
|
10
|
+
};
|
|
11
|
+
export type GraphRecord = {
|
|
12
|
+
key: GraphKey;
|
|
13
|
+
result: PageBrowserGraphResult;
|
|
14
|
+
dependencyPaths: ReadonlySet<string>;
|
|
15
|
+
committedAt: number;
|
|
16
|
+
generation: number;
|
|
17
|
+
};
|
|
18
|
+
export type GraphBuildResult = {
|
|
19
|
+
result: PageBrowserGraphResult;
|
|
20
|
+
dependencyPaths: ReadonlySet<string>;
|
|
21
|
+
};
|
|
22
|
+
type GroupedGraphRecord = {
|
|
23
|
+
assetsByRoute: Map<string, ProcessedAsset[]>;
|
|
24
|
+
dependencyPaths: ReadonlySet<string>;
|
|
25
|
+
generation: number;
|
|
26
|
+
};
|
|
27
|
+
export type GroupedGraphBuildOutcome = GroupedGraphRecord | {
|
|
28
|
+
skipCache: true;
|
|
29
|
+
assetsByRoute: Map<string, ProcessedAsset[]>;
|
|
30
|
+
dependencyPaths: ReadonlySet<string>;
|
|
31
|
+
};
|
|
32
|
+
export type AffectedGraphIdentity = {
|
|
33
|
+
integrationName: string;
|
|
34
|
+
routeFile: string;
|
|
35
|
+
policy: GraphPolicy;
|
|
36
|
+
entryFingerprint: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Reverse index from dependency paths to graph cache keys.
|
|
40
|
+
*/
|
|
41
|
+
export declare class GraphDependencyIndex {
|
|
42
|
+
private readonly dependencyToGraphKeys;
|
|
43
|
+
bindRecord(record: GraphRecord): void;
|
|
44
|
+
unbindRecord(record: GraphRecord): void;
|
|
45
|
+
bindGroupedRecord(integrationName: string, record: GroupedGraphRecord): void;
|
|
46
|
+
unbindGroupedRecord(integrationName: string, record: GroupedGraphRecord): void;
|
|
47
|
+
getAffectedKeys(filePath: string): Set<string>;
|
|
48
|
+
resetForTests(): void;
|
|
49
|
+
private addDependencyBinding;
|
|
50
|
+
private removeDependencyBinding;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Session-local Page Browser Graph cache with precise dependency invalidation.
|
|
54
|
+
*/
|
|
55
|
+
export declare class SessionPageBrowserGraphCache {
|
|
56
|
+
private readonly records;
|
|
57
|
+
private readonly inFlight;
|
|
58
|
+
private readonly groupedRecords;
|
|
59
|
+
private readonly groupedInFlight;
|
|
60
|
+
private readonly dependencyIndex;
|
|
61
|
+
private readonly graphGenerations;
|
|
62
|
+
private readonly groupedGenerations;
|
|
63
|
+
private buildCount;
|
|
64
|
+
getGraphByRoute(integrationName: string, routeFile: string, policy: GraphPolicy): PageBrowserGraphResult | undefined;
|
|
65
|
+
getBuildCount(): number;
|
|
66
|
+
getAffectedGraphIdentities(filePath: string): AffectedGraphIdentity[];
|
|
67
|
+
resolveGraph(key: GraphKey, build: () => Promise<GraphBuildResult | undefined>): Promise<PageBrowserGraphResult | undefined>;
|
|
68
|
+
resolveGroupedGraph(integrationName: string, build: () => Promise<GroupedGraphBuildOutcome | undefined>): Promise<Map<string, ProcessedAsset[]>>;
|
|
69
|
+
peekGroupedGraph(integrationName: string): Map<string, ProcessedAsset[]> | undefined;
|
|
70
|
+
invalidateByFilePath(filePath: string): number;
|
|
71
|
+
invalidateRoute(integrationName: string, routeFile: string): void;
|
|
72
|
+
invalidateByRouteFile(routeFile: string): void;
|
|
73
|
+
resetForTests(): void;
|
|
74
|
+
exportRecords(policy: GraphPolicy): GraphRecord[];
|
|
75
|
+
clearPolicyRecords(policy: GraphPolicy): void;
|
|
76
|
+
private pruneStaleRouteRecords;
|
|
77
|
+
private bumpGraphGeneration;
|
|
78
|
+
private bumpGroupedGeneration;
|
|
79
|
+
private invalidateSerializedGraphKey;
|
|
80
|
+
private invalidateGroupedRecord;
|
|
81
|
+
private runGraphBuild;
|
|
82
|
+
private runGroupedBuild;
|
|
83
|
+
private canCommitGraphBuild;
|
|
84
|
+
private canCommitGroupedBuild;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Returns the session graph cache for one app instance.
|
|
88
|
+
*/
|
|
89
|
+
export declare function getAppPageBrowserGraphSession(appConfig: EcoPagesAppConfig): SessionPageBrowserGraphCache;
|
|
90
|
+
/**
|
|
91
|
+
* Invalidates graph records that depend on the changed file path.
|
|
92
|
+
*/
|
|
93
|
+
export declare function invalidatePageBrowserGraphSession(appConfig: EcoPagesAppConfig, filePath: string): number;
|
|
94
|
+
/**
|
|
95
|
+
* Returns graph identities affected by a source file change.
|
|
96
|
+
*/
|
|
97
|
+
export declare function getAffectedPageBrowserGraphIdentities(appConfig: EcoPagesAppConfig, filePath: string): AffectedGraphIdentity[];
|
|
98
|
+
/**
|
|
99
|
+
* Builds a stable fingerprint from declared browser-entry dependencies and assets.
|
|
100
|
+
*/
|
|
101
|
+
export declare function createPageBrowserGraphEntryFingerprint(contribution: PageBrowserGraphContribution): string;
|
|
102
|
+
/**
|
|
103
|
+
* Collects dependency paths used for graph invalidation.
|
|
104
|
+
*/
|
|
105
|
+
export declare function collectPageBrowserGraphDependencyPaths(routeFile: string, contribution: PageBrowserGraphContribution, processedAssets: ProcessedAsset[]): ReadonlySet<string>;
|
|
106
|
+
export {};
|