1 line
7.3 KiB
Plaintext
1 line
7.3 KiB
Plaintext
|
{"version":3,"sources":["../src/evalConfig.ts"],"names":["evalConfig","configFile","request","contents","result","code","filePath","transforms","error","location","extractLocationFromSyntaxError","codeFrameColumns","require","codeFrame","start","loc","highlightCode","message","importantStack","extractImportantStackFromNodeError","resolveConfigExport","line","lineNumber","column","columnNumber","isSyntaxError","traces","stack","split","filter","startsWith","length","pop","join","SyntaxError","constructor","name","default","exportedObjectType","Promise","ConfigError","expo","config"],"mappings":";;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,UAAT,CACLC,UADK,EAELC,OAFK,EAGiB;AACtB,QAAMC,QAAQ,GAAG,wBAAaF,UAAb,EAAyB,MAAzB,CAAjB;AACA,MAAIG,MAAJ;;AACA,MAAI;AACF,UAAM;AAAEC,MAAAA;AAAF,QAAW,0BAAUF,QAAV,EAAoB;AACnCG,MAAAA,QAAQ,EAAEL,UADyB;AAEnCM,MAAAA,UAAU,EAAE,CAAC,YAAD,EAAe,SAAf;AAFuB,KAApB,CAAjB;AAKAH,IAAAA,MAAM,GAAG,kCAAcC,IAAd,EAAoBJ,UAApB,CAAT;AACD,GAPD,CAOE,OAAOO,KAAP,EAAc;AACd,UAAMC,QAAQ,GAAGC,8BAA8B,CAACF,KAAD,CAA/C,CADc,CAGd;;AACA,QAAIC,QAAJ,EAAc;AACZ,YAAM;AAAEE,QAAAA;AAAF,UAAuBC,OAAO,CAAC,mBAAD,CAApC;;AACA,YAAMC,SAAS,GAAGF,gBAAgB,CAACR,QAAD,EAAW;AAAEW,QAAAA,KAAK,EAAEN,KAA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,MAAAA,MAAM,CAACM,GAAP;AACD;;AACD,WAAON,MAAM,CAACO,IAAP,CAAY,IAAZ,CAAP;AACD;;AACD,SAAO,IAAP;AACD;;AAED,SAASR,aAAT,CAAuBjB,KAAvB,EAAyD;AACvD,SAAOA,KAAK,YAAY0B,WAAjB,IAAgC1B,KAAK,CAAC2B,WAAN,CAAkBC,IAAlB,KAA2B,aAAlE;AACD;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAAShB,mBAAT,CACLhB,MADK,EAELH,UAFK,EAGLC,OAHK,EAIL;AAAA;;AACA,MAAIE,MAAM,CAACiC,OAAP,IAAkB,IAAtB,EAA4B;AAC1BjC,IAAAA,MAAM,GAAGA,MAAM,CAACiC,OAAhB;AACD;;AACD,QAAMC,kBAAkB,GAAG,OAAOlC,MAAlC;;AACA,MAAI,OAAOA,MAAP,KAAkB,UAAtB,EAAkC;AAChCA,IAAAA,MAAM,GAAGA,MAAM,CAACF,OAAD,CAAf;AACD;;AAED,MAAIE,MAAM,YAAYmC,OAAtB,EAA+B;AAC7B,UAAM,KAAIC,qBAAJ,EAAiB,eAAcvC,UAAW,2BAA1C,EAAsE,gBAAtE,CAAN;AACD,GAXD,CAaA;;;AACA,iBAAIG,MAAJ,oCAAI,QAAQqC,IAAZ,EAAkB;AAChBrC,IAAAA,MAAM,GAAG,wCAAsBA,MAAM,CAACqC,IAA7B,CAAT;AACD,GAFD,MAEO;AACLrC,IAAAA,MAAM,GAAG,wCAAsBA,MAAtB,CAAT;AACD;;AAED,SAAO;AAAEsC,IAAAA,MAAM,EAAEtC,MAAV;AAAkBkC,IAAAA;AAAlB,GAAP;AACD","sourcesContent":["import { readFileSync } from 'fs';\nimport requireString from 'require-from-string';\nimport { transform } from 'sucrase';\n\nimport { AppJSONConfig, ConfigContext, ExpoConfig } from './Config.types';\nimport { ConfigError } from './Errors';\nimport { serializeSkippingMods } from './Serialize';\n\ntype RawDynamicConfig = AppJSONConfig | Partial<ExpoConfig> | null;\n\nexport type DynamicConfigResults = { config: RawDynamicConfig; exportedObjectType: string };\n\n/**\n * Transpile and evaluate the dynamic config object.\n * This method is shared between the standard reading method in getConfig, and the headless script.\n *\n * @param options configFile path to the dynamic app.config.*, request to send to
|