@scoir/filestack
Advanced tools
Comparing version 2.3.0 to 3.0.0-beta.ed162590
@@ -1,9 +0,5 @@ | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = { | ||
maxSize: 10 * 1024 * 1024, // 10MB of bytes for filesize limits | ||
customText: 'https://s3.amazonaws.com/scoir_static/assets/js/scoir_fp_en.json' | ||
export default { | ||
maxSize: 10 * 1024 * 1024, | ||
// 10MB of bytes for filesize limits | ||
customText: 'https://s3.amazonaws.com/scoir_static/assets/js/scoir_fp_en.json' | ||
}; |
@@ -1,10 +0,5 @@ | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = { | ||
CSV: ['.csv'], | ||
ZIP: ['.zip'], | ||
PDF: ['.pdf'] | ||
export default { | ||
CSV: ['.csv'], | ||
ZIP: ['.zip'], | ||
PDF: ['.pdf'] | ||
}; |
@@ -1,57 +0,34 @@ | ||
'use strict'; | ||
import filestackFileExtensions from './file-extensions'; | ||
import filestackDefaultPickerOptions from './default-picker-options'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
const createWrapper = filestack => ({ ...filestack, | ||
upload: (file, storeOptions) => { | ||
return new Promise((resolve, reject) => { | ||
filestack.store(file, storeOptions, resolve, reject); | ||
}); | ||
}, | ||
export: handle => { | ||
return new Promise(resolve => { | ||
filestack.exportFile(handle, resolve, resolve); | ||
}); | ||
}, | ||
exportUrl: (url, opts) => { | ||
return new Promise(resolve => { | ||
filestack.exportFile(url, opts, resolve, resolve); | ||
}); | ||
}, | ||
pickAndStore: (pickerOptions, storeOptions) => { | ||
return new Promise((resolve, reject) => { | ||
filestack.pickAndStore({ ...filestackDefaultPickerOptions, | ||
...pickerOptions | ||
}, storeOptions, resolve, reject); | ||
}); | ||
} | ||
}); | ||
exports.defaultPickerOptions = exports.fileExtensions = undefined; | ||
var _promise = require('babel-runtime/core-js/promise'); | ||
var _promise2 = _interopRequireDefault(_promise); | ||
var _assign = require('babel-runtime/core-js/object/assign'); | ||
var _assign2 = _interopRequireDefault(_assign); | ||
var _fileExtensions = require('./file-extensions'); | ||
var _fileExtensions2 = _interopRequireDefault(_fileExtensions); | ||
var _defaultPickerOptions = require('./default-picker-options'); | ||
var _defaultPickerOptions2 = _interopRequireDefault(_defaultPickerOptions); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var createWrapper = function createWrapper(filestack) { | ||
return (0, _assign2.default)({}, filestack, { | ||
upload: function upload(file, storeOptions) { | ||
return new _promise2.default(function (resolve, reject) { | ||
filestack.store(file, storeOptions, resolve, reject); | ||
}); | ||
}, | ||
export: function _export(handle) { | ||
return new _promise2.default(function (resolve) { | ||
filestack.exportFile(handle, resolve, resolve); | ||
}); | ||
}, | ||
exportUrl: function exportUrl(url, opts) { | ||
return new _promise2.default(function (resolve) { | ||
filestack.exportFile(url, opts, resolve, resolve); | ||
}); | ||
}, | ||
pickAndStore: function pickAndStore(pickerOptions, storeOptions) { | ||
return new _promise2.default(function (resolve, reject) { | ||
filestack.pickAndStore((0, _assign2.default)({}, _defaultPickerOptions2.default, pickerOptions), storeOptions, resolve, reject); | ||
}); | ||
} | ||
}); | ||
}; | ||
exports.default = function (key, filestack) { | ||
filestack.setKey(key); | ||
return createWrapper(filestack); | ||
}; | ||
var fileExtensions = exports.fileExtensions = _fileExtensions2.default; | ||
var defaultPickerOptions = exports.defaultPickerOptions = _defaultPickerOptions2.default; | ||
export default ((key, filestack) => { | ||
filestack.setKey(key); | ||
return createWrapper(filestack); | ||
}); | ||
export const fileExtensions = filestackFileExtensions; | ||
export const defaultPickerOptions = filestackDefaultPickerOptions; |
{ | ||
"name": "@scoir/filestack", | ||
"version": "2.3.0", | ||
"version": "3.0.0-beta.ed162590", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "@scoir", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
14675
10
383
2
1