remotestorage-module-shares
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -63,11 +63,9 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
/** | ||
* File: Shares | ||
* A remoteStorage data module for sharing of files. | ||
* | ||
* Maintainer: - Sebastian Kippe <sebastian@kip.pe> | ||
* Version: - 0.3.0 | ||
* All shares are stored with a timestamp prefix. For images, thumbnails are | ||
* created and stored in a subdirectory. | ||
* | ||
* Manages sharing of files. All shares are stored with a timestamp prefix. | ||
* For images, thumbnails are created and stored in a subdirectory. | ||
* @module shares | ||
*/ | ||
var sharesBuilder = function sharesBuilder(privateClient, publicClient) { | ||
@@ -77,14 +75,13 @@ | ||
/** | ||
* Method: storeFile | ||
* | ||
* Stores a shared file | ||
* | ||
* Parameters: | ||
* mimeType - the picture MIME type. | ||
* name - the picture name. | ||
* data - the picture (expected as an `ArrayBuffer`). | ||
* @param {string} mimeType - Content type of the file | ||
* @param {string} name - Filename | ||
* @param {ArrayBuffer} data - File contents | ||
* | ||
* Returns: | ||
* A promise, which will be fulfilled with the absolute URL of the newly | ||
* uploaded file (see <getFileURL>). | ||
* @returns {Promise} A promise, which will be fulfilled with the absolute | ||
* URL of the newly uploaded file (see <getFileURL>) | ||
* | ||
* @alias module:shares | ||
* @public | ||
*/ | ||
@@ -105,8 +102,8 @@ storeFile: function storeFile(mimeType, name, data) { | ||
/** | ||
* Method: remove | ||
* | ||
* Remove a file | ||
* | ||
* Parameters: | ||
* name - the filename. | ||
* @param {string} name - The filename | ||
* | ||
* @alias module:shares | ||
* @public | ||
*/ | ||
@@ -119,8 +116,8 @@ remove: function remove(name) { | ||
/** | ||
* Method: listFiles | ||
* | ||
* List all shared files | ||
* | ||
* Returns: | ||
* An array containing the filenames. | ||
* @returns {Promise} Resolves with an array containing the filenames | ||
* | ||
* @alias module:shares | ||
* @public | ||
*/ | ||
@@ -141,11 +138,10 @@ list: function list() { | ||
/** | ||
* Method: getFileURL | ||
* | ||
* Get the absolute URL of a file. | ||
* | ||
* Parameters: | ||
* name - the filename. | ||
* @param {string} name - the filename | ||
* | ||
* Returns: | ||
* The absolute URL of the file. | ||
* @returns {string} The absolute URL of the file | ||
* | ||
* @alias module:shares | ||
* @public | ||
*/ | ||
@@ -161,11 +157,9 @@ getFileURL: function getFileURL(name) { | ||
/** | ||
* Method: _formattedDate | ||
* | ||
* Helper method for formatting dates for filenames | ||
* | ||
* Parameters: | ||
* date - a Date object | ||
* @param {date} date - a Date object | ||
* | ||
* Returns: | ||
* A formatted date string, like e.g. '131106-1523' | ||
* @returns {string} A formatted date string, like e.g. '131106-1523' | ||
* | ||
* @private | ||
*/ | ||
@@ -172,0 +166,0 @@ |
64
index.js
/** | ||
* File: Shares | ||
* A remoteStorage data module for sharing of files. | ||
* | ||
* Maintainer: - Sebastian Kippe <sebastian@kip.pe> | ||
* Version: - 0.3.0 | ||
* All shares are stored with a timestamp prefix. For images, thumbnails are | ||
* created and stored in a subdirectory. | ||
* | ||
* Manages sharing of files. All shares are stored with a timestamp prefix. | ||
* For images, thumbnails are created and stored in a subdirectory. | ||
* @module shares | ||
*/ | ||
const sharesBuilder = function(privateClient, publicClient) { | ||
@@ -15,14 +13,13 @@ | ||
/** | ||
* Method: storeFile | ||
* | ||
* Stores a shared file | ||
* | ||
* Parameters: | ||
* mimeType - the picture MIME type. | ||
* name - the picture name. | ||
* data - the picture (expected as an `ArrayBuffer`). | ||
* @param {string} mimeType - Content type of the file | ||
* @param {string} name - Filename | ||
* @param {ArrayBuffer} data - File contents | ||
* | ||
* Returns: | ||
* A promise, which will be fulfilled with the absolute URL of the newly | ||
* uploaded file (see <getFileURL>). | ||
* @returns {Promise} A promise, which will be fulfilled with the absolute | ||
* URL of the newly uploaded file (see <getFileURL>) | ||
* | ||
* @alias module:shares | ||
* @public | ||
*/ | ||
@@ -44,8 +41,8 @@ storeFile: function(mimeType, name, data) { | ||
/** | ||
* Method: remove | ||
* | ||
* Remove a file | ||
* | ||
* Parameters: | ||
* name - the filename. | ||
* @param {string} name - The filename | ||
* | ||
* @alias module:shares | ||
* @public | ||
*/ | ||
@@ -58,8 +55,8 @@ remove: function(name) { | ||
/** | ||
* Method: listFiles | ||
* | ||
* List all shared files | ||
* | ||
* Returns: | ||
* An array containing the filenames. | ||
* @returns {Promise} Resolves with an array containing the filenames | ||
* | ||
* @alias module:shares | ||
* @public | ||
*/ | ||
@@ -81,11 +78,10 @@ list: function() { | ||
/** | ||
* Method: getFileURL | ||
* | ||
* Get the absolute URL of a file. | ||
* | ||
* Parameters: | ||
* name - the filename. | ||
* @param {string} name - the filename | ||
* | ||
* Returns: | ||
* The absolute URL of the file. | ||
* @returns {string} The absolute URL of the file | ||
* | ||
* @alias module:shares | ||
* @public | ||
*/ | ||
@@ -101,11 +97,9 @@ getFileURL: function(name) { | ||
/** | ||
* Method: _formattedDate | ||
* | ||
* Helper method for formatting dates for filenames | ||
* | ||
* Parameters: | ||
* date - a Date object | ||
* @param {date} date - a Date object | ||
* | ||
* Returns: | ||
* A formatted date string, like e.g. '131106-1523' | ||
* @returns {string} A formatted date string, like e.g. '131106-1523' | ||
* | ||
* @private | ||
*/ | ||
@@ -112,0 +106,0 @@ |
{ | ||
"name": "remotestorage-module-shares", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "remoteStorage.js module for sharing images and other files", | ||
@@ -9,3 +9,5 @@ "main": "./dist/build.js", | ||
"dev": "webpack -w", | ||
"build": "NODE_ENV=production webpack" | ||
"build": "NODE_ENV=production webpack", | ||
"docs": "jsdoc2md --partial main.hbs --files index.js > README.md", | ||
"version": "npm run build && git add dist/ && npm run docs && git add README.md" | ||
}, | ||
@@ -21,2 +23,3 @@ "author": "Sebastian Kippe <sebastian@kip.pe>", | ||
"babel-preset-es2015": "^6.18.0", | ||
"jsdoc-to-markdown": "^3.0.0", | ||
"webpack": "^1.13.2" | ||
@@ -23,0 +26,0 @@ }, |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
20823
7
1
67
0
5
499