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

cordova-plugin-ionic

Package Overview
Dependencies
Maintainers
2
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-ionic - npm Package Compare versions

Comparing version 5.0.8 to 5.0.9

24

dist/common.js

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

this.SNAPSHOT_CACHE = 'ionic_built_snapshots';
this.PLUGIN_VERSION = '5.0.7';
this.PLUGIN_VERSION = '5.0.8';
this.appInfo = appInfo;

@@ -653,18 +653,17 @@ this._savedPreferences = preferences;

fileEntry.createWriter((fileWriter) => {
const status = { done: 0 };
let chunks = 1;
let offset = Math.floor(dataBlob.size / chunks);
// Maximum chunk size 512kb
while (offset > (1024 * 512)) {
chunks *= 2;
offset = Math.floor(dataBlob.size / chunks);
}
const maxWriteSize = 1024 * 512;
const chunks = Math.ceil(dataBlob.size / maxWriteSize);
const status = { currentChunk: 0 };
fileWriter.onwriteend = (file) => {
status.done += 1;
if (status.done === chunks) {
status.currentChunk += 1;
if (status.currentChunk >= chunks) {
resolve();
}
else {
const start = status.currentChunk * maxWriteSize;
// The last chunk might not be the max write size
const writeSize = status.currentChunk === (chunks - 1) ? (dataBlob.size - fileWriter.length) : maxWriteSize;
fileWriter.seek(fileWriter.length);
fileWriter.write(dataBlob.slice(status.done * offset, (status.done * offset) + offset));
fileWriter.write(dataBlob.slice(start, start + writeSize));
}

@@ -675,3 +674,4 @@ };

};
fileWriter.write(dataBlob.slice(0, offset));
const writeSize = chunks === 1 ? dataBlob.size : maxWriteSize;
fileWriter.write(dataBlob.slice(0, writeSize));
});

@@ -678,0 +678,0 @@ });

{
"name": "cordova-plugin-ionic",
"version": "5.0.8",
"version": "5.0.9",
"cordova": {

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

@@ -61,3 +61,3 @@ /// <reference path="../types/IonicCordova.d.ts" />

public SNAPSHOT_CACHE = 'ionic_built_snapshots';
public PLUGIN_VERSION = '5.0.8';
public PLUGIN_VERSION = '5.0.9';

@@ -711,19 +711,17 @@ constructor(appInfo: IAppInfo, preferences: ISavedPreferences) {

const status = {done: 0};
let chunks = 1;
let offset = Math.floor(dataBlob.size / chunks);
// Maximum chunk size 512kb
while (offset > (1024 * 512)) {
chunks *= 2;
offset = Math.floor(dataBlob.size / chunks);
}
const maxWriteSize = 1024 * 512;
const chunks = Math.ceil(dataBlob.size / maxWriteSize);
const status = {currentChunk: 0};
fileWriter.onwriteend = (file) => {
status.done += 1;
if (status.done === chunks) {
status.currentChunk += 1;
if (status.currentChunk >= chunks) {
resolve();
} else {
const start = status.currentChunk * maxWriteSize;
// The last chunk might not be the max write size
const writeSize = status.currentChunk === (chunks - 1) ? (dataBlob.size - fileWriter.length) : maxWriteSize;
fileWriter.seek(fileWriter.length);
fileWriter.write(dataBlob.slice(status.done * offset, (status.done * offset) + offset));
fileWriter.write(dataBlob.slice(start, start + writeSize));
}

@@ -736,3 +734,4 @@ };

fileWriter.write(dataBlob.slice(0, offset));
const writeSize = chunks === 1 ? dataBlob.size : maxWriteSize;
fileWriter.write(dataBlob.slice(0, writeSize));
});

@@ -739,0 +738,0 @@ });

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