@absolutejs/absolute 0.20.0-beta.160 → 0.20.0-beta.162
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/changelog.json +28 -0
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/build.js +155 -138
- package/dist/build.js.map +5 -4
- package/dist/cli/{index-55k7vn84.js → index-f82hvr9c.js} +65 -10
- package/dist/cli/index.js +3 -3
- package/dist/cli/{mobile-0r1y2hwc.js → mobile-2f54v4by.js} +1 -1
- package/dist/cli/{start-4rpdy8hg.js → start-0bx1rkx4.js} +1 -1
- package/dist/index.js +671 -654
- package/dist/index.js.map +5 -4
- package/dist/src/core/productionRuntime.d.ts +11 -0
- package/dist/src/plugins/headFallback.d.ts +1 -1
- package/dist/src/plugins/hmr.d.ts +9 -3
- package/package.json +9 -11
package/dist/build.js
CHANGED
|
@@ -27273,6 +27273,21 @@ var OTEL_PACKAGE = "@elysia/opentelemetry", readPackageName = (cwd) => {
|
|
|
27273
27273
|
};
|
|
27274
27274
|
var init_telemetryPlugin = () => {};
|
|
27275
27275
|
|
|
27276
|
+
// src/core/productionRuntime.ts
|
|
27277
|
+
import { existsSync as existsSync43, readFileSync as readFileSync37, writeFileSync as writeFileSync10 } from "fs";
|
|
27278
|
+
import { join as join54 } from "path";
|
|
27279
|
+
var PRODUCTION_RUNTIME_FILE = "absolute-runtime.json", PRODUCTION_RUNTIME_VERSION = 1, isRuntimeFile = (value) => typeof value === "object" && value !== null && ("version" in value) && value.version === PRODUCTION_RUNTIME_VERSION && ("config" in value) && typeof value.config === "object" && value.config !== null, readProductionRuntime = (buildDirectory) => {
|
|
27280
|
+
const path = join54(buildDirectory, PRODUCTION_RUNTIME_FILE);
|
|
27281
|
+
if (!existsSync43(path))
|
|
27282
|
+
return null;
|
|
27283
|
+
const parsed = JSON.parse(readFileSync37(path, "utf-8"));
|
|
27284
|
+
if (!isRuntimeFile(parsed))
|
|
27285
|
+
return null;
|
|
27286
|
+
const config = { ...parsed.config, buildDirectory };
|
|
27287
|
+
return config;
|
|
27288
|
+
};
|
|
27289
|
+
var init_productionRuntime = () => {};
|
|
27290
|
+
|
|
27276
27291
|
// src/utils/iconVersion.ts
|
|
27277
27292
|
var iconMimeType = (icon) => {
|
|
27278
27293
|
if (icon.endsWith(".svg"))
|
|
@@ -27856,7 +27871,7 @@ var exports_config = {};
|
|
|
27856
27871
|
__export(exports_config, {
|
|
27857
27872
|
normalizeAbsoluteMobileConfig: () => normalizeAbsoluteMobileConfig
|
|
27858
27873
|
});
|
|
27859
|
-
import { readFileSync as
|
|
27874
|
+
import { readFileSync as readFileSync38 } from "fs";
|
|
27860
27875
|
import { resolve as resolve48 } from "path";
|
|
27861
27876
|
import { createHash as createHash4, createPublicKey, X509Certificate } from "crypto";
|
|
27862
27877
|
var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FINGERPRINT_PATTERN, UPDATE_NAME_PATTERN, RELEASE_TARGET_PATTERN, UPDATE_PUBLIC_KEY_PATTERN, ENVIRONMENT_NAME_PATTERN, COLOR_PATTERN, DEFAULT_UPDATE_BOOT_TIMEOUT_MS = 20000, DEFAULT_UPDATE_HEALTH_FAILURE_RATE = 0.2, DEFAULT_UPDATE_HEALTH_MINIMUM_REPORTS = 20, DEFAULT_UPDATE_ROLLOUT_FAILURE_RATE = 0.05, DEFAULT_UPDATE_ROLLOUT_OBSERVATION_MINUTES = 60, MINUTE_MS, DEFAULT_UPDATE_ROLLOUT_STAGES, MINIMUM_UPDATE_BOOT_TIMEOUT_MS = 5000, MAXIMUM_UPDATE_BOOT_TIMEOUT_MS = 120000, HOSTNAME_PATTERN, EXPO_RESERVED_ROUTE_PREFIXES, resolveProjectPath = (projectRoot, value, field) => {
|
|
@@ -28055,7 +28070,7 @@ var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FIN
|
|
|
28055
28070
|
}))
|
|
28056
28071
|
].sort(), readExpoCodeSigningCertificate = (certificatePath) => {
|
|
28057
28072
|
try {
|
|
28058
|
-
const certificateSource =
|
|
28073
|
+
const certificateSource = readFileSync38(certificatePath, "utf8");
|
|
28059
28074
|
const certificatePem = certificateSource.endsWith(`
|
|
28060
28075
|
`) ? certificateSource : `${certificateSource}
|
|
28061
28076
|
`;
|
|
@@ -28657,11 +28672,11 @@ var init_mobilePreview = __esm(() => {
|
|
|
28657
28672
|
});
|
|
28658
28673
|
|
|
28659
28674
|
// src/mobile/nativeAuth.ts
|
|
28660
|
-
import { readFileSync as
|
|
28661
|
-
import { join as
|
|
28675
|
+
import { readFileSync as readFileSync39 } from "fs";
|
|
28676
|
+
import { join as join55 } from "path";
|
|
28662
28677
|
var ABSOLUTE_AUTH_PACKAGE = "@absolutejs/auth", ABSOLUTE_EXPO_AUTH_CORE_VERSION = "0.76.3", ABSOLUTE_EXPO_AUTH_PACKAGE = "@absolutejs/auth-expo", ABSOLUTE_EXPO_AUTH_VERSION = "0.0.6", ABSOLUTE_EXPO_SYNC_CORE_VERSION = "2.31.0", ABSOLUTE_EXPO_SYNC_PACKAGE = "@absolutejs/sync-expo", ABSOLUTE_EXPO_SYNC_VERSION = "0.0.4", ABSOLUTE_NATIVE_AUTH_CLIENTS_ENV = "ABSOLUTE_AUTH_NATIVE_CLIENTS", ABSOLUTE_NATIVE_AUTH_SCOPES, ABSOLUTE_SYNC_PACKAGE = "@absolutejs/sync", readPackageManifest = (projectRoot) => {
|
|
28663
28678
|
try {
|
|
28664
|
-
return JSON.parse(
|
|
28679
|
+
return JSON.parse(readFileSync39(join55(projectRoot, "package.json"), "utf8"));
|
|
28665
28680
|
} catch {
|
|
28666
28681
|
return;
|
|
28667
28682
|
}
|
|
@@ -28702,7 +28717,7 @@ var init_nativeAuth = __esm(() => {
|
|
|
28702
28717
|
|
|
28703
28718
|
// src/mobile/devDeviceAdapter.ts
|
|
28704
28719
|
import { access as access2, mkdtemp, rm as rm12, writeFile as writeFile11 } from "fs/promises";
|
|
28705
|
-
import { join as
|
|
28720
|
+
import { join as join56 } from "path";
|
|
28706
28721
|
import { tmpdir } from "os";
|
|
28707
28722
|
var absoluteNativeDevAdapterSource = (projectRoot, mobile, resolveModule = (specifier) => specifier, expoAdapterModule = "@absolutejs/absolute/mobile/expo-devices", expoAuthModule = "@absolutejs/absolute/mobile/expo-auth", expoSyncModule = "@absolutejs/absolute/mobile/expo-sync") => {
|
|
28708
28723
|
if ((mobile.engine ?? "capacitor") === "expo") {
|
|
@@ -28740,7 +28755,7 @@ ${auth ? `void createAbsoluteExpoShellAuth(${JSON.stringify(auth)}).then(auth =>
|
|
|
28740
28755
|
`);
|
|
28741
28756
|
}, expoAdapterPath = async () => {
|
|
28742
28757
|
const candidates = await Promise.all(["ts", "js"].map(async (extension) => {
|
|
28743
|
-
const path =
|
|
28758
|
+
const path = join56(import.meta.dir, `shellExpoDevices.${extension}`);
|
|
28744
28759
|
try {
|
|
28745
28760
|
await access2(path);
|
|
28746
28761
|
return path;
|
|
@@ -28754,7 +28769,7 @@ ${auth ? `void createAbsoluteExpoShellAuth(${JSON.stringify(auth)}).then(auth =>
|
|
|
28754
28769
|
throw new TypeError("The AbsoluteJS Expo development adapter is missing.");
|
|
28755
28770
|
}, expoAuthPath = async () => {
|
|
28756
28771
|
const candidates = await Promise.all(["ts", "js"].map(async (extension) => {
|
|
28757
|
-
const path =
|
|
28772
|
+
const path = join56(import.meta.dir, `shellExpoAuth.${extension}`);
|
|
28758
28773
|
try {
|
|
28759
28774
|
await access2(path);
|
|
28760
28775
|
return path;
|
|
@@ -28768,7 +28783,7 @@ ${auth ? `void createAbsoluteExpoShellAuth(${JSON.stringify(auth)}).then(auth =>
|
|
|
28768
28783
|
throw new TypeError("The AbsoluteJS Expo Auth development adapter is missing.");
|
|
28769
28784
|
}, expoSyncPath = async () => {
|
|
28770
28785
|
const candidates = await Promise.all(["ts", "js"].map(async (extension) => {
|
|
28771
|
-
const path =
|
|
28786
|
+
const path = join56(import.meta.dir, `shellExpoSync.${extension}`);
|
|
28772
28787
|
try {
|
|
28773
28788
|
await access2(path);
|
|
28774
28789
|
return path;
|
|
@@ -28781,8 +28796,8 @@ ${auth ? `void createAbsoluteExpoShellAuth(${JSON.stringify(auth)}).then(auth =>
|
|
|
28781
28796
|
return path;
|
|
28782
28797
|
throw new TypeError("The AbsoluteJS Expo Sync development adapter is missing.");
|
|
28783
28798
|
}, buildAbsoluteNativeDevAdapter = async (projectRoot, mobile) => {
|
|
28784
|
-
const temporaryDirectory = await mkdtemp(
|
|
28785
|
-
const entry =
|
|
28799
|
+
const temporaryDirectory = await mkdtemp(join56(tmpdir(), "absolutejs-native-dev-adapter-"));
|
|
28800
|
+
const entry = join56(temporaryDirectory, "entry.ts");
|
|
28786
28801
|
try {
|
|
28787
28802
|
await writeFile11(entry, absoluteNativeDevAdapterSource(projectRoot, mobile, (specifier) => Bun.resolveSync(specifier, projectRoot), await expoAdapterPath(), await expoAuthPath(), await expoSyncPath()));
|
|
28788
28803
|
const result = await Bun.build({
|
|
@@ -28808,11 +28823,11 @@ var init_devDeviceAdapter = __esm(() => {
|
|
|
28808
28823
|
|
|
28809
28824
|
// src/mobile/mobilePreviewClientBundle.ts
|
|
28810
28825
|
import { access as access3 } from "fs/promises";
|
|
28811
|
-
import { join as
|
|
28826
|
+
import { join as join57 } from "path";
|
|
28812
28827
|
var PREVIEW_CLIENT_FILE = "mobilePreviewClient.ts", fileExists = (path) => access3(path).then(() => true, () => false), resolveAbsoluteMobilePreviewClientEntry = async () => {
|
|
28813
28828
|
const candidates = [
|
|
28814
|
-
|
|
28815
|
-
|
|
28829
|
+
join57(import.meta.dir, PREVIEW_CLIENT_FILE),
|
|
28830
|
+
join57(import.meta.dir, "mobile", PREVIEW_CLIENT_FILE)
|
|
28816
28831
|
];
|
|
28817
28832
|
const present = await Promise.all(candidates.map(fileExists));
|
|
28818
28833
|
const entry = candidates.find((_candidate, index) => present[index]);
|
|
@@ -29819,17 +29834,17 @@ var init_hmr = __esm(() => {
|
|
|
29819
29834
|
});
|
|
29820
29835
|
|
|
29821
29836
|
// src/plugins/devtoolsJson.ts
|
|
29822
|
-
import { existsSync as
|
|
29823
|
-
import { dirname as dirname34, join as
|
|
29837
|
+
import { existsSync as existsSync44, mkdirSync as mkdirSync14, readFileSync as readFileSync40, writeFileSync as writeFileSync11 } from "fs";
|
|
29838
|
+
import { dirname as dirname34, join as join58, resolve as resolve52 } from "path";
|
|
29824
29839
|
import { Elysia as Elysia8 } from "elysia";
|
|
29825
29840
|
var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
|
|
29826
29841
|
Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
|
|
29827
29842
|
return uuid;
|
|
29828
|
-
}, isUuidV4 = (value) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value), resolveDevtoolsUuidCachePath = (buildDir, uuidCachePath) => resolve52(uuidCachePath ??
|
|
29829
|
-
if (!
|
|
29843
|
+
}, isUuidV4 = (value) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value), resolveDevtoolsUuidCachePath = (buildDir, uuidCachePath) => resolve52(uuidCachePath ?? join58(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
|
|
29844
|
+
if (!existsSync44(cachePath))
|
|
29830
29845
|
return null;
|
|
29831
29846
|
try {
|
|
29832
|
-
const value =
|
|
29847
|
+
const value = readFileSync40(cachePath, "utf-8").trim();
|
|
29833
29848
|
return isUuidV4(value) ? value : null;
|
|
29834
29849
|
} catch {
|
|
29835
29850
|
return null;
|
|
@@ -29848,7 +29863,7 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
|
|
|
29848
29863
|
return setGlobalUuid(cachedUuid);
|
|
29849
29864
|
const uuid = crypto.randomUUID();
|
|
29850
29865
|
mkdirSync14(dirname34(cachePath), { recursive: true });
|
|
29851
|
-
|
|
29866
|
+
writeFileSync11(cachePath, uuid, "utf-8");
|
|
29852
29867
|
return setGlobalUuid(uuid);
|
|
29853
29868
|
}, devtoolsJson = (buildDir, options = {}) => {
|
|
29854
29869
|
const rootPath = resolve52(options.projectRoot ?? process.cwd());
|
|
@@ -29864,24 +29879,24 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
|
|
|
29864
29879
|
if (process.env.WSL_DISTRO_NAME) {
|
|
29865
29880
|
const distro = process.env.WSL_DISTRO_NAME;
|
|
29866
29881
|
const withoutLeadingSlash = root.replace(/^\//, "");
|
|
29867
|
-
return
|
|
29882
|
+
return join58("\\\\wsl.localhost", distro, withoutLeadingSlash).replace(/\//g, "\\");
|
|
29868
29883
|
}
|
|
29869
29884
|
if (process.env.DOCKER_DESKTOP && !root.startsWith("\\\\")) {
|
|
29870
29885
|
const withoutLeadingSlash = root.replace(/^\//, "");
|
|
29871
|
-
return
|
|
29886
|
+
return join58("\\\\wsl.localhost", "docker-desktop-data", withoutLeadingSlash).replace(/\//g, "\\");
|
|
29872
29887
|
}
|
|
29873
29888
|
return root;
|
|
29874
29889
|
};
|
|
29875
29890
|
var init_devtoolsJson = () => {};
|
|
29876
29891
|
|
|
29877
29892
|
// src/plugins/imageOptimizer.ts
|
|
29878
|
-
import { existsSync as
|
|
29893
|
+
import { existsSync as existsSync45 } from "fs";
|
|
29879
29894
|
import { resolve as resolve53 } from "path";
|
|
29880
29895
|
import { Elysia as Elysia9 } from "elysia";
|
|
29881
29896
|
var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avifInProgress, safeResolve = (path, baseDir) => {
|
|
29882
29897
|
try {
|
|
29883
29898
|
const resolved = validateSafePath(path, baseDir);
|
|
29884
|
-
if (
|
|
29899
|
+
if (existsSync45(resolved))
|
|
29885
29900
|
return resolved;
|
|
29886
29901
|
return null;
|
|
29887
29902
|
} catch {
|
|
@@ -30392,7 +30407,7 @@ import {
|
|
|
30392
30407
|
rm as rm13,
|
|
30393
30408
|
writeFile as writeFile12
|
|
30394
30409
|
} from "fs/promises";
|
|
30395
|
-
import { join as
|
|
30410
|
+
import { join as join59, resolve as resolvePath } from "path";
|
|
30396
30411
|
import { pathToFileURL as pathToFileURL4 } from "url";
|
|
30397
30412
|
var DEFAULT_MAX_PRODUCER_BYTES = 134217728, SHA_2562 = "sha256", ARTIFACT_FILE = "artifact.json", RELEASE_ID_PATTERN, DEFAULT_BLOB_PREFIX = "absolutejs/mobile-compatibility", hashBlob = async (blob) => {
|
|
30398
30413
|
const bytes = new Uint8Array(await blob.arrayBuffer());
|
|
@@ -30407,7 +30422,7 @@ var DEFAULT_MAX_PRODUCER_BYTES = 134217728, SHA_2562 = "sha256", ARTIFACT_FILE =
|
|
|
30407
30422
|
}
|
|
30408
30423
|
return releaseId;
|
|
30409
30424
|
}, readStoredArtifact = async (releaseDirectory) => {
|
|
30410
|
-
const serialized = await readFile10(
|
|
30425
|
+
const serialized = await readFile10(join59(releaseDirectory, ARTIFACT_FILE), "utf8");
|
|
30411
30426
|
const parsed = JSON.parse(serialized);
|
|
30412
30427
|
return parseAbsoluteMobileCompatibilityArtifact(parsed);
|
|
30413
30428
|
}, validateStoredIdentity = (artifact, appId, releaseId) => {
|
|
@@ -30502,8 +30517,8 @@ var DEFAULT_MAX_PRODUCER_BYTES = 134217728, SHA_2562 = "sha256", ARTIFACT_FILE =
|
|
|
30502
30517
|
}, createAbsoluteMobileFileArtifactStore = (options) => {
|
|
30503
30518
|
const root = resolvePath(options.root);
|
|
30504
30519
|
const maxProducerBytes = options.maxProducerBytes ?? DEFAULT_MAX_PRODUCER_BYTES;
|
|
30505
|
-
const appDirectory = (appId) =>
|
|
30506
|
-
const releaseDirectory = (appId, releaseId) =>
|
|
30520
|
+
const appDirectory = (appId) => join59(root, appDirectoryName(appId));
|
|
30521
|
+
const releaseDirectory = (appId, releaseId) => join59(appDirectory(appId), requireReleaseId(releaseId));
|
|
30507
30522
|
const acceptExistingRelease = async (error, artifact) => {
|
|
30508
30523
|
if (!errorHasCode(error, "EEXIST") && !errorHasCode(error, "ENOTEMPTY")) {
|
|
30509
30524
|
return false;
|
|
@@ -30544,7 +30559,7 @@ var DEFAULT_MAX_PRODUCER_BYTES = 134217728, SHA_2562 = "sha256", ARTIFACT_FILE =
|
|
|
30544
30559
|
}
|
|
30545
30560
|
return {
|
|
30546
30561
|
artifact,
|
|
30547
|
-
producer: Bun.file(
|
|
30562
|
+
producer: Bun.file(join59(directory, artifact.producer.module))
|
|
30548
30563
|
};
|
|
30549
30564
|
},
|
|
30550
30565
|
write: async (release) => {
|
|
@@ -30552,14 +30567,14 @@ var DEFAULT_MAX_PRODUCER_BYTES = 134217728, SHA_2562 = "sha256", ARTIFACT_FILE =
|
|
|
30552
30567
|
const validated = await verifyAbsoluteMobileCompatibilityProducer({ artifact: validatedArtifact, producer: release.producer }, maxProducerBytes);
|
|
30553
30568
|
const parent = appDirectory(validated.artifact.appId);
|
|
30554
30569
|
await mkdir14(parent, { recursive: true });
|
|
30555
|
-
const staging = await mkdtemp2(
|
|
30556
|
-
const producerPath =
|
|
30570
|
+
const staging = await mkdtemp2(join59(parent, ".stage-"));
|
|
30571
|
+
const producerPath = join59(staging, validated.artifact.producer.module);
|
|
30557
30572
|
try {
|
|
30558
30573
|
await mkdir14(resolvePath(producerPath, ".."), {
|
|
30559
30574
|
recursive: true
|
|
30560
30575
|
});
|
|
30561
30576
|
await Promise.all([
|
|
30562
|
-
writeFile12(
|
|
30577
|
+
writeFile12(join59(staging, ARTIFACT_FILE), `${JSON.stringify(validated.artifact, null, "\t")}
|
|
30563
30578
|
`),
|
|
30564
30579
|
writeFile12(producerPath, new Uint8Array(await validated.producer.arrayBuffer()))
|
|
30565
30580
|
]);
|
|
@@ -30616,7 +30631,7 @@ import {
|
|
|
30616
30631
|
rm as rm14,
|
|
30617
30632
|
writeFile as writeFile13
|
|
30618
30633
|
} from "fs/promises";
|
|
30619
|
-
import { dirname as dirname35, join as
|
|
30634
|
+
import { dirname as dirname35, join as join60, resolve as resolvePath2 } from "path";
|
|
30620
30635
|
import { pathToFileURL as pathToFileURL5 } from "url";
|
|
30621
30636
|
var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "current.json", BUNDLES_DIRECTORY = "bundles", ARTIFACT_FILE2 = "artifact.json", BUNDLE_ID_PATTERN, isRecord9 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), errorHasCode2 = (error, code) => typeof error === "object" && error !== null && Reflect.get(error, "code") === code, bundleIdFor = (currentReleaseId, releases) => {
|
|
30622
30637
|
const identity = JSON.stringify({
|
|
@@ -30647,16 +30662,16 @@ var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "curre
|
|
|
30647
30662
|
releases
|
|
30648
30663
|
};
|
|
30649
30664
|
}, writeRelease = async (root, release) => {
|
|
30650
|
-
const directory =
|
|
30651
|
-
const producerPath =
|
|
30665
|
+
const directory = join60(root, release.artifact.releaseId);
|
|
30666
|
+
const producerPath = join60(directory, release.artifact.producer.module);
|
|
30652
30667
|
await mkdir15(dirname35(producerPath), { recursive: true });
|
|
30653
30668
|
await Promise.all([
|
|
30654
|
-
writeFile13(
|
|
30669
|
+
writeFile13(join60(directory, ARTIFACT_FILE2), `${JSON.stringify(release.artifact, null, "\t")}
|
|
30655
30670
|
`),
|
|
30656
30671
|
writeFile13(producerPath, new Uint8Array(await release.producer.arrayBuffer()))
|
|
30657
30672
|
]);
|
|
30658
30673
|
}, installImmutableBundle = async (bundlesRoot, bundleId, releases) => {
|
|
30659
|
-
const destination =
|
|
30674
|
+
const destination = join60(bundlesRoot, bundleId);
|
|
30660
30675
|
try {
|
|
30661
30676
|
await access5(destination);
|
|
30662
30677
|
return destination;
|
|
@@ -30664,7 +30679,7 @@ var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "curre
|
|
|
30664
30679
|
if (!errorHasCode2(error, "ENOENT"))
|
|
30665
30680
|
throw error;
|
|
30666
30681
|
}
|
|
30667
|
-
const staging = await mkdtemp3(
|
|
30682
|
+
const staging = await mkdtemp3(join60(bundlesRoot, ".stage-"));
|
|
30668
30683
|
try {
|
|
30669
30684
|
await Promise.all(releases.map((release) => writeRelease(staging, release)));
|
|
30670
30685
|
await rename6(staging, destination);
|
|
@@ -30695,15 +30710,15 @@ var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "curre
|
|
|
30695
30710
|
};
|
|
30696
30711
|
}, loadAbsoluteMobileMaterializedBundle = async (root) => {
|
|
30697
30712
|
const resolvedRoot = resolvePath2(root);
|
|
30698
|
-
const serialized = await readFile11(
|
|
30713
|
+
const serialized = await readFile11(join60(resolvedRoot, CURRENT_BUNDLE_FILE), "utf8");
|
|
30699
30714
|
const parsed = JSON.parse(serialized);
|
|
30700
30715
|
const index = parseBundleIndex(parsed);
|
|
30701
|
-
const bundleRoot =
|
|
30716
|
+
const bundleRoot = join60(resolvedRoot, BUNDLES_DIRECTORY, index.bundleId);
|
|
30702
30717
|
return {
|
|
30703
30718
|
artifacts: index.releases,
|
|
30704
30719
|
currentReleaseId: index.currentReleaseId,
|
|
30705
30720
|
loadProducer: async (artifact) => {
|
|
30706
|
-
const modulePath =
|
|
30721
|
+
const modulePath = join60(bundleRoot, artifact.releaseId, artifact.producer.module);
|
|
30707
30722
|
await verifyAbsoluteMobileCompatibilityProducer({
|
|
30708
30723
|
artifact,
|
|
30709
30724
|
producer: Bun.file(modulePath)
|
|
@@ -30729,7 +30744,7 @@ var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "curre
|
|
|
30729
30744
|
return release;
|
|
30730
30745
|
});
|
|
30731
30746
|
const root = resolvePath2(input.root);
|
|
30732
|
-
const bundlesRoot =
|
|
30747
|
+
const bundlesRoot = join60(root, BUNDLES_DIRECTORY);
|
|
30733
30748
|
await mkdir15(bundlesRoot, { recursive: true });
|
|
30734
30749
|
const bundleId = bundleIdFor(input.currentReleaseId, artifacts);
|
|
30735
30750
|
await installImmutableBundle(bundlesRoot, bundleId, orderedReleases);
|
|
@@ -30739,8 +30754,8 @@ var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "curre
|
|
|
30739
30754
|
format: ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT,
|
|
30740
30755
|
releases: artifacts
|
|
30741
30756
|
};
|
|
30742
|
-
const pointerPath =
|
|
30743
|
-
const temporaryPointerPath =
|
|
30757
|
+
const pointerPath = join60(root, CURRENT_BUNDLE_FILE);
|
|
30758
|
+
const temporaryPointerPath = join60(root, `.current-${crypto.randomUUID()}.json`);
|
|
30744
30759
|
await writeFile13(temporaryPointerPath, `${JSON.stringify(index, null, "\t")}
|
|
30745
30760
|
`, { flag: "wx" });
|
|
30746
30761
|
await rename6(temporaryPointerPath, pointerPath);
|
|
@@ -30748,12 +30763,12 @@ var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "curre
|
|
|
30748
30763
|
}, readAbsoluteMobileMaterializedReleases = async (root) => {
|
|
30749
30764
|
const resolvedRoot = resolvePath2(root);
|
|
30750
30765
|
try {
|
|
30751
|
-
const serialized = await readFile11(
|
|
30766
|
+
const serialized = await readFile11(join60(resolvedRoot, CURRENT_BUNDLE_FILE), "utf8");
|
|
30752
30767
|
const parsed = JSON.parse(serialized);
|
|
30753
30768
|
const index = parseBundleIndex(parsed);
|
|
30754
|
-
const bundleRoot =
|
|
30769
|
+
const bundleRoot = join60(resolvedRoot, BUNDLES_DIRECTORY, index.bundleId);
|
|
30755
30770
|
return Promise.all(index.releases.map(async (artifact) => {
|
|
30756
|
-
const producer = Bun.file(
|
|
30771
|
+
const producer = Bun.file(join60(bundleRoot, artifact.releaseId, artifact.producer.module));
|
|
30757
30772
|
await verifyAbsoluteMobileCompatibilityProducer({
|
|
30758
30773
|
artifact,
|
|
30759
30774
|
producer
|
|
@@ -31287,15 +31302,15 @@ var init_compatibilityDispatcher = __esm(() => {
|
|
|
31287
31302
|
});
|
|
31288
31303
|
|
|
31289
31304
|
// src/core/prerender.ts
|
|
31290
|
-
import { mkdirSync as mkdirSync15, readFileSync as
|
|
31291
|
-
import { join as
|
|
31305
|
+
import { mkdirSync as mkdirSync15, readFileSync as readFileSync41 } from "fs";
|
|
31306
|
+
import { join as join61 } from "path";
|
|
31292
31307
|
var 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) => {
|
|
31293
31308
|
const metaPath = htmlPath.replace(/\.html$/, ".meta");
|
|
31294
31309
|
await Bun.write(metaPath, String(Date.now()));
|
|
31295
31310
|
}, readTimestamp = (htmlPath) => {
|
|
31296
31311
|
const metaPath = htmlPath.replace(/\.html$/, ".meta");
|
|
31297
31312
|
try {
|
|
31298
|
-
const content =
|
|
31313
|
+
const content = readFileSync41(metaPath, "utf-8");
|
|
31299
31314
|
return Number(content) || 0;
|
|
31300
31315
|
} catch {
|
|
31301
31316
|
return 0;
|
|
@@ -31312,7 +31327,7 @@ var DEFAULT_FETCH_TIMEOUT_MS = 1e4, PRERENDER_BYPASS_HEADER = "X-Absolute-Preren
|
|
|
31312
31327
|
if (!isCompleteHtml(html))
|
|
31313
31328
|
return false;
|
|
31314
31329
|
const fileName = routeToFilename(route);
|
|
31315
|
-
const filePath =
|
|
31330
|
+
const filePath = join61(prerenderDir, fileName);
|
|
31316
31331
|
await Bun.write(filePath, html);
|
|
31317
31332
|
await writeTimestamp(filePath);
|
|
31318
31333
|
return true;
|
|
@@ -31331,8 +31346,8 @@ var init_prerender = () => {};
|
|
|
31331
31346
|
|
|
31332
31347
|
// src/core/prepare.ts
|
|
31333
31348
|
import { createHash as createHash9 } from "crypto";
|
|
31334
|
-
import { existsSync as
|
|
31335
|
-
import { basename as basename19, join as
|
|
31349
|
+
import { existsSync as existsSync46, readdirSync as readdirSync12, readFileSync as readFileSync42 } from "fs";
|
|
31350
|
+
import { basename as basename19, join as join62, relative as relative23, resolve as resolvePath3 } from "path";
|
|
31336
31351
|
import { Elysia as Elysia12, NotFound } from "elysia";
|
|
31337
31352
|
var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_PLUGIN_RETRY_DELAY_MS = 50, waitForStaticPluginRetry = () => new Promise((resolve) => {
|
|
31338
31353
|
setTimeout(resolve, STATIC_PLUGIN_RETRY_DELAY_MS);
|
|
@@ -31460,7 +31475,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
|
|
|
31460
31475
|
if (!fileName)
|
|
31461
31476
|
continue;
|
|
31462
31477
|
const srcPath = resolvePath3(devIndexDir, fileName);
|
|
31463
|
-
if (!
|
|
31478
|
+
if (!existsSync46(srcPath))
|
|
31464
31479
|
continue;
|
|
31465
31480
|
manifest[key] = `${SRC_URL_PREFIX}${encodeSrcPath(relative23(process.cwd(), srcPath))}`;
|
|
31466
31481
|
}
|
|
@@ -31473,10 +31488,10 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
|
|
|
31473
31488
|
if (cached !== undefined)
|
|
31474
31489
|
return cached;
|
|
31475
31490
|
const path = href.split("?")[0] ?? href;
|
|
31476
|
-
const filePath =
|
|
31491
|
+
const filePath = join62(buildDir, path);
|
|
31477
31492
|
let versioned = href;
|
|
31478
|
-
if (
|
|
31479
|
-
const hash = createHash9("sha256").update(
|
|
31493
|
+
if (existsSync46(filePath)) {
|
|
31494
|
+
const hash = createHash9("sha256").update(readFileSync42(filePath)).digest("hex").slice(0, ICON_HASH_LENGTH);
|
|
31480
31495
|
versioned = href.includes("?") ? `${href}&v=${hash}` : `${href}?v=${hash}`;
|
|
31481
31496
|
}
|
|
31482
31497
|
cache.set(href, versioned);
|
|
@@ -31597,7 +31612,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
|
|
|
31597
31612
|
};
|
|
31598
31613
|
}, loadPrerenderMap = (prerenderDir) => {
|
|
31599
31614
|
const map = new Map;
|
|
31600
|
-
if (!
|
|
31615
|
+
if (!existsSync46(prerenderDir))
|
|
31601
31616
|
return map;
|
|
31602
31617
|
let entries;
|
|
31603
31618
|
try {
|
|
@@ -31610,12 +31625,12 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
|
|
|
31610
31625
|
continue;
|
|
31611
31626
|
const name = basename19(entry, ".html");
|
|
31612
31627
|
const route = name === "index" ? "/" : `/${name}`;
|
|
31613
|
-
map.set(route,
|
|
31628
|
+
map.set(route, join62(prerenderDir, entry));
|
|
31614
31629
|
}
|
|
31615
31630
|
return map;
|
|
31616
31631
|
}, loadMobileCompatibilityPlugin = async (buildDir) => {
|
|
31617
|
-
const root =
|
|
31618
|
-
if (!
|
|
31632
|
+
const root = join62(buildDir, ".absolutejs", "mobile-compatibility");
|
|
31633
|
+
if (!existsSync46(join62(root, "current.json"))) {
|
|
31619
31634
|
return new Elysia12({ name: "absolutejs-mobile-compatibility-empty" });
|
|
31620
31635
|
}
|
|
31621
31636
|
const [
|
|
@@ -31657,10 +31672,12 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
|
|
|
31657
31672
|
});
|
|
31658
31673
|
};
|
|
31659
31674
|
let stepStartedAt = performance.now();
|
|
31660
|
-
const config = await loadConfig(configOrPath);
|
|
31661
|
-
recordStep("load config", stepStartedAt);
|
|
31662
31675
|
const nodeEnv = process.env["NODE_ENV"];
|
|
31663
31676
|
const isDev = nodeEnv === "development";
|
|
31677
|
+
const builtDir = process.env.ABSOLUTE_BUILD_DIR;
|
|
31678
|
+
const built = !isDev && builtDir ? readProductionRuntime(resolvePath3(builtDir)) : null;
|
|
31679
|
+
const config = built ?? await loadConfig(configOrPath);
|
|
31680
|
+
recordStep(built ? "load built config" : "load config", stepStartedAt);
|
|
31664
31681
|
const buildDir = resolvePath3(process.env.ABSOLUTE_BUILD_DIR ?? config.buildDirectory ?? "build");
|
|
31665
31682
|
registerIconVersioning(buildDir);
|
|
31666
31683
|
if (isDev) {
|
|
@@ -31671,22 +31688,21 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
|
|
|
31671
31688
|
return result;
|
|
31672
31689
|
}
|
|
31673
31690
|
stepStartedAt = performance.now();
|
|
31674
|
-
const manifest = JSON.parse(
|
|
31691
|
+
const manifest = JSON.parse(readFileSync42(`${buildDir}/manifest.json`, "utf-8"));
|
|
31675
31692
|
setCurrentIslandManifest(manifest);
|
|
31676
31693
|
if (config.islands?.registry) {
|
|
31677
31694
|
setCurrentIslandRegistry(await loadIslandRegistry(config.islands.registry));
|
|
31678
31695
|
}
|
|
31679
|
-
|
|
31680
|
-
recordStep("load production manifest and island metadata", stepStartedAt);
|
|
31696
|
+
recordStep("load production manifest and island registry", stepStartedAt);
|
|
31681
31697
|
stepStartedAt = performance.now();
|
|
31682
|
-
const conventionsPath =
|
|
31683
|
-
if (
|
|
31684
|
-
const conventions = JSON.parse(
|
|
31698
|
+
const conventionsPath = join62(buildDir, "conventions.json");
|
|
31699
|
+
if (existsSync46(conventionsPath)) {
|
|
31700
|
+
const conventions = JSON.parse(readFileSync42(conventionsPath, "utf-8"));
|
|
31685
31701
|
setConventions(conventions);
|
|
31686
31702
|
}
|
|
31687
|
-
const spaRoutesPath =
|
|
31688
|
-
if (
|
|
31689
|
-
setSpaRouteManifest(JSON.parse(
|
|
31703
|
+
const spaRoutesPath = join62(buildDir, "spa-routes.json");
|
|
31704
|
+
if (existsSync46(spaRoutesPath)) {
|
|
31705
|
+
setSpaRouteManifest(JSON.parse(readFileSync42(spaRoutesPath, "utf-8")));
|
|
31690
31706
|
}
|
|
31691
31707
|
recordStep("load production conventions", stepStartedAt);
|
|
31692
31708
|
stepStartedAt = performance.now();
|
|
@@ -31697,7 +31713,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
|
|
|
31697
31713
|
prefix: "",
|
|
31698
31714
|
staticLimit: MAX_STATIC_ROUTE_COUNT
|
|
31699
31715
|
});
|
|
31700
|
-
const generatedAssetsRoot =
|
|
31716
|
+
const generatedAssetsRoot = join62(buildDir, ".absolutejs");
|
|
31701
31717
|
const generatedAssetsPlugin = new Elysia12({
|
|
31702
31718
|
name: "absolutejs-generated-assets"
|
|
31703
31719
|
}).get("/.absolutejs/*", async ({ params, set }) => {
|
|
@@ -31729,7 +31745,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
|
|
|
31729
31745
|
responseValue.headers.set("cache-control", assetCacheControl(pathname));
|
|
31730
31746
|
});
|
|
31731
31747
|
stepStartedAt = performance.now();
|
|
31732
|
-
const prerenderDir =
|
|
31748
|
+
const prerenderDir = join62(buildDir, "_prerendered");
|
|
31733
31749
|
const prerenderMap = loadPrerenderMap(prerenderDir);
|
|
31734
31750
|
const mobileCompatibilityPlugin = await loadMobileCompatibilityPlugin(buildDir);
|
|
31735
31751
|
const mobileAssociationPlugin = await loadMobileAssociationPlugin(config.mobile);
|
|
@@ -31822,6 +31838,7 @@ var init_prepare = __esm(() => {
|
|
|
31822
31838
|
init_openApiPlugin();
|
|
31823
31839
|
init_telemetryPlugin();
|
|
31824
31840
|
init_loadConfig();
|
|
31841
|
+
init_productionRuntime();
|
|
31825
31842
|
init_requestContext();
|
|
31826
31843
|
init_loadIslandRegistry();
|
|
31827
31844
|
init_pageMetadata();
|
|
@@ -31857,8 +31874,8 @@ __export(exports_moduleServer, {
|
|
|
31857
31874
|
warmPage: () => warmPage,
|
|
31858
31875
|
warnIfReactFastRefreshUnsupported: () => warnIfReactFastRefreshUnsupported
|
|
31859
31876
|
});
|
|
31860
|
-
import { existsSync as
|
|
31861
|
-
import { basename as basename20, dirname as dirname36, extname as extname16, join as
|
|
31877
|
+
import { existsSync as existsSync47, readFileSync as readFileSync43, realpathSync as realpathSync7, statSync as statSync9 } from "fs";
|
|
31878
|
+
import { basename as basename20, dirname as dirname36, extname as extname16, join as join63, resolve as resolve54, relative as relative24 } from "path";
|
|
31862
31879
|
var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfig, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
|
|
31863
31880
|
const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
|
|
31864
31881
|
const allExports = [];
|
|
@@ -31878,10 +31895,10 @@ var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfi
|
|
|
31878
31895
|
${stubs}
|
|
31879
31896
|
`;
|
|
31880
31897
|
}, resolveRelativeExtension = (srcPath, projectRoot, extensions) => {
|
|
31881
|
-
const directHit = extensions.find((ext) =>
|
|
31898
|
+
const directHit = extensions.find((ext) => existsSync47(resolve54(projectRoot, srcPath + ext)));
|
|
31882
31899
|
if (directHit)
|
|
31883
31900
|
return srcPath + directHit;
|
|
31884
|
-
const indexHit = extensions.find((ext) =>
|
|
31901
|
+
const indexHit = extensions.find((ext) => existsSync47(resolve54(projectRoot, srcPath, `index${ext}`)));
|
|
31885
31902
|
if (indexHit)
|
|
31886
31903
|
return `${srcPath}/index${indexHit}`;
|
|
31887
31904
|
return srcPath;
|
|
@@ -31947,13 +31964,13 @@ ${stubs}
|
|
|
31947
31964
|
const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
|
|
31948
31965
|
if (!subpath) {
|
|
31949
31966
|
const pkgDir = resolve54(projectRoot, "node_modules", packageName ?? "");
|
|
31950
|
-
const pkgJsonPath =
|
|
31951
|
-
if (
|
|
31952
|
-
const pkg = JSON.parse(
|
|
31967
|
+
const pkgJsonPath = join63(pkgDir, "package.json");
|
|
31968
|
+
if (existsSync47(pkgJsonPath)) {
|
|
31969
|
+
const pkg = JSON.parse(readFileSync43(pkgJsonPath, "utf-8"));
|
|
31953
31970
|
const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
|
|
31954
31971
|
if (esmEntry) {
|
|
31955
31972
|
const resolved = resolve54(pkgDir, esmEntry);
|
|
31956
|
-
if (
|
|
31973
|
+
if (existsSync47(resolved))
|
|
31957
31974
|
return relative24(projectRoot, resolved);
|
|
31958
31975
|
}
|
|
31959
31976
|
}
|
|
@@ -32001,7 +32018,7 @@ ${stubs}
|
|
|
32001
32018
|
const rel = relative24(projectRoot, absPath).replace(/\\/g, "/");
|
|
32002
32019
|
return `${prefix}${srcUrl(rel, projectRoot)}${suffix}`;
|
|
32003
32020
|
}
|
|
32004
|
-
if (!
|
|
32021
|
+
if (!existsSync47(absPath))
|
|
32005
32022
|
return _match;
|
|
32006
32023
|
const rel = relative24(projectRoot, absPath).replace(/\\/g, "/");
|
|
32007
32024
|
return `${prefix}${srcUrl(rel, projectRoot)}${suffix}`;
|
|
@@ -32060,7 +32077,7 @@ ${code}`;
|
|
|
32060
32077
|
reactFastRefreshWarningEmitted = true;
|
|
32061
32078
|
logWarn("React edits remount the page instead of keeping component state: " + "this Bun ignores `reactFastRefresh` on Bun.Transpiler " + "(https://github.com/oven-sh/bun/issues/32919). Run " + "`absolute bun-patch install` to use AbsoluteJS's patched Bun, " + "which has the fix; `absolute dev` then uses it automatically.");
|
|
32062
32079
|
}, transformReactFile = (filePath, projectRoot, rewriter) => {
|
|
32063
|
-
const raw =
|
|
32080
|
+
const raw = readFileSync43(filePath, "utf-8");
|
|
32064
32081
|
const valueExports = tsxTranspiler.scan(raw).exports;
|
|
32065
32082
|
let transpiled = reactTranspiler.transformSync(raw);
|
|
32066
32083
|
transpiled = preserveTypeExports(raw, transpiled, valueExports);
|
|
@@ -32076,7 +32093,7 @@ ${transpiled}`;
|
|
|
32076
32093
|
transpiled += buildIslandMetadataExports(raw);
|
|
32077
32094
|
return rewriteImports(transpiled, filePath, projectRoot, rewriter);
|
|
32078
32095
|
}, transformPlainFile = (filePath, projectRoot, rewriter, vueDir) => {
|
|
32079
|
-
const raw =
|
|
32096
|
+
const raw = readFileSync43(filePath, "utf-8");
|
|
32080
32097
|
const ext = extname16(filePath);
|
|
32081
32098
|
const isTS = ext === ".ts" || ext === ".tsx";
|
|
32082
32099
|
const isTSX = ext === ".tsx" || ext === ".jsx";
|
|
@@ -32242,7 +32259,7 @@ ${code}`;
|
|
|
32242
32259
|
` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
|
|
32243
32260
|
return code.replace(/import\.meta\.hot\.accept\(/g, "__hmr_accept(");
|
|
32244
32261
|
}, transformSvelteFile = async (filePath, projectRoot, rewriter, stylePreprocessors) => {
|
|
32245
|
-
const raw =
|
|
32262
|
+
const raw = readFileSync43(filePath, "utf-8");
|
|
32246
32263
|
if (!svelteCompiler) {
|
|
32247
32264
|
svelteCompiler = await import("svelte/compiler");
|
|
32248
32265
|
}
|
|
@@ -32308,7 +32325,7 @@ export default __script__;`;
|
|
|
32308
32325
|
return `${cssInjection}
|
|
32309
32326
|
${code}`;
|
|
32310
32327
|
}, transformVueFile = async (filePath, projectRoot, rewriter, vueDir, stylePreprocessors) => {
|
|
32311
|
-
const rawSource =
|
|
32328
|
+
const rawSource = readFileSync43(filePath, "utf-8");
|
|
32312
32329
|
const raw = addAutoRouterSetupApp(rawSource);
|
|
32313
32330
|
if (!vueCompiler) {
|
|
32314
32331
|
vueCompiler = await loadVueCompiler();
|
|
@@ -32321,7 +32338,7 @@ ${code}`;
|
|
|
32321
32338
|
fs: {
|
|
32322
32339
|
fileExists: isFile,
|
|
32323
32340
|
realpath: realpathSync7,
|
|
32324
|
-
readFile: (file) => isFile(file) ?
|
|
32341
|
+
readFile: (file) => isFile(file) ? readFileSync43(file, "utf-8") : undefined
|
|
32325
32342
|
},
|
|
32326
32343
|
id: componentId,
|
|
32327
32344
|
inlineTemplate: false
|
|
@@ -32351,11 +32368,11 @@ ${code}`;
|
|
|
32351
32368
|
`);
|
|
32352
32369
|
return result;
|
|
32353
32370
|
}, resolveSvelteModulePath = (path) => {
|
|
32354
|
-
if (
|
|
32371
|
+
if (existsSync47(path))
|
|
32355
32372
|
return path;
|
|
32356
|
-
if (
|
|
32373
|
+
if (existsSync47(`${path}.ts`))
|
|
32357
32374
|
return `${path}.ts`;
|
|
32358
|
-
if (
|
|
32375
|
+
if (existsSync47(`${path}.js`))
|
|
32359
32376
|
return `${path}.js`;
|
|
32360
32377
|
return path;
|
|
32361
32378
|
}, jsResponse = (body) => {
|
|
@@ -32368,7 +32385,7 @@ ${code}`;
|
|
|
32368
32385
|
}
|
|
32369
32386
|
});
|
|
32370
32387
|
}, handleCssRequest = (filePath) => {
|
|
32371
|
-
const raw =
|
|
32388
|
+
const raw = readFileSync43(filePath, "utf-8");
|
|
32372
32389
|
const escaped = raw.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
|
|
32373
32390
|
return [
|
|
32374
32391
|
`const style = document.createElement('style');`,
|
|
@@ -32503,7 +32520,7 @@ export default {};
|
|
|
32503
32520
|
return { ext, filePath: resolveSvelteModulePath(filePath) };
|
|
32504
32521
|
if (ext)
|
|
32505
32522
|
return { ext, filePath };
|
|
32506
|
-
const found = MODULE_EXTENSIONS.find((candidate) =>
|
|
32523
|
+
const found = MODULE_EXTENSIONS.find((candidate) => existsSync47(filePath + candidate));
|
|
32507
32524
|
if (!found)
|
|
32508
32525
|
return { ext, filePath };
|
|
32509
32526
|
const resolved = filePath + found;
|
|
@@ -33056,7 +33073,7 @@ var handleHTMXUpdate = async (htmxFilePath) => {
|
|
|
33056
33073
|
var init_simpleHTMXHMR = () => {};
|
|
33057
33074
|
|
|
33058
33075
|
// src/dev/backendGraph.ts
|
|
33059
|
-
import { readFileSync as
|
|
33076
|
+
import { readFileSync as readFileSync44, realpathSync as realpathSync8, statSync as statSync10 } from "fs";
|
|
33060
33077
|
import { dirname as dirname37, extname as extname17, resolve as resolve57 } from "path";
|
|
33061
33078
|
var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (path) => {
|
|
33062
33079
|
const loader = LOADERS[extname17(path)] ?? "ts";
|
|
@@ -33091,7 +33108,7 @@ var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (pat
|
|
|
33091
33108
|
return cached.imports;
|
|
33092
33109
|
let imports = [];
|
|
33093
33110
|
try {
|
|
33094
|
-
const source =
|
|
33111
|
+
const source = readFileSync44(path, "utf-8");
|
|
33095
33112
|
imports = transpilerFor(path).scanImports(source).map((entry) => resolveImport(entry.path, path)).filter((target) => target !== undefined);
|
|
33096
33113
|
} catch {}
|
|
33097
33114
|
fileCache.set(path, { imports, mtimeMs });
|
|
@@ -33889,8 +33906,8 @@ var init_runtime = __esm(() => {
|
|
|
33889
33906
|
});
|
|
33890
33907
|
|
|
33891
33908
|
// src/dev/hot/plugin.ts
|
|
33892
|
-
import { mkdirSync as mkdirSync16, readFileSync as
|
|
33893
|
-
import { extname as extname19, join as
|
|
33909
|
+
import { mkdirSync as mkdirSync16, readFileSync as readFileSync45, realpathSync as realpathSync9, writeFileSync as writeFileSync12 } from "fs";
|
|
33910
|
+
import { extname as extname19, join as join64, relative as relative25, resolve as resolve58, sep as sep8 } from "path";
|
|
33894
33911
|
var SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, realPath3 = (path) => {
|
|
33895
33912
|
try {
|
|
33896
33913
|
return realpathSync9(path);
|
|
@@ -33930,12 +33947,12 @@ var SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, realPath3 = (path) => {
|
|
|
33930
33947
|
if (status === false)
|
|
33931
33948
|
return typeof Reflect.get(value, "reason") === "string";
|
|
33932
33949
|
return status === true && typeof Reflect.get(value, "code") === "string" && typeof Reflect.get(value, "exports") === "object" && Array.isArray(Reflect.get(value, "reexports")) && Array.isArray(Reflect.get(value, "plan"));
|
|
33933
|
-
}, cachePath = (cacheDir, key) =>
|
|
33950
|
+
}, cachePath = (cacheDir, key) => join64(cacheDir, `${key}.json`), readCached = (key) => {
|
|
33934
33951
|
const state = shared.installed;
|
|
33935
33952
|
if (!state)
|
|
33936
33953
|
return;
|
|
33937
33954
|
try {
|
|
33938
|
-
const cached = JSON.parse(
|
|
33955
|
+
const cached = JSON.parse(readFileSync45(cachePath(state.cacheDir, key), "utf-8"));
|
|
33939
33956
|
return isAnalysis(cached) ? cached : undefined;
|
|
33940
33957
|
} catch {
|
|
33941
33958
|
return;
|
|
@@ -33945,7 +33962,7 @@ var SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, realPath3 = (path) => {
|
|
|
33945
33962
|
if (!state)
|
|
33946
33963
|
return;
|
|
33947
33964
|
try {
|
|
33948
|
-
|
|
33965
|
+
writeFileSync12(cachePath(state.cacheDir, key), JSON.stringify(analysis));
|
|
33949
33966
|
} catch {}
|
|
33950
33967
|
}, analyzeFresh = async (canonicalPath, source) => {
|
|
33951
33968
|
const typescriptModule = await loadTypescript();
|
|
@@ -33978,7 +33995,7 @@ var init_plugin = __esm(() => {
|
|
|
33978
33995
|
});
|
|
33979
33996
|
|
|
33980
33997
|
// src/dev/hot/reload.ts
|
|
33981
|
-
import { readFileSync as
|
|
33998
|
+
import { readFileSync as readFileSync46, realpathSync as realpathSync10 } from "fs";
|
|
33982
33999
|
import { relative as relative26 } from "path";
|
|
33983
34000
|
var MAX_PROPAGATION_STEPS = 500, realPath4 = (path) => {
|
|
33984
34001
|
try {
|
|
@@ -34058,7 +34075,7 @@ var MAX_PROPAGATION_STEPS = 500, realPath4 = (path) => {
|
|
|
34058
34075
|
return { status: "unmanaged" };
|
|
34059
34076
|
let source;
|
|
34060
34077
|
try {
|
|
34061
|
-
source =
|
|
34078
|
+
source = readFileSync46(path, "utf-8");
|
|
34062
34079
|
} catch (error) {
|
|
34063
34080
|
reportFailure(path, error);
|
|
34064
34081
|
return { error, status: "failed" };
|
|
@@ -34151,12 +34168,12 @@ var init_reload = __esm(() => {
|
|
|
34151
34168
|
});
|
|
34152
34169
|
|
|
34153
34170
|
// src/dev/rebuildTrigger.ts
|
|
34154
|
-
import { existsSync as
|
|
34171
|
+
import { existsSync as existsSync48, readdirSync as readdirSync13, rmSync as rmSync4, statSync as statSync11 } from "fs";
|
|
34155
34172
|
import {
|
|
34156
34173
|
basename as basename21,
|
|
34157
34174
|
dirname as dirname39,
|
|
34158
34175
|
isAbsolute as isAbsolute10,
|
|
34159
|
-
join as
|
|
34176
|
+
join as join65,
|
|
34160
34177
|
relative as relative27,
|
|
34161
34178
|
resolve as resolvePath4,
|
|
34162
34179
|
sep as sep9
|
|
@@ -34265,7 +34282,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
34265
34282
|
detectedFw = detected !== "ignored" ? detected : affectedFrameworks[0];
|
|
34266
34283
|
}
|
|
34267
34284
|
return { ...parsed, framework: detectedFw };
|
|
34268
|
-
}, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) &&
|
|
34285
|
+
}, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) && existsSync48(affectedFile), FRAMEWORK_DIR_KEYS_FOR_CLEANUP, removeStaleGenerated = (state, deletedFile) => {
|
|
34269
34286
|
const { config } = state;
|
|
34270
34287
|
const cwd = process.cwd();
|
|
34271
34288
|
const absDeleted = resolvePath4(deletedFile).replace(/\\/g, "/");
|
|
@@ -34283,8 +34300,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
34283
34300
|
const relJs = `${rel.slice(0, -ext[0].length)}.js`;
|
|
34284
34301
|
const generatedDir = getFrameworkGeneratedDir(framework, cwd);
|
|
34285
34302
|
for (const candidate of [
|
|
34286
|
-
|
|
34287
|
-
`${
|
|
34303
|
+
join65(generatedDir, relJs),
|
|
34304
|
+
`${join65(generatedDir, relJs)}.map`
|
|
34288
34305
|
]) {
|
|
34289
34306
|
try {
|
|
34290
34307
|
rmSync4(candidate, { force: true });
|
|
@@ -34311,7 +34328,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
34311
34328
|
if (!dependents || dependents.size === 0) {
|
|
34312
34329
|
return;
|
|
34313
34330
|
}
|
|
34314
|
-
const dependentFiles = Array.from(dependents).filter((file) =>
|
|
34331
|
+
const dependentFiles = Array.from(dependents).filter((file) => existsSync48(file));
|
|
34315
34332
|
if (dependentFiles.length === 0) {
|
|
34316
34333
|
return;
|
|
34317
34334
|
}
|
|
@@ -34327,7 +34344,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
34327
34344
|
try {
|
|
34328
34345
|
const affectedFiles = getAffectedFiles(state.dependencyGraph, normalizedFilePath);
|
|
34329
34346
|
affectedFiles.forEach((affectedFile) => {
|
|
34330
|
-
if (!processedFiles.has(affectedFile) && affectedFile !== normalizedFilePath &&
|
|
34347
|
+
if (!processedFiles.has(affectedFile) && affectedFile !== normalizedFilePath && existsSync48(affectedFile)) {
|
|
34331
34348
|
validFiles.push(affectedFile);
|
|
34332
34349
|
processedFiles.add(affectedFile);
|
|
34333
34350
|
}
|
|
@@ -34352,7 +34369,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
34352
34369
|
collectChangedFileAffected(state, normalizedFilePath, processedFiles, validFiles);
|
|
34353
34370
|
}, processFilePathSet = (state, filePathSet, processedFiles, validFiles) => {
|
|
34354
34371
|
filePathSet.forEach((filePathInSet) => {
|
|
34355
|
-
if (!
|
|
34372
|
+
if (!existsSync48(filePathInSet)) {
|
|
34356
34373
|
collectDeletedFileAffected(state, filePathInSet, processedFiles, validFiles);
|
|
34357
34374
|
return;
|
|
34358
34375
|
}
|
|
@@ -34635,7 +34652,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
34635
34652
|
return componentFile;
|
|
34636
34653
|
}
|
|
34637
34654
|
const tsCounterpart = componentFile.replace(/\.html$/, ".ts");
|
|
34638
|
-
if (
|
|
34655
|
+
if (existsSync48(tsCounterpart)) {
|
|
34639
34656
|
return tsCounterpart;
|
|
34640
34657
|
}
|
|
34641
34658
|
if (!graph)
|
|
@@ -35208,7 +35225,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
35208
35225
|
const entries = await readdir(dir, { withFileTypes: true });
|
|
35209
35226
|
const files = [];
|
|
35210
35227
|
for (const entry of entries) {
|
|
35211
|
-
const full =
|
|
35228
|
+
const full = join65(dir, entry.name);
|
|
35212
35229
|
if (entry.isDirectory()) {
|
|
35213
35230
|
files.push(...await walk(full));
|
|
35214
35231
|
} else if (entry.isFile() && entry.name.endsWith(".ts") && !entry.name.endsWith(".d.ts")) {
|
|
@@ -35573,7 +35590,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
35573
35590
|
}
|
|
35574
35591
|
return ctx;
|
|
35575
35592
|
}, runSvelteBundleRebuild = async (state, svelteFiles, config) => {
|
|
35576
|
-
const existingSvelteFiles = svelteFiles.filter((file) =>
|
|
35593
|
+
const existingSvelteFiles = svelteFiles.filter((file) => existsSync48(file));
|
|
35577
35594
|
if (existingSvelteFiles.length === 0)
|
|
35578
35595
|
return;
|
|
35579
35596
|
const svelteDir = config.svelteDirectory ?? "";
|
|
@@ -35843,7 +35860,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
|
|
|
35843
35860
|
} = await compileVue(vueFiles, vueDir, true, getStyleTransformConfig(state.config));
|
|
35844
35861
|
const serverEntries = [...vueServerPaths];
|
|
35845
35862
|
const clientEntries = [...vueIndexPaths, ...vueClientPaths];
|
|
35846
|
-
const cssOutDir =
|
|
35863
|
+
const cssOutDir = join65(buildDir, state.resolvedPaths.assetsDir ? basename21(state.resolvedPaths.assetsDir) : "assets", "css");
|
|
35847
35864
|
const { serverRoot, serverOutDir } = await computeServerOutPaths(state.resolvedPaths, "vue");
|
|
35848
35865
|
const serverExternals = await getServerBundleExternals();
|
|
35849
35866
|
const serverExternalsPlugins = await getServerBundleExternalsPlugins(state.config);
|
|
@@ -36956,7 +36973,7 @@ var init_rebuildTrigger = __esm(() => {
|
|
|
36956
36973
|
// src/build/buildDepVendor.ts
|
|
36957
36974
|
import { mkdirSync as mkdirSync17 } from "fs";
|
|
36958
36975
|
import { isBuiltin as isBuiltin2 } from "module";
|
|
36959
|
-
import { join as
|
|
36976
|
+
import { join as join66, relative as relative28 } from "path";
|
|
36960
36977
|
import { rm as rm15 } from "fs/promises";
|
|
36961
36978
|
var {build: bunBuild9, Glob: Glob10 } = globalThis.Bun;
|
|
36962
36979
|
var toSafeFileName6 = (specifier) => {
|
|
@@ -37114,7 +37131,7 @@ var toSafeFileName6 = (specifier) => {
|
|
|
37114
37131
|
}), buildDepVendorPass = async (specifiers, vendorDir, tmpDir) => {
|
|
37115
37132
|
const entries = await Promise.all(specifiers.map(async (specifier) => {
|
|
37116
37133
|
const safeName = toSafeFileName6(specifier);
|
|
37117
|
-
const entryPath =
|
|
37134
|
+
const entryPath = join66(tmpDir, `${safeName}.ts`);
|
|
37118
37135
|
await Bun.write(entryPath, await generateVendorEntrySource(specifier));
|
|
37119
37136
|
return { entryPath, specifier };
|
|
37120
37137
|
}));
|
|
@@ -37205,9 +37222,9 @@ var toSafeFileName6 = (specifier) => {
|
|
|
37205
37222
|
const { dep: initialSpecs, framework: frameworkRoots } = await scanBareImports(directories, files);
|
|
37206
37223
|
if (initialSpecs.length === 0 && frameworkRoots.length === 0)
|
|
37207
37224
|
return {};
|
|
37208
|
-
const vendorDir =
|
|
37225
|
+
const vendorDir = join66(buildDir, "vendor");
|
|
37209
37226
|
mkdirSync17(vendorDir, { recursive: true });
|
|
37210
|
-
const tmpDir =
|
|
37227
|
+
const tmpDir = join66(buildDir, "_dep_vendor_tmp");
|
|
37211
37228
|
mkdirSync17(tmpDir, { recursive: true });
|
|
37212
37229
|
const allSpecs = new Set(initialSpecs);
|
|
37213
37230
|
const alreadyScanned = new Set;
|
|
@@ -37294,13 +37311,13 @@ var init_buildDepVendor = __esm(() => {
|
|
|
37294
37311
|
import { createHash as createHash11 } from "crypto";
|
|
37295
37312
|
import {
|
|
37296
37313
|
copyFileSync as copyFileSync4,
|
|
37297
|
-
existsSync as
|
|
37314
|
+
existsSync as existsSync49,
|
|
37298
37315
|
mkdirSync as mkdirSync18,
|
|
37299
37316
|
readdirSync as readdirSync14,
|
|
37300
|
-
readFileSync as
|
|
37317
|
+
readFileSync as readFileSync47
|
|
37301
37318
|
} from "fs";
|
|
37302
37319
|
import { mkdir as mkdir16, readFile as readFile12, rename as rename7, rm as rm16, writeFile as writeFile14 } from "fs/promises";
|
|
37303
|
-
import { basename as basename22, join as
|
|
37320
|
+
import { basename as basename22, join as join67, resolve as resolve59 } from "path";
|
|
37304
37321
|
var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeVendorCacheKey = (inputs) => {
|
|
37305
37322
|
const hash = createHash11("sha256");
|
|
37306
37323
|
hash.update(String(CACHE_FORMAT_VERSION3));
|
|
@@ -37327,19 +37344,19 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
|
|
|
37327
37344
|
const hash = createHash11("sha256");
|
|
37328
37345
|
let found = false;
|
|
37329
37346
|
for (const name of LOCKFILES) {
|
|
37330
|
-
const path =
|
|
37331
|
-
if (!
|
|
37347
|
+
const path = join67(projectRoot, name);
|
|
37348
|
+
if (!existsSync49(path))
|
|
37332
37349
|
continue;
|
|
37333
37350
|
found = true;
|
|
37334
37351
|
hash.update(name);
|
|
37335
|
-
hash.update(
|
|
37352
|
+
hash.update(readFileSync47(path));
|
|
37336
37353
|
}
|
|
37337
37354
|
return found ? hash.digest("hex") : null;
|
|
37338
37355
|
}, vendorCacheEnabled = () => process.env.ABSOLUTE_DEV_VENDOR_CACHE !== "0", copyTree = (fromDir, toDir) => {
|
|
37339
37356
|
mkdirSync18(toDir, { recursive: true });
|
|
37340
37357
|
for (const entry of readdirSync14(fromDir, { withFileTypes: true })) {
|
|
37341
|
-
const source =
|
|
37342
|
-
const destination =
|
|
37358
|
+
const source = join67(fromDir, entry.name);
|
|
37359
|
+
const destination = join67(toDir, entry.name);
|
|
37343
37360
|
if (entry.isDirectory())
|
|
37344
37361
|
copyTree(source, destination);
|
|
37345
37362
|
else
|
|
@@ -37347,22 +37364,22 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
|
|
|
37347
37364
|
}
|
|
37348
37365
|
}, copySlotsInto = (cacheDir, vendorDirs) => {
|
|
37349
37366
|
for (const [index, dir] of vendorDirs.entries()) {
|
|
37350
|
-
const source =
|
|
37351
|
-
if (!
|
|
37367
|
+
const source = join67(cacheDir, slotName(index, dir));
|
|
37368
|
+
if (!existsSync49(source)) {
|
|
37352
37369
|
throw new Error(`missing cached vendor dir ${source}`);
|
|
37353
37370
|
}
|
|
37354
37371
|
copyTree(source, dir);
|
|
37355
37372
|
}
|
|
37356
37373
|
}, copySlotsFrom = (stagingDir, vendorDirs) => {
|
|
37357
37374
|
for (const [index, dir] of vendorDirs.entries()) {
|
|
37358
|
-
if (!
|
|
37375
|
+
if (!existsSync49(dir))
|
|
37359
37376
|
continue;
|
|
37360
|
-
copyTree(dir,
|
|
37377
|
+
copyTree(dir, join67(stagingDir, slotName(index, dir)));
|
|
37361
37378
|
}
|
|
37362
37379
|
}, isVendorCachePayload = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "depPaths") === "object", cacheDirFor = (key, projectRoot) => resolve59(projectRoot, CACHE_ROOT2, key), slotName = (index, dir) => `${index}-${basename22(resolve59(dir, ".."))}`, restoreVendorCache = async (key, vendorDirs, projectRoot = process.cwd()) => {
|
|
37363
37380
|
const cacheDir = cacheDirFor(key, projectRoot);
|
|
37364
|
-
const payloadPath =
|
|
37365
|
-
if (!
|
|
37381
|
+
const payloadPath = join67(cacheDir, "payload.json");
|
|
37382
|
+
if (!existsSync49(payloadPath))
|
|
37366
37383
|
return null;
|
|
37367
37384
|
try {
|
|
37368
37385
|
const payload = JSON.parse(await readFile12(payloadPath, "utf8"));
|
|
@@ -37375,14 +37392,14 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
|
|
|
37375
37392
|
}
|
|
37376
37393
|
}, saveVendorCache = async (key, vendorDirs, payload, projectRoot = process.cwd()) => {
|
|
37377
37394
|
const cacheDir = cacheDirFor(key, projectRoot);
|
|
37378
|
-
if (
|
|
37395
|
+
if (existsSync49(join67(cacheDir, "payload.json")))
|
|
37379
37396
|
return;
|
|
37380
37397
|
const stagingDir = `${cacheDir}.${process.pid}.tmp`;
|
|
37381
37398
|
try {
|
|
37382
37399
|
await rm16(stagingDir, { force: true, recursive: true });
|
|
37383
37400
|
await mkdir16(stagingDir, { recursive: true });
|
|
37384
37401
|
copySlotsFrom(stagingDir, vendorDirs);
|
|
37385
|
-
await writeFile14(
|
|
37402
|
+
await writeFile14(join67(stagingDir, "payload.json"), JSON.stringify(payload));
|
|
37386
37403
|
await rm16(cacheDir, { force: true, recursive: true });
|
|
37387
37404
|
await rename7(stagingDir, cacheDir);
|
|
37388
37405
|
} catch {
|
|
@@ -37392,7 +37409,7 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
|
|
|
37392
37409
|
}
|
|
37393
37410
|
};
|
|
37394
37411
|
var init_vendorCache = __esm(() => {
|
|
37395
|
-
CACHE_ROOT2 =
|
|
37412
|
+
CACHE_ROOT2 = join67(".absolutejs", "vendor-cache");
|
|
37396
37413
|
LOCKFILES = [
|
|
37397
37414
|
"bun.lock",
|
|
37398
37415
|
"bun.lockb",
|
|
@@ -37404,7 +37421,7 @@ var init_vendorCache = __esm(() => {
|
|
|
37404
37421
|
|
|
37405
37422
|
// src/core/devBuild.ts
|
|
37406
37423
|
import { readdir as readdir7 } from "fs/promises";
|
|
37407
|
-
import { existsSync as
|
|
37424
|
+
import { existsSync as existsSync50, statSync as statSync12 } from "fs";
|
|
37408
37425
|
import { resolve as resolve60 } from "path";
|
|
37409
37426
|
var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (config) => {
|
|
37410
37427
|
const configuredDirs = [
|
|
@@ -37682,7 +37699,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (
|
|
|
37682
37699
|
const sourceFiles = await collectDepVendorSourceFiles(config);
|
|
37683
37700
|
const configVendorDirs = collectConfigVendorSourceDirs(config);
|
|
37684
37701
|
const prescannedVendorPaths = prescanVendorPaths(prescan, configVendorDirs);
|
|
37685
|
-
const remainingVendorDirs = prescannedVendorPaths ? sourceDirs.filter((dir) => !configVendorDirs.includes(dir) &&
|
|
37702
|
+
const remainingVendorDirs = prescannedVendorPaths ? sourceDirs.filter((dir) => !configVendorDirs.includes(dir) && existsSync50(dir)) : sourceDirs;
|
|
37686
37703
|
if (prescannedVendorPaths && remainingVendorDirs.length === 0 && sourceFiles.length === 0) {
|
|
37687
37704
|
globalThis.__depVendorPaths = prescannedVendorPaths;
|
|
37688
37705
|
} else {
|
|
@@ -37962,5 +37979,5 @@ export {
|
|
|
37962
37979
|
devBuild
|
|
37963
37980
|
};
|
|
37964
37981
|
|
|
37965
|
-
//# debugId=
|
|
37982
|
+
//# debugId=B0E420A64566FADD64756E2164756E21
|
|
37966
37983
|
//# sourceMappingURL=build.js.map
|