@prisma/cli 8.0.0-rc.15-dev.107 → 8.0.0-rc.15-dev.108

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +26 -4
  2. package/package.json +5 -5
package/dist/cli.js CHANGED
@@ -14552,7 +14552,13 @@ async function maybeWriteSkillsStaleNotice(runtime) {
14552
14552
  if (config !== null && !config.check) return;
14553
14553
  const agents = config?.agents ?? DEFAULT_AGENTS;
14554
14554
  if (agents.length === 0) return;
14555
- const notice = renderStaleNotice(status, agentSkillDirs(agents));
14555
+ const dirs = agentSkillDirs(agents);
14556
+ if (isFormat(flagTokens(runtime.argv), "markdown")) {
14557
+ const notice = renderStaleNoticeMarkdown(status, dirs);
14558
+ if (notice !== null) runtime.stdout.write(notice);
14559
+ return;
14560
+ }
14561
+ const notice = renderStaleNotice(status, dirs);
14556
14562
  if (notice !== null) runtime.stderr.write(notice);
14557
14563
  } catch {
14558
14564
  return;
@@ -14563,11 +14569,23 @@ async function maybeWriteSkillsStaleNotice(runtime) {
14563
14569
  function firstOutdatedSkillIn(status, dirs) {
14564
14570
  return status.skills.find((skill) => skill.targets.some((target) => dirs.includes(target.dir) && (target.state === "stale" || target.state === "absent"))) ?? null;
14565
14571
  }
14566
- function renderStaleNotice(status, dirs) {
14572
+ /** The mismatch in words, without the stream's framing around it. */
14573
+ function staleNoticeSentence(status, dirs) {
14567
14574
  const outdated = firstOutdatedSkillIn(status, dirs);
14568
14575
  if (outdated === null) return null;
14569
14576
  const synced = outdated.targets.find((target) => dirs.includes(target.dir) && target.state === "stale")?.syncedVersion;
14570
- return `Prisma agent skills are out of date (installed ${outdated.library} ${outdated.version}, synced ${synced ?? "none"}). Run: ${getCliName()} skills sync\n`;
14577
+ return `Prisma agent skills are out of date (installed ${outdated.library} ${outdated.version}, synced ${synced ?? "none"})`;
14578
+ }
14579
+ function renderStaleNotice(status, dirs) {
14580
+ const sentence = staleNoticeSentence(status, dirs);
14581
+ return sentence === null ? null : `${sentence}. Run: ${getCliName()} skills sync\n`;
14582
+ }
14583
+ /** The same notice as a trailing section of the Markdown document, in
14584
+ * the heading-then-bullet shape the engine renders `### Diagnostics`
14585
+ * in. The leading blank line separates it from the command's output. */
14586
+ function renderStaleNoticeMarkdown(status, dirs) {
14587
+ const sentence = staleNoticeSentence(status, dirs);
14588
+ return sentence === null ? null : `\n### Notice\n${sentence}.\n- Sync agent skills: \`${getCliName()} skills sync\`\n`;
14571
14589
  }
14572
14590
  /** The shared flags that take a separate value, so the word after them
14573
14591
  * is that value rather than the command being invoked. */
@@ -14602,7 +14620,10 @@ function isSuppressedByInvocation(runtime) {
14602
14620
  if (group === "skills" || group === "init") return true;
14603
14621
  if (argv.includes("--json") || argv.includes("--quiet") || argv.includes("-q")) return true;
14604
14622
  if (argv.includes("--version")) return true;
14605
- return argv.some((token, index) => token === "--format=json" || token === "--format" && argv[index + 1] === "json");
14623
+ return isFormat(argv, "json");
14624
+ }
14625
+ function isFormat(tokens, format) {
14626
+ return tokens.some((token, index) => token === `--format=${format}` || token === "--format" && tokens[index + 1] === format);
14606
14627
  }
14607
14628
  /** The file an explicit --config names, so the check reads the same
14608
14629
  * config the command did. Discovery is otherwise cwd-only. */
@@ -14835,6 +14856,7 @@ async function main(proc, buildCliForRun = buildCli) {
14835
14856
  env: proc.env,
14836
14857
  argv: proc.argv.slice(2),
14837
14858
  cwd: proc.cwd(),
14859
+ stdout: proc.stdout,
14838
14860
  stderr: proc.stderr
14839
14861
  });
14840
14862
  return exitCode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/cli",
3
- "version": "8.0.0-rc.15-dev.107",
3
+ "version": "8.0.0-rc.15-dev.108",
4
4
  "description": "Command-line interface for the Prisma Developer Platform.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -44,7 +44,7 @@
44
44
  "@prisma/composer-cli": "0.20.0-dev.5",
45
45
  "@prisma/compute-sdk": "0.42.0",
46
46
  "@prisma/management-api-sdk": "1.69.0",
47
- "@prisma/orm-toolchain": "8.0.0-rc.11-dev.13",
47
+ "@prisma/orm-toolchain": "8.0.0-rc.11-dev.16",
48
48
  "@vercel/detect-agent": "^1.2.3",
49
49
  "better-result": "^2.9.2",
50
50
  "cross-spawn": "^7.0.6",
@@ -55,9 +55,9 @@
55
55
  "devDependencies": {
56
56
  "@prisma/composer": "0.20.0-dev.5",
57
57
  "@prisma/credentials-store": "^7.8.0",
58
- "@repo/cli-conformance": "8.0.0-rc.15-dev.107",
59
- "@repo/cli-telemetry": "8.0.0-rc.15-dev.107",
60
- "@repo/tsconfig": "8.0.0-rc.15-dev.107",
58
+ "@repo/cli-conformance": "8.0.0-rc.15-dev.108",
59
+ "@repo/cli-telemetry": "8.0.0-rc.15-dev.108",
60
+ "@repo/tsconfig": "8.0.0-rc.15-dev.108",
61
61
  "@types/node": "^22.19.19",
62
62
  "@types/cross-spawn": "^6.0.6",
63
63
  "tsdown": "^0.21.10",