zeanium-node
Advanced tools
Comparing version 0.6.43 to 0.6.44
{ | ||
"name": "zeanium-node", | ||
"version": "0.6.43", | ||
"version": "0.6.44", | ||
"description": "Zeanium for Node.js, simple http server and custome your business.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -180,5 +180,6 @@ # zeanium-node | ||
npm install zeanium-node -g | ||
git clone https://github.com/yangyxu/zeanium-node-demo.git | ||
cd zeanium-node-demo | ||
zn run config:zn.workspace.config.js | ||
git clone https://github.com/yangyxu/zn-app-demo.git | ||
cd zn-app-demo | ||
npm install | ||
zn run | ||
``` | ||
@@ -185,0 +186,0 @@ The terminal will show the message for http server. |
zn.define(function () { | ||
var process = require('child_process'); | ||
return zn.Controller('$', { | ||
@@ -8,2 +10,39 @@ methods: { | ||
}, | ||
pull: { | ||
method: 'GET', | ||
value: function (request, response, chain){ | ||
process.exec('git pull', function (error, stdout, stderr) { | ||
if (error !== null) { | ||
response.error(error); | ||
}else { | ||
response.success(stdout); | ||
} | ||
}); | ||
} | ||
}, | ||
commit: { | ||
method: 'GET', | ||
value: function (request, response, chain){ | ||
var _commit = request.getValue('commit') || 'commit'; | ||
process.exec('git add *', function (error, stdout, stderr) { | ||
if (error !== null) { | ||
response.error(error); | ||
}else { | ||
process.exec('git commit -m "' + _commit + '"', function (error, stdout, stderr){ | ||
if (error !== null) { | ||
response.error(error); | ||
}else { | ||
process.exec('git push', function (error, stdout, stderr){ | ||
if (error !== null) { | ||
response.error(error); | ||
}else { | ||
response.success(stdout); | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
}, | ||
redeploy: { | ||
@@ -10,0 +49,0 @@ method: 'GET/POST', |
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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
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
267703
6217
226
1