eas-cli 2.0.0 → 2.1.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 +65 -50
- package/build/branch/queries.js +11 -8
- package/build/build/android/graphql.js +2 -1
- package/build/build/android/prepareJob.js +3 -1
- package/build/build/ios/graphql.js +2 -1
- package/build/build/ios/prepareJob.js +3 -1
- package/build/commands/branch/delete.js +1 -1
- package/build/commands/build/index.js +55 -1
- package/build/commands/channel/delete.js +1 -1
- package/build/commands/device/delete.js +3 -2
- package/build/commands/open.d.ts +5 -0
- package/build/commands/open.js +40 -0
- package/build/commands/secret/delete.js +1 -1
- package/build/commands/update/configure.js +4 -4
- package/build/commands/update/delete.js +1 -1
- package/build/commands/webhook/delete.js +1 -1
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.d.ts +3 -1
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +5 -2
- package/build/credentials/ios/actions/CreateProvisioningProfile.d.ts +3 -1
- package/build/credentials/ios/actions/CreateProvisioningProfile.js +3 -2
- package/build/credentials/ios/actions/ProvisioningProfileUtils.d.ts +2 -1
- package/build/credentials/ios/actions/ProvisioningProfileUtils.js +4 -2
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.d.ts +8 -2
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +30 -18
- package/build/credentials/ios/actions/SetUpBuildCredentials.js +1 -0
- package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.d.ts +8 -2
- package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.js +6 -12
- package/build/credentials/ios/actions/SetUpProvisioningProfile.d.ts +3 -1
- package/build/credentials/ios/actions/SetUpProvisioningProfile.js +8 -5
- package/build/credentials/ios/actions/SetUpTargetBuildCredentials.d.ts +2 -0
- package/build/credentials/ios/actions/SetUpTargetBuildCredentials.js +5 -5
- package/build/credentials/ios/appstore/AppStoreApi.d.ts +7 -4
- package/build/credentials/ios/appstore/AppStoreApi.js +8 -8
- package/build/credentials/ios/appstore/Credentials.types.d.ts +0 -14
- package/build/credentials/ios/appstore/Credentials.types.js +0 -6
- package/build/credentials/ios/appstore/constants.d.ts +1 -0
- package/build/credentials/ios/appstore/constants.js +6 -0
- package/build/credentials/ios/appstore/distributionCertificate.js +1 -1
- package/build/credentials/ios/appstore/provisioningProfile.d.ts +5 -3
- package/build/credentials/ios/appstore/provisioningProfile.js +30 -7
- package/build/credentials/ios/appstore/provisioningProfileAdhoc.d.ts +3 -1
- package/build/credentials/ios/appstore/provisioningProfileAdhoc.js +10 -10
- package/build/credentials/ios/validators/validateProvisioningProfile.d.ts +2 -1
- package/build/credentials/ios/validators/validateProvisioningProfile.js +6 -4
- package/build/credentials/manager/ManageIos.js +8 -5
- package/build/devices/actions/create/developerPortalMethod.js +2 -2
- package/build/graphql/generated.d.ts +39 -0
- package/build/project/ios/target.d.ts +7 -0
- package/build/project/ios/target.js +26 -1
- package/build/project/workflow.js +3 -1
- package/build/vcs/clients/git.js +4 -1
- package/build/vcs/clients/gitNoCommit.js +2 -1
- package/oclif.manifest.json +1 -1
- package/package.json +6 -5
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const better_opn_1 = tslib_1.__importDefault(require("better-opn"));
|
|
5
|
+
const url_1 = require("../build/utils/url");
|
|
6
|
+
const EasCommand_1 = tslib_1.__importDefault(require("../commandUtils/EasCommand"));
|
|
7
|
+
const ora_1 = require("../ora");
|
|
8
|
+
const expoConfig_1 = require("../project/expoConfig");
|
|
9
|
+
const projectUtils_1 = require("../project/projectUtils");
|
|
10
|
+
const actions_1 = require("../user/actions");
|
|
11
|
+
class Open extends EasCommand_1.default {
|
|
12
|
+
async runAsync() {
|
|
13
|
+
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
14
|
+
const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
|
|
15
|
+
// this ensures the project exists
|
|
16
|
+
await (0, projectUtils_1.fetchProjectIdFromServerAsync)(exp);
|
|
17
|
+
const user = await (0, actions_1.ensureLoggedInAsync)();
|
|
18
|
+
const accountName = (0, projectUtils_1.getProjectAccountName)(exp, user);
|
|
19
|
+
const projectName = exp.slug;
|
|
20
|
+
const projectDashboardUrl = (0, url_1.getProjectDashboardUrl)(accountName, projectName);
|
|
21
|
+
const failedMessage = `Unable to open a web browser. Project page is available at: ${projectDashboardUrl}`;
|
|
22
|
+
const spinner = (0, ora_1.ora)(`Opening ${projectDashboardUrl}`).start();
|
|
23
|
+
try {
|
|
24
|
+
const opened = await (0, better_opn_1.default)(projectDashboardUrl);
|
|
25
|
+
if (opened) {
|
|
26
|
+
spinner.succeed(`Opened ${projectDashboardUrl}`);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
spinner.fail(failedMessage);
|
|
30
|
+
}
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
spinner.fail(failedMessage);
|
|
35
|
+
throw error;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.default = Open;
|
|
40
|
+
Open.description = 'open the project page in a web browser';
|
|
@@ -35,7 +35,7 @@ class EnvironmentSecretDelete extends EasCommand_1.default {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
log_1.default.addNewLineIfNone();
|
|
38
|
-
log_1.default.warn(`You are about to
|
|
38
|
+
log_1.default.warn(`You are about to permanently delete secret${(secret === null || secret === void 0 ? void 0 : secret.name) ? ` "${secret === null || secret === void 0 ? void 0 : secret.name}"` : ''} with id: "${id}".\nThis action is irreversible.`);
|
|
39
39
|
log_1.default.newLine();
|
|
40
40
|
const confirmed = await (0, prompts_1.toggleConfirmAsync)({
|
|
41
41
|
message: `Are you sure you wish to proceed?${(secret === null || secret === void 0 ? void 0 : secret.scope) === EnvironmentSecretsQuery_1.EnvironmentSecretScope.ACCOUNT
|
|
@@ -188,8 +188,8 @@ async function configureAppJSONForEASUpdateAsync({ projectDir, exp, platform, wo
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
const result = await (0, config_1.modifyConfigAsync)(projectDir, newConfig);
|
|
191
|
-
const
|
|
192
|
-
const
|
|
191
|
+
const preexistingAndroidRuntimeVersion = (_h = (_g = exp.android) === null || _g === void 0 ? void 0 : _g.runtimeVersion) !== null && _h !== void 0 ? _h : exp.runtimeVersion;
|
|
192
|
+
const preexistingIosRuntimeVersion = (_k = (_j = exp.ios) === null || _j === void 0 ? void 0 : _j.runtimeVersion) !== null && _k !== void 0 ? _k : exp.runtimeVersion;
|
|
193
193
|
switch (result.type) {
|
|
194
194
|
case 'success':
|
|
195
195
|
if ((_l = exp.updates) === null || _l === void 0 ? void 0 : _l.url) {
|
|
@@ -200,11 +200,11 @@ async function configureAppJSONForEASUpdateAsync({ projectDir, exp, platform, wo
|
|
|
200
200
|
else {
|
|
201
201
|
log_1.default.withTick(`Set updates.url value, to "${easUpdateURL}" in app.json`);
|
|
202
202
|
}
|
|
203
|
-
if (!
|
|
203
|
+
if (!preexistingAndroidRuntimeVersion &&
|
|
204
204
|
[platform_1.RequestedPlatform.Android, platform_1.RequestedPlatform.All].includes(platform)) {
|
|
205
205
|
log_1.default.withTick(`Set ${platform_1.appPlatformDisplayNames[generated_1.AppPlatform.Android]} runtimeVersion to "${JSON.stringify((_p = (_o = newConfig.android) === null || _o === void 0 ? void 0 : _o.runtimeVersion) !== null && _p !== void 0 ? _p : newConfig.runtimeVersion)}" in app.json`);
|
|
206
206
|
}
|
|
207
|
-
if (!
|
|
207
|
+
if (!preexistingIosRuntimeVersion &&
|
|
208
208
|
[platform_1.RequestedPlatform.Ios, platform_1.RequestedPlatform.All].includes(platform)) {
|
|
209
209
|
log_1.default.withTick(`Set ${platform_1.appPlatformDisplayNames[generated_1.AppPlatform.Ios]} runtimeVersion to "${JSON.stringify((_r = (_q = newConfig.ios) === null || _q === void 0 ? void 0 : _q.runtimeVersion) !== null && _r !== void 0 ? _r : newConfig.runtimeVersion)}" in app.json`);
|
|
210
210
|
}
|
|
@@ -33,7 +33,7 @@ class UpdateDelete extends EasCommand_1.default {
|
|
|
33
33
|
message: `🚨${chalk_1.default.red('CAUTION')}🚨\n\n` +
|
|
34
34
|
`${chalk_1.default.yellow(`This will delete all of the updates in group "${group}".`)} ${chalk_1.default.red('This is a permanent operation.')}\n\n` +
|
|
35
35
|
`If you want to revert to a previous publish, you should use 'update --republish' targeted at the last working update group instead.\n\n` +
|
|
36
|
-
`An update group should only be deleted in an emergency like an accidental publish of a secret. In this case user 'update --republish' to revert to the last working update group first and then proceed with the deletion. Deleting an update group when it is the latest publish can lead to inconsistent
|
|
36
|
+
`An update group should only be deleted in an emergency like an accidental publish of a secret. In this case user 'update --republish' to revert to the last working update group first and then proceed with the deletion. Deleting an update group when it is the latest publish can lead to inconsistent caching behavior by clients.\n\n` +
|
|
37
37
|
`Would you like to abort?`,
|
|
38
38
|
});
|
|
39
39
|
if (shouldAbort) {
|
|
@@ -40,7 +40,7 @@ class WebhookDelete extends EasCommand_1.default {
|
|
|
40
40
|
log_1.default.addNewLineIfNone();
|
|
41
41
|
log_1.default.log((0, formatWebhook_1.formatWebhook)(webhook));
|
|
42
42
|
log_1.default.newLine();
|
|
43
|
-
log_1.default.warn(`You are about to
|
|
43
|
+
log_1.default.warn(`You are about to permanently delete this webhook.\nThis action is irreversible.`);
|
|
44
44
|
log_1.default.newLine();
|
|
45
45
|
const confirmed = await (0, prompts_1.toggleConfirmAsync)({
|
|
46
46
|
message: 'Are you sure you wish to proceed?',
|
|
@@ -2,11 +2,13 @@ import { AppleDistributionCertificateFragment, AppleProvisioningProfileFragment
|
|
|
2
2
|
import { CredentialsContext } from '../../context';
|
|
3
3
|
import { AppLookupParams } from '../api/GraphqlClient';
|
|
4
4
|
import { AppleProvisioningProfileMutationResult } from '../api/graphql/mutations/AppleProvisioningProfileMutation';
|
|
5
|
+
import { Target } from '../types';
|
|
5
6
|
export declare class ConfigureProvisioningProfile {
|
|
6
7
|
private app;
|
|
8
|
+
private target;
|
|
7
9
|
private distributionCertificate;
|
|
8
10
|
private originalProvisioningProfile;
|
|
9
|
-
constructor(app: AppLookupParams, distributionCertificate: AppleDistributionCertificateFragment, originalProvisioningProfile: AppleProvisioningProfileFragment);
|
|
11
|
+
constructor(app: AppLookupParams, target: Target, distributionCertificate: AppleDistributionCertificateFragment, originalProvisioningProfile: AppleProvisioningProfileFragment);
|
|
10
12
|
runAsync(ctx: CredentialsContext): Promise<AppleProvisioningProfileMutationResult | null>;
|
|
11
13
|
private configureAndUpdateAsync;
|
|
12
14
|
}
|
|
@@ -6,10 +6,12 @@ const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
|
6
6
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
7
|
const log_1 = tslib_1.__importDefault(require("../../../log"));
|
|
8
8
|
const ora_1 = require("../../../ora");
|
|
9
|
+
const target_1 = require("../../../project/ios/target");
|
|
9
10
|
const errors_1 = require("../../errors");
|
|
10
11
|
class ConfigureProvisioningProfile {
|
|
11
|
-
constructor(app, distributionCertificate, originalProvisioningProfile) {
|
|
12
|
+
constructor(app, target, distributionCertificate, originalProvisioningProfile) {
|
|
12
13
|
this.app = app;
|
|
14
|
+
this.target = target;
|
|
13
15
|
this.distributionCertificate = distributionCertificate;
|
|
14
16
|
this.originalProvisioningProfile = originalProvisioningProfile;
|
|
15
17
|
}
|
|
@@ -27,7 +29,8 @@ class ConfigureProvisioningProfile {
|
|
|
27
29
|
log_1.default.warn('Make sure to recreate the profile if you selected a new distribution certificate.');
|
|
28
30
|
return null;
|
|
29
31
|
}
|
|
30
|
-
const
|
|
32
|
+
const applePlatform = await (0, target_1.getApplePlatformFromSdkRoot)(this.target);
|
|
33
|
+
const profilesFromApple = await ctx.appStore.listProvisioningProfilesAsync(this.app.bundleIdentifier, applePlatform);
|
|
31
34
|
const [matchingProfile] = profilesFromApple.filter(appleInfo => developerPortalIdentifier
|
|
32
35
|
? appleInfo.provisioningProfileId === developerPortalIdentifier
|
|
33
36
|
: appleInfo.provisioningProfile === provisioningProfile);
|
|
@@ -2,10 +2,12 @@ import { AppleDistributionCertificateFragment } from '../../../graphql/generated
|
|
|
2
2
|
import { CredentialsContext } from '../../context';
|
|
3
3
|
import { AppLookupParams } from '../api/GraphqlClient';
|
|
4
4
|
import { AppleProvisioningProfileMutationResult } from '../api/graphql/mutations/AppleProvisioningProfileMutation';
|
|
5
|
+
import { Target } from '../types';
|
|
5
6
|
export declare class CreateProvisioningProfile {
|
|
6
7
|
private app;
|
|
8
|
+
private target;
|
|
7
9
|
private distributionCertificate;
|
|
8
|
-
constructor(app: AppLookupParams, distributionCertificate: AppleDistributionCertificateFragment);
|
|
10
|
+
constructor(app: AppLookupParams, target: Target, distributionCertificate: AppleDistributionCertificateFragment);
|
|
9
11
|
runAsync(ctx: CredentialsContext): Promise<AppleProvisioningProfileMutationResult>;
|
|
10
12
|
private provideOrGenerateAsync;
|
|
11
13
|
}
|
|
@@ -11,8 +11,9 @@ const credentials_1 = require("../credentials");
|
|
|
11
11
|
const AppleTeamUtils_1 = require("./AppleTeamUtils");
|
|
12
12
|
const ProvisioningProfileUtils_1 = require("./ProvisioningProfileUtils");
|
|
13
13
|
class CreateProvisioningProfile {
|
|
14
|
-
constructor(app, distributionCertificate) {
|
|
14
|
+
constructor(app, target, distributionCertificate) {
|
|
15
15
|
this.app = app;
|
|
16
|
+
this.target = target;
|
|
16
17
|
this.distributionCertificate = distributionCertificate;
|
|
17
18
|
}
|
|
18
19
|
async runAsync(ctx) {
|
|
@@ -40,7 +41,7 @@ class CreateProvisioningProfile {
|
|
|
40
41
|
}
|
|
41
42
|
(0, assert_1.default)(this.distributionCertificate.certificateP12, 'Distribution Certificate must have p12 certificate');
|
|
42
43
|
(0, assert_1.default)(this.distributionCertificate.certificatePassword, 'Distribution Certificate must have certificate password');
|
|
43
|
-
return await (0, ProvisioningProfileUtils_1.generateProvisioningProfileAsync)(ctx, this.app.bundleIdentifier, {
|
|
44
|
+
return await (0, ProvisioningProfileUtils_1.generateProvisioningProfileAsync)(ctx, this.target, this.app.bundleIdentifier, {
|
|
44
45
|
certId: (_a = this.distributionCertificate.developerPortalIdentifier) !== null && _a !== void 0 ? _a : undefined,
|
|
45
46
|
certP12: this.distributionCertificate.certificateP12,
|
|
46
47
|
certPassword: this.distributionCertificate.certificatePassword,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CredentialsContext } from '../../context';
|
|
2
2
|
import { DistributionCertificate, ProvisioningProfile, ProvisioningProfileStoreInfo } from '../appstore/Credentials.types';
|
|
3
|
+
import { Target } from '../types';
|
|
3
4
|
export declare function formatProvisioningProfileFromApple(appleInfo: ProvisioningProfileStoreInfo): string;
|
|
4
|
-
export declare function generateProvisioningProfileAsync(ctx: CredentialsContext, bundleIdentifier: string, distCert: DistributionCertificate): Promise<ProvisioningProfile>;
|
|
5
|
+
export declare function generateProvisioningProfileAsync(ctx: CredentialsContext, target: Target, bundleIdentifier: string, distCert: DistributionCertificate): Promise<ProvisioningProfile>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.generateProvisioningProfileAsync = exports.formatProvisioningProfileFromApple = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
+
const target_1 = require("../../../project/ios/target");
|
|
6
7
|
function formatProvisioningProfileFromApple(appleInfo) {
|
|
7
8
|
var _a;
|
|
8
9
|
const { expires, provisioningProfileId } = appleInfo;
|
|
@@ -13,10 +14,11 @@ function formatProvisioningProfileFromApple(appleInfo) {
|
|
|
13
14
|
return `Provisioning Profile - ID: ${id}${details}`;
|
|
14
15
|
}
|
|
15
16
|
exports.formatProvisioningProfileFromApple = formatProvisioningProfileFromApple;
|
|
16
|
-
async function generateProvisioningProfileAsync(ctx, bundleIdentifier, distCert) {
|
|
17
|
+
async function generateProvisioningProfileAsync(ctx, target, bundleIdentifier, distCert) {
|
|
17
18
|
const appleAuthCtx = await ctx.appStore.ensureAuthenticatedAsync();
|
|
18
19
|
const type = appleAuthCtx.team.inHouse ? 'Enterprise ' : 'AppStore';
|
|
19
20
|
const profileName = `*[expo] ${bundleIdentifier} ${type} ${new Date().toISOString()}`; // Apple drops [ if its the first char (!!)
|
|
20
|
-
|
|
21
|
+
const applePlatform = await (0, target_1.getApplePlatformFromSdkRoot)(target);
|
|
22
|
+
return await ctx.appStore.createProvisioningProfileAsync(bundleIdentifier, distCert, profileName, applePlatform);
|
|
21
23
|
}
|
|
22
24
|
exports.generateProvisioningProfileAsync = generateProvisioningProfileAsync;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { AppleDistributionCertificateFragment, IosAppBuildCredentialsFragment } from '../../../graphql/generated';
|
|
2
2
|
import { CredentialsContext } from '../../context';
|
|
3
3
|
import { AppLookupParams } from '../api/GraphqlClient';
|
|
4
|
+
import { Target } from '../types';
|
|
5
|
+
interface Options {
|
|
6
|
+
app: AppLookupParams;
|
|
7
|
+
target: Target;
|
|
8
|
+
}
|
|
4
9
|
export declare class SetUpAdhocProvisioningProfile {
|
|
5
|
-
private
|
|
6
|
-
constructor(
|
|
10
|
+
private options;
|
|
11
|
+
constructor(options: Options);
|
|
7
12
|
runAsync(ctx: CredentialsContext): Promise<IosAppBuildCredentialsFragment>;
|
|
8
13
|
runWithDistributionCertificateAsync(ctx: CredentialsContext, distCert: AppleDistributionCertificateFragment): Promise<IosAppBuildCredentialsFragment>;
|
|
9
14
|
private areBuildCredentialsSetupAsync;
|
|
@@ -12,3 +17,4 @@ export declare class SetUpAdhocProvisioningProfile {
|
|
|
12
17
|
private registerDevicesAsync;
|
|
13
18
|
}
|
|
14
19
|
export declare function doUDIDsMatch(udidsA: string[], udidsB: string[]): boolean;
|
|
20
|
+
export {};
|
|
@@ -2,15 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.doUDIDsMatch = exports.SetUpAdhocProvisioningProfile = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const apple_utils_1 = require("@expo/apple-utils");
|
|
5
6
|
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
7
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
8
|
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
8
9
|
const action_1 = tslib_1.__importStar(require("../../../devices/actions/create/action"));
|
|
9
10
|
const generated_1 = require("../../../graphql/generated");
|
|
10
11
|
const log_1 = tslib_1.__importDefault(require("../../../log"));
|
|
12
|
+
const target_1 = require("../../../project/ios/target");
|
|
11
13
|
const prompts_1 = require("../../../prompts");
|
|
12
14
|
const differenceBy_1 = tslib_1.__importDefault(require("../../../utils/expodash/differenceBy"));
|
|
13
15
|
const errors_1 = require("../../errors");
|
|
16
|
+
const constants_1 = require("../appstore/constants");
|
|
14
17
|
const validateProvisioningProfile_1 = require("../validators/validateProvisioningProfile");
|
|
15
18
|
const AppleTeamUtils_1 = require("./AppleTeamUtils");
|
|
16
19
|
const BuildCredentialsUtils_1 = require("./BuildCredentialsUtils");
|
|
@@ -23,21 +26,22 @@ var ReuseAction;
|
|
|
23
26
|
ReuseAction[ReuseAction["No"] = 2] = "No";
|
|
24
27
|
})(ReuseAction || (ReuseAction = {}));
|
|
25
28
|
class SetUpAdhocProvisioningProfile {
|
|
26
|
-
constructor(
|
|
27
|
-
this.
|
|
29
|
+
constructor(options) {
|
|
30
|
+
this.options = options;
|
|
28
31
|
}
|
|
29
32
|
async runAsync(ctx) {
|
|
30
|
-
const
|
|
33
|
+
const { app } = this.options;
|
|
34
|
+
const distCert = await new SetUpDistributionCertificate_1.SetUpDistributionCertificate(app, generated_1.IosDistributionType.AdHoc).runAsync(ctx);
|
|
31
35
|
const areBuildCredentialsSetup = await this.areBuildCredentialsSetupAsync(ctx);
|
|
32
36
|
if (ctx.nonInteractive) {
|
|
33
37
|
if (areBuildCredentialsSetup) {
|
|
34
|
-
return (0, nullthrows_1.default)(await (0, BuildCredentialsUtils_1.getBuildCredentialsAsync)(ctx,
|
|
38
|
+
return (0, nullthrows_1.default)(await (0, BuildCredentialsUtils_1.getBuildCredentialsAsync)(ctx, app, generated_1.IosDistributionType.AdHoc));
|
|
35
39
|
}
|
|
36
40
|
else {
|
|
37
41
|
throw new errors_1.MissingCredentialsNonInteractiveError('Provisioning profile is not configured correctly. Run this command again in interactive mode.');
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
|
-
const currentBuildCredentials = await (0, BuildCredentialsUtils_1.getBuildCredentialsAsync)(ctx,
|
|
44
|
+
const currentBuildCredentials = await (0, BuildCredentialsUtils_1.getBuildCredentialsAsync)(ctx, app, generated_1.IosDistributionType.AdHoc);
|
|
41
45
|
if (areBuildCredentialsSetup) {
|
|
42
46
|
const buildCredentials = (0, nullthrows_1.default)(currentBuildCredentials);
|
|
43
47
|
if (await this.shouldUseExistingProfileAsync(ctx, buildCredentials)) {
|
|
@@ -48,16 +52,17 @@ class SetUpAdhocProvisioningProfile {
|
|
|
48
52
|
}
|
|
49
53
|
async runWithDistributionCertificateAsync(ctx, distCert) {
|
|
50
54
|
var _a, _b, _c, _d, _e;
|
|
51
|
-
const
|
|
55
|
+
const { app, target } = this.options;
|
|
56
|
+
const currentBuildCredentials = await (0, BuildCredentialsUtils_1.getBuildCredentialsAsync)(ctx, app, generated_1.IosDistributionType.AdHoc);
|
|
52
57
|
// 1. Resolve Apple Team
|
|
53
58
|
let appleTeam = (_c = (_a = distCert.appleTeam) !== null && _a !== void 0 ? _a : (_b = currentBuildCredentials === null || currentBuildCredentials === void 0 ? void 0 : currentBuildCredentials.provisioningProfile) === null || _b === void 0 ? void 0 : _b.appleTeam) !== null && _c !== void 0 ? _c : null;
|
|
54
59
|
if (!appleTeam) {
|
|
55
60
|
await ctx.appStore.ensureAuthenticatedAsync();
|
|
56
|
-
appleTeam = await (0, AppleTeamUtils_1.resolveAppleTeamIfAuthenticatedAsync)(ctx,
|
|
61
|
+
appleTeam = await (0, AppleTeamUtils_1.resolveAppleTeamIfAuthenticatedAsync)(ctx, app);
|
|
57
62
|
}
|
|
58
63
|
(0, assert_1.default)(appleTeam, 'Apple Team must be defined here');
|
|
59
64
|
// 2. Fetch devices registered on EAS servers
|
|
60
|
-
let registeredAppleDevices = await ctx.ios.getDevicesForAppleTeamAsync(
|
|
65
|
+
let registeredAppleDevices = await ctx.ios.getDevicesForAppleTeamAsync(app, appleTeam);
|
|
61
66
|
if (registeredAppleDevices.length === 0) {
|
|
62
67
|
const shouldRegisterDevices = await (0, prompts_1.confirmAsync)({
|
|
63
68
|
message: `You don't have any registered devices yet. Would you like to register them now?`,
|
|
@@ -74,9 +79,13 @@ class SetUpAdhocProvisioningProfile {
|
|
|
74
79
|
const provisionedDeviceIdentifiers = ((_e = (_d = currentBuildCredentials === null || currentBuildCredentials === void 0 ? void 0 : currentBuildCredentials.provisioningProfile) === null || _d === void 0 ? void 0 : _d.appleDevices) !== null && _e !== void 0 ? _e : []).map(i => i.identifier);
|
|
75
80
|
const chosenDevices = await (0, DeviceUtils_1.chooseDevicesAsync)(registeredAppleDevices, provisionedDeviceIdentifiers);
|
|
76
81
|
// 4. Reuse or create the profile on Apple Developer Portal
|
|
77
|
-
const
|
|
82
|
+
const applePlatform = await (0, target_1.getApplePlatformFromSdkRoot)(target);
|
|
83
|
+
const profileType = applePlatform === constants_1.ApplePlatform.TV_OS
|
|
84
|
+
? apple_utils_1.ProfileType.TVOS_APP_ADHOC
|
|
85
|
+
: apple_utils_1.ProfileType.IOS_APP_ADHOC;
|
|
86
|
+
const provisioningProfileStoreInfo = await ctx.appStore.createOrReuseAdhocProvisioningProfileAsync(chosenDevices.map(({ identifier }) => identifier), app.bundleIdentifier, distCert.serialNumber, profileType);
|
|
78
87
|
// 5. Create or update the profile on servers
|
|
79
|
-
const appleAppIdentifier = await ctx.ios.createOrGetExistingAppleAppIdentifierAsync(
|
|
88
|
+
const appleAppIdentifier = await ctx.ios.createOrGetExistingAppleAppIdentifierAsync(app, appleTeam);
|
|
80
89
|
let appleProvisioningProfile = null;
|
|
81
90
|
if (currentBuildCredentials === null || currentBuildCredentials === void 0 ? void 0 : currentBuildCredentials.provisioningProfile) {
|
|
82
91
|
if (currentBuildCredentials.provisioningProfile.developerPortalIdentifier !==
|
|
@@ -84,7 +93,7 @@ class SetUpAdhocProvisioningProfile {
|
|
|
84
93
|
await ctx.ios.deleteProvisioningProfilesAsync([
|
|
85
94
|
currentBuildCredentials.provisioningProfile.id,
|
|
86
95
|
]);
|
|
87
|
-
appleProvisioningProfile = await ctx.ios.createProvisioningProfileAsync(
|
|
96
|
+
appleProvisioningProfile = await ctx.ios.createProvisioningProfileAsync(app, appleAppIdentifier, {
|
|
88
97
|
appleProvisioningProfile: provisioningProfileStoreInfo.provisioningProfile,
|
|
89
98
|
developerPortalIdentifier: provisioningProfileStoreInfo.provisioningProfileId,
|
|
90
99
|
});
|
|
@@ -94,23 +103,25 @@ class SetUpAdhocProvisioningProfile {
|
|
|
94
103
|
}
|
|
95
104
|
}
|
|
96
105
|
else {
|
|
97
|
-
appleProvisioningProfile = await ctx.ios.createProvisioningProfileAsync(
|
|
106
|
+
appleProvisioningProfile = await ctx.ios.createProvisioningProfileAsync(app, appleAppIdentifier, {
|
|
98
107
|
appleProvisioningProfile: provisioningProfileStoreInfo.provisioningProfile,
|
|
99
108
|
developerPortalIdentifier: provisioningProfileStoreInfo.provisioningProfileId,
|
|
100
109
|
});
|
|
101
110
|
}
|
|
102
111
|
// 6. Create (or update) app build credentials
|
|
103
112
|
(0, assert_1.default)(appleProvisioningProfile);
|
|
104
|
-
return await (0, BuildCredentialsUtils_1.assignBuildCredentialsAsync)(ctx,
|
|
113
|
+
return await (0, BuildCredentialsUtils_1.assignBuildCredentialsAsync)(ctx, app, generated_1.IosDistributionType.AdHoc, distCert, appleProvisioningProfile, appleTeam);
|
|
105
114
|
}
|
|
106
115
|
async areBuildCredentialsSetupAsync(ctx) {
|
|
107
|
-
const
|
|
108
|
-
|
|
116
|
+
const { app, target } = this.options;
|
|
117
|
+
const buildCredentials = await (0, BuildCredentialsUtils_1.getBuildCredentialsAsync)(ctx, app, generated_1.IosDistributionType.AdHoc);
|
|
118
|
+
return await (0, validateProvisioningProfile_1.validateProvisioningProfileAsync)(ctx, target, app, buildCredentials);
|
|
109
119
|
}
|
|
110
120
|
async shouldUseExistingProfileAsync(ctx, buildCredentials) {
|
|
121
|
+
const { app } = this.options;
|
|
111
122
|
const provisioningProfile = (0, nullthrows_1.default)(buildCredentials.provisioningProfile);
|
|
112
123
|
const appleTeam = (0, nullthrows_1.default)(provisioningProfile.appleTeam);
|
|
113
|
-
const registeredAppleDevices = await ctx.ios.getDevicesForAppleTeamAsync(
|
|
124
|
+
const registeredAppleDevices = await ctx.ios.getDevicesForAppleTeamAsync(app, appleTeam);
|
|
114
125
|
const provisionedDevices = provisioningProfile.appleDevices;
|
|
115
126
|
const allRegisteredDevicesAreProvisioned = doUDIDsMatch(registeredAppleDevices.map(({ identifier }) => identifier), provisionedDevices.map(({ identifier }) => identifier));
|
|
116
127
|
if (allRegisteredDevicesAreProvisioned) {
|
|
@@ -170,7 +181,8 @@ class SetUpAdhocProvisioningProfile {
|
|
|
170
181
|
return selected;
|
|
171
182
|
}
|
|
172
183
|
async registerDevicesAsync(ctx, appleTeam) {
|
|
173
|
-
const
|
|
184
|
+
const { app } = this.options;
|
|
185
|
+
const action = new action_1.default(ctx.appStore, app.account, appleTeam);
|
|
174
186
|
const method = await action.runAsync();
|
|
175
187
|
while (true) {
|
|
176
188
|
if (method === action_1.RegistrationMethod.WEBSITE) {
|
|
@@ -179,7 +191,7 @@ class SetUpAdhocProvisioningProfile {
|
|
|
179
191
|
await (0, prompts_1.pressAnyKeyToContinueAsync)();
|
|
180
192
|
}
|
|
181
193
|
log_1.default.newLine();
|
|
182
|
-
const devices = await ctx.ios.getDevicesForAppleTeamAsync(
|
|
194
|
+
const devices = await ctx.ios.getDevicesForAppleTeamAsync(app, appleTeam, {
|
|
183
195
|
useCache: false,
|
|
184
196
|
});
|
|
185
197
|
if (devices.length === 0) {
|
|
@@ -39,6 +39,7 @@ class SetUpBuildCredentials {
|
|
|
39
39
|
enterpriseProvisioning: this.options.enterpriseProvisioning,
|
|
40
40
|
distribution: this.options.distribution,
|
|
41
41
|
entitlements: target.entitlements,
|
|
42
|
+
target,
|
|
42
43
|
app: {
|
|
43
44
|
...this.options.app,
|
|
44
45
|
bundleIdentifier: target.bundleIdentifier,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IosAppBuildCredentialsFragment } from '../../../graphql/generated';
|
|
2
2
|
import { CredentialsContext } from '../../context';
|
|
3
3
|
import { AppLookupParams } from '../api/GraphqlClient';
|
|
4
|
+
import { Target } from '../types';
|
|
4
5
|
/**
|
|
5
6
|
* It's used when setting up credentials for internal distribution but `enterpriseProvisioning` is not set.
|
|
6
7
|
*
|
|
@@ -8,11 +9,16 @@ import { AppLookupParams } from '../api/GraphqlClient';
|
|
|
8
9
|
* to choose if they want to set up an adhoc or universal distribution provisioning profile. Otherwise, always
|
|
9
10
|
* set up an adhoc provisioning profile.
|
|
10
11
|
*/
|
|
12
|
+
interface Options {
|
|
13
|
+
app: AppLookupParams;
|
|
14
|
+
target: Target;
|
|
15
|
+
}
|
|
11
16
|
export declare class SetUpInternalProvisioningProfile {
|
|
12
|
-
private
|
|
13
|
-
constructor(
|
|
17
|
+
private options;
|
|
18
|
+
constructor(options: Options);
|
|
14
19
|
runAsync(ctx: CredentialsContext): Promise<IosAppBuildCredentialsFragment>;
|
|
15
20
|
private setupAdhocProvisioningProfileAsync;
|
|
16
21
|
private setupUniversalProvisioningProfileAsync;
|
|
17
22
|
private askForDistributionTypeAndSetupAsync;
|
|
18
23
|
}
|
|
24
|
+
export {};
|
|
@@ -8,19 +8,12 @@ const prompts_1 = require("../../../prompts");
|
|
|
8
8
|
const BuildCredentialsUtils_1 = require("./BuildCredentialsUtils");
|
|
9
9
|
const SetUpAdhocProvisioningProfile_1 = require("./SetUpAdhocProvisioningProfile");
|
|
10
10
|
const SetUpProvisioningProfile_1 = require("./SetUpProvisioningProfile");
|
|
11
|
-
/**
|
|
12
|
-
* It's used when setting up credentials for internal distribution but `enterpriseProvisioning` is not set.
|
|
13
|
-
*
|
|
14
|
-
* TLDR: If the user authenticates with an account with Apple Developer Enterprise Program membership we ask them
|
|
15
|
-
* to choose if they want to set up an adhoc or universal distribution provisioning profile. Otherwise, always
|
|
16
|
-
* set up an adhoc provisioning profile.
|
|
17
|
-
*/
|
|
18
11
|
class SetUpInternalProvisioningProfile {
|
|
19
|
-
constructor(
|
|
20
|
-
this.
|
|
12
|
+
constructor(options) {
|
|
13
|
+
this.options = options;
|
|
21
14
|
}
|
|
22
15
|
async runAsync(ctx) {
|
|
23
|
-
const buildCredentials = await (0, BuildCredentialsUtils_1.getAllBuildCredentialsAsync)(ctx, this.app);
|
|
16
|
+
const buildCredentials = await (0, BuildCredentialsUtils_1.getAllBuildCredentialsAsync)(ctx, this.options.app);
|
|
24
17
|
const adhocBuildCredentialsExist = buildCredentials.filter(({ iosDistributionType }) => iosDistributionType === generated_1.IosDistributionType.AdHoc).length > 0;
|
|
25
18
|
const enterpriseBuildCredentialsExist = buildCredentials.filter(({ iosDistributionType }) => iosDistributionType === generated_1.IosDistributionType.Enterprise).length > 0;
|
|
26
19
|
if (!ctx.nonInteractive) {
|
|
@@ -73,10 +66,11 @@ class SetUpInternalProvisioningProfile {
|
|
|
73
66
|
}
|
|
74
67
|
}
|
|
75
68
|
async setupAdhocProvisioningProfileAsync(ctx) {
|
|
76
|
-
|
|
69
|
+
const { app, target } = this.options;
|
|
70
|
+
return await new SetUpAdhocProvisioningProfile_1.SetUpAdhocProvisioningProfile({ app, target }).runAsync(ctx);
|
|
77
71
|
}
|
|
78
72
|
async setupUniversalProvisioningProfileAsync(ctx) {
|
|
79
|
-
return await new SetUpProvisioningProfile_1.SetUpProvisioningProfile(this.app, generated_1.IosDistributionType.Enterprise).runAsync(ctx);
|
|
73
|
+
return await new SetUpProvisioningProfile_1.SetUpProvisioningProfile(this.options.app, this.options.target, generated_1.IosDistributionType.Enterprise).runAsync(ctx);
|
|
80
74
|
}
|
|
81
75
|
async askForDistributionTypeAndSetupAsync(ctx, message) {
|
|
82
76
|
const { distributionType } = await (0, prompts_1.promptAsync)({
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { AppleDistributionCertificateFragment, AppleProvisioningProfileFragment, IosAppBuildCredentialsFragment, IosDistributionType } from '../../../graphql/generated';
|
|
2
2
|
import { CredentialsContext } from '../../context';
|
|
3
3
|
import { AppLookupParams } from '../api/GraphqlClient';
|
|
4
|
+
import { Target } from '../types';
|
|
4
5
|
/**
|
|
5
6
|
* Sets up either APP_STORE or ENTERPRISE provisioning profiles
|
|
6
7
|
*/
|
|
7
8
|
export declare class SetUpProvisioningProfile {
|
|
8
9
|
private app;
|
|
10
|
+
private target;
|
|
9
11
|
private distributionType;
|
|
10
|
-
constructor(app: AppLookupParams, distributionType: IosDistributionType);
|
|
12
|
+
constructor(app: AppLookupParams, target: Target, distributionType: IosDistributionType);
|
|
11
13
|
areBuildCredentialsSetupAsync(ctx: CredentialsContext): Promise<boolean>;
|
|
12
14
|
assignNewAndDeleteOldProfileAsync(ctx: CredentialsContext, distCert: AppleDistributionCertificateFragment, currentProfile: AppleProvisioningProfileFragment): Promise<IosAppBuildCredentialsFragment>;
|
|
13
15
|
createAndAssignProfileAsync(ctx: CredentialsContext, distCert: AppleDistributionCertificateFragment): Promise<IosAppBuildCredentialsFragment>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SetUpProvisioningProfile = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
6
|
+
const target_1 = require("../../../project/ios/target");
|
|
6
7
|
const prompts_1 = require("../../../prompts");
|
|
7
8
|
const errors_1 = require("../../errors");
|
|
8
9
|
const validateProvisioningProfile_1 = require("../validators/validateProvisioningProfile");
|
|
@@ -15,13 +16,14 @@ const SetUpDistributionCertificate_1 = require("./SetUpDistributionCertificate")
|
|
|
15
16
|
* Sets up either APP_STORE or ENTERPRISE provisioning profiles
|
|
16
17
|
*/
|
|
17
18
|
class SetUpProvisioningProfile {
|
|
18
|
-
constructor(app, distributionType) {
|
|
19
|
+
constructor(app, target, distributionType) {
|
|
19
20
|
this.app = app;
|
|
21
|
+
this.target = target;
|
|
20
22
|
this.distributionType = distributionType;
|
|
21
23
|
}
|
|
22
24
|
async areBuildCredentialsSetupAsync(ctx) {
|
|
23
25
|
const buildCredentials = await (0, BuildCredentialsUtils_1.getBuildCredentialsAsync)(ctx, this.app, this.distributionType);
|
|
24
|
-
return await (0, validateProvisioningProfile_1.validateProvisioningProfileAsync)(ctx, this.app, buildCredentials);
|
|
26
|
+
return await (0, validateProvisioningProfile_1.validateProvisioningProfileAsync)(ctx, this.target, this.app, buildCredentials);
|
|
25
27
|
}
|
|
26
28
|
async assignNewAndDeleteOldProfileAsync(ctx, distCert, currentProfile) {
|
|
27
29
|
const buildCredentials = await this.createAndAssignProfileAsync(ctx, distCert);
|
|
@@ -30,11 +32,11 @@ class SetUpProvisioningProfile {
|
|
|
30
32
|
return buildCredentials;
|
|
31
33
|
}
|
|
32
34
|
async createAndAssignProfileAsync(ctx, distCert) {
|
|
33
|
-
const provisioningProfile = await new CreateProvisioningProfile_1.CreateProvisioningProfile(this.app, distCert).runAsync(ctx);
|
|
35
|
+
const provisioningProfile = await new CreateProvisioningProfile_1.CreateProvisioningProfile(this.app, this.target, distCert).runAsync(ctx);
|
|
34
36
|
return await (0, BuildCredentialsUtils_1.assignBuildCredentialsAsync)(ctx, this.app, this.distributionType, distCert, provisioningProfile);
|
|
35
37
|
}
|
|
36
38
|
async configureAndAssignProfileAsync(ctx, distCert, originalProvisioningProfile) {
|
|
37
|
-
const profileConfigurator = new ConfigureProvisioningProfile_1.ConfigureProvisioningProfile(this.app, distCert, originalProvisioningProfile);
|
|
39
|
+
const profileConfigurator = new ConfigureProvisioningProfile_1.ConfigureProvisioningProfile(this.app, this.target, distCert, originalProvisioningProfile);
|
|
38
40
|
const updatedProvisioningProfile = await profileConfigurator.runAsync(ctx);
|
|
39
41
|
if (!updatedProvisioningProfile) {
|
|
40
42
|
return null;
|
|
@@ -55,7 +57,8 @@ class SetUpProvisioningProfile {
|
|
|
55
57
|
return await this.createAndAssignProfileAsync(ctx, distCert);
|
|
56
58
|
}
|
|
57
59
|
// See if the profile we have exists on the Apple Servers
|
|
58
|
-
const
|
|
60
|
+
const applePlatform = await (0, target_1.getApplePlatformFromSdkRoot)(this.target);
|
|
61
|
+
const existingProfiles = await ctx.appStore.listProvisioningProfilesAsync(this.app.bundleIdentifier, applePlatform);
|
|
59
62
|
const currentProfileFromServer = this.getCurrentProfileStoreInfo(existingProfiles, currentProfile);
|
|
60
63
|
if (!currentProfileFromServer) {
|
|
61
64
|
return await this.assignNewAndDeleteOldProfileAsync(ctx, distCert, currentProfile);
|
|
@@ -3,11 +3,13 @@ import { JSONObject } from '@expo/json-file';
|
|
|
3
3
|
import { IosAppBuildCredentialsFragment } from '../../../graphql/generated';
|
|
4
4
|
import { CredentialsContext } from '../../context';
|
|
5
5
|
import { AppLookupParams as GraphQLAppLookupParams } from '../api/GraphqlClient';
|
|
6
|
+
import { Target } from '../types';
|
|
6
7
|
interface Options {
|
|
7
8
|
app: GraphQLAppLookupParams;
|
|
8
9
|
distribution: DistributionType;
|
|
9
10
|
enterpriseProvisioning?: IosEnterpriseProvisioning;
|
|
10
11
|
entitlements: JSONObject;
|
|
12
|
+
target: Target;
|
|
11
13
|
}
|
|
12
14
|
export declare class SetUpTargetBuildCredentials {
|
|
13
15
|
private options;
|
|
@@ -30,20 +30,20 @@ class SetUpTargetBuildCredentials {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
async setupBuildCredentialsAsync(ctx) {
|
|
33
|
-
const { app, distribution, enterpriseProvisioning } = this.options;
|
|
33
|
+
const { app, distribution, enterpriseProvisioning, target } = this.options;
|
|
34
34
|
if (distribution === 'internal') {
|
|
35
35
|
if (enterpriseProvisioning === 'adhoc') {
|
|
36
|
-
return await new SetUpAdhocProvisioningProfile_1.SetUpAdhocProvisioningProfile(app).runAsync(ctx);
|
|
36
|
+
return await new SetUpAdhocProvisioningProfile_1.SetUpAdhocProvisioningProfile({ app, target }).runAsync(ctx);
|
|
37
37
|
}
|
|
38
38
|
else if (enterpriseProvisioning === 'universal') {
|
|
39
|
-
return await new SetUpProvisioningProfile_1.SetUpProvisioningProfile(app, generated_1.IosDistributionType.Enterprise).runAsync(ctx);
|
|
39
|
+
return await new SetUpProvisioningProfile_1.SetUpProvisioningProfile(app, target, generated_1.IosDistributionType.Enterprise).runAsync(ctx);
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
|
-
return await new SetUpInternalProvisioningProfile_1.SetUpInternalProvisioningProfile(app).runAsync(ctx);
|
|
42
|
+
return await new SetUpInternalProvisioningProfile_1.SetUpInternalProvisioningProfile({ app, target }).runAsync(ctx);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
|
-
return await new SetUpProvisioningProfile_1.SetUpProvisioningProfile(app, generated_1.IosDistributionType.AppStore).runAsync(ctx);
|
|
46
|
+
return await new SetUpProvisioningProfile_1.SetUpProvisioningProfile(app, target, generated_1.IosDistributionType.AppStore).runAsync(ctx);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
/// <reference types="@expo/apple-utils/ts-declarations/expo__app-store" />
|
|
2
|
+
import { ProfileType } from '@expo/app-store';
|
|
1
3
|
import { AscApiKey, AscApiKeyInfo, DistributionCertificate, DistributionCertificateStoreInfo, ProvisioningProfile, ProvisioningProfileStoreInfo, PushKey, PushKeyStoreInfo } from './Credentials.types';
|
|
2
4
|
import { Options as AuthenticateOptions } from './authenticate';
|
|
3
5
|
import { AuthCtx, AuthenticationMode, UserAuthCtx } from './authenticateTypes';
|
|
6
|
+
import { ApplePlatform } from './constants';
|
|
4
7
|
import { AppLookupParams, IosCapabilitiesOptions } from './ensureAppExists';
|
|
5
8
|
import { ProfileClass } from './provisioningProfile';
|
|
6
9
|
export default class AppStoreApi {
|
|
@@ -17,10 +20,10 @@ export default class AppStoreApi {
|
|
|
17
20
|
createPushKeyAsync(name?: string): Promise<PushKey>;
|
|
18
21
|
revokePushKeyAsync(ids: string[]): Promise<void>;
|
|
19
22
|
useExistingProvisioningProfileAsync(bundleIdentifier: string, provisioningProfile: ProvisioningProfile, distCert: DistributionCertificate): Promise<ProvisioningProfile>;
|
|
20
|
-
listProvisioningProfilesAsync(bundleIdentifier: string, profileClass?: ProfileClass): Promise<ProvisioningProfileStoreInfo[]>;
|
|
21
|
-
createProvisioningProfileAsync(bundleIdentifier: string, distCert: DistributionCertificate, profileName: string, profileClass?: ProfileClass): Promise<ProvisioningProfile>;
|
|
22
|
-
revokeProvisioningProfileAsync(bundleIdentifier: string, profileClass?: ProfileClass): Promise<void>;
|
|
23
|
-
createOrReuseAdhocProvisioningProfileAsync(udids: string[], bundleIdentifier: string, distCertSerialNumber: string): Promise<ProvisioningProfile>;
|
|
23
|
+
listProvisioningProfilesAsync(bundleIdentifier: string, applePlatform: ApplePlatform, profileClass?: ProfileClass): Promise<ProvisioningProfileStoreInfo[]>;
|
|
24
|
+
createProvisioningProfileAsync(bundleIdentifier: string, distCert: DistributionCertificate, profileName: string, applePlatform: ApplePlatform, profileClass?: ProfileClass): Promise<ProvisioningProfile>;
|
|
25
|
+
revokeProvisioningProfileAsync(bundleIdentifier: string, applePlatform: ApplePlatform, profileClass?: ProfileClass): Promise<void>;
|
|
26
|
+
createOrReuseAdhocProvisioningProfileAsync(udids: string[], bundleIdentifier: string, distCertSerialNumber: string, profileType: ProfileType): Promise<ProvisioningProfile>;
|
|
24
27
|
listAscApiKeysAsync(): Promise<AscApiKeyInfo[]>;
|
|
25
28
|
getAscApiKeyAsync(keyId: string): Promise<AscApiKeyInfo | null>;
|
|
26
29
|
createAscApiKeyAsync({ nickname }: {
|