@expo/config-plugins 7.7.0 → 7.8.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.
@@ -67,9 +67,9 @@ function _string() {
67
67
  };
68
68
  return data;
69
69
  }
70
- function _withDangerousMod() {
71
- const data = require("../plugins/withDangerousMod");
72
- _withDangerousMod = function () {
70
+ function _iosPlugins() {
71
+ const data = require("../plugins/ios-plugins");
72
+ _iosPlugins = function () {
73
73
  return data;
74
74
  };
75
75
  return data;
@@ -78,13 +78,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
78
78
  const withBundleIdentifier = (config, {
79
79
  bundleIdentifier
80
80
  }) => {
81
- return (0, _withDangerousMod().withDangerousMod)(config, ['ios', async config => {
81
+ return (0, _iosPlugins().withXcodeProject)(config, async config => {
82
82
  var _config$ios;
83
83
  const bundleId = bundleIdentifier !== null && bundleIdentifier !== void 0 ? bundleIdentifier : (_config$ios = config.ios) === null || _config$ios === void 0 ? void 0 : _config$ios.bundleIdentifier;
84
- (0, _assert().default)(bundleId, '`bundleIdentifier` must be defined in the app config (`expo.ios.bundleIdentifier`) or passed to the plugin `withBundleIdentifier`.');
85
- await setBundleIdentifierForPbxproj(config.modRequest.projectRoot, bundleId);
84
+ // Should never happen.
85
+ (0, _assert().default)(bundleId, '`bundleIdentifier` must be defined in the app config (`ios.bundleIdentifier`) or passed to the plugin `withBundleIdentifier`.');
86
+ config.modResults = updateBundleIdentifierForPbxprojObject(config.modResults, bundleId, false);
86
87
  return config;
87
- }]);
88
+ });
88
89
  };
89
90
  exports.withBundleIdentifier = withBundleIdentifier;
90
91
  function getBundleIdentifier(config) {
@@ -147,15 +148,7 @@ function getProductBundleIdentifierFromBuildConfiguration(xcBuildConfiguration)
147
148
  const bundleIdentifierRaw = xcBuildConfiguration.buildSettings.PRODUCT_BUNDLE_IDENTIFIER;
148
149
  if (bundleIdentifierRaw) {
149
150
  const bundleIdentifier = (0, _string().trimQuotes)(bundleIdentifierRaw);
150
- // it's possible to use interpolation for the bundle identifier
151
- // the most common case is when the last part of the id is set to `$(PRODUCT_NAME:rfc1034identifier)`
152
- // in this case, PRODUCT_NAME should be replaced with its value
153
- // the `rfc1034identifier` modifier replaces all non-alphanumeric characters with dashes
154
- const bundleIdentifierParts = bundleIdentifier.split('.');
155
- if (bundleIdentifierParts[bundleIdentifierParts.length - 1] === '$(PRODUCT_NAME:rfc1034identifier)' && xcBuildConfiguration.buildSettings.PRODUCT_NAME) {
156
- bundleIdentifierParts[bundleIdentifierParts.length - 1] = xcBuildConfiguration.buildSettings.PRODUCT_NAME.replace(/[^a-zA-Z0-9]/g, '-');
157
- }
158
- return bundleIdentifierParts.join('.');
151
+ return (0, _Xcodeproj().resolveXcodeBuildSetting)(bundleIdentifier, setting => xcBuildConfiguration.buildSettings[setting]);
159
152
  } else {
160
153
  return null;
161
154
  }
@@ -171,6 +164,17 @@ function getProductBundleIdentifierFromBuildConfiguration(xcBuildConfiguration)
171
164
  function updateBundleIdentifierForPbxproj(pbxprojPath, bundleIdentifier, updateProductName = true) {
172
165
  const project = _xcode().default.project(pbxprojPath);
173
166
  project.parseSync();
167
+ _fs().default.writeFileSync(pbxprojPath, updateBundleIdentifierForPbxprojObject(project, bundleIdentifier, updateProductName).writeSync());
168
+ }
169
+
170
+ /**
171
+ * Updates the bundle identifier for a given pbxproj
172
+ *
173
+ * @param {string} project pbxproj file
174
+ * @param {string} bundleIdentifier Bundle identifier to set in the pbxproj
175
+ * @param {boolean} [updateProductName=true] Whether to update PRODUCT_NAME
176
+ */
177
+ function updateBundleIdentifierForPbxprojObject(project, bundleIdentifier, updateProductName = true) {
174
178
  const [, nativeTarget] = (0, _Target().findFirstNativeTarget)(project);
175
179
  (0, _Xcodeproj().getBuildConfigurationsForListId)(project, nativeTarget.buildConfigurationList).forEach(([, item]) => {
176
180
  if (item.buildSettings.PRODUCT_BUNDLE_IDENTIFIER === bundleIdentifier) {
@@ -184,7 +188,7 @@ function updateBundleIdentifierForPbxproj(pbxprojPath, bundleIdentifier, updateP
184
188
  }
185
189
  }
186
190
  });
187
- _fs().default.writeFileSync(pbxprojPath, project.writeSync());
191
+ return project;
188
192
  }
189
193
 
190
194
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"BundleIdentifier.js","names":["_plist","data","_interopRequireDefault","require","_assert","_fs","_xcode","_Paths","_Target","_Xcodeproj","_string","_withDangerousMod","obj","__esModule","default","withBundleIdentifier","config","bundleIdentifier","withDangerousMod","_config$ios","bundleId","ios","assert","setBundleIdentifierForPbxproj","modRequest","projectRoot","exports","getBundleIdentifier","_config$ios$bundleIde","_config$ios2","setBundleIdentifier","infoPlist","CFBundleIdentifier","getBundleIdentifierFromPbxproj","targetName","buildConfiguration","pbxprojPath","getPBXProjectPath","project","xcode","parseSync","xcBuildConfiguration","getXCBuildConfigurationFromPbxproj","getProductBundleIdentifierFromBuildConfiguration","bundleIdentifierRaw","buildSettings","PRODUCT_BUNDLE_IDENTIFIER","trimQuotes","bundleIdentifierParts","split","length","PRODUCT_NAME","replace","join","updateBundleIdentifierForPbxproj","updateProductName","nativeTarget","findFirstNativeTarget","getBuildConfigurationsForListId","buildConfigurationList","forEach","item","productName","pop","includes","fs","writeFileSync","writeSync","pbxprojPaths","getAllPBXProjectPaths","defaultBundleId","resetAllPlistBundleIdentifiers","infoPlistPaths","getAllInfoPlistPaths","plistPath","resetPlistBundleIdentifier","rawPlist","readFileSync","plistObject","plist","parse","format","pretty","indent","xml","build"],"sources":["../../src/ios/BundleIdentifier.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport plist, { PlistObject } from '@expo/plist';\nimport assert from 'assert';\nimport fs from 'fs';\nimport xcode, { XCBuildConfiguration } from 'xcode';\n\nimport { InfoPlist } from './IosConfig.types';\nimport { getAllInfoPlistPaths, getAllPBXProjectPaths, getPBXProjectPath } from './Paths';\nimport { findFirstNativeTarget, getXCBuildConfigurationFromPbxproj } from './Target';\nimport { ConfigurationSectionEntry, getBuildConfigurationsForListId } from './utils/Xcodeproj';\nimport { trimQuotes } from './utils/string';\nimport { ConfigPlugin } from '../Plugin.types';\nimport { withDangerousMod } from '../plugins/withDangerousMod';\n\nexport const withBundleIdentifier: ConfigPlugin<{ bundleIdentifier?: string }> = (\n config,\n { bundleIdentifier }\n) => {\n return withDangerousMod(config, [\n 'ios',\n async (config) => {\n const bundleId = bundleIdentifier ?? config.ios?.bundleIdentifier;\n assert(\n bundleId,\n '`bundleIdentifier` must be defined in the app config (`expo.ios.bundleIdentifier`) or passed to the plugin `withBundleIdentifier`.'\n );\n await setBundleIdentifierForPbxproj(config.modRequest.projectRoot, bundleId!);\n return config;\n },\n ]);\n};\n\nfunction getBundleIdentifier(config: Pick<ExpoConfig, 'ios'>): string | null {\n return config.ios?.bundleIdentifier ?? null;\n}\n\n/**\n * In Turtle v1 we set the bundleIdentifier directly on Info.plist rather\n * than in pbxproj\n */\nfunction setBundleIdentifier(config: ExpoConfig, infoPlist: InfoPlist): InfoPlist {\n const bundleIdentifier = getBundleIdentifier(config);\n\n if (!bundleIdentifier) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n CFBundleIdentifier: bundleIdentifier,\n };\n}\n\n/**\n * Gets the bundle identifier defined in the Xcode project found in the project directory.\n *\n * A bundle identifier is stored as a value in XCBuildConfiguration entry.\n * Those entries exist for every pair (build target, build configuration).\n * Unless target name is passed, the first target defined in the pbxproj is used\n * (to keep compatibility with the inaccurate legacy implementation of this function).\n * The build configuration is usually 'Release' or 'Debug'. However, it could be any arbitrary string.\n * Defaults to 'Release'.\n *\n * @param {string} projectRoot Path to project root containing the ios directory\n * @param {string} targetName Target name\n * @param {string} buildConfiguration Build configuration. Defaults to 'Release'.\n * @returns {string | null} bundle identifier of the Xcode project or null if the project is not configured\n */\nfunction getBundleIdentifierFromPbxproj(\n projectRoot: string,\n {\n targetName,\n buildConfiguration = 'Release',\n }: { targetName?: string; buildConfiguration?: string } = {}\n): string | null {\n let pbxprojPath: string;\n try {\n pbxprojPath = getPBXProjectPath(projectRoot);\n } catch {\n return null;\n }\n const project = xcode.project(pbxprojPath);\n project.parseSync();\n\n const xcBuildConfiguration = getXCBuildConfigurationFromPbxproj(project, {\n targetName,\n buildConfiguration,\n });\n if (!xcBuildConfiguration) {\n return null;\n }\n return getProductBundleIdentifierFromBuildConfiguration(xcBuildConfiguration);\n}\n\nfunction getProductBundleIdentifierFromBuildConfiguration(\n xcBuildConfiguration: XCBuildConfiguration\n): string | null {\n const bundleIdentifierRaw = xcBuildConfiguration.buildSettings.PRODUCT_BUNDLE_IDENTIFIER;\n if (bundleIdentifierRaw) {\n const bundleIdentifier = trimQuotes(bundleIdentifierRaw);\n // it's possible to use interpolation for the bundle identifier\n // the most common case is when the last part of the id is set to `$(PRODUCT_NAME:rfc1034identifier)`\n // in this case, PRODUCT_NAME should be replaced with its value\n // the `rfc1034identifier` modifier replaces all non-alphanumeric characters with dashes\n const bundleIdentifierParts = bundleIdentifier.split('.');\n if (\n bundleIdentifierParts[bundleIdentifierParts.length - 1] ===\n '$(PRODUCT_NAME:rfc1034identifier)' &&\n xcBuildConfiguration.buildSettings.PRODUCT_NAME\n ) {\n bundleIdentifierParts[bundleIdentifierParts.length - 1] =\n xcBuildConfiguration.buildSettings.PRODUCT_NAME.replace(/[^a-zA-Z0-9]/g, '-');\n }\n return bundleIdentifierParts.join('.');\n } else {\n return null;\n }\n}\n\n/**\n * Updates the bundle identifier for a given pbxproj\n *\n * @param {string} pbxprojPath Path to pbxproj file\n * @param {string} bundleIdentifier Bundle identifier to set in the pbxproj\n * @param {boolean} [updateProductName=true] Whether to update PRODUCT_NAME\n */\nfunction updateBundleIdentifierForPbxproj(\n pbxprojPath: string,\n bundleIdentifier: string,\n updateProductName: boolean = true\n): void {\n const project = xcode.project(pbxprojPath);\n project.parseSync();\n\n const [, nativeTarget] = findFirstNativeTarget(project);\n\n getBuildConfigurationsForListId(project, nativeTarget.buildConfigurationList).forEach(\n ([, item]: ConfigurationSectionEntry) => {\n if (item.buildSettings.PRODUCT_BUNDLE_IDENTIFIER === bundleIdentifier) {\n return;\n }\n\n item.buildSettings.PRODUCT_BUNDLE_IDENTIFIER = `\"${bundleIdentifier}\"`;\n\n if (updateProductName) {\n const productName = bundleIdentifier.split('.').pop();\n if (!productName?.includes('$')) {\n item.buildSettings.PRODUCT_NAME = productName;\n }\n }\n }\n );\n fs.writeFileSync(pbxprojPath, project.writeSync());\n}\n\n/**\n * Updates the bundle identifier for pbx projects inside the ios directory of the given project root\n *\n * @param {string} projectRoot Path to project root containing the ios directory\n * @param {string} bundleIdentifier Desired bundle identifier\n * @param {boolean} [updateProductName=true] Whether to update PRODUCT_NAME\n */\nfunction setBundleIdentifierForPbxproj(\n projectRoot: string,\n bundleIdentifier: string,\n updateProductName: boolean = true\n): void {\n // Get all pbx projects in the ${projectRoot}/ios directory\n let pbxprojPaths: string[] = [];\n try {\n pbxprojPaths = getAllPBXProjectPaths(projectRoot);\n } catch {}\n\n for (const pbxprojPath of pbxprojPaths) {\n updateBundleIdentifierForPbxproj(pbxprojPath, bundleIdentifier, updateProductName);\n }\n}\n\n/**\n * Reset bundle identifier field in Info.plist to use PRODUCT_BUNDLE_IDENTIFIER, as recommended by Apple.\n */\n\nconst defaultBundleId = '$(PRODUCT_BUNDLE_IDENTIFIER)';\n\nfunction resetAllPlistBundleIdentifiers(projectRoot: string): void {\n const infoPlistPaths = getAllInfoPlistPaths(projectRoot);\n\n for (const plistPath of infoPlistPaths) {\n resetPlistBundleIdentifier(plistPath);\n }\n}\n\nfunction resetPlistBundleIdentifier(plistPath: string): void {\n const rawPlist = fs.readFileSync(plistPath, 'utf8');\n const plistObject = plist.parse(rawPlist) as PlistObject;\n\n if (plistObject.CFBundleIdentifier) {\n if (plistObject.CFBundleIdentifier === defaultBundleId) return;\n\n // attempt to match default Info.plist format\n const format = { pretty: true, indent: `\\t` };\n\n const xml = plist.build(\n {\n ...plistObject,\n CFBundleIdentifier: defaultBundleId,\n },\n format\n );\n\n if (xml !== rawPlist) {\n fs.writeFileSync(plistPath, xml);\n }\n }\n}\n\nexport {\n getBundleIdentifier,\n setBundleIdentifier,\n getBundleIdentifierFromPbxproj,\n updateBundleIdentifierForPbxproj,\n setBundleIdentifierForPbxproj,\n resetAllPlistBundleIdentifiers,\n resetPlistBundleIdentifier,\n};\n"],"mappings":";;;;;;;;;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,IAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,GAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,OAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,MAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAM,OAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,QAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,OAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,WAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,UAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,QAAA;EAAA,MAAAT,IAAA,GAAAE,OA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C3B;EACN;EACA,IAAIa,YAAsB,GAAG,EAAE;EAC/B,IAAI;IACFA,YAAY,GAAG,IAAAC,8BAAqB,EAAC5C,WAAW,CAAC;EACnD,CAAC,CAAC,MAAM,CAAC;EAET,KAAK,MAAMW,WAAW,IAAIgC,YAAY,EAAE;IACtCd,gCAAgC,CAAClB,WAAW,EAAEnB,gBAAgB,EAAEsC,iBAAiB,CAAC;EACpF;AACF;;AAEA;AACA;AACA;;AAEA,MAAMe,eAAe,GAAG,8BAA8B;AAEtD,SAASC,8BAA8BA,CAAC9C,WAAmB,EAAQ;EACjE,MAAM+C,cAAc,GAAG,IAAAC,6BAAoB,EAAChD,WAAW,CAAC;EAExD,KAAK,MAAMiD,SAAS,IAAIF,cAAc,EAAE;IACtCG,0BAA0B,CAACD,SAAS,CAAC;EACvC;AACF;AAEA,SAASC,0BAA0BA,CAACD,SAAiB,EAAQ;EAC3D,MAAME,QAAQ,GAAGX,aAAE,CAACY,YAAY,CAACH,SAAS,EAAE,MAAM,CAAC;EACnD,MAAMI,WAAW,GAAGC,gBAAK,CAACC,KAAK,CAACJ,QAAQ,CAAgB;EAExD,IAAIE,WAAW,CAAC9C,kBAAkB,EAAE;IAClC,IAAI8C,WAAW,CAAC9C,kBAAkB,KAAKsC,eAAe,EAAE;;IAExD;IACA,MAAMW,MAAM,GAAG;MAAEC,MAAM,EAAE,IAAI;MAAEC,MAAM,EAAG;IAAI,CAAC;IAE7C,MAAMC,GAAG,GAAGL,gBAAK,CAACM,KAAK,CACrB;MACE,GAAGP,WAAW;MACd9C,kBAAkB,EAAEsC;IACtB,CAAC,EACDW,MAAM,CACP;IAED,IAAIG,GAAG,KAAKR,QAAQ,EAAE;MACpBX,aAAE,CAACC,aAAa,CAACQ,SAAS,EAAEU,GAAG,CAAC;IAClC;EACF;AACF"}
1
+ {"version":3,"file":"BundleIdentifier.js","names":["_plist","data","_interopRequireDefault","require","_assert","_fs","_xcode","_Paths","_Target","_Xcodeproj","_string","_iosPlugins","obj","__esModule","default","withBundleIdentifier","config","bundleIdentifier","withXcodeProject","_config$ios","bundleId","ios","assert","modResults","updateBundleIdentifierForPbxprojObject","exports","getBundleIdentifier","_config$ios$bundleIde","_config$ios2","setBundleIdentifier","infoPlist","CFBundleIdentifier","getBundleIdentifierFromPbxproj","projectRoot","targetName","buildConfiguration","pbxprojPath","getPBXProjectPath","project","xcode","parseSync","xcBuildConfiguration","getXCBuildConfigurationFromPbxproj","getProductBundleIdentifierFromBuildConfiguration","bundleIdentifierRaw","buildSettings","PRODUCT_BUNDLE_IDENTIFIER","trimQuotes","resolveXcodeBuildSetting","setting","updateBundleIdentifierForPbxproj","updateProductName","fs","writeFileSync","writeSync","nativeTarget","findFirstNativeTarget","getBuildConfigurationsForListId","buildConfigurationList","forEach","item","productName","split","pop","includes","PRODUCT_NAME","setBundleIdentifierForPbxproj","pbxprojPaths","getAllPBXProjectPaths","defaultBundleId","resetAllPlistBundleIdentifiers","infoPlistPaths","getAllInfoPlistPaths","plistPath","resetPlistBundleIdentifier","rawPlist","readFileSync","plistObject","plist","parse","format","pretty","indent","xml","build"],"sources":["../../src/ios/BundleIdentifier.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport plist, { PlistObject } from '@expo/plist';\nimport assert from 'assert';\nimport fs from 'fs';\nimport xcode, { XCBuildConfiguration } from 'xcode';\n\nimport { InfoPlist } from './IosConfig.types';\nimport { getAllInfoPlistPaths, getAllPBXProjectPaths, getPBXProjectPath } from './Paths';\nimport { findFirstNativeTarget, getXCBuildConfigurationFromPbxproj } from './Target';\nimport {\n ConfigurationSectionEntry,\n getBuildConfigurationsForListId,\n resolveXcodeBuildSetting,\n} from './utils/Xcodeproj';\nimport { trimQuotes } from './utils/string';\nimport { ConfigPlugin, XcodeProject } from '../Plugin.types';\nimport { withXcodeProject } from '../plugins/ios-plugins';\n\nexport const withBundleIdentifier: ConfigPlugin<{ bundleIdentifier?: string }> = (\n config,\n { bundleIdentifier }\n) => {\n return withXcodeProject(config, async (config) => {\n const bundleId = bundleIdentifier ?? config.ios?.bundleIdentifier;\n // Should never happen.\n assert(\n bundleId,\n '`bundleIdentifier` must be defined in the app config (`ios.bundleIdentifier`) or passed to the plugin `withBundleIdentifier`.'\n );\n\n config.modResults = updateBundleIdentifierForPbxprojObject(config.modResults, bundleId, false);\n\n return config;\n });\n};\n\nfunction getBundleIdentifier(config: Pick<ExpoConfig, 'ios'>): string | null {\n return config.ios?.bundleIdentifier ?? null;\n}\n\n/**\n * In Turtle v1 we set the bundleIdentifier directly on Info.plist rather\n * than in pbxproj\n */\nfunction setBundleIdentifier(config: ExpoConfig, infoPlist: InfoPlist): InfoPlist {\n const bundleIdentifier = getBundleIdentifier(config);\n\n if (!bundleIdentifier) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n CFBundleIdentifier: bundleIdentifier,\n };\n}\n\n/**\n * Gets the bundle identifier defined in the Xcode project found in the project directory.\n *\n * A bundle identifier is stored as a value in XCBuildConfiguration entry.\n * Those entries exist for every pair (build target, build configuration).\n * Unless target name is passed, the first target defined in the pbxproj is used\n * (to keep compatibility with the inaccurate legacy implementation of this function).\n * The build configuration is usually 'Release' or 'Debug'. However, it could be any arbitrary string.\n * Defaults to 'Release'.\n *\n * @param {string} projectRoot Path to project root containing the ios directory\n * @param {string} targetName Target name\n * @param {string} buildConfiguration Build configuration. Defaults to 'Release'.\n * @returns {string | null} bundle identifier of the Xcode project or null if the project is not configured\n */\nfunction getBundleIdentifierFromPbxproj(\n projectRoot: string,\n {\n targetName,\n buildConfiguration = 'Release',\n }: { targetName?: string; buildConfiguration?: string } = {}\n): string | null {\n let pbxprojPath: string;\n try {\n pbxprojPath = getPBXProjectPath(projectRoot);\n } catch {\n return null;\n }\n const project = xcode.project(pbxprojPath);\n project.parseSync();\n\n const xcBuildConfiguration = getXCBuildConfigurationFromPbxproj(project, {\n targetName,\n buildConfiguration,\n });\n if (!xcBuildConfiguration) {\n return null;\n }\n return getProductBundleIdentifierFromBuildConfiguration(xcBuildConfiguration);\n}\n\nfunction getProductBundleIdentifierFromBuildConfiguration(\n xcBuildConfiguration: XCBuildConfiguration\n): string | null {\n const bundleIdentifierRaw = xcBuildConfiguration.buildSettings.PRODUCT_BUNDLE_IDENTIFIER;\n if (bundleIdentifierRaw) {\n const bundleIdentifier = trimQuotes(bundleIdentifierRaw);\n return resolveXcodeBuildSetting(\n bundleIdentifier,\n (setting) => xcBuildConfiguration.buildSettings[setting] as string | undefined\n );\n } else {\n return null;\n }\n}\n\n/**\n * Updates the bundle identifier for a given pbxproj\n *\n * @param {string} pbxprojPath Path to pbxproj file\n * @param {string} bundleIdentifier Bundle identifier to set in the pbxproj\n * @param {boolean} [updateProductName=true] Whether to update PRODUCT_NAME\n */\nfunction updateBundleIdentifierForPbxproj(\n pbxprojPath: string,\n bundleIdentifier: string,\n updateProductName: boolean = true\n): void {\n const project = xcode.project(pbxprojPath);\n project.parseSync();\n fs.writeFileSync(\n pbxprojPath,\n updateBundleIdentifierForPbxprojObject(project, bundleIdentifier, updateProductName).writeSync()\n );\n}\n\n/**\n * Updates the bundle identifier for a given pbxproj\n *\n * @param {string} project pbxproj file\n * @param {string} bundleIdentifier Bundle identifier to set in the pbxproj\n * @param {boolean} [updateProductName=true] Whether to update PRODUCT_NAME\n */\nfunction updateBundleIdentifierForPbxprojObject(\n project: XcodeProject,\n bundleIdentifier: string,\n updateProductName: boolean = true\n) {\n const [, nativeTarget] = findFirstNativeTarget(project);\n\n getBuildConfigurationsForListId(project, nativeTarget.buildConfigurationList).forEach(\n ([, item]: ConfigurationSectionEntry) => {\n if (item.buildSettings.PRODUCT_BUNDLE_IDENTIFIER === bundleIdentifier) {\n return;\n }\n\n item.buildSettings.PRODUCT_BUNDLE_IDENTIFIER = `\"${bundleIdentifier}\"`;\n\n if (updateProductName) {\n const productName = bundleIdentifier.split('.').pop();\n if (!productName?.includes('$')) {\n item.buildSettings.PRODUCT_NAME = productName;\n }\n }\n }\n );\n return project;\n}\n\n/**\n * Updates the bundle identifier for pbx projects inside the ios directory of the given project root\n *\n * @param {string} projectRoot Path to project root containing the ios directory\n * @param {string} bundleIdentifier Desired bundle identifier\n * @param {boolean} [updateProductName=true] Whether to update PRODUCT_NAME\n */\nfunction setBundleIdentifierForPbxproj(\n projectRoot: string,\n bundleIdentifier: string,\n updateProductName: boolean = true\n): void {\n // Get all pbx projects in the ${projectRoot}/ios directory\n let pbxprojPaths: string[] = [];\n try {\n pbxprojPaths = getAllPBXProjectPaths(projectRoot);\n } catch {}\n\n for (const pbxprojPath of pbxprojPaths) {\n updateBundleIdentifierForPbxproj(pbxprojPath, bundleIdentifier, updateProductName);\n }\n}\n\n/**\n * Reset bundle identifier field in Info.plist to use PRODUCT_BUNDLE_IDENTIFIER, as recommended by Apple.\n */\n\nconst defaultBundleId = '$(PRODUCT_BUNDLE_IDENTIFIER)';\n\nfunction resetAllPlistBundleIdentifiers(projectRoot: string): void {\n const infoPlistPaths = getAllInfoPlistPaths(projectRoot);\n\n for (const plistPath of infoPlistPaths) {\n resetPlistBundleIdentifier(plistPath);\n }\n}\n\nfunction resetPlistBundleIdentifier(plistPath: string): void {\n const rawPlist = fs.readFileSync(plistPath, 'utf8');\n const plistObject = plist.parse(rawPlist) as PlistObject;\n\n if (plistObject.CFBundleIdentifier) {\n if (plistObject.CFBundleIdentifier === defaultBundleId) return;\n\n // attempt to match default Info.plist format\n const format = { pretty: true, indent: `\\t` };\n\n const xml = plist.build(\n {\n ...plistObject,\n CFBundleIdentifier: defaultBundleId,\n },\n format\n );\n\n if (xml !== rawPlist) {\n fs.writeFileSync(plistPath, xml);\n }\n }\n}\n\nexport {\n getBundleIdentifier,\n setBundleIdentifier,\n getBundleIdentifierFromPbxproj,\n updateBundleIdentifierForPbxproj,\n setBundleIdentifierForPbxproj,\n resetAllPlistBundleIdentifiers,\n resetPlistBundleIdentifier,\n};\n"],"mappings":";;;;;;;;;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,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AAAC,6BAAoB,EAACvC,WAAW,CAAC;EAExD,KAAK,MAAMwC,SAAS,IAAIF,cAAc,EAAE;IACtCG,0BAA0B,CAACD,SAAS,CAAC;EACvC;AACF;AAEA,SAASC,0BAA0BA,CAACD,SAAiB,EAAQ;EAC3D,MAAME,QAAQ,GAAGvB,aAAE,CAACwB,YAAY,CAACH,SAAS,EAAE,MAAM,CAAC;EACnD,MAAMI,WAAW,GAAGC,gBAAK,CAACC,KAAK,CAACJ,QAAQ,CAAgB;EAExD,IAAIE,WAAW,CAAC9C,kBAAkB,EAAE;IAClC,IAAI8C,WAAW,CAAC9C,kBAAkB,KAAKsC,eAAe,EAAE;;IAExD;IACA,MAAMW,MAAM,GAAG;MAAEC,MAAM,EAAE,IAAI;MAAEC,MAAM,EAAG;IAAI,CAAC;IAE7C,MAAMC,GAAG,GAAGL,gBAAK,CAACM,KAAK,CACrB;MACE,GAAGP,WAAW;MACd9C,kBAAkB,EAAEsC;IACtB,CAAC,EACDW,MAAM,CACP;IAED,IAAIG,GAAG,KAAKR,QAAQ,EAAE;MACpBvB,aAAE,CAACC,aAAa,CAACoB,SAAS,EAAEU,GAAG,CAAC;IAClC;EACF;AACF"}
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Copyright © 2023-present 650 Industries, Inc. (aka Expo)
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
1
7
  import { ExpoConfig } from '@expo/config-types';
2
8
  import xcode, { PBXFile, PBXGroup, PBXNativeTarget, PBXProject, XCBuildConfiguration, XCConfigurationList, XcodeProject } from 'xcode';
3
9
  export type ProjectSectionEntry = [string, PBXProject];
@@ -84,3 +90,4 @@ export declare function isBuildConfig([, sectionItem]: ConfigurationSectionEntry
84
90
  export declare function isNotTestHost([, sectionItem]: ConfigurationSectionEntry): boolean;
85
91
  export declare function isNotComment([key]: ConfigurationSectionEntry | ProjectSectionEntry | ConfigurationListEntry | NativeTargetSectionEntry): boolean;
86
92
  export declare function unquote(value: string): string;
93
+ export declare function resolveXcodeBuildSetting(value: string, lookup: (buildSetting: string) => string | undefined): string;
@@ -21,6 +21,7 @@ exports.isBuildConfig = isBuildConfig;
21
21
  exports.isNotComment = isNotComment;
22
22
  exports.isNotTestHost = isNotTestHost;
23
23
  exports.resolvePathOrProject = resolvePathOrProject;
24
+ exports.resolveXcodeBuildSetting = resolveXcodeBuildSetting;
24
25
  exports.sanitizedName = sanitizedName;
25
26
  exports.unquote = unquote;
26
27
  function _assert() {
@@ -82,6 +83,13 @@ function Paths() {
82
83
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
83
84
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
84
85
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
86
+ /**
87
+ * Copyright © 2023-present 650 Industries, Inc. (aka Expo)
88
+ *
89
+ * This source code is licensed under the MIT license found in the
90
+ * LICENSE file in the root directory of this source tree.
91
+ */
92
+
85
93
  function getProjectName(projectRoot) {
86
94
  const sourceRoot = Paths().getSourceRoot(projectRoot);
87
95
  return _path().default.basename(sourceRoot);
@@ -398,4 +406,85 @@ function unquote(value) {
398
406
  }
399
407
  return (_value$match$ = (_value$match = value.match(/^"(.*)"$/)) === null || _value$match === void 0 ? void 0 : _value$match[1]) !== null && _value$match$ !== void 0 ? _value$match$ : value;
400
408
  }
409
+ function resolveXcodeBuildSetting(value, lookup) {
410
+ const parsedValue = value === null || value === void 0 ? void 0 : value.replace(/\$\(([^()]*|\([^)]*\))\)/g, match => {
411
+ var _resolved5;
412
+ // Remove the `$(` and `)`, then split modifier(s) from the variable name.
413
+ const [variable, ...transformations] = match.slice(2, -1).split(':');
414
+ // Resolve the variable recursively.
415
+ let lookedUp = lookup(variable);
416
+ if (lookedUp) {
417
+ lookedUp = resolveXcodeBuildSetting(lookedUp, lookup);
418
+ }
419
+ let resolved = lookedUp;
420
+
421
+ // Ref: http://codeworkshop.net/posts/xcode-build-setting-transformations
422
+ transformations.forEach(modifier => {
423
+ var _resolved, _resolved2, _resolved3, _resolved4, _modifier$match;
424
+ switch (modifier) {
425
+ case 'lower':
426
+ // A lowercase representation.
427
+ resolved = (_resolved = resolved) === null || _resolved === void 0 ? void 0 : _resolved.toLowerCase();
428
+ break;
429
+ case 'upper':
430
+ // An uppercase representation.
431
+ resolved = (_resolved2 = resolved) === null || _resolved2 === void 0 ? void 0 : _resolved2.toUpperCase();
432
+ break;
433
+ case 'suffix':
434
+ if (resolved) {
435
+ // The extension of a path including the '.' divider.
436
+ resolved = _path().default.extname(resolved);
437
+ }
438
+ break;
439
+ case 'file':
440
+ if (resolved) {
441
+ // The file portion of a path.
442
+ resolved = _path().default.basename(resolved);
443
+ }
444
+ break;
445
+ case 'dir':
446
+ if (resolved) {
447
+ // The directory portion of a path.
448
+ resolved = _path().default.dirname(resolved);
449
+ }
450
+ break;
451
+ case 'base':
452
+ if (resolved) {
453
+ // The base name of a path - the last path component with any extension removed.
454
+ const b = _path().default.basename(resolved);
455
+ const extensionIndex = b.lastIndexOf('.');
456
+ resolved = extensionIndex === -1 ? b : b.slice(0, extensionIndex);
457
+ }
458
+ break;
459
+ case 'rfc1034identifier':
460
+ // A representation suitable for use in a DNS name.
461
+
462
+ // TODO: Check the spec if there is one, this is just what we had before.
463
+ resolved = (_resolved3 = resolved) === null || _resolved3 === void 0 ? void 0 : _resolved3.replace(/[^a-zA-Z0-9]/g, '-');
464
+ // resolved = resolved.replace(/[\/\*\s]/g, '-');
465
+ break;
466
+ case 'c99extidentifier':
467
+ // Like identifier, but with support for extended characters allowed by C99. Added in Xcode 6.
468
+ // TODO: Check the spec if there is one.
469
+ resolved = (_resolved4 = resolved) === null || _resolved4 === void 0 ? void 0 : _resolved4.replace(/[-\s]/g, '_');
470
+ break;
471
+ case 'standardizepath':
472
+ if (resolved) {
473
+ // The equivalent of calling stringByStandardizingPath on the string.
474
+ // https://developer.apple.com/documentation/foundation/nsstring/1407194-standardizingpath
475
+ resolved = _path().default.resolve(resolved);
476
+ }
477
+ break;
478
+ default:
479
+ resolved || (resolved = (_modifier$match = modifier.match(/default=(.*)/)) === null || _modifier$match === void 0 ? void 0 : _modifier$match[1]);
480
+ break;
481
+ }
482
+ });
483
+ return resolveXcodeBuildSetting((_resolved5 = resolved) !== null && _resolved5 !== void 0 ? _resolved5 : '', lookup);
484
+ });
485
+ if (parsedValue !== value) {
486
+ return resolveXcodeBuildSetting(parsedValue, lookup);
487
+ }
488
+ return value;
489
+ }
401
490
  //# sourceMappingURL=Xcodeproj.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Xcodeproj.js","names":["_assert","data","_interopRequireDefault","require","_path","_slugify","_xcode","_pbxFile","_string","_warnings","Paths","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","getProjectName","projectRoot","sourceRoot","getSourceRoot","path","basename","resolvePathOrProject","projectRootOrProject","getPbxproj","sanitizedName","name","sanitizedNameForProjects","slugify","replace","normalize","getHackyProjectName","config","projectName","assert","createProjectFileForGroup","filepath","group","file","pbxFile","conflictingFile","children","find","child","comment","addResourceFileToGroup","groupName","isBuildFile","project","verbose","targetUuid","addFileToGroupAndLink","addFileToProject","addToPbxFileReferenceSection","addToPbxBuildFileSection","addToPbxResourcesBuildPhase","addBuildSourceFileToGroup","addToPbxSourcesBuildPhase","pbxGroupByPathOrAssert","addWarningIOS","target","applicationNativeTarget","getTarget","uuid","generateUuid","fileRef","push","value","getApplicationNativeTarget","String","addFramework","framework","splitPath","split","findGroup","undefined","findGroupInsideGroup","foundGroup","_project$getPBXGroupB","getPBXGroupByKey","firstProject","getFirstProject","mainGroup","components","nextGroup","Error","ensureGroupRecursively","_topMostGroup","hasChild","topMostGroup","pathComponent","pbxCreateGroup","pbxGroupByName","projectPath","getPBXProjectPath","xcode","parseSync","getProductName","productName","_project$getFirstTarg","_project$getFirstTarg2","targetName","getFirstTarget","firstTarget","getProjectSection","pbxProjectSection","getXCConfigurationListEntries","lists","pbxXCConfigurationList","entries","filter","isNotComment","getBuildConfigurationsForListId","configurationListId","configurationListEntries","configurationList","buildConfigurations","map","i","pbxXCBuildConfigurationSection","isBuildConfig","includes","getBuildConfigurationForListIdAndName","buildConfiguration","xcBuildConfigurationEntry","trimQuotes","sectionItem","isa","isNotTestHost","buildSettings","TEST_HOST","endsWith","unquote","_value$match$","_value$match","match"],"sources":["../../../src/ios/utils/Xcodeproj.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport assert from 'assert';\nimport path from 'path';\nimport slugify from 'slugify';\nimport xcode, {\n PBXFile,\n PBXGroup,\n PBXNativeTarget,\n PBXProject,\n UUID,\n XCBuildConfiguration,\n XCConfigurationList,\n XcodeProject,\n} from 'xcode';\nimport pbxFile from 'xcode/lib/pbxFile';\n\nimport { trimQuotes } from './string';\nimport { addWarningIOS } from '../../utils/warnings';\nimport * as Paths from '../Paths';\n\nexport type ProjectSectionEntry = [string, PBXProject];\n\nexport type NativeTargetSection = Record<string, PBXNativeTarget>;\n\nexport type NativeTargetSectionEntry = [string, PBXNativeTarget];\n\nexport type ConfigurationLists = Record<string, XCConfigurationList>;\n\nexport type ConfigurationListEntry = [string, XCConfigurationList];\n\nexport type ConfigurationSectionEntry = [string, XCBuildConfiguration];\n\nexport function getProjectName(projectRoot: string) {\n const sourceRoot = Paths.getSourceRoot(projectRoot);\n return path.basename(sourceRoot);\n}\n\nexport function resolvePathOrProject(\n projectRootOrProject: string | XcodeProject\n): XcodeProject | null {\n if (typeof projectRootOrProject === 'string') {\n try {\n return getPbxproj(projectRootOrProject);\n } catch {\n return null;\n }\n }\n return projectRootOrProject;\n}\n\n// TODO: come up with a better solution for using app.json expo.name in various places\nexport function sanitizedName(name: string) {\n // Default to the name `app` when every safe character has been sanitized\n return sanitizedNameForProjects(name) || sanitizedNameForProjects(slugify(name)) || 'app';\n}\n\nfunction sanitizedNameForProjects(name: string) {\n return name\n .replace(/[\\W_]+/g, '')\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '');\n}\n\n// TODO: it's silly and kind of fragile that we look at app config to determine\n// the ios project paths. Overall this function needs to be revamped, just a\n// placeholder for now! Make this more robust when we support applying config\n// at any time (currently it's only applied on eject).\nexport function getHackyProjectName(projectRoot: string, config: ExpoConfig): string {\n // Attempt to get the current ios folder name (apply).\n try {\n return getProjectName(projectRoot);\n } catch {\n // If no iOS project exists then create a new one (eject).\n const projectName = config.name;\n assert(projectName, 'Your project needs a name in app.json/app.config.js.');\n return sanitizedName(projectName);\n }\n}\n\nfunction createProjectFileForGroup({ filepath, group }: { filepath: string; group: PBXGroup }) {\n const file = new pbxFile(filepath);\n\n const conflictingFile = group.children.find((child) => child.comment === file.basename);\n if (conflictingFile) {\n // This can happen when a file like the GoogleService-Info.plist needs to be added and the eject command is run twice.\n // Not much we can do here since it might be a conflicting file.\n return null;\n }\n return file;\n}\n\n/**\n * Add a resource file (ex: `SplashScreen.storyboard`, `Images.xcassets`) to an Xcode project.\n * This is akin to creating a new code file in Xcode with `⌘+n`.\n */\nexport function addResourceFileToGroup({\n filepath,\n groupName,\n // Should add to `PBXBuildFile Section`\n isBuildFile,\n project,\n verbose,\n targetUuid,\n}: {\n filepath: string;\n groupName: string;\n isBuildFile?: boolean;\n project: XcodeProject;\n verbose?: boolean;\n targetUuid?: string;\n}): XcodeProject {\n return addFileToGroupAndLink({\n filepath,\n groupName,\n project,\n verbose,\n targetUuid,\n addFileToProject({ project, file }) {\n project.addToPbxFileReferenceSection(file);\n if (isBuildFile) {\n project.addToPbxBuildFileSection(file);\n }\n project.addToPbxResourcesBuildPhase(file);\n },\n });\n}\n\n/**\n * Add a build source file (ex: `AppDelegate.m`, `ViewController.swift`) to an Xcode project.\n * This is akin to creating a new code file in Xcode with `⌘+n`.\n */\nexport function addBuildSourceFileToGroup({\n filepath,\n groupName,\n project,\n verbose,\n targetUuid,\n}: {\n filepath: string;\n groupName: string;\n project: XcodeProject;\n verbose?: boolean;\n targetUuid?: string;\n}): XcodeProject {\n return addFileToGroupAndLink({\n filepath,\n groupName,\n project,\n verbose,\n targetUuid,\n addFileToProject({ project, file }) {\n project.addToPbxFileReferenceSection(file);\n project.addToPbxBuildFileSection(file);\n project.addToPbxSourcesBuildPhase(file);\n },\n });\n}\n\n// TODO(brentvatne): I couldn't figure out how to do this with an existing\n// higher level function exposed by the xcode library, but we should find out how to do\n// that and replace this with it\nexport function addFileToGroupAndLink({\n filepath,\n groupName,\n project,\n verbose,\n addFileToProject,\n targetUuid,\n}: {\n filepath: string;\n groupName: string;\n project: XcodeProject;\n verbose?: boolean;\n targetUuid?: string;\n addFileToProject: (props: { file: PBXFile; project: XcodeProject }) => void;\n}): XcodeProject {\n const group = pbxGroupByPathOrAssert(project, groupName);\n\n const file = createProjectFileForGroup({ filepath, group });\n\n if (!file) {\n if (verbose) {\n // This can happen when a file like the GoogleService-Info.plist needs to be added and the eject command is run twice.\n // Not much we can do here since it might be a conflicting file.\n addWarningIOS(\n 'ios-xcode-project',\n `Skipped adding duplicate file \"${filepath}\" to PBXGroup named \"${groupName}\"`\n );\n }\n return project;\n }\n\n if (targetUuid != null) {\n file.target = targetUuid;\n } else {\n const applicationNativeTarget = project.getTarget('com.apple.product-type.application');\n file.target = applicationNativeTarget?.uuid;\n }\n\n file.uuid = project.generateUuid();\n file.fileRef = project.generateUuid();\n\n addFileToProject({ project, file });\n\n group.children.push({\n value: file.fileRef,\n comment: file.basename,\n });\n return project;\n}\n\nexport function getApplicationNativeTarget({\n project,\n projectName,\n}: {\n project: XcodeProject;\n projectName: string;\n}) {\n const applicationNativeTarget = project.getTarget('com.apple.product-type.application');\n assert(\n applicationNativeTarget,\n `Couldn't locate application PBXNativeTarget in '.xcodeproj' file.`\n );\n assert(\n String(applicationNativeTarget.target.name) === projectName,\n `Application native target name mismatch. Expected ${projectName}, but found ${applicationNativeTarget.target.name}.`\n );\n return applicationNativeTarget;\n}\n\n/**\n * Add a framework to the default app native target.\n *\n * @param projectName Name of the PBX project.\n * @param framework String ending in `.framework`, i.e. `StoreKit.framework`\n */\nexport function addFramework({\n project,\n projectName,\n framework,\n}: {\n project: XcodeProject;\n projectName: string;\n framework: string;\n}) {\n const target = getApplicationNativeTarget({ project, projectName });\n return project.addFramework(framework, { target: target.uuid });\n}\n\nfunction splitPath(path: string): string[] {\n // TODO: Should we account for other platforms that may not use `/`\n return path.split('/');\n}\n\nconst findGroup = (\n group: PBXGroup | undefined,\n name: string\n):\n | {\n value: UUID;\n comment?: string;\n }\n | undefined => {\n if (!group) {\n return undefined;\n }\n\n return group.children.find((group) => group.comment === name);\n};\n\nfunction findGroupInsideGroup(\n project: XcodeProject,\n group: PBXGroup | undefined,\n name: string\n): null | PBXGroup {\n const foundGroup = findGroup(group, name);\n if (foundGroup) {\n return project.getPBXGroupByKey(foundGroup.value) ?? null;\n }\n return null;\n}\n\nfunction pbxGroupByPathOrAssert(project: XcodeProject, path: string): PBXGroup {\n const { firstProject } = project.getFirstProject();\n\n let group = project.getPBXGroupByKey(firstProject.mainGroup);\n\n const components = splitPath(path);\n for (const name of components) {\n const nextGroup = findGroupInsideGroup(project, group, name);\n if (nextGroup) {\n group = nextGroup;\n } else {\n break;\n }\n }\n\n if (!group) {\n throw Error(`Xcode PBXGroup with name \"${path}\" could not be found in the Xcode project.`);\n }\n\n return group;\n}\n\nexport function ensureGroupRecursively(project: XcodeProject, filepath: string): PBXGroup | null {\n const components = splitPath(filepath);\n const hasChild = (group: PBXGroup, name: string) =>\n group.children.find(({ comment }) => comment === name);\n const { firstProject } = project.getFirstProject();\n\n let topMostGroup = project.getPBXGroupByKey(firstProject.mainGroup);\n\n for (const pathComponent of components) {\n if (topMostGroup && !hasChild(topMostGroup, pathComponent)) {\n topMostGroup.children.push({\n comment: pathComponent,\n value: project.pbxCreateGroup(pathComponent, '\"\"'),\n });\n }\n topMostGroup = project.pbxGroupByName(pathComponent);\n }\n return topMostGroup ?? null;\n}\n\n/**\n * Get the pbxproj for the given path\n */\nexport function getPbxproj(projectRoot: string): XcodeProject {\n const projectPath = Paths.getPBXProjectPath(projectRoot);\n const project = xcode.project(projectPath);\n project.parseSync();\n return project;\n}\n\n/**\n * Get the productName for a project, if the name is using a variable `$(TARGET_NAME)`, then attempt to get the value of that variable.\n *\n * @param project\n */\nexport function getProductName(project: XcodeProject): string {\n let productName = '$(TARGET_NAME)';\n try {\n // If the product name is numeric, this will fail (it's a getter).\n // If the bundle identifier' final component is only numeric values, then the PRODUCT_NAME\n // will be a numeric value, this results in a bug where the product name isn't useful,\n // i.e. `com.bacon.001` -> `1` -- in this case, use the first target name.\n productName = project.productName;\n } catch {}\n\n if (productName === '$(TARGET_NAME)') {\n const targetName = project.getFirstTarget()?.firstTarget?.productName;\n productName = targetName ?? productName;\n }\n\n return productName;\n}\n\nexport function getProjectSection(project: XcodeProject) {\n return project.pbxProjectSection();\n}\n\nexport function getXCConfigurationListEntries(project: XcodeProject): ConfigurationListEntry[] {\n const lists = project.pbxXCConfigurationList();\n return Object.entries(lists).filter(isNotComment);\n}\n\nexport function getBuildConfigurationsForListId(\n project: XcodeProject,\n configurationListId: string\n): ConfigurationSectionEntry[] {\n const configurationListEntries = getXCConfigurationListEntries(project);\n const [, configurationList] = configurationListEntries.find(\n ([key]) => key === configurationListId\n ) as ConfigurationListEntry;\n\n const buildConfigurations = configurationList.buildConfigurations.map((i) => i.value);\n\n return Object.entries(project.pbxXCBuildConfigurationSection())\n .filter(isNotComment)\n .filter(isBuildConfig)\n .filter(([key]: ConfigurationSectionEntry) => buildConfigurations.includes(key));\n}\n\nexport function getBuildConfigurationForListIdAndName(\n project: XcodeProject,\n {\n configurationListId,\n buildConfiguration,\n }: { configurationListId: string; buildConfiguration: string }\n): ConfigurationSectionEntry {\n const xcBuildConfigurationEntry = getBuildConfigurationsForListId(\n project,\n configurationListId\n ).find((i) => trimQuotes(i[1].name) === buildConfiguration);\n if (!xcBuildConfigurationEntry) {\n throw new Error(\n `Build configuration '${buildConfiguration}' does not exist in list with id '${configurationListId}'`\n );\n }\n return xcBuildConfigurationEntry;\n}\n\nexport function isBuildConfig([, sectionItem]: ConfigurationSectionEntry): boolean {\n return sectionItem.isa === 'XCBuildConfiguration';\n}\n\nexport function isNotTestHost([, sectionItem]: ConfigurationSectionEntry): boolean {\n return !sectionItem.buildSettings.TEST_HOST;\n}\n\nexport function isNotComment([key]:\n | ConfigurationSectionEntry\n | ProjectSectionEntry\n | ConfigurationListEntry\n | NativeTargetSectionEntry): boolean {\n return !key.endsWith(`_comment`);\n}\n\n// Remove surrounding double quotes if they exist.\nexport function unquote(value: string): string {\n // projects with numeric names will fail due to a bug in the xcode package.\n if (typeof value === 'number') {\n value = String(value);\n }\n return value.match(/^\"(.*)\"$/)?.[1] ?? value;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAA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AAOnE,KAAK,CAACoE,KAAK,CAAC,UAAU,CAAC,cAAAD,YAAA,uBAAvBA,YAAA,CAA0B,CAAC,CAAC,cAAAD,aAAA,cAAAA,aAAA,GAAIlE,KAAK;AAC9C"}
1
+ {"version":3,"file":"Xcodeproj.js","names":["_assert","data","_interopRequireDefault","require","_path","_slugify","_xcode","_pbxFile","_string","_warnings","Paths","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","getProjectName","projectRoot","sourceRoot","getSourceRoot","path","basename","resolvePathOrProject","projectRootOrProject","getPbxproj","sanitizedName","name","sanitizedNameForProjects","slugify","replace","normalize","getHackyProjectName","config","projectName","assert","createProjectFileForGroup","filepath","group","file","pbxFile","conflictingFile","children","find","child","comment","addResourceFileToGroup","groupName","isBuildFile","project","verbose","targetUuid","addFileToGroupAndLink","addFileToProject","addToPbxFileReferenceSection","addToPbxBuildFileSection","addToPbxResourcesBuildPhase","addBuildSourceFileToGroup","addToPbxSourcesBuildPhase","pbxGroupByPathOrAssert","addWarningIOS","target","applicationNativeTarget","getTarget","uuid","generateUuid","fileRef","push","value","getApplicationNativeTarget","String","addFramework","framework","splitPath","split","findGroup","undefined","findGroupInsideGroup","foundGroup","_project$getPBXGroupB","getPBXGroupByKey","firstProject","getFirstProject","mainGroup","components","nextGroup","Error","ensureGroupRecursively","_topMostGroup","hasChild","topMostGroup","pathComponent","pbxCreateGroup","pbxGroupByName","projectPath","getPBXProjectPath","xcode","parseSync","getProductName","productName","_project$getFirstTarg","_project$getFirstTarg2","targetName","getFirstTarget","firstTarget","getProjectSection","pbxProjectSection","getXCConfigurationListEntries","lists","pbxXCConfigurationList","entries","filter","isNotComment","getBuildConfigurationsForListId","configurationListId","configurationListEntries","configurationList","buildConfigurations","map","i","pbxXCBuildConfigurationSection","isBuildConfig","includes","getBuildConfigurationForListIdAndName","buildConfiguration","xcBuildConfigurationEntry","trimQuotes","sectionItem","isa","isNotTestHost","buildSettings","TEST_HOST","endsWith","unquote","_value$match$","_value$match","match","resolveXcodeBuildSetting","lookup","parsedValue","_resolved5","variable","transformations","slice","lookedUp","resolved","forEach","modifier","_resolved","_resolved2","_resolved3","_resolved4","_modifier$match","toLowerCase","toUpperCase","extname","dirname","b","extensionIndex","lastIndexOf","resolve"],"sources":["../../../src/ios/utils/Xcodeproj.ts"],"sourcesContent":["/**\n * Copyright © 2023-present 650 Industries, Inc. (aka Expo)\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { ExpoConfig } from '@expo/config-types';\nimport assert from 'assert';\nimport path from 'path';\nimport slugify from 'slugify';\nimport xcode, {\n PBXFile,\n PBXGroup,\n PBXNativeTarget,\n PBXProject,\n UUID,\n XCBuildConfiguration,\n XCConfigurationList,\n XcodeProject,\n} from 'xcode';\nimport pbxFile from 'xcode/lib/pbxFile';\n\nimport { trimQuotes } from './string';\nimport { addWarningIOS } from '../../utils/warnings';\nimport * as Paths from '../Paths';\n\nexport type ProjectSectionEntry = [string, PBXProject];\n\nexport type NativeTargetSection = Record<string, PBXNativeTarget>;\n\nexport type NativeTargetSectionEntry = [string, PBXNativeTarget];\n\nexport type ConfigurationLists = Record<string, XCConfigurationList>;\n\nexport type ConfigurationListEntry = [string, XCConfigurationList];\n\nexport type ConfigurationSectionEntry = [string, XCBuildConfiguration];\n\nexport function getProjectName(projectRoot: string) {\n const sourceRoot = Paths.getSourceRoot(projectRoot);\n return path.basename(sourceRoot);\n}\n\nexport function resolvePathOrProject(\n projectRootOrProject: string | XcodeProject\n): XcodeProject | null {\n if (typeof projectRootOrProject === 'string') {\n try {\n return getPbxproj(projectRootOrProject);\n } catch {\n return null;\n }\n }\n return projectRootOrProject;\n}\n\n// TODO: come up with a better solution for using app.json expo.name in various places\nexport function sanitizedName(name: string) {\n // Default to the name `app` when every safe character has been sanitized\n return sanitizedNameForProjects(name) || sanitizedNameForProjects(slugify(name)) || 'app';\n}\n\nfunction sanitizedNameForProjects(name: string) {\n return name\n .replace(/[\\W_]+/g, '')\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '');\n}\n\n// TODO: it's silly and kind of fragile that we look at app config to determine\n// the ios project paths. Overall this function needs to be revamped, just a\n// placeholder for now! Make this more robust when we support applying config\n// at any time (currently it's only applied on eject).\nexport function getHackyProjectName(projectRoot: string, config: ExpoConfig): string {\n // Attempt to get the current ios folder name (apply).\n try {\n return getProjectName(projectRoot);\n } catch {\n // If no iOS project exists then create a new one (eject).\n const projectName = config.name;\n assert(projectName, 'Your project needs a name in app.json/app.config.js.');\n return sanitizedName(projectName);\n }\n}\n\nfunction createProjectFileForGroup({ filepath, group }: { filepath: string; group: PBXGroup }) {\n const file = new pbxFile(filepath);\n\n const conflictingFile = group.children.find((child) => child.comment === file.basename);\n if (conflictingFile) {\n // This can happen when a file like the GoogleService-Info.plist needs to be added and the eject command is run twice.\n // Not much we can do here since it might be a conflicting file.\n return null;\n }\n return file;\n}\n\n/**\n * Add a resource file (ex: `SplashScreen.storyboard`, `Images.xcassets`) to an Xcode project.\n * This is akin to creating a new code file in Xcode with `⌘+n`.\n */\nexport function addResourceFileToGroup({\n filepath,\n groupName,\n // Should add to `PBXBuildFile Section`\n isBuildFile,\n project,\n verbose,\n targetUuid,\n}: {\n filepath: string;\n groupName: string;\n isBuildFile?: boolean;\n project: XcodeProject;\n verbose?: boolean;\n targetUuid?: string;\n}): XcodeProject {\n return addFileToGroupAndLink({\n filepath,\n groupName,\n project,\n verbose,\n targetUuid,\n addFileToProject({ project, file }) {\n project.addToPbxFileReferenceSection(file);\n if (isBuildFile) {\n project.addToPbxBuildFileSection(file);\n }\n project.addToPbxResourcesBuildPhase(file);\n },\n });\n}\n\n/**\n * Add a build source file (ex: `AppDelegate.m`, `ViewController.swift`) to an Xcode project.\n * This is akin to creating a new code file in Xcode with `⌘+n`.\n */\nexport function addBuildSourceFileToGroup({\n filepath,\n groupName,\n project,\n verbose,\n targetUuid,\n}: {\n filepath: string;\n groupName: string;\n project: XcodeProject;\n verbose?: boolean;\n targetUuid?: string;\n}): XcodeProject {\n return addFileToGroupAndLink({\n filepath,\n groupName,\n project,\n verbose,\n targetUuid,\n addFileToProject({ project, file }) {\n project.addToPbxFileReferenceSection(file);\n project.addToPbxBuildFileSection(file);\n project.addToPbxSourcesBuildPhase(file);\n },\n });\n}\n\n// TODO(brentvatne): I couldn't figure out how to do this with an existing\n// higher level function exposed by the xcode library, but we should find out how to do\n// that and replace this with it\nexport function addFileToGroupAndLink({\n filepath,\n groupName,\n project,\n verbose,\n addFileToProject,\n targetUuid,\n}: {\n filepath: string;\n groupName: string;\n project: XcodeProject;\n verbose?: boolean;\n targetUuid?: string;\n addFileToProject: (props: { file: PBXFile; project: XcodeProject }) => void;\n}): XcodeProject {\n const group = pbxGroupByPathOrAssert(project, groupName);\n\n const file = createProjectFileForGroup({ filepath, group });\n\n if (!file) {\n if (verbose) {\n // This can happen when a file like the GoogleService-Info.plist needs to be added and the eject command is run twice.\n // Not much we can do here since it might be a conflicting file.\n addWarningIOS(\n 'ios-xcode-project',\n `Skipped adding duplicate file \"${filepath}\" to PBXGroup named \"${groupName}\"`\n );\n }\n return project;\n }\n\n if (targetUuid != null) {\n file.target = targetUuid;\n } else {\n const applicationNativeTarget = project.getTarget('com.apple.product-type.application');\n file.target = applicationNativeTarget?.uuid;\n }\n\n file.uuid = project.generateUuid();\n file.fileRef = project.generateUuid();\n\n addFileToProject({ project, file });\n\n group.children.push({\n value: file.fileRef,\n comment: file.basename,\n });\n return project;\n}\n\nexport function getApplicationNativeTarget({\n project,\n projectName,\n}: {\n project: XcodeProject;\n projectName: string;\n}) {\n const applicationNativeTarget = project.getTarget('com.apple.product-type.application');\n assert(\n applicationNativeTarget,\n `Couldn't locate application PBXNativeTarget in '.xcodeproj' file.`\n );\n assert(\n String(applicationNativeTarget.target.name) === projectName,\n `Application native target name mismatch. Expected ${projectName}, but found ${applicationNativeTarget.target.name}.`\n );\n return applicationNativeTarget;\n}\n\n/**\n * Add a framework to the default app native target.\n *\n * @param projectName Name of the PBX project.\n * @param framework String ending in `.framework`, i.e. `StoreKit.framework`\n */\nexport function addFramework({\n project,\n projectName,\n framework,\n}: {\n project: XcodeProject;\n projectName: string;\n framework: string;\n}) {\n const target = getApplicationNativeTarget({ project, projectName });\n return project.addFramework(framework, { target: target.uuid });\n}\n\nfunction splitPath(path: string): string[] {\n // TODO: Should we account for other platforms that may not use `/`\n return path.split('/');\n}\n\nconst findGroup = (\n group: PBXGroup | undefined,\n name: string\n):\n | {\n value: UUID;\n comment?: string;\n }\n | undefined => {\n if (!group) {\n return undefined;\n }\n\n return group.children.find((group) => group.comment === name);\n};\n\nfunction findGroupInsideGroup(\n project: XcodeProject,\n group: PBXGroup | undefined,\n name: string\n): null | PBXGroup {\n const foundGroup = findGroup(group, name);\n if (foundGroup) {\n return project.getPBXGroupByKey(foundGroup.value) ?? null;\n }\n return null;\n}\n\nfunction pbxGroupByPathOrAssert(project: XcodeProject, path: string): PBXGroup {\n const { firstProject } = project.getFirstProject();\n\n let group = project.getPBXGroupByKey(firstProject.mainGroup);\n\n const components = splitPath(path);\n for (const name of components) {\n const nextGroup = findGroupInsideGroup(project, group, name);\n if (nextGroup) {\n group = nextGroup;\n } else {\n break;\n }\n }\n\n if (!group) {\n throw Error(`Xcode PBXGroup with name \"${path}\" could not be found in the Xcode project.`);\n }\n\n return group;\n}\n\nexport function ensureGroupRecursively(project: XcodeProject, filepath: string): PBXGroup | null {\n const components = splitPath(filepath);\n const hasChild = (group: PBXGroup, name: string) =>\n group.children.find(({ comment }) => comment === name);\n const { firstProject } = project.getFirstProject();\n\n let topMostGroup = project.getPBXGroupByKey(firstProject.mainGroup);\n\n for (const pathComponent of components) {\n if (topMostGroup && !hasChild(topMostGroup, pathComponent)) {\n topMostGroup.children.push({\n comment: pathComponent,\n value: project.pbxCreateGroup(pathComponent, '\"\"'),\n });\n }\n topMostGroup = project.pbxGroupByName(pathComponent);\n }\n return topMostGroup ?? null;\n}\n\n/**\n * Get the pbxproj for the given path\n */\nexport function getPbxproj(projectRoot: string): XcodeProject {\n const projectPath = Paths.getPBXProjectPath(projectRoot);\n const project = xcode.project(projectPath);\n project.parseSync();\n return project;\n}\n\n/**\n * Get the productName for a project, if the name is using a variable `$(TARGET_NAME)`, then attempt to get the value of that variable.\n *\n * @param project\n */\nexport function getProductName(project: XcodeProject): string {\n let productName = '$(TARGET_NAME)';\n try {\n // If the product name is numeric, this will fail (it's a getter).\n // If the bundle identifier' final component is only numeric values, then the PRODUCT_NAME\n // will be a numeric value, this results in a bug where the product name isn't useful,\n // i.e. `com.bacon.001` -> `1` -- in this case, use the first target name.\n productName = project.productName;\n } catch {}\n\n if (productName === '$(TARGET_NAME)') {\n const targetName = project.getFirstTarget()?.firstTarget?.productName;\n productName = targetName ?? productName;\n }\n\n return productName;\n}\n\nexport function getProjectSection(project: XcodeProject) {\n return project.pbxProjectSection();\n}\n\nexport function getXCConfigurationListEntries(project: XcodeProject): ConfigurationListEntry[] {\n const lists = project.pbxXCConfigurationList();\n return Object.entries(lists).filter(isNotComment);\n}\n\nexport function getBuildConfigurationsForListId(\n project: XcodeProject,\n configurationListId: string\n): ConfigurationSectionEntry[] {\n const configurationListEntries = getXCConfigurationListEntries(project);\n const [, configurationList] = configurationListEntries.find(\n ([key]) => key === configurationListId\n ) as ConfigurationListEntry;\n\n const buildConfigurations = configurationList.buildConfigurations.map((i) => i.value);\n\n return Object.entries(project.pbxXCBuildConfigurationSection())\n .filter(isNotComment)\n .filter(isBuildConfig)\n .filter(([key]: ConfigurationSectionEntry) => buildConfigurations.includes(key));\n}\n\nexport function getBuildConfigurationForListIdAndName(\n project: XcodeProject,\n {\n configurationListId,\n buildConfiguration,\n }: { configurationListId: string; buildConfiguration: string }\n): ConfigurationSectionEntry {\n const xcBuildConfigurationEntry = getBuildConfigurationsForListId(\n project,\n configurationListId\n ).find((i) => trimQuotes(i[1].name) === buildConfiguration);\n if (!xcBuildConfigurationEntry) {\n throw new Error(\n `Build configuration '${buildConfiguration}' does not exist in list with id '${configurationListId}'`\n );\n }\n return xcBuildConfigurationEntry;\n}\n\nexport function isBuildConfig([, sectionItem]: ConfigurationSectionEntry): boolean {\n return sectionItem.isa === 'XCBuildConfiguration';\n}\n\nexport function isNotTestHost([, sectionItem]: ConfigurationSectionEntry): boolean {\n return !sectionItem.buildSettings.TEST_HOST;\n}\n\nexport function isNotComment([key]:\n | ConfigurationSectionEntry\n | ProjectSectionEntry\n | ConfigurationListEntry\n | NativeTargetSectionEntry): boolean {\n return !key.endsWith(`_comment`);\n}\n\n// Remove surrounding double quotes if they exist.\nexport function unquote(value: string): string {\n // projects with numeric names will fail due to a bug in the xcode package.\n if (typeof value === 'number') {\n value = String(value);\n }\n return value.match(/^\"(.*)\"$/)?.[1] ?? value;\n}\n\nexport function resolveXcodeBuildSetting(\n value: string,\n lookup: (buildSetting: string) => string | undefined\n): string {\n const parsedValue = value?.replace(/\\$\\(([^()]*|\\([^)]*\\))\\)/g, (match) => {\n // Remove the `$(` and `)`, then split modifier(s) from the variable name.\n const [variable, ...transformations] = match.slice(2, -1).split(':');\n // Resolve the variable recursively.\n let lookedUp = lookup(variable);\n if (lookedUp) {\n lookedUp = resolveXcodeBuildSetting(lookedUp, lookup);\n }\n let resolved = lookedUp;\n\n // Ref: http://codeworkshop.net/posts/xcode-build-setting-transformations\n transformations.forEach((modifier) => {\n switch (modifier) {\n case 'lower':\n // A lowercase representation.\n resolved = resolved?.toLowerCase();\n break;\n case 'upper':\n // An uppercase representation.\n resolved = resolved?.toUpperCase();\n break;\n case 'suffix':\n if (resolved) {\n // The extension of a path including the '.' divider.\n resolved = path.extname(resolved);\n }\n break;\n case 'file':\n if (resolved) {\n // The file portion of a path.\n resolved = path.basename(resolved);\n }\n break;\n case 'dir':\n if (resolved) {\n // The directory portion of a path.\n resolved = path.dirname(resolved);\n }\n break;\n case 'base':\n if (resolved) {\n // The base name of a path - the last path component with any extension removed.\n const b = path.basename(resolved);\n const extensionIndex = b.lastIndexOf('.');\n resolved = extensionIndex === -1 ? b : b.slice(0, extensionIndex);\n }\n break;\n case 'rfc1034identifier':\n // A representation suitable for use in a DNS name.\n\n // TODO: Check the spec if there is one, this is just what we had before.\n resolved = resolved?.replace(/[^a-zA-Z0-9]/g, '-');\n // resolved = resolved.replace(/[\\/\\*\\s]/g, '-');\n break;\n case 'c99extidentifier':\n // Like identifier, but with support for extended characters allowed by C99. Added in Xcode 6.\n // TODO: Check the spec if there is one.\n resolved = resolved?.replace(/[-\\s]/g, '_');\n break;\n case 'standardizepath':\n if (resolved) {\n // The equivalent of calling stringByStandardizingPath on the string.\n // https://developer.apple.com/documentation/foundation/nsstring/1407194-standardizingpath\n resolved = path.resolve(resolved);\n }\n break;\n default:\n resolved ||= modifier.match(/default=(.*)/)?.[1];\n break;\n }\n });\n\n return resolveXcodeBuildSetting(resolved ?? '', lookup);\n });\n\n if (parsedValue !== value) {\n return resolveXcodeBuildSetting(parsedValue, lookup);\n }\n return value;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,OAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAA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AW,CAAC,GAAG,CAAC;YACzCd,QAAQ,GAAGa,cAAc,KAAK,CAAC,CAAC,GAAGD,CAAC,GAAGA,CAAC,CAACd,KAAK,CAAC,CAAC,EAAEe,cAAc,CAAC;UACnE;UACA;QACF,KAAK,mBAAmB;UACtB;;UAEA;UACAb,QAAQ,IAAAK,UAAA,GAAGL,QAAQ,cAAAK,UAAA,uBAARA,UAAA,CAAUxH,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC;UAClD;UACA;QACF,KAAK,kBAAkB;UACrB;UACA;UACAmH,QAAQ,IAAAM,UAAA,GAAGN,QAAQ,cAAAM,UAAA,uBAARA,UAAA,CAAUzH,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;UAC3C;QACF,KAAK,iBAAiB;UACpB,IAAImH,QAAQ,EAAE;YACZ;YACA;YACAA,QAAQ,GAAG5H,eAAI,CAAC2I,OAAO,CAACf,QAAQ,CAAC;UACnC;UACA;QACF;UACEA,QAAQ,KAARA,QAAQ,IAAAO,eAAA,GAAKL,QAAQ,CAACX,KAAK,CAAC,cAAc,CAAC,cAAAgB,eAAA,uBAA9BA,eAAA,CAAiC,CAAC,CAAC;UAChD;MAAM;IAEZ,CAAC,CAAC;IAEF,OAAOf,wBAAwB,EAAAG,UAAA,GAACK,QAAQ,cAAAL,UAAA,cAAAA,UAAA,GAAI,EAAE,EAAEF,MAAM,CAAC;EACzD,CAAC,CAAC;EAEF,IAAIC,WAAW,KAAKvE,KAAK,EAAE;IACzB,OAAOqE,wBAAwB,CAACE,WAAW,EAAED,MAAM,CAAC;EACtD;EACA,OAAOtE,KAAK;AACd"}
@@ -4,13 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.UnexpectedError = exports.PluginError = void 0;
7
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
9
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
10
7
  class UnexpectedError extends Error {
8
+ name = 'UnexpectedError';
11
9
  constructor(message) {
12
10
  super(`${message}\nPlease report this as an issue on https://github.com/expo/expo-cli/issues`);
13
- _defineProperty(this, "name", 'UnexpectedError');
14
11
  }
15
12
  }
16
13
  exports.UnexpectedError = UnexpectedError;
@@ -18,12 +15,12 @@ exports.UnexpectedError = UnexpectedError;
18
15
  * Based on `JsonFileError` from `@expo/json-file`
19
16
  */
20
17
  class PluginError extends Error {
18
+ name = 'PluginError';
19
+ isPluginError = true;
21
20
  constructor(message, code, cause) {
22
21
  super(cause ? `${message}\n└─ Cause: ${cause.name}: ${cause.message}` : message);
23
22
  this.code = code;
24
23
  this.cause = cause;
25
- _defineProperty(this, "name", 'PluginError');
26
- _defineProperty(this, "isPluginError", true);
27
24
  }
28
25
  }
29
26
  exports.PluginError = PluginError;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","names":["UnexpectedError","Error","constructor","message","_defineProperty","exports","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(\n message: string,\n public code: PluginErrorCode,\n public cause?: Error\n ) {\n super(cause ? `${message}\\n└─ Cause: ${cause.name}: ${cause.message}` : message);\n }\n}\n"],"mappings":";;;;;;;;;AAAO,MAAMA,eAAe,SAASC,KAAK,CAAC;EAGzCC,WAAWA,CAACC,OAAe,EAAE;IAC3B,KAAK,CAAE,GAAEA,OAAQ,6EAA4E,CAAC;IAACC,eAAA,eAHjF,iBAAiB;EAIjC;AACF;AAACC,OAAA,CAAAL,eAAA,GAAAA,eAAA;AAUD;AACA;AACA;AACO,MAAMM,WAAW,SAASL,KAAK,CAAC;EAIrCC,WAAWA,CACTC,OAAe,EACRI,IAAqB,EACrBC,KAAa,EACpB;IACA,KAAK,CAACA,KAAK,GAAI,GAAEL,OAAQ,eAAcK,KAAK,CAACC,IAAK,KAAID,KAAK,CAACL,OAAQ,EAAC,GAAGA,OAAO,CAAC;IAAC,KAH1EI,IAAqB,GAArBA,IAAqB;IAAA,KACrBC,KAAa,GAAbA,KAAa;IAAAJ,eAAA,eANN,aAAa;IAAAA,eAAA,wBACJ,IAAI;EAQ7B;AACF;AAACC,OAAA,CAAAC,WAAA,GAAAA,WAAA"}
1
+ {"version":3,"file":"errors.js","names":["UnexpectedError","Error","name","constructor","message","exports","PluginError","isPluginError","code","cause"],"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(\n message: string,\n public code: PluginErrorCode,\n public cause?: Error\n ) {\n super(cause ? `${message}\\n└─ Cause: ${cause.name}: ${cause.message}` : message);\n }\n}\n"],"mappings":";;;;;;AAAO,MAAMA,eAAe,SAASC,KAAK,CAAC;EAChCC,IAAI,GAAG,iBAAiB;EAEjCC,WAAWA,CAACC,OAAe,EAAE;IAC3B,KAAK,CAAE,GAAEA,OAAQ,6EAA4E,CAAC;EAChG;AACF;AAACC,OAAA,CAAAL,eAAA,GAAAA,eAAA;AAUD;AACA;AACA;AACO,MAAMM,WAAW,SAASL,KAAK,CAAC;EAC5BC,IAAI,GAAG,aAAa;EACpBK,aAAa,GAAG,IAAI;EAE7BJ,WAAWA,CACTC,OAAe,EACRI,IAAqB,EACrBC,KAAa,EACpB;IACA,KAAK,CAACA,KAAK,GAAI,GAAEL,OAAQ,eAAcK,KAAK,CAACP,IAAK,KAAIO,KAAK,CAACL,OAAQ,EAAC,GAAGA,OAAO,CAAC;IAAC,KAH1EI,IAAqB,GAArBA,IAAqB;IAAA,KACrBC,KAAa,GAAbA,KAAa;EAGtB;AACF;AAACJ,OAAA,CAAAC,WAAA,GAAAA,WAAA"}
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@expo/config-plugins",
3
- "version": "7.7.0",
3
+ "version": "7.8.0",
4
4
  "description": "A library for Expo config plugins",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
7
- "watch": "tsc --watch --preserveWatchOutput",
8
7
  "build": "tsc --emitDeclarationOnly && babel src --out-dir build --extensions \".ts\" --source-maps --ignore \"src/**/__mocks__/*\",\"src/**/__tests__/*\",\"src/**/__integration_tests__/*\"",
9
- "prepare": "yarn run clean && yarn build",
10
- "clean": "rimraf build ./tsconfig.tsbuildinfo",
11
- "lint": "eslint .",
12
- "test": "jest"
8
+ "clean": "expo-module clean",
9
+ "lint": "expo-module lint",
10
+ "prepare": "expo-module clean && yarn run build",
11
+ "prepublishOnly": "expo-module prepublishOnly",
12
+ "test": "expo-module test",
13
+ "typecheck": "expo-module typecheck"
13
14
  },
14
15
  "repository": {
15
16
  "type": "git",
@@ -33,9 +34,9 @@
33
34
  ],
34
35
  "dependencies": {
35
36
  "@expo/config-types": "^50.0.0-alpha.1",
36
- "@expo/fingerprint": "^0.4.0",
37
- "@expo/json-file": "~8.2.37",
38
- "@expo/plist": "^0.0.20",
37
+ "@expo/fingerprint": "^0.6.0",
38
+ "@expo/json-file": "~8.3.0",
39
+ "@expo/plist": "^0.1.0",
39
40
  "@expo/sdk-runtime-versions": "^1.0.0",
40
41
  "@react-native/normalize-color": "^2.0.0",
41
42
  "chalk": "^4.1.2",
@@ -52,10 +53,11 @@
52
53
  "devDependencies": {
53
54
  "@types/debug": "^4.1.5",
54
55
  "@types/find-up": "^4.0.0",
55
- "@types/xml2js": "~0.4.11"
56
+ "@types/xml2js": "~0.4.11",
57
+ "expo-module-scripts": "^3.3.0"
56
58
  },
57
59
  "publishConfig": {
58
60
  "access": "public"
59
61
  },
60
- "gitHead": "3142a086578deffd8704a8f1b6f0f661527d836c"
62
+ "gitHead": "2763e9cc6f2317b40da73382fe2595f8deebff46"
61
63
  }