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,6 +1,6 @@
|
||||
import fs from "node:fs/promises";
|
||||
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 { datasetRoot } from "../dataset/paths";
|
||||
import { ensureDataset } from "../dataset/exporter";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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";
|
||||
|
||||
export const OUTBOUND_DELIVERY_QUEUE_NAME = (
|
||||
|
||||
@@ -203,7 +203,7 @@ async function pollAndBroadcast() {
|
||||
contactName: msg.contact.name,
|
||||
text: msg.content ?? "",
|
||||
channel: mapChannel(msg.channel),
|
||||
direction: msg.direction === "OUTBOUND" ? "out" : "in",
|
||||
direction: msg.direction === "OUT" ? "out" : "in",
|
||||
at: msg.occurredAt?.toISOString() ?? msg.createdAt.toISOString(),
|
||||
};
|
||||
for (const peer of peers) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { randomUUID } from "node:crypto";
|
||||
import type { PrismaClient } from "@prisma/client";
|
||||
import type { PrismaClient } from "../generated/prisma/client";
|
||||
|
||||
type CalendarSnapshotRow = {
|
||||
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 {
|
||||
// eslint-disable-next-line no-var
|
||||
@@ -8,7 +9,7 @@ declare global {
|
||||
// ---------------------------------------------------------------------------
|
||||
// Auto-sync ClientTimelineEntry for CalendarEvent and FeedCard
|
||||
// ---------------------------------------------------------------------------
|
||||
const TIMELINE_MODEL_MAP: Record<string, string> = {
|
||||
const TIMELINE_MODEL_MAP: Record<string, ClientTimelineContentType> = {
|
||||
calendarEvent: "CALENDAR_EVENT",
|
||||
feedCard: "RECOMMENDATION",
|
||||
};
|
||||
@@ -58,9 +59,12 @@ function timelineHook(model: string) {
|
||||
};
|
||||
}
|
||||
|
||||
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL! });
|
||||
|
||||
const basePrisma =
|
||||
globalThis.__prisma ??
|
||||
new PrismaClient({
|
||||
adapter,
|
||||
log: ["error", "warn"],
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user