eas-cli 19.0.0 → 19.0.1
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 +100 -100
- package/build/project/ios/entitlements.d.ts +2 -1
- package/build/project/ios/entitlements.js +56 -6
- package/build/project/ios/target.js +1 -1
- package/oclif.manifest.json +2219 -2219
- package/package.json +2 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { JSONObject } from '@expo/json-file';
|
|
2
|
+
import { Client } from '../../vcs/vcs';
|
|
2
3
|
interface Target {
|
|
3
4
|
buildConfiguration?: string;
|
|
4
5
|
targetName: string;
|
|
5
6
|
}
|
|
6
|
-
export declare function getManagedApplicationTargetEntitlementsAsync(projectDir: string, env: Record<string, string
|
|
7
|
+
export declare function getManagedApplicationTargetEntitlementsAsync(projectDir: string, env: Record<string, string>, vcsClient: Client): Promise<JSONObject>;
|
|
7
8
|
export declare function getNativeTargetEntitlementsAsync(projectDir: string, target: Target): Promise<JSONObject | null>;
|
|
8
9
|
export {};
|
|
@@ -2,15 +2,65 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getManagedApplicationTargetEntitlementsAsync = getManagedApplicationTargetEntitlementsAsync;
|
|
4
4
|
exports.getNativeTargetEntitlementsAsync = getNativeTargetEntitlementsAsync;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
5
6
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
7
|
+
const prebuild_config_1 = require("@expo/prebuild-config");
|
|
8
|
+
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
6
9
|
const expoCli_1 = require("../../utils/expoCli");
|
|
7
10
|
const plist_1 = require("../../utils/plist");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
const projectUtils_1 = require("../projectUtils");
|
|
12
|
+
const workflow_1 = require("../workflow");
|
|
13
|
+
async function getManagedApplicationTargetEntitlementsAsync(projectDir, env, vcsClient) {
|
|
14
|
+
let expoConfigError;
|
|
15
|
+
if ((0, projectUtils_1.isExpoInstalled)(projectDir)) {
|
|
16
|
+
try {
|
|
17
|
+
const { stdout } = await (0, expoCli_1.spawnExpoCommand)(projectDir, ['config', '--json', '--type', 'introspect'], {
|
|
18
|
+
env: {
|
|
19
|
+
...env,
|
|
20
|
+
EXPO_NO_DOTENV: '1',
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
const expWithMods = JSON.parse(stdout);
|
|
24
|
+
return expWithMods.ios?.entitlements ?? {};
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
expoConfigError = error;
|
|
28
|
+
log_1.default.warn(`Failed to read the app config from the project using the local Expo CLI: ${formatError(error)}`);
|
|
29
|
+
log_1.default.warn('Falling back to the version of "@expo/config" shipped with the EAS CLI.');
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
return await resolveManagedApplicationTargetEntitlementsWithBundledConfigAsync(projectDir, env, vcsClient);
|
|
34
|
+
}
|
|
35
|
+
catch (fallbackError) {
|
|
36
|
+
if (expoConfigError) {
|
|
37
|
+
throw new Error(`Failed to resolve iOS entitlements from Expo config. The local Expo CLI failed with: ${formatError(expoConfigError)}. The bundled config fallback also failed with: ${formatError(fallbackError)}`, { cause: fallbackError });
|
|
38
|
+
}
|
|
39
|
+
throw new Error(`Failed to resolve iOS entitlements from Expo config using the bundled config fallback: ${formatError(fallbackError)}`, { cause: fallbackError });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
async function resolveManagedApplicationTargetEntitlementsWithBundledConfigAsync(projectDir, env, vcsClient) {
|
|
43
|
+
const originalProcessEnv = process.env;
|
|
44
|
+
try {
|
|
45
|
+
process.env = {
|
|
46
|
+
...process.env,
|
|
47
|
+
...env,
|
|
48
|
+
};
|
|
49
|
+
const { exp } = await (0, prebuild_config_1.getPrebuildConfigAsync)(projectDir, { platforms: ['ios'] });
|
|
50
|
+
const expWithMods = await (0, config_plugins_1.compileModsAsync)(exp, {
|
|
51
|
+
projectRoot: projectDir,
|
|
52
|
+
platforms: ['ios'],
|
|
53
|
+
introspect: true,
|
|
54
|
+
ignoreExistingNativeFiles: await (0, workflow_1.hasIgnoredIosProjectAsync)(projectDir, vcsClient),
|
|
55
|
+
});
|
|
56
|
+
return expWithMods.ios?.entitlements ?? {};
|
|
57
|
+
}
|
|
58
|
+
finally {
|
|
59
|
+
process.env = originalProcessEnv;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function formatError(error) {
|
|
63
|
+
return error.stderr?.trim() || error.stdout?.trim() || error.message;
|
|
14
64
|
}
|
|
15
65
|
async function getNativeTargetEntitlementsAsync(projectDir, target) {
|
|
16
66
|
const entitlementsPath = config_plugins_1.IOSConfig.Entitlements.getEntitlementsPath(projectDir, target);
|
|
@@ -29,7 +29,7 @@ async function resolveManagedProjectTargetsAsync({ exp, projectDir, xcodeBuildCo
|
|
|
29
29
|
targetName: applicationTargetName,
|
|
30
30
|
buildConfiguration,
|
|
31
31
|
});
|
|
32
|
-
const applicationTargetEntitlements = await (0, entitlements_1.getManagedApplicationTargetEntitlementsAsync)(projectDir, env ?? {});
|
|
32
|
+
const applicationTargetEntitlements = await (0, entitlements_1.getManagedApplicationTargetEntitlementsAsync)(projectDir, env ?? {}, vcsClient);
|
|
33
33
|
const appExtensions = exp.extra?.eas?.build?.experimental?.ios?.appExtensions ?? [];
|
|
34
34
|
const { error } = AppExtensionsConfigSchema.validate(appExtensions, {
|
|
35
35
|
allowUnknown: false,
|