@expo/build-tools 0.1.153 → 0.1.154
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/dist/ios/pod.js +3 -13
- package/dist/ios/pod.js.map +1 -1
- package/package.json +1 -1
package/dist/ios/pod.js
CHANGED
|
@@ -5,25 +5,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.installPods = void 0;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
9
8
|
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
10
9
|
async function installPods(ctx) {
|
|
11
10
|
const iosDir = path_1.default.join(ctx.reactNativeProjectDirectory, 'ios');
|
|
12
|
-
if (ctx.env.EAS_BUILD_COCOAPODS_CACHE_URL) {
|
|
13
|
-
const podfilePath = path_1.default.join(iosDir, 'Podfile');
|
|
14
|
-
const originalPodfileContents = await fs_extra_1.default.readFile(podfilePath, 'utf-8');
|
|
15
|
-
const cocoaPodsCdnSourceRegex = /\bsource\s*\(?['"]https:\/\/cdn\.cocoapods\.org\/?['"]\)?/g;
|
|
16
|
-
if (originalPodfileContents.search(cocoaPodsCdnSourceRegex) !== -1) {
|
|
17
|
-
await fs_extra_1.default.writeFile(podfilePath, originalPodfileContents.replace(cocoaPodsCdnSourceRegex, `source "${ctx.env.EAS_BUILD_COCOAPODS_CACHE_URL}"`));
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
await fs_extra_1.default.writeFile(podfilePath, `source "${ctx.env.EAS_BUILD_COCOAPODS_CACHE_URL}"\n${originalPodfileContents}`);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
11
|
await (0, turtle_spawn_1.default)('pod', ['install'], {
|
|
24
12
|
cwd: iosDir,
|
|
25
13
|
logger: ctx.logger,
|
|
26
|
-
env: Object.assign(Object.assign({}, ctx.env), { LANG: 'en_US.UTF-8' }),
|
|
14
|
+
env: Object.assign(Object.assign(Object.assign({}, ctx.env), { LANG: 'en_US.UTF-8' }), (ctx.env.EAS_BUILD_COCOAPODS_CACHE_URL
|
|
15
|
+
? { NEXUS_COCOAPODS_REPO_URL: ctx.env.EAS_BUILD_COCOAPODS_CACHE_URL }
|
|
16
|
+
: {})),
|
|
27
17
|
lineTransformer: (line) => {
|
|
28
18
|
if (!line ||
|
|
29
19
|
/\[!\] '[\w-]+' uses the unencrypted 'http' protocol to transfer the Pod\./.exec(line)) {
|
package/dist/ios/pod.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pod.js","sourceRoot":"","sources":["../../src/ios/pod.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;
|
|
1
|
+
{"version":3,"file":"pod.js","sourceRoot":"","sources":["../../src/ios/pod.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAGxB,sEAAuC;AAIhC,KAAK,UAAU,WAAW,CAAuB,GAAuB;IAC7E,MAAM,MAAM,GAAG,cAAI,CAAC,IAAI,CAAC,GAAG,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;IAEjE,MAAM,IAAA,sBAAK,EAAC,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE;QAC9B,GAAG,EAAE,MAAM;QACX,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,GAAG,gDACE,GAAG,CAAC,GAAG,KACV,IAAI,EAAE,aAAa,KAChB,CAAC,GAAG,CAAC,GAAG,CAAC,6BAA6B;YACvC,CAAC,CAAC,EAAE,wBAAwB,EAAE,GAAG,CAAC,GAAG,CAAC,6BAA6B,EAAE;YACrE,CAAC,CAAC,EAAE,CAAC,CACR;QACD,eAAe,EAAE,CAAC,IAAa,EAAE,EAAE;YACjC,IACE,CAAC,IAAI;gBACL,2EAA2E,CAAC,IAAI,CAAC,IAAI,CAAC,EACtF;gBACA,OAAO,IAAI,CAAC;aACb;iBAAM;gBACL,OAAO,IAAI,CAAC;aACb;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAxBD,kCAwBC","sourcesContent":["import path from 'path';\n\nimport { Ios } from '@expo/eas-build-job';\nimport spawn from '@expo/turtle-spawn';\n\nimport { BuildContext } from '../context';\n\nexport async function installPods<TJob extends Ios.Job>(ctx: BuildContext<TJob>): Promise<void> {\n const iosDir = path.join(ctx.reactNativeProjectDirectory, 'ios');\n\n await spawn('pod', ['install'], {\n cwd: iosDir,\n logger: ctx.logger,\n env: {\n ...ctx.env,\n LANG: 'en_US.UTF-8',\n ...(ctx.env.EAS_BUILD_COCOAPODS_CACHE_URL\n ? { NEXUS_COCOAPODS_REPO_URL: ctx.env.EAS_BUILD_COCOAPODS_CACHE_URL }\n : {}),\n },\n lineTransformer: (line?: string) => {\n if (\n !line ||\n /\\[!\\] '[\\w-]+' uses the unencrypted 'http' protocol to transfer the Pod\\./.exec(line)\n ) {\n return null;\n } else {\n return line;\n }\n },\n });\n}\n"]}
|