GT2/Ejectable/node_modules/@expo/config/build/Serialize.js.map

1 line
5.8 KiB
Plaintext

{"version":3,"sources":["../src/Serialize.ts"],"names":["serializeAndEvaluate","val","includes","Array","isArray","map","output","property","hasOwnProperty","ConfigError","serializeSkippingMods","serializeAndEvaluatePlugin","name","serializeAfterStaticPlugins"],"mappings":";;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEO,SAASA,oBAAT,CAA8BC,GAA9B,EAA6C;AAClD,MAAI,CAAC,WAAD,EAAc,QAAd,EAAwB,SAAxB,EAAmC,QAAnC,EAA6C,QAA7C,EAAuDC,QAAvD,CAAgE,OAAOD,GAAvE,CAAJ,EAAiF;AAC/E,WAAOA,GAAP;AACD,GAFD,MAEO,IAAI,OAAOA,GAAP,KAAe,UAAnB,EAA+B;AACpC;AACA,WAAOA,GAAG,EAAV;AACD,GAHM,MAGA,IAAIE,KAAK,CAACC,OAAN,CAAcH,GAAd,CAAJ,EAAwB;AAC7B,WAAOA,GAAG,CAACI,GAAJ,CAAQL,oBAAR,CAAP;AACD,GAFM,MAEA,IAAI,OAAOC,GAAP,KAAe,QAAnB,EAA6B;AAClC,UAAMK,MAA8B,GAAG,EAAvC;;AACA,SAAK,MAAMC,QAAX,IAAuBN,GAAvB,EAA4B;AAC1B,UAAIA,GAAG,CAACO,cAAJ,CAAmBD,QAAnB,CAAJ,EAAkC;AAChCD,QAAAA,MAAM,CAACC,QAAD,CAAN,GAAmBP,oBAAoB,CAACC,GAAG,CAACM,QAAD,CAAJ,CAAvC;AACD;AACF;;AACD,WAAOD,MAAP;AACD,GAhBiD,CAiBlD;;;AACA,QAAM,KAAIG,qBAAJ,EAAiB,4CAA2CR,GAAI,EAAhE,EAAmE,gBAAnE,CAAN;AACD;;AAEM,SAASS,qBAAT,CAA+BT,GAA/B,EAA8C;AACnD,MAAI,OAAOA,GAAP,KAAe,QAAf,IAA2B,CAACE,KAAK,CAACC,OAAN,CAAcH,GAAd,CAAhC,EAAo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,MAAP;AACD,GAfgD,CAgBjD;;;AACA,QAAM,KAAIG,qBAAJ,EAAiB,4CAA2CR,GAAI,EAAhE,EAAmE,gBAAnE,CAAN;AACD;;AAEM,SAASY,2BAAT,CAAqCZ,GAArC,EAAoD;AACzD,MAAI,OAAOA,GAAP,KAAe,QAAf,IAA2B,CAACE,KAAK,CAACC,OAAN,CAAcH,GAAd,CAAhC,EAAoD;AAClD,UAAMK,MAA8B,GAAG,EAAvC;;AACA,SAAK,MAAMC,QAAX,IAAuBN,GAAvB,EAA4B;AAC1B,UAAIA,GAAG,CAACO,cAAJ,CAAmBD,QAAnB,CAAJ,EAAkC;AAChC,YAAIA,QAAQ,KAAK,MAAjB,EAAyB;AACvB;AACAD,UAAAA,MAAM,CAACC,QAAD,CAAN,GAAmBN,GAAG,CAACM,QAAD,CAAtB;AACD,SAHD,MAGO,IAAIA,QAAQ,KAAK,SAAb,IAA0BJ,KAAK,CAACC,OAAN,CAAcH,GAAG,CAACM,QAAD,CAAjB,CAA9B,EAA4D;AACjE;AACAD,UAAAA,MAAM,CAACC,QAAD,CAAN,GAAmBN,GAAG,CAACM,QAAD,CAAH,CAAcF,GAAd,CAAkBM,0BAAlB,CAAnB;AACD,SAHM,MAGA;AACLL,UAAAA,MAAM,CAACC,QAAD,CAAN,GAAmBP,oBAAoB,CAACC,GAAG,CAACM,QAAD,CAAJ,CAAvC;AACD;AACF;AACF;;AACD,WAAOD,MAAP;AACD;;AACD,SAAON,oBAAoB,CAACC,GAAD,CAA3B;AACD","sourcesContent":["import { ConfigError } from './Errors';\n\nexport function serializeAndEvaluate(val: any): any {\n if (['undefined', 'string', 'boolean', 'number', 'bigint'].includes(typeof val)) {\n return val;\n } else if (typeof val === 'function') {\n // TODO: Bacon: Should we support async methods?\n return val();\n } else if (Array.isArray(val)) {\n return val.map(serializeAndEvaluate);\n } else if (typeof val === 'object') {\n const output: { [key: string]: any } = {};\n for (const property in val) {\n if (val.hasOwnProperty(property)) {\n output[property] = serializeAndEvaluate(val[property]);\n }\n }\n return output;\n }\n // symbol\n throw new ConfigError(`Expo config doesn't support \\`Symbols\\`: ${val}`, 'INVALID_CONFIG');\n}\n\nexport function serializeSkippingMods(val: any): any {\n if (typeof val === 'object' && !Array.isArray(val)) {\n const output: { [key: string]: any } = {};\n for (const property in val) {\n if (val.hasOwnProperty(property)) {\n if (property === 'mods' || property === 'plugins') {\n // Don't serialize mods or plugins\n output[property] = val[property];\n } else {\n output[property] = serializeAndEvaluate(val[property]);\n }\n }\n }\n return output;\n }\n return serializeAndEvaluate(val);\n}\n\nfunction serializeAndEvaluatePlugin(val: any): any {\n if (['undefined', 'string', 'boolean', 'number', 'bigint'].includes(typeof val)) {\n return val;\n } else if (typeof val === 'function') {\n return val.name ?? 'withAnonymous';\n } else if (Array.isArray(val)) {\n return val.map(serializeAndEvaluatePlugin);\n } else if (typeof val === 'object') {\n const output: { [key: string]: any } = {};\n for (const property in val) {\n if (val.hasOwnProperty(property)) {\n output[property] = serializeAndEvaluatePlugin(val[property]);\n }\n }\n return output;\n }\n // symbol\n throw new ConfigError(`Expo config doesn't support \\`Symbols\\`: ${val}`, 'INVALID_CONFIG');\n}\n\nexport function serializeAfterStaticPlugins(val: any): any {\n if (typeof val === 'object' && !Array.isArray(val)) {\n const output: { [key: string]: any } = {};\n for (const property in val) {\n if (val.hasOwnProperty(property)) {\n if (property === 'mods') {\n // Don't serialize mods\n output[property] = val[property];\n } else if (property === 'plugins' && Array.isArray(val[property])) {\n // Serialize the mods by removing any config plugins\n output[property] = val[property].map(serializeAndEvaluatePlugin);\n } else {\n output[property] = serializeAndEvaluate(val[property]);\n }\n }\n }\n return output;\n }\n return serializeAndEvaluate(val);\n}\n"],"file":"Serialize.js"}