eas-cli 7.8.0 → 7.8.2
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 +61 -61
- package/build/build/local.js +1 -1
- package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.d.ts +7 -1
- package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.js +41 -5
- package/build/credentials/ios/api/GraphqlClient.js +1 -1
- package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.d.ts +7 -1
- package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.js +41 -5
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.d.ts +11 -3
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +77 -53
- package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.d.ts +7 -1
- package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +41 -5
- package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.d.ts +7 -1
- package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.js +41 -5
- package/build/devices/actions/create/action.js +1 -1
- package/build/devices/actions/create/developerPortalMethod.d.ts +2 -2
- package/build/devices/actions/create/developerPortalMethod.js +5 -5
- package/build/graphql/generated.d.ts +279 -187
- package/build/graphql/types/Build.js +0 -1
- package/build/project/publish.js +5 -4
- package/build/project/resolveRuntimeVersionAsync.js +5 -4
- package/build/utils/expoUpdatesCli.d.ts +2 -0
- package/build/utils/expoUpdatesCli.js +12 -4
- package/build/utils/relay.d.ts +6 -0
- package/build/utils/relay.js +40 -1
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
|
@@ -6,17 +6,49 @@ const graphql_1 = require("graphql");
|
|
|
6
6
|
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
7
7
|
const client_1 = require("../../../../../graphql/client");
|
|
8
8
|
const AppStoreConnectApiKey_1 = require("../../../../../graphql/types/credentials/AppStoreConnectApiKey");
|
|
9
|
+
const relay_1 = require("../../../../../utils/relay");
|
|
9
10
|
exports.AppStoreConnectApiKeyQuery = {
|
|
10
11
|
async getAllForAccountAsync(graphqlClient, accountName) {
|
|
12
|
+
const paginatedGetterAsync = async (relayArgs) => {
|
|
13
|
+
return await exports.AppStoreConnectApiKeyQuery.getAllForAccountPaginatedAsync(graphqlClient, accountName, relayArgs);
|
|
14
|
+
};
|
|
15
|
+
return await (0, relay_1.fetchEntireDatasetAsync)({
|
|
16
|
+
paginatedGetterAsync,
|
|
17
|
+
progressBarLabel: 'fetching ASC Keys...',
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
async getAllForAccountPaginatedAsync(graphqlClient, accountName, { after, first, before, last, }) {
|
|
11
21
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
12
22
|
.query((0, graphql_tag_1.default) `
|
|
13
|
-
query
|
|
23
|
+
query AppStoreConnectApiKeysPaginatedByAccountQuery(
|
|
24
|
+
$accountName: String!
|
|
25
|
+
$after: String
|
|
26
|
+
$first: Int
|
|
27
|
+
$before: String
|
|
28
|
+
$last: Int
|
|
29
|
+
) {
|
|
14
30
|
account {
|
|
15
31
|
byName(accountName: $accountName) {
|
|
16
32
|
id
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
33
|
+
appStoreConnectApiKeysPaginated(
|
|
34
|
+
after: $after
|
|
35
|
+
first: $first
|
|
36
|
+
before: $before
|
|
37
|
+
last: $last
|
|
38
|
+
) {
|
|
39
|
+
edges {
|
|
40
|
+
cursor
|
|
41
|
+
node {
|
|
42
|
+
id
|
|
43
|
+
...AppStoreConnectApiKeyFragment
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
pageInfo {
|
|
47
|
+
hasNextPage
|
|
48
|
+
hasPreviousPage
|
|
49
|
+
startCursor
|
|
50
|
+
endCursor
|
|
51
|
+
}
|
|
20
52
|
}
|
|
21
53
|
}
|
|
22
54
|
}
|
|
@@ -24,10 +56,14 @@ exports.AppStoreConnectApiKeyQuery = {
|
|
|
24
56
|
${(0, graphql_1.print)(AppStoreConnectApiKey_1.AppStoreConnectApiKeyFragmentNode)}
|
|
25
57
|
`, {
|
|
26
58
|
accountName,
|
|
59
|
+
after,
|
|
60
|
+
first,
|
|
61
|
+
before,
|
|
62
|
+
last,
|
|
27
63
|
}, {
|
|
28
64
|
additionalTypenames: ['AppStoreConnectApiKey'],
|
|
29
65
|
})
|
|
30
66
|
.toPromise());
|
|
31
|
-
return data.account.byName.
|
|
67
|
+
return data.account.byName.appStoreConnectApiKeysPaginated;
|
|
32
68
|
},
|
|
33
69
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
-
import { AppleDevice, AppleDeviceFragment, AppleDevicesByTeamIdentifierQueryVariables, AppleTeamFragment } from '../../../../../graphql/generated';
|
|
2
|
+
import { AppleDevice, AppleDeviceFilterInput, AppleDeviceFragment, AppleDevicesByTeamIdentifierQueryVariables, AppleDevicesPaginatedByAccountQuery, AppleTeamFragment } from '../../../../../graphql/generated';
|
|
3
3
|
export type AppleDeviceFragmentWithAppleTeam = AppleDeviceFragment & {
|
|
4
4
|
appleTeam: AppleTeamFragment;
|
|
5
5
|
};
|
|
@@ -11,9 +11,17 @@ export type AppleDevicesByIdentifierQueryResult = AppleDeviceQueryResult & {
|
|
|
11
11
|
appleTeam: AppleTeamFragment;
|
|
12
12
|
};
|
|
13
13
|
export declare const AppleDeviceQuery: {
|
|
14
|
-
getAllByAppleTeamIdentifierAsync(graphqlClient: ExpoGraphqlClient,
|
|
14
|
+
getAllByAppleTeamIdentifierAsync(graphqlClient: ExpoGraphqlClient, accountName: string, appleTeamIdentifier: string, { useCache }?: {
|
|
15
15
|
useCache?: boolean | undefined;
|
|
16
16
|
}): Promise<AppleDeviceFragmentWithAppleTeam[]>;
|
|
17
17
|
getAllForAppleTeamAsync(graphqlClient: ExpoGraphqlClient, { accountName, appleTeamIdentifier, offset, limit }: AppleDevicesByTeamIdentifierQueryVariables): Promise<AppleDeviceFragment[]>;
|
|
18
|
-
getByDeviceIdentifierAsync(graphqlClient: ExpoGraphqlClient, accountName: string, identifier: string): Promise<
|
|
18
|
+
getByDeviceIdentifierAsync(graphqlClient: ExpoGraphqlClient, accountName: string, identifier: string): Promise<AppleDeviceFragmentWithAppleTeam>;
|
|
19
|
+
getAllForAccountPaginatedAsync(graphqlClient: ExpoGraphqlClient, accountName: string, { after, first, before, last, filter, useCache, }: {
|
|
20
|
+
after?: string | undefined;
|
|
21
|
+
first?: number | undefined;
|
|
22
|
+
before?: string | undefined;
|
|
23
|
+
last?: number | undefined;
|
|
24
|
+
filter?: AppleDeviceFilterInput | undefined;
|
|
25
|
+
useCache?: boolean | undefined;
|
|
26
|
+
}): Promise<AppleDevicesPaginatedByAccountQuery['account']['byName']['appleDevicesPaginated']>;
|
|
19
27
|
};
|
|
@@ -2,48 +2,29 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AppleDeviceQuery = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
5
|
const graphql_1 = require("graphql");
|
|
7
6
|
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
8
7
|
const errors_1 = require("../../../../../devices/utils/errors");
|
|
9
8
|
const client_1 = require("../../../../../graphql/client");
|
|
10
9
|
const AppleDevice_1 = require("../../../../../graphql/types/credentials/AppleDevice");
|
|
11
10
|
const AppleTeam_1 = require("../../../../../graphql/types/credentials/AppleTeam");
|
|
11
|
+
const relay_1 = require("../../../../../utils/relay");
|
|
12
12
|
const AppleTeamFormatting_1 = require("../../../actions/AppleTeamFormatting");
|
|
13
13
|
exports.AppleDeviceQuery = {
|
|
14
|
-
async getAllByAppleTeamIdentifierAsync(graphqlClient,
|
|
15
|
-
const
|
|
16
|
-
.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
${(0, graphql_1.print)(AppleTeam_1.AppleTeamFragmentNode)}
|
|
34
|
-
${(0, graphql_1.print)(AppleDevice_1.AppleDeviceFragmentNode)}
|
|
35
|
-
`, {
|
|
36
|
-
accountId,
|
|
37
|
-
appleTeamIdentifier,
|
|
38
|
-
}, {
|
|
39
|
-
additionalTypenames: ['AppleDevice'],
|
|
40
|
-
requestPolicy: useCache ? 'cache-first' : 'network-only',
|
|
41
|
-
})
|
|
42
|
-
.toPromise());
|
|
43
|
-
(0, assert_1.default)(data.appleTeam.byAppleTeamIdentifier, 'byAppleTeamIdentifier should be defined in this context - enforced by GraphQL');
|
|
44
|
-
const { appleDevices } = data.appleTeam.byAppleTeamIdentifier;
|
|
45
|
-
(0, assert_1.default)(appleDevices, 'Apple Devices should be defined in this context - enforced by GraphQL');
|
|
46
|
-
return appleDevices;
|
|
14
|
+
async getAllByAppleTeamIdentifierAsync(graphqlClient, accountName, appleTeamIdentifier, { useCache = true } = {}) {
|
|
15
|
+
const paginatedGetterAsync = async (relayArgs) => {
|
|
16
|
+
return await exports.AppleDeviceQuery.getAllForAccountPaginatedAsync(graphqlClient, accountName, {
|
|
17
|
+
...relayArgs,
|
|
18
|
+
filter: {
|
|
19
|
+
appleTeamIdentifier,
|
|
20
|
+
},
|
|
21
|
+
useCache,
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
return await (0, relay_1.fetchEntireDatasetAsync)({
|
|
25
|
+
paginatedGetterAsync,
|
|
26
|
+
progressBarLabel: 'Fetching Apple devices...',
|
|
27
|
+
});
|
|
47
28
|
},
|
|
48
29
|
async getAllForAppleTeamAsync(graphqlClient, { accountName, appleTeamIdentifier, offset, limit }) {
|
|
49
30
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
@@ -86,36 +67,79 @@ exports.AppleDeviceQuery = {
|
|
|
86
67
|
return appleDevices;
|
|
87
68
|
},
|
|
88
69
|
async getByDeviceIdentifierAsync(graphqlClient, accountName, identifier) {
|
|
70
|
+
const paginatedGetterAsync = async (relayArgs) => {
|
|
71
|
+
return await exports.AppleDeviceQuery.getAllForAccountPaginatedAsync(graphqlClient, accountName, {
|
|
72
|
+
...relayArgs,
|
|
73
|
+
filter: {
|
|
74
|
+
identifier,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
const devices = await (0, relay_1.fetchEntireDatasetAsync)({
|
|
79
|
+
paginatedGetterAsync,
|
|
80
|
+
});
|
|
81
|
+
const device = devices[0];
|
|
82
|
+
if (!device) {
|
|
83
|
+
throw new errors_1.DeviceNotFoundError(`Device with id ${identifier} was not found on account ${accountName}.`);
|
|
84
|
+
}
|
|
85
|
+
return device;
|
|
86
|
+
},
|
|
87
|
+
async getAllForAccountPaginatedAsync(graphqlClient, accountName, { after, first, before, last, filter, useCache = true, }) {
|
|
89
88
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
90
89
|
.query((0, graphql_tag_1.default) `
|
|
91
|
-
query
|
|
90
|
+
query AppleDevicesPaginatedByAccountQuery(
|
|
91
|
+
$accountName: String!
|
|
92
|
+
$after: String
|
|
93
|
+
$first: Int
|
|
94
|
+
$before: String
|
|
95
|
+
$last: Int
|
|
96
|
+
$filter: AppleDeviceFilterInput
|
|
97
|
+
) {
|
|
92
98
|
account {
|
|
93
99
|
byName(accountName: $accountName) {
|
|
94
100
|
id
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
appleDevicesPaginated(
|
|
102
|
+
after: $after
|
|
103
|
+
first: $first
|
|
104
|
+
before: $before
|
|
105
|
+
last: $last
|
|
106
|
+
filter: $filter
|
|
107
|
+
) {
|
|
108
|
+
edges {
|
|
109
|
+
cursor
|
|
110
|
+
node {
|
|
111
|
+
id
|
|
112
|
+
...AppleDeviceFragment
|
|
113
|
+
appleTeam {
|
|
114
|
+
id
|
|
115
|
+
...AppleTeamFragment
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
pageInfo {
|
|
120
|
+
hasNextPage
|
|
121
|
+
hasPreviousPage
|
|
122
|
+
startCursor
|
|
123
|
+
endCursor
|
|
106
124
|
}
|
|
107
125
|
}
|
|
108
126
|
}
|
|
109
127
|
}
|
|
110
128
|
}
|
|
111
|
-
|
|
112
|
-
|
|
129
|
+
${(0, graphql_1.print)(AppleTeam_1.AppleTeamFragmentNode)}
|
|
130
|
+
${(0, graphql_1.print)(AppleDevice_1.AppleDeviceFragmentNode)}
|
|
131
|
+
`, {
|
|
132
|
+
accountName,
|
|
133
|
+
after,
|
|
134
|
+
first,
|
|
135
|
+
before,
|
|
136
|
+
last,
|
|
137
|
+
filter,
|
|
138
|
+
}, {
|
|
139
|
+
additionalTypenames: ['AppleDevice'],
|
|
140
|
+
requestPolicy: useCache ? 'cache-first' : 'network-only',
|
|
113
141
|
})
|
|
114
142
|
.toPromise());
|
|
115
|
-
|
|
116
|
-
if (!device) {
|
|
117
|
-
throw new errors_1.DeviceNotFoundError(`Device with id ${identifier} was not found on account ${accountName}.`);
|
|
118
|
-
}
|
|
119
|
-
return device;
|
|
143
|
+
return data.account.byName.appleDevicesPaginated;
|
|
120
144
|
},
|
|
121
145
|
};
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
-
import { AppleDistributionCertificateFragment, IosDistributionType } from '../../../../../graphql/generated';
|
|
2
|
+
import { AppleDistributionCertificateFragment, AppleDistributionCertificatesPaginatedByAccountQuery, IosDistributionType } from '../../../../../graphql/generated';
|
|
3
3
|
export declare const AppleDistributionCertificateQuery: {
|
|
4
4
|
getForAppAsync(graphqlClient: ExpoGraphqlClient, projectFullName: string, { appleAppIdentifierId, iosDistributionType, }: {
|
|
5
5
|
appleAppIdentifierId: string;
|
|
6
6
|
iosDistributionType: IosDistributionType;
|
|
7
7
|
}): Promise<AppleDistributionCertificateFragment | null>;
|
|
8
8
|
getAllForAccountAsync(graphqlClient: ExpoGraphqlClient, accountName: string): Promise<AppleDistributionCertificateFragment[]>;
|
|
9
|
+
getAllForAccountPaginatedAsync(graphqlClient: ExpoGraphqlClient, accountName: string, { after, first, before, last, }: {
|
|
10
|
+
after?: string | undefined;
|
|
11
|
+
first?: number | undefined;
|
|
12
|
+
before?: string | undefined;
|
|
13
|
+
last?: number | undefined;
|
|
14
|
+
}): Promise<AppleDistributionCertificatesPaginatedByAccountQuery['account']['byName']['appleDistributionCertificatesPaginated']>;
|
|
9
15
|
};
|
|
@@ -8,6 +8,7 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
|
8
8
|
const client_1 = require("../../../../../graphql/client");
|
|
9
9
|
const AppleDistributionCertificate_1 = require("../../../../../graphql/types/credentials/AppleDistributionCertificate");
|
|
10
10
|
const AppleTeam_1 = require("../../../../../graphql/types/credentials/AppleTeam");
|
|
11
|
+
const relay_1 = require("../../../../../utils/relay");
|
|
11
12
|
exports.AppleDistributionCertificateQuery = {
|
|
12
13
|
async getForAppAsync(graphqlClient, projectFullName, { appleAppIdentifierId, iosDistributionType, }) {
|
|
13
14
|
var _a, _b, _c;
|
|
@@ -58,15 +59,46 @@ exports.AppleDistributionCertificateQuery = {
|
|
|
58
59
|
return ((_c = (_b = (_a = data.app.byFullName.iosAppCredentials[0]) === null || _a === void 0 ? void 0 : _a.iosAppBuildCredentialsList[0]) === null || _b === void 0 ? void 0 : _b.distributionCertificate) !== null && _c !== void 0 ? _c : null);
|
|
59
60
|
},
|
|
60
61
|
async getAllForAccountAsync(graphqlClient, accountName) {
|
|
62
|
+
const paginatedGetterAsync = async (relayArgs) => {
|
|
63
|
+
return await exports.AppleDistributionCertificateQuery.getAllForAccountPaginatedAsync(graphqlClient, accountName, relayArgs);
|
|
64
|
+
};
|
|
65
|
+
return await (0, relay_1.fetchEntireDatasetAsync)({
|
|
66
|
+
paginatedGetterAsync,
|
|
67
|
+
progressBarLabel: 'fetching Apple Distribution Certificates...',
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
async getAllForAccountPaginatedAsync(graphqlClient, accountName, { after, first, before, last, }) {
|
|
61
71
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
62
72
|
.query((0, graphql_tag_1.default) `
|
|
63
|
-
query
|
|
73
|
+
query AppleDistributionCertificatesPaginatedByAccountQuery(
|
|
74
|
+
$accountName: String!
|
|
75
|
+
$after: String
|
|
76
|
+
$first: Int
|
|
77
|
+
$before: String
|
|
78
|
+
$last: Int
|
|
79
|
+
) {
|
|
64
80
|
account {
|
|
65
81
|
byName(accountName: $accountName) {
|
|
66
82
|
id
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
83
|
+
appleDistributionCertificatesPaginated(
|
|
84
|
+
after: $after
|
|
85
|
+
first: $first
|
|
86
|
+
before: $before
|
|
87
|
+
last: $last
|
|
88
|
+
) {
|
|
89
|
+
edges {
|
|
90
|
+
cursor
|
|
91
|
+
node {
|
|
92
|
+
id
|
|
93
|
+
...AppleDistributionCertificateFragment
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
pageInfo {
|
|
97
|
+
hasNextPage
|
|
98
|
+
hasPreviousPage
|
|
99
|
+
startCursor
|
|
100
|
+
endCursor
|
|
101
|
+
}
|
|
70
102
|
}
|
|
71
103
|
}
|
|
72
104
|
}
|
|
@@ -74,10 +106,14 @@ exports.AppleDistributionCertificateQuery = {
|
|
|
74
106
|
${(0, graphql_1.print)(AppleDistributionCertificate_1.AppleDistributionCertificateFragmentNode)}
|
|
75
107
|
`, {
|
|
76
108
|
accountName,
|
|
109
|
+
after,
|
|
110
|
+
first,
|
|
111
|
+
before,
|
|
112
|
+
last,
|
|
77
113
|
}, {
|
|
78
114
|
additionalTypenames: ['AppleDistributionCertificate'],
|
|
79
115
|
})
|
|
80
116
|
.toPromise());
|
|
81
|
-
return data.account.byName.
|
|
117
|
+
return data.account.byName.appleDistributionCertificatesPaginated;
|
|
82
118
|
},
|
|
83
119
|
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
-
import { ApplePushKeyFragment } from '../../../../../graphql/generated';
|
|
2
|
+
import { ApplePushKeyFragment, ApplePushKeysPaginatedByAccountQuery } from '../../../../../graphql/generated';
|
|
3
3
|
export declare const ApplePushKeyQuery: {
|
|
4
4
|
getAllForAccountAsync(graphqlClient: ExpoGraphqlClient, accountName: string): Promise<ApplePushKeyFragment[]>;
|
|
5
|
+
getAllForAccountPaginatedAsync(graphqlClient: ExpoGraphqlClient, accountName: string, { after, first, before, last, }: {
|
|
6
|
+
after?: string | undefined;
|
|
7
|
+
first?: number | undefined;
|
|
8
|
+
before?: string | undefined;
|
|
9
|
+
last?: number | undefined;
|
|
10
|
+
}): Promise<ApplePushKeysPaginatedByAccountQuery['account']['byName']['applePushKeysPaginated']>;
|
|
5
11
|
};
|
|
@@ -6,17 +6,49 @@ const graphql_1 = require("graphql");
|
|
|
6
6
|
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
7
7
|
const client_1 = require("../../../../../graphql/client");
|
|
8
8
|
const ApplePushKey_1 = require("../../../../../graphql/types/credentials/ApplePushKey");
|
|
9
|
+
const relay_1 = require("../../../../../utils/relay");
|
|
9
10
|
exports.ApplePushKeyQuery = {
|
|
10
11
|
async getAllForAccountAsync(graphqlClient, accountName) {
|
|
12
|
+
const paginatedGetterAsync = async (relayArgs) => {
|
|
13
|
+
return await exports.ApplePushKeyQuery.getAllForAccountPaginatedAsync(graphqlClient, accountName, relayArgs);
|
|
14
|
+
};
|
|
15
|
+
return await (0, relay_1.fetchEntireDatasetAsync)({
|
|
16
|
+
paginatedGetterAsync,
|
|
17
|
+
progressBarLabel: 'fetching Apple Push Keys...',
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
async getAllForAccountPaginatedAsync(graphqlClient, accountName, { after, first, before, last, }) {
|
|
11
21
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
12
22
|
.query((0, graphql_tag_1.default) `
|
|
13
|
-
query
|
|
23
|
+
query ApplePushKeysPaginatedByAccountQuery(
|
|
24
|
+
$accountName: String!
|
|
25
|
+
$after: String
|
|
26
|
+
$first: Int
|
|
27
|
+
$before: String
|
|
28
|
+
$last: Int
|
|
29
|
+
) {
|
|
14
30
|
account {
|
|
15
31
|
byName(accountName: $accountName) {
|
|
16
32
|
id
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
33
|
+
applePushKeysPaginated(
|
|
34
|
+
after: $after
|
|
35
|
+
first: $first
|
|
36
|
+
before: $before
|
|
37
|
+
last: $last
|
|
38
|
+
) {
|
|
39
|
+
edges {
|
|
40
|
+
cursor
|
|
41
|
+
node {
|
|
42
|
+
id
|
|
43
|
+
...ApplePushKeyFragment
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
pageInfo {
|
|
47
|
+
hasNextPage
|
|
48
|
+
hasPreviousPage
|
|
49
|
+
startCursor
|
|
50
|
+
endCursor
|
|
51
|
+
}
|
|
20
52
|
}
|
|
21
53
|
}
|
|
22
54
|
}
|
|
@@ -24,10 +56,14 @@ exports.ApplePushKeyQuery = {
|
|
|
24
56
|
${(0, graphql_1.print)(ApplePushKey_1.ApplePushKeyFragmentNode)}
|
|
25
57
|
`, {
|
|
26
58
|
accountName,
|
|
59
|
+
after,
|
|
60
|
+
first,
|
|
61
|
+
before,
|
|
62
|
+
last,
|
|
27
63
|
}, {
|
|
28
64
|
additionalTypenames: ['ApplePushKey'],
|
|
29
65
|
})
|
|
30
66
|
.toPromise());
|
|
31
|
-
return data.account.byName.
|
|
67
|
+
return data.account.byName.applePushKeysPaginated;
|
|
32
68
|
},
|
|
33
69
|
};
|
|
@@ -30,7 +30,7 @@ class DeviceCreateAction {
|
|
|
30
30
|
await (0, registrationUrlMethod_1.runRegistrationUrlMethodAsync)(this.graphqlClient, this.account.id, this.appleTeam);
|
|
31
31
|
}
|
|
32
32
|
else if (method === RegistrationMethod.DEVELOPER_PORTAL) {
|
|
33
|
-
await (0, developerPortalMethod_1.runDeveloperPortalMethodAsync)(this.graphqlClient, this.appStoreApi, this.account
|
|
33
|
+
await (0, developerPortalMethod_1.runDeveloperPortalMethodAsync)(this.graphqlClient, this.appStoreApi, this.account, this.appleTeam);
|
|
34
34
|
}
|
|
35
35
|
else if (method === RegistrationMethod.INPUT) {
|
|
36
36
|
await (0, inputMethod_1.runInputMethodAsync)(this.graphqlClient, this.account.id, this.appleTeam);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import { Device } from '@expo/apple-utils';
|
|
3
3
|
import { ExpoGraphqlClient } from '../../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
4
4
|
import AppStoreApi from '../../../credentials/ios/appstore/AppStoreApi';
|
|
5
|
-
import { AppleTeam } from '../../../graphql/generated';
|
|
6
|
-
export declare function runDeveloperPortalMethodAsync(graphqlClient: ExpoGraphqlClient, appStoreApi: AppStoreApi,
|
|
5
|
+
import { AccountFragment, AppleTeam } from '../../../graphql/generated';
|
|
6
|
+
export declare function runDeveloperPortalMethodAsync(graphqlClient: ExpoGraphqlClient, appStoreApi: AppStoreApi, account: AccountFragment, appleTeam: Pick<AppleTeam, 'appleTeamIdentifier' | 'appleTeamName' | 'id'>): Promise<void>;
|
|
7
7
|
export declare function formatDeviceLabel(device: Device): string;
|
|
@@ -17,15 +17,15 @@ const DEVICE_CLASS_TO_GRAPHQL_TYPE = {
|
|
|
17
17
|
[apple_utils_1.DeviceClass.IPHONE]: generated_1.AppleDeviceClass.Iphone,
|
|
18
18
|
[apple_utils_1.DeviceClass.MAC]: generated_1.AppleDeviceClass.Mac,
|
|
19
19
|
};
|
|
20
|
-
async function runDeveloperPortalMethodAsync(graphqlClient, appStoreApi,
|
|
20
|
+
async function runDeveloperPortalMethodAsync(graphqlClient, appStoreApi, account, appleTeam) {
|
|
21
21
|
const appleAuthCtx = await appStoreApi.ensureAuthenticatedAsync();
|
|
22
|
-
const unregisteredPortalDevices = await findUnregisteredPortalDevicesAsync(graphqlClient, appleAuthCtx,
|
|
22
|
+
const unregisteredPortalDevices = await findUnregisteredPortalDevicesAsync(graphqlClient, appleAuthCtx, account.name, appleTeam);
|
|
23
23
|
if (unregisteredPortalDevices.length === 0) {
|
|
24
24
|
log_1.default.log('All your devices registered on Apple Developer Portal are already imported to EAS.');
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
const devicesToImport = await chooseDevicesToImportAsync(unregisteredPortalDevices);
|
|
28
|
-
await importDevicesAsync(graphqlClient,
|
|
28
|
+
await importDevicesAsync(graphqlClient, account.id, appleTeam, devicesToImport);
|
|
29
29
|
}
|
|
30
30
|
exports.runDeveloperPortalMethodAsync = runDeveloperPortalMethodAsync;
|
|
31
31
|
async function importDevicesAsync(graphqlClient, accountId, appleTeam, devices) {
|
|
@@ -54,8 +54,8 @@ async function importDeviceChunkAsync(graphqlClient, accountId, appleTeam, devic
|
|
|
54
54
|
});
|
|
55
55
|
await Promise.all(promises);
|
|
56
56
|
}
|
|
57
|
-
async function findUnregisteredPortalDevicesAsync(graphqlClient, appleAuthCtx,
|
|
58
|
-
const expoRegisteredDevices = await AppleDeviceQuery_1.AppleDeviceQuery.getAllByAppleTeamIdentifierAsync(graphqlClient,
|
|
57
|
+
async function findUnregisteredPortalDevicesAsync(graphqlClient, appleAuthCtx, accountName, appleTeam) {
|
|
58
|
+
const expoRegisteredDevices = await AppleDeviceQuery_1.AppleDeviceQuery.getAllByAppleTeamIdentifierAsync(graphqlClient, accountName, appleTeam.appleTeamIdentifier, { useCache: false });
|
|
59
59
|
const expoRegisteredDevicesByUdid = expoRegisteredDevices.reduce((acc, device) => {
|
|
60
60
|
acc[device.identifier] = device;
|
|
61
61
|
return acc;
|