Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zeanium-node

Package Overview
Dependencies
Maintainers
1
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zeanium-node - npm Package Compare versions

Comparing version 0.6.36 to 0.6.37

2

package.json
{
"name": "zeanium-node",
"version": "0.6.36",
"version": "0.6.37",
"description": "Zeanium for Node.js, simple http server and custome your business.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -35,3 +35,3 @@ zn.define(function () {

convert: 'zn_plugin_admin_convert_user({})',
hidden: true,
//hidden: true,
default: 0,

@@ -57,3 +57,3 @@ get: function (){

ignore: true,
hidden: true,
//hidden: true,
default: 0,

@@ -60,0 +60,0 @@ auto_update: function (){

@@ -86,2 +86,45 @@ zn.define([

},
initFunction: {
method: 'GET/POST',
value: function (request, response, chain){
var _basePath = response._applicationContext._APP_PATH,
_dataPath = node_path.join(_basePath, 'src', 'function'),
_store = this.store(),
_self = this;
if(node_fs.existsSync(_dataPath)){
var _fns = [],
_sql = '',
_data = {},
_file = null,
_content = null;
node_fs.readdirSync(_dataPath).forEach(function (file){
_content = node_fs.readFileSync(node_path.join(_dataPath, file), 'utf-8');
_file = node_path.parse(node_path.join(_dataPath, file));
switch (_file.ext.toLowerCase()) {
case '.sql':
case '.txt':
if(file.indexOf('zn_function_')!=-1){
_fns = _fns.concat(_content.split('----'));
}else {
_sql += _content;
}
break;
}
});
var _tran = _store.beginTransaction();
_fns.length && _fns.forEach(function (fn_sql){
fn_sql && _tran.query(fn_sql);
});
_sql && _tran.query(_sql);
_tran.on('error', function (sender, err){
response.error(err);
}).on('finally', function (sender, data){
response.success(data);
}).commit();
}else {
response.error('不存在 ./src/function 路径');
}
}
},
initModel: {

@@ -88,0 +131,0 @@ method: 'GET/POST',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc