@ecopages/core 0.2.0-rc.1 → 0.2.0-rc.11

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.
Files changed (278) hide show
  1. package/README.md +50 -41
  2. package/package.json +50 -145
  3. package/src/adapters/README.md +11 -3
  4. package/src/adapters/abstract/application-adapter.d.ts +32 -36
  5. package/src/adapters/abstract/application-adapter.js +61 -47
  6. package/src/adapters/abstract/segment-path-matcher.js +56 -38
  7. package/src/adapters/abstract/server-adapter.d.ts +14 -0
  8. package/src/adapters/abstract/server-adapter.js +10 -0
  9. package/src/adapters/abstract/ws-pattern-matcher.d.ts +0 -5
  10. package/src/adapters/abstract/ws-pattern-matcher.js +0 -9
  11. package/src/adapters/bun/create-app.d.ts +15 -15
  12. package/src/adapters/bun/create-app.js +52 -67
  13. package/src/adapters/bun/hmr-manager.d.ts +0 -1
  14. package/src/adapters/bun/hmr-manager.js +2 -4
  15. package/src/adapters/bun/server-adapter.d.ts +15 -21
  16. package/src/adapters/bun/server-adapter.js +33 -67
  17. package/src/adapters/bun/static-preview-host.d.ts +1 -0
  18. package/src/adapters/bun/static-preview-host.js +1 -1
  19. package/src/adapters/create-app.d.ts +63 -8
  20. package/src/adapters/create-app.js +62 -5
  21. package/src/adapters/node/create-app.d.ts +8 -12
  22. package/src/adapters/node/create-app.js +22 -14
  23. package/src/adapters/node/runtime-host.d.ts +10 -10
  24. package/src/adapters/node/runtime-host.js +13 -8
  25. package/src/adapters/node/server-adapter-dependencies.d.ts +2 -10
  26. package/src/adapters/node/server-adapter-dependencies.js +8 -13
  27. package/src/adapters/node/server-adapter.d.ts +30 -32
  28. package/src/adapters/node/server-adapter.js +59 -65
  29. package/src/adapters/shared/hmr/shared-hmr-manager.d.ts +0 -4
  30. package/src/adapters/shared/hmr/shared-hmr-manager.js +0 -12
  31. package/src/adapters/shared/http/api-request-pipeline.d.ts +27 -1
  32. package/src/adapters/shared/http/api-request-pipeline.js +31 -16
  33. package/src/adapters/shared/http/explicit-static-route-matcher.js +5 -2
  34. package/src/adapters/shared/http/fs-server-response-factory.d.ts +2 -9
  35. package/src/adapters/shared/http/fs-server-response-factory.js +5 -33
  36. package/src/adapters/shared/http/fs-server-response-matcher.d.ts +24 -24
  37. package/src/adapters/shared/http/fs-server-response-matcher.js +59 -83
  38. package/src/adapters/shared/runtime/application-adapter.d.ts +1 -0
  39. package/src/adapters/shared/runtime/application-adapter.js +12 -0
  40. package/src/adapters/shared/runtime/bind-runtime-server.d.ts +17 -0
  41. package/src/adapters/shared/runtime/bind-runtime-server.js +50 -0
  42. package/src/adapters/shared/runtime/collect-dev-prewarm-plan.d.ts +1 -3
  43. package/src/adapters/shared/runtime/collect-dev-prewarm-plan.js +1 -4
  44. package/src/adapters/shared/runtime/port-manager-default-prompt.d.ts +6 -0
  45. package/src/adapters/shared/runtime/port-manager-default-prompt.js +41 -0
  46. package/src/adapters/shared/runtime/port-manager.d.ts +3 -3
  47. package/src/adapters/shared/runtime/port-manager.js +14 -45
  48. package/src/adapters/shared/runtime/runtime-app-bootstrap.d.ts +0 -10
  49. package/src/adapters/shared/runtime/runtime-app-bootstrap.js +0 -7
  50. package/src/adapters/shared/runtime/runtime-host.d.ts +5 -2
  51. package/src/adapters/shared/runtime/runtime-server-lifecycle.d.ts +1 -1
  52. package/src/adapters/shared/runtime/runtime-server-lifecycle.js +1 -1
  53. package/src/adapters/shared/runtime/server-adapter.d.ts +27 -5
  54. package/src/adapters/shared/runtime/server-adapter.js +44 -30
  55. package/src/adapters/shared/runtime/server-route-handler.js +11 -3
  56. package/src/adapters/shared/runtime/server-static-builder.d.ts +9 -3
  57. package/src/adapters/shared/runtime/server-static-builder.js +59 -37
  58. package/src/adapters/shared/ws/node-http-websocket-upgrades.d.ts +9 -1
  59. package/src/adapters/shared/ws/node-http-websocket-upgrades.js +8 -2
  60. package/src/build/README.md +9 -6
  61. package/src/build/cache/cache-constants.d.ts +0 -2
  62. package/src/build/cache/cache-constants.js +0 -2
  63. package/src/build/cache/cache-keys.d.ts +0 -2
  64. package/src/build/cache/cache-keys.js +0 -2
  65. package/src/build/cache/output-imports.d.ts +27 -0
  66. package/src/build/cache/output-imports.js +80 -0
  67. package/src/build/cache/pages-unified-graph-build.d.ts +6 -1
  68. package/src/build/cache/pages-unified-graph-build.js +42 -17
  69. package/src/build/cache/production-build-cache.d.ts +2 -2
  70. package/src/build/cache/production-build-cache.js +2 -2
  71. package/src/build/cache/server-entry-build-cache.d.ts +25 -3
  72. package/src/build/cache/server-entry-build-cache.js +129 -13
  73. package/src/build/contracts/build-contracts.d.ts +1 -13
  74. package/src/build/contracts/content-virtual-modules.d.ts +3 -1
  75. package/src/build/contracts/content-virtual-modules.js +8 -0
  76. package/src/build/rolldown/rolldown-adapter-helpers.js +41 -25
  77. package/src/build/rolldown/rolldown-plugin-bridge.js +25 -21
  78. package/src/build/rolldown/runtime-build-output-normalizer.js +3 -6
  79. package/src/build/runtime/build-request-identity.d.ts +2 -6
  80. package/src/build/runtime/build-request-identity.js +2 -8
  81. package/src/build/runtime/build-request-policy.js +1 -1
  82. package/src/build/runtime/deduping-build-executor.d.ts +0 -1
  83. package/src/build/runtime/deduping-build-executor.js +0 -1
  84. package/src/build/server-bundle-publication.d.ts +14 -0
  85. package/src/build/server-bundle-publication.js +49 -0
  86. package/src/cache/index.d.ts +1 -1
  87. package/src/cache/index.js +1 -1
  88. package/src/cache/module-parse-cache.d.ts +2 -29
  89. package/src/cache/module-parse-cache.js +6 -39
  90. package/src/config/README.md +17 -2
  91. package/src/config/apply-user-config.d.ts +8 -0
  92. package/src/config/apply-user-config.js +68 -0
  93. package/src/config/config-builder.d.ts +11 -1
  94. package/src/config/config-builder.js +53 -12
  95. package/src/config/constants.d.ts +4 -4
  96. package/src/config/constants.js +4 -4
  97. package/src/config/define-config.d.ts +9 -0
  98. package/src/config/define-config.js +10 -0
  99. package/src/config/index.d.ts +5 -0
  100. package/src/config/index.js +4 -0
  101. package/src/config/is-finalized-app-config.d.ts +6 -0
  102. package/src/config/is-finalized-app-config.js +11 -0
  103. package/src/config/load-eco-config.d.ts +21 -0
  104. package/src/config/load-eco-config.js +107 -0
  105. package/src/config/resolve-eco-config-path.d.ts +32 -0
  106. package/src/config/resolve-eco-config-path.js +58 -0
  107. package/src/config/server-config-bundle.d.ts +25 -0
  108. package/src/config/server-config-bundle.js +148 -0
  109. package/src/config/user-config-types.d.ts +170 -0
  110. package/src/config/user-config-types.js +1 -0
  111. package/src/css-imports.d.ts +4 -0
  112. package/src/declarations.d.ts +11 -5
  113. package/src/dev/README.md +6 -0
  114. package/src/dev/development-restart-watch-paths.d.ts +13 -0
  115. package/src/dev/development-restart-watch-paths.js +37 -0
  116. package/src/dev/development-restart.d.ts +13 -0
  117. package/src/dev/development-restart.js +21 -0
  118. package/src/dev/host-runtime.d.ts +0 -1
  119. package/src/dev/host-runtime.js +0 -3
  120. package/src/dev/sc-server.d.ts +4 -1
  121. package/src/dev/sc-server.js +11 -20
  122. package/src/dev/transform-server/dev-transform-import-rewriter.js +2 -2
  123. package/src/dev/transform-server/dev-transform-server.d.ts +6 -0
  124. package/src/dev/transform-server/dev-transform-server.js +16 -5
  125. package/src/eco/README.md +73 -5
  126. package/src/eco/component-identity.d.ts +3 -2
  127. package/src/eco/component-identity.js +5 -2
  128. package/src/eco/discovered-dependencies.d.ts +45 -0
  129. package/src/eco/discovered-dependencies.js +87 -0
  130. package/src/eco/eco.js +6 -0
  131. package/src/eco/eco.types.d.ts +18 -2
  132. package/src/eco/lazy-injector-map.js +57 -41
  133. package/src/eco/page-dependency-contributions.d.ts +19 -0
  134. package/src/eco/page-dependency-contributions.js +52 -0
  135. package/src/errors/http-error-page-contract.d.ts +77 -0
  136. package/src/errors/http-error-page-contract.js +106 -0
  137. package/src/hmr/hmr-file-change-prep.d.ts +0 -1
  138. package/src/hmr/hmr-file-change-prep.js +2 -5
  139. package/src/hmr/hmr-strategy.d.ts +3 -8
  140. package/src/hmr/hmr-strategy.js +3 -8
  141. package/src/hmr/strategies/js-hmr-strategy.d.ts +2 -0
  142. package/src/hmr/strategies/js-hmr-strategy.js +24 -16
  143. package/src/index.browser.d.ts +2 -0
  144. package/src/index.browser.js +2 -0
  145. package/src/index.d.ts +5 -3
  146. package/src/index.js +5 -3
  147. package/src/islands/README.md +5 -1
  148. package/src/islands/island-host.d.ts +0 -9
  149. package/src/islands/island-host.js +1 -13
  150. package/src/plugins/README.md +8 -1
  151. package/src/plugins/component-import-discovery.d.ts +19 -0
  152. package/src/plugins/component-import-discovery.js +241 -0
  153. package/src/plugins/eco-component-meta-plugin.d.ts +3 -1
  154. package/src/plugins/eco-component-meta-plugin.js +120 -18
  155. package/src/plugins/integration-plugin.d.ts +0 -1
  156. package/src/plugins/integration-plugin.js +0 -4
  157. package/src/plugins/processor.d.ts +10 -2
  158. package/src/plugins/processor.js +4 -0
  159. package/src/plugins/tsconfig-import-resolver.d.ts +3 -1
  160. package/src/plugins/tsconfig-import-resolver.js +4 -2
  161. package/src/route-renderer/GRAPH.md +1 -1
  162. package/src/route-renderer/README.md +15 -2
  163. package/src/{adapters/shared/http/explicit-static-render-preparation.d.ts → route-renderer/explicit-view-render-preparation.d.ts} +3 -3
  164. package/src/route-renderer/orchestration/custom-element-scripts/README.md +9 -0
  165. package/src/route-renderer/orchestration/custom-element-scripts/custom-element-script-preload-invalidation.d.ts +16 -0
  166. package/src/route-renderer/orchestration/custom-element-scripts/custom-element-script-preload-invalidation.js +34 -0
  167. package/src/route-renderer/orchestration/custom-element-scripts/custom-element-script-preloader.d.ts +80 -0
  168. package/src/route-renderer/orchestration/custom-element-scripts/custom-element-script-preloader.js +190 -0
  169. package/src/route-renderer/orchestration/custom-element-scripts/custom-element-server-module-importer.d.ts +17 -0
  170. package/src/route-renderer/orchestration/custom-element-scripts/custom-element-server-module-importer.js +41 -0
  171. package/src/route-renderer/orchestration/custom-element-scripts/custom-element-ssr-preload-entrypoint.d.ts +10 -0
  172. package/src/route-renderer/orchestration/custom-element-scripts/custom-element-ssr-preload-entrypoint.js +46 -0
  173. package/src/route-renderer/orchestration/document-shell/document-shell-render.service.d.ts +7 -2
  174. package/src/route-renderer/orchestration/document-shell/document-shell-render.service.js +3 -4
  175. package/src/route-renderer/orchestration/foreign-child/foreign-subtree-execution.service.d.ts +11 -2
  176. package/src/route-renderer/orchestration/foreign-child/foreign-subtree-execution.service.js +10 -2
  177. package/src/route-renderer/orchestration/integration-renderer.d.ts +9 -11
  178. package/src/route-renderer/orchestration/integration-renderer.js +43 -40
  179. package/src/route-renderer/orchestration/integration-renderer.test-fixtures.js +1 -1
  180. package/src/route-renderer/orchestration/ownership-graph/component-graph-collectors.d.ts +2 -5
  181. package/src/route-renderer/orchestration/ownership-graph/component-graph-collectors.js +2 -68
  182. package/src/route-renderer/orchestration/ownership-graph/component-graph.js +55 -39
  183. package/src/route-renderer/orchestration/page-browser-graph/page-browser-graph-session.d.ts +1 -1
  184. package/src/route-renderer/orchestration/page-browser-graph/page-browser-graph-session.js +1 -1
  185. package/src/route-renderer/orchestration/page-browser-graph/page-browser-graph.service.d.ts +6 -0
  186. package/src/route-renderer/orchestration/page-browser-graph/page-browser-graph.service.js +59 -36
  187. package/src/route-renderer/orchestration/route-pipeline/route-render-orchestrator.js +8 -10
  188. package/src/route-renderer/orchestration/string-markup-renderer.d.ts +1 -1
  189. package/src/route-renderer/orchestration/string-markup-renderer.js +2 -1
  190. package/src/route-renderer/page-loading/component-dependency-collection.d.ts +6 -2
  191. package/src/route-renderer/page-loading/component-dependency-collection.js +113 -68
  192. package/src/route-renderer/page-loading/ecopages-virtual-imports.js +41 -28
  193. package/src/route-renderer/page-loading/file-scoped-dependency-components.d.ts +10 -3
  194. package/src/route-renderer/page-loading/file-scoped-dependency-components.js +62 -25
  195. package/src/route-renderer/page-loading/page-dependency-bundling.js +14 -8
  196. package/src/route-renderer/page-loading/resolved-page-dependencies.d.ts +1 -2
  197. package/src/route-renderer/page-loading/resolved-page-dependencies.js +8 -7
  198. package/src/route-renderer/route-renderer.d.ts +9 -0
  199. package/src/route-renderer/route-renderer.js +18 -0
  200. package/src/router/README.md +7 -1
  201. package/src/router/server/route-registry.d.ts +13 -0
  202. package/src/router/server/route-registry.js +46 -32
  203. package/src/services/README.md +6 -1
  204. package/src/services/assets/asset-processing-service/browser-runtime-entry-resolution.d.ts +36 -9
  205. package/src/services/assets/asset-processing-service/browser-runtime-entry-resolution.js +122 -37
  206. package/src/services/assets/asset-processing-service/browser-runtime-entry.factory.d.ts +2 -0
  207. package/src/services/assets/asset-processing-service/browser-runtime-entry.factory.js +13 -2
  208. package/src/services/assets/asset-processing-service/page-package.js +42 -39
  209. package/src/services/assets/browser-bundle.service.d.ts +1 -6
  210. package/src/services/error-pages/README.md +9 -0
  211. package/src/services/error-pages/default-error-pages.d.ts +39 -0
  212. package/src/services/error-pages/default-error-pages.js +199 -0
  213. package/src/services/error-pages/error-page-renderer.d.ts +58 -0
  214. package/src/services/error-pages/error-page-renderer.js +146 -0
  215. package/src/services/error-pages/semantic-error-page-exporter.d.ts +23 -0
  216. package/src/services/error-pages/semantic-error-page-exporter.js +35 -0
  217. package/src/services/html/html-rewriter.d.ts +77 -0
  218. package/src/services/html/html-rewriter.js +751 -0
  219. package/src/services/html/html-rewriter.parity.test.bun.d.ts +1 -0
  220. package/src/services/html/html-rewriter.parity.test.bun.js +74 -0
  221. package/src/services/html/html-transformer.service.d.ts +26 -39
  222. package/src/services/html/html-transformer.service.js +81 -153
  223. package/src/services/invalidation/development-invalidation.service.d.ts +9 -20
  224. package/src/services/invalidation/development-invalidation.service.js +35 -41
  225. package/src/services/module-loading/README.md +17 -14
  226. package/src/services/module-loading/app-module-loader.service.d.ts +0 -2
  227. package/src/services/module-loading/app-server-module-transpiler.service.d.ts +1 -1
  228. package/src/services/module-loading/app-server-module-transpiler.service.js +2 -10
  229. package/src/services/module-loading/collection-server-module-build.service.d.ts +1 -1
  230. package/src/services/module-loading/collection-server-module-build.service.js +5 -5
  231. package/src/services/module-loading/host-module-loader-registry.d.ts +0 -1
  232. package/src/services/module-loading/host-module-loader-registry.js +0 -3
  233. package/src/services/module-loading/page-module-import.service.d.ts +8 -0
  234. package/src/services/module-loading/page-module-import.service.js +62 -28
  235. package/src/services/module-loading/route-module-build-cache-registry.d.ts +0 -4
  236. package/src/services/module-loading/route-module-build-cache-registry.js +0 -4
  237. package/src/services/module-loading/route-module-build-cache.store.d.ts +3 -0
  238. package/src/services/module-loading/route-module-build-cache.store.js +18 -5
  239. package/src/services/module-loading/route-module-build-manifest.d.ts +6 -1
  240. package/src/services/module-loading/route-module-build-manifest.js +1 -2
  241. package/src/services/module-loading/route-module-dependency-hasher.d.ts +3 -2
  242. package/src/services/module-loading/route-module-dependency-hasher.js +13 -1
  243. package/src/services/module-loading/server-module-transpiler.service.d.ts +1 -15
  244. package/src/services/module-loading/server-module-transpiler.service.js +0 -24
  245. package/src/services/module-loading/view-module-loader.d.ts +10 -0
  246. package/src/services/module-loading/view-module-loader.js +46 -0
  247. package/src/services/runtime-state/entrypoint-dependency-graph.service.js +0 -12
  248. package/src/services/runtime-state/server-invalidation-state.service.d.ts +4 -2
  249. package/src/services/runtime-state/server-invalidation-state.service.js +7 -14
  250. package/src/services/validation/schema-validation-service.d.ts +1 -0
  251. package/src/services/validation/schema-validation-service.js +23 -36
  252. package/src/static-site-generator/README.md +6 -1
  253. package/src/static-site-generator/static-site-generator.d.ts +7 -2
  254. package/src/static-site-generator/static-site-generator.js +90 -49
  255. package/src/types/internal-types.d.ts +6 -39
  256. package/src/types/public-types.d.ts +29 -131
  257. package/src/utils/parse-cli-args.js +29 -22
  258. package/src/watchers/project-watcher.d.ts +14 -16
  259. package/src/watchers/project-watcher.js +86 -61
  260. package/src/watchers/project-watcher.test-helpers.d.ts +10 -1
  261. package/src/watchers/project-watcher.test-helpers.js +12 -0
  262. package/src/adapters/abstract/router-adapter.d.ts +0 -26
  263. package/src/adapters/abstract/router-adapter.js +0 -13
  264. package/src/adapters/bun/index.d.ts +0 -2
  265. package/src/adapters/bun/index.js +0 -2
  266. package/src/adapters/index.d.ts +0 -2
  267. package/src/adapters/index.js +0 -2
  268. package/src/eco/eco.utils.d.ts +0 -1
  269. package/src/eco/eco.utils.js +0 -1
  270. package/src/services/cache/index.d.ts +0 -9
  271. package/src/services/cache/index.js +0 -8
  272. package/src/services/html/html-rewriter-provider.service.d.ts +0 -40
  273. package/src/services/html/html-rewriter-provider.service.js +0 -68
  274. package/src/services/module-loading/route-module-build-cache.d.ts +0 -4
  275. package/src/services/module-loading/route-module-build-cache.js +0 -3
  276. package/src/services/runtime-state/dev-graph.service.d.ts +0 -118
  277. package/src/services/runtime-state/dev-graph.service.js +0 -170
  278. /package/src/{adapters/shared/http/explicit-static-render-preparation.js → route-renderer/explicit-view-render-preparation.js} +0 -0
@@ -0,0 +1,45 @@
1
+ import type { EcoComponentConfig } from '../types/public-types.js';
2
+ import type { ComponentIdentity } from './component-identity.js';
3
+ export type DiscoveredDependencies = {
4
+ components: () => unknown[];
5
+ stylesheets: string[];
6
+ watchFiles?: string[];
7
+ };
8
+ /**
9
+ * Records discovered Components, inferred styles, and barrel watch hops on identity.
10
+ *
11
+ * @remarks
12
+ * Styles and watch hops are stored on the identity object through interned symbols so
13
+ * a bundled copy of this module still sees them during collection. The component getter
14
+ * stays on a same-isolate WeakMap and is attached to `config.dependencies` at factory time.
15
+ */
16
+ export declare function registerDiscoveredDependencies(identity: ComponentIdentity, discovered: DiscoveredDependencies): void;
17
+ /**
18
+ * Inferred stylesheet paths registered for this component identity.
19
+ *
20
+ * @remarks
21
+ * Provenance stays on identity so copying or merging `config.dependencies` cannot
22
+ * turn inferred styles into explicit ones. Paths are stored on the identity object
23
+ * so collection still sees them when server modules bundle a separate copy of `eco`.
24
+ * The collector prefers explicit entries across the whole graph by resolved path.
25
+ */
26
+ export declare function getInferredStylesheets(config: EcoComponentConfig | undefined): readonly string[];
27
+ /**
28
+ * Named re-export hops recorded for this component identity.
29
+ *
30
+ * @remarks
31
+ * Barrel files are not Component identity files. Collecting them as watch paths
32
+ * lets a barrel retarget invalidate HTML and Page Browser Graph caches without
33
+ * editing the importing Page.
34
+ */
35
+ export declare function getDiscoveredWatchFiles(config: EcoComponentConfig | undefined): readonly string[];
36
+ /**
37
+ * Attaches deferred discovered Component references to `config.dependencies`.
38
+ *
39
+ * @remarks
40
+ * The component getter reads live import bindings only during graph traversal,
41
+ * after module initialization. Inferred stylesheets stay keyed by identity and are
42
+ * not copied into the public bag, so rendering, SSR preload, ownership, and watch
43
+ * collectors share the same graph without object-identity bookkeeping.
44
+ */
45
+ export declare function attachDiscoveredDependencies(config: EcoComponentConfig): void;
@@ -0,0 +1,87 @@
1
+ const discoveries = new WeakMap();
2
+ const INFERRED_STYLESHEETS = Symbol.for('ecopages.identity.inferredStylesheets');
3
+ const DISCOVERED_WATCH_FILES = Symbol.for('ecopages.identity.watchFiles');
4
+ function discoveryRecord(identity) {
5
+ return identity;
6
+ }
7
+ /**
8
+ * Records discovered Components, inferred styles, and barrel watch hops on identity.
9
+ *
10
+ * @remarks
11
+ * Styles and watch hops are stored on the identity object through interned symbols so
12
+ * a bundled copy of this module still sees them during collection. The component getter
13
+ * stays on a same-isolate WeakMap and is attached to `config.dependencies` at factory time.
14
+ */
15
+ export function registerDiscoveredDependencies(identity, discovered) {
16
+ discoveries.set(identity, discovered);
17
+ const record = discoveryRecord(identity);
18
+ record[INFERRED_STYLESHEETS] = discovered.stylesheets;
19
+ record[DISCOVERED_WATCH_FILES] = discovered.watchFiles;
20
+ }
21
+ /**
22
+ * Inferred stylesheet paths registered for this component identity.
23
+ *
24
+ * @remarks
25
+ * Provenance stays on identity so copying or merging `config.dependencies` cannot
26
+ * turn inferred styles into explicit ones. Paths are stored on the identity object
27
+ * so collection still sees them when server modules bundle a separate copy of `eco`.
28
+ * The collector prefers explicit entries across the whole graph by resolved path.
29
+ */
30
+ export function getInferredStylesheets(config) {
31
+ const identity = config?.identity;
32
+ if (!identity)
33
+ return [];
34
+ return discoveryRecord(identity)[INFERRED_STYLESHEETS] ?? discoveries.get(identity)?.stylesheets ?? [];
35
+ }
36
+ /**
37
+ * Named re-export hops recorded for this component identity.
38
+ *
39
+ * @remarks
40
+ * Barrel files are not Component identity files. Collecting them as watch paths
41
+ * lets a barrel retarget invalidate HTML and Page Browser Graph caches without
42
+ * editing the importing Page.
43
+ */
44
+ export function getDiscoveredWatchFiles(config) {
45
+ const identity = config?.identity;
46
+ if (!identity)
47
+ return [];
48
+ return discoveryRecord(identity)[DISCOVERED_WATCH_FILES] ?? discoveries.get(identity)?.watchFiles ?? [];
49
+ }
50
+ function isDeclared(value) {
51
+ return typeof value === 'function' && Boolean(value.config?.identity);
52
+ }
53
+ /**
54
+ * Attaches deferred discovered Component references to `config.dependencies`.
55
+ *
56
+ * @remarks
57
+ * The component getter reads live import bindings only during graph traversal,
58
+ * after module initialization. Inferred stylesheets stay keyed by identity and are
59
+ * not copied into the public bag, so rendering, SSR preload, ownership, and watch
60
+ * collectors share the same graph without object-identity bookkeeping.
61
+ */
62
+ export function attachDiscoveredDependencies(config) {
63
+ const discovery = config.identity && discoveries.get(config.identity);
64
+ if (!discovery)
65
+ return;
66
+ let explicit = config.dependencies;
67
+ let merged;
68
+ const merge = () => {
69
+ const current = explicit;
70
+ merged = {
71
+ ...current,
72
+ get components() {
73
+ return [...new Set([...(current?.components ?? []), ...discovery.components().filter(isDeclared)])];
74
+ },
75
+ };
76
+ };
77
+ merge();
78
+ Object.defineProperty(config, 'dependencies', {
79
+ enumerable: true,
80
+ configurable: true,
81
+ get: () => merged,
82
+ set: (value) => {
83
+ explicit = value;
84
+ merge();
85
+ },
86
+ });
87
+ }
package/src/eco/eco.js CHANGED
@@ -6,6 +6,7 @@ import { finalizeComponentRender, getComponentRenderContext, interceptForeignChi
6
6
  import { isThenable } from '../route-renderer/orchestration/foreign-child/foreign-child-output.utils.js';
7
7
  import { applyPageLayoutConfig, mergeLayoutDependencies, normalizePageLayouts } from './page-layout-normalization.js';
8
8
  import { getComponentIdentity } from './component-identity.js';
9
+ import { attachDiscoveredDependencies } from './discovered-dependencies.js';
9
10
  /**
10
11
  * Creates a component factory with lazy-trigger support and foreign-child-runtime
11
12
  * interception.
@@ -58,6 +59,7 @@ function createComponentFactory(options) {
58
59
  integration: options.integration,
59
60
  dependencies: options.dependencies,
60
61
  };
62
+ attachDiscoveredDependencies(comp.config);
61
63
  return comp;
62
64
  }
63
65
  /**
@@ -94,6 +96,10 @@ function embed(component, props, children) {
94
96
  }
95
97
  /**
96
98
  * Creates a document shell component.
99
+ *
100
+ * @remarks
101
+ * Pass one generic for the renderable (`eco.html<JsxRenderable>()`,
102
+ * `eco.html<ReactNode>()`). Props are {@link HtmlTemplateProps}.
97
103
  */
98
104
  function html(options) {
99
105
  return createComponentFactory(options);
@@ -64,11 +64,27 @@ export type GetPageDependenciesContext<T = Record<string, unknown>> = {
64
64
  query?: PageQuery;
65
65
  };
66
66
  /**
67
- * Page dependency bag optionally scoped to a declaring file.
67
+ * Explicit dependency declarations owned by one file.
68
+ *
69
+ * @remarks
70
+ * Relative `scripts`, `stylesheets`, and `modules` resolve against `ownerFile`
71
+ * when present. Component entries keep their own identity files. Inferred
72
+ * stylesheets are not stored here; the collector reads them from identity.
68
73
  */
69
- export type PageDependenciesResult = EcoComponentDependencies & {
74
+ export type FileOwnedDependencyContribution = EcoComponentDependencies & {
70
75
  ownerFile?: string;
71
76
  };
77
+ /**
78
+ * Page dependency bag made of one or more file-owned contributions.
79
+ *
80
+ * @remarks
81
+ * A single bag with `ownerFile` is one contribution. `contributions` keeps
82
+ * assets from different files separate until collection, so merging a Page and
83
+ * a content entry cannot re-home relative paths.
84
+ */
85
+ export type PageDependenciesResult = FileOwnedDependencyContribution & {
86
+ contributions?: FileOwnedDependencyContribution[];
87
+ };
72
88
  /**
73
89
  * Resolves request-specific page dependencies for one route render.
74
90
  */
@@ -35,48 +35,51 @@ function dedupeCsvValues(values) {
35
35
  }
36
36
  return Array.from(seen).join(',');
37
37
  }
38
- /**
39
- * Builds a scripts-injector map config from resolved lazy script groups.
40
- *
41
- * @param lazyGroups Lazy script groups resolved during dependency processing.
42
- * @returns Injector map config keyed by lazy trigger.
43
- */
44
- function buildInjectorMap(lazyGroups) {
45
- const map = {};
46
- for (const group of lazyGroups) {
47
- const scripts = normalizeScripts(group.scripts);
48
- const lazy = group.lazy;
49
- if ('on:idle' in lazy) {
50
- map['on:idle'] = {
51
- scripts: [...(map['on:idle']?.scripts ?? []), ...scripts],
52
- };
53
- continue;
54
- }
55
- if ('on:interaction' in lazy) {
56
- const currentValue = map['on:interaction']?.value;
57
- const nextValue = lazy['on:interaction'];
58
- map['on:interaction'] = {
59
- value: typeof currentValue === 'string' ? dedupeCsvValues([currentValue, nextValue]) : nextValue,
60
- scripts: [...(map['on:interaction']?.scripts ?? []), ...scripts],
61
- };
62
- continue;
63
- }
64
- if ('on:visible' in lazy) {
65
- const currentValue = map['on:visible']?.value;
66
- const currentThreshold = typeof currentValue === 'string' ? currentValue : undefined;
67
- const nextValue = lazy['on:visible'];
68
- map['on:visible'] = {
69
- ...(nextValue === true
70
- ? currentThreshold
71
- ? { value: currentThreshold }
72
- : {}
73
- : { value: String(nextValue) }),
74
- scripts: [...(map['on:visible']?.scripts ?? []), ...scripts],
75
- };
76
- continue;
77
- }
78
- throw new Error(`Invalid lazy options: must specify on:idle, on:interaction, or on:visible. Received: ${JSON.stringify(lazy)}`);
38
+ function mergeInjectorScripts(map, key, scripts) {
39
+ const entry = map[key];
40
+ map[key] = {
41
+ ...entry,
42
+ scripts: [...(entry?.scripts ?? []), ...scripts],
43
+ };
44
+ }
45
+ function applyIdleLazyTrigger(map, scripts) {
46
+ mergeInjectorScripts(map, 'on:idle', scripts);
47
+ }
48
+ function applyInteractionLazyTrigger(map, lazy, scripts) {
49
+ const currentValue = map['on:interaction']?.value;
50
+ const nextValue = lazy['on:interaction'];
51
+ map['on:interaction'] = {
52
+ value: typeof currentValue === 'string' ? dedupeCsvValues([currentValue, nextValue]) : nextValue,
53
+ scripts: [...(map['on:interaction']?.scripts ?? []), ...scripts],
54
+ };
55
+ }
56
+ function applyVisibleLazyTrigger(map, lazy, scripts) {
57
+ const currentValue = map['on:visible']?.value;
58
+ const currentThreshold = typeof currentValue === 'string' ? currentValue : undefined;
59
+ const nextValue = lazy['on:visible'];
60
+ map['on:visible'] = {
61
+ ...(nextValue === true ? (currentThreshold ? { value: currentThreshold } : {}) : { value: String(nextValue) }),
62
+ scripts: [...(map['on:visible']?.scripts ?? []), ...scripts],
63
+ };
64
+ }
65
+ function applyLazyGroupToInjectorMap(map, group) {
66
+ const scripts = normalizeScripts(group.scripts);
67
+ const lazy = group.lazy;
68
+ if ('on:idle' in lazy) {
69
+ applyIdleLazyTrigger(map, scripts);
70
+ return;
71
+ }
72
+ if ('on:interaction' in lazy) {
73
+ applyInteractionLazyTrigger(map, lazy, scripts);
74
+ return;
75
+ }
76
+ if ('on:visible' in lazy) {
77
+ applyVisibleLazyTrigger(map, lazy, scripts);
78
+ return;
79
79
  }
80
+ throw new Error(`Invalid lazy options: must specify on:idle, on:interaction, or on:visible. Received: ${JSON.stringify(lazy)}`);
81
+ }
82
+ function dedupeInjectorMapScripts(map) {
80
83
  for (const key of Object.keys(map)) {
81
84
  const scripts = map[key]?.scripts;
82
85
  if (scripts) {
@@ -86,6 +89,19 @@ function buildInjectorMap(lazyGroups) {
86
89
  };
87
90
  }
88
91
  }
92
+ }
93
+ /**
94
+ * Builds a scripts-injector map config from resolved lazy script groups.
95
+ *
96
+ * @param lazyGroups Lazy script groups resolved during dependency processing.
97
+ * @returns Injector map config keyed by lazy trigger.
98
+ */
99
+ function buildInjectorMap(lazyGroups) {
100
+ const map = {};
101
+ for (const group of lazyGroups) {
102
+ applyLazyGroupToInjectorMap(map, group);
103
+ }
104
+ dedupeInjectorMapScripts(map);
89
105
  return map;
90
106
  }
91
107
  /**
@@ -0,0 +1,19 @@
1
+ import type { EcoComponentDependencies, FileOwnedDependencyContribution, PageDependenciesResult } from '../types/public-types.js';
2
+ /**
3
+ * Expands a page dependency result into file-owned contributions.
4
+ *
5
+ * @remarks
6
+ * Nested `contributions` are expanded so collection can resolve each bag against
7
+ * its own owner. Empty bags are omitted.
8
+ */
9
+ export declare function listFileOwnedDependencyContributions(value: PageDependenciesResult | EcoComponentDependencies | undefined): FileOwnedDependencyContribution[];
10
+ /**
11
+ * Merges base page dependencies with additional dependencies (such as those returned by a content entry).
12
+ *
13
+ * @remarks
14
+ * Keeps each file-owned contribution intact, including `modules`. Relative assets
15
+ * are not flattened under a single `ownerFile`, so a Page's `./page.css` cannot
16
+ * resolve against a content entry directory. Object-spread of two bags copies
17
+ * `ownerFile` onto the other side's relative paths; use this helper instead.
18
+ */
19
+ export declare function mergePageDependencies(base: EcoComponentDependencies | undefined, additional: PageDependenciesResult | EcoComponentDependencies | undefined): PageDependenciesResult | undefined;
@@ -0,0 +1,52 @@
1
+ function hasCollectableDependencyFields(dependencies) {
2
+ return Boolean(dependencies.stylesheets?.length ||
3
+ dependencies.scripts?.length ||
4
+ dependencies.modules?.length ||
5
+ dependencies.components?.length);
6
+ }
7
+ /**
8
+ * Expands a page dependency result into file-owned contributions.
9
+ *
10
+ * @remarks
11
+ * Nested `contributions` are expanded so collection can resolve each bag against
12
+ * its own owner. Empty bags are omitted.
13
+ */
14
+ export function listFileOwnedDependencyContributions(value) {
15
+ if (!value)
16
+ return [];
17
+ const result = value;
18
+ const nested = result.contributions ?? [];
19
+ const { contributions: _contributions, ownerFile, ...dependencies } = result;
20
+ const listed = [];
21
+ if (hasCollectableDependencyFields(dependencies)) {
22
+ listed.push(ownerFile ? { ...dependencies, ownerFile } : dependencies);
23
+ }
24
+ for (const contribution of nested) {
25
+ listed.push(...listFileOwnedDependencyContributions(contribution));
26
+ }
27
+ return listed;
28
+ }
29
+ /**
30
+ * Merges base page dependencies with additional dependencies (such as those returned by a content entry).
31
+ *
32
+ * @remarks
33
+ * Keeps each file-owned contribution intact, including `modules`. Relative assets
34
+ * are not flattened under a single `ownerFile`, so a Page's `./page.css` cannot
35
+ * resolve against a content entry directory. Object-spread of two bags copies
36
+ * `ownerFile` onto the other side's relative paths; use this helper instead.
37
+ */
38
+ export function mergePageDependencies(base, additional) {
39
+ if (!base)
40
+ return additional;
41
+ if (!additional)
42
+ return base;
43
+ const contributions = [
44
+ ...listFileOwnedDependencyContributions(base),
45
+ ...listFileOwnedDependencyContributions(additional),
46
+ ];
47
+ if (contributions.length === 0)
48
+ return undefined;
49
+ if (contributions.length === 1)
50
+ return contributions[0];
51
+ return { contributions };
52
+ }
@@ -0,0 +1,77 @@
1
+ /**
2
+ * HTTP statuses that own a semantic HTML error page (`pages/{status}.*` and
3
+ * matching `app.*()` loaders).
4
+ */
5
+ export declare const HTTP_ERROR_PAGE_STATUSES: readonly [400, 401, 403, 404, 409, 500];
6
+ export type HttpErrorPageStatus = (typeof HTTP_ERROR_PAGE_STATUSES)[number];
7
+ export type ErrorPageKind = 'badRequest' | 'unauthorized' | 'forbidden' | 'notFound' | 'conflict' | 'serverError';
8
+ export declare const ERROR_PAGE_KIND_BY_STATUS: {
9
+ readonly 400: "badRequest";
10
+ readonly 401: "unauthorized";
11
+ readonly 403: "forbidden";
12
+ readonly 404: "notFound";
13
+ readonly 409: "conflict";
14
+ readonly 500: "serverError";
15
+ };
16
+ export declare const ERROR_PAGE_STATUS_BY_KIND: {
17
+ readonly badRequest: 400;
18
+ readonly unauthorized: 401;
19
+ readonly forbidden: 403;
20
+ readonly notFound: 404;
21
+ readonly conflict: 409;
22
+ readonly serverError: 500;
23
+ };
24
+ export declare const SEMANTIC_ERROR_PAGE_PATHNAMES: readonly `/${HttpErrorPageStatus}`[];
25
+ /**
26
+ * Built-in copy and CSS modifier suffix for each semantic HTML error page.
27
+ */
28
+ export declare const ERROR_PAGE_COPY: {
29
+ readonly 400: {
30
+ readonly title: "Bad Request";
31
+ readonly message: "The request could not be understood.";
32
+ readonly modifier: "bad-request";
33
+ };
34
+ readonly 401: {
35
+ readonly title: "Unauthorized";
36
+ readonly message: "Authentication is required to access this page.";
37
+ readonly modifier: "unauthorized";
38
+ };
39
+ readonly 403: {
40
+ readonly title: "Forbidden";
41
+ readonly message: "You do not have permission to access this page.";
42
+ readonly modifier: "forbidden";
43
+ };
44
+ readonly 404: {
45
+ readonly title: "Not Found";
46
+ readonly message: "The page you requested could not be found.";
47
+ readonly modifier: "not-found";
48
+ };
49
+ readonly 409: {
50
+ readonly title: "Conflict";
51
+ readonly message: "The request could not be completed due to a conflict.";
52
+ readonly modifier: "conflict";
53
+ };
54
+ readonly 500: {
55
+ readonly title: "Something went wrong";
56
+ readonly message: "An error occurred while handling this request.";
57
+ readonly modifier: "server-error";
58
+ };
59
+ };
60
+ export type PageFailureClassification = {
61
+ status: number;
62
+ kind: ErrorPageKind | undefined;
63
+ logAsServerError: boolean;
64
+ };
65
+ export declare function isHttpErrorPageStatus(status: number): status is HttpErrorPageStatus;
66
+ export declare function isHttpErrorStatus(status: number): boolean;
67
+ /**
68
+ * Resolves the semantic page kind for an HTTP status.
69
+ *
70
+ * @remarks
71
+ * Factory statuses map 1:1. Other 5xx statuses reuse the server-error page
72
+ * with the original status. Other 4xx statuses have no custom page and use a
73
+ * built-in document.
74
+ */
75
+ export declare function kindForStatus(status: number): ErrorPageKind | undefined;
76
+ export declare function classifyPageFailure(error: unknown): PageFailureClassification;
77
+ export declare function shouldLogPageFailure(error: unknown): boolean;
@@ -0,0 +1,106 @@
1
+ import { HttpError } from './http-error.js';
2
+ /**
3
+ * HTTP statuses that own a semantic HTML error page (`pages/{status}.*` and
4
+ * matching `app.*()` loaders).
5
+ */
6
+ export const HTTP_ERROR_PAGE_STATUSES = [400, 401, 403, 404, 409, 500];
7
+ export const ERROR_PAGE_KIND_BY_STATUS = {
8
+ 400: 'badRequest',
9
+ 401: 'unauthorized',
10
+ 403: 'forbidden',
11
+ 404: 'notFound',
12
+ 409: 'conflict',
13
+ 500: 'serverError',
14
+ };
15
+ export const ERROR_PAGE_STATUS_BY_KIND = {
16
+ badRequest: 400,
17
+ unauthorized: 401,
18
+ forbidden: 403,
19
+ notFound: 404,
20
+ conflict: 409,
21
+ serverError: 500,
22
+ };
23
+ export const SEMANTIC_ERROR_PAGE_PATHNAMES = HTTP_ERROR_PAGE_STATUSES.map((status) => `/${status}`);
24
+ /**
25
+ * Built-in copy and CSS modifier suffix for each semantic HTML error page.
26
+ */
27
+ export const ERROR_PAGE_COPY = {
28
+ 400: {
29
+ title: 'Bad Request',
30
+ message: 'The request could not be understood.',
31
+ modifier: 'bad-request',
32
+ },
33
+ 401: {
34
+ title: 'Unauthorized',
35
+ message: 'Authentication is required to access this page.',
36
+ modifier: 'unauthorized',
37
+ },
38
+ 403: {
39
+ title: 'Forbidden',
40
+ message: 'You do not have permission to access this page.',
41
+ modifier: 'forbidden',
42
+ },
43
+ 404: {
44
+ title: 'Not Found',
45
+ message: 'The page you requested could not be found.',
46
+ modifier: 'not-found',
47
+ },
48
+ 409: {
49
+ title: 'Conflict',
50
+ message: 'The request could not be completed due to a conflict.',
51
+ modifier: 'conflict',
52
+ },
53
+ 500: {
54
+ title: 'Something went wrong',
55
+ message: 'An error occurred while handling this request.',
56
+ modifier: 'server-error',
57
+ },
58
+ };
59
+ export function isHttpErrorPageStatus(status) {
60
+ return HTTP_ERROR_PAGE_STATUSES.includes(status);
61
+ }
62
+ export function isHttpErrorStatus(status) {
63
+ return Number.isInteger(status) && status >= 400 && status <= 599;
64
+ }
65
+ /**
66
+ * Resolves the semantic page kind for an HTTP status.
67
+ *
68
+ * @remarks
69
+ * Factory statuses map 1:1. Other 5xx statuses reuse the server-error page
70
+ * with the original status. Other 4xx statuses have no custom page and use a
71
+ * built-in document.
72
+ */
73
+ export function kindForStatus(status) {
74
+ if (isHttpErrorPageStatus(status)) {
75
+ return ERROR_PAGE_KIND_BY_STATUS[status];
76
+ }
77
+ if (status >= 500 && status <= 599) {
78
+ return 'serverError';
79
+ }
80
+ return undefined;
81
+ }
82
+ export function classifyPageFailure(error) {
83
+ if (error instanceof Response) {
84
+ return {
85
+ status: error.status,
86
+ kind: kindForStatus(error.status),
87
+ logAsServerError: error.status >= 500,
88
+ };
89
+ }
90
+ if (HttpError.isHttpError(error)) {
91
+ const status = isHttpErrorStatus(error.status) ? error.status : 500;
92
+ return {
93
+ status,
94
+ kind: kindForStatus(status),
95
+ logAsServerError: status >= 500,
96
+ };
97
+ }
98
+ return {
99
+ status: 500,
100
+ kind: 'serverError',
101
+ logAsServerError: true,
102
+ };
103
+ }
104
+ export function shouldLogPageFailure(error) {
105
+ return classifyPageFailure(error).logAsServerError;
106
+ }
@@ -2,7 +2,6 @@ import type { EcoPagesAppConfig } from '../types/internal-types.js';
2
2
  import { type AffectedGraphIdentity } from '../route-renderer/orchestration/page-browser-graph/page-browser-graph-session.js';
3
3
  export type HmrFileChangePreparation = {
4
4
  affectedGraphIdentities: AffectedGraphIdentity[];
5
- invalidatedGraphCount: number;
6
5
  };
7
6
  /**
8
7
  * Invalidates affected Page Browser Graph records before HMR strategy dispatch.
@@ -6,9 +6,6 @@ import { getAffectedPageBrowserGraphIdentities, invalidatePageBrowserGraphSessio
6
6
  export function prepareHmrFileChange(appConfig, filePath) {
7
7
  const resolvedFilePath = path.resolve(filePath);
8
8
  const affectedGraphIdentities = getAffectedPageBrowserGraphIdentities(appConfig, resolvedFilePath);
9
- const invalidatedGraphCount = invalidatePageBrowserGraphSession(appConfig, resolvedFilePath);
10
- return {
11
- affectedGraphIdentities,
12
- invalidatedGraphCount,
13
- };
9
+ invalidatePageBrowserGraphSession(appConfig, resolvedFilePath);
10
+ return { affectedGraphIdentities };
14
11
  }
@@ -26,7 +26,7 @@ import type { ClientBridgeEvent } from '../types/public-types.js';
26
26
  */
27
27
  /**
28
28
  * Defines the category of an HMR strategy, which determines its execution priority.
29
- * Strategies are evaluated in descending order: INTEGRATION → ASSET → SCRIPT → FALLBACK.
29
+ * Strategies are evaluated in descending order: INTEGRATION → SCRIPT → FALLBACK.
30
30
  *
31
31
  * @remarks
32
32
  * The numeric values represent base priorities. Strategies can fine-tune their priority
@@ -38,11 +38,6 @@ export declare const HmrStrategyType: {
38
38
  * Highest priority to allow framework-specific HMR handling.
39
39
  */
40
40
  readonly INTEGRATION: 100;
41
- /**
42
- * Asset processing strategies (CSS, images, etc.)
43
- * High priority for specialized asset handling.
44
- */
45
- readonly ASSET: 50;
46
41
  /**
47
42
  * Generic script bundling strategies (JS/TS)
48
43
  * Medium priority for standard script processing.
@@ -82,8 +77,8 @@ export interface HmrAction {
82
77
  *
83
78
  * @example
84
79
  * ```typescript
85
- * class MyAssetStrategy extends HmrStrategy {
86
- * readonly type = HmrStrategyType.ASSET;
80
+ * class MyImageStrategy extends HmrStrategy {
81
+ * readonly type = HmrStrategyType.INTEGRATION;
87
82
  * readonly priorityOffset = 5;
88
83
  *
89
84
  * matches(filePath: string): boolean {
@@ -25,7 +25,7 @@
25
25
  */
26
26
  /**
27
27
  * Defines the category of an HMR strategy, which determines its execution priority.
28
- * Strategies are evaluated in descending order: INTEGRATION → ASSET → SCRIPT → FALLBACK.
28
+ * Strategies are evaluated in descending order: INTEGRATION → SCRIPT → FALLBACK.
29
29
  *
30
30
  * @remarks
31
31
  * The numeric values represent base priorities. Strategies can fine-tune their priority
@@ -37,11 +37,6 @@ export const HmrStrategyType = {
37
37
  * Highest priority to allow framework-specific HMR handling.
38
38
  */
39
39
  INTEGRATION: 100,
40
- /**
41
- * Asset processing strategies (CSS, images, etc.)
42
- * High priority for specialized asset handling.
43
- */
44
- ASSET: 50,
45
40
  /**
46
41
  * Generic script bundling strategies (JS/TS)
47
42
  * Medium priority for standard script processing.
@@ -66,8 +61,8 @@ export const HmrStrategyType = {
66
61
  *
67
62
  * @example
68
63
  * ```typescript
69
- * class MyAssetStrategy extends HmrStrategy {
70
- * readonly type = HmrStrategyType.ASSET;
64
+ * class MyImageStrategy extends HmrStrategy {
65
+ * readonly type = HmrStrategyType.INTEGRATION;
71
66
  * readonly priorityOffset = 5;
72
67
  *
73
68
  * matches(filePath: string): boolean {
@@ -39,5 +39,7 @@ export declare class JsHmrStrategy extends HmrStrategy {
39
39
  private context;
40
40
  constructor(context: JsHmrContext);
41
41
  matches(filePath: string): boolean;
42
+ private resolveImpactedEntrypoints;
43
+ private collectDevTransformHmrOutcome;
42
44
  process(filePath: string): Promise<HmrAction>;
43
45
  }