Socket
Socket
Sign inDemoInstall

egg-core

Package Overview
Dependencies
Maintainers
4
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-core - npm Package Compare versions

Comparing version 3.3.1 to 3.4.0

6

History.md
3.4.0 / 2017-04-18
==================
* refactor: export getHomedir that can be extended (#78)
* feat: expose eggPlugins (#77)
3.3.1 / 2017-04-17

@@ -3,0 +9,0 @@ ==================

13

lib/loader/egg_loader.js

@@ -8,2 +8,3 @@ 'use strict';

const debug = require('debug')('egg-core');
const homedir = require('node-homedir');
const FileLoader = require('./file_loader');

@@ -132,2 +133,12 @@ const ContextLoader = require('./context_loader');

/**
* Get home directory
* @return {String} home directory
* @since 3.4.0
*/
getHomedir() {
// EGG_HOME for test
return process.env.EGG_HOME || homedir() || '/home/admin';
}
/**
* Get app info

@@ -139,3 +150,3 @@ * @return {AppInfo} appInfo

const env = this.serverEnv;
const home = utils.getHomedir();
const home = this.getHomedir();
const baseDir = this.options.baseDir;

@@ -142,0 +153,0 @@

@@ -92,2 +92,3 @@ 'use strict';

this.customPlugins = customPlugins;
this.eggPlugins = eggPlugins;

@@ -94,0 +95,0 @@ this._extendPlugins(this.allPlugins, eggPlugins);

6

lib/utils/index.js
'use strict';
const co = require('co');
const homedir = require('node-homedir');
const is = require('is-type-of');

@@ -32,7 +31,2 @@

getHomedir() {
// EGG_HOME for test
return process.env.EGG_HOME || homedir() || '/home/admin';
},
methods: [ 'head', 'options', 'get', 'put', 'patch', 'post', 'delete' ],

@@ -39,0 +33,0 @@

{
"name": "egg-core",
"version": "3.3.1",
"version": "3.4.0",
"description": "A core Pluggable framework based on koa",

@@ -12,3 +12,4 @@ "main": "index.js",

"cov": "egg-bin cov",
"ci": "npm run lint && npm run cov"
"pkgfiles": "egg-bin pkgfiles",
"ci": "egg-bin pkgfiles --check && npm run lint && npm run cov"
},

@@ -36,6 +37,6 @@ "repository": {

"devDependencies": {
"autod": "^2.7.1",
"egg-bin": "^2.2.1",
"egg-ci": "^1.1.0",
"eslint": "^3.16.1",
"autod": "^2.8.0",
"egg-bin": "^3.3.0",
"egg-ci": "^1.6.0",
"eslint": "^3.19.0",
"eslint-config-egg": "^3.2.0",

@@ -45,3 +46,3 @@ "mm": "^2.1.0",

"pedding": "^1.1.0",
"rimraf": "^2.6.0",
"rimraf": "^2.6.1",
"spy": "^1.0.0",

@@ -52,3 +53,3 @@ "supertest": "^3.0.0"

"co": "^4.6.0",
"debug": "^2.6.1",
"debug": "^2.6.3",
"depd": "^1.1.0",

@@ -61,4 +62,4 @@ "egg-logger": "^1.5.0",

"is-type-of": "^1.0.0",
"koa": "^1.2.5",
"koa-router": "^5.4.0",
"koa": "^1.4.0",
"koa-router": "^5.4.1",
"node-homedir": "^1.0.0",

@@ -69,5 +70,5 @@ "ready-callback": "^2.0.1",

"files": [
"lib",
"index.js"
"index.js",
"lib"
]
}
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