@usions/sdk 2.25.0 → 2.27.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 +7 -1
- package/package.json +2 -1
- package/src/browser.js +2 -6804
- package/src/modules/cloud.js +3 -2
- package/src/modules/core.js +1 -1
- package/src/modules/game-methods.js +64 -0
- package/src/modules/storage.js +132 -39
- package/types/index.d.ts +59 -1
package/README.md
CHANGED
|
@@ -47,7 +47,13 @@ Usion.user.getToken() // Auth JWT
|
|
|
47
47
|
Usion.user.getProfile() // Promise<{ id, name, avatar }>
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
### Storage (
|
|
50
|
+
### Storage (durable, per-user, per-service)
|
|
51
|
+
|
|
52
|
+
`Usion.storage` is database-backed and survives logout, reinstall, and device
|
|
53
|
+
changes. Host local storage is an offline cache, not the source of truth.
|
|
54
|
+
Values written by SDK versions before 2.27 are imported once on the first
|
|
55
|
+
online storage call. Database acknowledgement is required before
|
|
56
|
+
`set`, `remove`, or `clear` resolves.
|
|
51
57
|
|
|
52
58
|
```javascript
|
|
53
59
|
await Usion.storage.set('highscore', 1500)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usions/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.27.1",
|
|
4
4
|
"description": "Usion Mini App SDK for iframe games and services",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"check:src": "tsc -p tsconfig.src.json"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
42
43
|
"rollup": "^4.0.0",
|
|
43
44
|
"typedoc": "^0.28.19",
|
|
44
45
|
"typedoc-plugin-markdown": "^4.12.0",
|