eas-cli 0.49.0 → 0.52.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.
- package/README.md +44 -43
- package/build/build/build.d.ts +6 -2
- package/build/build/build.js +191 -104
- package/build/build/ios/build.js +3 -1
- package/build/build/ios/credentials.js +2 -6
- package/build/build/local.js +1 -1
- package/build/build/runBuildAndSubmit.js +5 -1
- package/build/commands/update/index.d.ts +1 -0
- package/build/commands/update/index.js +27 -3
- package/build/credentials/android/actions/CreateGoogleServiceAccountKey.js +24 -9
- package/build/credentials/context.js +5 -0
- package/build/credentials/ios/IosCredentialsProvider.d.ts +0 -2
- package/build/credentials/ios/IosCredentialsProvider.js +0 -1
- package/build/credentials/ios/actions/AscApiKeyUtils.js +0 -1
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +1 -1
- package/build/credentials/ios/actions/CreateProvisioningProfile.js +1 -1
- package/build/credentials/ios/actions/SetUpBuildCredentials.d.ts +0 -2
- package/build/credentials/ios/actions/SetUpBuildCredentials.js +3 -1
- package/build/credentials/ios/actions/SetUpTargetBuildCredentials.d.ts +2 -2
- package/build/credentials/ios/actions/SetUpTargetBuildCredentials.js +2 -2
- package/build/credentials/ios/appstore/AppStoreApi.d.ts +5 -1
- package/build/credentials/ios/appstore/AppStoreApi.js +38 -15
- package/build/credentials/ios/appstore/ascApiKey.d.ts +21 -5
- package/build/credentials/ios/appstore/ascApiKey.js +28 -12
- package/build/credentials/ios/appstore/authenticate.d.ts +9 -18
- package/build/credentials/ios/appstore/authenticate.js +43 -3
- package/build/credentials/ios/appstore/authenticateTypes.d.ts +42 -0
- package/build/credentials/ios/appstore/authenticateTypes.js +16 -0
- package/build/credentials/ios/appstore/contractMessages.d.ts +3 -0
- package/build/credentials/ios/appstore/contractMessages.js +12 -0
- package/build/credentials/ios/appstore/distributionCertificate.d.ts +1 -1
- package/build/credentials/ios/appstore/ensureAppExists.d.ts +2 -2
- package/build/credentials/ios/appstore/ensureAppExists.js +12 -5
- package/build/credentials/ios/appstore/provisioningProfile.d.ts +1 -1
- package/build/credentials/ios/appstore/provisioningProfileAdhoc.d.ts +1 -1
- package/build/credentials/ios/appstore/pushKey.d.ts +4 -4
- package/build/credentials/ios/appstore/pushKey.js +8 -8
- package/build/credentials/ios/appstore/resolveCredentials.d.ts +10 -1
- package/build/credentials/ios/appstore/resolveCredentials.js +125 -3
- package/build/credentials/ios/types.d.ts +2 -0
- package/build/credentials/ios/utils/printCredentials.d.ts +1 -1
- package/build/credentials/manager/ManageIos.js +8 -7
- package/build/graphql/generated.d.ts +73 -0
- package/build/graphql/generated.js +16 -1
- package/build/graphql/types/Build.js +4 -0
- package/build/project/ios/entitlements.d.ts +8 -0
- package/build/{credentials/ios/appstore → project/ios}/entitlements.js +7 -19
- package/build/project/ios/target.d.ts +9 -3
- package/build/project/ios/target.js +68 -47
- package/build/project/publish.js +2 -1
- package/build/submit/android/ServiceAccountSource.js +1 -1
- package/build/submit/ios/AppProduce.d.ts +0 -1
- package/build/submit/ios/AppProduce.js +5 -6
- package/build/submit/ios/AppSpecificPasswordSource.js +2 -2
- package/build/submit/utils/errors.js +6 -2
- package/build/utils/code-signing.d.ts +0 -5
- package/build/utils/code-signing.js +16 -65
- package/oclif.manifest.json +1 -1
- package/package.json +11 -11
- package/build/credentials/ios/appstore/entitlements.d.ts +0 -4
|
@@ -18,10 +18,10 @@ Please remember that Apple Keys are not application specific!
|
|
|
18
18
|
* List all existing push keys on Apple servers.
|
|
19
19
|
* **Does not support App Store Connect API (CI).**
|
|
20
20
|
*/
|
|
21
|
-
async function listPushKeysAsync(
|
|
21
|
+
async function listPushKeysAsync(userAuthCtx) {
|
|
22
22
|
const spinner = (0, ora_1.ora)(`Fetching Apple push keys`).start();
|
|
23
23
|
try {
|
|
24
|
-
const context = (0, authenticate_1.getRequestContext)(
|
|
24
|
+
const context = (0, authenticate_1.getRequestContext)(userAuthCtx);
|
|
25
25
|
const keys = await apple_utils_1.Keys.getKeysAsync(context);
|
|
26
26
|
spinner.succeed(`Fetched Apple push keys`);
|
|
27
27
|
return keys;
|
|
@@ -36,19 +36,19 @@ exports.listPushKeysAsync = listPushKeysAsync;
|
|
|
36
36
|
* Create a new push key on Apple servers.
|
|
37
37
|
* **Does not support App Store Connect API (CI).**
|
|
38
38
|
*/
|
|
39
|
-
async function createPushKeyAsync(
|
|
39
|
+
async function createPushKeyAsync(userAuthCtx, name = `Expo Push Notifications Key ${(0, dateformat_1.default)('yyyymmddHHMMss')}`) {
|
|
40
40
|
var _a;
|
|
41
41
|
const spinner = (0, ora_1.ora)(`Creating Apple push key`).start();
|
|
42
42
|
try {
|
|
43
|
-
const context = (0, authenticate_1.getRequestContext)(
|
|
43
|
+
const context = (0, authenticate_1.getRequestContext)(userAuthCtx);
|
|
44
44
|
const key = await apple_utils_1.Keys.createKeyAsync(context, { name, isApns: true });
|
|
45
45
|
const apnsKeyP8 = await apple_utils_1.Keys.downloadKeyAsync(context, { id: key.id });
|
|
46
46
|
spinner.succeed(`Created Apple push key`);
|
|
47
47
|
return {
|
|
48
48
|
apnsKeyId: key.id,
|
|
49
49
|
apnsKeyP8,
|
|
50
|
-
teamId:
|
|
51
|
-
teamName:
|
|
50
|
+
teamId: userAuthCtx.team.id,
|
|
51
|
+
teamName: userAuthCtx.team.name,
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
catch (err) {
|
|
@@ -66,11 +66,11 @@ exports.createPushKeyAsync = createPushKeyAsync;
|
|
|
66
66
|
* Revoke an existing push key on Apple servers.
|
|
67
67
|
* **Does not support App Store Connect API (CI).**
|
|
68
68
|
*/
|
|
69
|
-
async function revokePushKeyAsync(
|
|
69
|
+
async function revokePushKeyAsync(userAuthCtx, ids) {
|
|
70
70
|
const name = `Apple push key${(ids === null || ids === void 0 ? void 0 : ids.length) === 1 ? '' : 's'}`;
|
|
71
71
|
const spinner = (0, ora_1.ora)(`Revoking ${name}`).start();
|
|
72
72
|
try {
|
|
73
|
-
const context = (0, authenticate_1.getRequestContext)(
|
|
73
|
+
const context = (0, authenticate_1.getRequestContext)(userAuthCtx);
|
|
74
74
|
await Promise.all(ids.map(id => apple_utils_1.Keys.revokeKeyAsync(context, { id })));
|
|
75
75
|
spinner.succeed(`Revoked ${name}`);
|
|
76
76
|
}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
/// <reference types="@expo/apple-utils/ts-declarations/expo__app-store" />
|
|
2
2
|
import { Auth } from '@expo/apple-utils';
|
|
3
|
+
import { MinimalAscApiKey } from '../credentials';
|
|
4
|
+
import { AppleTeamType, Team } from './authenticateTypes';
|
|
3
5
|
/**
|
|
4
6
|
* Get the username and possibly the password from the environment variables or the supplied options.
|
|
5
7
|
* Password is optional because it's only needed for authentication, but not for re-authentication.
|
|
6
8
|
*
|
|
7
9
|
* @param options
|
|
8
10
|
*/
|
|
9
|
-
export declare function
|
|
11
|
+
export declare function resolveUserCredentialsAsync(options: Partial<Auth.UserCredentials>): Promise<Partial<Auth.UserCredentials>>;
|
|
12
|
+
export declare function hasAscEnvVars(): boolean;
|
|
13
|
+
export declare function resolveAscApiKeyAsync(ascApiKey?: MinimalAscApiKey): Promise<MinimalAscApiKey>;
|
|
14
|
+
export declare function resolveAppleTeamAsync(options?: {
|
|
15
|
+
teamId?: string;
|
|
16
|
+
teamName?: string;
|
|
17
|
+
teamType?: AppleTeamType;
|
|
18
|
+
}): Promise<Team>;
|
|
10
19
|
export declare function promptPasswordAsync({ username, }: Pick<Auth.UserCredentials, 'username'>): Promise<string>;
|
|
11
20
|
export declare function deletePasswordAsync({ username, }: Pick<Auth.UserCredentials, 'username'>): Promise<boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deletePasswordAsync = exports.promptPasswordAsync = exports.
|
|
3
|
+
exports.deletePasswordAsync = exports.promptPasswordAsync = exports.resolveAppleTeamAsync = exports.resolveAscApiKeyAsync = exports.hasAscEnvVars = exports.resolveUserCredentialsAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const apple_utils_1 = require("@expo/apple-utils");
|
|
6
6
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
@@ -8,6 +8,7 @@ const fs = tslib_1.__importStar(require("fs-extra"));
|
|
|
8
8
|
const wrap_ansi_1 = tslib_1.__importDefault(require("wrap-ansi"));
|
|
9
9
|
const log_1 = tslib_1.__importStar(require("../../../log"));
|
|
10
10
|
const prompts_1 = require("../../../prompts");
|
|
11
|
+
const authenticateTypes_1 = require("./authenticateTypes");
|
|
11
12
|
const Keychain = tslib_1.__importStar(require("./keychain"));
|
|
12
13
|
/**
|
|
13
14
|
* Get the username and possibly the password from the environment variables or the supplied options.
|
|
@@ -15,14 +16,135 @@ const Keychain = tslib_1.__importStar(require("./keychain"));
|
|
|
15
16
|
*
|
|
16
17
|
* @param options
|
|
17
18
|
*/
|
|
18
|
-
async function
|
|
19
|
+
async function resolveUserCredentialsAsync(options) {
|
|
19
20
|
const credentials = getAppleIdFromEnvironmentOrOptions(options);
|
|
20
21
|
if (!credentials.username) {
|
|
21
22
|
credentials.username = await promptUsernameAsync();
|
|
22
23
|
}
|
|
23
24
|
return credentials;
|
|
24
25
|
}
|
|
25
|
-
exports.
|
|
26
|
+
exports.resolveUserCredentialsAsync = resolveUserCredentialsAsync;
|
|
27
|
+
function hasAscEnvVars() {
|
|
28
|
+
return (!!process.env.EXPO_ASC_API_KEY_PATH ||
|
|
29
|
+
!!process.env.EXPO_ASC_KEY_ID ||
|
|
30
|
+
!!process.env.EXPO_ASC_ISSUER_ID);
|
|
31
|
+
}
|
|
32
|
+
exports.hasAscEnvVars = hasAscEnvVars;
|
|
33
|
+
async function resolveAscApiKeyAsync(ascApiKey) {
|
|
34
|
+
const passedKeyP8 = await getAscKeyP8FromEnvironmentOrOptionsAsync(ascApiKey);
|
|
35
|
+
const passedKeyId = await getAscKeyIdFromEnvironmentOrOptionsAsync(ascApiKey);
|
|
36
|
+
const passedIssuerId = await getAscIssuerIdFromEnvironmentOrOptionsAsync(ascApiKey);
|
|
37
|
+
return {
|
|
38
|
+
keyP8: passedKeyP8,
|
|
39
|
+
keyId: passedKeyId,
|
|
40
|
+
issuerId: passedIssuerId,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
exports.resolveAscApiKeyAsync = resolveAscApiKeyAsync;
|
|
44
|
+
async function getAscKeyP8FromEnvironmentOrOptionsAsync(ascApiKey) {
|
|
45
|
+
if (ascApiKey === null || ascApiKey === void 0 ? void 0 : ascApiKey.keyP8) {
|
|
46
|
+
return ascApiKey === null || ascApiKey === void 0 ? void 0 : ascApiKey.keyP8;
|
|
47
|
+
}
|
|
48
|
+
else if (process.env.EXPO_ASC_API_KEY_PATH) {
|
|
49
|
+
return await fs.readFile(process.env.EXPO_ASC_API_KEY_PATH, 'utf-8');
|
|
50
|
+
}
|
|
51
|
+
const { ascApiKeyPath } = await (0, prompts_1.promptAsync)({
|
|
52
|
+
type: 'text',
|
|
53
|
+
name: 'ascApiKeyPath',
|
|
54
|
+
message: `Path to ASC Api Key Path (.p8):`,
|
|
55
|
+
validate: (val) => val !== '',
|
|
56
|
+
});
|
|
57
|
+
return await fs.readFile(ascApiKeyPath, 'utf-8');
|
|
58
|
+
}
|
|
59
|
+
async function getAscKeyIdFromEnvironmentOrOptionsAsync(ascApiKey) {
|
|
60
|
+
if (ascApiKey === null || ascApiKey === void 0 ? void 0 : ascApiKey.keyId) {
|
|
61
|
+
return ascApiKey === null || ascApiKey === void 0 ? void 0 : ascApiKey.keyId;
|
|
62
|
+
}
|
|
63
|
+
else if (process.env.EXPO_ASC_KEY_ID) {
|
|
64
|
+
return process.env.EXPO_ASC_KEY_ID;
|
|
65
|
+
}
|
|
66
|
+
const { ascApiKeyId } = await (0, prompts_1.promptAsync)({
|
|
67
|
+
type: 'text',
|
|
68
|
+
name: 'ascApiKeyId',
|
|
69
|
+
message: `ASC Api Key ID:`,
|
|
70
|
+
validate: (val) => val !== '',
|
|
71
|
+
});
|
|
72
|
+
return ascApiKeyId;
|
|
73
|
+
}
|
|
74
|
+
async function getAscIssuerIdFromEnvironmentOrOptionsAsync(ascApiKey) {
|
|
75
|
+
if (ascApiKey === null || ascApiKey === void 0 ? void 0 : ascApiKey.issuerId) {
|
|
76
|
+
return ascApiKey === null || ascApiKey === void 0 ? void 0 : ascApiKey.issuerId;
|
|
77
|
+
}
|
|
78
|
+
else if (process.env.EXPO_ASC_ISSUER_ID) {
|
|
79
|
+
return process.env.EXPO_ASC_ISSUER_ID;
|
|
80
|
+
}
|
|
81
|
+
const { ascIssuerId } = await (0, prompts_1.promptAsync)({
|
|
82
|
+
type: 'text',
|
|
83
|
+
name: 'ascIssuerId',
|
|
84
|
+
message: `ASC Issuer ID:`,
|
|
85
|
+
validate: (val) => val !== '',
|
|
86
|
+
});
|
|
87
|
+
return ascIssuerId;
|
|
88
|
+
}
|
|
89
|
+
function isAppleTeamType(maybeTeamType) {
|
|
90
|
+
return maybeTeamType in authenticateTypes_1.AppleTeamType;
|
|
91
|
+
}
|
|
92
|
+
function assertAppleTeamType(maybeTeamType) {
|
|
93
|
+
if (!isAppleTeamType(maybeTeamType)) {
|
|
94
|
+
throw new Error(`Invalid Apple Team Type: ${maybeTeamType}. Must be one of ${Object.keys(authenticateTypes_1.AppleTeamType).join(', ')}`);
|
|
95
|
+
}
|
|
96
|
+
return maybeTeamType;
|
|
97
|
+
}
|
|
98
|
+
function resolveAppleTeamTypeFromEnvironment() {
|
|
99
|
+
if (!process.env.EXPO_APPLE_TEAM_TYPE) {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
return assertAppleTeamType(process.env.EXPO_APPLE_TEAM_TYPE);
|
|
103
|
+
}
|
|
104
|
+
async function getAppleTeamIdFromEnvironmentOrOptionsAsync(options) {
|
|
105
|
+
if (options.teamId) {
|
|
106
|
+
return options.teamId;
|
|
107
|
+
}
|
|
108
|
+
else if (process.env.EXPO_APPLE_TEAM_ID) {
|
|
109
|
+
return process.env.EXPO_APPLE_TEAM_ID;
|
|
110
|
+
}
|
|
111
|
+
const { appleTeamId } = await (0, prompts_1.promptAsync)({
|
|
112
|
+
type: 'text',
|
|
113
|
+
name: 'appleTeamId',
|
|
114
|
+
message: `Apple Team ID:`,
|
|
115
|
+
validate: (val) => val !== '',
|
|
116
|
+
});
|
|
117
|
+
return appleTeamId;
|
|
118
|
+
}
|
|
119
|
+
async function getAppleTeamTypeFromEnvironmentOrOptionsAsync(options) {
|
|
120
|
+
if (options.teamType) {
|
|
121
|
+
return options.teamType;
|
|
122
|
+
}
|
|
123
|
+
const appleTeamTypeFromEnvironment = resolveAppleTeamTypeFromEnvironment();
|
|
124
|
+
if (appleTeamTypeFromEnvironment) {
|
|
125
|
+
return appleTeamTypeFromEnvironment;
|
|
126
|
+
}
|
|
127
|
+
const { appleTeamType } = await (0, prompts_1.promptAsync)({
|
|
128
|
+
type: 'select',
|
|
129
|
+
message: 'Select your Apple Team Type:',
|
|
130
|
+
name: 'appleTeamType',
|
|
131
|
+
choices: [
|
|
132
|
+
{ title: 'Enterprise', value: authenticateTypes_1.AppleTeamType.IN_HOUSE },
|
|
133
|
+
{ title: 'Company/Organization', value: authenticateTypes_1.AppleTeamType.COMPANY_OR_ORGANIZATION },
|
|
134
|
+
{ title: 'Individual', value: authenticateTypes_1.AppleTeamType.INDIVIDUAL },
|
|
135
|
+
],
|
|
136
|
+
});
|
|
137
|
+
return appleTeamType;
|
|
138
|
+
}
|
|
139
|
+
async function resolveAppleTeamAsync(options = {}) {
|
|
140
|
+
const passedTeamType = await getAppleTeamTypeFromEnvironmentOrOptionsAsync(options);
|
|
141
|
+
return {
|
|
142
|
+
id: await getAppleTeamIdFromEnvironmentOrOptionsAsync(options),
|
|
143
|
+
name: options.teamName,
|
|
144
|
+
inHouse: passedTeamType === authenticateTypes_1.AppleTeamType.IN_HOUSE,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
exports.resolveAppleTeamAsync = resolveAppleTeamAsync;
|
|
26
148
|
function getAppleIdFromEnvironmentOrOptions({ username, password, ...userCredentials }) {
|
|
27
149
|
const passedAppleId = username || process.env.EXPO_APPLE_ID;
|
|
28
150
|
// Only resolve the password if the username was provided.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSONObject } from '@expo/json-file';
|
|
1
2
|
import { CommonIosAppCredentialsFragment, IosAppBuildCredentialsFragment } from '../../graphql/generated';
|
|
2
3
|
import { Account } from '../../user/Account';
|
|
3
4
|
export interface App {
|
|
@@ -9,6 +10,7 @@ export interface Target {
|
|
|
9
10
|
buildConfiguration?: string;
|
|
10
11
|
bundleIdentifier: string;
|
|
11
12
|
parentBundleIdentifier?: string;
|
|
13
|
+
entitlements: JSONObject;
|
|
12
14
|
}
|
|
13
15
|
export interface TargetCredentials {
|
|
14
16
|
distributionCertificate: {
|
|
@@ -2,4 +2,4 @@ import { AppLookupParams } from '../api/GraphqlClient';
|
|
|
2
2
|
import { App, IosAppBuildCredentialsMap, IosAppCredentialsMap, Target } from '../types';
|
|
3
3
|
export declare function displayEmptyIosCredentials(appLookupParams: AppLookupParams): void;
|
|
4
4
|
export declare function displayIosCredentials(app: App, appCredentialsMap: IosAppCredentialsMap, targets: Target[]): void;
|
|
5
|
-
export declare function displayProjectCredentials(app: App, appBuildCredentials: IosAppBuildCredentialsMap, targets: Target[]): void;
|
|
5
|
+
export declare function displayProjectCredentials(app: App, appBuildCredentials: IosAppBuildCredentialsMap, targets: Omit<Target, 'entitlements'>[]): void;
|
|
@@ -34,7 +34,6 @@ const SetUpBuildCredentialsFromCredentialsJson_1 = require("../ios/actions/SetUp
|
|
|
34
34
|
const SetUpProvisioningProfile_1 = require("../ios/actions/SetUpProvisioningProfile");
|
|
35
35
|
const SetUpPushKey_1 = require("../ios/actions/SetUpPushKey");
|
|
36
36
|
const UpdateCredentialsJson_1 = require("../ios/actions/UpdateCredentialsJson");
|
|
37
|
-
const entitlements_1 = require("../ios/appstore/entitlements");
|
|
38
37
|
const printCredentials_1 = require("../ios/utils/printCredentials");
|
|
39
38
|
const Actions_1 = require("./Actions");
|
|
40
39
|
const HelperActions_1 = require("./HelperActions");
|
|
@@ -158,7 +157,12 @@ class ManageIos {
|
|
|
158
157
|
nonInteractive: ctx.nonInteractive,
|
|
159
158
|
exp: ctx.exp,
|
|
160
159
|
}, buildProfile);
|
|
161
|
-
const targets = await (0, target_1.resolveTargetsAsync)({
|
|
160
|
+
const targets = await (0, target_1.resolveTargetsAsync)({
|
|
161
|
+
exp: ctx.exp,
|
|
162
|
+
projectDir: ctx.projectDir,
|
|
163
|
+
xcodeBuildContext,
|
|
164
|
+
env: buildProfile.env,
|
|
165
|
+
});
|
|
162
166
|
return {
|
|
163
167
|
app,
|
|
164
168
|
targets,
|
|
@@ -185,16 +189,13 @@ class ManageIos {
|
|
|
185
189
|
}
|
|
186
190
|
}
|
|
187
191
|
async runProjectSpecificActionAsync(ctx, app, targets, buildProfile, action) {
|
|
188
|
-
var _a
|
|
192
|
+
var _a;
|
|
189
193
|
if (action === Actions_1.IosActionType.SetUpBuildCredentials) {
|
|
190
194
|
await new SetUpBuildCredentials_1.SetUpBuildCredentials({
|
|
191
195
|
app,
|
|
192
196
|
targets,
|
|
193
197
|
distribution: buildProfile.distribution,
|
|
194
198
|
enterpriseProvisioning: buildProfile.enterpriseProvisioning,
|
|
195
|
-
iosCapabilitiesOptions: {
|
|
196
|
-
entitlements: await (0, entitlements_1.getManagedEntitlementsJsonAsync)(ctx.projectDir, (_a = buildProfile.env) !== null && _a !== void 0 ? _a : {}),
|
|
197
|
-
},
|
|
198
199
|
}).runAsync(ctx);
|
|
199
200
|
return;
|
|
200
201
|
}
|
|
@@ -230,7 +231,7 @@ class ManageIos {
|
|
|
230
231
|
}
|
|
231
232
|
case Actions_1.IosActionType.RemoveProvisioningProfile: {
|
|
232
233
|
const iosAppCredentials = await ctx.ios.getIosAppCredentialsWithCommonFieldsAsync(appLookupParams);
|
|
233
|
-
const provisioningProfile = (
|
|
234
|
+
const provisioningProfile = (_a = iosAppCredentials === null || iosAppCredentials === void 0 ? void 0 : iosAppCredentials.iosAppBuildCredentialsList.find(buildCredentials => buildCredentials.iosDistributionType === distributionType)) === null || _a === void 0 ? void 0 : _a.provisioningProfile;
|
|
234
235
|
if (!provisioningProfile) {
|
|
235
236
|
log_1.default.log(`No provisioning profile associated with the ${distributionType} configuration of ${appLookupParams.projectName}`);
|
|
236
237
|
return;
|
|
@@ -93,6 +93,7 @@ export declare type Account = {
|
|
|
93
93
|
availableBuilds?: Maybe<Scalars['Int']>;
|
|
94
94
|
/** Billing information */
|
|
95
95
|
billing?: Maybe<Billing>;
|
|
96
|
+
billingPeriod: BillingPeriod;
|
|
96
97
|
/** Build Jobs associated with this account */
|
|
97
98
|
buildJobs: Array<BuildJob>;
|
|
98
99
|
/**
|
|
@@ -126,6 +127,8 @@ export declare type Account = {
|
|
|
126
127
|
/** @deprecated See isCurrent */
|
|
127
128
|
unlimitedBuilds: Scalars['Boolean'];
|
|
128
129
|
updatedAt: Scalars['DateTime'];
|
|
130
|
+
/** Account query object for querying EAS usage metrics */
|
|
131
|
+
usageMetrics: AccountUsageMetrics;
|
|
129
132
|
/** Pending user invitations for this account */
|
|
130
133
|
userInvitations: Array<UserInvitation>;
|
|
131
134
|
/** Actors associated with this account and permissions they hold */
|
|
@@ -179,6 +182,13 @@ export declare type AccountAppsArgs = {
|
|
|
179
182
|
limit: Scalars['Int'];
|
|
180
183
|
offset: Scalars['Int'];
|
|
181
184
|
};
|
|
185
|
+
/**
|
|
186
|
+
* An account is a container owning projects, credentials, billing and other organization
|
|
187
|
+
* data and settings. Actors may own and be members of accounts.
|
|
188
|
+
*/
|
|
189
|
+
export declare type AccountBillingPeriodArgs = {
|
|
190
|
+
date: Scalars['DateTime'];
|
|
191
|
+
};
|
|
182
192
|
/**
|
|
183
193
|
* An account is a container owning projects, credentials, billing and other organization
|
|
184
194
|
* data and settings. Actors may own and be members of accounts.
|
|
@@ -322,6 +332,22 @@ export declare type AccountQueryByIdArgs = {
|
|
|
322
332
|
export declare type AccountQueryByNameArgs = {
|
|
323
333
|
accountName: Scalars['String'];
|
|
324
334
|
};
|
|
335
|
+
export declare type AccountUsageMetric = {
|
|
336
|
+
__typename?: 'AccountUsageMetric';
|
|
337
|
+
metric: EasServiceMetric;
|
|
338
|
+
metricType: UsageMetricType;
|
|
339
|
+
timestamp: Scalars['DateTime'];
|
|
340
|
+
value: Scalars['Float'];
|
|
341
|
+
};
|
|
342
|
+
export declare type AccountUsageMetrics = {
|
|
343
|
+
__typename?: 'AccountUsageMetrics';
|
|
344
|
+
metricsForServiceMetric: Array<AccountUsageMetric>;
|
|
345
|
+
};
|
|
346
|
+
export declare type AccountUsageMetricsMetricsForServiceMetricArgs = {
|
|
347
|
+
granularity: UsageMetricsGranularity;
|
|
348
|
+
metric: EasServiceMetric;
|
|
349
|
+
timespan: UsageMetricsTimespan;
|
|
350
|
+
};
|
|
325
351
|
export declare type ActivityTimelineProjectActivity = {
|
|
326
352
|
activityTimestamp: Scalars['DateTime'];
|
|
327
353
|
actor?: Maybe<Actor>;
|
|
@@ -1232,6 +1258,12 @@ export declare type Billing = {
|
|
|
1232
1258
|
payment?: Maybe<PaymentDetails>;
|
|
1233
1259
|
subscription?: Maybe<SubscriptionDetails>;
|
|
1234
1260
|
};
|
|
1261
|
+
export declare type BillingPeriod = {
|
|
1262
|
+
__typename?: 'BillingPeriod';
|
|
1263
|
+
anchor: Scalars['DateTime'];
|
|
1264
|
+
end: Scalars['DateTime'];
|
|
1265
|
+
start: Scalars['DateTime'];
|
|
1266
|
+
};
|
|
1235
1267
|
/** Represents an EAS Build */
|
|
1236
1268
|
export declare type Build = ActivityTimelineProjectActivity & BuildOrBuildJob & {
|
|
1237
1269
|
__typename?: 'Build';
|
|
@@ -1246,9 +1278,12 @@ export declare type Build = ActivityTimelineProjectActivity & BuildOrBuildJob &
|
|
|
1246
1278
|
createdAt?: Maybe<Scalars['DateTime']>;
|
|
1247
1279
|
distribution?: Maybe<DistributionType>;
|
|
1248
1280
|
error?: Maybe<BuildError>;
|
|
1281
|
+
estimatedWaitTimeLeftSeconds?: Maybe<Scalars['Int']>;
|
|
1249
1282
|
expirationDate?: Maybe<Scalars['DateTime']>;
|
|
1250
1283
|
gitCommitHash?: Maybe<Scalars['String']>;
|
|
1251
1284
|
id: Scalars['ID'];
|
|
1285
|
+
/** Queue position is 1-indexed */
|
|
1286
|
+
initialQueuePosition?: Maybe<Scalars['Int']>;
|
|
1252
1287
|
initiatingActor?: Maybe<Actor>;
|
|
1253
1288
|
/** @deprecated User type is deprecated */
|
|
1254
1289
|
initiatingUser?: Maybe<User>;
|
|
@@ -1684,6 +1719,9 @@ export declare enum EasBuildDeprecationInfoType {
|
|
|
1684
1719
|
Internal = "INTERNAL",
|
|
1685
1720
|
UserFacing = "USER_FACING"
|
|
1686
1721
|
}
|
|
1722
|
+
export declare enum EasServiceMetric {
|
|
1723
|
+
ManifestRequests = "MANIFEST_REQUESTS"
|
|
1724
|
+
}
|
|
1687
1725
|
export declare type EditUpdateBranchInput = {
|
|
1688
1726
|
appId?: InputMaybe<Scalars['ID']>;
|
|
1689
1727
|
id?: InputMaybe<Scalars['ID']>;
|
|
@@ -2790,6 +2828,19 @@ export declare enum UploadSessionType {
|
|
|
2790
2828
|
EasBuildProjectSources = "EAS_BUILD_PROJECT_SOURCES",
|
|
2791
2829
|
EasSubmitAppArchive = "EAS_SUBMIT_APP_ARCHIVE"
|
|
2792
2830
|
}
|
|
2831
|
+
export declare enum UsageMetricType {
|
|
2832
|
+
Request = "REQUEST"
|
|
2833
|
+
}
|
|
2834
|
+
export declare enum UsageMetricsGranularity {
|
|
2835
|
+
Day = "DAY",
|
|
2836
|
+
Hour = "HOUR",
|
|
2837
|
+
Minute = "MINUTE",
|
|
2838
|
+
Total = "TOTAL"
|
|
2839
|
+
}
|
|
2840
|
+
export declare type UsageMetricsTimespan = {
|
|
2841
|
+
end: Scalars['DateTime'];
|
|
2842
|
+
start: Scalars['DateTime'];
|
|
2843
|
+
};
|
|
2793
2844
|
/** Represents a human (not robot) actor. */
|
|
2794
2845
|
export declare type User = Actor & {
|
|
2795
2846
|
__typename?: 'User';
|
|
@@ -2899,6 +2950,7 @@ export declare type UserInvitation = {
|
|
|
2899
2950
|
created: Scalars['DateTime'];
|
|
2900
2951
|
/** Email to which this invitation was sent */
|
|
2901
2952
|
email: Scalars['String'];
|
|
2953
|
+
expires: Scalars['DateTime'];
|
|
2902
2954
|
id: Scalars['ID'];
|
|
2903
2955
|
/** Account permissions to be granted upon acceptance of this invitation */
|
|
2904
2956
|
permissions: Array<Permission>;
|
|
@@ -2956,6 +3008,7 @@ export declare type UserInvitationPublicData = {
|
|
|
2956
3008
|
accountName: Scalars['String'];
|
|
2957
3009
|
created: Scalars['DateTime'];
|
|
2958
3010
|
email: Scalars['String'];
|
|
3011
|
+
expires: Scalars['DateTime'];
|
|
2959
3012
|
/** Email to which this invitation was sent */
|
|
2960
3013
|
id: Scalars['ID'];
|
|
2961
3014
|
};
|
|
@@ -5663,6 +5716,10 @@ export declare type CreateAndroidBuildMutation = {
|
|
|
5663
5716
|
appBuildVersion?: string | null;
|
|
5664
5717
|
runtimeVersion?: string | null;
|
|
5665
5718
|
gitCommitHash?: string | null;
|
|
5719
|
+
initialQueuePosition?: number | null;
|
|
5720
|
+
queuePosition?: number | null;
|
|
5721
|
+
estimatedWaitTimeLeftSeconds?: number | null;
|
|
5722
|
+
priority: BuildPriority;
|
|
5666
5723
|
createdAt?: any | null;
|
|
5667
5724
|
updatedAt?: any | null;
|
|
5668
5725
|
error?: {
|
|
@@ -5736,6 +5793,10 @@ export declare type CreateIosBuildMutation = {
|
|
|
5736
5793
|
appBuildVersion?: string | null;
|
|
5737
5794
|
runtimeVersion?: string | null;
|
|
5738
5795
|
gitCommitHash?: string | null;
|
|
5796
|
+
initialQueuePosition?: number | null;
|
|
5797
|
+
queuePosition?: number | null;
|
|
5798
|
+
estimatedWaitTimeLeftSeconds?: number | null;
|
|
5799
|
+
priority: BuildPriority;
|
|
5739
5800
|
createdAt?: any | null;
|
|
5740
5801
|
updatedAt?: any | null;
|
|
5741
5802
|
error?: {
|
|
@@ -6090,6 +6151,10 @@ export declare type BuildsByIdQuery = {
|
|
|
6090
6151
|
appBuildVersion?: string | null;
|
|
6091
6152
|
runtimeVersion?: string | null;
|
|
6092
6153
|
gitCommitHash?: string | null;
|
|
6154
|
+
initialQueuePosition?: number | null;
|
|
6155
|
+
queuePosition?: number | null;
|
|
6156
|
+
estimatedWaitTimeLeftSeconds?: number | null;
|
|
6157
|
+
priority: BuildPriority;
|
|
6093
6158
|
createdAt?: any | null;
|
|
6094
6159
|
updatedAt?: any | null;
|
|
6095
6160
|
error?: {
|
|
@@ -6159,6 +6224,10 @@ export declare type GetAllBuildsForAppQuery = {
|
|
|
6159
6224
|
appBuildVersion?: string | null;
|
|
6160
6225
|
runtimeVersion?: string | null;
|
|
6161
6226
|
gitCommitHash?: string | null;
|
|
6227
|
+
initialQueuePosition?: number | null;
|
|
6228
|
+
queuePosition?: number | null;
|
|
6229
|
+
estimatedWaitTimeLeftSeconds?: number | null;
|
|
6230
|
+
priority: BuildPriority;
|
|
6162
6231
|
createdAt?: any | null;
|
|
6163
6232
|
updatedAt?: any | null;
|
|
6164
6233
|
error?: {
|
|
@@ -6571,6 +6640,10 @@ export declare type BuildFragment = {
|
|
|
6571
6640
|
appBuildVersion?: string | null;
|
|
6572
6641
|
runtimeVersion?: string | null;
|
|
6573
6642
|
gitCommitHash?: string | null;
|
|
6643
|
+
initialQueuePosition?: number | null;
|
|
6644
|
+
queuePosition?: number | null;
|
|
6645
|
+
estimatedWaitTimeLeftSeconds?: number | null;
|
|
6646
|
+
priority: BuildPriority;
|
|
6574
6647
|
createdAt?: any | null;
|
|
6575
6648
|
updatedAt?: any | null;
|
|
6576
6649
|
error?: {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* For more info and docs, visit https://graphql-code-generator.com/
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.WebhookType = exports.UploadSessionType = exports.SubmissionStatus = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OfferType = exports.MailchimpTag = exports.MailchimpAudience = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.Feature = exports.EasBuildDeprecationInfoType = exports.DistributionType = exports.CacheControlScope = exports.BuildWorkflow = exports.BuildStatus = exports.BuildPriority = exports.BuildJobStatus = exports.BuildJobLogsFormat = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.AssetMetadataStatus = exports.AppsFilter = exports.AppleDeviceClass = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppPrivacy = exports.AppPlatform = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = void 0;
|
|
9
|
+
exports.WebhookType = exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.SubmissionStatus = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OfferType = exports.MailchimpTag = exports.MailchimpAudience = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.Feature = exports.EasServiceMetric = exports.EasBuildDeprecationInfoType = exports.DistributionType = exports.CacheControlScope = exports.BuildWorkflow = exports.BuildStatus = exports.BuildPriority = exports.BuildJobStatus = exports.BuildJobLogsFormat = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.AssetMetadataStatus = exports.AppsFilter = exports.AppleDeviceClass = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppPrivacy = exports.AppPlatform = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = void 0;
|
|
10
10
|
var ActivityTimelineProjectActivityType;
|
|
11
11
|
(function (ActivityTimelineProjectActivityType) {
|
|
12
12
|
ActivityTimelineProjectActivityType["Build"] = "BUILD";
|
|
@@ -145,6 +145,10 @@ var EasBuildDeprecationInfoType;
|
|
|
145
145
|
EasBuildDeprecationInfoType["Internal"] = "INTERNAL";
|
|
146
146
|
EasBuildDeprecationInfoType["UserFacing"] = "USER_FACING";
|
|
147
147
|
})(EasBuildDeprecationInfoType = exports.EasBuildDeprecationInfoType || (exports.EasBuildDeprecationInfoType = {}));
|
|
148
|
+
var EasServiceMetric;
|
|
149
|
+
(function (EasServiceMetric) {
|
|
150
|
+
EasServiceMetric["ManifestRequests"] = "MANIFEST_REQUESTS";
|
|
151
|
+
})(EasServiceMetric = exports.EasServiceMetric || (exports.EasServiceMetric = {}));
|
|
148
152
|
var Feature;
|
|
149
153
|
(function (Feature) {
|
|
150
154
|
/** Priority Builds */
|
|
@@ -281,6 +285,17 @@ var UploadSessionType;
|
|
|
281
285
|
UploadSessionType["EasBuildProjectSources"] = "EAS_BUILD_PROJECT_SOURCES";
|
|
282
286
|
UploadSessionType["EasSubmitAppArchive"] = "EAS_SUBMIT_APP_ARCHIVE";
|
|
283
287
|
})(UploadSessionType = exports.UploadSessionType || (exports.UploadSessionType = {}));
|
|
288
|
+
var UsageMetricType;
|
|
289
|
+
(function (UsageMetricType) {
|
|
290
|
+
UsageMetricType["Request"] = "REQUEST";
|
|
291
|
+
})(UsageMetricType = exports.UsageMetricType || (exports.UsageMetricType = {}));
|
|
292
|
+
var UsageMetricsGranularity;
|
|
293
|
+
(function (UsageMetricsGranularity) {
|
|
294
|
+
UsageMetricsGranularity["Day"] = "DAY";
|
|
295
|
+
UsageMetricsGranularity["Hour"] = "HOUR";
|
|
296
|
+
UsageMetricsGranularity["Minute"] = "MINUTE";
|
|
297
|
+
UsageMetricsGranularity["Total"] = "TOTAL";
|
|
298
|
+
})(UsageMetricsGranularity = exports.UsageMetricsGranularity || (exports.UsageMetricsGranularity = {}));
|
|
284
299
|
var WebhookType;
|
|
285
300
|
(function (WebhookType) {
|
|
286
301
|
WebhookType["Build"] = "BUILD";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { JSONObject } from '@expo/json-file';
|
|
2
|
+
interface Target {
|
|
3
|
+
buildConfiguration?: string;
|
|
4
|
+
targetName: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function getManagedApplicationTargetEntitlementsAsync(projectDir: string, env: Record<string, string>): Promise<JSONObject>;
|
|
7
|
+
export declare function getNativeTargetEntitlementsAsync(projectDir: string, target: Target): Promise<JSONObject | null>;
|
|
8
|
+
export {};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getNativeTargetEntitlementsAsync = exports.getManagedApplicationTargetEntitlementsAsync = void 0;
|
|
4
4
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
5
|
-
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
6
5
|
const prebuild_config_1 = require("@expo/prebuild-config");
|
|
7
|
-
const plist_1 = require("
|
|
8
|
-
async function
|
|
6
|
+
const plist_1 = require("../../utils/plist");
|
|
7
|
+
async function getManagedApplicationTargetEntitlementsAsync(projectDir, env) {
|
|
9
8
|
var _a;
|
|
10
9
|
const originalProcessEnv = process.env;
|
|
11
10
|
try {
|
|
@@ -25,21 +24,9 @@ async function getManagedEntitlementsJsonAsync(projectDir, env) {
|
|
|
25
24
|
process.env = originalProcessEnv;
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
|
-
exports.
|
|
29
|
-
async function
|
|
30
|
-
|
|
31
|
-
return (await getEntitlementsJsonAsync(projectDir)) || {};
|
|
32
|
-
}
|
|
33
|
-
else if (workflow === eas_build_job_1.Workflow.MANAGED) {
|
|
34
|
-
return await getManagedEntitlementsJsonAsync(projectDir, env);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
throw new Error(`Unknown workflow: ${workflow}`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.resolveEntitlementsJsonAsync = resolveEntitlementsJsonAsync;
|
|
41
|
-
async function getEntitlementsJsonAsync(projectDir) {
|
|
42
|
-
const entitlementsPath = config_plugins_1.IOSConfig.Paths.getEntitlementsPath(projectDir);
|
|
27
|
+
exports.getManagedApplicationTargetEntitlementsAsync = getManagedApplicationTargetEntitlementsAsync;
|
|
28
|
+
async function getNativeTargetEntitlementsAsync(projectDir, target) {
|
|
29
|
+
const entitlementsPath = config_plugins_1.IOSConfig.Entitlements.getEntitlementsPath(projectDir, target);
|
|
43
30
|
if (entitlementsPath) {
|
|
44
31
|
const plist = await (0, plist_1.readPlistAsync)(entitlementsPath);
|
|
45
32
|
return plist ? plist : null;
|
|
@@ -48,3 +35,4 @@ async function getEntitlementsJsonAsync(projectDir) {
|
|
|
48
35
|
return null;
|
|
49
36
|
}
|
|
50
37
|
}
|
|
38
|
+
exports.getNativeTargetEntitlementsAsync = getNativeTargetEntitlementsAsync;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
2
|
import { Target } from '../../credentials/ios/types';
|
|
3
3
|
import { XcodeBuildContext } from './scheme';
|
|
4
|
-
|
|
5
|
-
exp: ExpoConfig;
|
|
4
|
+
interface ResolveTargetOptions {
|
|
6
5
|
projectDir: string;
|
|
7
|
-
|
|
6
|
+
exp: ExpoConfig;
|
|
7
|
+
env?: Record<string, string>;
|
|
8
|
+
xcodeBuildContext: XcodeBuildContext;
|
|
9
|
+
}
|
|
10
|
+
export declare function resolveMangedProjectTargetsAsync({ exp, projectDir, xcodeBuildContext, env, }: ResolveTargetOptions): Promise<Target[]>;
|
|
11
|
+
export declare function resolveBareProjectTargetsAsync({ exp, projectDir, xcodeBuildContext, }: ResolveTargetOptions): Promise<Target[]>;
|
|
12
|
+
export declare function resolveTargetsAsync(opts: ResolveTargetOptions): Promise<Target[]>;
|
|
8
13
|
export declare function findApplicationTarget(targets: Target[]): Target;
|
|
9
14
|
export declare function findTargetByName(targets: Target[], name: string): Target;
|
|
15
|
+
export {};
|