@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
package/README.md
CHANGED
|
@@ -267,7 +267,7 @@ Use these entrypoints when implementing integrations, processors, or source tran
|
|
|
267
267
|
- `@ecopages/core/plugins/integration-plugin`
|
|
268
268
|
- `@ecopages/core/plugins/processor`
|
|
269
269
|
- `@ecopages/core/plugins/source-transform`
|
|
270
|
-
- `@ecopages/core/route-renderer/integration-renderer`
|
|
270
|
+
- `@ecopages/core/route-renderer/orchestration/integration-renderer`
|
|
271
271
|
- `@ecopages/core/services/asset-processing-service`
|
|
272
272
|
- `@ecopages/core/hmr/hmr-strategy`
|
|
273
273
|
- `@ecopages/core/integrations/ghtml`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecopages/core",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.28",
|
|
4
4
|
"description": "Core package for Ecopages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ecopages",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"directory": "packages/core"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@ecopages/file-system": "0.2.0-beta.
|
|
20
|
+
"@ecopages/file-system": "0.2.0-beta.28",
|
|
21
21
|
"@ecopages/logger": "^0.2.3",
|
|
22
22
|
"@ecopages/scripts-injector": "^0.1.5",
|
|
23
23
|
"@oxc-project/runtime": "0.134.0",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"types": "./src/adapters/create-app.d.ts",
|
|
45
45
|
"default": "./src/adapters/create-app.js"
|
|
46
46
|
},
|
|
47
|
-
"./route-renderer/integration-renderer": {
|
|
47
|
+
"./route-renderer/orchestration/integration-renderer": {
|
|
48
48
|
"types": "./src/route-renderer/orchestration/integration-renderer.d.ts",
|
|
49
49
|
"default": "./src/route-renderer/orchestration/integration-renderer.js"
|
|
50
50
|
},
|
|
51
|
-
"./route-renderer/string-markup-renderer": {
|
|
51
|
+
"./route-renderer/orchestration/string-markup-renderer": {
|
|
52
52
|
"types": "./src/route-renderer/orchestration/string-markup-renderer.d.ts",
|
|
53
53
|
"default": "./src/route-renderer/orchestration/string-markup-renderer.js"
|
|
54
54
|
},
|
|
@@ -56,18 +56,26 @@
|
|
|
56
56
|
"types": "./src/route-renderer/route-renderer.d.ts",
|
|
57
57
|
"default": "./src/route-renderer/route-renderer.js"
|
|
58
58
|
},
|
|
59
|
-
"./route-renderer/component-render-context": {
|
|
60
|
-
"import": "./src/route-renderer/orchestration/component-render-context.js",
|
|
61
|
-
"types": "./src/route-renderer/orchestration/component-render-context.d.ts",
|
|
62
|
-
"default": "./src/route-renderer/orchestration/component-render-context.js"
|
|
59
|
+
"./route-renderer/orchestration/foreign-child/component-render-context": {
|
|
60
|
+
"import": "./src/route-renderer/orchestration/foreign-child/component-render-context.js",
|
|
61
|
+
"types": "./src/route-renderer/orchestration/foreign-child/component-render-context.d.ts",
|
|
62
|
+
"default": "./src/route-renderer/orchestration/foreign-child/component-render-context.js"
|
|
63
63
|
},
|
|
64
|
-
"./route-renderer/orchestration/foreign-subtree-execution.service": {
|
|
65
|
-
"types": "./src/route-renderer/orchestration/foreign-subtree-execution.service.d.ts",
|
|
66
|
-
"default": "./src/route-renderer/orchestration/foreign-subtree-execution.service.js"
|
|
64
|
+
"./route-renderer/orchestration/foreign-child/foreign-subtree-execution.service": {
|
|
65
|
+
"types": "./src/route-renderer/orchestration/foreign-child/foreign-subtree-execution.service.d.ts",
|
|
66
|
+
"default": "./src/route-renderer/orchestration/foreign-child/foreign-subtree-execution.service.js"
|
|
67
67
|
},
|
|
68
|
-
"./route-renderer/orchestration/document-shell-render.service": {
|
|
69
|
-
"types": "./src/route-renderer/orchestration/document-shell-render.service.d.ts",
|
|
70
|
-
"default": "./src/route-renderer/orchestration/document-shell-render.service.js"
|
|
68
|
+
"./route-renderer/orchestration/document-shell/document-shell-render.service": {
|
|
69
|
+
"types": "./src/route-renderer/orchestration/document-shell/document-shell-render.service.d.ts",
|
|
70
|
+
"default": "./src/route-renderer/orchestration/document-shell/document-shell-render.service.js"
|
|
71
|
+
},
|
|
72
|
+
"./route-renderer/orchestration/page-browser-graph/page-browser-graph-merge.utils": {
|
|
73
|
+
"types": "./src/route-renderer/orchestration/page-browser-graph/page-browser-graph-merge.utils.d.ts",
|
|
74
|
+
"default": "./src/route-renderer/orchestration/page-browser-graph/page-browser-graph-merge.utils.js"
|
|
75
|
+
},
|
|
76
|
+
"./route-renderer/orchestration/foreign-child/owning-renderer-resolution": {
|
|
77
|
+
"types": "./src/route-renderer/orchestration/foreign-child/owning-renderer-resolution.d.ts",
|
|
78
|
+
"default": "./src/route-renderer/orchestration/foreign-child/owning-renderer-resolution.js"
|
|
71
79
|
},
|
|
72
80
|
"./router/navigation-coordinator": {
|
|
73
81
|
"types": "./src/router/client/navigation-coordinator.d.ts",
|
|
@@ -116,6 +124,10 @@
|
|
|
116
124
|
"types": "./src/config/constants.d.ts",
|
|
117
125
|
"default": "./src/config/constants.js"
|
|
118
126
|
},
|
|
127
|
+
"./diagnostics/startup-trace": {
|
|
128
|
+
"types": "./src/diagnostics/startup-trace.d.ts",
|
|
129
|
+
"default": "./src/diagnostics/startup-trace.js"
|
|
130
|
+
},
|
|
119
131
|
"./bun": {
|
|
120
132
|
"types": "./src/adapters/bun/index.d.ts",
|
|
121
133
|
"default": "./src/adapters/bun/index.js"
|
|
@@ -124,6 +136,10 @@
|
|
|
124
136
|
"types": "./src/hmr/hmr-strategy.d.ts",
|
|
125
137
|
"default": "./src/hmr/hmr-strategy.js"
|
|
126
138
|
},
|
|
139
|
+
"./hmr/hmr-file-change-prep": {
|
|
140
|
+
"types": "./src/hmr/hmr-file-change-prep.d.ts",
|
|
141
|
+
"default": "./src/hmr/hmr-file-change-prep.js"
|
|
142
|
+
},
|
|
127
143
|
"./hmr/client/hmr-runtime": {
|
|
128
144
|
"types": "./src/hmr/client/hmr-runtime.d.ts",
|
|
129
145
|
"default": "./src/hmr/client/hmr-runtime.js"
|
|
@@ -165,52 +181,48 @@
|
|
|
165
181
|
"default": "./src/plugins/source-transform.js"
|
|
166
182
|
},
|
|
167
183
|
"./build/build-types": {
|
|
168
|
-
"types": "./src/build/build-types.d.ts",
|
|
169
|
-
"default": "./src/build/build-types.js"
|
|
184
|
+
"types": "./src/build/contracts/build-types.d.ts",
|
|
185
|
+
"default": "./src/build/contracts/build-types.js"
|
|
170
186
|
},
|
|
171
187
|
"./build/build-adapter": {
|
|
172
188
|
"types": "./src/build/build-adapter.d.ts",
|
|
173
189
|
"default": "./src/build/build-adapter.js"
|
|
174
190
|
},
|
|
175
|
-
"./build/runtime-build-executor": {
|
|
176
|
-
"types": "./src/build/runtime-build-executor.d.ts",
|
|
177
|
-
"default": "./src/build/runtime-build-executor.js"
|
|
178
|
-
},
|
|
179
191
|
"./build/build-runtime": {
|
|
180
|
-
"types": "./src/build/build-runtime.d.ts",
|
|
181
|
-
"default": "./src/build/build-runtime.js"
|
|
192
|
+
"types": "./src/build/runtime/build-runtime.d.ts",
|
|
193
|
+
"default": "./src/build/runtime/build-runtime.js"
|
|
182
194
|
},
|
|
183
195
|
"./build/build-contracts": {
|
|
184
|
-
"types": "./src/build/build-contracts.d.ts",
|
|
185
|
-
"default": "./src/build/build-contracts.js"
|
|
196
|
+
"types": "./src/build/contracts/build-contracts.d.ts",
|
|
197
|
+
"default": "./src/build/contracts/build-contracts.js"
|
|
186
198
|
},
|
|
187
199
|
"./build/production-build-cache": {
|
|
188
|
-
"types": "./src/build/production-build-cache.d.ts",
|
|
189
|
-
"default": "./src/build/production-build-cache.js"
|
|
200
|
+
"types": "./src/build/cache/production-build-cache.d.ts",
|
|
201
|
+
"default": "./src/build/cache/production-build-cache.js"
|
|
190
202
|
},
|
|
191
203
|
"./build/server-entry-build-cache": {
|
|
192
|
-
"types": "./src/build/server-entry-build-cache.d.ts",
|
|
193
|
-
"default": "./src/build/server-entry-build-cache.js"
|
|
204
|
+
"types": "./src/build/cache/server-entry-build-cache.d.ts",
|
|
205
|
+
"default": "./src/build/cache/server-entry-build-cache.js"
|
|
194
206
|
},
|
|
195
207
|
"./build/runtime-build-output-normalizer": {
|
|
196
|
-
"types": "./src/build/runtime-build-output-normalizer.d.ts",
|
|
197
|
-
"default": "./src/build/runtime-build-output-normalizer.js"
|
|
208
|
+
"types": "./src/build/rolldown/runtime-build-output-normalizer.d.ts",
|
|
209
|
+
"default": "./src/build/rolldown/runtime-build-output-normalizer.js"
|
|
198
210
|
},
|
|
199
211
|
"./build/browser-runtime-manifest": {
|
|
200
|
-
"types": "./src/build/browser-runtime-manifest.d.ts",
|
|
201
|
-
"default": "./src/build/browser-runtime-manifest.js"
|
|
212
|
+
"types": "./src/build/browser/browser-runtime-manifest.d.ts",
|
|
213
|
+
"default": "./src/build/browser/browser-runtime-manifest.js"
|
|
202
214
|
},
|
|
203
215
|
"./build/browser-runtime-plugin": {
|
|
204
|
-
"types": "./src/build/browser-runtime-plugin.d.ts",
|
|
205
|
-
"default": "./src/build/browser-runtime-plugin.js"
|
|
216
|
+
"types": "./src/build/browser/browser-runtime-plugin.d.ts",
|
|
217
|
+
"default": "./src/build/browser/browser-runtime-plugin.js"
|
|
206
218
|
},
|
|
207
219
|
"./build/jsx-ownership-plugins": {
|
|
208
|
-
"types": "./src/build/jsx-ownership-plugins.d.ts",
|
|
209
|
-
"default": "./src/build/jsx-ownership-plugins.js"
|
|
220
|
+
"types": "./src/build/browser/jsx-ownership-plugins.d.ts",
|
|
221
|
+
"default": "./src/build/browser/jsx-ownership-plugins.js"
|
|
210
222
|
},
|
|
211
223
|
"./build/lit-static-render-worker-context": {
|
|
212
|
-
"types": "./src/build/lit-static-render-worker-context.d.ts",
|
|
213
|
-
"default": "./src/build/lit-static-render-worker-context.js"
|
|
224
|
+
"types": "./src/build/browser/lit-static-render-worker-context.d.ts",
|
|
225
|
+
"default": "./src/build/browser/lit-static-render-worker-context.js"
|
|
214
226
|
},
|
|
215
227
|
"./cache": {
|
|
216
228
|
"types": "./src/cache/index.d.ts",
|
|
@@ -265,11 +277,11 @@
|
|
|
265
277
|
"types": "./src/adapters/create-app.d.ts",
|
|
266
278
|
"default": "./src/adapters/create-app.js"
|
|
267
279
|
},
|
|
268
|
-
"./route-renderer/integration-renderer.ts": {
|
|
280
|
+
"./route-renderer/orchestration/integration-renderer.ts": {
|
|
269
281
|
"types": "./src/route-renderer/orchestration/integration-renderer.d.ts",
|
|
270
282
|
"default": "./src/route-renderer/orchestration/integration-renderer.js"
|
|
271
283
|
},
|
|
272
|
-
"./route-renderer/string-markup-renderer.ts": {
|
|
284
|
+
"./route-renderer/orchestration/string-markup-renderer.ts": {
|
|
273
285
|
"types": "./src/route-renderer/orchestration/string-markup-renderer.d.ts",
|
|
274
286
|
"default": "./src/route-renderer/orchestration/string-markup-renderer.js"
|
|
275
287
|
},
|
|
@@ -277,18 +289,26 @@
|
|
|
277
289
|
"types": "./src/route-renderer/route-renderer.d.ts",
|
|
278
290
|
"default": "./src/route-renderer/route-renderer.js"
|
|
279
291
|
},
|
|
280
|
-
"./route-renderer/component-render-context.ts": {
|
|
281
|
-
"import": "./src/route-renderer/orchestration/component-render-context.js",
|
|
282
|
-
"types": "./src/route-renderer/orchestration/component-render-context.d.ts",
|
|
283
|
-
"default": "./src/route-renderer/orchestration/component-render-context.js"
|
|
292
|
+
"./route-renderer/orchestration/foreign-child/component-render-context.ts": {
|
|
293
|
+
"import": "./src/route-renderer/orchestration/foreign-child/component-render-context.js",
|
|
294
|
+
"types": "./src/route-renderer/orchestration/foreign-child/component-render-context.d.ts",
|
|
295
|
+
"default": "./src/route-renderer/orchestration/foreign-child/component-render-context.js"
|
|
284
296
|
},
|
|
285
|
-
"./route-renderer/orchestration/foreign-subtree-execution.service.ts": {
|
|
286
|
-
"types": "./src/route-renderer/orchestration/foreign-subtree-execution.service.d.ts",
|
|
287
|
-
"default": "./src/route-renderer/orchestration/foreign-subtree-execution.service.js"
|
|
297
|
+
"./route-renderer/orchestration/foreign-child/foreign-subtree-execution.service.ts": {
|
|
298
|
+
"types": "./src/route-renderer/orchestration/foreign-child/foreign-subtree-execution.service.d.ts",
|
|
299
|
+
"default": "./src/route-renderer/orchestration/foreign-child/foreign-subtree-execution.service.js"
|
|
288
300
|
},
|
|
289
|
-
"./route-renderer/orchestration/document-shell-render.service.ts": {
|
|
290
|
-
"types": "./src/route-renderer/orchestration/document-shell-render.service.d.ts",
|
|
291
|
-
"default": "./src/route-renderer/orchestration/document-shell-render.service.js"
|
|
301
|
+
"./route-renderer/orchestration/document-shell/document-shell-render.service.ts": {
|
|
302
|
+
"types": "./src/route-renderer/orchestration/document-shell/document-shell-render.service.d.ts",
|
|
303
|
+
"default": "./src/route-renderer/orchestration/document-shell/document-shell-render.service.js"
|
|
304
|
+
},
|
|
305
|
+
"./route-renderer/orchestration/page-browser-graph/page-browser-graph-merge.utils.ts": {
|
|
306
|
+
"types": "./src/route-renderer/orchestration/page-browser-graph/page-browser-graph-merge.utils.d.ts",
|
|
307
|
+
"default": "./src/route-renderer/orchestration/page-browser-graph/page-browser-graph-merge.utils.js"
|
|
308
|
+
},
|
|
309
|
+
"./route-renderer/orchestration/foreign-child/owning-renderer-resolution.ts": {
|
|
310
|
+
"types": "./src/route-renderer/orchestration/foreign-child/owning-renderer-resolution.d.ts",
|
|
311
|
+
"default": "./src/route-renderer/orchestration/foreign-child/owning-renderer-resolution.js"
|
|
292
312
|
},
|
|
293
313
|
"./router/navigation-coordinator.ts": {
|
|
294
314
|
"types": "./src/router/client/navigation-coordinator.d.ts",
|
|
@@ -337,6 +357,10 @@
|
|
|
337
357
|
"types": "./src/config/constants.d.ts",
|
|
338
358
|
"default": "./src/config/constants.js"
|
|
339
359
|
},
|
|
360
|
+
"./diagnostics/startup-trace.ts": {
|
|
361
|
+
"types": "./src/diagnostics/startup-trace.d.ts",
|
|
362
|
+
"default": "./src/diagnostics/startup-trace.js"
|
|
363
|
+
},
|
|
340
364
|
"./bun.ts": {
|
|
341
365
|
"types": "./src/adapters/bun/index.d.ts",
|
|
342
366
|
"default": "./src/adapters/bun/index.js"
|
|
@@ -345,6 +369,10 @@
|
|
|
345
369
|
"types": "./src/hmr/hmr-strategy.d.ts",
|
|
346
370
|
"default": "./src/hmr/hmr-strategy.js"
|
|
347
371
|
},
|
|
372
|
+
"./hmr/hmr-file-change-prep.ts": {
|
|
373
|
+
"types": "./src/hmr/hmr-file-change-prep.d.ts",
|
|
374
|
+
"default": "./src/hmr/hmr-file-change-prep.js"
|
|
375
|
+
},
|
|
348
376
|
"./hmr/client/hmr-runtime.ts": {
|
|
349
377
|
"types": "./src/hmr/client/hmr-runtime.d.ts",
|
|
350
378
|
"default": "./src/hmr/client/hmr-runtime.js"
|
|
@@ -386,52 +414,48 @@
|
|
|
386
414
|
"default": "./src/plugins/source-transform.js"
|
|
387
415
|
},
|
|
388
416
|
"./build/build-types.ts": {
|
|
389
|
-
"types": "./src/build/build-types.d.ts",
|
|
390
|
-
"default": "./src/build/build-types.js"
|
|
417
|
+
"types": "./src/build/contracts/build-types.d.ts",
|
|
418
|
+
"default": "./src/build/contracts/build-types.js"
|
|
391
419
|
},
|
|
392
420
|
"./build/build-adapter.ts": {
|
|
393
421
|
"types": "./src/build/build-adapter.d.ts",
|
|
394
422
|
"default": "./src/build/build-adapter.js"
|
|
395
423
|
},
|
|
396
|
-
"./build/runtime-build-executor.ts": {
|
|
397
|
-
"types": "./src/build/runtime-build-executor.d.ts",
|
|
398
|
-
"default": "./src/build/runtime-build-executor.js"
|
|
399
|
-
},
|
|
400
424
|
"./build/build-runtime.ts": {
|
|
401
|
-
"types": "./src/build/build-runtime.d.ts",
|
|
402
|
-
"default": "./src/build/build-runtime.js"
|
|
425
|
+
"types": "./src/build/runtime/build-runtime.d.ts",
|
|
426
|
+
"default": "./src/build/runtime/build-runtime.js"
|
|
403
427
|
},
|
|
404
428
|
"./build/build-contracts.ts": {
|
|
405
|
-
"types": "./src/build/build-contracts.d.ts",
|
|
406
|
-
"default": "./src/build/build-contracts.js"
|
|
429
|
+
"types": "./src/build/contracts/build-contracts.d.ts",
|
|
430
|
+
"default": "./src/build/contracts/build-contracts.js"
|
|
407
431
|
},
|
|
408
432
|
"./build/production-build-cache.ts": {
|
|
409
|
-
"types": "./src/build/production-build-cache.d.ts",
|
|
410
|
-
"default": "./src/build/production-build-cache.js"
|
|
433
|
+
"types": "./src/build/cache/production-build-cache.d.ts",
|
|
434
|
+
"default": "./src/build/cache/production-build-cache.js"
|
|
411
435
|
},
|
|
412
436
|
"./build/server-entry-build-cache.ts": {
|
|
413
|
-
"types": "./src/build/server-entry-build-cache.d.ts",
|
|
414
|
-
"default": "./src/build/server-entry-build-cache.js"
|
|
437
|
+
"types": "./src/build/cache/server-entry-build-cache.d.ts",
|
|
438
|
+
"default": "./src/build/cache/server-entry-build-cache.js"
|
|
415
439
|
},
|
|
416
440
|
"./build/runtime-build-output-normalizer.ts": {
|
|
417
|
-
"types": "./src/build/runtime-build-output-normalizer.d.ts",
|
|
418
|
-
"default": "./src/build/runtime-build-output-normalizer.js"
|
|
441
|
+
"types": "./src/build/rolldown/runtime-build-output-normalizer.d.ts",
|
|
442
|
+
"default": "./src/build/rolldown/runtime-build-output-normalizer.js"
|
|
419
443
|
},
|
|
420
444
|
"./build/browser-runtime-manifest.ts": {
|
|
421
|
-
"types": "./src/build/browser-runtime-manifest.d.ts",
|
|
422
|
-
"default": "./src/build/browser-runtime-manifest.js"
|
|
445
|
+
"types": "./src/build/browser/browser-runtime-manifest.d.ts",
|
|
446
|
+
"default": "./src/build/browser/browser-runtime-manifest.js"
|
|
423
447
|
},
|
|
424
448
|
"./build/browser-runtime-plugin.ts": {
|
|
425
|
-
"types": "./src/build/browser-runtime-plugin.d.ts",
|
|
426
|
-
"default": "./src/build/browser-runtime-plugin.js"
|
|
449
|
+
"types": "./src/build/browser/browser-runtime-plugin.d.ts",
|
|
450
|
+
"default": "./src/build/browser/browser-runtime-plugin.js"
|
|
427
451
|
},
|
|
428
452
|
"./build/jsx-ownership-plugins.ts": {
|
|
429
|
-
"types": "./src/build/jsx-ownership-plugins.d.ts",
|
|
430
|
-
"default": "./src/build/jsx-ownership-plugins.js"
|
|
453
|
+
"types": "./src/build/browser/jsx-ownership-plugins.d.ts",
|
|
454
|
+
"default": "./src/build/browser/jsx-ownership-plugins.js"
|
|
431
455
|
},
|
|
432
456
|
"./build/lit-static-render-worker-context.ts": {
|
|
433
|
-
"types": "./src/build/lit-static-render-worker-context.d.ts",
|
|
434
|
-
"default": "./src/build/lit-static-render-worker-context.js"
|
|
457
|
+
"types": "./src/build/browser/lit-static-render-worker-context.d.ts",
|
|
458
|
+
"default": "./src/build/browser/lit-static-render-worker-context.js"
|
|
435
459
|
},
|
|
436
460
|
"./cache.ts": {
|
|
437
461
|
"types": "./src/cache/index.d.ts",
|
|
@@ -6,7 +6,7 @@ import { createRequire } from "../../utils/locals-utils.js";
|
|
|
6
6
|
import { findWebSocketRoute } from "../abstract/ws-pattern-matcher.js";
|
|
7
7
|
import { fileSystem } from "@ecopages/file-system";
|
|
8
8
|
import { setupAppRuntimePlugins } from "../../build/build-adapter.js";
|
|
9
|
-
import {
|
|
9
|
+
import { installBuildRuntime } from "../../build/runtime/build-runtime.js";
|
|
10
10
|
import { StaticSiteGenerator } from "../../static-site-generator/static-site-generator.js";
|
|
11
11
|
import { ProjectWatcher } from "../../watchers/project-watcher.js";
|
|
12
12
|
import { SharedServerAdapter } from "../shared/server-adapter.js";
|
|
@@ -156,7 +156,7 @@ class BunServerAdapter extends SharedServerAdapter {
|
|
|
156
156
|
* Initializes the server adapter's core runtime components.
|
|
157
157
|
*/
|
|
158
158
|
async initialize() {
|
|
159
|
-
|
|
159
|
+
installBuildRuntime(this.appConfig);
|
|
160
160
|
this.staticSiteGenerator = new StaticSiteGenerator({ appConfig: this.appConfig });
|
|
161
161
|
prepareRuntimePublicDir(this.appConfig);
|
|
162
162
|
const staticBuilderOptions = {
|
|
@@ -2,7 +2,7 @@ import {} from "node:http";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { fileSystem } from "@ecopages/file-system";
|
|
4
4
|
import { setupAppRuntimePlugins } from "../../build/build-adapter.js";
|
|
5
|
-
import {
|
|
5
|
+
import { installBuildRuntime } from "../../build/runtime/build-runtime.js";
|
|
6
6
|
import { appLogger } from "../../global/app-logger.js";
|
|
7
7
|
import { NodeClientBridge } from "./node-client-bridge.js";
|
|
8
8
|
import { NodeHmrManager } from "./node-hmr-manager.js";
|
|
@@ -114,7 +114,7 @@ class NodeServerAdapter extends SharedServerAdapter {
|
|
|
114
114
|
* processors during their `setup()` calls.
|
|
115
115
|
*/
|
|
116
116
|
async initialize() {
|
|
117
|
-
|
|
117
|
+
installBuildRuntime(this.appConfig);
|
|
118
118
|
prepareRuntimePublicDir(this.appConfig);
|
|
119
119
|
if (!this.deferRuntimeAssetSetup) {
|
|
120
120
|
await setupAppRuntimePlugins({
|
|
@@ -35,6 +35,16 @@ export declare class HmrEntrypointRegistrar {
|
|
|
35
35
|
getRegistered(): ReadonlyMap<string, ResolvedHmrEntrypoint>;
|
|
36
36
|
getWatchedFiles(): Map<string, string>;
|
|
37
37
|
clearRegistration(entrypointPath: string): void;
|
|
38
|
+
/**
|
|
39
|
+
* Registers an already-materialized HMR entrypoint without running the emit hook.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Cold dev batches build entrypoints in grouped Rolldown passes and then seed
|
|
43
|
+
* the registrar so the first SSR can resolve the artifact without rebuilding.
|
|
44
|
+
* The source path is committed verbatim so `getResolvedScriptOutput()` and the
|
|
45
|
+
* file watcher see it as a regular watched entrypoint.
|
|
46
|
+
*/
|
|
47
|
+
seedResolvedEntrypoint(resolved: ResolvedHmrEntrypoint): void;
|
|
38
48
|
clearAll(): void;
|
|
39
49
|
/**
|
|
40
50
|
* Registers a single source entrypoint and returns its verified HMR artifact.
|
|
@@ -24,6 +24,22 @@ class HmrEntrypointRegistrar {
|
|
|
24
24
|
clearRegistration(entrypointPath) {
|
|
25
25
|
this.registered.delete(path.resolve(entrypointPath));
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Registers an already-materialized HMR entrypoint without running the emit hook.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Cold dev batches build entrypoints in grouped Rolldown passes and then seed
|
|
32
|
+
* the registrar so the first SSR can resolve the artifact without rebuilding.
|
|
33
|
+
* The source path is committed verbatim so `getResolvedScriptOutput()` and the
|
|
34
|
+
* file watcher see it as a regular watched entrypoint.
|
|
35
|
+
*/
|
|
36
|
+
seedResolvedEntrypoint(resolved) {
|
|
37
|
+
this.registered.set(path.resolve(resolved.sourcePath), {
|
|
38
|
+
sourcePath: resolved.sourcePath,
|
|
39
|
+
outputPath: resolved.outputPath,
|
|
40
|
+
outputUrl: resolved.outputUrl
|
|
41
|
+
});
|
|
42
|
+
}
|
|
27
43
|
clearAll() {
|
|
28
44
|
this.inFlight.clear();
|
|
29
45
|
this.registered.clear();
|
|
@@ -58,23 +74,31 @@ class HmrEntrypointRegistrar {
|
|
|
58
74
|
}
|
|
59
75
|
}
|
|
60
76
|
async registerEntrypointInternal(entrypointPath, registrationOptions) {
|
|
77
|
+
const previous = this.registered.get(entrypointPath);
|
|
61
78
|
const { outputPath, outputUrl } = resolveHmrEntrypointOutputPaths(
|
|
62
79
|
this.options.srcDir,
|
|
63
80
|
this.options.distDir,
|
|
64
81
|
entrypointPath
|
|
65
82
|
);
|
|
66
83
|
removeStaleHmrEntrypointOutput(outputPath, "HMR");
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
84
|
+
try {
|
|
85
|
+
await registrationOptions.emit(entrypointPath, outputPath);
|
|
86
|
+
if (!fileSystem.exists(outputPath)) {
|
|
87
|
+
throw registrationOptions.getMissingOutputError(entrypointPath, outputPath);
|
|
88
|
+
}
|
|
89
|
+
const resolved = {
|
|
90
|
+
sourcePath: entrypointPath,
|
|
91
|
+
outputPath,
|
|
92
|
+
outputUrl
|
|
93
|
+
};
|
|
94
|
+
this.registered.set(entrypointPath, resolved);
|
|
95
|
+
return resolved;
|
|
96
|
+
} catch (error) {
|
|
97
|
+
if (previous && fileSystem.exists(previous.outputPath)) {
|
|
98
|
+
this.registered.set(entrypointPath, previous);
|
|
99
|
+
}
|
|
100
|
+
throw error;
|
|
70
101
|
}
|
|
71
|
-
const resolved = {
|
|
72
|
-
sourcePath: entrypointPath,
|
|
73
|
-
outputPath,
|
|
74
|
-
outputUrl
|
|
75
|
-
};
|
|
76
|
-
this.registered.set(entrypointPath, resolved);
|
|
77
|
-
return resolved;
|
|
78
102
|
}
|
|
79
103
|
}
|
|
80
104
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { fileSystem } from "@ecopages/file-system";
|
|
3
3
|
import { RESOLVED_ASSETS_DIR } from "../../config/constants.js";
|
|
4
|
-
import { disposeAppBuildRuntime } from "../../build/build-runtime.js";
|
|
4
|
+
import { disposeAppBuildRuntime } from "../../build/runtime/build-runtime.js";
|
|
5
5
|
import { copyRuntimePublicDirIfChanged } from "./copy-runtime-public-dir.js";
|
|
6
6
|
import { clearAppDevClientBridge } from "../../dev/client-bridge-registry.js";
|
|
7
7
|
import { clearAppHmrManager } from "../../dev/hmr-manager-registry.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EcoPagesAppConfig, IHmrManager } from '../../types/internal-types.js';
|
|
2
|
-
import type { EcoBuildPlugin } from '../../build/build-types.js';
|
|
2
|
+
import type { EcoBuildPlugin } from '../../build/contracts/build-types.js';
|
|
3
3
|
import type { StaticRoute } from '../../types/public-types.js';
|
|
4
4
|
import type { RouteRegistry } from '../../router/server/route-registry.js';
|
|
5
5
|
import type { StaticSiteGenerator } from '../../static-site-generator/static-site-generator.js';
|
|
@@ -34,6 +34,7 @@ export interface ServerStaticBuilderParams {
|
|
|
34
34
|
export interface ServerStaticBuilderLogger {
|
|
35
35
|
warn(message: string, detail?: string): unknown;
|
|
36
36
|
info(message: string): unknown;
|
|
37
|
+
debug(message: string): unknown;
|
|
37
38
|
error(message: string): unknown;
|
|
38
39
|
}
|
|
39
40
|
/**
|
|
@@ -3,15 +3,15 @@ import { fileSystem } from "@ecopages/file-system";
|
|
|
3
3
|
import { DEFAULT_ECOPAGES_HOSTNAME, DEFAULT_ECOPAGES_PORT } from "../../config/constants.js";
|
|
4
4
|
import { appLogger } from "../../global/app-logger.js";
|
|
5
5
|
import { build, getAppBuildAdapter, setupAppRuntimePlugins } from "../../build/build-adapter.js";
|
|
6
|
+
import { createServerBuildRequest } from "../../build/runtime/build-request-policy.js";
|
|
7
|
+
import { requireBuildRuntime } from "../../build/runtime/build-runtime.js";
|
|
6
8
|
import { attachHmrToIntegrations } from "./runtime-server-lifecycle.js";
|
|
7
|
-
import { resolveBuildProfileOptions } from "../../build/build-profile-options.js";
|
|
8
9
|
import {
|
|
9
10
|
getServerBundleOutputPaths,
|
|
10
11
|
lookupServerEntryBuildCache,
|
|
11
12
|
recordServerEntryBuildCache,
|
|
12
13
|
writeServerBundleDeployManifest
|
|
13
|
-
} from "../../build/server-entry-build-cache.js";
|
|
14
|
-
import { getInstalledServerEntryBuildExecutor } from "../../build/runtime-build-executor.js";
|
|
14
|
+
} from "../../build/cache/server-entry-build-cache.js";
|
|
15
15
|
import {
|
|
16
16
|
clearProductionBuildCaches,
|
|
17
17
|
shouldResetStaticExportDirectory
|
|
@@ -134,16 +134,14 @@ class ServerStaticBuilder {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
this.logger.info("Bundling server entry file...");
|
|
137
|
-
const buildOptions = {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
};
|
|
146
|
-
const result = await build(buildOptions, getInstalledServerEntryBuildExecutor(this.appConfig));
|
|
137
|
+
const buildOptions = createServerBuildRequest(this.appConfig, {
|
|
138
|
+
profile: "server-entry",
|
|
139
|
+
entrypoints: [entryPath],
|
|
140
|
+
outdir: serverOutdir,
|
|
141
|
+
naming: SERVER_BUNDLE_FILENAME,
|
|
142
|
+
sourcemap: "hidden"
|
|
143
|
+
});
|
|
144
|
+
const result = await build(buildOptions, requireBuildRuntime(this.appConfig).getProfile("server-entry"));
|
|
147
145
|
if (!result.success) {
|
|
148
146
|
const errorMessages = result.logs.map((log) => log.message).join("\n");
|
|
149
147
|
throw new Error(`Failed to bundle server entry file:
|
|
@@ -181,7 +179,11 @@ ${errorMessages}`);
|
|
|
181
179
|
force,
|
|
182
180
|
preserveExportDirectory
|
|
183
181
|
});
|
|
184
|
-
|
|
182
|
+
if (process.env.ECOPAGES_BENCH === "1" && process.env.ECOPAGES_BENCH_VERBOSE !== "1") {
|
|
183
|
+
this.logger.debug("Build completed");
|
|
184
|
+
} else {
|
|
185
|
+
this.logger.info("Build completed");
|
|
186
|
+
}
|
|
185
187
|
}
|
|
186
188
|
}
|
|
187
189
|
export {
|
|
@@ -3,14 +3,12 @@ import { type ResolvedHmrEntrypoint } from '../../hmr/hmr-entrypoint-output.js';
|
|
|
3
3
|
import type { DefaultHmrContext, EcoPagesAppConfig, IHmrManager, IClientBridge } from '../../types/internal-types.js';
|
|
4
4
|
import { type HmrStrategy } from '../../hmr/hmr-strategy.js';
|
|
5
5
|
import { DevelopmentInvalidationService } from '../../services/invalidation/development-invalidation.service.js';
|
|
6
|
-
import type { ClientBridgeEvent } from '../../types/public-types.js';
|
|
6
|
+
import type { ClientBridgeEvent, HmrFileChangeOptions } from '../../types/public-types.js';
|
|
7
7
|
import { HmrEntrypointRegistrar } from './hmr-entrypoint-registrar.js';
|
|
8
8
|
import { BrowserBundleService } from '../../services/assets/browser-bundle.service.js';
|
|
9
9
|
import { type EntrypointDependencyGraph } from '../../services/runtime-state/entrypoint-dependency-graph.service.js';
|
|
10
10
|
import type { ServerModuleTranspiler } from '../../services/module-loading/server-module-transpiler.service.js';
|
|
11
|
-
type HandleFileChangeOptions =
|
|
12
|
-
broadcast?: boolean;
|
|
13
|
-
};
|
|
11
|
+
type HandleFileChangeOptions = HmrFileChangeOptions;
|
|
14
12
|
type SharedHmrManagerParams = {
|
|
15
13
|
appConfig: EcoPagesAppConfig;
|
|
16
14
|
bridge: IClientBridge;
|
|
@@ -71,6 +69,15 @@ export declare abstract class SharedHmrManager implements IHmrManager {
|
|
|
71
69
|
*/
|
|
72
70
|
private prepareRegisteredScriptChange;
|
|
73
71
|
getOutputUrl(entrypointPath: string): string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Registers an already-materialized HMR entrypoint without rebuilding it.
|
|
74
|
+
*
|
|
75
|
+
* @remarks
|
|
76
|
+
* Cold dev batches build grouped Rolldown passes up front and then seed the
|
|
77
|
+
* registrar so the first SSR resolves the artifact from disk. The entrypoint
|
|
78
|
+
* is also added to the watched files so subsequent source edits still rebuild.
|
|
79
|
+
*/
|
|
80
|
+
seedResolvedEntrypoint(resolved: ResolvedHmrEntrypoint): void;
|
|
74
81
|
/**
|
|
75
82
|
* Returns the emitted HMR script output when the entrypoint is already registered
|
|
76
83
|
* and its browser bundle exists on disk.
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
isRegisteredScriptEntrypoint,
|
|
8
8
|
isBrowserOnlyRegisteredScriptEntrypoint
|
|
9
9
|
} from "../../hmr/hmr-entrypoint-output.js";
|
|
10
|
-
import { requireBuildRuntime } from "../../build/build-runtime.js";
|
|
10
|
+
import { requireBuildRuntime } from "../../build/runtime/build-runtime.js";
|
|
11
11
|
import { fileSystem } from "@ecopages/file-system";
|
|
12
12
|
import { HmrStrategyType } from "../../hmr/hmr-strategy.js";
|
|
13
13
|
import { DefaultHmrStrategy } from "../../hmr/strategies/default-hmr-strategy.js";
|
|
@@ -181,6 +181,7 @@ class SharedHmrManager {
|
|
|
181
181
|
if (isRegisteredScriptEntrypoint(this.entrypointRegistrar.getRegistered(), resolvedFilePath)) {
|
|
182
182
|
await this.prepareRegisteredScriptChange(resolvedFilePath);
|
|
183
183
|
}
|
|
184
|
+
const shouldBroadcast = options.broadcast ?? true;
|
|
184
185
|
const strategy = this.selectChangeStrategy(filePath);
|
|
185
186
|
if (!strategy) {
|
|
186
187
|
appLogger.warn(`[HMR] No strategy found for ${filePath}`);
|
|
@@ -188,10 +189,16 @@ class SharedHmrManager {
|
|
|
188
189
|
}
|
|
189
190
|
appLogger.debug(`[${this.constructor.name}] Selected strategy: ${strategy.constructor.name}`);
|
|
190
191
|
const action = await strategy.process(filePath);
|
|
191
|
-
const shouldBroadcast = options.broadcast ?? true;
|
|
192
192
|
if (shouldBroadcast && action.type === "broadcast" && action.events) {
|
|
193
|
+
if (this.bridge.subscriberCount === 0) {
|
|
194
|
+
appLogger.debug(
|
|
195
|
+
`[${this.constructor.name}] Deferring HMR client broadcast for ${filePath} until a subscriber connects`
|
|
196
|
+
);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
193
199
|
for (const event of action.events) {
|
|
194
|
-
|
|
200
|
+
const graphIdentities = event.graphIdentities ?? options.graphIdentities;
|
|
201
|
+
this.broadcast(graphIdentities === void 0 ? event : { ...event, graphIdentities });
|
|
195
202
|
}
|
|
196
203
|
}
|
|
197
204
|
}
|
|
@@ -282,6 +289,17 @@ class SharedHmrManager {
|
|
|
282
289
|
getOutputUrl(entrypointPath) {
|
|
283
290
|
return this.entrypointRegistrar.getRegistered().get(path.resolve(entrypointPath))?.outputUrl;
|
|
284
291
|
}
|
|
292
|
+
/**
|
|
293
|
+
* Registers an already-materialized HMR entrypoint without rebuilding it.
|
|
294
|
+
*
|
|
295
|
+
* @remarks
|
|
296
|
+
* Cold dev batches build grouped Rolldown passes up front and then seed the
|
|
297
|
+
* registrar so the first SSR resolves the artifact from disk. The entrypoint
|
|
298
|
+
* is also added to the watched files so subsequent source edits still rebuild.
|
|
299
|
+
*/
|
|
300
|
+
seedResolvedEntrypoint(resolved) {
|
|
301
|
+
this.entrypointRegistrar.seedResolvedEntrypoint(resolved);
|
|
302
|
+
}
|
|
285
303
|
/**
|
|
286
304
|
* Returns the emitted HMR script output when the entrypoint is already registered
|
|
287
305
|
* and its browser bundle exists on disk.
|
|
@@ -314,6 +332,7 @@ class SharedHmrManager {
|
|
|
314
332
|
getBuildExecutor: () => requireBuildRuntime(this.appConfig).getProfile("browser-hmr"),
|
|
315
333
|
getBrowserBundleService: () => this.browserBundleService,
|
|
316
334
|
getEntrypointDependencyGraph: () => this.entrypointDependencyGraph,
|
|
335
|
+
seedResolvedEntrypoint: (resolved) => this.seedResolvedEntrypoint(resolved),
|
|
317
336
|
importServerModule: async (filePath) => await this.serverModuleTranspiler.importModule({
|
|
318
337
|
filePath,
|
|
319
338
|
outdir: path.join(resolveInternalExecutionDir(this.appConfig), ".server-modules"),
|