@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.
- package/lib/_chunks-cjs/cli.js +29 -29
- package/lib/_chunks-cjs/cli.js.map +1 -1
- package/package.json +6 -6
- package/src/actions/init-project/initProject.ts +11 -23
- package/src/cli.ts +0 -3
- package/src/packageManager/installPackages.ts +21 -33
- package/templates/blog/README.md +1 -1
- package/templates/clean/README.md +1 -1
- package/templates/ecommerce/README.md +1 -1
- package/templates/get-started/README.md +1 -1
- package/templates/moviedb/README.md +1 -1
- package/templates/quickstart/README.md +1 -1
package/lib/_chunks-cjs/cli.js
CHANGED
|
@@ -23522,23 +23522,23 @@ async function installDeclaredPackages(cwd, packageManager, context) {
|
|
|
23522
23522
|
encoding: "utf8",
|
|
23523
23523
|
env: getPartialEnvWithNpmPath(cwd),
|
|
23524
23524
|
cwd,
|
|
23525
|
-
stdio: "
|
|
23526
|
-
};
|
|
23525
|
+
stdio: "inherit"
|
|
23526
|
+
}, npmArgs = ["install", "--legacy-peer-deps"];
|
|
23527
23527
|
let result;
|
|
23528
|
-
|
|
23529
|
-
npm
|
|
23530
|
-
|
|
23531
|
-
|
|
23532
|
-
|
|
23533
|
-
}
|
|
23534
|
-
|
|
23535
|
-
|
|
23536
|
-
|
|
23537
|
-
|
|
23538
|
-
|
|
23539
|
-
|
|
23540
|
-
|
|
23541
|
-
|
|
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]
|
|
53700
|
-
|
|
53701
|
-
|
|
53702
|
-
|
|
53703
|
-
|
|
53704
|
-
`
|
|
53705
|
-
|
|
53706
|
-
|
|
53707
|
-
`), 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}`),
|
|
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) {
|