-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(PE-5963): setup application frameworks #1
Conversation
5cb5321
to
cc21471
Compare
package.json
Outdated
@@ -0,0 +1,101 @@ | |||
{ | |||
"name": "ar-io-network-portal", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"name": "ar-io-network-portal", | |
"name": "@ar-io/network-portal", |
package.json
Outdated
"@sentry/react": "^7.101.1", | ||
"axios": "^1.6.7", | ||
"axios-retry": "^4.0.0", | ||
"eslint-plugin-tailwindcss": "^3.14.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devDep
package.json
Outdated
"react-dom": "^18.2.0", | ||
"react-router-dom": "^6.22.1", | ||
"tailwindcss-animate": "^1.0.7", | ||
"ts-jest": "^29.1.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devDep
src/constants.ts
Outdated
export class DefaultLogger implements Logger { | ||
private logger: winston.Logger; | ||
constructor({ | ||
level = 'info', | ||
logFormat = 'simple', | ||
}: { | ||
level?: 'info' | 'debug' | 'error' | 'none' | undefined; | ||
logFormat?: 'simple' | 'json' | undefined; | ||
} = {}) { | ||
this.logger = createLogger({ | ||
level, | ||
silent: level === 'none', | ||
format: getLogFormat(logFormat), | ||
transports: [new transports.Console()], | ||
}); | ||
} | ||
|
||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
info(message: string, ...args: any[]) { | ||
this.logger.info(message, ...args); | ||
} | ||
|
||
warn(message: string, ...args: any[]) { | ||
this.logger.warn(message, ...args); | ||
} | ||
|
||
error(message: string, ...args: any[]) { | ||
this.logger.error(message, ...args); | ||
} | ||
|
||
debug(message: string, ...args: any[]) { | ||
this.logger.debug(message, ...args); | ||
} | ||
|
||
setLogLevel(level: string) { | ||
this.logger.level = level; | ||
} | ||
|
||
setLogFormat(logFormat: string) { | ||
this.logger.format = getLogFormat(logFormat); | ||
} | ||
/* eslint-enable @typescript-eslint/no-explicit-any */ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would just use winston and avoid this abstracted class
f2a576d
to
033b2e9
Compare
Visit the preview URL for this PR (updated for commit b505b28): https://ar-io-network-portal-a40ee--pr1-pe-5963-setup-framew-33gksifb.web.app (expires Thu, 02 May 2024 18:11:28 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 7abfae09c4446982a71cbb94b0cbf4688377a111 |
No description provided.