simplejsble 0.0.22 → 0.0.24

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,7 +1,19 @@
1
1
  cmake_minimum_required(VERSION 3.21)
2
2
 
3
- # Path: packages/simplejsble/ios ../../../.. repo root (where simpleble/ lives)
4
- set(PROJECT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)
3
+ # Determine if we're in the SimpleBLE monorepo or npm package
4
+ # In monorepo: packages/simplejsble/ios → ../../../.. has cmake/
5
+ # In npm: node_modules/simplejsble/ios → .. has cmake/ (bundled)
6
+ # This is used by the podspec's prepare_command when building the XCFramework
7
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/prelude.cmake")
8
+ # npm package - bundled cmake
9
+ set(PROJECT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
10
+ elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/prelude.cmake")
11
+ # Monorepo
12
+ set(PROJECT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)
13
+ else()
14
+ message(FATAL_ERROR "Cannot find SimpleBLE cmake files. Checked:\n ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/prelude.cmake\n ${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/prelude.cmake")
15
+ endif()
16
+
5
17
  set(BUILD_SHARED_LIBS OFF) # Static library for iOS
6
18
 
7
19
  include(${PROJECT_ROOT_DIR}/cmake/prelude.cmake)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simplejsble",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "description": "React Native Bluetooth Low Energy library using SimpleBLE with Nitro Modules",
5
5
  "main": "lib/index",
6
6
  "module": "lib/index",
@@ -26,12 +26,13 @@
26
26
  "README.md"
27
27
  ],
28
28
  "scripts": {
29
- "prepack": "node scripts/prepare-package.js",
29
+ "prepack": "npx nitrogen && bash scripts/prepare-package.sh",
30
30
  "typecheck": "tsc --noEmit",
31
31
  "build": "tsc --noEmit false",
32
- "clean": "rm -rf android/build android/.cxx android/.gradle lib",
32
+ "clean": "rm -rf simpleble simpledroidbridge cmake dependencies VERSION nitrogen lib android/build android/.cxx android/.gradle ios/build_iphoneos_arm64 ios/build_iphonesimulator_arm64 ios/simpleble_iphoneos_arm64 ios/simpleble_iphonesimulator_arm64 ios/SimpleBLE.xcframework",
33
33
  "lint": "eslint \"**/*.{js,ts,tsx}\" --fix",
34
34
  "prepublishOnly": "npm run build",
35
+ "postpublish": "npm run clean",
35
36
  "specs": "tsc --noEmit false && nitrogen --logLevel=\"debug\""
36
37
  },
37
38
  "keywords": [
package/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.10.4
package/lib/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import type { Adapter } from "./specs/Adapter.nitro";
2
- export declare const HybridAdapter: Adapter;
package/lib/index.js DELETED
@@ -1,2 +0,0 @@
1
- import { NitroModules } from "react-native-nitro-modules";
2
- export const HybridAdapter = NitroModules.createHybridObject("Adapter");
@@ -1,9 +0,0 @@
1
- import { type HybridObject } from 'react-native-nitro-modules';
2
- export interface Adapter extends HybridObject<{
3
- ios: 'c++';
4
- android: 'c++';
5
- }> {
6
- greet(name: string): string;
7
- get_adapters(): Adapter[];
8
- bluetooth_enabled(): boolean;
9
- }
@@ -1 +0,0 @@
1
- import {} from 'react-native-nitro-modules';