@absolutejs/absolute 0.20.0-beta.126 → 0.20.0-beta.127
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/CHANGELOG.md +9 -0
- package/README.md +19 -0
- package/changelog.json +16 -0
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +35 -29
- package/dist/angular/index.js.map +5 -4
- package/dist/angular/server.js +35 -29
- package/dist/angular/server.js.map +5 -4
- package/dist/build/buildWorker.js +9 -3
- package/dist/build.js +210 -201
- package/dist/build.js.map +8 -7
- package/dist/cli/{compile-smcnjyhb.js → compile-0epdbdcx.js} +1 -1
- package/dist/cli/{index-9q8yn5ax.js → index-54q7pxcx.js} +1 -0
- package/dist/cli/{index-fx42yxhy.js → index-79ppyst7.js} +1 -1
- package/dist/cli/index.js +4 -4
- package/dist/cli/{mobile-50c5tahh.js → mobile-49hyrgrj.js} +1 -1
- package/dist/cli/{prerender-vvrj9vjg.js → prerender-yex2zwj3.js} +1 -1
- package/dist/cli/{start-pdacfgcc.js → start-m0p0qbep.js} +1 -1
- package/dist/index.js +229 -217
- package/dist/index.js.map +11 -9
- package/dist/islands/index.js +10 -4
- package/dist/islands/index.js.map +5 -4
- package/dist/mobile/remoteMacAgentEntry.js +1 -1
- package/dist/react/index.js +10 -4
- package/dist/react/index.js.map +5 -4
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/isFile.d.ts +4 -0
- package/dist/src/utils/isPrerendering.d.ts +5 -0
- package/dist/svelte/index.js +10 -4
- package/dist/svelte/index.js.map +5 -4
- package/dist/vue/index.js +10 -4
- package/dist/vue/index.js.map +5 -4
- package/package.json +2 -2
package/dist/build.js
CHANGED
|
@@ -3979,6 +3979,11 @@ var init_svelteServerModule = __esm(() => {
|
|
|
3979
3979
|
});
|
|
3980
3980
|
});
|
|
3981
3981
|
|
|
3982
|
+
// src/utils/isFile.ts
|
|
3983
|
+
import { statSync } from "fs";
|
|
3984
|
+
var isFile = (path) => statSync(path, { throwIfNoEntry: false })?.isFile() ?? false;
|
|
3985
|
+
var init_isFile = () => {};
|
|
3986
|
+
|
|
3982
3987
|
// src/utils/vueCompiler.ts
|
|
3983
3988
|
var exports_vueCompiler = {};
|
|
3984
3989
|
__export(exports_vueCompiler, {
|
|
@@ -3997,7 +4002,7 @@ var createVueCompiler = async () => {
|
|
|
3997
4002
|
};
|
|
3998
4003
|
|
|
3999
4004
|
// src/core/vueServerModule.ts
|
|
4000
|
-
import {
|
|
4005
|
+
import { readFileSync as readFileSync4, realpathSync } from "fs";
|
|
4001
4006
|
import { mkdir as mkdir3 } from "fs/promises";
|
|
4002
4007
|
import { dirname as dirname5, join as join9, relative as relative6, resolve as resolve8 } from "path";
|
|
4003
4008
|
var {Transpiler } = globalThis.Bun;
|
|
@@ -4044,9 +4049,9 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, tran
|
|
|
4044
4049
|
const hasScript = descriptor.script || descriptor.scriptSetup;
|
|
4045
4050
|
const compiledScript = hasScript ? compiler.compileScript(descriptor, {
|
|
4046
4051
|
fs: {
|
|
4047
|
-
fileExists:
|
|
4052
|
+
fileExists: isFile,
|
|
4048
4053
|
realpath: realpathSync,
|
|
4049
|
-
readFile: (file) =>
|
|
4054
|
+
readFile: (file) => isFile(file) ? readFileSync4(file, "utf-8") : undefined
|
|
4050
4055
|
},
|
|
4051
4056
|
id: componentId,
|
|
4052
4057
|
inlineTemplate: false
|
|
@@ -4091,6 +4096,7 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, tran
|
|
|
4091
4096
|
};
|
|
4092
4097
|
var init_vueServerModule = __esm(() => {
|
|
4093
4098
|
init_constants();
|
|
4099
|
+
init_isFile();
|
|
4094
4100
|
serverCacheRoot3 = join9(process.cwd(), ".absolutejs", "islands", "vue");
|
|
4095
4101
|
compiledModuleCache3 = new Map;
|
|
4096
4102
|
transpiler2 = new Transpiler({ loader: "ts", target: "browser" });
|
|
@@ -4511,10 +4517,10 @@ var init_outputLogs = __esm(() => {
|
|
|
4511
4517
|
});
|
|
4512
4518
|
|
|
4513
4519
|
// src/build/scanEntryPoints.ts
|
|
4514
|
-
import { existsSync as
|
|
4520
|
+
import { existsSync as existsSync5 } from "fs";
|
|
4515
4521
|
var {Glob: Glob2 } = globalThis.Bun;
|
|
4516
4522
|
var scanEntryPoints = async (dir, pattern) => {
|
|
4517
|
-
if (!
|
|
4523
|
+
if (!existsSync5(dir))
|
|
4518
4524
|
return [];
|
|
4519
4525
|
const entryPaths = [];
|
|
4520
4526
|
const glob = new Glob2(pattern);
|
|
@@ -4526,14 +4532,14 @@ var scanEntryPoints = async (dir, pattern) => {
|
|
|
4526
4532
|
var init_scanEntryPoints = () => {};
|
|
4527
4533
|
|
|
4528
4534
|
// src/build/stampedFileCache.ts
|
|
4529
|
-
import { statSync } from "fs";
|
|
4535
|
+
import { statSync as statSync2 } from "fs";
|
|
4530
4536
|
var STAMP_SETTLE_MS = 2000, createStampedFileCache = () => {
|
|
4531
4537
|
const entries = new Map;
|
|
4532
4538
|
const seen = new Set;
|
|
4533
4539
|
const read = (path, compute) => {
|
|
4534
4540
|
let stamp;
|
|
4535
4541
|
try {
|
|
4536
|
-
const stats =
|
|
4542
|
+
const stats = statSync2(path);
|
|
4537
4543
|
stamp = { mtimeMs: stats.mtimeMs, size: stats.size };
|
|
4538
4544
|
} catch {
|
|
4539
4545
|
return compute();
|
|
@@ -4565,7 +4571,7 @@ var init_stampedFileCache = () => {};
|
|
|
4565
4571
|
// src/build/scanConventions.ts
|
|
4566
4572
|
import { basename as basename3 } from "path";
|
|
4567
4573
|
var {Glob: Glob3 } = globalThis.Bun;
|
|
4568
|
-
import { existsSync as
|
|
4574
|
+
import { existsSync as existsSync6 } from "fs";
|
|
4569
4575
|
var CONVENTION_RE, classifyFile = (file, pageFiles, defaults, pages) => {
|
|
4570
4576
|
const fileName = basename3(file);
|
|
4571
4577
|
const match = CONVENTION_RE.exec(fileName);
|
|
@@ -4590,7 +4596,7 @@ var CONVENTION_RE, classifyFile = (file, pageFiles, defaults, pages) => {
|
|
|
4590
4596
|
else if (kind === "loading")
|
|
4591
4597
|
pages[pageName].loading = file;
|
|
4592
4598
|
}, scanConventions = async (pagesDir, pattern) => {
|
|
4593
|
-
if (!
|
|
4599
|
+
if (!existsSync6(pagesDir)) {
|
|
4594
4600
|
const pageFiles2 = [];
|
|
4595
4601
|
return { conventions: undefined, pageFiles: pageFiles2 };
|
|
4596
4602
|
}
|
|
@@ -4652,7 +4658,7 @@ __export(exports_serverExternals, {
|
|
|
4652
4658
|
createDevServerExternalsPlugin: () => createDevServerExternalsPlugin,
|
|
4653
4659
|
packageNameOf: () => packageNameOf
|
|
4654
4660
|
});
|
|
4655
|
-
import { existsSync as
|
|
4661
|
+
import { existsSync as existsSync7, readdirSync, readFileSync as readFileSync6 } from "fs";
|
|
4656
4662
|
import { isBuiltin } from "module";
|
|
4657
4663
|
import { dirname as dirname7, extname as extname5, join as join10 } from "path";
|
|
4658
4664
|
var DEFAULT_BUNDLED_SERVER_DEPENDENCIES, buildServerBundleExternals = (angularVendorPaths) => {
|
|
@@ -4711,7 +4717,7 @@ var DEFAULT_BUNDLED_SERVER_DEPENDENCIES, buildServerBundleExternals = (angularVe
|
|
|
4711
4717
|
let dir = dirname7(filePath);
|
|
4712
4718
|
while (true) {
|
|
4713
4719
|
const manifestPath = join10(dir, "package.json");
|
|
4714
|
-
if (
|
|
4720
|
+
if (existsSync7(manifestPath) && hasPackageName(manifestPath))
|
|
4715
4721
|
return dir;
|
|
4716
4722
|
const parent = dirname7(dir);
|
|
4717
4723
|
if (parent === dir)
|
|
@@ -5089,7 +5095,7 @@ var exports_staticAnalyzeSpaRoutes = {};
|
|
|
5089
5095
|
__export(exports_staticAnalyzeSpaRoutes, {
|
|
5090
5096
|
analyzeAngularSpaRoutes: () => analyzeAngularSpaRoutes
|
|
5091
5097
|
});
|
|
5092
|
-
import { existsSync as
|
|
5098
|
+
import { existsSync as existsSync8, promises as fs } from "fs";
|
|
5093
5099
|
import { join as join12 } from "path";
|
|
5094
5100
|
import ts3 from "typescript";
|
|
5095
5101
|
var DYNAMIC_SEGMENT_PATTERN, pathHasDynamic = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN.test(seg) || seg === "**"), importsSymbolFrom = (sourceFile, localName, moduleSpecifier) => {
|
|
@@ -5296,7 +5302,7 @@ var DYNAMIC_SEGMENT_PATTERN, pathHasDynamic = (path) => path.split("/").some((se
|
|
|
5296
5302
|
}
|
|
5297
5303
|
await Promise.all(directories.map((directory) => walkTsFiles(directory, files)));
|
|
5298
5304
|
}, analyzeAngularSpaRoutes = async (angularDirectory) => {
|
|
5299
|
-
if (!
|
|
5305
|
+
if (!existsSync8(angularDirectory))
|
|
5300
5306
|
return [];
|
|
5301
5307
|
const tsFiles = [];
|
|
5302
5308
|
await walkTsFiles(angularDirectory, tsFiles);
|
|
@@ -5321,7 +5327,7 @@ var exports_staticAnalyzeSpaRoutes2 = {};
|
|
|
5321
5327
|
__export(exports_staticAnalyzeSpaRoutes2, {
|
|
5322
5328
|
analyzeReactSpaRoutes: () => analyzeReactSpaRoutes
|
|
5323
5329
|
});
|
|
5324
|
-
import { existsSync as
|
|
5330
|
+
import { existsSync as existsSync9, promises as fs2 } from "fs";
|
|
5325
5331
|
import { join as join13 } from "path";
|
|
5326
5332
|
import ts4 from "typescript";
|
|
5327
5333
|
var DYNAMIC_SEGMENT_PATTERN2, pathHasDynamic2 = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN2.test(seg) || seg === "**"), readStringLiteral2 = (expression) => {
|
|
@@ -5510,7 +5516,7 @@ var DYNAMIC_SEGMENT_PATTERN2, pathHasDynamic2 = (path) => path.split("/").some((
|
|
|
5510
5516
|
}
|
|
5511
5517
|
await Promise.all(directories.map((directory) => walkSourceFiles(directory, files)));
|
|
5512
5518
|
}, analyzeReactSpaRoutes = async (reactDirectory) => {
|
|
5513
|
-
if (!
|
|
5519
|
+
if (!existsSync9(reactDirectory))
|
|
5514
5520
|
return [];
|
|
5515
5521
|
const files = [];
|
|
5516
5522
|
await walkSourceFiles(reactDirectory, files);
|
|
@@ -5535,7 +5541,7 @@ var exports_staticAnalyzeSpaRoutes3 = {};
|
|
|
5535
5541
|
__export(exports_staticAnalyzeSpaRoutes3, {
|
|
5536
5542
|
analyzeSvelteSpaRoutes: () => analyzeSvelteSpaRoutes
|
|
5537
5543
|
});
|
|
5538
|
-
import { existsSync as
|
|
5544
|
+
import { existsSync as existsSync10, promises as fs3 } from "fs";
|
|
5539
5545
|
import { join as join14 } from "path";
|
|
5540
5546
|
var DYNAMIC_SEGMENT_PATTERN3, pathHasDynamic3 = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN3.test(seg) || seg === "**"), joinSegments3 = (parent, child) => {
|
|
5541
5547
|
if (!child)
|
|
@@ -5618,7 +5624,7 @@ var DYNAMIC_SEGMENT_PATTERN3, pathHasDynamic3 = (path) => path.split("/").some((
|
|
|
5618
5624
|
}
|
|
5619
5625
|
await Promise.all(directories.map((directory) => walkSvelteFiles(directory, files)));
|
|
5620
5626
|
}, analyzeSvelteSpaRoutes = async (svelteDirectory) => {
|
|
5621
|
-
if (!
|
|
5627
|
+
if (!existsSync10(svelteDirectory))
|
|
5622
5628
|
return [];
|
|
5623
5629
|
const files = [];
|
|
5624
5630
|
await walkSvelteFiles(svelteDirectory, files);
|
|
@@ -5645,7 +5651,7 @@ var exports_staticAnalyzeSpaRoutes4 = {};
|
|
|
5645
5651
|
__export(exports_staticAnalyzeSpaRoutes4, {
|
|
5646
5652
|
analyzeVueSpaRoutes: () => analyzeVueSpaRoutes
|
|
5647
5653
|
});
|
|
5648
|
-
import { existsSync as
|
|
5654
|
+
import { existsSync as existsSync11, promises as fs4 } from "fs";
|
|
5649
5655
|
import { join as join15 } from "path";
|
|
5650
5656
|
import ts5 from "typescript";
|
|
5651
5657
|
var DYNAMIC_SEGMENT_PATTERN4, pathHasDynamic4 = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN4.test(seg) || seg === "**"), readStringLiteral3 = (expression) => {
|
|
@@ -5888,7 +5894,7 @@ var DYNAMIC_SEGMENT_PATTERN4, pathHasDynamic4 = (path) => path.split("/").some((
|
|
|
5888
5894
|
}
|
|
5889
5895
|
await Promise.all(directories.map((directory) => walkSourceFiles2(directory, files)));
|
|
5890
5896
|
}, analyzeVueSpaRoutes = async (vueDirectory) => {
|
|
5891
|
-
if (!
|
|
5897
|
+
if (!existsSync11(vueDirectory))
|
|
5892
5898
|
return [];
|
|
5893
5899
|
const files = [];
|
|
5894
5900
|
await walkSourceFiles2(vueDirectory, files);
|
|
@@ -6145,10 +6151,10 @@ var init_generateSitemap = __esm(() => {
|
|
|
6145
6151
|
});
|
|
6146
6152
|
|
|
6147
6153
|
// src/build/scanCssEntryPoints.ts
|
|
6148
|
-
import { existsSync as
|
|
6154
|
+
import { existsSync as existsSync12 } from "fs";
|
|
6149
6155
|
var {Glob: Glob4 } = globalThis.Bun;
|
|
6150
6156
|
var scanCssEntryPoints = async (dir, ignore) => {
|
|
6151
|
-
if (!
|
|
6157
|
+
if (!existsSync12(dir))
|
|
6152
6158
|
return [];
|
|
6153
6159
|
const entryPaths = [];
|
|
6154
6160
|
const glob = new Glob4("**/*.{css,scss,sass,less,styl,stylus}");
|
|
@@ -11052,7 +11058,7 @@ __export(exports_tailwindCompiler, {
|
|
|
11052
11058
|
warmTailwindCompiler: () => warmTailwindCompiler
|
|
11053
11059
|
});
|
|
11054
11060
|
import { createHash as createHash2 } from "crypto";
|
|
11055
|
-
import { existsSync as
|
|
11061
|
+
import { existsSync as existsSync13, readFileSync as readFileSync8 } from "fs";
|
|
11056
11062
|
import { readFile as readFile2, stat } from "fs/promises";
|
|
11057
11063
|
import { dirname as dirname8, extname as extname6, isAbsolute as isAbsolute2, resolve as resolve10 } from "path";
|
|
11058
11064
|
var compilerCache, cachedTailwindCompile = null, loadTailwindCompile = async () => {
|
|
@@ -11112,7 +11118,7 @@ var compilerCache, cachedTailwindCompile = null, loadTailwindCompile = async ()
|
|
|
11112
11118
|
].filter((entry) => typeof entry === "string");
|
|
11113
11119
|
for (const candidate of candidates) {
|
|
11114
11120
|
const candidatePath = resolve10(pkgDir, candidate);
|
|
11115
|
-
if (
|
|
11121
|
+
if (existsSync13(candidatePath))
|
|
11116
11122
|
return candidatePath;
|
|
11117
11123
|
}
|
|
11118
11124
|
return Bun.resolveSync(id, base);
|
|
@@ -11282,7 +11288,7 @@ var init_compileTailwind = __esm(() => {
|
|
|
11282
11288
|
});
|
|
11283
11289
|
|
|
11284
11290
|
// src/utils/imageProcessing.ts
|
|
11285
|
-
import { existsSync as
|
|
11291
|
+
import { existsSync as existsSync14, mkdirSync as mkdirSync3, readFileSync as readFileSync9, writeFileSync as writeFileSync3 } from "fs";
|
|
11286
11292
|
import { join as join17, resolve as resolve12 } from "path";
|
|
11287
11293
|
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) => {
|
|
11288
11294
|
for (const size of sizes) {
|
|
@@ -11341,7 +11347,7 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
|
|
|
11341
11347
|
return [...device, ...image].sort((left, right) => left - right);
|
|
11342
11348
|
}, getCacheDir = (buildDir, cacheDirectory) => {
|
|
11343
11349
|
const dir = cacheDirectory ? resolve12(cacheDirectory) : join17(buildDir, ".cache", "images");
|
|
11344
|
-
if (!
|
|
11350
|
+
if (!existsSync14(dir))
|
|
11345
11351
|
mkdirSync3(dir, { recursive: true });
|
|
11346
11352
|
return dir;
|
|
11347
11353
|
}, getCacheKey = (url, width, quality, format) => {
|
|
@@ -11433,7 +11439,7 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
|
|
|
11433
11439
|
}, readFromCache = (cacheDir, cacheKey2) => {
|
|
11434
11440
|
const metaPath = join17(cacheDir, `${cacheKey2}.meta`);
|
|
11435
11441
|
const dataPath = join17(cacheDir, `${cacheKey2}.data`);
|
|
11436
|
-
if (!
|
|
11442
|
+
if (!existsSync14(metaPath) || !existsSync14(dataPath))
|
|
11437
11443
|
return null;
|
|
11438
11444
|
try {
|
|
11439
11445
|
const meta = JSON.parse(readFileSync9(metaPath, "utf-8"));
|
|
@@ -11546,12 +11552,12 @@ var init_optimizeHtmlImages = __esm(() => {
|
|
|
11546
11552
|
});
|
|
11547
11553
|
|
|
11548
11554
|
// src/cli/scripts/telemetry.ts
|
|
11549
|
-
import { existsSync as
|
|
11555
|
+
import { existsSync as existsSync15, mkdirSync as mkdirSync4, readFileSync as readFileSync10, writeFileSync as writeFileSync4 } from "fs";
|
|
11550
11556
|
import { homedir } from "os";
|
|
11551
11557
|
import { join as join18 } from "path";
|
|
11552
11558
|
var configDir, configPath, getTelemetryConfig = () => {
|
|
11553
11559
|
try {
|
|
11554
|
-
if (!
|
|
11560
|
+
if (!existsSync15(configPath))
|
|
11555
11561
|
return null;
|
|
11556
11562
|
const raw = readFileSync10(configPath, "utf-8");
|
|
11557
11563
|
const config = JSON.parse(raw);
|
|
@@ -11566,11 +11572,11 @@ var init_telemetry = __esm(() => {
|
|
|
11566
11572
|
});
|
|
11567
11573
|
|
|
11568
11574
|
// src/cli/telemetryEvent.ts
|
|
11569
|
-
import { existsSync as
|
|
11575
|
+
import { existsSync as existsSync16, readFileSync as readFileSync11 } from "fs";
|
|
11570
11576
|
import { arch, platform } from "os";
|
|
11571
11577
|
import { dirname as dirname10, join as join19, parse } from "path";
|
|
11572
11578
|
var checkCandidate = (candidate) => {
|
|
11573
|
-
if (!
|
|
11579
|
+
if (!existsSync16(candidate)) {
|
|
11574
11580
|
return null;
|
|
11575
11581
|
}
|
|
11576
11582
|
const pkg = JSON.parse(readFileSync11(candidate, "utf-8"));
|
|
@@ -11685,17 +11691,17 @@ var exports_buildHMRClient = {};
|
|
|
11685
11691
|
__export(exports_buildHMRClient, {
|
|
11686
11692
|
buildHMRClient: () => buildHMRClient
|
|
11687
11693
|
});
|
|
11688
|
-
import { existsSync as
|
|
11694
|
+
import { existsSync as existsSync17 } from "fs";
|
|
11689
11695
|
import { resolve as resolve13 } from "path";
|
|
11690
11696
|
var {build: bunBuild } = globalThis.Bun;
|
|
11691
11697
|
var resolveHmrClientPath = () => {
|
|
11692
11698
|
const projectRoot = process.cwd();
|
|
11693
11699
|
const fromSource = resolve13(import.meta.dir, "client/hmrClient.ts");
|
|
11694
|
-
if (
|
|
11700
|
+
if (existsSync17(fromSource) && fromSource.startsWith(projectRoot)) {
|
|
11695
11701
|
return fromSource;
|
|
11696
11702
|
}
|
|
11697
11703
|
const fromNodeModules = resolve13(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client/hmrClient.ts");
|
|
11698
|
-
if (
|
|
11704
|
+
if (existsSync17(fromNodeModules))
|
|
11699
11705
|
return fromNodeModules;
|
|
11700
11706
|
return resolve13(import.meta.dir, "dev/client/hmrClient.ts");
|
|
11701
11707
|
}, hmrClientPath2, buildHMRClient = async () => {
|
|
@@ -11845,10 +11851,10 @@ var devVendorPaths = null, getDevVendorPaths = () => devVendorPaths, setDevVendo
|
|
|
11845
11851
|
};
|
|
11846
11852
|
|
|
11847
11853
|
// src/dev/lazyPages.ts
|
|
11848
|
-
import { existsSync as
|
|
11854
|
+
import { existsSync as existsSync18 } from "fs";
|
|
11849
11855
|
import { basename as basename6, extname as extname7, isAbsolute as isAbsolute3, join as join20, resolve as resolve14 } from "path";
|
|
11850
11856
|
var PAGE_EXTENSIONS, KEY_SUFFIXES, SRC_URL_PREFIX = "/@src/", isTruthyFlag = (value) => value === "1" || value === "true", looksLikePath = (value) => value.includes("/") || value.includes("\\") || value.startsWith("."), probeDirForName = ({ dir, framework }, name) => {
|
|
11851
|
-
const extension = PAGE_EXTENSIONS[framework].find((ext) =>
|
|
11857
|
+
const extension = PAGE_EXTENSIONS[framework].find((ext) => existsSync18(join20(dir, `${name}${ext}`)));
|
|
11852
11858
|
return extension === undefined ? undefined : toDevPageEntry(framework, join20(dir, `${name}${extension}`));
|
|
11853
11859
|
}, resolveSourcePath = (keyOrPath) => {
|
|
11854
11860
|
const stripped = keyOrPath.startsWith(SRC_URL_PREFIX) ? keyOrPath.slice(SRC_URL_PREFIX.length).split("?")[0] ?? "" : keyOrPath;
|
|
@@ -11956,7 +11962,7 @@ var init_lazyPages = __esm(() => {
|
|
|
11956
11962
|
});
|
|
11957
11963
|
|
|
11958
11964
|
// src/build/angularLinkerPlugin.ts
|
|
11959
|
-
import { existsSync as
|
|
11965
|
+
import { existsSync as existsSync19, mkdirSync as mkdirSync5, readFileSync as readFileSync12, writeFileSync as writeFileSync5 } from "fs";
|
|
11960
11966
|
import { dirname as dirname11, join as join21, relative as relative8, resolve as resolve15 } from "path";
|
|
11961
11967
|
import { createHash as createHash3 } from "crypto";
|
|
11962
11968
|
var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linkerJitMode) => ({
|
|
@@ -11979,7 +11985,7 @@ var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linker
|
|
|
11979
11985
|
}
|
|
11980
11986
|
const hash = createHash3("md5").update(source).digest("hex");
|
|
11981
11987
|
const cachePath = join21(cacheDir, `${hash}.js`);
|
|
11982
|
-
if (
|
|
11988
|
+
if (existsSync19(cachePath)) {
|
|
11983
11989
|
return {
|
|
11984
11990
|
contents: readFileSync12(cachePath, "utf-8"),
|
|
11985
11991
|
loader: "js"
|
|
@@ -11996,7 +12002,7 @@ var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linker
|
|
|
11996
12002
|
linkerPlugin = mod.createEs2015LinkerPlugin({
|
|
11997
12003
|
fileSystem: {
|
|
11998
12004
|
dirname: dirname11,
|
|
11999
|
-
exists:
|
|
12005
|
+
exists: existsSync19,
|
|
12000
12006
|
readFile: readFileSync12,
|
|
12001
12007
|
relative: relative8,
|
|
12002
12008
|
resolve: resolve15
|
|
@@ -12111,7 +12117,7 @@ var init_bunStringRawUnicodePlugin = __esm(() => {
|
|
|
12111
12117
|
});
|
|
12112
12118
|
|
|
12113
12119
|
// src/build/externalAssetPlugin.ts
|
|
12114
|
-
import { copyFileSync, existsSync as
|
|
12120
|
+
import { copyFileSync, existsSync as existsSync20, mkdirSync as mkdirSync6, statSync as statSync3 } from "fs";
|
|
12115
12121
|
import { basename as basename7, dirname as dirname12, join as join22, resolve as resolve16 } from "path";
|
|
12116
12122
|
var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
|
|
12117
12123
|
name: "absolute-external-asset",
|
|
@@ -12133,12 +12139,12 @@ var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
|
|
|
12133
12139
|
if (!relPath)
|
|
12134
12140
|
continue;
|
|
12135
12141
|
const assetPath = resolve16(sourceDir, relPath);
|
|
12136
|
-
if (!
|
|
12142
|
+
if (!existsSync20(assetPath))
|
|
12137
12143
|
continue;
|
|
12138
|
-
if (!
|
|
12144
|
+
if (!statSync3(assetPath).isFile())
|
|
12139
12145
|
continue;
|
|
12140
12146
|
const targetPath = join22(outDir, basename7(assetPath));
|
|
12141
|
-
if (
|
|
12147
|
+
if (existsSync20(targetPath))
|
|
12142
12148
|
continue;
|
|
12143
12149
|
mkdirSync6(dirname12(targetPath), { recursive: true });
|
|
12144
12150
|
copyFileSync(assetPath, targetPath);
|
|
@@ -12366,7 +12372,7 @@ var vueModuleOutputPath = (outputDir, sourcePath) => {
|
|
|
12366
12372
|
var init_vueModuleOutputPath = () => {};
|
|
12367
12373
|
|
|
12368
12374
|
// src/build/injectVueComposableTracking.ts
|
|
12369
|
-
import { existsSync as
|
|
12375
|
+
import { existsSync as existsSync21, readFileSync as readFileSync13, writeFileSync as writeFileSync6 } from "fs";
|
|
12370
12376
|
import { basename as basename9, isAbsolute as isAbsolute5, relative as relative10, resolve as resolve18 } from "path";
|
|
12371
12377
|
var VUE_HMR_RUNTIME, USE_DECLARATION, MODULE_COMMENT, LINE_TERMINATOR, STATEMENT_OPENER, SOURCE_EXTENSIONS2, CHUNK_REFERENCE, isSharedChunkFile = (fileName) => fileName.startsWith("chunk-") && fileName.endsWith(".js"), collectModuleComments = (content) => Array.from(content.matchAll(MODULE_COMMENT), (match) => ({
|
|
12372
12378
|
index: match.index,
|
|
@@ -12481,7 +12487,7 @@ ${wrapped.slice(insertAt)}`);
|
|
|
12481
12487
|
if (!sourcePath)
|
|
12482
12488
|
return absolutePath;
|
|
12483
12489
|
const stem = sourcePath.replace(/\.[cm]?js$/, "");
|
|
12484
|
-
const existing = SOURCE_EXTENSIONS2.map((extension) => `${stem}${extension}`).find((candidate) =>
|
|
12490
|
+
const existing = SOURCE_EXTENSIONS2.map((extension) => `${stem}${extension}`).find((candidate) => existsSync21(candidate));
|
|
12485
12491
|
return existing ?? `${stem}.ts`;
|
|
12486
12492
|
};
|
|
12487
12493
|
var init_injectVueComposableTracking = __esm(() => {
|
|
@@ -13395,7 +13401,7 @@ var isTestSourcePath = (file) => {
|
|
|
13395
13401
|
};
|
|
13396
13402
|
|
|
13397
13403
|
// src/mobile/deviceCapabilities.ts
|
|
13398
|
-
import { existsSync as
|
|
13404
|
+
import { existsSync as existsSync22, readFileSync as readFileSync15 } from "fs";
|
|
13399
13405
|
import { extname as extname9, join as join27, relative as relative13, resolve as resolve22 } from "path";
|
|
13400
13406
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
13401
13407
|
import ts8 from "typescript";
|
|
@@ -13599,7 +13605,7 @@ var DEVICES_PACKAGE = "@absolutejs/devices", ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABI
|
|
|
13599
13605
|
return packages;
|
|
13600
13606
|
}, discoverAbsoluteDeviceCapabilities = (projectRoot, providers = loadAbsoluteDeviceCapabilityProviders(projectRoot)) => {
|
|
13601
13607
|
const root = resolve22(projectRoot);
|
|
13602
|
-
if (!
|
|
13608
|
+
if (!existsSync22(root))
|
|
13603
13609
|
return [];
|
|
13604
13610
|
const known = new Set(Object.keys(providers));
|
|
13605
13611
|
const capabilities = new Set;
|
|
@@ -14971,7 +14977,7 @@ __export(exports_fastHmrCompiler, {
|
|
|
14971
14977
|
takePendingModule: () => takePendingModule,
|
|
14972
14978
|
tryFastHmr: () => tryFastHmr
|
|
14973
14979
|
});
|
|
14974
|
-
import { existsSync as
|
|
14980
|
+
import { existsSync as existsSync23, readFileSync as readFileSync17, statSync as statSync4 } from "fs";
|
|
14975
14981
|
import { dirname as dirname16, extname as extname10, relative as relative14, resolve as resolve24 } from "path";
|
|
14976
14982
|
import ts12 from "typescript";
|
|
14977
14983
|
var fail = (reason, detail, location) => ({
|
|
@@ -15295,7 +15301,7 @@ var fail = (reason, detail, location) => ({
|
|
|
15295
15301
|
`${base}/index.tsx`
|
|
15296
15302
|
];
|
|
15297
15303
|
for (const candidate of candidates) {
|
|
15298
|
-
if (!
|
|
15304
|
+
if (!existsSync23(candidate))
|
|
15299
15305
|
continue;
|
|
15300
15306
|
let content;
|
|
15301
15307
|
try {
|
|
@@ -15878,7 +15884,7 @@ var fail = (reason, detail, location) => ({
|
|
|
15878
15884
|
const cacheKey2 = `ts:${filePath}:${className}`;
|
|
15879
15885
|
let stat2;
|
|
15880
15886
|
try {
|
|
15881
|
-
stat2 =
|
|
15887
|
+
stat2 = statSync4(filePath);
|
|
15882
15888
|
} catch {
|
|
15883
15889
|
return null;
|
|
15884
15890
|
}
|
|
@@ -15932,7 +15938,7 @@ var fail = (reason, detail, location) => ({
|
|
|
15932
15938
|
const cacheKey2 = `dts:${dtsPath}:${className}`;
|
|
15933
15939
|
let stat2;
|
|
15934
15940
|
try {
|
|
15935
|
-
stat2 =
|
|
15941
|
+
stat2 = statSync4(dtsPath);
|
|
15936
15942
|
} catch {
|
|
15937
15943
|
return null;
|
|
15938
15944
|
}
|
|
@@ -16060,7 +16066,7 @@ var fail = (reason, detail, location) => ({
|
|
|
16060
16066
|
if (visited.has(startDtsPath))
|
|
16061
16067
|
return null;
|
|
16062
16068
|
visited.add(startDtsPath);
|
|
16063
|
-
if (!
|
|
16069
|
+
if (!existsSync23(startDtsPath))
|
|
16064
16070
|
return null;
|
|
16065
16071
|
let content;
|
|
16066
16072
|
try {
|
|
@@ -16113,16 +16119,16 @@ var fail = (reason, detail, location) => ({
|
|
|
16113
16119
|
`${base}/index.d.cts`
|
|
16114
16120
|
];
|
|
16115
16121
|
for (const c of candidates) {
|
|
16116
|
-
if (
|
|
16122
|
+
if (existsSync23(c))
|
|
16117
16123
|
return c;
|
|
16118
16124
|
}
|
|
16119
16125
|
return null;
|
|
16120
16126
|
}, findPackageDtsForJs = (jsPath) => {
|
|
16121
16127
|
const sibling = jsPath.replace(/\.[mc]?js$/, ".d.ts");
|
|
16122
|
-
if (
|
|
16128
|
+
if (existsSync23(sibling))
|
|
16123
16129
|
return sibling;
|
|
16124
16130
|
const mirror = jsPath.replace(/\/dist\//, "/dist/src/").replace(/\.[mc]?js$/, ".d.ts");
|
|
16125
|
-
if (
|
|
16131
|
+
if (existsSync23(mirror))
|
|
16126
16132
|
return mirror;
|
|
16127
16133
|
return null;
|
|
16128
16134
|
}, resolveChildComponentInfo = (className, spec, componentDir, projectRoot) => {
|
|
@@ -16135,7 +16141,7 @@ var fail = (reason, detail, location) => ({
|
|
|
16135
16141
|
`${base}/index.tsx`
|
|
16136
16142
|
];
|
|
16137
16143
|
for (const candidate of candidates) {
|
|
16138
|
-
if (!
|
|
16144
|
+
if (!existsSync23(candidate))
|
|
16139
16145
|
continue;
|
|
16140
16146
|
const info = getChildComponentInfoFromTsSource(candidate, className);
|
|
16141
16147
|
if (info)
|
|
@@ -16273,7 +16279,7 @@ var fail = (reason, detail, location) => ({
|
|
|
16273
16279
|
}, providerProbeCache, fileHasModuleProviders = (filePath) => {
|
|
16274
16280
|
let stat2;
|
|
16275
16281
|
try {
|
|
16276
|
-
stat2 =
|
|
16282
|
+
stat2 = statSync4(filePath);
|
|
16277
16283
|
} catch {
|
|
16278
16284
|
return true;
|
|
16279
16285
|
}
|
|
@@ -16349,11 +16355,11 @@ var fail = (reason, detail, location) => ({
|
|
|
16349
16355
|
const resolved = resolve24(componentDir, spec);
|
|
16350
16356
|
for (const ext of TS_EXTENSIONS) {
|
|
16351
16357
|
const candidate = resolved + ext;
|
|
16352
|
-
if (
|
|
16358
|
+
if (existsSync23(candidate))
|
|
16353
16359
|
return candidate;
|
|
16354
16360
|
}
|
|
16355
16361
|
const indexCandidate = resolve24(resolved, "index.ts");
|
|
16356
|
-
if (
|
|
16362
|
+
if (existsSync23(indexCandidate))
|
|
16357
16363
|
return indexCandidate;
|
|
16358
16364
|
}
|
|
16359
16365
|
return null;
|
|
@@ -16591,7 +16597,7 @@ ${transpiled}
|
|
|
16591
16597
|
}${staticPatch}`;
|
|
16592
16598
|
}, STYLE_PREPROCESSED_EXT, resolveAndReadStyleResource = (componentDir, url) => {
|
|
16593
16599
|
const abs = resolve24(componentDir, url);
|
|
16594
|
-
if (!
|
|
16600
|
+
if (!existsSync23(abs))
|
|
16595
16601
|
return null;
|
|
16596
16602
|
const ext = extname10(abs).toLowerCase();
|
|
16597
16603
|
if (!STYLE_PREPROCESSED_EXT.has(ext) || ext === ".css") {
|
|
@@ -16631,7 +16637,7 @@ ${block}
|
|
|
16631
16637
|
return cached;
|
|
16632
16638
|
const tsconfigPath = resolve24(projectRoot, "tsconfig.json");
|
|
16633
16639
|
const opts = {};
|
|
16634
|
-
if (
|
|
16640
|
+
if (existsSync23(tsconfigPath)) {
|
|
16635
16641
|
try {
|
|
16636
16642
|
const text2 = readFileSync17(tsconfigPath, "utf8");
|
|
16637
16643
|
const parsed = ts12.parseConfigFileTextToJson(tsconfigPath, text2);
|
|
@@ -16658,7 +16664,7 @@ ${block}
|
|
|
16658
16664
|
}, tryFastHmr = async (params) => {
|
|
16659
16665
|
const { componentFilePath, className } = params;
|
|
16660
16666
|
const projectRoot = params.projectRoot ?? process.cwd();
|
|
16661
|
-
if (!
|
|
16667
|
+
if (!existsSync23(componentFilePath)) {
|
|
16662
16668
|
return fail("file-not-found", componentFilePath);
|
|
16663
16669
|
}
|
|
16664
16670
|
let compiler;
|
|
@@ -16714,7 +16720,7 @@ ${block}
|
|
|
16714
16720
|
templatePath = componentFilePath;
|
|
16715
16721
|
} else if (decoratorMeta.templateUrl) {
|
|
16716
16722
|
const tplAbs = resolve24(componentDir, decoratorMeta.templateUrl);
|
|
16717
|
-
if (!
|
|
16723
|
+
if (!existsSync23(tplAbs)) {
|
|
16718
16724
|
return fail("template-resource-not-found", `Template file not found: ${tplAbs}`, { file: componentFilePath });
|
|
16719
16725
|
}
|
|
16720
16726
|
templateText = readFileSync17(tplAbs, "utf8");
|
|
@@ -17465,7 +17471,7 @@ var exports_parseAngularConfigImports = {};
|
|
|
17465
17471
|
__export(exports_parseAngularConfigImports, {
|
|
17466
17472
|
parseAngularProvidersImport: () => parseAngularProvidersImport
|
|
17467
17473
|
});
|
|
17468
|
-
import { existsSync as
|
|
17474
|
+
import { existsSync as existsSync24, readFileSync as readFileSync21 } from "fs";
|
|
17469
17475
|
import { dirname as dirname17, isAbsolute as isAbsolute6, join as join33 } from "path";
|
|
17470
17476
|
import ts16 from "typescript";
|
|
17471
17477
|
var findDefineConfigCall = (sf) => {
|
|
@@ -17522,7 +17528,7 @@ var findDefineConfigCall = (sf) => {
|
|
|
17522
17528
|
const envOverride = process.env.ABSOLUTE_CONFIG;
|
|
17523
17529
|
if (envOverride) {
|
|
17524
17530
|
const resolved = isAbsolute6(envOverride) ? envOverride : join33(projectRoot, envOverride);
|
|
17525
|
-
if (
|
|
17531
|
+
if (existsSync24(resolved))
|
|
17526
17532
|
return resolved;
|
|
17527
17533
|
}
|
|
17528
17534
|
const candidates = [
|
|
@@ -17532,7 +17538,7 @@ var findDefineConfigCall = (sf) => {
|
|
|
17532
17538
|
join33(projectRoot, "absolute.config.mjs")
|
|
17533
17539
|
];
|
|
17534
17540
|
for (const candidate of candidates) {
|
|
17535
|
-
if (
|
|
17541
|
+
if (existsSync24(candidate))
|
|
17536
17542
|
return candidate;
|
|
17537
17543
|
}
|
|
17538
17544
|
return null;
|
|
@@ -17710,7 +17716,7 @@ __export(exports_compileSvelte, {
|
|
|
17710
17716
|
clearSvelteCompilerCache: () => clearSvelteCompilerCache,
|
|
17711
17717
|
compileSvelte: () => compileSvelte
|
|
17712
17718
|
});
|
|
17713
|
-
import { existsSync as
|
|
17719
|
+
import { existsSync as existsSync25 } from "fs";
|
|
17714
17720
|
import { mkdir as mkdir6, stat as stat2 } from "fs/promises";
|
|
17715
17721
|
import {
|
|
17716
17722
|
dirname as dirname18,
|
|
@@ -17726,11 +17732,11 @@ var {write: write2, file, Transpiler: Transpiler2 } = globalThis.Bun;
|
|
|
17726
17732
|
var resolveDevClientDir2 = () => {
|
|
17727
17733
|
const projectRoot = process.cwd();
|
|
17728
17734
|
const fromSource = resolve25(import.meta.dir, "../dev/client");
|
|
17729
|
-
if (
|
|
17735
|
+
if (existsSync25(fromSource) && fromSource.startsWith(projectRoot)) {
|
|
17730
17736
|
return fromSource;
|
|
17731
17737
|
}
|
|
17732
17738
|
const fromNodeModules = resolve25(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
|
|
17733
|
-
if (
|
|
17739
|
+
if (existsSync25(fromNodeModules))
|
|
17734
17740
|
return fromNodeModules;
|
|
17735
17741
|
return resolve25(import.meta.dir, "./dev/client");
|
|
17736
17742
|
}, devClientDir2, hmrClientPath3, persistentCache, sourceHashCache, clearSvelteCompilerCache = () => {
|
|
@@ -17833,7 +17839,7 @@ var resolveDevClientDir2 = () => {
|
|
|
17833
17839
|
const contentHash = Bun.hash(raw).toString(BASE_36_RADIX);
|
|
17834
17840
|
const prevHash = sourceHashCache.get(src);
|
|
17835
17841
|
const persistent = persistentCache.get(src);
|
|
17836
|
-
if (prevHash === contentHash && persistent &&
|
|
17842
|
+
if (prevHash === contentHash && persistent && existsSync25(persistent.ssr) && existsSync25(persistent.client)) {
|
|
17837
17843
|
cache.set(src, persistent);
|
|
17838
17844
|
return persistent;
|
|
17839
17845
|
}
|
|
@@ -18573,7 +18579,7 @@ var init_chainInlineSourcemaps = __esm(() => {
|
|
|
18573
18579
|
|
|
18574
18580
|
// src/build/vueCompileCache.ts
|
|
18575
18581
|
import { createHash as createHash4 } from "crypto";
|
|
18576
|
-
import { existsSync as
|
|
18582
|
+
import { existsSync as existsSync26, readFileSync as readFileSync23 } from "fs";
|
|
18577
18583
|
import { mkdir as mkdir7, rename, writeFile as writeFile6 } from "fs/promises";
|
|
18578
18584
|
import { join as join35, resolve as resolve26 } from "path";
|
|
18579
18585
|
var CACHE_DIR_NAME = "compile-cache", ABSOLUTE_CACHE_DIR_NAME2 = ".absolutejs", CACHE_FORMAT_VERSION = 2, FILE_NAME_HASH_LENGTH = 32, vueCompileCacheEnabled = () => process.env.ABSOLUTE_COMPILE_CACHE !== "0", hashContent = (content) => createHash4("sha256").update(content).digest("hex"), hashParts = (parts) => {
|
|
@@ -18634,7 +18640,7 @@ var CACHE_DIR_NAME = "compile-cache", ABSOLUTE_CACHE_DIR_NAME2 = ".absolutejs",
|
|
|
18634
18640
|
if (!vueCompileCacheEnabled())
|
|
18635
18641
|
return null;
|
|
18636
18642
|
const entryFile = entryFileFor(sourceFilePath, projectRoot);
|
|
18637
|
-
if (!
|
|
18643
|
+
if (!existsSync26(entryFile))
|
|
18638
18644
|
return null;
|
|
18639
18645
|
try {
|
|
18640
18646
|
const parsed = JSON.parse(readFileSync23(entryFile, "utf-8"));
|
|
@@ -18665,7 +18671,7 @@ __export(exports_emitTsHelpers, {
|
|
|
18665
18671
|
emitTsHelpers: () => emitTsHelpers
|
|
18666
18672
|
});
|
|
18667
18673
|
var {file: file2, Transpiler: Transpiler3, write: write3 } = globalThis.Bun;
|
|
18668
|
-
import { copyFileSync as copyFileSync2, existsSync as
|
|
18674
|
+
import { copyFileSync as copyFileSync2, existsSync as existsSync27, readdirSync as readdirSync6 } from "fs";
|
|
18669
18675
|
import { mkdir as mkdir8, rename as rename2, writeFile as writeFile7 } from "fs/promises";
|
|
18670
18676
|
import { dirname as dirname19, join as join36 } from "path";
|
|
18671
18677
|
var CACHE_DIR_NAME2 = "vue-helpers", CACHE_FORMAT_VERSION2 = 1, HASH_LENGTH = 24, transpiler4, cacheDir = () => join36(process.cwd(), ".absolutejs", "compile-cache", CACHE_DIR_NAME2), cacheKey2 = (sourcePath, sourceCode) => {
|
|
@@ -18737,7 +18743,7 @@ var CACHE_DIR_NAME2 = "vue-helpers", CACHE_FORMAT_VERSION2 = 1, HASH_LENGTH = 24
|
|
|
18737
18743
|
const directory = cacheDir();
|
|
18738
18744
|
const fileName = key ? `${key.path}-${key.content}.js` : null;
|
|
18739
18745
|
const cachedPath = fileName ? join36(directory, fileName) : null;
|
|
18740
|
-
if (cachedPath &&
|
|
18746
|
+
if (cachedPath && existsSync27(cachedPath)) {
|
|
18741
18747
|
await copyBoth(clientOutputPath, serverOutputPath, cachedPath);
|
|
18742
18748
|
return;
|
|
18743
18749
|
}
|
|
@@ -18764,7 +18770,7 @@ var exports_compileVueSfc = {};
|
|
|
18764
18770
|
__export(exports_compileVueSfc, {
|
|
18765
18771
|
compileVueSfc: () => compileVueSfc
|
|
18766
18772
|
});
|
|
18767
|
-
import { existsSync as
|
|
18773
|
+
import { existsSync as existsSync28, readFileSync as readFileSync24, realpathSync as realpathSync2 } from "fs";
|
|
18768
18774
|
import { dirname as dirname20, relative as relative16, resolve as resolve27 } from "path";
|
|
18769
18775
|
var {Transpiler: Transpiler4 } = globalThis.Bun;
|
|
18770
18776
|
var transpiler5, inlineCssImports = (cssContent, cssFilePath, visited = new Set) => {
|
|
@@ -18775,7 +18781,7 @@ var transpiler5, inlineCssImports = (cssContent, cssFilePath, visited = new Set)
|
|
|
18775
18781
|
const importRegex = /@import\s+(?:url\(\s*)?(['"])(\.{1,2}\/[^'"]+)\1\s*\)?\s*;?/g;
|
|
18776
18782
|
return cssContent.replace(importRegex, (match, _quote, relPath) => {
|
|
18777
18783
|
const importedPath = resolve27(dirname20(cssFilePath), relPath);
|
|
18778
|
-
if (!
|
|
18784
|
+
if (!isFile(importedPath))
|
|
18779
18785
|
return match;
|
|
18780
18786
|
const importedContent = readFileSync24(importedPath, "utf-8");
|
|
18781
18787
|
return inlineCssImports(importedContent, importedPath, visited);
|
|
@@ -18793,10 +18799,10 @@ var transpiler5, inlineCssImports = (cssContent, cssFilePath, visited = new Set)
|
|
|
18793
18799
|
}
|
|
18794
18800
|
if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
|
|
18795
18801
|
const directTs = resolve27(sourceDir, `${filePath}.ts`);
|
|
18796
|
-
if (
|
|
18802
|
+
if (existsSync28(directTs))
|
|
18797
18803
|
return `${filePath}.js`;
|
|
18798
18804
|
const indexedTs = resolve27(sourceDir, filePath, "index.ts");
|
|
18799
|
-
if (
|
|
18805
|
+
if (existsSync28(indexedTs))
|
|
18800
18806
|
return `${filePath}/index.js`;
|
|
18801
18807
|
}
|
|
18802
18808
|
return `${filePath}.js`;
|
|
@@ -18862,10 +18868,10 @@ const ${localName} = (source) => ${importedName}(
|
|
|
18862
18868
|
const typeDepHashes = {};
|
|
18863
18869
|
const compiledScript = hasScript ? compiler.compileScript(descriptor, {
|
|
18864
18870
|
fs: {
|
|
18865
|
-
fileExists:
|
|
18871
|
+
fileExists: isFile,
|
|
18866
18872
|
realpath: realpathSync2,
|
|
18867
18873
|
readFile: (file3) => {
|
|
18868
|
-
if (!
|
|
18874
|
+
if (!isFile(file3))
|
|
18869
18875
|
return;
|
|
18870
18876
|
const content = readFileSync24(file3, "utf-8");
|
|
18871
18877
|
typeDepHashes[file3] = hashContent(content);
|
|
@@ -18878,7 +18884,7 @@ const ${localName} = (source) => ${importedName}(
|
|
|
18878
18884
|
}) : { bindings: {}, content: "export default {};", map: undefined };
|
|
18879
18885
|
const typeDependencies = "deps" in compiledScript ? compiledScript.deps ?? [] : [];
|
|
18880
18886
|
for (const dep of typeDependencies) {
|
|
18881
|
-
if (dep in typeDepHashes || !
|
|
18887
|
+
if (dep in typeDepHashes || !existsSync28(dep))
|
|
18882
18888
|
continue;
|
|
18883
18889
|
typeDepHashes[dep] = hashContent(readFileSync24(dep, "utf-8"));
|
|
18884
18890
|
}
|
|
@@ -18970,6 +18976,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
|
|
|
18970
18976
|
};
|
|
18971
18977
|
var init_compileVueSfc = __esm(() => {
|
|
18972
18978
|
init_sourceMetadata();
|
|
18979
|
+
init_isFile();
|
|
18973
18980
|
init_chainInlineSourcemaps();
|
|
18974
18981
|
init_stylePreprocessor();
|
|
18975
18982
|
init_vueCompileCache();
|
|
@@ -19042,7 +19049,7 @@ __export(exports_workerPool, {
|
|
|
19042
19049
|
resolveBuildWorkerCount: () => resolveBuildWorkerCount,
|
|
19043
19050
|
resolveBuildWorkerEntry: () => resolveBuildWorkerEntry
|
|
19044
19051
|
});
|
|
19045
|
-
import { existsSync as
|
|
19052
|
+
import { existsSync as existsSync29, readFileSync as readFileSync25 } from "fs";
|
|
19046
19053
|
import { availableParallelism, freemem } from "os";
|
|
19047
19054
|
import { dirname as dirname21, join as join37 } from "path";
|
|
19048
19055
|
import { pathToFileURL as pathToFileURL2 } from "url";
|
|
@@ -19062,7 +19069,7 @@ var MIN_WORKERS = 2, MAX_DEFAULT_WORKERS = 8, MAX_OVERRIDE_WORKERS = 64, WORKER_
|
|
|
19062
19069
|
return Math.max(MIN_WORKERS, Math.min(byCpu, byMemory));
|
|
19063
19070
|
}, isOwnPackageRoot = (dir) => {
|
|
19064
19071
|
const packageFile = join37(dir, "package.json");
|
|
19065
|
-
if (!
|
|
19072
|
+
if (!existsSync29(packageFile))
|
|
19066
19073
|
return false;
|
|
19067
19074
|
try {
|
|
19068
19075
|
const pkg = JSON.parse(readFileSync25(packageFile, "utf-8"));
|
|
@@ -19089,7 +19096,7 @@ var MIN_WORKERS = 2, MAX_DEFAULT_WORKERS = 8, MAX_OVERRIDE_WORKERS = 64, WORKER_
|
|
|
19089
19096
|
const sourceEntry = join37(root, "src", "build", "buildWorker.ts");
|
|
19090
19097
|
const runningFromDist = fromDir.startsWith(join37(root, "dist"));
|
|
19091
19098
|
const ordered = runningFromDist ? [distEntry, sourceEntry] : [sourceEntry, distEntry];
|
|
19092
|
-
return ordered.find((candidate) =>
|
|
19099
|
+
return ordered.find((candidate) => existsSync29(candidate)) ?? null;
|
|
19093
19100
|
}, formatPercent = (ratio) => `${Math.round(ratio * PERCENT)}%`, createBuildWorkerPool = (options = {}) => {
|
|
19094
19101
|
const size = options.size ?? resolveBuildWorkerCount();
|
|
19095
19102
|
const entry = options.entry === undefined ? resolveBuildWorkerEntry() : options.entry;
|
|
@@ -19380,7 +19387,7 @@ __export(exports_compileVue, {
|
|
|
19380
19387
|
generateVueHmrId: () => generateVueHmrId,
|
|
19381
19388
|
vueHmrMetadata: () => vueHmrMetadata
|
|
19382
19389
|
});
|
|
19383
|
-
import { existsSync as
|
|
19390
|
+
import { existsSync as existsSync30 } from "fs";
|
|
19384
19391
|
import { mkdir as mkdir9 } from "fs/promises";
|
|
19385
19392
|
import {
|
|
19386
19393
|
basename as basename14,
|
|
@@ -19394,11 +19401,11 @@ var {file: file3, write: write4 } = globalThis.Bun;
|
|
|
19394
19401
|
var resolveDevClientDir3 = () => {
|
|
19395
19402
|
const projectRoot = process.cwd();
|
|
19396
19403
|
const fromSource = resolve28(import.meta.dir, "../dev/client");
|
|
19397
|
-
if (
|
|
19404
|
+
if (existsSync30(fromSource) && fromSource.startsWith(projectRoot)) {
|
|
19398
19405
|
return fromSource;
|
|
19399
19406
|
}
|
|
19400
19407
|
const fromNodeModules = resolve28(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
|
|
19401
|
-
if (
|
|
19408
|
+
if (existsSync30(fromNodeModules))
|
|
19402
19409
|
return fromNodeModules;
|
|
19403
19410
|
return resolve28(import.meta.dir, "./dev/client");
|
|
19404
19411
|
}, devClientDir3, hmrClientPath4, scriptCache, scriptSetupCache, templateCache, styleCache, persistentBuildCache, vueSourceHashCache, vueHmrMetadata, clearVueHmrCaches = () => {
|
|
@@ -19451,10 +19458,10 @@ var resolveDevClientDir3 = () => {
|
|
|
19451
19458
|
if (helper.endsWith(".ts"))
|
|
19452
19459
|
return resolve28(sourceDir, helper);
|
|
19453
19460
|
const direct = resolve28(sourceDir, `${helper}.ts`);
|
|
19454
|
-
if (
|
|
19461
|
+
if (existsSync30(direct))
|
|
19455
19462
|
return direct;
|
|
19456
19463
|
const indexed = resolve28(sourceDir, helper, "index.ts");
|
|
19457
|
-
if (
|
|
19464
|
+
if (existsSync30(indexed))
|
|
19458
19465
|
return indexed;
|
|
19459
19466
|
return direct;
|
|
19460
19467
|
}, HELPER_JOB_MIN_BATCH = 24, runHelperEmit = async (files) => {
|
|
@@ -19584,7 +19591,7 @@ var resolveDevClientDir3 = () => {
|
|
|
19584
19591
|
const contentHash = Bun.hash(sourceContent).toString(BASE_36_RADIX);
|
|
19585
19592
|
const prevHash = vueSourceHashCache.get(sourceFilePath);
|
|
19586
19593
|
const persistent = persistentBuildCache.get(sourceFilePath);
|
|
19587
|
-
if (prevHash === contentHash && persistent &&
|
|
19594
|
+
if (prevHash === contentHash && persistent && existsSync30(persistent.clientPath) && existsSync30(persistent.serverPath)) {
|
|
19588
19595
|
cacheMap.set(sourceFilePath, persistent);
|
|
19589
19596
|
return persistent;
|
|
19590
19597
|
}
|
|
@@ -19744,7 +19751,7 @@ var resolveDevClientDir3 = () => {
|
|
|
19744
19751
|
const routes = parseVueSpaRoutes(descriptor.script?.content ?? "");
|
|
19745
19752
|
for (const { importPath } of routes) {
|
|
19746
19753
|
const childPath = resolve28(dirname22(entryPath), importPath);
|
|
19747
|
-
if (expanded.has(childPath) || !
|
|
19754
|
+
if (expanded.has(childPath) || !existsSync30(childPath)) {
|
|
19748
19755
|
continue;
|
|
19749
19756
|
}
|
|
19750
19757
|
expanded.add(childPath);
|
|
@@ -19951,7 +19958,7 @@ var resolveDevClientDir3 = () => {
|
|
|
19951
19958
|
}));
|
|
19952
19959
|
vueCompileProfile.stagePagesMs = performance.now() - stageStartedAt;
|
|
19953
19960
|
stageStartedAt = performance.now();
|
|
19954
|
-
const helperDependencies = (tsPath, sourceCode) => extractImports(sourceCode).filter((dep) => dep.startsWith(".") && !isStylePath(dep) && !dep.endsWith(".vue")).map((dep) => resolveHelperTsPath(dirname22(tsPath), dep)).filter((resolved) =>
|
|
19961
|
+
const helperDependencies = (tsPath, sourceCode) => extractImports(sourceCode).filter((dep) => dep.startsWith(".") && !isStylePath(dep) && !dep.endsWith(".vue")).map((dep) => resolveHelperTsPath(dirname22(tsPath), dep)).filter((resolved) => existsSync30(resolved) && !allTsHelperPaths.has(resolved));
|
|
19955
19962
|
const readHelperWave = (paths) => Promise.all(paths.map((tsPath) => file3(tsPath).text().then((sourceCode) => helperDependencies(tsPath, sourceCode)).catch(() => [])));
|
|
19956
19963
|
const expandHelpers = async (frontier) => {
|
|
19957
19964
|
if (frontier.length === 0)
|
|
@@ -20523,7 +20530,7 @@ __export(exports_compileAngular, {
|
|
|
20523
20530
|
compileAngularFiles: () => compileAngularFiles,
|
|
20524
20531
|
invalidateAngularJitCache: () => invalidateAngularJitCache
|
|
20525
20532
|
});
|
|
20526
|
-
import { existsSync as
|
|
20533
|
+
import { existsSync as existsSync31, readFileSync as readFileSync26, promises as fs5 } from "fs";
|
|
20527
20534
|
import { join as join39, basename as basename15, sep as sep4, dirname as dirname23, resolve as resolve29, relative as relative18 } from "path";
|
|
20528
20535
|
var {Glob: Glob6 } = globalThis.Bun;
|
|
20529
20536
|
import ts18 from "typescript";
|
|
@@ -20580,7 +20587,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
|
|
|
20580
20587
|
join39(candidate, "index.js"),
|
|
20581
20588
|
join39(candidate, "index.jsx")
|
|
20582
20589
|
];
|
|
20583
|
-
return candidates.find((file4) =>
|
|
20590
|
+
return candidates.find((file4) => existsSync31(file4));
|
|
20584
20591
|
}, createLegacyAngularAnimationUsageResolver = (rootDir) => {
|
|
20585
20592
|
const baseDir = resolve29(rootDir);
|
|
20586
20593
|
const tsconfigAliases = readTsconfigPathAliases();
|
|
@@ -20661,11 +20668,11 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
|
|
|
20661
20668
|
}, resolveDevClientDir4 = () => {
|
|
20662
20669
|
const projectRoot = process.cwd();
|
|
20663
20670
|
const fromSource = resolve29(import.meta.dir, "../dev/client");
|
|
20664
|
-
if (
|
|
20671
|
+
if (existsSync31(fromSource) && fromSource.startsWith(projectRoot)) {
|
|
20665
20672
|
return fromSource;
|
|
20666
20673
|
}
|
|
20667
20674
|
const fromNodeModules = resolve29(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
|
|
20668
|
-
if (
|
|
20675
|
+
if (existsSync31(fromNodeModules))
|
|
20669
20676
|
return fromNodeModules;
|
|
20670
20677
|
return resolve29(import.meta.dir, "./dev/client");
|
|
20671
20678
|
}, devClientDir4, hmrClientPath5, formatDiagnosticMessage = (diagnostic) => {
|
|
@@ -20711,11 +20718,11 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
|
|
|
20711
20718
|
return `${path}${query}`;
|
|
20712
20719
|
const importerDir = dirname23(importerOutputPath);
|
|
20713
20720
|
const fileCandidate = resolve29(importerDir, `${path}.js`);
|
|
20714
|
-
if (outputFiles?.has(fileCandidate) ||
|
|
20721
|
+
if (outputFiles?.has(fileCandidate) || existsSync31(fileCandidate)) {
|
|
20715
20722
|
return `${path}.js${query}`;
|
|
20716
20723
|
}
|
|
20717
20724
|
const indexCandidate = resolve29(importerDir, path, "index.js");
|
|
20718
|
-
if (outputFiles?.has(indexCandidate) ||
|
|
20725
|
+
if (outputFiles?.has(indexCandidate) || existsSync31(indexCandidate)) {
|
|
20719
20726
|
return `${path}/index.js${query}`;
|
|
20720
20727
|
}
|
|
20721
20728
|
return `${path}.js${query}`;
|
|
@@ -20753,7 +20760,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
|
|
|
20753
20760
|
join39(basePath, "index.mts"),
|
|
20754
20761
|
join39(basePath, "index.cts")
|
|
20755
20762
|
];
|
|
20756
|
-
return candidates.map((candidate) => resolve29(candidate)).find((candidate) =>
|
|
20763
|
+
return candidates.map((candidate) => resolve29(candidate)).find((candidate) => existsSync31(candidate) && !candidate.endsWith(".d.ts")) ?? null;
|
|
20757
20764
|
}, readFileForAotTransform = async (fileName, readFile6) => {
|
|
20758
20765
|
const hostSource = readFile6?.(fileName);
|
|
20759
20766
|
if (typeof hostSource === "string")
|
|
@@ -20834,7 +20841,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
|
|
|
20834
20841
|
if (visited.has(resolvedPath))
|
|
20835
20842
|
return;
|
|
20836
20843
|
visited.add(resolvedPath);
|
|
20837
|
-
if (!
|
|
20844
|
+
if (!existsSync31(resolvedPath) || resolvedPath.endsWith(".d.ts"))
|
|
20838
20845
|
return;
|
|
20839
20846
|
stats.filesVisited += 1;
|
|
20840
20847
|
const source = await readFileForAotTransform(resolvedPath, readFile6);
|
|
@@ -21008,7 +21015,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
|
|
|
21008
21015
|
return null;
|
|
21009
21016
|
}, resolveAngularDeferImportSpecifier = () => {
|
|
21010
21017
|
const sourceEntry = resolve29(import.meta.dir, "../angular/components/index.ts");
|
|
21011
|
-
if (
|
|
21018
|
+
if (existsSync31(sourceEntry)) {
|
|
21012
21019
|
return sourceEntry.replace(/\\/g, "/");
|
|
21013
21020
|
}
|
|
21014
21021
|
return "@absolutejs/absolute/angular/components";
|
|
@@ -21136,7 +21143,7 @@ ${slot.resolvedBindings.map((binding) => ` "${binding.key}": this.__absoluteDef
|
|
|
21136
21143
|
${fields}
|
|
21137
21144
|
`);
|
|
21138
21145
|
}, readAndEscapeFile = async (filePath, stylePreprocessors) => {
|
|
21139
|
-
if (!
|
|
21146
|
+
if (!existsSync31(filePath)) {
|
|
21140
21147
|
throw new Error(`Unable to inline Angular style resource: file not found at ${filePath}`);
|
|
21141
21148
|
}
|
|
21142
21149
|
const content = await compileStyleFileIfNeeded(filePath, stylePreprocessors);
|
|
@@ -21145,7 +21152,7 @@ ${fields}
|
|
|
21145
21152
|
const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
|
|
21146
21153
|
if (templateUrlMatch?.[1]) {
|
|
21147
21154
|
const templatePath = join39(fileDir, templateUrlMatch[1]);
|
|
21148
|
-
if (!
|
|
21155
|
+
if (!existsSync31(templatePath)) {
|
|
21149
21156
|
throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
|
|
21150
21157
|
}
|
|
21151
21158
|
const templateRaw2 = await fs5.readFile(templatePath, "utf-8");
|
|
@@ -21176,7 +21183,7 @@ ${fields}
|
|
|
21176
21183
|
const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
|
|
21177
21184
|
if (templateUrlMatch?.[1]) {
|
|
21178
21185
|
const templatePath = join39(fileDir, templateUrlMatch[1]);
|
|
21179
|
-
if (!
|
|
21186
|
+
if (!existsSync31(templatePath)) {
|
|
21180
21187
|
throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
|
|
21181
21188
|
}
|
|
21182
21189
|
const templateRaw2 = readFileSync26(templatePath, "utf-8");
|
|
@@ -21324,7 +21331,7 @@ ${fields}
|
|
|
21324
21331
|
join39(candidate, "index.js"),
|
|
21325
21332
|
join39(candidate, "index.jsx")
|
|
21326
21333
|
];
|
|
21327
|
-
return candidates.find((file4) =>
|
|
21334
|
+
return candidates.find((file4) => existsSync31(file4));
|
|
21328
21335
|
};
|
|
21329
21336
|
const resolveLocalImport = (specifier, fromDir) => {
|
|
21330
21337
|
if (specifier.startsWith(".") || specifier.startsWith("/")) {
|
|
@@ -21399,7 +21406,7 @@ ${fields}
|
|
|
21399
21406
|
if (visited.has(resolved))
|
|
21400
21407
|
return;
|
|
21401
21408
|
visited.add(resolved);
|
|
21402
|
-
if (resolved.endsWith(".json") &&
|
|
21409
|
+
if (resolved.endsWith(".json") && existsSync31(resolved)) {
|
|
21403
21410
|
const inputDir2 = dirname23(resolved);
|
|
21404
21411
|
const relativeDir2 = inputDir2.startsWith(baseDir) ? inputDir2.substring(baseDir.length + 1) : inputDir2;
|
|
21405
21412
|
const targetDir2 = join39(outDir, relativeDir2);
|
|
@@ -21412,7 +21419,7 @@ ${fields}
|
|
|
21412
21419
|
let actualPath = resolved;
|
|
21413
21420
|
if (!actualPath.endsWith(".ts"))
|
|
21414
21421
|
actualPath += ".ts";
|
|
21415
|
-
if (!
|
|
21422
|
+
if (!existsSync31(actualPath))
|
|
21416
21423
|
return;
|
|
21417
21424
|
let sourceCode = await fs5.readFile(actualPath, "utf-8");
|
|
21418
21425
|
const inlined = await inlineResources(sourceCode, dirname23(actualPath), stylePreprocessors);
|
|
@@ -21450,7 +21457,7 @@ ${fields}
|
|
|
21450
21457
|
const isEntry = resolve29(actualPath) === resolve29(entryPath);
|
|
21451
21458
|
const contentHash = Bun.hash(sourceCode).toString(BASE_36_RADIX);
|
|
21452
21459
|
const cacheKey3 = actualPath;
|
|
21453
|
-
const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey3) !== contentHash || !
|
|
21460
|
+
const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey3) !== contentHash || !existsSync31(targetPath);
|
|
21454
21461
|
if (shouldWriteFile) {
|
|
21455
21462
|
const processedContent = transpileAndRewrite(sourceCode, relativeDir, actualPath, importRewrites);
|
|
21456
21463
|
const preservedInjection = await readPreservedInjection(targetPath);
|
|
@@ -21463,7 +21470,7 @@ ${fields}
|
|
|
21463
21470
|
};
|
|
21464
21471
|
await transpileFile(inputPath);
|
|
21465
21472
|
const entryOutputPath = toOutputPath(entryPath);
|
|
21466
|
-
if (
|
|
21473
|
+
if (existsSync31(entryOutputPath)) {
|
|
21467
21474
|
const entryOutput = await fs5.readFile(entryOutputPath, "utf-8");
|
|
21468
21475
|
const withoutLegacyFlag = entryOutput.replace(/\nexport const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;\n?/g, `
|
|
21469
21476
|
`);
|
|
@@ -21489,7 +21496,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
21489
21496
|
await traceAngularPhase("aot/copy-json-resources", async () => {
|
|
21490
21497
|
const cwd = process.cwd();
|
|
21491
21498
|
const angularSrcDir = resolve29(outRoot);
|
|
21492
|
-
if (!
|
|
21499
|
+
if (!existsSync31(angularSrcDir))
|
|
21493
21500
|
return;
|
|
21494
21501
|
const jsonGlob = new Glob6("**/*.json");
|
|
21495
21502
|
for (const rel of jsonGlob.scanSync({
|
|
@@ -21524,15 +21531,15 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
21524
21531
|
...candidatePaths.map((file4) => resolve29(file4)),
|
|
21525
21532
|
...compiledFallbackPaths
|
|
21526
21533
|
];
|
|
21527
|
-
let candidate = normalizedCandidates.find((file4) =>
|
|
21534
|
+
let candidate = normalizedCandidates.find((file4) => existsSync31(file4) && file4.endsWith(`${sep4}${relativeEntry}`));
|
|
21528
21535
|
if (!candidate) {
|
|
21529
|
-
candidate = normalizedCandidates.find((file4) =>
|
|
21536
|
+
candidate = normalizedCandidates.find((file4) => existsSync31(file4) && file4.endsWith(`${sep4}pages${sep4}${jsName}`));
|
|
21530
21537
|
}
|
|
21531
21538
|
if (!candidate) {
|
|
21532
|
-
candidate = normalizedCandidates.find((file4) =>
|
|
21539
|
+
candidate = normalizedCandidates.find((file4) => existsSync31(file4) && file4.endsWith(`${sep4}${jsName}`));
|
|
21533
21540
|
}
|
|
21534
21541
|
if (!candidate) {
|
|
21535
|
-
candidate = normalizedCandidates.find((file4) =>
|
|
21542
|
+
candidate = normalizedCandidates.find((file4) => existsSync31(file4));
|
|
21536
21543
|
}
|
|
21537
21544
|
return candidate;
|
|
21538
21545
|
};
|
|
@@ -21540,11 +21547,11 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
21540
21547
|
if (!rawServerFile) {
|
|
21541
21548
|
rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-fallback", () => resolveRawServerFile([]), { entry: resolvedEntry });
|
|
21542
21549
|
}
|
|
21543
|
-
if (rawServerFile && !
|
|
21550
|
+
if (rawServerFile && !existsSync31(rawServerFile)) {
|
|
21544
21551
|
outputs = hmr ? await compileEntry() : aotOutputs;
|
|
21545
21552
|
rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-retry", () => resolveRawServerFile(outputs), { entry: resolvedEntry });
|
|
21546
21553
|
}
|
|
21547
|
-
if (!rawServerFile || !
|
|
21554
|
+
if (!rawServerFile || !existsSync31(rawServerFile)) {
|
|
21548
21555
|
throw new Error(`Compiled output not found for ${entry}. Looking for: ${jsName}. Available: ${[
|
|
21549
21556
|
...outputs,
|
|
21550
21557
|
...compiledFallbackPaths
|
|
@@ -21580,7 +21587,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
21580
21587
|
const serverContentHash = `${Bun.hash(original).toString(BASE_36_RADIX)}.${Bun.hash(providersHashInput).toString(BASE_36_RADIX)}`;
|
|
21581
21588
|
const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
|
|
21582
21589
|
const clientFile = join39(indexesDir, jsName);
|
|
21583
|
-
if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash &&
|
|
21590
|
+
if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync31(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
|
|
21584
21591
|
return {
|
|
21585
21592
|
clientPath: clientFile,
|
|
21586
21593
|
indexUnchanged: true,
|
|
@@ -21883,7 +21890,7 @@ var init_compileAngular = __esm(() => {
|
|
|
21883
21890
|
|
|
21884
21891
|
// node_modules/content-tag/pkg/node/content_tag.cjs
|
|
21885
21892
|
var require_content_tag = __commonJS(function(exports, module) {
|
|
21886
|
-
var __dirname = "/home
|
|
21893
|
+
var __dirname = "/tmp/claude-1000/-home-alexkahn-onspark-absolutejs-dealroom/2bfd88db-2cb9-4088-8977-3c07598f96a5/scratchpad/absolute-release/node_modules/content-tag/pkg/node";
|
|
21887
21894
|
var imports = {};
|
|
21888
21895
|
imports["__wbindgen_placeholder__"] = exports;
|
|
21889
21896
|
var wasm;
|
|
@@ -22328,7 +22335,7 @@ __export(exports_compileEmber, {
|
|
|
22328
22335
|
getEmberCompiledRoot: () => getEmberCompiledRoot,
|
|
22329
22336
|
getEmberServerCompiledDir: () => getEmberServerCompiledDir
|
|
22330
22337
|
});
|
|
22331
|
-
import { existsSync as
|
|
22338
|
+
import { existsSync as existsSync32 } from "fs";
|
|
22332
22339
|
import { mkdir as mkdir10, rm as rm5 } from "fs/promises";
|
|
22333
22340
|
import { basename as basename16, dirname as dirname24, extname as extname12, join as join40, resolve as resolve30 } from "path";
|
|
22334
22341
|
var {build: bunBuild2, Transpiler: Transpiler5, write: write5, file: file4 } = globalThis.Bun;
|
|
@@ -22430,7 +22437,7 @@ export const importSync = (specifier) => {
|
|
|
22430
22437
|
const extensionsToTry = ["", ".gts", ".gjs", ".ts", ".js"];
|
|
22431
22438
|
for (const ext of extensionsToTry) {
|
|
22432
22439
|
const candidate = candidateBase + ext;
|
|
22433
|
-
if (
|
|
22440
|
+
if (existsSync32(candidate))
|
|
22434
22441
|
return { path: candidate };
|
|
22435
22442
|
}
|
|
22436
22443
|
return;
|
|
@@ -22450,7 +22457,7 @@ export const importSync = (specifier) => {
|
|
|
22450
22457
|
if (standalonePackages.has(args.path))
|
|
22451
22458
|
return;
|
|
22452
22459
|
const internal = join40(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
|
|
22453
|
-
if (
|
|
22460
|
+
if (existsSync32(internal))
|
|
22454
22461
|
return { path: internal };
|
|
22455
22462
|
return;
|
|
22456
22463
|
});
|
|
@@ -22580,7 +22587,7 @@ __export(exports_buildReactVendor, {
|
|
|
22580
22587
|
buildReactVendor: () => buildReactVendor,
|
|
22581
22588
|
computeVendorPaths: () => computeVendorPaths
|
|
22582
22589
|
});
|
|
22583
|
-
import { existsSync as
|
|
22590
|
+
import { existsSync as existsSync33, mkdirSync as mkdirSync8 } from "fs";
|
|
22584
22591
|
import { join as join41, resolve as resolve31 } from "path";
|
|
22585
22592
|
import { rm as rm6 } from "fs/promises";
|
|
22586
22593
|
var {build: bunBuild3 } = globalThis.Bun;
|
|
@@ -22594,7 +22601,7 @@ var resolveJsxDevRuntimeCompatPath = () => {
|
|
|
22594
22601
|
resolve31(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
|
|
22595
22602
|
];
|
|
22596
22603
|
for (const candidate of candidates) {
|
|
22597
|
-
if (
|
|
22604
|
+
if (existsSync33(candidate)) {
|
|
22598
22605
|
return candidate.replace(/\\/g, "/");
|
|
22599
22606
|
}
|
|
22600
22607
|
}
|
|
@@ -23061,13 +23068,13 @@ var init_buildSvelteVendor = __esm(() => {
|
|
|
23061
23068
|
import {
|
|
23062
23069
|
copyFileSync as copyFileSync3,
|
|
23063
23070
|
cpSync,
|
|
23064
|
-
existsSync as
|
|
23071
|
+
existsSync as existsSync34,
|
|
23065
23072
|
mkdirSync as mkdirSync12,
|
|
23066
23073
|
readdirSync as readdirSync7,
|
|
23067
23074
|
readFileSync as readFileSync27,
|
|
23068
23075
|
renameSync,
|
|
23069
23076
|
rmSync as rmSync2,
|
|
23070
|
-
statSync as
|
|
23077
|
+
statSync as statSync5,
|
|
23071
23078
|
writeFileSync as writeFileSync9
|
|
23072
23079
|
} from "fs";
|
|
23073
23080
|
import { basename as basename17, dirname as dirname25, extname as extname13, join as join45, relative as relative19, resolve as resolve32 } from "path";
|
|
@@ -23238,7 +23245,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
23238
23245
|
}, SKIP_DIRS5, addWorkerPathIfExists = (file5, relPath, workerPaths) => {
|
|
23239
23246
|
const absPath = resolve32(file5, "..", relPath);
|
|
23240
23247
|
try {
|
|
23241
|
-
|
|
23248
|
+
statSync5(absPath);
|
|
23242
23249
|
workerPaths.add(absPath);
|
|
23243
23250
|
} catch {}
|
|
23244
23251
|
}, extractWorkerSpecifiers = (file5, patterns) => {
|
|
@@ -23327,7 +23334,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
23327
23334
|
copyVueDevIndexes(vueDir, vuePagesPath, vueEntries, devIndexDir);
|
|
23328
23335
|
}
|
|
23329
23336
|
}, copyReactDevIndexes = (reactIndexesPath, reactPagesPath, devIndexDir, readDir) => {
|
|
23330
|
-
if (!
|
|
23337
|
+
if (!existsSync34(reactIndexesPath)) {
|
|
23331
23338
|
return;
|
|
23332
23339
|
}
|
|
23333
23340
|
const indexFiles = readDir(reactIndexesPath).filter((file5) => file5.endsWith(".tsx"));
|
|
@@ -23343,7 +23350,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
23343
23350
|
for (const entry of sveltePageEntries) {
|
|
23344
23351
|
const name = basename17(entry).replace(/\.svelte(\.(ts|js))?$/, "");
|
|
23345
23352
|
const indexFile = join45(svelteIndexDir, "pages", `${name}.js`);
|
|
23346
|
-
if (!
|
|
23353
|
+
if (!existsSync34(indexFile))
|
|
23347
23354
|
continue;
|
|
23348
23355
|
let content = readFileSync27(indexFile, "utf-8");
|
|
23349
23356
|
const srcRel = relative19(process.cwd(), resolve32(entry)).replace(/\\/g, "/");
|
|
@@ -23356,7 +23363,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
23356
23363
|
for (const entry of vuePageEntries) {
|
|
23357
23364
|
const name = basename17(entry, ".vue");
|
|
23358
23365
|
const indexFile = join45(vueIndexDir, `${name}.js`);
|
|
23359
|
-
if (!
|
|
23366
|
+
if (!existsSync34(indexFile))
|
|
23360
23367
|
continue;
|
|
23361
23368
|
let content = readFileSync27(indexFile, "utf-8");
|
|
23362
23369
|
const srcRel = relative19(process.cwd(), resolve32(entry)).replace(/\\/g, "/");
|
|
@@ -23368,7 +23375,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
23368
23375
|
for (const srcPath of urlReferencedFiles) {
|
|
23369
23376
|
const rel = relative19(projectRoot, srcPath).replace(/\\/g, "/");
|
|
23370
23377
|
const name = basename17(srcPath);
|
|
23371
|
-
const mtime = Math.round(
|
|
23378
|
+
const mtime = Math.round(statSync5(srcPath).mtimeMs);
|
|
23372
23379
|
const url = `/@src/${rel}?v=${mtime}`;
|
|
23373
23380
|
urlFileMap.set(name, url);
|
|
23374
23381
|
urlFileMap.set(name.replace(/\.tsx?$/, ".js"), url);
|
|
@@ -24520,7 +24527,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
24520
24527
|
await tracePhase("postprocess/client-rewrite", rewriteClientGroups, clientRewriteStats);
|
|
24521
24528
|
if (!hmr) {
|
|
24522
24529
|
const reactVendorDir = join45(buildPath, "react", "vendor");
|
|
24523
|
-
const vendorChunkPaths =
|
|
24530
|
+
const vendorChunkPaths = existsSync34(reactVendorDir) ? [
|
|
24524
24531
|
...new Glob8("**/*.js").scanSync({
|
|
24525
24532
|
absolute: true,
|
|
24526
24533
|
cwd: reactVendorDir
|
|
@@ -24928,7 +24935,7 @@ var init_build = __esm(() => {
|
|
|
24928
24935
|
});
|
|
24929
24936
|
|
|
24930
24937
|
// src/build/buildEmberVendor.ts
|
|
24931
|
-
import { mkdirSync as mkdirSync13, existsSync as
|
|
24938
|
+
import { mkdirSync as mkdirSync13, existsSync as existsSync35 } from "fs";
|
|
24932
24939
|
import { join as join46 } from "path";
|
|
24933
24940
|
import { rm as rm10 } from "fs/promises";
|
|
24934
24941
|
var {build: bunBuild8 } = globalThis.Bun;
|
|
@@ -24982,7 +24989,7 @@ export const importSync = (specifier) => {
|
|
|
24982
24989
|
return { resolveTo: specifier, specifier };
|
|
24983
24990
|
}
|
|
24984
24991
|
const emberInternalPath = join46(cwd2, "node_modules/ember-source/dist/packages", specifier, "index.js");
|
|
24985
|
-
if (!
|
|
24992
|
+
if (!existsSync35(emberInternalPath)) {
|
|
24986
24993
|
throw new Error(`Ember vendor build: cannot find ${specifier} at ${emberInternalPath}. ` + `Is ember-source installed and at least 6.12?`);
|
|
24987
24994
|
}
|
|
24988
24995
|
return { resolveTo: emberInternalPath, specifier };
|
|
@@ -25014,7 +25021,7 @@ export const importSync = (specifier) => {
|
|
|
25014
25021
|
return;
|
|
25015
25022
|
}
|
|
25016
25023
|
const internal = join46(cwd2, "node_modules/ember-source/dist/packages", args.path, "index.js");
|
|
25017
|
-
if (
|
|
25024
|
+
if (existsSync35(internal)) {
|
|
25018
25025
|
return { path: internal };
|
|
25019
25026
|
}
|
|
25020
25027
|
return;
|
|
@@ -25186,7 +25193,7 @@ __export(exports_dependencyGraph, {
|
|
|
25186
25193
|
getAffectedFiles: () => getAffectedFiles,
|
|
25187
25194
|
removeFileFromGraph: () => removeFileFromGraph
|
|
25188
25195
|
});
|
|
25189
|
-
import { existsSync as
|
|
25196
|
+
import { existsSync as existsSync36, readFileSync as readFileSync28 } from "fs";
|
|
25190
25197
|
var {Glob: Glob9 } = globalThis.Bun;
|
|
25191
25198
|
import { resolve as resolve33 } from "path";
|
|
25192
25199
|
var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
|
|
@@ -25216,10 +25223,10 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
|
|
|
25216
25223
|
];
|
|
25217
25224
|
for (const ext of extensions) {
|
|
25218
25225
|
const withExt = normalized + ext;
|
|
25219
|
-
if (
|
|
25226
|
+
if (existsSync36(withExt))
|
|
25220
25227
|
return withExt;
|
|
25221
25228
|
}
|
|
25222
|
-
if (
|
|
25229
|
+
if (existsSync36(normalized))
|
|
25223
25230
|
return normalized;
|
|
25224
25231
|
return null;
|
|
25225
25232
|
}, clearExistingDependents = (graph, normalizedPath) => {
|
|
@@ -25234,7 +25241,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
|
|
|
25234
25241
|
}
|
|
25235
25242
|
}, addFileToGraph = (graph, filePath) => {
|
|
25236
25243
|
const normalizedPath = resolve33(filePath);
|
|
25237
|
-
if (!
|
|
25244
|
+
if (!existsSync36(normalizedPath))
|
|
25238
25245
|
return;
|
|
25239
25246
|
const dependencies = extractDependencies(normalizedPath);
|
|
25240
25247
|
clearExistingDependents(graph, normalizedPath);
|
|
@@ -25260,7 +25267,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
|
|
|
25260
25267
|
}, IGNORED_SEGMENTS, buildInitialDependencyGraph = (graph, directories) => {
|
|
25261
25268
|
const processedFiles = new Set;
|
|
25262
25269
|
const glob = new Glob9("**/*.{ts,tsx,js,jsx,vue,svelte,html,htm}");
|
|
25263
|
-
const resolvedDirs = directories.map((dir) => resolve33(dir)).filter((dir) =>
|
|
25270
|
+
const resolvedDirs = directories.map((dir) => resolve33(dir)).filter((dir) => existsSync36(dir));
|
|
25264
25271
|
const allFiles = resolvedDirs.flatMap((dir) => Array.from(glob.scanSync({ absolute: true, cwd: dir })));
|
|
25265
25272
|
for (const file5 of allFiles) {
|
|
25266
25273
|
const fullPath = resolve33(file5);
|
|
@@ -25514,7 +25521,7 @@ var init_clientManager = __esm(() => {
|
|
|
25514
25521
|
});
|
|
25515
25522
|
|
|
25516
25523
|
// src/dev/pathUtils.ts
|
|
25517
|
-
import { existsSync as
|
|
25524
|
+
import { existsSync as existsSync37, readdirSync as readdirSync8, readFileSync as readFileSync29 } from "fs";
|
|
25518
25525
|
import { dirname as dirname26, resolve as resolve35 } from "path";
|
|
25519
25526
|
var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
|
|
25520
25527
|
if (shouldIgnorePath(filePath, resolved)) {
|
|
@@ -25688,7 +25695,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
|
|
|
25688
25695
|
push(cfg.stylesDir);
|
|
25689
25696
|
for (const candidate of ["src", "db", "assets", "styles"]) {
|
|
25690
25697
|
const abs = normalizePath(resolve35(cwd2, candidate));
|
|
25691
|
-
if (
|
|
25698
|
+
if (existsSync37(abs) && !roots.includes(abs))
|
|
25692
25699
|
roots.push(abs);
|
|
25693
25700
|
}
|
|
25694
25701
|
try {
|
|
@@ -25780,7 +25787,7 @@ var init_pathUtils = __esm(() => {
|
|
|
25780
25787
|
});
|
|
25781
25788
|
|
|
25782
25789
|
// src/dev/devPrescan.ts
|
|
25783
|
-
import { existsSync as
|
|
25790
|
+
import { existsSync as existsSync38, readdirSync as readdirSync9, rmSync as rmSync3 } from "fs";
|
|
25784
25791
|
import { mkdir as mkdir11, readFile as readFile6, rename as rename3, writeFile as writeFile8 } from "fs/promises";
|
|
25785
25792
|
import { join as join47 } from "path";
|
|
25786
25793
|
var PRESCAN_DIR, PAYLOAD_VERSION = 1, POLL_INTERVAL_MS = 10, DEFAULT_WAIT_MS = 2000, collectConfigVendorSourceDirs = (config) => Array.from(new Set([
|
|
@@ -25793,7 +25800,7 @@ var PRESCAN_DIR, PAYLOAD_VERSION = 1, POLL_INTERVAL_MS = 10, DEFAULT_WAIT_MS = 2
|
|
|
25793
25800
|
].filter((dir) => Boolean(dir)))), devPrescanEnabled = () => process.env.ABSOLUTE_DEV_PRESCAN === "1", sleep = (delayMs) => new Promise((resolve36) => {
|
|
25794
25801
|
setTimeout(resolve36, delayMs);
|
|
25795
25802
|
}), isPayload = (value) => typeof value === "object" && value !== null && ("version" in value) && value.version === PAYLOAD_VERSION, tryReadPrescan = async (path) => {
|
|
25796
|
-
if (!
|
|
25803
|
+
if (!existsSync38(path))
|
|
25797
25804
|
return;
|
|
25798
25805
|
try {
|
|
25799
25806
|
const parsed = JSON.parse(await readFile6(path, "utf8"));
|
|
@@ -25849,7 +25856,7 @@ var init_serverEntryCopies = () => {};
|
|
|
25849
25856
|
|
|
25850
25857
|
// src/dev/fileWatcher.ts
|
|
25851
25858
|
import { watch } from "fs";
|
|
25852
|
-
import { existsSync as
|
|
25859
|
+
import { existsSync as existsSync39, readdirSync as readdirSync10, statSync as statSync6 } from "fs";
|
|
25853
25860
|
import { dirname as dirname27, join as join48, resolve as resolve36 } from "path";
|
|
25854
25861
|
var safeRemoveFromGraph = (graph, fullPath) => {
|
|
25855
25862
|
try {
|
|
@@ -25885,7 +25892,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
|
|
|
25885
25892
|
const child = join48(eventDir, name).replace(/\\/g, "/");
|
|
25886
25893
|
let st2;
|
|
25887
25894
|
try {
|
|
25888
|
-
st2 =
|
|
25895
|
+
st2 = statSync6(child);
|
|
25889
25896
|
} catch {
|
|
25890
25897
|
continue;
|
|
25891
25898
|
}
|
|
@@ -25916,12 +25923,12 @@ var safeRemoveFromGraph = (graph, fullPath) => {
|
|
|
25916
25923
|
if (shouldIgnorePath(fullPath, state.resolvedPaths)) {
|
|
25917
25924
|
return;
|
|
25918
25925
|
}
|
|
25919
|
-
if (event === "rename" && !
|
|
25926
|
+
if (event === "rename" && !existsSync39(fullPath)) {
|
|
25920
25927
|
safeRemoveFromGraph(state.dependencyGraph, fullPath);
|
|
25921
25928
|
onFileChange(fullPath);
|
|
25922
25929
|
return;
|
|
25923
25930
|
}
|
|
25924
|
-
if (
|
|
25931
|
+
if (existsSync39(fullPath)) {
|
|
25925
25932
|
onFileChange(fullPath);
|
|
25926
25933
|
safeAddToGraph(state.dependencyGraph, fullPath);
|
|
25927
25934
|
}
|
|
@@ -25931,7 +25938,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
|
|
|
25931
25938
|
const stylesDir = state.resolvedPaths?.stylesDir;
|
|
25932
25939
|
paths.forEach((path) => {
|
|
25933
25940
|
const absolutePath = resolve36(path).replace(/\\/g, "/");
|
|
25934
|
-
if (!
|
|
25941
|
+
if (!existsSync39(absolutePath)) {
|
|
25935
25942
|
return;
|
|
25936
25943
|
}
|
|
25937
25944
|
const isStylesDir = Boolean(stylesDir && absolutePath.startsWith(stylesDir));
|
|
@@ -25942,7 +25949,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
|
|
|
25942
25949
|
const stylesDir = state.resolvedPaths?.stylesDir;
|
|
25943
25950
|
watchPaths.forEach((path) => {
|
|
25944
25951
|
const absolutePath = resolve36(path).replace(/\\/g, "/");
|
|
25945
|
-
if (!
|
|
25952
|
+
if (!existsSync39(absolutePath)) {
|
|
25946
25953
|
return;
|
|
25947
25954
|
}
|
|
25948
25955
|
const isStylesDir = Boolean(stylesDir && absolutePath.startsWith(stylesDir));
|
|
@@ -26482,7 +26489,7 @@ __export(exports_resolveOwningComponents, {
|
|
|
26482
26489
|
resolveDescendantsOfParent: () => resolveDescendantsOfParent,
|
|
26483
26490
|
resolveOwningComponents: () => resolveOwningComponents
|
|
26484
26491
|
});
|
|
26485
|
-
import { readdirSync as readdirSync11, readFileSync as readFileSync32, statSync as
|
|
26492
|
+
import { readdirSync as readdirSync11, readFileSync as readFileSync32, statSync as statSync7 } from "fs";
|
|
26486
26493
|
import { dirname as dirname30, extname as extname14, join as join49, resolve as resolve42 } from "path";
|
|
26487
26494
|
import ts19 from "typescript";
|
|
26488
26495
|
var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") || file5.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
|
|
@@ -26617,7 +26624,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
|
|
|
26617
26624
|
}
|
|
26618
26625
|
let rootStat;
|
|
26619
26626
|
try {
|
|
26620
|
-
rootStat =
|
|
26627
|
+
rootStat = statSync7(userAngularRoot);
|
|
26621
26628
|
} catch {
|
|
26622
26629
|
return out;
|
|
26623
26630
|
}
|
|
@@ -26675,7 +26682,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
|
|
|
26675
26682
|
const angularRootNorm = safeNormalize(angularRoot);
|
|
26676
26683
|
for (const candidate of candidates) {
|
|
26677
26684
|
try {
|
|
26678
|
-
if (
|
|
26685
|
+
if (statSync7(candidate).isFile()) {
|
|
26679
26686
|
const norm = safeNormalize(candidate);
|
|
26680
26687
|
if (!norm.startsWith(angularRootNorm))
|
|
26681
26688
|
return null;
|
|
@@ -26732,7 +26739,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
|
|
|
26732
26739
|
const norm = safeNormalize(params.changedFilePath);
|
|
26733
26740
|
let rootStat;
|
|
26734
26741
|
try {
|
|
26735
|
-
rootStat =
|
|
26742
|
+
rootStat = statSync7(params.userAngularRoot);
|
|
26736
26743
|
} catch {
|
|
26737
26744
|
return [];
|
|
26738
26745
|
}
|
|
@@ -27084,11 +27091,11 @@ var init_loadConfig = __esm(() => {
|
|
|
27084
27091
|
});
|
|
27085
27092
|
|
|
27086
27093
|
// src/plugins/openApiPlugin.ts
|
|
27087
|
-
import { existsSync as
|
|
27094
|
+
import { existsSync as existsSync40, readFileSync as readFileSync33 } from "fs";
|
|
27088
27095
|
import { join as join50 } from "path";
|
|
27089
27096
|
var FALLBACK_NAME = "AbsoluteJS API", FALLBACK_VERSION = "1.0.0", projectInfo = (cwd2) => {
|
|
27090
27097
|
const path = join50(cwd2, "package.json");
|
|
27091
|
-
if (!
|
|
27098
|
+
if (!existsSync40(path)) {
|
|
27092
27099
|
return { name: FALLBACK_NAME, version: FALLBACK_VERSION };
|
|
27093
27100
|
}
|
|
27094
27101
|
try {
|
|
@@ -27141,11 +27148,11 @@ var FALLBACK_NAME = "AbsoluteJS API", FALLBACK_VERSION = "1.0.0", projectInfo =
|
|
|
27141
27148
|
var init_openApiPlugin = () => {};
|
|
27142
27149
|
|
|
27143
27150
|
// src/plugins/telemetryPlugin.ts
|
|
27144
|
-
import { existsSync as
|
|
27151
|
+
import { existsSync as existsSync41, readFileSync as readFileSync34 } from "fs";
|
|
27145
27152
|
import { join as join51 } from "path";
|
|
27146
27153
|
var OTEL_PACKAGE = "@elysia/opentelemetry", readPackageName = (cwd2) => {
|
|
27147
27154
|
const path = join51(cwd2, "package.json");
|
|
27148
|
-
if (!
|
|
27155
|
+
if (!existsSync41(path))
|
|
27149
27156
|
return null;
|
|
27150
27157
|
try {
|
|
27151
27158
|
const pkg = JSON.parse(readFileSync34(path, "utf-8"));
|
|
@@ -30780,14 +30787,14 @@ __export(exports_devtoolsJson, {
|
|
|
30780
30787
|
normalizeDevtoolsWorkspaceRoot: () => normalizeDevtoolsWorkspaceRoot,
|
|
30781
30788
|
resolveDevtoolsUuidCachePath: () => resolveDevtoolsUuidCachePath
|
|
30782
30789
|
});
|
|
30783
|
-
import { existsSync as
|
|
30790
|
+
import { existsSync as existsSync42, mkdirSync as mkdirSync14, readFileSync as readFileSync37, writeFileSync as writeFileSync10 } from "fs";
|
|
30784
30791
|
import { dirname as dirname33, join as join55, resolve as resolve49 } from "path";
|
|
30785
30792
|
import { Elysia as Elysia7 } from "elysia";
|
|
30786
30793
|
var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
|
|
30787
30794
|
Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
|
|
30788
30795
|
return uuid;
|
|
30789
30796
|
}, isUuidV4 = (value) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value), resolveDevtoolsUuidCachePath = (buildDir, uuidCachePath) => resolve49(uuidCachePath ?? join55(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
|
|
30790
|
-
if (!
|
|
30797
|
+
if (!existsSync42(cachePath))
|
|
30791
30798
|
return null;
|
|
30792
30799
|
try {
|
|
30793
30800
|
const value = readFileSync37(cachePath, "utf-8").trim();
|
|
@@ -30840,13 +30847,13 @@ var exports_imageOptimizer = {};
|
|
|
30840
30847
|
__export(exports_imageOptimizer, {
|
|
30841
30848
|
imageOptimizer: () => imageOptimizer
|
|
30842
30849
|
});
|
|
30843
|
-
import { existsSync as
|
|
30850
|
+
import { existsSync as existsSync43 } from "fs";
|
|
30844
30851
|
import { resolve as resolve50 } from "path";
|
|
30845
30852
|
import { Elysia as Elysia8 } from "elysia";
|
|
30846
30853
|
var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avifInProgress, safeResolve = (path2, baseDir) => {
|
|
30847
30854
|
try {
|
|
30848
30855
|
const resolved = validateSafePath(path2, baseDir);
|
|
30849
|
-
if (
|
|
30856
|
+
if (existsSync43(resolved))
|
|
30850
30857
|
return resolved;
|
|
30851
30858
|
return null;
|
|
30852
30859
|
} catch {
|
|
@@ -32503,6 +32510,7 @@ ${serverOutput}` : "Server failed to start for pre-rendering";
|
|
|
32503
32510
|
...env3,
|
|
32504
32511
|
ABSOLUTE_HOST: "localhost",
|
|
32505
32512
|
ABSOLUTE_PORT: String(port),
|
|
32513
|
+
ABSOLUTE_PRERENDER: "1",
|
|
32506
32514
|
HOST: "localhost",
|
|
32507
32515
|
PORT: String(port)
|
|
32508
32516
|
},
|
|
@@ -32534,7 +32542,7 @@ __export(exports_prepare, {
|
|
|
32534
32542
|
startDevPrebuild: () => startDevPrebuild
|
|
32535
32543
|
});
|
|
32536
32544
|
import { createHash as createHash10 } from "crypto";
|
|
32537
|
-
import { existsSync as
|
|
32545
|
+
import { existsSync as existsSync44, readdirSync as readdirSync12, readFileSync as readFileSync39 } from "fs";
|
|
32538
32546
|
import { basename as basename19, join as join59, relative as relative22, resolve as resolvePath3 } from "path";
|
|
32539
32547
|
import { Elysia as Elysia11, NotFound } from "elysia";
|
|
32540
32548
|
var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_PLUGIN_RETRY_DELAY_MS = 50, waitForStaticPluginRetry = () => new Promise((resolve51) => {
|
|
@@ -32663,7 +32671,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
|
|
|
32663
32671
|
if (!fileName)
|
|
32664
32672
|
continue;
|
|
32665
32673
|
const srcPath = resolvePath3(devIndexDir, fileName);
|
|
32666
|
-
if (!
|
|
32674
|
+
if (!existsSync44(srcPath))
|
|
32667
32675
|
continue;
|
|
32668
32676
|
const rel = relative22(process.cwd(), srcPath).replace(/\\/g, "/");
|
|
32669
32677
|
manifest[key] = `${SRC_URL_PREFIX2}${rel}`;
|
|
@@ -32679,7 +32687,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
|
|
|
32679
32687
|
const path2 = href.split("?")[0] ?? href;
|
|
32680
32688
|
const filePath = join59(buildDir, path2);
|
|
32681
32689
|
let versioned = href;
|
|
32682
|
-
if (
|
|
32690
|
+
if (existsSync44(filePath)) {
|
|
32683
32691
|
const hash = createHash10("sha256").update(readFileSync39(filePath)).digest("hex").slice(0, ICON_HASH_LENGTH);
|
|
32684
32692
|
versioned = href.includes("?") ? `${href}&v=${hash}` : `${href}?v=${hash}`;
|
|
32685
32693
|
}
|
|
@@ -32811,7 +32819,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
|
|
|
32811
32819
|
};
|
|
32812
32820
|
}, loadPrerenderMap = (prerenderDir) => {
|
|
32813
32821
|
const map = new Map;
|
|
32814
|
-
if (!
|
|
32822
|
+
if (!existsSync44(prerenderDir))
|
|
32815
32823
|
return map;
|
|
32816
32824
|
let entries;
|
|
32817
32825
|
try {
|
|
@@ -32829,7 +32837,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
|
|
|
32829
32837
|
return map;
|
|
32830
32838
|
}, loadMobileCompatibilityPlugin = async (buildDir) => {
|
|
32831
32839
|
const root = join59(buildDir, ".absolutejs", "mobile-compatibility");
|
|
32832
|
-
if (!
|
|
32840
|
+
if (!existsSync44(join59(root, "current.json"))) {
|
|
32833
32841
|
return new Elysia11({ name: "absolutejs-mobile-compatibility-empty" });
|
|
32834
32842
|
}
|
|
32835
32843
|
const [
|
|
@@ -32895,12 +32903,12 @@ This usually means a build-time error in a source file. Check the dev-server ter
|
|
|
32895
32903
|
recordStep("load production manifest and island metadata", stepStartedAt);
|
|
32896
32904
|
stepStartedAt = performance.now();
|
|
32897
32905
|
const conventionsPath = join59(buildDir, "conventions.json");
|
|
32898
|
-
if (
|
|
32906
|
+
if (existsSync44(conventionsPath)) {
|
|
32899
32907
|
const conventions = JSON.parse(readFileSync39(conventionsPath, "utf-8"));
|
|
32900
32908
|
setConventions(conventions);
|
|
32901
32909
|
}
|
|
32902
32910
|
const spaRoutesPath = join59(buildDir, "spa-routes.json");
|
|
32903
|
-
if (
|
|
32911
|
+
if (existsSync44(spaRoutesPath)) {
|
|
32904
32912
|
setSpaRouteManifest(JSON.parse(readFileSync39(spaRoutesPath, "utf-8")));
|
|
32905
32913
|
}
|
|
32906
32914
|
recordStep("load production conventions", stepStartedAt);
|
|
@@ -33074,7 +33082,7 @@ __export(exports_moduleServer, {
|
|
|
33074
33082
|
warmPage: () => warmPage,
|
|
33075
33083
|
warnIfReactFastRefreshUnsupported: () => warnIfReactFastRefreshUnsupported
|
|
33076
33084
|
});
|
|
33077
|
-
import { existsSync as
|
|
33085
|
+
import { existsSync as existsSync45, readFileSync as readFileSync40, realpathSync as realpathSync3, statSync as statSync8 } from "fs";
|
|
33078
33086
|
import { basename as basename20, dirname as dirname35, extname as extname15, join as join60, resolve as resolve51, relative as relative23 } from "path";
|
|
33079
33087
|
var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfig, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
|
|
33080
33088
|
const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
|
|
@@ -33095,10 +33103,10 @@ var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfi
|
|
|
33095
33103
|
${stubs}
|
|
33096
33104
|
`;
|
|
33097
33105
|
}, resolveRelativeExtension = (srcPath, projectRoot, extensions) => {
|
|
33098
|
-
const directHit = extensions.find((ext) =>
|
|
33106
|
+
const directHit = extensions.find((ext) => existsSync45(resolve51(projectRoot, srcPath + ext)));
|
|
33099
33107
|
if (directHit)
|
|
33100
33108
|
return srcPath + directHit;
|
|
33101
|
-
const indexHit = extensions.find((ext) =>
|
|
33109
|
+
const indexHit = extensions.find((ext) => existsSync45(resolve51(projectRoot, srcPath, `index${ext}`)));
|
|
33102
33110
|
if (indexHit)
|
|
33103
33111
|
return `${srcPath}/index${indexHit}`;
|
|
33104
33112
|
return srcPath;
|
|
@@ -33132,7 +33140,7 @@ ${stubs}
|
|
|
33132
33140
|
if (cached !== undefined)
|
|
33133
33141
|
return `${base}?v=${buildVersion(cached, absPath)}`;
|
|
33134
33142
|
try {
|
|
33135
|
-
const mtime = Math.round(
|
|
33143
|
+
const mtime = Math.round(statSync8(absPath).mtimeMs);
|
|
33136
33144
|
mtimeCache.set(absPath, mtime);
|
|
33137
33145
|
return `${base}?v=${buildVersion(mtime, absPath)}`;
|
|
33138
33146
|
} catch {
|
|
@@ -33165,12 +33173,12 @@ ${stubs}
|
|
|
33165
33173
|
if (!subpath) {
|
|
33166
33174
|
const pkgDir = resolve51(projectRoot, "node_modules", packageName ?? "");
|
|
33167
33175
|
const pkgJsonPath = join60(pkgDir, "package.json");
|
|
33168
|
-
if (
|
|
33176
|
+
if (existsSync45(pkgJsonPath)) {
|
|
33169
33177
|
const pkg = JSON.parse(readFileSync40(pkgJsonPath, "utf-8"));
|
|
33170
33178
|
const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
|
|
33171
33179
|
if (esmEntry) {
|
|
33172
33180
|
const resolved = resolve51(pkgDir, esmEntry);
|
|
33173
|
-
if (
|
|
33181
|
+
if (existsSync45(resolved))
|
|
33174
33182
|
return relative23(projectRoot, resolved);
|
|
33175
33183
|
}
|
|
33176
33184
|
}
|
|
@@ -33534,9 +33542,9 @@ ${code2}`;
|
|
|
33534
33542
|
const hasScript = descriptor.script || descriptor.scriptSetup;
|
|
33535
33543
|
const compiledScript = hasScript ? vueCompiler.compileScript(descriptor, {
|
|
33536
33544
|
fs: {
|
|
33537
|
-
fileExists:
|
|
33545
|
+
fileExists: isFile,
|
|
33538
33546
|
realpath: realpathSync3,
|
|
33539
|
-
readFile: (file5) =>
|
|
33547
|
+
readFile: (file5) => isFile(file5) ? readFileSync40(file5, "utf-8") : undefined
|
|
33540
33548
|
},
|
|
33541
33549
|
id: componentId,
|
|
33542
33550
|
inlineTemplate: false
|
|
@@ -33566,11 +33574,11 @@ ${code2}`;
|
|
|
33566
33574
|
`);
|
|
33567
33575
|
return result;
|
|
33568
33576
|
}, resolveSvelteModulePath = (path2) => {
|
|
33569
|
-
if (
|
|
33577
|
+
if (existsSync45(path2))
|
|
33570
33578
|
return path2;
|
|
33571
|
-
if (
|
|
33579
|
+
if (existsSync45(`${path2}.ts`))
|
|
33572
33580
|
return `${path2}.ts`;
|
|
33573
|
-
if (
|
|
33581
|
+
if (existsSync45(`${path2}.js`))
|
|
33574
33582
|
return `${path2}.js`;
|
|
33575
33583
|
return path2;
|
|
33576
33584
|
}, jsResponse = (body) => {
|
|
@@ -33718,7 +33726,7 @@ export default {};
|
|
|
33718
33726
|
return { ext, filePath: resolveSvelteModulePath(filePath) };
|
|
33719
33727
|
if (ext)
|
|
33720
33728
|
return { ext, filePath };
|
|
33721
|
-
const found = MODULE_EXTENSIONS.find((candidate) =>
|
|
33729
|
+
const found = MODULE_EXTENSIONS.find((candidate) => existsSync45(filePath + candidate));
|
|
33722
33730
|
if (!found)
|
|
33723
33731
|
return { ext, filePath };
|
|
33724
33732
|
const resolved = filePath + found;
|
|
@@ -33786,7 +33794,7 @@ export default {};
|
|
|
33786
33794
|
return transformAndCacheVue(filePath, projectRoot, rewriter, vueDir, stylePreprocessors);
|
|
33787
33795
|
if (!TRANSPILABLE.has(ext))
|
|
33788
33796
|
return;
|
|
33789
|
-
const stat4 =
|
|
33797
|
+
const stat4 = statSync8(filePath);
|
|
33790
33798
|
const resolvedVueDir = vueDir ? resolve51(vueDir) : undefined;
|
|
33791
33799
|
let content = REACT_EXTENSIONS.has(ext) ? transformReactFile(filePath, projectRoot, rewriter) : transformPlainFile(filePath, projectRoot, rewriter, resolvedVueDir);
|
|
33792
33800
|
const isAngularGeneratedJs = ext === ".js" && filePath.replace(/\\/g, "/").includes("/.absolutejs/generated/angular/");
|
|
@@ -33814,12 +33822,12 @@ export default {};
|
|
|
33814
33822
|
cachedAngularUserRoot = configuredAngularUserRoot ?? null;
|
|
33815
33823
|
return cachedAngularUserRoot;
|
|
33816
33824
|
}, configuredAngularUserRoot, transformAndCacheSvelte = async (filePath, projectRoot, rewriter, stylePreprocessors) => {
|
|
33817
|
-
const stat4 =
|
|
33825
|
+
const stat4 = statSync8(filePath);
|
|
33818
33826
|
const content = await transformSvelteFile(filePath, projectRoot, rewriter, stylePreprocessors);
|
|
33819
33827
|
setTransformed(filePath, content, stat4.mtimeMs, extractImportedFiles(content, projectRoot));
|
|
33820
33828
|
return jsResponse(content);
|
|
33821
33829
|
}, transformAndCacheVue = async (filePath, projectRoot, rewriter, vueDir, stylePreprocessors) => {
|
|
33822
|
-
const stat4 =
|
|
33830
|
+
const stat4 = statSync8(filePath);
|
|
33823
33831
|
const content = await transformVueFile(filePath, projectRoot, rewriter, vueDir, stylePreprocessors);
|
|
33824
33832
|
setTransformed(filePath, content, stat4.mtimeMs, extractImportedFiles(content, projectRoot));
|
|
33825
33833
|
return jsResponse(content);
|
|
@@ -33980,6 +33988,7 @@ var init_moduleServer = __esm(() => {
|
|
|
33980
33988
|
init_resolvePackageImport();
|
|
33981
33989
|
init_vueAutoRouterTransform();
|
|
33982
33990
|
init_sourceMetadata();
|
|
33991
|
+
init_isFile();
|
|
33983
33992
|
init_stylePreprocessor();
|
|
33984
33993
|
init_lowerAwaitSlotSyntax();
|
|
33985
33994
|
init_lowerIslandSyntax();
|
|
@@ -34381,7 +34390,7 @@ __export(exports_rebuildTrigger, {
|
|
|
34381
34390
|
queueFileChange: () => queueFileChange,
|
|
34382
34391
|
triggerRebuild: () => triggerRebuild
|
|
34383
34392
|
});
|
|
34384
|
-
import { existsSync as
|
|
34393
|
+
import { existsSync as existsSync46, readdirSync as readdirSync13, rmSync as rmSync4, statSync as statSync9 } from "fs";
|
|
34385
34394
|
import {
|
|
34386
34395
|
basename as basename21,
|
|
34387
34396
|
dirname as dirname36,
|
|
@@ -34495,7 +34504,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
34495
34504
|
detectedFw = detected !== "ignored" ? detected : affectedFrameworks[0];
|
|
34496
34505
|
}
|
|
34497
34506
|
return { ...parsed, framework: detectedFw };
|
|
34498
|
-
}, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) &&
|
|
34507
|
+
}, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) && existsSync46(affectedFile), FRAMEWORK_DIR_KEYS_FOR_CLEANUP, removeStaleGenerated = (state, deletedFile) => {
|
|
34499
34508
|
const { config } = state;
|
|
34500
34509
|
const cwd2 = process.cwd();
|
|
34501
34510
|
const absDeleted = resolvePath4(deletedFile).replace(/\\/g, "/");
|
|
@@ -34541,7 +34550,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
34541
34550
|
if (!dependents || dependents.size === 0) {
|
|
34542
34551
|
return;
|
|
34543
34552
|
}
|
|
34544
|
-
const dependentFiles = Array.from(dependents).filter((file5) =>
|
|
34553
|
+
const dependentFiles = Array.from(dependents).filter((file5) => existsSync46(file5));
|
|
34545
34554
|
if (dependentFiles.length === 0) {
|
|
34546
34555
|
return;
|
|
34547
34556
|
}
|
|
@@ -34557,7 +34566,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
34557
34566
|
try {
|
|
34558
34567
|
const affectedFiles = getAffectedFiles(state.dependencyGraph, normalizedFilePath);
|
|
34559
34568
|
affectedFiles.forEach((affectedFile) => {
|
|
34560
|
-
if (!processedFiles.has(affectedFile) && affectedFile !== normalizedFilePath &&
|
|
34569
|
+
if (!processedFiles.has(affectedFile) && affectedFile !== normalizedFilePath && existsSync46(affectedFile)) {
|
|
34561
34570
|
validFiles.push(affectedFile);
|
|
34562
34571
|
processedFiles.add(affectedFile);
|
|
34563
34572
|
}
|
|
@@ -34582,7 +34591,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
34582
34591
|
collectChangedFileAffected(state, normalizedFilePath, processedFiles, validFiles);
|
|
34583
34592
|
}, processFilePathSet = (state, filePathSet, processedFiles, validFiles) => {
|
|
34584
34593
|
filePathSet.forEach((filePathInSet) => {
|
|
34585
|
-
if (!
|
|
34594
|
+
if (!existsSync46(filePathInSet)) {
|
|
34586
34595
|
collectDeletedFileAffected(state, filePathInSet, processedFiles, validFiles);
|
|
34587
34596
|
return;
|
|
34588
34597
|
}
|
|
@@ -34847,7 +34856,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
34847
34856
|
return componentFile;
|
|
34848
34857
|
}
|
|
34849
34858
|
const tsCounterpart = componentFile.replace(/\.html$/, ".ts");
|
|
34850
|
-
if (
|
|
34859
|
+
if (existsSync46(tsCounterpart)) {
|
|
34851
34860
|
return tsCounterpart;
|
|
34852
34861
|
}
|
|
34853
34862
|
if (!graph)
|
|
@@ -35528,7 +35537,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
35528
35537
|
return url;
|
|
35529
35538
|
}, getReactModuleUrl, isReactComponentPath = (file5) => file5.endsWith(".tsx") || file5.endsWith(".jsx"), isReactPagePath = (file5) => file5.replace(/\\/g, "/").includes("/pages/"), isImportableModule = (file5) => {
|
|
35530
35539
|
try {
|
|
35531
|
-
return
|
|
35540
|
+
return statSync9(file5).isFile();
|
|
35532
35541
|
} catch {
|
|
35533
35542
|
return false;
|
|
35534
35543
|
}
|
|
@@ -35775,7 +35784,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
35775
35784
|
}
|
|
35776
35785
|
return ctx;
|
|
35777
35786
|
}, runSvelteBundleRebuild = async (state, svelteFiles, config) => {
|
|
35778
|
-
const existingSvelteFiles = svelteFiles.filter((file5) =>
|
|
35787
|
+
const existingSvelteFiles = svelteFiles.filter((file5) => existsSync46(file5));
|
|
35779
35788
|
if (existingSvelteFiles.length === 0)
|
|
35780
35789
|
return;
|
|
35781
35790
|
const svelteDir = config.svelteDirectory ?? "";
|
|
@@ -37504,7 +37513,7 @@ __export(exports_vendorCache, {
|
|
|
37504
37513
|
import { createHash as createHash12 } from "crypto";
|
|
37505
37514
|
import {
|
|
37506
37515
|
copyFileSync as copyFileSync4,
|
|
37507
|
-
existsSync as
|
|
37516
|
+
existsSync as existsSync47,
|
|
37508
37517
|
mkdirSync as mkdirSync17,
|
|
37509
37518
|
readdirSync as readdirSync14,
|
|
37510
37519
|
readFileSync as readFileSync41
|
|
@@ -37538,7 +37547,7 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
|
|
|
37538
37547
|
let found = false;
|
|
37539
37548
|
for (const name of LOCKFILES) {
|
|
37540
37549
|
const path2 = join63(projectRoot, name);
|
|
37541
|
-
if (!
|
|
37550
|
+
if (!existsSync47(path2))
|
|
37542
37551
|
continue;
|
|
37543
37552
|
found = true;
|
|
37544
37553
|
hash.update(name);
|
|
@@ -37558,21 +37567,21 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
|
|
|
37558
37567
|
}, copySlotsInto = (cacheDir2, vendorDirs) => {
|
|
37559
37568
|
for (const [index, dir] of vendorDirs.entries()) {
|
|
37560
37569
|
const source = join63(cacheDir2, slotName(index, dir));
|
|
37561
|
-
if (!
|
|
37570
|
+
if (!existsSync47(source)) {
|
|
37562
37571
|
throw new Error(`missing cached vendor dir ${source}`);
|
|
37563
37572
|
}
|
|
37564
37573
|
copyTree(source, dir);
|
|
37565
37574
|
}
|
|
37566
37575
|
}, copySlotsFrom = (stagingDir, vendorDirs) => {
|
|
37567
37576
|
for (const [index, dir] of vendorDirs.entries()) {
|
|
37568
|
-
if (!
|
|
37577
|
+
if (!existsSync47(dir))
|
|
37569
37578
|
continue;
|
|
37570
37579
|
copyTree(dir, join63(stagingDir, slotName(index, dir)));
|
|
37571
37580
|
}
|
|
37572
37581
|
}, isVendorCachePayload = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "depPaths") === "object", cacheDirFor = (key, projectRoot) => resolve54(projectRoot, CACHE_ROOT2, key), slotName = (index, dir) => `${index}-${basename22(resolve54(dir, ".."))}`, restoreVendorCache = async (key, vendorDirs, projectRoot = process.cwd()) => {
|
|
37573
37582
|
const cacheDir2 = cacheDirFor(key, projectRoot);
|
|
37574
37583
|
const payloadPath = join63(cacheDir2, "payload.json");
|
|
37575
|
-
if (!
|
|
37584
|
+
if (!existsSync47(payloadPath))
|
|
37576
37585
|
return null;
|
|
37577
37586
|
try {
|
|
37578
37587
|
const payload = JSON.parse(await readFile12(payloadPath, "utf8"));
|
|
@@ -37585,7 +37594,7 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
|
|
|
37585
37594
|
}
|
|
37586
37595
|
}, saveVendorCache = async (key, vendorDirs, payload, projectRoot = process.cwd()) => {
|
|
37587
37596
|
const cacheDir2 = cacheDirFor(key, projectRoot);
|
|
37588
|
-
if (
|
|
37597
|
+
if (existsSync47(join63(cacheDir2, "payload.json")))
|
|
37589
37598
|
return;
|
|
37590
37599
|
const stagingDir = `${cacheDir2}.${process.pid}.tmp`;
|
|
37591
37600
|
try {
|
|
@@ -37620,7 +37629,7 @@ __export(exports_devBuild, {
|
|
|
37620
37629
|
devBuild: () => devBuild
|
|
37621
37630
|
});
|
|
37622
37631
|
import { readdir as readdir6 } from "fs/promises";
|
|
37623
|
-
import { existsSync as
|
|
37632
|
+
import { existsSync as existsSync48, statSync as statSync10 } from "fs";
|
|
37624
37633
|
import { resolve as resolve55 } from "path";
|
|
37625
37634
|
var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve55(import.meta.dir, "../dev/client"), collectDepVendorSourceDirs = (config) => {
|
|
37626
37635
|
const configuredDirs = [
|
|
@@ -37760,7 +37769,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve55(import.meta.d
|
|
|
37760
37769
|
});
|
|
37761
37770
|
}
|
|
37762
37771
|
}, handleCachedReload = async () => {
|
|
37763
|
-
const serverMtime =
|
|
37772
|
+
const serverMtime = statSync10(resolve55(Bun.main)).mtimeMs;
|
|
37764
37773
|
const lastMtime = globalThis.__hmrServerMtime;
|
|
37765
37774
|
globalThis.__hmrServerMtime = serverMtime;
|
|
37766
37775
|
const cached = globalThis.__hmrDevResult;
|
|
@@ -37898,7 +37907,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve55(import.meta.d
|
|
|
37898
37907
|
const sourceFiles = await collectDepVendorSourceFiles(config);
|
|
37899
37908
|
const configVendorDirs = collectConfigVendorSourceDirs(config);
|
|
37900
37909
|
const prescannedVendorPaths = prescanVendorPaths(prescan, configVendorDirs);
|
|
37901
|
-
const remainingVendorDirs = prescannedVendorPaths ? sourceDirs.filter((dir) => !configVendorDirs.includes(dir) &&
|
|
37910
|
+
const remainingVendorDirs = prescannedVendorPaths ? sourceDirs.filter((dir) => !configVendorDirs.includes(dir) && existsSync48(dir)) : sourceDirs;
|
|
37902
37911
|
if (prescannedVendorPaths && remainingVendorDirs.length === 0 && sourceFiles.length === 0) {
|
|
37903
37912
|
globalThis.__depVendorPaths = prescannedVendorPaths;
|
|
37904
37913
|
} else {
|
|
@@ -38141,7 +38150,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve55(import.meta.d
|
|
|
38141
38150
|
manifest
|
|
38142
38151
|
};
|
|
38143
38152
|
globalThis.__hmrDevResult = result;
|
|
38144
|
-
globalThis.__hmrServerMtime =
|
|
38153
|
+
globalThis.__hmrServerMtime = statSync10(resolve55(Bun.main)).mtimeMs;
|
|
38145
38154
|
return result;
|
|
38146
38155
|
};
|
|
38147
38156
|
var init_devBuild = __esm(() => {
|
|
@@ -38182,5 +38191,5 @@ export {
|
|
|
38182
38191
|
devBuild
|
|
38183
38192
|
};
|
|
38184
38193
|
|
|
38185
|
-
//# debugId=
|
|
38194
|
+
//# debugId=E68F1522FB2CF95F64756E2164756E21
|
|
38186
38195
|
//# sourceMappingURL=build.js.map
|