@absolutejs/absolute 0.20.0-beta.64 → 0.20.0-beta.66
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 +17370 -356
- package/dist/index.js +188 -126
- package/dist/index.js.map +3 -3
- package/dist/mobile/index.js +33269 -11069
- package/dist/mobile/index.js.map +56 -8
- package/dist/mobile/remoteMacAgentEntry.js +270 -202
- package/dist/mobile/shellAuth.js +16 -0
- package/dist/mobile/shellBootstrap.js +5427 -117
- package/dist/mobile/shellExpoAuth.js +16 -0
- package/dist/mobile/shellExpoDevices.js +16 -0
- package/dist/mobile/shellExpoSync.js +16 -0
- package/dist/mobile/shellSync.js +16 -0
- package/dist/mobile/shellUpdate.js +16 -0
- package/dist/mobile/uiPrimitives.js +16 -0
- package/dist/src/mobile/capacitorBundle.d.ts +14 -1
- package/dist/src/mobile/config.d.ts +12 -0
- package/dist/src/mobile/expoCodeSigning.d.ts +14 -0
- package/dist/src/mobile/index.d.ts +2 -0
- package/dist/src/mobile/mobileInspect.d.ts +14 -0
- package/dist/src/mobile/shellBootstrap.d.ts +2 -0
- package/dist/src/mobile/shellObservability.d.ts +11 -0
- package/dist/src/mobile/transport.d.ts +6 -0
- package/dist/types/build.d.ts +19 -0
- package/package.json +10 -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);
|
|
@@ -9116,6 +9117,30 @@ var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FIN
|
|
|
9116
9117
|
throw new TypeError("mobile.ios.version must contain one to three dot-separated integer components, for example 1.4.0.");
|
|
9117
9118
|
}
|
|
9118
9119
|
return normalized;
|
|
9120
|
+
}, normalizeObservability = (config, productionOrigin) => {
|
|
9121
|
+
if (!config.observability)
|
|
9122
|
+
return;
|
|
9123
|
+
const project = requireText(config.observability.project, "mobile.observability.project");
|
|
9124
|
+
if (project.length > 255)
|
|
9125
|
+
throw new TypeError("mobile.observability.project must not exceed 255 characters.");
|
|
9126
|
+
const environment = config.observability.environment?.trim();
|
|
9127
|
+
if (environment !== undefined && (!environment || environment.length > 64))
|
|
9128
|
+
throw new TypeError("mobile.observability.environment must contain 1 through 64 characters.");
|
|
9129
|
+
const sampleRate = config.observability.sampleRate ?? 1;
|
|
9130
|
+
if (!Number.isFinite(sampleRate) || sampleRate < 0 || sampleRate > 1)
|
|
9131
|
+
throw new TypeError("mobile.observability.sampleRate must be between 0 and 1.");
|
|
9132
|
+
const route = config.observability.route ?? "/api/observability/errors";
|
|
9133
|
+
if (!route.startsWith("/") || route.startsWith("//"))
|
|
9134
|
+
throw new TypeError("mobile.observability.route must be a root-relative trusted-server path.");
|
|
9135
|
+
const endpoint = new URL(route, `${productionOrigin}/`);
|
|
9136
|
+
if (endpoint.origin !== productionOrigin || endpoint.username || endpoint.password || endpoint.hash || endpoint.search)
|
|
9137
|
+
throw new TypeError("mobile.observability.route must remain on productionOrigin and cannot contain credentials, a query, or a fragment.");
|
|
9138
|
+
return {
|
|
9139
|
+
endpoint: endpoint.href,
|
|
9140
|
+
...environment ? { environment } : {},
|
|
9141
|
+
project,
|
|
9142
|
+
sampleRate
|
|
9143
|
+
};
|
|
9119
9144
|
}, normalizeCertificateFingerprints = (values) => [
|
|
9120
9145
|
...new Set((values ?? []).map((value) => requireText(value, "mobile.deepLinks.android.sha256CertificateFingerprints").replaceAll(":", "").toUpperCase()).map((value) => {
|
|
9121
9146
|
if (!CERTIFICATE_FINGERPRINT_PATTERN.test(value)) {
|
|
@@ -9123,7 +9148,20 @@ var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FIN
|
|
|
9123
9148
|
}
|
|
9124
9149
|
return value.match(/.{2}/g)?.join(":") ?? value;
|
|
9125
9150
|
}))
|
|
9126
|
-
].sort(),
|
|
9151
|
+
].sort(), readExpoCodeSigningCertificate = (certificatePath) => {
|
|
9152
|
+
try {
|
|
9153
|
+
const certificateSource = readFileSync10(certificatePath, "utf8");
|
|
9154
|
+
const certificatePem = certificateSource.endsWith(`
|
|
9155
|
+
`) ? certificateSource : `${certificateSource}
|
|
9156
|
+
`;
|
|
9157
|
+
return {
|
|
9158
|
+
certificate: new X509Certificate(certificatePem),
|
|
9159
|
+
certificatePem
|
|
9160
|
+
};
|
|
9161
|
+
} catch (error) {
|
|
9162
|
+
throw new TypeError("mobile.updates.expoCodeSigning.certificatePath must reference a readable PEM X.509 certificate.", { cause: error });
|
|
9163
|
+
}
|
|
9164
|
+
}, normalizeUpdates = (config, productionOrigin, projectRoot) => {
|
|
9127
9165
|
if (!config.updates)
|
|
9128
9166
|
return;
|
|
9129
9167
|
const bootTimeoutMs = config.updates.bootTimeoutMs ?? DEFAULT_UPDATE_BOOT_TIMEOUT_MS;
|
|
@@ -9170,11 +9208,33 @@ var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FIN
|
|
|
9170
9208
|
throw new TypeError(`mobile.updates.publicKeys.${keyId} is not an ECDSA P-256 SPKI public key.`);
|
|
9171
9209
|
return [keyId, normalized];
|
|
9172
9210
|
}));
|
|
9211
|
+
let expoCodeSigning;
|
|
9212
|
+
if (config.updates.expoCodeSigning) {
|
|
9213
|
+
if ((config.engine ?? "capacitor") !== "expo")
|
|
9214
|
+
throw new TypeError("mobile.updates.expoCodeSigning is available only with mobile.engine: expo.");
|
|
9215
|
+
const keyId = requireText(config.updates.expoCodeSigning.keyId ?? "main", "mobile.updates.expoCodeSigning.keyId");
|
|
9216
|
+
if (!UPDATE_NAME_PATTERN.test(keyId))
|
|
9217
|
+
throw new TypeError("mobile.updates.expoCodeSigning.keyId contains unsupported characters.");
|
|
9218
|
+
const certificatePath = resolveProjectPath(projectRoot, requireText(config.updates.expoCodeSigning.certificatePath, "mobile.updates.expoCodeSigning.certificatePath"), "mobile.updates.expoCodeSigning.certificatePath");
|
|
9219
|
+
const { certificate, certificatePem } = readExpoCodeSigningCertificate(certificatePath);
|
|
9220
|
+
if (certificate.publicKey.asymmetricKeyType !== "rsa" || certificate.issuer !== certificate.subject || !certificate.verify(certificate.publicKey))
|
|
9221
|
+
throw new TypeError("mobile.updates.expoCodeSigning certificate must be a self-signed RSA root.");
|
|
9222
|
+
const now = Date.now();
|
|
9223
|
+
if (now < Date.parse(certificate.validFrom) || now > Date.parse(certificate.validTo))
|
|
9224
|
+
throw new TypeError("mobile.updates.expoCodeSigning certificate is not currently valid.");
|
|
9225
|
+
expoCodeSigning = {
|
|
9226
|
+
algorithm: "rsa-v1_5-sha256",
|
|
9227
|
+
certificatePem,
|
|
9228
|
+
certificateSha256: createHash5("sha256").update(certificate.raw).digest("hex"),
|
|
9229
|
+
keyId
|
|
9230
|
+
};
|
|
9231
|
+
}
|
|
9173
9232
|
return {
|
|
9174
9233
|
bootTimeoutMs,
|
|
9175
9234
|
channel,
|
|
9176
9235
|
manifestUrl: manifestUrl.href,
|
|
9177
|
-
publicKeys
|
|
9236
|
+
publicKeys,
|
|
9237
|
+
...expoCodeSigning ? { expoCodeSigning } : {}
|
|
9178
9238
|
};
|
|
9179
9239
|
}, validateExpoNativeRouteSegment = (path, segment, index, count, parameters) => {
|
|
9180
9240
|
if (segment === "*" && (index !== count - 1 || count === 1)) {
|
|
@@ -9234,7 +9294,8 @@ var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FIN
|
|
|
9234
9294
|
if (deepLinkScheme && !SCHEME_PATTERN.test(deepLinkScheme)) {
|
|
9235
9295
|
throw new TypeError("mobile.deepLinks.scheme is not a valid URL scheme.");
|
|
9236
9296
|
}
|
|
9237
|
-
const updates = normalizeUpdates(config, productionOrigin);
|
|
9297
|
+
const updates = normalizeUpdates(config, productionOrigin, projectRoot);
|
|
9298
|
+
const observability = normalizeObservability(config, productionOrigin);
|
|
9238
9299
|
return {
|
|
9239
9300
|
androidCertificateFingerprints: normalizeCertificateFingerprints(config.deepLinks?.android?.sha256CertificateFingerprints),
|
|
9240
9301
|
appId,
|
|
@@ -9249,6 +9310,7 @@ var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FIN
|
|
|
9249
9310
|
...config.engine === "expo" ? { expoSdkVersion: config.expo?.sdkVersion ?? 57 } : {},
|
|
9250
9311
|
iosVersion: normalizeIosVersion(config.ios?.version),
|
|
9251
9312
|
nativeProjectDirectory: resolveProjectPath(projectRoot, config.nativeProject?.directory ?? (config.engine === "expo" ? ".absolutejs/mobile/expo" : "mobile"), "mobile.nativeProject.directory"),
|
|
9313
|
+
...observability ? { observability } : {},
|
|
9252
9314
|
platforms: normalizePlatforms(config.platforms),
|
|
9253
9315
|
productionOrigin,
|
|
9254
9316
|
pushAndroidGoogleServicesFile: resolveProjectPath(projectRoot, config.pushNotifications?.android?.googleServicesFile ?? "google-services.json", "mobile.pushNotifications.android.googleServicesFile"),
|
|
@@ -9276,14 +9338,14 @@ var init_config = __esm(() => {
|
|
|
9276
9338
|
});
|
|
9277
9339
|
|
|
9278
9340
|
// src/cli/scripts/telemetry.ts
|
|
9279
|
-
import { existsSync as existsSync9, mkdirSync as mkdirSync2, readFileSync as
|
|
9341
|
+
import { existsSync as existsSync9, mkdirSync as mkdirSync2, readFileSync as readFileSync11, writeFileSync as writeFileSync4 } from "fs";
|
|
9280
9342
|
import { homedir } from "os";
|
|
9281
9343
|
import { join as join13 } from "path";
|
|
9282
9344
|
var configDir, configPath, getTelemetryConfig = () => {
|
|
9283
9345
|
try {
|
|
9284
9346
|
if (!existsSync9(configPath))
|
|
9285
9347
|
return null;
|
|
9286
|
-
const raw =
|
|
9348
|
+
const raw = readFileSync11(configPath, "utf-8");
|
|
9287
9349
|
const config = JSON.parse(raw);
|
|
9288
9350
|
return config;
|
|
9289
9351
|
} catch {
|
|
@@ -9296,14 +9358,14 @@ var init_telemetry = __esm(() => {
|
|
|
9296
9358
|
});
|
|
9297
9359
|
|
|
9298
9360
|
// src/cli/telemetryEvent.ts
|
|
9299
|
-
import { existsSync as existsSync10, readFileSync as
|
|
9361
|
+
import { existsSync as existsSync10, readFileSync as readFileSync12 } from "fs";
|
|
9300
9362
|
import { arch as arch2, platform as platform2 } from "os";
|
|
9301
9363
|
import { dirname as dirname9, join as join14, parse } from "path";
|
|
9302
9364
|
var checkCandidate = (candidate) => {
|
|
9303
9365
|
if (!existsSync10(candidate)) {
|
|
9304
9366
|
return null;
|
|
9305
9367
|
}
|
|
9306
|
-
const pkg = JSON.parse(
|
|
9368
|
+
const pkg = JSON.parse(readFileSync12(candidate, "utf-8"));
|
|
9307
9369
|
if (pkg.name === "@absolutejs/absolute") {
|
|
9308
9370
|
const ver = pkg.version;
|
|
9309
9371
|
return ver;
|
|
@@ -9449,7 +9511,7 @@ var init_sourceMetadata = __esm(() => {
|
|
|
9449
9511
|
});
|
|
9450
9512
|
|
|
9451
9513
|
// src/islands/pageMetadata.ts
|
|
9452
|
-
import { readFileSync as
|
|
9514
|
+
import { readFileSync as readFileSync13 } from "fs";
|
|
9453
9515
|
import { dirname as dirname11, resolve as resolve14 } from "path";
|
|
9454
9516
|
var pagePatterns, getPageDirs = (config) => [
|
|
9455
9517
|
{ dir: config.angularDirectory, framework: "angular" },
|
|
@@ -9492,7 +9554,7 @@ var pagePatterns, getPageDirs = (config) => [
|
|
|
9492
9554
|
return;
|
|
9493
9555
|
const files = await scanEntryPoints(resolve14(entry.dir), pattern);
|
|
9494
9556
|
for (const filePath of files) {
|
|
9495
|
-
const source =
|
|
9557
|
+
const source = readFileSync13(filePath, "utf-8");
|
|
9496
9558
|
const islands = extractIslandUsagesFromSource(source);
|
|
9497
9559
|
pageMetadata.set(resolve14(filePath), {
|
|
9498
9560
|
islands: resolveIslandUsages(islands, islandSourceLookup),
|
|
@@ -10881,7 +10943,7 @@ var buildServerBundleExternals = (angularVendorPaths) => {
|
|
|
10881
10943
|
};
|
|
10882
10944
|
|
|
10883
10945
|
// src/build/scanRouteRegistrations.ts
|
|
10884
|
-
import { readdirSync, readFileSync as
|
|
10946
|
+
import { readdirSync, readFileSync as readFileSync14 } from "fs";
|
|
10885
10947
|
import { join as join18 } from "path";
|
|
10886
10948
|
import ts2 from "typescript";
|
|
10887
10949
|
var ELYSIA_ROUTE_METHODS, SKIP_DIRS, SOURCE_EXTENSIONS, getScriptKind = (filePath) => {
|
|
@@ -10935,7 +10997,7 @@ var ELYSIA_ROUTE_METHODS, SKIP_DIRS, SOURCE_EXTENSIONS, getScriptKind = (filePat
|
|
|
10935
10997
|
}, extractRoutesFromFile = (filePath, out) => {
|
|
10936
10998
|
let source;
|
|
10937
10999
|
try {
|
|
10938
|
-
source =
|
|
11000
|
+
source = readFileSync14(filePath, "utf-8");
|
|
10939
11001
|
} catch {
|
|
10940
11002
|
return;
|
|
10941
11003
|
}
|
|
@@ -12084,7 +12146,7 @@ var init_scanCssEntryPoints = __esm(() => {
|
|
|
12084
12146
|
});
|
|
12085
12147
|
|
|
12086
12148
|
// src/utils/imageProcessing.ts
|
|
12087
|
-
import { existsSync as existsSync19, mkdirSync as mkdirSync4, readFileSync as
|
|
12149
|
+
import { existsSync as existsSync19, mkdirSync as mkdirSync4, readFileSync as readFileSync15, writeFileSync as writeFileSync5 } from "fs";
|
|
12088
12150
|
import { join as join23, resolve as resolve18 } from "path";
|
|
12089
12151
|
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
12152
|
for (const size of sizes) {
|
|
@@ -12238,8 +12300,8 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
|
|
|
12238
12300
|
if (!existsSync19(metaPath) || !existsSync19(dataPath))
|
|
12239
12301
|
return null;
|
|
12240
12302
|
try {
|
|
12241
|
-
const meta = JSON.parse(
|
|
12242
|
-
const buffer =
|
|
12303
|
+
const meta = JSON.parse(readFileSync15(metaPath, "utf-8"));
|
|
12304
|
+
const buffer = readFileSync15(dataPath);
|
|
12243
12305
|
return { buffer, meta };
|
|
12244
12306
|
} catch {
|
|
12245
12307
|
return null;
|
|
@@ -12571,9 +12633,9 @@ var devVendorPaths = null, getDevVendorPaths = () => devVendorPaths, setDevVendo
|
|
|
12571
12633
|
};
|
|
12572
12634
|
|
|
12573
12635
|
// src/build/angularLinkerPlugin.ts
|
|
12574
|
-
import { existsSync as existsSync21, mkdirSync as mkdirSync5, readFileSync as
|
|
12636
|
+
import { existsSync as existsSync21, mkdirSync as mkdirSync5, readFileSync as readFileSync16, writeFileSync as writeFileSync6 } from "fs";
|
|
12575
12637
|
import { dirname as dirname13, join as join24, relative as relative8, resolve as resolve20 } from "path";
|
|
12576
|
-
import { createHash as
|
|
12638
|
+
import { createHash as createHash8 } from "crypto";
|
|
12577
12639
|
var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linkerJitMode) => ({
|
|
12578
12640
|
name: "angular-linker",
|
|
12579
12641
|
setup(bld) {
|
|
@@ -12592,11 +12654,11 @@ var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linker
|
|
|
12592
12654
|
if (!checkLink || !checkLink(args.path, source)) {
|
|
12593
12655
|
return;
|
|
12594
12656
|
}
|
|
12595
|
-
const hash =
|
|
12657
|
+
const hash = createHash8("md5").update(source).digest("hex");
|
|
12596
12658
|
const cachePath = join24(cacheDir, `${hash}.js`);
|
|
12597
12659
|
if (existsSync21(cachePath)) {
|
|
12598
12660
|
return {
|
|
12599
|
-
contents:
|
|
12661
|
+
contents: readFileSync16(cachePath, "utf-8"),
|
|
12600
12662
|
loader: "js"
|
|
12601
12663
|
};
|
|
12602
12664
|
}
|
|
@@ -12612,7 +12674,7 @@ var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linker
|
|
|
12612
12674
|
fileSystem: {
|
|
12613
12675
|
dirname: dirname13,
|
|
12614
12676
|
exists: existsSync21,
|
|
12615
|
-
readFile:
|
|
12677
|
+
readFile: readFileSync16,
|
|
12616
12678
|
relative: relative8,
|
|
12617
12679
|
resolve: resolve20
|
|
12618
12680
|
},
|
|
@@ -13292,7 +13354,7 @@ var commonAncestor = (paths, fallback) => {
|
|
|
13292
13354
|
var init_commonAncestor = () => {};
|
|
13293
13355
|
|
|
13294
13356
|
// src/utils/buildDirectoryLock.ts
|
|
13295
|
-
import { mkdirSync as mkdirSync7, unlinkSync, writeFileSync as writeFileSync7, readFileSync as
|
|
13357
|
+
import { mkdirSync as mkdirSync7, unlinkSync, writeFileSync as writeFileSync7, readFileSync as readFileSync17 } from "fs";
|
|
13296
13358
|
import { dirname as dirname15, join as join28 } from "path";
|
|
13297
13359
|
var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandlersRegistered = false, registerExitHandlersOnce = () => {
|
|
13298
13360
|
if (exitHandlersRegistered)
|
|
@@ -13341,7 +13403,7 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
|
|
|
13341
13403
|
writeFileSync7(lockPath, JSON.stringify(metadata2, null, 2), { flag: "wx" });
|
|
13342
13404
|
}, readLockMetadata = (lockPath) => {
|
|
13343
13405
|
try {
|
|
13344
|
-
const raw =
|
|
13406
|
+
const raw = readFileSync17(lockPath, "utf-8");
|
|
13345
13407
|
const parsed = JSON.parse(raw);
|
|
13346
13408
|
if (typeof parsed === "object" && parsed !== null && typeof parsed.pid === "number") {
|
|
13347
13409
|
return {
|
|
@@ -13476,12 +13538,12 @@ var isTestSourcePath = (file2) => {
|
|
|
13476
13538
|
};
|
|
13477
13539
|
|
|
13478
13540
|
// src/mobile/deviceCapabilities.ts
|
|
13479
|
-
import { existsSync as existsSync23, readFileSync as
|
|
13541
|
+
import { existsSync as existsSync23, readFileSync as readFileSync18 } from "fs";
|
|
13480
13542
|
import { extname as extname7, join as join29, relative as relative11, resolve as resolve25 } from "path";
|
|
13481
13543
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
13482
13544
|
import ts8 from "typescript";
|
|
13483
13545
|
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(
|
|
13546
|
+
const value = JSON.parse(readFileSync18(path, "utf8"));
|
|
13485
13547
|
if (!object(value))
|
|
13486
13548
|
throw new TypeError(`${path} must contain an object.`);
|
|
13487
13549
|
return value;
|
|
@@ -13607,7 +13669,7 @@ var DEVICES_PACKAGE = "@absolutejs/devices", ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABI
|
|
|
13607
13669
|
const adapter = ADAPTERS[provider];
|
|
13608
13670
|
let path = join29(resolve25(projectRoot), "node_modules", adapter, "package.json");
|
|
13609
13671
|
try {
|
|
13610
|
-
|
|
13672
|
+
readFileSync18(path, "utf8");
|
|
13611
13673
|
} catch {
|
|
13612
13674
|
path = fileURLToPath2(import.meta.resolve(`${adapter}/package.json`));
|
|
13613
13675
|
}
|
|
@@ -13688,7 +13750,7 @@ var DEVICES_PACKAGE = "@absolutejs/devices", ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABI
|
|
|
13688
13750
|
const portable = relative11(root, resolve25(root, path)).replaceAll("\\", "/");
|
|
13689
13751
|
if (isIgnored(portable))
|
|
13690
13752
|
continue;
|
|
13691
|
-
const source =
|
|
13753
|
+
const source = readFileSync18(resolve25(root, portable), "utf8");
|
|
13692
13754
|
for (const name of importedCapabilities(source, portable))
|
|
13693
13755
|
if (known.has(name))
|
|
13694
13756
|
capabilities.add(name);
|
|
@@ -13703,7 +13765,7 @@ var DEVICES_PACKAGE = "@absolutejs/devices", ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABI
|
|
|
13703
13765
|
const portable = relative11(root, resolve25(root, path)).replaceAll("\\", "/");
|
|
13704
13766
|
if (isIgnored(portable))
|
|
13705
13767
|
continue;
|
|
13706
|
-
const source =
|
|
13768
|
+
const source = readFileSync18(resolve25(root, portable), "utf8");
|
|
13707
13769
|
if (importedCapabilities(source, portable).has(capability))
|
|
13708
13770
|
return true;
|
|
13709
13771
|
}
|
|
@@ -13898,11 +13960,11 @@ var init_client = __esm(() => {
|
|
|
13898
13960
|
});
|
|
13899
13961
|
|
|
13900
13962
|
// src/mobile/syncSchema.ts
|
|
13901
|
-
import { readFileSync as
|
|
13963
|
+
import { readFileSync as readFileSync19 } from "fs";
|
|
13902
13964
|
import { dirname as dirname16, join as join30, resolve as resolve26 } from "path";
|
|
13903
13965
|
var object2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), manifestAt = (path) => {
|
|
13904
13966
|
try {
|
|
13905
|
-
const value = JSON.parse(
|
|
13967
|
+
const value = JSON.parse(readFileSync19(path, "utf8"));
|
|
13906
13968
|
return object2(value) ? value : undefined;
|
|
13907
13969
|
} catch {
|
|
13908
13970
|
return;
|
|
@@ -14347,7 +14409,7 @@ var exports_scanVueSsrOnlyPages = {};
|
|
|
14347
14409
|
__export(exports_scanVueSsrOnlyPages, {
|
|
14348
14410
|
scanVueSsrOnlyPages: () => scanVueSsrOnlyPages
|
|
14349
14411
|
});
|
|
14350
|
-
import { readdirSync as readdirSync2, readFileSync as
|
|
14412
|
+
import { readdirSync as readdirSync2, readFileSync as readFileSync20 } from "fs";
|
|
14351
14413
|
import { join as join32 } from "path";
|
|
14352
14414
|
import ts9 from "typescript";
|
|
14353
14415
|
var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind3 = (filePath) => {
|
|
@@ -14450,7 +14512,7 @@ var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind3 = (filePath) => {
|
|
|
14450
14512
|
}, extractFromFile = (filePath, out) => {
|
|
14451
14513
|
let source;
|
|
14452
14514
|
try {
|
|
14453
|
-
source =
|
|
14515
|
+
source = readFileSync20(filePath, "utf-8");
|
|
14454
14516
|
} catch {
|
|
14455
14517
|
return;
|
|
14456
14518
|
}
|
|
@@ -14494,7 +14556,7 @@ var init_scanVueSsrOnlyPages = __esm(() => {
|
|
|
14494
14556
|
});
|
|
14495
14557
|
|
|
14496
14558
|
// src/build/scanAngularHandlerCalls.ts
|
|
14497
|
-
import { readdirSync as readdirSync3, readFileSync as
|
|
14559
|
+
import { readdirSync as readdirSync3, readFileSync as readFileSync21 } from "fs";
|
|
14498
14560
|
import { join as join33 } from "path";
|
|
14499
14561
|
import ts10 from "typescript";
|
|
14500
14562
|
var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, SERVER_ENTRY_COPY_PREFIX = ".absolutejs-hmr-", getScriptKind4 = (filePath) => {
|
|
@@ -14565,7 +14627,7 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, SERVER_ENTRY_COPY_PRE
|
|
|
14565
14627
|
}, extractCallsFromFile = (filePath, out) => {
|
|
14566
14628
|
let source;
|
|
14567
14629
|
try {
|
|
14568
|
-
source =
|
|
14630
|
+
source = readFileSync21(filePath, "utf-8");
|
|
14569
14631
|
} catch {
|
|
14570
14632
|
return;
|
|
14571
14633
|
}
|
|
@@ -14644,7 +14706,7 @@ var init_scanAngularHandlerCalls = __esm(() => {
|
|
|
14644
14706
|
});
|
|
14645
14707
|
|
|
14646
14708
|
// src/build/scanAngularPageRoutes.ts
|
|
14647
|
-
import { readdirSync as readdirSync4, readFileSync as
|
|
14709
|
+
import { readdirSync as readdirSync4, readFileSync as readFileSync22 } from "fs";
|
|
14648
14710
|
import { basename as basename9, join as join34 } from "path";
|
|
14649
14711
|
import ts11 from "typescript";
|
|
14650
14712
|
var SOURCE_EXTENSIONS4, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
|
|
@@ -14716,7 +14778,7 @@ var SOURCE_EXTENSIONS4, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
|
|
|
14716
14778
|
for (const file2 of files) {
|
|
14717
14779
|
let source;
|
|
14718
14780
|
try {
|
|
14719
|
-
source =
|
|
14781
|
+
source = readFileSync22(file2, "utf-8");
|
|
14720
14782
|
} catch {
|
|
14721
14783
|
continue;
|
|
14722
14784
|
}
|
|
@@ -14763,7 +14825,7 @@ var exports_parseAngularConfigImports = {};
|
|
|
14763
14825
|
__export(exports_parseAngularConfigImports, {
|
|
14764
14826
|
parseAngularProvidersImport: () => parseAngularProvidersImport
|
|
14765
14827
|
});
|
|
14766
|
-
import { existsSync as existsSync24, readFileSync as
|
|
14828
|
+
import { existsSync as existsSync24, readFileSync as readFileSync23 } from "fs";
|
|
14767
14829
|
import { dirname as dirname18, isAbsolute as isAbsolute3, join as join35 } from "path";
|
|
14768
14830
|
import ts12 from "typescript";
|
|
14769
14831
|
var findDefineConfigCall = (sf) => {
|
|
@@ -14838,7 +14900,7 @@ var findDefineConfigCall = (sf) => {
|
|
|
14838
14900
|
const configPath2 = resolveConfigPath(projectRoot);
|
|
14839
14901
|
if (!configPath2)
|
|
14840
14902
|
return null;
|
|
14841
|
-
const source =
|
|
14903
|
+
const source = readFileSync23(configPath2, "utf-8");
|
|
14842
14904
|
if (!source.includes("angular"))
|
|
14843
14905
|
return null;
|
|
14844
14906
|
if (!source.includes("providers"))
|
|
@@ -15372,7 +15434,7 @@ __export(exports_chainInlineSourcemaps, {
|
|
|
15372
15434
|
inlineLineMapComment: () => inlineLineMapComment,
|
|
15373
15435
|
remapGeneratedLines: () => remapGeneratedLines
|
|
15374
15436
|
});
|
|
15375
|
-
import { readFileSync as
|
|
15437
|
+
import { readFileSync as readFileSync24, writeFileSync as writeFileSync8 } from "fs";
|
|
15376
15438
|
var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", BASE64_TO_INT, decodeVlq = (str, startPos) => {
|
|
15377
15439
|
let result = 0;
|
|
15378
15440
|
let shift = 0;
|
|
@@ -15663,7 +15725,7 @@ var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567
|
|
|
15663
15725
|
version: 3
|
|
15664
15726
|
};
|
|
15665
15727
|
}, chainBundleInlineSourcemap = (bundleFilePath) => {
|
|
15666
|
-
const text2 =
|
|
15728
|
+
const text2 = readFileSync24(bundleFilePath, "utf-8");
|
|
15667
15729
|
const outerMap = extractInlineMap(text2);
|
|
15668
15730
|
if (!outerMap)
|
|
15669
15731
|
return;
|
|
@@ -15683,7 +15745,7 @@ var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567
|
|
|
15683
15745
|
}, chainExternalSourcemap = (mapFilePath) => {
|
|
15684
15746
|
let outerMap;
|
|
15685
15747
|
try {
|
|
15686
|
-
outerMap = JSON.parse(
|
|
15748
|
+
outerMap = JSON.parse(readFileSync24(mapFilePath, "utf-8"));
|
|
15687
15749
|
} catch {
|
|
15688
15750
|
return;
|
|
15689
15751
|
}
|
|
@@ -15782,7 +15844,7 @@ __export(exports_compileVue, {
|
|
|
15782
15844
|
generateVueHmrId: () => generateVueHmrId,
|
|
15783
15845
|
vueHmrMetadata: () => vueHmrMetadata
|
|
15784
15846
|
});
|
|
15785
|
-
import { existsSync as existsSync26, readFileSync as
|
|
15847
|
+
import { existsSync as existsSync26, readFileSync as readFileSync25, realpathSync as realpathSync2 } from "fs";
|
|
15786
15848
|
import { mkdir as mkdir10 } from "fs/promises";
|
|
15787
15849
|
import {
|
|
15788
15850
|
basename as basename11,
|
|
@@ -15855,7 +15917,7 @@ var resolveDevClientDir3 = () => {
|
|
|
15855
15917
|
const importedPath = resolve28(dirname20(cssFilePath), relPath);
|
|
15856
15918
|
if (!existsSync26(importedPath))
|
|
15857
15919
|
return match;
|
|
15858
|
-
const importedContent =
|
|
15920
|
+
const importedContent = readFileSync25(importedPath, "utf-8");
|
|
15859
15921
|
return inlineCssImports(importedContent, importedPath, visited);
|
|
15860
15922
|
});
|
|
15861
15923
|
}, resolveHelperTsPath = (sourceDir, helper) => {
|
|
@@ -15986,7 +16048,7 @@ const ${localName} = (source) => ${importedName}(
|
|
|
15986
16048
|
const compiledScript = hasScript ? compiler.compileScript(descriptor, {
|
|
15987
16049
|
fs: {
|
|
15988
16050
|
fileExists: existsSync26,
|
|
15989
|
-
readFile: (file4) => existsSync26(file4) ?
|
|
16051
|
+
readFile: (file4) => existsSync26(file4) ? readFileSync25(file4, "utf-8") : undefined,
|
|
15990
16052
|
realpath: realpathSync2
|
|
15991
16053
|
},
|
|
15992
16054
|
id: componentId,
|
|
@@ -16889,7 +16951,7 @@ __export(exports_compileAngular, {
|
|
|
16889
16951
|
compileAngularFiles: () => compileAngularFiles,
|
|
16890
16952
|
invalidateAngularJitCache: () => invalidateAngularJitCache
|
|
16891
16953
|
});
|
|
16892
|
-
import { existsSync as existsSync27, readFileSync as
|
|
16954
|
+
import { existsSync as existsSync27, readFileSync as readFileSync26, promises as fs5 } from "fs";
|
|
16893
16955
|
import { join as join38, basename as basename12, sep as sep3, dirname as dirname21, resolve as resolve29, relative as relative14 } from "path";
|
|
16894
16956
|
var {Glob: Glob6 } = globalThis.Bun;
|
|
16895
16957
|
import ts14 from "typescript";
|
|
@@ -17234,7 +17296,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
|
|
|
17234
17296
|
const outputPath = resolve29(join38(outDir, relative14(process.cwd(), resolve29(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
|
|
17235
17297
|
return [
|
|
17236
17298
|
outputPath,
|
|
17237
|
-
buildIslandMetadataExports(
|
|
17299
|
+
buildIslandMetadataExports(readFileSync26(inputPath, "utf-8"))
|
|
17238
17300
|
];
|
|
17239
17301
|
})), { entries: inputPaths.length });
|
|
17240
17302
|
await traceAngularPhase("aot/preload-compiler", () => import("@angular/compiler"));
|
|
@@ -17545,7 +17607,7 @@ ${fields}
|
|
|
17545
17607
|
if (!existsSync27(templatePath)) {
|
|
17546
17608
|
throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
|
|
17547
17609
|
}
|
|
17548
|
-
const templateRaw2 =
|
|
17610
|
+
const templateRaw2 = readFileSync26(templatePath, "utf-8");
|
|
17549
17611
|
const lowered2 = lowerAngularDeferSyntax(templateRaw2);
|
|
17550
17612
|
const escaped2 = escapeTemplateContent(lowered2.template);
|
|
17551
17613
|
const replacedSource2 = source.slice(0, templateUrlMatch.index) + `template: \`${escaped2}\`` + source.slice(templateUrlMatch.index + templateUrlMatch[0].length);
|
|
@@ -17934,7 +17996,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
17934
17996
|
let providersSourceContent = "";
|
|
17935
17997
|
if (providersInjection.appProvidersSource) {
|
|
17936
17998
|
try {
|
|
17937
|
-
providersSourceContent =
|
|
17999
|
+
providersSourceContent = readFileSync26(providersInjection.appProvidersSource, "utf-8");
|
|
17938
18000
|
} catch {}
|
|
17939
18001
|
}
|
|
17940
18002
|
return JSON.stringify({
|
|
@@ -18957,7 +19019,7 @@ __export(exports_fastHmrCompiler, {
|
|
|
18957
19019
|
takePendingModule: () => takePendingModule,
|
|
18958
19020
|
tryFastHmr: () => tryFastHmr
|
|
18959
19021
|
});
|
|
18960
|
-
import { existsSync as existsSync28, readFileSync as
|
|
19022
|
+
import { existsSync as existsSync28, readFileSync as readFileSync27, statSync as statSync2 } from "fs";
|
|
18961
19023
|
import { dirname as dirname22, extname as extname9, relative as relative15, resolve as resolve30 } from "path";
|
|
18962
19024
|
import ts18 from "typescript";
|
|
18963
19025
|
var fail = (reason, detail, location) => ({
|
|
@@ -19285,7 +19347,7 @@ var fail = (reason, detail, location) => ({
|
|
|
19285
19347
|
continue;
|
|
19286
19348
|
let content;
|
|
19287
19349
|
try {
|
|
19288
|
-
content =
|
|
19350
|
+
content = readFileSync27(candidate, "utf-8");
|
|
19289
19351
|
} catch {
|
|
19290
19352
|
continue;
|
|
19291
19353
|
}
|
|
@@ -19873,7 +19935,7 @@ var fail = (reason, detail, location) => ({
|
|
|
19873
19935
|
return cached.info;
|
|
19874
19936
|
let source;
|
|
19875
19937
|
try {
|
|
19876
|
-
source =
|
|
19938
|
+
source = readFileSync27(filePath, "utf-8");
|
|
19877
19939
|
} catch {
|
|
19878
19940
|
childComponentInfoCache.set(cacheKey2, {
|
|
19879
19941
|
info: null,
|
|
@@ -19927,7 +19989,7 @@ var fail = (reason, detail, location) => ({
|
|
|
19927
19989
|
return cached.info;
|
|
19928
19990
|
let content;
|
|
19929
19991
|
try {
|
|
19930
|
-
content =
|
|
19992
|
+
content = readFileSync27(dtsPath, "utf-8");
|
|
19931
19993
|
} catch {
|
|
19932
19994
|
childComponentInfoCache.set(cacheKey2, {
|
|
19933
19995
|
info: null,
|
|
@@ -20050,7 +20112,7 @@ var fail = (reason, detail, location) => ({
|
|
|
20050
20112
|
return null;
|
|
20051
20113
|
let content;
|
|
20052
20114
|
try {
|
|
20053
|
-
content =
|
|
20115
|
+
content = readFileSync27(startDtsPath, "utf-8");
|
|
20054
20116
|
} catch {
|
|
20055
20117
|
return null;
|
|
20056
20118
|
}
|
|
@@ -20268,7 +20330,7 @@ var fail = (reason, detail, location) => ({
|
|
|
20268
20330
|
return cached.hasProviders;
|
|
20269
20331
|
let source;
|
|
20270
20332
|
try {
|
|
20271
|
-
source =
|
|
20333
|
+
source = readFileSync27(filePath, "utf8");
|
|
20272
20334
|
} catch {
|
|
20273
20335
|
return true;
|
|
20274
20336
|
}
|
|
@@ -20581,7 +20643,7 @@ ${transpiled}
|
|
|
20581
20643
|
return null;
|
|
20582
20644
|
const ext = extname9(abs).toLowerCase();
|
|
20583
20645
|
if (!STYLE_PREPROCESSED_EXT.has(ext) || ext === ".css") {
|
|
20584
|
-
return
|
|
20646
|
+
return readFileSync27(abs, "utf8");
|
|
20585
20647
|
}
|
|
20586
20648
|
try {
|
|
20587
20649
|
return compileStyleFileIfNeededSync(abs);
|
|
@@ -20619,7 +20681,7 @@ ${block}
|
|
|
20619
20681
|
const opts = {};
|
|
20620
20682
|
if (existsSync28(tsconfigPath)) {
|
|
20621
20683
|
try {
|
|
20622
|
-
const text2 =
|
|
20684
|
+
const text2 = readFileSync27(tsconfigPath, "utf8");
|
|
20623
20685
|
const parsed = ts18.parseConfigFileTextToJson(tsconfigPath, text2);
|
|
20624
20686
|
if (!parsed.error && parsed.config) {
|
|
20625
20687
|
const cfg = parsed.config;
|
|
@@ -20653,7 +20715,7 @@ ${block}
|
|
|
20653
20715
|
} catch (err) {
|
|
20654
20716
|
return fail("unexpected-error", `import @angular/compiler: ${err}`);
|
|
20655
20717
|
}
|
|
20656
|
-
const tsSource =
|
|
20718
|
+
const tsSource = readFileSync27(componentFilePath, "utf8");
|
|
20657
20719
|
const sourceFile = ts18.createSourceFile(componentFilePath, tsSource, ts18.ScriptTarget.ES2022, true, ts18.ScriptKind.TS);
|
|
20658
20720
|
const classNode = findClassDeclaration(sourceFile, className);
|
|
20659
20721
|
if (!classNode) {
|
|
@@ -20703,7 +20765,7 @@ ${block}
|
|
|
20703
20765
|
if (!existsSync28(tplAbs)) {
|
|
20704
20766
|
return fail("template-resource-not-found", `Template file not found: ${tplAbs}`, { file: componentFilePath });
|
|
20705
20767
|
}
|
|
20706
|
-
templateText =
|
|
20768
|
+
templateText = readFileSync27(tplAbs, "utf8");
|
|
20707
20769
|
templatePath = tplAbs;
|
|
20708
20770
|
} else {
|
|
20709
20771
|
return fail("unsupported-decorator-args", "missing template/templateUrl");
|
|
@@ -21884,7 +21946,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
|
|
|
21884
21946
|
}
|
|
21885
21947
|
return { angular, transitiveRoots };
|
|
21886
21948
|
}, PARTIAL_DECL_MARKERS, containsPartialDeclarations = (source) => PARTIAL_DECL_MARKERS.some((marker) => source.includes(marker)), collectTransitiveAngularSpecs = async (roots, angularFound) => {
|
|
21887
|
-
const { readFileSync:
|
|
21949
|
+
const { readFileSync: readFileSync28 } = await import("fs");
|
|
21888
21950
|
const transpiler6 = new Bun.Transpiler({ loader: "js" });
|
|
21889
21951
|
const visited = new Set;
|
|
21890
21952
|
const frontier = [];
|
|
@@ -21905,7 +21967,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
|
|
|
21905
21967
|
}
|
|
21906
21968
|
let content;
|
|
21907
21969
|
try {
|
|
21908
|
-
content =
|
|
21970
|
+
content = readFileSync28(resolved, "utf-8");
|
|
21909
21971
|
} catch {
|
|
21910
21972
|
continue;
|
|
21911
21973
|
}
|
|
@@ -22110,11 +22172,11 @@ var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"
|
|
|
22110
22172
|
console.warn("\u26A0\uFE0F Vue vendor build had errors:", result.logs);
|
|
22111
22173
|
return;
|
|
22112
22174
|
}
|
|
22113
|
-
const { readFileSync:
|
|
22175
|
+
const { readFileSync: readFileSync28, writeFileSync: writeFileSync9, readdirSync: readdirSync5 } = await import("fs");
|
|
22114
22176
|
const files = readdirSync5(vendorDir).filter((f2) => f2.endsWith(".js"));
|
|
22115
22177
|
for (const file5 of files) {
|
|
22116
22178
|
const filePath = join42(vendorDir, file5);
|
|
22117
|
-
const content =
|
|
22179
|
+
const content = readFileSync28(filePath, "utf-8");
|
|
22118
22180
|
if (!content.includes("__VUE_HMR_RUNTIME__"))
|
|
22119
22181
|
continue;
|
|
22120
22182
|
const patched = content.replace(/getGlobalThis\(\)\.__VUE_HMR_RUNTIME__\s*=\s*\{/, "getGlobalThis().__VUE_HMR_RUNTIME__ = getGlobalThis().__VUE_HMR_RUNTIME__ || {");
|
|
@@ -22205,7 +22267,7 @@ import {
|
|
|
22205
22267
|
existsSync as existsSync31,
|
|
22206
22268
|
mkdirSync as mkdirSync12,
|
|
22207
22269
|
readdirSync as readdirSync5,
|
|
22208
|
-
readFileSync as
|
|
22270
|
+
readFileSync as readFileSync28,
|
|
22209
22271
|
renameSync,
|
|
22210
22272
|
rmSync as rmSync2,
|
|
22211
22273
|
statSync as statSync3,
|
|
@@ -22294,7 +22356,7 @@ var isBuildTraceEnabled = () => {
|
|
|
22294
22356
|
}, REACT_VENDOR_SPECIFIERS, findBareReactImports = (path, importRegex) => {
|
|
22295
22357
|
let content;
|
|
22296
22358
|
try {
|
|
22297
|
-
content =
|
|
22359
|
+
content = readFileSync28(path, "utf-8");
|
|
22298
22360
|
} catch {
|
|
22299
22361
|
return [];
|
|
22300
22362
|
}
|
|
@@ -22390,7 +22452,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
22390
22452
|
addWorkerPathIfExists(file5, relPath, workerPaths);
|
|
22391
22453
|
}
|
|
22392
22454
|
}, collectWorkerPathsFromFile = (file5, patterns, workerPaths) => {
|
|
22393
|
-
const content =
|
|
22455
|
+
const content = readFileSync28(file5, "utf-8");
|
|
22394
22456
|
for (const pattern of patterns) {
|
|
22395
22457
|
collectWorkerPathsFromContent(content, pattern, file5, workerPaths);
|
|
22396
22458
|
}
|
|
@@ -22441,7 +22503,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
22441
22503
|
const indexFiles = readDir(reactIndexesPath).filter((file5) => file5.endsWith(".tsx"));
|
|
22442
22504
|
const pagesRel = relative16(process.cwd(), resolve33(reactPagesPath)).replace(/\\/g, "/");
|
|
22443
22505
|
for (const file5 of indexFiles) {
|
|
22444
|
-
let content =
|
|
22506
|
+
let content = readFileSync28(join44(reactIndexesPath, file5), "utf-8");
|
|
22445
22507
|
content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
|
|
22446
22508
|
writeFileSync9(join44(devIndexDir, file5), content);
|
|
22447
22509
|
}
|
|
@@ -22453,7 +22515,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
22453
22515
|
const indexFile = join44(svelteIndexDir, "pages", `${name}.js`);
|
|
22454
22516
|
if (!existsSync31(indexFile))
|
|
22455
22517
|
continue;
|
|
22456
|
-
let content =
|
|
22518
|
+
let content = readFileSync28(indexFile, "utf-8");
|
|
22457
22519
|
const srcRel = relative16(process.cwd(), resolve33(entry)).replace(/\\/g, "/");
|
|
22458
22520
|
content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
|
|
22459
22521
|
writeFileSync9(join44(devIndexDir, `${name}.svelte.js`), content);
|
|
@@ -22466,7 +22528,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
22466
22528
|
const indexFile = join44(vueIndexDir, `${name}.js`);
|
|
22467
22529
|
if (!existsSync31(indexFile))
|
|
22468
22530
|
continue;
|
|
22469
|
-
let content =
|
|
22531
|
+
let content = readFileSync28(indexFile, "utf-8");
|
|
22470
22532
|
const srcRel = relative16(process.cwd(), resolve33(entry)).replace(/\\/g, "/");
|
|
22471
22533
|
content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
|
|
22472
22534
|
writeFileSync9(join44(devIndexDir, `${name}.vue.js`), content);
|
|
@@ -22517,7 +22579,7 @@ ${offenders.map((o3) => ` \u2022 ${o3}`).join(`
|
|
|
22517
22579
|
}
|
|
22518
22580
|
return result;
|
|
22519
22581
|
}, VUE_HMR_RUNTIME, injectVueComposableTracking = (outputPath, projectRoot) => {
|
|
22520
|
-
let content =
|
|
22582
|
+
let content = readFileSync28(outputPath, "utf-8");
|
|
22521
22583
|
const usePattern = /^var\s+(use[A-Z]\w*)\s*=/gm;
|
|
22522
22584
|
const useNames = [];
|
|
22523
22585
|
let match;
|
|
@@ -22567,7 +22629,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
22567
22629
|
}, rewriteUrlReferences = (outputPaths, urlFileMap) => {
|
|
22568
22630
|
const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
|
|
22569
22631
|
for (const outputPath of outputPaths) {
|
|
22570
|
-
let content =
|
|
22632
|
+
let content = readFileSync28(outputPath, "utf-8");
|
|
22571
22633
|
let changed = false;
|
|
22572
22634
|
content = content.replace(urlPattern, (_match, relPath) => {
|
|
22573
22635
|
const targetName = basename14(relPath);
|
|
@@ -23642,7 +23704,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
23642
23704
|
renameSync(mapPath, join44(sourcemapDir, basename14(mapPath)));
|
|
23643
23705
|
const jsPath = mapPath.slice(0, -4);
|
|
23644
23706
|
try {
|
|
23645
|
-
const javascript =
|
|
23707
|
+
const javascript = readFileSync28(jsPath, "utf-8").replace(/\n?\/\/# sourceMappingURL=[^\n]*\s*$/, `
|
|
23646
23708
|
`);
|
|
23647
23709
|
writeFileSync9(jsPath, javascript);
|
|
23648
23710
|
} catch {}
|
|
@@ -23858,7 +23920,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
23858
23920
|
const injectHMRIntoHTMLFile = (filePath, framework) => {
|
|
23859
23921
|
if (!hmrClientBundle)
|
|
23860
23922
|
return;
|
|
23861
|
-
let html =
|
|
23923
|
+
let html = readFileSync28(filePath, "utf-8");
|
|
23862
23924
|
if (html.includes("data-hmr-client"))
|
|
23863
23925
|
return;
|
|
23864
23926
|
const tag = `<script>window.__HMR_FRAMEWORK__="${framework}";</script><script data-hmr-client>${hmrClientBundle}</script>`;
|
|
@@ -23885,7 +23947,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
23885
23947
|
if (hmr)
|
|
23886
23948
|
injectHMRIntoHTMLFile(htmlFile, "html");
|
|
23887
23949
|
if (pwaArtifacts) {
|
|
23888
|
-
const source =
|
|
23950
|
+
const source = readFileSync28(htmlFile, "utf8");
|
|
23889
23951
|
writeFileSync9(htmlFile, injectPwaBootstrapHtml(source));
|
|
23890
23952
|
}
|
|
23891
23953
|
const fileName = basename14(htmlFile, ".html");
|
|
@@ -23918,7 +23980,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
23918
23980
|
if (hmr)
|
|
23919
23981
|
injectHMRIntoHTMLFile(htmxFile, "htmx");
|
|
23920
23982
|
if (pwaArtifacts) {
|
|
23921
|
-
const source =
|
|
23983
|
+
const source = readFileSync28(htmxFile, "utf8");
|
|
23922
23984
|
writeFileSync9(htmxFile, injectPwaBootstrapHtml(source));
|
|
23923
23985
|
}
|
|
23924
23986
|
const fileName = basename14(htmxFile, ".html");
|
|
@@ -24398,7 +24460,7 @@ __export(exports_dependencyGraph, {
|
|
|
24398
24460
|
getAffectedFiles: () => getAffectedFiles,
|
|
24399
24461
|
removeFileFromGraph: () => removeFileFromGraph
|
|
24400
24462
|
});
|
|
24401
|
-
import { existsSync as existsSync33, readFileSync as
|
|
24463
|
+
import { existsSync as existsSync33, readFileSync as readFileSync29 } from "fs";
|
|
24402
24464
|
var {Glob: Glob9 } = globalThis.Bun;
|
|
24403
24465
|
import { resolve as resolve34 } from "path";
|
|
24404
24466
|
var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
|
|
@@ -24569,15 +24631,15 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
|
|
|
24569
24631
|
const lowerPath = filePath.toLowerCase();
|
|
24570
24632
|
const isSvelteOrVue = lowerPath.endsWith(".svelte") || lowerPath.endsWith(".vue");
|
|
24571
24633
|
if (loader === "html") {
|
|
24572
|
-
const content =
|
|
24634
|
+
const content = readFileSync29(filePath, "utf-8");
|
|
24573
24635
|
return extractHtmlDependencies(filePath, content);
|
|
24574
24636
|
}
|
|
24575
24637
|
if (loader === "tsx" || loader === "js") {
|
|
24576
|
-
const content =
|
|
24638
|
+
const content = readFileSync29(filePath, "utf-8");
|
|
24577
24639
|
return extractJsDependencies(filePath, content, loader);
|
|
24578
24640
|
}
|
|
24579
24641
|
if (isSvelteOrVue) {
|
|
24580
|
-
const content =
|
|
24642
|
+
const content = readFileSync29(filePath, "utf-8");
|
|
24581
24643
|
return extractSvelteVueDependencies(filePath, content);
|
|
24582
24644
|
}
|
|
24583
24645
|
return [];
|
|
@@ -24726,7 +24788,7 @@ var init_clientManager = __esm(() => {
|
|
|
24726
24788
|
});
|
|
24727
24789
|
|
|
24728
24790
|
// src/dev/pathUtils.ts
|
|
24729
|
-
import { existsSync as existsSync34, readdirSync as readdirSync6, readFileSync as
|
|
24791
|
+
import { existsSync as existsSync34, readdirSync as readdirSync6, readFileSync as readFileSync30 } from "fs";
|
|
24730
24792
|
import { dirname as dirname25, resolve as resolve36 } from "path";
|
|
24731
24793
|
var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
|
|
24732
24794
|
if (shouldIgnorePath(filePath, resolved)) {
|
|
@@ -24826,7 +24888,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
|
|
|
24826
24888
|
}
|
|
24827
24889
|
let source;
|
|
24828
24890
|
try {
|
|
24829
|
-
source =
|
|
24891
|
+
source = readFileSync30(full, "utf8");
|
|
24830
24892
|
} catch {
|
|
24831
24893
|
continue;
|
|
24832
24894
|
}
|
|
@@ -25223,10 +25285,10 @@ var init_assetStore = __esm(() => {
|
|
|
25223
25285
|
});
|
|
25224
25286
|
|
|
25225
25287
|
// src/dev/fileHashTracker.ts
|
|
25226
|
-
import { readFileSync as
|
|
25288
|
+
import { readFileSync as readFileSync31 } from "fs";
|
|
25227
25289
|
var computeFileHash = (filePath) => {
|
|
25228
25290
|
try {
|
|
25229
|
-
const fileContent =
|
|
25291
|
+
const fileContent = readFileSync31(filePath);
|
|
25230
25292
|
return Number(Bun.hash(fileContent));
|
|
25231
25293
|
} catch {
|
|
25232
25294
|
return UNFOUND_INDEX;
|
|
@@ -25556,7 +25618,7 @@ __export(exports_resolveOwningComponents, {
|
|
|
25556
25618
|
resolveDescendantsOfParent: () => resolveDescendantsOfParent,
|
|
25557
25619
|
resolveOwningComponents: () => resolveOwningComponents
|
|
25558
25620
|
});
|
|
25559
|
-
import { readdirSync as readdirSync8, readFileSync as
|
|
25621
|
+
import { readdirSync as readdirSync8, readFileSync as readFileSync32, statSync as statSync5 } from "fs";
|
|
25560
25622
|
import { dirname as dirname28, extname as extname12, join as join47, resolve as resolve42 } from "path";
|
|
25561
25623
|
import ts19 from "typescript";
|
|
25562
25624
|
var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") || file5.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
|
|
@@ -25616,7 +25678,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
|
|
|
25616
25678
|
}, parseDecoratedClasses = (filePath) => {
|
|
25617
25679
|
let source;
|
|
25618
25680
|
try {
|
|
25619
|
-
source =
|
|
25681
|
+
source = readFileSync32(filePath, "utf8");
|
|
25620
25682
|
} catch {
|
|
25621
25683
|
return [];
|
|
25622
25684
|
}
|
|
@@ -25706,7 +25768,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
|
|
|
25706
25768
|
}, indexByRoot, resolveParentClassFile = (parentName, childFilePath, angularRoot) => {
|
|
25707
25769
|
let source;
|
|
25708
25770
|
try {
|
|
25709
|
-
source =
|
|
25771
|
+
source = readFileSync32(childFilePath, "utf8");
|
|
25710
25772
|
} catch {
|
|
25711
25773
|
return null;
|
|
25712
25774
|
}
|
|
@@ -26025,7 +26087,7 @@ __export(exports_moduleServer, {
|
|
|
26025
26087
|
warmCompilers: () => warmCompilers,
|
|
26026
26088
|
warnIfReactFastRefreshUnsupported: () => warnIfReactFastRefreshUnsupported
|
|
26027
26089
|
});
|
|
26028
|
-
import { existsSync as existsSync36, readFileSync as
|
|
26090
|
+
import { existsSync as existsSync36, readFileSync as readFileSync33, realpathSync as realpathSync3, statSync as statSync6 } from "fs";
|
|
26029
26091
|
import { basename as basename16, dirname as dirname29, extname as extname13, join as join48, resolve as resolve43, relative as relative17 } from "path";
|
|
26030
26092
|
var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfig, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
|
|
26031
26093
|
const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
|
|
@@ -26111,7 +26173,7 @@ ${stubs}
|
|
|
26111
26173
|
const pkgDir = resolve43(projectRoot, "node_modules", packageName ?? "");
|
|
26112
26174
|
const pkgJsonPath = join48(pkgDir, "package.json");
|
|
26113
26175
|
if (existsSync36(pkgJsonPath)) {
|
|
26114
|
-
const pkg = JSON.parse(
|
|
26176
|
+
const pkg = JSON.parse(readFileSync33(pkgJsonPath, "utf-8"));
|
|
26115
26177
|
const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
|
|
26116
26178
|
if (esmEntry) {
|
|
26117
26179
|
const resolved = resolve43(pkgDir, esmEntry);
|
|
@@ -26218,7 +26280,7 @@ ${code}`;
|
|
|
26218
26280
|
reactFastRefreshWarningEmitted = true;
|
|
26219
26281
|
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
26282
|
}, transformReactFile = (filePath, projectRoot, rewriter) => {
|
|
26221
|
-
const raw =
|
|
26283
|
+
const raw = readFileSync33(filePath, "utf-8");
|
|
26222
26284
|
const valueExports = tsxTranspiler.scan(raw).exports;
|
|
26223
26285
|
let transpiled = reactTranspiler.transformSync(raw);
|
|
26224
26286
|
transpiled = preserveTypeExports(raw, transpiled, valueExports);
|
|
@@ -26234,7 +26296,7 @@ ${transpiled}`;
|
|
|
26234
26296
|
transpiled += buildIslandMetadataExports(raw);
|
|
26235
26297
|
return rewriteImports(transpiled, filePath, projectRoot, rewriter);
|
|
26236
26298
|
}, transformPlainFile = (filePath, projectRoot, rewriter, vueDir) => {
|
|
26237
|
-
const raw =
|
|
26299
|
+
const raw = readFileSync33(filePath, "utf-8");
|
|
26238
26300
|
const ext = extname13(filePath);
|
|
26239
26301
|
const isTS = ext === ".ts" || ext === ".tsx";
|
|
26240
26302
|
const isTSX = ext === ".tsx" || ext === ".jsx";
|
|
@@ -26400,7 +26462,7 @@ ${code}`;
|
|
|
26400
26462
|
` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
|
|
26401
26463
|
return code.replace(/import\.meta\.hot\.accept\(/g, "__hmr_accept(");
|
|
26402
26464
|
}, transformSvelteFile = async (filePath, projectRoot, rewriter, stylePreprocessors) => {
|
|
26403
|
-
const raw =
|
|
26465
|
+
const raw = readFileSync33(filePath, "utf-8");
|
|
26404
26466
|
if (!svelteCompiler) {
|
|
26405
26467
|
svelteCompiler = await import("svelte/compiler");
|
|
26406
26468
|
}
|
|
@@ -26466,7 +26528,7 @@ export default __script__;`;
|
|
|
26466
26528
|
return `${cssInjection}
|
|
26467
26529
|
${code}`;
|
|
26468
26530
|
}, transformVueFile = async (filePath, projectRoot, rewriter, vueDir, stylePreprocessors) => {
|
|
26469
|
-
const rawSource =
|
|
26531
|
+
const rawSource = readFileSync33(filePath, "utf-8");
|
|
26470
26532
|
const raw = addAutoRouterSetupApp(rawSource);
|
|
26471
26533
|
if (!vueCompiler) {
|
|
26472
26534
|
vueCompiler = await loadVueCompiler();
|
|
@@ -26479,7 +26541,7 @@ ${code}`;
|
|
|
26479
26541
|
fs: {
|
|
26480
26542
|
fileExists: existsSync36,
|
|
26481
26543
|
realpath: realpathSync3,
|
|
26482
|
-
readFile: (file5) => existsSync36(file5) ?
|
|
26544
|
+
readFile: (file5) => existsSync36(file5) ? readFileSync33(file5, "utf-8") : undefined
|
|
26483
26545
|
},
|
|
26484
26546
|
id: componentId,
|
|
26485
26547
|
inlineTemplate: false
|
|
@@ -26526,7 +26588,7 @@ ${code}`;
|
|
|
26526
26588
|
}
|
|
26527
26589
|
});
|
|
26528
26590
|
}, handleCssRequest = (filePath) => {
|
|
26529
|
-
const raw =
|
|
26591
|
+
const raw = readFileSync33(filePath, "utf-8");
|
|
26530
26592
|
const escaped = raw.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
|
|
26531
26593
|
return [
|
|
26532
26594
|
`const style = document.createElement('style');`,
|
|
@@ -29967,7 +30029,7 @@ var toSafeFileName6 = (specifier) => {
|
|
|
29967
30029
|
framework: Array.from(framework).filter(isResolvable3)
|
|
29968
30030
|
};
|
|
29969
30031
|
}, collectBareImportsFromFile = async (entryPath, transpiler6, maxDepth = 8) => {
|
|
29970
|
-
const { readFileSync:
|
|
30032
|
+
const { readFileSync: readFileSync34 } = await import("fs");
|
|
29971
30033
|
const { dirname: dirname32 } = await import("path");
|
|
29972
30034
|
const seenFiles = new Set;
|
|
29973
30035
|
const bareOut = new Set;
|
|
@@ -29983,7 +30045,7 @@ var toSafeFileName6 = (specifier) => {
|
|
|
29983
30045
|
continue;
|
|
29984
30046
|
let content;
|
|
29985
30047
|
try {
|
|
29986
|
-
content =
|
|
30048
|
+
content = readFileSync34(path, "utf-8");
|
|
29987
30049
|
} catch {
|
|
29988
30050
|
continue;
|
|
29989
30051
|
}
|
|
@@ -30904,7 +30966,7 @@ __export(exports_devtoolsJson, {
|
|
|
30904
30966
|
normalizeDevtoolsWorkspaceRoot: () => normalizeDevtoolsWorkspaceRoot,
|
|
30905
30967
|
resolveDevtoolsUuidCachePath: () => resolveDevtoolsUuidCachePath
|
|
30906
30968
|
});
|
|
30907
|
-
import { existsSync as existsSync38, mkdirSync as mkdirSync15, readFileSync as
|
|
30969
|
+
import { existsSync as existsSync38, mkdirSync as mkdirSync15, readFileSync as readFileSync34, writeFileSync as writeFileSync10 } from "fs";
|
|
30908
30970
|
import { dirname as dirname32, join as join51, resolve as resolve48 } from "path";
|
|
30909
30971
|
import { Elysia as Elysia7 } from "elysia";
|
|
30910
30972
|
var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
|
|
@@ -30914,7 +30976,7 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
|
|
|
30914
30976
|
if (!existsSync38(cachePath))
|
|
30915
30977
|
return null;
|
|
30916
30978
|
try {
|
|
30917
|
-
const value =
|
|
30979
|
+
const value = readFileSync34(cachePath, "utf-8").trim();
|
|
30918
30980
|
return isUuidV4(value) ? value : null;
|
|
30919
30981
|
} catch {
|
|
30920
30982
|
return null;
|
|
@@ -31247,11 +31309,11 @@ var init_requestInspector = __esm(() => {
|
|
|
31247
31309
|
});
|
|
31248
31310
|
|
|
31249
31311
|
// src/mobile/nativeAuth.ts
|
|
31250
|
-
import { readFileSync as
|
|
31312
|
+
import { readFileSync as readFileSync35 } from "fs";
|
|
31251
31313
|
import { join as join52 } from "path";
|
|
31252
31314
|
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
31315
|
try {
|
|
31254
|
-
return JSON.parse(
|
|
31316
|
+
return JSON.parse(readFileSync35(join52(projectRoot, "package.json"), "utf8"));
|
|
31255
31317
|
} catch {
|
|
31256
31318
|
return;
|
|
31257
31319
|
}
|
|
@@ -31411,7 +31473,7 @@ __export(exports_prerender, {
|
|
|
31411
31473
|
rerenderRoute: () => rerenderRoute,
|
|
31412
31474
|
routeToFilename: () => routeToFilename
|
|
31413
31475
|
});
|
|
31414
|
-
import { mkdirSync as mkdirSync16, readFileSync as
|
|
31476
|
+
import { mkdirSync as mkdirSync16, readFileSync as readFileSync36 } from "fs";
|
|
31415
31477
|
import { join as join54 } from "path";
|
|
31416
31478
|
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
31479
|
const metaPath = htmlPath.replace(/\.html$/, ".meta");
|
|
@@ -31419,7 +31481,7 @@ var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_
|
|
|
31419
31481
|
}, readTimestamp = (htmlPath) => {
|
|
31420
31482
|
const metaPath = htmlPath.replace(/\.html$/, ".meta");
|
|
31421
31483
|
try {
|
|
31422
|
-
const content =
|
|
31484
|
+
const content = readFileSync36(metaPath, "utf-8");
|
|
31423
31485
|
return Number(content) || 0;
|
|
31424
31486
|
} catch {
|
|
31425
31487
|
return 0;
|
|
@@ -31639,15 +31701,15 @@ import {
|
|
|
31639
31701
|
copyFileSync as copyFileSync4,
|
|
31640
31702
|
existsSync as existsSync42,
|
|
31641
31703
|
readdirSync as readdirSync12,
|
|
31642
|
-
readFileSync as
|
|
31704
|
+
readFileSync as readFileSync40,
|
|
31643
31705
|
statSync as statSync8,
|
|
31644
31706
|
watch as watch2
|
|
31645
31707
|
} from "fs";
|
|
31646
|
-
import { createHash as
|
|
31708
|
+
import { createHash as createHash10 } from "crypto";
|
|
31647
31709
|
import { dirname as dirname33, join as join58, resolve as resolve50 } from "path";
|
|
31648
31710
|
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
31711
|
try {
|
|
31650
|
-
return
|
|
31712
|
+
return createHash10("sha256").update(readFileSync40(path)).digest("hex");
|
|
31651
31713
|
} catch {
|
|
31652
31714
|
return null;
|
|
31653
31715
|
}
|
|
@@ -32701,8 +32763,8 @@ var handleHTMXPageRequest = async (pagePath, options = {}) => {
|
|
|
32701
32763
|
});
|
|
32702
32764
|
};
|
|
32703
32765
|
// src/core/prepare.ts
|
|
32704
|
-
import { createHash as
|
|
32705
|
-
import { existsSync as existsSync40, readdirSync as readdirSync10, readFileSync as
|
|
32766
|
+
import { createHash as createHash9 } from "crypto";
|
|
32767
|
+
import { existsSync as existsSync40, readdirSync as readdirSync10, readFileSync as readFileSync37 } from "fs";
|
|
32706
32768
|
import { basename as basename18, join as join55, relative as relative20, resolve as resolvePath4 } from "path";
|
|
32707
32769
|
import { Elysia as Elysia10, NotFound } from "elysia";
|
|
32708
32770
|
|
|
@@ -33531,7 +33593,7 @@ var createAbsoluteMobilePreviewPlugin = (mobile) => {
|
|
|
33531
33593
|
};
|
|
33532
33594
|
|
|
33533
33595
|
// src/mobile/materializedBundle.ts
|
|
33534
|
-
import { createHash as
|
|
33596
|
+
import { createHash as createHash7 } from "crypto";
|
|
33535
33597
|
import {
|
|
33536
33598
|
access as access2,
|
|
33537
33599
|
mkdir as mkdir7,
|
|
@@ -33545,7 +33607,7 @@ import { dirname as dirname10, join as join16, resolve as resolvePath2 } from "p
|
|
|
33545
33607
|
import { pathToFileURL as pathToFileURL2 } from "url";
|
|
33546
33608
|
|
|
33547
33609
|
// src/mobile/artifactStore.ts
|
|
33548
|
-
import { createHash as
|
|
33610
|
+
import { createHash as createHash6 } from "crypto";
|
|
33549
33611
|
import {
|
|
33550
33612
|
mkdir as mkdir6,
|
|
33551
33613
|
mkdtemp,
|
|
@@ -33563,7 +33625,7 @@ var RELEASE_ID_PATTERN = /^amc_[a-f0-9]{64}$/;
|
|
|
33563
33625
|
var DEFAULT_BLOB_PREFIX = "absolutejs/mobile-compatibility";
|
|
33564
33626
|
var hashBlob = async (blob) => {
|
|
33565
33627
|
const bytes = new Uint8Array(await blob.arrayBuffer());
|
|
33566
|
-
return
|
|
33628
|
+
return createHash6(SHA_2562).update(bytes).digest("hex");
|
|
33567
33629
|
};
|
|
33568
33630
|
var blobFromBytes = (bytes) => {
|
|
33569
33631
|
const buffer = new ArrayBuffer(bytes.byteLength);
|
|
@@ -33571,7 +33633,7 @@ var blobFromBytes = (bytes) => {
|
|
|
33571
33633
|
return new Blob([buffer]);
|
|
33572
33634
|
};
|
|
33573
33635
|
var errorHasCode = (error, code) => typeof error === "object" && error !== null && Reflect.get(error, "code") === code;
|
|
33574
|
-
var appDirectoryName = (appId) =>
|
|
33636
|
+
var appDirectoryName = (appId) => createHash6(SHA_2562).update(appId).digest("hex");
|
|
33575
33637
|
var requireReleaseId = (releaseId) => {
|
|
33576
33638
|
if (!RELEASE_ID_PATTERN.test(releaseId)) {
|
|
33577
33639
|
throw new TypeError("Invalid mobile compatibility release id.");
|
|
@@ -33775,7 +33837,7 @@ var bundleIdFor = (currentReleaseId, releases) => {
|
|
|
33775
33837
|
currentReleaseId,
|
|
33776
33838
|
releases: releases.map(({ releaseId }) => releaseId)
|
|
33777
33839
|
});
|
|
33778
|
-
return `amb_${
|
|
33840
|
+
return `amb_${createHash7("sha256").update(identity).digest("hex")}`;
|
|
33779
33841
|
};
|
|
33780
33842
|
var parseBundleIndex = (value) => {
|
|
33781
33843
|
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 +34129,7 @@ var registerIconVersioning = (buildDir) => {
|
|
|
34067
34129
|
const filePath = join55(buildDir, path);
|
|
34068
34130
|
let versioned = href;
|
|
34069
34131
|
if (existsSync40(filePath)) {
|
|
34070
|
-
const hash =
|
|
34132
|
+
const hash = createHash9("sha256").update(readFileSync37(filePath)).digest("hex").slice(0, ICON_HASH_LENGTH);
|
|
34071
34133
|
versioned = href.includes("?") ? `${href}&v=${hash}` : `${href}?v=${hash}`;
|
|
34072
34134
|
}
|
|
34073
34135
|
cache2.set(href, versioned);
|
|
@@ -34262,7 +34324,7 @@ var prepare = async (configOrPath) => {
|
|
|
34262
34324
|
return result;
|
|
34263
34325
|
}
|
|
34264
34326
|
stepStartedAt = performance.now();
|
|
34265
|
-
const manifest = JSON.parse(
|
|
34327
|
+
const manifest = JSON.parse(readFileSync37(`${buildDir}/manifest.json`, "utf-8"));
|
|
34266
34328
|
setCurrentIslandManifest(manifest);
|
|
34267
34329
|
if (config.islands?.registry) {
|
|
34268
34330
|
setCurrentIslandRegistry(await loadIslandRegistry(config.islands.registry));
|
|
@@ -34272,12 +34334,12 @@ var prepare = async (configOrPath) => {
|
|
|
34272
34334
|
stepStartedAt = performance.now();
|
|
34273
34335
|
const conventionsPath = join55(buildDir, "conventions.json");
|
|
34274
34336
|
if (existsSync40(conventionsPath)) {
|
|
34275
|
-
const conventions2 = JSON.parse(
|
|
34337
|
+
const conventions2 = JSON.parse(readFileSync37(conventionsPath, "utf-8"));
|
|
34276
34338
|
setConventions(conventions2);
|
|
34277
34339
|
}
|
|
34278
34340
|
const spaRoutesPath = join55(buildDir, "spa-routes.json");
|
|
34279
34341
|
if (existsSync40(spaRoutesPath)) {
|
|
34280
|
-
setSpaRouteManifest(JSON.parse(
|
|
34342
|
+
setSpaRouteManifest(JSON.parse(readFileSync37(spaRoutesPath, "utf-8")));
|
|
34281
34343
|
}
|
|
34282
34344
|
recordStep("load production conventions", stepStartedAt);
|
|
34283
34345
|
stepStartedAt = performance.now();
|
|
@@ -34396,10 +34458,10 @@ import {
|
|
|
34396
34458
|
copyFileSync as copyFileSync3,
|
|
34397
34459
|
existsSync as existsSync41,
|
|
34398
34460
|
mkdirSync as mkdirSync17,
|
|
34399
|
-
readFileSync as
|
|
34461
|
+
readFileSync as readFileSync38,
|
|
34400
34462
|
rmSync as rmSync4
|
|
34401
34463
|
} from "fs";
|
|
34402
|
-
import { X509Certificate } from "crypto";
|
|
34464
|
+
import { X509Certificate as X509Certificate2 } from "crypto";
|
|
34403
34465
|
import { isIP } from "net";
|
|
34404
34466
|
import { join as join56 } from "path";
|
|
34405
34467
|
var CERT_DIR = join56(process.cwd(), ".absolutejs");
|
|
@@ -34426,8 +34488,8 @@ var normalizeDevCertificateHosts = (hosts = []) => {
|
|
|
34426
34488
|
};
|
|
34427
34489
|
var certificateIsUsable = (hosts) => {
|
|
34428
34490
|
try {
|
|
34429
|
-
const certPem =
|
|
34430
|
-
const certificate = new
|
|
34491
|
+
const certPem = readFileSync38(CERT_PATH, "utf-8");
|
|
34492
|
+
const certificate = new X509Certificate2(certPem);
|
|
34431
34493
|
if (new Date(certificate.validTo).getTime() <= Date.now())
|
|
34432
34494
|
return false;
|
|
34433
34495
|
return normalizeDevCertificateHosts(hosts).every((host2) => isIP(host2) ? certificate.checkIP(host2) !== undefined : certificate.checkHost(host2) !== undefined);
|
|
@@ -34518,8 +34580,8 @@ var loadDevCert = (hosts = []) => {
|
|
|
34518
34580
|
return null;
|
|
34519
34581
|
try {
|
|
34520
34582
|
return {
|
|
34521
|
-
cert:
|
|
34522
|
-
key:
|
|
34583
|
+
cert: readFileSync38(paths.cert, "utf-8"),
|
|
34584
|
+
key: readFileSync38(paths.key, "utf-8")
|
|
34523
34585
|
};
|
|
34524
34586
|
} catch {
|
|
34525
34587
|
return null;
|
|
@@ -34529,7 +34591,7 @@ var loadDevCert = (hosts = []) => {
|
|
|
34529
34591
|
// src/utils/instanceRegistry.ts
|
|
34530
34592
|
import {
|
|
34531
34593
|
mkdirSync as mkdirSync18,
|
|
34532
|
-
readFileSync as
|
|
34594
|
+
readFileSync as readFileSync39,
|
|
34533
34595
|
readdirSync as readdirSync11,
|
|
34534
34596
|
unlinkSync as unlinkSync2,
|
|
34535
34597
|
writeFileSync as writeFileSync11
|
|
@@ -34562,7 +34624,7 @@ var registerExitHandlerOnce = () => {
|
|
|
34562
34624
|
};
|
|
34563
34625
|
var readJsonFile = (path) => {
|
|
34564
34626
|
try {
|
|
34565
|
-
return JSON.parse(
|
|
34627
|
+
return JSON.parse(readFileSync39(path, "utf-8"));
|
|
34566
34628
|
} catch {
|
|
34567
34629
|
return null;
|
|
34568
34630
|
}
|
|
@@ -34887,7 +34949,7 @@ var generateHeadElement = ({
|
|
|
34887
34949
|
};
|
|
34888
34950
|
// src/utils/defineEnv.ts
|
|
34889
34951
|
var {env: bunEnv } = globalThis.Bun;
|
|
34890
|
-
import { existsSync as existsSync43, readFileSync as
|
|
34952
|
+
import { existsSync as existsSync43, readFileSync as readFileSync41 } from "fs";
|
|
34891
34953
|
import { resolve as resolve51 } from "path";
|
|
34892
34954
|
|
|
34893
34955
|
// node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
|
|
@@ -40929,13 +40991,13 @@ var checkEnvFileSecurity = (properties) => {
|
|
|
40929
40991
|
const sensitiveKeys = Object.keys(properties).filter(isSensitive);
|
|
40930
40992
|
if (sensitiveKeys.length === 0)
|
|
40931
40993
|
return;
|
|
40932
|
-
const envContent =
|
|
40994
|
+
const envContent = readFileSync41(envPath, "utf-8");
|
|
40933
40995
|
const presentKeys = sensitiveKeys.filter((key) => envContent.includes(`${key}=`));
|
|
40934
40996
|
if (presentKeys.length === 0)
|
|
40935
40997
|
return;
|
|
40936
40998
|
const gitignorePath = resolve51(cwd2, ".gitignore");
|
|
40937
40999
|
if (existsSync43(gitignorePath)) {
|
|
40938
|
-
const gitignore =
|
|
41000
|
+
const gitignore = readFileSync41(gitignorePath, "utf-8");
|
|
40939
41001
|
if (gitignore.split(`
|
|
40940
41002
|
`).some((line) => line.trim() === ".env"))
|
|
40941
41003
|
return;
|
|
@@ -41235,5 +41297,5 @@ export {
|
|
|
41235
41297
|
wrapPageHandlerWithStreamingSlots
|
|
41236
41298
|
};
|
|
41237
41299
|
|
|
41238
|
-
//# debugId=
|
|
41300
|
+
//# debugId=5413308C072D0B1164756E2164756E21
|
|
41239
41301
|
//# sourceMappingURL=index.js.map
|