@expo/config-plugins 4.1.3 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Plugin.types.d.ts +8 -0
- package/build/Plugin.types.js.map +1 -1
- package/build/android/AllowBackup.js.map +1 -1
- package/build/android/BuildProperties.js.map +1 -1
- package/build/android/Colors.js.map +1 -1
- package/build/android/EasBuild.js.map +1 -1
- package/build/android/EasBuildGradleScript.js.map +1 -1
- package/build/android/GoogleMapsApiKey.js.map +1 -1
- package/build/android/GoogleServices.js.map +1 -1
- package/build/android/IntentFilters.js.map +1 -1
- package/build/android/Manifest.d.ts +1 -0
- package/build/android/Manifest.js.map +1 -1
- package/build/android/Name.js.map +1 -1
- package/build/android/Orientation.js.map +1 -1
- package/build/android/Package.d.ts +5 -0
- package/build/android/Package.js +56 -0
- package/build/android/Package.js.map +1 -1
- package/build/android/Paths.js.map +1 -1
- package/build/android/Permissions.js +0 -18
- package/build/android/Permissions.js.map +1 -1
- package/build/android/PrimaryColor.js.map +1 -1
- package/build/android/Properties.js.map +1 -1
- package/build/android/Resources.js.map +1 -1
- package/build/android/Scheme.js.map +1 -1
- package/build/android/StatusBar.js.map +1 -1
- package/build/android/Strings.js.map +1 -1
- package/build/android/Styles.js.map +1 -1
- package/build/android/Updates.js.map +1 -1
- package/build/android/Version.js.map +1 -1
- package/build/android/WindowSoftInputMode.js.map +1 -1
- package/build/android/codeMod.js.map +1 -1
- package/build/android/index.js.map +1 -1
- package/build/index.js.map +1 -1
- package/build/ios/Bitcode.js.map +1 -1
- package/build/ios/BuildProperties.js.map +1 -1
- package/build/ios/BuildScheme.js.map +1 -1
- package/build/ios/BundleIdentifier.js.map +1 -1
- package/build/ios/DeviceFamily.js.map +1 -1
- package/build/ios/Entitlements.js.map +1 -1
- package/build/ios/Google.js.map +1 -1
- package/build/ios/IosConfig.types.js.map +1 -1
- package/build/ios/Locales.js.map +1 -1
- package/build/ios/Maps.js.map +1 -1
- package/build/ios/Name.js +8 -2
- package/build/ios/Name.js.map +1 -1
- package/build/ios/Orientation.js +4 -1
- package/build/ios/Orientation.js.map +1 -1
- package/build/ios/Paths.js.map +1 -1
- package/build/ios/Permissions.js.map +1 -1
- package/build/ios/ProvisioningProfile.js +11 -1
- package/build/ios/ProvisioningProfile.js.map +1 -1
- package/build/ios/RequiresFullScreen.js.map +1 -1
- package/build/ios/Scheme.js +4 -1
- package/build/ios/Scheme.js.map +1 -1
- package/build/ios/Swift.js.map +1 -1
- package/build/ios/Target.js.map +1 -1
- package/build/ios/Updates.js.map +1 -1
- package/build/ios/UsesNonExemptEncryption.js +4 -1
- package/build/ios/UsesNonExemptEncryption.js.map +1 -1
- package/build/ios/Version.js +8 -2
- package/build/ios/Version.js.map +1 -1
- package/build/ios/XcodeProjectFile.js.map +1 -1
- package/build/ios/codeMod.js.map +1 -1
- package/build/ios/index.js.map +1 -1
- package/build/ios/utils/Xcodeproj.js +11 -1
- package/build/ios/utils/Xcodeproj.js.map +1 -1
- package/build/ios/utils/getInfoPlistPath.js.map +1 -1
- package/build/ios/utils/string.js.map +1 -1
- package/build/plugins/android-plugins.js.map +1 -1
- package/build/plugins/createBaseMod.js.map +1 -1
- package/build/plugins/ios-plugins.d.ts +5 -0
- package/build/plugins/ios-plugins.js +46 -0
- package/build/plugins/ios-plugins.js.map +1 -1
- package/build/plugins/mod-compiler.js +18 -4
- package/build/plugins/mod-compiler.js.map +1 -1
- package/build/plugins/withAndroidBaseMods.js.map +1 -1
- package/build/plugins/withDangerousMod.js.map +1 -1
- package/build/plugins/withIosBaseMods.js.map +1 -1
- package/build/plugins/withMod.js.map +1 -1
- package/build/plugins/withPlugins.js.map +1 -1
- package/build/plugins/withRunOnce.js.map +1 -1
- package/build/plugins/withStaticPlugin.js.map +1 -1
- package/build/utils/BuildProperties.types.js.map +1 -1
- package/build/utils/Updates.js.map +1 -1
- package/build/utils/XML.js.map +1 -1
- package/build/utils/commonCodeMod.js.map +1 -1
- package/build/utils/errors.js.map +1 -1
- package/build/utils/fs.js.map +1 -1
- package/build/utils/generateCode.js.map +1 -1
- package/build/utils/history.js.map +1 -1
- package/build/utils/matchBrackets.js.map +1 -1
- package/build/utils/modules.js.map +1 -1
- package/build/utils/obj.d.ts +2 -0
- package/build/utils/obj.js +24 -0
- package/build/utils/obj.js.map +1 -0
- package/build/utils/plugin-resolver.js.map +1 -1
- package/build/utils/sortObject.js.map +1 -1
- package/build/utils/versions.js.map +1 -1
- package/build/utils/warnings.js.map +1 -1
- package/package.json +7 -6
package/build/utils/XML.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"XML.js","names":["writeXMLAsync","options","xml","format","fs","promises","mkdir","path","dirname","recursive","writeFile","readXMLAsync","contents","readFile","encoding","flag","parser","Parser","manifest","parseStringPromise","fallback","Array","isArray","resources","string","$","translatable","_","unescapeAndroidString","parseXMLAsync","stringTimesN","n","char","join","indentLevel","newline","EOL","xmlInput","toString","builder","Builder","headless","escapeAndroidString","buildObject","Error","indentString","formatted","regex","replace","pad","split","map","line","trim","forEach","indent","match","padding","value","m"],"sources":["../../src/utils/XML.ts"],"sourcesContent":["import fs from 'fs';\nimport { EOL } from 'os';\nimport path from 'path';\nimport { Builder, Parser } from 'xml2js';\n\nexport type XMLValue = boolean | number | string | null | XMLArray | XMLObject;\n\nexport interface XMLArray extends Array<XMLValue> {}\n\nexport interface XMLObject {\n [key: string]: XMLValue | undefined;\n}\n\nexport async function writeXMLAsync(options: { path: string; xml: any }): Promise<void> {\n const xml = format(options.xml);\n await fs.promises.mkdir(path.dirname(options.path), { recursive: true });\n await fs.promises.writeFile(options.path, xml);\n}\n\nexport async function readXMLAsync(options: {\n path: string;\n fallback?: string | null;\n}): Promise<XMLObject> {\n let contents: string = '';\n try {\n contents = await fs.promises.readFile(options.path, { encoding: 'utf8', flag: 'r' });\n } catch {\n // catch and use fallback\n }\n const parser = new Parser();\n const manifest = await parser.parseStringPromise(contents || options.fallback || '');\n\n // For strings.xml\n if (Array.isArray(manifest?.resources?.string)) {\n for (const string of manifest?.resources?.string) {\n if (string.$.translatable === 'false' || string.$.translatable === false) {\n continue;\n }\n string._ = unescapeAndroidString(string._);\n }\n }\n\n return manifest;\n}\n\nexport async function parseXMLAsync(contents: string): Promise<XMLObject> {\n const xml = await new Parser().parseStringPromise(contents);\n return xml;\n}\n\nconst stringTimesN = (n: number, char: string) => Array(n + 1).join(char);\n\nexport function format(manifest: any, { indentLevel = 2, newline = EOL } = {}): string {\n let xmlInput: string;\n if (typeof manifest === 'string') {\n xmlInput = manifest;\n } else if (manifest.toString) {\n const builder = new Builder({\n headless: true,\n });\n\n // For strings.xml\n if (Array.isArray(manifest?.resources?.string)) {\n for (const string of manifest?.resources?.string) {\n if (string.$.translatable === 'false' || string.$.translatable === false) {\n continue;\n }\n string._ = escapeAndroidString(string._);\n }\n }\n\n xmlInput = builder.buildObject(manifest);\n\n return xmlInput;\n } else {\n throw new Error(`Invalid XML value passed in: ${manifest}`);\n }\n const indentString = stringTimesN(indentLevel, ' ');\n\n let formatted = '';\n const regex = /(>)(<)(\\/*)/g;\n const xml = xmlInput.replace(regex, `$1${newline}$2$3`);\n let pad = 0;\n xml\n .split(/\\r?\\n/)\n .map((line: string) => line.trim())\n .forEach((line: string) => {\n let indent = 0;\n if (line.match(/.+<\\/\\w[^>]*>$/)) {\n indent = 0;\n } else if (line.match(/^<\\/\\w/)) {\n if (pad !== 0) {\n pad -= 1;\n }\n } else if (line.match(/^<\\w([^>]*[^/])?>.*$/)) {\n indent = 1;\n } else {\n indent = 0;\n }\n\n const padding = stringTimesN(pad, indentString);\n formatted += padding + line + newline;\n pad += indent;\n });\n\n return formatted.trim();\n}\n\n/**\n * Escapes Android string literals, specifically characters `\"`, `'`, `\\`, `\\n`, `\\r`, `\\t`\n *\n * @param value unescaped Android XML string literal.\n */\nexport function escapeAndroidString(value: string): string {\n value = value.replace(/[\\n\\r\\t'\"@]/g, (m) => {\n switch (m) {\n case '\"':\n case \"'\":\n case '@':\n return '\\\\' + m;\n case '\\n':\n return '\\\\n';\n case '\\r':\n return '\\\\r';\n case '\\t':\n return '\\\\t';\n default:\n throw new Error(`Cannot escape unhandled XML character: ${m}`);\n }\n });\n if (value.match(/(^\\s|\\s$)/)) {\n value = '\"' + value + '\"';\n }\n return value;\n}\n\nexport function unescapeAndroidString(value: string): string {\n return value.replace(/\\\\(.)/g, '$1');\n}\n"],"mappings":";;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;AAUO,eAAeA,aAAf,CAA6BC,OAA7B,EAAiF;EACtF,MAAMC,GAAG,GAAGC,MAAM,CAACF,OAAO,CAACC,GAAT,CAAlB;EACA,MAAME,aAAA,CAAGC,QAAH,CAAYC,KAAZ,CAAkBC,eAAA,CAAKC,OAAL,CAAaP,OAAO,CAACM,IAArB,CAAlB,EAA8C;IAAEE,SAAS,EAAE;EAAb,CAA9C,CAAN;EACA,MAAML,aAAA,CAAGC,QAAH,CAAYK,SAAZ,CAAsBT,OAAO,CAACM,IAA9B,EAAoCL,GAApC,CAAN;AACD;;AAEM,eAAeS,YAAf,CAA4BV,OAA5B,EAGgB;EAAA;;EACrB,IAAIW,QAAgB,GAAG,EAAvB;;EACA,IAAI;IACFA,QAAQ,GAAG,MAAMR,aAAA,CAAGC,QAAH,CAAYQ,QAAZ,CAAqBZ,OAAO,CAACM,IAA7B,EAAmC;MAAEO,QAAQ,EAAE,MAAZ;MAAoBC,IAAI,EAAE;IAA1B,CAAnC,CAAjB;EACD,CAFD,CAEE,MAAM,CACN;EACD;;EACD,MAAMC,MAAM,GAAG,KAAIC,gBAAJ,GAAf;EACA,MAAMC,QAAQ,GAAG,MAAMF,MAAM,CAACG,k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G,KAAK,CAAZ,EAAe;QACbA,GAAG,IAAI,CAAP;MACD;IACF,CAJM,MAIA,IAAIG,IAAI,CAACI,KAAL,CAAW,sBAAX,CAAJ,EAAwC;MAC7CD,MAAM,GAAG,CAAT;IACD,CAFM,MAEA;MACLA,MAAM,GAAG,CAAT;IACD;;IAED,MAAME,OAAO,GAAG3B,YAAY,CAACmB,GAAD,EAAMJ,YAAN,CAA5B;IACAC,SAAS,IAAIW,OAAO,GAAGL,IAAV,GAAiBjB,OAA9B;IACAc,GAAG,IAAIM,MAAP;EACD,CApBH;EAsBA,OAAOT,SAAS,CAACO,IAAV,EAAP;AACD;AAED;AACA;AACA;AACA;AACA;;;AACO,SAASX,mBAAT,CAA6BgB,KAA7B,EAAoD;EACzDA,KAAK,GAAGA,KAAK,CAACV,OAAN,CAAc,cAAd,EAA+BW,CAAD,IAAO;IAC3C,QAAQA,CAAR;MACE,KAAK,GAAL;MACA,KAAK,GAAL;MACA,KAAK,GAAL;QACE,OAAO,OAAOA,CAAd;;MACF,KAAK,IAAL;QACE,OAAO,KAAP;;MACF,KAAK,IAAL;QACE,OAAO,KAAP;;MACF,KAAK,IAAL;QACE,OAAO,KAAP;;MACF;QACE,MAAM,IAAIf,KAAJ,CAAW,0CAAyCe,CAAE,EAAtD,CAAN;IAZJ;EAcD,CAfO,CAAR;;EAgBA,IAAID,KAAK,CAACF,KAAN,CAAY,WAAZ,CAAJ,EAA8B;IAC5BE,KAAK,GAAG,MAAMA,KAAN,GAAc,GAAtB;EACD;;EACD,OAAOA,KAAP;AACD;;AAEM,SAAS9B,qBAAT,CAA+B8B,KAA/B,EAAsD;EAC3D,OAAOA,KAAK,CAACV,OAAN,CAAc,QAAd,EAAwB,IAAxB,CAAP;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"commonCodeMod.js","names":["insertContentsAtOffset","srcContents","insertion","offset","srcContentsLength","length","Error","prefix","substring","suffix","replaceContentsWithOffset","contents","replacement","startOffset","endOffset","contentsLength","searchFromOffset","source","regexp","target","matchedIndex","search"],"sources":["../../src/utils/commonCodeMod.ts"],"sourcesContent":["export interface CodeBlock {\n start: number;\n end: number;\n code: string;\n}\n\n/**\n * Insert contents at given offset\n * @param srcContents source contents\n * @param insertion content to insert\n * @param offset `srcContents` offset to insert `insertion`\n * @returns updated contents\n */\nexport function insertContentsAtOffset(\n srcContents: string,\n insertion: string,\n offset: number\n): string {\n const srcContentsLength = srcContents.length;\n if (offset < 0 || offset > srcContentsLength) {\n throw new Error('Invalid parameters.');\n }\n if (offset === 0) {\n return `${insertion}${srcContents}`;\n } else if (offset === srcContentsLength) {\n return `${srcContents}${insertion}`;\n }\n\n const prefix = srcContents.substring(0, offset);\n const suffix = srcContents.substring(offset);\n return `${prefix}${insertion}${suffix}`;\n}\n\n/**\n * Replace contents at given start and end offset\n *\n * @param contents source contents\n * @param replacement new contents to place in [startOffset:endOffset]\n * @param startOffset `contents` start offset for replacement\n * @param endOffset `contents` end offset for replacement\n * @returns updated contents\n */\nexport function replaceContentsWithOffset(\n contents: string,\n replacement: string,\n startOffset: number,\n endOffset: number\n): string {\n const contentsLength = contents.length;\n if (\n startOffset < 0 ||\n endOffset < 0 ||\n startOffset >= contentsLength ||\n endOffset >= contentsLength ||\n startOffset > endOffset\n ) {\n throw new Error('Invalid parameters.');\n }\n const prefix = contents.substring(0, startOffset);\n const suffix = contents.substring(endOffset + 1);\n return `${prefix}${replacement}${suffix}`;\n}\n\n/**\n * String.prototype.search() with offset support\n *\n * @param source source string to search\n * @param regexp RegExp pattern to search\n * @param offset start offset of `source` to search `regexp` pattern\n * @returns The index of the first match between the regular expression and the given string, or -1 if no match was found.\n */\nexport function searchFromOffset(source: string, regexp: RegExp, offset: number): number {\n const target = source.substring(offset);\n const matchedIndex = target.search(regexp);\n return matchedIndex < 0 ? matchedIndex : matchedIndex + offset;\n}\n"],"mappings":";;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;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AACA;AACA;;;AACO,SAASO,gBAAT,CAA0BC,MAA1B,EAA0CC,MAA1C,EAA0Df,MAA1D,EAAkF;EACvF,MAAMgB,MAAM,GAAGF,MAAM,CAACT,SAAP,CAAiBL,MAAjB,CAAf;EACA,MAAMiB,YAAY,GAAGD,MAAM,CAACE,MAAP,CAAcH,MAAd,CAArB;EACA,OAAOE,YAAY,GAAG,CAAf,GAAmBA,YAAnB,GAAkCA,YAAY,GAAGjB,MAAxD;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"errors.js","names":["UnexpectedError","Error","constructor","message","PluginError","code","cause","name"],"sources":["../../src/utils/errors.ts"],"sourcesContent":["export class UnexpectedError extends Error {\n readonly name = 'UnexpectedError';\n\n constructor(message: string) {\n super(`${message}\\nPlease report this as an issue on https://github.com/expo/expo-cli/issues`);\n }\n}\n\nexport type PluginErrorCode =\n | 'INVALID_PLUGIN_TYPE'\n | 'INVALID_PLUGIN_IMPORT'\n | 'PLUGIN_NOT_FOUND'\n | 'CONFLICTING_PROVIDER'\n | 'INVALID_MOD_ORDER'\n | 'MISSING_PROVIDER';\n\n/**\n * Based on `JsonFileError` from `@expo/json-file`\n */\nexport class PluginError extends Error {\n readonly name = 'PluginError';\n readonly isPluginError = true;\n\n constructor(message: string, public code: PluginErrorCode, public cause?: Error) {\n super(cause ? `${message}\\n└─ Cause: ${cause.name}: ${cause.message}` : message);\n }\n}\n"],"mappings":";;;;;;;;;AAAO,MAAMA,eAAN,SAA8BC,KAA9B,CAAoC;EAGzCC,WAAW,CAACC,OAAD,EAAkB;IAC3B,MAAO,GAAEA,OAAQ,6EAAjB;;IAD2B,8BAFb,iBAEa;EAE5B;;AALwC;;;;AAgB3C;AACA;AACA;AACO,MAAMC,WAAN,SAA0BH,KAA1B,CAAgC;EAIrCC,WAAW,CAACC,OAAD,EAAyBE,IAAzB,EAAuDC,KAAvD,EAAsE;IAC/E,MAAMA,KAAK,GAAI,GAAEH,OAAQ,eAAcG,KAAK,CAACC,IAAK,KAAID,KAAK,CAACH,OAAQ,EAAzD,GAA6DA,OAAxE;IAD+E,KAA7CE,IAA6C,GAA7CA,IAA6C;IAAA,KAAfC,KAAe,GAAfA,KAAe;;IAAA,8BAHjE,aAGiE;;IAAA,uCAFxD,IAEwD;EAEhF;;AANoC"}
|
package/build/utils/fs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"fs.js","names":["copyFilePathToPathAsync","src","dest","srcFile","fs","promises","readFile","mkdir","path","dirname","recursive","writeFile","removeFile","filePath","unlinkSync","error","code"],"sources":["../../src/utils/fs.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\n\n/** A basic function that copies a single file to another file location. */\nexport async function copyFilePathToPathAsync(src: string, dest: string): Promise<void> {\n const srcFile = await fs.promises.readFile(src);\n await fs.promises.mkdir(path.dirname(dest), { recursive: true });\n await fs.promises.writeFile(dest, srcFile);\n}\n\n/** Remove a single file (not directory). Returns `true` if a file was actually deleted. */\nexport function removeFile(filePath: string): boolean {\n try {\n fs.unlinkSync(filePath);\n return true;\n } catch (error: any) {\n // Skip if the remove did nothing.\n if (error.code === 'ENOENT') {\n return false;\n }\n throw error;\n }\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;AAEA;AACO,eAAeA,uBAAf,CAAuCC,GAAvC,EAAoDC,IAApD,EAAiF;EACtF,MAAMC,OAAO,GAAG,MAAMC,aAAA,CAAGC,QAAH,CAAYC,QAAZ,CAAqBL,GAArB,CAAtB;EACA,MAAMG,aAAA,CAAGC,QAAH,CAAYE,KAAZ,CAAkBC,eAAA,CAAKC,OAAL,CAAaP,IAAb,CAAlB,EAAsC;IAAEQ,SAAS,EAAE;EAAb,CAAtC,CAAN;EACA,MAAMN,aAAA,CAAGC,QAAH,CAAYM,SAAZ,CAAsBT,IAAtB,EAA4BC,OAA5B,CAAN;AACD;AAED;;;AACO,SAASS,UAAT,CAAoBC,QAApB,EAA+C;EACpD,IAAI;IACFT,aAAA,CAAGU,UAAH,CAAcD,QAAd;;IACA,OAAO,IAAP;EACD,CAHD,CAGE,OAAOE,KAAP,EAAmB;IACnB;IACA,IAAIA,KAAK,CAACC,IAAN,KAAe,QAAnB,EAA6B;MAC3B,OAAO,KAAP;IACD;;IACD,MAAMD,KAAN;EACD;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"generateCode.js","names":["getGeneratedSectionIndexes","src","tag","contents","split","start","findIndex","line","includes","end","mergeContents","newSrc","anchor","offset","comment","header","createGeneratedHeaderComment","sanitizedTarget","removeGeneratedContents","addLines","didMerge","didClear","removeContents","content","find","toAdd","lines","lineIndex","match","error","Error","code","newLine","splice","join","hashKey","createHash","hash","crypto","update","digest"],"sources":["../../src/utils/generateCode.ts"],"sourcesContent":["/**\n * Get line indexes for the generated section of a file.\n *\n * @param src\n */\nimport crypto from 'crypto';\n\nfunction getGeneratedSectionIndexes(\n src: string,\n tag: string\n): { contents: string[]; start: number; end: number } {\n const contents = src.split('\\n');\n const start = contents.findIndex((line) => line.includes(`@generated begin ${tag}`));\n const end = contents.findIndex((line) => line.includes(`@generated end ${tag}`));\n\n return { contents, start, end };\n}\n\nexport type MergeResults = {\n contents: string;\n didClear: boolean;\n didMerge: boolean;\n};\n\n/**\n * Merge the contents of two files together and add a generated header.\n *\n * @param src contents of the original file\n * @param newSrc new contents to merge into the original file\n * @param identifier used to update and remove merges\n * @param anchor regex to where the merge should begin\n * @param offset line offset to start merging at (<1 for behind the anchor)\n * @param comment comment style `//` or `#`\n */\nexport function mergeContents({\n src,\n newSrc,\n tag,\n anchor,\n offset,\n comment,\n}: {\n src: string;\n newSrc: string;\n tag: string;\n anchor: string | RegExp;\n offset: number;\n comment: string;\n}): MergeResults {\n const header = createGeneratedHeaderComment(newSrc, tag, comment);\n if (!src.includes(header)) {\n // Ensure the old generated contents are removed.\n const sanitizedTarget = removeGeneratedContents(src, tag);\n return {\n contents: addLines(sanitizedTarget ?? src, anchor, offset, [\n header,\n ...newSrc.split('\\n'),\n `${comment} @generated end ${tag}`,\n ]),\n didMerge: true,\n didClear: !!sanitizedTarget,\n };\n }\n return { contents: src, didClear: false, didMerge: false };\n}\n\nexport function removeContents({ src, tag }: { src: string; tag: string }): MergeResults {\n // Ensure the old generated contents are removed.\n const sanitizedTarget = removeGeneratedContents(src, tag);\n return {\n contents: sanitizedTarget ?? src,\n didMerge: false,\n didClear: !!sanitizedTarget,\n };\n}\n\nfunction addLines(content: string, find: string | RegExp, offset: number, toAdd: string[]) {\n const lines = content.split('\\n');\n\n let lineIndex = lines.findIndex((line) => line.match(find));\n if (lineIndex < 0) {\n const error = new Error(`Failed to match \"${find}\" in contents:\\n${content}`);\n // @ts-ignore\n error.code = 'ERR_NO_MATCH';\n throw error;\n }\n for (const newLine of toAdd) {\n lines.splice(lineIndex + offset, 0, newLine);\n lineIndex++;\n }\n\n return lines.join('\\n');\n}\n\n/**\n * Removes the generated section from a file, returns null when nothing can be removed.\n * This sways heavily towards not removing lines unless it's certain that modifications were not made manually.\n *\n * @param src\n */\nexport function removeGeneratedContents(src: string, tag: string): string | null {\n const { contents, start, end } = getGeneratedSectionIndexes(src, tag);\n if (start > -1 && end > -1 && start < end) {\n contents.splice(start, end - start + 1);\n // TODO: We could in theory check that the contents we're removing match the hash used in the header,\n // this would ensure that we don't accidentally remove lines that someone added or removed from the generated section.\n return contents.join('\\n');\n }\n return null;\n}\n\nexport function createGeneratedHeaderComment(\n contents: string,\n tag: string,\n comment: string\n): string {\n const hashKey = createHash(contents);\n\n // Everything after the `${tag} ` is unversioned and can be freely modified without breaking changes.\n return `${comment} @generated begin ${tag} - expo prebuild (DO NOT MODIFY) ${hashKey}`;\n}\n\nexport function createHash(src: string): string {\n // this doesn't need to be secure, the shorter the better.\n const hash = crypto.createHash('sha1').update(src).digest('hex');\n return `sync-${hash}`;\n}\n"],"mappings":";;;;;;;;;;;AAKA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;AALA;AACA;AACA;AACA;AACA;AAGA,SAASA,0BAAT,CACEC,GADF,EAEEC,GAFF,EAGsD;EACpD,MAAMC,QAAQ,GAAGF,GAAG,CAACG,KAAJ,CAAU,IAAV,CAAjB;EACA,MAAMC,KAAK,GAAGF,QAAQ,CAACG,SAAT,CAAoBC,IAAD,IAAUA,IAAI,CAACC,QAAL,CAAe,oBAAmBN,GAAI,EAAtC,CAA7B,CAAd;EACA,MAAMO,GAAG,GAAGN,QAAQ,CAACG,SAAT,CAAoBC,IAAD,IAAUA,IAAI,CAACC,QAAL,CAAe,kBAAiBN,GAAI,EAApC,CAA7B,CAAZ;EAEA,OAAO;IAAEC,QAAF;IAAYE,KAAZ;IAAmBI;EAAnB,CAAP;AACD;;AAQD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,aAAT,CAAuB;EAC5BT,GAD4B;EAE5BU,MAF4B;EAG5BT,GAH4B;EAI5BU,MAJ4B;EAK5BC,MAL4B;EAM5BC;AAN4B,CAAvB,EAcU;EACf,MAAMC,MAAM,GAAGC,4BAA4B,CAACL,MAAD,EAAST,GAAT,EAAcY,OAAd,CAA3C;;EACA,IAAI,CAACb,GAAG,CAACO,QAAJ,CAAaO,MAAb,CAAL,EAA2B;IACzB;IACA,MAAME,eAAe,GAAGC,uBAAuB,CAACjB,GAAD,EAAMC,GAAN,CAA/C;IACA,OAAO;MACLC,QAAQ,EAAEgB,QAAQ,CAACF,eAAD,aAACA,eAAD,cAACA,eAAD,GAAoBhB,GAApB,EAAyBW,MAAzB,EAAiCC,MAAjC,EAAyC,CACzDE,MADyD,EAEzD,GAAGJ,MAAM,CAACP,KAAP,CAAa,IAAb,CAFsD,EAGxD,GAAEU,OAAQ,mBAAkBZ,GAAI,EAHwB,CA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GAAjC,EAA8CC,GAA9C,EAA0E;EAC/E,MAAM;IAAEC,QAAF;IAAYE,KAAZ;IAAmBI;EAAnB,IAA2BT,0BAA0B,CAACC,GAAD,EAAMC,GAAN,CAA3D;;EACA,IAAIG,KAAK,GAAG,CAAC,CAAT,IAAcI,GAAG,GAAG,CAAC,CAArB,IAA0BJ,KAAK,GAAGI,GAAtC,EAA2C;IACzCN,QAAQ,CAAC8B,MAAT,CAAgB5B,KAAhB,EAAuBI,GAAG,GAAGJ,KAAN,GAAc,CAArC,EADyC,CAEzC;IACA;;IACA,OAAOF,QAAQ,CAAC+B,IAAT,CAAc,IAAd,CAAP;EACD;;EACD,OAAO,IAAP;AACD;;AAEM,SAASlB,4BAAT,CACLb,QADK,EAELD,GAFK,EAGLY,OAHK,EAIG;EACR,MAAMqB,OAAO,GAAGC,UAAU,CAACjC,QAAD,CAA1B,CADQ,CAGR;;EACA,OAAQ,GAAEW,OAAQ,qBAAoBZ,GAAI,oCAAmCiC,OAAQ,EAArF;AACD;;AAEM,SAASC,UAAT,CAAoBnC,GAApB,EAAyC;EAC9C;EACA,MAAMoC,IAAI,GAAGC,iBAAA,CAAOF,UAAP,CAAkB,MAAlB,EAA0BG,MAA1B,CAAiCtC,GAAjC,EAAsCuC,MAAtC,CAA6C,KAA7C,CAAb;;EACA,OAAQ,QAAOH,IAAK,EAApB;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"history.js","names":["getHistoryItem","config","name","_internal","pluginHistory","addHistoryItem","item","version"],"sources":["../../src/utils/history.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { ModPlatform } from '../Plugin.types';\n\nexport type PluginHistoryItem = {\n name: string;\n version: string;\n platform?: ModPlatform;\n};\n\nexport function getHistoryItem(\n config: Pick<ExpoConfig, '_internal'>,\n name: string\n): PluginHistoryItem | null {\n return config._internal?.pluginHistory?.[name] ?? null;\n}\n\nexport function addHistoryItem(\n config: ExpoConfig,\n item: Omit<PluginHistoryItem, 'version'> & { version?: string }\n): ExpoConfig {\n if (!config._internal) {\n config._internal = {};\n }\n if (!config._internal.pluginHistory) {\n config._internal.pluginHistory = {};\n }\n\n if (!item.version) {\n item.version = 'UNVERSIONED';\n }\n\n config._internal.pluginHistory[item.name] = item;\n\n return config;\n}\n"],"mappings":";;;;;;;;AAUO,SAASA,cAAT,CACLC,MADK,EAELC,IAFK,EAGqB;EAAA;;EAC1B,qDAAOD,MAAM,CAACE,SAAd,gFAAO,kBAAkBC,aAAzB,2DAAO,uBAAkCF,IAAlC,CAAP,yEAAkD,IAAlD;AACD;;AAEM,SAASG,cAAT,CACLJ,MADK,EAELK,IAFK,EAGO;EACZ,IAAI,CAACL,MAAM,CAACE,SAAZ,EAAuB;IACrBF,MAAM,CAACE,SAAP,GAAmB,EAAnB;EACD;;EACD,IAAI,CAACF,MAAM,CAACE,SAAP,CAAiBC,aAAtB,EAAqC;IACnCH,MAAM,CAACE,SAAP,CAAiBC,aAAjB,GAAiC,EAAjC;EACD;;EAED,IAAI,CAACE,IAAI,CAACC,OAAV,EAAmB;IACjBD,IAAI,CAACC,OAAL,GAAe,aAAf;EACD;;EAEDN,MAAM,CAACE,SAAP,CAAiBC,aAAjB,CAA+BE,IAAI,CAACJ,IAApC,IAA4CI,IAA5C;EAEA,OAAOL,MAAP;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"matchBrackets.js","names":["LEFT_BRACKETS","RIGHT_BRACKETS","findMatchingBracketPosition","contents","bracket","offset","firstBracketPos","indexOf","stackCounter","matchingBracket","getMatchingBracket","isLeftBracket","contentsLength","length","i","c","leftBracketList","includes","Error"],"sources":["../../src/utils/matchBrackets.ts"],"sourcesContent":["const LEFT_BRACKETS = ['(', '{'] as const;\nconst RIGHT_BRACKETS = [')', '}'] as const;\n\ntype LeftBracket = typeof LEFT_BRACKETS[number];\ntype RightBracket = typeof RIGHT_BRACKETS[number];\ntype Bracket = LeftBracket | RightBracket;\n\nexport function findMatchingBracketPosition(\n contents: string,\n bracket: Bracket,\n offset: number = 0\n): number {\n // search first occurrence of `bracket`\n const firstBracketPos = contents.indexOf(bracket, offset);\n if (firstBracketPos < 0) {\n return -1;\n }\n\n let stackCounter = 0;\n const matchingBracket = getMatchingBracket(bracket);\n\n if (isLeftBracket(bracket)) {\n const contentsLength = contents.length;\n // search forward\n for (let i = firstBracketPos + 1; i < contentsLength; ++i) {\n const c = contents[i];\n if (c === bracket) {\n stackCounter += 1;\n } else if (c === matchingBracket) {\n if (stackCounter === 0) {\n return i;\n }\n stackCounter -= 1;\n }\n }\n } else {\n // search backward\n for (let i = firstBracketPos - 1; i >= 0; --i) {\n const c = contents[i];\n if (c === bracket) {\n stackCounter += 1;\n } else if (c === matchingBracket) {\n if (stackCounter === 0) {\n return i;\n }\n stackCounter -= 1;\n }\n }\n }\n\n return -1;\n}\n\nfunction isLeftBracket(bracket: Bracket): boolean {\n const leftBracketList: readonly Bracket[] = LEFT_BRACKETS;\n return leftBracketList.includes(bracket);\n}\n\nfunction getMatchingBracket(bracket: Bracket): Bracket {\n switch (bracket) {\n case '(':\n return ')';\n case ')':\n return '(';\n case '{':\n return '}';\n case '}':\n return '{';\n default:\n throw new Error(`Unsupported bracket - ${bracket}`);\n }\n}\n"],"mappings":";;;;;;AAAA,MAAMA,aAAa,GAAG,CAAC,GAAD,EAAM,GAAN,CAAtB;AACA,MAAMC,cAAc,GAAG,CAAC,GAAD,EAAM,GAAN,CAAvB;;AAMO,SAASC,2BAAT,CACLC,QADK,EAELC,OAFK,EAGLC,MAAc,GAAG,CAHZ,EAIG;EACR;EACA,MAAMC,eAAe,GAAGH,QAAQ,CAACI,OAAT,CAAiBH,OAAjB,EAA0BC,MAA1B,CAAxB;;EACA,IAAIC,eAAe,GAAG,CAAtB,EAAyB;IACvB,OAAO,CAAC,CAAR;EACD;;EAED,IAAIE,YAAY,GAAG,CAAnB;EACA,MAA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;;IACF,KAAK,GAAL;MACE,OAAO,GAAP;;IACF,KAAK,GAAL;MACE,OAAO,GAAP;;IACF;MACE,MAAM,IAAIc,KAAJ,CAAW,yBAAwBd,OAAQ,EAA3C,CAAN;EAVJ;AAYD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"modules.js","names":["statAsync","file","fs","promises","stat","fileExistsAsync","isFile","directoryExistsAsync","isDirectory","fileExists","statSync"],"sources":["../../src/utils/modules.ts"],"sourcesContent":["import fs from 'fs';\n\n/**\n * A non-failing version of async FS stat.\n *\n * @param file\n */\nasync function statAsync(file: string): Promise<fs.Stats | null> {\n try {\n return await fs.promises.stat(file);\n } catch {\n return null;\n }\n}\n\nexport async function fileExistsAsync(file: string): Promise<boolean> {\n return (await statAsync(file))?.isFile() ?? false;\n}\n\nexport async function directoryExistsAsync(file: string): Promise<boolean> {\n return (await statAsync(file))?.isDirectory() ?? false;\n}\n\nexport function fileExists(file: string): boolean {\n try {\n return fs.statSync(file).isFile();\n } catch {\n return false;\n }\n}\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAeA,SAAf,CAAyBC,IAAzB,EAAiE;EAC/D,IAAI;IACF,OAAO,MAAMC,aAAA,CAAGC,QAAH,CAAYC,IAAZ,CAAiBH,IAAjB,CAAb;EACD,CAFD,CAEE,MAAM;IACN,OAAO,IAAP;EACD;AACF;;AAEM,eAAeI,eAAf,CAA+BJ,IAA/B,EAA+D;EAAA;;EACpE,oDAAQ,MAAMD,SAAS,CAACC,IAAD,CAAvB,qDAAO,iBAAyBK,MAAzB,EAAP,yEAA4C,KAA5C;AACD;;AAEM,eAAeC,oBAAf,CAAoCN,IAApC,EAAoE;EAAA;;EACzE,qDAAQ,MAAMD,SAAS,CAACC,IAAD,CAAvB,sDAAO,kBAAyBO,WAAzB,EAAP,yEAAiD,KAAjD;AACD;;AAEM,SAASC,UAAT,CAAoBR,IAApB,EAA2C;EAChD,IAAI;IACF,OAAOC,aAAA,CAAGQ,QAAH,CAAYT,IAAZ,EAAkBK,MAAlB,EAAP;EACD,CAFD,CAEE,MAAM;IACN,OAAO,KAAP;EACD;AACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.get = get;
|
|
7
|
+
|
|
8
|
+
/** `lodash.get` */
|
|
9
|
+
function get(obj, key) {
|
|
10
|
+
const branches = key.split('.');
|
|
11
|
+
let current = obj;
|
|
12
|
+
let branch;
|
|
13
|
+
|
|
14
|
+
while (branch = branches.shift()) {
|
|
15
|
+
if (!(branch in current)) {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
current = current[branch];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return current;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=obj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"obj.js","names":["get","obj","key","branches","split","current","branch","shift","undefined"],"sources":["../../src/utils/obj.ts"],"sourcesContent":["/** `lodash.get` */\nexport function get(obj: any, key: string): any {\n const branches = key.split('.');\n let current: any = obj;\n let branch: string | undefined;\n while ((branch = branches.shift())) {\n if (!(branch in current)) {\n return undefined;\n }\n current = current[branch];\n }\n return current;\n}\n"],"mappings":";;;;;;;AAAA;AACO,SAASA,GAAT,CAAaC,GAAb,EAAuBC,GAAvB,EAAyC;EAC9C,MAAMC,QAAQ,GAAGD,GAAG,CAACE,KAAJ,CAAU,GAAV,CAAjB;EACA,IAAIC,OAAY,GAAGJ,GAAnB;EACA,IAAIK,MAAJ;;EACA,OAAQA,MAAM,GAAGH,QAAQ,CAACI,KAAT,EAAjB,EAAoC;IAClC,IAAI,EAAED,MAAM,IAAID,OAAZ,CAAJ,EAA0B;MACxB,OAAOG,SAAP;IACD;;IACDH,OAAO,GAAGA,OAAO,CAACC,MAAD,CAAjB;EACD;;EACD,OAAOD,OAAP;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/plugin-resolver.ts"],"names":["pluginFileName","findUpPackageJson","root","packageJson","findUp","sync","cwd","resolvePluginForModule","projectRoot","modulePath","resolved","resolveFrom","silent","PluginError","moduleNameIsDirectFileReference","isPluginFile","filePath","findUpPlugin","pathIsFilePath","name","match","slashCount","split","path","sep","length","startsWith","resolveExpoPluginFile","pluginModuleFile","moduleRoot","dirname","pluginFile","normalizeStaticPlugin","plugin","Array","isArray","undefined","assertInternalProjectRoot","resolveConfigPluginFunction","pluginReference","resolveConfigPluginFunctionWithInfo","result","requirePluginFile","error","SyntaxError","learnMoreLink","pluginError","message","stack","resolveConfigPluginExport","default","require"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;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;;;;;;;;AAEA;AACO,MAAMA,cAAc,GAAG,eAAvB;;;AAEP,SAASC,iBAAT,CAA2BC,IAA3B,EAAiD;AAC/C,QAAMC,WAAW,GAAGC,kBAAOC,IAAP,CAAY,cAAZ,EAA4B;AAAEC,IAAAA,GAAG,EAAEJ;AAAP,GAA5B,CAApB;;AACA,yBAAOC,WAAP,EAAqB,qCAAoCD,IAAK,GAA9D;AACA,SAAOC,WAAP;AACD;;AAEM,SAASI,sBAAT,CAAgCC,WAAhC,EAAqDC,UAArD,EAAyE;AAC9E,QAAMC,QAAQ,GAAGC,uBAAYC,MAA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,KAAIhC,qBAAJ,EACH,WAAU0B,eAAgB,uCAAsCR,UAAW,KAAIc,aAAc,EAD1F,EAEJ,qBAFI,CAAN;AAID;;AAED,SAAOZ,MAAP;AACD;;AAED,SAASS,iBAAT,CAA2B1B,QAA3B,EAAkD;AAChD,MAAI;AACF,WAAOmC,OAAO,CAACnC,QAAD,CAAd;AACD,GAFD,CAEE,OAAO2B,KAAP,EAAc;AACd;AACA,UAAMA,KAAN;AACD;AACF","sourcesContent":["import assert from 'assert';\nimport findUp from 'find-up';\nimport * as path from 'path';\nimport resolveFrom from 'resolve-from';\n\nimport { ConfigPlugin, StaticPlugin } from '../Plugin.types';\nimport { PluginError } from './errors';\nimport { fileExists } from './modules';\n\n// Default plugin entry file name.\nexport const pluginFileName = 'app.plugin.js';\n\nfunction findUpPackageJson(root: string): string {\n const packageJson = findUp.sync('package.json', { cwd: root });\n assert(packageJson, `No package.json found for module \"${root}\"`);\n return packageJson;\n}\n\nexport function resolvePluginForModule(projectRoot: string, modulePath: string) {\n const resolved = resolveFrom.silent(projectRoot, modulePath);\n if (!resolved) {\n throw new PluginError(\n `Failed to resolve plugin for module \"${modulePath}\" relative to \"${projectRoot}\"`,\n 'PLUGIN_NOT_FOUND'\n );\n }\n // If the modulePath is something like `@bacon/package/index.js` or `expo-foo/build/app`\n // then skip resolving the module `app.plugin.js`\n if (moduleNameIsDirectFileReference(modulePath)) {\n return { isPluginFile: false, filePath: resolved };\n }\n return findUpPlugin(resolved);\n}\n\n// TODO: Test windows\nfunction pathIsFilePath(name: string): boolean {\n // Matches lines starting with: . / ~/\n return !!name.match(/^(\\.|~\\/|\\/)/g);\n}\n\nexport function moduleNameIsDirectFileReference(name: string): boolean {\n if (pathIsFilePath(name)) {\n return true;\n }\n\n const slashCount = name.split(path.sep)?.length;\n // Orgs (like @expo/config ) should have more than one slash to be a direct file.\n if (name.startsWith('@')) {\n return slashCount > 2;\n }\n\n // Regular packages should be considered direct reference if they have more than one slash.\n return slashCount > 1;\n}\n\nfunction resolveExpoPluginFile(root: string): string | null {\n // Find the expo plugin root file\n const pluginModuleFile = resolveFrom.silent(\n root,\n // use ./ so it isn't resolved as a node module\n `./${pluginFileName}`\n );\n\n // If the default expo plugin file exists use it.\n if (pluginModuleFile && fileExists(pluginModuleFile)) {\n return pluginModuleFile;\n }\n return null;\n}\n\nfunction findUpPlugin(root: string): { filePath: string; isPluginFile: boolean } {\n // Get the closest package.json to the node module\n const packageJson = findUpPackageJson(root);\n // resolve the root folder for the node module\n const moduleRoot = path.dirname(packageJson);\n // use whatever the initial resolved file was ex: `node_modules/my-package/index.js` or `./something.js`\n const pluginFile = resolveExpoPluginFile(moduleRoot);\n return { filePath: pluginFile ?? root, isPluginFile: !!pluginFile };\n}\n\nexport function normalizeStaticPlugin(plugin: StaticPlugin | ConfigPlugin | string): StaticPlugin {\n if (Array.isArray(plugin)) {\n assert(\n plugin.length > 0 && plugin.length < 3,\n `Wrong number of arguments provided for static config plugin, expected either 1 or 2, got ${plugin.length}`\n );\n return plugin;\n }\n return [plugin, undefined];\n}\n\nexport function assertInternalProjectRoot(projectRoot?: string): asserts projectRoot {\n assert(\n projectRoot,\n `Unexpected: Config \\`_internal.projectRoot\\` isn't defined by expo-cli, this is a bug.`\n );\n}\n\n// Resolve the module function and assert type\nexport function resolveConfigPluginFunction(projectRoot: string, pluginReference: string) {\n const { plugin } = resolveConfigPluginFunctionWithInfo(projectRoot, pluginReference);\n return plugin;\n}\n\n// Resolve the module function and assert type\nexport function resolveConfigPluginFunctionWithInfo(projectRoot: string, pluginReference: string) {\n const { filePath: pluginFile, isPluginFile } = resolvePluginForModule(\n projectRoot,\n pluginReference\n );\n let result: any;\n try {\n result = requirePluginFile(pluginFile);\n } catch (error) {\n if (error instanceof SyntaxError) {\n const learnMoreLink = `Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin`;\n // If the plugin reference is a node module, and that node module has a syntax error, then it probably doesn't have an official config plugin.\n if (!isPluginFile && !moduleNameIsDirectFileReference(pluginReference)) {\n const pluginError = new PluginError(\n `Package \"${pluginReference}\" does not contain a valid config plugin.\\n${learnMoreLink}\\n\\n${error.message}`,\n 'INVALID_PLUGIN_IMPORT'\n );\n pluginError.stack = error.stack;\n throw pluginError;\n }\n }\n throw error;\n }\n\n const plugin = resolveConfigPluginExport({\n plugin: result,\n pluginFile,\n pluginReference,\n isPluginFile,\n });\n return { plugin, pluginFile, pluginReference, isPluginFile };\n}\n\n/**\n * - Resolve the exported contents of an Expo config (be it default or module.exports)\n * - Assert no promise exports\n * - Return config type\n * - Serialize config\n *\n * @param props.plugin plugin results\n * @param props.pluginFile plugin file path\n * @param props.pluginReference the string used to reference the plugin\n * @param props.isPluginFile is file path from the app.plugin.js module root\n */\nexport function resolveConfigPluginExport({\n plugin,\n pluginFile,\n pluginReference,\n isPluginFile,\n}: {\n plugin: any;\n pluginFile: string;\n pluginReference: string;\n isPluginFile: boolean;\n}): ConfigPlugin<unknown> {\n if (plugin.default != null) {\n plugin = plugin.default;\n }\n if (typeof plugin !== 'function') {\n const learnMoreLink = `Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin`;\n // If the plugin reference is a node module, and that node module does not export a function then it probably doesn't have a config plugin.\n if (!isPluginFile && !moduleNameIsDirectFileReference(pluginReference)) {\n throw new PluginError(\n `Package \"${pluginReference}\" does not contain a valid config plugin. Module must export a function from file: ${pluginFile}\\n${learnMoreLink}`,\n 'INVALID_PLUGIN_TYPE'\n );\n }\n throw new PluginError(\n `Plugin \"${pluginReference}\" must export a function from file: ${pluginFile}. ${learnMoreLink}`,\n 'INVALID_PLUGIN_TYPE'\n );\n }\n\n return plugin;\n}\n\nfunction requirePluginFile(filePath: string): any {\n try {\n return require(filePath);\n } catch (error) {\n // TODO: Improve error messages\n throw error;\n }\n}\n"],"file":"plugin-resolver.js"}
|
|
1
|
+
{"version":3,"file":"plugin-resolver.js","names":["pluginFileName","findUpPackageJson","root","packageJson","findUp","sync","cwd","assert","resolvePluginForModule","projectRoot","modulePath","resolved","resolveFrom","silent","PluginError","moduleNameIsDirectFileReference","isPluginFile","filePath","findUpPlugin","pathIsFilePath","name","match","slashCount","split","path","sep","length","startsWith","resolveExpoPluginFile","pluginModuleFile","fileExists","moduleRoot","dirname","pluginFile","normalizeStaticPlugin","plugin","Array","isArray","undefined","assertInternalProjectRoot","resolveConfigPluginFunction","pluginReference","resolveConfigPluginFunctionWithInfo","result","requirePluginFile","error","SyntaxError","learnMoreLink","pluginError","message","stack","resolveConfigPluginExport","default","require"],"sources":["../../src/utils/plugin-resolver.ts"],"sourcesContent":["import assert from 'assert';\nimport findUp from 'find-up';\nimport * as path from 'path';\nimport resolveFrom from 'resolve-from';\n\nimport { ConfigPlugin, StaticPlugin } from '../Plugin.types';\nimport { PluginError } from './errors';\nimport { fileExists } from './modules';\n\n// Default plugin entry file name.\nexport const pluginFileName = 'app.plugin.js';\n\nfunction findUpPackageJson(root: string): string {\n const packageJson = findUp.sync('package.json', { cwd: root });\n assert(packageJson, `No package.json found for module \"${root}\"`);\n return packageJson;\n}\n\nexport function resolvePluginForModule(projectRoot: string, modulePath: string) {\n const resolved = resolveFrom.silent(projectRoot, modulePath);\n if (!resolved) {\n throw new PluginError(\n `Failed to resolve plugin for module \"${modulePath}\" relative to \"${projectRoot}\"`,\n 'PLUGIN_NOT_FOUND'\n );\n }\n // If the modulePath is something like `@bacon/package/index.js` or `expo-foo/build/app`\n // then skip resolving the module `app.plugin.js`\n if (moduleNameIsDirectFileReference(modulePath)) {\n return { isPluginFile: false, filePath: resolved };\n }\n return findUpPlugin(resolved);\n}\n\n// TODO: Test windows\nfunction pathIsFilePath(name: string): boolean {\n // Matches lines starting with: . / ~/\n return !!name.match(/^(\\.|~\\/|\\/)/g);\n}\n\nexport function moduleNameIsDirectFileReference(name: string): boolean {\n if (pathIsFilePath(name)) {\n return true;\n }\n\n const slashCount = name.split(path.sep)?.length;\n // Orgs (like @expo/config ) should have more than one slash to be a direct file.\n if (name.startsWith('@')) {\n return slashCount > 2;\n }\n\n // Regular packages should be considered direct reference if they have more than one slash.\n return slashCount > 1;\n}\n\nfunction resolveExpoPluginFile(root: string): string | null {\n // Find the expo plugin root file\n const pluginModuleFile = resolveFrom.silent(\n root,\n // use ./ so it isn't resolved as a node module\n `./${pluginFileName}`\n );\n\n // If the default expo plugin file exists use it.\n if (pluginModuleFile && fileExists(pluginModuleFile)) {\n return pluginModuleFile;\n }\n return null;\n}\n\nfunction findUpPlugin(root: string): { filePath: string; isPluginFile: boolean } {\n // Get the closest package.json to the node module\n const packageJson = findUpPackageJson(root);\n // resolve the root folder for the node module\n const moduleRoot = path.dirname(packageJson);\n // use whatever the initial resolved file was ex: `node_modules/my-package/index.js` or `./something.js`\n const pluginFile = resolveExpoPluginFile(moduleRoot);\n return { filePath: pluginFile ?? root, isPluginFile: !!pluginFile };\n}\n\nexport function normalizeStaticPlugin(plugin: StaticPlugin | ConfigPlugin | string): StaticPlugin {\n if (Array.isArray(plugin)) {\n assert(\n plugin.length > 0 && plugin.length < 3,\n `Wrong number of arguments provided for static config plugin, expected either 1 or 2, got ${plugin.length}`\n );\n return plugin;\n }\n return [plugin, undefined];\n}\n\nexport function assertInternalProjectRoot(projectRoot?: string): asserts projectRoot {\n assert(\n projectRoot,\n `Unexpected: Config \\`_internal.projectRoot\\` isn't defined by expo-cli, this is a bug.`\n );\n}\n\n// Resolve the module function and assert type\nexport function resolveConfigPluginFunction(projectRoot: string, pluginReference: string) {\n const { plugin } = resolveConfigPluginFunctionWithInfo(projectRoot, pluginReference);\n return plugin;\n}\n\n// Resolve the module function and assert type\nexport function resolveConfigPluginFunctionWithInfo(projectRoot: string, pluginReference: string) {\n const { filePath: pluginFile, isPluginFile } = resolvePluginForModule(\n projectRoot,\n pluginReference\n );\n let result: any;\n try {\n result = requirePluginFile(pluginFile);\n } catch (error) {\n if (error instanceof SyntaxError) {\n const learnMoreLink = `Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin`;\n // If the plugin reference is a node module, and that node module has a syntax error, then it probably doesn't have an official config plugin.\n if (!isPluginFile && !moduleNameIsDirectFileReference(pluginReference)) {\n const pluginError = new PluginError(\n `Package \"${pluginReference}\" does not contain a valid config plugin.\\n${learnMoreLink}\\n\\n${error.message}`,\n 'INVALID_PLUGIN_IMPORT'\n );\n pluginError.stack = error.stack;\n throw pluginError;\n }\n }\n throw error;\n }\n\n const plugin = resolveConfigPluginExport({\n plugin: result,\n pluginFile,\n pluginReference,\n isPluginFile,\n });\n return { plugin, pluginFile, pluginReference, isPluginFile };\n}\n\n/**\n * - Resolve the exported contents of an Expo config (be it default or module.exports)\n * - Assert no promise exports\n * - Return config type\n * - Serialize config\n *\n * @param props.plugin plugin results\n * @param props.pluginFile plugin file path\n * @param props.pluginReference the string used to reference the plugin\n * @param props.isPluginFile is file path from the app.plugin.js module root\n */\nexport function resolveConfigPluginExport({\n plugin,\n pluginFile,\n pluginReference,\n isPluginFile,\n}: {\n plugin: any;\n pluginFile: string;\n pluginReference: string;\n isPluginFile: boolean;\n}): ConfigPlugin<unknown> {\n if (plugin.default != null) {\n plugin = plugin.default;\n }\n if (typeof plugin !== 'function') {\n const learnMoreLink = `Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin`;\n // If the plugin reference is a node module, and that node module does not export a function then it probably doesn't have a config plugin.\n if (!isPluginFile && !moduleNameIsDirectFileReference(pluginReference)) {\n throw new PluginError(\n `Package \"${pluginReference}\" does not contain a valid config plugin. Module must export a function from file: ${pluginFile}\\n${learnMoreLink}`,\n 'INVALID_PLUGIN_TYPE'\n );\n }\n throw new PluginError(\n `Plugin \"${pluginReference}\" must export a function from file: ${pluginFile}. ${learnMoreLink}`,\n 'INVALID_PLUGIN_TYPE'\n );\n }\n\n return plugin;\n}\n\nfunction requirePluginFile(filePath: string): any {\n try {\n return require(filePath);\n } catch (error) {\n // TODO: Improve error messages\n throw error;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA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A;AACA;;;AACO,SAASmC,yBAAT,CAAmC;EACxChB,MADwC;EAExCF,UAFwC;EAGxCQ,eAHwC;EAIxCzB;AAJwC,CAAnC,EAUmB;EACxB,IAAImB,MAAM,CAACiB,OAAP,IAAkB,IAAtB,EAA4B;IAC1BjB,MAAM,GAAGA,MAAM,CAACiB,OAAhB;EACD;;EACD,IAAI,OAAOjB,MAAP,KAAkB,UAAtB,EAAkC;IAChC,MAAMY,aAAa,GAAI,4EAAvB,CADgC,CAEhC;;IACA,IAAI,CAAC/B,YAAD,IAAiB,CAACD,+BAA+B,CAAC0B,eAAD,CAArD,EAAwE;MACtE,MAAM,KAAI3B,qBAAJ,EACH,YAAW2B,eAAgB,sFAAqFR,UAAW,KAAIc,aAAc,EAD1I,EAEJ,qBAFI,CAAN;IAID;;IACD,MAAM,KAAIjC,qBAAJ,EACH,WAAU2B,eAAgB,uCAAsCR,UAAW,KAAIc,aAAc,EAD1F,EAEJ,qBAFI,CAAN;EAID;;EAED,OAAOZ,MAAP;AACD;;AAED,SAASS,iBAAT,CAA2B3B,QAA3B,EAAkD;EAChD,IAAI;IACF,OAAOoC,OAAO,CAACpC,QAAD,CAAd;EACD,CAFD,CAEE,OAAO4B,KAAP,EAAc;IACd;IACA,MAAMA,KAAN;EACD;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"sortObject.js","names":["sortObject","obj","compareFn","Object","keys","sort","reduce","acc","key","sortObjWithOrder","order","sorted","sortWithOrder","groupOrder","Set","concat","length","shift","index","indexOf","item","splice","push","reverseSortString","a","b"],"sources":["../../src/utils/sortObject.ts"],"sourcesContent":["export function sortObject<T extends Record<string, any> = Record<string, any>>(\n obj: T,\n compareFn?: (a: string, b: string) => number\n): T {\n return Object.keys(obj)\n .sort(compareFn)\n .reduce(\n (acc, key) => ({\n ...acc,\n [key]: obj[key],\n }),\n {}\n ) as T;\n}\n\nexport function sortObjWithOrder<T extends Record<string, any> = Record<string, any>>(\n obj: T,\n order: string[]\n): T {\n const sorted = sortWithOrder(Object.keys(obj), order);\n\n return sorted.reduce(\n (acc, key) => ({\n ...acc,\n [key]: obj[key],\n }),\n {}\n ) as T;\n}\n\nexport function sortWithOrder(obj: string[], order: string[]): string[] {\n const groupOrder = [...new Set(order.concat(obj))];\n const sorted: string[] = [];\n\n while (groupOrder.length) {\n const key = groupOrder.shift()!;\n const index = obj.indexOf(key);\n if (index > -1) {\n const [item] = obj.splice(index, 1);\n sorted.push(item);\n }\n }\n\n return sorted;\n}\n\nexport const reverseSortString = (a: string, b: string) => {\n if (a < b) return 1;\n if (a > b) return -1;\n return 0;\n};\n"],"mappings":";;;;;;;;;;AAAO,SAASA,UAAT,CACLC,GADK,EAELC,SAFK,EAGF;EACH,OAAOC,MAAM,CAACC,IAAP,CAAYH,GAAZ,EACJI,IADI,CACCH,SADD,EAEJI,MAFI,CAGH,CAACC,GAAD,EAAMC,GAAN,MAAe,EACb,GAAGD,GADU;IAEb,CAACC,GAAD,GAAOP,GAAG,CAACO,GAAD;EAFG,CAAf,CAHG,EAOH,EAPG,CAAP;AASD;;AAEM,SAASC,gBAAT,CACLR,GADK,EAELS,KAFK,EAGF;EACH,MAAMC,MAAM,GAAGC,aAAa,CAACT,MAAM,CAACC,IAAP,CAAYH,GAAZ,CAAD,EAAmBS,KAAnB,CAA5B;EAEA,OAAOC,MAAM,CAACL,MAAP,CACL,CAACC,GAAD,EAAMC,GAAN,MAAe,EACb,GAAGD,GADU;IAEb,CAACC,GAAD,GAAOP,GAAG,CAACO,GAAD;EAFG,CAAf,CADK,EAKL,EALK,CAAP;AAOD;;AAEM,SAASI,aAAT,CAAuBX,GAAvB,EAAsCS,KAAtC,EAAiE;EACtE,MAAMG,UAAU,GAAG,CAAC,GAAG,IAAIC,GAAJ,CAAQJ,KAAK,CAACK,MAAN,CAAad,GAAb,CAAR,CAAJ,CAAnB;EACA,MAAMU,MAAgB,GAAG,EAAzB;;EAEA,OAAOE,UAAU,CAACG,MAAlB,EAA0B;IACxB,MAAMR,GAAG,GAAGK,UAAU,CAACI,KAAX,EAAZ;IACA,MAAMC,KAAK,GAAGjB,GAAG,CAACkB,OAAJ,CAAYX,GAAZ,CAAd;;IACA,IAAIU,KAAK,GAAG,CAAC,CAAb,EAAgB;MACd,MAAM,CAACE,IAAD,IAASnB,GAAG,CAACoB,MAAJ,CAAWH,KAAX,EAAkB,CAAlB,CAAf;MACAP,MAAM,CAACW,IAAP,CAAYF,IAAZ;IACD;EACF;;EAED,OAAOT,MAAP;AACD;;AAEM,MAAMY,iBAAiB,GAAG,CAACC,CAAD,EAAYC,CAAZ,KAA0B;EACzD,IAAID,CAAC,GAAGC,CAAR,EAAW,OAAO,CAAP;EACX,IAAID,CAAC,GAAGC,CAAR,EAAW,OAAO,CAAC,CAAR;EACX,OAAO,CAAP;AACD,CAJM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"versions.js","names":["gteSdkVersion","exp","sdkVersion","semver","gte","Error","lteSdkVersion","lte"],"sources":["../../src/utils/versions.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\nimport semver from 'semver';\n\nexport function gteSdkVersion(exp: Pick<ExpoConfig, 'sdkVersion'>, sdkVersion: string): boolean {\n if (!exp.sdkVersion) {\n return false;\n }\n\n if (exp.sdkVersion === 'UNVERSIONED') {\n return true;\n }\n\n try {\n return semver.gte(exp.sdkVersion, sdkVersion);\n } catch {\n throw new Error(`${exp.sdkVersion} is not a valid version. Must be in the form of x.y.z`);\n }\n}\n\nexport function lteSdkVersion(exp: Pick<ExpoConfig, 'sdkVersion'>, sdkVersion: string): boolean {\n if (!exp.sdkVersion) {\n return false;\n }\n\n if (exp.sdkVersion === 'UNVERSIONED') {\n return false;\n }\n\n try {\n return semver.lte(exp.sdkVersion, sdkVersion);\n } catch {\n throw new Error(`${exp.sdkVersion} is not a valid version. Must be in the form of x.y.z`);\n }\n}\n"],"mappings":";;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;AAEO,SAASA,aAAT,CAAuBC,GAAvB,EAA4DC,UAA5D,EAAyF;EAC9F,IAAI,CAACD,GAAG,CAACC,UAAT,EAAqB;IACnB,OAAO,KAAP;EACD;;EAED,IAAID,GAAG,CAACC,UAAJ,KAAmB,aAAvB,EAAsC;IACpC,OAAO,IAAP;EACD;;EAED,IAAI;IACF,OAAOC,iBAAA,CAAOC,GAAP,CAAWH,GAAG,CAACC,UAAf,EAA2BA,UAA3B,CAAP;EACD,CAFD,CAEE,MAAM;IACN,MAAM,IAAIG,KAAJ,CAAW,GAAEJ,GAAG,CAACC,UAAW,uDAA5B,CAAN;EACD;AACF;;AAEM,SAASI,aAAT,CAAuBL,GAAvB,EAA4DC,UAA5D,EAAyF;EAC9F,IAAI,CAACD,GAAG,CAACC,UAAT,EAAqB;IACnB,OAAO,KAAP;EACD;;EAED,IAAID,GAAG,CAACC,UAAJ,KAAmB,aAAvB,EAAsC;IACpC,OAAO,KAAP;EACD;;EAED,IAAI;IACF,OAAOC,iBAAA,CAAOI,GAAP,CAAWN,GAAG,CAACC,UAAf,EAA2BA,UAA3B,CAAP;EACD,CAFD,CAEE,MAAM;IACN,MAAM,IAAIG,KAAJ,CAAW,GAAEJ,GAAG,CAACC,UAAW,uDAA5B,CAAN;EACD;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/config-plugins",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "A library for Expo config plugins",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/expo/expo
|
|
17
|
-
"directory": "packages/config-plugins"
|
|
16
|
+
"url": "https://github.com/expo/expo.git",
|
|
17
|
+
"directory": "packages/@expo/config-plugins"
|
|
18
18
|
},
|
|
19
19
|
"keywords": [
|
|
20
20
|
"json",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"bugs": {
|
|
27
|
-
"url": "https://github.com/expo/expo
|
|
27
|
+
"url": "https://github.com/expo/expo/issues"
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://docs.expo.dev/guides/config-plugins/",
|
|
30
30
|
"files": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"paths"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@expo/config-types": "^
|
|
35
|
+
"@expo/config-types": "^46.0.0",
|
|
36
36
|
"@expo/json-file": "8.2.36",
|
|
37
37
|
"@expo/plist": "0.0.18",
|
|
38
38
|
"@expo/sdk-runtime-versions": "^1.0.0",
|
|
@@ -55,5 +55,6 @@
|
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
58
|
-
}
|
|
58
|
+
},
|
|
59
|
+
"gitHead": "093d340c3fd67ff4375af3a471c7d044aee893c9"
|
|
59
60
|
}
|