@buoy-gg/core 7.0.21 → 7.0.22

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.
@@ -27,12 +27,24 @@ var _sharedUi = require("@buoy-gg/shared-ui");
27
27
  * and reporting it too early.
28
28
  */
29
29
  const REALM_STARTED_AT = Date.now();
30
+
31
+ /**
32
+ * Where this bundle came from, resolved once at module load.
33
+ *
34
+ * Reported so a remote driver can recover the app when the app itself can no
35
+ * longer be asked to: after a fatal render error the React tree is gone, every
36
+ * tool action goes unanswered, and `reloadApp` below is unreachable. The dev
37
+ * server's reload path runs natively and still works — but only for a driver
38
+ * that learned this origin while the app was healthy.
39
+ */
40
+ const DEV_SERVER_ORIGIN = (0, _sharedUi.getDevServerOrigin)();
30
41
  const appSyncAdapter = exports.appSyncAdapter = {
31
- version: 1,
42
+ version: 2,
32
43
  getSnapshot: () => {
33
44
  const strategy = (0, _sharedUi.resolveReloadStrategy)("auto");
34
45
  return {
35
46
  startedAt: REALM_STARTED_AT,
47
+ devServerOrigin: DEV_SERVER_ORIGIN,
36
48
  reload: {
37
49
  available: strategy !== null,
38
50
  strategy
@@ -50,7 +62,8 @@ const appSyncAdapter = exports.appSyncAdapter = {
50
62
  */
51
63
  ping: () => ({
52
64
  ok: true,
53
- startedAt: REALM_STARTED_AT
65
+ startedAt: REALM_STARTED_AT,
66
+ devServerOrigin: DEV_SERVER_ORIGIN
54
67
  }),
55
68
  /**
56
69
  * Reload the app's JS bundle: RN's `DevSettings.reload()` in dev builds,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import { resolveReloadStrategy, scheduleReloadApp } from "@buoy-gg/shared-ui";
3
+ import { getDevServerOrigin, resolveReloadStrategy, scheduleReloadApp } from "@buoy-gg/shared-ui";
4
4
 
5
5
  /**
6
6
  * Sync adapter for the "app" pseudo-tool — device-level capabilities that
@@ -24,12 +24,24 @@ import { resolveReloadStrategy, scheduleReloadApp } from "@buoy-gg/shared-ui";
24
24
  * and reporting it too early.
25
25
  */
26
26
  const REALM_STARTED_AT = Date.now();
27
+
28
+ /**
29
+ * Where this bundle came from, resolved once at module load.
30
+ *
31
+ * Reported so a remote driver can recover the app when the app itself can no
32
+ * longer be asked to: after a fatal render error the React tree is gone, every
33
+ * tool action goes unanswered, and `reloadApp` below is unreachable. The dev
34
+ * server's reload path runs natively and still works — but only for a driver
35
+ * that learned this origin while the app was healthy.
36
+ */
37
+ const DEV_SERVER_ORIGIN = getDevServerOrigin();
27
38
  export const appSyncAdapter = {
28
- version: 1,
39
+ version: 2,
29
40
  getSnapshot: () => {
30
41
  const strategy = resolveReloadStrategy("auto");
31
42
  return {
32
43
  startedAt: REALM_STARTED_AT,
44
+ devServerOrigin: DEV_SERVER_ORIGIN,
33
45
  reload: {
34
46
  available: strategy !== null,
35
47
  strategy
@@ -47,7 +59,8 @@ export const appSyncAdapter = {
47
59
  */
48
60
  ping: () => ({
49
61
  ok: true,
50
- startedAt: REALM_STARTED_AT
62
+ startedAt: REALM_STARTED_AT,
63
+ devServerOrigin: DEV_SERVER_ORIGIN
51
64
  }),
52
65
  /**
53
66
  * Reload the app's JS bundle: RN's `DevSettings.reload()` in dev builds,
@@ -2,6 +2,7 @@ export declare const appSyncAdapter: {
2
2
  version: number;
3
3
  getSnapshot: () => {
4
4
  startedAt: number;
5
+ devServerOrigin: string | null;
5
6
  reload: {
6
7
  available: boolean;
7
8
  strategy: import("@buoy-gg/shared-ui").ResolvedReloadStrategy | null;
@@ -17,6 +18,7 @@ export declare const appSyncAdapter: {
17
18
  ping: () => {
18
19
  ok: boolean;
19
20
  startedAt: number;
21
+ devServerOrigin: string | null;
20
22
  };
21
23
  /**
22
24
  * Reload the app's JS bundle: RN's `DevSettings.reload()` in dev builds,
@@ -1 +1 @@
1
- {"version":3,"file":"appSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../../src/floatingMenu/sync/appSyncAdapter.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,cAAc;;;;;;;;;2BAcF,MAAM,IAAI;;QAE/B;;;;WAIG;;;;;QAEH;;;;;;;;;WASG;6BACkB,OAAO;;;;;;CAY/B,CAAC"}
1
+ {"version":3,"file":"appSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../../src/floatingMenu/sync/appSyncAdapter.ts"],"names":[],"mappings":"AAyCA,eAAO,MAAM,cAAc;;;;;;;;;;2BAeF,MAAM,IAAI;;QAE/B;;;;WAIG;;;;;;QAMH;;;;;;;;;WASG;6BACkB,OAAO;;;;;;CAY/B,CAAC"}
@@ -2,6 +2,7 @@ export declare const appSyncAdapter: {
2
2
  version: number;
3
3
  getSnapshot: () => {
4
4
  startedAt: number;
5
+ devServerOrigin: string | null;
5
6
  reload: {
6
7
  available: boolean;
7
8
  strategy: import("@buoy-gg/shared-ui").ResolvedReloadStrategy | null;
@@ -17,6 +18,7 @@ export declare const appSyncAdapter: {
17
18
  ping: () => {
18
19
  ok: boolean;
19
20
  startedAt: number;
21
+ devServerOrigin: string | null;
20
22
  };
21
23
  /**
22
24
  * Reload the app's JS bundle: RN's `DevSettings.reload()` in dev builds,
@@ -1 +1 @@
1
- {"version":3,"file":"appSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../../src/floatingMenu/sync/appSyncAdapter.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,cAAc;;;;;;;;;2BAcF,MAAM,IAAI;;QAE/B;;;;WAIG;;;;;QAEH;;;;;;;;;WASG;6BACkB,OAAO;;;;;;CAY/B,CAAC"}
1
+ {"version":3,"file":"appSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../../src/floatingMenu/sync/appSyncAdapter.ts"],"names":[],"mappings":"AAyCA,eAAO,MAAM,cAAc;;;;;;;;;;2BAeF,MAAM,IAAI;;QAE/B;;;;WAIG;;;;;;QAMH;;;;;;;;;WASG;6BACkB,OAAO;;;;;;CAY/B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/core",
3
- "version": "7.0.21",
3
+ "version": "7.0.22",
4
4
  "description": "Buoy devtools for React Native — a floating in-app dev menu; every tool streams live to your phone, desktop, and AI agent.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -36,10 +36,10 @@
36
36
  ],
37
37
  "sideEffects": false,
38
38
  "dependencies": {
39
- "@buoy-gg/shared-ui": "^7.0.21",
40
- "@buoy-gg/license": "^7.0.21",
41
- "@buoy-gg/floating-tools-core": "^7.0.21",
42
- "@buoy-gg/floating-tools-react": "^7.0.21"
39
+ "@buoy-gg/license": "^7.0.22",
40
+ "@buoy-gg/shared-ui": "^7.0.22",
41
+ "@buoy-gg/floating-tools-core": "^7.0.22",
42
+ "@buoy-gg/floating-tools-react": "^7.0.22"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": "*",