@absolutejs/absolute 0.20.0-beta.114 → 0.20.0-beta.116

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.
@@ -6,7 +6,7 @@ import {
6
6
  createIslandRegistryDefinitionPlugin,
7
7
  finalizeAbsoluteMobileCompatibilityBuild,
8
8
  resolveServerBundleExternals
9
- } from "./index-6mbm4n3g.js";
9
+ } from "./index-82wpxhvv.js";
10
10
  import {
11
11
  loadIslandRegistryBuildInfo
12
12
  } from "./index-bzs19w3r.js";
package/dist/cli/index.js CHANGED
@@ -58,7 +58,7 @@ if (command === "dev") {
58
58
  }
59
59
  const positionalArgs = stripNamedArgs("--config", "--android-device", "--ios-device").filter((arg) => arg !== "--no-mobile" && arg !== "--eager");
60
60
  const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
61
- const { dev } = await import("./dev-5cqmf7za.js");
61
+ const { dev } = await import("./dev-daa7tdht.js");
62
62
  await dev(serverEntry, configPath, {
63
63
  androidDevice,
64
64
  eager: args.includes("--eager"),
@@ -71,7 +71,7 @@ if (command === "dev") {
71
71
  const configPath = parseNamedArg("--config");
72
72
  const positionalArgs = stripNamedArgs("--outdir", "--config").filter((arg) => arg !== "--prebuilt");
73
73
  const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
74
- const { start } = await import("./start-jt61f40d.js");
74
+ const { start } = await import("./start-r606d5v9.js");
75
75
  await start(serverEntry, outdir, configPath, {
76
76
  prebuilt: args.includes("--prebuilt")
77
77
  });
@@ -81,7 +81,7 @@ if (command === "dev") {
81
81
  const configPath = parseNamedArg("--config");
82
82
  const positionalArgs = stripNamedArgs("--outdir", "--config");
83
83
  const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
84
- const { start } = await import("./start-jt61f40d.js");
84
+ const { start } = await import("./start-r606d5v9.js");
85
85
  await start(serverEntry, outdir, configPath, { prepareOnly: true });
86
86
  } else if (command === "build") {
87
87
  sendTelemetryEvent("cli:command", { command });
@@ -197,13 +197,13 @@ if (command === "dev") {
197
197
  const configPath = parseNamedArg("--config");
198
198
  const positionalArgs = stripNamedArgs("--outdir", "--outfile", "--config");
199
199
  const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
200
- const { compile } = await import("./compile-ya4kd2sg.js");
200
+ const { compile } = await import("./compile-kbhxgjat.js");
201
201
  await compile(serverEntry, outdir, outfile, configPath);
202
202
  } else if (command === "mobile") {
203
203
  sendTelemetryEvent("cli:command", {
204
204
  command: `mobile:${workspaceCommand ?? "unknown"}`
205
205
  });
206
- const { runMobile } = await import("./mobile-55wjg3nd.js");
206
+ const { runMobile } = await import("./mobile-03zwncxx.js");
207
207
  try {
208
208
  await runMobile(args);
209
209
  } catch (error) {
@@ -7,12 +7,12 @@ import {
7
7
  } from "./index-zh6hhrwy.js";
8
8
  import {
9
9
  start
10
- } from "./index-5fmgn0nx.js";
10
+ } from "./index-vjepnxr0.js";
11
11
  import {
12
12
  ABSOLUTE_MOBILE_CLIENT_MANIFEST_FORMAT,
13
13
  ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION,
14
14
  resolveAbsoluteMobileRoute
15
- } from "./index-6mbm4n3g.js";
15
+ } from "./index-82wpxhvv.js";
16
16
  import"./index-bzs19w3r.js";
17
17
  import"./index-s2tazax7.js";
18
18
  import {
@@ -74,7 +74,7 @@ import {
74
74
  syncAbsoluteExpoWebAssets,
75
75
  unsignedAbsoluteMobileUpdate,
76
76
  writeAbsoluteExpoProject
77
- } from "./index-dr21p6ae.js";
77
+ } from "./index-bhcxtf1x.js";
78
78
  import {
79
79
  buildAbsoluteExpoAndroidWslBundle
80
80
  } from "./index-28nxv57v.js";
@@ -16790,7 +16790,7 @@ import {
16790
16790
  rm as rm11,
16791
16791
  writeFile as writeFile19
16792
16792
  } from "fs/promises";
16793
- import { createHash as createHash7, createPublicKey as createPublicKey2, randomUUID as randomUUID2 } from "crypto";
16793
+ import { createHash as createHash8, createPublicKey as createPublicKey2, randomUUID as randomUUID2 } from "crypto";
16794
16794
  import { join as join19, relative as relative17, resolve as resolve18 } from "path";
16795
16795
  import { createInterface } from "readline/promises";
16796
16796
 
@@ -19325,6 +19325,7 @@ var waitForAbsoluteAndroidHmrApply = async (session, options) => {
19325
19325
 
19326
19326
  // src/mobile/releaseDoctor.ts
19327
19327
  import { access as access4, readFile as readFile9, readdir as readdir4 } from "fs/promises";
19328
+ import { createHash as createHash2 } from "crypto";
19328
19329
  import { dirname as dirname6, extname, join as join8, relative as relative3 } from "path";
19329
19330
 
19330
19331
  // src/mobile/mobileBundleInspection.ts
@@ -20087,6 +20088,7 @@ var expoEmbeddedAssetsCheck = async (config) => {
20087
20088
  const entries = sourceFiles.map((path, index) => {
20088
20089
  const entry = {
20089
20090
  length: contents[index]?.byteLength ?? 0,
20091
+ md5: createHash2("md5").update(contents[index] ?? Buffer.alloc(0)).digest("hex"),
20090
20092
  offset,
20091
20093
  path: path.replaceAll("\\", "/")
20092
20094
  };
@@ -20094,7 +20096,7 @@ var expoEmbeddedAssetsCheck = async (config) => {
20094
20096
  return entry;
20095
20097
  });
20096
20098
  const archive = await readFile9(join8(assetsRoot, embeddedFiles[0] ?? ""));
20097
- if (!archive.equals(Buffer.concat(contents)) || entries.some((entry) => !source.includes(JSON.stringify(entry))))
20099
+ if (!archive.equals(Buffer.concat(contents)) || !source.includes(`const ARCHIVE_MD5 = ${JSON.stringify(createHash2("md5").update(archive).digest("hex"))};`) || !source.includes(`const ARCHIVE_LENGTH = ${archive.byteLength};`) || entries.some((entry) => !source.includes(JSON.stringify(entry))))
20098
20100
  throw new TypeError("Generated Expo asset bytes differ from the prepared mobile bundle.");
20099
20101
  return pass("expo.bundle-projection", `Expo embeds the complete signed mobile bundle as one opaque archive containing ${sourceFiles.length} file(s).`, generated);
20100
20102
  } catch (error) {
@@ -20580,7 +20582,7 @@ var inspectAbsoluteMobileRelease = async (config, projectRoot) => {
20580
20582
  };
20581
20583
 
20582
20584
  // src/mobile/androidRelease.ts
20583
- import { createHash as createHash2 } from "crypto";
20585
+ import { createHash as createHash3 } from "crypto";
20584
20586
  import {
20585
20587
  access as access5,
20586
20588
  copyFile,
@@ -20672,7 +20674,7 @@ var windowsJarsignerPath = (path, capture) => {
20672
20674
  }
20673
20675
  return translated;
20674
20676
  };
20675
- var sha256File = async (path) => createHash2("sha256").update(await readFile10(path)).digest("hex");
20677
+ var sha256File = async (path) => createHash3("sha256").update(await readFile10(path)).digest("hex");
20676
20678
  var fingerprintExpoAndroidProject = async (nativeDirectory) => {
20677
20679
  const root = await realpath(nativeDirectory);
20678
20680
  const files = await Array.fromAsync(new Bun.Glob("**/*").scan({ cwd: root, onlyFiles: true }));
@@ -20681,9 +20683,9 @@ var fingerprintExpoAndroidProject = async (nativeDirectory) => {
20681
20683
  return !parts.includes(".gradle") && !parts.includes("build");
20682
20684
  }).sort().map(async (path) => {
20683
20685
  const contents = await readFile10(join9(root, path));
20684
- return `${path.replaceAll("\\", "/")}\x00${createHash2("sha256").update(contents).digest("hex")}\x00`;
20686
+ return `${path.replaceAll("\\", "/")}\x00${createHash3("sha256").update(contents).digest("hex")}\x00`;
20685
20687
  }));
20686
- return createHash2("sha256").update(records.join("")).digest("hex");
20688
+ return createHash3("sha256").update(records.join("")).digest("hex");
20687
20689
  };
20688
20690
  var safeOutputDirectory = (projectRoot, requested) => {
20689
20691
  const root = resolve5(projectRoot);
@@ -20757,7 +20759,7 @@ var buildAbsoluteAndroidRelease = async (options) => {
20757
20759
  const nativeFingerprint = options.config.engine === "expo" ? await fingerprintExpoAndroidProject(nativeDirectory) : await fingerprintAbsoluteAndroidNativeProject({
20758
20760
  nativeDirectory
20759
20761
  });
20760
- const buildIdentity = createHash2("sha256").update(`${manifest.appBuild}\x00${nativeFingerprint}`).digest("hex");
20762
+ const buildIdentity = createHash3("sha256").update(`${manifest.appBuild}\x00${nativeFingerprint}`).digest("hex");
20761
20763
  versionCode = await options.prepareVersionCode(buildIdentity);
20762
20764
  }
20763
20765
  if (versionCode !== undefined && (!Number.isSafeInteger(versionCode) || versionCode < 1 || versionCode > 2100000000)) {
@@ -20834,7 +20836,41 @@ var buildAbsoluteAndroidRelease = async (options) => {
20834
20836
  };
20835
20837
 
20836
20838
  // src/mobile/androidReleaseAcceptance.ts
20837
- import { createHash as createHash3 } from "crypto";
20839
+ import { createHash as createHash4 } from "crypto";
20840
+
20841
+ // src/mobile/androidServiceReadiness.ts
20842
+ var SERVICE_TIMEOUT_MS = 180000;
20843
+ var SERVICE_POLL_MS = 500;
20844
+ var waitForAbsoluteAndroidNetworkServices = async (options) => {
20845
+ const startedAt = performance.now();
20846
+ const waitForServices = async () => {
20847
+ const states = await Promise.all(["wifi", "phone"].map(async (service) => {
20848
+ const result = await options.run([
20849
+ options.adb,
20850
+ "-s",
20851
+ options.serial,
20852
+ "shell",
20853
+ "service",
20854
+ "check",
20855
+ service
20856
+ ]);
20857
+ return {
20858
+ ready: result.exitCode === 0 && result.stdout.trim() === `Service ${service}: found`,
20859
+ service
20860
+ };
20861
+ }));
20862
+ const missing = states.filter(({ ready }) => !ready).map(({ service }) => service);
20863
+ if (missing.length === 0)
20864
+ return;
20865
+ if (performance.now() - startedAt >= (options.timeoutMs ?? SERVICE_TIMEOUT_MS))
20866
+ throw new Error(`Android network services did not become ready: ${missing.join(", ")}. Finish booting or restart the emulator before installed offline acceptance; no network settings were changed.`);
20867
+ await Bun.sleep(options.pollMs ?? SERVICE_POLL_MS);
20868
+ await waitForServices();
20869
+ };
20870
+ await waitForServices();
20871
+ };
20872
+
20873
+ // src/mobile/androidReleaseAcceptance.ts
20838
20874
  import {
20839
20875
  access as access6,
20840
20876
  mkdir as mkdir8,
@@ -20920,7 +20956,7 @@ var exists2 = async (path) => {
20920
20956
  return false;
20921
20957
  }
20922
20958
  };
20923
- var sha256 = async (path) => createHash3("sha256").update(await readFile11(path)).digest("hex");
20959
+ var sha256 = async (path) => createHash4("sha256").update(await readFile11(path)).digest("hex");
20924
20960
  var inside = (root, candidate) => {
20925
20961
  const path = relative5(resolve6(root), resolve6(candidate));
20926
20962
  return path === "" || !isAbsolute3(path) && path !== ".." && !path.startsWith(`..${sep3}`);
@@ -21003,7 +21039,7 @@ var ensureAbsoluteBundletool = async (options) => {
21003
21039
  if (!options.approved)
21004
21040
  throw new TypeError(`Bundletool ${ABSOLUTE_BUNDLETOOL_VERSION} is required. Rerun with --yes to download the checksum-pinned official release.`);
21005
21041
  const bytes = await (options.download ?? defaultDownload)(ABSOLUTE_BUNDLETOOL_URL);
21006
- const digest = createHash3("sha256").update(bytes).digest("hex");
21042
+ const digest = createHash4("sha256").update(bytes).digest("hex");
21007
21043
  if (digest !== ABSOLUTE_BUNDLETOOL_SHA256)
21008
21044
  throw new TypeError("Downloaded Bundletool failed checksum verification.");
21009
21045
  await mkdir8(dirname8(inspected.path), { recursive: true });
@@ -21126,6 +21162,11 @@ var runAbsoluteAndroidReleaseAcceptance = async (options) => {
21126
21162
  if (options.release.metadata.versionCode !== undefined && installed.versionCode !== options.release.metadata.versionCode)
21127
21163
  throw new Error(`Installed Android versionCode ${installed.versionCode ?? "unknown"} does not match release ${options.release.metadata.versionCode}.`);
21128
21164
  await requireSuccess(run, adb(options.adb, options.serial, "logcat", "-c"), "Android release log isolation");
21165
+ await waitForAbsoluteAndroidNetworkServices({
21166
+ adb: options.adb,
21167
+ run,
21168
+ serial: options.serial
21169
+ });
21129
21170
  const [wifi, mobile] = await Promise.all([
21130
21171
  requireSuccess(run, adb(options.adb, options.serial, "shell", "settings", "get", "global", "wifi_on"), "Android Wi-Fi state inspection"),
21131
21172
  requireSuccess(run, adb(options.adb, options.serial, "shell", "settings", "get", "global", "mobile_data"), "Android mobile-data state inspection")
@@ -21172,7 +21213,7 @@ var runAbsoluteAndroidReleaseAcceptance = async (options) => {
21172
21213
  };
21173
21214
 
21174
21215
  // src/mobile/iosReleaseAcceptance.ts
21175
- import { createHash as createHash4 } from "crypto";
21216
+ import { createHash as createHash5 } from "crypto";
21176
21217
  import {
21177
21218
  access as access7,
21178
21219
  mkdir as mkdir9,
@@ -21275,7 +21316,7 @@ var exists3 = async (path) => {
21275
21316
  return false;
21276
21317
  }
21277
21318
  };
21278
- var sha2562 = async (path) => createHash4("sha256").update(await readFile12(path)).digest("hex");
21319
+ var sha2562 = async (path) => createHash5("sha256").update(await readFile12(path)).digest("hex");
21279
21320
  var inside2 = (root, candidate) => {
21280
21321
  const path = relative6(resolve7(root), resolve7(candidate));
21281
21322
  return path === "" || !isAbsolute4(path) && path !== ".." && !path.startsWith(`..${sep4}`);
@@ -22184,7 +22225,7 @@ var createAbsoluteAndroidTestReport = (options) => {
22184
22225
  };
22185
22226
 
22186
22227
  // src/mobile/releaseCertification.ts
22187
- import { createHash as createHash5 } from "crypto";
22228
+ import { createHash as createHash6 } from "crypto";
22188
22229
  import {
22189
22230
  access as access8,
22190
22231
  mkdir as mkdir11,
@@ -22221,7 +22262,7 @@ var exists4 = async (path) => {
22221
22262
  return false;
22222
22263
  }
22223
22264
  };
22224
- var sha2563 = (bytes) => createHash5("sha256").update(bytes).digest("hex");
22265
+ var sha2563 = (bytes) => createHash6("sha256").update(bytes).digest("hex");
22225
22266
  var requireString3 = (value, name) => {
22226
22267
  if (typeof value !== "string" || !value)
22227
22268
  throw new TypeError(`Mobile certification ${name} is invalid.`);
@@ -24512,7 +24553,7 @@ var readAbsoluteMobilePromotionOperation = async (projectRoot, requestedDispatch
24512
24553
  var relativeAbsoluteMobilePromotionOperationPath = (projectRoot, dispatchIdValue) => relative13(resolve14(projectRoot), absoluteMobilePromotionOperationPath(projectRoot, dispatchIdValue)).replaceAll("\\", "/");
24513
24554
 
24514
24555
  // src/mobile/updateSigning.ts
24515
- import { createHash as createHash6, sign, verify } from "crypto";
24556
+ import { createHash as createHash7, sign, verify } from "crypto";
24516
24557
  import {
24517
24558
  cp,
24518
24559
  mkdir as mkdir16,
@@ -24527,7 +24568,7 @@ import {
24527
24568
  import { dirname as dirname14, join as join17, relative as relative14, resolve as resolve15 } from "path";
24528
24569
  var UPDATE_MANIFEST_FILE = "update.json";
24529
24570
  var UPDATE_FILES_DIRECTORY = "files";
24530
- var sha2564 = (value) => createHash6("sha256").update(value).digest("hex");
24571
+ var sha2564 = (value) => createHash7("sha256").update(value).digest("hex");
24531
24572
  var listFiles = async (root, directory = root) => {
24532
24573
  const entries = await readdir8(directory, { withFileTypes: true });
24533
24574
  const paths = await Promise.all(entries.map(async (entry) => {
@@ -25646,7 +25687,7 @@ var dispatchGithubMobilePromotion = async (args) => {
25646
25687
  auditOutputDirectory,
25647
25688
  auditRequested,
25648
25689
  certificationId: certification.certificationId,
25649
- certificationSha256: createHash7("sha256").update(serializeAbsoluteMobileReleaseCertification(certification)).digest("hex"),
25690
+ certificationSha256: createHash8("sha256").update(serializeAbsoluteMobileReleaseCertification(certification)).digest("hex"),
25650
25691
  channel: channel || null,
25651
25692
  dispatchId: dispatchId3,
25652
25693
  platform: platform2,
@@ -1,8 +1,8 @@
1
1
  // @bun
2
2
  import {
3
3
  start
4
- } from "./index-5fmgn0nx.js";
5
- import"./index-6mbm4n3g.js";
4
+ } from "./index-vjepnxr0.js";
5
+ import"./index-82wpxhvv.js";
6
6
  import"./index-bzs19w3r.js";
7
7
  import"./index-s2tazax7.js";
8
8
  import"./index-fc9vxw56.js";
@@ -11,7 +11,7 @@ import"./index-06cmrcdq.js";
11
11
  import"./index-9kwmb3c0.js";
12
12
  import"./index-w5vswatm.js";
13
13
  import"./index-exdd5k1g.js";
14
- import"./index-dr21p6ae.js";
14
+ import"./index-bhcxtf1x.js";
15
15
  import"./index-ar4gz15x.js";
16
16
  import"./index-t84wxk1p.js";
17
17
  import"./index-wtfnv3n2.js";