@absolutejs/absolute 0.20.0-beta.64 → 0.20.0-beta.65
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/cli/index.js +17199 -328
- package/dist/index.js +162 -126
- package/dist/index.js.map +3 -3
- package/dist/mobile/index.js +17022 -247
- package/dist/mobile/index.js.map +51 -6
- package/dist/mobile/remoteMacAgentEntry.js +196 -189
- package/dist/src/mobile/capacitorBundle.d.ts +6 -0
- package/dist/src/mobile/config.d.ts +6 -0
- package/dist/src/mobile/expoCodeSigning.d.ts +14 -0
- package/dist/src/mobile/index.d.ts +1 -0
- package/dist/types/build.d.ts +7 -0
- package/package.json +8 -7
package/dist/index.js
CHANGED
|
@@ -9048,8 +9048,9 @@ var init_loadConfig = __esm(() => {
|
|
|
9048
9048
|
});
|
|
9049
9049
|
|
|
9050
9050
|
// src/mobile/config.ts
|
|
9051
|
+
import { readFileSync as readFileSync10 } from "fs";
|
|
9051
9052
|
import { resolve as resolve11 } from "path";
|
|
9052
|
-
import { createPublicKey } from "crypto";
|
|
9053
|
+
import { createHash as createHash5, createPublicKey, X509Certificate } from "crypto";
|
|
9053
9054
|
var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FINGERPRINT_PATTERN, UPDATE_NAME_PATTERN, UPDATE_PUBLIC_KEY_PATTERN, DEFAULT_UPDATE_BOOT_TIMEOUT_MS = 20000, MINIMUM_UPDATE_BOOT_TIMEOUT_MS = 5000, MAXIMUM_UPDATE_BOOT_TIMEOUT_MS = 120000, HOSTNAME_PATTERN, EXPO_RESERVED_ROUTE_PREFIXES, resolveProjectPath = (projectRoot, value, field) => {
|
|
9054
9055
|
const root = resolve11(projectRoot);
|
|
9055
9056
|
const path = resolve11(root, value);
|
|
@@ -9123,7 +9124,20 @@ var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FIN
|
|
|
9123
9124
|
}
|
|
9124
9125
|
return value.match(/.{2}/g)?.join(":") ?? value;
|
|
9125
9126
|
}))
|
|
9126
|
-
].sort(),
|
|
9127
|
+
].sort(), readExpoCodeSigningCertificate = (certificatePath) => {
|
|
9128
|
+
try {
|
|
9129
|
+
const certificateSource = readFileSync10(certificatePath, "utf8");
|
|
9130
|
+
const certificatePem = certificateSource.endsWith(`
|
|
9131
|
+
`) ? certificateSource : `${certificateSource}
|
|
9132
|
+
`;
|
|
9133
|
+
return {
|
|
9134
|
+
certificate: new X509Certificate(certificatePem),
|
|
9135
|
+
certificatePem
|
|
9136
|
+
};
|
|
9137
|
+
} catch (error) {
|
|
9138
|
+
throw new TypeError("mobile.updates.expoCodeSigning.certificatePath must reference a readable PEM X.509 certificate.", { cause: error });
|
|
9139
|
+
}
|
|
9140
|
+
}, normalizeUpdates = (config, productionOrigin, projectRoot) => {
|
|
9127
9141
|
if (!config.updates)
|
|
9128
9142
|
return;
|
|
9129
9143
|
const bootTimeoutMs = config.updates.bootTimeoutMs ?? DEFAULT_UPDATE_BOOT_TIMEOUT_MS;
|
|
@@ -9170,11 +9184,33 @@ var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FIN
|
|
|
9170
9184
|
throw new TypeError(`mobile.updates.publicKeys.${keyId} is not an ECDSA P-256 SPKI public key.`);
|
|
9171
9185
|
return [keyId, normalized];
|
|
9172
9186
|
}));
|
|
9187
|
+
let expoCodeSigning;
|
|
9188
|
+
if (config.updates.expoCodeSigning) {
|
|
9189
|
+
if ((config.engine ?? "capacitor") !== "expo")
|
|
9190
|
+
throw new TypeError("mobile.updates.expoCodeSigning is available only with mobile.engine: expo.");
|
|
9191
|
+
const keyId = requireText(config.updates.expoCodeSigning.keyId ?? "main", "mobile.updates.expoCodeSigning.keyId");
|
|
9192
|
+
if (!UPDATE_NAME_PATTERN.test(keyId))
|
|
9193
|
+
throw new TypeError("mobile.updates.expoCodeSigning.keyId contains unsupported characters.");
|
|
9194
|
+
const certificatePath = resolveProjectPath(projectRoot, requireText(config.updates.expoCodeSigning.certificatePath, "mobile.updates.expoCodeSigning.certificatePath"), "mobile.updates.expoCodeSigning.certificatePath");
|
|
9195
|
+
const { certificate, certificatePem } = readExpoCodeSigningCertificate(certificatePath);
|
|
9196
|
+
if (certificate.publicKey.asymmetricKeyType !== "rsa" || certificate.issuer !== certificate.subject || !certificate.verify(certificate.publicKey))
|
|
9197
|
+
throw new TypeError("mobile.updates.expoCodeSigning certificate must be a self-signed RSA root.");
|
|
9198
|
+
const now = Date.now();
|
|
9199
|
+
if (now < Date.parse(certificate.validFrom) || now > Date.parse(certificate.validTo))
|
|
9200
|
+
throw new TypeError("mobile.updates.expoCodeSigning certificate is not currently valid.");
|
|
9201
|
+
expoCodeSigning = {
|
|
9202
|
+
algorithm: "rsa-v1_5-sha256",
|
|
9203
|
+
certificatePem,
|
|
9204
|
+
certificateSha256: createHash5("sha256").update(certificate.raw).digest("hex"),
|
|
9205
|
+
keyId
|
|
9206
|
+
};
|
|
9207
|
+
}
|
|
9173
9208
|
return {
|
|
9174
9209
|
bootTimeoutMs,
|
|
9175
9210
|
channel,
|
|
9176
9211
|
manifestUrl: manifestUrl.href,
|
|
9177
|
-
publicKeys
|
|
9212
|
+
publicKeys,
|
|
9213
|
+
...expoCodeSigning ? { expoCodeSigning } : {}
|
|
9178
9214
|
};
|
|
9179
9215
|
}, validateExpoNativeRouteSegment = (path, segment, index, count, parameters) => {
|
|
9180
9216
|
if (segment === "*" && (index !== count - 1 || count === 1)) {
|
|
@@ -9234,7 +9270,7 @@ var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FIN
|
|
|
9234
9270
|
if (deepLinkScheme && !SCHEME_PATTERN.test(deepLinkScheme)) {
|
|
9235
9271
|
throw new TypeError("mobile.deepLinks.scheme is not a valid URL scheme.");
|
|
9236
9272
|
}
|
|
9237
|
-
const updates = normalizeUpdates(config, productionOrigin);
|
|
9273
|
+
const updates = normalizeUpdates(config, productionOrigin, projectRoot);
|
|
9238
9274
|
return {
|
|
9239
9275
|
androidCertificateFingerprints: normalizeCertificateFingerprints(config.deepLinks?.android?.sha256CertificateFingerprints),
|
|
9240
9276
|
appId,
|
|
@@ -9276,14 +9312,14 @@ var init_config = __esm(() => {
|
|
|
9276
9312
|
});
|
|
9277
9313
|
|
|
9278
9314
|
// src/cli/scripts/telemetry.ts
|
|
9279
|
-
import { existsSync as existsSync9, mkdirSync as mkdirSync2, readFileSync as
|
|
9315
|
+
import { existsSync as existsSync9, mkdirSync as mkdirSync2, readFileSync as readFileSync11, writeFileSync as writeFileSync4 } from "fs";
|
|
9280
9316
|
import { homedir } from "os";
|
|
9281
9317
|
import { join as join13 } from "path";
|
|
9282
9318
|
var configDir, configPath, getTelemetryConfig = () => {
|
|
9283
9319
|
try {
|
|
9284
9320
|
if (!existsSync9(configPath))
|
|
9285
9321
|
return null;
|
|
9286
|
-
const raw =
|
|
9322
|
+
const raw = readFileSync11(configPath, "utf-8");
|
|
9287
9323
|
const config = JSON.parse(raw);
|
|
9288
9324
|
return config;
|
|
9289
9325
|
} catch {
|
|
@@ -9296,14 +9332,14 @@ var init_telemetry = __esm(() => {
|
|
|
9296
9332
|
});
|
|
9297
9333
|
|
|
9298
9334
|
// src/cli/telemetryEvent.ts
|
|
9299
|
-
import { existsSync as existsSync10, readFileSync as
|
|
9335
|
+
import { existsSync as existsSync10, readFileSync as readFileSync12 } from "fs";
|
|
9300
9336
|
import { arch as arch2, platform as platform2 } from "os";
|
|
9301
9337
|
import { dirname as dirname9, join as join14, parse } from "path";
|
|
9302
9338
|
var checkCandidate = (candidate) => {
|
|
9303
9339
|
if (!existsSync10(candidate)) {
|
|
9304
9340
|
return null;
|
|
9305
9341
|
}
|
|
9306
|
-
const pkg = JSON.parse(
|
|
9342
|
+
const pkg = JSON.parse(readFileSync12(candidate, "utf-8"));
|
|
9307
9343
|
if (pkg.name === "@absolutejs/absolute") {
|
|
9308
9344
|
const ver = pkg.version;
|
|
9309
9345
|
return ver;
|
|
@@ -9449,7 +9485,7 @@ var init_sourceMetadata = __esm(() => {
|
|
|
9449
9485
|
});
|
|
9450
9486
|
|
|
9451
9487
|
// src/islands/pageMetadata.ts
|
|
9452
|
-
import { readFileSync as
|
|
9488
|
+
import { readFileSync as readFileSync13 } from "fs";
|
|
9453
9489
|
import { dirname as dirname11, resolve as resolve14 } from "path";
|
|
9454
9490
|
var pagePatterns, getPageDirs = (config) => [
|
|
9455
9491
|
{ dir: config.angularDirectory, framework: "angular" },
|
|
@@ -9492,7 +9528,7 @@ var pagePatterns, getPageDirs = (config) => [
|
|
|
9492
9528
|
return;
|
|
9493
9529
|
const files = await scanEntryPoints(resolve14(entry.dir), pattern);
|
|
9494
9530
|
for (const filePath of files) {
|
|
9495
|
-
const source =
|
|
9531
|
+
const source = readFileSync13(filePath, "utf-8");
|
|
9496
9532
|
const islands = extractIslandUsagesFromSource(source);
|
|
9497
9533
|
pageMetadata.set(resolve14(filePath), {
|
|
9498
9534
|
islands: resolveIslandUsages(islands, islandSourceLookup),
|
|
@@ -10881,7 +10917,7 @@ var buildServerBundleExternals = (angularVendorPaths) => {
|
|
|
10881
10917
|
};
|
|
10882
10918
|
|
|
10883
10919
|
// src/build/scanRouteRegistrations.ts
|
|
10884
|
-
import { readdirSync, readFileSync as
|
|
10920
|
+
import { readdirSync, readFileSync as readFileSync14 } from "fs";
|
|
10885
10921
|
import { join as join18 } from "path";
|
|
10886
10922
|
import ts2 from "typescript";
|
|
10887
10923
|
var ELYSIA_ROUTE_METHODS, SKIP_DIRS, SOURCE_EXTENSIONS, getScriptKind = (filePath) => {
|
|
@@ -10935,7 +10971,7 @@ var ELYSIA_ROUTE_METHODS, SKIP_DIRS, SOURCE_EXTENSIONS, getScriptKind = (filePat
|
|
|
10935
10971
|
}, extractRoutesFromFile = (filePath, out) => {
|
|
10936
10972
|
let source;
|
|
10937
10973
|
try {
|
|
10938
|
-
source =
|
|
10974
|
+
source = readFileSync14(filePath, "utf-8");
|
|
10939
10975
|
} catch {
|
|
10940
10976
|
return;
|
|
10941
10977
|
}
|
|
@@ -12084,7 +12120,7 @@ var init_scanCssEntryPoints = __esm(() => {
|
|
|
12084
12120
|
});
|
|
12085
12121
|
|
|
12086
12122
|
// src/utils/imageProcessing.ts
|
|
12087
|
-
import { existsSync as existsSync19, mkdirSync as mkdirSync4, readFileSync as
|
|
12123
|
+
import { existsSync as existsSync19, mkdirSync as mkdirSync4, readFileSync as readFileSync15, writeFileSync as writeFileSync5 } from "fs";
|
|
12088
12124
|
import { join as join23, resolve as resolve18 } from "path";
|
|
12089
12125
|
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) => {
|
|
12090
12126
|
for (const size of sizes) {
|
|
@@ -12238,8 +12274,8 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
|
|
|
12238
12274
|
if (!existsSync19(metaPath) || !existsSync19(dataPath))
|
|
12239
12275
|
return null;
|
|
12240
12276
|
try {
|
|
12241
|
-
const meta = JSON.parse(
|
|
12242
|
-
const buffer =
|
|
12277
|
+
const meta = JSON.parse(readFileSync15(metaPath, "utf-8"));
|
|
12278
|
+
const buffer = readFileSync15(dataPath);
|
|
12243
12279
|
return { buffer, meta };
|
|
12244
12280
|
} catch {
|
|
12245
12281
|
return null;
|
|
@@ -12571,9 +12607,9 @@ var devVendorPaths = null, getDevVendorPaths = () => devVendorPaths, setDevVendo
|
|
|
12571
12607
|
};
|
|
12572
12608
|
|
|
12573
12609
|
// src/build/angularLinkerPlugin.ts
|
|
12574
|
-
import { existsSync as existsSync21, mkdirSync as mkdirSync5, readFileSync as
|
|
12610
|
+
import { existsSync as existsSync21, mkdirSync as mkdirSync5, readFileSync as readFileSync16, writeFileSync as writeFileSync6 } from "fs";
|
|
12575
12611
|
import { dirname as dirname13, join as join24, relative as relative8, resolve as resolve20 } from "path";
|
|
12576
|
-
import { createHash as
|
|
12612
|
+
import { createHash as createHash8 } from "crypto";
|
|
12577
12613
|
var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linkerJitMode) => ({
|
|
12578
12614
|
name: "angular-linker",
|
|
12579
12615
|
setup(bld) {
|
|
@@ -12592,11 +12628,11 @@ var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linker
|
|
|
12592
12628
|
if (!checkLink || !checkLink(args.path, source)) {
|
|
12593
12629
|
return;
|
|
12594
12630
|
}
|
|
12595
|
-
const hash =
|
|
12631
|
+
const hash = createHash8("md5").update(source).digest("hex");
|
|
12596
12632
|
const cachePath = join24(cacheDir, `${hash}.js`);
|
|
12597
12633
|
if (existsSync21(cachePath)) {
|
|
12598
12634
|
return {
|
|
12599
|
-
contents:
|
|
12635
|
+
contents: readFileSync16(cachePath, "utf-8"),
|
|
12600
12636
|
loader: "js"
|
|
12601
12637
|
};
|
|
12602
12638
|
}
|
|
@@ -12612,7 +12648,7 @@ var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linker
|
|
|
12612
12648
|
fileSystem: {
|
|
12613
12649
|
dirname: dirname13,
|
|
12614
12650
|
exists: existsSync21,
|
|
12615
|
-
readFile:
|
|
12651
|
+
readFile: readFileSync16,
|
|
12616
12652
|
relative: relative8,
|
|
12617
12653
|
resolve: resolve20
|
|
12618
12654
|
},
|
|
@@ -13292,7 +13328,7 @@ var commonAncestor = (paths, fallback) => {
|
|
|
13292
13328
|
var init_commonAncestor = () => {};
|
|
13293
13329
|
|
|
13294
13330
|
// src/utils/buildDirectoryLock.ts
|
|
13295
|
-
import { mkdirSync as mkdirSync7, unlinkSync, writeFileSync as writeFileSync7, readFileSync as
|
|
13331
|
+
import { mkdirSync as mkdirSync7, unlinkSync, writeFileSync as writeFileSync7, readFileSync as readFileSync17 } from "fs";
|
|
13296
13332
|
import { dirname as dirname15, join as join28 } from "path";
|
|
13297
13333
|
var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandlersRegistered = false, registerExitHandlersOnce = () => {
|
|
13298
13334
|
if (exitHandlersRegistered)
|
|
@@ -13341,7 +13377,7 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
|
|
|
13341
13377
|
writeFileSync7(lockPath, JSON.stringify(metadata2, null, 2), { flag: "wx" });
|
|
13342
13378
|
}, readLockMetadata = (lockPath) => {
|
|
13343
13379
|
try {
|
|
13344
|
-
const raw =
|
|
13380
|
+
const raw = readFileSync17(lockPath, "utf-8");
|
|
13345
13381
|
const parsed = JSON.parse(raw);
|
|
13346
13382
|
if (typeof parsed === "object" && parsed !== null && typeof parsed.pid === "number") {
|
|
13347
13383
|
return {
|
|
@@ -13476,12 +13512,12 @@ var isTestSourcePath = (file2) => {
|
|
|
13476
13512
|
};
|
|
13477
13513
|
|
|
13478
13514
|
// src/mobile/deviceCapabilities.ts
|
|
13479
|
-
import { existsSync as existsSync23, readFileSync as
|
|
13515
|
+
import { existsSync as existsSync23, readFileSync as readFileSync18 } from "fs";
|
|
13480
13516
|
import { extname as extname7, join as join29, relative as relative11, resolve as resolve25 } from "path";
|
|
13481
13517
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
13482
13518
|
import ts8 from "typescript";
|
|
13483
13519
|
var DEVICES_PACKAGE = "@absolutejs/devices", ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABILITIES, ADAPTERS, SOURCE_GLOB, IGNORED_DIRECTORIES, IDENTIFIER_PATTERN, providerModulePattern = (provider) => new RegExp(`^@absolutejs/devices-${provider}/[a-z][a-z0-9-]*$`, "u"), providerPackagePattern = (provider) => provider === "capacitor" ? /^@capacitor\/[a-z][a-z0-9-]*@\d+\.\d+\.\d+$/u : /^(?:expo-[a-z][a-z0-9-]*|@react-native-[a-z0-9-]+\/[a-z][a-z0-9-]*)@\d+\.\d+\.\d+$/u, providerLabel = (provider) => provider === "capacitor" ? "Capacitor" : "Expo", ANDROID_PERMISSION_PATTERN, IOS_USAGE_DESCRIPTIONS, IOS_PRIVACY_ACCESSED_API_REASONS, IOS_PRIVACY_ACCESSED_APIS, object = (value) => typeof value === "object" && value !== null && !Array.isArray(value), readJson = (path) => {
|
|
13484
|
-
const value = JSON.parse(
|
|
13520
|
+
const value = JSON.parse(readFileSync18(path, "utf8"));
|
|
13485
13521
|
if (!object(value))
|
|
13486
13522
|
throw new TypeError(`${path} must contain an object.`);
|
|
13487
13523
|
return value;
|
|
@@ -13607,7 +13643,7 @@ var DEVICES_PACKAGE = "@absolutejs/devices", ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABI
|
|
|
13607
13643
|
const adapter = ADAPTERS[provider];
|
|
13608
13644
|
let path = join29(resolve25(projectRoot), "node_modules", adapter, "package.json");
|
|
13609
13645
|
try {
|
|
13610
|
-
|
|
13646
|
+
readFileSync18(path, "utf8");
|
|
13611
13647
|
} catch {
|
|
13612
13648
|
path = fileURLToPath2(import.meta.resolve(`${adapter}/package.json`));
|
|
13613
13649
|
}
|
|
@@ -13688,7 +13724,7 @@ var DEVICES_PACKAGE = "@absolutejs/devices", ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABI
|
|
|
13688
13724
|
const portable = relative11(root, resolve25(root, path)).replaceAll("\\", "/");
|
|
13689
13725
|
if (isIgnored(portable))
|
|
13690
13726
|
continue;
|
|
13691
|
-
const source =
|
|
13727
|
+
const source = readFileSync18(resolve25(root, portable), "utf8");
|
|
13692
13728
|
for (const name of importedCapabilities(source, portable))
|
|
13693
13729
|
if (known.has(name))
|
|
13694
13730
|
capabilities.add(name);
|
|
@@ -13703,7 +13739,7 @@ var DEVICES_PACKAGE = "@absolutejs/devices", ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABI
|
|
|
13703
13739
|
const portable = relative11(root, resolve25(root, path)).replaceAll("\\", "/");
|
|
13704
13740
|
if (isIgnored(portable))
|
|
13705
13741
|
continue;
|
|
13706
|
-
const source =
|
|
13742
|
+
const source = readFileSync18(resolve25(root, portable), "utf8");
|
|
13707
13743
|
if (importedCapabilities(source, portable).has(capability))
|
|
13708
13744
|
return true;
|
|
13709
13745
|
}
|
|
@@ -13898,11 +13934,11 @@ var init_client = __esm(() => {
|
|
|
13898
13934
|
});
|
|
13899
13935
|
|
|
13900
13936
|
// src/mobile/syncSchema.ts
|
|
13901
|
-
import { readFileSync as
|
|
13937
|
+
import { readFileSync as readFileSync19 } from "fs";
|
|
13902
13938
|
import { dirname as dirname16, join as join30, resolve as resolve26 } from "path";
|
|
13903
13939
|
var object2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), manifestAt = (path) => {
|
|
13904
13940
|
try {
|
|
13905
|
-
const value = JSON.parse(
|
|
13941
|
+
const value = JSON.parse(readFileSync19(path, "utf8"));
|
|
13906
13942
|
return object2(value) ? value : undefined;
|
|
13907
13943
|
} catch {
|
|
13908
13944
|
return;
|
|
@@ -14347,7 +14383,7 @@ var exports_scanVueSsrOnlyPages = {};
|
|
|
14347
14383
|
__export(exports_scanVueSsrOnlyPages, {
|
|
14348
14384
|
scanVueSsrOnlyPages: () => scanVueSsrOnlyPages
|
|
14349
14385
|
});
|
|
14350
|
-
import { readdirSync as readdirSync2, readFileSync as
|
|
14386
|
+
import { readdirSync as readdirSync2, readFileSync as readFileSync20 } from "fs";
|
|
14351
14387
|
import { join as join32 } from "path";
|
|
14352
14388
|
import ts9 from "typescript";
|
|
14353
14389
|
var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind3 = (filePath) => {
|
|
@@ -14450,7 +14486,7 @@ var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind3 = (filePath) => {
|
|
|
14450
14486
|
}, extractFromFile = (filePath, out) => {
|
|
14451
14487
|
let source;
|
|
14452
14488
|
try {
|
|
14453
|
-
source =
|
|
14489
|
+
source = readFileSync20(filePath, "utf-8");
|
|
14454
14490
|
} catch {
|
|
14455
14491
|
return;
|
|
14456
14492
|
}
|
|
@@ -14494,7 +14530,7 @@ var init_scanVueSsrOnlyPages = __esm(() => {
|
|
|
14494
14530
|
});
|
|
14495
14531
|
|
|
14496
14532
|
// src/build/scanAngularHandlerCalls.ts
|
|
14497
|
-
import { readdirSync as readdirSync3, readFileSync as
|
|
14533
|
+
import { readdirSync as readdirSync3, readFileSync as readFileSync21 } from "fs";
|
|
14498
14534
|
import { join as join33 } from "path";
|
|
14499
14535
|
import ts10 from "typescript";
|
|
14500
14536
|
var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, SERVER_ENTRY_COPY_PREFIX = ".absolutejs-hmr-", getScriptKind4 = (filePath) => {
|
|
@@ -14565,7 +14601,7 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, SERVER_ENTRY_COPY_PRE
|
|
|
14565
14601
|
}, extractCallsFromFile = (filePath, out) => {
|
|
14566
14602
|
let source;
|
|
14567
14603
|
try {
|
|
14568
|
-
source =
|
|
14604
|
+
source = readFileSync21(filePath, "utf-8");
|
|
14569
14605
|
} catch {
|
|
14570
14606
|
return;
|
|
14571
14607
|
}
|
|
@@ -14644,7 +14680,7 @@ var init_scanAngularHandlerCalls = __esm(() => {
|
|
|
14644
14680
|
});
|
|
14645
14681
|
|
|
14646
14682
|
// src/build/scanAngularPageRoutes.ts
|
|
14647
|
-
import { readdirSync as readdirSync4, readFileSync as
|
|
14683
|
+
import { readdirSync as readdirSync4, readFileSync as readFileSync22 } from "fs";
|
|
14648
14684
|
import { basename as basename9, join as join34 } from "path";
|
|
14649
14685
|
import ts11 from "typescript";
|
|
14650
14686
|
var SOURCE_EXTENSIONS4, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
|
|
@@ -14716,7 +14752,7 @@ var SOURCE_EXTENSIONS4, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
|
|
|
14716
14752
|
for (const file2 of files) {
|
|
14717
14753
|
let source;
|
|
14718
14754
|
try {
|
|
14719
|
-
source =
|
|
14755
|
+
source = readFileSync22(file2, "utf-8");
|
|
14720
14756
|
} catch {
|
|
14721
14757
|
continue;
|
|
14722
14758
|
}
|
|
@@ -14763,7 +14799,7 @@ var exports_parseAngularConfigImports = {};
|
|
|
14763
14799
|
__export(exports_parseAngularConfigImports, {
|
|
14764
14800
|
parseAngularProvidersImport: () => parseAngularProvidersImport
|
|
14765
14801
|
});
|
|
14766
|
-
import { existsSync as existsSync24, readFileSync as
|
|
14802
|
+
import { existsSync as existsSync24, readFileSync as readFileSync23 } from "fs";
|
|
14767
14803
|
import { dirname as dirname18, isAbsolute as isAbsolute3, join as join35 } from "path";
|
|
14768
14804
|
import ts12 from "typescript";
|
|
14769
14805
|
var findDefineConfigCall = (sf) => {
|
|
@@ -14838,7 +14874,7 @@ var findDefineConfigCall = (sf) => {
|
|
|
14838
14874
|
const configPath2 = resolveConfigPath(projectRoot);
|
|
14839
14875
|
if (!configPath2)
|
|
14840
14876
|
return null;
|
|
14841
|
-
const source =
|
|
14877
|
+
const source = readFileSync23(configPath2, "utf-8");
|
|
14842
14878
|
if (!source.includes("angular"))
|
|
14843
14879
|
return null;
|
|
14844
14880
|
if (!source.includes("providers"))
|
|
@@ -15372,7 +15408,7 @@ __export(exports_chainInlineSourcemaps, {
|
|
|
15372
15408
|
inlineLineMapComment: () => inlineLineMapComment,
|
|
15373
15409
|
remapGeneratedLines: () => remapGeneratedLines
|
|
15374
15410
|
});
|
|
15375
|
-
import { readFileSync as
|
|
15411
|
+
import { readFileSync as readFileSync24, writeFileSync as writeFileSync8 } from "fs";
|
|
15376
15412
|
var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", BASE64_TO_INT, decodeVlq = (str, startPos) => {
|
|
15377
15413
|
let result = 0;
|
|
15378
15414
|
let shift = 0;
|
|
@@ -15663,7 +15699,7 @@ var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567
|
|
|
15663
15699
|
version: 3
|
|
15664
15700
|
};
|
|
15665
15701
|
}, chainBundleInlineSourcemap = (bundleFilePath) => {
|
|
15666
|
-
const text2 =
|
|
15702
|
+
const text2 = readFileSync24(bundleFilePath, "utf-8");
|
|
15667
15703
|
const outerMap = extractInlineMap(text2);
|
|
15668
15704
|
if (!outerMap)
|
|
15669
15705
|
return;
|
|
@@ -15683,7 +15719,7 @@ var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567
|
|
|
15683
15719
|
}, chainExternalSourcemap = (mapFilePath) => {
|
|
15684
15720
|
let outerMap;
|
|
15685
15721
|
try {
|
|
15686
|
-
outerMap = JSON.parse(
|
|
15722
|
+
outerMap = JSON.parse(readFileSync24(mapFilePath, "utf-8"));
|
|
15687
15723
|
} catch {
|
|
15688
15724
|
return;
|
|
15689
15725
|
}
|
|
@@ -15782,7 +15818,7 @@ __export(exports_compileVue, {
|
|
|
15782
15818
|
generateVueHmrId: () => generateVueHmrId,
|
|
15783
15819
|
vueHmrMetadata: () => vueHmrMetadata
|
|
15784
15820
|
});
|
|
15785
|
-
import { existsSync as existsSync26, readFileSync as
|
|
15821
|
+
import { existsSync as existsSync26, readFileSync as readFileSync25, realpathSync as realpathSync2 } from "fs";
|
|
15786
15822
|
import { mkdir as mkdir10 } from "fs/promises";
|
|
15787
15823
|
import {
|
|
15788
15824
|
basename as basename11,
|
|
@@ -15855,7 +15891,7 @@ var resolveDevClientDir3 = () => {
|
|
|
15855
15891
|
const importedPath = resolve28(dirname20(cssFilePath), relPath);
|
|
15856
15892
|
if (!existsSync26(importedPath))
|
|
15857
15893
|
return match;
|
|
15858
|
-
const importedContent =
|
|
15894
|
+
const importedContent = readFileSync25(importedPath, "utf-8");
|
|
15859
15895
|
return inlineCssImports(importedContent, importedPath, visited);
|
|
15860
15896
|
});
|
|
15861
15897
|
}, resolveHelperTsPath = (sourceDir, helper) => {
|
|
@@ -15986,7 +16022,7 @@ const ${localName} = (source) => ${importedName}(
|
|
|
15986
16022
|
const compiledScript = hasScript ? compiler.compileScript(descriptor, {
|
|
15987
16023
|
fs: {
|
|
15988
16024
|
fileExists: existsSync26,
|
|
15989
|
-
readFile: (file4) => existsSync26(file4) ?
|
|
16025
|
+
readFile: (file4) => existsSync26(file4) ? readFileSync25(file4, "utf-8") : undefined,
|
|
15990
16026
|
realpath: realpathSync2
|
|
15991
16027
|
},
|
|
15992
16028
|
id: componentId,
|
|
@@ -16889,7 +16925,7 @@ __export(exports_compileAngular, {
|
|
|
16889
16925
|
compileAngularFiles: () => compileAngularFiles,
|
|
16890
16926
|
invalidateAngularJitCache: () => invalidateAngularJitCache
|
|
16891
16927
|
});
|
|
16892
|
-
import { existsSync as existsSync27, readFileSync as
|
|
16928
|
+
import { existsSync as existsSync27, readFileSync as readFileSync26, promises as fs5 } from "fs";
|
|
16893
16929
|
import { join as join38, basename as basename12, sep as sep3, dirname as dirname21, resolve as resolve29, relative as relative14 } from "path";
|
|
16894
16930
|
var {Glob: Glob6 } = globalThis.Bun;
|
|
16895
16931
|
import ts14 from "typescript";
|
|
@@ -17234,7 +17270,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
|
|
|
17234
17270
|
const outputPath = resolve29(join38(outDir, relative14(process.cwd(), resolve29(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
|
|
17235
17271
|
return [
|
|
17236
17272
|
outputPath,
|
|
17237
|
-
buildIslandMetadataExports(
|
|
17273
|
+
buildIslandMetadataExports(readFileSync26(inputPath, "utf-8"))
|
|
17238
17274
|
];
|
|
17239
17275
|
})), { entries: inputPaths.length });
|
|
17240
17276
|
await traceAngularPhase("aot/preload-compiler", () => import("@angular/compiler"));
|
|
@@ -17545,7 +17581,7 @@ ${fields}
|
|
|
17545
17581
|
if (!existsSync27(templatePath)) {
|
|
17546
17582
|
throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
|
|
17547
17583
|
}
|
|
17548
|
-
const templateRaw2 =
|
|
17584
|
+
const templateRaw2 = readFileSync26(templatePath, "utf-8");
|
|
17549
17585
|
const lowered2 = lowerAngularDeferSyntax(templateRaw2);
|
|
17550
17586
|
const escaped2 = escapeTemplateContent(lowered2.template);
|
|
17551
17587
|
const replacedSource2 = source.slice(0, templateUrlMatch.index) + `template: \`${escaped2}\`` + source.slice(templateUrlMatch.index + templateUrlMatch[0].length);
|
|
@@ -17934,7 +17970,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
17934
17970
|
let providersSourceContent = "";
|
|
17935
17971
|
if (providersInjection.appProvidersSource) {
|
|
17936
17972
|
try {
|
|
17937
|
-
providersSourceContent =
|
|
17973
|
+
providersSourceContent = readFileSync26(providersInjection.appProvidersSource, "utf-8");
|
|
17938
17974
|
} catch {}
|
|
17939
17975
|
}
|
|
17940
17976
|
return JSON.stringify({
|
|
@@ -18957,7 +18993,7 @@ __export(exports_fastHmrCompiler, {
|
|
|
18957
18993
|
takePendingModule: () => takePendingModule,
|
|
18958
18994
|
tryFastHmr: () => tryFastHmr
|
|
18959
18995
|
});
|
|
18960
|
-
import { existsSync as existsSync28, readFileSync as
|
|
18996
|
+
import { existsSync as existsSync28, readFileSync as readFileSync27, statSync as statSync2 } from "fs";
|
|
18961
18997
|
import { dirname as dirname22, extname as extname9, relative as relative15, resolve as resolve30 } from "path";
|
|
18962
18998
|
import ts18 from "typescript";
|
|
18963
18999
|
var fail = (reason, detail, location) => ({
|
|
@@ -19285,7 +19321,7 @@ var fail = (reason, detail, location) => ({
|
|
|
19285
19321
|
continue;
|
|
19286
19322
|
let content;
|
|
19287
19323
|
try {
|
|
19288
|
-
content =
|
|
19324
|
+
content = readFileSync27(candidate, "utf-8");
|
|
19289
19325
|
} catch {
|
|
19290
19326
|
continue;
|
|
19291
19327
|
}
|
|
@@ -19873,7 +19909,7 @@ var fail = (reason, detail, location) => ({
|
|
|
19873
19909
|
return cached.info;
|
|
19874
19910
|
let source;
|
|
19875
19911
|
try {
|
|
19876
|
-
source =
|
|
19912
|
+
source = readFileSync27(filePath, "utf-8");
|
|
19877
19913
|
} catch {
|
|
19878
19914
|
childComponentInfoCache.set(cacheKey2, {
|
|
19879
19915
|
info: null,
|
|
@@ -19927,7 +19963,7 @@ var fail = (reason, detail, location) => ({
|
|
|
19927
19963
|
return cached.info;
|
|
19928
19964
|
let content;
|
|
19929
19965
|
try {
|
|
19930
|
-
content =
|
|
19966
|
+
content = readFileSync27(dtsPath, "utf-8");
|
|
19931
19967
|
} catch {
|
|
19932
19968
|
childComponentInfoCache.set(cacheKey2, {
|
|
19933
19969
|
info: null,
|
|
@@ -20050,7 +20086,7 @@ var fail = (reason, detail, location) => ({
|
|
|
20050
20086
|
return null;
|
|
20051
20087
|
let content;
|
|
20052
20088
|
try {
|
|
20053
|
-
content =
|
|
20089
|
+
content = readFileSync27(startDtsPath, "utf-8");
|
|
20054
20090
|
} catch {
|
|
20055
20091
|
return null;
|
|
20056
20092
|
}
|
|
@@ -20268,7 +20304,7 @@ var fail = (reason, detail, location) => ({
|
|
|
20268
20304
|
return cached.hasProviders;
|
|
20269
20305
|
let source;
|
|
20270
20306
|
try {
|
|
20271
|
-
source =
|
|
20307
|
+
source = readFileSync27(filePath, "utf8");
|
|
20272
20308
|
} catch {
|
|
20273
20309
|
return true;
|
|
20274
20310
|
}
|
|
@@ -20581,7 +20617,7 @@ ${transpiled}
|
|
|
20581
20617
|
return null;
|
|
20582
20618
|
const ext = extname9(abs).toLowerCase();
|
|
20583
20619
|
if (!STYLE_PREPROCESSED_EXT.has(ext) || ext === ".css") {
|
|
20584
|
-
return
|
|
20620
|
+
return readFileSync27(abs, "utf8");
|
|
20585
20621
|
}
|
|
20586
20622
|
try {
|
|
20587
20623
|
return compileStyleFileIfNeededSync(abs);
|
|
@@ -20619,7 +20655,7 @@ ${block}
|
|
|
20619
20655
|
const opts = {};
|
|
20620
20656
|
if (existsSync28(tsconfigPath)) {
|
|
20621
20657
|
try {
|
|
20622
|
-
const text2 =
|
|
20658
|
+
const text2 = readFileSync27(tsconfigPath, "utf8");
|
|
20623
20659
|
const parsed = ts18.parseConfigFileTextToJson(tsconfigPath, text2);
|
|
20624
20660
|
if (!parsed.error && parsed.config) {
|
|
20625
20661
|
const cfg = parsed.config;
|
|
@@ -20653,7 +20689,7 @@ ${block}
|
|
|
20653
20689
|
} catch (err) {
|
|
20654
20690
|
return fail("unexpected-error", `import @angular/compiler: ${err}`);
|
|
20655
20691
|
}
|
|
20656
|
-
const tsSource =
|
|
20692
|
+
const tsSource = readFileSync27(componentFilePath, "utf8");
|
|
20657
20693
|
const sourceFile = ts18.createSourceFile(componentFilePath, tsSource, ts18.ScriptTarget.ES2022, true, ts18.ScriptKind.TS);
|
|
20658
20694
|
const classNode = findClassDeclaration(sourceFile, className);
|
|
20659
20695
|
if (!classNode) {
|
|
@@ -20703,7 +20739,7 @@ ${block}
|
|
|
20703
20739
|
if (!existsSync28(tplAbs)) {
|
|
20704
20740
|
return fail("template-resource-not-found", `Template file not found: ${tplAbs}`, { file: componentFilePath });
|
|
20705
20741
|
}
|
|
20706
|
-
templateText =
|
|
20742
|
+
templateText = readFileSync27(tplAbs, "utf8");
|
|
20707
20743
|
templatePath = tplAbs;
|
|
20708
20744
|
} else {
|
|
20709
20745
|
return fail("unsupported-decorator-args", "missing template/templateUrl");
|
|
@@ -21884,7 +21920,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
|
|
|
21884
21920
|
}
|
|
21885
21921
|
return { angular, transitiveRoots };
|
|
21886
21922
|
}, PARTIAL_DECL_MARKERS, containsPartialDeclarations = (source) => PARTIAL_DECL_MARKERS.some((marker) => source.includes(marker)), collectTransitiveAngularSpecs = async (roots, angularFound) => {
|
|
21887
|
-
const { readFileSync:
|
|
21923
|
+
const { readFileSync: readFileSync28 } = await import("fs");
|
|
21888
21924
|
const transpiler6 = new Bun.Transpiler({ loader: "js" });
|
|
21889
21925
|
const visited = new Set;
|
|
21890
21926
|
const frontier = [];
|
|
@@ -21905,7 +21941,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
|
|
|
21905
21941
|
}
|
|
21906
21942
|
let content;
|
|
21907
21943
|
try {
|
|
21908
|
-
content =
|
|
21944
|
+
content = readFileSync28(resolved, "utf-8");
|
|
21909
21945
|
} catch {
|
|
21910
21946
|
continue;
|
|
21911
21947
|
}
|
|
@@ -22110,11 +22146,11 @@ var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"
|
|
|
22110
22146
|
console.warn("\u26A0\uFE0F Vue vendor build had errors:", result.logs);
|
|
22111
22147
|
return;
|
|
22112
22148
|
}
|
|
22113
|
-
const { readFileSync:
|
|
22149
|
+
const { readFileSync: readFileSync28, writeFileSync: writeFileSync9, readdirSync: readdirSync5 } = await import("fs");
|
|
22114
22150
|
const files = readdirSync5(vendorDir).filter((f2) => f2.endsWith(".js"));
|
|
22115
22151
|
for (const file5 of files) {
|
|
22116
22152
|
const filePath = join42(vendorDir, file5);
|
|
22117
|
-
const content =
|
|
22153
|
+
const content = readFileSync28(filePath, "utf-8");
|
|
22118
22154
|
if (!content.includes("__VUE_HMR_RUNTIME__"))
|
|
22119
22155
|
continue;
|
|
22120
22156
|
const patched = content.replace(/getGlobalThis\(\)\.__VUE_HMR_RUNTIME__\s*=\s*\{/, "getGlobalThis().__VUE_HMR_RUNTIME__ = getGlobalThis().__VUE_HMR_RUNTIME__ || {");
|
|
@@ -22205,7 +22241,7 @@ import {
|
|
|
22205
22241
|
existsSync as existsSync31,
|
|
22206
22242
|
mkdirSync as mkdirSync12,
|
|
22207
22243
|
readdirSync as readdirSync5,
|
|
22208
|
-
readFileSync as
|
|
22244
|
+
readFileSync as readFileSync28,
|
|
22209
22245
|
renameSync,
|
|
22210
22246
|
rmSync as rmSync2,
|
|
22211
22247
|
statSync as statSync3,
|
|
@@ -22294,7 +22330,7 @@ var isBuildTraceEnabled = () => {
|
|
|
22294
22330
|
}, REACT_VENDOR_SPECIFIERS, findBareReactImports = (path, importRegex) => {
|
|
22295
22331
|
let content;
|
|
22296
22332
|
try {
|
|
22297
|
-
content =
|
|
22333
|
+
content = readFileSync28(path, "utf-8");
|
|
22298
22334
|
} catch {
|
|
22299
22335
|
return [];
|
|
22300
22336
|
}
|
|
@@ -22390,7 +22426,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
22390
22426
|
addWorkerPathIfExists(file5, relPath, workerPaths);
|
|
22391
22427
|
}
|
|
22392
22428
|
}, collectWorkerPathsFromFile = (file5, patterns, workerPaths) => {
|
|
22393
|
-
const content =
|
|
22429
|
+
const content = readFileSync28(file5, "utf-8");
|
|
22394
22430
|
for (const pattern of patterns) {
|
|
22395
22431
|
collectWorkerPathsFromContent(content, pattern, file5, workerPaths);
|
|
22396
22432
|
}
|
|
@@ -22441,7 +22477,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
22441
22477
|
const indexFiles = readDir(reactIndexesPath).filter((file5) => file5.endsWith(".tsx"));
|
|
22442
22478
|
const pagesRel = relative16(process.cwd(), resolve33(reactPagesPath)).replace(/\\/g, "/");
|
|
22443
22479
|
for (const file5 of indexFiles) {
|
|
22444
|
-
let content =
|
|
22480
|
+
let content = readFileSync28(join44(reactIndexesPath, file5), "utf-8");
|
|
22445
22481
|
content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
|
|
22446
22482
|
writeFileSync9(join44(devIndexDir, file5), content);
|
|
22447
22483
|
}
|
|
@@ -22453,7 +22489,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
22453
22489
|
const indexFile = join44(svelteIndexDir, "pages", `${name}.js`);
|
|
22454
22490
|
if (!existsSync31(indexFile))
|
|
22455
22491
|
continue;
|
|
22456
|
-
let content =
|
|
22492
|
+
let content = readFileSync28(indexFile, "utf-8");
|
|
22457
22493
|
const srcRel = relative16(process.cwd(), resolve33(entry)).replace(/\\/g, "/");
|
|
22458
22494
|
content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
|
|
22459
22495
|
writeFileSync9(join44(devIndexDir, `${name}.svelte.js`), content);
|
|
@@ -22466,7 +22502,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
22466
22502
|
const indexFile = join44(vueIndexDir, `${name}.js`);
|
|
22467
22503
|
if (!existsSync31(indexFile))
|
|
22468
22504
|
continue;
|
|
22469
|
-
let content =
|
|
22505
|
+
let content = readFileSync28(indexFile, "utf-8");
|
|
22470
22506
|
const srcRel = relative16(process.cwd(), resolve33(entry)).replace(/\\/g, "/");
|
|
22471
22507
|
content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
|
|
22472
22508
|
writeFileSync9(join44(devIndexDir, `${name}.vue.js`), content);
|
|
@@ -22517,7 +22553,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
22517
22553
|
}
|
|
22518
22554
|
return result;
|
|
22519
22555
|
}, VUE_HMR_RUNTIME, injectVueComposableTracking = (outputPath, projectRoot) => {
|
|
22520
|
-
let content =
|
|
22556
|
+
let content = readFileSync28(outputPath, "utf-8");
|
|
22521
22557
|
const usePattern = /^var\s+(use[A-Z]\w*)\s*=/gm;
|
|
22522
22558
|
const useNames = [];
|
|
22523
22559
|
let match;
|
|
@@ -22567,7 +22603,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
22567
22603
|
}, rewriteUrlReferences = (outputPaths, urlFileMap) => {
|
|
22568
22604
|
const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
|
|
22569
22605
|
for (const outputPath of outputPaths) {
|
|
22570
|
-
let content =
|
|
22606
|
+
let content = readFileSync28(outputPath, "utf-8");
|
|
22571
22607
|
let changed = false;
|
|
22572
22608
|
content = content.replace(urlPattern, (_match, relPath) => {
|
|
22573
22609
|
const targetName = basename14(relPath);
|
|
@@ -23642,7 +23678,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
23642
23678
|
renameSync(mapPath, join44(sourcemapDir, basename14(mapPath)));
|
|
23643
23679
|
const jsPath = mapPath.slice(0, -4);
|
|
23644
23680
|
try {
|
|
23645
|
-
const javascript =
|
|
23681
|
+
const javascript = readFileSync28(jsPath, "utf-8").replace(/\n?\/\/# sourceMappingURL=[^\n]*\s*$/, `
|
|
23646
23682
|
`);
|
|
23647
23683
|
writeFileSync9(jsPath, javascript);
|
|
23648
23684
|
} catch {}
|
|
@@ -23858,7 +23894,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
23858
23894
|
const injectHMRIntoHTMLFile = (filePath, framework) => {
|
|
23859
23895
|
if (!hmrClientBundle)
|
|
23860
23896
|
return;
|
|
23861
|
-
let html =
|
|
23897
|
+
let html = readFileSync28(filePath, "utf-8");
|
|
23862
23898
|
if (html.includes("data-hmr-client"))
|
|
23863
23899
|
return;
|
|
23864
23900
|
const tag = `<script>window.__HMR_FRAMEWORK__="${framework}";</script><script data-hmr-client>${hmrClientBundle}</script>`;
|
|
@@ -23885,7 +23921,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
23885
23921
|
if (hmr)
|
|
23886
23922
|
injectHMRIntoHTMLFile(htmlFile, "html");
|
|
23887
23923
|
if (pwaArtifacts) {
|
|
23888
|
-
const source =
|
|
23924
|
+
const source = readFileSync28(htmlFile, "utf8");
|
|
23889
23925
|
writeFileSync9(htmlFile, injectPwaBootstrapHtml(source));
|
|
23890
23926
|
}
|
|
23891
23927
|
const fileName = basename14(htmlFile, ".html");
|
|
@@ -23918,7 +23954,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
23918
23954
|
if (hmr)
|
|
23919
23955
|
injectHMRIntoHTMLFile(htmxFile, "htmx");
|
|
23920
23956
|
if (pwaArtifacts) {
|
|
23921
|
-
const source =
|
|
23957
|
+
const source = readFileSync28(htmxFile, "utf8");
|
|
23922
23958
|
writeFileSync9(htmxFile, injectPwaBootstrapHtml(source));
|
|
23923
23959
|
}
|
|
23924
23960
|
const fileName = basename14(htmxFile, ".html");
|
|
@@ -24398,7 +24434,7 @@ __export(exports_dependencyGraph, {
|
|
|
24398
24434
|
getAffectedFiles: () => getAffectedFiles,
|
|
24399
24435
|
removeFileFromGraph: () => removeFileFromGraph
|
|
24400
24436
|
});
|
|
24401
|
-
import { existsSync as existsSync33, readFileSync as
|
|
24437
|
+
import { existsSync as existsSync33, readFileSync as readFileSync29 } from "fs";
|
|
24402
24438
|
var {Glob: Glob9 } = globalThis.Bun;
|
|
24403
24439
|
import { resolve as resolve34 } from "path";
|
|
24404
24440
|
var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
|
|
@@ -24569,15 +24605,15 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
|
|
|
24569
24605
|
const lowerPath = filePath.toLowerCase();
|
|
24570
24606
|
const isSvelteOrVue = lowerPath.endsWith(".svelte") || lowerPath.endsWith(".vue");
|
|
24571
24607
|
if (loader === "html") {
|
|
24572
|
-
const content =
|
|
24608
|
+
const content = readFileSync29(filePath, "utf-8");
|
|
24573
24609
|
return extractHtmlDependencies(filePath, content);
|
|
24574
24610
|
}
|
|
24575
24611
|
if (loader === "tsx" || loader === "js") {
|
|
24576
|
-
const content =
|
|
24612
|
+
const content = readFileSync29(filePath, "utf-8");
|
|
24577
24613
|
return extractJsDependencies(filePath, content, loader);
|
|
24578
24614
|
}
|
|
24579
24615
|
if (isSvelteOrVue) {
|
|
24580
|
-
const content =
|
|
24616
|
+
const content = readFileSync29(filePath, "utf-8");
|
|
24581
24617
|
return extractSvelteVueDependencies(filePath, content);
|
|
24582
24618
|
}
|
|
24583
24619
|
return [];
|
|
@@ -24726,7 +24762,7 @@ var init_clientManager = __esm(() => {
|
|
|
24726
24762
|
});
|
|
24727
24763
|
|
|
24728
24764
|
// src/dev/pathUtils.ts
|
|
24729
|
-
import { existsSync as existsSync34, readdirSync as readdirSync6, readFileSync as
|
|
24765
|
+
import { existsSync as existsSync34, readdirSync as readdirSync6, readFileSync as readFileSync30 } from "fs";
|
|
24730
24766
|
import { dirname as dirname25, resolve as resolve36 } from "path";
|
|
24731
24767
|
var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
|
|
24732
24768
|
if (shouldIgnorePath(filePath, resolved)) {
|
|
@@ -24826,7 +24862,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
|
|
|
24826
24862
|
}
|
|
24827
24863
|
let source;
|
|
24828
24864
|
try {
|
|
24829
|
-
source =
|
|
24865
|
+
source = readFileSync30(full, "utf8");
|
|
24830
24866
|
} catch {
|
|
24831
24867
|
continue;
|
|
24832
24868
|
}
|
|
@@ -25223,10 +25259,10 @@ var init_assetStore = __esm(() => {
|
|
|
25223
25259
|
});
|
|
25224
25260
|
|
|
25225
25261
|
// src/dev/fileHashTracker.ts
|
|
25226
|
-
import { readFileSync as
|
|
25262
|
+
import { readFileSync as readFileSync31 } from "fs";
|
|
25227
25263
|
var computeFileHash = (filePath) => {
|
|
25228
25264
|
try {
|
|
25229
|
-
const fileContent =
|
|
25265
|
+
const fileContent = readFileSync31(filePath);
|
|
25230
25266
|
return Number(Bun.hash(fileContent));
|
|
25231
25267
|
} catch {
|
|
25232
25268
|
return UNFOUND_INDEX;
|
|
@@ -25556,7 +25592,7 @@ __export(exports_resolveOwningComponents, {
|
|
|
25556
25592
|
resolveDescendantsOfParent: () => resolveDescendantsOfParent,
|
|
25557
25593
|
resolveOwningComponents: () => resolveOwningComponents
|
|
25558
25594
|
});
|
|
25559
|
-
import { readdirSync as readdirSync8, readFileSync as
|
|
25595
|
+
import { readdirSync as readdirSync8, readFileSync as readFileSync32, statSync as statSync5 } from "fs";
|
|
25560
25596
|
import { dirname as dirname28, extname as extname12, join as join47, resolve as resolve42 } from "path";
|
|
25561
25597
|
import ts19 from "typescript";
|
|
25562
25598
|
var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") || file5.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
|
|
@@ -25616,7 +25652,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
|
|
|
25616
25652
|
}, parseDecoratedClasses = (filePath) => {
|
|
25617
25653
|
let source;
|
|
25618
25654
|
try {
|
|
25619
|
-
source =
|
|
25655
|
+
source = readFileSync32(filePath, "utf8");
|
|
25620
25656
|
} catch {
|
|
25621
25657
|
return [];
|
|
25622
25658
|
}
|
|
@@ -25706,7 +25742,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
|
|
|
25706
25742
|
}, indexByRoot, resolveParentClassFile = (parentName, childFilePath, angularRoot) => {
|
|
25707
25743
|
let source;
|
|
25708
25744
|
try {
|
|
25709
|
-
source =
|
|
25745
|
+
source = readFileSync32(childFilePath, "utf8");
|
|
25710
25746
|
} catch {
|
|
25711
25747
|
return null;
|
|
25712
25748
|
}
|
|
@@ -26025,7 +26061,7 @@ __export(exports_moduleServer, {
|
|
|
26025
26061
|
warmCompilers: () => warmCompilers,
|
|
26026
26062
|
warnIfReactFastRefreshUnsupported: () => warnIfReactFastRefreshUnsupported
|
|
26027
26063
|
});
|
|
26028
|
-
import { existsSync as existsSync36, readFileSync as
|
|
26064
|
+
import { existsSync as existsSync36, readFileSync as readFileSync33, realpathSync as realpathSync3, statSync as statSync6 } from "fs";
|
|
26029
26065
|
import { basename as basename16, dirname as dirname29, extname as extname13, join as join48, resolve as resolve43, relative as relative17 } from "path";
|
|
26030
26066
|
var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfig, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
|
|
26031
26067
|
const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
|
|
@@ -26111,7 +26147,7 @@ ${stubs}
|
|
|
26111
26147
|
const pkgDir = resolve43(projectRoot, "node_modules", packageName ?? "");
|
|
26112
26148
|
const pkgJsonPath = join48(pkgDir, "package.json");
|
|
26113
26149
|
if (existsSync36(pkgJsonPath)) {
|
|
26114
|
-
const pkg = JSON.parse(
|
|
26150
|
+
const pkg = JSON.parse(readFileSync33(pkgJsonPath, "utf-8"));
|
|
26115
26151
|
const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
|
|
26116
26152
|
if (esmEntry) {
|
|
26117
26153
|
const resolved = resolve43(pkgDir, esmEntry);
|
|
@@ -26218,7 +26254,7 @@ ${code}`;
|
|
|
26218
26254
|
reactFastRefreshWarningEmitted = true;
|
|
26219
26255
|
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 targeted " + "page remount instead of a state-preserving fast refresh.");
|
|
26220
26256
|
}, transformReactFile = (filePath, projectRoot, rewriter) => {
|
|
26221
|
-
const raw =
|
|
26257
|
+
const raw = readFileSync33(filePath, "utf-8");
|
|
26222
26258
|
const valueExports = tsxTranspiler.scan(raw).exports;
|
|
26223
26259
|
let transpiled = reactTranspiler.transformSync(raw);
|
|
26224
26260
|
transpiled = preserveTypeExports(raw, transpiled, valueExports);
|
|
@@ -26234,7 +26270,7 @@ ${transpiled}`;
|
|
|
26234
26270
|
transpiled += buildIslandMetadataExports(raw);
|
|
26235
26271
|
return rewriteImports(transpiled, filePath, projectRoot, rewriter);
|
|
26236
26272
|
}, transformPlainFile = (filePath, projectRoot, rewriter, vueDir) => {
|
|
26237
|
-
const raw =
|
|
26273
|
+
const raw = readFileSync33(filePath, "utf-8");
|
|
26238
26274
|
const ext = extname13(filePath);
|
|
26239
26275
|
const isTS = ext === ".ts" || ext === ".tsx";
|
|
26240
26276
|
const isTSX = ext === ".tsx" || ext === ".jsx";
|
|
@@ -26400,7 +26436,7 @@ ${code}`;
|
|
|
26400
26436
|
` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
|
|
26401
26437
|
return code.replace(/import\.meta\.hot\.accept\(/g, "__hmr_accept(");
|
|
26402
26438
|
}, transformSvelteFile = async (filePath, projectRoot, rewriter, stylePreprocessors) => {
|
|
26403
|
-
const raw =
|
|
26439
|
+
const raw = readFileSync33(filePath, "utf-8");
|
|
26404
26440
|
if (!svelteCompiler) {
|
|
26405
26441
|
svelteCompiler = await import("svelte/compiler");
|
|
26406
26442
|
}
|
|
@@ -26466,7 +26502,7 @@ export default __script__;`;
|
|
|
26466
26502
|
return `${cssInjection}
|
|
26467
26503
|
${code}`;
|
|
26468
26504
|
}, transformVueFile = async (filePath, projectRoot, rewriter, vueDir, stylePreprocessors) => {
|
|
26469
|
-
const rawSource =
|
|
26505
|
+
const rawSource = readFileSync33(filePath, "utf-8");
|
|
26470
26506
|
const raw = addAutoRouterSetupApp(rawSource);
|
|
26471
26507
|
if (!vueCompiler) {
|
|
26472
26508
|
vueCompiler = await loadVueCompiler();
|
|
@@ -26479,7 +26515,7 @@ ${code}`;
|
|
|
26479
26515
|
fs: {
|
|
26480
26516
|
fileExists: existsSync36,
|
|
26481
26517
|
realpath: realpathSync3,
|
|
26482
|
-
readFile: (file5) => existsSync36(file5) ?
|
|
26518
|
+
readFile: (file5) => existsSync36(file5) ? readFileSync33(file5, "utf-8") : undefined
|
|
26483
26519
|
},
|
|
26484
26520
|
id: componentId,
|
|
26485
26521
|
inlineTemplate: false
|
|
@@ -26526,7 +26562,7 @@ ${code}`;
|
|
|
26526
26562
|
}
|
|
26527
26563
|
});
|
|
26528
26564
|
}, handleCssRequest = (filePath) => {
|
|
26529
|
-
const raw =
|
|
26565
|
+
const raw = readFileSync33(filePath, "utf-8");
|
|
26530
26566
|
const escaped = raw.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
|
|
26531
26567
|
return [
|
|
26532
26568
|
`const style = document.createElement('style');`,
|
|
@@ -29967,7 +30003,7 @@ var toSafeFileName6 = (specifier) => {
|
|
|
29967
30003
|
framework: Array.from(framework).filter(isResolvable3)
|
|
29968
30004
|
};
|
|
29969
30005
|
}, collectBareImportsFromFile = async (entryPath, transpiler6, maxDepth = 8) => {
|
|
29970
|
-
const { readFileSync:
|
|
30006
|
+
const { readFileSync: readFileSync34 } = await import("fs");
|
|
29971
30007
|
const { dirname: dirname32 } = await import("path");
|
|
29972
30008
|
const seenFiles = new Set;
|
|
29973
30009
|
const bareOut = new Set;
|
|
@@ -29983,7 +30019,7 @@ var toSafeFileName6 = (specifier) => {
|
|
|
29983
30019
|
continue;
|
|
29984
30020
|
let content;
|
|
29985
30021
|
try {
|
|
29986
|
-
content =
|
|
30022
|
+
content = readFileSync34(path, "utf-8");
|
|
29987
30023
|
} catch {
|
|
29988
30024
|
continue;
|
|
29989
30025
|
}
|
|
@@ -30904,7 +30940,7 @@ __export(exports_devtoolsJson, {
|
|
|
30904
30940
|
normalizeDevtoolsWorkspaceRoot: () => normalizeDevtoolsWorkspaceRoot,
|
|
30905
30941
|
resolveDevtoolsUuidCachePath: () => resolveDevtoolsUuidCachePath
|
|
30906
30942
|
});
|
|
30907
|
-
import { existsSync as existsSync38, mkdirSync as mkdirSync15, readFileSync as
|
|
30943
|
+
import { existsSync as existsSync38, mkdirSync as mkdirSync15, readFileSync as readFileSync34, writeFileSync as writeFileSync10 } from "fs";
|
|
30908
30944
|
import { dirname as dirname32, join as join51, resolve as resolve48 } from "path";
|
|
30909
30945
|
import { Elysia as Elysia7 } from "elysia";
|
|
30910
30946
|
var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
|
|
@@ -30914,7 +30950,7 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
|
|
|
30914
30950
|
if (!existsSync38(cachePath))
|
|
30915
30951
|
return null;
|
|
30916
30952
|
try {
|
|
30917
|
-
const value =
|
|
30953
|
+
const value = readFileSync34(cachePath, "utf-8").trim();
|
|
30918
30954
|
return isUuidV4(value) ? value : null;
|
|
30919
30955
|
} catch {
|
|
30920
30956
|
return null;
|
|
@@ -31247,11 +31283,11 @@ var init_requestInspector = __esm(() => {
|
|
|
31247
31283
|
});
|
|
31248
31284
|
|
|
31249
31285
|
// src/mobile/nativeAuth.ts
|
|
31250
|
-
import { readFileSync as
|
|
31286
|
+
import { readFileSync as readFileSync35 } from "fs";
|
|
31251
31287
|
import { join as join52 } from "path";
|
|
31252
31288
|
var ABSOLUTE_AUTH_PACKAGE = "@absolutejs/auth", ABSOLUTE_EXPO_AUTH_CORE_VERSION = "0.75.6", ABSOLUTE_EXPO_AUTH_PACKAGE = "@absolutejs/auth-expo", ABSOLUTE_EXPO_AUTH_VERSION = "0.0.2", ABSOLUTE_EXPO_SYNC_CORE_VERSION = "2.31.0", ABSOLUTE_EXPO_SYNC_PACKAGE = "@absolutejs/sync-expo", ABSOLUTE_EXPO_SYNC_VERSION = "0.0.2", ABSOLUTE_NATIVE_AUTH_CLIENTS_ENV = "ABSOLUTE_AUTH_NATIVE_CLIENTS", ABSOLUTE_NATIVE_AUTH_SCOPES, ABSOLUTE_SYNC_PACKAGE = "@absolutejs/sync", readPackageManifest = (projectRoot) => {
|
|
31253
31289
|
try {
|
|
31254
|
-
return JSON.parse(
|
|
31290
|
+
return JSON.parse(readFileSync35(join52(projectRoot, "package.json"), "utf8"));
|
|
31255
31291
|
} catch {
|
|
31256
31292
|
return;
|
|
31257
31293
|
}
|
|
@@ -31411,7 +31447,7 @@ __export(exports_prerender, {
|
|
|
31411
31447
|
rerenderRoute: () => rerenderRoute,
|
|
31412
31448
|
routeToFilename: () => routeToFilename
|
|
31413
31449
|
});
|
|
31414
|
-
import { mkdirSync as mkdirSync16, readFileSync as
|
|
31450
|
+
import { mkdirSync as mkdirSync16, readFileSync as readFileSync36 } from "fs";
|
|
31415
31451
|
import { join as join54 } from "path";
|
|
31416
31452
|
var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_TIMEOUT_MS = 30000, DEFAULT_FETCH_TIMEOUT_MS = 1e4, PRERENDER_BYPASS_HEADER = "X-Absolute-Prerender-Bypass", routeToFilename = (route) => route === "/" ? "index.html" : `${route.slice(1).replace(/\//g, "-")}.html`, writeTimestamp = async (htmlPath) => {
|
|
31417
31453
|
const metaPath = htmlPath.replace(/\.html$/, ".meta");
|
|
@@ -31419,7 +31455,7 @@ var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_
|
|
|
31419
31455
|
}, readTimestamp = (htmlPath) => {
|
|
31420
31456
|
const metaPath = htmlPath.replace(/\.html$/, ".meta");
|
|
31421
31457
|
try {
|
|
31422
|
-
const content =
|
|
31458
|
+
const content = readFileSync36(metaPath, "utf-8");
|
|
31423
31459
|
return Number(content) || 0;
|
|
31424
31460
|
} catch {
|
|
31425
31461
|
return 0;
|
|
@@ -31639,15 +31675,15 @@ import {
|
|
|
31639
31675
|
copyFileSync as copyFileSync4,
|
|
31640
31676
|
existsSync as existsSync42,
|
|
31641
31677
|
readdirSync as readdirSync12,
|
|
31642
|
-
readFileSync as
|
|
31678
|
+
readFileSync as readFileSync40,
|
|
31643
31679
|
statSync as statSync8,
|
|
31644
31680
|
watch as watch2
|
|
31645
31681
|
} from "fs";
|
|
31646
|
-
import { createHash as
|
|
31682
|
+
import { createHash as createHash10 } from "crypto";
|
|
31647
31683
|
import { dirname as dirname33, join as join58, resolve as resolve50 } from "path";
|
|
31648
31684
|
var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ENTRY_IMPORT_RETRY_DELAY_MS = 250, MAX_ENTRY_IMPORT_ATTEMPTS = 3, WATCH_FALLBACK_INTERVAL_MS = 250, ATOMIC_WRITE_TEMP_PATTERNS2, isAtomicWriteTemp = (filename) => filename.endsWith(".tmp") || filename.includes(".tmp.") || filename.endsWith("~") || filename.startsWith(".#") || filename.startsWith(".absolutejs-hmr-") || ATOMIC_WRITE_TEMP_PATTERNS2.some((pattern) => pattern.test(filename)), fileHash = (path) => {
|
|
31649
31685
|
try {
|
|
31650
|
-
return
|
|
31686
|
+
return createHash10("sha256").update(readFileSync40(path)).digest("hex");
|
|
31651
31687
|
} catch {
|
|
31652
31688
|
return null;
|
|
31653
31689
|
}
|
|
@@ -32701,8 +32737,8 @@ var handleHTMXPageRequest = async (pagePath, options = {}) => {
|
|
|
32701
32737
|
});
|
|
32702
32738
|
};
|
|
32703
32739
|
// src/core/prepare.ts
|
|
32704
|
-
import { createHash as
|
|
32705
|
-
import { existsSync as existsSync40, readdirSync as readdirSync10, readFileSync as
|
|
32740
|
+
import { createHash as createHash9 } from "crypto";
|
|
32741
|
+
import { existsSync as existsSync40, readdirSync as readdirSync10, readFileSync as readFileSync37 } from "fs";
|
|
32706
32742
|
import { basename as basename18, join as join55, relative as relative20, resolve as resolvePath4 } from "path";
|
|
32707
32743
|
import { Elysia as Elysia10, NotFound } from "elysia";
|
|
32708
32744
|
|
|
@@ -33531,7 +33567,7 @@ var createAbsoluteMobilePreviewPlugin = (mobile) => {
|
|
|
33531
33567
|
};
|
|
33532
33568
|
|
|
33533
33569
|
// src/mobile/materializedBundle.ts
|
|
33534
|
-
import { createHash as
|
|
33570
|
+
import { createHash as createHash7 } from "crypto";
|
|
33535
33571
|
import {
|
|
33536
33572
|
access as access2,
|
|
33537
33573
|
mkdir as mkdir7,
|
|
@@ -33545,7 +33581,7 @@ import { dirname as dirname10, join as join16, resolve as resolvePath2 } from "p
|
|
|
33545
33581
|
import { pathToFileURL as pathToFileURL2 } from "url";
|
|
33546
33582
|
|
|
33547
33583
|
// src/mobile/artifactStore.ts
|
|
33548
|
-
import { createHash as
|
|
33584
|
+
import { createHash as createHash6 } from "crypto";
|
|
33549
33585
|
import {
|
|
33550
33586
|
mkdir as mkdir6,
|
|
33551
33587
|
mkdtemp,
|
|
@@ -33563,7 +33599,7 @@ var RELEASE_ID_PATTERN = /^amc_[a-f0-9]{64}$/;
|
|
|
33563
33599
|
var DEFAULT_BLOB_PREFIX = "absolutejs/mobile-compatibility";
|
|
33564
33600
|
var hashBlob = async (blob) => {
|
|
33565
33601
|
const bytes = new Uint8Array(await blob.arrayBuffer());
|
|
33566
|
-
return
|
|
33602
|
+
return createHash6(SHA_2562).update(bytes).digest("hex");
|
|
33567
33603
|
};
|
|
33568
33604
|
var blobFromBytes = (bytes) => {
|
|
33569
33605
|
const buffer = new ArrayBuffer(bytes.byteLength);
|
|
@@ -33571,7 +33607,7 @@ var blobFromBytes = (bytes) => {
|
|
|
33571
33607
|
return new Blob([buffer]);
|
|
33572
33608
|
};
|
|
33573
33609
|
var errorHasCode = (error, code) => typeof error === "object" && error !== null && Reflect.get(error, "code") === code;
|
|
33574
|
-
var appDirectoryName = (appId) =>
|
|
33610
|
+
var appDirectoryName = (appId) => createHash6(SHA_2562).update(appId).digest("hex");
|
|
33575
33611
|
var requireReleaseId = (releaseId) => {
|
|
33576
33612
|
if (!RELEASE_ID_PATTERN.test(releaseId)) {
|
|
33577
33613
|
throw new TypeError("Invalid mobile compatibility release id.");
|
|
@@ -33775,7 +33811,7 @@ var bundleIdFor = (currentReleaseId, releases) => {
|
|
|
33775
33811
|
currentReleaseId,
|
|
33776
33812
|
releases: releases.map(({ releaseId }) => releaseId)
|
|
33777
33813
|
});
|
|
33778
|
-
return `amb_${
|
|
33814
|
+
return `amb_${createHash7("sha256").update(identity).digest("hex")}`;
|
|
33779
33815
|
};
|
|
33780
33816
|
var parseBundleIndex = (value) => {
|
|
33781
33817
|
if (!isRecord8(value) || value.format !== ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT || typeof value.bundleId !== "string" || !BUNDLE_ID_PATTERN.test(value.bundleId) || typeof value.currentReleaseId !== "string" || !Array.isArray(value.releases)) {
|
|
@@ -34067,7 +34103,7 @@ var registerIconVersioning = (buildDir) => {
|
|
|
34067
34103
|
const filePath = join55(buildDir, path);
|
|
34068
34104
|
let versioned = href;
|
|
34069
34105
|
if (existsSync40(filePath)) {
|
|
34070
|
-
const hash =
|
|
34106
|
+
const hash = createHash9("sha256").update(readFileSync37(filePath)).digest("hex").slice(0, ICON_HASH_LENGTH);
|
|
34071
34107
|
versioned = href.includes("?") ? `${href}&v=${hash}` : `${href}?v=${hash}`;
|
|
34072
34108
|
}
|
|
34073
34109
|
cache2.set(href, versioned);
|
|
@@ -34262,7 +34298,7 @@ var prepare = async (configOrPath) => {
|
|
|
34262
34298
|
return result;
|
|
34263
34299
|
}
|
|
34264
34300
|
stepStartedAt = performance.now();
|
|
34265
|
-
const manifest = JSON.parse(
|
|
34301
|
+
const manifest = JSON.parse(readFileSync37(`${buildDir}/manifest.json`, "utf-8"));
|
|
34266
34302
|
setCurrentIslandManifest(manifest);
|
|
34267
34303
|
if (config.islands?.registry) {
|
|
34268
34304
|
setCurrentIslandRegistry(await loadIslandRegistry(config.islands.registry));
|
|
@@ -34272,12 +34308,12 @@ var prepare = async (configOrPath) => {
|
|
|
34272
34308
|
stepStartedAt = performance.now();
|
|
34273
34309
|
const conventionsPath = join55(buildDir, "conventions.json");
|
|
34274
34310
|
if (existsSync40(conventionsPath)) {
|
|
34275
|
-
const conventions2 = JSON.parse(
|
|
34311
|
+
const conventions2 = JSON.parse(readFileSync37(conventionsPath, "utf-8"));
|
|
34276
34312
|
setConventions(conventions2);
|
|
34277
34313
|
}
|
|
34278
34314
|
const spaRoutesPath = join55(buildDir, "spa-routes.json");
|
|
34279
34315
|
if (existsSync40(spaRoutesPath)) {
|
|
34280
|
-
setSpaRouteManifest(JSON.parse(
|
|
34316
|
+
setSpaRouteManifest(JSON.parse(readFileSync37(spaRoutesPath, "utf-8")));
|
|
34281
34317
|
}
|
|
34282
34318
|
recordStep("load production conventions", stepStartedAt);
|
|
34283
34319
|
stepStartedAt = performance.now();
|
|
@@ -34396,10 +34432,10 @@ import {
|
|
|
34396
34432
|
copyFileSync as copyFileSync3,
|
|
34397
34433
|
existsSync as existsSync41,
|
|
34398
34434
|
mkdirSync as mkdirSync17,
|
|
34399
|
-
readFileSync as
|
|
34435
|
+
readFileSync as readFileSync38,
|
|
34400
34436
|
rmSync as rmSync4
|
|
34401
34437
|
} from "fs";
|
|
34402
|
-
import { X509Certificate } from "crypto";
|
|
34438
|
+
import { X509Certificate as X509Certificate2 } from "crypto";
|
|
34403
34439
|
import { isIP } from "net";
|
|
34404
34440
|
import { join as join56 } from "path";
|
|
34405
34441
|
var CERT_DIR = join56(process.cwd(), ".absolutejs");
|
|
@@ -34426,8 +34462,8 @@ var normalizeDevCertificateHosts = (hosts = []) => {
|
|
|
34426
34462
|
};
|
|
34427
34463
|
var certificateIsUsable = (hosts) => {
|
|
34428
34464
|
try {
|
|
34429
|
-
const certPem =
|
|
34430
|
-
const certificate = new
|
|
34465
|
+
const certPem = readFileSync38(CERT_PATH, "utf-8");
|
|
34466
|
+
const certificate = new X509Certificate2(certPem);
|
|
34431
34467
|
if (new Date(certificate.validTo).getTime() <= Date.now())
|
|
34432
34468
|
return false;
|
|
34433
34469
|
return normalizeDevCertificateHosts(hosts).every((host2) => isIP(host2) ? certificate.checkIP(host2) !== undefined : certificate.checkHost(host2) !== undefined);
|
|
@@ -34518,8 +34554,8 @@ var loadDevCert = (hosts = []) => {
|
|
|
34518
34554
|
return null;
|
|
34519
34555
|
try {
|
|
34520
34556
|
return {
|
|
34521
|
-
cert:
|
|
34522
|
-
key:
|
|
34557
|
+
cert: readFileSync38(paths.cert, "utf-8"),
|
|
34558
|
+
key: readFileSync38(paths.key, "utf-8")
|
|
34523
34559
|
};
|
|
34524
34560
|
} catch {
|
|
34525
34561
|
return null;
|
|
@@ -34529,7 +34565,7 @@ var loadDevCert = (hosts = []) => {
|
|
|
34529
34565
|
// src/utils/instanceRegistry.ts
|
|
34530
34566
|
import {
|
|
34531
34567
|
mkdirSync as mkdirSync18,
|
|
34532
|
-
readFileSync as
|
|
34568
|
+
readFileSync as readFileSync39,
|
|
34533
34569
|
readdirSync as readdirSync11,
|
|
34534
34570
|
unlinkSync as unlinkSync2,
|
|
34535
34571
|
writeFileSync as writeFileSync11
|
|
@@ -34562,7 +34598,7 @@ var registerExitHandlerOnce = () => {
|
|
|
34562
34598
|
};
|
|
34563
34599
|
var readJsonFile = (path) => {
|
|
34564
34600
|
try {
|
|
34565
|
-
return JSON.parse(
|
|
34601
|
+
return JSON.parse(readFileSync39(path, "utf-8"));
|
|
34566
34602
|
} catch {
|
|
34567
34603
|
return null;
|
|
34568
34604
|
}
|
|
@@ -34887,7 +34923,7 @@ var generateHeadElement = ({
|
|
|
34887
34923
|
};
|
|
34888
34924
|
// src/utils/defineEnv.ts
|
|
34889
34925
|
var {env: bunEnv } = globalThis.Bun;
|
|
34890
|
-
import { existsSync as existsSync43, readFileSync as
|
|
34926
|
+
import { existsSync as existsSync43, readFileSync as readFileSync41 } from "fs";
|
|
34891
34927
|
import { resolve as resolve51 } from "path";
|
|
34892
34928
|
|
|
34893
34929
|
// node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
|
|
@@ -40929,13 +40965,13 @@ var checkEnvFileSecurity = (properties) => {
|
|
|
40929
40965
|
const sensitiveKeys = Object.keys(properties).filter(isSensitive);
|
|
40930
40966
|
if (sensitiveKeys.length === 0)
|
|
40931
40967
|
return;
|
|
40932
|
-
const envContent =
|
|
40968
|
+
const envContent = readFileSync41(envPath, "utf-8");
|
|
40933
40969
|
const presentKeys = sensitiveKeys.filter((key) => envContent.includes(`${key}=`));
|
|
40934
40970
|
if (presentKeys.length === 0)
|
|
40935
40971
|
return;
|
|
40936
40972
|
const gitignorePath = resolve51(cwd2, ".gitignore");
|
|
40937
40973
|
if (existsSync43(gitignorePath)) {
|
|
40938
|
-
const gitignore =
|
|
40974
|
+
const gitignore = readFileSync41(gitignorePath, "utf-8");
|
|
40939
40975
|
if (gitignore.split(`
|
|
40940
40976
|
`).some((line) => line.trim() === ".env"))
|
|
40941
40977
|
return;
|
|
@@ -41235,5 +41271,5 @@ export {
|
|
|
41235
41271
|
wrapPageHandlerWithStreamingSlots
|
|
41236
41272
|
};
|
|
41237
41273
|
|
|
41238
|
-
//# debugId=
|
|
41274
|
+
//# debugId=F128744A7F8A73F564756E2164756E21
|
|
41239
41275
|
//# sourceMappingURL=index.js.map
|