1"use strict"; 2 3Object.defineProperty(exports, "__esModule", { 4 value: true 5}); 6exports.addWarningAndroid = addWarningAndroid; 7exports.addWarningForPlatform = addWarningForPlatform; 8exports.addWarningIOS = addWarningIOS; 9 10function _chalk() { 11 const data = _interopRequireDefault(require("chalk")); 12 13 _chalk = function () { 14 return data; 15 }; 16 17 return data; 18} 19 20function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 21 22/** 23 * Log a warning that doesn't disrupt the spinners. 24 * 25 * ```sh 26 * » android: android.package: property is invalid https://expo.fyi/android-package 27 * ``` 28 * 29 * @param property Name of the config property that triggered the warning (best-effort) 30 * @param text Main warning message 31 * @param link Useful link to resources related to the warning 32 */ 33function addWarningAndroid(property, text, link) { 34 console.warn(formatWarning('android', property, text, link)); 35} 36/** 37 * Log a warning that doesn't disrupt the spinners. 38 * 39 * ```sh 40 * » ios: ios.bundleIdentifier: property is invalid https://expo.fyi/bundle-identifier 41 * ``` 42 * 43 * @param property Name of the config property that triggered the warning (best-effort) 44 * @param text Main warning message 45 * @param link Useful link to resources related to the warning 46 */ 47 48 49function addWarningIOS(property, text, link) { 50 console.warn(formatWarning('ios', property, text, link)); 51} 52 53function addWarningForPlatform(platform, property, text, link) { 54 console.warn(formatWarning(platform, property, text, link)); 55} 56 57function formatWarning(platform, property, warning, link) { 58 return _chalk().default.yellow`${'» ' + _chalk().default.bold(platform)}: ${property}: ${warning}${link ? _chalk().default.gray(' ' + link) : ''}`; 59} 60//# sourceMappingURL=warnings.js.map