-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from hg-pyun/develop/2.0.0
Develop/2.0.0
- Loading branch information
Showing
44 changed files
with
8,588 additions
and
199 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"node": "current" | ||
} | ||
} | ||
], | ||
"@babel/typescript" | ||
], | ||
"plugins": [ | ||
"@babel/proposal-class-properties", | ||
"@babel/proposal-object-rest-spread" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
Validating CODEOWNERS rules …
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,2 @@ | ||
# Global | ||
* @phg2491 |
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,5 +1,5 @@ | ||
.idea | ||
/node_modules/ | ||
/test/ | ||
/.eslintrc.json | ||
/.gitignore | ||
/tsconfig.json |
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,7 @@ | ||
{ | ||
"printWidth": 120, | ||
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"arrowParens": "always", | ||
"tabWidth": 4 | ||
} |
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,53 @@ | ||
import { ErrorLogConfig, GlobalLogConfig, RequestLogConfig, ResponseLogConfig } from './types'; | ||
declare function getGlobalConfig(): GlobalLogConfig; | ||
declare function setGlobalConfig(config: GlobalLogConfig): void; | ||
declare function mergeWithGlobalConfig(config?: RequestLogConfig | ResponseLogConfig | ErrorLogConfig): { | ||
data?: boolean | undefined; | ||
url?: boolean | undefined; | ||
method?: boolean | undefined; | ||
headers?: boolean | undefined; | ||
status?: boolean | undefined; | ||
statusText?: boolean | undefined; | ||
code?: boolean | undefined; | ||
usePrefix?: boolean | undefined; | ||
prefixText?: string | undefined; | ||
useDate?: boolean | undefined; | ||
dateFormat?: string | undefined; | ||
} | { | ||
data?: boolean | undefined; | ||
url?: boolean | undefined; | ||
method?: boolean | undefined; | ||
headers?: boolean | undefined; | ||
usePrefix?: boolean | undefined; | ||
prefixText?: string | undefined; | ||
useDate?: boolean | undefined; | ||
dateFormat?: string | undefined; | ||
status?: boolean | undefined; | ||
statusText?: boolean | undefined; | ||
code?: boolean | undefined; | ||
} | { | ||
data?: boolean | undefined; | ||
status?: boolean | undefined; | ||
statusText?: boolean | undefined; | ||
headers?: boolean | undefined; | ||
usePrefix?: boolean | undefined; | ||
prefixText?: string | undefined; | ||
useDate?: boolean | undefined; | ||
dateFormat?: string | undefined; | ||
url?: boolean | undefined; | ||
method?: boolean | undefined; | ||
code?: boolean | undefined; | ||
} | { | ||
data?: boolean | undefined; | ||
code?: boolean | undefined; | ||
usePrefix?: boolean | undefined; | ||
prefixText?: string | undefined; | ||
useDate?: boolean | undefined; | ||
dateFormat?: string | undefined; | ||
url?: boolean | undefined; | ||
method?: boolean | undefined; | ||
headers?: boolean | undefined; | ||
status?: boolean | undefined; | ||
statusText?: boolean | undefined; | ||
}; | ||
export { getGlobalConfig, setGlobalConfig, mergeWithGlobalConfig, }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare function printLog(text: string): void; | ||
export { printLog, }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { GlobalLogConfig } from './types'; | ||
declare class StringBuilder { | ||
private config; | ||
private printQueue; | ||
constructor(config: GlobalLogConfig); | ||
makePrefix(logType: string): this; | ||
makeDateFormat(): this; | ||
makeUrl(url?: string): this; | ||
makeMethod(method?: string): this; | ||
makeData(data: object): this; | ||
makeStatus(status?: number, statusText?: string): this; | ||
build(): string; | ||
} | ||
export default StringBuilder; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
export interface CommonConfig { | ||
usePrefix?: boolean; | ||
prefixText?: string; | ||
useDate?: boolean; | ||
dateFormat?: string; | ||
} | ||
export interface GlobalLogConfig extends CommonConfig { | ||
data?: boolean; | ||
url?: boolean; | ||
method?: boolean; | ||
headers?: boolean; | ||
status?: boolean; | ||
statusText?: boolean; | ||
code?: boolean; | ||
} | ||
export interface RequestLogConfig extends CommonConfig { | ||
data?: boolean; | ||
url?: boolean; | ||
method?: boolean; | ||
headers?: boolean; | ||
} | ||
export interface ResponseLogConfig extends CommonConfig { | ||
data?: boolean; | ||
status?: boolean; | ||
statusText?: boolean; | ||
headers?: boolean; | ||
} | ||
export interface ErrorLogConfig extends CommonConfig { | ||
data?: boolean; | ||
code?: boolean; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { setGlobalConfig } from './common/config'; | ||
import requestLogger from './logger/request'; | ||
import responseLogger from './logger/response'; | ||
import { errorLogger } from './logger/error'; | ||
export { setGlobalConfig, requestLogger, responseLogger, errorLogger }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { AxiosError } from 'axios'; | ||
import { ErrorLogConfig } from '../common/types'; | ||
declare function errorLoggerWithoutPromise(error: AxiosError, config?: ErrorLogConfig): AxiosError; | ||
declare function errorLogger(error: AxiosError): Promise<never>; | ||
export { errorLogger, errorLoggerWithoutPromise }; |
Oops, something went wrong.