Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update cli errors and use new links from core
  • Loading branch information
nicktrn committed Oct 5, 2024
commit 13498ecdc1d532461473c84ecbd843ffbbf0edaf
36 changes: 18 additions & 18 deletions packages/cli-v3/src/deploy/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { writeFile } from "node:fs/promises";
import { join } from "node:path";
import { chalkError, chalkWarning, cliLink } from "../utilities/cliOutput.js";
import { createTempDir } from "../utilities/fileSystem.js";
import { docs, getInTouch } from "../utilities/links.js";
import { links } from "@trigger.dev/core/v3";

export type WarningsCheckReturn =
| {
Expand Down Expand Up @@ -46,27 +46,27 @@ export function checkLogsForErrors(logs: string) {
const errors: LogParserOptions = [
{
regex: /Error: Provided --schema at (?<schema>.*) doesn't exist/,
message: `Prisma generate failed to find the specified schema at "$schema".\nDid you include it in config.additionalFiles? ${cliLink(
"Config docs",
docs.config.prisma
message: `Prisma generate failed to find the specified schema at "$schema".\nDid you configure the Prisma extension correctly? ${cliLink(
"Extension docs",
links.docs.config.prisma
)}`,
},
{
regex: /@prisma\/client did not initialize yet/,
message: `Prisma client not initialized yet.\nDid you forget to add the postinstall script? ${cliLink(
"Config docs",
docs.config.prisma
message: `Prisma client not initialized yet.\nDid you configure the Prisma extension? ${cliLink(
"Extension docs",
links.docs.config.prisma
)}`,
},
{
regex: /sh: 1: (?<packageOrBinary>.*): not found/,
message: `$packageOrBinary not found\n\nIf it's a package: Include it in ${cliLink(
"config.additionalPackages",
docs.config.prisma
)}\nIf it's a binary: Please ${cliLink(
"get in touch",
getInTouch
)} and we'll see what we can do!`,
message: `$packageOrBinary not found\n\nIf it's a package: Use the ${cliLink(
"additionalPackages extension",
links.docs.config.additionalPackages
)}\nIf it's a binary: Check the other ${cliLink(
"build extensions",
links.docs.config.extensions
)}`,
},
];

Expand Down Expand Up @@ -101,10 +101,10 @@ export function checkLogsForWarnings(logs: string): WarningsCheckReturn {
const warnings: LogParserOptions = [
{
regex: /prisma:warn We could not find your Prisma schema/,
message: `Prisma generate failed to find the default schema. Did you include it in config.additionalFiles? ${cliLink(
"Config docs",
docs.config.prisma
)}\nCustom schema paths require a postinstall script like this: \`prisma generate --schema=./custom/path/to/schema.prisma\``,
message: `Prisma generate failed to find the default schema. Did you configure the Prisma extension correctly? ${cliLink(
"Extension docs",
links.docs.config.prisma
)}`,
shouldFail: true,
},
];
Expand Down
10 changes: 0 additions & 10 deletions packages/cli-v3/src/utilities/links.ts

This file was deleted.