-
-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(di): Refactoring interfaces and Codes
- Loading branch information
Showing
51 changed files
with
145 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
export * from "./Metadata"; | ||
export * from "./DecoratorTypes"; | ||
export * from "./Entity"; | ||
export * from "./Env"; | ||
export * from "./Hooks"; | ||
export * from "./RegistryKey"; | ||
export * from "./Metadata"; | ||
export * from "./Store"; | ||
export * from "./Entity"; | ||
export * from "./DecoratorTypes"; | ||
export * from "./Type"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
if (process.env.NODE_ENV === "development") { | ||
require("source-map-support").install(); | ||
} | ||
import "reflect-metadata"; | ||
|
||
export * from "./interfaces"; | ||
export type {DecoratorParameters, DecoratorMethodParameters, StaticMethodDecorator, MetadataTypes, ValueOf, HashOf} from "./interfaces"; | ||
export * from "./utils"; | ||
export * from "./domain"; | ||
export * from "./errors/UnsupportedDecoratorType"; | ||
|
||
// decorators | ||
export * from "./decorators"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
export * from "./Type"; | ||
export * from "./Env"; | ||
export * from "./DecoratorParameters"; | ||
export * from "./MetadataTypes"; | ||
export * from "./ValueOf"; | ||
export * from "./HashOf"; | ||
export type {DecoratorParameters, DecoratorMethodParameters, StaticMethodDecorator} from "./DecoratorParameters"; | ||
export type {MetadataTypes} from "./MetadataTypes"; | ||
export type {ValueOf} from "./ValueOf"; | ||
export type {HashOf} from "./HashOf"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export * from "./scope"; | ||
export * from "./service"; | ||
export * from "./overrideProvider"; | ||
export * from "./inject"; | ||
export * from "./injectable"; | ||
export * from "./constant"; | ||
export * from "./value"; | ||
export * from "./intercept"; | ||
export * from "./interceptor"; | ||
export * from "./configuration"; | ||
export * from "./module"; | ||
export * from "./opts"; | ||
export * from "./useOpts"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
packages/di/src/class/Container.ts → packages/di/src/domain/Container.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
packages/di/src/class/Provider.spec.ts → packages/di/src/domain/Provider.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
packages/di/src/class/Provider.ts → packages/di/src/domain/Provider.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export * from "./Container"; | ||
export * from "./InjectablePropertyType"; | ||
export * from "./LocalsContainer"; | ||
export * from "./Provider"; | ||
export * from "./ProviderScope"; | ||
export * from "./ProviderType"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/di/src/interfaces/IDILogger.ts → packages/di/src/interfaces/DILogger.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/di/src/interfaces/IDIResolver.ts → packages/di/src/interfaces/DIResolver.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import {TokenProvider} from "./TokenProvider"; | ||
import type {TokenProvider} from "./TokenProvider"; | ||
|
||
export interface IDIResolver { | ||
export interface DIResolver { | ||
deps?: TokenProvider[]; | ||
get<T = any>(type: TokenProvider, options: any): T | undefined; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type {InjectablePropertyType} from "../domain/InjectablePropertyType"; | ||
import type {TokenProvider} from "./TokenProvider"; | ||
|
||
export interface InjectableProperty { | ||
propertyKey: string; | ||
} | ||
|
||
export interface InjectablePropertyService extends InjectableProperty { | ||
bindingType: InjectablePropertyType.METHOD | InjectablePropertyType.PROPERTY | InjectablePropertyType.INTERCEPTOR; | ||
propertyType: string; | ||
useType: TokenProvider; | ||
onGet?: (bean: any) => any; | ||
options?: any; | ||
} | ||
|
||
export interface InjectablePropertyValue extends InjectableProperty { | ||
bindingType: InjectablePropertyType.CONSTANT | InjectablePropertyType.VALUE; | ||
expression: string; | ||
defaultValue?: any; | ||
} | ||
|
||
export interface InjectableProperties { | ||
[key: string]: InjectablePropertyService | InjectablePropertyValue; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.