@capacitor-community/sqlite 3.4.1-2 → 3.4.1
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/README.md +26 -1
- package/android/src/main/java/com/getcapacitor/community/database/sqlite/CapacitorSQLite.java +14 -6
- package/electron/dist/plugin.js +40 -24
- package/electron/dist/plugin.js.map +1 -1
- package/electron/rollup.config.js +18 -2
- package/ios/Plugin/BiometricIDAuthentication.swift +3 -0
- package/ios/Plugin/CapacitorSQLite.swift +4 -0
- package/ios/Plugin/CapacitorSQLitePlugin.swift +2 -0
- package/package.json +1 -1
|
@@ -12,6 +12,22 @@ export default {
|
|
|
12
12
|
exports: 'named',
|
|
13
13
|
},
|
|
14
14
|
],
|
|
15
|
-
external: [
|
|
16
|
-
|
|
15
|
+
external: [
|
|
16
|
+
'@capacitor/core',
|
|
17
|
+
'electron',
|
|
18
|
+
'sqlite3',
|
|
19
|
+
'path',
|
|
20
|
+
'fs',
|
|
21
|
+
'os',
|
|
22
|
+
'jszip',
|
|
23
|
+
],
|
|
24
|
+
plugins: [
|
|
25
|
+
nodeResolve(),
|
|
26
|
+
commonjs({
|
|
27
|
+
ignoreDynamicRequires: true,
|
|
28
|
+
dynamicRequireTargets: [
|
|
29
|
+
'node_modules/@capacitor-community/sqlite/electron/dist/plugin.js',
|
|
30
|
+
],
|
|
31
|
+
}),
|
|
32
|
+
],
|
|
17
33
|
};
|
|
@@ -44,6 +44,7 @@ class BiometricIDAuthentication {
|
|
|
44
44
|
throw BiometricIDAuthenticationError.biometricType(message: msg)
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
// swiftlint:disable no_space_in_method_call
|
|
47
48
|
func authenticateUser(completion: @escaping (String?) -> Void) {
|
|
48
49
|
let context = LAContext()
|
|
49
50
|
context.touchIDAuthenticationAllowableReuseDuration = 10
|
|
@@ -76,4 +77,6 @@ class BiometricIDAuthentication {
|
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
}
|
|
80
|
+
// swiftlint:enable no_space_in_method_call
|
|
81
|
+
|
|
79
82
|
}
|
|
@@ -26,6 +26,7 @@ enum CapacitorSQLiteError: Error {
|
|
|
26
26
|
|
|
27
27
|
// swiftlint:disable function_body_length
|
|
28
28
|
// swiftlint:disable cyclomatic_complexity
|
|
29
|
+
// swiftlint:disable no_space_in_method_call
|
|
29
30
|
init(config: SqliteConfig) {
|
|
30
31
|
self.config = config
|
|
31
32
|
super.init()
|
|
@@ -97,6 +98,7 @@ enum CapacitorSQLiteError: Error {
|
|
|
97
98
|
isInit = true
|
|
98
99
|
}
|
|
99
100
|
}
|
|
101
|
+
// swiftlint:enable no_space_in_method_call
|
|
100
102
|
// swiftlint:enable cyclomatic_complexity
|
|
101
103
|
// swiftlint:enable function_body_length
|
|
102
104
|
|
|
@@ -160,6 +162,7 @@ enum CapacitorSQLiteError: Error {
|
|
|
160
162
|
// MARK: - ChangeEncryptionSecret
|
|
161
163
|
|
|
162
164
|
// swiftlint:disable function_body_length
|
|
165
|
+
// swiftlint:disable no_space_in_method_call
|
|
163
166
|
@objc public func changeEncryptionSecret(call: CAPPluginCall, passphrase: String,
|
|
164
167
|
oldPassphrase: String) throws {
|
|
165
168
|
if isInit {
|
|
@@ -225,6 +228,7 @@ enum CapacitorSQLiteError: Error {
|
|
|
225
228
|
}
|
|
226
229
|
|
|
227
230
|
}
|
|
231
|
+
// swiftlint:enable no_space_in_method_call
|
|
228
232
|
// swiftlint:enable function_body_length
|
|
229
233
|
|
|
230
234
|
// MARK: - getNCDatabasePath
|
|
@@ -1192,6 +1192,7 @@ public class CapacitorSQLitePlugin: CAPPlugin {
|
|
|
1192
1192
|
|
|
1193
1193
|
// MARK: - Handle Notifications
|
|
1194
1194
|
|
|
1195
|
+
// swiftlint:disable no_space_in_method_call
|
|
1195
1196
|
@objc func importJsonProgress(notification: Notification) {
|
|
1196
1197
|
guard let info = notification.userInfo as? [String: Any] else { return }
|
|
1197
1198
|
DispatchQueue.main.async {
|
|
@@ -1213,6 +1214,7 @@ public class CapacitorSQLitePlugin: CAPPlugin {
|
|
|
1213
1214
|
return
|
|
1214
1215
|
}
|
|
1215
1216
|
}
|
|
1217
|
+
// swiftlint:enable no_space_in_method_call
|
|
1216
1218
|
private func sqliteConfig() -> SqliteConfig {
|
|
1217
1219
|
var config = SqliteConfig()
|
|
1218
1220
|
config.iosIsEncryption = 1
|