From a7a9b2646b41c8bf5e0e2a39081905881b33a66b Mon Sep 17 00:00:00 2001 From: Gokulvarthan Ramesh Date: Wed, 17 Dec 2025 11:15:46 +0530 Subject: [PATCH] build: include bob lib output --- lib/module/NativeBplScale.js | 8 ++++++ lib/module/NativeBplScale.js.map | 1 + lib/module/index.js | 28 +++++++++++++++++++ lib/module/index.js.map | 1 + lib/module/package.json | 1 + lib/typescript/package.json | 1 + .../src/NativeBPLScale.d.ts | 7 +++++ .../src/NativeBPLScale.d.ts.map | 1 + .../react-native-bpl-scale/src/index.d.ts | 2 ++ .../react-native-bpl-scale/src/index.d.ts.map | 1 + lib/typescript/src/NativeBplScale.d.ts | 10 +++++++ lib/typescript/src/NativeBplScale.d.ts.map | 1 + lib/typescript/src/index.d.ts | 17 +++++++++++ lib/typescript/src/index.d.ts.map | 1 + 14 files changed, 80 insertions(+) create mode 100644 lib/module/NativeBplScale.js create mode 100644 lib/module/NativeBplScale.js.map create mode 100644 lib/module/index.js create mode 100644 lib/module/index.js.map create mode 100644 lib/module/package.json create mode 100644 lib/typescript/package.json create mode 100644 lib/typescript/react-native-bpl-scale/src/NativeBPLScale.d.ts create mode 100644 lib/typescript/react-native-bpl-scale/src/NativeBPLScale.d.ts.map create mode 100644 lib/typescript/react-native-bpl-scale/src/index.d.ts create mode 100644 lib/typescript/react-native-bpl-scale/src/index.d.ts.map create mode 100644 lib/typescript/src/NativeBplScale.d.ts create mode 100644 lib/typescript/src/NativeBplScale.d.ts.map create mode 100644 lib/typescript/src/index.d.ts create mode 100644 lib/typescript/src/index.d.ts.map diff --git a/lib/module/NativeBplScale.js b/lib/module/NativeBplScale.js new file mode 100644 index 0000000..2f7fe7a --- /dev/null +++ b/lib/module/NativeBplScale.js @@ -0,0 +1,8 @@ +"use strict"; + +import { NativeModules } from 'react-native'; +const { + BplScale +} = NativeModules; +export default BplScale; +//# sourceMappingURL=NativeBplScale.js.map \ No newline at end of file diff --git a/lib/module/NativeBplScale.js.map b/lib/module/NativeBplScale.js.map new file mode 100644 index 0000000..3416361 --- /dev/null +++ b/lib/module/NativeBplScale.js.map @@ -0,0 +1 @@ +{"version":3,"names":["NativeModules","BplScale"],"sourceRoot":"..\\..\\src","sources":["NativeBplScale.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,cAAc;AAY5C,MAAM;EAAEC;AAAS,CAAC,GAAGD,aAAa;AAElC,eAAeC,QAAQ","ignoreList":[]} diff --git a/lib/module/index.js b/lib/module/index.js new file mode 100644 index 0000000..f470245 --- /dev/null +++ b/lib/module/index.js @@ -0,0 +1,28 @@ +"use strict"; + +import { NativeModules, Platform } from 'react-native'; +const { + BplScale +} = NativeModules; + +/** + * Scan BLE devices and return weight and impedance. + * @param scanDurationMs Duration of scan in milliseconds + * @returns Promise resolving to a list of BLE devices with weight & impedance + */ +export const scanDevices = async scanDurationMs => { + if (Platform.OS !== 'android') { + throw new Error('BplScale module is only supported on Android.'); + } + try { + const devices = await BplScale.scanDevices(scanDurationMs); + return devices; + } catch (error) { + console.error('BLE Scan Error:', error); + throw error; + } +}; +export default { + scanDevices +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/module/index.js.map b/lib/module/index.js.map new file mode 100644 index 0000000..b56516a --- /dev/null +++ b/lib/module/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["NativeModules","Platform","BplScale","scanDevices","scanDurationMs","OS","Error","devices","error","console"],"sourceRoot":"..\\..\\src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAatD,MAAM;EAAEC;AAAS,CAAC,GAAGF,aAAiD;;AAEtE;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,WAAW,GAAG,MAAOC,cAAsB,IAA2B;EACjF,IAAIH,QAAQ,CAACI,EAAE,KAAK,SAAS,EAAE;IAC7B,MAAM,IAAIC,KAAK,CAAC,+CAA+C,CAAC;EAClE;EAEA,IAAI;IACF,MAAMC,OAAO,GAAG,MAAML,QAAQ,CAACC,WAAW,CAACC,cAAc,CAAC;IAC1D,OAAOG,OAAO;EAChB,CAAC,CAAC,OAAOC,KAAK,EAAE;IACdC,OAAO,CAACD,KAAK,CAAC,iBAAiB,EAAEA,KAAK,CAAC;IACvC,MAAMA,KAAK;EACb;AACF,CAAC;AAED,eAAe;EACbL;AACF,CAAC","ignoreList":[]} diff --git a/lib/module/package.json b/lib/module/package.json new file mode 100644 index 0000000..089153b --- /dev/null +++ b/lib/module/package.json @@ -0,0 +1 @@ +{"type":"module"} diff --git a/lib/typescript/package.json b/lib/typescript/package.json new file mode 100644 index 0000000..089153b --- /dev/null +++ b/lib/typescript/package.json @@ -0,0 +1 @@ +{"type":"module"} diff --git a/lib/typescript/react-native-bpl-scale/src/NativeBPLScale.d.ts b/lib/typescript/react-native-bpl-scale/src/NativeBPLScale.d.ts new file mode 100644 index 0000000..89f3547 --- /dev/null +++ b/lib/typescript/react-native-bpl-scale/src/NativeBPLScale.d.ts @@ -0,0 +1,7 @@ +import type { TurboModule } from 'react-native'; +export interface Spec extends TurboModule { + hello(name: string): string; +} +declare const _default: Spec; +export default _default; +//# sourceMappingURL=NativeBPLScale.d.ts.map \ No newline at end of file diff --git a/lib/typescript/react-native-bpl-scale/src/NativeBPLScale.d.ts.map b/lib/typescript/react-native-bpl-scale/src/NativeBPLScale.d.ts.map new file mode 100644 index 0000000..d149c9f --- /dev/null +++ b/lib/typescript/react-native-bpl-scale/src/NativeBPLScale.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NativeBPLScale.d.ts","sourceRoot":"","sources":["../../../../react-native-bpl-scale/src/NativeBPLScale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;;AAED,wBAAkE"} \ No newline at end of file diff --git a/lib/typescript/react-native-bpl-scale/src/index.d.ts b/lib/typescript/react-native-bpl-scale/src/index.d.ts new file mode 100644 index 0000000..556851b --- /dev/null +++ b/lib/typescript/react-native-bpl-scale/src/index.d.ts @@ -0,0 +1,2 @@ +export { default } from './NativeBPLScale'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/react-native-bpl-scale/src/index.d.ts.map b/lib/typescript/react-native-bpl-scale/src/index.d.ts.map new file mode 100644 index 0000000..f4e2504 --- /dev/null +++ b/lib/typescript/react-native-bpl-scale/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../react-native-bpl-scale/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/lib/typescript/src/NativeBplScale.d.ts b/lib/typescript/src/NativeBplScale.d.ts new file mode 100644 index 0000000..24d5cd9 --- /dev/null +++ b/lib/typescript/src/NativeBplScale.d.ts @@ -0,0 +1,10 @@ +export interface NativeBplScale { + startDiscovery(): void; + cancelDiscovery(): void; + getBondedDevices(): Promise; + parseBluetoothScaleData(data: string): any; + scanDevices(scanDurationMs: number): Promise; +} +declare const _default: NativeBplScale; +export default _default; +//# sourceMappingURL=NativeBplScale.d.ts.map \ No newline at end of file diff --git a/lib/typescript/src/NativeBplScale.d.ts.map b/lib/typescript/src/NativeBplScale.d.ts.map new file mode 100644 index 0000000..4e1d624 --- /dev/null +++ b/lib/typescript/src/NativeBplScale.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NativeBplScale.d.ts","sourceRoot":"","sources":["../../../src/NativeBplScale.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC7B,cAAc,IAAI,IAAI,CAAC;IACvB,eAAe,IAAI,IAAI,CAAC;IACxB,gBAAgB,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACnC,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC;IAG3C,WAAW,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;CACrD;wBAI0B,cAAc;AAAzC,wBAA0C"} \ No newline at end of file diff --git a/lib/typescript/src/index.d.ts b/lib/typescript/src/index.d.ts new file mode 100644 index 0000000..9ce1db9 --- /dev/null +++ b/lib/typescript/src/index.d.ts @@ -0,0 +1,17 @@ +export type BLEDevice = { + name: string; + address: string; + weight: number; + impedance: number; +}; +/** + * Scan BLE devices and return weight and impedance. + * @param scanDurationMs Duration of scan in milliseconds + * @returns Promise resolving to a list of BLE devices with weight & impedance + */ +export declare const scanDevices: (scanDurationMs: number) => Promise; +declare const _default: { + scanDevices: (scanDurationMs: number) => Promise; +}; +export default _default; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/typescript/src/index.d.ts.map b/lib/typescript/src/index.d.ts.map new file mode 100644 index 0000000..943eb80 --- /dev/null +++ b/lib/typescript/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAQF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAU,gBAAgB,MAAM,KAAG,OAAO,CAAC,SAAS,EAAE,CAY7E,CAAC;;kCAZgD,MAAM,KAAG,OAAO,CAAC,SAAS,EAAE,CAAC;;AAc/E,wBAEE"} \ No newline at end of file