Socket
Socket
Sign inDemoInstall

egg-core

Package Overview
Dependencies
Maintainers
12
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 4.16.0 to 4.16.1

6

History.md
4.16.1 / 2019-03-20
==================
**fixes**
* [[`6bbbca2`](http://github.com/eggjs/egg-core/commit/6bbbca275f6573f125979fa215fea62285be201d)] - fix: change non-exports type to interface (#206) (吖猩 <<whxaxes@qq.com>>)
4.16.0 / 2019-03-19

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

52

index.d.ts

@@ -56,3 +56,3 @@ import KoaApplication = require('koa');

export class EggCore<Config = PlainObject> extends KoaApplication {
export interface EggCoreBase<Config> extends KoaApplication {
/**

@@ -82,12 +82,2 @@ * Whether `application` or `agent`

/**
* @constructor
* @param {Object} options - options
* @param {String} [options.baseDir=process.cwd()] - the directory of application
* @param {String} [options.type=application|agent] - whether it's running in app worker or agent worker
* @param {Object} [options.plugins] - custom plugins
* @since 1.0.0
*/
constructor(options?: EggCoreOptions);
/**
* Convert a generator function to a promisable one.

@@ -212,3 +202,5 @@ *

deprecate: depd.Deprecate;
}
export interface EggCore<Config = PlainObject> extends EggCoreBase<Config> {
Controller: typeof BaseContextClass;

@@ -218,2 +210,14 @@ Service: typeof BaseContextClass;

export class EggCore {
/**
* @constructor
* @param {Object} options - options
* @param {String} [options.baseDir=process.cwd()] - the directory of application
* @param {String} [options.type=application|agent] - whether it's running in app worker or agent worker
* @param {Object} [options.plugins] - custom plugins
* @since 1.0.0
*/
constructor(options?: EggCoreOptions);
}
/**

@@ -308,10 +312,4 @@ * egg app info

declare class FileLoader {
declare interface FileLoaderBase {
/**
* Load files from directory to target object.
* @since 1.0.0
*/
constructor(options: FileLoaderOption);
/**
* attach items to target object. Mapping the directory to properties.

@@ -353,4 +351,14 @@ * `app/controller/group/repository.js` => `target.group.repository`

declare class ContextLoader extends FileLoader {
declare interface ContextLoaderBase extends FileLoaderBase {}
export interface FileLoader {
/**
* Load files from directory to target object.
* @since 1.0.0
*/
new (options: FileLoaderOption): FileLoaderBase;
}
export interface ContextLoader {
/**
* Same as {@link FileLoader}, but it will attach file to `inject[fieldClass]`. The exports will be lazy loaded, such as `ctx.group.repository`.

@@ -360,3 +368,3 @@ * @extends FileLoader

*/
constructor(options: ContextLoaderOption);
new (options: ContextLoaderOption): ContextLoaderBase;
}

@@ -452,4 +460,4 @@

FileLoader: typeof FileLoader;
ContextLoader: typeof ContextLoader;
FileLoader: FileLoader;
ContextLoader: ContextLoader;

@@ -456,0 +464,0 @@ // load methods

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

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

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