11diff --git a/node_modules/@op-engineering/op-sqlite/android/build.gradle b/node_modules/@op-engineering/op-sqlite/android/build.gradle
2- index d36fd85..7513556 100644
2+ index 7df016d..dc94a38 100644
33--- a/node_modules/@op-engineering/op-sqlite/android/build.gradle
44+++ b/node_modules/@op-engineering/op-sqlite/android/build.gradle
55@@ -1,5 +1,4 @@
@@ -69,7 +69,7 @@ index d36fd85..7513556 100644
6969 println "[OP-SQLITE] using sqlcipher."
7070 } else if(useLibsql) {
7171diff --git a/node_modules/@op-engineering/op-sqlite/android/cpp-adapter.cpp b/node_modules/@op-engineering/op-sqlite/android/cpp-adapter.cpp
72- index 8feaf77..261ec22 100644
72+ index 5912d7b..f2cb85b 100644
7373--- a/node_modules/@op-engineering/op-sqlite/android/cpp-adapter.cpp
7474+++ b/node_modules/@op-engineering/op-sqlite/android/cpp-adapter.cpp
7575@@ -19,8 +19,8 @@ struct OPSQLiteBridge : jni::JavaClass<OPSQLiteBridge> {
@@ -79,7 +79,7 @@ index 8feaf77..261ec22 100644
7979- makeNativeMethod("clearStateNativeJsi",
8080- OPSQLiteBridge::clearStateNativeJsi)});
8181+ makeNativeMethod("clearStateNativeJsi", OPSQLiteBridge::clearStateNativeJsi),
82- + makeNativeMethod("deleteAllDBsJsi", OPSQLiteBridge::deleteAllDBsJsi)});
82+ + makeNativeMethod("deleteAllDBsJsi", OPSQLiteBridge::deleteAllDBsJsi)});
8383 }
8484
8585 private:
@@ -89,7 +89,7 @@ index 8feaf77..261ec22 100644
8989 }
9090+
9191+ static bool deleteAllDBsJsi(jni::alias_ref<jni::JObject> thiz) {
92- + return opsqlite::deleteAllDbs();
92+ + return opsqlite::deleteAllDbs();
9393+ }
9494 };
9595
@@ -118,20 +118,20 @@ index 44f86df..9d9f710 100644
118118 val instance = OPSQLiteBridge()
119119 }
120120diff --git a/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt b/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
121- index 688832f..9ea814b 100644
121+ index 49a01b9..bdfa829 100644
122122--- a/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
123123+++ b/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
124- @@ -13,7 +13,7 @@ import java.io.OutputStream
124+ @@ -12,7 +12,7 @@ import java.io.InputStream
125+ import java.io.OutputStream
125126 import com.facebook.react.util.RNLog;
126127
127- //@ReactModule(name = OPSQLiteModule.NAME)
128128- internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextBaseJavaModule(context) {
129129+ class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextBaseJavaModule(context) {
130130 override fun getName(): String {
131131 return NAME
132132 }
133- @@ -56 ,6 +56,17 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB
134- return true
133+ @@ -54 ,6 +54,16 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB
134+ throw Exception("Do not call getDylibPath on Android")
135135 }
136136
137137+ @ReactMethod(isBlockingSynchronousMethod = true)
@@ -143,16 +143,15 @@ index 688832f..9ea814b 100644
143143+ fun deleteAllDBs() {
144144+ OPSQLiteBridge.instance.deleteAllDBs();
145145+ }
146- +
147146+
148147 @ReactMethod
149148 fun moveAssetsDatabase(args: ReadableMap, promise: Promise) {
150149 val filename = args.getString("filename")!!
151150diff --git a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp
152- index 85710ee..8cf10f2 100644
151+ index eadea09..5701d15 100644
153152--- a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp
154153+++ b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.cpp
155- @@ -889 ,6 +889 ,10 @@ void DBHostObject::invalidate() {
154+ @@ -675 ,6 +675 ,10 @@ void DBHostObject::invalidate() {
156155 #endif
157156 }
158157
@@ -164,23 +163,23 @@ index 85710ee..8cf10f2 100644
164163
165164 } // namespace opsqlite
166165diff --git a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h
167- index cc174b7..ff36f74 100644
166+ index 68a9bc4..142e9d9 100644
168167--- a/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h
169168+++ b/node_modules/@op-engineering/op-sqlite/cpp/DBHostObject.h
170- @@ -73 ,6 +73 ,7 @@ class JSI_EXPORT DBHostObject : public jsi::HostObject {
171- void on_commit();
172- void on_rollback();
173- void invalidate();
174- + void drop();
175- ~DBHostObject() override;
169+ @@ -68 ,6 +68 ,7 @@ public:
170+ void on_commit();
171+ void on_rollback();
172+ void invalidate();
173+ + void drop();
174+ ~DBHostObject() override;
176175
177- private:
178- diff --git a/node_modules/@op-engineering/op-sqlite/cpp/bindings .cpp b/node_modules/@op-engineering/op-sqlite/cpp/bindings .cpp
179- index 5e1c1de..dc21c65 100644
180- --- a/node_modules/@op-engineering/op-sqlite/cpp/bindings .cpp
181- +++ b/node_modules/@op-engineering/op-sqlite/cpp/bindings .cpp
182- @@ -36 ,6 +36 ,13 @@ void invalidate() {
183- dbs.clear();
176+ private:
177+ diff --git a/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite .cpp b/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite .cpp
178+ index e33579a..791fa70 100644
179+ --- a/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite .cpp
180+ +++ b/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite .cpp
181+ @@ -42 ,6 +42 ,13 @@ void invalidate() {
182+ dbs.clear();
184183 }
185184
186185+ bool deleteAllDbs() {
@@ -191,12 +190,12 @@ index 5e1c1de..dc21c65 100644
191190+ }
192191+
193192 void install(jsi::Runtime &rt,
194- const std::shared_ptr<react::CallInvoker> &invoker ,
193+ const std::shared_ptr<react::CallInvoker> &_invoker ,
195194 const char *base_path, const char *crsqlite_path,
196- diff --git a/node_modules/@op-engineering/op-sqlite/cpp/bindings.h b/node_modules/@op-engineering/op-sqlite/cpp/bindings.h
195+ diff --git a/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.hpp b/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.hpp
197196index 91511ab..cc73dfe 100644
198- --- a/node_modules/@op-engineering/op-sqlite/cpp/bindings.h
199- +++ b/node_modules/@op-engineering/op-sqlite/cpp/bindings.h
197+ --- a/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.hpp
198+ +++ b/node_modules/@op-engineering/op-sqlite/cpp/OPSqlite.hpp
200199@@ -14,6 +14,7 @@ void install(jsi::Runtime &rt,
201200 const char *base_path, const char *crsqlite_path,
202201 const char *sqlite_vec_path);
@@ -206,18 +205,33 @@ index 91511ab..cc73dfe 100644
206205
207206 } // namespace opsqlite
208207diff --git a/node_modules/@op-engineering/op-sqlite/op-sqlite.podspec b/node_modules/@op-engineering/op-sqlite/op-sqlite.podspec
209- index 375cc3e..e6fce21 100644
208+ index 32906a2..4a1e452 100644
210209--- a/node_modules/@op-engineering/op-sqlite/op-sqlite.podspec
211210+++ b/node_modules/@op-engineering/op-sqlite/op-sqlite.podspec
212- @@ -1,4 +1,3 @@
211+ @@ -1,12 +1,13 @@
213212- require "json"
214213 require_relative "./generate_tokenizers_header_file"
215214
216215 log_message = lambda do |message|
217- @@ -39,11 +38,10 @@ else
218- app_package = JSON.parse(File.read(File.join(__dir__, "example", "package.json")))
216+ puts "\e[34m#{message}\e[0m"
219217 end
220218
219+ + # NOTE: Disabled as redundant for now, re-enable if needed
220+ # In the sample app the dir is not inside of node_modules
221+ - is_user_app = __dir__.include?("node_modules")
222+ + # is_user_app = __dir__.include?("node_modules")
223+ + is_user_app = false
224+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
225+ app_package = nil
226+ package_json_path = nil
227+ @@ -32,13 +33,13 @@ else
228+ package_json_path = File.join(__dir__, "example", "package.json")
229+ end
230+
231+ - app_package = JSON.parse(File.read(package_json_path))
232+ + # NOTE: Disabled as redundant for now, re-enable if needed
233+ + # app_package = JSON.parse(File.read(package_json_path))
234+
221235- op_sqlite_config = app_package["op-sqlite"]
222236- use_sqlcipher = false
223237+ use_sqlcipher = true
@@ -228,7 +242,7 @@ index 375cc3e..e6fce21 100644
228242 phone_version = false
229243 sqlite_flags = ""
230244 fts5 = false
231- @@ -51 ,37 +49 ,6 @@ rtree = false
245+ @@ -46 ,37 +47 ,6 @@ rtree = false
232246 use_sqlite_vec = false
233247 tokenizers = []
234248
@@ -247,19 +261,19 @@ index 375cc3e..e6fce21 100644
247261-
248262- if phone_version then
249263- if use_sqlcipher then
250- - raise "SQLCipher is not supported with phone version"
264+ - raise "SQLCipher is not supported with phone version. It cannot load extensions. "
251265- end
252266-
253267- if use_crsqlite then
254- - raise "CRSQLite is not supported with phone version"
268+ - raise "CRSQLite is not supported with phone version. It cannot load extensions. "
255269- end
256270-
257271- if rtree then
258- - raise "RTree is not supported with phone version"
272+ - raise "RTree is not supported with phone version. It cannot load extensions. "
259273- end
260274-
261275- if use_sqlite_vec then
262- - raise "SQLite Vec is not supported with phone version"
276+ - raise "SQLite Vec is not supported with phone version. It cannot load extensions. "
263277- end
264278- end
265279-
0 commit comments