@absolutejs/absolute 0.20.0-beta.16 → 0.20.0-beta.17

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.
@@ -8,6 +8,46 @@ import {
8
8
  installCapacitorSyncLifecycle
9
9
  } from "@absolutejs/sync-capacitor";
10
10
  import { installSyncClientRuntimeTransport } from "@absolutejs/sync/client/runtime";
11
+
12
+ // src/mobile/syncRemediation.ts
13
+ import {
14
+ discardSyncRuntimeDeadLetter,
15
+ inspectSyncRuntime,
16
+ rebaseSyncRuntimeDeadLetter,
17
+ retrySyncRuntimeDeadLetter
18
+ } from "@absolutejs/sync/client/runtime";
19
+ var REMEDIATION_REGISTRY = Symbol.for("@absolutejs/mobile-sync-remediation");
20
+ var isRegistry = (value) => typeof value === "object" && value !== null && Array.isArray(Reflect.get(value, "installations"));
21
+ var resolveRegistry = () => {
22
+ const existing = Reflect.get(globalThis, REMEDIATION_REGISTRY);
23
+ if (isRegistry(existing))
24
+ return existing;
25
+ const created = { installations: [] };
26
+ Object.defineProperty(globalThis, REMEDIATION_REGISTRY, {
27
+ configurable: false,
28
+ enumerable: false,
29
+ value: created,
30
+ writable: false
31
+ });
32
+ return created;
33
+ };
34
+ var registry = resolveRegistry();
35
+ var installAbsoluteMobileSyncRemediation = (bridge = {
36
+ discard: discardSyncRuntimeDeadLetter,
37
+ inspect: inspectSyncRuntime,
38
+ rebase: rebaseSyncRuntimeDeadLetter,
39
+ retry: retrySyncRuntimeDeadLetter
40
+ }) => {
41
+ const installation = { bridge };
42
+ registry.installations.push(installation);
43
+ return () => {
44
+ const index = registry.installations.indexOf(installation);
45
+ if (index >= 0)
46
+ registry.installations.splice(index, 1);
47
+ };
48
+ };
49
+
50
+ // src/mobile/shellSync.ts
11
51
  var reloadShell = () => globalThis.location.reload();
12
52
  var ABSOLUTE_MOBILE_SYNC_STATUS_EVENT = "absolute:sync-status";
13
53
  var reportShellStatus = (status) => globalThis.dispatchEvent(new CustomEvent(ABSOLUTE_MOBILE_SYNC_STATUS_EVENT, { detail: status }));
@@ -61,6 +101,7 @@ var installAbsoluteMobileShellSync = (auth, config, options = {}) => {
61
101
  };
62
102
  }
63
103
  });
104
+ const removeRemediation = installAbsoluteMobileSyncRemediation();
64
105
  const reload = options.reload ?? reloadShell;
65
106
  const removePrincipalListener = auth.onPrincipalChange((principal) => {
66
107
  if (principal?.namespace !== namespace)
@@ -72,6 +113,7 @@ var installAbsoluteMobileShellSync = (auth, config, options = {}) => {
72
113
  return;
73
114
  active = false;
74
115
  removePrincipalListener();
116
+ removeRemediation();
75
117
  removeTransport();
76
118
  };
77
119
  };
@@ -1,2 +1,3 @@
1
1
  export * from './client';
2
2
  export * from './pageProtocol';
3
+ export * from './syncRemediation';
@@ -11,6 +11,7 @@ export * from './buildPipeline';
11
11
  export * from './buildRelease';
12
12
  export * from './capacitorBundle';
13
13
  export * from './syncSchema';
14
+ export * from './syncRemediation';
14
15
  export * from './capacitorProject';
15
16
  export * from './config';
16
17
  export * from './client';
@@ -0,0 +1,10 @@
1
+ import { type SyncRuntimeInspection } from '@absolutejs/sync/client/runtime';
2
+ export type AbsoluteMobileSyncRemediation = {
3
+ discard: (operationId: string) => Promise<void>;
4
+ inspect: () => Promise<SyncRuntimeInspection>;
5
+ rebase: (operationId: string, args: unknown) => Promise<string>;
6
+ retry: (operationId: string) => Promise<void>;
7
+ };
8
+ /** Install the native shell's framework-neutral, redacted remediation bridge. */
9
+ export declare const getAbsoluteMobileSyncRemediation: () => AbsoluteMobileSyncRemediation | undefined;
10
+ export declare const installAbsoluteMobileSyncRemediation: (bridge?: AbsoluteMobileSyncRemediation) => () => void;
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "@absolutejs/auth": "0.72.0",
11
11
  "@absolutejs/devices": "0.0.3",
12
12
  "@absolutejs/devices-capacitor": "0.1.3",
13
- "@absolutejs/pwa": "0.12.0",
13
+ "@absolutejs/pwa": "0.13.0",
14
14
  "@capacitor/browser": "8.0.4",
15
15
  "@capacitor/network": "8.0.1",
16
16
  "@capacitor/preferences": "8.0.1",
@@ -26,8 +26,8 @@
26
26
  "devDependencies": {
27
27
  "@absolutejs/manifest": "0.9.0",
28
28
  "@absolutejs/scoped-state": "0.2.2",
29
- "@absolutejs/sync": "2.28.0",
30
- "@absolutejs/sync-capacitor": "0.7.0",
29
+ "@absolutejs/sync": "2.29.0",
30
+ "@absolutejs/sync-capacitor": "0.8.0",
31
31
  "@angular/animations": "21.2.6",
32
32
  "@angular/cdk": "21.2.6",
33
33
  "@angular/common": "21.2.6",
@@ -275,12 +275,12 @@
275
275
  "main": "./dist/index.js",
276
276
  "name": "@absolutejs/absolute",
277
277
  "optionalDependencies": {
278
- "@absolutejs/native-darwin-arm64": "0.20.0-beta.16",
279
- "@absolutejs/native-darwin-x64": "0.20.0-beta.16",
280
- "@absolutejs/native-linux-arm64": "0.20.0-beta.16",
281
- "@absolutejs/native-linux-x64": "0.20.0-beta.16",
282
- "@absolutejs/native-windows-arm64": "0.20.0-beta.16",
283
- "@absolutejs/native-windows-x64": "0.20.0-beta.16"
278
+ "@absolutejs/native-darwin-arm64": "0.20.0-beta.17",
279
+ "@absolutejs/native-darwin-x64": "0.20.0-beta.17",
280
+ "@absolutejs/native-linux-arm64": "0.20.0-beta.17",
281
+ "@absolutejs/native-linux-x64": "0.20.0-beta.17",
282
+ "@absolutejs/native-windows-arm64": "0.20.0-beta.17",
283
+ "@absolutejs/native-windows-x64": "0.20.0-beta.17"
284
284
  },
285
285
  "overrides": {
286
286
  "@sinclair/typebox": "0.34.52",
@@ -290,7 +290,7 @@
290
290
  "typebox": "1.3.16"
291
291
  },
292
292
  "peerDependencies": {
293
- "@absolutejs/sync": ">=2.28.0 <3",
293
+ "@absolutejs/sync": ">=2.29.0 <3",
294
294
  "@angular/animations": "^21.0.0",
295
295
  "@angular/common": "^21.0.0",
296
296
  "@angular/compiler": "^21.0.0",
@@ -491,7 +491,7 @@
491
491
  ]
492
492
  }
493
493
  },
494
- "version": "0.20.0-beta.16",
494
+ "version": "0.20.0-beta.17",
495
495
  "workspaces": [
496
496
  "tests/fixtures/*",
497
497
  "tests/fixtures/_packages/*"