mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(package) Util.check -> checkup
This commit is contained in:
parent
5de8ffc4d9
commit
412537a7ae
4 changed files with 10 additions and 8 deletions
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
Util = require(DIR_LIB + 'util'),
|
||||
CloudFunc = require(DIR_LIB + 'cloudfunc'),
|
||||
check = Util.check,
|
||||
check = require('checkup'),
|
||||
|
||||
tryRequire = require('tryrequire'),
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
rendy = require('rendy'),
|
||||
copymitter = require('copymitter'),
|
||||
tryCatch = require('try-catch'),
|
||||
check = require('checkup'),
|
||||
|
||||
Modules = require(DIR_JSON + 'modules'),
|
||||
|
||||
|
|
@ -69,7 +70,7 @@
|
|||
response : response
|
||||
};
|
||||
|
||||
Util.check(arguments, ['request', 'response', 'next']);
|
||||
check(arguments, ['request', 'response', 'next']);
|
||||
|
||||
apiURL = CloudFunc.apiURL;
|
||||
name = ponse.getPathName(request);
|
||||
|
|
@ -188,7 +189,7 @@
|
|||
function onPUT(name, body, callback) {
|
||||
var cmd, files, data, from, to, error, msg;
|
||||
|
||||
Util.check(arguments, ['name', 'body', 'callback']);
|
||||
check(arguments, ['name', 'body', 'callback']);
|
||||
|
||||
if (name[0] === '/')
|
||||
cmd = name.replace('/', '');
|
||||
|
|
@ -359,7 +360,7 @@
|
|||
});
|
||||
};
|
||||
|
||||
Util.check(arguments, ['files', 'processFunc', 'callback']);
|
||||
check(arguments, ['files', 'processFunc', 'callback']);
|
||||
|
||||
copy();
|
||||
}
|
||||
|
|
@ -382,7 +383,7 @@
|
|||
|
||||
function formatMsg(msgParam, dataParam, status) {
|
||||
var msg, data,
|
||||
isObj = Util.type.object(dataParam);
|
||||
isObj = typeof dataParam === 'object';
|
||||
|
||||
if (isObj)
|
||||
data = json.stringify(dataParam);
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
|
||||
minify = require('minify'),
|
||||
format = require('format-io'),
|
||||
check = require('checkup'),
|
||||
|
||||
config = require(DIR_SERVER + 'config'),
|
||||
|
||||
Util = require(DIR_LIB + 'util'),
|
||||
CloudFunc = require(DIR_LIB + 'cloudfunc'),
|
||||
|
||||
PATH_INDEX = DIR_FS + 'index.html',
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
lenthPath = TMPL_PATH.length,
|
||||
isRead = lengthTmpl === lenthPath;
|
||||
|
||||
Util.check(arguments, ['callback']);
|
||||
check(arguments, ['callback']);
|
||||
|
||||
if (isRead) {
|
||||
callback();
|
||||
|
|
@ -128,7 +128,7 @@
|
|||
function route(request, response, callback) {
|
||||
var name, p, isAuth, isFS, path;
|
||||
|
||||
Util.check(arguments, ['req', 'res', 'callback']);
|
||||
check(arguments, ['req', 'res', 'callback']);
|
||||
|
||||
name = ponse.getPathName(request);
|
||||
isAuth = RegExp('^(/auth|/auth/github)$').test(name);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
"subdomain": "cloudcmd",
|
||||
"dependencies": {
|
||||
"ashify": "~1.0.0",
|
||||
"checkup": "~1.0.3",
|
||||
"console-io": "~2.2.0",
|
||||
"copymitter": "~1.5.0",
|
||||
"dword": "~1.3.2",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue