@sanity/cli 3.78.1-mcp.17 → 3.78.1

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.
@@ -46933,10 +46933,9 @@ const blogTemplate = {}, cleanTemplate = {}, coreAppTemplate = {
46933
46933
  },
46934
46934
  appLocation: "./src/App.tsx",
46935
46935
  scripts: {
46936
- // this will eventually run a concurrently process with another in-flight utility
46937
- dev: "sanity app dev",
46938
- build: "sanity app build",
46939
- start: "sanity app start"
46936
+ dev: "sanity dev",
46937
+ build: "sanity build",
46938
+ start: "sanity start"
46940
46939
  }
46941
46940
  }, configTemplate$3 = `
46942
46941
  import {defineConfig, isDev} from 'sanity'
@@ -78856,14 +78855,14 @@ function installProcessExitHack(finalTask) {
78856
78855
  }
78857
78856
  async function runCli(cliRoot, { cliVersion }) {
78858
78857
  installUnhandledRejectionsHandler();
78859
- const pkg = { name: "@sanity/cli", version: cliVersion }, args = parseArguments(), isInit = args.groupOrCommand === "init" && args.argsWithoutOptions[0] !== "plugin", isCoreApp = args.groupOrCommand === "app", cwd = getCurrentWorkingDirectory();
78858
+ const pkg = { name: "@sanity/cli", version: cliVersion }, args = parseArguments(), isInit = args.groupOrCommand === "init" && args.argsWithoutOptions[0] !== "plugin", cwd = getCurrentWorkingDirectory();
78860
78859
  let workDir;
78861
78860
  try {
78862
- workDir = isInit ? process.cwd() : loadEnv.resolveRootDir(cwd, isCoreApp);
78861
+ workDir = isInit ? process.cwd() : loadEnv.resolveRootDir(cwd);
78863
78862
  } catch (err) {
78864
78863
  console.error(chalk__default.default.red(err.message)), process.exit(1);
78865
78864
  }
78866
- loadAndSetEnvFromDotEnvFiles({ workDir, cmd: args.groupOrCommand, isCoreApp }), maybeFixMissingWindowsEnvVar(), await runUpdateCheck({ pkg, cwd, workDir }).notify(), telemetryDisclosure(), loadEnv.debug(`Reading CLI config from "${workDir}"`);
78865
+ loadAndSetEnvFromDotEnvFiles({ workDir, cmd: args.groupOrCommand }), maybeFixMissingWindowsEnvVar(), await runUpdateCheck({ pkg, cwd, workDir }).notify(), telemetryDisclosure(), loadEnv.debug(`Reading CLI config from "${workDir}"`);
78867
78866
  const cliConfig = await getCliConfig.getCliConfig(workDir, { forked: !0 });
78868
78867
  cliConfig || loadEnv.debug("No CLI config found");
78869
78868
  const { logger: telemetry2, flush: flushTelemetry } = createTelemetryStore({
@@ -78889,8 +78888,7 @@ async function runCli(cliRoot, { cliVersion }) {
78889
78888
  workDir,
78890
78889
  corePath: await getCoreModulePath(workDir, cliConfig),
78891
78890
  cliConfig,
78892
- telemetry: telemetry2,
78893
- isCoreApp
78891
+ telemetry: telemetry2
78894
78892
  };
78895
78893
  warnOnNonProductionEnvironment(), warnOnInferredProjectDir(isInit, cwd, workDir);
78896
78894
  const core2 = args.coreOptions, commands = await mergeCommands(baseCommands, options2.corePath, { cliVersion });
@@ -78990,11 +78988,7 @@ function warnOnNonProductionEnvironment() {
78990
78988
  )
78991
78989
  );
78992
78990
  }
78993
- function loadAndSetEnvFromDotEnvFiles({
78994
- workDir,
78995
- cmd,
78996
- isCoreApp
78997
- }) {
78991
+ function loadAndSetEnvFromDotEnvFiles({ workDir, cmd }) {
78998
78992
  if (fs$1.existsSync(path__default.default.join(workDir, "sanity.json"))) {
78999
78993
  loadEnv.debug("sanity.json exists, assuming v2 project and loading .env files using old behavior");
79000
78994
  const env = process.env.SANITY_ACTIVE_ENV || process.env.NODE_ENV || "development";
@@ -79006,7 +79000,7 @@ function loadAndSetEnvFromDotEnvFiles({
79006
79000
  let mode2 = process.env.SANITY_ACTIVE_ENV;
79007
79001
  !mode2 && (isProdCmd || process.env.NODE_ENV === "production") ? mode2 = "production" : mode2 || (mode2 = "development"), mode2 === "production" && !isProdCmd && console.warn(chalk__default.default.yellow(`[WARN] Running in ${sanityEnv} environment mode
79008
79002
  `)), loadEnv.debug("Loading environment files using %s mode", mode2);
79009
- const studioEnv = loadEnv.loadEnv(mode2, workDir, isCoreApp ? ["VITE_"] : ["SANITY_STUDIO_"]);
79003
+ const studioEnv = loadEnv.loadEnv(mode2, workDir, ["SANITY_STUDIO_"]);
79010
79004
  process.env = { ...process.env, ...studioEnv };
79011
79005
  }
79012
79006
  function maybeFixMissingWindowsEnvVar() {