@capacitor-community/sqlite 3.4.1-4 → 3.4.2-2

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 CHANGED
@@ -28,15 +28,36 @@
28
28
 
29
29
  ## CAPACITOR 3 (Master)
30
30
 
31
- 🚨 Since release 3.4.1-4 ->> 🚨
32
- MacOS only, databases location for Electron can be set in `the config.config.ts` as followed:
33
- plugins: {
34
- CapacitorSQLite: {
35
- electronMacLocation: "/YOUR_DATABASES_PATH"
31
+ 🚨 Since release 3.4.1 ->> 🚨
32
+ Databases location for Electron can be set in `the config.config.ts` as followed:
33
+
34
+ - for sharing databases between users:
35
+
36
+ ```
37
+ plugins: {
38
+ CapacitorSQLite: {
39
+ electronMacLocation: "/YOUR_DATABASES_PATH",
40
+ electronWindowsLocation: "C:\\ProgramData\\CapacitorDatabases",
41
+ electronLinuxLocation: "/home/CapacitorDatabases"
42
+ }
36
43
  }
37
- }
44
+ ```
45
+
46
+ - for only the user in its Home folder
47
+
48
+ ```
49
+ Plugins: {
50
+ CapacitorSQLite: {
51
+ electronMacLocation: "Databases",
52
+ electronWindowsLocation: "Databases",
53
+ electronLinuxLocation: "Databases"
54
+ }
55
+ }
56
+ ```
57
+
38
58
  For existing databases, YOU MUST COPY old databases to the new location
39
59
  You MUST remove the Electron folder and add it again with
60
+
40
61
  ```
41
62
  npx cap add @capacitor-community/electron
42
63
  npm run build
@@ -49,7 +70,8 @@
49
70
  npm run build
50
71
  npx cap copy @capacitor-community/electron
51
72
  npx cap open @capacitor-community/electron
52
- 🚨 Since release 3.4.1-4 <<- 🚨
73
+ ```
74
+ 🚨 Since release 3.4.1 <<- 🚨
53
75
 
54
76
  🚨 Since release 3.4.1-1 ->> 🚨
55
77
 
@@ -159,6 +159,7 @@ public class CapacitorSQLitePlugin extends Plugin {
159
159
  public void run() {
160
160
  try {
161
161
  implementation.changeEncryptionSecret(call, passphrase, oldpassphrase);
162
+ rHandler.retResult(call, null, null);
162
163
  return;
163
164
  } catch (Exception e) {
164
165
  String msg = "ChangeEncryptionSecret: " + e.getMessage();
@@ -2562,9 +2562,10 @@ class UtilsFile {
2562
2562
  * @param directory
2563
2563
  */
2564
2564
  _mkdirSyncRecursive(directory) {
2565
- const path = directory.replace(/\/$/, '').split('/');
2565
+ const sep = this.Path.sep;
2566
+ const path = directory.replace(/\/$/, '').split(sep);
2566
2567
  for (let i = 1; i <= path.length; i++) {
2567
- const segment = path.slice(0, i).join('/');
2568
+ const segment = path.slice(0, i).join(sep);
2568
2569
  segment.length > 0 && !this.NodeFs.existsSync(segment)
2569
2570
  ? this.NodeFs.mkdirSync(segment)
2570
2571
  : null;