@op-engineering/op-sqlite 12.0.2 → 13.0.0
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.
- package/android/CMakeLists.txt +3 -1
- package/android/build.gradle +1 -1
- package/cpp/sqlcipher/sqlite3.c +9802 -5435
- package/cpp/sqlcipher/sqlite3.h +343 -53
- package/op-sqlite.podspec +26 -4
- package/package.json +1 -1
package/op-sqlite.podspec
CHANGED
|
@@ -12,11 +12,33 @@ fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
|
12
12
|
|
|
13
13
|
parent_folder_name = File.basename(__dir__)
|
|
14
14
|
app_package = nil
|
|
15
|
+
package_json_path = nil
|
|
16
|
+
|
|
15
17
|
# When installed on user node_modules lives inside node_modules/@op-engineering/op-sqlite
|
|
16
18
|
if is_user_app
|
|
17
|
-
|
|
19
|
+
current_dir = File.expand_path(__dir__)
|
|
20
|
+
# Move one level up to the parent directory
|
|
21
|
+
current_dir = File.dirname(current_dir)
|
|
22
|
+
|
|
23
|
+
# Find the package.json by searching up through parent directories
|
|
24
|
+
loop do
|
|
25
|
+
package_path = File.join(current_dir, "package.json")
|
|
26
|
+
if File.exist?(package_path)
|
|
27
|
+
package_json_path = package_path
|
|
28
|
+
break
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
parent_dir = File.dirname(current_dir)
|
|
32
|
+
break if parent_dir == current_dir # reached filesystem root
|
|
33
|
+
current_dir = parent_dir
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
raise "package.json not found" if package_json_path.nil?
|
|
37
|
+
|
|
38
|
+
app_package = JSON.parse(File.read(package_json_path))
|
|
18
39
|
# When running on the example app
|
|
19
40
|
else
|
|
41
|
+
package_json_path = File.join(__dir__, "example", "package.json")
|
|
20
42
|
app_package = JSON.parse(File.read(File.join(__dir__, "example", "package.json")))
|
|
21
43
|
end
|
|
22
44
|
|
|
@@ -100,14 +122,14 @@ Pod::Spec.new do |s|
|
|
|
100
122
|
:CLANG_CXX_LANGUAGE_STANDARD => "c++17",
|
|
101
123
|
}
|
|
102
124
|
|
|
103
|
-
log_message.call("[OP-SQLITE] Configuration
|
|
104
|
-
|
|
125
|
+
log_message.call("[OP-SQLITE] Configuration found at #{package_json_path}")
|
|
126
|
+
|
|
105
127
|
exclude_files = []
|
|
106
128
|
|
|
107
129
|
if use_sqlcipher then
|
|
108
130
|
log_message.call("[OP-SQLITE] using SQLCipher 🔒")
|
|
109
131
|
exclude_files += ["cpp/sqlite3.c", "cpp/sqlite3.h", "cpp/libsql/bridge.c", "cpp/libsql/bridge.h", "cpp/libsql/bridge.cpp", "cpp/libsql/libsql.h"]
|
|
110
|
-
xcconfig[:GCC_PREPROCESSOR_DEFINITIONS] += " OP_SQLITE_USE_SQLCIPHER=1 HAVE_FULLFSYNC=1 SQLITE_HAS_CODEC SQLITE_TEMP_STORE=
|
|
132
|
+
xcconfig[:GCC_PREPROCESSOR_DEFINITIONS] += " OP_SQLITE_USE_SQLCIPHER=1 HAVE_FULLFSYNC=1 SQLITE_HAS_CODEC SQLITE_TEMP_STORE=3 SQLITE_EXTRA_INIT=sqlcipher_extra_init SQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown"
|
|
111
133
|
s.dependency "OpenSSL-Universal"
|
|
112
134
|
elsif use_libsql then
|
|
113
135
|
log_message.call("[OP-SQLITE] using libsql 📘")
|