Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-liveupdate

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-liveupdate - npm Package Compare versions

Comparing version 5.2.11 to 5.2.12

21

dist/common.js

@@ -87,3 +87,3 @@ "use strict";

this.PACKAGE_NAME = 'www.zip';
this.PLUGIN_VERSION = '5.2.11';
this.PLUGIN_VERSION = '5.2.12';
this.appInfo = appInfo;

@@ -213,3 +213,4 @@ this._savedPreferences = preferences;

lastUsed: new Date().toISOString(),
url: config.host
url: config.host,
headers: config.headers
}

@@ -240,3 +241,3 @@ });

_a.sent();
return [4 /*yield*/, this._downloadAndUnzipfile(prefs.availableUpdate.url, prefs.availableUpdate.versionId)];
return [4 /*yield*/, this._downloadAndUnzipfile(prefs.availableUpdate.url, prefs.availableUpdate.versionId, prefs.availableUpdate.headers)];
case 2:

@@ -254,3 +255,3 @@ _a.sent();

};
IonicDeployImpl.prototype._downloadAndUnzipfile = function (url, versionId) {
IonicDeployImpl.prototype._downloadAndUnzipfile = function (url, versionId, headers) {
return __awaiter(this, void 0, void 0, function () {

@@ -263,3 +264,3 @@ var fileDir, filePath, e_2, e_3;

filePath = Path.join(fileDir, this.PACKAGE_NAME);
return [4 /*yield*/, this._fileManager.downloadAndWriteFile(url, filePath)];
return [4 /*yield*/, this._fileManager.downloadAndWriteFile(url, filePath, headers)];
case 1:

@@ -842,8 +843,12 @@ _a.sent();

};
FileManager.prototype.downloadAndWriteFile = function (url, path) {
FileManager.prototype.downloadAndWriteFile = function (url, path, headers) {
return __awaiter(this, void 0, void 0, function () {
var fileT;
var fileT, options;
return __generator(this, function (_a) {
fileT = new FileTransfer();
return [2 /*return*/, new Promise(function (resolve, reject) { return fileT.download(url, path, resolve, reject); })];
options = {};
if (headers) {
options.headers = JSON.parse(headers);
}
return [2 /*return*/, new Promise(function (resolve, reject) { return fileT.download(url, path, resolve, reject, false, options); })];
});

@@ -850,0 +855,0 @@ });

@@ -5,3 +5,3 @@ "use strict";

var obj = o;
var allowedKeys = ['appId', 'channel', 'disabled', 'host', 'maxVersions', 'minBackgroundDuration', 'updateMethod'];
var allowedKeys = ['appId', 'channel', 'disabled', 'host', 'headers', 'maxVersions', 'minBackgroundDuration', 'updateMethod'];
if (!obj)

@@ -21,4 +21,5 @@ return false;

(obj.minBackgroundDuration === undefined || typeof obj.minBackgroundDuration === 'number') &&
(obj.host === undefined || typeof obj.host === 'string');
(obj.host === undefined || typeof obj.host === 'string') &&
(obj.headers === undefined || typeof obj.headers === 'string');
}
exports.isPluginConfig = isPluginConfig;
{
"name": "cordova-plugin-liveupdate",
"version": "5.2.11",
"version": "5.2.12",
"cordova": {

@@ -5,0 +5,0 @@ "id": "cordova-plugin-liveupdate",

@@ -130,3 +130,3 @@ interface Window {

/**
* @ignore
* @required
*/

@@ -136,2 +136,7 @@ host?: string;

/**
* @ignore
*/
headers?: string;
/**
* The [channel](https://ionicframework.com/docs/pro/deploy/channels) that the plugin should listen for updates on.

@@ -138,0 +143,0 @@ */

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc