@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
|
@@ -5,6 +5,8 @@ import { appLogger } from "../global/app-logger.js";
|
|
|
5
5
|
import {
|
|
6
6
|
DevelopmentInvalidationService
|
|
7
7
|
} from "../services/invalidation/development-invalidation.service.js";
|
|
8
|
+
import { prepareHmrFileChange } from "../hmr/hmr-file-change-prep.js";
|
|
9
|
+
import { getAppPageBrowserGraphSession } from "../route-renderer/orchestration/page-browser-graph/page-browser-graph-session.js";
|
|
8
10
|
import { isRegisteredScriptEntrypoint } from "../hmr/hmr-entrypoint-output.js";
|
|
9
11
|
import { resolveInternalExecutionDir } from "../utils/resolve-work-dir.js";
|
|
10
12
|
import { createProjectWatcherIgnorePredicate } from "./project-watcher-ignore.js";
|
|
@@ -150,6 +152,10 @@ class ProjectWatcher {
|
|
|
150
152
|
}
|
|
151
153
|
this.uncacheModules();
|
|
152
154
|
const resolvedFilePath = path.resolve(filePath);
|
|
155
|
+
const graphPreparation = this.hmrManager.isEnabled() ? prepareHmrFileChange(this.appConfig, resolvedFilePath) : void 0;
|
|
156
|
+
if (plan.refreshRoutes && (event === "unlink" || event === "add")) {
|
|
157
|
+
getAppPageBrowserGraphSession(this.appConfig).invalidateByRouteFile(resolvedFilePath);
|
|
158
|
+
}
|
|
153
159
|
const isRegisteredScriptEdit = isRegisteredScriptEntrypoint(
|
|
154
160
|
this.hmrManager.getWatchedFiles(),
|
|
155
161
|
resolvedFilePath
|
|
@@ -167,7 +173,9 @@ class ProjectWatcher {
|
|
|
167
173
|
const deferProcessorNotifications = plan.category === "include-source" || plan.category === "explicit-server-view" || isRegisteredScriptEdit;
|
|
168
174
|
if (deferProcessorNotifications && plan.delegateToHmr) {
|
|
169
175
|
await this.prewarmBeforeHmr(resolvedFilePath, plan);
|
|
170
|
-
await this.hmrManager.handleFileChange(filePath
|
|
176
|
+
await this.hmrManager.handleFileChange(filePath, {
|
|
177
|
+
graphIdentities: graphPreparation?.affectedGraphIdentities
|
|
178
|
+
});
|
|
171
179
|
await this.notifyProcessors(filePath, event);
|
|
172
180
|
return;
|
|
173
181
|
}
|
|
@@ -176,7 +184,9 @@ class ProjectWatcher {
|
|
|
176
184
|
return;
|
|
177
185
|
}
|
|
178
186
|
if (plan.delegateToHmr) {
|
|
179
|
-
await this.hmrManager.handleFileChange(filePath
|
|
187
|
+
await this.hmrManager.handleFileChange(filePath, {
|
|
188
|
+
graphIdentities: graphPreparation?.affectedGraphIdentities
|
|
189
|
+
});
|
|
180
190
|
}
|
|
181
191
|
} catch (error) {
|
|
182
192
|
if (error instanceof Error) {
|
|
@@ -265,9 +275,9 @@ class ProjectWatcher {
|
|
|
265
275
|
return this.invalidationService.matchesAdditionalWatchPaths(filePath);
|
|
266
276
|
}
|
|
267
277
|
/**
|
|
268
|
-
* Checks if a file is
|
|
269
|
-
*
|
|
270
|
-
*
|
|
278
|
+
* Checks if a file is owned by a processor as an asset input.
|
|
279
|
+
* Ownership requires declared asset capabilities; watch config only drives
|
|
280
|
+
* {@link notifyProcessors} notifications.
|
|
271
281
|
*/
|
|
272
282
|
isHandledByProcessor(filePath) {
|
|
273
283
|
return this.invalidationService.isProcessorOwnedAsset(filePath);
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { EcoBuildPlugin } from './build-types.js';
|
|
2
|
-
import { type BrowserRuntimeManifest } from './browser-runtime-manifest.js';
|
|
3
|
-
export interface AppBuildManifest {
|
|
4
|
-
loaderPlugins: EcoBuildPlugin[];
|
|
5
|
-
runtimePlugins: EcoBuildPlugin[];
|
|
6
|
-
browserBundlePlugins: EcoBuildPlugin[];
|
|
7
|
-
browserRuntimeManifest: BrowserRuntimeManifest;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Merges plugin lists while preserving first-registration precedence by name.
|
|
11
|
-
*
|
|
12
|
-
* @remarks
|
|
13
|
-
* Build manifests treat plugin names as stable identities. The first plugin
|
|
14
|
-
* with a given name wins so config-time assembly stays deterministic across
|
|
15
|
-
* loader, runtime, and browser buckets.
|
|
16
|
-
*/
|
|
17
|
-
export declare function mergeEcoBuildPlugins(...pluginLists: Array<EcoBuildPlugin[] | undefined>): EcoBuildPlugin[];
|
|
18
|
-
/**
|
|
19
|
-
* Creates one app-owned build manifest from the supplied plugin buckets.
|
|
20
|
-
*/
|
|
21
|
-
export declare function createAppBuildManifest(input?: Partial<AppBuildManifest>): AppBuildManifest;
|
|
22
|
-
/**
|
|
23
|
-
* Returns the shared browser runtime asset manifest sealed into the app build manifest.
|
|
24
|
-
*/
|
|
25
|
-
export declare function getBrowserRuntimeManifest(manifest: AppBuildManifest): BrowserRuntimeManifest;
|
|
26
|
-
/**
|
|
27
|
-
* Returns the plugin list used for server-oriented builds.
|
|
28
|
-
*/
|
|
29
|
-
export declare function getServerBuildPlugins(manifest: AppBuildManifest): EcoBuildPlugin[];
|
|
30
|
-
/**
|
|
31
|
-
* Returns the plugin list used for browser-oriented builds.
|
|
32
|
-
*/
|
|
33
|
-
export declare function getBrowserBuildPlugins(manifest: AppBuildManifest): EcoBuildPlugin[];
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { createJsxCacheKey, createPluginCacheKey } from "../services/module-loading/route-module-build-manifest.js";
|
|
3
|
-
function createBuildOptionsDedupeKey(options) {
|
|
4
|
-
return [
|
|
5
|
-
normalizeEntrypoints(options.entrypoints),
|
|
6
|
-
options.root ? path.resolve(options.root) : "root:default",
|
|
7
|
-
options.outdir ? path.resolve(options.outdir) : "outdir:default",
|
|
8
|
-
options.splitting ?? "splitting:default",
|
|
9
|
-
options.externalPackages ?? "externalPackages:default",
|
|
10
|
-
options.target ?? "target:default",
|
|
11
|
-
options.format ?? "format:default",
|
|
12
|
-
options.sourcemap ?? "sourcemap:default",
|
|
13
|
-
options.minify ?? "minify:default",
|
|
14
|
-
options.treeshaking ?? "treeshaking:default",
|
|
15
|
-
options.naming ?? "naming:default",
|
|
16
|
-
createJsxCacheKey(options.jsx),
|
|
17
|
-
createPluginCacheKey(options.plugins)
|
|
18
|
-
].join("::");
|
|
19
|
-
}
|
|
20
|
-
function normalizeEntrypoints(entrypoints) {
|
|
21
|
-
if (Array.isArray(entrypoints)) {
|
|
22
|
-
return entrypoints.map((entrypoint) => path.resolve(entrypoint)).sort().join("|");
|
|
23
|
-
}
|
|
24
|
-
return Object.entries(entrypoints).sort(([left], [right]) => left.localeCompare(right)).map(([key, value]) => `${key}:${path.resolve(value)}`).join("|");
|
|
25
|
-
}
|
|
26
|
-
class DedupingBuildExecutor {
|
|
27
|
-
inner;
|
|
28
|
-
inFlight = /* @__PURE__ */ new Map();
|
|
29
|
-
constructor(inner) {
|
|
30
|
-
this.inner = inner;
|
|
31
|
-
}
|
|
32
|
-
build(options) {
|
|
33
|
-
const key = createBuildOptionsDedupeKey(options);
|
|
34
|
-
const existing = this.inFlight.get(key);
|
|
35
|
-
if (existing) {
|
|
36
|
-
return existing;
|
|
37
|
-
}
|
|
38
|
-
const buildPromise = this.inner.build(options).finally(() => {
|
|
39
|
-
if (this.inFlight.get(key) === buildPromise) {
|
|
40
|
-
this.inFlight.delete(key);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
this.inFlight.set(key, buildPromise);
|
|
44
|
-
return buildPromise;
|
|
45
|
-
}
|
|
46
|
-
unwrap() {
|
|
47
|
-
return this.inner;
|
|
48
|
-
}
|
|
49
|
-
getInFlightCountForTests() {
|
|
50
|
-
return this.inFlight.size;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
export {
|
|
54
|
-
DedupingBuildExecutor,
|
|
55
|
-
createBuildOptionsDedupeKey
|
|
56
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { EcoPagesAppConfig } from '../types/internal-types.js';
|
|
2
|
-
import type { BuildExecutor } from './build-adapter.js';
|
|
3
|
-
export type { BuildProfile, BuildRuntime } from './build-runtime.js';
|
|
4
|
-
export { disposeAppBuildRuntime, getBuildRuntime, installBuildRuntime, requireBuildRuntime } from './build-runtime.js';
|
|
5
|
-
/**
|
|
6
|
-
* Installs the app-owned runtime build executors for one app instance.
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* Delegates to {@link installBuildRuntime}. Route-module and HMR browser builds
|
|
10
|
-
* use parallel one-shot Rolldown. Server-entry bundling stays serialized
|
|
11
|
-
* single-flight.
|
|
12
|
-
*/
|
|
13
|
-
export declare function installAppRuntimeBuildExecutor(appConfig: EcoPagesAppConfig): BuildExecutor;
|
|
14
|
-
export declare function getInstalledServerEntryBuildExecutor(appConfig: EcoPagesAppConfig): BuildExecutor;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { installBuildRuntime, requireBuildRuntime } from "./build-runtime.js";
|
|
2
|
-
import { disposeAppBuildRuntime, getBuildRuntime, installBuildRuntime as installBuildRuntime2, requireBuildRuntime as requireBuildRuntime2 } from "./build-runtime.js";
|
|
3
|
-
function installAppRuntimeBuildExecutor(appConfig) {
|
|
4
|
-
return installBuildRuntime(appConfig).getProfile("route-module");
|
|
5
|
-
}
|
|
6
|
-
function getInstalledServerEntryBuildExecutor(appConfig) {
|
|
7
|
-
return requireBuildRuntime(appConfig).getProfile("server-entry");
|
|
8
|
-
}
|
|
9
|
-
export {
|
|
10
|
-
disposeAppBuildRuntime,
|
|
11
|
-
getBuildRuntime,
|
|
12
|
-
getInstalledServerEntryBuildExecutor,
|
|
13
|
-
installAppRuntimeBuildExecutor,
|
|
14
|
-
installBuildRuntime2 as installBuildRuntime,
|
|
15
|
-
requireBuildRuntime2 as requireBuildRuntime
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { mapComponentGraph, mapDeclaredOwnershipGraph, type ComponentGraphRoot, type ComponentGraphWalkInput, type DeclaredOwnershipNodeInput, type DeclaredOwnershipRoot, } from './component-graph.js';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
function buildRouteHtmlFinalization(context) {
|
|
2
|
-
const { renderOptions } = context;
|
|
3
|
-
const componentRootAttributes = renderOptions.componentRender?.canAttachAttributes && renderOptions.componentRender.rootAttributes && Object.keys(renderOptions.componentRender.rootAttributes).length > 0 ? renderOptions.componentRender.rootAttributes : void 0;
|
|
4
|
-
const documentAttributes = context.getDocumentAttributes(renderOptions);
|
|
5
|
-
const htmlContributions = context.getHtmlDocumentContributions({ renderOptions, partial: false });
|
|
6
|
-
const hasStructuralFinalization = componentRootAttributes && Object.keys(componentRootAttributes).length > 0 || documentAttributes && Object.keys(documentAttributes).length > 0;
|
|
7
|
-
if (!hasStructuralFinalization && (!htmlContributions || htmlContributions.length === 0)) {
|
|
8
|
-
return {};
|
|
9
|
-
}
|
|
10
|
-
return {
|
|
11
|
-
htmlContributions,
|
|
12
|
-
finalizeHtml: (html) => {
|
|
13
|
-
let renderedHtml = html;
|
|
14
|
-
if (componentRootAttributes) {
|
|
15
|
-
renderedHtml = context.applyAttributesToFirstBodyElement(renderedHtml, componentRootAttributes);
|
|
16
|
-
}
|
|
17
|
-
if (documentAttributes) {
|
|
18
|
-
renderedHtml = context.applyAttributesToHtmlElement(renderedHtml, documentAttributes);
|
|
19
|
-
}
|
|
20
|
-
return renderedHtml;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export {
|
|
25
|
-
buildRouteHtmlFinalization
|
|
26
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal template-result shape that core can serialize generically.
|
|
3
|
-
*
|
|
4
|
-
* @remarks
|
|
5
|
-
* Core intentionally models only the transport shape used during deferred
|
|
6
|
-
* cross-integration child passing: alternating static string segments plus
|
|
7
|
-
* interpolated runtime values. Concrete runtime markers that identify a given
|
|
8
|
-
* framework's template payload must stay outside core and be registered by the
|
|
9
|
-
* owning integration package.
|
|
10
|
-
*/
|
|
11
|
-
export type SerializableTemplateShape = {
|
|
12
|
-
strings: readonly string[];
|
|
13
|
-
values?: readonly unknown[];
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Integration-owned adapter that teaches core how to serialize one deferred
|
|
17
|
-
* template payload shape.
|
|
18
|
-
*
|
|
19
|
-
* @remarks
|
|
20
|
-
* The separation here is intentional: core owns the HTML serialization logic,
|
|
21
|
-
* but integrations own runtime-shape detection. That keeps package-specific
|
|
22
|
-
* markers such as framework template sentinels out of core while still letting
|
|
23
|
-
* deferred children round-trip through mixed renderer boundaries.
|
|
24
|
-
*/
|
|
25
|
-
export type DeferredTemplateSerializer<TTemplate extends SerializableTemplateShape = SerializableTemplateShape> = {
|
|
26
|
-
matches(value: unknown): value is TTemplate;
|
|
27
|
-
serialize(template: TTemplate, serializeValue: (value: unknown) => string | undefined): string;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Serializes a generic template shape into HTML.
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* This handles only HTML reconstruction semantics: quoted attribute values,
|
|
34
|
-
* boolean attributes, and omission of client-only event or property bindings.
|
|
35
|
-
* It does not decide whether an arbitrary value belongs to a framework-specific
|
|
36
|
-
* template runtime; integrations must make that decision before delegating here.
|
|
37
|
-
*/
|
|
38
|
-
export declare function serializeTemplateShape(template: SerializableTemplateShape, serializeValue: (value: unknown) => string | undefined): string;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { escapeHtmlAttribute } from "../../utils/html-escaping.js";
|
|
2
|
-
const ATTRIBUTE_TAIL_PATTERN = /(\s+)([@.?!]?)([^\s"'<>/=`@.?!]+)=$/;
|
|
3
|
-
function getSerializableTemplateAttribute(stringPart) {
|
|
4
|
-
const match = ATTRIBUTE_TAIL_PATTERN.exec(stringPart);
|
|
5
|
-
if (!match) return void 0;
|
|
6
|
-
return {
|
|
7
|
-
leading: stringPart.slice(0, match.index),
|
|
8
|
-
whitespace: match[1],
|
|
9
|
-
prefix: match[2],
|
|
10
|
-
name: match[3]
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
function serializeTemplateShape(template, serializeValue) {
|
|
14
|
-
const values = template.values ?? [];
|
|
15
|
-
let html = "";
|
|
16
|
-
for (let index = 0; index < values.length; index += 1) {
|
|
17
|
-
const stringPart = template.strings[index] ?? "";
|
|
18
|
-
const serializedValue = serializeValue(values[index]);
|
|
19
|
-
const attribute = getSerializableTemplateAttribute(stringPart);
|
|
20
|
-
if (!attribute) {
|
|
21
|
-
html += stringPart;
|
|
22
|
-
html += serializedValue ?? "";
|
|
23
|
-
continue;
|
|
24
|
-
}
|
|
25
|
-
html += attribute.leading;
|
|
26
|
-
if (attribute.prefix === "@" || attribute.prefix === "!" || attribute.prefix === ".") {
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
if (attribute.prefix === "?") {
|
|
30
|
-
if (serializedValue) {
|
|
31
|
-
html += `${attribute.whitespace}${attribute.name}`;
|
|
32
|
-
}
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
if (serializedValue === void 0) {
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
html += `${attribute.whitespace}${attribute.name}="${escapeHtmlAttribute(serializedValue)}"`;
|
|
39
|
-
}
|
|
40
|
-
html += template.strings[values.length] ?? "";
|
|
41
|
-
return html;
|
|
42
|
-
}
|
|
43
|
-
export {
|
|
44
|
-
serializeTemplateShape
|
|
45
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/build/{browser-runtime-plugin-helpers.js → browser/browser-runtime-plugin-helpers.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/build/{server-side-css-shim-plugin.d.ts → rolldown/server-side-css-shim-plugin.d.ts}
RENAMED
|
File without changes
|
/package/src/build/{server-side-css-shim-plugin.js → rolldown/server-side-css-shim-plugin.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|