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;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,iBAAT,CAA2BC,QAA3B,EAA6CC,IAA7C,EAA2DC,IAA3D,EAA0E;EAC/EC,OAAO,CAACC,IAAR,CAAaC,aAAa,CAAC,SAAD,EAAYL,QAAZ,EAAsBC,IAAtB,EAA4BC,IAA5B,CAA1B;AACD;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASI,aAAT,CAAuBN,QAAvB,EAAyCC,IAAzC,EAAuDC,IAAvD,EAAsE;EAC3EC,OAAO,CAACC,IAAR,CAAaC,aAAa,CAAC,KAAD,EAAQL,QAAR,EAAkBC,IAAlB,EAAwBC,IAAxB,CAA1B;AACD;;AAEM,SAASK,qBAAT,CACLC,QADK,EAELR,QAFK,EAGLC,IAHK,EAILC,IAJK,EAKL;EACAC,OAAO,CAACC,IAAR,CAAaC,aAAa,CAACG,QAAD,EAAWR,QAAX,EAAqBC,IAArB,EAA2BC,IAA3B,CAA1B;AACD;;AAED,SAASG,aAAT,CAAuBG,QAAvB,EAAyCR,QAAzC,EAA2DS,OAA3D,EAA4EP,IAA5E,EAA2F;EACzF,OAAOQ,gBAAA,CAAMC,MAAO,GAAE,OAAOD,gBAAA,CAAME,IAAN,CAAWJ,QAAX,CAAqB,KAAIR,QAAS,KAAIS,OAAQ,GACzEP,IAAI,GAAGQ,gBAAA,CAAMG,IAAN,CAAW,MAAMX,IAAjB,CAAH,GAA4B,EACjC,EAFD;AAGD"}