@absolutejs/absolute 0.20.0-beta.100 → 0.20.0-beta.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -203,7 +203,7 @@ if (command === "dev") {
203
203
  sendTelemetryEvent("cli:command", {
204
204
  command: `mobile:${workspaceCommand ?? "unknown"}`
205
205
  });
206
- const { runMobile } = await import("./mobile-qfckt3vc.js");
206
+ const { runMobile } = await import("./mobile-b1mh7ms3.js");
207
207
  try {
208
208
  await runMobile(args);
209
209
  } catch (error) {
@@ -19495,7 +19495,7 @@ var writeAbsoluteMobileUpdateRegistry = async (options) => {
19495
19495
 
19496
19496
  // src/mobile/releaseDoctor.ts
19497
19497
  var ABSOLUTE_MOBILE_COMPLIANCE_REPORT_FORMAT = 1;
19498
- var HMR_ASSET_PATTERN = /(?:__HMR_WS__|hmr-timing|__absolute_target|absolutejs-error-overlay)/u;
19498
+ var HMR_ASSET_PATTERN = /(?:hmr-timing|__absolute_target|absolutejs-error-overlay)/u;
19499
19499
  var RELEASE_ASSET_EXTENSIONS = new Set([".html", ".js", ".mjs"]);
19500
19500
  var EXACT_VERSION_PATTERN = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/u;
19501
19501
  var NOT_FOUND3 = -1;
@@ -19641,12 +19641,48 @@ var expoVersionCheck = async (config) => {
19641
19641
  return fail("mobile.expo-versions", error instanceof Error ? error.message : "Generated Expo dependency versions could not be validated.", manifestPath, "Run `absolute mobile init --yes`, then rebuild the production Expo project.");
19642
19642
  }
19643
19643
  };
19644
+ var dependencyLockAt = async (directory) => (await Promise.all(LOCK_FILES.map(async (name) => ({
19645
+ exists: await pathExists2(join7(directory, name)),
19646
+ name,
19647
+ path: join7(directory, name)
19648
+ })))).find(({ exists: exists2 }) => exists2);
19649
+ var declaredWorkspacePatterns = (declared) => {
19650
+ if (Array.isArray(declared))
19651
+ return declared;
19652
+ if (isRecord3(declared) && Array.isArray(declared.packages))
19653
+ return declared.packages;
19654
+ return [];
19655
+ };
19656
+ var ownsWorkspace = async (directory, projectRoot) => {
19657
+ const manifest = await readJsonObject(join7(directory, "package.json")).catch(() => {
19658
+ return;
19659
+ });
19660
+ const workspacePath = relative3(directory, projectRoot).replace(/\\/gu, "/");
19661
+ return declaredWorkspacePatterns(manifest?.workspaces).some((pattern) => typeof pattern === "string" && new Bun.Glob(pattern).match(workspacePath));
19662
+ };
19663
+ var ancestorDirectories = (projectRoot) => {
19664
+ const directories = [];
19665
+ let directory = projectRoot;
19666
+ while (true) {
19667
+ directories.push(directory);
19668
+ const parent = dirname5(directory);
19669
+ if (parent === directory)
19670
+ return directories;
19671
+ directory = parent;
19672
+ }
19673
+ };
19674
+ var findAbsoluteDependencyLock = async (projectRoot) => {
19675
+ const candidates = await Promise.all(ancestorDirectories(projectRoot).map(async (directory, index) => {
19676
+ const present = await dependencyLockAt(directory);
19677
+ if (!present || index > 0 && !await ownsWorkspace(directory, projectRoot))
19678
+ return;
19679
+ return present;
19680
+ }));
19681
+ return candidates.find((candidate) => candidate !== undefined);
19682
+ };
19644
19683
  var dependencyLockCheck = async (projectRoot) => {
19645
- const present = (await Promise.all(LOCK_FILES.map(async (name) => ({
19646
- exists: await pathExists2(join7(projectRoot, name)),
19647
- name
19648
- })))).find(({ exists: exists2 }) => exists2);
19649
- return present ? pass("mobile.dependency-lock", `Dependency graph is locked by ${present.name}.`, join7(projectRoot, present.name)) : fail("mobile.dependency-lock", "No supported dependency lockfile is present.", projectRoot, "Install dependencies with the project package manager and commit its lockfile before release.");
19684
+ const present = await findAbsoluteDependencyLock(projectRoot);
19685
+ return present ? pass("mobile.dependency-lock", `Dependency graph is locked by ${present.name}.`, present.path) : fail("mobile.dependency-lock", "No supported dependency lockfile is present.", projectRoot, "Install dependencies with the project package manager and commit its lockfile before release.");
19650
19686
  };
19651
19687
  var productionOriginCheck = (config, projectRoot) => {
19652
19688
  const origin = new URL(config.productionOrigin);
@@ -20383,6 +20419,14 @@ var signAab = (artifactPath, capture, jarsigner, signing) => {
20383
20419
  if (result.exitCode !== 0)
20384
20420
  throw new TypeError("jarsigner could not sign the Android App Bundle with the configured CI identity.");
20385
20421
  };
20422
+ var windowsJarsignerPath = (path, capture) => {
20423
+ const result = capture(["wslpath", "-w", path]);
20424
+ const translated = result.stdout.trim();
20425
+ if (result.exitCode !== 0 || !translated) {
20426
+ throw new TypeError(`Could not translate an Android signing path for the Windows JDK: ${path}`);
20427
+ }
20428
+ return translated;
20429
+ };
20386
20430
  var sha256File = async (path) => createHash2("sha256").update(await readFile9(path)).digest("hex");
20387
20431
  var fingerprintExpoAndroidProject = async (nativeDirectory) => {
20388
20432
  const root = await realpath(nativeDirectory);
@@ -20500,13 +20544,19 @@ var buildAbsoluteAndroidRelease = async (options) => {
20500
20544
  throw new TypeError(`Android Gradle did not produce the expected App Bundle: ${artifactPath}`);
20501
20545
  }
20502
20546
  const capture = options.capture ?? defaultCapture;
20503
- const jarsigner = options.jarsigner === undefined ? Bun.which("jarsigner") : options.jarsigner;
20504
- let signed = verifyAabSignature(artifactPath, capture, jarsigner);
20505
- if (signed === false && options.signing) {
20547
+ const jarsigner = options.jarsigner === undefined ? Bun.which("jarsigner") ?? (host === "wsl" || host === "windows" ? Bun.which("jarsigner.exe") : null) : options.jarsigner;
20548
+ const usesWindowsJarsigner = host === "wsl" && jarsigner?.toLowerCase().endsWith(".exe");
20549
+ const signerArtifactPath = usesWindowsJarsigner ? windowsJarsignerPath(artifactPath, capture) : artifactPath;
20550
+ const signing = usesWindowsJarsigner && options.signing ? {
20551
+ ...options.signing,
20552
+ keystorePath: windowsJarsignerPath(options.signing.keystorePath, capture)
20553
+ } : options.signing;
20554
+ let signed = verifyAabSignature(signerArtifactPath, capture, jarsigner);
20555
+ if (signed === false && signing) {
20506
20556
  if (!jarsigner)
20507
20557
  throw new TypeError("Could not sign the Android App Bundle because jarsigner is unavailable.");
20508
- signAab(artifactPath, capture, jarsigner, options.signing);
20509
- signed = verifyAabSignature(artifactPath, capture, jarsigner);
20558
+ signAab(signerArtifactPath, capture, jarsigner, signing);
20559
+ signed = verifyAabSignature(signerArtifactPath, capture, jarsigner);
20510
20560
  if (!signed)
20511
20561
  throw new TypeError("Android App Bundle signature verification failed after CI signing.");
20512
20562
  }
@@ -23375,8 +23425,10 @@ var buildAndroid = async (args, prepareVersionCode) => {
23375
23425
  phaseSuccess = true;
23376
23426
  return result;
23377
23427
  } finally {
23428
+ const durationMs = Math.round(performance.now() - phaseStartedAt);
23429
+ console.log(`[mobile:android-release] ${phase} ${phaseSuccess ? "completed" : "failed"} in ${getDurationString(durationMs)}`);
23378
23430
  sendTelemetryEvent("mobile:android-release-phase", {
23379
- durationMs: Math.round(performance.now() - phaseStartedAt),
23431
+ durationMs,
23380
23432
  engine: mobile.engine,
23381
23433
  host,
23382
23434
  phase,
package/dist/index.js CHANGED
@@ -14450,9 +14450,9 @@ import { basename as basename4, join as join20, relative as relative8, resolve a
14450
14450
  var {Glob: Glob2 } = globalThis.Bun;
14451
14451
  var indexContentCache, resolveDevClientDir = () => {
14452
14452
  const projectRoot = process.cwd();
14453
- const fromSource = resolve18(import.meta.dir, "../dev/client");
14454
- if (existsSync13(fromSource) && fromSource.startsWith(projectRoot)) {
14455
- return fromSource;
14453
+ const fromPackage = resolve18(import.meta.dir, "../dev/client");
14454
+ if (existsSync13(fromPackage)) {
14455
+ return fromPackage;
14456
14456
  }
14457
14457
  const fromNodeModules = resolve18(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
14458
14458
  if (existsSync13(fromNodeModules))
@@ -26524,7 +26524,7 @@ var resolveJsxDevRuntimeCompatPath = () => {
26524
26524
  });
26525
26525
  await rm8(tmpDir, { force: true, recursive: true });
26526
26526
  if (!result.success) {
26527
- console.warn("\u26A0\uFE0F React vendor build had errors:", result.logs);
26527
+ throw new AggregateError(result.logs, "React vendor build failed");
26528
26528
  }
26529
26529
  };
26530
26530
  var init_buildReactVendor = __esm(() => {
@@ -45576,5 +45576,5 @@ export {
45576
45576
  wrapPageHandlerWithStreamingSlots
45577
45577
  };
45578
45578
 
45579
- //# debugId=C8B68CBBBBB0579564756E2164756E21
45579
+ //# debugId=7A4E3666D717CF7264756E2164756E21
45580
45580
  //# sourceMappingURL=index.js.map