Skip to content

Commit 13498ec

Browse files
committed
update cli errors and use new links from core
1 parent 83eb469 commit 13498ec

File tree

2 files changed

+18
-28
lines changed

2 files changed

+18
-28
lines changed

packages/cli-v3/src/deploy/logs.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { writeFile } from "node:fs/promises";
33
import { join } from "node:path";
44
import { chalkError, chalkWarning, cliLink } from "../utilities/cliOutput.js";
55
import { createTempDir } from "../utilities/fileSystem.js";
6-
import { docs, getInTouch } from "../utilities/links.js";
6+
import { links } from "@trigger.dev/core/v3";
77

88
export type WarningsCheckReturn =
99
| {
@@ -46,27 +46,27 @@ export function checkLogsForErrors(logs: string) {
4646
const errors: LogParserOptions = [
4747
{
4848
regex: /Error: Provided --schema at (?<schema>.*) doesn't exist/,
49-
message: `Prisma generate failed to find the specified schema at "$schema".\nDid you include it in config.additionalFiles? ${cliLink(
50-
"Config docs",
51-
docs.config.prisma
49+
message: `Prisma generate failed to find the specified schema at "$schema".\nDid you configure the Prisma extension correctly? ${cliLink(
50+
"Extension docs",
51+
links.docs.config.prisma
5252
)}`,
5353
},
5454
{
5555
regex: /@prisma\/client did not initialize yet/,
56-
message: `Prisma client not initialized yet.\nDid you forget to add the postinstall script? ${cliLink(
57-
"Config docs",
58-
docs.config.prisma
56+
message: `Prisma client not initialized yet.\nDid you configure the Prisma extension? ${cliLink(
57+
"Extension docs",
58+
links.docs.config.prisma
5959
)}`,
6060
},
6161
{
6262
regex: /sh: 1: (?<packageOrBinary>.*): not found/,
63-
message: `$packageOrBinary not found\n\nIf it's a package: Include it in ${cliLink(
64-
"config.additionalPackages",
65-
docs.config.prisma
66-
)}\nIf it's a binary: Please ${cliLink(
67-
"get in touch",
68-
getInTouch
69-
)} and we'll see what we can do!`,
63+
message: `$packageOrBinary not found\n\nIf it's a package: Use the ${cliLink(
64+
"additionalPackages extension",
65+
links.docs.config.additionalPackages
66+
)}\nIf it's a binary: Check the other ${cliLink(
67+
"build extensions",
68+
links.docs.config.extensions
69+
)}`,
7070
},
7171
];
7272

@@ -101,10 +101,10 @@ export function checkLogsForWarnings(logs: string): WarningsCheckReturn {
101101
const warnings: LogParserOptions = [
102102
{
103103
regex: /prisma:warn We could not find your Prisma schema/,
104-
message: `Prisma generate failed to find the default schema. Did you include it in config.additionalFiles? ${cliLink(
105-
"Config docs",
106-
docs.config.prisma
107-
)}\nCustom schema paths require a postinstall script like this: \`prisma generate --schema=./custom/path/to/schema.prisma\``,
104+
message: `Prisma generate failed to find the default schema. Did you configure the Prisma extension correctly? ${cliLink(
105+
"Extension docs",
106+
links.docs.config.prisma
107+
)}`,
108108
shouldFail: true,
109109
},
110110
];

packages/cli-v3/src/utilities/links.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)