171 Commits

Author SHA1 Message Date
fengmk2
9bf5f22bfa
feat: use utility@2 (#5312)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Chores**
	- Updated Node.js versions in CI workflows to include version 22.
- Removed an unused parameter in the release workflow to streamline
operations.

- **Refactor**
- Improved code efficiency in HTTP client by using destructured imports.

- **Documentation**
- Updated software dependencies in `package.json` to enhance
functionality and compatibility.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-05-08 15:36:27 +08:00
fengmk2
a6ebe0f49a
feat: app.httpClient alias to app.httpclient (#5304)
let `@Inject() httpClient` work

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new alias for `httpClient` to improve accessibility and
usage within the application.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-12 14:23:53 +08:00
Wai.Dung
794d7f3e89
feat: tiny improvements for "convertValue" (#5302)
We don't need to check each value's satisfication so when one meets, the
loop can be broken.

Speed up config dump process.

## Summary by CodeRabbit

- **Refactor**
- Improved efficiency in handling `ignore` keys within utility
functions.
- Consolidated conditions for returning values for primitives and
arrays, enhancing code readability.
2024-03-31 10:59:32 +08:00
fengmk2
1fd79a2715
feat: auto set custom logger with onelogger (#5287)
https://github.com/node-modules/onelogger
2024-01-21 22:45:44 +08:00
zhennann
f5454ba47f
chore: typo fix on singleton.js (#5279)
clent -> client
2023-12-14 16:09:31 +08:00
fengmk2
b700fb962a
fix: use app.logger instead of ctx.logger (#5246)
closes https://github.com/eggjs/egg/issues/5213#issuecomment-1657771583
2023-08-01 17:46:24 +08:00
dingiyan
398fe15eb2
fix: don't require inspector module on production env (#5228)
because of production env shouldn't use inspector module and such as vercel/pkg custom node runtime remove it.
so we hope egg disable inspector on production env.

closes https://github.com/eggjs/egg/issues/5226
2023-06-25 17:50:18 +08:00
William.Tung
322b35bd97
chore: remove SingleProcess warnings (#5223)
Since we're now successfully using this feature for a long time without
obvious bugs/errors, there's no need for us to make it as an
"experinment" feature and now it's come to ture.

Ref: https://github.com/eggjs/egg/pull/3430
2023-06-24 01:08:08 +08:00
William.Tung
a634334757
chore: comments fix (#5222)
Fix for some comments in the codes.
2023-06-22 09:32:06 +08:00
William.Tung
50b6b7462c
doc: remove useless "*.jsdoc" (#5221)
These files are temporarily created for initialization and they're now
useless, remove them anyway.
2023-06-21 15:35:35 +08:00
fengmk2
98687685bb
feat: add getSingletonInstance alias to singleton.get(id) (#5216)
Co-authored-by: William.Tung <maledong_public@foxmail.com>
2023-06-19 18:55:48 +08:00
sjfkai
03c8cf743d
fix: ipc not work with worker_threads mode (#5210) 2023-06-15 09:21:18 +08:00
fengmk2
a13b35e05c
feat: use egg-security@3.0.0 (#5182)
https://github.com/eggjs/egg-security/pull/82
2023-05-10 20:59:17 +08:00
killa
615d6608ab
feat: runInAnonymousContextScope support req (#5134) 2023-01-28 11:14:27 +08:00
fengmk2
6c4e8bca1b
feat: log app start timeline on coreLogger (#5122)
https://github.com/eggjs/egg-core/pull/260
2023-01-14 00:27:36 +08:00
fengmk2
9d6acfd7c3
📦 NEW: Run async function in the anonymous context scope (#5094) 2022-12-16 12:55:06 +08:00
fengmk2
e94c7df63e
📦 NEW: Upgrade egg-logger v3 to enable localStorage (#5085)
https://github.com/eggjs/egg-logger/pull/81
2022-12-11 16:08:33 +08:00
killa
c859506a09
fix: dump config/timing when timeout (#5069) 2022-11-28 13:30:51 +08:00
sinkhaha
6de5cba5d0
feat: disable cluster-client heartbeat on debug mode (#5059)
closes https://github.com/eggjs/egg/issues/5057

Co-authored-by: eryi <eryi@gaoding.com>
2022-11-15 00:51:34 +08:00
fengmk2
610a39e7f4
👌 IMPROVE: Drop httpclient callback and thunk style (#5052)
And remove mz and mz-modules deps
2022-10-31 09:57:50 +08:00
fengmk2
3a941d669c
👌 IMPROVE: Print warnning log when boot action takes more than 5000ms (#5049) 2022-10-31 09:57:17 +08:00
fengmk2
7ee19e8402
🐛 FIX: Allow override HttpClientNext (#5037)
https://github.com/eggjs/egg/pull/5000
2022-09-28 23:00:30 +08:00
hyj1991
a0761d65f5
feat(graceful): support serverGracefulIgnoreCode (#5027)
Co-authored-by: hugh.hyj <hugh.hyj@alibaba-inc.com>
2022-09-23 13:48:43 +08:00
TZ | 天猪
733d66989d
feat: update egg-multipart 2.x -> 3.x (#5023)
closes https://github.com/eggjs/egg/issues/5018
2022-09-21 16:05:25 +08:00
fengmk2
2ffb37ab59
feat: Support urllib@3 (#5000)
closes https://github.com/eggjs/egg/issues/4847
2022-08-28 08:45:46 +08:00
TZ | 天猪
e0b93e023e
feat: should log unfinished timing item (#4968) 2022-06-17 11:53:23 +08:00
Maledong
e31c09c200
chore: fix some comments (#4937)
Fixture for some English comments in syntax.

Co-authored-by: Maledong <maledong_github@outlook.com>
2022-04-27 08:28:38 +08:00
mansonchor.github.com
c1313f5ef9
feat: dumpConfig add appInfo (#4917) 2022-04-01 09:31:30 +08:00
fengmk2
0f6589e1dc
feat: support better logger timer in precise milliseconds (#4806)
detail see https://github.com/eggjs/egg-logger/pull/74

How to use:

```js
// config.js

exports.logger = {
  enablePerformanceTimer: true,
};
```
2021-12-06 00:11:43 +08:00
fengmk2
189c478048
feat: handle ENETUNREACH error on httpclient (#4792) 2021-11-10 18:00:32 +08:00
mansonchor.github.com
13dd550769
feat: support disableDNSCache by request args handle (#4728) 2021-08-09 09:31:21 +08:00
Harry Chen
ce234226bf
fix: remove internal interval handler when close agent (#4654) 2021-04-13 12:35:44 +08:00
TZ | 天猪
9f653afe79
fix: remove clear timing && skip keep-alive after 12.19.0 (#4497) 2020-10-19 17:20:36 +08:00
TZ | 天猪
cc80c6ab86
feat: dumpconfig also dump disabled plugin (#4480) 2020-09-23 11:20:28 +08:00
TZ | 天猪
b31b47df10
feat: clear & disable timing after ready (#4421) 2020-09-08 14:12:33 +08:00
EasonQwQ
eca6b04c1c
docs:update docs about how to extends ctx.helper (#4362) 2020-06-28 14:14:52 +08:00
Yiyu He
b7718c1cc2
fix: use new URL instead of url.parse (#4048) 2019-11-15 13:12:24 +08:00
暗色调
27dacb7c9d feat:Singleton returns client name when create client (#3905) 2019-10-20 23:54:43 +08:00
Yiyu He
a9d0cf5c0d
fix: app.keys getter must have a setter either (#3891) 2019-08-21 14:40:46 +08:00
TZ | 天猪
6bfc0eb5b9
fix: error message rewrite when it has only a getter (#3796) 2019-07-17 18:02:35 +08:00
引证
489f52b5ce fix: handleRequest method should return a promise (#3820) 2019-07-17 15:10:16 +08:00
TZ | 天猪
17fab1c1d6
docs: httpclient upload files (#3682) 2019-05-07 18:06:06 +08:00
TZ | 天猪
04adcf93b8
fix: should restore agent messenger first (#3658) 2019-04-29 14:41:17 +08:00
Haoliang Gao
d3b1cb5d9d
fix: loadCustomLoader should be run before loadCustomApp (#3652) 2019-04-28 14:03:30 +08:00
TZ | 天猪
e7fbd68f32
feat: switch httpclient to httpclient2 for retry feature (#3626) 2019-04-16 16:57:46 +08:00
killa
8bb7c7e7d5 feat: add BaseHookClass (#3581)
Refs: https://github.com/eggjs/egg/issues/3454
Fixes: https://github.com/eggjs/egg/issues/3548
2019-04-16 09:45:11 +08:00
TZ | 天猪
4b13a1ffbe
chore: fix jsdocs (#3627) 2019-04-12 22:39:32 +08:00
Yiyu He
89872a76fc
Revert "feat: switch httpclient to httpclient2 for retry feature (#36… (#3622) 2019-04-12 15:25:46 +08:00
TZ | 天猪
eead318625 feat: switch httpclient to httpclient2 for retry feature (#3606) 2019-04-11 17:21:52 +08:00
Yiyu He
04adb930de fix: onClientError remove content-length header (#3544)
<!--
Thank you for your pull request. Please review below requirements.
Bug fixes and new features should include tests and possibly benchmarks.
Contributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md

感谢您贡献代码。请确认下列 checklist 的完成情况。
Bug 修复和新功能必须包含测试,必要时请附上性能测试。
Contributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md
-->

##### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [ ] `npm test` passes
- [ ] tests and/or benchmarks are included
- [ ] documentation is changed or added
- [ ] commit message follows commit guidelines

##### Affected core subsystem(s)
<!-- Provide affected core subsystem(s). -->


##### Description of change
<!-- Provide a description of the change below this comment. -->

提升测试覆盖率到 100%
2019-03-17 01:48:16 +08:00