@expo/config-plugins 4.1.0 → 4.1.3
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/README.md +17 -2
- package/build/android/BuildProperties.d.ts +28 -0
- package/build/android/BuildProperties.js +96 -0
- package/build/android/BuildProperties.js.map +1 -0
- package/build/android/EasBuild.js +8 -8
- package/build/android/EasBuild.js.map +1 -1
- package/build/android/GoogleServices.js +16 -14
- package/build/android/GoogleServices.js.map +1 -1
- package/build/android/Manifest.d.ts +7 -0
- package/build/android/Manifest.js +43 -5
- package/build/android/Manifest.js.map +1 -1
- package/build/android/Package.js +27 -15
- package/build/android/Package.js.map +1 -1
- package/build/android/Paths.js +6 -6
- package/build/android/Paths.js.map +1 -1
- package/build/android/Permissions.d.ts +3 -1
- package/build/android/Permissions.js +42 -28
- package/build/android/Permissions.js.map +1 -1
- package/build/android/codeMod.js +1 -1
- package/build/android/codeMod.js.map +1 -1
- package/build/android/index.d.ts +2 -2
- package/build/android/index.js +18 -18
- package/build/android/index.js.map +1 -1
- package/build/ios/BuildProperties.d.ts +27 -0
- package/build/ios/BuildProperties.js +83 -0
- package/build/ios/BuildProperties.js.map +1 -0
- package/build/ios/BuildScheme.js +6 -3
- package/build/ios/BuildScheme.js.map +1 -1
- package/build/ios/BundleIdentifier.js +6 -6
- package/build/ios/BundleIdentifier.js.map +1 -1
- package/build/ios/Entitlements.d.ts +5 -1
- package/build/ios/Entitlements.js +63 -52
- package/build/ios/Entitlements.js.map +1 -1
- package/build/ios/Google.js +5 -5
- package/build/ios/Google.js.map +1 -1
- package/build/ios/Locales.js +14 -14
- package/build/ios/Locales.js.map +1 -1
- package/build/ios/Maps.js +5 -5
- package/build/ios/Maps.js.map +1 -1
- package/build/ios/Paths.d.ts +1 -3
- package/build/ios/Paths.js +29 -24
- package/build/ios/Paths.js.map +1 -1
- package/build/ios/ProvisioningProfile.js +4 -4
- package/build/ios/ProvisioningProfile.js.map +1 -1
- package/build/ios/Swift.js +5 -5
- package/build/ios/Swift.js.map +1 -1
- package/build/ios/Target.d.ts +1 -0
- package/build/ios/Target.js +11 -1
- package/build/ios/Target.js.map +1 -1
- package/build/ios/XcodeProjectFile.js +5 -5
- package/build/ios/XcodeProjectFile.js.map +1 -1
- package/build/ios/index.d.ts +2 -2
- package/build/ios/index.js +19 -19
- package/build/ios/index.js.map +1 -1
- package/build/ios/utils/Xcodeproj.d.ts +2 -1
- package/build/ios/utils/Xcodeproj.js +4 -1
- package/build/ios/utils/Xcodeproj.js.map +1 -1
- package/build/plugins/ios-plugins.d.ts +2 -2
- package/build/plugins/ios-plugins.js.map +1 -1
- package/build/plugins/withIosBaseMods.js +27 -7
- package/build/plugins/withIosBaseMods.js.map +1 -1
- package/build/utils/BuildProperties.types.d.ts +25 -0
- package/build/utils/BuildProperties.types.js +2 -0
- package/build/utils/BuildProperties.types.js.map +1 -0
- package/build/utils/XML.js +8 -6
- package/build/utils/XML.js.map +1 -1
- package/build/utils/fs.d.ts +4 -0
- package/build/utils/fs.js +56 -0
- package/build/utils/fs.js.map +1 -0
- package/build/utils/modules.js +1 -1
- package/build/utils/modules.js.map +1 -1
- package/build/utils/versions.js +2 -2
- package/build/utils/versions.js.map +1 -1
- package/package.json +3 -5
- package/build/android/JsEngine.d.ts +0 -8
- package/build/android/JsEngine.js +0 -59
- package/build/android/JsEngine.js.map +0 -1
- package/build/ios/JsEngine.d.ts +0 -8
- package/build/ios/JsEngine.js +0 -47
- package/build/ios/JsEngine.js.map +0 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.copyFilePathToPathAsync = copyFilePathToPathAsync;
|
|
7
|
+
exports.removeFile = removeFile;
|
|
8
|
+
|
|
9
|
+
function _fs() {
|
|
10
|
+
const data = _interopRequireDefault(require("fs"));
|
|
11
|
+
|
|
12
|
+
_fs = function () {
|
|
13
|
+
return data;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
return data;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function _path() {
|
|
20
|
+
const data = _interopRequireDefault(require("path"));
|
|
21
|
+
|
|
22
|
+
_path = function () {
|
|
23
|
+
return data;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
|
+
|
|
31
|
+
/** A basic function that copies a single file to another file location. */
|
|
32
|
+
async function copyFilePathToPathAsync(src, dest) {
|
|
33
|
+
const srcFile = await _fs().default.promises.readFile(src);
|
|
34
|
+
await _fs().default.promises.mkdir(_path().default.dirname(dest), {
|
|
35
|
+
recursive: true
|
|
36
|
+
});
|
|
37
|
+
await _fs().default.promises.writeFile(dest, srcFile);
|
|
38
|
+
}
|
|
39
|
+
/** Remove a single file (not directory). Returns `true` if a file was actually deleted. */
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
function removeFile(filePath) {
|
|
43
|
+
try {
|
|
44
|
+
_fs().default.unlinkSync(filePath);
|
|
45
|
+
|
|
46
|
+
return true;
|
|
47
|
+
} catch (error) {
|
|
48
|
+
// Skip if the remove did nothing.
|
|
49
|
+
if (error.code === 'ENOENT') {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
throw error;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=fs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/fs.ts"],"names":["copyFilePathToPathAsync","src","dest","srcFile","fs","promises","readFile","mkdir","path","dirname","recursive","writeFile","removeFile","filePath","unlinkSync","error","code"],"mappings":";;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAEA;AACO,eAAeA,uBAAf,CAAuCC,GAAvC,EAAoDC,IAApD,EAAiF;AACtF,QAAMC,OAAO,GAAG,MAAMC,cAAGC,QAAH,CAAYC,QAAZ,CAAqBL,GAArB,CAAtB;AACA,QAAMG,cAAGC,QAAH,CAAYE,KAAZ,CAAkBC,gBAAKC,OAAL,CAAaP,IAAb,CAAlB,EAAsC;AAAEQ,IAAAA,SAAS,EAAE;AAAb,GAAtC,CAAN;AACA,QAAMN,cAAGC,QAAH,CAAYM,SAAZ,CAAsBT,IAAtB,EAA4BC,OAA5B,CAAN;AACD;AAED;;;AACO,SAASS,UAAT,CAAoBC,QAApB,EAA+C;AACpD,MAAI;AACFT,kBAAGU,UAAH,CAAcD,QAAd;;AACA,WAAO,IAAP;AACD,GAHD,CAGE,OAAOE,KAAP,EAAmB;AACnB;AACA,QAAIA,KAAK,CAACC,IAAN,KAAe,QAAnB,EAA6B;AAC3B,aAAO,KAAP;AACD;;AACD,UAAMD,KAAN;AACD;AACF","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"],"file":"fs.js"}
|
package/build/utils/modules.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/modules.ts"],"names":["statAsync","file","fs","promises","stat","fileExistsAsync","isFile","directoryExistsAsync","isDirectory","fileExists","statSync"
|
|
1
|
+
{"version":3,"sources":["../../src/utils/modules.ts"],"names":["statAsync","file","fs","promises","stat","fileExistsAsync","isFile","directoryExistsAsync","isDirectory","fileExists","statSync"],"mappings":";;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAeA,SAAf,CAAyBC,IAAzB,EAAiE;AAC/D,MAAI;AACF,WAAO,MAAMC,cAAGC,QAAH,CAAYC,IAAZ,CAAiBH,IAAjB,CAAb;AACD,GAFD,CAEE,MAAM;AACN,WAAO,IAAP;AACD;AACF;;AAEM,eAAeI,eAAf,CAA+BJ,IAA/B,EAA+D;AAAA;;AACpE,sDAAQ,MAAMD,SAAS,CAACC,IAAD,CAAvB,qDAAO,iBAAyBK,MAAzB,EAAP,yEAA4C,KAA5C;AACD;;AAEM,eAAeC,oBAAf,CAAoCN,IAApC,EAAoE;AAAA;;AACzE,uDAAQ,MAAMD,SAAS,CAACC,IAAD,CAAvB,sDAAO,kBAAyBO,WAAzB,EAAP,yEAAiD,KAAjD;AACD;;AAEM,SAASC,UAAT,CAAoBR,IAApB,EAA2C;AAChD,MAAI;AACF,WAAOC,cAAGQ,QAAH,CAAYT,IAAZ,EAAkBK,MAAlB,EAAP;AACD,GAFD,CAEE,MAAM;AACN,WAAO,KAAP;AACD;AACF","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"],"file":"modules.js"}
|
package/build/utils/versions.js
CHANGED
|
@@ -29,7 +29,7 @@ function gteSdkVersion(exp, sdkVersion) {
|
|
|
29
29
|
|
|
30
30
|
try {
|
|
31
31
|
return _semver().default.gte(exp.sdkVersion, sdkVersion);
|
|
32
|
-
} catch
|
|
32
|
+
} catch {
|
|
33
33
|
throw new Error(`${exp.sdkVersion} is not a valid version. Must be in the form of x.y.z`);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -45,7 +45,7 @@ function lteSdkVersion(exp, sdkVersion) {
|
|
|
45
45
|
|
|
46
46
|
try {
|
|
47
47
|
return _semver().default.lte(exp.sdkVersion, sdkVersion);
|
|
48
|
-
} catch
|
|
48
|
+
} catch {
|
|
49
49
|
throw new Error(`${exp.sdkVersion} is not a valid version. Must be in the form of x.y.z`);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/versions.ts"],"names":["gteSdkVersion","exp","sdkVersion","semver","gte","
|
|
1
|
+
{"version":3,"sources":["../../src/utils/versions.ts"],"names":["gteSdkVersion","exp","sdkVersion","semver","gte","Error","lteSdkVersion","lte"],"mappings":";;;;;;;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAEO,SAASA,aAAT,CAAuBC,GAAvB,EAA4DC,UAA5D,EAAyF;AAC9F,MAAI,CAACD,GAAG,CAACC,UAAT,EAAqB;AACnB,WAAO,KAAP;AACD;;AAED,MAAID,GAAG,CAACC,UAAJ,KAAmB,aAAvB,EAAsC;AACpC,WAAO,IAAP;AACD;;AAED,MAAI;AACF,WAAOC,kBAAOC,GAAP,CAAWH,GAAG,CAACC,UAAf,EAA2BA,UAA3B,CAAP;AACD,GAFD,CAEE,MAAM;AACN,UAAM,IAAIG,KAAJ,CAAW,GAAEJ,GAAG,CAACC,UAAW,uDAA5B,CAAN;AACD;AACF;;AAEM,SAASI,aAAT,CAAuBL,GAAvB,EAA4DC,UAA5D,EAAyF;AAC9F,MAAI,CAACD,GAAG,CAACC,UAAT,EAAqB;AACnB,WAAO,KAAP;AACD;;AAED,MAAID,GAAG,CAACC,UAAJ,KAAmB,aAAvB,EAAsC;AACpC,WAAO,KAAP;AACD;;AAED,MAAI;AACF,WAAOC,kBAAOI,GAAP,CAAWN,GAAG,CAACC,UAAf,EAA2BA,UAA3B,CAAP;AACD,GAFD,CAEE,MAAM;AACN,UAAM,IAAIG,KAAJ,CAAW,GAAEJ,GAAG,CAACC,UAAW,uDAA5B,CAAN;AACD;AACF","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"],"file":"versions.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/config-plugins",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.3",
|
|
4
4
|
"description": "A library for Expo config plugins",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -33,14 +33,13 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@expo/config-types": "^44.0.0",
|
|
36
|
-
"@expo/json-file": "8.2.
|
|
37
|
-
"@expo/plist": "0.0.
|
|
36
|
+
"@expo/json-file": "8.2.36",
|
|
37
|
+
"@expo/plist": "0.0.18",
|
|
38
38
|
"@expo/sdk-runtime-versions": "^1.0.0",
|
|
39
39
|
"@react-native/normalize-color": "^2.0.0",
|
|
40
40
|
"chalk": "^4.1.2",
|
|
41
41
|
"debug": "^4.3.1",
|
|
42
42
|
"find-up": "~5.0.0",
|
|
43
|
-
"fs-extra": "9.0.0",
|
|
44
43
|
"getenv": "^1.0.0",
|
|
45
44
|
"glob": "7.1.6",
|
|
46
45
|
"resolve-from": "^5.0.0",
|
|
@@ -52,7 +51,6 @@
|
|
|
52
51
|
"devDependencies": {
|
|
53
52
|
"@types/debug": "^4.1.5",
|
|
54
53
|
"@types/find-up": "^4.0.0",
|
|
55
|
-
"@types/fs-extra": "^9.0.1",
|
|
56
54
|
"@types/xml2js": "^0.4.5"
|
|
57
55
|
},
|
|
58
56
|
"publishConfig": {
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ExpoConfig } from '@expo/config-types';
|
|
2
|
-
import type { ConfigPlugin } from '../Plugin.types';
|
|
3
|
-
import type { PropertiesItem } from './Properties';
|
|
4
|
-
export declare const JS_ENGINE_PROP_KEY = "expo.jsEngine";
|
|
5
|
-
export declare const DEFAULT_JS_ENGINE = "jsc";
|
|
6
|
-
export declare const withJsEngineGradleProps: ConfigPlugin;
|
|
7
|
-
export declare function getJsEngine(config: Pick<ExpoConfig, 'android' | 'jsEngine'>): "hermes" | "jsc";
|
|
8
|
-
export declare function setJsEngine(config: Pick<ExpoConfig, 'android' | 'jsEngine'>, gradleProperties: PropertiesItem[]): PropertiesItem[];
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.JS_ENGINE_PROP_KEY = exports.DEFAULT_JS_ENGINE = void 0;
|
|
7
|
-
exports.getJsEngine = getJsEngine;
|
|
8
|
-
exports.setJsEngine = setJsEngine;
|
|
9
|
-
exports.withJsEngineGradleProps = void 0;
|
|
10
|
-
|
|
11
|
-
function _androidPlugins() {
|
|
12
|
-
const data = require("../plugins/android-plugins");
|
|
13
|
-
|
|
14
|
-
_androidPlugins = function () {
|
|
15
|
-
return data;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
return data;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const JS_ENGINE_PROP_KEY = 'expo.jsEngine';
|
|
22
|
-
exports.JS_ENGINE_PROP_KEY = JS_ENGINE_PROP_KEY;
|
|
23
|
-
const DEFAULT_JS_ENGINE = 'jsc';
|
|
24
|
-
exports.DEFAULT_JS_ENGINE = DEFAULT_JS_ENGINE;
|
|
25
|
-
|
|
26
|
-
const withJsEngineGradleProps = config => {
|
|
27
|
-
return (0, _androidPlugins().withGradleProperties)(config, config => {
|
|
28
|
-
config.modResults = setJsEngine(config, config.modResults);
|
|
29
|
-
return config;
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
exports.withJsEngineGradleProps = withJsEngineGradleProps;
|
|
34
|
-
|
|
35
|
-
function getJsEngine(config) {
|
|
36
|
-
var _ref, _config$android$jsEng, _config$android;
|
|
37
|
-
|
|
38
|
-
return (_ref = (_config$android$jsEng = (_config$android = config.android) === null || _config$android === void 0 ? void 0 : _config$android.jsEngine) !== null && _config$android$jsEng !== void 0 ? _config$android$jsEng : config.jsEngine) !== null && _ref !== void 0 ? _ref : DEFAULT_JS_ENGINE;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function setJsEngine(config, gradleProperties) {
|
|
42
|
-
var _ref2, _config$android$jsEng2, _config$android2;
|
|
43
|
-
|
|
44
|
-
const oldPropIndex = gradleProperties.findIndex(prop => prop.type === 'property' && prop.key === JS_ENGINE_PROP_KEY);
|
|
45
|
-
const newProp = {
|
|
46
|
-
type: 'property',
|
|
47
|
-
key: JS_ENGINE_PROP_KEY,
|
|
48
|
-
value: (_ref2 = (_config$android$jsEng2 = (_config$android2 = config.android) === null || _config$android2 === void 0 ? void 0 : _config$android2.jsEngine) !== null && _config$android$jsEng2 !== void 0 ? _config$android$jsEng2 : config.jsEngine) !== null && _ref2 !== void 0 ? _ref2 : DEFAULT_JS_ENGINE
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
if (oldPropIndex >= 0) {
|
|
52
|
-
gradleProperties[oldPropIndex] = newProp;
|
|
53
|
-
} else {
|
|
54
|
-
gradleProperties.push(newProp);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return gradleProperties;
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=JsEngine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/android/JsEngine.ts"],"names":["JS_ENGINE_PROP_KEY","DEFAULT_JS_ENGINE","withJsEngineGradleProps","config","modResults","setJsEngine","getJsEngine","android","jsEngine","gradleProperties","oldPropIndex","findIndex","prop","type","key","newProp","value","push"],"mappings":";;;;;;;;;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGO,MAAMA,kBAAkB,GAAG,eAA3B;;AACA,MAAMC,iBAAiB,GAAG,KAA1B;;;AAEA,MAAMC,uBAAqC,GAAGC,MAAM,IAAI;AAC7D,SAAO,4CAAqBA,MAArB,EAA6BA,MAAM,IAAI;AAC5CA,IAAAA,MAAM,CAACC,UAAP,GAAoBC,WAAW,CAACF,MAAD,EAASA,MAAM,CAACC,UAAhB,CAA/B;AACA,WAAOD,MAAP;AACD,GAHM,CAAP;AAID,CALM;;;;AAOA,SAASG,WAAT,CAAqBH,MAArB,EAAuE;AAAA;;AAC5E,6DAAOA,MAAM,CAACI,OAAd,oDAAO,gBAAgBC,QAAvB,yEAAmCL,MAAM,CAACK,QAA1C,uCAAsDP,iBAAtD;AACD;;AAEM,SAASI,WAAT,CACLF,MADK,EAELM,gBAFK,EAGa;AAAA;;AAClB,QAAMC,YAAY,GAAGD,gBAAgB,CAACE,SAAjB,CACnBC,IAAI,IAAIA,IAAI,CAACC,IAAL,KAAc,UAAd,IAA4BD,IAAI,CAACE,GAAL,KAAad,kBAD9B,CAArB;AAGA,QAAMe,OAAuB,GAAG;AAC9BF,IAAAA,IAAI,EAAE,UADwB;AAE9BC,IAAAA,GAAG,EAAEd,kBAFyB;AAG9BgB,IAAAA,KAAK,yDAAEb,MAAM,CAACI,OAAT,qDAAE,iBAAgBC,QAAlB,2EAA8BL,MAAM,CAACK,QAArC,yCAAiDP;AAHxB,GAAhC;;AAMA,MAAIS,YAAY,IAAI,CAApB,EAAuB;AACrBD,IAAAA,gBAAgB,CAACC,YAAD,CAAhB,GAAiCK,OAAjC;AACD,GAFD,MAEO;AACLN,IAAAA,gBAAgB,CAACQ,IAAjB,CAAsBF,OAAtB;AACD;;AAED,SAAON,gBAAP;AACD","sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\n\nimport type { ConfigPlugin } from '../Plugin.types';\nimport { withGradleProperties } from '../plugins/android-plugins';\nimport type { PropertiesItem } from './Properties';\n\nexport const JS_ENGINE_PROP_KEY = 'expo.jsEngine';\nexport const DEFAULT_JS_ENGINE = 'jsc';\n\nexport const withJsEngineGradleProps: ConfigPlugin = config => {\n return withGradleProperties(config, config => {\n config.modResults = setJsEngine(config, config.modResults);\n return config;\n });\n};\n\nexport function getJsEngine(config: Pick<ExpoConfig, 'android' | 'jsEngine'>) {\n return config.android?.jsEngine ?? config.jsEngine ?? DEFAULT_JS_ENGINE;\n}\n\nexport function setJsEngine(\n config: Pick<ExpoConfig, 'android' | 'jsEngine'>,\n gradleProperties: PropertiesItem[]\n): PropertiesItem[] {\n const oldPropIndex = gradleProperties.findIndex(\n prop => prop.type === 'property' && prop.key === JS_ENGINE_PROP_KEY\n );\n const newProp: PropertiesItem = {\n type: 'property',\n key: JS_ENGINE_PROP_KEY,\n value: config.android?.jsEngine ?? config.jsEngine ?? DEFAULT_JS_ENGINE,\n };\n\n if (oldPropIndex >= 0) {\n gradleProperties[oldPropIndex] = newProp;\n } else {\n gradleProperties.push(newProp);\n }\n\n return gradleProperties;\n}\n"],"file":"JsEngine.js"}
|
package/build/ios/JsEngine.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ExpoConfig } from '@expo/config-types';
|
|
2
|
-
import { JSONValue } from '@expo/json-file';
|
|
3
|
-
import type { ConfigPlugin } from '../Plugin.types';
|
|
4
|
-
export declare const JS_ENGINE_PROP_KEY = "expo.jsEngine";
|
|
5
|
-
export declare const DEFAULT_JS_ENGINE = "jsc";
|
|
6
|
-
export declare const withJsEnginePodfileProps: ConfigPlugin;
|
|
7
|
-
export declare function getJsEngine(config: Pick<ExpoConfig, 'ios' | 'jsEngine'>): "hermes" | "jsc";
|
|
8
|
-
export declare function setJsEngine(config: Pick<ExpoConfig, 'ios' | 'jsEngine'>, podfileProperties: Record<string, JSONValue>): Record<string, JSONValue>;
|
package/build/ios/JsEngine.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.JS_ENGINE_PROP_KEY = exports.DEFAULT_JS_ENGINE = void 0;
|
|
7
|
-
exports.getJsEngine = getJsEngine;
|
|
8
|
-
exports.setJsEngine = setJsEngine;
|
|
9
|
-
exports.withJsEnginePodfileProps = void 0;
|
|
10
|
-
|
|
11
|
-
function _iosPlugins() {
|
|
12
|
-
const data = require("../plugins/ios-plugins");
|
|
13
|
-
|
|
14
|
-
_iosPlugins = function () {
|
|
15
|
-
return data;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
return data;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const JS_ENGINE_PROP_KEY = 'expo.jsEngine';
|
|
22
|
-
exports.JS_ENGINE_PROP_KEY = JS_ENGINE_PROP_KEY;
|
|
23
|
-
const DEFAULT_JS_ENGINE = 'jsc';
|
|
24
|
-
exports.DEFAULT_JS_ENGINE = DEFAULT_JS_ENGINE;
|
|
25
|
-
|
|
26
|
-
const withJsEnginePodfileProps = config => {
|
|
27
|
-
return (0, _iosPlugins().withPodfileProperties)(config, config => {
|
|
28
|
-
config.modResults = setJsEngine(config, config.modResults);
|
|
29
|
-
return config;
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
exports.withJsEnginePodfileProps = withJsEnginePodfileProps;
|
|
34
|
-
|
|
35
|
-
function getJsEngine(config) {
|
|
36
|
-
var _ref, _config$ios$jsEngine, _config$ios;
|
|
37
|
-
|
|
38
|
-
return (_ref = (_config$ios$jsEngine = (_config$ios = config.ios) === null || _config$ios === void 0 ? void 0 : _config$ios.jsEngine) !== null && _config$ios$jsEngine !== void 0 ? _config$ios$jsEngine : config.jsEngine) !== null && _ref !== void 0 ? _ref : DEFAULT_JS_ENGINE;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function setJsEngine(config, podfileProperties) {
|
|
42
|
-
var _ref2, _config$ios$jsEngine2, _config$ios2;
|
|
43
|
-
|
|
44
|
-
podfileProperties[JS_ENGINE_PROP_KEY] = (_ref2 = (_config$ios$jsEngine2 = (_config$ios2 = config.ios) === null || _config$ios2 === void 0 ? void 0 : _config$ios2.jsEngine) !== null && _config$ios$jsEngine2 !== void 0 ? _config$ios$jsEngine2 : config.jsEngine) !== null && _ref2 !== void 0 ? _ref2 : DEFAULT_JS_ENGINE;
|
|
45
|
-
return podfileProperties;
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=JsEngine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ios/JsEngine.ts"],"names":["JS_ENGINE_PROP_KEY","DEFAULT_JS_ENGINE","withJsEnginePodfileProps","config","modResults","setJsEngine","getJsEngine","ios","jsEngine","podfileProperties"],"mappings":";;;;;;;;;;AAIA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEO,MAAMA,kBAAkB,GAAG,eAA3B;;AACA,MAAMC,iBAAiB,GAAG,KAA1B;;;AAEA,MAAMC,wBAAsC,GAAGC,MAAM,IAAI;AAC9D,SAAO,yCAAsBA,MAAtB,EAA8BA,MAAM,IAAI;AAC7CA,IAAAA,MAAM,CAACC,UAAP,GAAoBC,WAAW,CAACF,MAAD,EAASA,MAAM,CAACC,UAAhB,CAA/B;AACA,WAAOD,MAAP;AACD,GAHM,CAAP;AAID,CALM;;;;AAOA,SAASG,WAAT,CAAqBH,MAArB,EAAmE;AAAA;;AACxE,wDAAOA,MAAM,CAACI,GAAd,gDAAO,YAAYC,QAAnB,uEAA+BL,MAAM,CAACK,QAAtC,uCAAkDP,iBAAlD;AACD;;AAEM,SAASI,WAAT,CACLF,MADK,EAELM,iBAFK,EAGsB;AAAA;;AAC3BA,EAAAA,iBAAiB,CAACT,kBAAD,CAAjB,qDACEG,MAAM,CAACI,GADT,iDACE,aAAYC,QADd,yEAC0BL,MAAM,CAACK,QADjC,yCAC6CP,iBAD7C;AAEA,SAAOQ,iBAAP;AACD","sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\nimport { JSONValue } from '@expo/json-file';\n\nimport type { ConfigPlugin } from '../Plugin.types';\nimport { withPodfileProperties } from '../plugins/ios-plugins';\n\nexport const JS_ENGINE_PROP_KEY = 'expo.jsEngine';\nexport const DEFAULT_JS_ENGINE = 'jsc';\n\nexport const withJsEnginePodfileProps: ConfigPlugin = config => {\n return withPodfileProperties(config, config => {\n config.modResults = setJsEngine(config, config.modResults);\n return config;\n });\n};\n\nexport function getJsEngine(config: Pick<ExpoConfig, 'ios' | 'jsEngine'>) {\n return config.ios?.jsEngine ?? config.jsEngine ?? DEFAULT_JS_ENGINE;\n}\n\nexport function setJsEngine(\n config: Pick<ExpoConfig, 'ios' | 'jsEngine'>,\n podfileProperties: Record<string, JSONValue>\n): Record<string, JSONValue> {\n podfileProperties[JS_ENGINE_PROP_KEY] =\n config.ios?.jsEngine ?? config.jsEngine ?? DEFAULT_JS_ENGINE;\n return podfileProperties;\n}\n"],"file":"JsEngine.js"}
|