Skip to content

Commit

Permalink
chore(deps): update dependency tsbb to v3 (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 11, 2021
1 parent 5d3c0bc commit 9cac219
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@
"name": "mocker-api",
"private": true,
"description": "This is dev support mock RESTful API.",
"workspaces": [
"packages/*",
"example/*"
],
"workspaces": {
"packages": [
"packages/*",
"example/*"
],
"nohoist": [
"**/tsbb",
"**/tsbb/**"
]
},
"scripts": {
"build": "npm run build:ts && npm run build:types",
"build:types": "yarn workspace mocker-api tsbb types",
"build:ts": "yarn workspace mocker-api tsbb build",
"doc": "yarn workspace mocker-api typedoc src/index.ts src/delay.ts --name mocker-api",
"watch": "npm run watch:ts & yarn run watch:types",
"watch:ts": "yarn workspace mocker-api tsbb watch",
"watch:types": "npm run build:types -- --watch",
"build": "yarn workspace mocker-api tsbb build --no-esm",
"watch": "yarn workspace mocker-api tsbb watch --no-esm",
"test": "yarn workspace mocker-api tsbb test",
"coverage": "yarn workspace mocker-api tsbb test --coverage",
"example:base": "yarn workspace base api"
Expand All @@ -26,7 +28,7 @@
"license": "MIT",
"author": "Kenny Wong <wowohoo@qq.com>",
"devDependencies": {
"tsbb": "2.2.1",
"tsbb": "3.1.6",
"typescript": "4.3.5",
"typedoc": "0.21.4"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/delay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ export default function delay(proxy: MockerProxyRoute, timer: number = 0): Mocke
});

return mockApi;
}
}
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export interface MockerOption {
const pathToRegexp = toRegexp.pathToRegexp;
let mocker: MockerProxyRoute = {};

export default function (app: Application, watchFile: string | string[] | MockerProxyRoute, conf: MockerOption = {}) {
export default function mockerApi(app: Application, watchFile: string | string[] | MockerProxyRoute, conf: MockerOption = {}) {
const watchFiles = (Array.isArray(watchFile) ? watchFile : typeof watchFile === 'string' ? [watchFile] : []).map(str => PATH.resolve(str));

if (watchFiles.some(file => !file)) {
Expand Down
16 changes: 7 additions & 9 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
"allowSyntheticDefaultImports": true,
"declaration": true,
"noImplicitAny": true,
"strict": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"skipLibCheck": true,
"outDir": "lib",
"baseUrl": "./",
"paths": {
"*": [
"node_modules/*"
]
}
"types": ["jest", "node"],
"baseUrl": "."
},
"include": [
"src/**/*"
]
"include": ["src/**/*"]
}

0 comments on commit 9cac219

Please sign in to comment.