Comparing version 0.0.11 to 0.0.12
@@ -90,2 +90,6 @@ /* | ||
path = decodeURIComponent(path.replace(/\+/g, ' ')); | ||
// remove api root path | ||
if (path.indexOf(options.apiRoot) > -1) { | ||
path = path.substr(path.lastIndexOf(options.apiRoot)+options.apiRoot.length); | ||
} | ||
// split to be able to manipulate each folder | ||
@@ -95,4 +99,2 @@ var url_arr = path.split('/'); | ||
url_arr.shift(); | ||
// remove the 'api' path | ||
url_arr.shift(); | ||
// remove the api version number | ||
@@ -99,0 +101,0 @@ url_arr.shift(); |
@@ -11,3 +11,4 @@ /** | ||
'dropbox', | ||
'www' | ||
'www', | ||
'ftp' | ||
]; | ||
@@ -58,2 +59,38 @@ | ||
/** | ||
* FTP service config | ||
*/ | ||
exports.ftp = | ||
{ | ||
AUTH_FORM_ROUTE: "/api/v1.0/ftp-auth", | ||
AUTH_FORM_SUBMIT_ROUTE: "/api/v1.0/ftp-auth-submit", | ||
AUTH_FORM_WARNING: "<p style='color: red; '>WARNING: YOUR LOGIN/PASS IS SET TO ADMIN/ADMIN</p>", | ||
AUTH_FORM_HEAD_HTML: '', | ||
AUTH_FORM_BODY_HTML: '<form action="/api/v1.0/ftp-auth-submit" method="post">\ | ||
<div>\ | ||
<label>Host:</label>\ | ||
<input type="text" name="host"/>\ | ||
</div>\ | ||
<div>\ | ||
<label>Port:</label>\ | ||
<input type="text" name="port" value="21" />\ | ||
</div>\ | ||
<div>\ | ||
<label>Username:</label>\ | ||
<input type="text" name="username"/>\ | ||
</div>\ | ||
<div>\ | ||
<label>Password:</label>\ | ||
<input type="password" name="password"/>\ | ||
</div>\ | ||
<div>\ | ||
<input type="submit" value="Log In"/>\ | ||
</div>\ | ||
</form>', | ||
AUTH_SUCCESS_FORM_HEAD_HTML: '<script type="text/javascript">window.onload=function(){window.close();};</script>', | ||
AUTH_SUCCESS_FORM_BODY_HTML: '<p>close this window please</p>', | ||
AUTH_ERROR_FORM_HEAD_HTML: '', | ||
AUTH_ERROR_FORM_BODY_HTML: '<p style="color: red;">Wrong login or password for user $username on $host</p>', | ||
} | ||
/** | ||
* dropbox app config | ||
@@ -105,5 +142,20 @@ */ | ||
} | ||
}, | ||
"ftp/":{ | ||
"connect/":{}, | ||
"login/":{}, | ||
"logout/":{}, | ||
"account/":{}, | ||
"exec/":{ | ||
"ls/":{}, | ||
"rm/":{}, | ||
"mkdir/":{}, | ||
"cp/":{}, | ||
"mv/":{}, | ||
"get/":{}, | ||
"put/":{} | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
}; |
{ | ||
"name": "unifile", | ||
"description": "Express middleware to provide a common API for cloud storage services. ", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"author": { | ||
@@ -16,2 +16,3 @@ "name": "Alex Hoyau aka lexoyo" | ||
"dbox": "0.6.x", | ||
"ftp": "0.3.x", | ||
"node-oauth": "0.1.x", | ||
@@ -18,0 +19,0 @@ "googleapis": "0.2.x", |
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
96287
27
2324
7
9
+ Addedftp@0.3.x
+ Addedcore-util-is@1.0.3(transitive)
+ Addedftp@0.3.10(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedisarray@0.0.1(transitive)
+ Addedreadable-stream@1.1.14(transitive)
+ Addedstring_decoder@0.10.31(transitive)
+ Addedxregexp@2.0.0(transitive)