@prisma/orm-toolchain 8.0.0-rc.4-dev.13 → 8.0.0-rc.4-dev.14

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.
package/dist/cli.mjs CHANGED
@@ -33,12 +33,12 @@ import { applyEdits, modify, parse, printParseErrorCode } from "jsonc-parser";
33
33
  import stringWidth from "string-width";
34
34
  import { bold, createColors, cyan, cyanBright, dim, green, yellow } from "colorette";
35
35
  import { build } from "esbuild";
36
- //#region ../../../1-framework/3-tooling/cli/dist/load-config-ChYX98p-.mjs
37
- var version = "8.0.0-rc.4-dev.13";
36
+ //#region ../../../1-framework/3-tooling/cli/dist/load-config-D8DBODld.mjs
37
+ var version = "8.0.0-rc.4-dev.14";
38
38
  const MISSING_CONFIG_ACTION = {
39
39
  kind: "run-command",
40
40
  label: "Create a config file",
41
- command: "prisma-cli init"
41
+ command: "prisma orm init"
42
42
  };
43
43
  function editConfigAction(field) {
44
44
  return {
@@ -2527,8 +2527,8 @@ const formatCommand = createFormatCommand();
2527
2527
  *
2528
2528
  * - We only inspect the unnamed top-level `catalog:` block. pnpm also
2529
2529
  * supports `catalogs:` (plural — *named* catalogs referenced via
2530
- * `catalog:foo` specifiers); those don't apply to a vanilla
2531
- * `pnpm add prisma-next` invocation, so we skip them.
2530
+ * `catalog:foo` specifiers); those don't apply to the vanilla
2531
+ * `pnpm add` invocations `init` runs, so we skip them.
2532
2532
  * - We don't validate YAML syntax exhaustively. The file format pnpm
2533
2533
  * ships is line-oriented and well-known; a minimal regex is more
2534
2534
  * robust than depending on a YAML parser for one warning.
@@ -2643,7 +2643,7 @@ function errorInitMissingFlags(options) {
2643
2643
  }).join(" ");
2644
2644
  return new CliStructuredError$1$1("CLI.INIT_MISSING_FLAGS", "Missing required flags", {
2645
2645
  why: `${options.why} Missing required flag(s): ${flagList}.`,
2646
- fix: `Re-run with the missing flag(s) supplied, e.g. \`prisma-cli init --yes ${fixList}\`. Use \`prisma-cli init --help\` to see every flag.`,
2646
+ fix: `Re-run with the missing flag(s) supplied, e.g. \`prisma orm init --yes ${fixList}\`. Use \`prisma orm init --help\` to see every flag.`,
2647
2647
  docsUrl: docsUrlFor("CLI.INIT_MISSING_FLAGS"),
2648
2648
  meta: { missingFlags: options.missing }
2649
2649
  });
@@ -2685,15 +2685,13 @@ function errorInitAuthoringSchemaPathMismatch(options) {
2685
2685
  }
2686
2686
  /**
2687
2687
  * The user cancelled an interactive prompt (Ctrl-C, escape, declined a
2688
- * selection). Distinct from `errorInitReinitNeedsForce` because that path
2689
- * applies to non-interactive mode where the user was never given the
2690
- * choice; this one is the generic "user said no" path. Maps to exit code
2688
+ * selection) the generic "user said no" path. Maps to exit code
2691
2689
  * 3 (USER_ABORTED).
2692
2690
  */
2693
2691
  function errorInitUserAborted() {
2694
2692
  return new CliStructuredError$1$1("CLI.INIT_USER_ABORTED", "Init cancelled", {
2695
2693
  why: "The interactive prompt was cancelled before all required inputs were supplied. No files were modified.",
2696
- fix: "Re-run `prisma-cli init` and complete the prompts, or pass the required inputs as flags (see `--help`) for a non-interactive run.",
2694
+ fix: "Re-run `prisma orm init` and complete the prompts, or pass the required inputs as flags (see `--help`) for a non-interactive run.",
2697
2695
  severity: "info"
2698
2696
  });
2699
2697
  }
@@ -2726,7 +2724,7 @@ function errorInitStrictProbeWithoutProbe() {
2726
2724
  function errorInitInvalidManifest(options) {
2727
2725
  return new CliStructuredError$1$1("CLI.INIT_INVALID_MANIFEST", `Failed to parse ${options.path}`, {
2728
2726
  why: `\`${options.path}\` is not valid JSON: ${options.cause}`,
2729
- fix: `Fix the JSON syntax in \`${options.path}\` (a missing comma or unbalanced brace is the most common cause), then re-run \`prisma-cli init\`.`,
2727
+ fix: `Fix the JSON syntax in \`${options.path}\` (a missing comma or unbalanced brace is the most common cause), then re-run \`prisma orm init\`.`,
2730
2728
  docsUrl: docsUrlFor("CLI.INIT_INVALID_MANIFEST"),
2731
2729
  meta: {
2732
2730
  path: options.path,
@@ -2751,7 +2749,7 @@ function errorInitInvalidManifest(options) {
2751
2749
  function errorInitInvalidTsconfig(options) {
2752
2750
  return new CliStructuredError$1$1("CLI.INIT_INVALID_TSCONFIG", `Failed to parse ${options.path}`, {
2753
2751
  why: `\`${options.path}\` is not valid JSON or JSONC: ${options.cause}`,
2754
- fix: `Fix the syntax in \`${options.path}\` and re-run \`prisma-cli init\`. \`init\` accepts JSONC (comments and trailing commas) but cannot recover from unbalanced braces or missing commas.`,
2752
+ fix: `Fix the syntax in \`${options.path}\` and re-run \`prisma orm init\`. \`init\` accepts JSONC (comments and trailing commas) but cannot recover from unbalanced braces or missing commas.`,
2755
2753
  docsUrl: docsUrlFor("CLI.INIT_INVALID_TSCONFIG"),
2756
2754
  meta: {
2757
2755
  path: options.path,
@@ -2795,7 +2793,7 @@ function errorInitProbeFailed(options) {
2795
2793
  function errorInitWriteFailed(options) {
2796
2794
  return new CliStructuredError$1$1("CLI.INIT_WRITE_FAILED", `Failed to write ${options.path}`, {
2797
2795
  why: `\`${options.path}\` could not be written: ${options.cause}`,
2798
- fix: "Fix what stopped the write — a directory sitting where the file goes, permissions, a full disk — then run `prisma-cli init` again. It will ask you to confirm replacing the files this run already wrote (listed in `meta.filesWritten`).",
2796
+ fix: "Fix what stopped the write — a directory sitting where the file goes, permissions, a full disk — then run `prisma orm init` again. Interactive runs ask before replacing the files this run already wrote (listed in `meta.filesWritten`); non-interactive runs grant that consent with `--confirm <directory name>`.",
2799
2797
  docsUrl: docsUrlFor("CLI.INIT_WRITE_FAILED"),
2800
2798
  meta: {
2801
2799
  path: options.path,
@@ -2839,7 +2837,7 @@ async function probeServerVersion(ctx, overrides = {}) {
2839
2837
  minVersion,
2840
2838
  meetsMinimum: null,
2841
2839
  cause: err.message,
2842
- message: `Skipped --probe-db: ${err.message}. (Run with install enabled, or install the driver yourself, then re-run \`prisma-cli init --probe-db\`.)`
2840
+ message: `Skipped --probe-db: ${err.message}. (Run with install enabled, or install the driver yourself, then re-run \`prisma orm init --probe-db\`.)`
2843
2841
  };
2844
2842
  const cause = redactDatabaseUrlSecrets(causeMessage$2(err));
2845
2843
  return {
@@ -3004,7 +3002,7 @@ const DEFAULT_SKILL_SOURCES = [
3004
3002
  * `#ref` fragment is dropped — local-path mode in upstream's CLI does
3005
3003
  * not accept refs, and the local clone has whatever content the test
3006
3004
  * checked into it anyway. When set to anything else (e.g. a fork name
3007
- * `myuser/prisma-next`), the ref policy is preserved.
3005
+ * `myuser/prisma`), the ref policy is preserved.
3008
3006
  */
3009
3007
  function resolveAgentSkillBase(env) {
3010
3008
  const override = env["PRISMA_NEXT_SKILLS_BASE"]?.trim();
@@ -3126,10 +3124,13 @@ const AGENT_SKILL_ROOTS = [
3126
3124
  /**
3127
3125
  * Every directory a retired per-workflow skill may occupy in a
3128
3126
  * consumer project. Init deletes each (recursively) before running the
3129
- * skill install.
3127
+ * skill install. Names that are also in `DEFAULT_SKILL_SOURCES` are
3128
+ * excluded so a list mistake can never delete a skill init installs
3129
+ * (or one `--skip-skills` preserves) — see TML-2637.
3130
3130
  */
3131
- function legacySkillDirs() {
3132
- return AGENT_SKILL_ROOTS.flatMap((root) => RETIRED_SKILL_NAMES.map((name) => `${root}/${name}`));
3131
+ function legacySkillDirs(retired = RETIRED_SKILL_NAMES, sources = DEFAULT_SKILL_SOURCES) {
3132
+ const installed = new Set(sources.map((source) => source.skill));
3133
+ return AGENT_SKILL_ROOTS.flatMap((root) => retired.filter((name) => !installed.has(name)).map((name) => `${root}/${name}`));
3133
3134
  }
3134
3135
  /**
3135
3136
  * The resolver a scaffold for `target` is written against.
@@ -4153,7 +4154,7 @@ function requirementsBlock(target) {
4153
4154
  "## Requirements",
4154
4155
  "",
4155
4156
  `- **${TARGET_LABEL[target]} ${MIN_SERVER_VERSION[target]} or newer.** Older servers are not supported. Run ${target === "postgres" ? "`SELECT version()`" : "`db.runCommand({ buildInfo: 1 })`"} against your server to verify.`,
4156
- "- The CLI never connects to your database without explicit consent. Pass `--probe-db` to `prisma-cli init` if you want `init` to verify the server version itself."
4157
+ "- The CLI never connects to your database without explicit consent. Pass `--probe-db` to `prisma orm init` if you want `init` to verify the server version itself."
4157
4158
  ].join("\n");
4158
4159
  }
4159
4160
  const sharedVariables = [