-
Notifications
You must be signed in to change notification settings - Fork 565
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52cbed5
commit fe3a74a
Showing
106 changed files
with
882 additions
and
673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "./node_modules/mwts/", | ||
"ignorePatterns": ["node_modules", "dist", "fixtures"], | ||
"env": { | ||
"mocha": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
...require('mwts/.prettierrc.json') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
get fctx() { | ||
if (!this.request.fctx) { | ||
return this.app; | ||
} | ||
return this.request.fctx; | ||
}, | ||
get fctx() { | ||
if (!this.request.fctx) { | ||
return this.app; | ||
} | ||
return this.request.fctx; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
const egg = require('egg'); | ||
|
||
const EGG_PATH = Symbol.for('egg#eggPath'); | ||
exports.getFramework = (framework) => { | ||
const customerEgg = framework ? require(framework) : egg; | ||
function extendsBase(BaseClass) { | ||
return class LayerWrapper extends BaseClass { | ||
get [EGG_PATH]() { | ||
return __dirname; | ||
} | ||
createAnonymousContext(req) { | ||
const ctx = super.createAnonymousContext(req); | ||
if (req && req.fctx) { | ||
ctx.request.fctx = req.fctx; | ||
} | ||
return ctx; | ||
} | ||
|
||
exports.getFramework = framework => { | ||
const customerEgg = framework ? require(framework) : egg; | ||
function extendsBase(BaseClass) { | ||
return class LayerWrapper extends BaseClass { | ||
get [EGG_PATH]() { | ||
return __dirname; | ||
} | ||
createAnonymousContext(req) { | ||
const ctx = super.createAnonymousContext(req); | ||
if (req && req.fctx) { | ||
ctx.request.fctx = req.fctx; | ||
} | ||
} | ||
exports.Agent = extendsBase(customerEgg.Agent) | ||
exports.Application = extendsBase(customerEgg.Application); | ||
} | ||
return ctx; | ||
} | ||
}; | ||
} | ||
exports.Agent = extendsBase(customerEgg.Agent); | ||
exports.Application = extendsBase(customerEgg.Application); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface IProviderInstance {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
import { BasePlugin } from '../../src'; | ||
|
||
class StoreGet extends BasePlugin { | ||
|
Oops, something went wrong.