fix the production package cannot run issue caused by glob(path-scurry) module error - maybe the version of glob is too new, and there exists different version of glob, so download rimraf and typeorm to makes major version of glob at 7

This commit is contained in:
geekgeekrun
2024-03-21 01:24:42 +08:00
parent af92ef6718
commit 3f6a4615e3
18 changed files with 215 additions and 396 deletions

View File

@@ -1,5 +1,7 @@
import "reflect-metadata";
import { DataSource } from "typeorm";
import { type DataSource } from "typeorm";
import { parseCompanyScale, parseSalary } from "./utils/parser";
import { requireTypeorm } from "./utils/module-loader";
import { BossInfo } from "./entity/BossInfo";
import { BossInfoChangeLog } from "./entity/BossInfoChangeLog";
@@ -10,9 +12,9 @@ import { JobInfo } from "./entity/JobInfo";
import { JobInfoChangeLog } from "./entity/JobInfoChangeLog";
import { BossActiveStatusRecord } from "./entity/BossActiveStatusRecord";
import { UserInfo } from "./entity/UserInfo";
import { parseCompanyScale, parseSalary } from "./utils/parser";
async function initDb(dbFilePath) {
function initDb(dbFilePath) {
const { DataSource } = requireTypeorm()
const appDataSource = new DataSource({
type: "sqlite",
synchronize: true,