Comparing version 1.0.6 to 1.0.7
@@ -42,11 +42,11 @@ var chalk = require('chalk'); | ||
func.handler(JSON.stringify(data), {}, function(error, data) { | ||
func.handler(wrapData(data), {}, function(error, data) { | ||
var now = new Date(); | ||
var rtn = now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate() + ' ' + now.getHours() + ':' + now.getMinutes() + ':' + now.getSeconds(); | ||
if (error) { | ||
rtn += '【error】'; | ||
rtn += '[error]'; | ||
} else { | ||
rtn += '【info】'; | ||
rtn += '[info]'; | ||
} | ||
rtn += '函数运行结果:'; | ||
rtn += '函数运行结果:'; | ||
console.log(rtn); | ||
@@ -57,2 +57,9 @@ log(error || data); | ||
const wrapData = function (data) { | ||
data.toString = function () { | ||
return JSON.stringify(data); | ||
} | ||
return data; | ||
} | ||
exports.run = run; |
{ | ||
"name": "fc-run", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "a boot tool for ali function-compute proj", | ||
@@ -5,0 +5,0 @@ "main": "fc-run.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
3300
55