eas-cli 2.1.0 → 2.2.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 +179 -133
- package/build/branch/queries.d.ts +10 -2
- package/build/branch/queries.js +30 -30
- package/build/branch/utils.d.ts +4 -0
- package/build/branch/utils.js +15 -0
- package/build/build/android/build.js +3 -3
- package/build/build/android/prepareJob.js +1 -2
- package/build/build/android/syncProjectConfiguration.d.ts +2 -1
- package/build/build/android/syncProjectConfiguration.js +2 -2
- package/build/build/build.js +15 -4
- package/build/build/configure.js +2 -2
- package/build/build/createContext.d.ts +5 -1
- package/build/build/createContext.js +8 -14
- package/build/build/ios/build.js +2 -1
- package/build/build/ios/credentials.js +1 -1
- package/build/build/ios/prepareJob.js +1 -2
- package/build/build/ios/syncProjectConfiguration.d.ts +2 -1
- package/build/build/ios/syncProjectConfiguration.js +2 -2
- package/build/build/local.js +1 -1
- package/build/build/metadata.js +1 -2
- package/build/build/queries.d.ts +9 -0
- package/build/build/queries.js +51 -0
- package/build/build/runBuildAndSubmit.d.ts +3 -1
- package/build/build/runBuildAndSubmit.js +15 -7
- package/build/build/utils/repository.js +5 -1
- package/build/channel/queries.d.ts +17 -0
- package/build/channel/queries.js +137 -0
- package/build/channel/utils.d.ts +22 -0
- package/build/channel/utils.js +87 -0
- package/build/commandUtils/EasCommand.d.ts +68 -7
- package/build/commandUtils/EasCommand.js +60 -79
- package/build/commandUtils/context/ActorContextField.d.ts +5 -0
- package/build/commandUtils/context/ActorContextField.js +11 -0
- package/build/commandUtils/context/ContextField.d.ts +6 -0
- package/build/commandUtils/context/ContextField.js +5 -0
- package/build/commandUtils/context/DynamicProjectConfigContextField.d.ts +11 -0
- package/build/commandUtils/context/DynamicProjectConfigContextField.js +27 -0
- package/build/commandUtils/context/OptionalProjectConfigContextField.d.ts +13 -0
- package/build/commandUtils/context/OptionalProjectConfigContextField.js +37 -0
- package/build/commandUtils/context/ProjectConfigContextField.d.ts +13 -0
- package/build/commandUtils/context/ProjectConfigContextField.js +23 -0
- package/build/commandUtils/context/ProjectDirContextField.d.ts +4 -0
- package/build/commandUtils/context/ProjectDirContextField.js +11 -0
- package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.d.ts +21 -0
- package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.js +75 -0
- package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.d.ts +17 -0
- package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +102 -0
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.d.ts +24 -0
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +108 -0
- package/build/commandUtils/flags.d.ts +10 -0
- package/build/commandUtils/flags.js +23 -0
- package/build/commandUtils/pagination.d.ts +7 -4
- package/build/commandUtils/pagination.js +11 -15
- package/build/commands/account/login.d.ts +0 -2
- package/build/commands/account/login.js +2 -7
- package/build/commands/account/logout.d.ts +0 -2
- package/build/commands/account/logout.js +0 -5
- package/build/commands/account/view.d.ts +0 -2
- package/build/commands/account/view.js +0 -5
- package/build/commands/analytics.d.ts +0 -1
- package/build/commands/analytics.js +0 -4
- package/build/commands/branch/create.d.ts +4 -0
- package/build/commands/branch/create.js +18 -18
- package/build/commands/branch/delete.d.ts +4 -0
- package/build/commands/branch/delete.js +29 -26
- package/build/commands/branch/list.d.ts +5 -2
- package/build/commands/branch/list.js +13 -8
- package/build/commands/branch/rename.d.ts +5 -1
- package/build/commands/branch/rename.js +15 -13
- package/build/commands/branch/view.d.ts +5 -2
- package/build/commands/branch/view.js +31 -13
- package/build/commands/build/cancel.d.ts +7 -0
- package/build/commands/build/cancel.js +50 -23
- package/build/commands/build/configure.d.ts +3 -0
- package/build/commands/build/configure.js +12 -7
- package/build/commands/build/index.d.ts +7 -2
- package/build/commands/build/index.js +31 -23
- package/build/commands/build/inspect.d.ts +5 -0
- package/build/commands/build/inspect.js +12 -3
- package/build/commands/build/list.d.ts +7 -2
- package/build/commands/build/list.js +36 -59
- package/build/commands/build/version/set.d.ts +5 -0
- package/build/commands/build/version/set.js +22 -14
- package/build/commands/build/version/sync.d.ts +5 -0
- package/build/commands/build/version/sync.js +22 -13
- package/build/commands/build/view.d.ts +3 -0
- package/build/commands/build/view.js +20 -14
- package/build/commands/channel/create.d.ts +4 -0
- package/build/commands/channel/create.js +32 -25
- package/build/commands/channel/delete.d.ts +3 -0
- package/build/commands/channel/delete.js +36 -59
- package/build/commands/channel/edit.d.ts +7 -7
- package/build/commands/channel/edit.js +39 -72
- package/build/commands/channel/list.d.ts +6 -0
- package/build/commands/channel/list.js +20 -76
- package/build/commands/channel/rollout.d.ts +5 -1
- package/build/commands/channel/rollout.js +34 -35
- package/build/commands/channel/view.d.ts +6 -33
- package/build/commands/channel/view.js +31 -132
- package/build/commands/config.d.ts +6 -2
- package/build/commands/config.js +22 -13
- package/build/commands/credentials.d.ts +4 -0
- package/build/commands/credentials.js +10 -1
- package/build/commands/device/create.d.ts +4 -0
- package/build/commands/device/create.js +15 -3
- package/build/commands/device/delete.d.ts +13 -8
- package/build/commands/device/delete.js +81 -130
- package/build/commands/device/list.d.ts +7 -0
- package/build/commands/device/list.js +42 -63
- package/build/commands/device/view.d.ts +3 -0
- package/build/commands/device/view.js +10 -5
- package/build/commands/diagnostics.d.ts +3 -1
- package/build/commands/diagnostics.js +10 -8
- package/build/commands/metadata/pull.d.ts +4 -0
- package/build/commands/metadata/pull.js +13 -8
- package/build/commands/metadata/push.d.ts +4 -0
- package/build/commands/metadata/push.js +13 -8
- package/build/commands/open.d.ts +3 -0
- package/build/commands/open.js +11 -9
- package/build/commands/project/info.d.ts +3 -0
- package/build/commands/project/info.js +9 -6
- package/build/commands/project/init.d.ts +12 -0
- package/build/commands/project/init.js +155 -8
- package/build/commands/secret/create.d.ts +6 -0
- package/build/commands/secret/create.js +88 -30
- package/build/commands/secret/delete.d.ts +4 -0
- package/build/commands/secret/delete.js +28 -19
- package/build/commands/secret/list.d.ts +3 -0
- package/build/commands/secret/list.js +19 -13
- package/build/commands/submit.d.ts +5 -0
- package/build/commands/submit.js +16 -7
- package/build/commands/update/configure.d.ts +3 -0
- package/build/commands/update/configure.js +22 -16
- package/build/commands/update/delete.d.ts +1 -0
- package/build/commands/update/delete.js +4 -7
- package/build/commands/update/index.d.ts +8 -12
- package/build/commands/update/index.js +90 -166
- package/build/commands/update/list.d.ts +8 -2
- package/build/commands/update/list.js +51 -81
- package/build/commands/update/view.d.ts +0 -4
- package/build/commands/update/view.js +14 -51
- package/build/commands/webhook/create.d.ts +4 -0
- package/build/commands/webhook/create.js +10 -5
- package/build/commands/webhook/delete.d.ts +6 -0
- package/build/commands/webhook/delete.js +26 -14
- package/build/commands/webhook/list.d.ts +3 -0
- package/build/commands/webhook/list.js +13 -9
- package/build/commands/webhook/update.d.ts +1 -0
- package/build/commands/webhook/update.js +3 -1
- package/build/credentials/android/actions/BuildCredentialsUtils.js +2 -6
- package/build/credentials/android/actions/CreateFcm.d.ts +2 -3
- package/build/credentials/android/actions/CreateGoogleServiceAccountKey.d.ts +2 -3
- package/build/credentials/android/actions/CreateKeystore.d.ts +2 -3
- package/build/credentials/android/actions/CreateKeystore.js +1 -2
- package/build/credentials/android/actions/RemoveGoogleServiceAccountKey.d.ts +2 -3
- package/build/credentials/android/actions/UseExistingGoogleServiceAccountKey.d.ts +2 -3
- package/build/credentials/android/api/GraphqlClient.d.ts +6 -7
- package/build/credentials/context.d.ts +8 -4
- package/build/credentials/context.js +8 -23
- package/build/credentials/ios/IosCredentialsProvider.js +11 -6
- package/build/credentials/ios/actions/AppleTeamFormatting.d.ts +2 -0
- package/build/credentials/ios/actions/AppleTeamFormatting.js +7 -0
- package/build/credentials/ios/actions/AppleTeamUtils.d.ts +1 -2
- package/build/credentials/ios/actions/AppleTeamUtils.js +1 -5
- package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +3 -4
- package/build/credentials/ios/actions/AscApiKeyUtils.js +2 -2
- package/build/credentials/ios/actions/AssignAscApiKey.d.ts +1 -1
- package/build/credentials/ios/actions/AssignPushKey.d.ts +1 -1
- package/build/credentials/ios/actions/BuildCredentialsUtils.d.ts +3 -3
- package/build/credentials/ios/actions/BuildCredentialsUtils.js +8 -12
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +1 -1
- package/build/credentials/ios/actions/CreateAscApiKey.d.ts +2 -3
- package/build/credentials/ios/actions/CreateDistributionCertificate.d.ts +2 -2
- package/build/credentials/ios/actions/CreateProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/CreatePushKey.d.ts +2 -3
- package/build/credentials/ios/actions/DeviceUtils.d.ts +0 -1
- package/build/credentials/ios/actions/DeviceUtils.js +3 -19
- package/build/credentials/ios/actions/DistributionCertificateUtils.d.ts +3 -4
- package/build/credentials/ios/actions/DistributionCertificateUtils.js +2 -2
- package/build/credentials/ios/actions/ProvisioningProfileUtils.js +1 -1
- package/build/credentials/ios/actions/PushKeyUtils.d.ts +2 -3
- package/build/credentials/ios/actions/PushKeyUtils.js +2 -2
- package/build/credentials/ios/actions/RemoveAscApiKey.d.ts +2 -3
- package/build/credentials/ios/actions/RemoveDistributionCertificate.d.ts +3 -4
- package/build/credentials/ios/actions/RemoveProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/RemovePushKey.d.ts +2 -3
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +1 -1
- package/build/credentials/ios/actions/SetUpAscApiKey.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpDistributionCertificate.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpProvisioningProfile.js +1 -1
- package/build/credentials/ios/actions/SetUpPushKey.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpSubmissionCredentials.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpTargetBuildCredentials.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.d.ts +1 -1
- package/build/credentials/ios/api/GraphqlClient.d.ts +9 -15
- package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.d.ts +2 -3
- package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.js +3 -1
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.d.ts +3 -3
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +20 -6
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.d.ts +2 -2
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +8 -7
- package/build/credentials/ios/api/graphql/types/AppLookupParams.d.ts +7 -0
- package/build/credentials/ios/api/graphql/types/AppLookupParams.js +2 -0
- package/build/credentials/ios/types.d.ts +2 -3
- package/build/credentials/ios/utils/printCredentials.d.ts +1 -1
- package/build/credentials/ios/validators/validateProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/validators/validateProvisioningProfile.js +1 -1
- package/build/credentials/manager/HelperActions.d.ts +4 -1
- package/build/credentials/manager/ManageAndroid.js +4 -14
- package/build/credentials/manager/ManageIos.js +12 -15
- package/build/credentials/manager/SelectBuildProfileFromEasJson.d.ts +1 -1
- package/build/credentials/manager/SelectBuildProfileFromEasJson.js +3 -3
- package/build/credentials/manager/SelectPlatform.d.ts +5 -1
- package/build/credentials/manager/SelectPlatform.js +5 -3
- package/build/devices/actions/create/action.d.ts +2 -3
- package/build/devices/context.d.ts +3 -5
- package/build/devices/context.js +2 -11
- package/build/devices/manager.d.ts +4 -5
- package/build/devices/manager.js +9 -16
- package/build/devices/queries.d.ts +21 -0
- package/build/devices/queries.js +121 -0
- package/build/devices/utils/errors.d.ts +3 -0
- package/build/devices/utils/errors.js +9 -0
- package/build/devices/utils/formatDevice.d.ts +3 -3
- package/build/devices/utils/formatDevice.js +8 -3
- package/build/graphql/generated.d.ts +1101 -191
- package/build/graphql/generated.js +13 -2
- package/build/graphql/mutations/EnvironmentSecretMutation.d.ts +3 -1
- package/build/graphql/queries/AppQuery.d.ts +1 -0
- package/build/graphql/queries/AppQuery.js +19 -0
- package/build/graphql/queries/BranchQuery.d.ts +5 -6
- package/build/graphql/queries/BranchQuery.js +44 -3
- package/build/graphql/queries/BuildQuery.d.ts +2 -20
- package/build/graphql/queries/BuildQuery.js +2 -2
- package/build/graphql/queries/ChannelQuery.d.ts +5 -2
- package/build/graphql/queries/ChannelQuery.js +45 -19
- package/build/graphql/queries/EnvironmentSecretsQuery.d.ts +5 -3
- package/build/graphql/queries/EnvironmentSecretsQuery.js +14 -28
- package/build/graphql/queries/UpdateQuery.d.ts +4 -6
- package/build/graphql/queries/UpdateQuery.js +59 -50
- package/build/graphql/queries/UserQuery.js +8 -1
- package/build/graphql/types/Account.d.ts +1 -0
- package/build/graphql/types/Account.js +17 -0
- package/build/graphql/types/App.js +7 -0
- package/build/graphql/types/EnvironmentSecret.d.ts +7 -0
- package/build/graphql/types/EnvironmentSecret.js +16 -1
- package/build/graphql/types/Update.d.ts +1 -0
- package/build/graphql/types/Update.js +30 -0
- package/build/graphql/types/UpdateBranch.js +4 -15
- package/build/metadata/context.d.ts +1 -1
- package/build/metadata/context.js +7 -9
- package/build/project/android/applicationId.d.ts +2 -1
- package/build/project/android/applicationId.js +7 -7
- package/build/project/android/versions.js +1 -1
- package/build/project/applicationIdentifier.d.ts +2 -1
- package/build/project/applicationIdentifier.js +2 -2
- package/build/project/expoConfig.d.ts +3 -3
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.d.ts +22 -0
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +93 -0
- package/build/project/ios/bundleIdentifier.d.ts +2 -1
- package/build/project/ios/bundleIdentifier.js +7 -7
- package/build/project/ios/scheme.d.ts +1 -1
- package/build/project/ios/target.d.ts +17 -2
- package/build/project/ios/target.js +51 -4
- package/build/project/projectUtils.d.ts +4 -31
- package/build/project/projectUtils.js +13 -123
- package/build/project/remoteVersionSource.d.ts +2 -2
- package/build/project/remoteVersionSource.js +8 -7
- package/build/submit/android/ServiceAccountSource.js +1 -2
- package/build/submit/context.d.ts +3 -1
- package/build/submit/context.js +12 -14
- package/build/submit/ios/CredentialsServiceSource.js +1 -2
- package/build/submit/utils/builds.js +3 -1
- package/build/update/android/UpdatesModule.d.ts +1 -1
- package/build/update/android/UpdatesModule.js +2 -3
- package/build/update/ios/UpdatesModule.d.ts +1 -1
- package/build/update/ios/UpdatesModule.js +2 -3
- package/build/update/queries.d.ts +16 -1
- package/build/update/queries.js +96 -30
- package/build/update/utils.d.ts +21 -8
- package/build/update/utils.js +75 -14
- package/build/user/actions.d.ts +2 -8
- package/build/user/actions.js +4 -63
- package/build/utils/profiles.d.ts +3 -3
- package/build/utils/profiles.js +6 -5
- package/build/vcs/clients/git.d.ts +1 -1
- package/build/vcs/clients/git.js +1 -1
- package/build/vcs/vcs.d.ts +1 -1
- package/build/webhooks/input.d.ts +2 -1
- package/build/webhooks/input.js +10 -1
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
- package/build/project/ensureProjectExists.d.ts +0 -21
- package/build/project/ensureProjectExists.js +0 -88
- package/build/user/Account.d.ts +0 -3
- package/build/user/Account.js +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppleDevice, AppleDeviceFragment, AppleTeamFragment } from '../../../../../graphql/generated';
|
|
1
|
+
import { AppleDevice, AppleDeviceFragment, AppleDevicesByTeamIdentifierQueryVariables, AppleTeamFragment } from '../../../../../graphql/generated';
|
|
2
2
|
export declare type AppleDeviceFragmentWithAppleTeam = AppleDeviceFragment & {
|
|
3
3
|
appleTeam: AppleTeamFragment;
|
|
4
4
|
};
|
|
@@ -13,6 +13,6 @@ export declare const AppleDeviceQuery: {
|
|
|
13
13
|
getAllByAppleTeamIdentifierAsync(accountId: string, appleTeamIdentifier: string, { useCache }?: {
|
|
14
14
|
useCache?: boolean | undefined;
|
|
15
15
|
}): Promise<AppleDeviceFragmentWithAppleTeam[]>;
|
|
16
|
-
getAllForAppleTeamAsync(accountName
|
|
17
|
-
getByDeviceIdentifierAsync(accountName: string, identifier: string): Promise<AppleDevicesByIdentifierQueryResult
|
|
16
|
+
getAllForAppleTeamAsync({ accountName, appleTeamIdentifier, offset, limit, }: AppleDevicesByTeamIdentifierQueryVariables): Promise<AppleDeviceFragment[]>;
|
|
17
|
+
getByDeviceIdentifierAsync(accountName: string, identifier: string): Promise<AppleDevicesByIdentifierQueryResult>;
|
|
18
18
|
};
|
|
@@ -5,9 +5,11 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
6
|
const graphql_1 = require("graphql");
|
|
7
7
|
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
8
|
+
const errors_1 = require("../../../../../devices/utils/errors");
|
|
8
9
|
const client_1 = require("../../../../../graphql/client");
|
|
9
10
|
const AppleDevice_1 = require("../../../../../graphql/types/credentials/AppleDevice");
|
|
10
11
|
const AppleTeam_1 = require("../../../../../graphql/types/credentials/AppleTeam");
|
|
12
|
+
const AppleTeamFormatting_1 = require("../../../actions/AppleTeamFormatting");
|
|
11
13
|
exports.AppleDeviceQuery = {
|
|
12
14
|
async getAllByAppleTeamIdentifierAsync(accountId, appleTeamIdentifier, { useCache = true } = {}) {
|
|
13
15
|
const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
@@ -43,12 +45,14 @@ exports.AppleDeviceQuery = {
|
|
|
43
45
|
(0, assert_1.default)(appleDevices, 'Apple Devices should be defined in this context - enforced by GraphQL');
|
|
44
46
|
return appleDevices;
|
|
45
47
|
},
|
|
46
|
-
async getAllForAppleTeamAsync(accountName, appleTeamIdentifier) {
|
|
48
|
+
async getAllForAppleTeamAsync({ accountName, appleTeamIdentifier, offset, limit, }) {
|
|
47
49
|
const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
48
50
|
.query((0, graphql_tag_1.default) `
|
|
49
51
|
query AppleDevicesByTeamIdentifier(
|
|
50
52
|
$accountName: String!
|
|
51
53
|
$appleTeamIdentifier: String!
|
|
54
|
+
$offset: Int
|
|
55
|
+
$limit: Int
|
|
52
56
|
) {
|
|
53
57
|
account {
|
|
54
58
|
byName(accountName: $accountName) {
|
|
@@ -57,25 +61,30 @@ exports.AppleDeviceQuery = {
|
|
|
57
61
|
id
|
|
58
62
|
appleTeamIdentifier
|
|
59
63
|
appleTeamName
|
|
60
|
-
appleDevices {
|
|
64
|
+
appleDevices(offset: $offset, limit: $limit) {
|
|
61
65
|
id
|
|
62
66
|
identifier
|
|
63
67
|
name
|
|
64
68
|
deviceClass
|
|
65
69
|
enabled
|
|
70
|
+
model
|
|
66
71
|
}
|
|
67
72
|
}
|
|
68
73
|
}
|
|
69
74
|
}
|
|
70
75
|
}
|
|
71
|
-
`, { accountName, appleTeamIdentifier }, {
|
|
76
|
+
`, { accountName, appleTeamIdentifier, offset, limit }, {
|
|
72
77
|
additionalTypenames: ['AppleDevice', 'AppleTeam'],
|
|
73
78
|
})
|
|
74
79
|
.toPromise());
|
|
75
|
-
|
|
80
|
+
const [appleTeam] = data.account.byName.appleTeams;
|
|
81
|
+
const { appleDevices } = appleTeam;
|
|
82
|
+
if (!appleDevices) {
|
|
83
|
+
throw new Error(`Could not find devices on Apple team -- ${(0, AppleTeamFormatting_1.formatAppleTeam)(appleTeam)}`);
|
|
84
|
+
}
|
|
85
|
+
return appleDevices;
|
|
76
86
|
},
|
|
77
87
|
async getByDeviceIdentifierAsync(accountName, identifier) {
|
|
78
|
-
var _a;
|
|
79
88
|
const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
80
89
|
.query((0, graphql_tag_1.default) `
|
|
81
90
|
query AppleDevicesByIdentifier($accountName: String!, $identifier: String!) {
|
|
@@ -84,6 +93,7 @@ exports.AppleDeviceQuery = {
|
|
|
84
93
|
id
|
|
85
94
|
appleDevices(identifier: $identifier) {
|
|
86
95
|
id
|
|
96
|
+
model
|
|
87
97
|
identifier
|
|
88
98
|
name
|
|
89
99
|
deviceClass
|
|
@@ -101,6 +111,10 @@ exports.AppleDeviceQuery = {
|
|
|
101
111
|
additionalTypenames: ['AppleDevice', 'AppleTeam'],
|
|
102
112
|
})
|
|
103
113
|
.toPromise());
|
|
104
|
-
|
|
114
|
+
const device = data.account.byName.appleDevices[0];
|
|
115
|
+
if (!device) {
|
|
116
|
+
throw new errors_1.DeviceNotFoundError(`Device with id ${identifier} was not found on account ${accountName}.`);
|
|
117
|
+
}
|
|
118
|
+
return device;
|
|
105
119
|
},
|
|
106
120
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AppleTeamFragment } from '../../../../../graphql/generated';
|
|
1
|
+
import { AppleTeamFragment, AppleTeamsByAccountNameQueryVariables } from '../../../../../graphql/generated';
|
|
2
2
|
export declare const AppleTeamQuery: {
|
|
3
|
-
getAllForAccountAsync(accountName:
|
|
3
|
+
getAllForAccountAsync({ accountName, offset, limit, }: AppleTeamsByAccountNameQueryVariables): Promise<AppleTeamFragment[]>;
|
|
4
4
|
getByAppleTeamIdentifierAsync(accountId: string, appleTeamIdentifier: string): Promise<AppleTeamFragment | null>;
|
|
5
5
|
};
|
|
@@ -7,26 +7,27 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
|
7
7
|
const client_1 = require("../../../../../graphql/client");
|
|
8
8
|
const AppleTeam_1 = require("../../../../../graphql/types/credentials/AppleTeam");
|
|
9
9
|
exports.AppleTeamQuery = {
|
|
10
|
-
async getAllForAccountAsync(accountName) {
|
|
10
|
+
async getAllForAccountAsync({ accountName, offset, limit, }) {
|
|
11
|
+
var _a;
|
|
11
12
|
const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
12
13
|
.query((0, graphql_tag_1.default) `
|
|
13
|
-
query AppleTeamsByAccountName($accountName: String
|
|
14
|
+
query AppleTeamsByAccountName($accountName: String!, $offset: Int, $limit: Int) {
|
|
14
15
|
account {
|
|
15
16
|
byName(accountName: $accountName) {
|
|
16
17
|
id
|
|
17
|
-
appleTeams {
|
|
18
|
+
appleTeams(offset: $offset, limit: $limit) {
|
|
18
19
|
id
|
|
19
|
-
|
|
20
|
-
appleTeamIdentifier
|
|
20
|
+
...AppleTeamFragment
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
${(0, graphql_1.print)(AppleTeam_1.AppleTeamFragmentNode)}
|
|
26
|
+
`, { accountName, offset, limit }, {
|
|
26
27
|
additionalTypenames: ['AppleTeam'],
|
|
27
28
|
})
|
|
28
29
|
.toPromise());
|
|
29
|
-
return data.account.byName.appleTeams;
|
|
30
|
+
return (_a = data.account.byName.appleTeams) !== null && _a !== void 0 ? _a : [];
|
|
30
31
|
},
|
|
31
32
|
async getByAppleTeamIdentifierAsync(accountId, appleTeamIdentifier) {
|
|
32
33
|
var _a;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { JSONObject } from '@expo/json-file';
|
|
2
2
|
import type { XCBuildConfiguration } from 'xcode';
|
|
3
|
-
import { CommonIosAppCredentialsFragment, IosAppBuildCredentialsFragment } from '../../graphql/generated';
|
|
4
|
-
import { Account } from '../../user/Account';
|
|
3
|
+
import { AccountFragment, CommonIosAppCredentialsFragment, IosAppBuildCredentialsFragment } from '../../graphql/generated';
|
|
5
4
|
export interface App {
|
|
6
|
-
account:
|
|
5
|
+
account: AccountFragment;
|
|
7
6
|
projectName: string;
|
|
8
7
|
}
|
|
9
8
|
export interface Target {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppLookupParams } from '../api/
|
|
1
|
+
import { AppLookupParams } from '../api/graphql/types/AppLookupParams';
|
|
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IosAppBuildCredentialsFragment } from '../../../graphql/generated';
|
|
2
2
|
import { CredentialsContext } from '../../context';
|
|
3
|
-
import { AppLookupParams } from '../api/
|
|
3
|
+
import { AppLookupParams } from '../api/graphql/types/AppLookupParams';
|
|
4
4
|
import { Target } from '../types';
|
|
5
5
|
export declare function validateProvisioningProfileAsync(ctx: CredentialsContext, target: Target, app: AppLookupParams, buildCredentials: Partial<IosAppBuildCredentialsFragment> | null): Promise<boolean>;
|
|
@@ -63,7 +63,7 @@ function validateProvisioningProfileWithoutApple(app, { provisioningProfile, dis
|
|
|
63
63
|
async function validateProvisioningProfileWithAppleAsync(ctx, target, app, buildCredentials) {
|
|
64
64
|
(0, assert_1.default)(buildCredentials.provisioningProfile, 'Provisioning Profile must be defined');
|
|
65
65
|
const { developerPortalIdentifier, provisioningProfile } = buildCredentials.provisioningProfile;
|
|
66
|
-
const applePlatform = await (0, target_1.
|
|
66
|
+
const applePlatform = await (0, target_1.getApplePlatformFromTarget)(target);
|
|
67
67
|
const profilesFromApple = await ctx.appStore.listProvisioningProfilesAsync(app.bundleIdentifier, applePlatform, buildCredentials.iosDistributionType === generated_1.IosDistributionType.AdHoc
|
|
68
68
|
? provisioningProfile_1.ProfileClass.Adhoc
|
|
69
69
|
: provisioningProfile_1.ProfileClass.General);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Actor } from '../../user/User';
|
|
2
|
+
import { CredentialsContext, CredentialsContextProjectInfo } from '../context';
|
|
2
3
|
export interface Action<T = void> {
|
|
4
|
+
actor: Actor;
|
|
5
|
+
projectInfo: CredentialsContextProjectInfo | null;
|
|
3
6
|
runAsync(ctx: CredentialsContext): Promise<T>;
|
|
4
7
|
}
|
|
5
8
|
export declare class PressAnyKeyToContinue {
|
|
@@ -6,10 +6,7 @@ const eas_build_job_1 = require("@expo/eas-build-job");
|
|
|
6
6
|
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
7
7
|
const log_1 = tslib_1.__importStar(require("../../log"));
|
|
8
8
|
const gradle_1 = require("../../project/android/gradle");
|
|
9
|
-
const projectUtils_1 = require("../../project/projectUtils");
|
|
10
9
|
const prompts_1 = require("../../prompts");
|
|
11
|
-
const Account_1 = require("../../user/Account");
|
|
12
|
-
const actions_1 = require("../../user/actions");
|
|
13
10
|
const AssignFcm_1 = require("../android/actions/AssignFcm");
|
|
14
11
|
const AssignGoogleServiceAccountKey_1 = require("../android/actions/AssignGoogleServiceAccountKey");
|
|
15
12
|
const BuildCredentialsUtils_1 = require("../android/actions/BuildCredentialsUtils");
|
|
@@ -37,22 +34,17 @@ class ManageAndroid {
|
|
|
37
34
|
this.projectDir = projectDir;
|
|
38
35
|
}
|
|
39
36
|
async runAsync(currentActions = AndroidActions_1.highLevelActions) {
|
|
40
|
-
const hasProjectContext = !!
|
|
37
|
+
const hasProjectContext = !!this.callingAction.projectInfo;
|
|
41
38
|
const buildProfile = hasProjectContext
|
|
42
39
|
? await new SelectBuildProfileFromEasJson_1.SelectBuildProfileFromEasJson(this.projectDir, eas_build_job_1.Platform.ANDROID).runAsync()
|
|
43
40
|
: null;
|
|
44
41
|
const ctx = new context_1.CredentialsContext({
|
|
45
42
|
projectDir: process.cwd(),
|
|
46
|
-
|
|
43
|
+
projectInfo: this.callingAction.projectInfo,
|
|
44
|
+
user: this.callingAction.actor,
|
|
47
45
|
env: buildProfile === null || buildProfile === void 0 ? void 0 : buildProfile.env,
|
|
46
|
+
nonInteractive: false,
|
|
48
47
|
});
|
|
49
|
-
const accountName = ctx.hasProjectContext
|
|
50
|
-
? (0, projectUtils_1.getProjectAccountName)(ctx.exp, ctx.user)
|
|
51
|
-
: (0, actions_1.ensureActorHasUsername)(ctx.user);
|
|
52
|
-
const account = (0, Account_1.findAccountByName)(ctx.user.accounts, accountName);
|
|
53
|
-
if (!account) {
|
|
54
|
-
throw new Error(`You do not have access to account: ${accountName}`);
|
|
55
|
-
}
|
|
56
48
|
let gradleContext;
|
|
57
49
|
if (ctx.hasProjectContext) {
|
|
58
50
|
(0, assert_1.default)(buildProfile, 'buildProfile must be defined in a project context');
|
|
@@ -127,8 +119,6 @@ class ManageAndroid {
|
|
|
127
119
|
}
|
|
128
120
|
async createProjectContextAsync(ctx, buildProfile) {
|
|
129
121
|
(0, assert_1.default)(ctx.hasProjectContext, 'createProjectContextAsync: must have project context.');
|
|
130
|
-
// ensure the project exists on the EAS server
|
|
131
|
-
await (0, projectUtils_1.getProjectIdAsync)(ctx.exp);
|
|
132
122
|
return await (0, gradle_1.resolveGradleBuildContextAsync)(ctx.projectDir, buildProfile);
|
|
133
123
|
}
|
|
134
124
|
async runProjectSpecificActionAsync(ctx, action, gradleContext) {
|
|
@@ -11,7 +11,6 @@ const scheme_1 = require("../../project/ios/scheme");
|
|
|
11
11
|
const target_1 = require("../../project/ios/target");
|
|
12
12
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
13
13
|
const prompts_1 = require("../../prompts");
|
|
14
|
-
const Account_1 = require("../../user/Account");
|
|
15
14
|
const actions_1 = require("../../user/actions");
|
|
16
15
|
const context_1 = require("../context");
|
|
17
16
|
const AscApiKeyUtils_1 = require("../ios/actions/AscApiKeyUtils");
|
|
@@ -46,26 +45,26 @@ class ManageIos {
|
|
|
46
45
|
this.projectDir = projectDir;
|
|
47
46
|
}
|
|
48
47
|
async runAsync(currentActions = IosActions_1.highLevelActions) {
|
|
49
|
-
const
|
|
50
|
-
const buildProfile = hasProjectContext
|
|
48
|
+
const buildProfile = this.callingAction.projectInfo
|
|
51
49
|
? await new SelectBuildProfileFromEasJson_1.SelectBuildProfileFromEasJson(this.projectDir, eas_build_job_1.Platform.IOS).runAsync()
|
|
52
50
|
: null;
|
|
53
51
|
const ctx = new context_1.CredentialsContext({
|
|
54
52
|
projectDir: process.cwd(),
|
|
55
|
-
|
|
53
|
+
projectInfo: this.callingAction.projectInfo,
|
|
54
|
+
user: this.callingAction.actor,
|
|
56
55
|
env: buildProfile === null || buildProfile === void 0 ? void 0 : buildProfile.env,
|
|
56
|
+
nonInteractive: false,
|
|
57
57
|
});
|
|
58
58
|
const buildCredentialsActions = (0, IosActions_1.getBuildCredentialsActions)(ctx);
|
|
59
59
|
const pushKeyActions = (0, IosActions_1.getPushKeyActions)(ctx);
|
|
60
60
|
const ascApiKeyActions = (0, IosActions_1.getAscApiKeyActions)(ctx);
|
|
61
61
|
await ctx.bestEffortAppStoreAuthenticateAsync();
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const account =
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
62
|
+
const getAccountForProjectAsync = async (projectId) => {
|
|
63
|
+
return await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId);
|
|
64
|
+
};
|
|
65
|
+
const account = ctx.hasProjectContext
|
|
66
|
+
? await getAccountForProjectAsync(ctx.projectId)
|
|
67
|
+
: (0, actions_1.ensureActorHasPrimaryAccount)(ctx.user);
|
|
69
68
|
let app = null;
|
|
70
69
|
let targets = null;
|
|
71
70
|
if (ctx.hasProjectContext) {
|
|
@@ -80,7 +79,7 @@ class ManageIos {
|
|
|
80
79
|
(0, assert_1.default)(targets && app);
|
|
81
80
|
const iosAppCredentialsMap = {};
|
|
82
81
|
for (const target of targets) {
|
|
83
|
-
const appLookupParams = (0, BuildCredentialsUtils_1.
|
|
82
|
+
const appLookupParams = await (0, BuildCredentialsUtils_1.getAppLookupParamsFromContextAsync)(ctx, target);
|
|
84
83
|
iosAppCredentialsMap[target.targetName] =
|
|
85
84
|
await ctx.ios.getIosAppCredentialsWithCommonFieldsAsync(appLookupParams);
|
|
86
85
|
}
|
|
@@ -147,8 +146,6 @@ class ManageIos {
|
|
|
147
146
|
}
|
|
148
147
|
async createProjectContextAsync(ctx, account, buildProfile) {
|
|
149
148
|
(0, assert_1.default)(ctx.hasProjectContext, 'createProjectContextAsync: must have project context.');
|
|
150
|
-
// ensure the project exists on the EAS server
|
|
151
|
-
await (0, projectUtils_1.getProjectIdAsync)(ctx.exp);
|
|
152
149
|
const app = { account, projectName: ctx.exp.slug };
|
|
153
150
|
const xcodeBuildContext = await (0, scheme_1.resolveXcodeBuildContextAsync)({
|
|
154
151
|
projectDir: ctx.projectDir,
|
|
@@ -207,7 +204,7 @@ class ManageIos {
|
|
|
207
204
|
return;
|
|
208
205
|
}
|
|
209
206
|
const target = await this.selectTargetAsync(targets);
|
|
210
|
-
const appLookupParams = (0, BuildCredentialsUtils_1.
|
|
207
|
+
const appLookupParams = await (0, BuildCredentialsUtils_1.getAppLookupParamsFromContextAsync)(ctx, target);
|
|
211
208
|
switch (action) {
|
|
212
209
|
case Actions_1.IosActionType.UseExistingDistributionCertificate: {
|
|
213
210
|
const distCert = await (0, DistributionCertificateUtils_1.selectValidDistributionCertificateAsync)(ctx, appLookupParams);
|
|
@@ -2,7 +2,7 @@ import { Platform } from '@expo/eas-build-job';
|
|
|
2
2
|
import { BuildProfile } from '@expo/eas-json';
|
|
3
3
|
export declare class SelectBuildProfileFromEasJson<T extends Platform> {
|
|
4
4
|
private platform;
|
|
5
|
-
private
|
|
5
|
+
private easJsonAccessor;
|
|
6
6
|
constructor(projectDir: string, platform: T);
|
|
7
7
|
runAsync(): Promise<BuildProfile<T>>;
|
|
8
8
|
getProfileNameFromEasConfigAsync(): Promise<string>;
|
|
@@ -8,16 +8,16 @@ const prompts_1 = require("../../prompts");
|
|
|
8
8
|
class SelectBuildProfileFromEasJson {
|
|
9
9
|
constructor(projectDir, platform) {
|
|
10
10
|
this.platform = platform;
|
|
11
|
-
this.
|
|
11
|
+
this.easJsonAccessor = new eas_json_1.EasJsonAccessor(projectDir);
|
|
12
12
|
}
|
|
13
13
|
async runAsync() {
|
|
14
14
|
const profileName = await this.getProfileNameFromEasConfigAsync();
|
|
15
|
-
const easConfig = await
|
|
15
|
+
const easConfig = await eas_json_1.EasJsonUtils.getBuildProfileAsync(this.easJsonAccessor, this.platform, profileName);
|
|
16
16
|
log_1.default.succeed(`Using build profile: ${profileName}`);
|
|
17
17
|
return easConfig;
|
|
18
18
|
}
|
|
19
19
|
async getProfileNameFromEasConfigAsync() {
|
|
20
|
-
const buildProfileNames = await
|
|
20
|
+
const buildProfileNames = await eas_json_1.EasJsonUtils.getBuildProfileNamesAsync(this.easJsonAccessor);
|
|
21
21
|
if (buildProfileNames.length === 0) {
|
|
22
22
|
throw new Error('You need at least one iOS build profile declared in eas.json. Go to https://docs.expo.dev/build/eas-json/ for more details');
|
|
23
23
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { Actor } from '../../user/User';
|
|
2
|
+
import { CredentialsContextProjectInfo } from '../context';
|
|
1
3
|
export declare class SelectPlatform {
|
|
4
|
+
readonly actor: Actor;
|
|
5
|
+
readonly projectInfo: CredentialsContextProjectInfo | null;
|
|
2
6
|
private readonly flagPlatform?;
|
|
3
|
-
constructor(flagPlatform?: string | undefined);
|
|
7
|
+
constructor(actor: Actor, projectInfo: CredentialsContextProjectInfo | null, flagPlatform?: string | undefined);
|
|
4
8
|
runAsync(): Promise<void>;
|
|
5
9
|
}
|
|
@@ -5,15 +5,17 @@ const platform_1 = require("../../platform");
|
|
|
5
5
|
const ManageAndroid_1 = require("./ManageAndroid");
|
|
6
6
|
const ManageIos_1 = require("./ManageIos");
|
|
7
7
|
class SelectPlatform {
|
|
8
|
-
constructor(flagPlatform) {
|
|
8
|
+
constructor(actor, projectInfo, flagPlatform) {
|
|
9
|
+
this.actor = actor;
|
|
10
|
+
this.projectInfo = projectInfo;
|
|
9
11
|
this.flagPlatform = flagPlatform;
|
|
10
12
|
}
|
|
11
13
|
async runAsync() {
|
|
12
14
|
const platform = await (0, platform_1.selectPlatformAsync)(this.flagPlatform);
|
|
13
15
|
if (platform === 'ios') {
|
|
14
|
-
return await new ManageIos_1.ManageIos(
|
|
16
|
+
return await new ManageIos_1.ManageIos(this, process.cwd()).runAsync();
|
|
15
17
|
}
|
|
16
|
-
return await new ManageAndroid_1.ManageAndroid(
|
|
18
|
+
return await new ManageAndroid_1.ManageAndroid(this, process.cwd()).runAsync();
|
|
17
19
|
}
|
|
18
20
|
}
|
|
19
21
|
exports.SelectPlatform = SelectPlatform;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import AppStoreApi from '../../../credentials/ios/appstore/AppStoreApi';
|
|
2
|
-
import { AppleTeam } from '../../../graphql/generated';
|
|
3
|
-
import { Account } from '../../../user/Account';
|
|
2
|
+
import { AccountFragment, AppleTeam } from '../../../graphql/generated';
|
|
4
3
|
export declare enum RegistrationMethod {
|
|
5
4
|
WEBSITE = 0,
|
|
6
5
|
INPUT = 1,
|
|
@@ -11,7 +10,7 @@ export default class DeviceCreateAction {
|
|
|
11
10
|
private appStoreApi;
|
|
12
11
|
private account;
|
|
13
12
|
private appleTeam;
|
|
14
|
-
constructor(appStoreApi: AppStoreApi, account:
|
|
13
|
+
constructor(appStoreApi: AppStoreApi, account: AccountFragment, appleTeam: Pick<AppleTeam, 'appleTeamIdentifier' | 'appleTeamName' | 'id'>);
|
|
15
14
|
runAsync(): Promise<RegistrationMethod>;
|
|
16
15
|
private askForRegistrationMethodAsync;
|
|
17
16
|
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { ExpoConfig } from '@expo/config';
|
|
2
1
|
import AppStoreApi from '../credentials/ios/appstore/AppStoreApi';
|
|
3
2
|
import { Actor } from '../user/User';
|
|
4
3
|
export interface DeviceManagerContext {
|
|
5
4
|
appStore: AppStoreApi;
|
|
6
|
-
exp: ExpoConfig | null;
|
|
7
|
-
projectDir: string | null;
|
|
8
5
|
user: Actor;
|
|
6
|
+
projectId: string | null;
|
|
9
7
|
}
|
|
10
|
-
export declare function createContextAsync({ appStore,
|
|
8
|
+
export declare function createContextAsync({ appStore, user, projectId, }: {
|
|
11
9
|
appStore: AppStoreApi;
|
|
12
|
-
cwd?: string;
|
|
13
10
|
user: Actor;
|
|
11
|
+
projectId: string | undefined;
|
|
14
12
|
}): Promise<DeviceManagerContext>;
|
package/build/devices/context.js
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createContextAsync = void 0;
|
|
4
|
-
|
|
5
|
-
const projectUtils_1 = require("../project/projectUtils");
|
|
6
|
-
async function createContextAsync({ appStore, cwd, user, }) {
|
|
7
|
-
const projectDir = await (0, projectUtils_1.findProjectRootAsync)({ cwd });
|
|
8
|
-
let exp = null;
|
|
9
|
-
if (projectDir) {
|
|
10
|
-
const config = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
11
|
-
exp = config.exp;
|
|
12
|
-
}
|
|
4
|
+
async function createContextAsync({ appStore, user, projectId, }) {
|
|
13
5
|
return {
|
|
14
6
|
appStore,
|
|
15
|
-
projectDir,
|
|
16
|
-
exp,
|
|
17
7
|
user,
|
|
8
|
+
projectId: projectId !== null && projectId !== void 0 ? projectId : null,
|
|
18
9
|
};
|
|
19
10
|
}
|
|
20
11
|
exports.createContextAsync = createContextAsync;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Account } from '../user/Account';
|
|
1
|
+
import { AccountFragment } from '../graphql/generated';
|
|
3
2
|
import { Actor } from '../user/User';
|
|
4
3
|
import { DeviceManagerContext } from './context';
|
|
5
4
|
export default class DeviceManager {
|
|
@@ -9,10 +8,10 @@ export default class DeviceManager {
|
|
|
9
8
|
private resolveAccountAsync;
|
|
10
9
|
}
|
|
11
10
|
export declare class AccountResolver {
|
|
12
|
-
private
|
|
11
|
+
private projectId;
|
|
13
12
|
private user;
|
|
14
|
-
constructor(
|
|
15
|
-
resolveAccountAsync(): Promise<
|
|
13
|
+
constructor(projectId: string | null, user: Actor);
|
|
14
|
+
resolveAccountAsync(): Promise<AccountFragment>;
|
|
16
15
|
private resolveProjectAccountAsync;
|
|
17
16
|
private promptForAccountAsync;
|
|
18
17
|
}
|
package/build/devices/manager.js
CHANGED
|
@@ -9,11 +9,9 @@ const AppleTeamQuery_1 = require("../credentials/ios/api/graphql/queries/AppleTe
|
|
|
9
9
|
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
10
10
|
const projectUtils_1 = require("../project/projectUtils");
|
|
11
11
|
const prompts_1 = require("../prompts");
|
|
12
|
-
const Account_1 = require("../user/Account");
|
|
13
|
-
const User_1 = require("../user/User");
|
|
14
12
|
const action_1 = tslib_1.__importDefault(require("./actions/create/action"));
|
|
15
13
|
const CREATE_COMMAND_DESCRIPTION = `This command lets you register your Apple devices (iPhones and iPads) for internal distribution of your app.
|
|
16
|
-
Internal distribution means that you won't need upload your app archive to App Store / Testflight.
|
|
14
|
+
Internal distribution means that you won't need to upload your app archive to App Store / Testflight.
|
|
17
15
|
Your app archive (.ipa) will be installable on your equipment as long as you sign your application with an adhoc provisiong profile.
|
|
18
16
|
The provisioning profile needs to contain the UDIDs (unique identifiers) of your iPhones and iPads.
|
|
19
17
|
|
|
@@ -36,18 +34,18 @@ class DeviceManager {
|
|
|
36
34
|
await action.runAsync();
|
|
37
35
|
}
|
|
38
36
|
async resolveAccountAsync() {
|
|
39
|
-
const resolver = new AccountResolver(this.ctx.
|
|
37
|
+
const resolver = new AccountResolver(this.ctx.projectId, this.ctx.user);
|
|
40
38
|
return await resolver.resolveAccountAsync();
|
|
41
39
|
}
|
|
42
40
|
}
|
|
43
41
|
exports.default = DeviceManager;
|
|
44
42
|
class AccountResolver {
|
|
45
|
-
constructor(
|
|
46
|
-
this.
|
|
43
|
+
constructor(projectId, user) {
|
|
44
|
+
this.projectId = projectId;
|
|
47
45
|
this.user = user;
|
|
48
46
|
}
|
|
49
47
|
async resolveAccountAsync() {
|
|
50
|
-
if (this.
|
|
48
|
+
if (this.projectId) {
|
|
51
49
|
const account = await this.resolveProjectAccountAsync();
|
|
52
50
|
if (account) {
|
|
53
51
|
return account;
|
|
@@ -56,17 +54,12 @@ class AccountResolver {
|
|
|
56
54
|
return await this.promptForAccountAsync();
|
|
57
55
|
}
|
|
58
56
|
async resolveProjectAccountAsync() {
|
|
59
|
-
(0, assert_1.default)(this.
|
|
60
|
-
const
|
|
61
|
-
const projectAccount = (0, Account_1.findAccountByName)(this.user.accounts, projectAccountName);
|
|
62
|
-
if (!projectAccount) {
|
|
63
|
-
log_1.default.warn(`Your account (${(0, User_1.getActorDisplayName)(this.user)}) doesn't have access to the ${chalk_1.default.bold(projectAccountName)} account`);
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
57
|
+
(0, assert_1.default)(this.projectId, 'expo config is not set');
|
|
58
|
+
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(this.projectId);
|
|
66
59
|
const useProjectAccount = await (0, prompts_1.confirmAsync)({
|
|
67
|
-
message: `You're inside the project directory. Would you like to use ${chalk_1.default.underline(
|
|
60
|
+
message: `You're inside the project directory. Would you like to use the ${chalk_1.default.underline(account.name)} account?`,
|
|
68
61
|
});
|
|
69
|
-
return useProjectAccount ?
|
|
62
|
+
return useProjectAccount ? account : undefined;
|
|
70
63
|
}
|
|
71
64
|
async promptForAccountAsync() {
|
|
72
65
|
const choices = this.user.accounts.map(account => ({
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PaginatedQueryOptions } from '../commandUtils/pagination';
|
|
2
|
+
import { AppleDeviceFragment, AppleTeamFragment } from '../graphql/generated';
|
|
3
|
+
import { AppleTeamIdAndName } from './utils/formatDevice';
|
|
4
|
+
export declare const TEAMS_LIMIT = 50;
|
|
5
|
+
export declare const DEVICES_LIMIT = 50;
|
|
6
|
+
export declare function selectAppleTeamOnAccountAsync({ accountName, selectionPromptTitle, paginatedQueryOptions, }: {
|
|
7
|
+
accountName: string;
|
|
8
|
+
selectionPromptTitle: string;
|
|
9
|
+
paginatedQueryOptions: PaginatedQueryOptions;
|
|
10
|
+
}): Promise<AppleTeamFragment>;
|
|
11
|
+
export declare function selectAppleDeviceOnAppleTeamAsync({ accountName, appleTeamIdentifier, selectionPromptTitle, paginatedQueryOptions, }: {
|
|
12
|
+
accountName: string;
|
|
13
|
+
appleTeamIdentifier: string;
|
|
14
|
+
selectionPromptTitle: string;
|
|
15
|
+
paginatedQueryOptions: PaginatedQueryOptions;
|
|
16
|
+
}): Promise<AppleDeviceFragment>;
|
|
17
|
+
export declare function listAndRenderAppleDevicesOnAppleTeamAsync({ accountName, appleTeam, paginatedQueryOptions, }: {
|
|
18
|
+
accountName: string;
|
|
19
|
+
appleTeam: AppleTeamIdAndName;
|
|
20
|
+
paginatedQueryOptions: PaginatedQueryOptions;
|
|
21
|
+
}): Promise<void>;
|