chore: upgrade Prisma 7, LangChain 1.x, Tailwind 4.2, Vue 3.5.29 and other deps
- Prisma 6 → 7: new prisma-client generator, prisma.config.ts, PrismaPg adapter, updated all imports - LangChain 0.x → 1.x: @langchain/core, langgraph, openai - Tailwind 4.1 → 4.2.1, daisyUI 5.5.19, Vue 3.5.29, ai 6.0.99, zod 4.3.6 - Fix MessageDirection bug in crm-updates.ts (OUTBOUND → OUT) - Add server/generated to .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,3 +10,4 @@ coverage
|
|||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
yarn.lock
|
yarn.lock
|
||||||
|
frontend/server/generated
|
||||||
|
|||||||
1402
frontend/package-lock.json
generated
1402
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,16 +19,17 @@
|
|||||||
"storybook:build": "storybook build"
|
"storybook:build": "storybook build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ai-sdk/vue": "^3.0.91",
|
"@ai-sdk/vue": "^3.0.99",
|
||||||
"@apollo/client": "^3.14.0",
|
"@apollo/client": "^3.14.0",
|
||||||
"@langchain/core": "^0.3.77",
|
"@langchain/core": "^1.1.28",
|
||||||
"@langchain/langgraph": "^0.2.74",
|
"@langchain/langgraph": "^1.1.5",
|
||||||
"@langchain/openai": "^0.6.9",
|
"@langchain/openai": "^1.2.10",
|
||||||
"@nuxt/eslint": "^1.15.1",
|
"@nuxt/eslint": "^1.15.1",
|
||||||
"@nuxtjs/apollo": "^5.0.0-alpha.15",
|
"@nuxtjs/apollo": "^5.0.0-alpha.15",
|
||||||
"@panzoom/panzoom": "^4.6.1",
|
"@panzoom/panzoom": "^4.6.1",
|
||||||
"@prisma/client": "^6.16.1",
|
"@prisma/adapter-pg": "^7.4.1",
|
||||||
"@tailwindcss/vite": "^4.1.18",
|
"@prisma/client": "^7.4.1",
|
||||||
|
"@tailwindcss/vite": "^4.2.1",
|
||||||
"@tiptap/extension-collaboration": "^2.27.2",
|
"@tiptap/extension-collaboration": "^2.27.2",
|
||||||
"@tiptap/extension-collaboration-cursor": "^2.27.2",
|
"@tiptap/extension-collaboration-cursor": "^2.27.2",
|
||||||
"@tiptap/extension-placeholder": "^2.27.2",
|
"@tiptap/extension-placeholder": "^2.27.2",
|
||||||
@@ -37,9 +38,9 @@
|
|||||||
"@toast-ui/editor": "^3.2.2",
|
"@toast-ui/editor": "^3.2.2",
|
||||||
"@vue/apollo-composable": "^4.2.2",
|
"@vue/apollo-composable": "^4.2.2",
|
||||||
"@xenova/transformers": "^2.17.2",
|
"@xenova/transformers": "^2.17.2",
|
||||||
"ai": "^6.0.91",
|
"ai": "^6.0.99",
|
||||||
"bullmq": "^5.58.2",
|
"bullmq": "^5.58.2",
|
||||||
"daisyui": "^5.5.18",
|
"daisyui": "^5.5.19",
|
||||||
"graphql": "^16.12.0",
|
"graphql": "^16.12.0",
|
||||||
"graphql-tag": "^2.12.6",
|
"graphql-tag": "^2.12.6",
|
||||||
"gsap": "^3.14.2",
|
"gsap": "^3.14.2",
|
||||||
@@ -49,14 +50,14 @@
|
|||||||
"nuxt": "^4.3.1",
|
"nuxt": "^4.3.1",
|
||||||
"react": "^19.2.4",
|
"react": "^19.2.4",
|
||||||
"react-dom": "^19.2.4",
|
"react-dom": "^19.2.4",
|
||||||
"tailwindcss": "^4.1.18",
|
"tailwindcss": "^4.2.1",
|
||||||
"tldraw": "^4.4.0",
|
"tldraw": "^4.4.0",
|
||||||
"vue": "^3.5.27",
|
"vue": "^3.5.29",
|
||||||
"wavesurfer.js": "^7.12.1",
|
"wavesurfer.js": "^7.12.1",
|
||||||
"y-prosemirror": "^1.3.7",
|
"y-prosemirror": "^1.3.7",
|
||||||
"y-webrtc": "^10.3.0",
|
"y-webrtc": "^10.3.0",
|
||||||
"yjs": "^13.6.29",
|
"yjs": "^13.6.29",
|
||||||
"zod": "^4.1.5"
|
"zod": "^4.3.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@graphql-codegen/cli": "^6.1.1",
|
"@graphql-codegen/cli": "^6.1.1",
|
||||||
@@ -68,7 +69,7 @@
|
|||||||
"@storybook/addon-interactions": "^8.6.17",
|
"@storybook/addon-interactions": "^8.6.17",
|
||||||
"@storybook/test": "^8.6.17",
|
"@storybook/test": "^8.6.17",
|
||||||
"@storybook/vue3-vite": "^8.6.17",
|
"@storybook/vue3-vite": "^8.6.17",
|
||||||
"prisma": "^6.16.1",
|
"prisma": "^7.4.1",
|
||||||
"storybook": "^8.6.17",
|
"storybook": "^8.6.17",
|
||||||
"tsx": "^4.20.5",
|
"tsx": "^4.20.5",
|
||||||
"vite": "^7.3.1"
|
"vite": "^7.3.1"
|
||||||
|
|||||||
12
frontend/prisma.config.ts
Normal file
12
frontend/prisma.config.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import "dotenv/config";
|
||||||
|
import { defineConfig, env } from "prisma/config";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
schema: "prisma/schema.prisma",
|
||||||
|
datasource: {
|
||||||
|
url: env("DATABASE_URL"),
|
||||||
|
},
|
||||||
|
migrations: {
|
||||||
|
path: "prisma/migrations",
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
generator client {
|
generator client {
|
||||||
provider = "prisma-client-js"
|
provider = "prisma-client"
|
||||||
|
output = "../server/generated/prisma"
|
||||||
}
|
}
|
||||||
|
|
||||||
datasource db {
|
datasource db {
|
||||||
provider = "postgresql"
|
provider = "postgresql"
|
||||||
url = env("DATABASE_URL")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum TeamRole {
|
enum TeamRole {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { PrismaClient } from "@prisma/client";
|
import { PrismaClient } from "../server/generated/prisma/client.js";
|
||||||
|
import { PrismaPg } from "@prisma/adapter-pg";
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { randomBytes, scryptSync } from "node:crypto";
|
import { randomBytes, scryptSync } from "node:crypto";
|
||||||
@@ -28,7 +29,8 @@ function loadEnvFromDotEnv() {
|
|||||||
|
|
||||||
loadEnvFromDotEnv();
|
loadEnvFromDotEnv();
|
||||||
|
|
||||||
const prisma = new PrismaClient();
|
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL });
|
||||||
|
const prisma = new PrismaClient({ adapter });
|
||||||
|
|
||||||
const LOGIN_PHONE = "+15550000001";
|
const LOGIN_PHONE = "+15550000001";
|
||||||
const LOGIN_PASSWORD = "ConnectFlow#2026";
|
const LOGIN_PASSWORD = "ConnectFlow#2026";
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import fs from "node:fs/promises";
|
import fs from "node:fs/promises";
|
||||||
import fsSync from "node:fs";
|
import fsSync from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { PrismaClient } from "@prisma/client";
|
import { PrismaClient } from "../server/generated/prisma/client.js";
|
||||||
|
import { PrismaPg } from "@prisma/adapter-pg";
|
||||||
|
|
||||||
function loadEnvFromDotEnv() {
|
function loadEnvFromDotEnv() {
|
||||||
const p = path.resolve(process.cwd(), ".env");
|
const p = path.resolve(process.cwd(), ".env");
|
||||||
@@ -28,7 +29,8 @@ function loadEnvFromDotEnv() {
|
|||||||
|
|
||||||
loadEnvFromDotEnv();
|
loadEnvFromDotEnv();
|
||||||
|
|
||||||
const prisma = new PrismaClient();
|
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL });
|
||||||
|
const prisma = new PrismaClient({ adapter });
|
||||||
|
|
||||||
function datasetRoot() {
|
function datasetRoot() {
|
||||||
const teamId = process.env.TEAM_ID || "demo-team";
|
const teamId = process.env.TEAM_ID || "demo-team";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import fs from "node:fs/promises";
|
import fs from "node:fs/promises";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import type { ChatRole, Prisma } from "@prisma/client";
|
import type { ChatRole, Prisma } from "../generated/prisma/client";
|
||||||
import { prisma } from "../utils/prisma";
|
import { prisma } from "../utils/prisma";
|
||||||
import { datasetRoot } from "../dataset/paths";
|
import { datasetRoot } from "../dataset/paths";
|
||||||
import { ensureDataset } from "../dataset/exporter";
|
import { ensureDataset } from "../dataset/exporter";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Queue, Worker, type JobsOptions, type ConnectionOptions } from "bullmq";
|
import { Queue, Worker, type JobsOptions, type ConnectionOptions } from "bullmq";
|
||||||
import { Prisma } from "@prisma/client";
|
import { Prisma } from "../generated/prisma/client";
|
||||||
import { prisma } from "../utils/prisma";
|
import { prisma } from "../utils/prisma";
|
||||||
|
|
||||||
export const OUTBOUND_DELIVERY_QUEUE_NAME = (
|
export const OUTBOUND_DELIVERY_QUEUE_NAME = (
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ async function pollAndBroadcast() {
|
|||||||
contactName: msg.contact.name,
|
contactName: msg.contact.name,
|
||||||
text: msg.content ?? "",
|
text: msg.content ?? "",
|
||||||
channel: mapChannel(msg.channel),
|
channel: mapChannel(msg.channel),
|
||||||
direction: msg.direction === "OUTBOUND" ? "out" : "in",
|
direction: msg.direction === "OUT" ? "out" : "in",
|
||||||
at: msg.occurredAt?.toISOString() ?? msg.createdAt.toISOString(),
|
at: msg.occurredAt?.toISOString() ?? msg.createdAt.toISOString(),
|
||||||
};
|
};
|
||||||
for (const peer of peers) {
|
for (const peer of peers) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { randomUUID } from "node:crypto";
|
import { randomUUID } from "node:crypto";
|
||||||
import type { PrismaClient } from "@prisma/client";
|
import type { PrismaClient } from "../generated/prisma/client";
|
||||||
|
|
||||||
type CalendarSnapshotRow = {
|
type CalendarSnapshotRow = {
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { PrismaClient } from "@prisma/client";
|
import { PrismaClient, type ClientTimelineContentType } from "../generated/prisma/client";
|
||||||
|
import { PrismaPg } from "@prisma/adapter-pg";
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
// eslint-disable-next-line no-var
|
// eslint-disable-next-line no-var
|
||||||
@@ -8,7 +9,7 @@ declare global {
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Auto-sync ClientTimelineEntry for CalendarEvent and FeedCard
|
// Auto-sync ClientTimelineEntry for CalendarEvent and FeedCard
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
const TIMELINE_MODEL_MAP: Record<string, string> = {
|
const TIMELINE_MODEL_MAP: Record<string, ClientTimelineContentType> = {
|
||||||
calendarEvent: "CALENDAR_EVENT",
|
calendarEvent: "CALENDAR_EVENT",
|
||||||
feedCard: "RECOMMENDATION",
|
feedCard: "RECOMMENDATION",
|
||||||
};
|
};
|
||||||
@@ -58,9 +59,12 @@ function timelineHook(model: string) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL! });
|
||||||
|
|
||||||
const basePrisma =
|
const basePrisma =
|
||||||
globalThis.__prisma ??
|
globalThis.__prisma ??
|
||||||
new PrismaClient({
|
new PrismaClient({
|
||||||
|
adapter,
|
||||||
log: ["error", "warn"],
|
log: ["error", "warn"],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user