chore: update Node version and enhance debugging capabilities

- Removed .nvmrc file to eliminate version locking.
- Updated Dockerfile to use Node 22.6.0-alpine for improved performance and security.
- Modified package.json to enhance the 'start:dev' script with debugging options.
- Added new launch configuration in VSCode for attaching to Node processes by PID.
- Cleaned up settings.json by removing unused configurations.
- Refactored main.ts to simplify the bootstrap process.
- Enhanced logging in OrderSchema and ScheduleSchema for better traceability of operations.
This commit is contained in:
2024-12-03 22:46:23 +07:00
parent 951d61f3ac
commit a516dce800
8 changed files with 27 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
import { Inject, Injectable } from '@nestjs/common'
import { Inject, Injectable, Logger } from '@nestjs/common'
import { Pothos, PothosRef, PothosSchema, SchemaBuilderToken } from '@smatch-corp/nestjs-pothos'
import { Builder } from '../Graphql/graphql.builder'
import { PrismaService } from '../Prisma/prisma.service'
@@ -201,8 +201,8 @@ export class OrderSchema extends PothosSchema {
expiredAt: DateTimeUtils.now().plus({ minutes: 15 }).toJSDate(),
},
})
const _name = _.map(_.slice(_.split(service.name, ' '), 0, 10), (word) => _.deburr(word)).join(' ')
const _name = _.deburr(service.name).slice(0, 10)
Logger.log(`Creating payment for ${_name}`)
// generate payment url
const paymentData = await this.payosService.createPayment({
orderCode: paymentCode,