@sanity/cli 4.15.1-next.9 → 4.16.0-next.10
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
CHANGED
|
@@ -71009,7 +71009,7 @@ async function runCli(cliRoot, { cliPkg }) {
|
|
|
71009
71009
|
cliConfig,
|
|
71010
71010
|
telemetry: telemetry2
|
|
71011
71011
|
};
|
|
71012
|
-
warnOnNUnsupportedRuntime(cliPkg), warnOnNonProductionEnvironment(), warnOnInferredProjectDir(isInit, cwd, workDir);
|
|
71012
|
+
warnOnNUnsupportedRuntime(cliPkg), warnOnNonProductionEnvironment(), warnOnCliConfigName(), warnOnInferredProjectDir(isInit, cwd, workDir);
|
|
71013
71013
|
const core2 = args.coreOptions, commands = await mergeCommands(baseCommands, options2.corePath, {
|
|
71014
71014
|
cliVersion: cliPkg.version
|
|
71015
71015
|
});
|
|
@@ -71093,7 +71093,7 @@ Please upgrade to a version that satisfies the range ${chalk__default.default.gr
|
|
|
71093
71093
|
);
|
|
71094
71094
|
}
|
|
71095
71095
|
function warnOnNonProductionEnvironment() {
|
|
71096
|
-
sanityEnv !== "production" && console.warn(
|
|
71096
|
+
sanityEnv !== "production" && process.env.TEST !== "true" && console.warn(
|
|
71097
71097
|
chalk__default.default.yellow(
|
|
71098
71098
|
knownEnvs.includes(sanityEnv) ? `[WARN] Running in ${sanityEnv} environment mode
|
|
71099
71099
|
` : `[WARN] Running in ${chalk__default.default.red("UNKNOWN")} "${sanityEnv}" environment mode
|
|
@@ -71101,6 +71101,19 @@ function warnOnNonProductionEnvironment() {
|
|
|
71101
71101
|
)
|
|
71102
71102
|
);
|
|
71103
71103
|
}
|
|
71104
|
+
function warnOnCliConfigName() {
|
|
71105
|
+
if (process.env.SANITY_CLI_TEST_CONFIG_NAME) {
|
|
71106
|
+
if (process.env.TEST !== "true") {
|
|
71107
|
+
console.warn(
|
|
71108
|
+
chalk__default.default.yellow("[WARN] Ignored SANITY_CLI_TEST_CONFIG_NAME. It can only be used in tests.")
|
|
71109
|
+
);
|
|
71110
|
+
return;
|
|
71111
|
+
}
|
|
71112
|
+
console.warn(
|
|
71113
|
+
chalk__default.default.yellow(`[WARN] Loading CLI config from ${process.env.SANITY_CLI_TEST_CONFIG_NAME}.ts/js`)
|
|
71114
|
+
);
|
|
71115
|
+
}
|
|
71116
|
+
}
|
|
71104
71117
|
function loadAndSetEnvFromDotEnvFiles({
|
|
71105
71118
|
workDir,
|
|
71106
71119
|
cmd,
|