1082815dcSEvan Bacon"use strict";
2082815dcSEvan Bacon
3082815dcSEvan BaconObject.defineProperty(exports, "__esModule", {
4082815dcSEvan Bacon  value: true
5082815dcSEvan Bacon});
6082815dcSEvan Baconexports.addWarningAndroid = addWarningAndroid;
7082815dcSEvan Baconexports.addWarningForPlatform = addWarningForPlatform;
8082815dcSEvan Baconexports.addWarningIOS = addWarningIOS;
9082815dcSEvan Baconfunction _chalk() {
10082815dcSEvan Bacon  const data = _interopRequireDefault(require("chalk"));
11082815dcSEvan Bacon  _chalk = function () {
12082815dcSEvan Bacon    return data;
13082815dcSEvan Bacon  };
14082815dcSEvan Bacon  return data;
15082815dcSEvan Bacon}
16082815dcSEvan Baconfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17082815dcSEvan Bacon/**
18082815dcSEvan Bacon * Log a warning that doesn't disrupt the spinners.
19082815dcSEvan Bacon *
20082815dcSEvan Bacon * ```sh
21082815dcSEvan Bacon * » android: android.package: property is invalid https://expo.fyi/android-package
22082815dcSEvan Bacon * ```
23082815dcSEvan Bacon *
24082815dcSEvan Bacon * @param property Name of the config property that triggered the warning (best-effort)
25082815dcSEvan Bacon * @param text Main warning message
26082815dcSEvan Bacon * @param link Useful link to resources related to the warning
27082815dcSEvan Bacon */
28082815dcSEvan Baconfunction addWarningAndroid(property, text, link) {
29082815dcSEvan Bacon  console.warn(formatWarning('android', property, text, link));
30082815dcSEvan Bacon}
31*ee216927STomasz Sapeta
32082815dcSEvan Bacon/**
33082815dcSEvan Bacon * Log a warning that doesn't disrupt the spinners.
34082815dcSEvan Bacon *
35082815dcSEvan Bacon * ```sh
36082815dcSEvan Bacon * » ios: ios.bundleIdentifier: property is invalid https://expo.fyi/bundle-identifier
37082815dcSEvan Bacon * ```
38082815dcSEvan Bacon *
39082815dcSEvan Bacon * @param property Name of the config property that triggered the warning (best-effort)
40082815dcSEvan Bacon * @param text Main warning message
41082815dcSEvan Bacon * @param link Useful link to resources related to the warning
42082815dcSEvan Bacon */
43082815dcSEvan Baconfunction addWarningIOS(property, text, link) {
44082815dcSEvan Bacon  console.warn(formatWarning('ios', property, text, link));
45082815dcSEvan Bacon}
46082815dcSEvan Baconfunction addWarningForPlatform(platform, property, text, link) {
47082815dcSEvan Bacon  console.warn(formatWarning(platform, property, text, link));
48082815dcSEvan Bacon}
49082815dcSEvan Baconfunction formatWarning(platform, property, warning, link) {
50082815dcSEvan Bacon  return _chalk().default.yellow`${'» ' + _chalk().default.bold(platform)}: ${property}: ${warning}${link ? _chalk().default.gray(' ' + link) : ''}`;
51082815dcSEvan Bacon}
52082815dcSEvan Bacon//# sourceMappingURL=warnings.js.map