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