Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
feat(listmonk): libs add listmonk (#248)
nevine2d72f6d9215
diff --git a/project/backend/apps/aitoearn-server/config/config.js b/project/backend/apps/aitoearn-server/config/config.jsindex eef004d5..dc76e96a 100644--- a/project/backend/apps/aitoearn-server/config/config.js+++ b/project/backend/apps/aitoearn-server/config/config.js@@ -65,6 +65,12 @@ const {INTERNAL_TOKEN,} = process.env+const {+ LISTMONK_HOST,+ LISTMONK_API_KEY,+ LISTMONK_API_SECRET,+} = process.env+module.exports = {port: 3002,environment: NODE_ENV,@@ -1000,4 +1006,9 @@ module.exports = {secret: JWT_SECRET,internalToken: INTERNAL_TOKEN,},+ listmonk: {+ host: LISTMONK_HOST,+ apiKey: LISTMONK_API_KEY,+ apiSecret: LISTMONK_API_SECRET,+ },}diff --git a/project/backend/apps/aitoearn-server/package.json b/project/backend/apps/aitoearn-server/package.jsonindex acc1d9dd..a8355b74 100644--- a/project/backend/apps/aitoearn-server/package.json+++ b/project/backend/apps/aitoearn-server/package.json@@ -21,6 +21,7 @@"@yikart/ali-green": "workspace:*","@yikart/aws-s3": "workspace:*","@yikart/common": "workspace:*",+ "@yikart/listmonk": "workspace:*","@yikart/mail": "workspace:*","@yikart/mongodb": "workspace:*","@yikart/redis": "workspace:*",diff --git a/project/backend/apps/aitoearn-server/src/app.module.ts b/project/backend/apps/aitoearn-server/src/app.module.tsindex fed16a2a..aec70fd3 100644--- a/project/backend/apps/aitoearn-server/src/app.module.ts+++ b/project/backend/apps/aitoearn-server/src/app.module.ts@@ -3,6 +3,7 @@ import { Module } from '@nestjs/common'import { EventEmitterModule } from '@nestjs/event-emitter'import { AitoearnAuthModule } from '@yikart/aitoearn-auth'import { AitoearnQueueModule } from '@yikart/aitoearn-queue'+import { ListmonkModule } from '@yikart/listmonk'import { MailModule } from '@yikart/mail'import { MongodbModule } from '@yikart/mongodb'import { AccountModule } from './account/account.module'@@ -35,6 +36,7 @@ import { UserModule } from './user/user.module'},}),AitoearnAuthModule.forRoot(config.auth),+ ListmonkModule.forRoot(config.listmonk),FileModule,LogsModule,TransportsModule,diff --git a/project/backend/apps/aitoearn-server/src/config.ts b/project/backend/apps/aitoearn-server/src/config.tsindex 360d6546..b36eb2db 100644--- a/project/backend/apps/aitoearn-server/src/config.ts+++ b/project/backend/apps/aitoearn-server/src/config.ts@@ -161,6 +161,13 @@ const moreApiConfigSchema = z.object({xhsCreatorUri: z.string().default(''),})+/** Listmonk配置 */+const listmonkConfigSchema = z.object({+ host: z.string().default(''),+ apiKey: z.string().default(''),+ apiSecret: z.string().default(''),+})+export const appConfigSchema = z.object({...baseConfig.shape,auth: aitoearnAuthConfigSchema,@@ -181,6 +188,7 @@ export const appConfigSchema = z.object({}),moreApi: moreApiConfigSchema,statisticsDb: mongodbConfigSchema,+ listmonk: listmonkConfigSchema,})export class AppConfig extends createZodDto(appConfigSchema) { }diff --git a/project/backend/apps/aitoearn-server/src/user/vip.controller.ts b/project/backend/apps/aitoearn-server/src/user/vip.controller.tsindex 47e49682..f572e2bd 100644--- a/project/backend/apps/aitoearn-server/src/user/vip.controller.ts+++ b/project/backend/apps/aitoearn-server/src/user/vip.controller.ts@@ -1,17 +1,26 @@-import { Controller } from '@nestjs/common'+import { Controller, OnModuleInit } from '@nestjs/common'// import { Cron } from '@nestjs/schedule'// import { RedisService } from '@yikart/redis'// import { VipService } from './vip.service'// const VipAddPointsLockKey = 'vip:add:points:lock:'+import { SubscribersService, SubscriberStatus, TemplatesService, TransactionalService } from '@yikart/listmonk'@Controller()-export class VipController {+export class VipController implements OnModuleInit {constructor(// private readonly vipService: VipService,// private readonly redisService: RedisService,+ private readonly transactionalService: TransactionalService,+ private readonly templatesService: TemplatesService,+ private readonly subscribersService: SubscribersService,) {}+ onModuleInit() {+ // this.testListmonk()+ // this.test2()+ // this.test3()+ }// @Cron('0 30 0 * * *')// async dispatchVipIntegral() {// const theKeyHad = await this.redisService.get(VipAddPointsLockKey)@@ -26,4 +35,31 @@ export class VipController {// this.vipService.addVipPoints(user)// })// }++ testListmonk() {+ return this.transactionalService.sendTransactionalMessage({+ template_id: 3,+ subscriber_email: '[email protected]',+ subject: 'Test',+ data: {+ name: 'Nevin',+ content: '<p>Test</p>',+ },+ content_type: 'html',+ })+ }++ async test2() {+ const res = await this.templatesService.retrieveAllTemplates()+ return res+ }++ async test3() {+ const res = await this.subscribersService.create({+ email: '[email protected]',+ name: 'Nevin',+ status: SubscriberStatus.ENABLED,+ })+ return res+ }}diff --git a/project/backend/libs/listmonk/README.md b/project/backend/libs/listmonk/README.mdnew file mode 100644index 00000000..9c317989--- /dev/null+++ b/project/backend/libs/listmonk/README.md@@ -0,0 +1,7 @@+# one-signal++This library was generated with [Nx](https://nx.dev).++## Building++Run `nx build one-signal` to build the library.diff --git a/project/backend/libs/listmonk/eslint.config.mjs b/project/backend/libs/listmonk/eslint.config.mjsnew file mode 100644index 00000000..29c3abcc--- /dev/null+++ b/project/backend/libs/listmonk/eslint.config.mjs@@ -0,0 +1,24 @@+import baseConfig from '../../eslint.config.mjs'++export default baseConfig.append(+ {+ files: [+ '**/*.json',+ ],+ rules: {+ '@nx/dependency-checks': [+ 'error',+ {+ ignoredFiles: [+ '{projectRoot}/eslint.config.{js,cjs,mjs,ts,cts,mts}',+ ],+ checkObsoleteDependencies: false,+ checkVersionMismatches: false,+ },+ ],+ },+ languageOptions: {+ parser: (await import('jsonc-eslint-parser')),+ },+ },+)diff --git a/project/backend/libs/listmonk/package.json b/project/backend/libs/listmonk/package.jsonnew file mode 100644index 00000000..8ca4715d--- /dev/null+++ b/project/backend/libs/listmonk/package.json@@ -0,0 +1,19 @@+{+ "name": "@yikart/listmonk",+ "type": "commonjs",+ "version": "0.0.1",+ "main": "./src/index.js",+ "types": "./src/index.d.ts",+ "publishConfig": {+ "registry": "https://npm.pkg.github.com"+ },+ "peerDependencies": {+ "@nestjs/common": "^11.0.0",+ "tslib": "^2.3.0",+ "zod": "^4.0.0"+ },+ "dependencies": {+ "axios": "^1.13.0",+ "rxjs": "^7.8.0"+ }+}diff --git a/project/backend/libs/listmonk/project.json b/project/backend/libs/listmonk/project.jsonnew file mode 100644index 00000000..80bf7a1e--- /dev/null+++ b/project/backend/libs/listmonk/project.json@@ -0,0 +1,42 @@+{+ "name": "listmonk",+ "$schema": "../../node_modules/nx/schemas/project-schema.json",+ "sourceRoot": "libs/listmonk/src",+ "projectType": "library",+ "release": {+ "version": {+ "manifestRootsToUpdate": ["dist/{projectRoot}"],+ "currentVersionResolver": "git-tag",+ "fallbackCurrentVersionResolver": "disk"+ }+ },+ "tags": [],+ "targets": {+ "build": {+ "executor": "@nx/js:tsc",+ "outputs": ["{options.outputPath}"],+ "options": {+ "outputPath": "dist/libs/listmonk",+ "tsConfig": "libs/listmonk/tsconfig.lib.json",+ "packageJson": "libs/listmonk/package.json",+ "main": "libs/listmonk/src/index.ts",+ "assets": ["libs/listmonk/*.md"]+ }+ },+ "nx-release-publish": {+ "dependsOn": ["build"],+ "options": {+ "packageRoot": "dist/{projectRoot}"+ }+ },+ "lint": {+ "executor": "@nx/eslint:lint",+ "outputs": [+ "{options.outputFile}"+ ],+ "options": {+ "fix": true+ }+ }+ }+}diff --git a/project/backend/libs/listmonk/src/api/base.service.ts b/project/backend/libs/listmonk/src/api/base.service.tsnew file mode 100644index 00000000..183303f9--- /dev/null+++ b/project/backend/libs/listmonk/src/api/base.service.ts@@ -0,0 +1,47 @@+import { Inject, Injectable, Logger } from '@nestjs/common'+import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'+import { ListmonkConfig } from '../interfaces'++interface ListmonkResponse<T> {+ data: T+}++@Injectable()+export class BaseService {+ protected readonly httpClient: AxiosInstance+ private readonly logger = new Logger(BaseService.name)+ constructor(+ @Inject('LISTMONK_CONFIG') private readonly config: ListmonkConfig,+ ) {+ this.httpClient = axios.create({+ baseURL: this.config.host,+ timeout: 30000,+ auth: {+ username: this.config.apiKey,+ password: this.config.apiSecret,+ },+ headers: {+ 'Content-Type': 'application/json',+ },+ })+ }++ async request<T = unknown>(+ url: string,+ config: AxiosRequestConfig = {},+ ): Promise<T> {+ try {+ const response: AxiosResponse<ListmonkResponse<T>> = await this.httpClient(url, config)+ return response.data.data+ }+ catch (error: any) {+ this.logger.error({+ url,+ config,+ error: error.response?.data || 'listmonk err',+ status: error.response?.status || 400,+ })+ throw error+ }+ }+}diff --git a/project/backend/libs/listmonk/src/api/subscribers.service.ts b/project/backend/libs/listmonk/src/api/subscribers.service.tsnew file mode 100644index 00000000..ffe6e378--- /dev/null+++ b/project/backend/libs/listmonk/src/api/subscribers.service.ts@@ -0,0 +1,13 @@+import { Injectable } from '@nestjs/common'+import { CreateSubscriberDto, Subscriber } from '../interfaces'+import { BaseService } from './base.service'++@Injectable()+export class SubscribersService extends BaseService {+ async create(data: CreateSubscriberDto): Promise<Subscriber> {+ return this.request<Subscriber>('/api/subscribers', {+ method: 'POST',+ data,+ })+ }+}diff --git a/project/backend/libs/listmonk/src/api/templates.service.ts b/project/backend/libs/listmonk/src/api/templates.service.tsnew file mode 100644index 00000000..90b31c45--- /dev/null+++ b/project/backend/libs/listmonk/src/api/templates.service.ts@@ -0,0 +1,15 @@+import { Injectable } from '@nestjs/common'+import { BaseService } from './base.service'++@Injectable()+export class TemplatesService extends BaseService {+ async retrieveAllTemplates(): Promise<any> {+ const res = await this.request<any>(+ '/api/templates',+ {+ method: 'GET',+ },+ )+ return res+ }+}diff --git a/project/backend/libs/listmonk/src/api/transactional.service.ts b/project/backend/libs/listmonk/src/api/transactional.service.tsnew file mode 100644index 00000000..194e0a5e--- /dev/null+++ b/project/backend/libs/listmonk/src/api/transactional.service.ts@@ -0,0 +1,17 @@+import { Injectable } from '@nestjs/common'+import { TransactionalMessage } from '../interfaces'+import { BaseService } from './base.service'++@Injectable()+export class TransactionalService extends BaseService {+ async sendTransactionalMessage(data: TransactionalMessage): Promise<any> {+ const res = await this.request<any>(+ '/api/tx',+ {+ method: 'POST',+ data,+ },+ )+ return res+ }+}diff --git a/project/backend/libs/listmonk/src/index.ts b/project/backend/libs/listmonk/src/index.tsnew file mode 100644index 00000000..b8f35aa8--- /dev/null+++ b/project/backend/libs/listmonk/src/index.ts@@ -0,0 +1,5 @@+export * from './api/subscribers.service'+export * from './api/templates.service'+export * from './api/transactional.service'+export * from './interfaces'+export * from './listmonk.module'diff --git a/project/backend/libs/listmonk/src/interfaces/common.interface.ts b/project/backend/libs/listmonk/src/interfaces/common.interface.tsnew file mode 100644index 00000000..22279ac5--- /dev/null+++ b/project/backend/libs/listmonk/src/interfaces/common.interface.ts@@ -0,0 +1,5 @@+export interface ListmonkConfig {+ host: string+ apiKey: string+ apiSecret: string+}diff --git a/project/backend/libs/listmonk/src/interfaces/index.ts b/project/backend/libs/listmonk/src/interfaces/index.tsnew file mode 100644index 00000000..6a5ede3f--- /dev/null+++ b/project/backend/libs/listmonk/src/interfaces/index.ts@@ -0,0 +1,3 @@+export * from './common.interface'+export * from './subscribers.interface'+export * from './transactional.interface'diff --git a/project/backend/libs/listmonk/src/interfaces/subscribers.interface.ts b/project/backend/libs/listmonk/src/interfaces/subscribers.interface.tsnew file mode 100644index 00000000..9bced55a--- /dev/null+++ b/project/backend/libs/listmonk/src/interfaces/subscribers.interface.ts@@ -0,0 +1,29 @@+export interface SubscriberAttribs {+ [key: string]: any+}++export enum SubscriberStatus {+ ENABLED = 'enabled',+ BLOCKLISTED = 'blocklisted',+}++export interface CreateSubscriberDto {+ email: string+ name: string+ status: SubscriberStatus+ lists?: number[]+ attribs?: SubscriberAttribs+ preconfirm_subscriptions?: boolean+}++export interface Subscriber {+ id: number+ created_at: string+ updated_at: string+ uuid: string+ email: string+ name: string+ attribs: SubscriberAttribs+ status: SubscriberStatus+ lists: number[]+}diff --git a/project/backend/libs/listmonk/src/interfaces/transactional.interface.ts b/project/backend/libs/listmonk/src/interfaces/transactional.interface.tsnew file mode 100644index 00000000..a8d23098--- /dev/null+++ b/project/backend/libs/listmonk/src/interfaces/transactional.interface.ts@@ -0,0 +1,17 @@+export interface TransactionalMessage {+ subscriber_email?: string+ subscriber_id?: number+ subscriber_emails?: string[]+ subscriber_ids?: number[]+ template_id: number+ from_email?: string+ subject?: string+ data?: Record<string, any>+ headers?: Record<string, string>[]+ messenger?: string+ content_type?: 'html' | 'markdown' | 'plain'+}++export interface TransactionalResponse {+ data: boolean+}diff --git a/project/backend/libs/listmonk/src/listmonk.module.ts b/project/backend/libs/listmonk/src/listmonk.module.tsnew file mode 100644index 00000000..749cbe15--- /dev/null+++ b/project/backend/libs/listmonk/src/listmonk.module.ts@@ -0,0 +1,31 @@+import { DynamicModule, Module } from '@nestjs/common'+import { SubscribersService } from './api/subscribers.service'+import { TemplatesService } from './api/templates.service'+import { TransactionalService } from './api/transactional.service'+import { ListmonkConfig } from './interfaces'++@Module({})+export class ListmonkModule {+ static forRoot(options: ListmonkConfig): DynamicModule {+ return {+ global: true,+ module: ListmonkModule,+ imports: [+ ],+ providers: [+ {+ provide: 'LISTMONK_CONFIG',+ useValue: options,+ },+ SubscribersService,+ TransactionalService,+ TemplatesService,+ ],+ exports: [+ SubscribersService,+ TransactionalService,+ TemplatesService,+ ],+ }+ }+}diff --git a/project/backend/libs/listmonk/tsconfig.json b/project/backend/libs/listmonk/tsconfig.jsonnew file mode 100644index 00000000..5a51c286--- /dev/null+++ b/project/backend/libs/listmonk/tsconfig.json@@ -0,0 +1,13 @@+{+ "extends": "../../tsconfig.base.json",+ "compilerOptions": {+ "module": "commonjs"+ },+ "references": [+ {+ "path": "./tsconfig.lib.json"+ }+ ],+ "files": [],+ "include": []+}diff --git a/project/backend/libs/listmonk/tsconfig.lib.json b/project/backend/libs/listmonk/tsconfig.lib.jsonnew file mode 100644index 00000000..abb4dc46--- /dev/null+++ b/project/backend/libs/listmonk/tsconfig.lib.json@@ -0,0 +1,11 @@+{+ "extends": "./tsconfig.json",+ "compilerOptions": {+ "target": "es2021",+ "types": ["node"],+ "noImplicitAny": true,+ "declaration": true,+ "outDir": "../../dist/out-tsc"+ },+ "include": ["src/**/*.ts"]+}diff --git a/project/backend/pnpm-lock.yaml b/project/backend/pnpm-lock.yamlindex 48fd5f25..e30afb54 100644--- a/project/backend/pnpm-lock.yaml+++ b/project/backend/pnpm-lock.yaml@@ -95,7 +95,7 @@ importers:version: 5.9.3webpack-cli:specifier: ^5.1.4- version: 5.1.4([email protected])+ version: 5.1.4([email protected])zx:specifier: ^8.8.1version: 8.8.5@@ -255,7 +255,7 @@ importers:version: 4.19.0(@vue/[email protected])([email protected]([email protected]))([email protected])([email protected])'@nestjs/cli':specifier: ^11.0.0- version: 11.0.10(@swc/[email protected](@swc/[email protected]))(@types/[email protected])([email protected]([email protected]))+ version: 11.0.10(@swc/[email protected](@swc/[email protected]))(@types/[email protected])([email protected]([email protected]))'@nestjs/schematics':specifier: ^11.0.0version: 11.0.9([email protected])([email protected])@@ -312,7 +312,7 @@ importers:version: 29.4.5(@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected])([email protected](@swc/[email protected](@swc/[email protected]))(@types/[email protected])([email protected])))([email protected])ts-loader:specifier: ^9.5.2- version: 9.5.4([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected]([email protected])))+ version: 9.5.4([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected]([email protected])))ts-node:specifier: ^10.9.2version: 10.9.2(@swc/[email protected](@swc/[email protected]))(@types/[email protected])([email protected])@@ -379,6 +379,9 @@ importers:'@yikart/common':specifier: workspace:*version: link:../../libs/common+ '@yikart/listmonk':+ specifier: workspace:*+ version: link:../../libs/listmonk'@yikart/mail':specifier: workspace:*version: link:../../libs/mail@@ -688,6 +691,24 @@ importers:specifier: ^5.0.3version: 5.0.4+ libs/listmonk:+ dependencies:+ '@nestjs/common':+ specifier: ^11.0.0+ axios:+ specifier: ^1.13.0+ version: 1.13.0+ rxjs:+ specifier: ^7.8.0+ version: 7.8.2+ tslib:+ specifier: ^2.3.0+ version: 2.8.1+ zod:+ specifier: ^4.0.0+ version: 4.1.12+libs/mail:dependencies:'@nestjs-modules/mailer':@@ -12553,7 +12574,7 @@ snapshots:bullmq: 5.61.2tslib: 2.8.1- '@nestjs/[email protected](@swc/[email protected](@swc/[email protected]))(@types/[email protected])([email protected]([email protected]))':+ '@nestjs/[email protected](@swc/[email protected](@swc/[email protected]))(@types/[email protected])([email protected]([email protected]))':dependencies:'@angular-devkit/core': 19.2.15([email protected])'@angular-devkit/schematics': 19.2.15([email protected])@@ -12564,7 +12585,7 @@ snapshots:chokidar: 4.0.3cli-table3: 0.6.5commander: 4.1.1- fork-ts-checker-webpack-plugin: 9.1.0([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected]([email protected])))+ fork-ts-checker-webpack-plugin: 9.1.0([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected]([email protected])))glob: 11.0.3node-emoji: 1.11.0ora: 5.4.1@@ -12572,7 +12593,7 @@ snapshots:tsconfig-paths: 4.2.0tsconfig-paths-webpack-plugin: 4.2.0typescript: 5.8.3- webpack: 5.100.2(@swc/[email protected](@swc/[email protected]))([email protected]([email protected]))webpack-node-externals: 3.0.0optionalDependencies:'@swc/core': 1.13.21(@swc/[email protected])@@ -12989,36 +13010,36 @@ snapshots:'@phenomnomnominal/tsquery': 5.0.1([email protected])ajv: 8.17.1autoprefixer: 10.4.21([email protected])- babel-loader: 9.2.1(@babel/[email protected])([email protected])+ babel-loader: 9.2.1(@babel/[email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))browserslist: 4.27.0- copy-webpack-plugin: 10.2.4([email protected])- css-loader: 6.11.0([email protected])- css-minimizer-webpack-plugin: 5.0.1([email protected])- fork-ts-checker-webpack-plugin: 7.2.13([email protected])([email protected])+ copy-webpack-plugin: 10.2.4([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))+ css-loader: 6.11.0([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))+ css-minimizer-webpack-plugin: 5.0.1([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))+ fork-ts-checker-webpack-plugin: 7.2.13([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))less: 4.4.2- less-loader: 11.1.4([email protected])([email protected])- license-webpack-plugin: 4.0.2([email protected])+ less-loader: 11.1.4([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))+ license-webpack-plugin: 4.0.2([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))loader-utils: 2.0.4- mini-css-extract-plugin: 2.4.7([email protected])+ mini-css-extract-plugin: 2.4.7([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))parse5: 4.0.0picocolors: 1.1.1postcss: 8.5.6postcss-import: 14.1.0([email protected])- postcss-loader: 6.2.1([email protected])([email protected])+ postcss-loader: 6.2.1([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))rxjs: 7.8.2sass: 1.93.2sass-embedded: 1.93.2- source-map-loader: 5.0.0([email protected])- style-loader: 3.3.4([email protected])- ts-loader: 9.5.4([email protected])([email protected])+ sass-loader: 16.0.6([email protected])([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))+ source-map-loader: 5.0.0([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))+ style-loader: 3.3.4([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))+ terser-webpack-plugin: 5.3.14(@swc/[email protected](@swc/[email protected]))([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))+ ts-loader: 9.5.4([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))tsconfig-paths-webpack-plugin: 4.0.0tslib: 2.8.1- webpack-dev-server: 5.2.2([email protected])([email protected])+ webpack-dev-server: 5.2.2([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))webpack-node-externals: 3.0.0- webpack-subresource-integrity: 5.1.0([email protected])+ webpack-subresource-integrity: 5.1.0([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))transitivePeerDependencies:- '@babel/traverse'- '@parcel/css'@@ -14259,20 +14280,20 @@ snapshots:'@webassemblyjs/ast': 1.14.1'@xtuc/long': 4.2.2dependencies:- webpack-cli: 5.1.4([email protected])+ webpack-cli: 5.1.4([email protected])dependencies:- webpack-cli: 5.1.4([email protected])+ webpack-cli: 5.1.4([email protected])dependencies:- webpack-cli: 5.1.4([email protected])+ webpack-cli: 5.1.4([email protected])'@xtuc/[email protected]': {}@@ -14588,7 +14609,7 @@ snapshots:transitivePeerDependencies:- supports-color+ [email protected](@babel/[email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:'@babel/core': 7.28.5find-cache-dir: 4.0.0@@ -15173,7 +15194,7 @@ snapshots:+ [email protected]([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:fast-glob: 3.3.3glob-parent: 6.0.2@@ -15268,7 +15289,7 @@ snapshots:dependencies:postcss: 8.5.6+ [email protected]([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:icss-utils: 5.1.0([email protected])postcss: 8.5.6@@ -15281,7 +15302,7 @@ snapshots:optionalDependencies:+ [email protected]([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:'@jridgewell/trace-mapping': 0.3.31cssnano: 6.1.2([email protected])@@ -16499,7 +16520,7 @@ snapshots:cross-spawn: 7.0.6signal-exit: 4.1.0+ [email protected]([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:'@babel/code-frame': 7.27.1chalk: 4.1.2@@ -16516,7 +16537,7 @@ snapshots:typescript: 5.9.3- [email protected]([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected]([email protected]))):+ [email protected]([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected]([email protected]))):dependencies:'@babel/code-frame': 7.27.1chalk: 4.1.2@@ -16531,7 +16552,7 @@ snapshots:semver: 7.7.3tapable: 2.3.0typescript: 5.8.3- webpack: 5.100.2(@swc/[email protected](@swc/[email protected]))([email protected]([email protected]))+ webpack: 5.100.2(@swc/[email protected](@swc/[email protected]))([email protected]([email protected]))dependencies:@@ -18120,7 +18141,7 @@ snapshots:optional: true+ [email protected]([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:less: 4.4.2@@ -18169,7 +18190,7 @@ snapshots:optional: true+ [email protected]([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:webpack-sources: 3.3.3optionalDependencies:@@ -18722,7 +18743,7 @@ snapshots:+ [email protected]([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:schema-utils: 4.3.3@@ -19906,7 +19927,7 @@ snapshots:read-cache: 1.0.0resolve: 1.22.11+ [email protected]([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:cosmiconfig: 7.1.0klona: 2.0.6@@ -20551,7 +20572,7 @@ snapshots:sass-embedded-win32-arm64: 1.93.2sass-embedded-win32-x64: 1.93.2+ [email protected]([email protected])([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:neo-async: 2.6.2optionalDependencies:@@ -20801,7 +20822,7 @@ snapshots:+ [email protected]([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:iconv-lite: 0.6.3source-map-js: 1.2.1@@ -20995,7 +21016,7 @@ snapshots:dependencies:'@tokenizer/token': 0.3.0+ [email protected]([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:@@ -21088,18 +21109,29 @@ snapshots:transitivePeerDependencies:- supports-color- [email protected](@swc/[email protected](@swc/[email protected]))([email protected](@swc/[email protected](@swc/[email protected]))([email protected]([email protected]))):+ [email protected](@swc/[email protected](@swc/[email protected]))([email protected](@swc/[email protected](@swc/[email protected]))([email protected]([email protected]))):dependencies:'@jridgewell/trace-mapping': 0.3.31jest-worker: 27.5.1schema-utils: 4.3.3serialize-javascript: 6.0.2terser: 5.44.0- webpack: 5.100.2(@swc/[email protected](@swc/[email protected]))([email protected]([email protected]))+ webpack: 5.100.2(@swc/[email protected](@swc/[email protected]))([email protected]([email protected]))optionalDependencies:'@swc/core': 1.13.21(@swc/[email protected])+ dependencies:+ '@jridgewell/trace-mapping': 0.3.31+ jest-worker: 27.5.1+ schema-utils: 4.3.3+ serialize-javascript: 6.0.2+ terser: 5.44.0+ optionalDependencies:+ '@swc/core': 1.13.21(@swc/[email protected])++ [email protected](@swc/[email protected](@swc/[email protected]))([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:'@jridgewell/trace-mapping': 0.3.31jest-worker: 27.5.1@@ -21225,7 +21257,7 @@ snapshots:babel-jest: 30.2.0(@babel/[email protected])jest-util: 30.2.0- [email protected]([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected]([email protected]))):+ [email protected]([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected]([email protected]))):dependencies:chalk: 4.1.2enhanced-resolve: 5.18.3@@ -21233,9 +21265,9 @@ snapshots:semver: 7.7.3source-map: 0.7.6typescript: 5.9.3- webpack: 5.100.2(@swc/[email protected](@swc/[email protected]))([email protected]([email protected]))+ webpack: 5.100.2(@swc/[email protected](@swc/[email protected]))([email protected]([email protected]))+ [email protected]([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:chalk: 4.1.2enhanced-resolve: 5.18.3@@ -21583,12 +21615,12 @@ snapshots:dependencies:'@discoveryjs/json-ext': 0.5.7- '@webpack-cli/configtest': 2.1.1([email protected])([email protected])- '@webpack-cli/info': 2.0.2([email protected])([email protected])- '@webpack-cli/serve': 2.0.5([email protected])([email protected])+ '@webpack-cli/configtest': 2.1.1([email protected])([email protected])+ '@webpack-cli/info': 2.0.2([email protected])([email protected])+ '@webpack-cli/serve': 2.0.5([email protected])([email protected])colorette: 2.0.20commander: 10.0.1cross-spawn: 7.0.6@@ -21597,10 +21629,10 @@ snapshots:import-local: 3.2.0interpret: 3.1.1rechoir: 0.8.0webpack-merge: 5.10.0+ [email protected]([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:colorette: 2.0.20memfs: 4.49.0@@ -21611,7 +21643,7 @@ snapshots:optionalDependencies:+ [email protected]([email protected])([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:'@types/bonjour': 3.5.13'@types/connect-history-api-fallback': 1.5.4@@ -21639,11 +21671,11 @@ snapshots:serve-index: 1.9.1sockjs: 0.3.24spdy: 4.0.2- webpack-dev-middleware: 7.4.5([email protected])+ webpack-dev-middleware: 7.4.5([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))ws: 8.18.3optionalDependencies:- webpack-cli: 5.1.4([email protected])+ webpack-cli: 5.1.4([email protected])transitivePeerDependencies:- bufferutil- debug@@ -21660,12 +21692,46 @@ snapshots:+ [email protected]([email protected](@swc/[email protected](@swc/[email protected]))([email protected])):dependencies:typed-assert: 1.0.9- [email protected](@swc/[email protected](@swc/[email protected]))([email protected]([email protected])):+ [email protected](@swc/[email protected](@swc/[email protected]))([email protected]([email protected])):+ dependencies:+ '@types/eslint-scope': 3.7.7+ '@types/estree': 1.0.8+ '@types/json-schema': 7.0.15+ '@webassemblyjs/ast': 1.14.1+ '@webassemblyjs/wasm-edit': 1.14.1+ '@webassemblyjs/wasm-parser': 1.14.1+ acorn: 8.15.0+ acorn-import-phases: 1.0.4([email protected])+ browserslist: 4.27.0+ chrome-trace-event: 1.0.4+ enhanced-resolve: 5.18.3+ es-module-lexer: 1.7.0+ eslint-scope: 5.1.1+ events: 3.3.0+ glob-to-regexp: 0.4.1+ graceful-fs: 4.2.11+ json-parse-even-better-errors: 2.3.1+ loader-runner: 4.3.1+ mime-types: 2.1.35+ neo-async: 2.6.2+ schema-utils: 4.3.3+ tapable: 2.3.0+ terser-webpack-plugin: 5.3.14(@swc/[email protected](@swc/[email protected]))([email protected](@swc/[email protected](@swc/[email protected]))([email protected]([email protected])))+ watchpack: 2.4.4+ webpack-sources: 3.3.3+ optionalDependencies:+ webpack-cli: 5.1.4([email protected])+ transitivePeerDependencies:+ - '@swc/core'+ - esbuild+ - uglify-js+dependencies:'@types/eslint-scope': 3.7.7'@types/estree': 1.0.8@@ -21689,11 +21755,11 @@ snapshots:neo-async: 2.6.2schema-utils: 4.3.3tapable: 2.3.0- terser-webpack-plugin: 5.3.14(@swc/[email protected](@swc/[email protected]))([email protected](@swc/[email protected](@swc/[email protected]))([email protected]([email protected])))watchpack: 2.4.4webpack-sources: 3.3.3optionalDependencies:- webpack-cli: 5.1.4([email protected])+ webpack-cli: 5.1.4([email protected])transitivePeerDependencies:- '@swc/core'- esbuild@@ -21722,11 +21788,11 @@ snapshots:neo-async: 2.6.2schema-utils: 4.3.3tapable: 2.3.0+ terser-webpack-plugin: 5.3.14(@swc/[email protected](@swc/[email protected]))([email protected](@swc/[email protected](@swc/[email protected]))([email protected]))watchpack: 2.4.4webpack-sources: 3.3.3optionalDependencies:- webpack-cli: 5.1.4([email protected])+ webpack-cli: 5.1.4([email protected])transitivePeerDependencies:- '@swc/core'- esbuilddiff --git a/project/backend/tsconfig.base.json b/project/backend/tsconfig.base.jsonindex 2b7a216a..dddc0b8e 100644--- a/project/backend/tsconfig.base.json+++ b/project/backend/tsconfig.base.json@@ -29,6 +29,7 @@"@yikart/common": ["libs/common/src/index.ts"],"@yikart/mongodb": ["libs/mongodb/src/index.ts"],"@yikart/redis": ["libs/redis/src/index.ts"],+ "@yikart/listmonk": ["libs/listmonk/src/index.ts"],"@yikart/redlock": ["libs/redlock/src/index.ts"],"@yikart/aitoearn-auth": ["libs/aitoearn-auth/src/index.ts"],"@yikart/aitoearn-queue": ["libs/aitoearn-queue/src/index.ts"]