You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.8 KiB

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.warnAboutLocalCLI = warnAboutLocalCLI;
exports.warnMigration = warnMigration;
function _config() {
const data = require("@expo/config");
_config = function () {
return data;
};
return data;
}
function _chalk() {
const data = _interopRequireDefault(require("chalk"));
_chalk = function () {
return data;
};
return data;
}
function _getenv() {
const data = require("getenv");
_getenv = function () {
return data;
};
return data;
}
function _xdl() {
const data = require("xdl");
_xdl = function () {
return data;
};
return data;
}
function _TerminalLink() {
const data = require("../commands/utils/TerminalLink");
_TerminalLink = function () {
return data;
};
return data;
}
function _log() {
const data = _interopRequireDefault(require("../log"));
_log = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function warnAboutLocalCLI(projectRoot, {
localCmd
}) {
const {
exp
} = (0, _config().getConfig)(projectRoot, {
skipSDKVersionRequirement: true
});
const useLocalCLI = (0, _getenv().boolish)('EXPO_USE_LOCAL_CLI', true);
if (_xdl().Versions.gteSdkVersion(exp, '46.0.0') && useLocalCLI) {
_log().default.warn((0, _chalk().default)`\nThis command is being executed with the global Expo CLI. ${(0, _TerminalLink().learnMore)('https://blog.expo.dev/the-new-expo-cli-f4250d8e3421')}\nTo use the local CLI instead (recommended in SDK 46 and higher), run:\n\u203A {bold npx expo ${localCmd}}\n`);
}
}
function warnMigration(toCommand) {
_log().default.warn((0, _chalk().default)`\nMigrate to using:\n\u203A {bold ${toCommand}}\n`);
}
//# sourceMappingURL=migration.js.map