Skip to content

Commit

Permalink
Merge branch 'main' into support_v3_logger
Browse files Browse the repository at this point in the history
  • Loading branch information
czy88840616 authored Nov 13, 2023
2 parents 799bbf1 + 56920d4 commit 2fe05c9
Show file tree
Hide file tree
Showing 148 changed files with 2,543 additions and 410 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
node-version: ['lts/*']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ jobs:
steps:
- name: Git checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/precheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ jobs:

steps:
- name: Git checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/presite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
matrix:
node-version: [ 16.x ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
node-version: [16.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand Down
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,55 @@
# Change Log


## v3.12.10 (2023-11-05)

#### :package: Dependencies
* `axios`, `http-proxy`
* [#3400](https://github.com/midwayjs/midway/pull/3400) fix(deps): update dependency axios to v1.6.0 ([@renovate[bot]](https://github.com/apps/renovate))
* Other
* [#3398](https://github.com/midwayjs/midway/pull/3398) chore(deps): update actions/checkout action to v4 ([@renovate[bot]](https://github.com/apps/renovate))
* [#3399](https://github.com/midwayjs/midway/pull/3399) chore(deps): update actions/setup-node action to v4 ([@renovate[bot]](https://github.com/apps/renovate))
* `bull-board`, `bull`
* [#3397](https://github.com/midwayjs/midway/pull/3397) fix(deps): update bull monorepo ([@renovate[bot]](https://github.com/apps/renovate))
* `mock`, `ws`
* [#3395](https://github.com/midwayjs/midway/pull/3395) fix(deps): update dependency ws to v8.14.2 ([@renovate[bot]](https://github.com/apps/renovate))
* `casbin-redis-adapter`, `casbin-typeorm-adapter`, `casbin`
* [#3392](https://github.com/midwayjs/midway/pull/3392) fix(deps): update dependency casbin to v5.27.1 ([@renovate[bot]](https://github.com/apps/renovate))
* `leoric`
* [#3396](https://github.com/midwayjs/midway/pull/3396) fix(deps): update dependency leoric to v2.11.5 ([@renovate[bot]](https://github.com/apps/renovate))
* `cron`
* [#3393](https://github.com/midwayjs/midway/pull/3393) fix(deps): update dependency cron to v2.4.4 ([@renovate[bot]](https://github.com/apps/renovate))
* `validate`
* [#3394](https://github.com/midwayjs/midway/pull/3394) fix(deps): update dependency joi to v17.11.0 ([@renovate[bot]](https://github.com/apps/renovate))
* `jwt`
* [#3384](https://github.com/midwayjs/midway/pull/3384) fix(deps): update dependency @types/jsonwebtoken to v9.0.4 ([@renovate[bot]](https://github.com/apps/renovate))
* `cos`
* [#3385](https://github.com/midwayjs/midway/pull/3385) fix(deps): update dependency cos-nodejs-sdk-v5 to v2.12.5 ([@renovate[bot]](https://github.com/apps/renovate))

#### Committers: 1
- Harry Chen ([@czy88840616](https://github.com/czy88840616))



## v3.12.9 (2023-11-02)

#### :bug: Bug Fix
* `swagger`
* [#3382](https://github.com/midwayjs/midway/pull/3382) fix(swagger): api property should support $ref ([@odex21](https://github.com/odex21))

#### :package: Dependencies
* `axios`, `consul`
* [#3373](https://github.com/midwayjs/midway/pull/3373) chore(deps): update dependency nock to v13.3.7 ([@renovate[bot]](https://github.com/apps/renovate))
* `mongoose`, `typegoose`
* [#3375](https://github.com/midwayjs/midway/pull/3375) chore(deps): update dependency mongoose to v7.6.4 ([@renovate[bot]](https://github.com/apps/renovate))
* `oss`
* [#3364](https://github.com/midwayjs/midway/pull/3364) fix(deps): update dependency @types/ali-oss to v6.16.10 ([@renovate[bot]](https://github.com/apps/renovate))

#### Committers: 1
- [@odex21](https://github.com/odex21)



## v3.12.8 (2023-10-25)

#### :bug: Bug Fix
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@
"cacheDir": ".changelog"
},
"npmClient": "npm",
"version": "3.12.8"
"version": "3.12.10"
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"version": "1.0.0",
"devDependencies": {
"@nrwl/tao": "16.10.0",
"@types/jest": "29.5.6",
"@types/node": "18.18.7",
"@types/jest": "29.5.8",
"@types/node": "18.18.9",
"@vercel/ncc": "0.38.1",
"autocannon": "7.12.0",
"jest": "29.7.0",
"lerna": "7.4.1",
"lerna": "7.4.2",
"lerna-changelog": "2.2.0",
"madge": "6.1.0",
"mwts": "1.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages-legacy/egg-layer/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@midwayjs/egg-layer",
"private": true,
"version": "3.12.8",
"version": "3.12.10",
"main": "index.js",
"scripts": {
"test": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand --forceExit"
Expand All @@ -17,7 +17,7 @@
"@midwayjs/serverless-fc-trigger": "^3.12.5",
"@midwayjs/serverless-scf-starter": "^3.12.5",
"@midwayjs/serverless-scf-trigger": "^3.12.5",
"@midwayjs/web": "^3.12.8",
"@midwayjs/web": "^3.12.10",
"egg": "^2.28.0",
"supertest": "6.3.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages-legacy/koa-layer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@midwayjs/serverless-fc-trigger": "^3.12.5",
"@midwayjs/serverless-scf-starter": "^3.12.5",
"@midwayjs/serverless-scf-trigger": "^3.12.5",
"koa": "2.14.1",
"koa": "2.14.2",
"koa-bodyparser": "4.4.1",
"koa-router": "11.0.2",
"supertest": "6.3.3"
Expand Down
4 changes: 2 additions & 2 deletions packages-legacy/orm/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@midwayjs/orm",
"private": true,
"version": "3.12.8",
"version": "3.12.10",
"main": "dist/index.js",
"typings": "index.d.ts",
"files": [
Expand All @@ -11,7 +11,7 @@
],
"devDependencies": {
"@midwayjs/core": "^3.12.3",
"@midwayjs/mock": "^3.12.8",
"@midwayjs/mock": "^3.12.10",
"sqlite3": "5.1.6",
"typeorm": "0.3.17"
},
Expand Down
6 changes: 3 additions & 3 deletions packages-legacy/serverless-app/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@midwayjs/serverless-app",
"private": true,
"version": "3.12.8",
"version": "3.12.10",
"main": "dist/index.js",
"typings": "index.d.ts",
"dependencies": {
"@midwayjs/bootstrap": "^3.12.5",
"@midwayjs/faas": "^3.12.8",
"@midwayjs/faas": "^3.12.10",
"@midwayjs/faas-typings": "^3.10.13",
"@midwayjs/gateway-common-http": "^1.2.41",
"@midwayjs/serverless-spec-builder": "^1.2.41",
Expand All @@ -17,7 +17,7 @@
"@midwayjs/core": "^3.12.3",
"@midwayjs/decorator": "^3.12.3",
"@midwayjs/faas-middleware-upload": "0.0.7",
"@midwayjs/mock": "^3.12.8",
"@midwayjs/mock": "^3.12.10",
"@midwayjs/serverless-fc-starter": "^3.12.5",
"@midwayjs/serverless-fc-trigger": "^3.12.5",
"@midwayjs/serverless-scf-starter": "^3.12.5",
Expand Down
2 changes: 1 addition & 1 deletion packages-legacy/static-layer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@midwayjs/serverless-fc-trigger": "^3.12.5",
"@midwayjs/serverless-scf-starter": "^3.12.5",
"@midwayjs/serverless-scf-trigger": "^3.12.5",
"koa": "2.14.1",
"koa": "2.14.2",
"koa-static-cache": "5.1.4",
"path-to-regexp": "6.2.1",
"request": "2.88.2",
Expand Down
10 changes: 5 additions & 5 deletions packages-legacy/task/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@midwayjs/task",
"version": "3.12.8",
"version": "3.12.10",
"private": true,
"description": "midway component for task and schedule",
"main": "dist/index.js",
Expand All @@ -24,14 +24,14 @@
"license": "MIT",
"devDependencies": {
"@midwayjs/core": "^3.12.3",
"@midwayjs/koa": "^3.12.8",
"@midwayjs/mock": "^3.12.8",
"@midwayjs/koa": "^3.12.10",
"@midwayjs/mock": "^3.12.10",
"@types/bull": "3.15.9",
"@types/cron": "2.0.1"
},
"dependencies": {
"bull": "4.11.3",
"cron": "2.3.1"
"bull": "4.11.4",
"cron": "2.4.4"
},
"engines": {
"node": ">=12"
Expand Down
4 changes: 2 additions & 2 deletions packages-serverless/midway-fc-starter/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@midwayjs/fc-starter",
"version": "3.12.8",
"version": "3.12.10",
"main": "dist/index.js",
"typings": "index.d.ts",
"dependencies": {
"@midwayjs/async-hooks-context-manager": "^3.12.3",
"@midwayjs/faas": "^3.12.8",
"@midwayjs/faas": "^3.12.10",
"raw-body": "2.5.2"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/axios/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@midwayjs/axios",
"description": "midway http client with axios",
"version": "3.12.8",
"version": "3.12.10",
"main": "dist/index.js",
"typings": "index.d.ts",
"files": [
Expand All @@ -11,11 +11,11 @@
],
"devDependencies": {
"@midwayjs/core": "^3.12.3",
"@midwayjs/mock": "^3.12.8",
"nock": "13.3.6"
"@midwayjs/mock": "^3.12.10",
"nock": "13.3.8"
},
"dependencies": {
"axios": "1.5.1"
"axios": "1.6.1"
},
"keywords": [
"http client",
Expand Down
14 changes: 7 additions & 7 deletions packages/bull-board/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@midwayjs/bull-board",
"version": "3.12.8",
"version": "3.12.10",
"description": "midway component for bull",
"main": "dist/index.js",
"typings": "index.d.ts",
Expand All @@ -25,14 +25,14 @@
"license": "MIT",
"devDependencies": {
"@midwayjs/core": "^3.12.3",
"@midwayjs/express": "^3.12.8",
"@midwayjs/koa": "^3.12.8",
"@midwayjs/mock": "^3.12.8"
"@midwayjs/express": "^3.12.10",
"@midwayjs/koa": "^3.12.10",
"@midwayjs/mock": "^3.12.10"
},
"dependencies": {
"@bull-board/api": "5.8.4",
"@bull-board/ui": "5.8.4",
"@midwayjs/bull": "^3.12.8",
"@bull-board/api": "5.9.1",
"@bull-board/ui": "5.9.1",
"@midwayjs/bull": "^3.12.10",
"ejs": "3.1.9"
},
"engines": {
Expand Down
6 changes: 3 additions & 3 deletions packages/bull/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@midwayjs/bull",
"version": "3.12.8",
"version": "3.12.10",
"description": "midway component for bull",
"main": "dist/index.js",
"typings": "index.d.ts",
Expand All @@ -25,10 +25,10 @@
"license": "MIT",
"devDependencies": {
"@midwayjs/core": "^3.12.3",
"@midwayjs/mock": "^3.12.8"
"@midwayjs/mock": "^3.12.10"
},
"dependencies": {
"bull": "4.11.3"
"bull": "4.11.4"
},
"engines": {
"node": ">=12"
Expand Down
36 changes: 19 additions & 17 deletions packages/bull/src/framework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ export class BullFramework
extend(true, {}, this.bullDefaultQueueConfig, queueOptions)
);
this.queueMap.set(name, queue);
queue.on('error', err => {
this.app.getCoreLogger().error(err);
});
return queue;
}

Expand Down Expand Up @@ -143,26 +146,25 @@ export class BullFramework
from: processor,
});

ctx.logger.info(`start process job ${job.id} from ${processor.name}`);
try {
ctx.logger.info(`start process job ${job.id} from ${processor.name}`);

const isPassed = await this.app
.getFramework()
.runGuard(ctx, processor, 'execute');
if (!isPassed) {
throw new MidwayInvokeForbiddenError('execute', processor);
}
const isPassed = await this.app
.getFramework()
.runGuard(ctx, processor, 'execute');
if (!isPassed) {
throw new MidwayInvokeForbiddenError('execute', processor);
}

const service = await ctx.requestContext.getAsync<IProcessor>(
processor as any
);
const fn = await this.applyMiddleware(async ctx => {
return await Utils.toAsyncFunction(service.execute.bind(service))(
job.data,
job
const service = await ctx.requestContext.getAsync<IProcessor>(
processor as any
);
});

try {
const fn = await this.applyMiddleware(async ctx => {
return await Utils.toAsyncFunction(service.execute.bind(service))(
job.data,
job
);
});
const result = await Promise.resolve(await fn(ctx));
ctx.logger.info(
`complete process job ${job.id} from ${processor.name}`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name": "ali-demo"
}
Loading

0 comments on commit 2fe05c9

Please sign in to comment.