1{"version":3,"file":"warnings.js","names":["addWarningAndroid","property","text","link","console","warn","formatWarning","addWarningIOS","addWarningForPlatform","platform","warning","chalk","yellow","bold","gray"],"sources":["../../src/utils/warnings.ts"],"sourcesContent":["import chalk from 'chalk';\n\nimport { ModPlatform } from '../Plugin.types';\n\n/**\n * Log a warning that doesn't disrupt the spinners.\n *\n * ```sh\n * » android: android.package: property is invalid https://expo.fyi/android-package\n * ```\n *\n * @param property Name of the config property that triggered the warning (best-effort)\n * @param text Main warning message\n * @param link Useful link to resources related to the warning\n */\nexport function addWarningAndroid(property: string, text: string, link?: string) {\n console.warn(formatWarning('android', property, text, link));\n}\n\n/**\n * Log a warning that doesn't disrupt the spinners.\n *\n * ```sh\n * » ios: ios.bundleIdentifier: property is invalid https://expo.fyi/bundle-identifier\n * ```\n *\n * @param property Name of the config property that triggered the warning (best-effort)\n * @param text Main warning message\n * @param link Useful link to resources related to the warning\n */\nexport function addWarningIOS(property: string, text: string, link?: string) {\n console.warn(formatWarning('ios', property, text, link));\n}\n\nexport function addWarningForPlatform(\n platform: ModPlatform,\n property: string,\n text: string,\n link?: string\n) {\n console.warn(formatWarning(platform, property, text, link));\n}\n\nfunction formatWarning(platform: string, property: string, warning: string, link?: string) {\n return chalk.yellow`${'» ' + chalk.bold(platform)}: ${property}: ${warning}${\n link ? chalk.gray(' ' + link) : ''\n }`;\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA0B;AAI1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,iBAAiB,CAACC,QAAgB,EAAEC,IAAY,EAAEC,IAAa,EAAE;EAC/EC,OAAO,CAACC,IAAI,CAACC,aAAa,CAAC,SAAS,EAAEL,QAAQ,EAAEC,IAAI,EAAEC,IAAI,CAAC,CAAC;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,aAAa,CAACN,QAAgB,EAAEC,IAAY,EAAEC,IAAa,EAAE;EAC3EC,OAAO,CAACC,IAAI,CAACC,aAAa,CAAC,KAAK,EAAEL,QAAQ,EAAEC,IAAI,EAAEC,IAAI,CAAC,CAAC;AAC1D;AAEO,SAASK,qBAAqB,CACnCC,QAAqB,EACrBR,QAAgB,EAChBC,IAAY,EACZC,IAAa,EACb;EACAC,OAAO,CAACC,IAAI,CAACC,aAAa,CAACG,QAAQ,EAAER,QAAQ,EAAEC,IAAI,EAAEC,IAAI,CAAC,CAAC;AAC7D;AAEA,SAASG,aAAa,CAACG,QAAgB,EAAER,QAAgB,EAAES,OAAe,EAAEP,IAAa,EAAE;EACzF,OAAOQ,gBAAK,CAACC,MAAO,GAAE,IAAI,GAAGD,gBAAK,CAACE,IAAI,CAACJ,QAAQ,CAAE,KAAIR,QAAS,KAAIS,OAAQ,GACzEP,IAAI,GAAGQ,gBAAK,CAACG,IAAI,CAAC,GAAG,GAAGX,IAAI,CAAC,GAAG,EACjC,EAAC;AACJ"}