@absolutejs/absolute 0.20.0-beta.132 → 0.20.0-beta.134

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.
Files changed (30) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/changelog.json +35 -0
  3. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  4. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  5. package/dist/build.js +25 -4
  6. package/dist/build.js.map +5 -5
  7. package/dist/cli/{compile-nf4qsqyd.js → compile-dae4qez4.js} +3 -2
  8. package/dist/cli/{config-3te1fbry.js → config-hy5dkexz.js} +1 -1
  9. package/dist/cli/{dev-6f0gry3y.js → dev-wv69we44.js} +2 -2
  10. package/dist/cli/{index-r915cvqp.js → index-cc8eay5y.js} +79 -157
  11. package/dist/cli/{index-c3tqbpkq.js → index-f0bjr9s0.js} +2 -2
  12. package/dist/cli/{index-hfvxsgf4.js → index-gy8rm8hs.js} +199 -64
  13. package/dist/cli/{index-rrxeqrbn.js → index-t7yf3vxs.js} +8 -0
  14. package/dist/cli/index.js +7 -7
  15. package/dist/cli/{mobile-m0cdh8cf.js → mobile-5tx2cfm5.js} +3 -3
  16. package/dist/cli/{patchedBun-m7vj5sks.js → patchedBun-541bbnee.js} +1 -1
  17. package/dist/cli/{start-3z3gtgm0.js → start-tpebqwc0.js} +3 -3
  18. package/dist/dev/serverBootstrap.js +1 -1
  19. package/dist/index.js +25 -4
  20. package/dist/index.js.map +5 -5
  21. package/dist/mobile/index.js +46 -14
  22. package/dist/mobile/index.js.map +6 -6
  23. package/dist/mobile/remoteMacAgentEntry.js +66 -66
  24. package/dist/mobile/shellBootstrap.js +23 -0
  25. package/dist/src/cli/patchedBun.d.ts +28 -40
  26. package/dist/src/mobile/artifactStore.d.ts +4 -0
  27. package/dist/src/mobile/config.d.ts +4 -0
  28. package/dist/src/mobile/pushDeepLinks.d.ts +16 -0
  29. package/dist/types/build.d.ts +11 -0
  30. package/package.json +2 -1
@@ -1185,6 +1185,26 @@ var http = createAbsoluteHttpClient();
1185
1185
  // src/mobile/shellHttp.ts
1186
1186
  var installAbsoluteMobileShellHttp = (origin, fetch2 = globalThis.fetch) => installAbsoluteHttpTransport(createAbsoluteHttpTransport({ fetch: fetch2, origin, runtime: "native" }));
1187
1187
 
1188
+ // src/mobile/pushDeepLinks.ts
1189
+ import {
1190
+ pushNotifications
1191
+ } from "@absolutejs/devices";
1192
+ var ABSOLUTE_PUSH_DEEP_LINK_KEY = "absoluteDeepLink";
1193
+ var installAbsoluteMobilePushDeepLinks = async (manifest, openDeepLink, source = pushNotifications) => {
1194
+ if (!manifest.deviceCapabilities.includes("pushNotifications"))
1195
+ return;
1196
+ return source.onAction(({ actionId, notification }) => {
1197
+ if (actionId !== "tap")
1198
+ return;
1199
+ const link = notification.data[ABSOLUTE_PUSH_DEEP_LINK_KEY];
1200
+ if (typeof link !== "string" || link.length === 0)
1201
+ return;
1202
+ try {
1203
+ openDeepLink(link);
1204
+ } catch {}
1205
+ });
1206
+ };
1207
+
1188
1208
  // src/mobile/adaptiveShell.ts
1189
1209
  import {
1190
1210
  keyboard,
@@ -7259,6 +7279,9 @@ var startAbsoluteMobileShell = async (options = {}) => {
7259
7279
  dispatchEvent(new Event("absolute:shell-rendered"));
7260
7280
  await options.installUpdates?.(manifest);
7261
7281
  await installDeepLinks(manifest, onNavigate, auth?.redirectUri);
7282
+ await installAbsoluteMobilePushDeepLinks(manifest, (url) => navigateDeepLink(manifest, onNavigate, url, auth?.redirectUri)).catch(() => {
7283
+ return;
7284
+ });
7262
7285
  try {
7263
7286
  await App.addListener("backButton", ({ canGoBack }) => {
7264
7287
  if (uiPrimitives?.requestBack())
@@ -1,28 +1,11 @@
1
- /** The published build: Bun 1.4.0 + the reactFastRefresh backport. The
2
- * checksums are the release's SHASUMS256.txt, pinned so a download that
3
- * differs by one byte is refused. */
1
+ /** The patched build `absolute dev` uses: Bun 1.4.2 + the reactFastRefresh
2
+ * backport, as bvm names it. */
4
3
  export declare const PATCHED_BUN_RELEASE: {
5
4
  readonly bunVersion: "1.4.2";
6
5
  readonly issue: "https://github.com/oven-sh/bun/issues/32919";
7
6
  readonly repo: "absolutejs/patched-bun";
8
- readonly sha256: {
9
- readonly 'bun-darwin-aarch64': "75f45c72eac0c01e579f81ec48c8530bbec72406604c09abdd1fe6947ec4ac05";
10
- readonly 'bun-darwin-x64': "0ad06bff1c847de7a592ecac2e92060dfc8f56361fe92ca52ece8a685cbf416d";
11
- readonly 'bun-freebsd-aarch64': "bbc981e3d890b65e042fbf15128d8499acf11bf29d82b1a15efc07a8d02c424d";
12
- readonly 'bun-freebsd-x64': "344e1cc9b01541ee16b93be9a946d33f9766e235aa95af758e3b7bd9ebccb354";
13
- readonly 'bun-linux-aarch64': "7ad50219c85899ba5d5ffb6728cb128a08f106d99857be7f505ec6b520a2315c";
14
- readonly 'bun-linux-aarch64-android': "699c6eb9a1ffcb6787811729ca8f4812e2f4d8969ac3c0bc6b4cfc8265bfd65c";
15
- readonly 'bun-linux-aarch64-musl': "70089d21421103d03f9bf657bba48beefb22d58b16dd974cd552ea28d1f7c087";
16
- readonly 'bun-linux-x64': "efc724f5c613ae4ae9bb884c067ac8a2b935b959a60082f204b08b4736b531e9";
17
- readonly 'bun-linux-x64-android': "e68a9486017e8a2fa02d0144807e2b48b10db3a09be05ad05b66e3bbf5197610";
18
- readonly 'bun-linux-x64-musl': "86afabbaacca2a652f9eb4821c5163935eac42ee4c966db323c066b95737fdaa";
19
- readonly 'bun-windows-aarch64': "88157fccfac80028c45609d969da819f7ba6d9dafc3c887793188b56d4bf518c";
20
- readonly 'bun-windows-x64': "6dbf24593722d1c94e9c54fafd2087a3e8966aa954f753a565e52522162634c8";
21
- };
22
- readonly tag: "bun-v1.4.2-absolute.1";
7
+ readonly version: "1.4.2-absolute.1";
23
8
  };
24
- export type PatchedBunAsset = keyof typeof PATCHED_BUN_RELEASE.sha256;
25
- type Libc = 'android' | 'glibc' | 'musl';
26
9
  type Choice = 'install' | 'later' | 'never';
27
10
  type Preference = {
28
11
  askAfter: string;
@@ -31,8 +14,8 @@ type Preference = {
31
14
  decision: 'never';
32
15
  };
33
16
  type OfferContext = {
34
- asset: PatchedBunAsset | null;
35
17
  bunVersion: string;
18
+ bvm: boolean;
36
19
  ci: boolean;
37
20
  installed: boolean;
38
21
  interactive: boolean;
@@ -41,18 +24,19 @@ type OfferContext = {
41
24
  supported: boolean;
42
25
  usesReact: boolean;
43
26
  };
44
- type InstallOptions = {
45
- asset?: PatchedBunAsset | null;
46
- /** The expected SHA-256 per asset; the pinned release unless a test swaps it. */
47
- checksums?: Readonly<Record<PatchedBunAsset, string>>;
48
- fetchImpl?: typeof fetch;
49
- home?: string;
50
- log?: (line: string) => void;
27
+ /** The npm package holding bvm's binary for a platform, as
28
+ * @absolutejs/bvm's launcher names it; null where bvm has no build. */
29
+ export declare const bvmPlatformPackage: (platform?: string, arch?: string) => string | null;
30
+ export declare const bvmRunner: (bvm: string) => (args: string[], inherit?: boolean) => {
31
+ status: number | null;
32
+ stdout: string;
51
33
  };
52
- /** The release zip for a platform, named the way Bun names its own. */
53
- export declare const installedPatchedBun: (home?: string) => string | null;
54
- export declare const patchedBunAsset: (platform?: string, arch?: string, libc?: Libc) => "bun-darwin-x64" | "bun-darwin-aarch64" | "bun-linux-x64" | "bun-linux-aarch64" | "bun-linux-x64-musl" | "bun-linux-aarch64-musl" | "bun-windows-x64" | "bun-windows-aarch64" | "bun-freebsd-aarch64" | "bun-freebsd-x64" | "bun-linux-aarch64-android" | "bun-linux-x64-android" | null;
55
- export declare const patchedBunPath: (asset: PatchedBunAsset, home?: string) => string;
34
+ /** Runs bvm; `inherit` streams its progress to the terminal. */
35
+ export type BvmRunner = ReturnType<typeof bvmRunner>;
36
+ /** bvm's binary: the one npm installed with AbsoluteJS, else `bvm` on PATH. */
37
+ export declare const findBvm: () => string | null;
38
+ /** The installed patched build's path, from bvm; null when not installed. */
39
+ export declare const installedPatchedBun: (run?: BvmRunner | null) => string | null;
56
40
  export declare const runtimeSupportsReactFastRefresh: () => boolean;
57
41
  /** Whether `absolute dev` should offer the patched build, and if not, why. */
58
42
  export declare const patchedBunOfferState: (context: OfferContext) => "installed" | "runtime-supports-refresh" | "not-a-react-project" | "unsupported-platform" | "runtime-newer" | "declined" | "asked-recently" | "non-interactive" | "offer";
@@ -62,23 +46,27 @@ export declare const readPatchedBunPreference: (home?: string) => {
62
46
  } | {
63
47
  decision: "never";
64
48
  } | null;
65
- /** Reads one file out of a zip archive (stored or deflated entries). */
66
- export declare const readZipEntry: (archive: Uint8Array, entryName: string) => Uint8Array<ArrayBufferLike>;
67
49
  export declare const writePatchedBunPreference: (preference: Preference | null, home?: string) => void;
68
50
  export declare const PATCHED_BUN_EXPLANATION: string[];
69
- /** Downloads, verifies and installs the patched build; returns its path. */
70
- export declare const installPatchedBun: (options?: InstallOptions) => Promise<string>;
51
+ /** Installs the patched build with bvm (which verifies the release's
52
+ * signature and checksum) and returns its path. */
53
+ export declare const installPatchedBun: (run?: BvmRunner | null) => string;
71
54
  export declare const parsePatchedBunChoice: (answer: string) => Choice | null;
72
- export declare const patchedBunDownloadUrl: (asset: PatchedBunAsset) => string;
73
55
  /** Checks an installed binary really is the patched build. */
74
56
  export declare const verifyPatchedBun: (path: string) => boolean;
57
+ /** Installs with bvm, probes the result, and clears the prompt state and any
58
+ * copy an earlier release kept in ~/.absolutejs/bun. */
59
+ export declare const installVerifiedPatchedBun: (home: string, run: BvmRunner | null, verify?: (path: string) => boolean) => string;
60
+ /** Releases before bvm kept the patched build in ~/.absolutejs/bun. Whoever
61
+ * has one there already chose to install it: move them onto bvm's copy. */
62
+ export declare const migrateLegacyPatchedBun: (home: string, run: BvmRunner | null, verify?: (path: string) => boolean) => string | null;
75
63
  /**
76
- * The Bun executable `absolute dev` runs its server with: the installed
77
- * patched build when there is one, otherwise `bun` from PATH after offering
64
+ * The Bun executable `absolute dev` runs its server with: the patched build
65
+ * bvm installed, when there is one, otherwise `bun` from PATH after offering
78
66
  * the patched build once (Install now / Ask me later / Don't ask again).
79
67
  * Set ABSOLUTE_PATCHED_BUN=0 to always use PATH's bun.
80
68
  */
81
69
  export declare const resolveDevBunExecutable: (projectDir?: string, home?: string) => Promise<string>;
82
70
  /** `absolute bun-patch [status|install|remove|reset]` */
83
- export declare const bunPatch: (args: string[], home?: string) => Promise<void>;
71
+ export declare const bunPatch: (args: string[], home?: string) => void;
84
72
  export {};
@@ -44,4 +44,8 @@ export type AbsoluteMobileCarryForwardInput = {
44
44
  export declare const carryForwardAbsoluteMobileCompatibilityReleases: (input: AbsoluteMobileCarryForwardInput) => Promise<AbsoluteMobileStoredCompatibilityRelease[]>;
45
45
  export declare const createAbsoluteMobileBlobArtifactStore: (options: AbsoluteMobileBlobArtifactStoreOptions) => AbsoluteMobileCompatibilityArtifactStore;
46
46
  export declare const createAbsoluteMobileFileArtifactStore: (options: AbsoluteMobileFileArtifactStoreOptions) => AbsoluteMobileCompatibilityArtifactStore;
47
+ export declare const loadAbsoluteMobileCompatibilityStore: (options: {
48
+ modulePath: string;
49
+ prefix?: string;
50
+ }) => Promise<AbsoluteMobileCompatibilityArtifactStore>;
47
51
  export declare const verifyAbsoluteMobileCompatibilityProducer: (release: AbsoluteMobileStoredCompatibilityRelease, maxProducerBytes?: number) => Promise<AbsoluteMobileStoredCompatibilityRelease>;
@@ -25,6 +25,10 @@ export type NormalizedAbsoluteMobileConfig = {
25
25
  androidCertificateFingerprints: string[];
26
26
  appleAppIdPrefix?: string;
27
27
  bundleDirectory: string;
28
+ compatibilityStore?: {
29
+ modulePath: string;
30
+ prefix?: string;
31
+ };
28
32
  deepLinkHosts: string[];
29
33
  deepLinkScheme?: string;
30
34
  engine: 'capacitor' | 'expo';
@@ -0,0 +1,16 @@
1
+ import { type DevicePushNotificationAction, type DeviceSubscription } from '@absolutejs/devices';
2
+ import type { AbsoluteMobileClientManifest } from './transport';
3
+ /** Data key under which Dispatch's APNs and FCM adapters carry `deepLink`. */
4
+ export declare const ABSOLUTE_PUSH_DEEP_LINK_KEY = "absoluteDeepLink";
5
+ type PushActionSource = {
6
+ onAction: (listener: (action: DevicePushNotificationAction) => void) => Promise<DeviceSubscription>;
7
+ };
8
+ /**
9
+ * Opens a tapped notification's deep link inside the app. The link goes
10
+ * through `openDeepLink`, the shell's own validated deep-link route, so a
11
+ * link outside the configured hosts and scheme is ignored rather than
12
+ * followed. Action buttons other than the notification body are left to the
13
+ * application.
14
+ */
15
+ export declare const installAbsoluteMobilePushDeepLinks: (manifest: Pick<AbsoluteMobileClientManifest, "deviceCapabilities">, openDeepLink: (url: string) => void, source?: PushActionSource) => Promise<DeviceSubscription | undefined>;
16
+ export {};
@@ -199,6 +199,17 @@ type MobileSharedConfig = {
199
199
  };
200
200
  /** Capacitor webDir output. Defaults to `.absolutejs/mobile/web`. */
201
201
  bundleDirectory?: string;
202
+ /** Durable history of mobile releases. Builds keep serving the three most
203
+ * recent releases to installed apps; without a store that history lives
204
+ * only in the build directory, so a fresh checkout (such as CI) starts
205
+ * with none and every installed app is asked to update. */
206
+ compatibility?: {
207
+ /** Project-relative module whose default export is a blob store, such
208
+ * as `awsS3BlobStore` from `@absolutejs/blob/aws-s3`. */
209
+ store: string;
210
+ /** Key prefix inside the store. Defaults to `absolutejs/mobile-compatibility`. */
211
+ prefix?: string;
212
+ };
202
213
  nativeProject?: {
203
214
  /** v1 keeps native projects as committed, editable source. */
204
215
  mode?: 'source';
package/package.json CHANGED
@@ -9,6 +9,7 @@
9
9
  "dependencies": {
10
10
  "@absolutejs/auth": ">=0.75.0 <0.98.0",
11
11
  "@absolutejs/beacon": ">=0.7.0-beta.4 <0.8.0",
12
+ "@absolutejs/bvm": "^0.1.1",
12
13
  "@absolutejs/deploy": "0.27.0",
13
14
  "@absolutejs/devices": "0.7.0",
14
15
  "@absolutejs/devices-capacitor": "0.8.0",
@@ -554,7 +555,7 @@
554
555
  ]
555
556
  }
556
557
  },
557
- "version": "0.20.0-beta.132",
558
+ "version": "0.20.0-beta.134",
558
559
  "workspaces": [
559
560
  "tests/fixtures/*",
560
561
  "tests/fixtures/_packages/*"