@sanity/cli 3.92.1-next.31.52ea1d6df9 → 3.92.1-next.33.d62ed552cc

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.
@@ -23522,23 +23522,23 @@ async function installDeclaredPackages(cwd, packageManager, context) {
23522
23522
  encoding: "utf8",
23523
23523
  env: getPartialEnvWithNpmPath(cwd),
23524
23524
  cwd,
23525
- stdio: "pipe"
23526
- };
23525
+ stdio: "inherit"
23526
+ }, npmArgs = ["install", "--legacy-peer-deps"];
23527
23527
  let result;
23528
- const installerArgs = {
23529
- npm: ["install", "--legacy-peer-deps"],
23530
- yarn: ["install"],
23531
- pnpm: ["install"],
23532
- bun: ["install"]
23533
- };
23534
- async function handleInstall(cmd, args) {
23535
- const progress = output.spinner(`Running ${cmd} ${args.join(" ")}
23536
- `).start();
23537
- if (result = await execa(cmd, args, execOptions), result?.exitCode || result?.failed)
23538
- throw progress.fail(), output.print(result.stdout), new Error("Dependency installation failed");
23539
- progress.succeed();
23540
- }
23541
- packageManager === "manual" ? output.print(`Manual installation selected \u2014 run 'npm ${installerArgs.npm} or equivalent'`) : await handleInstall(packageManager, installerArgs[packageManager]);
23528
+ if (packageManager === "npm")
23529
+ output.print(`Running 'npm ${npmArgs.join(" ")}'`), result = await execa("npm", npmArgs, execOptions);
23530
+ else if (packageManager === "yarn") {
23531
+ const yarnArgs = ["install"];
23532
+ output.print(`Running 'yarn ${yarnArgs.join(" ")}'`), result = await execa("yarn", yarnArgs, execOptions);
23533
+ } else if (packageManager === "pnpm") {
23534
+ const pnpmArgs = ["install"];
23535
+ output.print(`Running 'pnpm ${pnpmArgs.join(" ")}'`), result = await execa("pnpm", pnpmArgs, execOptions);
23536
+ } else if (packageManager === "bun") {
23537
+ const bunArgs = ["install"];
23538
+ output.print(`Running 'bun ${bunArgs.join(" ")}'`), result = await execa("bun", bunArgs, execOptions);
23539
+ } else packageManager === "manual" && output.print(`Manual installation selected - run 'npm ${npmArgs.join(" ")}' or similar`);
23540
+ if (result?.exitCode || result?.failed)
23541
+ throw new Error("Dependency installation failed");
23542
23542
  }
23543
23543
  async function installNewPackages(options2, context) {
23544
23544
  const { packageManager, packages } = options2, { output, workDir } = context, execOptions = {
@@ -53696,15 +53696,18 @@ ${chalk2.green("Success!")} Your Sanity configuration files has been added to th
53696
53696
  pnpm: "pnpm dev",
53697
53697
  bun: "bun dev",
53698
53698
  manual: "npm run dev"
53699
- }[pkgManager], isCurrentDir = outputPath === process.cwd(), goToProjectDir = `(${chalk2.cyan(`cd ${outputPath}`)} to navigate to your new project directory)`;
53700
- isAppTemplate ? (print(`\u2705 ${chalk2.green.bold("Success!")} Your custom app has been scaffolded.`), isCurrentDir || print(goToProjectDir), print(
53701
- `
53702
- ${chalk2.bold("Next")}, configure the project(s) and dataset(s) your app should work with.`
53703
- ), print("\nGet started in `src/App.tsx`, or refer to our documentation for a walkthrough:"), print(chalk2.blue.underline("https://www.sanity.io/docs/app-sdk/sdk-configuration")), print(`
53704
- `), print("Other helpful commands:"), print("npx sanity docs to open the documentation in a browser"), print("npx sanity dev to start the development server for your app"), print("npx sanity deploy to deploy your app")) : (print(`\u2705 ${chalk2.green.bold("Success!")} Your Studio has been created.`), isCurrentDir || print(goToProjectDir), print(
53705
- `Get started by running ${chalk2.cyan(devCommand)} to launch your Studio\u2019s development server`
53706
- ), print(`
53707
- `), print("Other helpful commands:"), print("npx sanity docs to open the documentation in a browser"), print("npx sanity manage to open the project settings in a browser"), print("npx sanity help to explore the CLI manual")), isFirstProject && (trace.log({ step: "sendCommunityInvite", selectedOption: "yes" }), print(`
53699
+ }[pkgManager];
53700
+ outputPath === process.cwd() ? (print(`
53701
+ ${chalk2.green("Success!")} Now, use this command to continue:
53702
+ `), print(
53703
+ `${chalk2.cyan(devCommand)} - to run ${isAppTemplate ? "your Sanity application" : "Sanity Studio"}
53704
+ `
53705
+ )) : (print(`
53706
+ ${chalk2.green("Success!")} Now, use these commands to continue:
53707
+ `), print(`First: ${chalk2.cyan(`cd ${outputPath}`)} - to enter project's directory`), print(
53708
+ `Then: ${chalk2.cyan(devCommand)} -to run ${isAppTemplate ? "your Sanity application" : "Sanity Studio"}
53709
+ `
53710
+ )), print("Other helpful commands"), print("npx sanity docs - to open the documentation in a browser"), print("npx sanity manage - to open the project settings in a browser"), print("npx sanity help - to explore the CLI manual"), isFirstProject && (trace.log({ step: "sendCommunityInvite", selectedOption: "yes" }), print(`
53708
53711
  Join our wonderful developer community as well: ${chalk2.cyan("https://snty.link/community")}`), print(`We look forward to seeing you there!
53709
53712
  `)), trace.complete();
53710
53713
  async function getOrCreateUser() {
@@ -79646,10 +79649,7 @@ async function runCli(cliRoot, { cliVersion }) {
79646
79649
  await flushTelemetry();
79647
79650
  const error2 = typeof err.details == "string" ? err.details : err;
79648
79651
  console.error(`
79649
- ${error2.stack ? neatStack(err) : error2}`), err.cause && console.error(`
79650
- Caused by:
79651
-
79652
- ${err.cause.stack ? neatStack(err.cause) : err.cause}`), cliCommandTrace.error(error2), process.exit(1);
79652
+ ${error2.stack ? neatStack(err) : error2}`), cliCommandTrace.error(error2), process.exit(1);
79653
79653
  });
79654
79654
  }
79655
79655
  async function getCoreModulePath(workDir, cliConfig) {