@absolutejs/absolute 0.19.0-beta.71 → 0.19.0-beta.73
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/.absolutejs/tsconfig.tsbuildinfo +1 -1
- package/.claude/settings.local.json +2 -1
- package/dist/build.js +7 -45
- package/dist/build.js.map +4 -4
- package/dist/index.js +7 -45
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -202323,15 +202323,6 @@ var init_pageHandler = __esm(() => {
|
|
|
202323
202323
|
});
|
|
202324
202324
|
|
|
202325
202325
|
// src/dev/transformCache.ts
|
|
202326
|
-
var exports_transformCache = {};
|
|
202327
|
-
__export(exports_transformCache, {
|
|
202328
|
-
setTransformed: () => setTransformed,
|
|
202329
|
-
invalidateAll: () => invalidateAll,
|
|
202330
|
-
invalidate: () => invalidate,
|
|
202331
|
-
getTransformed: () => getTransformed,
|
|
202332
|
-
getInvalidationVersion: () => getInvalidationVersion,
|
|
202333
|
-
findNearestComponent: () => findNearestComponent
|
|
202334
|
-
});
|
|
202335
202326
|
var globalStore, cache, importers, getTransformed = (filePath) => cache.get(filePath)?.content, setTransformed = (filePath, content, mtime, imports) => {
|
|
202336
202327
|
const resolvedImports = imports ?? [];
|
|
202337
202328
|
cache.set(filePath, { content, imports: resolvedImports, mtime });
|
|
@@ -202350,28 +202341,6 @@ var globalStore, cache, importers, getTransformed = (filePath) => cache.get(file
|
|
|
202350
202341
|
cache.delete(parent);
|
|
202351
202342
|
}
|
|
202352
202343
|
}
|
|
202353
|
-
}, invalidateAll = () => {
|
|
202354
|
-
cache.clear();
|
|
202355
|
-
importers.clear();
|
|
202356
|
-
}, findNearestComponent = (filePath) => {
|
|
202357
|
-
const visited = new Set;
|
|
202358
|
-
const queue = [filePath];
|
|
202359
|
-
while (queue.length > 0) {
|
|
202360
|
-
const current = queue.shift();
|
|
202361
|
-
if (visited.has(current))
|
|
202362
|
-
continue;
|
|
202363
|
-
visited.add(current);
|
|
202364
|
-
const parents = importers.get(current);
|
|
202365
|
-
if (!parents)
|
|
202366
|
-
continue;
|
|
202367
|
-
for (const parent of parents) {
|
|
202368
|
-
if (parent.endsWith(".tsx") || parent.endsWith(".jsx")) {
|
|
202369
|
-
return parent;
|
|
202370
|
-
}
|
|
202371
|
-
queue.push(parent);
|
|
202372
|
-
}
|
|
202373
|
-
}
|
|
202374
|
-
return;
|
|
202375
202344
|
};
|
|
202376
202345
|
var init_transformCache = __esm(() => {
|
|
202377
202346
|
globalStore = globalThis;
|
|
@@ -202918,9 +202887,9 @@ export default {};
|
|
|
202918
202887
|
return files;
|
|
202919
202888
|
}, invalidateModule = (filePath) => {
|
|
202920
202889
|
const resolved = resolve18(filePath);
|
|
202921
|
-
console.log(`[invalidate] ${resolved} (cached: ${getTransformed(resolved) !== undefined}, cacheKeys: ${getTransformed(filePath) !== undefined})`);
|
|
202922
202890
|
invalidate(filePath);
|
|
202923
|
-
|
|
202891
|
+
if (resolved !== filePath)
|
|
202892
|
+
invalidate(resolved);
|
|
202924
202893
|
mtimeCache.delete(filePath);
|
|
202925
202894
|
mtimeCache.delete(resolved);
|
|
202926
202895
|
}, warmCache = (pathname) => {
|
|
@@ -203497,11 +203466,12 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
|
|
|
203497
203466
|
const reactIndexesPath = resolve21(reactDir, "indexes");
|
|
203498
203467
|
const { buildDir } = state.resolvedPaths;
|
|
203499
203468
|
const reactFiles = filesToRebuild.filter((file4) => detectFramework(file4, state.resolvedPaths) === "react");
|
|
203500
|
-
|
|
203469
|
+
const componentFiles = reactFiles.filter((f) => f.endsWith(".tsx") || f.endsWith(".jsx"));
|
|
203470
|
+
if (componentFiles.length > 0 && componentFiles.length === reactFiles.length) {
|
|
203501
203471
|
for (const file4 of reactFiles) {
|
|
203502
203472
|
state.fileHashes.set(resolve21(file4), computeFileHash(file4));
|
|
203503
203473
|
}
|
|
203504
|
-
const primaryFile =
|
|
203474
|
+
const primaryFile = componentFiles.find((f) => !f.replace(/\\/g, "/").includes("/pages/")) ?? componentFiles[0];
|
|
203505
203475
|
if (!primaryFile) {
|
|
203506
203476
|
onRebuildComplete({
|
|
203507
203477
|
hmrState: state,
|
|
@@ -203513,15 +203483,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
|
|
|
203513
203483
|
for (const file4 of reactFiles) {
|
|
203514
203484
|
invalidateModule2(file4);
|
|
203515
203485
|
}
|
|
203516
|
-
const
|
|
203517
|
-
let broadcastTarget = primaryFile;
|
|
203518
|
-
if (!isComponentFile) {
|
|
203519
|
-
const { findNearestComponent: findNearestComponent2 } = await Promise.resolve().then(() => (init_transformCache(), exports_transformCache));
|
|
203520
|
-
const nearest = findNearestComponent2(resolve21(primaryFile));
|
|
203521
|
-
if (nearest)
|
|
203522
|
-
broadcastTarget = nearest;
|
|
203523
|
-
}
|
|
203524
|
-
const pageModuleUrl = await getReactModuleUrl(broadcastTarget);
|
|
203486
|
+
const pageModuleUrl = await getReactModuleUrl(primaryFile);
|
|
203525
203487
|
if (pageModuleUrl) {
|
|
203526
203488
|
const serverDuration = Date.now() - startTime;
|
|
203527
203489
|
state.lastHmrPath = relative9(process.cwd(), primaryFile).replace(/\\/g, "/");
|
|
@@ -205308,5 +205270,5 @@ export {
|
|
|
205308
205270
|
ANGULAR_INIT_TIMEOUT_MS
|
|
205309
205271
|
};
|
|
205310
205272
|
|
|
205311
|
-
//# debugId=
|
|
205273
|
+
//# debugId=FFF411E23F884D9A64756E2164756E21
|
|
205312
205274
|
//# sourceMappingURL=index.js.map
|