@eventvisor/module-localstorage 0.17.0 → 0.19.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.19.0](https://github.com/eventvisor/eventvisor/compare/v0.18.0...v0.19.0) (2026-02-06)
7
+
8
+ **Note:** Version bump only for package @eventvisor/module-localstorage
9
+
10
+
11
+
12
+
13
+
14
+ # [0.18.0](https://github.com/eventvisor/eventvisor/compare/v0.17.0...v0.18.0) (2026-02-06)
15
+
16
+ **Note:** Version bump only for package @eventvisor/module-localstorage
17
+
18
+
19
+
20
+
21
+
6
22
  # [0.17.0](https://github.com/eventvisor/eventvisor/compare/v0.16.0...v0.17.0) (2026-01-10)
7
23
 
8
24
  **Note:** Version bump only for package @eventvisor/module-localstorage
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.EventvisorLocalStorageModule=e():t.EventvisorLocalStorageModule=e()}(this,()=>(()=>{"use strict";var t={};return{166:function(t,e){var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,a){function i(t){try{c(r.next(t))}catch(t){a(t)}}function u(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(i,u)}c((r=r.apply(t,e||[])).next())})},r=this&&this.__generator||function(t,e){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.createLocalStorageModule=function(t){var e=this;void 0===t&&(t={});var o=t.prefix,a=void 0===o?"_eventvisor_":o,i=t.name;return{name:void 0===i?"localstorage":i,lookup:function(t){return n(e,[t],void 0,function(t){var e=t.key;return r(this,function(t){return[2,window.localStorage.getItem(e)]})})},readFromStorage:function(t){return n(e,[t],void 0,function(t){var e,n,o,i=t.key;return r(this,function(t){if(e="".concat(a).concat(i),!(n=window.localStorage.getItem(e)))return[2,null];try{if((o=JSON.parse(n))&&void 0!==o.data)return[2,o.data]}catch(t){return[2,null]}return[2,null]})})},writeToStorage:function(t){return n(e,[t],void 0,function(t){var e,n,o=t.key,i=t.value;return r(this,function(t){return e="".concat(a).concat(o),n=JSON.stringify({data:i}),window.localStorage.setItem(e,n),[2]})})},removeFromStorage:function(t){return n(e,[t],void 0,function(t){var e,n=t.key;return r(this,function(t){return e="".concat(a).concat(n),window.localStorage.removeItem(e),[2]})})}}}}}[166](0,t),t})());
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.EventvisorLocalStorageModule=e():t.EventvisorLocalStorageModule=e()}(this,()=>(()=>{"use strict";var t={};return{166(t,e){var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,a){function i(t){try{c(r.next(t))}catch(t){a(t)}}function u(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(i,u)}c((r=r.apply(t,e||[])).next())})},r=this&&this.__generator||function(t,e){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.createLocalStorageModule=function(t){var e=this;void 0===t&&(t={});var o=t.prefix,a=void 0===o?"_eventvisor_":o,i=t.name;return{name:void 0===i?"localstorage":i,lookup:function(t){return n(e,[t],void 0,function(t){var e=t.key;return r(this,function(t){return[2,window.localStorage.getItem(e)]})})},readFromStorage:function(t){return n(e,[t],void 0,function(t){var e,n,o,i=t.key;return r(this,function(t){if(e="".concat(a).concat(i),!(n=window.localStorage.getItem(e)))return[2,null];try{if((o=JSON.parse(n))&&void 0!==o.data)return[2,o.data]}catch(t){return[2,null]}return[2,null]})})},writeToStorage:function(t){return n(e,[t],void 0,function(t){var e,n,o=t.key,i=t.value;return r(this,function(t){return e="".concat(a).concat(o),n=JSON.stringify({data:i}),window.localStorage.setItem(e,n),[2]})})},removeFromStorage:function(t){return n(e,[t],void 0,function(t){var e,n=t.key;return r(this,function(t){return e="".concat(a).concat(n),window.localStorage.removeItem(e),[2]})})}}}}}[166].call(t,0,t),t})());
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAsC,6BAAID,IAE1CD,EAAmC,6BAAIC,GACxC,CATD,CASGK,KAAM,I,uBCNLC,EAAsB,CAAC,E,miDCI3B,oCAAyCC,GAAzC,gBAAyC,IAAAA,IAAAA,EAAA,IAC/B,MAAmDA,EAAO,OAA1DC,OAAM,IAAG,iBAAc,EAAE,EAA0BD,EAAO,KAElE,MAAO,CACLE,UAHmC,IAAG,iBAAc,EAOpDC,OAAQ,2CAAO,G,IAAEC,EAAG,M,0BAClB,MAAO,CAAP,EAAOC,OAAOC,aAAaC,QAAQH,G,MAGrCI,gBAAiB,2CAAO,G,UAAEJ,EAAG,M,0BAK3B,GAJMK,EAAU,UAAGR,GAAM,OAAGG,KAEtBM,EAAQL,OAAOC,aAAaC,QAAQE,IAGxC,MAAO,CAAP,EAAO,MAGT,IAGE,IAFME,EAAcC,KAAKC,MAAMH,UAEgB,IAArBC,EAAYG,KACpC,MAAO,CAAP,EAAOH,EAAYG,KAGvB,CAAE,MAAOC,GACP,MAAO,CAAP,EAAO,KACT,CAEA,MAAO,CAAP,EAAO,K,MAGTC,eAAgB,2CAAO,G,QAAEZ,EAAG,MAAEM,EAAK,Q,iCAC3BD,EAAU,UAAGR,GAAM,OAAGG,GAEtBa,EAAmBL,KAAKM,UAAU,CACtCJ,KAAMJ,IAGRL,OAAOC,aAAaa,QAAQV,EAASQ,G,SAGvCG,kBAAmB,2CAAO,G,MAAEhB,EAAG,M,iCACvBK,EAAU,UAAGR,GAAM,OAAGG,GAE5BC,OAAOC,aAAae,WAAWZ,G,SAGrC,C,GDtDoB,KAAK,EAAGV,G","sources":["webpack://EventvisorLocalStorageModule/webpack/universalModuleDefinition","webpack://EventvisorLocalStorageModule/webpack/startup","webpack://EventvisorLocalStorageModule/./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"EventvisorLocalStorageModule\"] = factory();\n\telse\n\t\troot[\"EventvisorLocalStorageModule\"] = factory();\n})(this, () => {\nreturn ","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = {};\n__webpack_modules__[166](0, __webpack_exports__);\n","import type { Module } from \"@eventvisor/sdk\";\n\nexport type LocalStorageModuleOptions = {\n name?: string;\n prefix?: string;\n};\n\nexport function createLocalStorageModule(options: LocalStorageModuleOptions = {}): Module {\n const { prefix = \"_eventvisor_\", name = \"localstorage\" } = options;\n\n return {\n name,\n\n // this is different than storage use cases,\n // and prefix is not meant to be used here\n lookup: async ({ key }) => {\n return window.localStorage.getItem(key);\n },\n\n readFromStorage: async ({ key }) => {\n const fullKey = `${prefix}${key}`;\n\n const value = window.localStorage.getItem(fullKey);\n\n if (!value) {\n return null;\n }\n\n try {\n const parsedValue = JSON.parse(value);\n\n if (parsedValue && typeof parsedValue.data !== \"undefined\") {\n return parsedValue.data;\n }\n // eslint-disable-next-line\n } catch (e) {\n return null;\n }\n\n return null;\n },\n\n writeToStorage: async ({ key, value }) => {\n const fullKey = `${prefix}${key}`;\n\n const stringifiedValue = JSON.stringify({\n data: value,\n });\n\n window.localStorage.setItem(fullKey, stringifiedValue);\n },\n\n removeFromStorage: async ({ key }) => {\n const fullKey = `${prefix}${key}`;\n\n window.localStorage.removeItem(fullKey);\n },\n };\n}\n"],"names":["root","factory","exports","module","define","amd","this","__webpack_exports__","options","prefix","name","lookup","key","window","localStorage","getItem","readFromStorage","fullKey","value","parsedValue","JSON","parse","data","e","writeToStorage","stringifiedValue","stringify","setItem","removeFromStorage","removeItem"],"sourceRoot":""}
1
+ {"version":3,"file":"index.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAsC,6BAAID,IAE1CD,EAAmC,6BAAIC,GACxC,CATD,CASGK,KAAM,I,uBCNLC,EAAsB,CAAC,E,0hDCI3B,oCAAyCC,GAAzC,gBAAyC,IAAAA,IAAAA,EAAA,IAC/B,MAAmDA,EAAO,OAA1DC,OAAM,IAAG,iBAAc,EAAE,EAA0BD,EAAO,KAElE,MAAO,CACLE,UAHmC,IAAG,iBAAc,EAOpDC,OAAQ,2CAAO,G,IAAEC,EAAG,M,0BAClB,MAAO,CAAP,EAAOC,OAAOC,aAAaC,QAAQH,G,MAGrCI,gBAAiB,2CAAO,G,UAAEJ,EAAG,M,0BAK3B,GAJMK,EAAU,UAAGR,GAAM,OAAGG,KAEtBM,EAAQL,OAAOC,aAAaC,QAAQE,IAGxC,MAAO,CAAP,EAAO,MAGT,IAGE,IAFME,EAAcC,KAAKC,MAAMH,UAEgB,IAArBC,EAAYG,KACpC,MAAO,CAAP,EAAOH,EAAYG,KAGvB,CAAE,MAAOC,GACP,MAAO,CAAP,EAAO,KACT,CAEA,MAAO,CAAP,EAAO,K,MAGTC,eAAgB,2CAAO,G,QAAEZ,EAAG,MAAEM,EAAK,Q,iCAC3BD,EAAU,UAAGR,GAAM,OAAGG,GAEtBa,EAAmBL,KAAKM,UAAU,CACtCJ,KAAMJ,IAGRL,OAAOC,aAAaa,QAAQV,EAASQ,G,SAGvCG,kBAAmB,2CAAO,G,MAAEhB,EAAG,M,iCACvBK,EAAU,UAAGR,GAAM,OAAGG,GAE5BC,OAAOC,aAAae,WAAWZ,G,SAGrC,C,GDtDoB,KAAKa,KAAKvB,EAAoB,EAAEA,G","sources":["webpack://EventvisorLocalStorageModule/webpack/universalModuleDefinition","webpack://EventvisorLocalStorageModule/webpack/startup","webpack://EventvisorLocalStorageModule/./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"EventvisorLocalStorageModule\"] = factory();\n\telse\n\t\troot[\"EventvisorLocalStorageModule\"] = factory();\n})(this, () => {\nreturn ","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = {};\n__webpack_modules__[166].call(__webpack_exports__,0,__webpack_exports__);\n","import type { Module } from \"@eventvisor/sdk\";\n\nexport type LocalStorageModuleOptions = {\n name?: string;\n prefix?: string;\n};\n\nexport function createLocalStorageModule(options: LocalStorageModuleOptions = {}): Module {\n const { prefix = \"_eventvisor_\", name = \"localstorage\" } = options;\n\n return {\n name,\n\n // this is different than storage use cases,\n // and prefix is not meant to be used here\n lookup: async ({ key }) => {\n return window.localStorage.getItem(key);\n },\n\n readFromStorage: async ({ key }) => {\n const fullKey = `${prefix}${key}`;\n\n const value = window.localStorage.getItem(fullKey);\n\n if (!value) {\n return null;\n }\n\n try {\n const parsedValue = JSON.parse(value);\n\n if (parsedValue && typeof parsedValue.data !== \"undefined\") {\n return parsedValue.data;\n }\n // eslint-disable-next-line\n } catch (e) {\n return null;\n }\n\n return null;\n },\n\n writeToStorage: async ({ key, value }) => {\n const fullKey = `${prefix}${key}`;\n\n const stringifiedValue = JSON.stringify({\n data: value,\n });\n\n window.localStorage.setItem(fullKey, stringifiedValue);\n },\n\n removeFromStorage: async ({ key }) => {\n const fullKey = `${prefix}${key}`;\n\n window.localStorage.removeItem(fullKey);\n },\n };\n}\n"],"names":["root","factory","exports","module","define","amd","this","__webpack_exports__","options","prefix","name","lookup","key","window","localStorage","getItem","readFromStorage","fullKey","value","parsedValue","JSON","parse","data","e","writeToStorage","stringifiedValue","stringify","setItem","removeFromStorage","removeItem","call"],"sourceRoot":""}
package/dist/index.mjs.gz CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventvisor/module-localstorage",
3
- "version": "0.17.0",
3
+ "version": "0.19.0",
4
4
  "description": "Eventvisor LocalStorage module",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.mjs",
@@ -38,8 +38,8 @@
38
38
  "url": "https://github.com/eventvisor/eventvisor/issues"
39
39
  },
40
40
  "devDependencies": {
41
- "@eventvisor/sdk": "0.17.0"
41
+ "@eventvisor/sdk": "0.19.0"
42
42
  },
43
43
  "license": "MIT",
44
- "gitHead": "ed269d23b6b078acfc9af6766b419cfa622c8f53"
44
+ "gitHead": "91340e901e9c9cf243f461c766cf0c4143545d03"
45
45
  }