@capgo/capacitor-fast-sql 8.0.26 → 8.0.30
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/CapgoCapacitorFastSql.podspec +13 -4
- package/README.md +15 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/app/capgo/capacitor/fastsql/CapgoCapacitorFastSqlPlugin.java +1 -1
- package/ios/Sources/CapgoCapacitorFastSqlPlugin/CapgoCapacitorFastSqlPlugin.swift +1 -1
- package/ios/Sources/CapgoCapacitorFastSqlPlugin/SQLDatabase.swift +1 -1
- package/package.json +1 -1
|
@@ -10,10 +10,19 @@ Pod::Spec.new do |s|
|
|
|
10
10
|
s.homepage = package['repository']['url']
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
|
-
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
13
|
s.ios.deployment_target = '15.0'
|
|
15
|
-
s.dependency 'Capacitor'
|
|
16
|
-
s.dependency 'Telegraph', '~> 0.30'
|
|
17
|
-
s.dependency 'SQLCipher', '~> 4.10'
|
|
18
14
|
s.swift_version = '5.1'
|
|
15
|
+
s.default_subspecs = 'Core'
|
|
16
|
+
|
|
17
|
+
s.subspec 'Core' do |ss|
|
|
18
|
+
ss.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
19
|
+
ss.dependency 'Capacitor'
|
|
20
|
+
ss.dependency 'Telegraph', '~> 0.30'
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Optional encryption support. Include this subspec to enable SQLCipher.
|
|
24
|
+
s.subspec 'SQLCipher' do |ss|
|
|
25
|
+
ss.dependency 'CapgoCapacitorFastSql/Core'
|
|
26
|
+
ss.dependency 'SQLCipher', '~> 4.10'
|
|
27
|
+
end
|
|
19
28
|
end
|
package/README.md
CHANGED
|
@@ -103,7 +103,9 @@ Then reference it in your `AndroidManifest.xml`:
|
|
|
103
103
|
</application>
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
## Encryption
|
|
106
|
+
## Encryption
|
|
107
|
+
|
|
108
|
+
### Android
|
|
107
109
|
|
|
108
110
|
Encryption uses [SQLCipher](https://www.zetetic.net/sqlcipher/) and is opt-in. Add the SQLCipher dependency to your **app-level** `build.gradle`:
|
|
109
111
|
|
|
@@ -125,6 +127,18 @@ const db = await FastSQL.connect({
|
|
|
125
127
|
|
|
126
128
|
If SQLCipher is not installed and `encrypted: true` is passed, the plugin returns a clear error message instead of crashing.
|
|
127
129
|
|
|
130
|
+
### iOS
|
|
131
|
+
|
|
132
|
+
SQLCipher is optional on iOS. The plugin builds without it; encryption calls will return `Encryption is not available in this build` unless SQLCipher is installed.
|
|
133
|
+
|
|
134
|
+
To enable encryption via CocoaPods, update your `ios/App/Podfile` after `capacitor install`/`cap sync` to use the SQLCipher subspec:
|
|
135
|
+
|
|
136
|
+
```ruby
|
|
137
|
+
pod 'CapgoCapacitorFastSql/SQLCipher', :path => '../../node_modules/@capgo/capacitor-fast-sql'
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Then run `pod install` in the `ios/App` directory. If you skip this subspec, keep `encrypted: false`.
|
|
141
|
+
|
|
128
142
|
## Web Platform
|
|
129
143
|
|
|
130
144
|
On the web, this plugin uses [sql.js](https://sql.js.org/) (SQLite compiled to WebAssembly) with IndexedDB for persistence.
|
package/android/build.gradle
CHANGED
|
@@ -54,7 +54,7 @@ dependencies {
|
|
|
54
54
|
implementation 'androidx.sqlite:sqlite:2.6.2'
|
|
55
55
|
implementation 'com.google.code.gson:gson:2.13.2'
|
|
56
56
|
implementation 'org.nanohttpd:nanohttpd:2.3.1'
|
|
57
|
-
compileOnly 'net.zetetic:sqlcipher-android:4.14.
|
|
57
|
+
compileOnly 'net.zetetic:sqlcipher-android:4.14.1'
|
|
58
58
|
testImplementation "junit:junit:$junitVersion"
|
|
59
59
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
60
60
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
@@ -19,7 +19,7 @@ import java.util.Map;
|
|
|
19
19
|
@CapacitorPlugin(name = "CapgoCapacitorFastSql")
|
|
20
20
|
public class CapgoCapacitorFastSqlPlugin extends Plugin {
|
|
21
21
|
|
|
22
|
-
private final String pluginVersion = "8.0.
|
|
22
|
+
private final String pluginVersion = "8.0.30";
|
|
23
23
|
|
|
24
24
|
private Map<String, DatabaseConnection> databases = new HashMap<>();
|
|
25
25
|
private SQLHTTPServer server;
|
|
@@ -10,7 +10,7 @@ import SQLite3
|
|
|
10
10
|
*/
|
|
11
11
|
@objc(CapgoCapacitorFastSqlPlugin)
|
|
12
12
|
public class CapgoCapacitorFastSqlPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
13
|
-
private let pluginVersion: String = "8.0.
|
|
13
|
+
private let pluginVersion: String = "8.0.30"
|
|
14
14
|
public let identifier = "CapgoCapacitorFastSqlPlugin"
|
|
15
15
|
public let jsName = "CapgoCapacitorFastSql"
|
|
16
16
|
public let pluginMethods: [CAPPluginMethod] = [
|
|
@@ -270,7 +270,7 @@ extension SQLError: LocalizedError {
|
|
|
270
270
|
case .encryptionKeyMissing:
|
|
271
271
|
return "Encryption key is required when encryption is enabled"
|
|
272
272
|
case .encryptionUnavailable:
|
|
273
|
-
return "Encryption is not available in this build"
|
|
273
|
+
return "Encryption is not available in this build. Add SQLCipher to enable encryption."
|
|
274
274
|
case .encryptionFailed(let message):
|
|
275
275
|
return "Failed to set encryption key: \(message)"
|
|
276
276
|
case .transactionAlreadyActive:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-fast-sql",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.30",
|
|
4
4
|
"description": "High-performance native SQLite plugin with custom protocol for efficient sync operations and IndexedDB replacement",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|