zeanium-node
Advanced tools
Comparing version 0.5.5 to 0.5.6
@@ -1,2 +0,1 @@ | ||
module.exports = require('./src/zn.core.minx.js'); | ||
//module.exports = require('zeanium'); | ||
module.exports = require('./src/zn.js'); |
{ | ||
"name": "zeanium-node", | ||
"version": "0.5.5", | ||
"version": "0.5.6", | ||
"description": "Zeanium for Node.js, simple http server and custome your business.", | ||
"main": "index.js", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"start": "node ./bin/zn.http.server run" | ||
"start": "node ./bin/zn run" | ||
}, | ||
@@ -19,2 +16,5 @@ "repository": { | ||
"command", | ||
"http", | ||
"websocket", | ||
"http-server", | ||
"back-end", | ||
@@ -34,12 +34,11 @@ "service", | ||
"dependencies": { | ||
"chokidar": "^1.6.1", | ||
"formidable": "^1.0.17", | ||
"ioredis": "^1.15.1", | ||
"chokidar": "^1.7.0", | ||
"formidable": "^1.1.1", | ||
"mysql": "^2.13.0", | ||
"zeanium": "^1.1.7" | ||
"zeanium": "^1.1.8" | ||
}, | ||
"preferGlobal": "true", | ||
"bin": { | ||
"zn": "./bin/zn.http.server" | ||
"zn": "./bin/zn" | ||
} | ||
} |
/** | ||
* Created by yangyxu on 7/14/15. | ||
*/ | ||
zn.define([ | ||
'node:ioredis' | ||
],function (ioredis) { | ||
zn.define(function () { | ||
return zn.Class('Cache', { | ||
properties: { | ||
ip: '127.0.0.1', | ||
port: 6379, | ||
name: '_cache' | ||
}, | ||
return zn.Class({ | ||
methods: { | ||
init: function (objs){ | ||
this.sets(objs); | ||
this._client = ioredis.createClient(this.port, this.ip); | ||
this._client.on("connect", this.__onClientConnect.bind(this)); | ||
this._client.on("error", this.__onClientError); | ||
}, | ||
close: function (){ | ||
this._client.quit(function (err, res) { | ||
zn.info('Cache Client ' + this.name + ' Exited.'); | ||
}); | ||
}, | ||
set: function (key, value){ | ||
return this._client.set(key, value), this; | ||
}, | ||
get: function (key, callback){ | ||
var _defer = zn.async.defer(); | ||
this._client.get(key, function (err, reply){ | ||
if(reply) { | ||
_defer.resolve(reply); | ||
} else { | ||
_defer.reject(err); | ||
} | ||
}); | ||
return _defer.promise; | ||
}, | ||
__onClientError: function (err){ | ||
zn.error('Cache Client Error: ' + err); | ||
}, | ||
__onClientConnect: function (){ | ||
zn.info('Cache Client Connect: ' + this.name); | ||
} | ||
@@ -47,0 +11,0 @@ } |
zn.define([ | ||
'./Cache', | ||
'./CacheManager' | ||
],function (Cache, CacheManager){ | ||
return { | ||
Cache: Cache, | ||
CacheManager: CacheManager | ||
} | ||
}); | ||
]); |
@@ -10,3 +10,3 @@ /** | ||
return zn.Class('Create', { | ||
return zn.Class({ | ||
properties: { | ||
@@ -13,0 +13,0 @@ env: null, |
@@ -10,3 +10,3 @@ /** | ||
return zn.Class('Develop', { | ||
return zn.Class({ | ||
properties: { | ||
@@ -13,0 +13,0 @@ env: null, |
@@ -10,3 +10,3 @@ /** | ||
return zn.Class('Create', { | ||
return zn.Class({ | ||
properties: { | ||
@@ -13,0 +13,0 @@ env: null, |
@@ -10,3 +10,3 @@ /** | ||
return zn.Class('Install', { | ||
return zn.Class({ | ||
properties: { | ||
@@ -13,0 +13,0 @@ env: null, |
@@ -10,3 +10,3 @@ /** | ||
return zn.Class('Run', { | ||
return zn.Class({ | ||
properties: { | ||
@@ -13,0 +13,0 @@ env: null, |
zn.define(function () { | ||
var Controller = zn.Class('Controller', { | ||
var Controller = zn.Class({ | ||
methods: { | ||
@@ -5,0 +5,0 @@ init: { |
/** | ||
* Created by yangyxu on 8/20/14. | ||
*/ | ||
zn.define(['node:path'],function (node_path) { | ||
zn.define([ | ||
'node:path' | ||
],function (node_path) { | ||
@@ -6,0 +8,0 @@ return zn.RequestHandler('ResourceRequestHandler', { |
/** | ||
* Created by yangyxu on 8/20/14. | ||
*/ | ||
zn.define(['node:url'], function (node_url) { | ||
zn.define([ | ||
'node:url' | ||
], function (node_url) { | ||
@@ -6,0 +8,0 @@ return zn.RequestHandler('RestfulRequestHandler', { |
@@ -5,3 +5,3 @@ /** | ||
zn.define([ | ||
'./config/server', | ||
'./config/zn.server.config.js', | ||
'./HttpServerContext', | ||
@@ -8,0 +8,0 @@ 'node:http', |
zn.define({ | ||
deploy: 'app', | ||
models: '/src/model/', | ||
@@ -3,0 +4,0 @@ controllers: '/src/controller/', |
@@ -6,3 +6,3 @@ /** | ||
'../../templete/html/exports.js', | ||
'./config/mime', | ||
'./config/zn.mime.config.js', | ||
'node:fs', | ||
@@ -9,0 +9,0 @@ 'node:path' |
zn.define(function () { | ||
return zn.Controller('api',{ | ||
properties: { | ||
}, | ||
methods: { | ||
@@ -8,0 +5,0 @@ list: function (request, response) { |
@@ -6,3 +6,2 @@ zn.define(function () { | ||
index: function (request, response) { | ||
console.log('xxx'); | ||
response.success('default index'); | ||
@@ -9,0 +8,0 @@ } |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
4
2
6
282184
6564
- Removedioredis@^1.15.1
- Removedbluebird@2.11.0(transitive)
- Removeddouble-ended-queue@2.1.0-0(transitive)
- Removedflexbuffer@0.0.6(transitive)
- Removedioredis@1.15.1(transitive)
- Removedlodash@3.10.1(transitive)
Updatedchokidar@^1.7.0
Updatedformidable@^1.1.1
Updatedzeanium@^1.1.8