chore: update deps
This commit is contained in:
@@ -3,15 +3,12 @@ import { NestFactory } from '@nestjs/core'
|
||||
import { NestFastifyApplication } from '@nestjs/platform-fastify'
|
||||
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'
|
||||
import { performance } from 'perf_hooks'
|
||||
import { API_VERSION, CROSS_DOMAIN } from './app.config'
|
||||
import { API_VERSION, CROSS_DOMAIN, PORT } from './app.config'
|
||||
import { AppModule } from './app.module'
|
||||
import { fastifyApp } from './common/adapters/fastify.adapter'
|
||||
import { SpiderGuard } from './common/guard/spider.guard'
|
||||
import { LoggingInterceptor } from './common/interceptors/logging.interceptor'
|
||||
import { MyLogger } from './processors/logger/logger.service'
|
||||
const { argv } = require('yargs')
|
||||
|
||||
const PORT: number = +argv.port || 2333
|
||||
|
||||
const Origin = CROSS_DOMAIN.allowedOrigins
|
||||
|
||||
@@ -68,7 +65,7 @@ async function bootstrap() {
|
||||
SwaggerModule.setup('api-docs', app, document)
|
||||
}
|
||||
|
||||
await app.listen(PORT, '0.0.0.0', async (err, address) => {
|
||||
await app.listen(+PORT, '0.0.0.0', async (err, address) => {
|
||||
app.useLogger(app.get(MyLogger))
|
||||
const url = await app.getUrl()
|
||||
if (isDev) {
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
const yargs = require('yargs')
|
||||
const isDev = process.env.NODE_ENV === 'development'
|
||||
|
||||
const { argv } = require('zx')
|
||||
Object.defineProperty(exports, '__esModule', { value: true })
|
||||
|
||||
/**
|
||||
* @type {any}
|
||||
*/
|
||||
const argv = yargs.argv
|
||||
console.log(argv)
|
||||
|
||||
exports.PORT = argv.port || process.env.PORT || 2333
|
||||
exports.API_VERSION = 2
|
||||
exports.CROSS_DOMAIN = {
|
||||
allowedOrigins: argv.allowed_origins
|
||||
|
||||
@@ -80,7 +80,7 @@ export class ImageService {
|
||||
const {
|
||||
url: { webUrl },
|
||||
} = await this.configsService.waitForConfigReady()
|
||||
const { data } = await this.httpService.axiosRef.get(image, {
|
||||
const { data } = await this.httpService.axiosRef.get<any>(image, {
|
||||
responseType: 'arraybuffer',
|
||||
headers: {
|
||||
'user-agent':
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import consola_, { FancyReporter, LogLevel } from 'consola'
|
||||
import { argv } from 'zx'
|
||||
import { isDev } from './index.util'
|
||||
const { argv } = require('yargs')
|
||||
class DateTimeReporter extends FancyReporter {
|
||||
formatDate(date: Date) {
|
||||
return date.toLocaleString(undefined, {
|
||||
|
||||
Reference in New Issue
Block a user