@absolutejs/absolute 0.20.0-beta.116 → 0.20.0-beta.117
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 +11 -0
- package/changelog.json +24 -1
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/build.js +9 -4
- package/dist/build.js.map +5 -4
- package/dist/cli/{androidEmulatorController-nybhzc6c.js → androidEmulatorController-v6chbhem.js} +2 -2
- package/dist/cli/{androidNativeWatcher-2930tb8c.js → androidNativeWatcher-mgqws6ag.js} +2 -2
- package/dist/cli/{compile-kbhxgjat.js → compile-5m830csy.js} +2 -2
- package/dist/cli/{dev-daa7tdht.js → dev-ww30tdrv.js} +10 -7
- package/dist/cli/{expoProject-kcfcmfba.js → expoProject-w2pzjwnx.js} +1 -1
- package/dist/cli/{index-28pbrd3q.js → index-18q9qc7f.js} +15 -2
- package/dist/cli/{index-vjepnxr0.js → index-5268nwjx.js} +1 -1
- package/dist/cli/{index-5skbydh0.js → index-hneb973j.js} +1 -1
- package/dist/cli/{index-82wpxhvv.js → index-k8r00xh9.js} +1 -1
- package/dist/cli/{index-bhcxtf1x.js → index-nxcwg9ma.js} +268 -141
- package/dist/cli/{index-qr0pc777.js → index-wtyg9cy0.js} +1 -1
- package/dist/cli/index.js +5 -5
- package/dist/cli/{iosNativeWatcher-t6gv0p1w.js → iosNativeWatcher-8w1gawg4.js} +2 -2
- package/dist/cli/{iosSimulatorController-5n2a9fxv.js → iosSimulatorController-5vhqvhg6.js} +2 -2
- package/dist/cli/{mobile-03zwncxx.js → mobile-21vsmrjd.js} +28 -39
- package/dist/cli/{start-r606d5v9.js → start-3bhf56tj.js} +3 -3
- package/dist/index.js +12 -6
- package/dist/index.js.map +6 -5
- package/dist/mobile/index.js +207 -100
- package/dist/mobile/index.js.map +6 -5
- package/dist/mobile/remoteMacAgentEntry.js +251 -184
- package/dist/src/dev/serverEntryCopies.d.ts +2 -0
- package/dist/src/mobile/capacitorProject.d.ts +4 -0
- package/dist/src/mobile/nativePackages.d.ts +10 -0
- package/package.json +4 -2
package/dist/mobile/index.js
CHANGED
|
@@ -1120,7 +1120,7 @@ __export(exports_associationFiles, {
|
|
|
1120
1120
|
});
|
|
1121
1121
|
import {
|
|
1122
1122
|
access as access11,
|
|
1123
|
-
mkdir as
|
|
1123
|
+
mkdir as mkdir11,
|
|
1124
1124
|
readFile as readFile13,
|
|
1125
1125
|
rename as rename10,
|
|
1126
1126
|
rm as rm10,
|
|
@@ -1241,7 +1241,7 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
|
|
|
1241
1241
|
await rm10(backup, { force: true, recursive: true });
|
|
1242
1242
|
}, materializeHost = async (root, host, files) => {
|
|
1243
1243
|
const directory = resolve10(root, host, ".well-known");
|
|
1244
|
-
await
|
|
1244
|
+
await mkdir11(directory, { recursive: true });
|
|
1245
1245
|
return Promise.all(files.map(async ([name, document2]) => {
|
|
1246
1246
|
const path = resolve10(directory, name);
|
|
1247
1247
|
await writeAtomic(path, `${JSON.stringify(document2, null, 2)}
|
|
@@ -1277,7 +1277,7 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
|
|
|
1277
1277
|
if (documents.apple) {
|
|
1278
1278
|
files.push(["apple-app-site-association", documents.apple]);
|
|
1279
1279
|
}
|
|
1280
|
-
await
|
|
1280
|
+
await mkdir11(temporary, { recursive: true });
|
|
1281
1281
|
try {
|
|
1282
1282
|
const temporaryPaths = (await Promise.all(config.deepLinkHosts.map((host) => materializeHost(temporary, host, files)))).flat();
|
|
1283
1283
|
await writeAtomic(resolve10(temporary, OWNERSHIP_FILE), `${JSON.stringify({ format: 1, hosts: config.deepLinkHosts }, null, 2)}
|
|
@@ -1712,7 +1712,7 @@ __export(exports_materializedBundle, {
|
|
|
1712
1712
|
import { createHash as createHash13 } from "crypto";
|
|
1713
1713
|
import {
|
|
1714
1714
|
access as access12,
|
|
1715
|
-
mkdir as
|
|
1715
|
+
mkdir as mkdir14,
|
|
1716
1716
|
mkdtemp as mkdtemp8,
|
|
1717
1717
|
readFile as readFile16,
|
|
1718
1718
|
rename as rename12,
|
|
@@ -1752,7 +1752,7 @@ var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "curre
|
|
|
1752
1752
|
}, writeRelease = async (root, release) => {
|
|
1753
1753
|
const directory = join14(root, release.artifact.releaseId);
|
|
1754
1754
|
const producerPath = join14(directory, release.artifact.producer.module);
|
|
1755
|
-
await
|
|
1755
|
+
await mkdir14(dirname11(producerPath), { recursive: true });
|
|
1756
1756
|
await Promise.all([
|
|
1757
1757
|
writeFile13(join14(directory, ARTIFACT_FILE2), `${JSON.stringify(release.artifact, null, "\t")}
|
|
1758
1758
|
`),
|
|
@@ -1833,7 +1833,7 @@ var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "curre
|
|
|
1833
1833
|
});
|
|
1834
1834
|
const root = resolvePath4(input.root);
|
|
1835
1835
|
const bundlesRoot = join14(root, BUNDLES_DIRECTORY);
|
|
1836
|
-
await
|
|
1836
|
+
await mkdir14(bundlesRoot, { recursive: true });
|
|
1837
1837
|
const bundleId = bundleIdFor(input.currentReleaseId, artifacts);
|
|
1838
1838
|
await installImmutableBundle(bundlesRoot, bundleId, orderedReleases);
|
|
1839
1839
|
const index = {
|
|
@@ -21718,7 +21718,7 @@ import {
|
|
|
21718
21718
|
createPublicKey as createPublicKey3,
|
|
21719
21719
|
X509Certificate as X509Certificate4
|
|
21720
21720
|
} from "crypto";
|
|
21721
|
-
import { access as access24, mkdir as
|
|
21721
|
+
import { access as access24, mkdir as mkdir27 } from "fs/promises";
|
|
21722
21722
|
import { dirname as dirname26, isAbsolute as isAbsolute15, relative as relative25, resolve as resolve27, sep as sep17 } from "path";
|
|
21723
21723
|
import { pathToFileURL as pathToFileURL5 } from "url";
|
|
21724
21724
|
import { Elysia as Elysia4 } from "elysia";
|
|
@@ -21944,7 +21944,7 @@ ${generated}`);
|
|
|
21944
21944
|
return;
|
|
21945
21945
|
});
|
|
21946
21946
|
}
|
|
21947
|
-
await
|
|
21947
|
+
await mkdir27(dirname26(path2), { recursive: true });
|
|
21948
21948
|
await Bun.write(path2, renderAbsoluteMobileUpdateRegistry({
|
|
21949
21949
|
...options.health ? { health: options.health } : {},
|
|
21950
21950
|
...options.rollout ? { rollout: options.rollout } : {},
|
|
@@ -23686,7 +23686,7 @@ import { createHash as createHash5 } from "crypto";
|
|
|
23686
23686
|
import {
|
|
23687
23687
|
access as access6,
|
|
23688
23688
|
copyFile as copyFile3,
|
|
23689
|
-
mkdir as
|
|
23689
|
+
mkdir as mkdir5,
|
|
23690
23690
|
mkdtemp as mkdtemp2,
|
|
23691
23691
|
readFile as readFile6,
|
|
23692
23692
|
realpath as realpath2,
|
|
@@ -23939,7 +23939,7 @@ import {
|
|
|
23939
23939
|
access as access4,
|
|
23940
23940
|
copyFile as copyFile2,
|
|
23941
23941
|
lstat,
|
|
23942
|
-
mkdir as
|
|
23942
|
+
mkdir as mkdir4,
|
|
23943
23943
|
readFile as readFile4,
|
|
23944
23944
|
readdir as readdir2,
|
|
23945
23945
|
readlink,
|
|
@@ -23960,7 +23960,7 @@ import {
|
|
|
23960
23960
|
} from "path";
|
|
23961
23961
|
|
|
23962
23962
|
// src/mobile/capacitorProject.ts
|
|
23963
|
-
import { access as access3, readFile as readFile3, rename as rename3, writeFile as writeFile3 } from "fs/promises";
|
|
23963
|
+
import { access as access3, mkdir as mkdir3, readFile as readFile3, rename as rename3, writeFile as writeFile3 } from "fs/promises";
|
|
23964
23964
|
import { relative as relative2, resolve as resolve2 } from "path";
|
|
23965
23965
|
var CONFIG_FILE = "capacitor.config.ts";
|
|
23966
23966
|
var portableRelative2 = (root, path) => relative2(root, path).replaceAll("\\", "/");
|
|
@@ -23988,6 +23988,19 @@ var exists2 = async (path) => {
|
|
|
23988
23988
|
return false;
|
|
23989
23989
|
}
|
|
23990
23990
|
};
|
|
23991
|
+
var prepareAbsoluteCapacitorInitialization = async (config) => {
|
|
23992
|
+
await mkdir3(config.bundleDirectory, { recursive: true });
|
|
23993
|
+
try {
|
|
23994
|
+
await writeFile3(resolve2(config.bundleDirectory, "index.html"), '<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>App preparation</title><body><main><h1>Your native project is ready</h1><p>Build your AbsoluteJS mobile bundle before running this app.</p></main></body></html>', { flag: "wx" });
|
|
23995
|
+
} catch (error) {
|
|
23996
|
+
if (!(error instanceof Error && ("code" in error) && error.code === "EEXIST"))
|
|
23997
|
+
throw error;
|
|
23998
|
+
}
|
|
23999
|
+
return Promise.all(config.platforms.map(async (platform2) => ({
|
|
24000
|
+
command: await exists2(resolve2(config.nativeProjectDirectory, platform2)) ? "sync" : "add",
|
|
24001
|
+
platform: platform2
|
|
24002
|
+
})));
|
|
24003
|
+
};
|
|
23991
24004
|
var writeAbsoluteCapacitorConfig = async (config, options) => {
|
|
23992
24005
|
const projectRoot = resolve2(options.projectRoot);
|
|
23993
24006
|
const destination = resolve2(projectRoot, CONFIG_FILE);
|
|
@@ -25343,7 +25356,7 @@ var installRelease = async (artifactPath, metadata, outputRoot) => {
|
|
|
25343
25356
|
}
|
|
25344
25357
|
return { artifactPath: destination, metadata: existing, releaseRoot };
|
|
25345
25358
|
}
|
|
25346
|
-
await
|
|
25359
|
+
await mkdir5(dirname3(releaseRoot), { recursive: true });
|
|
25347
25360
|
const staging = await mkdtemp2(join6(dirname3(releaseRoot), ".android-stage-"));
|
|
25348
25361
|
try {
|
|
25349
25362
|
await copyFile3(artifactPath, join6(staging, artifactName));
|
|
@@ -25504,7 +25517,7 @@ var waitForAbsoluteAndroidNetworkServices = async (options) => {
|
|
|
25504
25517
|
// src/mobile/androidReleaseAcceptance.ts
|
|
25505
25518
|
import {
|
|
25506
25519
|
access as access7,
|
|
25507
|
-
mkdir as
|
|
25520
|
+
mkdir as mkdir6,
|
|
25508
25521
|
mkdtemp as mkdtemp3,
|
|
25509
25522
|
readFile as readFile7,
|
|
25510
25523
|
rename as rename6,
|
|
@@ -25723,7 +25736,7 @@ var ensureAbsoluteBundletool = async (options) => {
|
|
|
25723
25736
|
const digest = createHash6("sha256").update(bytes).digest("hex");
|
|
25724
25737
|
if (digest !== ABSOLUTE_BUNDLETOOL_SHA256)
|
|
25725
25738
|
throw new TypeError("Downloaded Bundletool failed checksum verification.");
|
|
25726
|
-
await
|
|
25739
|
+
await mkdir6(dirname4(inspected.path), { recursive: true });
|
|
25727
25740
|
const staging = await mkdtemp3(join7(dirname4(inspected.path), ".install-"));
|
|
25728
25741
|
const candidate = join7(staging, "bundletool.jar");
|
|
25729
25742
|
try {
|
|
@@ -25800,7 +25813,7 @@ var runAbsoluteAndroidReleaseAcceptance = async (options) => {
|
|
|
25800
25813
|
throw new TypeError("Installed release acceptance changes network state and therefore requires an Android emulator.");
|
|
25801
25814
|
const run = options.run ?? defaultRun;
|
|
25802
25815
|
const startedAt = performance.now();
|
|
25803
|
-
await
|
|
25816
|
+
await mkdir6(options.artifactDirectory, { recursive: true });
|
|
25804
25817
|
const apksPath = join7(options.artifactDirectory, "release.apks");
|
|
25805
25818
|
const windowsJava = (options.host ?? detectAbsoluteMobileHost()) === "wsl" && options.java.toLowerCase().endsWith(".exe");
|
|
25806
25819
|
const toolPath = async (path) => {
|
|
@@ -25897,7 +25910,7 @@ import { createHash as createHash7 } from "crypto";
|
|
|
25897
25910
|
import {
|
|
25898
25911
|
access as access8,
|
|
25899
25912
|
copyFile as copyFile4,
|
|
25900
|
-
mkdir as
|
|
25913
|
+
mkdir as mkdir7,
|
|
25901
25914
|
mkdtemp as mkdtemp4,
|
|
25902
25915
|
readdir as readdir3,
|
|
25903
25916
|
readFile as readFile8,
|
|
@@ -26159,7 +26172,7 @@ var installRelease2 = async (artifactPath, metadata, outputRoot, registeredArtif
|
|
|
26159
26172
|
releaseRoot
|
|
26160
26173
|
};
|
|
26161
26174
|
}
|
|
26162
|
-
await
|
|
26175
|
+
await mkdir7(dirname5(releaseRoot), { recursive: true });
|
|
26163
26176
|
const staging = await mkdtemp4(join8(dirname5(releaseRoot), ".ios-stage-"));
|
|
26164
26177
|
try {
|
|
26165
26178
|
await copyFile4(artifactPath, join8(staging, "App.ipa"));
|
|
@@ -26188,7 +26201,7 @@ var installRelease2 = async (artifactPath, metadata, outputRoot, registeredArtif
|
|
|
26188
26201
|
var exportRegisteredDeviceArtifact = async (options) => {
|
|
26189
26202
|
const exportPath = join8(options.staging, "registered-export");
|
|
26190
26203
|
const exportPlist = join8(options.staging, "RegisteredExportOptions.plist");
|
|
26191
|
-
await
|
|
26204
|
+
await mkdir7(exportPath, { recursive: true });
|
|
26192
26205
|
await writeFile7(exportPlist, exportOptions("debugging"));
|
|
26193
26206
|
const exitCode = await options.run([
|
|
26194
26207
|
"xcodebuild",
|
|
@@ -26238,12 +26251,12 @@ var buildAbsoluteIosRelease = async (options) => {
|
|
|
26238
26251
|
buildNumber = requireBuildNumber(await options.prepareBuildNumber(buildIdentity));
|
|
26239
26252
|
}
|
|
26240
26253
|
const stagingParent = resolve6(options.projectRoot, ".absolutejs/mobile");
|
|
26241
|
-
await
|
|
26254
|
+
await mkdir7(stagingParent, { recursive: true });
|
|
26242
26255
|
const staging = await mkdtemp4(join8(stagingParent, ".ios-build-"));
|
|
26243
26256
|
const archivePath = join8(staging, "App.xcarchive");
|
|
26244
26257
|
const exportPath = join8(staging, "export");
|
|
26245
26258
|
const exportPlist = join8(staging, "ExportOptions.plist");
|
|
26246
|
-
await
|
|
26259
|
+
await mkdir7(exportPath, { recursive: true });
|
|
26247
26260
|
await writeFile7(exportPlist, exportOptions("app-store-connect"));
|
|
26248
26261
|
const run = options.run ?? defaultRun2;
|
|
26249
26262
|
try {
|
|
@@ -26355,7 +26368,7 @@ var installAbsoluteIosRelease = async (options) => {
|
|
|
26355
26368
|
import { createHash as createHash8 } from "crypto";
|
|
26356
26369
|
import {
|
|
26357
26370
|
access as access9,
|
|
26358
|
-
mkdir as
|
|
26371
|
+
mkdir as mkdir8,
|
|
26359
26372
|
mkdtemp as mkdtemp5,
|
|
26360
26373
|
readFile as readFile9,
|
|
26361
26374
|
readdir as readdir4,
|
|
@@ -26593,7 +26606,7 @@ var runAbsoluteIosSimulatorReleaseAcceptance = async (options) => {
|
|
|
26593
26606
|
const iosRoot = join9(options.config.nativeProjectDirectory, "ios");
|
|
26594
26607
|
const xcode = await resolveAbsoluteIosXcodeProject(iosRoot);
|
|
26595
26608
|
const derivedData = join9(options.artifactDirectory, "DerivedData");
|
|
26596
|
-
await
|
|
26609
|
+
await mkdir8(options.artifactDirectory, { recursive: true });
|
|
26597
26610
|
await requireSuccess3(run, [
|
|
26598
26611
|
xcodebuild,
|
|
26599
26612
|
"-workspace",
|
|
@@ -26899,7 +26912,7 @@ import { createHash as createHash9, randomUUID as randomUUID3 } from "crypto";
|
|
|
26899
26912
|
import {
|
|
26900
26913
|
access as access10,
|
|
26901
26914
|
copyFile as copyFile5,
|
|
26902
|
-
mkdir as
|
|
26915
|
+
mkdir as mkdir9,
|
|
26903
26916
|
readFile as readFile11,
|
|
26904
26917
|
rename as rename8,
|
|
26905
26918
|
rm as rm8,
|
|
@@ -27230,7 +27243,7 @@ var writeDevProjection = async (project, port, https, serverHost = "localhost")
|
|
|
27230
27243
|
const parsed = JSON.parse(configSource);
|
|
27231
27244
|
if (!isRecord4(parsed))
|
|
27232
27245
|
throw new Error(`Invalid Capacitor native config at ${nativeConfigPath}.`);
|
|
27233
|
-
await
|
|
27246
|
+
await mkdir9(paths.root, { recursive: true });
|
|
27234
27247
|
await Promise.all([
|
|
27235
27248
|
writeFile8(paths.configBackup, configSource, { flag: "wx" }),
|
|
27236
27249
|
writeFile8(paths.infoBackup, infoSource, { flag: "wx" })
|
|
@@ -27281,7 +27294,7 @@ var readNativeCache = (projectRoot) => readFile11(nativeCachePath(projectRoot),
|
|
|
27281
27294
|
var writeNativeCache = async (projectRoot, cache) => {
|
|
27282
27295
|
const destination = nativeCachePath(projectRoot);
|
|
27283
27296
|
const temporary = `${destination}.${process.pid}.${randomUUID3()}.tmp`;
|
|
27284
|
-
await
|
|
27297
|
+
await mkdir9(dirname7(destination), { recursive: true });
|
|
27285
27298
|
try {
|
|
27286
27299
|
await writeFile8(temporary, `${JSON.stringify(cache, null, "\t")}
|
|
27287
27300
|
`, {
|
|
@@ -27396,7 +27409,7 @@ var physicalIosAppIsInstalled = (project, identifier, capture) => {
|
|
|
27396
27409
|
};
|
|
27397
27410
|
var buildIosDebugApp = async (project, udid, fingerprint, run, signal) => {
|
|
27398
27411
|
const derivedDataPath = join10(project.projectRoot, ".absolutejs", "mobile", "ios-derived-data", createHash9("sha256").update(project.config.appId).digest("hex").slice(0, 16));
|
|
27399
|
-
await
|
|
27412
|
+
await mkdir9(derivedDataPath, { recursive: true });
|
|
27400
27413
|
await requireSuccess4([
|
|
27401
27414
|
project.xcodebuild,
|
|
27402
27415
|
"-workspace",
|
|
@@ -27418,7 +27431,7 @@ var buildIosDebugApp = async (project, udid, fingerprint, run, signal) => {
|
|
|
27418
27431
|
};
|
|
27419
27432
|
var buildPhysicalIosDebugApp = async (project, identifier, run, signal) => {
|
|
27420
27433
|
const derivedDataPath = join10(project.projectRoot, ".absolutejs", "mobile", "ios-derived-data", createHash9("sha256").update(project.config.appId).digest("hex").slice(0, 16));
|
|
27421
|
-
await
|
|
27434
|
+
await mkdir9(derivedDataPath, { recursive: true });
|
|
27422
27435
|
await requireSuccess4([
|
|
27423
27436
|
project.xcodebuild,
|
|
27424
27437
|
"-workspace",
|
|
@@ -27582,7 +27595,7 @@ var prepareAbsoluteIosDevProject = async (config, options) => {
|
|
|
27582
27595
|
if (!await pathExists5(cap))
|
|
27583
27596
|
throw new Error("Capacitor CLI is not installed. Run absolute mobile init first.");
|
|
27584
27597
|
await writeAbsoluteCapacitorConfig(config, { projectRoot });
|
|
27585
|
-
await
|
|
27598
|
+
await mkdir9(config.bundleDirectory, { recursive: true });
|
|
27586
27599
|
const placeholder = join10(config.bundleDirectory, "index.html");
|
|
27587
27600
|
if (!await pathExists5(placeholder))
|
|
27588
27601
|
await writeFile8(placeholder, `<!doctype html><title>AbsoluteJS mobile development</title>
|
|
@@ -27818,7 +27831,7 @@ var startAbsoluteIosDevSession = async (options) => {
|
|
|
27818
27831
|
const resolved = resolve8(project.projectRoot, destination);
|
|
27819
27832
|
if (!isInside(project.projectRoot, resolved))
|
|
27820
27833
|
throw new Error("iOS screenshot destination must remain inside the project.");
|
|
27821
|
-
await
|
|
27834
|
+
await mkdir9(dirname7(resolved), { recursive: true });
|
|
27822
27835
|
await requireSuccess4([
|
|
27823
27836
|
project.xcrun,
|
|
27824
27837
|
"simctl",
|
|
@@ -27940,7 +27953,7 @@ var isAbsoluteIosNativeRootInput = (path) => ROOT_NATIVE_INPUTS.has(basename3(pa
|
|
|
27940
27953
|
import { createHash as createHash10, randomUUID as randomUUID4 } from "crypto";
|
|
27941
27954
|
import {
|
|
27942
27955
|
chmod,
|
|
27943
|
-
mkdir as
|
|
27956
|
+
mkdir as mkdir10,
|
|
27944
27957
|
mkdtemp as mkdtemp6,
|
|
27945
27958
|
readFile as readFile12,
|
|
27946
27959
|
rename as rename9,
|
|
@@ -27995,7 +28008,7 @@ var loadStore = async (path = defaultProfilePath()) => {
|
|
|
27995
28008
|
}
|
|
27996
28009
|
};
|
|
27997
28010
|
var saveStore = async (store, path = defaultProfilePath()) => {
|
|
27998
|
-
await
|
|
28011
|
+
await mkdir10(dirname8(path), { recursive: true });
|
|
27999
28012
|
const temporary = `${path}.${randomUUID4()}.tmp`;
|
|
28000
28013
|
await writeFile9(temporary, `${JSON.stringify(store, null, 2)}
|
|
28001
28014
|
`, {
|
|
@@ -28354,7 +28367,7 @@ var materializeAbsoluteRemoteMacAgent = async (projectRoot) => {
|
|
|
28354
28367
|
if (!source)
|
|
28355
28368
|
throw new Error("The AbsoluteJS installation does not contain its remote Mac agent artifact.");
|
|
28356
28369
|
const outdir = join11(resolvePath3(projectRoot), ".absolutejs", "mobile", "remote-agent");
|
|
28357
|
-
await
|
|
28370
|
+
await mkdir10(outdir, { recursive: true });
|
|
28358
28371
|
const result = await Bun.build({
|
|
28359
28372
|
entrypoints: [source],
|
|
28360
28373
|
minify: true,
|
|
@@ -28590,7 +28603,7 @@ var writeRemoteArtifact = async (path, stream) => {
|
|
|
28590
28603
|
var retrieveAbsoluteRemoteIosRelease = async (project, metadata, outputDirectory) => {
|
|
28591
28604
|
const releaseRoot = posix.join(project.remoteProjectRoot, ".absolutejs", "mobile", "releases", "ios", metadata.releaseId);
|
|
28592
28605
|
const stagingParent = join11(project.projectRoot, ".absolutejs", "mobile");
|
|
28593
|
-
await
|
|
28606
|
+
await mkdir10(stagingParent, { recursive: true });
|
|
28594
28607
|
const staging = await mkdtemp6(join11(stagingParent, ".remote-ios-"));
|
|
28595
28608
|
try {
|
|
28596
28609
|
const remoteMetadata = requireRemoteSuccess(await defaultTransport.capture([
|
|
@@ -29294,7 +29307,7 @@ var startAbsoluteRemoteDevSession = async (options) => {
|
|
|
29294
29307
|
const targetRelative = relative9(options.project.projectRoot, target);
|
|
29295
29308
|
if (targetRelative.startsWith("..") || isAbsolute7(targetRelative))
|
|
29296
29309
|
throw new Error("iOS screenshot must remain inside the project.");
|
|
29297
|
-
await
|
|
29310
|
+
await mkdir10(dirname8(target), { recursive: true });
|
|
29298
29311
|
await writeFile9(target, Buffer.from(result.data, "base64"));
|
|
29299
29312
|
return target;
|
|
29300
29313
|
},
|
|
@@ -29381,7 +29394,7 @@ import { pathToFileURL as pathToFileURL2 } from "url";
|
|
|
29381
29394
|
|
|
29382
29395
|
// src/mobile/buildRelease.ts
|
|
29383
29396
|
import { createHash as createHash12 } from "crypto";
|
|
29384
|
-
import { mkdir as
|
|
29397
|
+
import { mkdir as mkdir12, readFile as readFile14, writeFile as writeFile11 } from "fs/promises";
|
|
29385
29398
|
import { basename as basename4, dirname as dirname9, extname, join as join12, relative as relative10, resolve as resolve11 } from "path";
|
|
29386
29399
|
init_releaseArtifact();
|
|
29387
29400
|
var sha2563 = (bytes) => createHash12("sha256").update(bytes).digest("hex");
|
|
@@ -29413,7 +29426,7 @@ var pageFor = async (metadata, manifest, buildDirectory) => {
|
|
|
29413
29426
|
const rewritten = rewriteStaticScriptPaths(source, manifest);
|
|
29414
29427
|
const documentHash = sha2563(new TextEncoder().encode(rewritten));
|
|
29415
29428
|
resolvedAssetPath = join12(buildDirectory, ".absolutejs", "mobile-pages", `${documentHash}.html`);
|
|
29416
|
-
await
|
|
29429
|
+
await mkdir12(dirname9(resolvedAssetPath), { recursive: true });
|
|
29417
29430
|
await writeFile11(resolvedAssetPath, rewritten);
|
|
29418
29431
|
}
|
|
29419
29432
|
const pageAssetKey = metadata.bundleKey.replace(/Index$/u, "");
|
|
@@ -29535,7 +29548,7 @@ init_routeMatcher();
|
|
|
29535
29548
|
import {
|
|
29536
29549
|
cp,
|
|
29537
29550
|
copyFile as copyFile6,
|
|
29538
|
-
mkdir as
|
|
29551
|
+
mkdir as mkdir13,
|
|
29539
29552
|
mkdtemp as mkdtemp7,
|
|
29540
29553
|
readFile as readFile15,
|
|
29541
29554
|
rename as rename11,
|
|
@@ -29975,7 +29988,7 @@ var copyClientPage = async (page, buildDirectory, staging, copiedDependencies) =
|
|
|
29975
29988
|
const styleExtension = extname2(page.styleBundlePath) || ".css";
|
|
29976
29989
|
localStylePath = `./styles/${page.styleBundleHash}${styleExtension}`;
|
|
29977
29990
|
const styleSource = sourceAssetPath(buildDirectory, page.styleBundlePath);
|
|
29978
|
-
await
|
|
29991
|
+
await mkdir13(dirname10(join13(staging, localStylePath)), {
|
|
29979
29992
|
recursive: true
|
|
29980
29993
|
});
|
|
29981
29994
|
await copyFile6(styleSource, join13(staging, localStylePath));
|
|
@@ -30002,7 +30015,7 @@ var materializeAbsoluteMobileSourcemaps = async (pages, appBuild, projectRoot) =
|
|
|
30002
30015
|
return existsSync2(source) ? [{ page, source }] : [];
|
|
30003
30016
|
});
|
|
30004
30017
|
if (available.length > 0)
|
|
30005
|
-
await
|
|
30018
|
+
await mkdir13(releaseRoot, { recursive: true });
|
|
30006
30019
|
await Promise.all(available.map(async ({ page, source }) => {
|
|
30007
30020
|
const extension = extname2(page.bundlePath) || ".js";
|
|
30008
30021
|
if (!/^\.[a-z0-9]+$/iu.test(extension))
|
|
@@ -30061,7 +30074,7 @@ var copyAbsoluteClientDependency = async (specifier, buildDirectory, staging, co
|
|
|
30061
30074
|
copied.add(specifier);
|
|
30062
30075
|
const source = sourceAssetPath(buildDirectory, specifier);
|
|
30063
30076
|
const destination = join13(staging, specifier.replace(/^\/+/, ""));
|
|
30064
|
-
await
|
|
30077
|
+
await mkdir13(dirname10(destination), { recursive: true });
|
|
30065
30078
|
await copyFile6(source, destination);
|
|
30066
30079
|
await copyAbsoluteClientDependencies(source, buildDirectory, staging, copied);
|
|
30067
30080
|
};
|
|
@@ -30074,11 +30087,11 @@ var materializeAbsoluteCapacitorWebBundle = async (options) => {
|
|
|
30074
30087
|
throw new TypeError(`mobile.entry ${options.config.entry} is not a captured mobile page route.`);
|
|
30075
30088
|
}
|
|
30076
30089
|
const destination = options.config.bundleDirectory;
|
|
30077
|
-
await
|
|
30090
|
+
await mkdir13(dirname10(destination), { recursive: true });
|
|
30078
30091
|
const staging = await mkdtemp7(join13(dirname10(destination), `.${basename5(destination)}.stage-`));
|
|
30079
30092
|
try {
|
|
30080
30093
|
const pageDirectory = join13(staging, "pages");
|
|
30081
|
-
await
|
|
30094
|
+
await mkdir13(pageDirectory, { recursive: true });
|
|
30082
30095
|
await Promise.all(CLIENT_ASSET_DIRECTORIES.map((directory) => ({
|
|
30083
30096
|
destination: join13(staging, directory),
|
|
30084
30097
|
source: join13(options.buildDirectory, directory)
|
|
@@ -30140,12 +30153,9 @@ init_releaseArtifact();
|
|
|
30140
30153
|
init_deviceCapabilities();
|
|
30141
30154
|
|
|
30142
30155
|
// src/mobile/expoProject.ts
|
|
30143
|
-
init_nativeAuth();
|
|
30144
|
-
init_syncSchema();
|
|
30145
|
-
init_deviceCapabilities();
|
|
30146
30156
|
import {
|
|
30147
30157
|
access as access13,
|
|
30148
|
-
mkdir as
|
|
30158
|
+
mkdir as mkdir15,
|
|
30149
30159
|
mkdtemp as mkdtemp9,
|
|
30150
30160
|
readdir as readdir5,
|
|
30151
30161
|
readFile as readFile17,
|
|
@@ -30156,6 +30166,38 @@ import {
|
|
|
30156
30166
|
import { createHash as createHash15 } from "crypto";
|
|
30157
30167
|
import { basename as basename6, dirname as dirname13, join as join21, relative as relative13, resolve as resolve15, sep as sep8 } from "path";
|
|
30158
30168
|
|
|
30169
|
+
// src/mobile/nativePackages.ts
|
|
30170
|
+
var ABSOLUTE_CAPACITOR_DEVICES_VERSION = "0.8.0";
|
|
30171
|
+
var ABSOLUTE_CAPACITOR_SYNC_VERSION = "0.9.3";
|
|
30172
|
+
var ABSOLUTE_DEVICES_VERSION = "0.7.0";
|
|
30173
|
+
var ABSOLUTE_EXPO_DEVICES_VERSION = "0.0.11";
|
|
30174
|
+
var ABSOLUTE_NATIVE_EXACT_PACKAGES = new Set([
|
|
30175
|
+
"@absolutejs/devices",
|
|
30176
|
+
"@absolutejs/devices-capacitor",
|
|
30177
|
+
"@absolutejs/sync-capacitor"
|
|
30178
|
+
]);
|
|
30179
|
+
var CAPACITOR_PACKAGE_SPECS = [
|
|
30180
|
+
"@capacitor/core@8.5.0",
|
|
30181
|
+
"@capacitor/app@8.1.1",
|
|
30182
|
+
"@capacitor/browser@8.0.4",
|
|
30183
|
+
"@capacitor/network@8.0.1",
|
|
30184
|
+
"@capacitor/preferences@8.0.1",
|
|
30185
|
+
"@capacitor/cli@8.5.0",
|
|
30186
|
+
"@capacitor/android@8.5.0",
|
|
30187
|
+
"@capacitor/ios@8.5.0",
|
|
30188
|
+
`@absolutejs/devices@${ABSOLUTE_DEVICES_VERSION}`,
|
|
30189
|
+
`@absolutejs/devices-capacitor@${ABSOLUTE_CAPACITOR_DEVICES_VERSION}`
|
|
30190
|
+
];
|
|
30191
|
+
var CAPACITOR_SYNC_PACKAGE_SPECS = [
|
|
30192
|
+
`@absolutejs/sync-capacitor@${ABSOLUTE_CAPACITOR_SYNC_VERSION}`,
|
|
30193
|
+
"@capacitor-community/sqlite@8.1.1"
|
|
30194
|
+
];
|
|
30195
|
+
|
|
30196
|
+
// src/mobile/expoProject.ts
|
|
30197
|
+
init_nativeAuth();
|
|
30198
|
+
init_syncSchema();
|
|
30199
|
+
init_deviceCapabilities();
|
|
30200
|
+
|
|
30159
30201
|
// src/mobile/updateRuntime.ts
|
|
30160
30202
|
init_deviceCapabilities();
|
|
30161
30203
|
init_nativeAuth();
|
|
@@ -31411,8 +31453,8 @@ var packageDependencies = (plan) => Object.fromEntries(plan.requiredPackages.map
|
|
|
31411
31453
|
}));
|
|
31412
31454
|
var expoPackage = (auth, branding, sync, devices, updates) => ({
|
|
31413
31455
|
dependencies: {
|
|
31414
|
-
"@absolutejs/devices":
|
|
31415
|
-
"@absolutejs/devices-expo":
|
|
31456
|
+
"@absolutejs/devices": ABSOLUTE_DEVICES_VERSION,
|
|
31457
|
+
"@absolutejs/devices-expo": ABSOLUTE_EXPO_DEVICES_VERSION,
|
|
31416
31458
|
...auth ? {
|
|
31417
31459
|
"@absolutejs/auth": ABSOLUTE_EXPO_AUTH_CORE_VERSION,
|
|
31418
31460
|
[ABSOLUTE_EXPO_AUTH_PACKAGE]: ABSOLUTE_EXPO_AUTH_VERSION
|
|
@@ -32013,7 +32055,7 @@ import {
|
|
|
32013
32055
|
installExpoSyncLifecycle,
|
|
32014
32056
|
registerExpoSyncBackgroundTask
|
|
32015
32057
|
} from '@absolutejs/sync-expo';
|
|
32016
|
-
import
|
|
32058
|
+
import { reloadAppAsync } from 'expo';
|
|
32017
32059
|
import { absoluteExpoAuth, startAbsoluteExpoAuth } from './AbsoluteAuth';
|
|
32018
32060
|
|
|
32019
32061
|
const BACKGROUND_TASK = ${JSON.stringify(backgroundTask)};
|
|
@@ -32072,37 +32114,98 @@ absoluteExpoAuth.onPrincipalChange(principal => {
|
|
|
32072
32114
|
if (!started || principal?.namespace === activeNamespace) return;
|
|
32073
32115
|
const previousNamespace = activeNamespace;
|
|
32074
32116
|
installRuntimeTransport(principal);
|
|
32075
|
-
if (previousNamespace !== undefined) void
|
|
32117
|
+
if (previousNamespace !== undefined) void reloadAppAsync('absolutejs-auth-principal-changed').catch(() => {
|
|
32118
|
+
console.warn('AbsoluteJS could not reset the account runtime. Restart the app before continuing.');
|
|
32119
|
+
});
|
|
32076
32120
|
});
|
|
32077
32121
|
|
|
32078
32122
|
export const createAbsoluteExpoSyncBridge = async (
|
|
32079
32123
|
emit: (event: 'sync.socket' | 'sync.wake', payload: Record<string, unknown>) => void
|
|
32080
32124
|
) => {
|
|
32081
32125
|
await startAbsoluteExpoSync();
|
|
32082
|
-
const
|
|
32083
|
-
|
|
32084
|
-
|
|
32085
|
-
|
|
32126
|
+
const bind = (namespace: string, generation: number) => {
|
|
32127
|
+
const emitCurrent = (event: 'sync.socket' | 'sync.wake', payload: Record<string, unknown>) => {
|
|
32128
|
+
if (!closed && generation === revision) emit(event, payload);
|
|
32129
|
+
};
|
|
32130
|
+
const transactions = createExpoSyncBridgeHost({ createId: expoSyncRandomId, namespace, store });
|
|
32131
|
+
const sockets = createExpoSyncSocketBridgeHost({
|
|
32132
|
+
allowedOrigin: PRODUCTION_ORIGIN,
|
|
32133
|
+
emit: payload => emitCurrent('sync.socket', payload),
|
|
32134
|
+
socketTicket: async audience => {
|
|
32135
|
+
if (closed || generation !== revision) throw new Error('Expo Sync principal changed.');
|
|
32136
|
+
const ticket = await absoluteExpoAuth.socketTicket(audience);
|
|
32137
|
+
if (closed || generation !== revision) throw new Error('Expo Sync principal changed.');
|
|
32138
|
+
return ticket;
|
|
32139
|
+
}
|
|
32140
|
+
});
|
|
32141
|
+
const removeLifecycle = installExpoSyncLifecycle({
|
|
32142
|
+
client: { reconnect: () => emitCurrent('sync.wake', {}) }
|
|
32143
|
+
});
|
|
32144
|
+
return {
|
|
32145
|
+
close: async () => {
|
|
32146
|
+
removeLifecycle();
|
|
32147
|
+
await Promise.all([transactions.close(), sockets.close()]);
|
|
32148
|
+
},
|
|
32149
|
+
request: (method: string, params: Record<string, unknown>) =>
|
|
32150
|
+
method.startsWith('sync.socket.') ? sockets.request(method, params) : transactions.request(method, params)
|
|
32151
|
+
};
|
|
32086
32152
|
};
|
|
32087
|
-
|
|
32088
|
-
|
|
32089
|
-
|
|
32090
|
-
|
|
32091
|
-
|
|
32092
|
-
|
|
32093
|
-
const
|
|
32094
|
-
|
|
32095
|
-
|
|
32153
|
+
let closed = false;
|
|
32154
|
+
let revoked = false;
|
|
32155
|
+
let boundNamespace: string | undefined;
|
|
32156
|
+
let revision = 0;
|
|
32157
|
+
let bridge: ReturnType<typeof bind> | undefined;
|
|
32158
|
+
let ready = Promise.resolve();
|
|
32159
|
+
const replace = (principal: Awaited<ReturnType<typeof absoluteExpoAuth.principal>>) => {
|
|
32160
|
+
if (closed) return;
|
|
32161
|
+
// A mounted page may bind its first login, but must never inherit another
|
|
32162
|
+
// account's authority. Account changes require the existing runtime reload.
|
|
32163
|
+
if (boundNamespace !== undefined && principal?.namespace !== boundNamespace) revoked = true;
|
|
32164
|
+
const generation = ++revision;
|
|
32165
|
+
const previous = bridge;
|
|
32166
|
+
bridge = undefined;
|
|
32167
|
+
ready = ready.then(async () => {
|
|
32168
|
+
await previous?.close();
|
|
32169
|
+
if (!closed && !revoked && generation === revision && principal) {
|
|
32170
|
+
boundNamespace = principal.namespace;
|
|
32171
|
+
bridge = bind(principal.namespace, generation);
|
|
32172
|
+
}
|
|
32173
|
+
});
|
|
32174
|
+
// Keep background transitions handled; requests still observe setup failures.
|
|
32175
|
+
void ready.catch(() => undefined);
|
|
32176
|
+
};
|
|
32177
|
+
const stop = absoluteExpoAuth.onPrincipalChange(replace);
|
|
32178
|
+
try {
|
|
32179
|
+
const initialRevision = revision;
|
|
32180
|
+
const principal = await absoluteExpoAuth.principal();
|
|
32181
|
+
if (revision === initialRevision) replace(principal);
|
|
32182
|
+
await ready;
|
|
32183
|
+
} catch (error) {
|
|
32184
|
+
stop();
|
|
32185
|
+
closed = true;
|
|
32186
|
+
await bridge?.close();
|
|
32187
|
+
throw error;
|
|
32188
|
+
}
|
|
32096
32189
|
|
|
32097
32190
|
return {
|
|
32098
32191
|
close: async () => {
|
|
32099
|
-
|
|
32100
|
-
|
|
32192
|
+
if (closed) return;
|
|
32193
|
+
closed = true;
|
|
32194
|
+
++revision;
|
|
32195
|
+
stop();
|
|
32196
|
+
const previous = bridge;
|
|
32197
|
+
bridge = undefined;
|
|
32198
|
+
await Promise.all([ready, previous?.close()]);
|
|
32101
32199
|
},
|
|
32102
|
-
request: (method: string, params: Record<string, unknown>) =>
|
|
32103
|
-
|
|
32104
|
-
|
|
32105
|
-
|
|
32200
|
+
request: async (method: string, params: Record<string, unknown>) => {
|
|
32201
|
+
const generation = revision;
|
|
32202
|
+
await ready;
|
|
32203
|
+
if (closed || revoked || generation !== revision) throw new Error('Expo Sync principal changed.');
|
|
32204
|
+
if (!bridge) throw new Error('Expo Sync requires an authenticated principal.');
|
|
32205
|
+
const result = await bridge.request(method, params);
|
|
32206
|
+
if (closed || revoked || generation !== revision) throw new Error('Expo Sync principal changed.');
|
|
32207
|
+
return result;
|
|
32208
|
+
}
|
|
32106
32209
|
};
|
|
32107
32210
|
};
|
|
32108
32211
|
`;
|
|
@@ -32316,10 +32419,13 @@ export function AbsoluteWebHost({ path }: AbsoluteWebHostProps = {}) {
|
|
|
32316
32419
|
webView.current?.injectJavaScript(\`globalThis.__absoluteExpoReceive(\${JSON.stringify(source)}); true;\`);
|
|
32317
32420
|
});
|
|
32318
32421
|
void ${sync ? "startAbsoluteExpoSync" : "startAbsoluteExpoAuth"}().then(async () => {
|
|
32319
|
-
${sync ? `
|
|
32422
|
+
${sync ? `const bridge = await createAbsoluteExpoSyncBridge((event, payload) => {
|
|
32423
|
+
if (!active) return;
|
|
32320
32424
|
const source = JSON.stringify({ event, format: BRIDGE_FORMAT, kind: 'event', path: activeWebPath.current, payload });
|
|
32321
32425
|
webView.current?.injectJavaScript(\`globalThis.__absoluteExpoReceive(\${JSON.stringify(source)}); true;\`);
|
|
32322
|
-
})
|
|
32426
|
+
});
|
|
32427
|
+
if (!active) { await bridge.close(); return; }
|
|
32428
|
+
syncBridge.current = bridge;` : ""}
|
|
32323
32429
|
if (active) setRuntimeReady(true);
|
|
32324
32430
|
});
|
|
32325
32431
|
return () => {
|
|
@@ -32730,7 +32836,7 @@ var expoTsConfig = (projectRoot, project, auth, sync) => ({
|
|
|
32730
32836
|
extends: "expo/tsconfig.base"
|
|
32731
32837
|
});
|
|
32732
32838
|
var writeManagedFile = async (path, source, force) => {
|
|
32733
|
-
await
|
|
32839
|
+
await mkdir15(dirname13(path), { recursive: true });
|
|
32734
32840
|
if (await exists6(path)) {
|
|
32735
32841
|
const current = await readFile17(path, "utf8");
|
|
32736
32842
|
if (current === source)
|
|
@@ -32812,7 +32918,7 @@ var writeAbsoluteExpoProject = async (config, options) => {
|
|
|
32812
32918
|
throw new TypeError(`Expo project directory ${project} is not AbsoluteJS-managed; rerun with --force only after reviewing it.`);
|
|
32813
32919
|
}
|
|
32814
32920
|
}
|
|
32815
|
-
await
|
|
32921
|
+
await mkdir15(project, { recursive: true });
|
|
32816
32922
|
await writeFile14(marker, `format=1
|
|
32817
32923
|
`);
|
|
32818
32924
|
const authEnabled = Boolean(auth);
|
|
@@ -33047,7 +33153,7 @@ var syncAbsoluteExpoWebAssets = async (config) => {
|
|
|
33047
33153
|
});
|
|
33048
33154
|
const bundleId = `amexpo_${bundleHash.digest("hex")}`;
|
|
33049
33155
|
const destination = join21(config.nativeProjectDirectory, "assets", "absolute");
|
|
33050
|
-
await
|
|
33156
|
+
await mkdir15(dirname13(destination), { recursive: true });
|
|
33051
33157
|
const staging = await mkdtemp9(join21(dirname13(destination), `.${basename6(destination)}.stage-`));
|
|
33052
33158
|
let assets;
|
|
33053
33159
|
let archiveAsset;
|
|
@@ -33546,7 +33652,7 @@ var parseAbsoluteExpoBridgeMessage = (source) => {
|
|
|
33546
33652
|
};
|
|
33547
33653
|
// src/mobile/expoCodeSigning.ts
|
|
33548
33654
|
var import_code_signing_certificates = __toESM(require_main(), 1);
|
|
33549
|
-
import { access as access14, mkdir as
|
|
33655
|
+
import { access as access14, mkdir as mkdir16, writeFile as writeFile15 } from "fs/promises";
|
|
33550
33656
|
import { dirname as dirname14, isAbsolute as isAbsolute8, relative as relative14, resolve as resolve17, sep as sep9 } from "path";
|
|
33551
33657
|
var exists7 = async (path) => access14(path).then(() => true).catch(() => false);
|
|
33552
33658
|
var inside3 = (root, path) => {
|
|
@@ -33587,7 +33693,7 @@ var generateAbsoluteExpoCodeSigning = async (options) => {
|
|
|
33587
33693
|
import_code_signing_certificates.validateSelfSignedCertificate(certificate, keyPair);
|
|
33588
33694
|
const { privateKeyPEM, publicKeyPEM } = import_code_signing_certificates.convertKeyPairToPEM(keyPair);
|
|
33589
33695
|
const certificatePem = import_code_signing_certificates.convertCertificateToCertificatePEM(certificate);
|
|
33590
|
-
await Promise.all([certificatePath, privateKeyPath, publicKeyPath].map((path) =>
|
|
33696
|
+
await Promise.all([certificatePath, privateKeyPath, publicKeyPath].map((path) => mkdir16(dirname14(path), { recursive: true })));
|
|
33591
33697
|
await Promise.all([
|
|
33592
33698
|
writeFile15(certificatePath, certificatePem, { flag: "wx", mode: 420 }),
|
|
33593
33699
|
writeFile15(privateKeyPath, privateKeyPEM, { flag: "wx", mode: 384 }),
|
|
@@ -33822,7 +33928,7 @@ var createAbsoluteExpoNativeWatcher = async (options) => {
|
|
|
33822
33928
|
return { close };
|
|
33823
33929
|
};
|
|
33824
33930
|
// src/mobile/expoUpdate.ts
|
|
33825
|
-
import { access as access16, mkdir as
|
|
33931
|
+
import { access as access16, mkdir as mkdir17, readFile as readFile20, writeFile as writeFile16 } from "fs/promises";
|
|
33826
33932
|
import { dirname as dirname15, extname as extname4, join as join24 } from "path";
|
|
33827
33933
|
var ABSOLUTE_EXPO_UPDATE_DESCRIPTOR = "_absolute/expo-update.json";
|
|
33828
33934
|
var ABSOLUTE_EXPO_UPDATE_FORMAT = 1;
|
|
@@ -33904,7 +34010,7 @@ var finalizeAbsoluteExpoUpdateExport = async (options) => {
|
|
|
33904
34010
|
throw new TypeError(`Expo export metadata references missing asset ${path}.`);
|
|
33905
34011
|
})));
|
|
33906
34012
|
const destination = join24(options.exportDirectory, ABSOLUTE_EXPO_UPDATE_DESCRIPTOR);
|
|
33907
|
-
await
|
|
34013
|
+
await mkdir17(dirname15(destination), { recursive: true });
|
|
33908
34014
|
await writeFile16(destination, `${JSON.stringify(descriptor, null, "\t")}
|
|
33909
34015
|
`);
|
|
33910
34016
|
return { descriptor, path: destination };
|
|
@@ -33916,7 +34022,7 @@ init_config();
|
|
|
33916
34022
|
// src/mobile/ciPromotionAudit.ts
|
|
33917
34023
|
import {
|
|
33918
34024
|
access as access19,
|
|
33919
|
-
mkdir as
|
|
34025
|
+
mkdir as mkdir20,
|
|
33920
34026
|
mkdtemp as mkdtemp11,
|
|
33921
34027
|
readFile as readFile23,
|
|
33922
34028
|
readdir as readdir7,
|
|
@@ -33928,7 +34034,7 @@ import {
|
|
|
33928
34034
|
import { dirname as dirname17, isAbsolute as isAbsolute11, join as join26, relative as relative18, resolve as resolve20, sep as sep12 } from "path";
|
|
33929
34035
|
|
|
33930
34036
|
// src/mobile/certificationVerification.ts
|
|
33931
|
-
import { access as access17, mkdir as
|
|
34037
|
+
import { access as access17, mkdir as mkdir18, readFile as readFile21, stat as stat6, writeFile as writeFile17 } from "fs/promises";
|
|
33932
34038
|
import { dirname as dirname16, isAbsolute as isAbsolute9, relative as relative16, resolve as resolve18, sep as sep10 } from "path";
|
|
33933
34039
|
var ABSOLUTE_MOBILE_CERTIFICATION_VERIFICATION_FORMAT = 1;
|
|
33934
34040
|
var MAX_VERIFICATION_BYTES = 1048576;
|
|
@@ -34021,7 +34127,7 @@ var readAbsoluteSigstoreBundle = async (projectRoot, requested) => {
|
|
|
34021
34127
|
var writeAbsoluteMobileCertificationVerification = async (projectRoot, requested, verification) => {
|
|
34022
34128
|
const path = projectFile(projectRoot, requested);
|
|
34023
34129
|
const parsed = parseAbsoluteMobileCertificationVerification(verification);
|
|
34024
|
-
await
|
|
34130
|
+
await mkdir18(dirname16(path), { recursive: true });
|
|
34025
34131
|
await writeFile17(path, `${JSON.stringify(parsed, null, 2)}
|
|
34026
34132
|
`, {
|
|
34027
34133
|
mode: 384
|
|
@@ -34033,7 +34139,7 @@ var writeAbsoluteMobileCertificationVerification = async (projectRoot, requested
|
|
|
34033
34139
|
import { createHash as createHash17 } from "crypto";
|
|
34034
34140
|
import {
|
|
34035
34141
|
access as access18,
|
|
34036
|
-
mkdir as
|
|
34142
|
+
mkdir as mkdir19,
|
|
34037
34143
|
mkdtemp as mkdtemp10,
|
|
34038
34144
|
readFile as readFile22,
|
|
34039
34145
|
rename as rename14,
|
|
@@ -34399,7 +34505,7 @@ var writeAbsoluteMobileReleaseCertification = async (projectRoot, certification,
|
|
|
34399
34505
|
const parent = resolve19(root, outputDirectory ?? join25(".absolutejs", "mobile", "certifications", certification.release.platform, certification.release.releaseId));
|
|
34400
34506
|
if (!inside4(root, parent))
|
|
34401
34507
|
throw new TypeError("Mobile certification output must remain inside the project.");
|
|
34402
|
-
await
|
|
34508
|
+
await mkdir19(parent, { recursive: true });
|
|
34403
34509
|
const destination = join25(parent, certification.certificationId);
|
|
34404
34510
|
const paths = {
|
|
34405
34511
|
directory: destination,
|
|
@@ -34772,11 +34878,11 @@ var auditAbsoluteMobileCiPromotion = async (options) => {
|
|
|
34772
34878
|
const output = projectPath(options.projectRoot, options.outputDirectory ?? `.absolutejs/mobile-ci/audits/${promotionRunId}`);
|
|
34773
34879
|
if (await access19(output).then(() => true).catch(() => false))
|
|
34774
34880
|
throw new TypeError(`Mobile CI audit output already exists: ${output}`);
|
|
34775
|
-
await
|
|
34881
|
+
await mkdir20(dirname17(output), { recursive: true });
|
|
34776
34882
|
const staging = await mkdtemp11(join26(dirname17(output), ".promotion-audit-"));
|
|
34777
34883
|
try {
|
|
34778
34884
|
const evidenceRoot = join26(staging, "promotion-evidence");
|
|
34779
|
-
await
|
|
34885
|
+
await mkdir20(evidenceRoot);
|
|
34780
34886
|
await requireCommand(runner, [
|
|
34781
34887
|
"gh",
|
|
34782
34888
|
"run",
|
|
@@ -34807,7 +34913,7 @@ var auditAbsoluteMobileCiPromotion = async (options) => {
|
|
|
34807
34913
|
throw new TypeError("Requested source run does not match promotion context.");
|
|
34808
34914
|
const sourceArtifact = context?.sourceArtifact ?? `absolute-mobile-${platform3}`;
|
|
34809
34915
|
const sourceRoot = join26(staging, "source-release");
|
|
34810
|
-
await
|
|
34916
|
+
await mkdir20(sourceRoot);
|
|
34811
34917
|
await requireCommand(runner, [
|
|
34812
34918
|
"gh",
|
|
34813
34919
|
"run",
|
|
@@ -34908,7 +35014,7 @@ import {
|
|
|
34908
35014
|
access as access20,
|
|
34909
35015
|
link,
|
|
34910
35016
|
lstat as lstat2,
|
|
34911
|
-
mkdir as
|
|
35017
|
+
mkdir as mkdir21,
|
|
34912
35018
|
open,
|
|
34913
35019
|
readFile as readFile24,
|
|
34914
35020
|
readdir as readdir8,
|
|
@@ -35052,7 +35158,7 @@ var writeSynced = async (path, source) => {
|
|
|
35052
35158
|
}
|
|
35053
35159
|
};
|
|
35054
35160
|
var atomicWrite = async (path, source, exclusive) => {
|
|
35055
|
-
await
|
|
35161
|
+
await mkdir21(dirname18(path), { recursive: true });
|
|
35056
35162
|
const temporary = join27(dirname18(path), `.operation-${randomUUID5()}.tmp`);
|
|
35057
35163
|
try {
|
|
35058
35164
|
await writeSynced(temporary, source);
|
|
@@ -35123,7 +35229,7 @@ var readAbsoluteMobilePromotionOperation = async (projectRoot, requestedDispatch
|
|
|
35123
35229
|
var relativeAbsoluteMobilePromotionOperationPath = (projectRoot, dispatchIdValue) => relative19(resolve21(projectRoot), absoluteMobilePromotionOperationPath(projectRoot, dispatchIdValue)).replaceAll("\\", "/");
|
|
35124
35230
|
// src/mobile/ciWorkflow.ts
|
|
35125
35231
|
import { existsSync as existsSync4 } from "fs";
|
|
35126
|
-
import { access as access21, mkdir as
|
|
35232
|
+
import { access as access21, mkdir as mkdir22, readFile as readFile25, writeFile as writeFile20 } from "fs/promises";
|
|
35127
35233
|
import { dirname as dirname19, extname as extname5, relative as relative20, resolve as resolve22, sep as sep14 } from "path";
|
|
35128
35234
|
var ABSOLUTE_MOBILE_CI_WORKFLOW_FORMAT = 4;
|
|
35129
35235
|
var SECRET_NAME_PATTERN = /^[A-Z][A-Z0-9_]*$/u;
|
|
@@ -35935,7 +36041,7 @@ var writeAbsoluteMobileGithubWorkflow = async (options) => {
|
|
|
35935
36041
|
if (previous !== undefined && previous !== generated.workflow && !options.force)
|
|
35936
36042
|
throw new TypeError(`${relative20(options.projectRoot, path)} already exists and differs. Rerun with --force to replace the generated workflow.`);
|
|
35937
36043
|
if (previous !== generated.workflow) {
|
|
35938
|
-
await
|
|
36044
|
+
await mkdir22(dirname19(path), { recursive: true });
|
|
35939
36045
|
await writeFile20(path, generated.workflow);
|
|
35940
36046
|
}
|
|
35941
36047
|
return {
|
|
@@ -36472,7 +36578,7 @@ init_nativeAuth();
|
|
|
36472
36578
|
|
|
36473
36579
|
// src/mobile/nativeUpdates.ts
|
|
36474
36580
|
import {
|
|
36475
|
-
mkdir as
|
|
36581
|
+
mkdir as mkdir23,
|
|
36476
36582
|
readFile as readFile28,
|
|
36477
36583
|
readdir as readdir9,
|
|
36478
36584
|
rename as rename19,
|
|
@@ -36499,7 +36605,7 @@ var writeChanged = async (path, source) => {
|
|
|
36499
36605
|
const current = await optionalSource2(path);
|
|
36500
36606
|
if (current === source)
|
|
36501
36607
|
return false;
|
|
36502
|
-
await
|
|
36608
|
+
await mkdir23(dirname21(path), { recursive: true });
|
|
36503
36609
|
if (current === null) {
|
|
36504
36610
|
await writeFile23(path, source, { flag: "wx" });
|
|
36505
36611
|
return true;
|
|
@@ -36971,7 +37077,7 @@ var applyAbsoluteNativeUpdates = async (config, platforms = config.platforms) =>
|
|
|
36971
37077
|
};
|
|
36972
37078
|
// src/mobile/nativeObservability.ts
|
|
36973
37079
|
import {
|
|
36974
|
-
mkdir as
|
|
37080
|
+
mkdir as mkdir24,
|
|
36975
37081
|
readFile as readFile29,
|
|
36976
37082
|
readdir as readdir10,
|
|
36977
37083
|
rename as rename20,
|
|
@@ -36997,7 +37103,7 @@ var writeChanged2 = async (path, source) => {
|
|
|
36997
37103
|
const current = await optionalSource3(path);
|
|
36998
37104
|
if (current === source)
|
|
36999
37105
|
return false;
|
|
37000
|
-
await
|
|
37106
|
+
await mkdir24(dirname22(path), { recursive: true });
|
|
37001
37107
|
if (current === null) {
|
|
37002
37108
|
await writeFile24(path, source, { flag: "wx" });
|
|
37003
37109
|
return true;
|
|
@@ -37503,7 +37609,7 @@ var applyAbsoluteNativeObservability = async (config, platforms = config.platfor
|
|
|
37503
37609
|
return { changed: changed.some(Boolean) };
|
|
37504
37610
|
};
|
|
37505
37611
|
// src/mobile/nativeReleaseReadiness.ts
|
|
37506
|
-
import { mkdir as
|
|
37612
|
+
import { mkdir as mkdir25, readFile as readFile30, readdir as readdir11, rename as rename21, writeFile as writeFile25 } from "fs/promises";
|
|
37507
37613
|
import { dirname as dirname23, join as join34 } from "path";
|
|
37508
37614
|
var START3 = "// absolutejs:release-readiness:start";
|
|
37509
37615
|
var END3 = "// absolutejs:release-readiness:end";
|
|
@@ -37523,7 +37629,7 @@ var writeChanged3 = async (path, source) => {
|
|
|
37523
37629
|
const current = await optionalSource4(path);
|
|
37524
37630
|
if (current === source)
|
|
37525
37631
|
return false;
|
|
37526
|
-
await
|
|
37632
|
+
await mkdir25(dirname23(path), { recursive: true });
|
|
37527
37633
|
if (current === null) {
|
|
37528
37634
|
await writeFile25(path, source, { flag: "wx" });
|
|
37529
37635
|
return true;
|
|
@@ -44581,7 +44687,7 @@ import { pathToFileURL as pathToFileURL4 } from "url";
|
|
|
44581
44687
|
import { createHash as createHash18, sign, verify } from "crypto";
|
|
44582
44688
|
import {
|
|
44583
44689
|
cp as cp2,
|
|
44584
|
-
mkdir as
|
|
44690
|
+
mkdir as mkdir26,
|
|
44585
44691
|
mkdtemp as mkdtemp12,
|
|
44586
44692
|
readdir as readdir12,
|
|
44587
44693
|
readFile as readFile31,
|
|
@@ -44645,7 +44751,7 @@ var buildAbsoluteMobileUpdate = async (options) => {
|
|
|
44645
44751
|
value: signature.toString("base64")
|
|
44646
44752
|
}
|
|
44647
44753
|
});
|
|
44648
|
-
await
|
|
44754
|
+
await mkdir26(outputRoot, { recursive: true });
|
|
44649
44755
|
const outputDirectory = join35(outputRoot, manifest.releaseId);
|
|
44650
44756
|
const staging = await mkdtemp12(join35(outputRoot, ".stage-"));
|
|
44651
44757
|
try {
|
|
@@ -44673,7 +44779,7 @@ var copyAbsoluteMobileUpdateFile = async (updateDirectory, path, destination) =>
|
|
|
44673
44779
|
const root = resolve25(updateDirectory, UPDATE_FILES_DIRECTORY);
|
|
44674
44780
|
if (!source.startsWith(`${root}/`))
|
|
44675
44781
|
throw new TypeError("Update file escaped its release.");
|
|
44676
|
-
await
|
|
44782
|
+
await mkdir26(dirname25(destination), { recursive: true });
|
|
44677
44783
|
await cp2(source, destination, { force: true });
|
|
44678
44784
|
};
|
|
44679
44785
|
var readAbsoluteMobileUpdate = async (directory) => parseAbsoluteMobileUpdateManifest(JSON.parse(await readFile31(join35(resolve25(directory), UPDATE_MANIFEST_FILE), "utf8")));
|
|
@@ -45122,6 +45228,7 @@ export {
|
|
|
45122
45228
|
pauseAbsoluteMobileUpdateRollout,
|
|
45123
45229
|
planAbsoluteExpoDevSession,
|
|
45124
45230
|
prepareAbsoluteAndroidRelease,
|
|
45231
|
+
prepareAbsoluteCapacitorInitialization,
|
|
45125
45232
|
prepareAbsoluteIosDevProject,
|
|
45126
45233
|
prepareAbsoluteIosRelease,
|
|
45127
45234
|
projectImportsAbsoluteDeviceCapability,
|
|
@@ -45201,5 +45308,5 @@ export {
|
|
|
45201
45308
|
writeAbsoluteMobileUpdateRegistry
|
|
45202
45309
|
};
|
|
45203
45310
|
|
|
45204
|
-
//# debugId=
|
|
45311
|
+
//# debugId=0FE744BA265F0CF164756E2164756E21
|
|
45205
45312
|
//# sourceMappingURL=index.js.map
|