meteor-desktop-localstorage
Advanced tools
Comparing version 0.0.5 to 0.0.8
@@ -123,2 +123,2 @@ 'use strict'; | ||
exports.default = LocalStorage; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJMb2NhbFN0b3JhZ2UiLCJjb25zdHJ1Y3RvciIsImxvZyIsInNrZWxldG9uQXBwIiwiYXBwU2V0dGluZ3MiLCJldmVudHNCdXMiLCJtb2R1bGVzIiwiZmlsZU5hbWUiLCJNb2R1bGUiLCJzdG9yYWdlTW9kdWxlIiwic3RvcmFnZUZpbGUiLCJqb2luIiwiZ2V0UGF0aCIsInN0b3JhZ2UiLCJpbml0RG9uZSIsImxvZ2dlcnMiLCJnZXQiLCJvbiIsImluaXQiLCJldmVudCIsImtleSIsInZhbHVlIiwiZmx1c2giLCJmZXRjaElkIiwidmVyYm9zZSIsInJlc3BvbmQiLCJ3cml0ZUZpbGUiLCJKU09OIiwic3RyaW5naWZ5IiwicmVhZEZpbGUiLCJlcnIiLCJkYXRhIiwicGFyc2UiLCJpbmZvIiwiZSIsIndhcm4iLCJPYmplY3QiLCJrZXlzIiwibGVuZ3RoIiwiYXNzaWduIiwiZW1pdCJdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUE7O0FBQ0E7Ozs7QUFDQTs7Ozs7O0FBRUM7Ozs7OztBQU1EOzs7OztBQUtlLE1BQU1BLFlBQU4sQ0FBbUI7O0FBRTlCOzs7Ozs7Ozs7O0FBVUFDLGdCQUNJQyxHQURKLEVBRUlDLFdBRkosRUFHSUMsV0FISixFQUlJQyxTQUpKLEVBS0lDLE9BTEosRUFNSSxFQUFFQyxXQUFXLG1CQUFiLEVBTkosRUFPSUMsTUFQSixFQVFFO0FBQ0UsY0FBTUMsZ0JBQWdCLElBQUlELE1BQUosQ0FBVyxjQUFYLENBQXRCOztBQUVBLGFBQUtFLFdBQUwsR0FBbUIsZU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bWUpO1xuICAgICAgICB0aGlzLnN0b3JhZ2UgPSB7fTtcbiAgICAgICAgdGhpcy5pbml0RG9uZSA9IGZhbHNlO1xuICAgICAgICB0aGlzLmV2ZW50c0J1cyA9IGV2ZW50c0J1cztcbiAgICAgICAgdGhpcy5sb2cgPSBsb2cubG9nZ2Vycy5nZXQoJ21ldGVvci1kZXNrdG9wLWxvY2Fsc3RvcmFnZScpO1xuXG4gICAgICAgIGV2ZW50c0J1cy5vbignYWZ0ZXJMb2FkaW5nJywgKCkgPT4ge1xuICAgICAgICAgICAgdGhpcy5pbml0KCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHN0b3JhZ2VNb2R1bGUub24oJ3NldCcsIChldmVudCwga2V5LCB2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgdGhpcy5zdG9yYWdlW2tleV0gPSB2YWx1ZTtcbiAgICAgICAgICAgIGlmICh0aGlzLmluaXREb25lKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5mbHVzaCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICBzdG9yYWdlTW9kdWxlLm9uKCdjbGVhcicsICgpID0+IHtcbiAgICAgICAgICAgIHRoaXMuc3RvcmFnZSA9IHt9O1xuICAgICAgICAgICAgaWYgKHRoaXMuaW5pdERvbmUpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmZsdXNoKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHN0b3JhZ2VNb2R1bGUub24oJ3JlbW92ZScsIChldmVudCwga2V5KSA9PiB7XG4gICAgICAgICAgICBkZWxldGUgdGhpcy5zdG9yYWdlW2tleV07XG4gICAgICAgICAgICBpZiAodGhpcy5pbml0RG9uZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuZmx1c2goKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgc3RvcmFnZU1vZHVsZS5vbignZ2V0QWxsJywgKGV2ZW50L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gICAgICAgICAgICAgICAgICB0aGlzLmxvZy5pbmZvKGBsb2FkZWQgc3RvcmFnZSBmaWxlICR7dGhpcy5zdG9yYWdlRmlsZX1gKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubG9nLndhcm4oYGNvdWxkIG5vdCBwYXJzZSB0aGUgc3RvcmFnZSBmaWxlICR7dGhpcy5zdG9yYWdlRmlsZX1gKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gTm90aGluZyB0byBkbyBoZXJlLiBXZSB3aWxsIHB1dCBhIGZyZXNoIGZpbGUgaW4gcGxhY2UgZmV3IGxpbmVzIGJlbG93LlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoT2JqZWN0LmtleXModGhpcy5zdG9yYWdlKS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc3RvcmFnZSA9IE9iamVjdC5hc3NpZ24oc3RvcmFnZSwgdGhpcy5zdG9yYWdlKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnN0b3JhZ2UgPSBzdG9yYWdlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLmZsdXNoKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmluaXREb25lID0gdHJ1ZTtcbiAgICAgICAgICAgIHRoaXMubG9nLmluZm8oYGhhdmUgJHtPYmplY3Qua2V5cyh0aGlzLnN0b3JhZ2UpLmxlbmd0aH0ga2V5c2ApO1xuICAgICAgICAgICAgdGhpcy5ldmVudHNCdXMuZW1pdCgnbG9jYWxTdG9yYWdlLmxvYWRlZCcpO1xuICAgICAgICB9KTtcbiAgICB9XG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLC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2Vycy5nZXQoJ21ldGVvci1kZXNrdG9wLWxvY2Fsc3RvcmFnZScpO1xuXG4gICAgICAgIGV2ZW50c0J1cy5vbignYWZ0ZXJMb2FkaW5nJywgKCkgPT4ge1xuICAgICAgICAgICAgdGhpcy5pbml0KCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHN0b3JhZ2VNb2R1bGUub24oJ3NldCcsIChldmVudCwga2V5LCB2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgdGhpcy5zdG9yYWdlW2tleV0gPSB2YWx1ZTtcbiAgICAgICAgICAgIGlmICh0aGlzLmluaXREb25lKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5mbHVzaCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICBzdG9yYWdlTW9kdWxlLm9uKCdjbGVhcicsICgpID0+IHtcbiAgICAgICAgICAgIHRoaXMuc3RvcmFnZSA9IHt9O1xuICAgICAgICAgICAgaWYgKHRoaXMuaW5pdERvbmUpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmZsdXNoKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHN0b3JhZ2VNb2R1bGUub24oJ3JlbW92ZScsIChldmVudCwga2V5KSA9PiB7XG4gICAgICAgICAgICBkZWxldGUgdGhpcy5zdG9yYWdlW2tleV07XG4gICAgICAgICAgICBpZiAodGhpcy5pbml0RG9uZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuZmx1c2goKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgc3RvcmFnZU1vZHVsZS5vbignZ2V0QWxsJywgKGV2ZW50LCBmZXRjaElkKSA9PiB7XG4gICAgICAgICAgICB0aGlzLmxvZy52ZXJib3NlKCdnZXRBbGwgcmVjZWl2ZWQnKTtcbiAgICAgICAgICAgIGlmICh0aGlzLmluaXREb25lKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5sb2cudmVyYm9zZSgn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Lndhcm4oYGNvdWxkIG5vdCBwYXJzZSB0aGUgc3RvcmFnZSBmaWxlICR7dGhpcy5zdG9yYWdlRmlsZX1gKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gTm90aGluZyB0byBkbyBoZXJlLiBXZSB3aWxsIHB1dCBhIGZyZXNoIGZpbGUgaW4gcGxhY2UgZmV3IGxpbmVzIGJlbG93LlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoT2JqZWN0LmtleXModGhpcy5zdG9yYWdlKS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc3RvcmFnZSA9IE9iamVjdC5hc3NpZ24oc3RvcmFnZSwgdGhpcy5zdG9yYWdlKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnN0b3JhZ2UgPSBzdG9yYWdlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLmZsdXNoKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmluaXREb25lID0gdHJ1ZTtcbiAgICAgICAgICAgIHRoaXMubG9nLmluZm8oYGhhdmUgJHtPYmplY3Qua2V5cyh0aGlzLnN0b3JhZ2UpLmxlbmd0aH0ga2V5c2ApO1xuICAgICAgICAgICAgdGhpcy5ldmVudHNCdXMuZW1pdCgnbG9jYWxTdG9yYWdlLmxvYWRlZCcpO1xuICAgICAgICB9KTtcbiAgICB9XG59XG5cblxuIl19 |
{ | ||
"name": "meteor-desktop-localstorage", | ||
"version": "0.0.5", | ||
"version": "0.0.8", | ||
"engines": { | ||
@@ -11,3 +11,3 @@ "node": ">=6.0.0" | ||
"test": "ava tests/functional/**/*.js -s", | ||
"test-watch": "ava tests/functional/**/*.js --watch --verbose -s", | ||
"test-watch": "ava tests/functional/**/*.js --watch --source src --verbose -s", | ||
"lint": "eslint src tests plugins", | ||
@@ -14,0 +14,0 @@ "build": "babel src --out-dir dist --source-maps inline --copy-files", |
/* eslint-disable no-underscore-dangle */ | ||
let retries = 0; | ||
/** | ||
* Fetches local storage data from the meteor-desktop-localstorage plugin. | ||
* Retries 5 times, then fails. | ||
*/ | ||
function load() { | ||
@@ -6,3 +12,8 @@ Desktop.fetch('localStorage', 'getAll').then((storage) => { | ||
}).catch(() => { | ||
load(); | ||
retries += 1; | ||
if (retries < 5) { | ||
load(); | ||
} else { | ||
console.error('failed to load localStorage contents'); | ||
} | ||
}); | ||
@@ -12,2 +23,3 @@ } | ||
if (Meteor.isDesktop) { | ||
// Replace Meteor's localStorage with ours. | ||
Meteor._localStorage = { | ||
@@ -14,0 +26,0 @@ storage: {}, |
Package.describe({ | ||
name: 'omega:meteor-desktop-localstorage', | ||
summary: 'Persistent localStorage for meteor-desktop', | ||
version: '0.0.5', | ||
version: '0.0.8', | ||
git: 'https://github.com/wojtkowiak/meteor-desktop-localstorage', | ||
@@ -6,0 +6,0 @@ documentation: 'README.md' |
# Meteor Desktop localStorage [![npm version](https://img.shields.io/npm/v/meteor-desktop-localstorage.svg)](https://npmjs.org/package/meteor-desktop-localstorage) | ||
<sup>Travis</sup> [![Travis Build Status](https://travis-ci.org/wojtkowiak/meteor-desktop-localstorage.svg?branch=master)](https://travis-ci.org/wojtkowiak/meteor-desktop-localstorage) <sup>AppVeyor</sup> [![Build status](https://ci.appveyor.com/api/projects/status/c4faa7b42yhgjgo1?svg=true)](https://ci.appveyor.com/project/wojtkowiak/meteor-desktop-localstorage) <sup>CircleCI</sup> [![CircleCI](https://circleci.com/gh/wojtkowiak/meteor-desktop-localstorage.svg?style=svg)](https://circleci.com/gh/wojtkowiak/meteor-desktop-localstorage) | ||
--- | ||
Because of `Electron` and `meteor-desktop` implementation the builtin `Chrome` localStorage works unreliably. | ||
This package provides a working `localStorage` substitute. | ||
Available as `Meteor._localStorage`. | ||
API is [here](https://github.com/wojtkowiak/meteor-desktop-localstorage/blob/master/plugins/localstorage/localstorage.js#L14) | ||
> This is a [Meteor Desktop](https://github.com/wojtkowiak/meteor-desktop) plugin. | ||
Because of `Electron` and `meteor-desktop` implementation the builtin `Chrome` localStorage works unreliably. | ||
This package provides a working `localStorage` substitute. Available as `Meteor._localStorage`. | ||
API is [here](https://github.com/wojtkowiak/meteor-desktop-localstorage/blob/master/plugins/localstorage/localstorage.js#L14). | ||
**This also makes Meteor autologin work properly in Electron.** | ||
@@ -20,3 +19,3 @@ | ||
"meteor-desktop-localstorage": { | ||
"version": "0.0.5" | ||
"version": "0.0.8" | ||
} | ||
@@ -34,3 +33,3 @@ } | ||
"meteor-desktop-localstorage": { | ||
"version": "0.0.5", | ||
"version": "0.0.8", | ||
"fileName": "myCustomName.json" | ||
@@ -37,0 +36,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21897
156
1
46