Skip to content

Commit 828ed76

Browse files
committed
fix: remove inner class hook
1 parent 8bf7878 commit 828ed76

File tree

3 files changed

+5
-36
lines changed

3 files changed

+5
-36
lines changed

standalone/standalone/src/LoadUnitInnerClassHook.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

standalone/standalone/src/Runner.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import { InnerObject, StandaloneLoadUnit, StandaloneLoadUnitType } from './Stand
3838
import { StandaloneContext } from './StandaloneContext';
3939
import { StandaloneContextHandler } from './StandaloneContextHandler';
4040
import { ConfigSourceLoadUnitHook } from './ConfigSourceLoadUnitHook';
41-
import { LoadUnitInnerClassHook } from './LoadUnitInnerClassHook';
4241
import { DalTableEggPrototypeHook } from '@eggjs/tegg-dal-plugin/lib/DalTableEggPrototypeHook';
4342
import { DalModuleLoadUnitHook } from '@eggjs/tegg-dal-plugin/lib/DalModuleLoadUnitHook';
4443
import { MysqlDataSourceManager } from '@eggjs/tegg-dal-plugin/lib/MysqlDataSourceManager';
@@ -77,7 +76,6 @@ export class Runner {
7776
private dalModuleLoadUnitHook: DalModuleLoadUnitHook;
7877
private transactionPrototypeHook: TransactionPrototypeHook;
7978

80-
private readonly loadUnitInnerClassHook: LoadUnitInnerClassHook;
8179
private readonly crosscutAdviceFactory: CrosscutAdviceFactory;
8280
private readonly loadUnitAopHook: LoadUnitAopHook;
8381
private readonly eggPrototypeCrossCutHook: EggPrototypeCrossCutHook;
@@ -155,9 +153,6 @@ export class Runner {
155153
const configSourceEggPrototypeHook = new ConfigSourceLoadUnitHook();
156154
LoadUnitLifecycleUtil.registerLifecycle(configSourceEggPrototypeHook);
157155

158-
this.loadUnitInnerClassHook = new LoadUnitInnerClassHook();
159-
LoadUnitLifecycleUtil.registerLifecycle(this.loadUnitInnerClassHook);
160-
161156
// TODO refactor with egg module
162157
// aop runtime
163158
this.crosscutAdviceFactory = new CrosscutAdviceFactory();
@@ -270,10 +265,6 @@ export class Runner {
270265
LoadUnitLifecycleUtil.deleteLifecycle(this.configSourceEggPrototypeHook);
271266
}
272267

273-
if (this.loadUnitInnerClassHook) {
274-
LoadUnitLifecycleUtil.deleteLifecycle(this.loadUnitInnerClassHook);
275-
}
276-
277268
if (this.eggPrototypeCrossCutHook) {
278269
EggPrototypeLifecycleUtil.deleteLifecycle(this.eggPrototypeCrossCutHook);
279270
}

standalone/standalone/test/index.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,11 @@ describe('standalone/standalone/test/index.test.ts', () => {
175175
const fixturePath = path.join(__dirname, './fixtures/dynamic-inject-module');
176176

177177
it('should work', async () => {
178-
const msgs = await main(fixturePath);
178+
const msgs = await main(fixturePath, {
179+
dependencies: [
180+
{ baseDir: path.join(__dirname, '..'), extraFilePattern: [ '!**/test' ] },
181+
],
182+
});
179183
assert.deepEqual(msgs, [
180184
'hello, foo(context:0)',
181185
'hello, bar(context:0)',

0 commit comments

Comments
 (0)