@buoy-gg/external-sync 7.0.72 → 7.0.73

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 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getPlatformSpecificURL=void 0;const isAndroidEmulator=()=>{try{const{Platform:t}=require("react-native");if(t.OS!=="android")return false;const e=t.constants?.Fingerprint??"";return/generic|emulator|goldfish|ranchu|sdk_gphone|vbox/i.test(e)}catch{return false}};const getPlatformSpecificURL=(t,e)=>{try{const r=new URL(t);if(e==="android"&&(r.hostname==="localhost"||r.hostname==="127.0.0.1")&&isAndroidEmulator()){r.hostname="10.0.2.2";return r.toString()}return t}catch(r){console.warn("[Buoy]","Error getting platform-specific URL:",r);return t}};exports.getPlatformSpecificURL=getPlatformSpecificURL;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.isEmulatorFingerprint=exports.getPlatformSpecificURL=void 0;const isAndroidEmulator=()=>{try{const{Platform:t}=require("react-native");if(t.OS!=="android")return false;const e=t.constants?.Fingerprint??"";return isEmulatorFingerprint(e)}catch{return false}};const isEmulatorFingerprint=t=>/generic|emulator|goldfish|ranchu|sdk_gphone|sdk_slim|emu64|vbox/i.test(t);exports.isEmulatorFingerprint=isEmulatorFingerprint;const getPlatformSpecificURL=(t,e)=>{try{const r=new URL(t);if(e==="android"&&(r.hostname==="localhost"||r.hostname==="127.0.0.1")&&isAndroidEmulator()){r.hostname="10.0.2.2";return r.toString()}return t}catch(r){console.warn("[Buoy]","Error getting platform-specific URL:",r);return t}};exports.getPlatformSpecificURL=getPlatformSpecificURL;
@@ -1 +1 @@
1
- "use strict";const e=()=>{try{const{Platform:t}=require("react-native");if(t.OS!=="android")return false;const n=t.constants?.Fingerprint??"";return/generic|emulator|goldfish|ranchu|sdk_gphone|vbox/i.test(n)}catch{return false}};export const getPlatformSpecificURL=(t,n)=>{try{const r=new URL(t);if(n==="android"&&(r.hostname==="localhost"||r.hostname==="127.0.0.1")&&e()){r.hostname="10.0.2.2";return r.toString()}return t}catch(r){console.warn("[Buoy]","Error getting platform-specific URL:",r);return t}};
1
+ "use strict";const e=()=>{try{const{Platform:t}=require("react-native");if(t.OS!=="android")return false;const n=t.constants?.Fingerprint??"";return isEmulatorFingerprint(n)}catch{return false}};export const isEmulatorFingerprint=t=>/generic|emulator|goldfish|ranchu|sdk_gphone|sdk_slim|emu64|vbox/i.test(t);export const getPlatformSpecificURL=(t,n)=>{try{const r=new URL(t);if(n==="android"&&(r.hostname==="localhost"||r.hostname==="127.0.0.1")&&e()){r.hostname="10.0.2.2";return r.toString()}return t}catch(r){console.warn("[Buoy]","Error getting platform-specific URL:",r);return t}};
@@ -1,4 +1,10 @@
1
1
  import type { PlatformOS } from "../types";
2
+ /**
3
+ * Build fingerprints of Android emulators. `sdk_slim` / `emu64` are Google's
4
+ * slim test images (ATD), which the Sim Farm runs:
5
+ * "Android/sdk_slim_arm64/emu64a:16/...".
6
+ */
7
+ export declare const isEmulatorFingerprint: (fingerprint: string) => boolean;
2
8
  /**
3
9
  * Get platform-specific URL for socket connection.
4
10
  * On the Android emulator (only), replaces localhost with 10.0.2.2 —
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/external-sync",
3
- "version": "7.0.72",
3
+ "version": "7.0.73",
4
4
  "description": "Generic device-to-desktop sync for Buoy dev tools",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -35,7 +35,7 @@
35
35
  "sideEffects": false,
36
36
  "dependencies": {
37
37
  "socket.io-client": "^4.8.1",
38
- "@buoy-gg/license": "^7.0.72"
38
+ "@buoy-gg/license": "^7.0.73"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": "*"