@absolutejs/absolute 0.19.0-beta.830 → 0.19.0-beta.832
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/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/build.js +195 -195
- package/dist/build.js.map +3 -3
- package/dist/index.js +198 -198
- package/dist/index.js.map +3 -3
- package/dist/svelte/router/Route.svelte +7 -12
- package/dist/svelte/router/Router.svelte +28 -12
- package/package.json +1 -1
package/dist/build.js
CHANGED
|
@@ -374,7 +374,7 @@ var init_islands = () => {};
|
|
|
374
374
|
|
|
375
375
|
// src/build/islandEntries.ts
|
|
376
376
|
import { mkdirSync, rmSync, writeFileSync } from "fs";
|
|
377
|
-
import { dirname, extname as extname2, join
|
|
377
|
+
import { dirname, extname as extname2, join, relative, resolve } from "path";
|
|
378
378
|
import ts from "typescript";
|
|
379
379
|
var frameworks, isRecord2 = (value) => typeof value === "object" && value !== null, resolveRegistryExport = (mod) => {
|
|
380
380
|
if (isRecord2(mod.islandRegistry))
|
|
@@ -607,11 +607,11 @@ export default component;
|
|
|
607
607
|
buildPath,
|
|
608
608
|
clientPathMaps = {}
|
|
609
609
|
}) => {
|
|
610
|
-
const generatedRoot =
|
|
610
|
+
const generatedRoot = join(buildPath, "_island_entries");
|
|
611
611
|
rmSync(generatedRoot, { force: true, recursive: true });
|
|
612
612
|
const entries = [];
|
|
613
613
|
for (const definition of buildInfo.definitions) {
|
|
614
|
-
const entryPath =
|
|
614
|
+
const entryPath = join(generatedRoot, "islands", definition.framework, `${definition.component}.ts`);
|
|
615
615
|
const { buildReference } = definition;
|
|
616
616
|
const source = buildReference ? resolveIslandSourcePath(buildInfo.resolvedRegistryPath, buildReference.source) : null;
|
|
617
617
|
const compiledSourcePath = source && shouldUseCompiledClientPath(definition.framework, source) ? clientPathMaps[definition.framework]?.get(source) : undefined;
|
|
@@ -664,7 +664,7 @@ __export(exports_generateReactIndexes, {
|
|
|
664
664
|
});
|
|
665
665
|
import { existsSync, mkdirSync as mkdirSync2 } from "fs";
|
|
666
666
|
import { readdir, rm, writeFile } from "fs/promises";
|
|
667
|
-
import { basename, join as
|
|
667
|
+
import { basename, join as join2, relative as relative2, resolve as resolve2, sep } from "path";
|
|
668
668
|
var {Glob } = globalThis.Bun;
|
|
669
669
|
var indexContentCache, resolveDevClientDir = () => {
|
|
670
670
|
const projectRoot = process.cwd();
|
|
@@ -697,8 +697,8 @@ var indexContentCache, resolveDevClientDir = () => {
|
|
|
697
697
|
});
|
|
698
698
|
if (staleIndexes.length > 0) {
|
|
699
699
|
await Promise.all(staleIndexes.map((indexFile) => {
|
|
700
|
-
indexContentCache.delete(
|
|
701
|
-
return rm(
|
|
700
|
+
indexContentCache.delete(join2(reactIndexesDirectory, indexFile));
|
|
701
|
+
return rm(join2(reactIndexesDirectory, indexFile), {
|
|
702
702
|
force: true
|
|
703
703
|
});
|
|
704
704
|
}));
|
|
@@ -981,7 +981,7 @@ var indexContentCache, resolveDevClientDir = () => {
|
|
|
981
981
|
] : []
|
|
982
982
|
].join(`
|
|
983
983
|
`);
|
|
984
|
-
const indexPath =
|
|
984
|
+
const indexPath = join2(reactIndexesDirectory, `${componentName}.tsx`);
|
|
985
985
|
const hasher = new Bun.CryptoHasher("md5");
|
|
986
986
|
hasher.update(content);
|
|
987
987
|
const contentHash = hasher.digest("hex");
|
|
@@ -995,7 +995,7 @@ var indexContentCache, resolveDevClientDir = () => {
|
|
|
995
995
|
if (!isDev) {
|
|
996
996
|
return;
|
|
997
997
|
}
|
|
998
|
-
const refreshPath =
|
|
998
|
+
const refreshPath = join2(reactIndexesDirectory, "_refresh.tsx");
|
|
999
999
|
if (!existsSync(refreshPath)) {
|
|
1000
1000
|
await writeFile(refreshPath, `import '${refreshSetupPath}';
|
|
1001
1001
|
import 'react';
|
|
@@ -1006,9 +1006,9 @@ import 'react-dom/client';
|
|
|
1006
1006
|
var init_generateReactIndexes = __esm(() => {
|
|
1007
1007
|
indexContentCache = new Map;
|
|
1008
1008
|
devClientDir = resolveDevClientDir();
|
|
1009
|
-
errorOverlayPath =
|
|
1010
|
-
hmrClientPath =
|
|
1011
|
-
refreshSetupPath =
|
|
1009
|
+
errorOverlayPath = join2(devClientDir, "errorOverlay.ts").replace(/\\/g, "/");
|
|
1010
|
+
hmrClientPath = join2(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
|
|
1011
|
+
refreshSetupPath = join2(devClientDir, "reactRefreshSetup.ts").replace(/\\/g, "/");
|
|
1012
1012
|
});
|
|
1013
1013
|
|
|
1014
1014
|
// src/build/wrapHTMLScript.ts
|
|
@@ -1735,7 +1735,7 @@ var init_streamingSlots = __esm(() => {
|
|
|
1735
1735
|
|
|
1736
1736
|
// src/angular/resolveAngularPackage.ts
|
|
1737
1737
|
import { existsSync as existsSync2, readFileSync } from "fs";
|
|
1738
|
-
import { join as
|
|
1738
|
+
import { join as join3, resolve as resolve3 } from "path";
|
|
1739
1739
|
var resolveAngularPackageDir = (specifier) => {
|
|
1740
1740
|
const fromCompiledRuntime = process.env.ABSOLUTE_BUILD_DIR ? resolve3(process.env.ABSOLUTE_BUILD_DIR, "node_modules", specifier) : null;
|
|
1741
1741
|
if (fromCompiledRuntime && existsSync2(fromCompiledRuntime)) {
|
|
@@ -1748,10 +1748,10 @@ var resolveAngularPackageDir = (specifier) => {
|
|
|
1748
1748
|
return null;
|
|
1749
1749
|
}, resolvePackageEntry = (packageDir) => {
|
|
1750
1750
|
try {
|
|
1751
|
-
const pkg = JSON.parse(readFileSync(
|
|
1751
|
+
const pkg = JSON.parse(readFileSync(join3(packageDir, "package.json"), "utf-8"));
|
|
1752
1752
|
const rootExport = pkg.exports?.["."];
|
|
1753
1753
|
const entry = (typeof rootExport === "string" ? rootExport : rootExport?.default) ?? pkg.module ?? pkg.main ?? "index.js";
|
|
1754
|
-
return
|
|
1754
|
+
return join3(packageDir, entry);
|
|
1755
1755
|
} catch {
|
|
1756
1756
|
return packageDir;
|
|
1757
1757
|
}
|
|
@@ -1766,7 +1766,7 @@ var resolveAngularPackageDir = (specifier) => {
|
|
|
1766
1766
|
resolve3(process.cwd(), "build")
|
|
1767
1767
|
].filter((value) => Boolean(value));
|
|
1768
1768
|
for (const buildDir of buildDirs) {
|
|
1769
|
-
const vendorPath =
|
|
1769
|
+
const vendorPath = join3(buildDir, "angular", "vendor", "server", `${toSafeVendorName(specifier)}.js`);
|
|
1770
1770
|
if (existsSync2(vendorPath))
|
|
1771
1771
|
return vendorPath;
|
|
1772
1772
|
}
|
|
@@ -2337,7 +2337,7 @@ var init_islandSsr = __esm(() => {
|
|
|
2337
2337
|
});
|
|
2338
2338
|
|
|
2339
2339
|
// src/build/resolvePackageImport.ts
|
|
2340
|
-
import { resolve as resolve4, join as
|
|
2340
|
+
import { resolve as resolve4, join as join4 } from "path";
|
|
2341
2341
|
import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
|
|
2342
2342
|
var resolveExportPath = (entry, conditions) => {
|
|
2343
2343
|
if (typeof entry === "string")
|
|
@@ -2363,7 +2363,7 @@ var resolveExportPath = (entry, conditions) => {
|
|
|
2363
2363
|
const currentPackageJson = existsSync3(currentPackageJsonPath) ? JSON.parse(readFileSync2(currentPackageJsonPath, "utf-8")) : null;
|
|
2364
2364
|
const currentPackageDir = currentPackageJson?.name === packageName ? process.cwd() : null;
|
|
2365
2365
|
const packageDir = currentPackageDir ?? resolve4(process.cwd(), "node_modules", packageName ?? "");
|
|
2366
|
-
const packageJsonPath =
|
|
2366
|
+
const packageJsonPath = join4(packageDir, "package.json");
|
|
2367
2367
|
if (!existsSync3(packageJsonPath))
|
|
2368
2368
|
return null;
|
|
2369
2369
|
try {
|
|
@@ -2543,7 +2543,7 @@ import {
|
|
|
2543
2543
|
dirname as dirname2,
|
|
2544
2544
|
extname as extname3,
|
|
2545
2545
|
isAbsolute,
|
|
2546
|
-
join as
|
|
2546
|
+
join as join5,
|
|
2547
2547
|
relative as relative3,
|
|
2548
2548
|
resolve as resolve5
|
|
2549
2549
|
} from "path";
|
|
@@ -2642,13 +2642,13 @@ ${message}`);
|
|
|
2642
2642
|
const ext = extname3(basePath);
|
|
2643
2643
|
const paths = ext ? [basePath] : getLanguageExtensions(language).flatMap((extension) => [
|
|
2644
2644
|
`${basePath}${extension}`,
|
|
2645
|
-
|
|
2645
|
+
join5(basePath, `index${extension}`)
|
|
2646
2646
|
]);
|
|
2647
2647
|
if (language === "scss" || language === "sass") {
|
|
2648
2648
|
return paths.flatMap((path) => {
|
|
2649
2649
|
const dir = dirname2(path);
|
|
2650
2650
|
const base = path.slice(dir.length + 1);
|
|
2651
|
-
return [path,
|
|
2651
|
+
return [path, join5(dir, `_${base}`)];
|
|
2652
2652
|
});
|
|
2653
2653
|
}
|
|
2654
2654
|
return paths;
|
|
@@ -3053,7 +3053,7 @@ var init_stylePreprocessor = __esm(() => {
|
|
|
3053
3053
|
STYLE_LANGUAGE_PATTERN = /^(s[ac]ss|less|styl(?:us)?)$/i;
|
|
3054
3054
|
importOptionalPeer = new Function("specifier", "return import(specifier)");
|
|
3055
3055
|
requireOptionalPeer = new Function("specifier", "return require(specifier)");
|
|
3056
|
-
requireFromCwd = createRequire(
|
|
3056
|
+
requireFromCwd = createRequire(join5(process.cwd(), "package.json"));
|
|
3057
3057
|
styleDependencyGraph = new Map;
|
|
3058
3058
|
styleOutputHashes = new Map;
|
|
3059
3059
|
stylePreprocessorPlugin = createStylePreprocessorPlugin();
|
|
@@ -3061,13 +3061,13 @@ var init_stylePreprocessor = __esm(() => {
|
|
|
3061
3061
|
|
|
3062
3062
|
// src/core/svelteServerModule.ts
|
|
3063
3063
|
import { mkdir, readdir as readdir2 } from "fs/promises";
|
|
3064
|
-
import { basename as basename2, dirname as dirname3, extname as extname4, join as
|
|
3064
|
+
import { basename as basename2, dirname as dirname3, extname as extname4, join as join6, relative as relative4, resolve as resolve6 } from "path";
|
|
3065
3065
|
var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, ensureRelativeImportPath = (from, target) => {
|
|
3066
3066
|
const importPath = relative4(dirname3(from), target).replace(/\\/g, "/");
|
|
3067
3067
|
return importPath.startsWith(".") ? importPath : `./${importPath}`;
|
|
3068
3068
|
}, processDirectoryEntries = (entries, dir, targetFileName, stack) => {
|
|
3069
3069
|
for (const entry of entries) {
|
|
3070
|
-
const entryPath =
|
|
3070
|
+
const entryPath = join6(dir, entry.name);
|
|
3071
3071
|
if (entry.isDirectory())
|
|
3072
3072
|
stack.push(entryPath);
|
|
3073
3073
|
if (entry.isFile() && entry.name === targetFileName) {
|
|
@@ -3097,11 +3097,11 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
|
|
|
3097
3097
|
if (cachedPath !== undefined) {
|
|
3098
3098
|
return cachedPath;
|
|
3099
3099
|
}
|
|
3100
|
-
if (!sourcePath.includes(`${
|
|
3100
|
+
if (!sourcePath.includes(`${join6(process.cwd(), "build")}${process.platform === "win32" ? "" : "/"}`) && !sourcePath.includes("/build/")) {
|
|
3101
3101
|
originalSourcePathCache.set(sourcePath, sourcePath);
|
|
3102
3102
|
return sourcePath;
|
|
3103
3103
|
}
|
|
3104
|
-
const resolvedSourcePath = await findSourceFileByBasename(
|
|
3104
|
+
const resolvedSourcePath = await findSourceFileByBasename(join6(process.cwd(), "src"), normalizeBuiltSvelteFileName(sourcePath));
|
|
3105
3105
|
const nextPath = resolvedSourcePath ?? sourcePath;
|
|
3106
3106
|
originalSourcePathCache.set(sourcePath, nextPath);
|
|
3107
3107
|
return nextPath;
|
|
@@ -3117,11 +3117,11 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
|
|
|
3117
3117
|
`${basePath}.mjs`,
|
|
3118
3118
|
`${basePath}.cjs`,
|
|
3119
3119
|
`${basePath}.json`,
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3120
|
+
join6(basePath, "index.ts"),
|
|
3121
|
+
join6(basePath, "index.js"),
|
|
3122
|
+
join6(basePath, "index.mjs"),
|
|
3123
|
+
join6(basePath, "index.cjs"),
|
|
3124
|
+
join6(basePath, "index.json")
|
|
3125
3125
|
];
|
|
3126
3126
|
const existResults = await Promise.all(candidates.map((candidate) => Bun.file(candidate).exists()));
|
|
3127
3127
|
const foundIndex = existResults.indexOf(true);
|
|
@@ -3129,7 +3129,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
|
|
|
3129
3129
|
}, getCachedModulePath = (sourcePath) => {
|
|
3130
3130
|
const relativeSourcePath = relative4(process.cwd(), sourcePath).replace(/\\/g, "/");
|
|
3131
3131
|
const normalizedSourcePath = relativeSourcePath.startsWith("..") ? sourcePath.replace(/[:\\/]/g, "_") : relativeSourcePath;
|
|
3132
|
-
return
|
|
3132
|
+
return join6(serverCacheRoot, `${normalizedSourcePath}.server.js`);
|
|
3133
3133
|
}, resolveSvelteImport = async (spec, from) => {
|
|
3134
3134
|
if (!spec.startsWith(".") && !spec.startsWith("/")) {
|
|
3135
3135
|
const resolved = resolvePackageImport(spec);
|
|
@@ -3230,7 +3230,7 @@ var init_svelteServerModule = __esm(() => {
|
|
|
3230
3230
|
init_lowerIslandSyntax();
|
|
3231
3231
|
init_lowerAwaitSlotSyntax();
|
|
3232
3232
|
init_stylePreprocessor();
|
|
3233
|
-
serverCacheRoot =
|
|
3233
|
+
serverCacheRoot = join6(process.cwd(), ".absolutejs", "islands", "svelte");
|
|
3234
3234
|
compiledModuleCache = new Map;
|
|
3235
3235
|
originalSourcePathCache = new Map;
|
|
3236
3236
|
transpiler = new Bun.Transpiler({
|
|
@@ -8850,9 +8850,9 @@ var init_tailwindCompiler = __esm(() => {
|
|
|
8850
8850
|
|
|
8851
8851
|
// src/build/compileTailwind.ts
|
|
8852
8852
|
import { mkdir as mkdir2 } from "fs/promises";
|
|
8853
|
-
import { dirname as dirname5, join as
|
|
8853
|
+
import { dirname as dirname5, join as join7 } from "path";
|
|
8854
8854
|
var TAILWIND_CANDIDATE_EXTENSION_PATTERN, isTailwindCandidate = (filePath) => TAILWIND_CANDIDATE_EXTENSION_PATTERN.test(filePath), compileTailwind = async (input, output, buildPath, styleTransformConfig) => {
|
|
8855
|
-
const outputPath =
|
|
8855
|
+
const outputPath = join7(buildPath, output);
|
|
8856
8856
|
await mkdir2(dirname5(outputPath), { recursive: true });
|
|
8857
8857
|
await incrementalTailwindBuild({ input, output }, buildPath, [], styleTransformConfig);
|
|
8858
8858
|
}, compileTailwindConfig = async (tailwind, buildPath, styleTransformConfig) => compileTailwind(tailwind.input, tailwind.output, buildPath, styleTransformConfig);
|
|
@@ -8863,7 +8863,7 @@ var init_compileTailwind = __esm(() => {
|
|
|
8863
8863
|
|
|
8864
8864
|
// src/utils/imageProcessing.ts
|
|
8865
8865
|
import { existsSync as existsSync9, mkdirSync as mkdirSync3, readFileSync as readFileSync6, writeFileSync as writeFileSync3 } from "fs";
|
|
8866
|
-
import { join as
|
|
8866
|
+
import { join as join8, resolve as resolve8 } from "path";
|
|
8867
8867
|
var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_ENDPOINT = "/_absolute/image", BLUR_DEVIATION = 20, sharpModule = undefined, sharpLoaded = false, sharpWarned = false, snapToSize = (target, sizes) => {
|
|
8868
8868
|
for (const size of sizes) {
|
|
8869
8869
|
if (size >= target)
|
|
@@ -8918,7 +8918,7 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
|
|
|
8918
8918
|
const image = config?.imageSizes ?? DEFAULT_IMAGE_SIZES;
|
|
8919
8919
|
return [...device, ...image].sort((left, right) => left - right);
|
|
8920
8920
|
}, getCacheDir = (buildDir) => {
|
|
8921
|
-
const dir =
|
|
8921
|
+
const dir = join8(buildDir, ".cache", "images");
|
|
8922
8922
|
if (!existsSync9(dir))
|
|
8923
8923
|
mkdirSync3(dir, { recursive: true });
|
|
8924
8924
|
return dir;
|
|
@@ -8975,8 +8975,8 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
|
|
|
8975
8975
|
return toBuffer(buffer);
|
|
8976
8976
|
}
|
|
8977
8977
|
}, readFromCache = (cacheDir, cacheKey) => {
|
|
8978
|
-
const metaPath =
|
|
8979
|
-
const dataPath =
|
|
8978
|
+
const metaPath = join8(cacheDir, `${cacheKey}.meta`);
|
|
8979
|
+
const dataPath = join8(cacheDir, `${cacheKey}.data`);
|
|
8980
8980
|
if (!existsSync9(metaPath) || !existsSync9(dataPath))
|
|
8981
8981
|
return null;
|
|
8982
8982
|
try {
|
|
@@ -9003,8 +9003,8 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
|
|
|
9003
9003
|
return null;
|
|
9004
9004
|
}
|
|
9005
9005
|
}, writeToCache = (cacheDir, cacheKey, buffer, meta) => {
|
|
9006
|
-
const metaPath =
|
|
9007
|
-
const dataPath =
|
|
9006
|
+
const metaPath = join8(cacheDir, `${cacheKey}.meta`);
|
|
9007
|
+
const dataPath = join8(cacheDir, `${cacheKey}.data`);
|
|
9008
9008
|
writeFileSync3(dataPath, buffer);
|
|
9009
9009
|
writeFileSync3(metaPath, JSON.stringify(meta));
|
|
9010
9010
|
};
|
|
@@ -9092,7 +9092,7 @@ var init_optimizeHtmlImages = __esm(() => {
|
|
|
9092
9092
|
// src/cli/scripts/telemetry.ts
|
|
9093
9093
|
import { existsSync as existsSync10, mkdirSync as mkdirSync4, readFileSync as readFileSync7, writeFileSync as writeFileSync4 } from "fs";
|
|
9094
9094
|
import { homedir } from "os";
|
|
9095
|
-
import { join as
|
|
9095
|
+
import { join as join9 } from "path";
|
|
9096
9096
|
var configDir, configPath, getTelemetryConfig = () => {
|
|
9097
9097
|
try {
|
|
9098
9098
|
if (!existsSync10(configPath))
|
|
@@ -9105,14 +9105,14 @@ var configDir, configPath, getTelemetryConfig = () => {
|
|
|
9105
9105
|
}
|
|
9106
9106
|
};
|
|
9107
9107
|
var init_telemetry = __esm(() => {
|
|
9108
|
-
configDir =
|
|
9109
|
-
configPath =
|
|
9108
|
+
configDir = join9(homedir(), ".absolutejs");
|
|
9109
|
+
configPath = join9(configDir, "telemetry.json");
|
|
9110
9110
|
});
|
|
9111
9111
|
|
|
9112
9112
|
// src/cli/telemetryEvent.ts
|
|
9113
9113
|
import { existsSync as existsSync11, readFileSync as readFileSync8 } from "fs";
|
|
9114
9114
|
import { arch, platform } from "os";
|
|
9115
|
-
import { dirname as dirname6, join as
|
|
9115
|
+
import { dirname as dirname6, join as join10, parse } from "path";
|
|
9116
9116
|
var checkCandidate = (candidate) => {
|
|
9117
9117
|
if (!existsSync11(candidate)) {
|
|
9118
9118
|
return null;
|
|
@@ -9132,7 +9132,7 @@ var checkCandidate = (candidate) => {
|
|
|
9132
9132
|
}, findPackageVersion = () => {
|
|
9133
9133
|
let { dir } = import.meta;
|
|
9134
9134
|
while (dir !== parse(dir).root) {
|
|
9135
|
-
const candidate =
|
|
9135
|
+
const candidate = join10(dir, "package.json");
|
|
9136
9136
|
const version = checkCandidate(candidate);
|
|
9137
9137
|
if (version) {
|
|
9138
9138
|
return version;
|
|
@@ -9429,7 +9429,7 @@ var devVendorPaths = null, getDevVendorPaths = () => devVendorPaths, setDevVendo
|
|
|
9429
9429
|
|
|
9430
9430
|
// src/build/angularLinkerPlugin.ts
|
|
9431
9431
|
import { existsSync as existsSync13, mkdirSync as mkdirSync5, readFileSync as readFileSync9, writeFileSync as writeFileSync5 } from "fs";
|
|
9432
|
-
import { dirname as dirname7, join as
|
|
9432
|
+
import { dirname as dirname7, join as join11, relative as relative5, resolve as resolve11 } from "path";
|
|
9433
9433
|
import { createHash as createHash3 } from "crypto";
|
|
9434
9434
|
var CACHE_ROOT, createAngularLinkerPlugin = (linkerJitMode) => ({
|
|
9435
9435
|
name: "angular-linker",
|
|
@@ -9437,7 +9437,7 @@ var CACHE_ROOT, createAngularLinkerPlugin = (linkerJitMode) => ({
|
|
|
9437
9437
|
let needsLinking;
|
|
9438
9438
|
let babelTransform;
|
|
9439
9439
|
let linkerPlugin;
|
|
9440
|
-
const cacheDir =
|
|
9440
|
+
const cacheDir = join11(CACHE_ROOT, linkerJitMode ? "jit" : "aot");
|
|
9441
9441
|
bld.onLoad({ filter: /[\\/]@angular[\\/].*\.m?js$/ }, async (args) => {
|
|
9442
9442
|
const source = await Bun.file(args.path).text();
|
|
9443
9443
|
if (!needsLinking) {
|
|
@@ -9450,7 +9450,7 @@ var CACHE_ROOT, createAngularLinkerPlugin = (linkerJitMode) => ({
|
|
|
9450
9450
|
return;
|
|
9451
9451
|
}
|
|
9452
9452
|
const hash = createHash3("md5").update(source).digest("hex");
|
|
9453
|
-
const cachePath =
|
|
9453
|
+
const cachePath = join11(cacheDir, `${hash}.js`);
|
|
9454
9454
|
if (existsSync13(cachePath)) {
|
|
9455
9455
|
return {
|
|
9456
9456
|
contents: readFileSync9(cachePath, "utf-8"),
|
|
@@ -9530,7 +9530,7 @@ var init_cleanStaleOutputs = __esm(() => {
|
|
|
9530
9530
|
|
|
9531
9531
|
// src/utils/cleanup.ts
|
|
9532
9532
|
import { rm as rm3 } from "fs/promises";
|
|
9533
|
-
import { join as
|
|
9533
|
+
import { join as join12 } from "path";
|
|
9534
9534
|
var cleanup = async ({
|
|
9535
9535
|
angularDir,
|
|
9536
9536
|
reactDir,
|
|
@@ -9538,19 +9538,19 @@ var cleanup = async ({
|
|
|
9538
9538
|
vueDir
|
|
9539
9539
|
}) => {
|
|
9540
9540
|
await Promise.all([
|
|
9541
|
-
angularDir ? rm3(
|
|
9541
|
+
angularDir ? rm3(join12(angularDir, "generated"), {
|
|
9542
9542
|
force: true,
|
|
9543
9543
|
recursive: true
|
|
9544
9544
|
}) : undefined,
|
|
9545
|
-
reactDir ? rm3(
|
|
9545
|
+
reactDir ? rm3(join12(reactDir, "generated"), {
|
|
9546
9546
|
force: true,
|
|
9547
9547
|
recursive: true
|
|
9548
9548
|
}) : undefined,
|
|
9549
|
-
svelteDir ? rm3(
|
|
9549
|
+
svelteDir ? rm3(join12(svelteDir, "generated"), {
|
|
9550
9550
|
force: true,
|
|
9551
9551
|
recursive: true
|
|
9552
9552
|
}) : undefined,
|
|
9553
|
-
vueDir ? rm3(
|
|
9553
|
+
vueDir ? rm3(join12(vueDir, "generated"), {
|
|
9554
9554
|
force: true,
|
|
9555
9555
|
recursive: true
|
|
9556
9556
|
}) : undefined
|
|
@@ -9577,8 +9577,8 @@ var init_commonAncestor = () => {};
|
|
|
9577
9577
|
|
|
9578
9578
|
// src/utils/buildDirectoryLock.ts
|
|
9579
9579
|
import { mkdir as mkdir3, rm as rm4, stat as stat2, writeFile as writeFile4 } from "fs/promises";
|
|
9580
|
-
import { dirname as dirname8, join as
|
|
9581
|
-
var DEFAULT_LOCK_TIMEOUT_MS = 120000, DEFAULT_STALE_LOCK_MS, LOCK_POLL_MS = 250, heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", isAlreadyExistsError = (error) => error instanceof Error && ("code" in error) && error.code === "EEXIST", lockPathForBuildDirectory = (buildDirectory) =>
|
|
9580
|
+
import { dirname as dirname8, join as join13 } from "path";
|
|
9581
|
+
var DEFAULT_LOCK_TIMEOUT_MS = 120000, DEFAULT_STALE_LOCK_MS, LOCK_POLL_MS = 250, heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", isAlreadyExistsError = (error) => error instanceof Error && ("code" in error) && error.code === "EEXIST", lockPathForBuildDirectory = (buildDirectory) => join13(dirname8(buildDirectory), `.${buildDirectory.split(/[\\/]/).pop()}.lock`), readHeldLockEnv = () => new Set((process.env[HELD_LOCKS_ENV] ?? "").split(`
|
|
9582
9582
|
`).filter((entry) => entry.length > 0)), writeHeldLockEnv = (locks) => {
|
|
9583
9583
|
if (locks.size === 0) {
|
|
9584
9584
|
delete process.env[HELD_LOCKS_ENV];
|
|
@@ -9617,7 +9617,7 @@ var DEFAULT_LOCK_TIMEOUT_MS = 120000, DEFAULT_STALE_LOCK_MS, LOCK_POLL_MS = 250,
|
|
|
9617
9617
|
try {
|
|
9618
9618
|
await mkdir3(dirname8(lockPath), { recursive: true });
|
|
9619
9619
|
await mkdir3(lockPath);
|
|
9620
|
-
await writeFile4(
|
|
9620
|
+
await writeFile4(join13(lockPath, "owner"), JSON.stringify({
|
|
9621
9621
|
buildDirectory,
|
|
9622
9622
|
createdAt: new Date().toISOString(),
|
|
9623
9623
|
pid: process.pid
|
|
@@ -9823,7 +9823,7 @@ import { existsSync as existsSync14 } from "fs";
|
|
|
9823
9823
|
import { mkdir as mkdir4, stat as stat3 } from "fs/promises";
|
|
9824
9824
|
import {
|
|
9825
9825
|
dirname as dirname9,
|
|
9826
|
-
join as
|
|
9826
|
+
join as join14,
|
|
9827
9827
|
basename as basename4,
|
|
9828
9828
|
extname as extname5,
|
|
9829
9829
|
resolve as resolve14,
|
|
@@ -9882,14 +9882,14 @@ var resolveDevClientDir2 = () => {
|
|
|
9882
9882
|
`${basePath}.svelte`,
|
|
9883
9883
|
`${basePath}.svelte.ts`,
|
|
9884
9884
|
`${basePath}.svelte.js`,
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
|
|
9891
|
-
|
|
9892
|
-
|
|
9885
|
+
join14(basePath, "index.ts"),
|
|
9886
|
+
join14(basePath, "index.js"),
|
|
9887
|
+
join14(basePath, "index.mjs"),
|
|
9888
|
+
join14(basePath, "index.cjs"),
|
|
9889
|
+
join14(basePath, "index.json"),
|
|
9890
|
+
join14(basePath, "index.svelte"),
|
|
9891
|
+
join14(basePath, "index.svelte.ts"),
|
|
9892
|
+
join14(basePath, "index.svelte.js")
|
|
9893
9893
|
];
|
|
9894
9894
|
const checks = await Promise.all(candidates.map(exists));
|
|
9895
9895
|
return candidates.find((_2, index) => checks[index]) ?? null;
|
|
@@ -9927,10 +9927,10 @@ var resolveDevClientDir2 = () => {
|
|
|
9927
9927
|
});
|
|
9928
9928
|
}, compileSvelte = async (entryPoints, svelteRoot, cache = new Map, isDev = false, stylePreprocessors) => {
|
|
9929
9929
|
const { compile, compileModule, preprocess } = await import("svelte/compiler");
|
|
9930
|
-
const generatedDir =
|
|
9931
|
-
const clientDir =
|
|
9932
|
-
const indexDir =
|
|
9933
|
-
const serverDir =
|
|
9930
|
+
const generatedDir = join14(svelteRoot, "generated");
|
|
9931
|
+
const clientDir = join14(generatedDir, "client");
|
|
9932
|
+
const indexDir = join14(generatedDir, "indexes");
|
|
9933
|
+
const serverDir = join14(generatedDir, "server");
|
|
9934
9934
|
await Promise.all([clientDir, indexDir, serverDir].map((dir) => mkdir4(dir, { recursive: true })));
|
|
9935
9935
|
const dev = env.NODE_ENV !== "production";
|
|
9936
9936
|
const build = async (src) => {
|
|
@@ -9968,8 +9968,8 @@ var resolveDevClientDir2 = () => {
|
|
|
9968
9968
|
const childBuilt = await Promise.all(childSources.map((child) => build(child)));
|
|
9969
9969
|
const hasAwaitSlotFromChildren = childBuilt.some((child) => child.hasAwaitSlot);
|
|
9970
9970
|
const externalRewrites = new Map;
|
|
9971
|
-
const ssrOutputDir = dirname9(
|
|
9972
|
-
const clientOutputDir = dirname9(
|
|
9971
|
+
const ssrOutputDir = dirname9(join14(serverDir, relDir, `${baseName}.js`));
|
|
9972
|
+
const clientOutputDir = dirname9(join14(clientDir, relDir, `${baseName}.js`));
|
|
9973
9973
|
for (let idx = 0;idx < importPaths.length; idx++) {
|
|
9974
9974
|
const rawSpec = importPaths[idx];
|
|
9975
9975
|
if (!rawSpec)
|
|
@@ -10034,8 +10034,8 @@ var resolveDevClientDir2 = () => {
|
|
|
10034
10034
|
code += islandMetadataExports;
|
|
10035
10035
|
return code;
|
|
10036
10036
|
};
|
|
10037
|
-
const ssrPath =
|
|
10038
|
-
const clientPath =
|
|
10037
|
+
const ssrPath = join14(serverDir, relDir, `${baseName}.js`);
|
|
10038
|
+
const clientPath = join14(clientDir, relDir, `${baseName}.js`);
|
|
10039
10039
|
await Promise.all([
|
|
10040
10040
|
mkdir4(dirname9(ssrPath), { recursive: true }),
|
|
10041
10041
|
mkdir4(dirname9(clientPath), { recursive: true })
|
|
@@ -10067,7 +10067,7 @@ var resolveDevClientDir2 = () => {
|
|
|
10067
10067
|
await Promise.all(roots.map(async ({ client, hasAwaitSlot }) => {
|
|
10068
10068
|
const relClientDir = dirname9(relative7(clientDir, client));
|
|
10069
10069
|
const name = basename4(client, extname5(client));
|
|
10070
|
-
const indexPath =
|
|
10070
|
+
const indexPath = join14(indexDir, relClientDir, `${name}.js`);
|
|
10071
10071
|
const importRaw = relative7(dirname9(indexPath), client).split(sep2).join("/");
|
|
10072
10072
|
const importPath = importRaw.startsWith(".") || importRaw.startsWith("/") ? importRaw : `./${importRaw}`;
|
|
10073
10073
|
const hmrImports = isDev ? `window.__HMR_FRAMEWORK__ = "svelte";
|
|
@@ -10146,7 +10146,7 @@ if (typeof window !== "undefined") {
|
|
|
10146
10146
|
svelteClientPaths: roots.map(({ client }) => client),
|
|
10147
10147
|
svelteIndexPaths: roots.map(({ client }) => {
|
|
10148
10148
|
const rel = dirname9(relative7(clientDir, client));
|
|
10149
|
-
return
|
|
10149
|
+
return join14(indexDir, rel, basename4(client));
|
|
10150
10150
|
}),
|
|
10151
10151
|
svelteServerPaths: roots.map(({ ssr }) => ssr)
|
|
10152
10152
|
};
|
|
@@ -10160,7 +10160,7 @@ var init_compileSvelte = __esm(() => {
|
|
|
10160
10160
|
init_lowerAwaitSlotSyntax();
|
|
10161
10161
|
init_renderToReadableStream();
|
|
10162
10162
|
devClientDir2 = resolveDevClientDir2();
|
|
10163
|
-
hmrClientPath3 =
|
|
10163
|
+
hmrClientPath3 = join14(devClientDir2, "hmrClient.ts").replace(/\\/g, "/");
|
|
10164
10164
|
persistentCache = new Map;
|
|
10165
10165
|
sourceHashCache = new Map;
|
|
10166
10166
|
transpiler2 = new Transpiler({ loader: "ts", target: "browser" });
|
|
@@ -10181,7 +10181,7 @@ import {
|
|
|
10181
10181
|
basename as basename5,
|
|
10182
10182
|
dirname as dirname10,
|
|
10183
10183
|
isAbsolute as isAbsolute3,
|
|
10184
|
-
join as
|
|
10184
|
+
join as join15,
|
|
10185
10185
|
relative as relative8,
|
|
10186
10186
|
resolve as resolve15
|
|
10187
10187
|
} from "path";
|
|
@@ -10351,7 +10351,7 @@ var resolveDevClientDir3 = () => {
|
|
|
10351
10351
|
];
|
|
10352
10352
|
let cssOutputPaths = [];
|
|
10353
10353
|
if (isEntryPoint && allCss.length) {
|
|
10354
|
-
const cssOutputFile =
|
|
10354
|
+
const cssOutputFile = join15(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`);
|
|
10355
10355
|
await mkdir5(dirname10(cssOutputFile), { recursive: true });
|
|
10356
10356
|
await write2(cssOutputFile, allCss.join(`
|
|
10357
10357
|
`));
|
|
@@ -10382,8 +10382,8 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
|
|
|
10382
10382
|
};
|
|
10383
10383
|
const clientCode = assembleModule(generateRenderFunction(false), "render", true) + islandMetadataExports;
|
|
10384
10384
|
const serverCode = assembleModule(generateRenderFunction(true), "ssrRender", false) + islandMetadataExports;
|
|
10385
|
-
const clientOutputPath =
|
|
10386
|
-
const serverOutputPath =
|
|
10385
|
+
const clientOutputPath = join15(outputDirs.client, `${relativeWithoutExtension}.js`);
|
|
10386
|
+
const serverOutputPath = join15(outputDirs.server, `${relativeWithoutExtension}.js`);
|
|
10387
10387
|
const relDir = dirname10(relativeFilePath);
|
|
10388
10388
|
const relDepth = relDir === "." ? 0 : relDir.split("/").length;
|
|
10389
10389
|
const adjustImports = (code) => code.replace(/(from\s+['"])(\.\.\/(?:\.\.\/)*)/g, (_2, prefix, dots) => {
|
|
@@ -10423,11 +10423,11 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
|
|
|
10423
10423
|
return result;
|
|
10424
10424
|
}, compileVue = async (entryPoints, vueRootDir, isDev = false, stylePreprocessors) => {
|
|
10425
10425
|
const compiler = await import("@vue/compiler-sfc");
|
|
10426
|
-
const generatedDir =
|
|
10427
|
-
const clientOutputDir =
|
|
10428
|
-
const indexOutputDir =
|
|
10429
|
-
const serverOutputDir =
|
|
10430
|
-
const cssOutputDir =
|
|
10426
|
+
const generatedDir = join15(vueRootDir, "generated");
|
|
10427
|
+
const clientOutputDir = join15(generatedDir, "client");
|
|
10428
|
+
const indexOutputDir = join15(generatedDir, "indexes");
|
|
10429
|
+
const serverOutputDir = join15(generatedDir, "server");
|
|
10430
|
+
const cssOutputDir = join15(generatedDir, "compiled");
|
|
10431
10431
|
await Promise.all([
|
|
10432
10432
|
mkdir5(clientOutputDir, { recursive: true }),
|
|
10433
10433
|
mkdir5(indexOutputDir, { recursive: true }),
|
|
@@ -10444,8 +10444,8 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
|
|
|
10444
10444
|
}, buildCache, true, vueRootDir, compiler, stylePreprocessors);
|
|
10445
10445
|
result.tsHelperPaths.forEach((path) => allTsHelperPaths.add(path));
|
|
10446
10446
|
const entryBaseName = basename5(entryPath, ".vue");
|
|
10447
|
-
const indexOutputFile =
|
|
10448
|
-
const clientOutputFile =
|
|
10447
|
+
const indexOutputFile = join15(indexOutputDir, `${entryBaseName}.js`);
|
|
10448
|
+
const clientOutputFile = join15(clientOutputDir, relative8(vueRootDir, entryPath).replace(/\\/g, "/").replace(/\.vue$/, ".js"));
|
|
10449
10449
|
await mkdir5(dirname10(indexOutputFile), { recursive: true });
|
|
10450
10450
|
const vueHmrImports = isDev ? [
|
|
10451
10451
|
`window.__HMR_FRAMEWORK__ = "vue";`,
|
|
@@ -10588,8 +10588,8 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
|
|
|
10588
10588
|
const sourceCode = await file2(tsPath).text();
|
|
10589
10589
|
const transpiledCode = transpiler3.transformSync(sourceCode);
|
|
10590
10590
|
const relativeJsPath = relative8(vueRootDir, tsPath).replace(/\.ts$/, ".js");
|
|
10591
|
-
const outClientPath =
|
|
10592
|
-
const outServerPath =
|
|
10591
|
+
const outClientPath = join15(clientOutputDir, relativeJsPath);
|
|
10592
|
+
const outServerPath = join15(serverOutputDir, relativeJsPath);
|
|
10593
10593
|
await mkdir5(dirname10(outClientPath), { recursive: true });
|
|
10594
10594
|
await mkdir5(dirname10(outServerPath), { recursive: true });
|
|
10595
10595
|
await write2(outClientPath, transpiledCode);
|
|
@@ -10609,7 +10609,7 @@ var init_compileVue = __esm(() => {
|
|
|
10609
10609
|
init_sourceMetadata();
|
|
10610
10610
|
init_stylePreprocessor();
|
|
10611
10611
|
devClientDir3 = resolveDevClientDir3();
|
|
10612
|
-
hmrClientPath4 =
|
|
10612
|
+
hmrClientPath4 = join15(devClientDir3, "hmrClient.ts").replace(/\\/g, "/");
|
|
10613
10613
|
transpiler3 = new Transpiler2({ loader: "ts", target: "browser" });
|
|
10614
10614
|
scriptCache = new Map;
|
|
10615
10615
|
scriptSetupCache = new Map;
|
|
@@ -11090,7 +11090,7 @@ __export(exports_compileAngular, {
|
|
|
11090
11090
|
compileAngular: () => compileAngular
|
|
11091
11091
|
});
|
|
11092
11092
|
import { existsSync as existsSync16, readFileSync as readFileSync10, promises as fs } from "fs";
|
|
11093
|
-
import { join as
|
|
11093
|
+
import { join as join16, basename as basename6, sep as sep3, dirname as dirname11, resolve as resolve16, relative as relative9 } from "path";
|
|
11094
11094
|
import ts2 from "typescript";
|
|
11095
11095
|
var traceAngularPhase = async (name, fn2, metadata) => {
|
|
11096
11096
|
const tracePhase = globalThis.__absoluteBuildTracePhase;
|
|
@@ -11132,10 +11132,10 @@ var traceAngularPhase = async (name, fn2, metadata) => {
|
|
|
11132
11132
|
`${candidate}.tsx`,
|
|
11133
11133
|
`${candidate}.js`,
|
|
11134
11134
|
`${candidate}.jsx`,
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11135
|
+
join16(candidate, "index.ts"),
|
|
11136
|
+
join16(candidate, "index.tsx"),
|
|
11137
|
+
join16(candidate, "index.js"),
|
|
11138
|
+
join16(candidate, "index.jsx")
|
|
11139
11139
|
];
|
|
11140
11140
|
return candidates.find((file3) => existsSync16(file3));
|
|
11141
11141
|
}, createLegacyAngularAnimationUsageResolver = (rootDir) => {
|
|
@@ -11311,10 +11311,10 @@ ${registrations}
|
|
|
11311
11311
|
`${basePath}.tsx`,
|
|
11312
11312
|
`${basePath}.mts`,
|
|
11313
11313
|
`${basePath}.cts`,
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11314
|
+
join16(basePath, "index.ts"),
|
|
11315
|
+
join16(basePath, "index.tsx"),
|
|
11316
|
+
join16(basePath, "index.mts"),
|
|
11317
|
+
join16(basePath, "index.cts")
|
|
11318
11318
|
];
|
|
11319
11319
|
return candidates.map((candidate) => resolve16(candidate)).find((candidate) => existsSync16(candidate) && !candidate.endsWith(".d.ts")) ?? null;
|
|
11320
11320
|
}, readFileForAotTransform = async (fileName, readFile5) => {
|
|
@@ -11340,15 +11340,15 @@ ${registrations}
|
|
|
11340
11340
|
const paths = [];
|
|
11341
11341
|
const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
|
|
11342
11342
|
if (templateUrlMatch?.[1])
|
|
11343
|
-
paths.push(
|
|
11343
|
+
paths.push(join16(fileDir, templateUrlMatch[1]));
|
|
11344
11344
|
const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
|
|
11345
11345
|
if (styleUrlMatch?.[1])
|
|
11346
|
-
paths.push(
|
|
11346
|
+
paths.push(join16(fileDir, styleUrlMatch[1]));
|
|
11347
11347
|
const styleUrlsMatch = findUncommentedMatch(source, /styleUrls\s*:\s*\[([^\]]+)\]/);
|
|
11348
11348
|
const urlMatches = styleUrlsMatch?.[1]?.match(/['"]([^'"]+)['"]/g);
|
|
11349
11349
|
if (urlMatches) {
|
|
11350
11350
|
for (const urlMatch of urlMatches) {
|
|
11351
|
-
paths.push(
|
|
11351
|
+
paths.push(join16(fileDir, urlMatch.replace(/['"]/g, "")));
|
|
11352
11352
|
}
|
|
11353
11353
|
}
|
|
11354
11354
|
return paths.map((path) => resolve16(path));
|
|
@@ -11382,7 +11382,7 @@ ${registrations}
|
|
|
11382
11382
|
safeStableStringify(stylePreprocessors ?? null)
|
|
11383
11383
|
].join("\x00");
|
|
11384
11384
|
const cacheKey2 = Bun.hash(cacheInput).toString(BASE_36_RADIX);
|
|
11385
|
-
return
|
|
11385
|
+
return join16(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey2}.json`);
|
|
11386
11386
|
}, precomputeAotResourceTransforms = async (inputPaths, readFile5, stylePreprocessors) => {
|
|
11387
11387
|
const transformedSources = new Map;
|
|
11388
11388
|
const visited = new Set;
|
|
@@ -11428,7 +11428,7 @@ ${registrations}
|
|
|
11428
11428
|
return { stats, transformedSources };
|
|
11429
11429
|
}, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
|
|
11430
11430
|
const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
|
|
11431
|
-
const outputPath = resolve16(
|
|
11431
|
+
const outputPath = resolve16(join16(outDir, relative9(process.cwd(), resolve16(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
|
|
11432
11432
|
return [
|
|
11433
11433
|
outputPath,
|
|
11434
11434
|
buildIslandMetadataExports(readFileSync10(inputPath, "utf-8"))
|
|
@@ -11475,7 +11475,7 @@ ${registrations}
|
|
|
11475
11475
|
const originalGetSourceFile = host.getSourceFile;
|
|
11476
11476
|
host.getSourceFile = (fileName, languageVersion, onError) => {
|
|
11477
11477
|
if (fileName.startsWith("lib.") && fileName.endsWith(".d.ts") && tsLibDir) {
|
|
11478
|
-
const resolvedPath =
|
|
11478
|
+
const resolvedPath = join16(tsLibDir, fileName);
|
|
11479
11479
|
return originalGetSourceFile?.call(host, resolvedPath, languageVersion, onError);
|
|
11480
11480
|
}
|
|
11481
11481
|
return originalGetSourceFile?.call(host, fileName, languageVersion, onError);
|
|
@@ -11530,7 +11530,7 @@ ${registrations}
|
|
|
11530
11530
|
const entries = await traceAngularPhase("aot/postprocess-emitted-js", () => {
|
|
11531
11531
|
const rawEntries = Object.entries(emitted).filter(([fileName]) => fileName.endsWith(".js")).map(([fileName, content]) => ({
|
|
11532
11532
|
content,
|
|
11533
|
-
target:
|
|
11533
|
+
target: join16(outDir, fileName)
|
|
11534
11534
|
}));
|
|
11535
11535
|
const outputFiles = new Set(rawEntries.map(({ target }) => resolve16(target)));
|
|
11536
11536
|
return rawEntries.map(({ content, target }) => {
|
|
@@ -11705,7 +11705,7 @@ ${fields}
|
|
|
11705
11705
|
}, inlineTemplateAndLowerDefer = async (source, fileDir) => {
|
|
11706
11706
|
const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
|
|
11707
11707
|
if (templateUrlMatch?.[1]) {
|
|
11708
|
-
const templatePath =
|
|
11708
|
+
const templatePath = join16(fileDir, templateUrlMatch[1]);
|
|
11709
11709
|
if (!existsSync16(templatePath)) {
|
|
11710
11710
|
throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
|
|
11711
11711
|
}
|
|
@@ -11736,7 +11736,7 @@ ${fields}
|
|
|
11736
11736
|
}, inlineTemplateAndLowerDeferSync = (source, fileDir) => {
|
|
11737
11737
|
const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
|
|
11738
11738
|
if (templateUrlMatch?.[1]) {
|
|
11739
|
-
const templatePath =
|
|
11739
|
+
const templatePath = join16(fileDir, templateUrlMatch[1]);
|
|
11740
11740
|
if (!existsSync16(templatePath)) {
|
|
11741
11741
|
throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
|
|
11742
11742
|
}
|
|
@@ -11773,7 +11773,7 @@ ${fields}
|
|
|
11773
11773
|
return source;
|
|
11774
11774
|
const stylePromises = urlMatches.map((urlMatch) => {
|
|
11775
11775
|
const styleUrl = urlMatch.replace(/['"]/g, "");
|
|
11776
|
-
return readAndEscapeFile(
|
|
11776
|
+
return readAndEscapeFile(join16(fileDir, styleUrl), stylePreprocessors);
|
|
11777
11777
|
});
|
|
11778
11778
|
const results = await Promise.all(stylePromises);
|
|
11779
11779
|
const inlinedStyles = results.filter(Boolean).map((escaped) => `\`${escaped}\``);
|
|
@@ -11784,7 +11784,7 @@ ${fields}
|
|
|
11784
11784
|
const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
|
|
11785
11785
|
if (!styleUrlMatch?.[1])
|
|
11786
11786
|
return source;
|
|
11787
|
-
const escaped = await readAndEscapeFile(
|
|
11787
|
+
const escaped = await readAndEscapeFile(join16(fileDir, styleUrlMatch[1]), stylePreprocessors);
|
|
11788
11788
|
if (!escaped)
|
|
11789
11789
|
return source;
|
|
11790
11790
|
return source.slice(0, styleUrlMatch.index) + `styles: [\`${escaped}\`]` + source.slice(styleUrlMatch.index + styleUrlMatch[0].length);
|
|
@@ -11819,10 +11819,10 @@ ${fields}
|
|
|
11819
11819
|
`${candidate}.tsx`,
|
|
11820
11820
|
`${candidate}.js`,
|
|
11821
11821
|
`${candidate}.jsx`,
|
|
11822
|
-
|
|
11823
|
-
|
|
11824
|
-
|
|
11825
|
-
|
|
11822
|
+
join16(candidate, "index.ts"),
|
|
11823
|
+
join16(candidate, "index.tsx"),
|
|
11824
|
+
join16(candidate, "index.js"),
|
|
11825
|
+
join16(candidate, "index.jsx")
|
|
11826
11826
|
];
|
|
11827
11827
|
return candidates.find((file3) => existsSync16(file3));
|
|
11828
11828
|
};
|
|
@@ -11849,7 +11849,7 @@ ${fields}
|
|
|
11849
11849
|
const inputDir = dirname11(sourcePath);
|
|
11850
11850
|
const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
|
|
11851
11851
|
const fileBase = basename6(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
|
|
11852
|
-
return
|
|
11852
|
+
return join16(outDir, relativeDir, fileBase);
|
|
11853
11853
|
};
|
|
11854
11854
|
const transpileAndRewrite = (sourceCode, relativeDir, actualPath, importRewrites) => {
|
|
11855
11855
|
let processedContent = angularTranspiler.transformSync(sourceCode);
|
|
@@ -11902,7 +11902,7 @@ ${fields}
|
|
|
11902
11902
|
const inputDir = dirname11(actualPath);
|
|
11903
11903
|
const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
|
|
11904
11904
|
const fileBase = basename6(actualPath).replace(/\.[cm]?[tj]sx?$/, ".js");
|
|
11905
|
-
const targetDir =
|
|
11905
|
+
const targetDir = join16(outDir, relativeDir);
|
|
11906
11906
|
const targetPath = toOutputPath(actualPath);
|
|
11907
11907
|
const localImports = [];
|
|
11908
11908
|
const importRewrites = new Map;
|
|
@@ -11956,13 +11956,13 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
11956
11956
|
}
|
|
11957
11957
|
return allOutputs;
|
|
11958
11958
|
}, compileAngular = async (entryPoints, outRoot, hmr = false, stylePreprocessors) => {
|
|
11959
|
-
const compiledParent =
|
|
11959
|
+
const compiledParent = join16(outRoot, "generated");
|
|
11960
11960
|
if (entryPoints.length === 0) {
|
|
11961
11961
|
const emptyPaths = [];
|
|
11962
11962
|
return { clientPaths: [...emptyPaths], serverPaths: [...emptyPaths] };
|
|
11963
11963
|
}
|
|
11964
11964
|
const compiledRoot = compiledParent;
|
|
11965
|
-
const indexesDir =
|
|
11965
|
+
const indexesDir = join16(compiledParent, "indexes");
|
|
11966
11966
|
await traceAngularPhase("setup/create-indexes-dir", () => fs.mkdir(indexesDir, { recursive: true }));
|
|
11967
11967
|
const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve16(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
|
|
11968
11968
|
const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
|
|
@@ -11976,9 +11976,9 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
11976
11976
|
const fileBase = basename6(resolvedEntry).replace(/\.[tj]s$/, "");
|
|
11977
11977
|
const jsName = `${fileBase}.js`;
|
|
11978
11978
|
const compiledFallbackPaths = [
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
11979
|
+
join16(compiledRoot, relativeEntry),
|
|
11980
|
+
join16(compiledRoot, "pages", jsName),
|
|
11981
|
+
join16(compiledRoot, jsName)
|
|
11982
11982
|
].map((file3) => resolve16(file3));
|
|
11983
11983
|
const resolveRawServerFile = (candidatePaths) => {
|
|
11984
11984
|
const normalizedCandidates = [
|
|
@@ -12022,7 +12022,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
12022
12022
|
const usesLegacyAnimations = await traceAngularPhase("wrapper/detect-legacy-animations", () => usesLegacyAngularAnimations(resolvedEntry), { entry: resolvedEntry });
|
|
12023
12023
|
const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
|
|
12024
12024
|
const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
|
|
12025
|
-
const clientFile =
|
|
12025
|
+
const clientFile = join16(indexesDir, jsName);
|
|
12026
12026
|
if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync16(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
|
|
12027
12027
|
return {
|
|
12028
12028
|
clientPath: clientFile,
|
|
@@ -12258,8 +12258,8 @@ var init_compileAngular = __esm(() => {
|
|
|
12258
12258
|
init_lowerDeferSyntax();
|
|
12259
12259
|
init_stylePreprocessor();
|
|
12260
12260
|
devClientDir4 = resolveDevClientDir4();
|
|
12261
|
-
hmrClientPath5 =
|
|
12262
|
-
hmrRuntimePath =
|
|
12261
|
+
hmrClientPath5 = join16(devClientDir4, "hmrClient.ts").replace(/\\/g, "/");
|
|
12262
|
+
hmrRuntimePath = join16(devClientDir4, "handlers", "angularRuntime.ts").replace(/\\/g, "/");
|
|
12263
12263
|
jitContentCache = new Map;
|
|
12264
12264
|
wrapperOutputCache = new Map;
|
|
12265
12265
|
});
|
|
@@ -12271,7 +12271,7 @@ __export(exports_buildReactVendor, {
|
|
|
12271
12271
|
buildReactVendor: () => buildReactVendor
|
|
12272
12272
|
});
|
|
12273
12273
|
import { existsSync as existsSync17, mkdirSync as mkdirSync6 } from "fs";
|
|
12274
|
-
import { join as
|
|
12274
|
+
import { join as join17, resolve as resolve17 } from "path";
|
|
12275
12275
|
import { rm as rm5 } from "fs/promises";
|
|
12276
12276
|
var {build: bunBuild2 } = globalThis.Bun;
|
|
12277
12277
|
var resolveJsxDevRuntimeCompatPath = () => {
|
|
@@ -12325,14 +12325,14 @@ var resolveJsxDevRuntimeCompatPath = () => {
|
|
|
12325
12325
|
`)}
|
|
12326
12326
|
`;
|
|
12327
12327
|
}, buildReactVendor = async (buildDir) => {
|
|
12328
|
-
const vendorDir =
|
|
12328
|
+
const vendorDir = join17(buildDir, "react", "vendor");
|
|
12329
12329
|
mkdirSync6(vendorDir, { recursive: true });
|
|
12330
|
-
const tmpDir =
|
|
12330
|
+
const tmpDir = join17(buildDir, "_vendor_tmp");
|
|
12331
12331
|
mkdirSync6(tmpDir, { recursive: true });
|
|
12332
12332
|
const specifiers = resolveVendorSpecifiers();
|
|
12333
12333
|
const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
|
|
12334
12334
|
const safeName = toSafeFileName(specifier);
|
|
12335
|
-
const entryPath =
|
|
12335
|
+
const entryPath = join17(tmpDir, `${safeName}.ts`);
|
|
12336
12336
|
const source = await generateEntrySource(specifier);
|
|
12337
12337
|
await Bun.write(entryPath, source);
|
|
12338
12338
|
return entryPath;
|
|
@@ -12380,7 +12380,7 @@ __export(exports_buildAngularVendor, {
|
|
|
12380
12380
|
buildAngularServerVendor: () => buildAngularServerVendor
|
|
12381
12381
|
});
|
|
12382
12382
|
import { mkdirSync as mkdirSync7 } from "fs";
|
|
12383
|
-
import { join as
|
|
12383
|
+
import { join as join18 } from "path";
|
|
12384
12384
|
import { rm as rm6 } from "fs/promises";
|
|
12385
12385
|
var {build: bunBuild3, Glob: Glob6 } = globalThis.Bun;
|
|
12386
12386
|
var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => jitMode ? [...REQUIRED_ANGULAR_SPECIFIERS_BASE, "@angular/compiler"] : REQUIRED_ANGULAR_SPECIFIERS_BASE, SERVER_ONLY_ANGULAR_SPECIFIERS, BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES, isBuildOnlyAngularSpecifier = (spec) => BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES.some((prefix) => spec === prefix || spec.startsWith(`${prefix}/`)), SCAN_SKIP_DIRS, isResolvable2 = (specifier) => {
|
|
@@ -12477,14 +12477,14 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
|
|
|
12477
12477
|
await collectTransitiveAngularSpecs([...angular, ...transitiveRoots], angular);
|
|
12478
12478
|
return Array.from(angular).filter(isResolvable2);
|
|
12479
12479
|
}, buildAngularVendor = async (buildDir, directories = [], linkerJitMode = false, depVendorSpecifiers = []) => {
|
|
12480
|
-
const vendorDir =
|
|
12480
|
+
const vendorDir = join18(buildDir, "angular", "vendor");
|
|
12481
12481
|
mkdirSync7(vendorDir, { recursive: true });
|
|
12482
|
-
const tmpDir =
|
|
12482
|
+
const tmpDir = join18(buildDir, "_angular_vendor_tmp");
|
|
12483
12483
|
mkdirSync7(tmpDir, { recursive: true });
|
|
12484
12484
|
const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
|
|
12485
12485
|
const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
|
|
12486
12486
|
const safeName = toSafeFileName2(specifier);
|
|
12487
|
-
const entryPath =
|
|
12487
|
+
const entryPath = join18(tmpDir, `${safeName}.ts`);
|
|
12488
12488
|
await Bun.write(entryPath, generateVendorEntrySource(specifier));
|
|
12489
12489
|
return entryPath;
|
|
12490
12490
|
}));
|
|
@@ -12515,9 +12515,9 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
|
|
|
12515
12515
|
const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
|
|
12516
12516
|
return computeAngularVendorPaths(specifiers);
|
|
12517
12517
|
}, buildAngularServerVendor = async (buildDir, directories = [], linkerJitMode = false) => {
|
|
12518
|
-
const vendorDir =
|
|
12518
|
+
const vendorDir = join18(buildDir, "angular", "vendor", "server");
|
|
12519
12519
|
mkdirSync7(vendorDir, { recursive: true });
|
|
12520
|
-
const tmpDir =
|
|
12520
|
+
const tmpDir = join18(buildDir, "_angular_server_vendor_tmp");
|
|
12521
12521
|
mkdirSync7(tmpDir, { recursive: true });
|
|
12522
12522
|
const browserSpecs = await resolveAngularSpecifiers(directories, linkerJitMode);
|
|
12523
12523
|
const allSpecs = new Set(browserSpecs);
|
|
@@ -12528,7 +12528,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
|
|
|
12528
12528
|
const specifiers = Array.from(allSpecs);
|
|
12529
12529
|
const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
|
|
12530
12530
|
const safeName = toSafeFileName2(specifier);
|
|
12531
|
-
const entryPath =
|
|
12531
|
+
const entryPath = join18(tmpDir, `${safeName}.ts`);
|
|
12532
12532
|
await Bun.write(entryPath, generateVendorEntrySource(specifier));
|
|
12533
12533
|
return entryPath;
|
|
12534
12534
|
}));
|
|
@@ -12550,9 +12550,9 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
|
|
|
12550
12550
|
return specifiers;
|
|
12551
12551
|
}, computeAngularServerVendorPaths = (buildDir, specifiers) => {
|
|
12552
12552
|
const paths = {};
|
|
12553
|
-
const vendorDir =
|
|
12553
|
+
const vendorDir = join18(buildDir, "angular", "vendor", "server");
|
|
12554
12554
|
for (const specifier of specifiers) {
|
|
12555
|
-
paths[specifier] =
|
|
12555
|
+
paths[specifier] = join18(vendorDir, `${toSafeFileName2(specifier)}.js`);
|
|
12556
12556
|
}
|
|
12557
12557
|
return paths;
|
|
12558
12558
|
}, computeAngularServerVendorPathsAsync = async (buildDir, directories = [], linkerJitMode = true) => {
|
|
@@ -12607,17 +12607,17 @@ __export(exports_buildVueVendor, {
|
|
|
12607
12607
|
buildVueVendor: () => buildVueVendor
|
|
12608
12608
|
});
|
|
12609
12609
|
import { mkdirSync as mkdirSync8 } from "fs";
|
|
12610
|
-
import { join as
|
|
12610
|
+
import { join as join19 } from "path";
|
|
12611
12611
|
import { rm as rm7 } from "fs/promises";
|
|
12612
12612
|
var {build: bunBuild4 } = globalThis.Bun;
|
|
12613
12613
|
var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"), buildVueVendor = async (buildDir) => {
|
|
12614
|
-
const vendorDir =
|
|
12614
|
+
const vendorDir = join19(buildDir, "vue", "vendor");
|
|
12615
12615
|
mkdirSync8(vendorDir, { recursive: true });
|
|
12616
|
-
const tmpDir =
|
|
12616
|
+
const tmpDir = join19(buildDir, "_vue_vendor_tmp");
|
|
12617
12617
|
mkdirSync8(tmpDir, { recursive: true });
|
|
12618
12618
|
const entrypoints = await Promise.all(vueSpecifiers.map(async (specifier) => {
|
|
12619
12619
|
const safeName = toSafeFileName3(specifier);
|
|
12620
|
-
const entryPath =
|
|
12620
|
+
const entryPath = join19(tmpDir, `${safeName}.ts`);
|
|
12621
12621
|
await Bun.write(entryPath, `export * from '${specifier}';
|
|
12622
12622
|
`);
|
|
12623
12623
|
return entryPath;
|
|
@@ -12645,7 +12645,7 @@ var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"
|
|
|
12645
12645
|
const { readFileSync: readFileSync11, writeFileSync: writeFileSync6, readdirSync } = await import("fs");
|
|
12646
12646
|
const files = readdirSync(vendorDir).filter((f2) => f2.endsWith(".js"));
|
|
12647
12647
|
for (const file3 of files) {
|
|
12648
|
-
const filePath =
|
|
12648
|
+
const filePath = join19(vendorDir, file3);
|
|
12649
12649
|
const content = readFileSync11(filePath, "utf-8");
|
|
12650
12650
|
if (!content.includes("__VUE_HMR_RUNTIME__"))
|
|
12651
12651
|
continue;
|
|
@@ -12672,7 +12672,7 @@ __export(exports_buildSvelteVendor, {
|
|
|
12672
12672
|
buildSvelteVendor: () => buildSvelteVendor
|
|
12673
12673
|
});
|
|
12674
12674
|
import { mkdirSync as mkdirSync9 } from "fs";
|
|
12675
|
-
import { join as
|
|
12675
|
+
import { join as join20 } from "path";
|
|
12676
12676
|
import { rm as rm8 } from "fs/promises";
|
|
12677
12677
|
var {build: bunBuild5 } = globalThis.Bun;
|
|
12678
12678
|
var svelteSpecifiers, isResolvable3 = (specifier) => {
|
|
@@ -12686,13 +12686,13 @@ var svelteSpecifiers, isResolvable3 = (specifier) => {
|
|
|
12686
12686
|
const specifiers = resolveVendorSpecifiers2();
|
|
12687
12687
|
if (specifiers.length === 0)
|
|
12688
12688
|
return;
|
|
12689
|
-
const vendorDir =
|
|
12689
|
+
const vendorDir = join20(buildDir, "svelte", "vendor");
|
|
12690
12690
|
mkdirSync9(vendorDir, { recursive: true });
|
|
12691
|
-
const tmpDir =
|
|
12691
|
+
const tmpDir = join20(buildDir, "_svelte_vendor_tmp");
|
|
12692
12692
|
mkdirSync9(tmpDir, { recursive: true });
|
|
12693
12693
|
const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
|
|
12694
12694
|
const safeName = toSafeFileName4(specifier);
|
|
12695
|
-
const entryPath =
|
|
12695
|
+
const entryPath = join20(tmpDir, `${safeName}.ts`);
|
|
12696
12696
|
await Bun.write(entryPath, `export * from '${specifier}';
|
|
12697
12697
|
`);
|
|
12698
12698
|
return entryPath;
|
|
@@ -12765,11 +12765,11 @@ var escapeRegex2 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), jsRewrit
|
|
|
12765
12765
|
if (Object.keys(vendorPaths).length === 0)
|
|
12766
12766
|
return;
|
|
12767
12767
|
const { readdirSync } = await import("fs");
|
|
12768
|
-
const { join:
|
|
12768
|
+
const { join: join21 } = await import("path");
|
|
12769
12769
|
const allFiles = [];
|
|
12770
12770
|
for (const dir of vendorDirs) {
|
|
12771
12771
|
try {
|
|
12772
|
-
const files = readdirSync(dir).filter((f2) => f2.endsWith(".js")).map((f2) =>
|
|
12772
|
+
const files = readdirSync(dir).filter((f2) => f2.endsWith(".js")).map((f2) => join21(dir, f2));
|
|
12773
12773
|
allFiles.push(...files);
|
|
12774
12774
|
} catch {}
|
|
12775
12775
|
}
|
|
@@ -12845,7 +12845,7 @@ import {
|
|
|
12845
12845
|
statSync,
|
|
12846
12846
|
writeFileSync as writeFileSync6
|
|
12847
12847
|
} from "fs";
|
|
12848
|
-
import { basename as basename7, dirname as dirname12, extname as extname6, join as
|
|
12848
|
+
import { basename as basename7, dirname as dirname12, extname as extname6, join as join21, relative as relative10, resolve as resolve18 } from "path";
|
|
12849
12849
|
import { cwd, env as env2, exit } from "process";
|
|
12850
12850
|
var {build: bunBuild6, Glob: Glob7 } = globalThis.Bun;
|
|
12851
12851
|
var isDev, isBuildTraceEnabled = () => {
|
|
@@ -12923,8 +12923,8 @@ var isDev, isBuildTraceEnabled = () => {
|
|
|
12923
12923
|
mkdirSync10(htmxDestDir, { recursive: true });
|
|
12924
12924
|
const glob = new Glob7("htmx*.min.js");
|
|
12925
12925
|
for (const relPath of glob.scanSync({ cwd: htmxDir })) {
|
|
12926
|
-
const src =
|
|
12927
|
-
const dest =
|
|
12926
|
+
const src = join21(htmxDir, relPath);
|
|
12927
|
+
const dest = join21(htmxDestDir, "htmx.min.js");
|
|
12928
12928
|
copyFileSync(src, dest);
|
|
12929
12929
|
return;
|
|
12930
12930
|
}
|
|
@@ -12999,7 +12999,7 @@ var isDev, isBuildTraceEnabled = () => {
|
|
|
12999
12999
|
vuePagesPath
|
|
13000
13000
|
}) => {
|
|
13001
13001
|
const { readdirSync: readDir } = await import("fs");
|
|
13002
|
-
const devIndexDir =
|
|
13002
|
+
const devIndexDir = join21(buildPath, "_src_indexes");
|
|
13003
13003
|
mkdirSync10(devIndexDir, { recursive: true });
|
|
13004
13004
|
if (reactIndexesPath && reactPagesPath) {
|
|
13005
13005
|
copyReactDevIndexes(reactIndexesPath, reactPagesPath, devIndexDir, readDir);
|
|
@@ -13017,35 +13017,35 @@ var isDev, isBuildTraceEnabled = () => {
|
|
|
13017
13017
|
const indexFiles = readDir(reactIndexesPath).filter((file3) => file3.endsWith(".tsx"));
|
|
13018
13018
|
const pagesRel = relative10(process.cwd(), resolve18(reactPagesPath)).replace(/\\/g, "/");
|
|
13019
13019
|
for (const file3 of indexFiles) {
|
|
13020
|
-
let content = readFileSync11(
|
|
13020
|
+
let content = readFileSync11(join21(reactIndexesPath, file3), "utf-8");
|
|
13021
13021
|
content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
|
|
13022
|
-
writeFileSync6(
|
|
13022
|
+
writeFileSync6(join21(devIndexDir, file3), content);
|
|
13023
13023
|
}
|
|
13024
13024
|
}, copySvelteDevIndexes = (svelteDir, sveltePagesPath, svelteEntries, devIndexDir) => {
|
|
13025
|
-
const svelteIndexDir =
|
|
13025
|
+
const svelteIndexDir = join21(svelteDir, "generated", "indexes");
|
|
13026
13026
|
const sveltePageEntries = svelteEntries.filter((file3) => resolve18(file3).startsWith(resolve18(sveltePagesPath)));
|
|
13027
13027
|
for (const entry of sveltePageEntries) {
|
|
13028
13028
|
const name = basename7(entry).replace(/\.svelte(\.(ts|js))?$/, "");
|
|
13029
|
-
const indexFile =
|
|
13029
|
+
const indexFile = join21(svelteIndexDir, "pages", `${name}.js`);
|
|
13030
13030
|
if (!existsSync18(indexFile))
|
|
13031
13031
|
continue;
|
|
13032
13032
|
let content = readFileSync11(indexFile, "utf-8");
|
|
13033
13033
|
const srcRel = relative10(process.cwd(), resolve18(entry)).replace(/\\/g, "/");
|
|
13034
13034
|
content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
|
|
13035
|
-
writeFileSync6(
|
|
13035
|
+
writeFileSync6(join21(devIndexDir, `${name}.svelte.js`), content);
|
|
13036
13036
|
}
|
|
13037
13037
|
}, copyVueDevIndexes = (vueDir, vuePagesPath, vueEntries, devIndexDir) => {
|
|
13038
|
-
const vueIndexDir =
|
|
13038
|
+
const vueIndexDir = join21(vueDir, "generated", "indexes");
|
|
13039
13039
|
const vuePageEntries = vueEntries.filter((file3) => resolve18(file3).startsWith(resolve18(vuePagesPath)));
|
|
13040
13040
|
for (const entry of vuePageEntries) {
|
|
13041
13041
|
const name = basename7(entry, ".vue");
|
|
13042
|
-
const indexFile =
|
|
13042
|
+
const indexFile = join21(vueIndexDir, `${name}.js`);
|
|
13043
13043
|
if (!existsSync18(indexFile))
|
|
13044
13044
|
continue;
|
|
13045
13045
|
let content = readFileSync11(indexFile, "utf-8");
|
|
13046
13046
|
const srcRel = relative10(process.cwd(), resolve18(entry)).replace(/\\/g, "/");
|
|
13047
13047
|
content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
|
|
13048
|
-
writeFileSync6(
|
|
13048
|
+
writeFileSync6(join21(devIndexDir, `${name}.vue.js`), content);
|
|
13049
13049
|
}
|
|
13050
13050
|
}, resolveVueRuntimeId = (content, firstUseName, outputPath, projectRoot) => {
|
|
13051
13051
|
const varIdx = content.indexOf(`var ${firstUseName} =`);
|
|
@@ -13266,10 +13266,10 @@ ${content.slice(firstUseIdx)}`;
|
|
|
13266
13266
|
restoreTracePhase();
|
|
13267
13267
|
return;
|
|
13268
13268
|
}
|
|
13269
|
-
const traceDir =
|
|
13269
|
+
const traceDir = join21(buildPath2, ".absolute-trace");
|
|
13270
13270
|
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
13271
13271
|
mkdirSync10(traceDir, { recursive: true });
|
|
13272
|
-
writeFileSync6(
|
|
13272
|
+
writeFileSync6(join21(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
|
|
13273
13273
|
events: traceEvents,
|
|
13274
13274
|
frameworks: traceFrameworkNames,
|
|
13275
13275
|
generatedAt: new Date().toISOString(),
|
|
@@ -13299,14 +13299,14 @@ ${content.slice(firstUseIdx)}`;
|
|
|
13299
13299
|
const stylesPath = typeof stylesConfig === "string" ? stylesConfig : stylesConfig?.path;
|
|
13300
13300
|
const stylesIgnore = typeof stylesConfig === "object" ? stylesConfig.ignore : undefined;
|
|
13301
13301
|
const stylesDir = stylesPath && validateSafePath(stylesPath, projectRoot);
|
|
13302
|
-
const reactIndexesPath = reactDir &&
|
|
13303
|
-
const reactPagesPath = reactDir &&
|
|
13304
|
-
const htmlPagesPath = htmlDir &&
|
|
13305
|
-
const htmlScriptsPath = htmlDir &&
|
|
13306
|
-
const sveltePagesPath = svelteDir &&
|
|
13307
|
-
const vuePagesPath = vueDir &&
|
|
13308
|
-
const htmxPagesPath = htmxDir &&
|
|
13309
|
-
const angularPagesPath = angularDir &&
|
|
13302
|
+
const reactIndexesPath = reactDir && join21(reactDir, "generated", "indexes");
|
|
13303
|
+
const reactPagesPath = reactDir && join21(reactDir, "pages");
|
|
13304
|
+
const htmlPagesPath = htmlDir && join21(htmlDir, "pages");
|
|
13305
|
+
const htmlScriptsPath = htmlDir && join21(htmlDir, "scripts");
|
|
13306
|
+
const sveltePagesPath = svelteDir && join21(svelteDir, "pages");
|
|
13307
|
+
const vuePagesPath = vueDir && join21(vueDir, "pages");
|
|
13308
|
+
const htmxPagesPath = htmxDir && join21(htmxDir, "pages");
|
|
13309
|
+
const angularPagesPath = angularDir && join21(angularDir, "pages");
|
|
13310
13310
|
const frontends = [
|
|
13311
13311
|
reactDir,
|
|
13312
13312
|
htmlDir,
|
|
@@ -13344,12 +13344,12 @@ ${content.slice(firstUseIdx)}`;
|
|
|
13344
13344
|
if (svelteDir)
|
|
13345
13345
|
serverDirMap.push({
|
|
13346
13346
|
dir: svelteDir,
|
|
13347
|
-
subdir:
|
|
13347
|
+
subdir: join21("generated", "server")
|
|
13348
13348
|
});
|
|
13349
13349
|
if (vueDir)
|
|
13350
13350
|
serverDirMap.push({
|
|
13351
13351
|
dir: vueDir,
|
|
13352
|
-
subdir:
|
|
13352
|
+
subdir: join21("generated", "server")
|
|
13353
13353
|
});
|
|
13354
13354
|
if (angularDir)
|
|
13355
13355
|
serverDirMap.push({ dir: angularDir, subdir: "generated" });
|
|
@@ -13359,8 +13359,8 @@ ${content.slice(firstUseIdx)}`;
|
|
|
13359
13359
|
const [firstEntry] = serverDirMap;
|
|
13360
13360
|
if (!firstEntry)
|
|
13361
13361
|
throw new Error("Expected at least one server directory entry");
|
|
13362
|
-
serverRoot =
|
|
13363
|
-
serverOutDir =
|
|
13362
|
+
serverRoot = join21(firstEntry.dir, firstEntry.subdir);
|
|
13363
|
+
serverOutDir = join21(buildPath, basename7(firstEntry.dir));
|
|
13364
13364
|
} else if (serverDirMap.length > 1) {
|
|
13365
13365
|
serverRoot = commonAncestor(serverDirMap.map((entry) => entry.dir), projectRoot);
|
|
13366
13366
|
serverOutDir = buildPath;
|
|
@@ -13388,7 +13388,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
13388
13388
|
await tracePhase("react/index-generation", () => generateReactIndexFiles(reactPagesPath, reactIndexesPath, hmr));
|
|
13389
13389
|
}
|
|
13390
13390
|
if (assetsPath && (!isIncremental || normalizedIncrementalFiles?.some((f2) => f2.includes("/assets/")))) {
|
|
13391
|
-
await tracePhase("assets/copy", () => cpSync(assetsPath,
|
|
13391
|
+
await tracePhase("assets/copy", () => cpSync(assetsPath, join21(buildPath, "assets"), {
|
|
13392
13392
|
force: true,
|
|
13393
13393
|
recursive: true
|
|
13394
13394
|
}));
|
|
@@ -13437,7 +13437,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
13437
13437
|
const reactEntries = isIncremental && reactIndexesPath && reactPagesPath ? filterToIncrementalEntries(allReactEntries, (entry) => {
|
|
13438
13438
|
if (entry.startsWith(resolve18(reactIndexesPath))) {
|
|
13439
13439
|
const pageName = basename7(entry, ".tsx");
|
|
13440
|
-
return
|
|
13440
|
+
return join21(reactPagesPath, `${pageName}.tsx`);
|
|
13441
13441
|
}
|
|
13442
13442
|
return null;
|
|
13443
13443
|
}) : allReactEntries;
|
|
@@ -13534,7 +13534,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
13534
13534
|
const compileReactConventions = async () => {
|
|
13535
13535
|
if (reactConventionSources.length === 0)
|
|
13536
13536
|
return emptyStringArray;
|
|
13537
|
-
const destDir =
|
|
13537
|
+
const destDir = join21(buildPath, "conventions", "react");
|
|
13538
13538
|
rmSync2(destDir, { force: true, recursive: true });
|
|
13539
13539
|
mkdirSync10(destDir, { recursive: true });
|
|
13540
13540
|
const destPaths = [];
|
|
@@ -13578,7 +13578,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
13578
13578
|
angularConventionSources.length > 0 && angularDir ? tracePhase("compile/convention-angular", () => Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular)).then((mod) => mod.compileAngular(angularConventionSources, angularDir, hmr, styleTransformConfig))) : { serverPaths: emptyStringArray }
|
|
13579
13579
|
]);
|
|
13580
13580
|
const bundleConventionFiles = async (framework, compiledPaths) => {
|
|
13581
|
-
const destDir =
|
|
13581
|
+
const destDir = join21(buildPath, "conventions", framework);
|
|
13582
13582
|
rmSync2(destDir, { force: true, recursive: true });
|
|
13583
13583
|
mkdirSync10(destDir, { recursive: true });
|
|
13584
13584
|
const destPaths = [];
|
|
@@ -13651,7 +13651,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
13651
13651
|
}
|
|
13652
13652
|
})) : {
|
|
13653
13653
|
entries: [],
|
|
13654
|
-
generatedRoot:
|
|
13654
|
+
generatedRoot: join21(buildPath, "_island_entries")
|
|
13655
13655
|
};
|
|
13656
13656
|
const islandClientEntryPoints = islandEntryResult.entries.map((entry) => entry.entryPath);
|
|
13657
13657
|
if (serverEntryPoints.length === 0 && reactClientEntryPoints.length === 0 && nonReactClientEntryPoints.length === 0 && islandClientEntryPoints.length === 0 && htmxDir === undefined && htmlDir === undefined) {
|
|
@@ -13687,7 +13687,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
13687
13687
|
return {};
|
|
13688
13688
|
}
|
|
13689
13689
|
if (hmr && reactIndexesPath && reactClientEntryPoints.length > 0) {
|
|
13690
|
-
const refreshEntry =
|
|
13690
|
+
const refreshEntry = join21(reactIndexesPath, "_refresh.tsx");
|
|
13691
13691
|
if (!reactClientEntryPoints.includes(refreshEntry))
|
|
13692
13692
|
reactClientEntryPoints.push(refreshEntry);
|
|
13693
13693
|
}
|
|
@@ -13791,19 +13791,19 @@ ${content.slice(firstUseIdx)}`;
|
|
|
13791
13791
|
throw: false
|
|
13792
13792
|
}, resolveBunBuildOverride(bunBuildConfig, "reactClient")) : undefined;
|
|
13793
13793
|
if (reactDir && reactClientEntryPoints.length > 0) {
|
|
13794
|
-
rmSync2(
|
|
13794
|
+
rmSync2(join21(buildPath, "react", "generated", "indexes"), {
|
|
13795
13795
|
force: true,
|
|
13796
13796
|
recursive: true
|
|
13797
13797
|
});
|
|
13798
13798
|
}
|
|
13799
13799
|
if (angularDir && angularClientPaths.length > 0) {
|
|
13800
|
-
rmSync2(
|
|
13800
|
+
rmSync2(join21(buildPath, "angular", "indexes"), {
|
|
13801
13801
|
force: true,
|
|
13802
13802
|
recursive: true
|
|
13803
13803
|
});
|
|
13804
13804
|
}
|
|
13805
13805
|
if (islandClientEntryPoints.length > 0) {
|
|
13806
|
-
rmSync2(
|
|
13806
|
+
rmSync2(join21(buildPath, "islands"), {
|
|
13807
13807
|
force: true,
|
|
13808
13808
|
recursive: true
|
|
13809
13809
|
});
|
|
@@ -13872,7 +13872,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
13872
13872
|
globalCssEntries.length > 0 ? tracePhase("bun/global-css", () => bunBuild6(mergeBunBuildConfig({
|
|
13873
13873
|
entrypoints: globalCssEntries,
|
|
13874
13874
|
naming: `[dir]/[name].[hash].[ext]`,
|
|
13875
|
-
outdir: stylesDir ?
|
|
13875
|
+
outdir: stylesDir ? join21(buildPath, basename7(stylesDir)) : buildPath,
|
|
13876
13876
|
plugins: [stylePreprocessorPlugin2],
|
|
13877
13877
|
root: stylesDir || clientRoot,
|
|
13878
13878
|
target: "browser",
|
|
@@ -13881,7 +13881,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
13881
13881
|
vueCssPaths.length > 0 ? tracePhase("bun/vue-css", () => bunBuild6(mergeBunBuildConfig({
|
|
13882
13882
|
entrypoints: vueCssPaths,
|
|
13883
13883
|
naming: `[name].[hash].[ext]`,
|
|
13884
|
-
outdir:
|
|
13884
|
+
outdir: join21(buildPath, assetsPath ? basename7(assetsPath) : "assets", "css"),
|
|
13885
13885
|
target: "browser",
|
|
13886
13886
|
throw: false
|
|
13887
13887
|
}, resolveBunBuildOverride(bunBuildConfig, "vueCss")))) : undefined
|
|
@@ -14029,7 +14029,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
14029
14029
|
const processHtmlPages = async () => {
|
|
14030
14030
|
if (!(htmlDir && htmlPagesPath))
|
|
14031
14031
|
return;
|
|
14032
|
-
const outputHtmlPages = isSingle ?
|
|
14032
|
+
const outputHtmlPages = isSingle ? join21(buildPath, "pages") : join21(buildPath, basename7(htmlDir), "pages");
|
|
14033
14033
|
mkdirSync10(outputHtmlPages, { recursive: true });
|
|
14034
14034
|
cpSync(htmlPagesPath, outputHtmlPages, {
|
|
14035
14035
|
force: true,
|
|
@@ -14051,14 +14051,14 @@ ${content.slice(firstUseIdx)}`;
|
|
|
14051
14051
|
const processHtmxPages = async () => {
|
|
14052
14052
|
if (!(htmxDir && htmxPagesPath))
|
|
14053
14053
|
return;
|
|
14054
|
-
const outputHtmxPages = isSingle ?
|
|
14054
|
+
const outputHtmxPages = isSingle ? join21(buildPath, "pages") : join21(buildPath, basename7(htmxDir), "pages");
|
|
14055
14055
|
mkdirSync10(outputHtmxPages, { recursive: true });
|
|
14056
14056
|
cpSync(htmxPagesPath, outputHtmxPages, {
|
|
14057
14057
|
force: true,
|
|
14058
14058
|
recursive: true
|
|
14059
14059
|
});
|
|
14060
14060
|
if (shouldCopyHtmx) {
|
|
14061
|
-
const htmxDestDir = isSingle ? buildPath :
|
|
14061
|
+
const htmxDestDir = isSingle ? buildPath : join21(buildPath, basename7(htmxDir));
|
|
14062
14062
|
copyHtmxVendor(htmxDir, htmxDestDir);
|
|
14063
14063
|
}
|
|
14064
14064
|
if (shouldUpdateHtmxAssetPaths) {
|
|
@@ -14119,9 +14119,9 @@ ${content.slice(firstUseIdx)}`;
|
|
|
14119
14119
|
writeBuildTrace(buildPath);
|
|
14120
14120
|
return { conventions: conventionsMap, manifest };
|
|
14121
14121
|
}
|
|
14122
|
-
writeFileSync6(
|
|
14122
|
+
writeFileSync6(join21(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
|
|
14123
14123
|
if (Object.keys(conventionsMap).length > 0) {
|
|
14124
|
-
writeFileSync6(
|
|
14124
|
+
writeFileSync6(join21(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
|
|
14125
14125
|
}
|
|
14126
14126
|
writeBuildTrace(buildPath);
|
|
14127
14127
|
if (tailwind && mode === "production") {
|
|
@@ -14676,7 +14676,7 @@ var init_pathUtils = __esm(() => {
|
|
|
14676
14676
|
// src/dev/fileWatcher.ts
|
|
14677
14677
|
import { watch } from "fs";
|
|
14678
14678
|
import { existsSync as existsSync20 } from "fs";
|
|
14679
|
-
import { join as
|
|
14679
|
+
import { join as join22, resolve as resolve21 } from "path";
|
|
14680
14680
|
var safeRemoveFromGraph = (graph, fullPath) => {
|
|
14681
14681
|
try {
|
|
14682
14682
|
removeFileFromGraph(graph, fullPath);
|
|
@@ -14703,7 +14703,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
|
|
|
14703
14703
|
if (shouldSkipFilename(filename, isStylesDir)) {
|
|
14704
14704
|
return;
|
|
14705
14705
|
}
|
|
14706
|
-
const fullPath =
|
|
14706
|
+
const fullPath = join22(absolutePath, filename).replace(/\\/g, "/");
|
|
14707
14707
|
if (shouldIgnorePath(fullPath, state.resolvedPaths)) {
|
|
14708
14708
|
return;
|
|
14709
14709
|
}
|
|
@@ -15259,7 +15259,7 @@ __export(exports_moduleServer, {
|
|
|
15259
15259
|
SRC_URL_PREFIX: () => SRC_URL_PREFIX
|
|
15260
15260
|
});
|
|
15261
15261
|
import { existsSync as existsSync21, readFileSync as readFileSync15, statSync as statSync2 } from "fs";
|
|
15262
|
-
import { basename as basename9, dirname as dirname14, extname as extname7, resolve as resolve26, relative as relative11 } from "path";
|
|
15262
|
+
import { basename as basename9, dirname as dirname14, extname as extname7, join as join23, resolve as resolve26, relative as relative11 } from "path";
|
|
15263
15263
|
var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
|
|
15264
15264
|
const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
|
|
15265
15265
|
const allExports = [];
|
|
@@ -15329,7 +15329,7 @@ ${stubs}
|
|
|
15329
15329
|
const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
|
|
15330
15330
|
if (!subpath) {
|
|
15331
15331
|
const pkgDir = resolve26(projectRoot, "node_modules", packageName ?? "");
|
|
15332
|
-
const pkgJsonPath =
|
|
15332
|
+
const pkgJsonPath = join23(pkgDir, "package.json");
|
|
15333
15333
|
if (existsSync21(pkgJsonPath)) {
|
|
15334
15334
|
const pkg = JSON.parse(readFileSync15(pkgJsonPath, "utf-8"));
|
|
15335
15335
|
const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
|
|
@@ -18237,5 +18237,5 @@ export {
|
|
|
18237
18237
|
build
|
|
18238
18238
|
};
|
|
18239
18239
|
|
|
18240
|
-
//# debugId=
|
|
18240
|
+
//# debugId=075C1C8286293C6864756E2164756E21
|
|
18241
18241
|
//# sourceMappingURL=build.js.map
|