cordova-promise-fs
Advanced tools
Comparing version 0.10.0 to 0.11.0
{ | ||
"name": "cordova-promise-fs", | ||
"main": "dist/CordovaPromiseFS.js", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"homepage": "https://github.com/markmarijnissen/cordova-promise-fs", | ||
@@ -6,0 +6,0 @@ "authors": [ |
@@ -5,10 +5,10 @@ var CordovaPromiseFS = | ||
/******/ var installedModules = {}; | ||
/******/ | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ | ||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) | ||
/******/ return installedModules[moduleId].exports; | ||
/******/ | ||
/******/ // Create a new module (and put it into the cache) | ||
@@ -20,23 +20,23 @@ /******/ var module = installedModules[moduleId] = { | ||
/******/ }; | ||
/******/ | ||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
/******/ | ||
/******/ // Flag the module as loaded | ||
/******/ module.loaded = true; | ||
/******/ | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ | ||
/******/ | ||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
/******/ | ||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
/******/ | ||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
/******/ | ||
/******/ // Load entry module and return exports | ||
@@ -132,2 +132,3 @@ /******/ return __webpack_require__(0); | ||
window.ProgressEvent = function ProgressEvent(){}; | ||
window.FileEntry = function FileEntry(){}; | ||
} else { | ||
@@ -190,3 +191,3 @@ window.requestFileSystem = function(x,y,z,fail){ | ||
return new Promise(function(resolve,reject){ | ||
if(path instanceof FileEntry) { | ||
if(typeof path === 'object') { | ||
return resolve(path); | ||
@@ -291,3 +292,3 @@ } | ||
path = normalize(path); | ||
return 'cdvfile://localhost/'+(options.persistent? 'persistent/':'temporary/') + path; | ||
return path.indexOf('://') < 0? 'cdvfile://localhost/'+(options.persistent? 'persistent/':'temporary/') + path: path; | ||
}; | ||
@@ -452,4 +453,3 @@ | ||
} | ||
serverUrl = encodeURI(serverUrl); | ||
if(isCordova) localPath = toInternalURLSync(localPath); | ||
if(isCordova && localPath.indexOf('://') < 0) localPath = toInternalURLSync(localPath); | ||
@@ -461,2 +461,5 @@ transferOptions = transferOptions || {}; | ||
transferOptions.retry = transferOptions.retry.concat(); | ||
if(!transferOptions.file && !isDownload){ | ||
transferOptions.fileName = filename(localPath); | ||
} | ||
@@ -536,3 +539,4 @@ var ft = new FileTransfer(); | ||
/***/ } | ||
/******/ ]) | ||
/******/ ]); |
13
index.js
@@ -83,2 +83,3 @@ /** | ||
window.ProgressEvent = function ProgressEvent(){}; | ||
window.FileEntry = function FileEntry(){}; | ||
} else { | ||
@@ -141,3 +142,3 @@ window.requestFileSystem = function(x,y,z,fail){ | ||
return new Promise(function(resolve,reject){ | ||
if(path instanceof FileEntry) { | ||
if(typeof path === 'object') { | ||
return resolve(path); | ||
@@ -242,3 +243,3 @@ } | ||
path = normalize(path); | ||
return 'cdvfile://localhost/'+(options.persistent? 'persistent/':'temporary/') + path; | ||
return path.indexOf('://') < 0? 'cdvfile://localhost/'+(options.persistent? 'persistent/':'temporary/') + path: path; | ||
}; | ||
@@ -403,4 +404,3 @@ | ||
} | ||
serverUrl = encodeURI(serverUrl); | ||
if(isCordova) localPath = toInternalURLSync(localPath); | ||
if(isCordova && localPath.indexOf('://') < 0) localPath = toInternalURLSync(localPath); | ||
@@ -412,2 +412,5 @@ transferOptions = transferOptions || {}; | ||
transferOptions.retry = transferOptions.retry.concat(); | ||
if(!transferOptions.file && !isDownload){ | ||
transferOptions.fileName = filename(localPath); | ||
} | ||
@@ -485,2 +488,2 @@ var ft = new FileTransfer(); | ||
}; | ||
}; | ||
}; |
{ | ||
"name": "cordova-promise-fs", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"description": "Cordova FileSystem convienence functions that return promises.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
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
122305
3654