@absolutejs/absolute 0.19.0-beta.759 → 0.19.0-beta.760
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/dist/angular/index.js +47 -25
- package/dist/angular/index.js.map +3 -3
- package/dist/angular/server.js +47 -25
- package/dist/angular/server.js.map +3 -3
- package/dist/build.js +58 -35
- package/dist/build.js.map +4 -4
- package/dist/index.js +58 -35
- package/dist/index.js.map +4 -4
- package/package.json +7 -7
package/dist/build.js
CHANGED
|
@@ -43552,11 +43552,11 @@ var readTsconfigPathAliases = () => {
|
|
|
43552
43552
|
join15(candidate, "index.jsx")
|
|
43553
43553
|
];
|
|
43554
43554
|
return candidates.find((file3) => existsSync16(file3));
|
|
43555
|
-
},
|
|
43555
|
+
}, createLegacyAngularAnimationUsageResolver = (rootDir) => {
|
|
43556
43556
|
const baseDir = resolve16(rootDir);
|
|
43557
43557
|
const tsconfigAliases = readTsconfigPathAliases();
|
|
43558
43558
|
const transpiler4 = new Bun.Transpiler({ loader: "tsx" });
|
|
43559
|
-
const
|
|
43559
|
+
const scanCache = new Map;
|
|
43560
43560
|
const resolveLocalImport = (specifier, fromDir) => {
|
|
43561
43561
|
if (specifier.startsWith(".") || specifier.startsWith("/")) {
|
|
43562
43562
|
return resolveSourceFile(resolve16(fromDir, specifier));
|
|
@@ -43576,7 +43576,40 @@ var readTsconfigPathAliases = () => {
|
|
|
43576
43576
|
return;
|
|
43577
43577
|
}
|
|
43578
43578
|
};
|
|
43579
|
-
const
|
|
43579
|
+
const scanFile = (filePath) => {
|
|
43580
|
+
const actualPath = resolveSourceFile(filePath);
|
|
43581
|
+
if (!actualPath) {
|
|
43582
|
+
return Promise.resolve({
|
|
43583
|
+
imports: [],
|
|
43584
|
+
usesLegacyAnimations: false
|
|
43585
|
+
});
|
|
43586
|
+
}
|
|
43587
|
+
const resolved = resolve16(actualPath);
|
|
43588
|
+
const cached = scanCache.get(resolved);
|
|
43589
|
+
if (cached)
|
|
43590
|
+
return cached;
|
|
43591
|
+
const promise = (async () => {
|
|
43592
|
+
let sourceCode;
|
|
43593
|
+
try {
|
|
43594
|
+
sourceCode = await fs2.readFile(resolved, "utf-8");
|
|
43595
|
+
} catch {
|
|
43596
|
+
return { imports: [], usesLegacyAnimations: false };
|
|
43597
|
+
}
|
|
43598
|
+
let imports;
|
|
43599
|
+
try {
|
|
43600
|
+
imports = transpiler4.scanImports(sourceCode);
|
|
43601
|
+
} catch {
|
|
43602
|
+
return { imports: [], usesLegacyAnimations: false };
|
|
43603
|
+
}
|
|
43604
|
+
return {
|
|
43605
|
+
imports: imports.map((imp) => imp.path),
|
|
43606
|
+
usesLegacyAnimations: imports.some((imp) => imp.path === "@angular/animations")
|
|
43607
|
+
};
|
|
43608
|
+
})();
|
|
43609
|
+
scanCache.set(resolved, promise);
|
|
43610
|
+
return promise;
|
|
43611
|
+
};
|
|
43612
|
+
const visit = async (filePath, visited = new Set) => {
|
|
43580
43613
|
const actualPath = resolveSourceFile(filePath);
|
|
43581
43614
|
if (!actualPath)
|
|
43582
43615
|
return false;
|
|
@@ -43584,30 +43617,18 @@ var readTsconfigPathAliases = () => {
|
|
|
43584
43617
|
if (visited.has(resolved))
|
|
43585
43618
|
return false;
|
|
43586
43619
|
visited.add(resolved);
|
|
43587
|
-
|
|
43588
|
-
|
|
43589
|
-
|
|
43590
|
-
|
|
43591
|
-
|
|
43592
|
-
|
|
43593
|
-
let imports;
|
|
43594
|
-
try {
|
|
43595
|
-
imports = transpiler4.scanImports(sourceCode);
|
|
43596
|
-
} catch {
|
|
43597
|
-
return false;
|
|
43598
|
-
}
|
|
43599
|
-
for (const imp of imports) {
|
|
43600
|
-
if (imp.path === "@angular/animations")
|
|
43601
|
-
return true;
|
|
43602
|
-
}
|
|
43603
|
-
for (const imp of imports) {
|
|
43604
|
-
const importedPath = resolveLocalImport(imp.path, dirname10(resolved));
|
|
43605
|
-
if (importedPath && await visit(importedPath))
|
|
43620
|
+
const scan = await scanFile(resolved);
|
|
43621
|
+
if (scan.usesLegacyAnimations)
|
|
43622
|
+
return true;
|
|
43623
|
+
for (const specifier of scan.imports) {
|
|
43624
|
+
const importedPath = resolveLocalImport(specifier, dirname10(resolved));
|
|
43625
|
+
if (importedPath && await visit(importedPath, visited)) {
|
|
43606
43626
|
return true;
|
|
43627
|
+
}
|
|
43607
43628
|
}
|
|
43608
43629
|
return false;
|
|
43609
43630
|
};
|
|
43610
|
-
return visit(entryPath);
|
|
43631
|
+
return (entryPath) => visit(entryPath);
|
|
43611
43632
|
}, resolveDevClientDir4 = () => {
|
|
43612
43633
|
const projectRoot = process.cwd();
|
|
43613
43634
|
const fromSource = resolve16(import.meta.dir, "../dev/client");
|
|
@@ -44261,6 +44282,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44261
44282
|
const indexesDir = join15(compiledParent, "indexes");
|
|
44262
44283
|
await fs2.mkdir(indexesDir, { recursive: true });
|
|
44263
44284
|
const aotOutputs = hmr ? [] : await compileAngularFiles(entryPoints.map((entry) => resolve16(entry)), compiledRoot, stylePreprocessors);
|
|
44285
|
+
const usesLegacyAngularAnimations = createLegacyAngularAnimationUsageResolver(outRoot);
|
|
44264
44286
|
const compileTasks = entryPoints.map(async (entry) => {
|
|
44265
44287
|
const resolvedEntry = resolve16(entry);
|
|
44266
44288
|
const relativeEntry = relative9(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
|
|
@@ -44312,7 +44334,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44312
44334
|
return fallback;
|
|
44313
44335
|
};
|
|
44314
44336
|
const componentClassName = detectExportedComponentClass(original, `${toPascal(fileBase)}Component`);
|
|
44315
|
-
const usesLegacyAnimations = await
|
|
44337
|
+
const usesLegacyAnimations = await usesLegacyAngularAnimations(resolvedEntry);
|
|
44316
44338
|
const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
|
|
44317
44339
|
const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
|
|
44318
44340
|
const clientFile = join15(indexesDir, jsName);
|
|
@@ -45216,7 +45238,7 @@ var isDev, collectConventionSourceFiles = (entry) => {
|
|
|
45216
45238
|
const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
|
|
45217
45239
|
const resolvePattern = /import\.meta\.resolve\(\s*["'](\.\.?\/[^"']+)["']\s*\)/g;
|
|
45218
45240
|
const workerPaths = new Set;
|
|
45219
|
-
await dirs.
|
|
45241
|
+
await Promise.all(dirs.map((dir) => scanWorkerReferencesInDir(dir, [urlPattern, resolvePattern], workerPaths)));
|
|
45220
45242
|
return [...workerPaths];
|
|
45221
45243
|
}, copyDevIndexes = async ({
|
|
45222
45244
|
buildPath,
|
|
@@ -45575,6 +45597,15 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45575
45597
|
const angularEntries = isIncremental ? filterToIncrementalEntries(allAngularEntries, (entry) => entry) : allAngularEntries;
|
|
45576
45598
|
const globalCssEntries = isIncremental ? filterToIncrementalEntries(allGlobalCssEntries, (entry) => entry) : allGlobalCssEntries;
|
|
45577
45599
|
const hmrClientBundlePromise = hmr && (htmlDir || htmxDir) ? buildHMRClient() : undefined;
|
|
45600
|
+
const allFrameworkDirs = [
|
|
45601
|
+
reactDir,
|
|
45602
|
+
svelteDir,
|
|
45603
|
+
vueDir,
|
|
45604
|
+
angularDir,
|
|
45605
|
+
htmlDir,
|
|
45606
|
+
htmxDir
|
|
45607
|
+
].filter((dir) => Boolean(dir));
|
|
45608
|
+
const urlReferencedFilesPromise = scanWorkerReferences(allFrameworkDirs);
|
|
45578
45609
|
const shouldCompileSvelte = svelteDir && svelteEntries.length > 0;
|
|
45579
45610
|
const shouldCompileVue = vueDir && vueEntries.length > 0;
|
|
45580
45611
|
const shouldCompileAngular = angularDir && angularEntries.length > 0;
|
|
@@ -45673,15 +45704,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45673
45704
|
...angularServerPaths
|
|
45674
45705
|
];
|
|
45675
45706
|
const reactClientEntryPoints = [...reactEntries];
|
|
45676
|
-
const
|
|
45677
|
-
reactDir,
|
|
45678
|
-
svelteDir,
|
|
45679
|
-
vueDir,
|
|
45680
|
-
angularDir,
|
|
45681
|
-
htmlDir,
|
|
45682
|
-
htmxDir
|
|
45683
|
-
].filter((dir) => Boolean(dir));
|
|
45684
|
-
const urlReferencedFiles = await scanWorkerReferences(allFrameworkDirs);
|
|
45707
|
+
const urlReferencedFiles = await urlReferencedFilesPromise;
|
|
45685
45708
|
const nonReactClientEntryPoints = [
|
|
45686
45709
|
...svelteIndexPaths,
|
|
45687
45710
|
...svelteClientPaths,
|
|
@@ -50105,5 +50128,5 @@ export {
|
|
|
50105
50128
|
build
|
|
50106
50129
|
};
|
|
50107
50130
|
|
|
50108
|
-
//# debugId=
|
|
50131
|
+
//# debugId=7C0EA9CE9BD464E064756E2164756E21
|
|
50109
50132
|
//# sourceMappingURL=build.js.map
|