@absolutejs/absolute 0.19.0-beta.997 → 0.19.0-beta.999
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +35 -29
- package/dist/angular/index.js.map +3 -3
- package/dist/angular/server.js +35 -29
- package/dist/angular/server.js.map +3 -3
- package/dist/build.js +213 -197
- package/dist/build.js.map +4 -4
- package/dist/index.js +241 -225
- package/dist/index.js.map +4 -4
- package/dist/islands/index.js +7 -1
- package/dist/islands/index.js.map +3 -3
- package/dist/react/index.js +7 -1
- package/dist/react/index.js.map +3 -3
- package/dist/svelte/index.js +7 -1
- package/dist/svelte/index.js.map +3 -3
- package/dist/vue/index.js +7 -1
- package/dist/vue/index.js.map +3 -3
- package/package.json +1 -1
package/dist/build.js
CHANGED
|
@@ -3382,6 +3382,7 @@ var init_svelteServerModule = __esm(() => {
|
|
|
3382
3382
|
});
|
|
3383
3383
|
|
|
3384
3384
|
// src/core/vueServerModule.ts
|
|
3385
|
+
import { existsSync as existsSync5, readFileSync as readFileSync4, realpathSync } from "fs";
|
|
3385
3386
|
import { mkdir as mkdir2 } from "fs/promises";
|
|
3386
3387
|
import { dirname as dirname4, join as join7, relative as relative5, resolve as resolve8 } from "path";
|
|
3387
3388
|
var {Transpiler } = globalThis.Bun;
|
|
@@ -3427,6 +3428,11 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot2, compiledModuleCache2, tran
|
|
|
3427
3428
|
const componentId = Bun.hash(sourcePath).toString(BASE_36_RADIX).slice(0, ISLAND_COMPONENT_ID_LENGTH);
|
|
3428
3429
|
const hasScript = descriptor.script || descriptor.scriptSetup;
|
|
3429
3430
|
const compiledScript = hasScript ? compiler.compileScript(descriptor, {
|
|
3431
|
+
fs: {
|
|
3432
|
+
fileExists: existsSync5,
|
|
3433
|
+
readFile: (file) => existsSync5(file) ? readFileSync4(file, "utf-8") : undefined,
|
|
3434
|
+
realpath: realpathSync
|
|
3435
|
+
},
|
|
3430
3436
|
id: componentId,
|
|
3431
3437
|
inlineTemplate: false
|
|
3432
3438
|
}) : { bindings: {}, content: "export default {};" };
|
|
@@ -3698,7 +3704,7 @@ var init_staticStreaming = __esm(() => {
|
|
|
3698
3704
|
});
|
|
3699
3705
|
|
|
3700
3706
|
// src/build/staticIslandPages.ts
|
|
3701
|
-
import { readFileSync as
|
|
3707
|
+
import { readFileSync as readFileSync5, writeFileSync as writeFileSync2 } from "fs";
|
|
3702
3708
|
var ISLAND_TAG_RE_SOURCE = "<(?:absolute-island|island)\\b([^>]*?)(?:\\/\\>|>(?:[\\s\\S]*?)<\\/(?:absolute-island|island)>)", ATTRIBUTE_RE_SOURCE = `([A-Za-z_:][-A-Za-z0-9_:.]*)\\s*=\\s*(?:"([^"]*)"|'([^']*)')`, islandFrameworks, islandHydrationModes, isRecord5 = (value) => typeof value === "object" && value !== null, isIslandFramework = (value) => islandFrameworks.some((framework) => framework === value), isIslandHydrationMode = (value) => islandHydrationModes.some((mode) => mode === value), parseHtmlAttributes = (attributeString) => {
|
|
3703
3709
|
const attributeRe = new RegExp(ATTRIBUTE_RE_SOURCE, "g");
|
|
3704
3710
|
const attributes = new Map;
|
|
@@ -3827,7 +3833,7 @@ var ISLAND_TAG_RE_SOURCE = "<(?:absolute-island|island)\\b([^>]*?)(?:\\/\\>|>(?:
|
|
|
3827
3833
|
}
|
|
3828
3834
|
return result + originalHtml.slice(nextIndex);
|
|
3829
3835
|
}, transformStaticPage = async (pagePath, registry) => {
|
|
3830
|
-
const originalHtml =
|
|
3836
|
+
const originalHtml = readFileSync5(pagePath, "utf-8");
|
|
3831
3837
|
const transformedHtml = await transformStaticPageHtml(originalHtml, registry);
|
|
3832
3838
|
if (transformedHtml !== originalHtml) {
|
|
3833
3839
|
writeFileSync2(pagePath, transformedHtml);
|
|
@@ -3880,10 +3886,10 @@ var init_outputLogs = __esm(() => {
|
|
|
3880
3886
|
});
|
|
3881
3887
|
|
|
3882
3888
|
// src/build/scanEntryPoints.ts
|
|
3883
|
-
import { existsSync as
|
|
3889
|
+
import { existsSync as existsSync6 } from "fs";
|
|
3884
3890
|
var {Glob: Glob2 } = globalThis.Bun;
|
|
3885
3891
|
var scanEntryPoints = async (dir, pattern) => {
|
|
3886
|
-
if (!
|
|
3892
|
+
if (!existsSync6(dir))
|
|
3887
3893
|
return [];
|
|
3888
3894
|
const entryPaths = [];
|
|
3889
3895
|
const glob = new Glob2(pattern);
|
|
@@ -3897,7 +3903,7 @@ var init_scanEntryPoints = () => {};
|
|
|
3897
3903
|
// src/build/scanConventions.ts
|
|
3898
3904
|
import { basename as basename3 } from "path";
|
|
3899
3905
|
var {Glob: Glob3 } = globalThis.Bun;
|
|
3900
|
-
import { existsSync as
|
|
3906
|
+
import { existsSync as existsSync7 } from "fs";
|
|
3901
3907
|
var CONVENTION_RE, classifyFile = (file, pageFiles, defaults, pages) => {
|
|
3902
3908
|
const fileName = basename3(file);
|
|
3903
3909
|
const match = CONVENTION_RE.exec(fileName);
|
|
@@ -3922,7 +3928,7 @@ var CONVENTION_RE, classifyFile = (file, pageFiles, defaults, pages) => {
|
|
|
3922
3928
|
else if (kind === "loading")
|
|
3923
3929
|
pages[pageName].loading = file;
|
|
3924
3930
|
}, scanConventions = async (pagesDir, pattern) => {
|
|
3925
|
-
if (!
|
|
3931
|
+
if (!existsSync7(pagesDir)) {
|
|
3926
3932
|
const pageFiles2 = [];
|
|
3927
3933
|
return { conventions: undefined, pageFiles: pageFiles2 };
|
|
3928
3934
|
}
|
|
@@ -3945,7 +3951,7 @@ var init_scanConventions = __esm(() => {
|
|
|
3945
3951
|
});
|
|
3946
3952
|
|
|
3947
3953
|
// src/build/scanRouteRegistrations.ts
|
|
3948
|
-
import { readdirSync, readFileSync as
|
|
3954
|
+
import { readdirSync, readFileSync as readFileSync6 } from "fs";
|
|
3949
3955
|
import { join as join8 } from "path";
|
|
3950
3956
|
import ts2 from "typescript";
|
|
3951
3957
|
var ELYSIA_ROUTE_METHODS, SKIP_DIRS, SOURCE_EXTENSIONS, getScriptKind = (filePath) => {
|
|
@@ -3999,7 +4005,7 @@ var ELYSIA_ROUTE_METHODS, SKIP_DIRS, SOURCE_EXTENSIONS, getScriptKind = (filePat
|
|
|
3999
4005
|
}, extractRoutesFromFile = (filePath, out) => {
|
|
4000
4006
|
let source;
|
|
4001
4007
|
try {
|
|
4002
|
-
source =
|
|
4008
|
+
source = readFileSync6(filePath, "utf-8");
|
|
4003
4009
|
} catch {
|
|
4004
4010
|
return;
|
|
4005
4011
|
}
|
|
@@ -4174,7 +4180,7 @@ var init_devRouteRegistrationCallsite = __esm(() => {
|
|
|
4174
4180
|
});
|
|
4175
4181
|
|
|
4176
4182
|
// src/angular/staticAnalyzeSpaRoutes.ts
|
|
4177
|
-
import { existsSync as
|
|
4183
|
+
import { existsSync as existsSync8, promises as fs } from "fs";
|
|
4178
4184
|
import { join as join9 } from "path";
|
|
4179
4185
|
import ts3 from "typescript";
|
|
4180
4186
|
var DYNAMIC_SEGMENT_PATTERN, pathHasDynamic = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN.test(seg) || seg === "**"), importsSymbolFrom = (sf, localName, moduleSpecifier) => {
|
|
@@ -4381,7 +4387,7 @@ var DYNAMIC_SEGMENT_PATTERN, pathHasDynamic = (path) => path.split("/").some((se
|
|
|
4381
4387
|
}
|
|
4382
4388
|
}
|
|
4383
4389
|
}, analyzeAngularSpaRoutes = async (angularDirectory) => {
|
|
4384
|
-
if (!
|
|
4390
|
+
if (!existsSync8(angularDirectory))
|
|
4385
4391
|
return [];
|
|
4386
4392
|
const tsFiles = [];
|
|
4387
4393
|
await walkTsFiles(angularDirectory, tsFiles);
|
|
@@ -4402,7 +4408,7 @@ var init_staticAnalyzeSpaRoutes = __esm(() => {
|
|
|
4402
4408
|
});
|
|
4403
4409
|
|
|
4404
4410
|
// src/react/staticAnalyzeSpaRoutes.ts
|
|
4405
|
-
import { existsSync as
|
|
4411
|
+
import { existsSync as existsSync9, promises as fs2 } from "fs";
|
|
4406
4412
|
import { join as join10 } from "path";
|
|
4407
4413
|
import ts4 from "typescript";
|
|
4408
4414
|
var DYNAMIC_SEGMENT_PATTERN2, pathHasDynamic2 = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN2.test(seg) || seg === "**"), readStringLiteral2 = (expression) => {
|
|
@@ -4591,7 +4597,7 @@ var DYNAMIC_SEGMENT_PATTERN2, pathHasDynamic2 = (path) => path.split("/").some((
|
|
|
4591
4597
|
}
|
|
4592
4598
|
}
|
|
4593
4599
|
}, analyzeReactSpaRoutes = async (reactDirectory) => {
|
|
4594
|
-
if (!
|
|
4600
|
+
if (!existsSync9(reactDirectory))
|
|
4595
4601
|
return [];
|
|
4596
4602
|
const files = [];
|
|
4597
4603
|
await walkSourceFiles(reactDirectory, files);
|
|
@@ -4612,7 +4618,7 @@ var init_staticAnalyzeSpaRoutes2 = __esm(() => {
|
|
|
4612
4618
|
});
|
|
4613
4619
|
|
|
4614
4620
|
// src/svelte/staticAnalyzeSpaRoutes.ts
|
|
4615
|
-
import { existsSync as
|
|
4621
|
+
import { existsSync as existsSync10, promises as fs3 } from "fs";
|
|
4616
4622
|
import { join as join11 } from "path";
|
|
4617
4623
|
var DYNAMIC_SEGMENT_PATTERN3, pathHasDynamic3 = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN3.test(seg) || seg === "**"), joinSegments3 = (parent, child) => {
|
|
4618
4624
|
if (!child)
|
|
@@ -4693,7 +4699,7 @@ var DYNAMIC_SEGMENT_PATTERN3, pathHasDynamic3 = (path) => path.split("/").some((
|
|
|
4693
4699
|
}
|
|
4694
4700
|
}
|
|
4695
4701
|
}, analyzeSvelteSpaRoutes = async (svelteDirectory) => {
|
|
4696
|
-
if (!
|
|
4702
|
+
if (!existsSync10(svelteDirectory))
|
|
4697
4703
|
return [];
|
|
4698
4704
|
const files = [];
|
|
4699
4705
|
await walkSvelteFiles(svelteDirectory, files);
|
|
@@ -4716,7 +4722,7 @@ var init_staticAnalyzeSpaRoutes3 = __esm(() => {
|
|
|
4716
4722
|
});
|
|
4717
4723
|
|
|
4718
4724
|
// src/vue/staticAnalyzeSpaRoutes.ts
|
|
4719
|
-
import { existsSync as
|
|
4725
|
+
import { existsSync as existsSync11, promises as fs4 } from "fs";
|
|
4720
4726
|
import { join as join12 } from "path";
|
|
4721
4727
|
import ts5 from "typescript";
|
|
4722
4728
|
var DYNAMIC_SEGMENT_PATTERN4, pathHasDynamic4 = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN4.test(seg) || seg === "**"), readStringLiteral3 = (expression) => {
|
|
@@ -4931,7 +4937,7 @@ var DYNAMIC_SEGMENT_PATTERN4, pathHasDynamic4 = (path) => path.split("/").some((
|
|
|
4931
4937
|
}
|
|
4932
4938
|
}
|
|
4933
4939
|
}, analyzeVueSpaRoutes = async (vueDirectory) => {
|
|
4934
|
-
if (!
|
|
4940
|
+
if (!existsSync11(vueDirectory))
|
|
4935
4941
|
return [];
|
|
4936
4942
|
const files = [];
|
|
4937
4943
|
await walkSourceFiles2(vueDirectory, files);
|
|
@@ -5184,10 +5190,10 @@ var init_generateSitemap = __esm(() => {
|
|
|
5184
5190
|
});
|
|
5185
5191
|
|
|
5186
5192
|
// src/build/scanCssEntryPoints.ts
|
|
5187
|
-
import { existsSync as
|
|
5193
|
+
import { existsSync as existsSync12 } from "fs";
|
|
5188
5194
|
var {Glob: Glob4 } = globalThis.Bun;
|
|
5189
5195
|
var scanCssEntryPoints = async (dir, ignore) => {
|
|
5190
|
-
if (!
|
|
5196
|
+
if (!existsSync12(dir))
|
|
5191
5197
|
return [];
|
|
5192
5198
|
const entryPaths = [];
|
|
5193
5199
|
const glob = new Glob4("**/*.{css,scss,sass,less,styl,stylus}");
|
|
@@ -10092,7 +10098,7 @@ __export(exports_tailwindCompiler, {
|
|
|
10092
10098
|
disposeTailwindCompiler: () => disposeTailwindCompiler
|
|
10093
10099
|
});
|
|
10094
10100
|
import { createHash as createHash2 } from "crypto";
|
|
10095
|
-
import { existsSync as
|
|
10101
|
+
import { existsSync as existsSync13, readFileSync as readFileSync7 } from "fs";
|
|
10096
10102
|
import { readFile as readFile2, stat } from "fs/promises";
|
|
10097
10103
|
import { dirname as dirname5, isAbsolute as isAbsolute2, resolve as resolve9 } from "path";
|
|
10098
10104
|
var compilerCache, cachedTailwindCompile = null, loadTailwindCompile = async () => {
|
|
@@ -10128,7 +10134,7 @@ var compilerCache, cachedTailwindCompile = null, loadTailwindCompile = async ()
|
|
|
10128
10134
|
const pkgDir = dirname5(pkgJsonPath);
|
|
10129
10135
|
let pkg = {};
|
|
10130
10136
|
try {
|
|
10131
|
-
pkg = JSON.parse(
|
|
10137
|
+
pkg = JSON.parse(readFileSync7(pkgJsonPath, "utf-8"));
|
|
10132
10138
|
} catch {
|
|
10133
10139
|
return Bun.resolveSync(id, base);
|
|
10134
10140
|
}
|
|
@@ -10142,7 +10148,7 @@ var compilerCache, cachedTailwindCompile = null, loadTailwindCompile = async ()
|
|
|
10142
10148
|
].filter((entry) => typeof entry === "string");
|
|
10143
10149
|
for (const candidate of candidates) {
|
|
10144
10150
|
const candidatePath = resolve9(pkgDir, candidate);
|
|
10145
|
-
if (
|
|
10151
|
+
if (existsSync13(candidatePath))
|
|
10146
10152
|
return candidatePath;
|
|
10147
10153
|
}
|
|
10148
10154
|
return Bun.resolveSync(id, base);
|
|
@@ -10375,7 +10381,7 @@ var init_compileTailwind = __esm(() => {
|
|
|
10375
10381
|
});
|
|
10376
10382
|
|
|
10377
10383
|
// src/utils/imageProcessing.ts
|
|
10378
|
-
import { existsSync as
|
|
10384
|
+
import { existsSync as existsSync14, mkdirSync as mkdirSync3, readFileSync as readFileSync8, writeFileSync as writeFileSync3 } from "fs";
|
|
10379
10385
|
import { join as join14, resolve as resolve11 } from "path";
|
|
10380
10386
|
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) => {
|
|
10381
10387
|
for (const size of sizes) {
|
|
@@ -10427,7 +10433,7 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
|
|
|
10427
10433
|
return [...device, ...image].sort((left, right) => left - right);
|
|
10428
10434
|
}, getCacheDir = (buildDir) => {
|
|
10429
10435
|
const dir = join14(buildDir, ".cache", "images");
|
|
10430
|
-
if (!
|
|
10436
|
+
if (!existsSync14(dir))
|
|
10431
10437
|
mkdirSync3(dir, { recursive: true });
|
|
10432
10438
|
return dir;
|
|
10433
10439
|
}, getCacheKey = (url, width, quality, format) => {
|
|
@@ -10509,11 +10515,11 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
|
|
|
10509
10515
|
}, readFromCache = (cacheDir, cacheKey) => {
|
|
10510
10516
|
const metaPath = join14(cacheDir, `${cacheKey}.meta`);
|
|
10511
10517
|
const dataPath = join14(cacheDir, `${cacheKey}.data`);
|
|
10512
|
-
if (!
|
|
10518
|
+
if (!existsSync14(metaPath) || !existsSync14(dataPath))
|
|
10513
10519
|
return null;
|
|
10514
10520
|
try {
|
|
10515
|
-
const meta = JSON.parse(
|
|
10516
|
-
const buffer =
|
|
10521
|
+
const meta = JSON.parse(readFileSync8(metaPath, "utf-8"));
|
|
10522
|
+
const buffer = readFileSync8(dataPath);
|
|
10517
10523
|
return { buffer, meta };
|
|
10518
10524
|
} catch {
|
|
10519
10525
|
return null;
|
|
@@ -10622,14 +10628,14 @@ var init_optimizeHtmlImages = __esm(() => {
|
|
|
10622
10628
|
});
|
|
10623
10629
|
|
|
10624
10630
|
// src/cli/scripts/telemetry.ts
|
|
10625
|
-
import { existsSync as
|
|
10631
|
+
import { existsSync as existsSync15, mkdirSync as mkdirSync4, readFileSync as readFileSync9, writeFileSync as writeFileSync4 } from "fs";
|
|
10626
10632
|
import { homedir } from "os";
|
|
10627
10633
|
import { join as join15 } from "path";
|
|
10628
10634
|
var configDir, configPath, getTelemetryConfig = () => {
|
|
10629
10635
|
try {
|
|
10630
|
-
if (!
|
|
10636
|
+
if (!existsSync15(configPath))
|
|
10631
10637
|
return null;
|
|
10632
|
-
const raw =
|
|
10638
|
+
const raw = readFileSync9(configPath, "utf-8");
|
|
10633
10639
|
const config = JSON.parse(raw);
|
|
10634
10640
|
return config;
|
|
10635
10641
|
} catch {
|
|
@@ -10642,14 +10648,14 @@ var init_telemetry = __esm(() => {
|
|
|
10642
10648
|
});
|
|
10643
10649
|
|
|
10644
10650
|
// src/cli/telemetryEvent.ts
|
|
10645
|
-
import { existsSync as
|
|
10651
|
+
import { existsSync as existsSync16, readFileSync as readFileSync10 } from "fs";
|
|
10646
10652
|
import { arch, platform } from "os";
|
|
10647
10653
|
import { dirname as dirname7, join as join16, parse } from "path";
|
|
10648
10654
|
var checkCandidate = (candidate) => {
|
|
10649
|
-
if (!
|
|
10655
|
+
if (!existsSync16(candidate)) {
|
|
10650
10656
|
return null;
|
|
10651
10657
|
}
|
|
10652
|
-
const pkg = JSON.parse(
|
|
10658
|
+
const pkg = JSON.parse(readFileSync10(candidate, "utf-8"));
|
|
10653
10659
|
if (pkg.name === "@absolutejs/absolute") {
|
|
10654
10660
|
const ver = pkg.version;
|
|
10655
10661
|
return ver;
|
|
@@ -10761,17 +10767,17 @@ var exports_buildHMRClient = {};
|
|
|
10761
10767
|
__export(exports_buildHMRClient, {
|
|
10762
10768
|
buildHMRClient: () => buildHMRClient
|
|
10763
10769
|
});
|
|
10764
|
-
import { existsSync as
|
|
10770
|
+
import { existsSync as existsSync17 } from "fs";
|
|
10765
10771
|
import { resolve as resolve12 } from "path";
|
|
10766
10772
|
var {build: bunBuild } = globalThis.Bun;
|
|
10767
10773
|
var resolveHmrClientPath = () => {
|
|
10768
10774
|
const projectRoot = process.cwd();
|
|
10769
10775
|
const fromSource = resolve12(import.meta.dir, "client/hmrClient.ts");
|
|
10770
|
-
if (
|
|
10776
|
+
if (existsSync17(fromSource) && fromSource.startsWith(projectRoot)) {
|
|
10771
10777
|
return fromSource;
|
|
10772
10778
|
}
|
|
10773
10779
|
const fromNodeModules = resolve12(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client/hmrClient.ts");
|
|
10774
|
-
if (
|
|
10780
|
+
if (existsSync17(fromNodeModules))
|
|
10775
10781
|
return fromNodeModules;
|
|
10776
10782
|
return resolve12(import.meta.dir, "dev/client/hmrClient.ts");
|
|
10777
10783
|
}, hmrClientPath2, buildHMRClient = async () => {
|
|
@@ -10966,7 +10972,7 @@ var devVendorPaths = null, getDevVendorPaths = () => devVendorPaths, setDevVendo
|
|
|
10966
10972
|
};
|
|
10967
10973
|
|
|
10968
10974
|
// src/build/angularLinkerPlugin.ts
|
|
10969
|
-
import { existsSync as
|
|
10975
|
+
import { existsSync as existsSync18, mkdirSync as mkdirSync5, readFileSync as readFileSync11, writeFileSync as writeFileSync5 } from "fs";
|
|
10970
10976
|
import { dirname as dirname8, join as join17, relative as relative6, resolve as resolve14 } from "path";
|
|
10971
10977
|
import { createHash as createHash3 } from "crypto";
|
|
10972
10978
|
var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linkerJitMode) => ({
|
|
@@ -10989,9 +10995,9 @@ var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linker
|
|
|
10989
10995
|
}
|
|
10990
10996
|
const hash = createHash3("md5").update(source).digest("hex");
|
|
10991
10997
|
const cachePath = join17(cacheDir, `${hash}.js`);
|
|
10992
|
-
if (
|
|
10998
|
+
if (existsSync18(cachePath)) {
|
|
10993
10999
|
return {
|
|
10994
|
-
contents:
|
|
11000
|
+
contents: readFileSync11(cachePath, "utf-8"),
|
|
10995
11001
|
loader: "js"
|
|
10996
11002
|
};
|
|
10997
11003
|
}
|
|
@@ -11006,8 +11012,8 @@ var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linker
|
|
|
11006
11012
|
linkerPlugin = mod.createEs2015LinkerPlugin({
|
|
11007
11013
|
fileSystem: {
|
|
11008
11014
|
dirname: dirname8,
|
|
11009
|
-
exists:
|
|
11010
|
-
readFile:
|
|
11015
|
+
exists: existsSync18,
|
|
11016
|
+
readFile: readFileSync11,
|
|
11011
11017
|
relative: relative6,
|
|
11012
11018
|
resolve: resolve14
|
|
11013
11019
|
},
|
|
@@ -11046,7 +11052,7 @@ var init_angularLinkerPlugin = __esm(() => {
|
|
|
11046
11052
|
});
|
|
11047
11053
|
|
|
11048
11054
|
// src/build/externalAssetPlugin.ts
|
|
11049
|
-
import { copyFileSync, existsSync as
|
|
11055
|
+
import { copyFileSync, existsSync as existsSync19, mkdirSync as mkdirSync6, statSync } from "fs";
|
|
11050
11056
|
import { basename as basename4, dirname as dirname9, join as join18, resolve as resolve15 } from "path";
|
|
11051
11057
|
var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
|
|
11052
11058
|
name: "absolute-external-asset",
|
|
@@ -11068,12 +11074,12 @@ var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
|
|
|
11068
11074
|
if (!relPath)
|
|
11069
11075
|
continue;
|
|
11070
11076
|
const assetPath = resolve15(sourceDir, relPath);
|
|
11071
|
-
if (!
|
|
11077
|
+
if (!existsSync19(assetPath))
|
|
11072
11078
|
continue;
|
|
11073
11079
|
if (!statSync(assetPath).isFile())
|
|
11074
11080
|
continue;
|
|
11075
11081
|
const targetPath = join18(outDir, basename4(assetPath));
|
|
11076
|
-
if (
|
|
11082
|
+
if (existsSync19(targetPath))
|
|
11077
11083
|
continue;
|
|
11078
11084
|
mkdirSync6(dirname9(targetPath), { recursive: true });
|
|
11079
11085
|
copyFileSync(assetPath, targetPath);
|
|
@@ -11384,7 +11390,7 @@ var commonAncestor = (paths, fallback) => {
|
|
|
11384
11390
|
var init_commonAncestor = () => {};
|
|
11385
11391
|
|
|
11386
11392
|
// src/utils/buildDirectoryLock.ts
|
|
11387
|
-
import { mkdirSync as mkdirSync7, unlinkSync, writeFileSync as writeFileSync6, readFileSync as
|
|
11393
|
+
import { mkdirSync as mkdirSync7, unlinkSync, writeFileSync as writeFileSync6, readFileSync as readFileSync12 } from "fs";
|
|
11388
11394
|
import { dirname as dirname10, join as join21 } from "path";
|
|
11389
11395
|
var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandlersRegistered = false, registerExitHandlersOnce = () => {
|
|
11390
11396
|
if (exitHandlersRegistered)
|
|
@@ -11432,7 +11438,7 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
|
|
|
11432
11438
|
writeFileSync6(lockPath, JSON.stringify(metadata, null, 2), { flag: "wx" });
|
|
11433
11439
|
}, readLockMetadata = (lockPath) => {
|
|
11434
11440
|
try {
|
|
11435
|
-
const raw =
|
|
11441
|
+
const raw = readFileSync12(lockPath, "utf-8");
|
|
11436
11442
|
const parsed = JSON.parse(raw);
|
|
11437
11443
|
if (typeof parsed === "object" && parsed !== null && typeof parsed.pid === "number") {
|
|
11438
11444
|
return {
|
|
@@ -11565,7 +11571,7 @@ var exports_scanVueSsrOnlyPages = {};
|
|
|
11565
11571
|
__export(exports_scanVueSsrOnlyPages, {
|
|
11566
11572
|
scanVueSsrOnlyPages: () => scanVueSsrOnlyPages
|
|
11567
11573
|
});
|
|
11568
|
-
import { readdirSync as readdirSync2, readFileSync as
|
|
11574
|
+
import { readdirSync as readdirSync2, readFileSync as readFileSync13 } from "fs";
|
|
11569
11575
|
import { join as join22 } from "path";
|
|
11570
11576
|
import ts6 from "typescript";
|
|
11571
11577
|
var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (filePath) => {
|
|
@@ -11668,7 +11674,7 @@ var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (filePath) => {
|
|
|
11668
11674
|
}, extractFromFile = (filePath, out) => {
|
|
11669
11675
|
let source;
|
|
11670
11676
|
try {
|
|
11671
|
-
source =
|
|
11677
|
+
source = readFileSync13(filePath, "utf-8");
|
|
11672
11678
|
} catch {
|
|
11673
11679
|
return;
|
|
11674
11680
|
}
|
|
@@ -11712,7 +11718,7 @@ var init_scanVueSsrOnlyPages = __esm(() => {
|
|
|
11712
11718
|
});
|
|
11713
11719
|
|
|
11714
11720
|
// src/build/scanAngularHandlerCalls.ts
|
|
11715
|
-
import { readdirSync as readdirSync3, readFileSync as
|
|
11721
|
+
import { readdirSync as readdirSync3, readFileSync as readFileSync14 } from "fs";
|
|
11716
11722
|
import { join as join23 } from "path";
|
|
11717
11723
|
import ts7 from "typescript";
|
|
11718
11724
|
var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, getScriptKind3 = (filePath) => {
|
|
@@ -11783,7 +11789,7 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, getScriptKind3 = (fil
|
|
|
11783
11789
|
}, extractCallsFromFile = (filePath, out) => {
|
|
11784
11790
|
let source;
|
|
11785
11791
|
try {
|
|
11786
|
-
source =
|
|
11792
|
+
source = readFileSync14(filePath, "utf-8");
|
|
11787
11793
|
} catch {
|
|
11788
11794
|
return;
|
|
11789
11795
|
}
|
|
@@ -11862,7 +11868,7 @@ var init_scanAngularHandlerCalls = __esm(() => {
|
|
|
11862
11868
|
});
|
|
11863
11869
|
|
|
11864
11870
|
// src/build/scanAngularPageRoutes.ts
|
|
11865
|
-
import { readdirSync as readdirSync4, readFileSync as
|
|
11871
|
+
import { readdirSync as readdirSync4, readFileSync as readFileSync15 } from "fs";
|
|
11866
11872
|
import { basename as basename5, join as join24 } from "path";
|
|
11867
11873
|
import ts8 from "typescript";
|
|
11868
11874
|
var SOURCE_EXTENSIONS4, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
|
|
@@ -11934,7 +11940,7 @@ var SOURCE_EXTENSIONS4, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
|
|
|
11934
11940
|
for (const file of files) {
|
|
11935
11941
|
let source;
|
|
11936
11942
|
try {
|
|
11937
|
-
source =
|
|
11943
|
+
source = readFileSync15(file, "utf-8");
|
|
11938
11944
|
} catch {
|
|
11939
11945
|
continue;
|
|
11940
11946
|
}
|
|
@@ -11981,7 +11987,7 @@ var exports_parseAngularConfigImports = {};
|
|
|
11981
11987
|
__export(exports_parseAngularConfigImports, {
|
|
11982
11988
|
parseAngularProvidersImport: () => parseAngularProvidersImport
|
|
11983
11989
|
});
|
|
11984
|
-
import { existsSync as
|
|
11990
|
+
import { existsSync as existsSync20, readFileSync as readFileSync16 } from "fs";
|
|
11985
11991
|
import { dirname as dirname11, isAbsolute as isAbsolute3, join as join25 } from "path";
|
|
11986
11992
|
import ts9 from "typescript";
|
|
11987
11993
|
var findDefineConfigCall = (sf) => {
|
|
@@ -12038,7 +12044,7 @@ var findDefineConfigCall = (sf) => {
|
|
|
12038
12044
|
const envOverride = process.env.ABSOLUTE_CONFIG;
|
|
12039
12045
|
if (envOverride) {
|
|
12040
12046
|
const resolved = isAbsolute3(envOverride) ? envOverride : join25(projectRoot, envOverride);
|
|
12041
|
-
if (
|
|
12047
|
+
if (existsSync20(resolved))
|
|
12042
12048
|
return resolved;
|
|
12043
12049
|
}
|
|
12044
12050
|
const candidates = [
|
|
@@ -12048,7 +12054,7 @@ var findDefineConfigCall = (sf) => {
|
|
|
12048
12054
|
join25(projectRoot, "absolute.config.mjs")
|
|
12049
12055
|
];
|
|
12050
12056
|
for (const candidate of candidates) {
|
|
12051
|
-
if (
|
|
12057
|
+
if (existsSync20(candidate))
|
|
12052
12058
|
return candidate;
|
|
12053
12059
|
}
|
|
12054
12060
|
return null;
|
|
@@ -12056,7 +12062,7 @@ var findDefineConfigCall = (sf) => {
|
|
|
12056
12062
|
const configPath2 = resolveConfigPath(projectRoot);
|
|
12057
12063
|
if (!configPath2)
|
|
12058
12064
|
return null;
|
|
12059
|
-
const source =
|
|
12065
|
+
const source = readFileSync16(configPath2, "utf-8");
|
|
12060
12066
|
if (!source.includes("angular"))
|
|
12061
12067
|
return null;
|
|
12062
12068
|
if (!source.includes("providers"))
|
|
@@ -12226,7 +12232,7 @@ __export(exports_compileSvelte, {
|
|
|
12226
12232
|
compileSvelte: () => compileSvelte,
|
|
12227
12233
|
clearSvelteCompilerCache: () => clearSvelteCompilerCache
|
|
12228
12234
|
});
|
|
12229
|
-
import { existsSync as
|
|
12235
|
+
import { existsSync as existsSync21 } from "fs";
|
|
12230
12236
|
import { mkdir as mkdir4, stat as stat2 } from "fs/promises";
|
|
12231
12237
|
import {
|
|
12232
12238
|
dirname as dirname12,
|
|
@@ -12242,11 +12248,11 @@ var {write: write2, file, Transpiler: Transpiler2 } = globalThis.Bun;
|
|
|
12242
12248
|
var resolveDevClientDir2 = () => {
|
|
12243
12249
|
const projectRoot = process.cwd();
|
|
12244
12250
|
const fromSource = resolve19(import.meta.dir, "../dev/client");
|
|
12245
|
-
if (
|
|
12251
|
+
if (existsSync21(fromSource) && fromSource.startsWith(projectRoot)) {
|
|
12246
12252
|
return fromSource;
|
|
12247
12253
|
}
|
|
12248
12254
|
const fromNodeModules = resolve19(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
|
|
12249
|
-
if (
|
|
12255
|
+
if (existsSync21(fromNodeModules))
|
|
12250
12256
|
return fromNodeModules;
|
|
12251
12257
|
return resolve19(import.meta.dir, "./dev/client");
|
|
12252
12258
|
}, devClientDir2, hmrClientPath3, persistentCache, sourceHashCache, clearSvelteCompilerCache = () => {
|
|
@@ -12349,7 +12355,7 @@ var resolveDevClientDir2 = () => {
|
|
|
12349
12355
|
const contentHash = Bun.hash(raw).toString(BASE_36_RADIX);
|
|
12350
12356
|
const prevHash = sourceHashCache.get(src);
|
|
12351
12357
|
const persistent = persistentCache.get(src);
|
|
12352
|
-
if (prevHash === contentHash && persistent &&
|
|
12358
|
+
if (prevHash === contentHash && persistent && existsSync21(persistent.ssr) && existsSync21(persistent.client)) {
|
|
12353
12359
|
cache.set(src, persistent);
|
|
12354
12360
|
return persistent;
|
|
12355
12361
|
}
|
|
@@ -12589,7 +12595,7 @@ __export(exports_chainInlineSourcemaps, {
|
|
|
12589
12595
|
chainBundleInlineSourcemap: () => chainBundleInlineSourcemap,
|
|
12590
12596
|
buildLineRemap: () => buildLineRemap
|
|
12591
12597
|
});
|
|
12592
|
-
import { readFileSync as
|
|
12598
|
+
import { readFileSync as readFileSync17, writeFileSync as writeFileSync7 } from "fs";
|
|
12593
12599
|
var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", BASE64_TO_INT, decodeVlq = (str, startPos) => {
|
|
12594
12600
|
let result = 0;
|
|
12595
12601
|
let shift = 0;
|
|
@@ -12880,7 +12886,7 @@ var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567
|
|
|
12880
12886
|
version: 3
|
|
12881
12887
|
};
|
|
12882
12888
|
}, chainBundleInlineSourcemap = (bundleFilePath) => {
|
|
12883
|
-
const text =
|
|
12889
|
+
const text = readFileSync17(bundleFilePath, "utf-8");
|
|
12884
12890
|
const outerMap = extractInlineMap(text);
|
|
12885
12891
|
if (!outerMap)
|
|
12886
12892
|
return;
|
|
@@ -12966,7 +12972,7 @@ __export(exports_compileVue, {
|
|
|
12966
12972
|
compileVue: () => compileVue,
|
|
12967
12973
|
clearVueHmrCaches: () => clearVueHmrCaches
|
|
12968
12974
|
});
|
|
12969
|
-
import { existsSync as
|
|
12975
|
+
import { existsSync as existsSync22, readFileSync as readFileSync18, realpathSync as realpathSync2 } from "fs";
|
|
12970
12976
|
import { mkdir as mkdir5 } from "fs/promises";
|
|
12971
12977
|
import {
|
|
12972
12978
|
basename as basename7,
|
|
@@ -12980,11 +12986,11 @@ var {file: file2, write: write3, Transpiler: Transpiler3 } = globalThis.Bun;
|
|
|
12980
12986
|
var resolveDevClientDir3 = () => {
|
|
12981
12987
|
const projectRoot = process.cwd();
|
|
12982
12988
|
const fromSource = resolve20(import.meta.dir, "../dev/client");
|
|
12983
|
-
if (
|
|
12989
|
+
if (existsSync22(fromSource) && fromSource.startsWith(projectRoot)) {
|
|
12984
12990
|
return fromSource;
|
|
12985
12991
|
}
|
|
12986
12992
|
const fromNodeModules = resolve20(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
|
|
12987
|
-
if (
|
|
12993
|
+
if (existsSync22(fromNodeModules))
|
|
12988
12994
|
return fromNodeModules;
|
|
12989
12995
|
return resolve20(import.meta.dir, "./dev/client");
|
|
12990
12996
|
}, devClientDir3, hmrClientPath4, transpiler4, scriptCache, scriptSetupCache, templateCache, styleCache, persistentBuildCache, vueSourceHashCache, vueHmrMetadata, clearVueHmrCaches = () => {
|
|
@@ -13026,26 +13032,26 @@ var resolveDevClientDir3 = () => {
|
|
|
13026
13032
|
}
|
|
13027
13033
|
return "full";
|
|
13028
13034
|
}, generateVueHmrId = (sourceFilePath, vueRootDir) => relative10(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), extractImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => importPath !== undefined), inlineCssImports = (cssContent, cssFilePath, visited = new Set) => {
|
|
13029
|
-
const resolved =
|
|
13035
|
+
const resolved = realpathSync2(cssFilePath);
|
|
13030
13036
|
if (visited.has(resolved))
|
|
13031
13037
|
return "";
|
|
13032
13038
|
visited.add(resolved);
|
|
13033
13039
|
const importRegex = /@import\s+(?:url\(\s*)?(['"])(\.{1,2}\/[^'"]+)\1\s*\)?\s*;?/g;
|
|
13034
13040
|
return cssContent.replace(importRegex, (match, _quote, relPath) => {
|
|
13035
13041
|
const importedPath = resolve20(dirname13(cssFilePath), relPath);
|
|
13036
|
-
if (!
|
|
13042
|
+
if (!existsSync22(importedPath))
|
|
13037
13043
|
return match;
|
|
13038
|
-
const importedContent =
|
|
13044
|
+
const importedContent = readFileSync18(importedPath, "utf-8");
|
|
13039
13045
|
return inlineCssImports(importedContent, importedPath, visited);
|
|
13040
13046
|
});
|
|
13041
13047
|
}, resolveHelperTsPath = (sourceDir, helper) => {
|
|
13042
13048
|
if (helper.endsWith(".ts"))
|
|
13043
13049
|
return resolve20(sourceDir, helper);
|
|
13044
13050
|
const direct = resolve20(sourceDir, `${helper}.ts`);
|
|
13045
|
-
if (
|
|
13051
|
+
if (existsSync22(direct))
|
|
13046
13052
|
return direct;
|
|
13047
13053
|
const indexed = resolve20(sourceDir, helper, "index.ts");
|
|
13048
|
-
if (
|
|
13054
|
+
if (existsSync22(indexed))
|
|
13049
13055
|
return indexed;
|
|
13050
13056
|
return direct;
|
|
13051
13057
|
}, toJs = (filePath, sourceDir) => {
|
|
@@ -13061,10 +13067,10 @@ var resolveDevClientDir3 = () => {
|
|
|
13061
13067
|
}
|
|
13062
13068
|
if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
|
|
13063
13069
|
const directTs = resolve20(sourceDir, `${filePath}.ts`);
|
|
13064
|
-
if (
|
|
13070
|
+
if (existsSync22(directTs))
|
|
13065
13071
|
return `${filePath}.js`;
|
|
13066
13072
|
const indexedTs = resolve20(sourceDir, filePath, "index.ts");
|
|
13067
|
-
if (
|
|
13073
|
+
if (existsSync22(indexedTs))
|
|
13068
13074
|
return `${filePath}/index.js`;
|
|
13069
13075
|
}
|
|
13070
13076
|
return `${filePath}.js`;
|
|
@@ -13099,7 +13105,7 @@ var resolveDevClientDir3 = () => {
|
|
|
13099
13105
|
const contentHash = Bun.hash(sourceContent).toString(BASE_36_RADIX);
|
|
13100
13106
|
const prevHash = vueSourceHashCache.get(sourceFilePath);
|
|
13101
13107
|
const persistent = persistentBuildCache.get(sourceFilePath);
|
|
13102
|
-
if (prevHash === contentHash && persistent &&
|
|
13108
|
+
if (prevHash === contentHash && persistent && existsSync22(persistent.clientPath) && existsSync22(persistent.serverPath)) {
|
|
13103
13109
|
cacheMap.set(sourceFilePath, persistent);
|
|
13104
13110
|
return persistent;
|
|
13105
13111
|
}
|
|
@@ -13138,9 +13144,9 @@ var resolveDevClientDir3 = () => {
|
|
|
13138
13144
|
const hasScript = descriptor.script || descriptor.scriptSetup;
|
|
13139
13145
|
const compiledScript = hasScript ? compiler.compileScript(descriptor, {
|
|
13140
13146
|
fs: {
|
|
13141
|
-
fileExists:
|
|
13142
|
-
readFile: (file3) =>
|
|
13143
|
-
realpath:
|
|
13147
|
+
fileExists: existsSync22,
|
|
13148
|
+
readFile: (file3) => existsSync22(file3) ? readFileSync18(file3, "utf-8") : undefined,
|
|
13149
|
+
realpath: realpathSync2
|
|
13144
13150
|
},
|
|
13145
13151
|
id: componentId,
|
|
13146
13152
|
inlineTemplate: false,
|
|
@@ -13460,7 +13466,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
|
|
|
13460
13466
|
continue;
|
|
13461
13467
|
}
|
|
13462
13468
|
const resolved = resolveHelperTsPath(helperDir, dep);
|
|
13463
|
-
if (!
|
|
13469
|
+
if (!existsSync22(resolved))
|
|
13464
13470
|
continue;
|
|
13465
13471
|
if (allTsHelperPaths.has(resolved))
|
|
13466
13472
|
continue;
|
|
@@ -13978,7 +13984,7 @@ __export(exports_compileAngular, {
|
|
|
13978
13984
|
compileAngularFile: () => compileAngularFile,
|
|
13979
13985
|
compileAngular: () => compileAngular
|
|
13980
13986
|
});
|
|
13981
|
-
import { existsSync as
|
|
13987
|
+
import { existsSync as existsSync23, readFileSync as readFileSync19, promises as fs5 } from "fs";
|
|
13982
13988
|
import { join as join28, basename as basename8, sep as sep3, dirname as dirname14, resolve as resolve21, relative as relative11 } from "path";
|
|
13983
13989
|
var {Glob: Glob6 } = globalThis.Bun;
|
|
13984
13990
|
import ts10 from "typescript";
|
|
@@ -14027,7 +14033,7 @@ var traceAngularPhase = async (name, fn2, metadata) => {
|
|
|
14027
14033
|
join28(candidate, "index.js"),
|
|
14028
14034
|
join28(candidate, "index.jsx")
|
|
14029
14035
|
];
|
|
14030
|
-
return candidates.find((file3) =>
|
|
14036
|
+
return candidates.find((file3) => existsSync23(file3));
|
|
14031
14037
|
}, createLegacyAngularAnimationUsageResolver = (rootDir) => {
|
|
14032
14038
|
const baseDir = resolve21(rootDir);
|
|
14033
14039
|
const tsconfigAliases = readTsconfigPathAliases();
|
|
@@ -14108,11 +14114,11 @@ var traceAngularPhase = async (name, fn2, metadata) => {
|
|
|
14108
14114
|
}, resolveDevClientDir4 = () => {
|
|
14109
14115
|
const projectRoot = process.cwd();
|
|
14110
14116
|
const fromSource = resolve21(import.meta.dir, "../dev/client");
|
|
14111
|
-
if (
|
|
14117
|
+
if (existsSync23(fromSource) && fromSource.startsWith(projectRoot)) {
|
|
14112
14118
|
return fromSource;
|
|
14113
14119
|
}
|
|
14114
14120
|
const fromNodeModules = resolve21(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
|
|
14115
|
-
if (
|
|
14121
|
+
if (existsSync23(fromNodeModules))
|
|
14116
14122
|
return fromNodeModules;
|
|
14117
14123
|
return resolve21(import.meta.dir, "./dev/client");
|
|
14118
14124
|
}, devClientDir4, hmrClientPath5, formatDiagnosticMessage = (diagnostic) => {
|
|
@@ -14158,11 +14164,11 @@ var traceAngularPhase = async (name, fn2, metadata) => {
|
|
|
14158
14164
|
return `${path}${query}`;
|
|
14159
14165
|
const importerDir = dirname14(importerOutputPath);
|
|
14160
14166
|
const fileCandidate = resolve21(importerDir, `${path}.js`);
|
|
14161
|
-
if (outputFiles?.has(fileCandidate) ||
|
|
14167
|
+
if (outputFiles?.has(fileCandidate) || existsSync23(fileCandidate)) {
|
|
14162
14168
|
return `${path}.js${query}`;
|
|
14163
14169
|
}
|
|
14164
14170
|
const indexCandidate = resolve21(importerDir, path, "index.js");
|
|
14165
|
-
if (outputFiles?.has(indexCandidate) ||
|
|
14171
|
+
if (outputFiles?.has(indexCandidate) || existsSync23(indexCandidate)) {
|
|
14166
14172
|
return `${path}/index.js${query}`;
|
|
14167
14173
|
}
|
|
14168
14174
|
return `${path}.js${query}`;
|
|
@@ -14200,7 +14206,7 @@ var traceAngularPhase = async (name, fn2, metadata) => {
|
|
|
14200
14206
|
join28(basePath, "index.mts"),
|
|
14201
14207
|
join28(basePath, "index.cts")
|
|
14202
14208
|
];
|
|
14203
|
-
return candidates.map((candidate) => resolve21(candidate)).find((candidate) =>
|
|
14209
|
+
return candidates.map((candidate) => resolve21(candidate)).find((candidate) => existsSync23(candidate) && !candidate.endsWith(".d.ts")) ?? null;
|
|
14204
14210
|
}, readFileForAotTransform = async (fileName, readFile6) => {
|
|
14205
14211
|
const hostSource = readFile6?.(fileName);
|
|
14206
14212
|
if (typeof hostSource === "string")
|
|
@@ -14281,7 +14287,7 @@ var traceAngularPhase = async (name, fn2, metadata) => {
|
|
|
14281
14287
|
if (visited.has(resolvedPath))
|
|
14282
14288
|
return;
|
|
14283
14289
|
visited.add(resolvedPath);
|
|
14284
|
-
if (!
|
|
14290
|
+
if (!existsSync23(resolvedPath) || resolvedPath.endsWith(".d.ts"))
|
|
14285
14291
|
return;
|
|
14286
14292
|
stats.filesVisited += 1;
|
|
14287
14293
|
const source = await readFileForAotTransform(resolvedPath, readFile6);
|
|
@@ -14315,7 +14321,7 @@ var traceAngularPhase = async (name, fn2, metadata) => {
|
|
|
14315
14321
|
const outputPath = resolve21(join28(outDir, relative11(process.cwd(), resolve21(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
|
|
14316
14322
|
return [
|
|
14317
14323
|
outputPath,
|
|
14318
|
-
buildIslandMetadataExports(
|
|
14324
|
+
buildIslandMetadataExports(readFileSync19(inputPath, "utf-8"))
|
|
14319
14325
|
];
|
|
14320
14326
|
})), { entries: inputPaths.length });
|
|
14321
14327
|
await traceAngularPhase("aot/preload-compiler", () => import("@angular/compiler"));
|
|
@@ -14455,7 +14461,7 @@ var traceAngularPhase = async (name, fn2, metadata) => {
|
|
|
14455
14461
|
return null;
|
|
14456
14462
|
}, resolveAngularDeferImportSpecifier = () => {
|
|
14457
14463
|
const sourceEntry = resolve21(import.meta.dir, "../angular/components/index.ts");
|
|
14458
|
-
if (
|
|
14464
|
+
if (existsSync23(sourceEntry)) {
|
|
14459
14465
|
return sourceEntry.replace(/\\/g, "/");
|
|
14460
14466
|
}
|
|
14461
14467
|
return "@absolutejs/absolute/angular/components";
|
|
@@ -14583,7 +14589,7 @@ ${slot.resolvedBindings.map((binding) => ` "${binding.key}": this.__absoluteDef
|
|
|
14583
14589
|
${fields}
|
|
14584
14590
|
`);
|
|
14585
14591
|
}, readAndEscapeFile = async (filePath, stylePreprocessors) => {
|
|
14586
|
-
if (!
|
|
14592
|
+
if (!existsSync23(filePath)) {
|
|
14587
14593
|
throw new Error(`Unable to inline Angular style resource: file not found at ${filePath}`);
|
|
14588
14594
|
}
|
|
14589
14595
|
const content = await compileStyleFileIfNeeded(filePath, stylePreprocessors);
|
|
@@ -14592,7 +14598,7 @@ ${fields}
|
|
|
14592
14598
|
const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
|
|
14593
14599
|
if (templateUrlMatch?.[1]) {
|
|
14594
14600
|
const templatePath = join28(fileDir, templateUrlMatch[1]);
|
|
14595
|
-
if (!
|
|
14601
|
+
if (!existsSync23(templatePath)) {
|
|
14596
14602
|
throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
|
|
14597
14603
|
}
|
|
14598
14604
|
const templateRaw2 = await fs5.readFile(templatePath, "utf-8");
|
|
@@ -14623,10 +14629,10 @@ ${fields}
|
|
|
14623
14629
|
const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
|
|
14624
14630
|
if (templateUrlMatch?.[1]) {
|
|
14625
14631
|
const templatePath = join28(fileDir, templateUrlMatch[1]);
|
|
14626
|
-
if (!
|
|
14632
|
+
if (!existsSync23(templatePath)) {
|
|
14627
14633
|
throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
|
|
14628
14634
|
}
|
|
14629
|
-
const templateRaw2 =
|
|
14635
|
+
const templateRaw2 = readFileSync19(templatePath, "utf-8");
|
|
14630
14636
|
const lowered2 = lowerAngularDeferSyntax(templateRaw2);
|
|
14631
14637
|
const escaped2 = escapeTemplateContent(lowered2.template);
|
|
14632
14638
|
const replacedSource2 = source.slice(0, templateUrlMatch.index) + `template: \`${escaped2}\`` + source.slice(templateUrlMatch.index + templateUrlMatch[0].length);
|
|
@@ -14711,7 +14717,7 @@ ${fields}
|
|
|
14711
14717
|
join28(candidate, "index.js"),
|
|
14712
14718
|
join28(candidate, "index.jsx")
|
|
14713
14719
|
];
|
|
14714
|
-
return candidates.find((file3) =>
|
|
14720
|
+
return candidates.find((file3) => existsSync23(file3));
|
|
14715
14721
|
};
|
|
14716
14722
|
const resolveLocalImport = (specifier, fromDir) => {
|
|
14717
14723
|
if (specifier.startsWith(".") || specifier.startsWith("/")) {
|
|
@@ -14786,7 +14792,7 @@ ${fields}
|
|
|
14786
14792
|
if (visited.has(resolved))
|
|
14787
14793
|
return;
|
|
14788
14794
|
visited.add(resolved);
|
|
14789
|
-
if (resolved.endsWith(".json") &&
|
|
14795
|
+
if (resolved.endsWith(".json") && existsSync23(resolved)) {
|
|
14790
14796
|
const inputDir2 = dirname14(resolved);
|
|
14791
14797
|
const relativeDir2 = inputDir2.startsWith(baseDir) ? inputDir2.substring(baseDir.length + 1) : inputDir2;
|
|
14792
14798
|
const targetDir2 = join28(outDir, relativeDir2);
|
|
@@ -14799,7 +14805,7 @@ ${fields}
|
|
|
14799
14805
|
let actualPath = resolved;
|
|
14800
14806
|
if (!actualPath.endsWith(".ts"))
|
|
14801
14807
|
actualPath += ".ts";
|
|
14802
|
-
if (!
|
|
14808
|
+
if (!existsSync23(actualPath))
|
|
14803
14809
|
return;
|
|
14804
14810
|
let sourceCode = await fs5.readFile(actualPath, "utf-8");
|
|
14805
14811
|
const inlined = await inlineResources(sourceCode, dirname14(actualPath), stylePreprocessors);
|
|
@@ -14837,7 +14843,7 @@ ${fields}
|
|
|
14837
14843
|
const isEntry = resolve21(actualPath) === resolve21(entryPath);
|
|
14838
14844
|
const contentHash = Bun.hash(sourceCode).toString(BASE_36_RADIX);
|
|
14839
14845
|
const cacheKey2 = actualPath;
|
|
14840
|
-
const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey2) !== contentHash || !
|
|
14846
|
+
const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey2) !== contentHash || !existsSync23(targetPath);
|
|
14841
14847
|
if (shouldWriteFile) {
|
|
14842
14848
|
const processedContent = transpileAndRewrite(sourceCode, relativeDir, actualPath, importRewrites);
|
|
14843
14849
|
await fs5.mkdir(targetDir, { recursive: true });
|
|
@@ -14849,7 +14855,7 @@ ${fields}
|
|
|
14849
14855
|
};
|
|
14850
14856
|
await transpileFile(inputPath);
|
|
14851
14857
|
const entryOutputPath = toOutputPath(entryPath);
|
|
14852
|
-
if (
|
|
14858
|
+
if (existsSync23(entryOutputPath)) {
|
|
14853
14859
|
const entryOutput = await fs5.readFile(entryOutputPath, "utf-8");
|
|
14854
14860
|
const withoutLegacyFlag = entryOutput.replace(/\nexport const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;\n?/g, `
|
|
14855
14861
|
`);
|
|
@@ -14875,7 +14881,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
14875
14881
|
await traceAngularPhase("aot/copy-json-resources", async () => {
|
|
14876
14882
|
const cwd = process.cwd();
|
|
14877
14883
|
const angularSrcDir = resolve21(outRoot);
|
|
14878
|
-
if (!
|
|
14884
|
+
if (!existsSync23(angularSrcDir))
|
|
14879
14885
|
return;
|
|
14880
14886
|
const jsonGlob = new Glob6("**/*.json");
|
|
14881
14887
|
for (const rel of jsonGlob.scanSync({
|
|
@@ -14910,15 +14916,15 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
14910
14916
|
...candidatePaths.map((file3) => resolve21(file3)),
|
|
14911
14917
|
...compiledFallbackPaths
|
|
14912
14918
|
];
|
|
14913
|
-
let candidate = normalizedCandidates.find((file3) =>
|
|
14919
|
+
let candidate = normalizedCandidates.find((file3) => existsSync23(file3) && file3.endsWith(`${sep3}${relativeEntry}`));
|
|
14914
14920
|
if (!candidate) {
|
|
14915
|
-
candidate = normalizedCandidates.find((file3) =>
|
|
14921
|
+
candidate = normalizedCandidates.find((file3) => existsSync23(file3) && file3.endsWith(`${sep3}pages${sep3}${jsName}`));
|
|
14916
14922
|
}
|
|
14917
14923
|
if (!candidate) {
|
|
14918
|
-
candidate = normalizedCandidates.find((file3) =>
|
|
14924
|
+
candidate = normalizedCandidates.find((file3) => existsSync23(file3) && file3.endsWith(`${sep3}${jsName}`));
|
|
14919
14925
|
}
|
|
14920
14926
|
if (!candidate) {
|
|
14921
|
-
candidate = normalizedCandidates.find((file3) =>
|
|
14927
|
+
candidate = normalizedCandidates.find((file3) => existsSync23(file3));
|
|
14922
14928
|
}
|
|
14923
14929
|
return candidate;
|
|
14924
14930
|
};
|
|
@@ -14926,11 +14932,11 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
14926
14932
|
if (!rawServerFile) {
|
|
14927
14933
|
rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-fallback", () => resolveRawServerFile([]), { entry: resolvedEntry });
|
|
14928
14934
|
}
|
|
14929
|
-
if (rawServerFile && !
|
|
14935
|
+
if (rawServerFile && !existsSync23(rawServerFile)) {
|
|
14930
14936
|
outputs = hmr ? await compileEntry() : aotOutputs;
|
|
14931
14937
|
rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-retry", () => resolveRawServerFile(outputs), { entry: resolvedEntry });
|
|
14932
14938
|
}
|
|
14933
|
-
if (!rawServerFile || !
|
|
14939
|
+
if (!rawServerFile || !existsSync23(rawServerFile)) {
|
|
14934
14940
|
throw new Error(`Compiled output not found for ${entry}. Looking for: ${jsName}. Available: ${[
|
|
14935
14941
|
...outputs,
|
|
14936
14942
|
...compiledFallbackPaths
|
|
@@ -14953,7 +14959,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
14953
14959
|
const providersHashInput = providersInjection ? (() => {
|
|
14954
14960
|
let providersSourceContent = "";
|
|
14955
14961
|
try {
|
|
14956
|
-
providersSourceContent =
|
|
14962
|
+
providersSourceContent = readFileSync19(providersInjection.appProvidersSource, "utf-8");
|
|
14957
14963
|
} catch {}
|
|
14958
14964
|
return JSON.stringify({
|
|
14959
14965
|
basePath: pageInjectionForHash?.basePath ?? null,
|
|
@@ -14964,7 +14970,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
14964
14970
|
const serverContentHash = `${Bun.hash(original).toString(BASE_36_RADIX)}.${Bun.hash(providersHashInput).toString(BASE_36_RADIX)}`;
|
|
14965
14971
|
const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
|
|
14966
14972
|
const clientFile = join28(indexesDir, jsName);
|
|
14967
|
-
if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash &&
|
|
14973
|
+
if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync23(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
|
|
14968
14974
|
return {
|
|
14969
14975
|
clientPath: clientFile,
|
|
14970
14976
|
indexUnchanged: true,
|
|
@@ -15941,7 +15947,7 @@ __export(exports_fastHmrCompiler, {
|
|
|
15941
15947
|
primeComponentFingerprint: () => primeComponentFingerprint,
|
|
15942
15948
|
invalidateFingerprintCache: () => invalidateFingerprintCache
|
|
15943
15949
|
});
|
|
15944
|
-
import { existsSync as
|
|
15950
|
+
import { existsSync as existsSync24, readFileSync as readFileSync20, statSync as statSync2 } from "fs";
|
|
15945
15951
|
import { dirname as dirname15, extname as extname6, relative as relative12, resolve as resolve22 } from "path";
|
|
15946
15952
|
import ts14 from "typescript";
|
|
15947
15953
|
var fail = (reason, detail, location) => ({
|
|
@@ -16254,11 +16260,11 @@ var fail = (reason, detail, location) => ({
|
|
|
16254
16260
|
`${base}/index.tsx`
|
|
16255
16261
|
];
|
|
16256
16262
|
for (const candidate of candidates) {
|
|
16257
|
-
if (!
|
|
16263
|
+
if (!existsSync24(candidate))
|
|
16258
16264
|
continue;
|
|
16259
16265
|
let content;
|
|
16260
16266
|
try {
|
|
16261
|
-
content =
|
|
16267
|
+
content = readFileSync20(candidate, "utf-8");
|
|
16262
16268
|
} catch {
|
|
16263
16269
|
continue;
|
|
16264
16270
|
}
|
|
@@ -16837,7 +16843,7 @@ var fail = (reason, detail, location) => ({
|
|
|
16837
16843
|
return cached.info;
|
|
16838
16844
|
let source;
|
|
16839
16845
|
try {
|
|
16840
|
-
source =
|
|
16846
|
+
source = readFileSync20(filePath, "utf-8");
|
|
16841
16847
|
} catch {
|
|
16842
16848
|
childComponentInfoCache.set(cacheKey2, {
|
|
16843
16849
|
info: null,
|
|
@@ -16891,7 +16897,7 @@ var fail = (reason, detail, location) => ({
|
|
|
16891
16897
|
return cached.info;
|
|
16892
16898
|
let content;
|
|
16893
16899
|
try {
|
|
16894
|
-
content =
|
|
16900
|
+
content = readFileSync20(dtsPath, "utf-8");
|
|
16895
16901
|
} catch {
|
|
16896
16902
|
childComponentInfoCache.set(cacheKey2, {
|
|
16897
16903
|
info: null,
|
|
@@ -17007,11 +17013,11 @@ var fail = (reason, detail, location) => ({
|
|
|
17007
17013
|
if (visited.has(startDtsPath))
|
|
17008
17014
|
return null;
|
|
17009
17015
|
visited.add(startDtsPath);
|
|
17010
|
-
if (!
|
|
17016
|
+
if (!existsSync24(startDtsPath))
|
|
17011
17017
|
return null;
|
|
17012
17018
|
let content;
|
|
17013
17019
|
try {
|
|
17014
|
-
content =
|
|
17020
|
+
content = readFileSync20(startDtsPath, "utf-8");
|
|
17015
17021
|
} catch {
|
|
17016
17022
|
return null;
|
|
17017
17023
|
}
|
|
@@ -17060,16 +17066,16 @@ var fail = (reason, detail, location) => ({
|
|
|
17060
17066
|
`${base}/index.d.cts`
|
|
17061
17067
|
];
|
|
17062
17068
|
for (const c of candidates) {
|
|
17063
|
-
if (
|
|
17069
|
+
if (existsSync24(c))
|
|
17064
17070
|
return c;
|
|
17065
17071
|
}
|
|
17066
17072
|
return null;
|
|
17067
17073
|
}, findPackageDtsForJs = (jsPath) => {
|
|
17068
17074
|
const sibling = jsPath.replace(/\.[mc]?js$/, ".d.ts");
|
|
17069
|
-
if (
|
|
17075
|
+
if (existsSync24(sibling))
|
|
17070
17076
|
return sibling;
|
|
17071
17077
|
const mirror = jsPath.replace(/\/dist\//, "/dist/src/").replace(/\.[mc]?js$/, ".d.ts");
|
|
17072
|
-
if (
|
|
17078
|
+
if (existsSync24(mirror))
|
|
17073
17079
|
return mirror;
|
|
17074
17080
|
return null;
|
|
17075
17081
|
}, resolveChildComponentInfo = (className, spec, componentDir, projectRoot) => {
|
|
@@ -17082,7 +17088,7 @@ var fail = (reason, detail, location) => ({
|
|
|
17082
17088
|
`${base}/index.tsx`
|
|
17083
17089
|
];
|
|
17084
17090
|
for (const candidate of candidates) {
|
|
17085
|
-
if (!
|
|
17091
|
+
if (!existsSync24(candidate))
|
|
17086
17092
|
continue;
|
|
17087
17093
|
const info = getChildComponentInfoFromTsSource(candidate, className);
|
|
17088
17094
|
if (info)
|
|
@@ -17229,7 +17235,7 @@ var fail = (reason, detail, location) => ({
|
|
|
17229
17235
|
return cached.hasProviders;
|
|
17230
17236
|
let source;
|
|
17231
17237
|
try {
|
|
17232
|
-
source =
|
|
17238
|
+
source = readFileSync20(filePath, "utf8");
|
|
17233
17239
|
} catch {
|
|
17234
17240
|
return true;
|
|
17235
17241
|
}
|
|
@@ -17296,11 +17302,11 @@ var fail = (reason, detail, location) => ({
|
|
|
17296
17302
|
const resolved = resolve22(componentDir, spec);
|
|
17297
17303
|
for (const ext of TS_EXTENSIONS) {
|
|
17298
17304
|
const candidate = resolved + ext;
|
|
17299
|
-
if (
|
|
17305
|
+
if (existsSync24(candidate))
|
|
17300
17306
|
return candidate;
|
|
17301
17307
|
}
|
|
17302
17308
|
const indexCandidate = resolve22(resolved, "index.ts");
|
|
17303
|
-
if (
|
|
17309
|
+
if (existsSync24(indexCandidate))
|
|
17304
17310
|
return indexCandidate;
|
|
17305
17311
|
}
|
|
17306
17312
|
return null;
|
|
@@ -17533,11 +17539,11 @@ ${transpiled}
|
|
|
17533
17539
|
}${staticPatch}`;
|
|
17534
17540
|
}, STYLE_PREPROCESSED_EXT, resolveAndReadStyleResource = (componentDir, url) => {
|
|
17535
17541
|
const abs = resolve22(componentDir, url);
|
|
17536
|
-
if (!
|
|
17542
|
+
if (!existsSync24(abs))
|
|
17537
17543
|
return null;
|
|
17538
17544
|
const ext = extname6(abs).toLowerCase();
|
|
17539
17545
|
if (!STYLE_PREPROCESSED_EXT.has(ext) || ext === ".css") {
|
|
17540
|
-
return
|
|
17546
|
+
return readFileSync20(abs, "utf8");
|
|
17541
17547
|
}
|
|
17542
17548
|
try {
|
|
17543
17549
|
const { compileStyleFileIfNeededSync: compileStyleFileIfNeededSync2 } = (init_stylePreprocessor(), __toCommonJS(exports_stylePreprocessor));
|
|
@@ -17574,9 +17580,9 @@ ${block}
|
|
|
17574
17580
|
return cached;
|
|
17575
17581
|
const tsconfigPath = resolve22(projectRoot, "tsconfig.json");
|
|
17576
17582
|
const opts = {};
|
|
17577
|
-
if (
|
|
17583
|
+
if (existsSync24(tsconfigPath)) {
|
|
17578
17584
|
try {
|
|
17579
|
-
const text =
|
|
17585
|
+
const text = readFileSync20(tsconfigPath, "utf8");
|
|
17580
17586
|
const parsed = ts14.parseConfigFileTextToJson(tsconfigPath, text);
|
|
17581
17587
|
if (!parsed.error && parsed.config) {
|
|
17582
17588
|
const cfg = parsed.config;
|
|
@@ -17601,7 +17607,7 @@ ${block}
|
|
|
17601
17607
|
}, tryFastHmr = async (params) => {
|
|
17602
17608
|
const { componentFilePath, className } = params;
|
|
17603
17609
|
const projectRoot = params.projectRoot ?? process.cwd();
|
|
17604
|
-
if (!
|
|
17610
|
+
if (!existsSync24(componentFilePath)) {
|
|
17605
17611
|
return fail("file-not-found", componentFilePath);
|
|
17606
17612
|
}
|
|
17607
17613
|
let compiler;
|
|
@@ -17610,7 +17616,7 @@ ${block}
|
|
|
17610
17616
|
} catch (err) {
|
|
17611
17617
|
return fail("unexpected-error", `import @angular/compiler: ${err}`);
|
|
17612
17618
|
}
|
|
17613
|
-
const tsSource =
|
|
17619
|
+
const tsSource = readFileSync20(componentFilePath, "utf8");
|
|
17614
17620
|
const sourceFile = ts14.createSourceFile(componentFilePath, tsSource, ts14.ScriptTarget.ES2022, true, ts14.ScriptKind.TS);
|
|
17615
17621
|
const classNode = findClassDeclaration(sourceFile, className);
|
|
17616
17622
|
if (!classNode) {
|
|
@@ -17657,10 +17663,10 @@ ${block}
|
|
|
17657
17663
|
templatePath = componentFilePath;
|
|
17658
17664
|
} else if (decoratorMeta.templateUrl) {
|
|
17659
17665
|
const tplAbs = resolve22(componentDir, decoratorMeta.templateUrl);
|
|
17660
|
-
if (!
|
|
17666
|
+
if (!existsSync24(tplAbs)) {
|
|
17661
17667
|
return fail("template-resource-not-found", `Template file not found: ${tplAbs}`, { file: componentFilePath });
|
|
17662
17668
|
}
|
|
17663
|
-
templateText =
|
|
17669
|
+
templateText = readFileSync20(tplAbs, "utf8");
|
|
17664
17670
|
templatePath = tplAbs;
|
|
17665
17671
|
} else {
|
|
17666
17672
|
return fail("unsupported-decorator-args", "missing template/templateUrl");
|
|
@@ -18417,7 +18423,7 @@ __export(exports_compileEmber, {
|
|
|
18417
18423
|
clearEmberCompilerCache: () => clearEmberCompilerCache,
|
|
18418
18424
|
basename: () => basename9
|
|
18419
18425
|
});
|
|
18420
|
-
import { existsSync as
|
|
18426
|
+
import { existsSync as existsSync25 } from "fs";
|
|
18421
18427
|
import { mkdir as mkdir6, rm as rm4 } from "fs/promises";
|
|
18422
18428
|
import { basename as basename9, dirname as dirname16, extname as extname7, join as join29, resolve as resolve23 } from "path";
|
|
18423
18429
|
var {build: bunBuild2, Transpiler: Transpiler4, write: write4, file: file3 } = globalThis.Bun;
|
|
@@ -18519,7 +18525,7 @@ export const importSync = (specifier) => {
|
|
|
18519
18525
|
const extensionsToTry = ["", ".gts", ".gjs", ".ts", ".js"];
|
|
18520
18526
|
for (const ext of extensionsToTry) {
|
|
18521
18527
|
const candidate = candidateBase + ext;
|
|
18522
|
-
if (
|
|
18528
|
+
if (existsSync25(candidate))
|
|
18523
18529
|
return { path: candidate };
|
|
18524
18530
|
}
|
|
18525
18531
|
return;
|
|
@@ -18539,7 +18545,7 @@ export const importSync = (specifier) => {
|
|
|
18539
18545
|
if (standalonePackages.has(args.path))
|
|
18540
18546
|
return;
|
|
18541
18547
|
const internal = join29(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
|
|
18542
|
-
if (
|
|
18548
|
+
if (existsSync25(internal))
|
|
18543
18549
|
return { path: internal };
|
|
18544
18550
|
return;
|
|
18545
18551
|
});
|
|
@@ -18669,7 +18675,7 @@ __export(exports_buildReactVendor, {
|
|
|
18669
18675
|
computeVendorPaths: () => computeVendorPaths,
|
|
18670
18676
|
buildReactVendor: () => buildReactVendor
|
|
18671
18677
|
});
|
|
18672
|
-
import { existsSync as
|
|
18678
|
+
import { existsSync as existsSync26, mkdirSync as mkdirSync8 } from "fs";
|
|
18673
18679
|
import { join as join30, resolve as resolve24 } from "path";
|
|
18674
18680
|
import { rm as rm5 } from "fs/promises";
|
|
18675
18681
|
var {build: bunBuild3 } = globalThis.Bun;
|
|
@@ -18683,7 +18689,7 @@ var resolveJsxDevRuntimeCompatPath = () => {
|
|
|
18683
18689
|
resolve24(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
|
|
18684
18690
|
];
|
|
18685
18691
|
for (const candidate of candidates) {
|
|
18686
|
-
if (
|
|
18692
|
+
if (existsSync26(candidate)) {
|
|
18687
18693
|
return candidate.replace(/\\/g, "/");
|
|
18688
18694
|
}
|
|
18689
18695
|
}
|
|
@@ -18833,7 +18839,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
|
|
|
18833
18839
|
}
|
|
18834
18840
|
return { angular, transitiveRoots };
|
|
18835
18841
|
}, PARTIAL_DECL_MARKERS, containsPartialDeclarations = (source) => PARTIAL_DECL_MARKERS.some((marker) => source.includes(marker)), collectTransitiveAngularSpecs = async (roots, angularFound) => {
|
|
18836
|
-
const { readFileSync:
|
|
18842
|
+
const { readFileSync: readFileSync21 } = await import("fs");
|
|
18837
18843
|
const transpiler6 = new Bun.Transpiler({ loader: "js" });
|
|
18838
18844
|
const visited = new Set;
|
|
18839
18845
|
const frontier = [];
|
|
@@ -18854,7 +18860,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
|
|
|
18854
18860
|
}
|
|
18855
18861
|
let content;
|
|
18856
18862
|
try {
|
|
18857
|
-
content =
|
|
18863
|
+
content = readFileSync21(resolved, "utf-8");
|
|
18858
18864
|
} catch {
|
|
18859
18865
|
continue;
|
|
18860
18866
|
}
|
|
@@ -19059,11 +19065,11 @@ var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"
|
|
|
19059
19065
|
console.warn("\u26A0\uFE0F Vue vendor build had errors:", result.logs);
|
|
19060
19066
|
return;
|
|
19061
19067
|
}
|
|
19062
|
-
const { readFileSync:
|
|
19068
|
+
const { readFileSync: readFileSync21, writeFileSync: writeFileSync8, readdirSync: readdirSync5 } = await import("fs");
|
|
19063
19069
|
const files = readdirSync5(vendorDir).filter((f2) => f2.endsWith(".js"));
|
|
19064
19070
|
for (const file4 of files) {
|
|
19065
19071
|
const filePath = join32(vendorDir, file4);
|
|
19066
|
-
const content =
|
|
19072
|
+
const content = readFileSync21(filePath, "utf-8");
|
|
19067
19073
|
if (!content.includes("__VUE_HMR_RUNTIME__"))
|
|
19068
19074
|
continue;
|
|
19069
19075
|
const patched = content.replace(/getGlobalThis\(\)\.__VUE_HMR_RUNTIME__\s*=\s*\{/, "getGlobalThis().__VUE_HMR_RUNTIME__ = getGlobalThis().__VUE_HMR_RUNTIME__ || {");
|
|
@@ -19330,9 +19336,9 @@ var init_rewriteImportsPlugin = __esm(() => {
|
|
|
19330
19336
|
import {
|
|
19331
19337
|
copyFileSync as copyFileSync2,
|
|
19332
19338
|
cpSync,
|
|
19333
|
-
existsSync as
|
|
19339
|
+
existsSync as existsSync27,
|
|
19334
19340
|
mkdirSync as mkdirSync12,
|
|
19335
|
-
readFileSync as
|
|
19341
|
+
readFileSync as readFileSync21,
|
|
19336
19342
|
rmSync as rmSync2,
|
|
19337
19343
|
statSync as statSync3,
|
|
19338
19344
|
writeFileSync as writeFileSync8
|
|
@@ -19460,7 +19466,7 @@ var isDev, isBuildTraceEnabled = () => {
|
|
|
19460
19466
|
addWorkerPathIfExists(file4, relPath, workerPaths);
|
|
19461
19467
|
}
|
|
19462
19468
|
}, collectWorkerPathsFromFile = (file4, patterns, workerPaths) => {
|
|
19463
|
-
const content =
|
|
19469
|
+
const content = readFileSync21(file4, "utf-8");
|
|
19464
19470
|
for (const pattern of patterns) {
|
|
19465
19471
|
collectWorkerPathsFromContent(content, pattern, file4, workerPaths);
|
|
19466
19472
|
}
|
|
@@ -19503,13 +19509,13 @@ var isDev, isBuildTraceEnabled = () => {
|
|
|
19503
19509
|
copyVueDevIndexes(vueDir, vuePagesPath, vueEntries, devIndexDir);
|
|
19504
19510
|
}
|
|
19505
19511
|
}, copyReactDevIndexes = (reactIndexesPath, reactPagesPath, devIndexDir, readDir) => {
|
|
19506
|
-
if (!
|
|
19512
|
+
if (!existsSync27(reactIndexesPath)) {
|
|
19507
19513
|
return;
|
|
19508
19514
|
}
|
|
19509
19515
|
const indexFiles = readDir(reactIndexesPath).filter((file4) => file4.endsWith(".tsx"));
|
|
19510
19516
|
const pagesRel = relative13(process.cwd(), resolve25(reactPagesPath)).replace(/\\/g, "/");
|
|
19511
19517
|
for (const file4 of indexFiles) {
|
|
19512
|
-
let content =
|
|
19518
|
+
let content = readFileSync21(join35(reactIndexesPath, file4), "utf-8");
|
|
19513
19519
|
content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
|
|
19514
19520
|
writeFileSync8(join35(devIndexDir, file4), content);
|
|
19515
19521
|
}
|
|
@@ -19519,9 +19525,9 @@ var isDev, isBuildTraceEnabled = () => {
|
|
|
19519
19525
|
for (const entry of sveltePageEntries) {
|
|
19520
19526
|
const name = basename10(entry).replace(/\.svelte(\.(ts|js))?$/, "");
|
|
19521
19527
|
const indexFile = join35(svelteIndexDir, "pages", `${name}.js`);
|
|
19522
|
-
if (!
|
|
19528
|
+
if (!existsSync27(indexFile))
|
|
19523
19529
|
continue;
|
|
19524
|
-
let content =
|
|
19530
|
+
let content = readFileSync21(indexFile, "utf-8");
|
|
19525
19531
|
const srcRel = relative13(process.cwd(), resolve25(entry)).replace(/\\/g, "/");
|
|
19526
19532
|
content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
|
|
19527
19533
|
writeFileSync8(join35(devIndexDir, `${name}.svelte.js`), content);
|
|
@@ -19532,9 +19538,9 @@ var isDev, isBuildTraceEnabled = () => {
|
|
|
19532
19538
|
for (const entry of vuePageEntries) {
|
|
19533
19539
|
const name = basename10(entry, ".vue");
|
|
19534
19540
|
const indexFile = join35(vueIndexDir, `${name}.js`);
|
|
19535
|
-
if (!
|
|
19541
|
+
if (!existsSync27(indexFile))
|
|
19536
19542
|
continue;
|
|
19537
|
-
let content =
|
|
19543
|
+
let content = readFileSync21(indexFile, "utf-8");
|
|
19538
19544
|
const srcRel = relative13(process.cwd(), resolve25(entry)).replace(/\\/g, "/");
|
|
19539
19545
|
content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
|
|
19540
19546
|
writeFileSync8(join35(devIndexDir, `${name}.vue.js`), content);
|
|
@@ -19585,7 +19591,7 @@ var isDev, isBuildTraceEnabled = () => {
|
|
|
19585
19591
|
}
|
|
19586
19592
|
return result;
|
|
19587
19593
|
}, VUE_HMR_RUNTIME, injectVueComposableTracking = (outputPath, projectRoot) => {
|
|
19588
|
-
let content =
|
|
19594
|
+
let content = readFileSync21(outputPath, "utf-8");
|
|
19589
19595
|
const usePattern = /^var\s+(use[A-Z]\w*)\s*=/gm;
|
|
19590
19596
|
const useNames = [];
|
|
19591
19597
|
let match;
|
|
@@ -19635,7 +19641,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
19635
19641
|
}, rewriteUrlReferences = (outputPaths, urlFileMap) => {
|
|
19636
19642
|
const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
|
|
19637
19643
|
for (const outputPath of outputPaths) {
|
|
19638
|
-
let content =
|
|
19644
|
+
let content = readFileSync21(outputPath, "utf-8");
|
|
19639
19645
|
let changed = false;
|
|
19640
19646
|
content = content.replace(urlPattern, (_match, relPath) => {
|
|
19641
19647
|
const targetName = basename10(relPath);
|
|
@@ -20763,7 +20769,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
20763
20769
|
const injectHMRIntoHTMLFile = (filePath, framework) => {
|
|
20764
20770
|
if (!hmrClientBundle)
|
|
20765
20771
|
return;
|
|
20766
|
-
let html =
|
|
20772
|
+
let html = readFileSync21(filePath, "utf-8");
|
|
20767
20773
|
if (html.includes("data-hmr-client"))
|
|
20768
20774
|
return;
|
|
20769
20775
|
const tag = `<script>window.__HMR_FRAMEWORK__="${framework}";</script><script data-hmr-client>${hmrClientBundle}</script>`;
|
|
@@ -20994,7 +21000,7 @@ var init_build = __esm(() => {
|
|
|
20994
21000
|
});
|
|
20995
21001
|
|
|
20996
21002
|
// src/build/buildEmberVendor.ts
|
|
20997
|
-
import { mkdirSync as mkdirSync13, existsSync as
|
|
21003
|
+
import { mkdirSync as mkdirSync13, existsSync as existsSync28 } from "fs";
|
|
20998
21004
|
import { join as join36 } from "path";
|
|
20999
21005
|
import { rm as rm9 } from "fs/promises";
|
|
21000
21006
|
var {build: bunBuild8 } = globalThis.Bun;
|
|
@@ -21048,7 +21054,7 @@ export const importSync = (specifier) => {
|
|
|
21048
21054
|
return { resolveTo: specifier, specifier };
|
|
21049
21055
|
}
|
|
21050
21056
|
const emberInternalPath = join36(cwd2, "node_modules/ember-source/dist/packages", specifier, "index.js");
|
|
21051
|
-
if (!
|
|
21057
|
+
if (!existsSync28(emberInternalPath)) {
|
|
21052
21058
|
throw new Error(`Ember vendor build: cannot find ${specifier} at ${emberInternalPath}. ` + `Is ember-source installed and at least 6.12?`);
|
|
21053
21059
|
}
|
|
21054
21060
|
return { resolveTo: emberInternalPath, specifier };
|
|
@@ -21080,7 +21086,7 @@ export const importSync = (specifier) => {
|
|
|
21080
21086
|
return;
|
|
21081
21087
|
}
|
|
21082
21088
|
const internal = join36(cwd2, "node_modules/ember-source/dist/packages", args.path, "index.js");
|
|
21083
|
-
if (
|
|
21089
|
+
if (existsSync28(internal)) {
|
|
21084
21090
|
return { path: internal };
|
|
21085
21091
|
}
|
|
21086
21092
|
return;
|
|
@@ -21149,7 +21155,7 @@ __export(exports_dependencyGraph, {
|
|
|
21149
21155
|
buildInitialDependencyGraph: () => buildInitialDependencyGraph,
|
|
21150
21156
|
addFileToGraph: () => addFileToGraph
|
|
21151
21157
|
});
|
|
21152
|
-
import { existsSync as
|
|
21158
|
+
import { existsSync as existsSync29, readFileSync as readFileSync22 } from "fs";
|
|
21153
21159
|
var {Glob: Glob9 } = globalThis.Bun;
|
|
21154
21160
|
import { resolve as resolve26 } from "path";
|
|
21155
21161
|
var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
|
|
@@ -21179,10 +21185,10 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
|
|
|
21179
21185
|
];
|
|
21180
21186
|
for (const ext of extensions) {
|
|
21181
21187
|
const withExt = normalized + ext;
|
|
21182
|
-
if (
|
|
21188
|
+
if (existsSync29(withExt))
|
|
21183
21189
|
return withExt;
|
|
21184
21190
|
}
|
|
21185
|
-
if (
|
|
21191
|
+
if (existsSync29(normalized))
|
|
21186
21192
|
return normalized;
|
|
21187
21193
|
return null;
|
|
21188
21194
|
}, clearExistingDependents = (graph, normalizedPath) => {
|
|
@@ -21197,7 +21203,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
|
|
|
21197
21203
|
}
|
|
21198
21204
|
}, addFileToGraph = (graph, filePath) => {
|
|
21199
21205
|
const normalizedPath = resolve26(filePath);
|
|
21200
|
-
if (!
|
|
21206
|
+
if (!existsSync29(normalizedPath))
|
|
21201
21207
|
return;
|
|
21202
21208
|
const dependencies = extractDependencies(normalizedPath);
|
|
21203
21209
|
clearExistingDependents(graph, normalizedPath);
|
|
@@ -21223,7 +21229,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
|
|
|
21223
21229
|
}, IGNORED_SEGMENTS, buildInitialDependencyGraph = (graph, directories) => {
|
|
21224
21230
|
const processedFiles = new Set;
|
|
21225
21231
|
const glob = new Glob9("**/*.{ts,tsx,js,jsx,vue,svelte,html,htm}");
|
|
21226
|
-
const resolvedDirs = directories.map((dir) => resolve26(dir)).filter((dir) =>
|
|
21232
|
+
const resolvedDirs = directories.map((dir) => resolve26(dir)).filter((dir) => existsSync29(dir));
|
|
21227
21233
|
const allFiles = resolvedDirs.flatMap((dir) => Array.from(glob.scanSync({ absolute: true, cwd: dir })));
|
|
21228
21234
|
for (const file4 of allFiles) {
|
|
21229
21235
|
const fullPath = resolve26(file4);
|
|
@@ -21320,15 +21326,15 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
|
|
|
21320
21326
|
const lowerPath = filePath.toLowerCase();
|
|
21321
21327
|
const isSvelteOrVue = lowerPath.endsWith(".svelte") || lowerPath.endsWith(".vue");
|
|
21322
21328
|
if (loader === "html") {
|
|
21323
|
-
const content =
|
|
21329
|
+
const content = readFileSync22(filePath, "utf-8");
|
|
21324
21330
|
return extractHtmlDependencies(filePath, content);
|
|
21325
21331
|
}
|
|
21326
21332
|
if (loader === "tsx" || loader === "js") {
|
|
21327
|
-
const content =
|
|
21333
|
+
const content = readFileSync22(filePath, "utf-8");
|
|
21328
21334
|
return extractJsDependencies(filePath, content, loader);
|
|
21329
21335
|
}
|
|
21330
21336
|
if (isSvelteOrVue) {
|
|
21331
|
-
const content =
|
|
21337
|
+
const content = readFileSync22(filePath, "utf-8");
|
|
21332
21338
|
return extractSvelteVueDependencies(filePath, content);
|
|
21333
21339
|
}
|
|
21334
21340
|
return [];
|
|
@@ -21471,7 +21477,7 @@ var init_clientManager = __esm(() => {
|
|
|
21471
21477
|
});
|
|
21472
21478
|
|
|
21473
21479
|
// src/dev/pathUtils.ts
|
|
21474
|
-
import { existsSync as
|
|
21480
|
+
import { existsSync as existsSync30, readdirSync as readdirSync5, readFileSync as readFileSync23 } from "fs";
|
|
21475
21481
|
import { dirname as dirname18, resolve as resolve28 } from "path";
|
|
21476
21482
|
var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
|
|
21477
21483
|
if (shouldIgnorePath(filePath, resolved)) {
|
|
@@ -21571,7 +21577,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
|
|
|
21571
21577
|
}
|
|
21572
21578
|
let source;
|
|
21573
21579
|
try {
|
|
21574
|
-
source =
|
|
21580
|
+
source = readFileSync23(full, "utf8");
|
|
21575
21581
|
} catch {
|
|
21576
21582
|
continue;
|
|
21577
21583
|
}
|
|
@@ -21645,7 +21651,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
|
|
|
21645
21651
|
push(cfg.stylesDir);
|
|
21646
21652
|
for (const candidate of ["src", "db", "assets", "styles"]) {
|
|
21647
21653
|
const abs = normalizePath(resolve28(cwd2, candidate));
|
|
21648
|
-
if (
|
|
21654
|
+
if (existsSync30(abs) && !roots.includes(abs))
|
|
21649
21655
|
roots.push(abs);
|
|
21650
21656
|
}
|
|
21651
21657
|
try {
|
|
@@ -21730,7 +21736,7 @@ var init_pathUtils = __esm(() => {
|
|
|
21730
21736
|
|
|
21731
21737
|
// src/dev/fileWatcher.ts
|
|
21732
21738
|
import { watch } from "fs";
|
|
21733
|
-
import { existsSync as
|
|
21739
|
+
import { existsSync as existsSync31, readdirSync as readdirSync6, statSync as statSync4 } from "fs";
|
|
21734
21740
|
import { dirname as dirname19, join as join37, resolve as resolve29 } from "path";
|
|
21735
21741
|
var safeRemoveFromGraph = (graph, fullPath) => {
|
|
21736
21742
|
try {
|
|
@@ -21798,12 +21804,12 @@ var safeRemoveFromGraph = (graph, fullPath) => {
|
|
|
21798
21804
|
if (shouldIgnorePath(fullPath, state.resolvedPaths)) {
|
|
21799
21805
|
return;
|
|
21800
21806
|
}
|
|
21801
|
-
if (event === "rename" && !
|
|
21807
|
+
if (event === "rename" && !existsSync31(fullPath)) {
|
|
21802
21808
|
safeRemoveFromGraph(state.dependencyGraph, fullPath);
|
|
21803
21809
|
onFileChange(fullPath);
|
|
21804
21810
|
return;
|
|
21805
21811
|
}
|
|
21806
|
-
if (
|
|
21812
|
+
if (existsSync31(fullPath)) {
|
|
21807
21813
|
onFileChange(fullPath);
|
|
21808
21814
|
safeAddToGraph(state.dependencyGraph, fullPath);
|
|
21809
21815
|
}
|
|
@@ -21813,7 +21819,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
|
|
|
21813
21819
|
const stylesDir = state.resolvedPaths?.stylesDir;
|
|
21814
21820
|
paths.forEach((path) => {
|
|
21815
21821
|
const absolutePath = resolve29(path).replace(/\\/g, "/");
|
|
21816
|
-
if (!
|
|
21822
|
+
if (!existsSync31(absolutePath)) {
|
|
21817
21823
|
return;
|
|
21818
21824
|
}
|
|
21819
21825
|
const isStylesDir = Boolean(stylesDir && absolutePath.startsWith(stylesDir));
|
|
@@ -21824,7 +21830,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
|
|
|
21824
21830
|
const stylesDir = state.resolvedPaths?.stylesDir;
|
|
21825
21831
|
watchPaths.forEach((path) => {
|
|
21826
21832
|
const absolutePath = resolve29(path).replace(/\\/g, "/");
|
|
21827
|
-
if (!
|
|
21833
|
+
if (!existsSync31(absolutePath)) {
|
|
21828
21834
|
return;
|
|
21829
21835
|
}
|
|
21830
21836
|
const isStylesDir = Boolean(stylesDir && absolutePath.startsWith(stylesDir));
|
|
@@ -21946,7 +21952,7 @@ var init_assetStore = __esm(() => {
|
|
|
21946
21952
|
});
|
|
21947
21953
|
|
|
21948
21954
|
// src/islands/pageMetadata.ts
|
|
21949
|
-
import { readFileSync as
|
|
21955
|
+
import { readFileSync as readFileSync24 } from "fs";
|
|
21950
21956
|
import { dirname as dirname20, resolve as resolve31 } from "path";
|
|
21951
21957
|
var pagePatterns, getPageDirs = (config) => [
|
|
21952
21958
|
{ dir: config.angularDirectory, framework: "angular" },
|
|
@@ -21989,7 +21995,7 @@ var pagePatterns, getPageDirs = (config) => [
|
|
|
21989
21995
|
return;
|
|
21990
21996
|
const files = await scanEntryPoints(resolve31(entry.dir), pattern);
|
|
21991
21997
|
for (const filePath of files) {
|
|
21992
|
-
const source =
|
|
21998
|
+
const source = readFileSync24(filePath, "utf-8");
|
|
21993
21999
|
const islands = extractIslandUsagesFromSource(source);
|
|
21994
22000
|
pageMetadata.set(resolve31(filePath), {
|
|
21995
22001
|
islands: resolveIslandUsages(islands, islandSourceLookup),
|
|
@@ -22020,10 +22026,10 @@ var init_pageMetadata = __esm(() => {
|
|
|
22020
22026
|
});
|
|
22021
22027
|
|
|
22022
22028
|
// src/dev/fileHashTracker.ts
|
|
22023
|
-
import { readFileSync as
|
|
22029
|
+
import { readFileSync as readFileSync25 } from "fs";
|
|
22024
22030
|
var computeFileHash = (filePath) => {
|
|
22025
22031
|
try {
|
|
22026
|
-
const fileContent =
|
|
22032
|
+
const fileContent = readFileSync25(filePath);
|
|
22027
22033
|
return Number(Bun.hash(fileContent));
|
|
22028
22034
|
} catch {
|
|
22029
22035
|
return UNFOUND_INDEX;
|
|
@@ -22237,7 +22243,7 @@ __export(exports_resolveOwningComponents, {
|
|
|
22237
22243
|
resolveDescendantsOfParent: () => resolveDescendantsOfParent,
|
|
22238
22244
|
invalidateResourceIndex: () => invalidateResourceIndex
|
|
22239
22245
|
});
|
|
22240
|
-
import { readdirSync as readdirSync7, readFileSync as
|
|
22246
|
+
import { readdirSync as readdirSync7, readFileSync as readFileSync26, statSync as statSync5 } from "fs";
|
|
22241
22247
|
import { dirname as dirname21, extname as extname9, join as join38, resolve as resolve34 } from "path";
|
|
22242
22248
|
import ts15 from "typescript";
|
|
22243
22249
|
var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") || file4.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
|
|
@@ -22297,7 +22303,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") ||
|
|
|
22297
22303
|
}, parseDecoratedClasses = (filePath) => {
|
|
22298
22304
|
let source;
|
|
22299
22305
|
try {
|
|
22300
|
-
source =
|
|
22306
|
+
source = readFileSync26(filePath, "utf8");
|
|
22301
22307
|
} catch {
|
|
22302
22308
|
return [];
|
|
22303
22309
|
}
|
|
@@ -22387,7 +22393,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") ||
|
|
|
22387
22393
|
}, indexByRoot, resolveParentClassFile = (parentName, childFilePath, angularRoot) => {
|
|
22388
22394
|
let source;
|
|
22389
22395
|
try {
|
|
22390
|
-
source =
|
|
22396
|
+
source = readFileSync26(childFilePath, "utf8");
|
|
22391
22397
|
} catch {
|
|
22392
22398
|
return null;
|
|
22393
22399
|
}
|
|
@@ -22754,7 +22760,7 @@ __export(exports_moduleServer, {
|
|
|
22754
22760
|
createModuleServer: () => createModuleServer,
|
|
22755
22761
|
SRC_URL_PREFIX: () => SRC_URL_PREFIX
|
|
22756
22762
|
});
|
|
22757
|
-
import { existsSync as
|
|
22763
|
+
import { existsSync as existsSync32, readFileSync as readFileSync27, realpathSync as realpathSync3, statSync as statSync6 } from "fs";
|
|
22758
22764
|
import { basename as basename12, dirname as dirname22, extname as extname10, join as join39, resolve as resolve36, relative as relative14 } from "path";
|
|
22759
22765
|
var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
|
|
22760
22766
|
const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
|
|
@@ -22775,8 +22781,13 @@ var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPIL
|
|
|
22775
22781
|
${stubs}
|
|
22776
22782
|
`;
|
|
22777
22783
|
}, resolveRelativeExtension = (srcPath, projectRoot, extensions) => {
|
|
22778
|
-
const
|
|
22779
|
-
|
|
22784
|
+
const directHit = extensions.find((ext) => existsSync32(resolve36(projectRoot, srcPath + ext)));
|
|
22785
|
+
if (directHit)
|
|
22786
|
+
return srcPath + directHit;
|
|
22787
|
+
const indexHit = extensions.find((ext) => existsSync32(resolve36(projectRoot, srcPath, `index${ext}`)));
|
|
22788
|
+
if (indexHit)
|
|
22789
|
+
return `${srcPath}/index${indexHit}`;
|
|
22790
|
+
return srcPath;
|
|
22780
22791
|
}, IMPORT_EXTENSIONS, SIDE_EFFECT_EXTENSIONS, MODULE_EXTENSIONS, RESOLVED_MODULE_EXTENSIONS, REACT_EXTENSIONS, escapeRegex3 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), buildImportRewriter = (vendorPaths) => {
|
|
22781
22792
|
const entries = Object.entries(vendorPaths).sort(([a], [b2]) => b2.length - a.length);
|
|
22782
22793
|
if (entries.length === 0)
|
|
@@ -22828,12 +22839,12 @@ ${stubs}
|
|
|
22828
22839
|
if (!subpath) {
|
|
22829
22840
|
const pkgDir = resolve36(projectRoot, "node_modules", packageName ?? "");
|
|
22830
22841
|
const pkgJsonPath = join39(pkgDir, "package.json");
|
|
22831
|
-
if (
|
|
22832
|
-
const pkg = JSON.parse(
|
|
22842
|
+
if (existsSync32(pkgJsonPath)) {
|
|
22843
|
+
const pkg = JSON.parse(readFileSync27(pkgJsonPath, "utf-8"));
|
|
22833
22844
|
const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
|
|
22834
22845
|
if (esmEntry) {
|
|
22835
22846
|
const resolved = resolve36(pkgDir, esmEntry);
|
|
22836
|
-
if (
|
|
22847
|
+
if (existsSync32(resolved))
|
|
22837
22848
|
return relative14(projectRoot, resolved);
|
|
22838
22849
|
}
|
|
22839
22850
|
}
|
|
@@ -22930,7 +22941,7 @@ ${code}`;
|
|
|
22930
22941
|
reactFastRefreshWarningEmitted = true;
|
|
22931
22942
|
logWarn("React HMR is blocked: this Bun build ignores " + "`reactFastRefresh` on Bun.Transpiler, so component state " + "cannot be preserved across edits. Tracking " + "https://github.com/oven-sh/bun/pull/28312 \u2014 if it still has " + "not merged, leave a \uD83D\uDC4D on the PR so the Bun team knows it " + "is blocking you. Until then, React edits trigger a full " + "reload instead of a fast refresh.");
|
|
22932
22943
|
}, transformReactFile = (filePath, projectRoot, rewriter) => {
|
|
22933
|
-
const raw =
|
|
22944
|
+
const raw = readFileSync27(filePath, "utf-8");
|
|
22934
22945
|
const valueExports = tsxTranspiler.scan(raw).exports;
|
|
22935
22946
|
let transpiled = reactTranspiler.transformSync(raw);
|
|
22936
22947
|
transpiled = preserveTypeExports(raw, transpiled, valueExports);
|
|
@@ -22946,7 +22957,7 @@ ${transpiled}`;
|
|
|
22946
22957
|
transpiled += buildIslandMetadataExports(raw);
|
|
22947
22958
|
return rewriteImports(transpiled, filePath, projectRoot, rewriter);
|
|
22948
22959
|
}, transformPlainFile = (filePath, projectRoot, rewriter, vueDir) => {
|
|
22949
|
-
const raw =
|
|
22960
|
+
const raw = readFileSync27(filePath, "utf-8");
|
|
22950
22961
|
const ext = extname10(filePath);
|
|
22951
22962
|
const isTS = ext === ".ts" || ext === ".tsx";
|
|
22952
22963
|
const isTSX = ext === ".tsx" || ext === ".jsx";
|
|
@@ -23112,7 +23123,7 @@ ${code}`;
|
|
|
23112
23123
|
` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
|
|
23113
23124
|
return code.replace(/import\.meta\.hot\.accept\(/g, "__hmr_accept(");
|
|
23114
23125
|
}, transformSvelteFile = async (filePath, projectRoot, rewriter, stylePreprocessors) => {
|
|
23115
|
-
const raw =
|
|
23126
|
+
const raw = readFileSync27(filePath, "utf-8");
|
|
23116
23127
|
if (!svelteCompiler) {
|
|
23117
23128
|
svelteCompiler = await import("svelte/compiler");
|
|
23118
23129
|
}
|
|
@@ -23174,7 +23185,7 @@ export default __script__;`;
|
|
|
23174
23185
|
return `${cssInjection}
|
|
23175
23186
|
${code}`;
|
|
23176
23187
|
}, transformVueFile = async (filePath, projectRoot, rewriter, vueDir, stylePreprocessors) => {
|
|
23177
|
-
const rawSource =
|
|
23188
|
+
const rawSource = readFileSync27(filePath, "utf-8");
|
|
23178
23189
|
const raw = addAutoRouterSetupApp(rawSource);
|
|
23179
23190
|
if (!vueCompiler) {
|
|
23180
23191
|
vueCompiler = await import("@vue/compiler-sfc");
|
|
@@ -23184,6 +23195,11 @@ ${code}`;
|
|
|
23184
23195
|
const { descriptor } = vueCompiler.parse(raw, { filename: filePath });
|
|
23185
23196
|
const hasScript = descriptor.script || descriptor.scriptSetup;
|
|
23186
23197
|
const compiledScript = hasScript ? vueCompiler.compileScript(descriptor, {
|
|
23198
|
+
fs: {
|
|
23199
|
+
fileExists: existsSync32,
|
|
23200
|
+
readFile: (file4) => existsSync32(file4) ? readFileSync27(file4, "utf-8") : undefined,
|
|
23201
|
+
realpath: realpathSync3
|
|
23202
|
+
},
|
|
23187
23203
|
id: componentId,
|
|
23188
23204
|
inlineTemplate: false
|
|
23189
23205
|
}) : { bindings: {}, content: "export default {};" };
|
|
@@ -23212,11 +23228,11 @@ ${code}`;
|
|
|
23212
23228
|
`);
|
|
23213
23229
|
return result;
|
|
23214
23230
|
}, resolveSvelteModulePath = (path) => {
|
|
23215
|
-
if (
|
|
23231
|
+
if (existsSync32(path))
|
|
23216
23232
|
return path;
|
|
23217
|
-
if (
|
|
23233
|
+
if (existsSync32(`${path}.ts`))
|
|
23218
23234
|
return `${path}.ts`;
|
|
23219
|
-
if (
|
|
23235
|
+
if (existsSync32(`${path}.js`))
|
|
23220
23236
|
return `${path}.js`;
|
|
23221
23237
|
return path;
|
|
23222
23238
|
}, jsResponse = (body) => {
|
|
@@ -23229,7 +23245,7 @@ ${code}`;
|
|
|
23229
23245
|
}
|
|
23230
23246
|
});
|
|
23231
23247
|
}, handleCssRequest = (filePath) => {
|
|
23232
|
-
const raw =
|
|
23248
|
+
const raw = readFileSync27(filePath, "utf-8");
|
|
23233
23249
|
const escaped = raw.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
|
|
23234
23250
|
return [
|
|
23235
23251
|
`const style = document.createElement('style');`,
|
|
@@ -23367,7 +23383,7 @@ export default {};
|
|
|
23367
23383
|
return { ext, filePath: resolveSvelteModulePath(filePath) };
|
|
23368
23384
|
if (ext)
|
|
23369
23385
|
return { ext, filePath };
|
|
23370
|
-
const found = MODULE_EXTENSIONS.find((candidate) =>
|
|
23386
|
+
const found = MODULE_EXTENSIONS.find((candidate) => existsSync32(filePath + candidate));
|
|
23371
23387
|
if (!found)
|
|
23372
23388
|
return { ext, filePath };
|
|
23373
23389
|
const resolved = filePath + found;
|
|
@@ -23887,7 +23903,7 @@ var handleHTMXUpdate = async (htmxFilePath) => {
|
|
|
23887
23903
|
var init_simpleHTMXHMR = () => {};
|
|
23888
23904
|
|
|
23889
23905
|
// src/dev/rebuildTrigger.ts
|
|
23890
|
-
import { existsSync as
|
|
23906
|
+
import { existsSync as existsSync33, rmSync as rmSync3 } from "fs";
|
|
23891
23907
|
import { basename as basename13, dirname as dirname24, join as join40, relative as relative16, resolve as resolve40, sep as sep4 } from "path";
|
|
23892
23908
|
var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequentially = (items, action) => items.reduce((chain, item) => chain.then(() => action(item)), Promise.resolve()), getStyleTransformConfig = (config) => createStyleTransformConfig(config.stylePreprocessors, config.postcss), recompileTailwindForFastPath = async (state, config, files) => {
|
|
23893
23909
|
if (!config.tailwind)
|
|
@@ -23987,7 +24003,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
23987
24003
|
detectedFw = detected !== "ignored" ? detected : affectedFrameworks[0];
|
|
23988
24004
|
}
|
|
23989
24005
|
return { ...parsed, framework: detectedFw };
|
|
23990
|
-
}, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) &&
|
|
24006
|
+
}, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) && existsSync33(affectedFile), FRAMEWORK_DIR_KEYS_FOR_CLEANUP, removeStaleGenerated = (state, deletedFile) => {
|
|
23991
24007
|
const config = state.config;
|
|
23992
24008
|
const cwd2 = process.cwd();
|
|
23993
24009
|
const absDeleted = resolve40(deletedFile).replace(/\\/g, "/");
|
|
@@ -24033,7 +24049,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
24033
24049
|
if (!dependents || dependents.size === 0) {
|
|
24034
24050
|
return;
|
|
24035
24051
|
}
|
|
24036
|
-
const dependentFiles = Array.from(dependents).filter((file4) =>
|
|
24052
|
+
const dependentFiles = Array.from(dependents).filter((file4) => existsSync33(file4));
|
|
24037
24053
|
if (dependentFiles.length === 0) {
|
|
24038
24054
|
return;
|
|
24039
24055
|
}
|
|
@@ -24049,7 +24065,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
24049
24065
|
try {
|
|
24050
24066
|
const affectedFiles = getAffectedFiles(state.dependencyGraph, normalizedFilePath);
|
|
24051
24067
|
affectedFiles.forEach((affectedFile) => {
|
|
24052
|
-
if (!processedFiles.has(affectedFile) && affectedFile !== normalizedFilePath &&
|
|
24068
|
+
if (!processedFiles.has(affectedFile) && affectedFile !== normalizedFilePath && existsSync33(affectedFile)) {
|
|
24053
24069
|
validFiles.push(affectedFile);
|
|
24054
24070
|
processedFiles.add(affectedFile);
|
|
24055
24071
|
}
|
|
@@ -24074,7 +24090,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
24074
24090
|
collectChangedFileAffected(state, normalizedFilePath, processedFiles, validFiles);
|
|
24075
24091
|
}, processFilePathSet = (state, filePathSet, processedFiles, validFiles) => {
|
|
24076
24092
|
filePathSet.forEach((filePathInSet) => {
|
|
24077
|
-
if (!
|
|
24093
|
+
if (!existsSync33(filePathInSet)) {
|
|
24078
24094
|
collectDeletedFileAffected(state, filePathInSet, processedFiles, validFiles);
|
|
24079
24095
|
return;
|
|
24080
24096
|
}
|
|
@@ -24328,7 +24344,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
24328
24344
|
return componentFile;
|
|
24329
24345
|
}
|
|
24330
24346
|
const tsCounterpart = componentFile.replace(/\.html$/, ".ts");
|
|
24331
|
-
if (
|
|
24347
|
+
if (existsSync33(tsCounterpart)) {
|
|
24332
24348
|
return tsCounterpart;
|
|
24333
24349
|
}
|
|
24334
24350
|
if (!graph)
|
|
@@ -26408,7 +26424,7 @@ var toSafeFileName6 = (specifier) => {
|
|
|
26408
26424
|
framework: Array.from(framework).filter(isResolvable4)
|
|
26409
26425
|
};
|
|
26410
26426
|
}, collectTransitiveImports = async (specs, alreadyVendored, alreadyScanned) => {
|
|
26411
|
-
const { readFileSync:
|
|
26427
|
+
const { readFileSync: readFileSync28 } = await import("fs");
|
|
26412
26428
|
const transpiler6 = new Bun.Transpiler({ loader: "js" });
|
|
26413
26429
|
const newSpecs = new Set;
|
|
26414
26430
|
for (const spec of specs) {
|
|
@@ -26423,7 +26439,7 @@ var toSafeFileName6 = (specifier) => {
|
|
|
26423
26439
|
}
|
|
26424
26440
|
let content;
|
|
26425
26441
|
try {
|
|
26426
|
-
content =
|
|
26442
|
+
content = readFileSync28(resolved, "utf-8");
|
|
26427
26443
|
} catch {
|
|
26428
26444
|
continue;
|
|
26429
26445
|
}
|
|
@@ -27040,5 +27056,5 @@ export {
|
|
|
27040
27056
|
build
|
|
27041
27057
|
};
|
|
27042
27058
|
|
|
27043
|
-
//# debugId=
|
|
27059
|
+
//# debugId=CC61D4582E46710F64756E2164756E21
|
|
27044
27060
|
//# sourceMappingURL=build.js.map
|