@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/index.js
CHANGED
|
@@ -43744,11 +43744,11 @@ var readTsconfigPathAliases = () => {
|
|
|
43744
43744
|
join15(candidate, "index.jsx")
|
|
43745
43745
|
];
|
|
43746
43746
|
return candidates.find((file4) => existsSync16(file4));
|
|
43747
|
-
},
|
|
43747
|
+
}, createLegacyAngularAnimationUsageResolver = (rootDir) => {
|
|
43748
43748
|
const baseDir = resolve19(rootDir);
|
|
43749
43749
|
const tsconfigAliases = readTsconfigPathAliases();
|
|
43750
43750
|
const transpiler4 = new Bun.Transpiler({ loader: "tsx" });
|
|
43751
|
-
const
|
|
43751
|
+
const scanCache = new Map;
|
|
43752
43752
|
const resolveLocalImport = (specifier, fromDir) => {
|
|
43753
43753
|
if (specifier.startsWith(".") || specifier.startsWith("/")) {
|
|
43754
43754
|
return resolveSourceFile(resolve19(fromDir, specifier));
|
|
@@ -43768,7 +43768,40 @@ var readTsconfigPathAliases = () => {
|
|
|
43768
43768
|
return;
|
|
43769
43769
|
}
|
|
43770
43770
|
};
|
|
43771
|
-
const
|
|
43771
|
+
const scanFile = (filePath) => {
|
|
43772
|
+
const actualPath = resolveSourceFile(filePath);
|
|
43773
|
+
if (!actualPath) {
|
|
43774
|
+
return Promise.resolve({
|
|
43775
|
+
imports: [],
|
|
43776
|
+
usesLegacyAnimations: false
|
|
43777
|
+
});
|
|
43778
|
+
}
|
|
43779
|
+
const resolved = resolve19(actualPath);
|
|
43780
|
+
const cached = scanCache.get(resolved);
|
|
43781
|
+
if (cached)
|
|
43782
|
+
return cached;
|
|
43783
|
+
const promise = (async () => {
|
|
43784
|
+
let sourceCode;
|
|
43785
|
+
try {
|
|
43786
|
+
sourceCode = await fs2.readFile(resolved, "utf-8");
|
|
43787
|
+
} catch {
|
|
43788
|
+
return { imports: [], usesLegacyAnimations: false };
|
|
43789
|
+
}
|
|
43790
|
+
let imports;
|
|
43791
|
+
try {
|
|
43792
|
+
imports = transpiler4.scanImports(sourceCode);
|
|
43793
|
+
} catch {
|
|
43794
|
+
return { imports: [], usesLegacyAnimations: false };
|
|
43795
|
+
}
|
|
43796
|
+
return {
|
|
43797
|
+
imports: imports.map((imp) => imp.path),
|
|
43798
|
+
usesLegacyAnimations: imports.some((imp) => imp.path === "@angular/animations")
|
|
43799
|
+
};
|
|
43800
|
+
})();
|
|
43801
|
+
scanCache.set(resolved, promise);
|
|
43802
|
+
return promise;
|
|
43803
|
+
};
|
|
43804
|
+
const visit = async (filePath, visited = new Set) => {
|
|
43772
43805
|
const actualPath = resolveSourceFile(filePath);
|
|
43773
43806
|
if (!actualPath)
|
|
43774
43807
|
return false;
|
|
@@ -43776,30 +43809,18 @@ var readTsconfigPathAliases = () => {
|
|
|
43776
43809
|
if (visited.has(resolved))
|
|
43777
43810
|
return false;
|
|
43778
43811
|
visited.add(resolved);
|
|
43779
|
-
|
|
43780
|
-
|
|
43781
|
-
|
|
43782
|
-
|
|
43783
|
-
|
|
43784
|
-
|
|
43785
|
-
let imports;
|
|
43786
|
-
try {
|
|
43787
|
-
imports = transpiler4.scanImports(sourceCode);
|
|
43788
|
-
} catch {
|
|
43789
|
-
return false;
|
|
43790
|
-
}
|
|
43791
|
-
for (const imp of imports) {
|
|
43792
|
-
if (imp.path === "@angular/animations")
|
|
43793
|
-
return true;
|
|
43794
|
-
}
|
|
43795
|
-
for (const imp of imports) {
|
|
43796
|
-
const importedPath = resolveLocalImport(imp.path, dirname11(resolved));
|
|
43797
|
-
if (importedPath && await visit(importedPath))
|
|
43812
|
+
const scan = await scanFile(resolved);
|
|
43813
|
+
if (scan.usesLegacyAnimations)
|
|
43814
|
+
return true;
|
|
43815
|
+
for (const specifier of scan.imports) {
|
|
43816
|
+
const importedPath = resolveLocalImport(specifier, dirname11(resolved));
|
|
43817
|
+
if (importedPath && await visit(importedPath, visited)) {
|
|
43798
43818
|
return true;
|
|
43819
|
+
}
|
|
43799
43820
|
}
|
|
43800
43821
|
return false;
|
|
43801
43822
|
};
|
|
43802
|
-
return visit(entryPath);
|
|
43823
|
+
return (entryPath) => visit(entryPath);
|
|
43803
43824
|
}, resolveDevClientDir4 = () => {
|
|
43804
43825
|
const projectRoot = process.cwd();
|
|
43805
43826
|
const fromSource = resolve19(import.meta.dir, "../dev/client");
|
|
@@ -44453,6 +44474,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44453
44474
|
const indexesDir = join15(compiledParent, "indexes");
|
|
44454
44475
|
await fs2.mkdir(indexesDir, { recursive: true });
|
|
44455
44476
|
const aotOutputs = hmr ? [] : await compileAngularFiles(entryPoints.map((entry) => resolve19(entry)), compiledRoot, stylePreprocessors);
|
|
44477
|
+
const usesLegacyAngularAnimations = createLegacyAngularAnimationUsageResolver(outRoot);
|
|
44456
44478
|
const compileTasks = entryPoints.map(async (entry) => {
|
|
44457
44479
|
const resolvedEntry = resolve19(entry);
|
|
44458
44480
|
const relativeEntry = relative9(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
|
|
@@ -44504,7 +44526,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44504
44526
|
return fallback;
|
|
44505
44527
|
};
|
|
44506
44528
|
const componentClassName = detectExportedComponentClass(original, `${toPascal(fileBase)}Component`);
|
|
44507
|
-
const usesLegacyAnimations = await
|
|
44529
|
+
const usesLegacyAnimations = await usesLegacyAngularAnimations(resolvedEntry);
|
|
44508
44530
|
const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
|
|
44509
44531
|
const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
|
|
44510
44532
|
const clientFile = join15(indexesDir, jsName);
|
|
@@ -45408,7 +45430,7 @@ var isDev2, collectConventionSourceFiles = (entry) => {
|
|
|
45408
45430
|
const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
|
|
45409
45431
|
const resolvePattern = /import\.meta\.resolve\(\s*["'](\.\.?\/[^"']+)["']\s*\)/g;
|
|
45410
45432
|
const workerPaths = new Set;
|
|
45411
|
-
await dirs.
|
|
45433
|
+
await Promise.all(dirs.map((dir) => scanWorkerReferencesInDir(dir, [urlPattern, resolvePattern], workerPaths)));
|
|
45412
45434
|
return [...workerPaths];
|
|
45413
45435
|
}, copyDevIndexes = async ({
|
|
45414
45436
|
buildPath,
|
|
@@ -45767,6 +45789,15 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45767
45789
|
const angularEntries = isIncremental ? filterToIncrementalEntries(allAngularEntries, (entry) => entry) : allAngularEntries;
|
|
45768
45790
|
const globalCssEntries = isIncremental ? filterToIncrementalEntries(allGlobalCssEntries, (entry) => entry) : allGlobalCssEntries;
|
|
45769
45791
|
const hmrClientBundlePromise = hmr && (htmlDir || htmxDir) ? buildHMRClient() : undefined;
|
|
45792
|
+
const allFrameworkDirs = [
|
|
45793
|
+
reactDir,
|
|
45794
|
+
svelteDir,
|
|
45795
|
+
vueDir,
|
|
45796
|
+
angularDir,
|
|
45797
|
+
htmlDir,
|
|
45798
|
+
htmxDir
|
|
45799
|
+
].filter((dir) => Boolean(dir));
|
|
45800
|
+
const urlReferencedFilesPromise = scanWorkerReferences(allFrameworkDirs);
|
|
45770
45801
|
const shouldCompileSvelte = svelteDir && svelteEntries.length > 0;
|
|
45771
45802
|
const shouldCompileVue = vueDir && vueEntries.length > 0;
|
|
45772
45803
|
const shouldCompileAngular = angularDir && angularEntries.length > 0;
|
|
@@ -45865,15 +45896,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45865
45896
|
...angularServerPaths
|
|
45866
45897
|
];
|
|
45867
45898
|
const reactClientEntryPoints = [...reactEntries];
|
|
45868
|
-
const
|
|
45869
|
-
reactDir,
|
|
45870
|
-
svelteDir,
|
|
45871
|
-
vueDir,
|
|
45872
|
-
angularDir,
|
|
45873
|
-
htmlDir,
|
|
45874
|
-
htmxDir
|
|
45875
|
-
].filter((dir) => Boolean(dir));
|
|
45876
|
-
const urlReferencedFiles = await scanWorkerReferences(allFrameworkDirs);
|
|
45899
|
+
const urlReferencedFiles = await urlReferencedFilesPromise;
|
|
45877
45900
|
const nonReactClientEntryPoints = [
|
|
45878
45901
|
...svelteIndexPaths,
|
|
45879
45902
|
...svelteClientPaths,
|
|
@@ -58565,5 +58588,5 @@ export {
|
|
|
58565
58588
|
ANGULAR_INIT_TIMEOUT_MS
|
|
58566
58589
|
};
|
|
58567
58590
|
|
|
58568
|
-
//# debugId=
|
|
58591
|
+
//# debugId=9C7C0E7B717B7EB164756E2164756E21
|
|
58569
58592
|
//# sourceMappingURL=index.js.map
|