Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
const requestProto = require('koa/lib/request');
const responseProto = require('koa/lib/response');
const contextProto = require('koa/lib/context');
const applicationProto = require('koa/lib/application').prototype;
const completeAssign = require('complete-assign');
const Loader = require('../core/Loader');
const baseClassProto = require('../core/base/BaseClass').prototype;
class AstroboyExtendLoader extends Loader {
load() {
// application extend
this.globDirs(this.config.applicationPattern, entries => {
entries.forEach(entry => {
completeAssign(applicationProto, require(entry));
});
});
// context extend
this.globDirs(this.config.contextPattern, entries => {
entries.forEach(entry => {