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

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.
@@ -1,8 +1,8 @@
1
1
  // @bun
2
2
  import {
3
3
  start
4
- } from "./index-gps0zk0m.js";
5
- import"./index-dfqzrznk.js";
4
+ } from "./index-5fmgn0nx.js";
5
+ import"./index-6mbm4n3g.js";
6
6
  import"./index-bzs19w3r.js";
7
7
  import"./index-s2tazax7.js";
8
8
  import"./index-fc9vxw56.js";
@@ -10,8 +10,8 @@ import"./index-r8x3839e.js";
10
10
  import"./index-06cmrcdq.js";
11
11
  import"./index-9kwmb3c0.js";
12
12
  import"./index-w5vswatm.js";
13
- import"./index-df2mjbdy.js";
14
- import"./index-0zcebhm4.js";
13
+ import"./index-exdd5k1g.js";
14
+ import"./index-dr21p6ae.js";
15
15
  import"./index-ar4gz15x.js";
16
16
  import"./index-t84wxk1p.js";
17
17
  import"./index-wtfnv3n2.js";
package/dist/index.js CHANGED
@@ -10644,13 +10644,62 @@ __export(exports_config, {
10644
10644
  import { readFileSync as readFileSync11 } from "fs";
10645
10645
  import { resolve as resolve12 } from "path";
10646
10646
  import { createHash as createHash4, createPublicKey, X509Certificate } from "crypto";
10647
- 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, 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) => {
10647
+ 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) => {
10648
10648
  const root = resolve12(projectRoot);
10649
10649
  const path = resolve12(root, value);
10650
10650
  if (path !== root && !path.startsWith(`${root}/`)) {
10651
10651
  throw new TypeError(`${field} must remain inside the project root.`);
10652
10652
  }
10653
10653
  return path;
10654
+ }, normalizeBrandingColor = (value, fallback, field) => {
10655
+ const normalized = (value ?? fallback).trim().toUpperCase();
10656
+ if (!COLOR_PATTERN.test(normalized))
10657
+ throw new TypeError(`${field} must use #RRGGBB hexadecimal notation.`);
10658
+ return normalized;
10659
+ }, normalizeBrandingPath = (projectRoot, value, field) => {
10660
+ const path = resolveProjectPath(projectRoot, requireText(value, field), field);
10661
+ if (!path.toLowerCase().endsWith(".png"))
10662
+ throw new TypeError(`${field} must reference a PNG file.`);
10663
+ return path;
10664
+ }, normalizeBranding = (config, projectRoot) => {
10665
+ const { branding } = config;
10666
+ if (!branding)
10667
+ return;
10668
+ const darkIcon = branding.ios?.darkIcon ? normalizeBrandingPath(projectRoot, branding.ios.darkIcon, "mobile.branding.ios.darkIcon") : undefined;
10669
+ const tintedIcon = branding.ios?.tintedIcon ? normalizeBrandingPath(projectRoot, branding.ios.tintedIcon, "mobile.branding.ios.tintedIcon") : undefined;
10670
+ const logoScale = branding.splash?.logoScale ?? 0.2;
10671
+ if (!Number.isFinite(logoScale) || logoScale < 0.1 || logoScale > 0.4)
10672
+ throw new TypeError("mobile.branding.splash.logoScale must be between 0.1 and 0.4.");
10673
+ return {
10674
+ android: {
10675
+ backgroundColor: normalizeBrandingColor(branding.android?.backgroundColor, "#FFFFFF", "mobile.branding.android.backgroundColor"),
10676
+ ...branding.android?.backgroundImage ? {
10677
+ backgroundImage: normalizeBrandingPath(projectRoot, branding.android.backgroundImage, "mobile.branding.android.backgroundImage")
10678
+ } : {},
10679
+ ...branding.android?.foreground ? {
10680
+ foreground: normalizeBrandingPath(projectRoot, branding.android.foreground, "mobile.branding.android.foreground")
10681
+ } : {},
10682
+ ...branding.android?.monochrome ? {
10683
+ monochrome: normalizeBrandingPath(projectRoot, branding.android.monochrome, "mobile.branding.android.monochrome")
10684
+ } : {}
10685
+ },
10686
+ icon: normalizeBrandingPath(projectRoot, branding.icon, "mobile.branding.icon"),
10687
+ ios: {
10688
+ ...darkIcon ? { darkIcon } : {},
10689
+ ...tintedIcon ? { tintedIcon } : {}
10690
+ },
10691
+ splash: {
10692
+ backgroundColor: normalizeBrandingColor(branding.splash?.backgroundColor, "#FFFFFF", "mobile.branding.splash.backgroundColor"),
10693
+ darkBackgroundColor: normalizeBrandingColor(branding.splash?.darkBackgroundColor, "#111111", "mobile.branding.splash.darkBackgroundColor"),
10694
+ ...branding.splash?.darkImage ? {
10695
+ darkImage: normalizeBrandingPath(projectRoot, branding.splash.darkImage, "mobile.branding.splash.darkImage")
10696
+ } : {},
10697
+ ...branding.splash?.image ? {
10698
+ image: normalizeBrandingPath(projectRoot, branding.splash.image, "mobile.branding.splash.image")
10699
+ } : {},
10700
+ logoScale
10701
+ }
10702
+ };
10654
10703
  }, requireText = (value, field) => {
10655
10704
  const normalized = value.trim();
10656
10705
  if (!normalized)
@@ -11036,11 +11085,13 @@ var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FIN
11036
11085
  const updates = normalizeUpdates(config, productionOrigin, projectRoot);
11037
11086
  const updateServer = normalizeUpdateServer(config, productionOrigin, projectRoot, updates);
11038
11087
  const observability = normalizeObservability(config, productionOrigin);
11088
+ const branding = normalizeBranding(config, projectRoot);
11039
11089
  return {
11040
11090
  androidCertificateFingerprints: normalizeCertificateFingerprints(config.deepLinks?.android?.sha256CertificateFingerprints),
11041
11091
  appId,
11042
11092
  appleAppIdPrefix: normalizeAppleAppIdPrefix(config.deepLinks?.apple?.appIdPrefix),
11043
11093
  appName: requireText(config.appName, "mobile.appName"),
11094
+ ...branding ? { branding } : {},
11044
11095
  bundleDirectory: resolveProjectPath(projectRoot, config.bundleDirectory ?? ".absolutejs/mobile/web", "mobile.bundleDirectory"),
11045
11096
  deepLinkHosts: normalizeHosts(config.deepLinks?.hosts, productionOrigin),
11046
11097
  deepLinkScheme,
@@ -11068,6 +11119,7 @@ var init_config = __esm(() => {
11068
11119
  RELEASE_TARGET_PATTERN = /^[a-z0-9][a-z0-9._-]{0,63}$/u;
11069
11120
  UPDATE_PUBLIC_KEY_PATTERN = /^[A-Za-z0-9+/]+={0,2}$/u;
11070
11121
  ENVIRONMENT_NAME_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/u;
11122
+ COLOR_PATTERN = /^#[0-9A-F]{6}$/u;
11071
11123
  MINUTE_MS = 60 * 1000;
11072
11124
  DEFAULT_UPDATE_ROLLOUT_STAGES = [
11073
11125
  { minimumReports: 20, observationMinutes: 60, rollout: 0.05 },
@@ -45649,5 +45701,5 @@ export {
45649
45701
  wrapPageHandlerWithStreamingSlots
45650
45702
  };
45651
45703
 
45652
- //# debugId=35BD5CEBA947237E64756E2164756E21
45704
+ //# debugId=69E962978A5CFCEE64756E2164756E21
45653
45705
  //# sourceMappingURL=index.js.map