@multiplatform.one/store 7.88.7 → 7.88.9
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/dist/cjs/storage/index.tauri.cjs +1 -1
- package/dist/cjs/storage/index.tauri.native.js +1 -1
- package/dist/cjs/storage/index.tauri.native.js.map +1 -1
- package/dist/esm/storage/index.tauri.mjs +1 -1
- package/dist/esm/storage/index.tauri.mjs.map +1 -1
- package/dist/esm/storage/index.tauri.native.js +1 -1
- package/dist/esm/storage/index.tauri.native.js.map +1 -1
- package/package.json +3 -3
- package/src/storage/index.tauri.ts +1 -1
|
@@ -28,7 +28,7 @@ module.exports = __toCommonJS(index_tauri_exports);
|
|
|
28
28
|
var import_plugin_store = require("@tauri-apps/plugin-store");
|
|
29
29
|
let storePromise = null;
|
|
30
30
|
function getStore() {
|
|
31
|
-
|
|
31
|
+
storePromise ??= import_plugin_store.Store.load("store.json");
|
|
32
32
|
return storePromise;
|
|
33
33
|
}
|
|
34
34
|
const storage = {
|
|
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(index_tauri_exports);
|
|
|
30
30
|
var import_plugin_store = require("@tauri-apps/plugin-store");
|
|
31
31
|
var storePromise = null;
|
|
32
32
|
function getStore() {
|
|
33
|
-
|
|
33
|
+
storePromise !== null && storePromise !== void 0 ? storePromise : storePromise = import_plugin_store.Store.load("store.json");
|
|
34
34
|
return storePromise;
|
|
35
35
|
}
|
|
36
36
|
var storage = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","index_tauri_exports","storage","module","exports","import_plugin_store","require","storePromise","getStore","Store","load","getItem","_ref","s","setItem","set","save","removeItem","delete"],"sources":["index.tauri.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_tauri_exports = {};\n__export(index_tauri_exports, {\n storage: () => storage\n});\nmodule.exports = __toCommonJS(index_tauri_exports);\nvar import_plugin_store = require(\"@tauri-apps/plugin-store\");\nvar storePromise = null;\nfunction getStore() {\n
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","index_tauri_exports","storage","module","exports","import_plugin_store","require","storePromise","getStore","Store","load","getItem","_ref","s","setItem","set","save","removeItem","delete"],"sources":["index.tauri.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_tauri_exports = {};\n__export(index_tauri_exports, {\n storage: () => storage\n});\nmodule.exports = __toCommonJS(index_tauri_exports);\nvar import_plugin_store = require(\"@tauri-apps/plugin-store\");\nvar storePromise = null;\nfunction getStore() {\n storePromise !== null && storePromise !== void 0 ? storePromise : storePromise = import_plugin_store.Store.load(\"store.json\");\n return storePromise;\n}\nvar storage = {\n getItem: async function getItem(name) {\n var _ref;\n var s = await getStore();\n return (_ref = await s.get(name)) !== null && _ref !== void 0 ? _ref : null;\n },\n setItem: async function setItem(name, value) {\n var s = await getStore();\n await s.set(name, value);\n await s.save();\n },\n removeItem: async function removeItem(name) {\n var s = await getStore();\n await s.delete(name);\n await s.save();\n }\n};\n//# sourceMappingURL=index.tauri.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIh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MAAM,IAAI,IAAIwB,IAAI,KAAK,KAAK,CAAC,GAAGA,IAAI,GAAG,IAAI;EAC7E,CAAC;EACDE,OAAO,EAAE,eAAeA,OAAOA,CAAC1B,IAAI,EAAEY,KAAK,EAAE;IAC3C,IAAIa,CAAC,GAAG,MAAML,QAAQ,CAAC,CAAC;IACxB,MAAMK,CAAC,CAACE,GAAG,CAAC3B,IAAI,EAAEY,KAAK,CAAC;IACxB,MAAMa,CAAC,CAACG,IAAI,CAAC,CAAC;EAChB,CAAC;EACDC,UAAU,EAAE,eAAeA,UAAUA,CAAC7B,IAAI,EAAE;IAC1C,IAAIyB,CAAC,GAAG,MAAML,QAAQ,CAAC,CAAC;IACxB,MAAMK,CAAC,CAACK,MAAM,CAAC9B,IAAI,CAAC;IACpB,MAAMyB,CAAC,CAACG,IAAI,CAAC,CAAC;EAChB;AACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Store","storePromise","getStore","load","storage","getItem","name","s","get","setItem","value","set","save","removeItem","delete"],"sources":["../../../src/storage/index.tauri.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,KAAA,QAAa;AAGtB,IAAIC,YAAA,GAAsC;AAE1C,SAASC,SAAA,EAA2B;
|
|
1
|
+
{"version":3,"names":["Store","storePromise","getStore","load","storage","getItem","name","s","get","setItem","value","set","save","removeItem","delete"],"sources":["../../../src/storage/index.tauri.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,KAAA,QAAa;AAGtB,IAAIC,YAAA,GAAsC;AAE1C,SAASC,SAAA,EAA2B;EAClCD,YAAA,KAAiBD,KAAA,CAAMG,IAAA,CAAK,YAAY;EACxC,OAAOF,YAAA;AACT;AAEO,MAAMG,OAAA,GAAmB;EAC9BC,OAAA,EAAS,MAAOC,IAAA,IAAiB;IAC/B,MAAMC,CAAA,GAAI,MAAML,QAAA,CAAS;IACzB,OAAQ,OAAMK,CAAA,CAAEC,GAAA,CAAYF,IAAI,MAAM;EACxC;EACAG,OAAA,EAAS,MAAAA,CAAOH,IAAA,EAAcI,KAAA,KAAkB;IAC9C,MAAMH,CAAA,GAAI,MAAML,QAAA,CAAS;IACzB,MAAMK,CAAA,CAAEI,GAAA,CAAIL,IAAA,EAAMI,KAAK;IACvB,MAAMH,CAAA,CAAEK,IAAA,CAAK;EACf;EACAC,UAAA,EAAY,MAAOP,IAAA,IAAiB;IAClC,MAAMC,CAAA,GAAI,MAAML,QAAA,CAAS;IACzB,MAAMK,CAAA,CAAEO,MAAA,CAAOR,IAAI;IACnB,MAAMC,CAAA,CAAEK,IAAA,CAAK;EACf;AACF","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Store } from "@tauri-apps/plugin-store";
|
|
2
2
|
var storePromise = null;
|
|
3
3
|
function getStore() {
|
|
4
|
-
|
|
4
|
+
storePromise !== null && storePromise !== void 0 ? storePromise : storePromise = Store.load("store.json");
|
|
5
5
|
return storePromise;
|
|
6
6
|
}
|
|
7
7
|
var storage = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Store","storePromise","getStore","load","storage","getItem","name","_ref","s","get","setItem","value","set","save","removeItem","delete"],"sources":["../../../src/storage/index.tauri.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,KAAA,QAAa;AAGtB,IAAIC,YAAA,GAAsC;AAE1C,SAASC,SAAA,EAA2B;
|
|
1
|
+
{"version":3,"names":["Store","storePromise","getStore","load","storage","getItem","name","_ref","s","get","setItem","value","set","save","removeItem","delete"],"sources":["../../../src/storage/index.tauri.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,KAAA,QAAa;AAGtB,IAAIC,YAAA,GAAsC;AAE1C,SAASC,SAAA,EAA2B;EAClCD,YAAA,KAAiB,QAAMA,YAAK,KAAY,SAAAA,YAAA,GAAAA,YAAA,GAAAD,KAAA,CAAAG,IAAA;EACxC,OAAOF,YAAA;AACT;AAEO,IAAAG,OAAM;EACXC,OAAA,EAAS,eAAOA,OAAiBA,CAAAC,IAAA;IAC/B,IAAAC,IAAM;IACN,IAAAC,CAAA,GAAQ,MAAMN,QAAc,CAAI;IAClC,QAAAK,IAAA,SAAAC,CAAA,CAAAC,GAAA,CAAAH,IAAA,eAAAC,IAAA,cAAAA,IAAA;EACA;EACEG,OAAA,EAAM,eAAUA,OAASA,CAAAJ,IAAA,EAAAK,KAAA;IACzB,IAAAH,CAAA,GAAQ,MAAIN,QAAM,CAAK;IACvB,MAAMM,CAAA,CAAEI,GAAA,CAAAN,IAAK,EAAAK,KAAA;IACf,MAAAH,CAAA,CAAAK,IAAA;EACA;EACEC,UAAM,EAAI,eAAeA,WAAAR,IAAA;IACzB,IAAAE,CAAA,GAAQ,MAAAN,QAAW;IACnB,MAAMM,CAAA,CAAEO,MAAK,CAAAT,IAAA;IACf,MAAAE,CAAA,CAAAK,IAAA;EACF","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/store",
|
|
3
|
-
"version": "7.88.
|
|
3
|
+
"version": "7.88.9",
|
|
4
4
|
"description": "multiplatform.one TanStack Store with cross-platform persistent storage",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"react-native-mmkv": "^4.3.2"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@multiplatform.one/config": "7.88.
|
|
61
|
-
"@multiplatform.one/test-utils": "7.88.
|
|
60
|
+
"@multiplatform.one/config": "7.88.9",
|
|
61
|
+
"@multiplatform.one/test-utils": "7.88.9",
|
|
62
62
|
"@tamagui/build": "2.7.6",
|
|
63
63
|
"@testing-library/jest-dom": "^7.0.1",
|
|
64
64
|
"@testing-library/react": "^16.3.3",
|
|
@@ -4,7 +4,7 @@ import type { Storage } from "../persist";
|
|
|
4
4
|
let storePromise: Promise<Store> | null = null;
|
|
5
5
|
|
|
6
6
|
function getStore(): Promise<Store> {
|
|
7
|
-
|
|
7
|
+
storePromise ??= Store.load("store.json");
|
|
8
8
|
return storePromise;
|
|
9
9
|
}
|
|
10
10
|
|