@ecopages/core 0.2.0-beta.3 → 0.2.0-beta.30
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 +38 -9
- package/package.json +241 -30
- package/src/adapters/README.md +6 -2
- package/src/adapters/abstract/application-adapter.d.ts +123 -6
- package/src/adapters/abstract/application-adapter.js +151 -1
- package/src/adapters/abstract/segment-path-matcher.d.ts +6 -0
- package/src/adapters/abstract/segment-path-matcher.js +149 -0
- package/src/adapters/abstract/server-adapter.d.ts +16 -2
- package/src/adapters/abstract/ws-pattern-matcher.d.ts +12 -0
- package/src/adapters/abstract/ws-pattern-matcher.js +30 -0
- package/src/adapters/bun/bun-user-websocket-lifecycle.d.ts +22 -0
- package/src/adapters/bun/bun-user-websocket-lifecycle.js +96 -0
- package/src/adapters/bun/client-bridge.d.ts +1 -0
- package/src/adapters/bun/client-bridge.js +3 -0
- package/src/adapters/bun/create-app.d.ts +9 -6
- package/src/adapters/bun/create-app.js +76 -45
- package/src/adapters/bun/hmr-manager.d.ts +1 -1
- package/src/adapters/bun/hmr-manager.js +1 -1
- package/src/adapters/bun/index.d.ts +1 -1
- package/src/adapters/bun/index.js +25 -2
- package/src/adapters/bun/runtime-host.d.ts +1 -1
- package/src/adapters/bun/runtime-host.js +1 -1
- package/src/adapters/bun/server-adapter.d.ts +92 -41
- package/src/adapters/bun/server-adapter.js +256 -117
- package/src/adapters/bun/static-preview-host.d.ts +1 -1
- package/src/adapters/bun/static-preview-host.js +25 -20
- package/src/adapters/create-app.d.ts +13 -11
- package/src/adapters/create-app.js +2 -51
- package/src/adapters/index.d.ts +2 -2
- package/src/adapters/index.js +26 -4
- package/src/adapters/node/create-app.d.ts +8 -3
- package/src/adapters/node/create-app.js +61 -13
- package/src/adapters/node/node-client-bridge.d.ts +1 -0
- package/src/adapters/node/node-client-bridge.js +3 -0
- package/src/adapters/node/node-hmr-manager.d.ts +1 -1
- package/src/adapters/node/node-hmr-manager.js +1 -1
- package/src/adapters/node/runtime-host.d.ts +1 -1
- package/src/adapters/node/runtime-host.js +1 -1
- package/src/adapters/node/server-adapter-dependencies.js +4 -0
- package/src/adapters/node/server-adapter.d.ts +64 -23
- package/src/adapters/node/server-adapter.js +169 -142
- package/src/adapters/node/static-content-server.d.ts +1 -0
- package/src/adapters/node/static-content-server.js +10 -2
- package/src/adapters/node/static-preview-host.d.ts +1 -1
- package/src/adapters/node/static-preview-host.js +27 -12
- package/src/adapters/shared/{hmr-entrypoint-registrar.d.ts → hmr/hmr-entrypoint-registrar.d.ts} +31 -30
- package/src/adapters/shared/hmr/hmr-entrypoint-registrar.js +106 -0
- package/src/adapters/shared/{hmr-html-response.d.ts → hmr/hmr-html-response.d.ts} +2 -2
- package/src/adapters/shared/{hmr-html-response.js → hmr/hmr-html-response.js} +4 -1
- package/src/adapters/shared/hmr/shared-hmr-manager.d.ts +101 -0
- package/src/adapters/shared/hmr/shared-hmr-manager.js +432 -0
- package/src/adapters/shared/http/api-request-pipeline.d.ts +23 -0
- package/src/adapters/shared/http/api-request-pipeline.js +129 -0
- package/src/adapters/shared/{api-response.d.ts → http/api-response.d.ts} +1 -1
- package/src/adapters/shared/{api-response.js → http/api-response.js} +6 -23
- package/src/adapters/shared/http/create-body-response.d.ts +12 -0
- package/src/adapters/shared/http/create-body-response.js +23 -0
- package/src/adapters/shared/http/define-api-handler.d.ts +90 -0
- package/src/adapters/shared/http/define-api-handler.js +63 -0
- package/src/adapters/shared/{explicit-static-render-preparation.d.ts → http/explicit-static-render-preparation.d.ts} +3 -3
- package/src/adapters/shared/{explicit-static-route-matcher.d.ts → http/explicit-static-route-matcher.d.ts} +3 -9
- package/src/adapters/shared/{explicit-static-route-matcher.js → http/explicit-static-route-matcher.js} +3 -38
- package/src/adapters/shared/{file-route-middleware-pipeline.d.ts → http/file-route-middleware-pipeline.d.ts} +2 -2
- package/src/adapters/shared/{file-route-middleware-pipeline.js → http/file-route-middleware-pipeline.js} +10 -22
- package/src/adapters/shared/{fs-server-response-factory.d.ts → http/fs-server-response-factory.d.ts} +7 -2
- package/src/adapters/shared/{fs-server-response-factory.js → http/fs-server-response-factory.js} +22 -2
- package/src/adapters/shared/{fs-server-response-matcher.d.ts → http/fs-server-response-matcher.d.ts} +25 -5
- package/src/adapters/shared/{fs-server-response-matcher.js → http/fs-server-response-matcher.js} +109 -27
- package/src/adapters/shared/http/run-middleware-chain.d.ts +5 -0
- package/src/adapters/shared/http/run-middleware-chain.js +17 -0
- package/src/adapters/shared/{application-adapter.d.ts → runtime/application-adapter.d.ts} +2 -2
- package/src/adapters/shared/{application-adapter.js → runtime/application-adapter.js} +1 -1
- package/src/adapters/shared/runtime/copy-runtime-public-dir.d.ts +6 -0
- package/src/adapters/shared/runtime/copy-runtime-public-dir.js +24 -0
- package/src/adapters/shared/runtime/port-manager.d.ts +116 -0
- package/src/adapters/shared/runtime/port-manager.js +196 -0
- package/src/adapters/shared/{render-context.d.ts → runtime/render-context.d.ts} +2 -2
- package/src/adapters/shared/{render-context.js → runtime/render-context.js} +8 -17
- package/src/adapters/shared/{runtime-app-bootstrap.d.ts → runtime/runtime-app-bootstrap.d.ts} +4 -3
- package/src/adapters/shared/{runtime-app-bootstrap.js → runtime/runtime-app-bootstrap.js} +4 -7
- package/src/adapters/shared/runtime/runtime-server-lifecycle.d.ts +46 -0
- package/src/adapters/shared/runtime/runtime-server-lifecycle.js +57 -0
- package/src/adapters/shared/{server-adapter.d.ts → runtime/server-adapter.d.ts} +23 -49
- package/src/adapters/shared/runtime/server-adapter.js +226 -0
- package/src/adapters/shared/{server-route-handler.d.ts → runtime/server-route-handler.d.ts} +6 -33
- package/src/adapters/shared/{server-route-handler.js → runtime/server-route-handler.js} +5 -43
- package/src/adapters/shared/{server-static-builder.d.ts → runtime/server-static-builder.d.ts} +27 -35
- package/src/adapters/shared/runtime/server-static-builder.js +191 -0
- package/src/adapters/shared/{static-preview-host.d.ts → runtime/static-preview-host.d.ts} +6 -1
- package/src/adapters/shared/ws/node-http-websocket-upgrades.d.ts +21 -0
- package/src/adapters/shared/ws/node-http-websocket-upgrades.js +100 -0
- package/src/adapters/shared/ws/websocket-lifecycle.d.ts +24 -0
- package/src/adapters/shared/ws/websocket-lifecycle.js +55 -0
- package/src/build/README.md +140 -31
- package/src/build/app-build-manifest-runtime.d.ts +39 -0
- package/src/build/app-build-manifest-runtime.js +124 -0
- 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/browser/jsx-ownership-plugins.d.ts +24 -0
- package/src/build/browser/jsx-ownership-plugins.js +41 -0
- package/src/build/browser/lit-static-render-worker-context.d.ts +2 -0
- package/src/build/browser/lit-static-render-worker-context.js +6 -0
- package/src/build/build-adapter.d.ts +29 -334
- package/src/build/build-adapter.js +32 -133
- package/src/build/cache/build-input-fingerprint.d.ts +28 -0
- package/src/build/cache/build-input-fingerprint.js +31 -0
- 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/cache/dev-browser-script-cache.d.ts +34 -0
- package/src/build/cache/dev-browser-script-cache.js +90 -0
- package/src/build/cache/pages-unified-graph-build.d.ts +31 -0
- package/src/build/cache/pages-unified-graph-build.js +198 -0
- package/src/build/cache/production-build-cache.d.ts +20 -0
- package/src/build/cache/production-build-cache.js +63 -0
- package/src/build/cache/server-entry-build-cache.d.ts +43 -0
- package/src/build/cache/server-entry-build-cache.js +165 -0
- package/src/build/contracts/build-contracts.d.ts +96 -0
- 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/contracts/build-types.js +0 -0
- package/src/build/{rolldown-adapter-helpers.d.ts → rolldown/rolldown-adapter-helpers.d.ts} +23 -9
- package/src/build/{rolldown-adapter-helpers.js → rolldown/rolldown-adapter-helpers.js} +99 -13
- package/src/build/{rolldown-build-adapter.d.ts → rolldown/rolldown-build-adapter.d.ts} +3 -7
- package/src/build/{rolldown-build-adapter.js → rolldown/rolldown-build-adapter.js} +3 -3
- package/src/build/rolldown/rolldown-build-invocation-metrics.d.ts +12 -0
- package/src/build/rolldown/rolldown-build-invocation-metrics.js +43 -0
- package/src/build/{rolldown-plugin-bridge.d.ts → rolldown/rolldown-plugin-bridge.d.ts} +16 -2
- package/src/build/{rolldown-plugin-bridge.js → rolldown/rolldown-plugin-bridge.js} +21 -6
- package/src/build/rolldown/rolldown-source-transform-pass.d.ts +15 -0
- package/src/build/rolldown/rolldown-source-transform-pass.js +61 -0
- package/src/build/rolldown/runtime-build-output-normalizer.d.ts +10 -0
- package/src/build/rolldown/runtime-build-output-normalizer.js +201 -0
- package/src/build/runtime/build-profile-options.d.ts +7 -0
- package/src/build/runtime/build-profile-options.js +37 -0
- 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/runtime/build-runtime.d.ts +28 -0
- package/src/build/runtime/build-runtime.js +65 -0
- package/src/build/runtime/deduping-build-executor.d.ts +21 -0
- package/src/build/runtime/deduping-build-executor.js +34 -0
- package/src/build/runtime/parallel-build-executor.d.ts +21 -0
- package/src/build/runtime/parallel-build-executor.js +52 -0
- package/src/build/{serialized-build-executor.d.ts → runtime/serialized-build-executor.d.ts} +1 -1
- package/src/client/navigation-scripts/classification.d.ts +16 -0
- package/src/client/navigation-scripts/classification.js +41 -0
- package/src/client/navigation-scripts/index.d.ts +3 -0
- package/src/client/navigation-scripts/index.js +23 -0
- package/src/client/navigation-scripts/navigation-scripts.test.browser.js +65 -0
- package/src/client/navigation-scripts/registry.d.ts +11 -0
- package/src/client/navigation-scripts/registry.js +12 -0
- package/src/client/navigation-scripts/rerun-queue.d.ts +37 -0
- package/src/client/navigation-scripts/rerun-queue.js +73 -0
- package/src/client/scroll.d.ts +17 -0
- package/src/client/scroll.js +25 -0
- package/src/client/scroll.test.browser.js +37 -0
- package/src/client/view-transitions.d.ts +16 -0
- package/src/client/view-transitions.js +63 -0
- package/src/config/config-builder.d.ts +25 -10
- package/src/config/config-builder.js +53 -11
- package/src/config/constants.d.ts +1 -0
- package/src/config/constants.js +2 -1
- package/src/dev/client-bridge-registry.d.ts +5 -0
- package/src/dev/client-bridge-registry.js +15 -0
- package/src/dev/dev-client-ownership.d.ts +7 -0
- package/src/dev/dev-client-ownership.js +6 -0
- package/src/dev/hmr-manager-registry.d.ts +8 -0
- package/src/dev/hmr-manager-registry.js +15 -0
- package/src/dev/host-runtime.d.ts +3 -0
- package/src/dev/host-runtime.js +7 -0
- package/src/dev/runtime-server-started-message.d.ts +2 -0
- package/src/dev/runtime-server-started-message.js +6 -0
- package/src/diagnostics/request-build-dedupe.d.ts +18 -0
- package/src/diagnostics/request-build-dedupe.js +33 -0
- package/src/diagnostics/startup-trace.d.ts +72 -0
- package/src/diagnostics/startup-trace.js +253 -0
- package/src/eco/README.md +11 -0
- package/src/eco/eco-declared-component.d.ts +14 -0
- package/src/eco/eco-declared-component.js +16 -0
- package/src/eco/eco.browser.js +5 -6
- package/src/eco/eco.js +7 -8
- package/src/eco/eco.types.d.ts +14 -3
- package/src/eco/eco.utils.d.ts +1 -1
- package/src/eco/eco.utils.js +1 -1
- package/src/eco/page-layout-normalization.d.ts +21 -0
- package/src/eco/page-layout-normalization.js +59 -0
- package/src/env.d.ts +2 -0
- package/src/errors/index.d.ts +1 -0
- package/src/errors/index.js +7 -1
- package/src/errors/undeclared-component-dependency-error.d.ts +11 -0
- package/src/errors/undeclared-component-dependency-error.js +17 -0
- package/src/hmr/client/hmr-runtime.js +7 -4
- package/src/hmr/hmr-entrypoint-output.d.ts +49 -0
- package/src/hmr/hmr-entrypoint-output.js +60 -0
- package/src/hmr/hmr-file-change-prep.d.ts +10 -0
- package/src/hmr/hmr-file-change-prep.js +17 -0
- package/src/hmr/hmr-strategy.d.ts +15 -0
- package/src/hmr/hmr-strategy.js +19 -0
- package/src/hmr/strategies/js-hmr-strategy.d.ts +3 -5
- package/src/hmr/strategies/js-hmr-strategy.js +72 -19
- package/src/hmr/strategies/server-rendered-template-hmr-strategy.d.ts +17 -0
- package/src/hmr/strategies/server-rendered-template-hmr-strategy.js +29 -0
- package/src/index.d.ts +2 -1
- package/src/index.js +28 -2
- package/src/integrations/ghtml/ghtml-renderer.d.ts +2 -6
- package/src/integrations/ghtml/ghtml-renderer.js +2 -51
- package/src/integrations/ghtml/ghtml.plugin.d.ts +3 -16
- package/src/integrations/ghtml/ghtml.plugin.js +7 -14
- package/src/plugins/alias-resolver-cache.d.ts +6 -9
- package/src/plugins/alias-resolver-plugin.d.ts +3 -3
- package/src/plugins/alias-resolver-plugin.js +38 -51
- package/src/plugins/define-integration.d.ts +26 -0
- package/src/plugins/define-integration.js +19 -0
- package/src/plugins/eco-component-meta-plugin.d.ts +1 -1
- package/src/plugins/eco-component-meta-plugin.js +5 -8
- package/src/plugins/foreign-jsx-override-plugin.d.ts +1 -1
- package/src/plugins/foreign-jsx-override-plugin.js +4 -6
- package/src/plugins/integration-plugin.d.ts +43 -14
- package/src/plugins/integration-plugin.js +18 -5
- package/src/plugins/jsx-import-source.utils.d.ts +8 -0
- package/src/plugins/jsx-import-source.utils.js +26 -0
- package/src/plugins/processor.d.ts +61 -12
- package/src/plugins/processor.js +24 -5
- package/src/plugins/source-transform.d.ts +32 -1
- package/src/plugins/source-transform.js +23 -1
- package/src/plugins/tsconfig-import-resolver.d.ts +18 -0
- package/src/plugins/tsconfig-import-resolver.js +159 -0
- package/src/route-renderer/GRAPH.md +26 -32
- package/src/route-renderer/README.md +38 -31
- package/src/route-renderer/orchestration/document-shell/document-shell-render.service.d.ts +107 -0
- package/src/route-renderer/orchestration/document-shell/document-shell-render.service.js +148 -0
- package/src/route-renderer/orchestration/document-shell/layout-shell-props.service.d.ts +20 -0
- package/src/route-renderer/orchestration/document-shell/layout-shell-props.service.js +31 -0
- package/src/route-renderer/orchestration/{component-render-context.d.ts → foreign-child/component-render-context.d.ts} +8 -15
- package/src/route-renderer/orchestration/{component-render-context.js → foreign-child/component-render-context.js} +4 -2
- package/src/route-renderer/orchestration/{render-output.utils.d.ts → foreign-child/foreign-child-output.utils.d.ts} +17 -7
- package/src/route-renderer/orchestration/{render-output.utils.js → foreign-child/foreign-child-output.utils.js} +35 -26
- package/src/route-renderer/orchestration/{foreign-subtree-execution.service.d.ts → foreign-child/foreign-subtree-execution.service.d.ts} +64 -34
- package/src/route-renderer/orchestration/{foreign-subtree-execution.service.js → foreign-child/foreign-subtree-execution.service.js} +170 -37
- 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 +24 -143
- package/src/route-renderer/orchestration/integration-renderer.js +163 -402
- 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/ownership-graph/component-graph-collectors.d.ts +10 -0
- package/src/route-renderer/orchestration/ownership-graph/component-graph-collectors.js +143 -0
- package/src/route-renderer/orchestration/ownership-graph/component-graph.d.ts +34 -0
- package/src/route-renderer/orchestration/ownership-graph/component-graph.js +96 -0
- package/src/route-renderer/orchestration/{ownership-validation.service.d.ts → ownership-graph/ownership-validation.service.d.ts} +7 -2
- package/src/route-renderer/orchestration/{ownership-validation.service.js → ownership-graph/ownership-validation.service.js} +30 -3
- package/src/route-renderer/orchestration/page-browser-graph/global-injector-assets.service.d.ts +7 -0
- package/src/route-renderer/orchestration/page-browser-graph/global-injector-assets.service.js +32 -0
- package/src/route-renderer/orchestration/page-browser-graph/page-browser-graph-contribution.loader.d.ts +9 -0
- package/src/route-renderer/orchestration/page-browser-graph/page-browser-graph-contribution.loader.js +7 -0
- 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/page-browser-graph.service.d.ts +31 -0
- package/src/route-renderer/orchestration/page-browser-graph/page-browser-graph.service.js +229 -0
- 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/route-pipeline/integration-route-render-adapter.d.ts +31 -0
- package/src/route-renderer/orchestration/route-pipeline/integration-route-render-adapter.js +25 -0
- 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-pipeline/robots-meta.contribution.d.ts +15 -0
- package/src/route-renderer/orchestration/route-pipeline/robots-meta.contribution.js +36 -0
- package/src/route-renderer/orchestration/route-pipeline/route-html-finalization.service.d.ts +20 -0
- package/src/route-renderer/orchestration/route-pipeline/route-html-finalization.service.js +24 -0
- package/src/route-renderer/orchestration/route-pipeline/route-prepared-options.builder.d.ts +25 -0
- package/src/route-renderer/orchestration/route-pipeline/route-prepared-options.builder.js +49 -0
- package/src/route-renderer/orchestration/route-pipeline/route-prepared-options.utils.d.ts +4 -0
- package/src/route-renderer/orchestration/route-pipeline/route-prepared-options.utils.js +33 -0
- package/src/route-renderer/orchestration/{route-render-orchestrator.d.ts → route-pipeline/route-render-orchestrator.d.ts} +13 -53
- package/src/route-renderer/orchestration/route-pipeline/route-render-orchestrator.js +162 -0
- package/src/route-renderer/orchestration/string-markup-renderer.d.ts +14 -0
- package/src/route-renderer/orchestration/string-markup-renderer.js +55 -0
- package/src/route-renderer/page-loading/component-dependency-collection.js +5 -2
- package/src/route-renderer/page-loading/ecopages-virtual-imports.d.ts +6 -0
- package/src/route-renderer/page-loading/ecopages-virtual-imports.js +7 -2
- package/src/route-renderer/page-loading/module-declaration-aggregation.js +4 -0
- package/src/router/client/link-intent.d.ts +11 -21
- package/src/router/client/link-intent.js +10 -0
- package/src/router/client/link-intent.test.browser.js +12 -1
- package/src/router/client/link-navigation-policy.d.ts +45 -0
- package/src/router/client/link-navigation-policy.js +101 -0
- package/src/router/client/link-navigation-policy.test.browser.d.ts +1 -0
- package/src/router/client/link-navigation-policy.test.browser.js +92 -0
- package/src/router/client/navigation-coordinator.d.ts +1 -1
- package/src/router/client/navigation-coordinator.js +12 -2
- package/src/services/assets/asset-processing-service/asset-dependency-keys.d.ts +13 -0
- package/src/services/assets/asset-processing-service/asset-dependency-keys.js +3 -0
- package/src/services/assets/asset-processing-service/asset-processing.service.d.ts +6 -1
- package/src/services/assets/asset-processing-service/asset-processing.service.js +44 -5
- 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 +2 -1
- package/src/services/assets/asset-processing-service/browser-runtime-asset.factory.js +1 -0
- package/src/services/assets/asset-processing-service/browser-runtime-entry-resolution.d.ts +52 -0
- package/src/services/assets/asset-processing-service/browser-runtime-entry-resolution.js +78 -0
- package/src/services/assets/asset-processing-service/browser-runtime-entry.factory.d.ts +4 -2
- package/src/services/assets/asset-processing-service/browser-runtime-entry.factory.js +28 -13
- package/src/services/assets/asset-processing-service/finalize-processed-asset.d.ts +3 -0
- package/src/services/assets/asset-processing-service/finalize-processed-asset.js +7 -0
- package/src/services/assets/asset-processing-service/grouped-content-bundles.d.ts +2 -1
- package/src/services/assets/asset-processing-service/grouped-content-bundles.js +38 -12
- package/src/services/assets/asset-processing-service/index.d.ts +2 -0
- package/src/services/assets/asset-processing-service/index.js +2 -0
- package/src/services/assets/asset-processing-service/inline-content-script-body.d.ts +11 -0
- package/src/services/assets/asset-processing-service/inline-content-script-body.js +17 -0
- package/src/services/assets/asset-processing-service/materialize-content-script-asset.d.ts +9 -0
- package/src/services/assets/asset-processing-service/materialize-content-script-asset.js +18 -0
- 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.d.ts +8 -0
- package/src/services/assets/asset-processing-service/processors/script/content-script.processor.js +73 -68
- package/src/services/assets/asset-processing-service/processors/script/file-script.processor.d.ts +0 -1
- package/src/services/assets/asset-processing-service/processors/script/file-script.processor.js +18 -15
- package/src/services/assets/asset-processing-service/processors/script/node-module-script.processor.js +17 -3
- package/src/services/assets/asset-processing-service/processors/stylesheet/content-stylesheet.processor.d.ts +0 -3
- package/src/services/assets/asset-processing-service/processors/stylesheet/content-stylesheet.processor.js +2 -31
- package/src/services/assets/asset-processing-service/processors/stylesheet/file-stylesheet.processor.d.ts +0 -3
- package/src/services/assets/asset-processing-service/processors/stylesheet/file-stylesheet.processor.js +2 -30
- package/src/services/assets/asset-processing-service/processors/stylesheet/stylesheet-processor-pipeline.d.ts +2 -0
- package/src/services/assets/asset-processing-service/processors/stylesheet/stylesheet-processor-pipeline.js +43 -0
- package/src/services/assets/asset-processing-service/resolve-integration-plugin.d.ts +4 -0
- package/src/services/assets/asset-processing-service/resolve-integration-plugin.js +17 -0
- package/src/services/assets/asset-processing-service/ungrouped-dependency-processing.d.ts +0 -1
- package/src/services/assets/asset-processing-service/ungrouped-dependency-processing.js +5 -10
- package/src/services/assets/browser-bundle.service.d.ts +28 -30
- package/src/services/assets/browser-bundle.service.js +28 -19
- package/src/services/html/html-transformer.service.d.ts +1 -1
- package/src/services/html/html-transformer.service.js +5 -5
- package/src/services/invalidation/development-invalidation.service.d.ts +25 -2
- package/src/services/invalidation/development-invalidation.service.js +64 -11
- package/src/services/module-loading/README.md +49 -0
- 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 +3 -21
- package/src/services/module-loading/page-module-import.service.d.ts +6 -2
- package/src/services/module-loading/page-module-import.service.js +110 -47
- package/src/services/module-loading/route-module-build-cache-registry.d.ts +24 -0
- package/src/services/module-loading/route-module-build-cache-registry.js +37 -0
- package/src/services/module-loading/route-module-build-cache.d.ts +4 -0
- package/src/services/module-loading/route-module-build-cache.js +38 -0
- package/src/services/module-loading/route-module-build-cache.store.d.ts +57 -0
- package/src/services/module-loading/route-module-build-cache.store.js +207 -0
- package/src/services/module-loading/route-module-build-manifest.d.ts +54 -0
- package/src/services/module-loading/route-module-build-manifest.js +85 -0
- package/src/services/module-loading/route-module-dependency-hasher.d.ts +81 -0
- package/src/services/module-loading/route-module-dependency-hasher.js +122 -0
- package/src/services/module-loading/server-module-transpiler.service.d.ts +1 -1
- package/src/services/module-loading/server-module-transpiler.service.js +1 -1
- package/src/services/validation/schema-validation-service.d.ts +1 -4
- package/src/services/validation/schema-validation-service.js +12 -13
- package/src/services/validation/standard-schema.types.d.ts +9 -62
- package/src/services/validation/validate-standard-schema.d.ts +7 -0
- package/src/services/validation/validate-standard-schema.js +14 -0
- package/src/static-site-generator/README.md +41 -0
- 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/sitemap-routes.d.ts +14 -0
- package/src/static-site-generator/sitemap-routes.js +31 -0
- package/src/static-site-generator/sitemap.d.ts +15 -0
- package/src/static-site-generator/sitemap.js +33 -0
- package/src/static-site-generator/static-build-invalidation.d.ts +10 -0
- package/src/static-site-generator/static-build-invalidation.js +59 -0
- package/src/static-site-generator/static-export-context.d.ts +30 -0
- package/src/static-site-generator/static-export-context.js +0 -0
- package/src/static-site-generator/static-site-generator.d.ts +43 -25
- package/src/static-site-generator/static-site-generator.js +381 -106
- package/src/types/internal-types.d.ts +39 -13
- package/src/types/public-types.d.ts +289 -52
- package/src/utils/ecopages-route-info.d.ts +26 -0
- package/src/utils/ecopages-route-info.js +26 -0
- package/src/utils/html-escaping.d.ts +7 -0
- package/src/utils/html-escaping.js +5 -1
- package/src/utils/parse-cli-args.d.ts +2 -0
- package/src/utils/parse-cli-args.js +6 -0
- package/src/utils/path-pattern.d.ts +23 -0
- package/src/utils/path-pattern.js +27 -0
- package/src/utils/server-utils.module.d.ts +3 -2
- package/src/utils/server-utils.module.js +5 -6
- package/src/utils/static-file-extensions.d.ts +12 -0
- package/src/utils/static-file-extensions.js +48 -0
- package/src/watchers/project-watcher-ignore.d.ts +11 -0
- package/src/watchers/project-watcher-ignore.js +16 -0
- package/src/watchers/project-watcher.d.ts +29 -6
- package/src/watchers/project-watcher.js +146 -34
- package/src/watchers/project-watcher.test-helpers.js +5 -5
- package/src/adapters/shared/define-api-handler.d.ts +0 -25
- package/src/adapters/shared/define-api-handler.js +0 -15
- package/src/adapters/shared/hmr-entrypoint-registrar.js +0 -87
- package/src/adapters/shared/server-adapter.js +0 -436
- package/src/adapters/shared/server-static-builder.js +0 -162
- package/src/adapters/shared/shared-hmr-manager.d.ts +0 -59
- package/src/adapters/shared/shared-hmr-manager.js +0 -241
- package/src/build/build-manifest.d.ts +0 -33
- package/src/build/rolldown-dev-build-adapter.d.ts +0 -82
- package/src/build/rolldown-dev-build-adapter.js +0 -166
- package/src/build/runtime-build-executor.d.ts +0 -21
- package/src/build/runtime-build-executor.js +0 -19
- package/src/build/runtime-build-output-normalizer.d.ts +0 -3
- package/src/build/runtime-build-output-normalizer.js +0 -111
- package/src/hmr/hmr.postcss.test.e2e.js +0 -31
- package/src/hmr/hmr.test.e2e.js +0 -43
- package/src/route-renderer/orchestration/declared-ownership-graph.d.ts +0 -18
- package/src/route-renderer/orchestration/declared-ownership-graph.js +0 -34
- package/src/route-renderer/orchestration/ownership-planning.service.d.ts +0 -24
- package/src/route-renderer/orchestration/ownership-planning.service.js +0 -63
- package/src/route-renderer/orchestration/queued-foreign-subtree-resolution.service.d.ts +0 -91
- package/src/route-renderer/orchestration/queued-foreign-subtree-resolution.service.js +0 -170
- package/src/route-renderer/orchestration/route-render-orchestrator.js +0 -577
- package/src/route-renderer/orchestration/template-serialization.d.ts +0 -38
- package/src/route-renderer/orchestration/template-serialization.js +0 -45
- /package/src/adapters/shared/{explicit-static-render-preparation.js → http/explicit-static-render-preparation.js} +0 -0
- /package/src/adapters/shared/{runtime-host.d.ts → runtime/runtime-host.d.ts} +0 -0
- /package/src/adapters/shared/{runtime-host.js → runtime/runtime-host.js} +0 -0
- /package/src/adapters/shared/{static-preview-host.js → runtime/static-preview-host.js} +0 -0
- /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/{build-types.js → contracts/build-contracts.js} +0 -0
- /package/src/build/{build-types.d.ts → contracts/build-types.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/{serialized-build-executor.js → runtime/serialized-build-executor.js} +0 -0
- /package/src/{hmr/hmr.postcss.test.e2e.d.ts → client/navigation-scripts/navigation-scripts.test.browser.d.ts} +0 -0
- /package/src/{hmr/hmr.test.e2e.d.ts → client/scroll.test.browser.d.ts} +0 -0
- /package/src/route-renderer/orchestration/{processed-asset-dedupe.js → page-browser-graph/processed-asset-dedupe.js} +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { fileSystem } from "@ecopages/file-system";
|
|
2
|
+
function didBuildInputContributorChange(contributor) {
|
|
3
|
+
return contributor.didChange?.() === true;
|
|
4
|
+
}
|
|
5
|
+
function hashAppConfigFile(appConfig) {
|
|
6
|
+
const configPath = appConfig.absolutePaths?.config;
|
|
7
|
+
if (!configPath || !fileSystem.exists(configPath)) {
|
|
8
|
+
return "missing";
|
|
9
|
+
}
|
|
10
|
+
return fileSystem.hash(configPath);
|
|
11
|
+
}
|
|
12
|
+
function createBuildInputsFingerprint(appConfig) {
|
|
13
|
+
const changedContributors = [
|
|
14
|
+
...Array.from(appConfig.processors?.values() ?? []).filter((processor) => didBuildInputContributorChange(processor)).map((processor) => `processor:${processor.getName()}`),
|
|
15
|
+
...(appConfig.integrations ?? []).filter((integration) => didBuildInputContributorChange(integration)).map((integration) => `integration:${integration.name}`)
|
|
16
|
+
];
|
|
17
|
+
return changedContributors.length > 0 ? changedContributors.sort().join("|") : "stable";
|
|
18
|
+
}
|
|
19
|
+
function haveBuildInputsChanged(appConfig) {
|
|
20
|
+
return createBuildInputsFingerprint(appConfig) !== "stable";
|
|
21
|
+
}
|
|
22
|
+
function collectBuildInputContributors(appConfig) {
|
|
23
|
+
return [...Array.from(appConfig.processors?.values() ?? []), ...appConfig.integrations ?? []];
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
collectBuildInputContributors,
|
|
27
|
+
createBuildInputsFingerprint,
|
|
28
|
+
didBuildInputContributorChange,
|
|
29
|
+
hashAppConfigFile,
|
|
30
|
+
haveBuildInputsChanged
|
|
31
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Filename written beside persisted production build artifacts that store incremental metadata. */
|
|
2
|
+
export declare const ROUTE_MODULE_BUILD_CACHE_FILENAME = ".build-cache.json";
|
|
3
|
+
/** @deprecated Use {@link ROUTE_MODULE_BUILD_CACHE_FILENAME}; server-entry caches share the same filename. */
|
|
4
|
+
export declare const SERVER_ENTRY_BUILD_CACHE_FILENAME = ".build-cache.json";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { EcoBuildPlugin } from '../contracts/build-types.js';
|
|
2
|
+
import type { BuildOptions } from '../contracts/build-contracts.js';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the installed `@ecopages/core` package version for cache invalidation.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getCorePackageVersion(): string;
|
|
7
|
+
/** Stable fingerprint for JSX options used in build and disk cache keys. */
|
|
8
|
+
export declare function createJsxCacheKey(jsx: BuildOptions['jsx']): string;
|
|
9
|
+
/** Stable fingerprint for ordered build plugins. */
|
|
10
|
+
export declare function createPluginCacheKey(plugins?: EcoBuildPlugin[]): string;
|
|
11
|
+
/** Stable fingerprint for ordered source transforms. */
|
|
12
|
+
export declare function createSourceTransformCacheKey(sourceTransforms: BuildOptions['sourceTransforms']): string;
|
|
13
|
+
/**
|
|
14
|
+
* Stable fingerprint of a function body for cache and request identity keys.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Hashes `fn.toString()`. Suitable for in-process and persisted keys that must
|
|
18
|
+
* agree within one install; not stable across minifiers or renames.
|
|
19
|
+
*/
|
|
20
|
+
export declare function hashFunctionIdentity(fn: (...args: never[]) => unknown): string;
|
|
21
|
+
/** @deprecated Use {@link hashFunctionIdentity}. */
|
|
22
|
+
export declare const hashPluginSetup: typeof hashFunctionIdentity;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
let cachedCorePackageVersion;
|
|
3
|
+
function getCorePackageVersion() {
|
|
4
|
+
if (cachedCorePackageVersion) {
|
|
5
|
+
return cachedCorePackageVersion;
|
|
6
|
+
}
|
|
7
|
+
const packageJsonPath = new URL("../../../package.json", import.meta.url);
|
|
8
|
+
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
|
|
9
|
+
cachedCorePackageVersion = packageJson.version ?? "0.0.0";
|
|
10
|
+
return cachedCorePackageVersion;
|
|
11
|
+
}
|
|
12
|
+
function createJsxCacheKey(jsx) {
|
|
13
|
+
if (!jsx) {
|
|
14
|
+
return "jsx:default";
|
|
15
|
+
}
|
|
16
|
+
return JSON.stringify({
|
|
17
|
+
development: jsx.development ?? false,
|
|
18
|
+
factory: jsx.factory ?? null,
|
|
19
|
+
fragment: jsx.fragment ?? null,
|
|
20
|
+
importSource: jsx.importSource ?? null,
|
|
21
|
+
runtime: jsx.runtime ?? null,
|
|
22
|
+
sideEffects: jsx.sideEffects ?? null
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function createPluginCacheKey(plugins) {
|
|
26
|
+
if (!plugins || plugins.length === 0) {
|
|
27
|
+
return "plugins:default";
|
|
28
|
+
}
|
|
29
|
+
return `plugins:${plugins.map((plugin) => `${plugin.name}:${hashFunctionIdentity(plugin.setup)}`).join(",")}`;
|
|
30
|
+
}
|
|
31
|
+
function createSourceTransformCacheKey(sourceTransforms) {
|
|
32
|
+
if (!sourceTransforms || sourceTransforms.length === 0) {
|
|
33
|
+
return "sourceTransforms:default";
|
|
34
|
+
}
|
|
35
|
+
return `sourceTransforms:${sourceTransforms.map((transform) => {
|
|
36
|
+
const filterSource = transform.filter.source;
|
|
37
|
+
const filterFlags = transform.filter.flags;
|
|
38
|
+
return [
|
|
39
|
+
transform.name,
|
|
40
|
+
transform.enforce ?? "default",
|
|
41
|
+
filterSource,
|
|
42
|
+
filterFlags,
|
|
43
|
+
hashFunctionIdentity(transform.transform)
|
|
44
|
+
].join(":");
|
|
45
|
+
}).join(",")}`;
|
|
46
|
+
}
|
|
47
|
+
function hashFunctionIdentity(fn) {
|
|
48
|
+
let hash = 0;
|
|
49
|
+
const source = fn.toString();
|
|
50
|
+
for (let index = 0; index < source.length; index += 1) {
|
|
51
|
+
hash = hash * 31 + source.charCodeAt(index) | 0;
|
|
52
|
+
}
|
|
53
|
+
return (hash >>> 0).toString(36);
|
|
54
|
+
}
|
|
55
|
+
const hashPluginSetup = hashFunctionIdentity;
|
|
56
|
+
export {
|
|
57
|
+
createJsxCacheKey,
|
|
58
|
+
createPluginCacheKey,
|
|
59
|
+
createSourceTransformCacheKey,
|
|
60
|
+
getCorePackageVersion,
|
|
61
|
+
hashFunctionIdentity,
|
|
62
|
+
hashPluginSetup
|
|
63
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { EcoPagesAppConfig } from '../../types/internal-types.js';
|
|
2
|
+
import type { ProcessedAsset } from '../../services/assets/asset-processing-service/assets.types.js';
|
|
3
|
+
export declare const DEV_BROWSER_SCRIPT_CACHE_DIR = ".browser-script-bundles";
|
|
4
|
+
export declare const DEV_BROWSER_SCRIPT_CACHE_FILENAME = ".build-cache.json";
|
|
5
|
+
/** Output path restored from the dev disk cache before dependency metadata is merged. */
|
|
6
|
+
export type DevBrowserScriptCacheHit = {
|
|
7
|
+
filepath: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @remarks
|
|
11
|
+
* Dev asset caching spans three scopes that should not be conflated:
|
|
12
|
+
* - request dedupe (`request-build-dedupe.ts`) — one in-flight build per request key
|
|
13
|
+
* - in-memory service cache (`AssetProcessingService`) — per-process reuse within one dev server
|
|
14
|
+
* - this disk manifest (`.eco/.browser-script-bundles`) — cross-request reuse of content-script bundles
|
|
15
|
+
*
|
|
16
|
+
* Disk entries intentionally store only output file paths. Declarative fields such as
|
|
17
|
+
* `groupedBundle`, `attributes`, and `packageRole` live on the originating
|
|
18
|
+
* `ContentScriptAsset` and are merged via `materializeContentScriptAsset()` on lookup.
|
|
19
|
+
*/
|
|
20
|
+
export interface DevBrowserScriptCacheEntry {
|
|
21
|
+
filepath: string;
|
|
22
|
+
builtAt: number;
|
|
23
|
+
}
|
|
24
|
+
export interface DevBrowserScriptCacheManifest {
|
|
25
|
+
invalidationVersion: string;
|
|
26
|
+
buildInputsFingerprint: string;
|
|
27
|
+
entries: Record<string, DevBrowserScriptCacheEntry>;
|
|
28
|
+
}
|
|
29
|
+
/** Returns whether dev-only cross-request content-script bundle cache is active. */
|
|
30
|
+
export declare function shouldUseDevBrowserScriptCache(): boolean;
|
|
31
|
+
/** Looks up one persisted dev content-script output path by dependency cache key. */
|
|
32
|
+
export declare function getDevBrowserScriptCacheEntry(appConfig: EcoPagesAppConfig, depKey: string): DevBrowserScriptCacheHit | null;
|
|
33
|
+
/** Persists one dev content-script bundle output for cross-request reuse. */
|
|
34
|
+
export declare function setDevBrowserScriptCacheEntry(appConfig: EcoPagesAppConfig, depKey: string, asset: ProcessedAsset): void;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { fileSystem } from "@ecopages/file-system";
|
|
3
|
+
import { getAppBrowserBuildPlugins } from "../build-adapter.js";
|
|
4
|
+
import { createBuildInputsFingerprint, hashAppConfigFile } from "./build-input-fingerprint.js";
|
|
5
|
+
import {
|
|
6
|
+
readProductionCacheManifest,
|
|
7
|
+
writeProductionCacheManifest,
|
|
8
|
+
isProductionCacheManifestCurrent,
|
|
9
|
+
matchesProductionCacheFingerprint
|
|
10
|
+
} from "./production-build-cache.js";
|
|
11
|
+
import { getCorePackageVersion } from "./cache-keys.js";
|
|
12
|
+
import { resolveInternalExecutionDir } from "../../utils/resolve-work-dir.js";
|
|
13
|
+
import { isDevelopmentRuntime } from "../../utils/runtime.js";
|
|
14
|
+
const DEV_BROWSER_SCRIPT_CACHE_DIR = ".browser-script-bundles";
|
|
15
|
+
const DEV_BROWSER_SCRIPT_CACHE_FILENAME = ".build-cache.json";
|
|
16
|
+
function getDevBrowserScriptCacheDir(appConfig) {
|
|
17
|
+
return path.join(resolveInternalExecutionDir(appConfig), DEV_BROWSER_SCRIPT_CACHE_DIR);
|
|
18
|
+
}
|
|
19
|
+
function getDevBrowserScriptCacheManifestPath(appConfig) {
|
|
20
|
+
return path.join(getDevBrowserScriptCacheDir(appConfig), DEV_BROWSER_SCRIPT_CACHE_FILENAME);
|
|
21
|
+
}
|
|
22
|
+
function createBrowserBuildKey(appConfig) {
|
|
23
|
+
try {
|
|
24
|
+
const pluginNames = getAppBrowserBuildPlugins(appConfig).map((plugin) => plugin.name).sort().join("|");
|
|
25
|
+
return pluginNames || "default";
|
|
26
|
+
} catch {
|
|
27
|
+
return "default";
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function createDevBrowserScriptCacheInvalidationVersion(appConfig) {
|
|
31
|
+
return [getCorePackageVersion(), hashAppConfigFile(appConfig), createBrowserBuildKey(appConfig)].join("::");
|
|
32
|
+
}
|
|
33
|
+
function readManifest(appConfig) {
|
|
34
|
+
const manifest = readProductionCacheManifest(
|
|
35
|
+
getDevBrowserScriptCacheManifestPath(appConfig)
|
|
36
|
+
);
|
|
37
|
+
if (!manifest) {
|
|
38
|
+
return void 0;
|
|
39
|
+
}
|
|
40
|
+
const invalidationVersion = createDevBrowserScriptCacheInvalidationVersion(appConfig);
|
|
41
|
+
const buildInputsFingerprint = createBuildInputsFingerprint(appConfig);
|
|
42
|
+
if (!isProductionCacheManifestCurrent(manifest, invalidationVersion) || !matchesProductionCacheFingerprint(manifest, buildInputsFingerprint)) {
|
|
43
|
+
return void 0;
|
|
44
|
+
}
|
|
45
|
+
return manifest;
|
|
46
|
+
}
|
|
47
|
+
function writeManifest(appConfig, manifest) {
|
|
48
|
+
writeProductionCacheManifest(getDevBrowserScriptCacheManifestPath(appConfig), manifest);
|
|
49
|
+
}
|
|
50
|
+
function shouldUseDevBrowserScriptCache() {
|
|
51
|
+
return isDevelopmentRuntime();
|
|
52
|
+
}
|
|
53
|
+
function getDevBrowserScriptCacheEntry(appConfig, depKey) {
|
|
54
|
+
if (!shouldUseDevBrowserScriptCache()) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
const manifest = readManifest(appConfig);
|
|
58
|
+
const entry = manifest?.entries[depKey];
|
|
59
|
+
if (!entry?.filepath || !fileSystem.exists(entry.filepath)) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return { filepath: entry.filepath };
|
|
63
|
+
}
|
|
64
|
+
function setDevBrowserScriptCacheEntry(appConfig, depKey, asset) {
|
|
65
|
+
if (!shouldUseDevBrowserScriptCache() || !asset.filepath) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const invalidationVersion = createDevBrowserScriptCacheInvalidationVersion(appConfig);
|
|
69
|
+
const buildInputsFingerprint = createBuildInputsFingerprint(appConfig);
|
|
70
|
+
const existing = readManifest(appConfig);
|
|
71
|
+
const manifest = existing ?? {
|
|
72
|
+
invalidationVersion,
|
|
73
|
+
buildInputsFingerprint,
|
|
74
|
+
entries: {}
|
|
75
|
+
};
|
|
76
|
+
manifest.invalidationVersion = invalidationVersion;
|
|
77
|
+
manifest.buildInputsFingerprint = buildInputsFingerprint;
|
|
78
|
+
manifest.entries[depKey] = {
|
|
79
|
+
filepath: asset.filepath,
|
|
80
|
+
builtAt: Date.now()
|
|
81
|
+
};
|
|
82
|
+
writeManifest(appConfig, manifest);
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
DEV_BROWSER_SCRIPT_CACHE_DIR,
|
|
86
|
+
DEV_BROWSER_SCRIPT_CACHE_FILENAME,
|
|
87
|
+
getDevBrowserScriptCacheEntry,
|
|
88
|
+
setDevBrowserScriptCacheEntry,
|
|
89
|
+
shouldUseDevBrowserScriptCache
|
|
90
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified pages Rolldown graph (Phase A build + Phase C import).
|
|
3
|
+
*
|
|
4
|
+
* Enabled by default in production builds. Opt out with
|
|
5
|
+
* `ECOPAGES_UNIFIED_PAGES_GRAPH=0`. Covers all static page template extensions
|
|
6
|
+
* registered on the app config.
|
|
7
|
+
*/
|
|
8
|
+
import type { EcoPagesAppConfig } from '../../types/internal-types.js';
|
|
9
|
+
export declare const PAGES_UNIFIED_GRAPH_CACHE_DIR = ".server-pages-graph";
|
|
10
|
+
export declare const PAGES_UNIFIED_GRAPH_CACHE_FILENAME = ".build-cache.json";
|
|
11
|
+
export interface PagesUnifiedGraphCacheManifest {
|
|
12
|
+
invalidationVersion: string;
|
|
13
|
+
buildInputsFingerprint: string;
|
|
14
|
+
buildKey: string;
|
|
15
|
+
builtAt: number;
|
|
16
|
+
outputs: Record<string, string>;
|
|
17
|
+
}
|
|
18
|
+
export declare function isPagesUnifiedGraphEnabled(): boolean;
|
|
19
|
+
/** True when the unified graph should build or serve prebuilt page modules. */
|
|
20
|
+
export declare function shouldBuildPagesUnifiedGraph(): boolean;
|
|
21
|
+
export declare function isPagesUnifiedGraphPage(filePath: string, appConfig: EcoPagesAppConfig): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Builds eligible static pages in one Rolldown invocation and seeds route-module disk cache.
|
|
24
|
+
*/
|
|
25
|
+
export declare function ensurePagesUnifiedGraphBuilt(options: {
|
|
26
|
+
appConfig: EcoPagesAppConfig;
|
|
27
|
+
entryPaths: readonly string[];
|
|
28
|
+
outdir: string;
|
|
29
|
+
force?: boolean;
|
|
30
|
+
}): Promise<PagesUnifiedGraphCacheManifest | undefined>;
|
|
31
|
+
export declare function importPagesUnifiedGraphModule<T>(appConfig: EcoPagesAppConfig, filePath: string): Promise<T | undefined>;
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { pathToFileURL } from "node:url";
|
|
3
|
+
import { fileSystem } from "@ecopages/file-system";
|
|
4
|
+
import { appLogger } from "../../global/app-logger.js";
|
|
5
|
+
import { build } from "../build-adapter.js";
|
|
6
|
+
import { requireBuildRuntime } from "../runtime/build-runtime.js";
|
|
7
|
+
import { createServerBuildRequest, resolveServerAppBuildPlugins } from "../runtime/build-request-policy.js";
|
|
8
|
+
import { createBuildInputsFingerprint, hashAppConfigFile } from "./build-input-fingerprint.js";
|
|
9
|
+
import {
|
|
10
|
+
isProductionCacheManifestCurrent,
|
|
11
|
+
matchesProductionCacheBuildKey,
|
|
12
|
+
matchesProductionCacheFingerprint,
|
|
13
|
+
readProductionCacheManifest,
|
|
14
|
+
writeProductionCacheManifest
|
|
15
|
+
} from "./production-build-cache.js";
|
|
16
|
+
import { getCorePackageVersion } from "./cache-keys.js";
|
|
17
|
+
import { resolveInternalExecutionDir } from "../../utils/resolve-work-dir.js";
|
|
18
|
+
import { getSharedRouteModuleBuildCache } from "../../services/module-loading/route-module-build-cache-registry.js";
|
|
19
|
+
import { resolveRouteModuleDependencyPaths } from "../../services/module-loading/route-module-dependency-hasher.js";
|
|
20
|
+
const PAGES_UNIFIED_GRAPH_CACHE_DIR = ".server-pages-graph";
|
|
21
|
+
const PAGES_UNIFIED_GRAPH_CACHE_FILENAME = ".build-cache.json";
|
|
22
|
+
function isPagesUnifiedGraphEnabled() {
|
|
23
|
+
if (process.env.ECOPAGES_UNIFIED_PAGES_GRAPH === "0") {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
if (process.env.ECOPAGES_UNIFIED_PAGES_GRAPH === "1") {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
return process.env.NODE_ENV === "production";
|
|
30
|
+
}
|
|
31
|
+
function shouldBuildPagesUnifiedGraph() {
|
|
32
|
+
return isPagesUnifiedGraphEnabled() && process.env.NODE_ENV === "production";
|
|
33
|
+
}
|
|
34
|
+
function isPagesUnifiedGraphPage(filePath, appConfig) {
|
|
35
|
+
const normalizedPath = path.normalize(filePath);
|
|
36
|
+
return appConfig.templatesExt.some((extension) => normalizedPath.endsWith(extension));
|
|
37
|
+
}
|
|
38
|
+
function getPagesUnifiedGraphCachePath(appConfig) {
|
|
39
|
+
return path.join(
|
|
40
|
+
resolveInternalExecutionDir(appConfig),
|
|
41
|
+
PAGES_UNIFIED_GRAPH_CACHE_DIR,
|
|
42
|
+
PAGES_UNIFIED_GRAPH_CACHE_FILENAME
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
function createPagesUnifiedGraphBuildKey(appConfig, outdir) {
|
|
46
|
+
const pluginNames = resolveServerAppBuildPlugins(appConfig).map((plugin) => plugin.name).sort().join("|");
|
|
47
|
+
const templateExtensions = [...appConfig.templatesExt].sort().join("|");
|
|
48
|
+
return [
|
|
49
|
+
path.resolve(outdir),
|
|
50
|
+
hashAppConfigFile(appConfig),
|
|
51
|
+
templateExtensions,
|
|
52
|
+
pluginNames,
|
|
53
|
+
"es2022",
|
|
54
|
+
"esm",
|
|
55
|
+
"external-packages"
|
|
56
|
+
].join("::");
|
|
57
|
+
}
|
|
58
|
+
function readPagesUnifiedGraphManifest(appConfig) {
|
|
59
|
+
const manifest = readProductionCacheManifest(
|
|
60
|
+
getPagesUnifiedGraphCachePath(appConfig)
|
|
61
|
+
);
|
|
62
|
+
if (!manifest?.outputs) {
|
|
63
|
+
return void 0;
|
|
64
|
+
}
|
|
65
|
+
return manifest;
|
|
66
|
+
}
|
|
67
|
+
function writePagesUnifiedGraphManifest(appConfig, manifest) {
|
|
68
|
+
writeProductionCacheManifest(getPagesUnifiedGraphCachePath(appConfig), manifest);
|
|
69
|
+
}
|
|
70
|
+
function createSafeGraphEntryKey(entryPath, rootDir) {
|
|
71
|
+
const relativePath = path.relative(rootDir, entryPath).replace(/\.[^.]+$/u, "");
|
|
72
|
+
const safeKey = relativePath.replace(/[^a-zA-Z0-9]+/gu, "-").replace(/^-+|-+$/gu, "");
|
|
73
|
+
return safeKey.length > 0 ? safeKey : "page";
|
|
74
|
+
}
|
|
75
|
+
function resolveOutputForEntrypoint(entryPath, entryKey, buildResult) {
|
|
76
|
+
const exactOutput = buildResult.entryOutputs?.[path.resolve(entryPath)];
|
|
77
|
+
if (exactOutput) {
|
|
78
|
+
return exactOutput;
|
|
79
|
+
}
|
|
80
|
+
for (const { path: outputPath } of buildResult.outputs) {
|
|
81
|
+
const outputBaseName = path.basename(outputPath);
|
|
82
|
+
if (outputBaseName.startsWith(`${entryKey}-`) && /\.(?:m?js)$/u.test(outputBaseName)) {
|
|
83
|
+
return outputPath;
|
|
84
|
+
}
|
|
85
|
+
if (outputBaseName === `${entryKey}.js` || outputBaseName === `${entryKey}.mjs`) {
|
|
86
|
+
return outputPath;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return void 0;
|
|
90
|
+
}
|
|
91
|
+
function isManifestValidForEntries(manifest, appConfig, outdir, entryPaths) {
|
|
92
|
+
if (!isProductionCacheManifestCurrent(manifest, getCorePackageVersion())) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
if (!matchesProductionCacheFingerprint(manifest, createBuildInputsFingerprint(appConfig))) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
if (!matchesProductionCacheBuildKey(manifest, createPagesUnifiedGraphBuildKey(appConfig, outdir))) {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
return entryPaths.every((entryPath) => {
|
|
102
|
+
const resolvedEntryPath = path.resolve(entryPath);
|
|
103
|
+
const outputPath = manifest.outputs[resolvedEntryPath];
|
|
104
|
+
return outputPath ? fileSystem.exists(outputPath) : false;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
async function ensurePagesUnifiedGraphBuilt(options) {
|
|
108
|
+
if (!shouldBuildPagesUnifiedGraph()) {
|
|
109
|
+
return void 0;
|
|
110
|
+
}
|
|
111
|
+
const eligibleEntryPaths = options.entryPaths.map((entryPath) => path.resolve(entryPath)).filter((entryPath) => isPagesUnifiedGraphPage(entryPath, options.appConfig));
|
|
112
|
+
if (eligibleEntryPaths.length === 0) {
|
|
113
|
+
return void 0;
|
|
114
|
+
}
|
|
115
|
+
const outdir = path.resolve(options.outdir);
|
|
116
|
+
const existingManifest = options.force ? void 0 : readPagesUnifiedGraphManifest(options.appConfig);
|
|
117
|
+
if (existingManifest && isManifestValidForEntries(existingManifest, options.appConfig, outdir, eligibleEntryPaths)) {
|
|
118
|
+
appLogger.debug("Reusing pages unified graph cache");
|
|
119
|
+
return existingManifest;
|
|
120
|
+
}
|
|
121
|
+
const routeModuleBuildCache = getSharedRouteModuleBuildCache(outdir, options.appConfig);
|
|
122
|
+
const entryRecord = {};
|
|
123
|
+
const entryKeysByPath = /* @__PURE__ */ new Map();
|
|
124
|
+
for (const entryPath of eligibleEntryPaths) {
|
|
125
|
+
const entryKey = createSafeGraphEntryKey(entryPath, options.appConfig.rootDir);
|
|
126
|
+
entryRecord[entryKey] = entryPath;
|
|
127
|
+
entryKeysByPath.set(entryPath, entryKey);
|
|
128
|
+
}
|
|
129
|
+
appLogger.debugTime("pagesUnifiedGraphBuild");
|
|
130
|
+
const buildOptions = createServerBuildRequest(options.appConfig, {
|
|
131
|
+
profile: "route-module",
|
|
132
|
+
entrypoints: entryRecord,
|
|
133
|
+
outdir,
|
|
134
|
+
splitting: true,
|
|
135
|
+
naming: "[name]-[hash].[ext]"
|
|
136
|
+
});
|
|
137
|
+
const plugins = buildOptions.plugins ?? [];
|
|
138
|
+
const buildResult = await build(buildOptions, requireBuildRuntime(options.appConfig).getProfile("route-module"));
|
|
139
|
+
appLogger.debugTimeEnd("pagesUnifiedGraphBuild");
|
|
140
|
+
if (!buildResult.success) {
|
|
141
|
+
const details = buildResult.logs.map((log) => log.message).join(" | ");
|
|
142
|
+
throw new Error(`Pages unified graph build failed: ${details}`);
|
|
143
|
+
}
|
|
144
|
+
const outputs = {};
|
|
145
|
+
for (const entryPath of eligibleEntryPaths) {
|
|
146
|
+
const fileHash = fileSystem.hash(entryPath);
|
|
147
|
+
const entryKey = entryKeysByPath.get(entryPath);
|
|
148
|
+
const compiledOutput = entryKey ? resolveOutputForEntrypoint(entryPath, entryKey, buildResult) : void 0;
|
|
149
|
+
if (!compiledOutput) {
|
|
150
|
+
throw new Error(`Pages unified graph build produced no output for ${entryPath}`);
|
|
151
|
+
}
|
|
152
|
+
outputs[entryPath] = compiledOutput;
|
|
153
|
+
routeModuleBuildCache.recordBuild({
|
|
154
|
+
filePath: entryPath,
|
|
155
|
+
rootDir: options.appConfig.rootDir,
|
|
156
|
+
outdir,
|
|
157
|
+
fileHash,
|
|
158
|
+
outputPath: compiledOutput,
|
|
159
|
+
dependencyModulePaths: resolveRouteModuleDependencyPaths(buildResult, entryPath, options.appConfig.rootDir),
|
|
160
|
+
externalPackages: true,
|
|
161
|
+
plugins
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
const manifest = {
|
|
165
|
+
invalidationVersion: getCorePackageVersion(),
|
|
166
|
+
buildInputsFingerprint: createBuildInputsFingerprint(options.appConfig),
|
|
167
|
+
buildKey: createPagesUnifiedGraphBuildKey(options.appConfig, outdir),
|
|
168
|
+
builtAt: Date.now(),
|
|
169
|
+
outputs
|
|
170
|
+
};
|
|
171
|
+
writePagesUnifiedGraphManifest(options.appConfig, manifest);
|
|
172
|
+
appLogger.debug(`Built pages unified graph for ${eligibleEntryPaths.length} entries`);
|
|
173
|
+
return manifest;
|
|
174
|
+
}
|
|
175
|
+
async function importPagesUnifiedGraphModule(appConfig, filePath) {
|
|
176
|
+
const manifest = readPagesUnifiedGraphManifest(appConfig);
|
|
177
|
+
if (!manifest) {
|
|
178
|
+
return void 0;
|
|
179
|
+
}
|
|
180
|
+
const resolvedFilePath = path.resolve(filePath);
|
|
181
|
+
const outputPath = manifest.outputs[resolvedFilePath];
|
|
182
|
+
if (!outputPath || !fileSystem.exists(outputPath)) {
|
|
183
|
+
return void 0;
|
|
184
|
+
}
|
|
185
|
+
return await import(
|
|
186
|
+
/* @vite-ignore */
|
|
187
|
+
pathToFileURL(outputPath).href
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
export {
|
|
191
|
+
PAGES_UNIFIED_GRAPH_CACHE_DIR,
|
|
192
|
+
PAGES_UNIFIED_GRAPH_CACHE_FILENAME,
|
|
193
|
+
ensurePagesUnifiedGraphBuilt,
|
|
194
|
+
importPagesUnifiedGraphModule,
|
|
195
|
+
isPagesUnifiedGraphEnabled,
|
|
196
|
+
isPagesUnifiedGraphPage,
|
|
197
|
+
shouldBuildPagesUnifiedGraph
|
|
198
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { EcoPagesAppConfig } from '../../types/internal-types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Shared manifest fields for persisted production build caches.
|
|
4
|
+
*/
|
|
5
|
+
export interface ProductionCacheManifestBase {
|
|
6
|
+
invalidationVersion: string;
|
|
7
|
+
buildInputsFingerprint?: string;
|
|
8
|
+
buildKey?: string;
|
|
9
|
+
builtAt?: number;
|
|
10
|
+
}
|
|
11
|
+
export type ProductionBuildCacheKind = 'server-entry' | 'route-module' | 'pages-graph';
|
|
12
|
+
/** Returns every persisted production cache manifest path for one app. */
|
|
13
|
+
export declare function getProductionBuildCacheManifestPaths(appConfig: EcoPagesAppConfig): string[];
|
|
14
|
+
/** Removes all persisted production cache manifests for one app. */
|
|
15
|
+
export declare function clearPersistedProductionBuildCacheManifests(appConfig: EcoPagesAppConfig): void;
|
|
16
|
+
export declare function readProductionCacheManifest<T extends ProductionCacheManifestBase>(manifestPath: string): T | undefined;
|
|
17
|
+
export declare function writeProductionCacheManifest(manifestPath: string, manifest: unknown): void;
|
|
18
|
+
export declare function isProductionCacheManifestCurrent(manifest: ProductionCacheManifestBase | undefined, invalidationVersion: string): boolean;
|
|
19
|
+
export declare function matchesProductionCacheFingerprint(manifest: ProductionCacheManifestBase | undefined, buildInputsFingerprint: string): boolean;
|
|
20
|
+
export declare function matchesProductionCacheBuildKey(manifest: ProductionCacheManifestBase | undefined, buildKey: string): boolean;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { fileSystem } from "@ecopages/file-system";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { ROUTE_MODULE_BUILD_CACHE_FILENAME } from "./cache-constants.js";
|
|
4
|
+
import { resolveInternalExecutionDir } from "../../utils/resolve-work-dir.js";
|
|
5
|
+
const ROUTE_MODULE_CACHE_OUTDIRS = [".server-modules", ".server-route-modules"];
|
|
6
|
+
const PAGES_GRAPH_CACHE_DIR = ".server-pages-graph";
|
|
7
|
+
function getProductionBuildCacheManifestPaths(appConfig) {
|
|
8
|
+
const executionDir = resolveInternalExecutionDir(appConfig);
|
|
9
|
+
const paths = [];
|
|
10
|
+
for (const subdir of ROUTE_MODULE_CACHE_OUTDIRS) {
|
|
11
|
+
paths.push(path.join(executionDir, subdir, ROUTE_MODULE_BUILD_CACHE_FILENAME));
|
|
12
|
+
}
|
|
13
|
+
paths.push(path.join(executionDir, ".server-entry", ROUTE_MODULE_BUILD_CACHE_FILENAME));
|
|
14
|
+
paths.push(path.join(executionDir, PAGES_GRAPH_CACHE_DIR, ROUTE_MODULE_BUILD_CACHE_FILENAME));
|
|
15
|
+
return paths;
|
|
16
|
+
}
|
|
17
|
+
function clearPersistedProductionBuildCacheManifests(appConfig) {
|
|
18
|
+
if (process.env.NODE_ENV !== "production") {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
for (const manifestPath of getProductionBuildCacheManifestPaths(appConfig)) {
|
|
22
|
+
if (fileSystem.exists(manifestPath)) {
|
|
23
|
+
fileSystem.remove(manifestPath);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function readProductionCacheManifest(manifestPath) {
|
|
28
|
+
if (!fileSystem.exists(manifestPath)) {
|
|
29
|
+
return void 0;
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
const parsed = JSON.parse(fileSystem.readFileSync(manifestPath));
|
|
33
|
+
if (!parsed || typeof parsed !== "object") {
|
|
34
|
+
return void 0;
|
|
35
|
+
}
|
|
36
|
+
return parsed;
|
|
37
|
+
} catch {
|
|
38
|
+
return void 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function writeProductionCacheManifest(manifestPath, manifest) {
|
|
42
|
+
fileSystem.ensureDir(path.dirname(manifestPath));
|
|
43
|
+
fileSystem.write(manifestPath, `${JSON.stringify(manifest, null, " ")}
|
|
44
|
+
`);
|
|
45
|
+
}
|
|
46
|
+
function isProductionCacheManifestCurrent(manifest, invalidationVersion) {
|
|
47
|
+
return manifest?.invalidationVersion === invalidationVersion;
|
|
48
|
+
}
|
|
49
|
+
function matchesProductionCacheFingerprint(manifest, buildInputsFingerprint) {
|
|
50
|
+
return manifest?.buildInputsFingerprint === buildInputsFingerprint;
|
|
51
|
+
}
|
|
52
|
+
function matchesProductionCacheBuildKey(manifest, buildKey) {
|
|
53
|
+
return manifest?.buildKey === buildKey;
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
clearPersistedProductionBuildCacheManifests,
|
|
57
|
+
getProductionBuildCacheManifestPaths,
|
|
58
|
+
isProductionCacheManifestCurrent,
|
|
59
|
+
matchesProductionCacheBuildKey,
|
|
60
|
+
matchesProductionCacheFingerprint,
|
|
61
|
+
readProductionCacheManifest,
|
|
62
|
+
writeProductionCacheManifest
|
|
63
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { BuildResult } from '../build-adapter.js';
|
|
2
|
+
import type { EcoPagesAppConfig } from '../../types/internal-types.js';
|
|
3
|
+
export { SERVER_ENTRY_BUILD_CACHE_FILENAME } from './cache-constants.js';
|
|
4
|
+
export declare const SERVER_BUNDLE_MANIFEST_FILENAME = "manifest.json";
|
|
5
|
+
export interface ServerBundleDeployManifest {
|
|
6
|
+
serverEntry: string;
|
|
7
|
+
distDir: string;
|
|
8
|
+
builtAt: number;
|
|
9
|
+
}
|
|
10
|
+
export interface ServerEntryBuildCacheManifest {
|
|
11
|
+
invalidationVersion: string;
|
|
12
|
+
entryPath: string;
|
|
13
|
+
entryHash: string;
|
|
14
|
+
buildInputsFingerprint: string;
|
|
15
|
+
buildKey: string;
|
|
16
|
+
outputPaths: string[];
|
|
17
|
+
dependencyHashes: Record<string, string>;
|
|
18
|
+
builtAt: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ServerEntryBuildCacheLookup {
|
|
21
|
+
manifest: ServerEntryBuildCacheManifest;
|
|
22
|
+
outputPaths: string[];
|
|
23
|
+
}
|
|
24
|
+
export declare function getServerBundleOutputPaths(appConfig: EcoPagesAppConfig): {
|
|
25
|
+
distDir: string;
|
|
26
|
+
serverOutdir: string;
|
|
27
|
+
serverEntryPath: string;
|
|
28
|
+
manifestPath: string;
|
|
29
|
+
};
|
|
30
|
+
export declare function readServerEntryBuildCacheManifest(appConfig: EcoPagesAppConfig): ServerEntryBuildCacheManifest | undefined;
|
|
31
|
+
export declare function writeServerBundleDeployManifest(appConfig: EcoPagesAppConfig, serverEntryPath: string): void;
|
|
32
|
+
export declare function lookupServerEntryBuildCache(options: {
|
|
33
|
+
appConfig: EcoPagesAppConfig;
|
|
34
|
+
entryPath: string;
|
|
35
|
+
force?: boolean;
|
|
36
|
+
}): ServerEntryBuildCacheLookup | undefined;
|
|
37
|
+
export declare function recordServerEntryBuildCache(options: {
|
|
38
|
+
appConfig: EcoPagesAppConfig;
|
|
39
|
+
entryPath: string;
|
|
40
|
+
buildResult: BuildResult;
|
|
41
|
+
outputPaths: string[];
|
|
42
|
+
}): void;
|
|
43
|
+
export declare function resolveProductionServerEntry(cwd?: string): string | undefined;
|