sv 0.13.0 → 0.13.2

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/bin.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { f as program, l as from, r as detectPackageManager, u as Command } from "./package-manager-BU-MLhop.mjs";
3
- import { a as helpConfig, i as forwardExitCode, n as add, o as name, r as create, s as version } from "./engine-DOKagHfI.mjs";
4
- import { color, resolveCommand } from "@sveltejs/sv-utils";
2
+ import { a as detectPackageManager, c as name, h as program, l as version, m as Command, n as add, o as forwardExitCode, p as from, r as create, s as helpConfig } from "./engine-B8V7JiJ3.mjs";
3
+ import { color, resolveCommandArray } from "@sveltejs/sv-utils";
5
4
  import process from "node:process";
6
5
  import { execSync } from "node:child_process";
7
6
  //#region src/cli/check.ts
@@ -13,8 +12,7 @@ const check = new Command("check").description("a CLI for checking your Svelte c
13
12
  async function runCheck(cwd, args) {
14
13
  const pm = await detectPackageManager(cwd);
15
14
  if (!from(cwd, "svelte-check", true)) {
16
- const cmd = resolveCommand(pm, "add", ["-D", "svelte-check"]);
17
- console.error(`'svelte-check' is not installed locally. Install it with: ${color.command(`${cmd.command} ${cmd.args.join(" ")}`)}`);
15
+ console.error(`'svelte-check' is not installed locally. Install it with: ${color.command(resolveCommandArray(pm, "add", ["-D", "svelte-check"]))}`);
18
16
  process.exit(1);
19
17
  }
20
18
  if (args.includes("--help")) {
@@ -22,8 +20,7 @@ async function runCheck(cwd, args) {
22
20
  console.log("Find here all options for both tools");
23
21
  }
24
22
  try {
25
- const cmd = resolveCommand(pm, "execute-local", ["svelte-check", ...args]);
26
- execSync(`${cmd.command} ${cmd.args.join(" ")}`, {
23
+ execSync(resolveCommandArray(pm, "execute-local", ["svelte-check", ...args]).join(" "), {
27
24
  stdio: "inherit",
28
25
  cwd
29
26
  });
@@ -43,8 +40,7 @@ async function runMigrate(cwd, args) {
43
40
  try {
44
41
  const cmdArgs = ["svelte-migrate@latest", ...args];
45
42
  if (pm === "npm") cmdArgs.unshift("--yes");
46
- const cmd = resolveCommand(pm, "execute", cmdArgs);
47
- execSync(`${cmd.command} ${cmd.args.join(" ")}`, {
43
+ execSync(resolveCommandArray(pm, "execute", cmdArgs).join(" "), {
48
44
  stdio: "inherit",
49
45
  cwd
50
46
  });