@expo/config-plugins 9.0.11 → 9.0.12
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/ios/BuildScheme.js
CHANGED
|
@@ -77,7 +77,8 @@ function getRunnableSchemesFromXcodeproj(projectRoot, {
|
|
|
77
77
|
}
|
|
78
78
|
async function readSchemeAsync(projectRoot, scheme) {
|
|
79
79
|
const allSchemePaths = (0, _Paths().findSchemePaths)(projectRoot);
|
|
80
|
-
|
|
80
|
+
// NOTE(cedric): test on POSIX or UNIX separators, where UNIX needs to be double-escaped in the template literal and regex
|
|
81
|
+
const re = new RegExp(`[\\\\/]${scheme}.xcscheme`, 'i');
|
|
81
82
|
const schemePath = allSchemePaths.find(i => re.exec(i));
|
|
82
83
|
if (schemePath) {
|
|
83
84
|
return await (0, _XML().readXMLAsync)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuildScheme.js","names":["_Paths","data","require","_Target","_Xcodeproj","_XML","getSchemesFromXcodeproj","projectRoot","findSchemeNames","getRunnableSchemesFromXcodeproj","configuration","project","getPbxproj","findSignableTargets","map","target","osType","type","unquote","productType","TargetType","WATCH","startsWith","APPLICATION","xcConfigurationList","hash","objects","XCConfigurationList","buildConfigurationList","buildConfiguration","buildConfigurations","find","value","comment","xcBuildConfiguration","XCBuildConfiguration","buildSdkRoot","buildSettings","SDKROOT","name","readSchemeAsync","scheme","allSchemePaths","findSchemePaths","re","RegExp","schemePath","i","exec","readXMLAsync","path","Error","getApplicationTargetNameForSchemeAsync","schemeXML","buildActionEntry","Scheme","BuildAction","BuildActionEntries","BuildActionEntry","targetName","length","getBlueprintName","entry","BuildableReference","BuildableName","endsWith","getArchiveBuildConfigurationForSchemeAsync","ArchiveAction","BlueprintName"],"sources":["../../src/ios/BuildScheme.ts"],"sourcesContent":["import { findSchemeNames, findSchemePaths } from './Paths';\nimport { findSignableTargets, TargetType } from './Target';\nimport { getPbxproj, unquote } from './utils/Xcodeproj';\nimport { readXMLAsync } from '../utils/XML';\n\ninterface SchemeXML {\n Scheme?: {\n BuildAction?: {\n BuildActionEntries?: {\n BuildActionEntry?: BuildActionEntryType[];\n }[];\n }[];\n ArchiveAction?: {\n $?: {\n buildConfiguration?: string;\n };\n }[];\n };\n}\n\ninterface BuildActionEntryType {\n BuildableReference?: {\n $?: {\n BlueprintName?: string;\n BuildableName?: string;\n };\n }[];\n}\n\nexport function getSchemesFromXcodeproj(projectRoot: string): string[] {\n return findSchemeNames(projectRoot);\n}\n\nexport function getRunnableSchemesFromXcodeproj(\n projectRoot: string,\n { configuration = 'Debug' }: { configuration?: 'Debug' | 'Release' } = {}\n): { name: string; osType: string; type: string }[] {\n const project = getPbxproj(projectRoot);\n\n return findSignableTargets(project).map(([, target]) => {\n let osType = 'iOS';\n const type = unquote(target.productType);\n\n if (type === TargetType.WATCH) {\n osType = 'watchOS';\n } else if (\n // (apps) com.apple.product-type.application\n // (app clips) com.apple.product-type.application.on-demand-install-capable\n // NOTE(EvanBacon): This matches against `watchOS` as well so we check for watch first.\n type.startsWith(TargetType.APPLICATION)\n ) {\n // Attempt to resolve the platform SDK for each target so we can filter devices.\n const xcConfigurationList =\n project.hash.project.objects.XCConfigurationList[target.buildConfigurationList];\n\n if (xcConfigurationList) {\n const buildConfiguration =\n xcConfigurationList.buildConfigurations.find(\n (value: { comment: string; value: string }) => value.comment === configuration\n ) || xcConfigurationList.buildConfigurations[0];\n if (buildConfiguration?.value) {\n const xcBuildConfiguration =\n project.hash.project.objects.XCBuildConfiguration?.[buildConfiguration.value];\n\n const buildSdkRoot = xcBuildConfiguration.buildSettings.SDKROOT;\n if (\n buildSdkRoot === 'appletvos' ||\n 'TVOS_DEPLOYMENT_TARGET' in xcBuildConfiguration.buildSettings\n ) {\n // Is a TV app...\n osType = 'tvOS';\n } else if (buildSdkRoot === 'iphoneos') {\n osType = 'iOS';\n }\n }\n }\n }\n\n return {\n name: unquote(target.name),\n osType,\n type: unquote(target.productType),\n };\n });\n}\n\nasync function readSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<SchemeXML | undefined> {\n const allSchemePaths = findSchemePaths(projectRoot);\n const re = new RegExp(
|
|
1
|
+
{"version":3,"file":"BuildScheme.js","names":["_Paths","data","require","_Target","_Xcodeproj","_XML","getSchemesFromXcodeproj","projectRoot","findSchemeNames","getRunnableSchemesFromXcodeproj","configuration","project","getPbxproj","findSignableTargets","map","target","osType","type","unquote","productType","TargetType","WATCH","startsWith","APPLICATION","xcConfigurationList","hash","objects","XCConfigurationList","buildConfigurationList","buildConfiguration","buildConfigurations","find","value","comment","xcBuildConfiguration","XCBuildConfiguration","buildSdkRoot","buildSettings","SDKROOT","name","readSchemeAsync","scheme","allSchemePaths","findSchemePaths","re","RegExp","schemePath","i","exec","readXMLAsync","path","Error","getApplicationTargetNameForSchemeAsync","schemeXML","buildActionEntry","Scheme","BuildAction","BuildActionEntries","BuildActionEntry","targetName","length","getBlueprintName","entry","BuildableReference","BuildableName","endsWith","getArchiveBuildConfigurationForSchemeAsync","ArchiveAction","BlueprintName"],"sources":["../../src/ios/BuildScheme.ts"],"sourcesContent":["import { findSchemeNames, findSchemePaths } from './Paths';\nimport { findSignableTargets, TargetType } from './Target';\nimport { getPbxproj, unquote } from './utils/Xcodeproj';\nimport { readXMLAsync } from '../utils/XML';\n\ninterface SchemeXML {\n Scheme?: {\n BuildAction?: {\n BuildActionEntries?: {\n BuildActionEntry?: BuildActionEntryType[];\n }[];\n }[];\n ArchiveAction?: {\n $?: {\n buildConfiguration?: string;\n };\n }[];\n };\n}\n\ninterface BuildActionEntryType {\n BuildableReference?: {\n $?: {\n BlueprintName?: string;\n BuildableName?: string;\n };\n }[];\n}\n\nexport function getSchemesFromXcodeproj(projectRoot: string): string[] {\n return findSchemeNames(projectRoot);\n}\n\nexport function getRunnableSchemesFromXcodeproj(\n projectRoot: string,\n { configuration = 'Debug' }: { configuration?: 'Debug' | 'Release' } = {}\n): { name: string; osType: string; type: string }[] {\n const project = getPbxproj(projectRoot);\n\n return findSignableTargets(project).map(([, target]) => {\n let osType = 'iOS';\n const type = unquote(target.productType);\n\n if (type === TargetType.WATCH) {\n osType = 'watchOS';\n } else if (\n // (apps) com.apple.product-type.application\n // (app clips) com.apple.product-type.application.on-demand-install-capable\n // NOTE(EvanBacon): This matches against `watchOS` as well so we check for watch first.\n type.startsWith(TargetType.APPLICATION)\n ) {\n // Attempt to resolve the platform SDK for each target so we can filter devices.\n const xcConfigurationList =\n project.hash.project.objects.XCConfigurationList[target.buildConfigurationList];\n\n if (xcConfigurationList) {\n const buildConfiguration =\n xcConfigurationList.buildConfigurations.find(\n (value: { comment: string; value: string }) => value.comment === configuration\n ) || xcConfigurationList.buildConfigurations[0];\n if (buildConfiguration?.value) {\n const xcBuildConfiguration =\n project.hash.project.objects.XCBuildConfiguration?.[buildConfiguration.value];\n\n const buildSdkRoot = xcBuildConfiguration.buildSettings.SDKROOT;\n if (\n buildSdkRoot === 'appletvos' ||\n 'TVOS_DEPLOYMENT_TARGET' in xcBuildConfiguration.buildSettings\n ) {\n // Is a TV app...\n osType = 'tvOS';\n } else if (buildSdkRoot === 'iphoneos') {\n osType = 'iOS';\n }\n }\n }\n }\n\n return {\n name: unquote(target.name),\n osType,\n type: unquote(target.productType),\n };\n });\n}\n\nasync function readSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<SchemeXML | undefined> {\n const allSchemePaths = findSchemePaths(projectRoot);\n // NOTE(cedric): test on POSIX or UNIX separators, where UNIX needs to be double-escaped in the template literal and regex\n const re = new RegExp(`[\\\\\\\\/]${scheme}.xcscheme`, 'i');\n const schemePath = allSchemePaths.find((i) => re.exec(i));\n if (schemePath) {\n return (await readXMLAsync({ path: schemePath })) as unknown as SchemeXML | undefined;\n } else {\n throw new Error(`scheme '${scheme}' does not exist, make sure it's marked as shared`);\n }\n}\n\nexport async function getApplicationTargetNameForSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<string> {\n const schemeXML = await readSchemeAsync(projectRoot, scheme);\n const buildActionEntry =\n schemeXML?.Scheme?.BuildAction?.[0]?.BuildActionEntries?.[0]?.BuildActionEntry;\n const targetName =\n buildActionEntry?.length === 1\n ? getBlueprintName(buildActionEntry[0])\n : getBlueprintName(\n buildActionEntry?.find((entry) => {\n return entry.BuildableReference?.[0]?.['$']?.BuildableName?.endsWith('.app');\n })\n );\n if (!targetName) {\n throw new Error(`${scheme}.xcscheme seems to be corrupted`);\n }\n return targetName;\n}\n\nexport async function getArchiveBuildConfigurationForSchemeAsync(\n projectRoot: string,\n scheme: string\n): Promise<string> {\n const schemeXML = await readSchemeAsync(projectRoot, scheme);\n const buildConfiguration = schemeXML?.Scheme?.ArchiveAction?.[0]?.['$']?.buildConfiguration;\n if (!buildConfiguration) {\n throw new Error(`${scheme}.xcscheme seems to be corrupted`);\n }\n return buildConfiguration;\n}\n\nfunction getBlueprintName(entry?: BuildActionEntryType): string | undefined {\n return entry?.BuildableReference?.[0]?.['$']?.BlueprintName;\n}\n"],"mappings":";;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,KAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,IAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AA0BO,SAASK,uBAAuBA,CAACC,WAAmB,EAAY;EACrE,OAAO,IAAAC,wBAAe,EAACD,WA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,CAAC,CAAC,GAAG,GAAG,CAAC,EAAEC,aAAa,EAAEC,QAAQ,CAAC,MAAM,CAAC;EAC9E,CAAC,CACH,CAAC;EACP,IAAI,CAACN,UAAU,EAAE;IACf,MAAM,IAAIR,KAAK,CAAC,GAAGV,MAAM,iCAAiC,CAAC;EAC7D;EACA,OAAOkB,UAAU;AACnB;AAEO,eAAeO,0CAA0CA,CAC9D3D,WAAmB,EACnBkC,MAAc,EACG;EACjB,MAAMY,SAAS,GAAG,MAAMb,eAAe,CAACjC,WAAW,EAAEkC,MAAM,CAAC;EAC5D,MAAMZ,kBAAkB,GAAGwB,SAAS,EAAEE,MAAM,EAAEY,aAAa,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,EAAEtC,kBAAkB;EAC3F,IAAI,CAACA,kBAAkB,EAAE;IACvB,MAAM,IAAIsB,KAAK,CAAC,GAAGV,MAAM,iCAAiC,CAAC;EAC7D;EACA,OAAOZ,kBAAkB;AAC3B;AAEA,SAASgC,gBAAgBA,CAACC,KAA4B,EAAsB;EAC1E,OAAOA,KAAK,EAAEC,kBAAkB,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,EAAEK,aAAa;AAC7D","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/config-plugins",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.12",
|
|
4
4
|
"description": "A library for Expo config plugins",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "9d4e373d6a0feaaba5df625f0b2eb3a60be16616"
|
|
61
61
|
}
|