strata-storage 1.5.0 → 1.6.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.
Files changed (38) hide show
  1. package/dist/README.md +116 -0
  2. package/dist/adapters/capacitor/FilesystemAdapter.js +4 -4
  3. package/dist/adapters/capacitor/PreferencesAdapter.js +4 -4
  4. package/dist/adapters/capacitor/SecureAdapter.js +4 -4
  5. package/dist/adapters/capacitor/SqliteAdapter.js +4 -4
  6. package/dist/adapters/capacitor/index.js +4 -4
  7. package/dist/adapters/web/CacheAdapter.js +3 -3
  8. package/dist/adapters/web/CookieAdapter.js +2 -2
  9. package/dist/adapters/web/IndexedDBAdapter.js +3 -3
  10. package/dist/adapters/web/LocalStorageAdapter.js +3 -3
  11. package/dist/adapters/web/MemoryAdapter.js +2 -2
  12. package/dist/adapters/web/SessionStorageAdapter.js +1 -1
  13. package/dist/adapters/web/index.js +6 -6
  14. package/dist/android/src/main/java/com/strata/storage/EncryptedStorage.java +65 -0
  15. package/dist/android/src/main/java/com/strata/storage/SQLiteStorage.java +147 -0
  16. package/dist/android/src/main/java/com/strata/storage/SharedPreferencesStorage.java +74 -0
  17. package/dist/android/src/main/java/com/stratastorage/StrataStoragePlugin.java +256 -0
  18. package/dist/core/AdapterRegistry.js +1 -1
  19. package/dist/core/BaseAdapter.js +3 -3
  20. package/dist/core/StorageStrategy.js +1 -0
  21. package/dist/core/Strata.js +17 -17
  22. package/dist/features/compression.js +1 -1
  23. package/dist/features/encryption.d.ts.map +1 -1
  24. package/dist/features/encryption.js +6 -5
  25. package/dist/features/sync.js +1 -1
  26. package/dist/features/ttl.js +1 -1
  27. package/dist/index.js +24 -24
  28. package/dist/ios/Plugin/KeychainStorage.swift +87 -0
  29. package/dist/ios/Plugin/SQLiteStorage.swift +167 -0
  30. package/dist/ios/Plugin/StrataStoragePlugin.swift +204 -0
  31. package/dist/ios/Plugin/UserDefaultsStorage.swift +44 -0
  32. package/dist/package.json +14 -4
  33. package/dist/plugin/index.js +2 -2
  34. package/package.json +8 -26
  35. package/scripts/build.js +119 -14
  36. package/scripts/cli.js +6 -2
  37. package/scripts/configure.js +7 -3
  38. package/scripts/postinstall.js +6 -2
package/scripts/cli.js CHANGED
@@ -5,8 +5,12 @@
5
5
  * Main entry point for npx commands
6
6
  */
7
7
 
8
- const path = require('path');
9
- const { spawn } = require('child_process');
8
+ import path from 'path';
9
+ import { spawn } from 'child_process';
10
+ import { fileURLToPath } from 'url';
11
+
12
+ const __filename = fileURLToPath(import.meta.url);
13
+ const __dirname = path.dirname(__filename);
10
14
 
11
15
  // Get command from arguments
12
16
  const command = process.argv[2];
@@ -5,9 +5,13 @@
5
5
  * Usage: npx strata-storage configure
6
6
  */
7
7
 
8
- const fs = require('fs');
9
- const path = require('path');
10
- const { execSync } = require('child_process');
8
+ import fs from 'fs';
9
+ import path from 'path';
10
+ import { execSync } from 'child_process';
11
+ import { fileURLToPath } from 'url';
12
+
13
+ const __filename = fileURLToPath(import.meta.url);
14
+ const __dirname = path.dirname(__filename);
11
15
 
12
16
  // Colors for terminal output
13
17
  const colors = {
@@ -1,7 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const fs = require('fs');
4
- const path = require('path');
3
+ import fs from 'fs';
4
+ import path from 'path';
5
+ import { fileURLToPath } from 'url';
6
+
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = path.dirname(__filename);
5
9
 
6
10
  console.log('\nšŸš€ Strata Storage - Zero Dependencies, Infinite Possibilities!\n');
7
11