strata-storage 2.8.2 ā 2.8.4
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/AI-INTEGRATION-GUIDE.md +21 -5
- package/CHANGELOG.md +457 -0
- package/README.md +436 -413
- package/dist/package.json +2 -107
- package/package.json +18 -18
- package/scripts/build.js +18 -56
- package/scripts/postinstall.js +14 -11
- package/dist/README.md +0 -543
package/dist/package.json
CHANGED
|
@@ -1,109 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "strata-storage",
|
|
3
|
-
"version": "2.8.2",
|
|
4
|
-
"description": "Zero-dependency universal storage plugin providing a unified API for all storage operations across web, Android, and iOS platforms",
|
|
5
2
|
"type": "module",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./index.d.ts",
|
|
11
|
-
"default": "./index.js"
|
|
12
|
-
},
|
|
13
|
-
"./capacitor": {
|
|
14
|
-
"types": "./capacitor.d.ts",
|
|
15
|
-
"default": "./capacitor.js"
|
|
16
|
-
},
|
|
17
|
-
"./firebase": {
|
|
18
|
-
"types": "./firebase.d.ts",
|
|
19
|
-
"default": "./firebase.js"
|
|
20
|
-
},
|
|
21
|
-
"./react": {
|
|
22
|
-
"types": "./integrations/react/index.d.ts",
|
|
23
|
-
"default": "./integrations/react/index.js"
|
|
24
|
-
},
|
|
25
|
-
"./vue": {
|
|
26
|
-
"types": "./integrations/vue/index.d.ts",
|
|
27
|
-
"default": "./integrations/vue/index.js"
|
|
28
|
-
},
|
|
29
|
-
"./angular": {
|
|
30
|
-
"types": "./integrations/angular/index.d.ts",
|
|
31
|
-
"default": "./integrations/angular/index.js"
|
|
32
|
-
},
|
|
33
|
-
"./package.json": "./package.json"
|
|
34
|
-
},
|
|
35
|
-
"author": {
|
|
36
|
-
"name": "Ahsan Mahmood",
|
|
37
|
-
"email": "aoneahsan@gmail.com",
|
|
38
|
-
"url": "https://aoneahsan.com"
|
|
39
|
-
},
|
|
40
|
-
"license": "MIT",
|
|
41
|
-
"repository": {
|
|
42
|
-
"type": "git",
|
|
43
|
-
"url": "https://github.com/aoneahsan/strata-storage.git"
|
|
44
|
-
},
|
|
45
|
-
"bugs": {
|
|
46
|
-
"url": "https://stratastorage.aoneahsan.com/contact",
|
|
47
|
-
"email": "aoneahsan@gmail.com"
|
|
48
|
-
},
|
|
49
|
-
"homepage": "https://stratastorage.aoneahsan.com",
|
|
50
|
-
"keywords": [
|
|
51
|
-
"storage",
|
|
52
|
-
"capacitor",
|
|
53
|
-
"ionic",
|
|
54
|
-
"react",
|
|
55
|
-
"vue",
|
|
56
|
-
"angular",
|
|
57
|
-
"localStorage",
|
|
58
|
-
"indexedDB",
|
|
59
|
-
"sqlite",
|
|
60
|
-
"keychain",
|
|
61
|
-
"preferences",
|
|
62
|
-
"zero-dependencies",
|
|
63
|
-
"cross-platform",
|
|
64
|
-
"web",
|
|
65
|
-
"ios",
|
|
66
|
-
"android"
|
|
67
|
-
],
|
|
68
|
-
"peerDependencies": {
|
|
69
|
-
"@angular/core": ">=21.0.6",
|
|
70
|
-
"@angular/forms": ">=21.0.6",
|
|
71
|
-
"@capacitor/core": ">=8.0.0",
|
|
72
|
-
"firebase": ">=10.0.0",
|
|
73
|
-
"react": ">=19.2.3",
|
|
74
|
-
"vue": ">=3.5.26"
|
|
75
|
-
},
|
|
76
|
-
"peerDependenciesMeta": {
|
|
77
|
-
"@angular/core": {
|
|
78
|
-
"optional": true
|
|
79
|
-
},
|
|
80
|
-
"@angular/forms": {
|
|
81
|
-
"optional": true
|
|
82
|
-
},
|
|
83
|
-
"@capacitor/core": {
|
|
84
|
-
"optional": true
|
|
85
|
-
},
|
|
86
|
-
"firebase": {
|
|
87
|
-
"optional": true
|
|
88
|
-
},
|
|
89
|
-
"react": {
|
|
90
|
-
"optional": true
|
|
91
|
-
},
|
|
92
|
-
"vue": {
|
|
93
|
-
"optional": true
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
"capacitor": {
|
|
97
|
-
"ios": {
|
|
98
|
-
"src": "ios"
|
|
99
|
-
},
|
|
100
|
-
"android": {
|
|
101
|
-
"src": "android",
|
|
102
|
-
"androidModule": "strata-storage"
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"sideEffects": false,
|
|
106
|
-
"engines": {
|
|
107
|
-
"node": ">=24.13.0"
|
|
108
|
-
}
|
|
109
|
-
}
|
|
3
|
+
"sideEffects": false
|
|
4
|
+
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "strata-storage",
|
|
3
|
-
"version": "2.8.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.8.4",
|
|
4
|
+
"description": "One storage API across web, iOS and Android ā zero runtime dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "yarn@4.17.0",
|
|
7
7
|
"sideEffects": false,
|
|
8
|
-
"main": "dist/index.js",
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
10
|
"files": [
|
|
11
11
|
"dist/",
|
|
12
12
|
"ios/",
|
|
13
13
|
"android/",
|
|
14
14
|
"scripts/",
|
|
15
15
|
"StrataStorage.podspec",
|
|
16
|
+
"README.md",
|
|
17
|
+
"LICENSE",
|
|
18
|
+
"CHANGELOG.md",
|
|
16
19
|
"AI-INTEGRATION-GUIDE.md",
|
|
17
20
|
"!**/CLAUDE.md",
|
|
18
21
|
"!**/AGENTS.md"
|
|
@@ -58,20 +61,16 @@
|
|
|
58
61
|
"keywords": [
|
|
59
62
|
"storage",
|
|
60
63
|
"capacitor",
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"vue",
|
|
64
|
-
"angular",
|
|
65
|
-
"localStorage",
|
|
66
|
-
"indexedDB",
|
|
64
|
+
"localstorage",
|
|
65
|
+
"indexeddb",
|
|
67
66
|
"sqlite",
|
|
68
67
|
"keychain",
|
|
69
|
-
"preferences",
|
|
70
|
-
"zero-dependencies",
|
|
71
68
|
"cross-platform",
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
69
|
+
"zero-dependencies",
|
|
70
|
+
"react",
|
|
71
|
+
"vue",
|
|
72
|
+
"angular",
|
|
73
|
+
"typescript"
|
|
75
74
|
],
|
|
76
75
|
"author": {
|
|
77
76
|
"name": "Ahsan Mahmood",
|
|
@@ -84,13 +83,14 @@
|
|
|
84
83
|
"license": "MIT",
|
|
85
84
|
"repository": {
|
|
86
85
|
"type": "git",
|
|
87
|
-
"url": "https://github.com/aoneahsan/strata-storage.git"
|
|
86
|
+
"url": "git+https://github.com/aoneahsan/strata-storage.git"
|
|
88
87
|
},
|
|
89
88
|
"bugs": {
|
|
90
|
-
"url": "https://
|
|
89
|
+
"url": "https://github.com/aoneahsan/strata-storage/issues",
|
|
91
90
|
"email": "aoneahsan@gmail.com"
|
|
92
91
|
},
|
|
93
|
-
"homepage": "https://stratastorage.aoneahsan.com",
|
|
92
|
+
"homepage": "https://stratastorage-docs.aoneahsan.com",
|
|
93
|
+
"funding": "https://aoneahsan.com/payment?project-id=strata-storage&project-identifier=strata-storage",
|
|
94
94
|
"peerDependencies": {
|
|
95
95
|
"@angular/core": ">=21.0.6",
|
|
96
96
|
"@angular/forms": ">=21.0.6",
|
package/scripts/build.js
CHANGED
|
@@ -122,9 +122,11 @@ const fixPathAliases = (dir) => {
|
|
|
122
122
|
|
|
123
123
|
fixPathAliases(distDir);
|
|
124
124
|
|
|
125
|
-
// Copy
|
|
125
|
+
// Copy the LICENSE so the build output carries its own licence notice.
|
|
126
|
+
// README.md is deliberately NOT copied: the root README is the published one,
|
|
127
|
+
// and a second copy inside dist/ only doubles the tarball's largest text file.
|
|
126
128
|
console.log('š Copying additional files...');
|
|
127
|
-
const filesToCopy = ['
|
|
129
|
+
const filesToCopy = ['LICENSE'];
|
|
128
130
|
filesToCopy.forEach(file => {
|
|
129
131
|
const srcPath = path.join(rootDir, file);
|
|
130
132
|
const destPath = path.join(distDir, file);
|
|
@@ -133,62 +135,22 @@ filesToCopy.forEach(file => {
|
|
|
133
135
|
}
|
|
134
136
|
});
|
|
135
137
|
|
|
136
|
-
//
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
default: './index.js'
|
|
150
|
-
},
|
|
151
|
-
'./capacitor': {
|
|
152
|
-
types: './capacitor.d.ts',
|
|
153
|
-
default: './capacitor.js'
|
|
154
|
-
},
|
|
155
|
-
'./firebase': {
|
|
156
|
-
types: './firebase.d.ts',
|
|
157
|
-
default: './firebase.js'
|
|
158
|
-
},
|
|
159
|
-
'./react': {
|
|
160
|
-
types: './integrations/react/index.d.ts',
|
|
161
|
-
default: './integrations/react/index.js'
|
|
162
|
-
},
|
|
163
|
-
'./vue': {
|
|
164
|
-
types: './integrations/vue/index.d.ts',
|
|
165
|
-
default: './integrations/vue/index.js'
|
|
166
|
-
},
|
|
167
|
-
'./angular': {
|
|
168
|
-
types: './integrations/angular/index.d.ts',
|
|
169
|
-
default: './integrations/angular/index.js'
|
|
170
|
-
},
|
|
171
|
-
'./package.json': './package.json'
|
|
172
|
-
},
|
|
173
|
-
author: packageJson.author,
|
|
174
|
-
license: packageJson.license,
|
|
175
|
-
repository: packageJson.repository,
|
|
176
|
-
// Carry metadata-only fields through so the dist manifest never drifts from
|
|
177
|
-
// the root manifest (bugs/homepage were previously dropped).
|
|
178
|
-
bugs: packageJson.bugs,
|
|
179
|
-
homepage: packageJson.homepage,
|
|
180
|
-
keywords: packageJson.keywords,
|
|
181
|
-
peerDependencies: packageJson.peerDependencies,
|
|
182
|
-
peerDependenciesMeta: packageJson.peerDependenciesMeta,
|
|
183
|
-
capacitor: packageJson.capacitor,
|
|
184
|
-
sideEffects: false,
|
|
185
|
-
// Mirror the root engines so the published manifest never drifts from it.
|
|
186
|
-
engines: packageJson.engines || { node: '>=18.0.0' }
|
|
187
|
-
};
|
|
188
|
-
|
|
138
|
+
// Marker manifest for dist/ ā NOT a package manifest.
|
|
139
|
+
//
|
|
140
|
+
// š“ It must NEVER carry `name` or `version`. A second manifest declaring
|
|
141
|
+
// `name: "strata-storage"` makes `cd dist && npm publish` succeed and ship the
|
|
142
|
+
// wrong tree under the real package name ā the structural cause of the
|
|
143
|
+
// strata-storage@2.8.2 incident (published from a stale directory, sat as
|
|
144
|
+
// `latest` for 25 days). Without name+version, that publish fails immediately.
|
|
145
|
+
//
|
|
146
|
+
// The two fields below are the only ones that do any work: `type` pins the
|
|
147
|
+
// module format for the emitted .js files, and `sideEffects` keeps bundlers
|
|
148
|
+
// tree-shaking when a consumer deep-imports a file under dist/. Resolution is
|
|
149
|
+
// governed entirely by the root manifest's `exports` map.
|
|
150
|
+
console.log('š Writing dist module marker...');
|
|
189
151
|
fs.writeFileSync(
|
|
190
152
|
path.join(distDir, 'package.json'),
|
|
191
|
-
JSON.stringify(
|
|
153
|
+
JSON.stringify({ type: 'module', sideEffects: false }, null, 2) + '\n'
|
|
192
154
|
);
|
|
193
155
|
|
|
194
156
|
console.log('ā
Build completed successfully!');
|
package/scripts/postinstall.js
CHANGED
|
@@ -7,13 +7,15 @@ import { fileURLToPath } from 'url';
|
|
|
7
7
|
const __filename = fileURLToPath(import.meta.url);
|
|
8
8
|
const __dirname = path.dirname(__filename);
|
|
9
9
|
|
|
10
|
-
console.log('\nš Strata Storage
|
|
10
|
+
console.log('\nš Strata Storage ā one storage API across web, iOS and Android.\n');
|
|
11
11
|
|
|
12
|
+
// Keep this snippet identical to the README's Quick Start. `new Strata()` +
|
|
13
|
+
// `initialize()` still works, but the default instance is the documented entry
|
|
14
|
+
// point and needs no setup call.
|
|
12
15
|
console.log('š Quick Start:');
|
|
13
|
-
console.log(' import {
|
|
14
|
-
console.log('
|
|
15
|
-
console.log(' await storage.
|
|
16
|
-
console.log(' await storage.set("key", "value");\n');
|
|
16
|
+
console.log(' import { storage } from "strata-storage";');
|
|
17
|
+
console.log(' await storage.set("key", "value");');
|
|
18
|
+
console.log(' const value = await storage.get("key");\n');
|
|
17
19
|
|
|
18
20
|
// Check if this is a Capacitor project
|
|
19
21
|
const capacitorConfigPaths = [
|
|
@@ -27,17 +29,18 @@ const isCapacitorProject = capacitorConfigPaths.some(configPath =>
|
|
|
27
29
|
);
|
|
28
30
|
|
|
29
31
|
if (isCapacitorProject) {
|
|
30
|
-
console.log('š± Capacitor
|
|
32
|
+
console.log('š± Capacitor project detected ā native setup is REQUIRED:');
|
|
33
|
+
console.log(' npx cap sync ā without this the native adapters fail on device');
|
|
34
|
+
console.log('');
|
|
31
35
|
console.log(' import { registerCapacitorAdapters } from "strata-storage/capacitor";');
|
|
32
|
-
console.log(' await registerCapacitorAdapters(storage)
|
|
33
|
-
console.log(' Run "yarn cap sync" to sync native code\n');
|
|
36
|
+
console.log(' await registerCapacitorAdapters(storage);\n');
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
console.log('⨠Features:');
|
|
37
|
-
console.log(' ā¢
|
|
40
|
+
console.log(' ⢠One API over 11 storage backends');
|
|
38
41
|
console.log(' ⢠Zero runtime dependencies');
|
|
39
|
-
console.log(' ⢠Optional Capacitor
|
|
40
|
-
console.log(' ā¢
|
|
42
|
+
console.log(' ⢠Optional React / Vue / Angular / Capacitor / Firebase bindings');
|
|
43
|
+
console.log(' ⢠Opt-in encryption, compression, TTL and integrity checks');
|
|
41
44
|
console.log(' ⢠Cross-tab synchronization\n');
|
|
42
45
|
|
|
43
46
|
console.log('š Documentation: https://stratastorage-docs.aoneahsan.com');
|