@ecopages/core 0.2.0-beta.6 → 0.2.0-beta.8
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/package.json +26 -2
- package/src/adapters/abstract/application-adapter.d.ts +12 -1
- package/src/adapters/abstract/application-adapter.js +13 -0
- package/src/adapters/abstract/server-adapter.d.ts +3 -0
- package/src/adapters/bun/client-bridge.d.ts +1 -0
- package/src/adapters/bun/client-bridge.js +3 -0
- package/src/adapters/bun/create-app.d.ts +2 -0
- package/src/adapters/bun/create-app.js +28 -9
- package/src/adapters/bun/server-adapter.d.ts +13 -0
- package/src/adapters/bun/server-adapter.js +29 -4
- package/src/adapters/create-app.d.ts +13 -0
- package/src/adapters/create-app.js +10 -1
- package/src/adapters/node/create-app.d.ts +1 -0
- package/src/adapters/node/create-app.js +17 -7
- package/src/adapters/node/node-client-bridge.d.ts +1 -0
- package/src/adapters/node/node-client-bridge.js +3 -0
- package/src/adapters/node/server-adapter.d.ts +10 -13
- package/src/adapters/node/server-adapter.js +37 -82
- package/src/adapters/node/static-content-server.d.ts +1 -0
- package/src/adapters/node/static-content-server.js +3 -0
- package/src/adapters/shared/copy-runtime-public-dir.d.ts +6 -0
- package/src/adapters/shared/copy-runtime-public-dir.js +24 -0
- package/src/adapters/shared/runtime-app-bootstrap.d.ts +0 -1
- package/src/adapters/shared/runtime-app-bootstrap.js +1 -6
- package/src/adapters/shared/server-static-builder.d.ts +4 -7
- package/src/adapters/shared/server-static-builder.js +89 -49
- package/src/adapters/shared/shared-hmr-manager.d.ts +1 -0
- package/src/adapters/shared/shared-hmr-manager.js +15 -2
- package/src/build/README.md +44 -4
- package/src/build/build-adapter.d.ts +8 -2
- package/src/build/build-adapter.js +71 -33
- package/src/build/build-input-fingerprint.d.ts +28 -0
- package/src/build/build-input-fingerprint.js +31 -0
- package/src/build/jsx-ownership-plugins.d.ts +10 -0
- package/src/build/jsx-ownership-plugins.js +17 -0
- package/src/build/pages-unified-graph-build.d.ts +31 -0
- package/src/build/pages-unified-graph-build.js +208 -0
- package/src/build/parallel-build-executor.d.ts +21 -0
- package/src/build/parallel-build-executor.js +52 -0
- package/src/build/rolldown-adapter-helpers.js +47 -3
- package/src/build/rolldown-build-adapter.js +2 -0
- package/src/build/rolldown-build-invocation-metrics.d.ts +12 -0
- package/src/build/rolldown-build-invocation-metrics.js +43 -0
- package/src/build/rolldown-dev-build-adapter.d.ts +2 -2
- package/src/build/rolldown-dev-build-adapter.js +30 -14
- package/src/build/runtime-build-executor.d.ts +7 -13
- package/src/build/runtime-build-executor.js +31 -7
- package/src/build/runtime-build-output-normalizer.d.ts +7 -0
- package/src/build/runtime-build-output-normalizer.js +85 -1
- package/src/build/server-entry-build-cache.d.ts +44 -0
- package/src/build/server-entry-build-cache.js +169 -0
- package/src/hmr/hmr.test.e2e.js +15 -4
- package/src/plugins/integration-plugin.d.ts +19 -8
- package/src/plugins/integration-plugin.js +7 -2
- package/src/plugins/processor.d.ts +5 -0
- package/src/plugins/processor.js +7 -0
- package/src/route-renderer/GRAPH.md +4 -4
- package/src/route-renderer/README.md +6 -5
- package/src/route-renderer/orchestration/foreign-subtree-execution.service.js +1 -3
- package/src/route-renderer/orchestration/integration-renderer.d.ts +10 -2
- package/src/route-renderer/orchestration/integration-renderer.js +32 -12
- package/src/route-renderer/orchestration/render-output.utils.d.ts +2 -0
- package/src/route-renderer/orchestration/render-output.utils.js +4 -0
- package/src/route-renderer/orchestration/route-render-orchestrator.d.ts +2 -2
- package/src/route-renderer/orchestration/route-render-orchestrator.js +17 -16
- package/src/router/client/navigation-coordinator.js +10 -0
- package/src/services/assets/asset-processing-service/browser-runtime-asset.factory.d.ts +1 -0
- package/src/services/assets/asset-processing-service/browser-runtime-asset.factory.js +1 -0
- package/src/services/assets/asset-processing-service/browser-runtime-entry.factory.d.ts +4 -2
- package/src/services/assets/asset-processing-service/browser-runtime-entry.factory.js +27 -7
- package/src/services/assets/asset-processing-service/processors/script/node-module-script.processor.js +17 -3
- package/src/services/assets/browser-bundle.service.d.ts +1 -0
- package/src/services/assets/browser-bundle.service.js +9 -3
- package/src/services/html/html-transformer.service.d.ts +1 -1
- package/src/services/html/html-transformer.service.js +4 -4
- package/src/services/invalidation/development-invalidation.service.d.ts +10 -1
- package/src/services/invalidation/development-invalidation.service.js +29 -0
- package/src/services/module-loading/README.md +49 -0
- package/src/services/module-loading/app-server-module-transpiler.service.js +4 -17
- package/src/services/module-loading/page-module-import.service.d.ts +4 -1
- package/src/services/module-loading/page-module-import.service.js +52 -29
- package/src/services/module-loading/route-module-build-cache-registry.d.ts +24 -0
- package/src/services/module-loading/route-module-build-cache-registry.js +37 -0
- package/src/services/module-loading/route-module-build-cache.d.ts +4 -0
- package/src/services/module-loading/route-module-build-cache.js +38 -0
- package/src/services/module-loading/route-module-build-cache.store.d.ts +57 -0
- package/src/services/module-loading/route-module-build-cache.store.js +203 -0
- package/src/services/module-loading/route-module-build-manifest.d.ts +61 -0
- package/src/services/module-loading/route-module-build-manifest.js +124 -0
- package/src/services/module-loading/route-module-dependency-hasher.d.ts +81 -0
- package/src/services/module-loading/route-module-dependency-hasher.js +121 -0
- package/src/services/module-loading/server-module-transpiler.service.js +1 -1
- package/src/static-site-generator/README.md +33 -0
- package/src/static-site-generator/static-build-invalidation.d.ts +10 -0
- package/src/static-site-generator/static-build-invalidation.js +78 -0
- package/src/static-site-generator/static-export-context.d.ts +22 -0
- package/src/static-site-generator/static-export-context.js +0 -0
- package/src/static-site-generator/static-site-generator.d.ts +17 -20
- package/src/static-site-generator/static-site-generator.js +188 -85
- package/src/types/internal-types.d.ts +8 -0
- package/src/utils/parse-cli-args.d.ts +1 -0
- package/src/utils/parse-cli-args.js +3 -0
- package/src/watchers/project-watcher.d.ts +8 -0
- package/src/watchers/project-watcher.js +32 -12
|
@@ -122,7 +122,7 @@ class ProjectWatcher {
|
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
await this.notifyProcessors(filePath, event);
|
|
125
|
-
if (plan.category === "include-source") {
|
|
125
|
+
if (plan.category === "include-source" || plan.category === "explicit-server-view") {
|
|
126
126
|
this.bridge.reload();
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
@@ -231,30 +231,36 @@ class ProjectWatcher {
|
|
|
231
231
|
if (this.watcher) {
|
|
232
232
|
return this.watcher;
|
|
233
233
|
}
|
|
234
|
-
const processorPaths =
|
|
234
|
+
const processorPaths = /* @__PURE__ */ new Set();
|
|
235
235
|
for (const processor of this.appConfig.processors.values()) {
|
|
236
236
|
const watchConfig = processor.getWatchConfig();
|
|
237
237
|
if (!watchConfig) continue;
|
|
238
|
-
|
|
238
|
+
for (const watchPath of watchConfig.paths) {
|
|
239
|
+
processorPaths.add(watchPath);
|
|
240
|
+
}
|
|
239
241
|
}
|
|
240
242
|
if (fileSystem.exists(this.appConfig.absolutePaths.includesDir)) {
|
|
241
|
-
processorPaths.
|
|
243
|
+
processorPaths.add(this.appConfig.absolutePaths.includesDir);
|
|
242
244
|
}
|
|
243
245
|
if (fileSystem.exists(this.appConfig.absolutePaths.srcDir)) {
|
|
244
|
-
processorPaths.
|
|
245
|
-
}
|
|
246
|
-
if (fileSystem.exists(this.appConfig.absolutePaths.pagesDir)) {
|
|
247
|
-
processorPaths.push(this.appConfig.absolutePaths.pagesDir);
|
|
246
|
+
processorPaths.add(this.appConfig.absolutePaths.srcDir);
|
|
248
247
|
}
|
|
249
248
|
if (fileSystem.exists(this.appConfig.absolutePaths.publicDir)) {
|
|
250
|
-
processorPaths.
|
|
249
|
+
processorPaths.add(this.appConfig.absolutePaths.publicDir);
|
|
251
250
|
}
|
|
252
|
-
|
|
253
|
-
processorPaths.
|
|
251
|
+
for (const watchPath of this.appConfig.additionalWatchPaths) {
|
|
252
|
+
processorPaths.add(watchPath);
|
|
254
253
|
}
|
|
255
|
-
|
|
254
|
+
const ignored = [
|
|
255
|
+
"**/node_modules/**",
|
|
256
|
+
"**/.git/**",
|
|
257
|
+
path.join(this.appConfig.absolutePaths.workDir, "**"),
|
|
258
|
+
path.join(this.appConfig.absolutePaths.distDir, "**")
|
|
259
|
+
];
|
|
260
|
+
this.watcher = chokidar.watch(Array.from(processorPaths), {
|
|
256
261
|
ignoreInitial: true,
|
|
257
262
|
ignorePermissionErrors: true,
|
|
263
|
+
ignored,
|
|
258
264
|
awaitWriteFinish: {
|
|
259
265
|
stabilityThreshold: 50,
|
|
260
266
|
pollInterval: 50
|
|
@@ -269,6 +275,20 @@ class ProjectWatcher {
|
|
|
269
275
|
}
|
|
270
276
|
return this.watcher;
|
|
271
277
|
}
|
|
278
|
+
/**
|
|
279
|
+
* Closes the active filesystem watcher subscription.
|
|
280
|
+
*
|
|
281
|
+
* @remarks
|
|
282
|
+
* Safe to call multiple times. Used when tearing down dev servers in tests
|
|
283
|
+
* and other short-lived Ecopages runtimes.
|
|
284
|
+
*/
|
|
285
|
+
async close() {
|
|
286
|
+
if (!this.watcher) {
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
await this.watcher.close();
|
|
290
|
+
this.watcher = null;
|
|
291
|
+
}
|
|
272
292
|
}
|
|
273
293
|
export {
|
|
274
294
|
ProjectWatcher
|