Skip to content

Commit

Permalink
fix: should export everything (#270)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Refactor**
- Reorganized exports in the main index file for improved module
accessibility.
- Modified several utility interfaces and classes to be publicly
accessible for extended functionality and external usage.
- Added `extensionNames` to the exported utilities for additional
configuration options.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
fengmk2 committed Jun 23, 2024
1 parent e9e1f0c commit 0217618
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 467 deletions.
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,20 +282,10 @@ Please open an issue [here](https://github.com/eggjs/egg/issues).

[MIT](LICENSE)

[egg]: https://github.com/eggjs/egg

<!-- GITCONTRIBUTOR_START -->

## Contributors

|[<img src="https://avatars.githubusercontent.com/u/360661?v=4" width="100px;"/><br/><sub><b>popomore</b></sub>](https://github.com/popomore)<br/>|[<img src="https://avatars.githubusercontent.com/u/985607?v=4" width="100px;"/><br/><sub><b>dead-horse</b></sub>](https://github.com/dead-horse)<br/>|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src="https://avatars.githubusercontent.com/u/227713?v=4" width="100px;"/><br/><sub><b>atian25</b></sub>](https://github.com/atian25)<br/>|[<img src="https://avatars.githubusercontent.com/u/5856440?v=4" width="100px;"/><br/><sub><b>whxaxes</b></sub>](https://github.com/whxaxes)<br/>|[<img src="https://avatars.githubusercontent.com/u/6897780?v=4" width="100px;"/><br/><sub><b>killagu</b></sub>](https://github.com/killagu)<br/>|
| :---: | :---: | :---: | :---: | :---: | :---: |
|[<img src="https://avatars.githubusercontent.com/u/32174276?v=4" width="100px;"/><br/><sub><b>semantic-release-bot</b></sub>](https://github.com/semantic-release-bot)<br/>|[<img src="https://avatars.githubusercontent.com/u/1207064?v=4" width="100px;"/><br/><sub><b>gxcsoccer</b></sub>](https://github.com/gxcsoccer)<br/>|[<img src="https://avatars.githubusercontent.com/u/2170848?v=4" width="100px;"/><br/><sub><b>iyuq</b></sub>](https://github.com/iyuq)<br/>|[<img src="https://avatars.githubusercontent.com/u/5243774?v=4" width="100px;"/><br/><sub><b>ngot</b></sub>](https://github.com/ngot)<br/>|[<img src="https://avatars.githubusercontent.com/u/1763067?v=4" width="100px;"/><br/><sub><b>waitingsong</b></sub>](https://github.com/waitingsong)<br/>|[<img src="https://avatars.githubusercontent.com/u/17722900?v=4" width="100px;"/><br/><sub><b>initial-wu</b></sub>](https://github.com/initial-wu)<br/>|
|[<img src="https://avatars.githubusercontent.com/u/19908330?v=4" width="100px;"/><br/><sub><b>hyj1991</b></sub>](https://github.com/hyj1991)<br/>|[<img src="https://avatars.githubusercontent.com/u/15242708?v=4" width="100px;"/><br/><sub><b>mosaic101</b></sub>](https://github.com/mosaic101)<br/>|[<img src="https://avatars.githubusercontent.com/u/4627927?v=4" width="100px;"/><br/><sub><b>answord</b></sub>](https://github.com/answord)<br/>|[<img src="https://avatars.githubusercontent.com/u/18463189?v=4" width="100px;"/><br/><sub><b>ZhangDianPeng</b></sub>](https://github.com/ZhangDianPeng)<br/>|[<img src="https://avatars.githubusercontent.com/u/26317926?v=4" width="100px;"/><br/><sub><b>supperchong</b></sub>](https://github.com/supperchong)<br/>|[<img src="https://avatars.githubusercontent.com/u/16359582?v=4" width="100px;"/><br/><sub><b>superiums</b></sub>](https://github.com/superiums)<br/>|
|[<img src="https://avatars.githubusercontent.com/u/8816730?v=4" width="100px;"/><br/><sub><b>maxming2333</b></sub>](https://github.com/maxming2333)<br/>|[<img src="https://avatars.githubusercontent.com/u/3995814?v=4" width="100px;"/><br/><sub><b>chenbin92</b></sub>](https://github.com/chenbin92)<br/>|[<img src="https://avatars.githubusercontent.com/u/457552?v=4" width="100px;"/><br/><sub><b>dsonet</b></sub>](https://github.com/dsonet)<br/>|[<img src="https://avatars.githubusercontent.com/u/7530656?v=4" width="100px;"/><br/><sub><b>zhang740</b></sub>](https://github.com/zhang740)<br/>|[<img src="https://avatars.githubusercontent.com/u/456108?v=4" width="100px;"/><br/><sub><b>shaoshuai0102</b></sub>](https://github.com/shaoshuai0102)<br/>|[<img src="https://avatars.githubusercontent.com/u/1148428?v=4" width="100px;"/><br/><sub><b>mattma</b></sub>](https://github.com/mattma)<br/>|
|[<img src="https://avatars.githubusercontent.com/u/6913898?v=4" width="100px;"/><br/><sub><b>monkindey</b></sub>](https://github.com/monkindey)<br/>|[<img src="https://avatars.githubusercontent.com/u/2842176?v=4" width="100px;"/><br/><sub><b>XadillaX</b></sub>](https://github.com/XadillaX)<br/>|[<img src="https://avatars.githubusercontent.com/u/16460813?v=4" width="100px;"/><br/><sub><b>JimmyDaddy</b></sub>](https://github.com/JimmyDaddy)<br/>|[<img src="https://avatars.githubusercontent.com/u/327019?v=4" width="100px;"/><br/><sub><b>JacksonTian</b></sub>](https://github.com/JacksonTian)<br/>|[<img src="https://avatars.githubusercontent.com/u/5938871?v=4" width="100px;"/><br/><sub><b>njugray</b></sub>](https://github.com/njugray)<br/>|[<img src="https://avatars.githubusercontent.com/u/174904?v=4" width="100px;"/><br/><sub><b>army8735</b></sub>](https://github.com/army8735)<br/>|
[<img src="https://avatars.githubusercontent.com/u/7315743?v=4" width="100px;"/><br/><sub><b>AnzerWall</b></sub>](https://github.com/AnzerWall)<br/>
[![Contributors](https://contrib.rocks/image?repo=eggjs/egg-core)](https://github.com/eggjs/egg-core/graphs/contributors)

This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Tue Jun 18 2024 01:12:54 GMT+0800`.
Made with [contributors-img](https://contrib.rocks).

<!-- GITCONTRIBUTOR_END -->
[egg]: https://github.com/eggjs/egg
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"test-local": "egg-bin test",
"preci": "npm run prepublishOnly",
"ci": "npm run lint && egg-bin cov && npm run prepublishOnly",
"contributor": "git-contributor",
"prepublishOnly": "tshy && tshy-after"
},
"repository": {
Expand Down Expand Up @@ -63,7 +62,6 @@
"eslint": "8",
"eslint-config-egg": "13",
"gals": "1",
"git-contributor": "2",
"js-yaml": "3",
"mm": "3",
"supertest": "7",
Expand Down
10 changes: 8 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import utils from './utils/index.js';

export { utils };

export * from './egg.js';
export * from './loader/egg_loader.js';
export * from './base_context_class.js';
export { utils };
export * from './lifecycle.js';
export * from './loader/egg_loader.js';
export * from './loader/file_loader.js';
export * from './loader/context_loader.js';
export * from './utils/sequencify.js';
export * from './utils/timing.js';
4 changes: 2 additions & 2 deletions src/loader/context_loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { FileLoader, EXPORTS, type FileLoaderOptions } from './file_loader.js';

const CLASS_LOADER = Symbol('classLoader');

interface ClassLoaderOptions {
export interface ClassLoaderOptions {
ctx: ContextDelegation;
properties: any;
}

class ClassLoader {
export class ClassLoader {
readonly _cache = new Map();
_ctx: ContextDelegation;

Expand Down
Loading

0 comments on commit 0217618

Please sign in to comment.