eas-cli 0.55.0 → 0.57.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 +58 -49
- package/build/branch/queries.d.ts +5 -0
- package/build/branch/queries.js +87 -0
- package/build/build/android/version.d.ts +5 -0
- package/build/build/android/version.js +16 -9
- package/build/build/build.js +7 -2
- package/build/build/context.d.ts +3 -3
- package/build/build/createContext.d.ts +4 -2
- package/build/build/createContext.js +3 -1
- package/build/build/ios/build.js +1 -16
- package/build/build/ios/syncProjectConfiguration.d.ts +3 -3
- package/build/build/ios/syncProjectConfiguration.js +2 -2
- package/build/build/ios/version.d.ts +10 -3
- package/build/build/ios/version.js +57 -28
- package/build/build/metadata.d.ts +1 -0
- package/build/build/metadata.js +15 -5
- package/build/build/runBuildAndSubmit.d.ts +1 -0
- package/build/build/runBuildAndSubmit.js +8 -4
- package/build/commandUtils/pagination.d.ts +13 -0
- package/build/commandUtils/pagination.js +42 -0
- package/build/commands/branch/list.d.ts +3 -4
- package/build/commands/branch/list.js +6 -69
- package/build/commands/branch/view.d.ts +3 -0
- package/build/commands/branch/view.js +15 -63
- package/build/commands/build/index.d.ts +1 -0
- package/build/commands/build/index.js +9 -0
- package/build/commands/build/version/set.d.ts +10 -0
- package/build/commands/build/version/set.js +82 -0
- package/build/commands/build/version/sync.d.ts +12 -0
- package/build/commands/build/version/sync.js +124 -0
- package/build/commands/update/index.d.ts +2 -2
- package/build/commands/update/index.js +13 -5
- package/build/commands/update/list.js +13 -18
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +2 -2
- package/build/credentials/ios/types.d.ts +2 -0
- package/build/devices/actions/create/action.d.ts +5 -2
- package/build/devices/actions/create/action.js +12 -2
- package/build/devices/actions/create/developerPortalMethod.d.ts +6 -0
- package/build/devices/actions/create/developerPortalMethod.js +90 -0
- package/build/devices/manager.js +4 -4
- package/build/graphql/generated.d.ts +271 -59
- package/build/graphql/generated.js +8 -1
- package/build/graphql/mutations/AppVersionMutation.d.ts +11 -0
- package/build/graphql/mutations/AppVersionMutation.js +28 -0
- package/build/graphql/queries/AppVersionQuery.d.ts +4 -0
- package/build/graphql/queries/AppVersionQuery.js +37 -0
- package/build/graphql/queries/BranchQuery.d.ts +2 -1
- package/build/graphql/queries/BranchQuery.js +26 -0
- package/build/graphql/queries/UpdateQuery.d.ts +6 -8
- package/build/graphql/queries/UpdateQuery.js +27 -23
- package/build/platform.d.ts +1 -0
- package/build/platform.js +17 -1
- package/build/project/android/applicationId.js +2 -2
- package/build/project/android/versions.d.ts +3 -0
- package/build/project/android/versions.js +23 -0
- package/build/project/applicationIdentifier.d.ts +4 -0
- package/build/project/applicationIdentifier.js +37 -0
- package/build/project/ios/bundleIdentifier.js +2 -2
- package/build/project/ios/target.js +14 -1
- package/build/project/ios/versions.d.ts +3 -0
- package/build/project/ios/versions.js +17 -0
- package/build/project/publish.d.ts +1 -2
- package/build/project/publish.js +8 -12
- package/build/project/remoteVersionSource.d.ts +6 -0
- package/build/project/remoteVersionSource.js +52 -0
- package/build/submit/utils/files.js +1 -1
- package/build/update/queries.d.ts +3 -0
- package/build/update/queries.js +72 -0
- package/build/update/utils.d.ts +14 -0
- package/build/update/utils.js +26 -9
- package/build/uploads.d.ts +4 -3
- package/build/uploads.js +11 -9
- package/build/utils/expodash/chunk.d.ts +1 -0
- package/build/utils/expodash/chunk.js +16 -0
- package/build/utils/queries.d.ts +25 -0
- package/build/utils/queries.js +67 -0
- package/oclif.manifest.json +1 -1
- package/package.json +10 -5
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* For more info and docs, visit https://graphql-code-generator.com/
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.WebhookType = exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.SubmissionStatus = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OfferType = exports.MailchimpTag = exports.MailchimpAudience = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.Feature = exports.EasServiceMetric = exports.EasBuildDeprecationInfoType = exports.DistributionType = exports.CacheControlScope = exports.BuildWorkflow = exports.BuildStatus = exports.BuildResourceClass = exports.BuildPriority = exports.BuildJobStatus = exports.BuildJobLogsFormat = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.AssetMetadataStatus = exports.AppsFilter = exports.AppleDeviceClass = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppPrivacy = exports.AppPlatform = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = void 0;
|
|
9
|
+
exports.WebhookType = exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.SubmissionStatus = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OfferType = exports.MailchimpTag = exports.MailchimpAudience = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.Feature = exports.EasServiceMetric = exports.EasBuildDeprecationInfoType = exports.DistributionType = exports.CacheControlScope = exports.BuildWorkflow = exports.BuildStatus = exports.BuildResourceClass = exports.BuildPriority = exports.BuildJobStatus = exports.BuildJobLogsFormat = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.AuthProtocolType = exports.AssetMetadataStatus = exports.AppsFilter = exports.AppleDeviceClass = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppPrivacy = exports.AppPlatform = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = void 0;
|
|
10
10
|
var ActivityTimelineProjectActivityType;
|
|
11
11
|
(function (ActivityTimelineProjectActivityType) {
|
|
12
12
|
ActivityTimelineProjectActivityType["Build"] = "BUILD";
|
|
@@ -86,6 +86,10 @@ var AssetMetadataStatus;
|
|
|
86
86
|
AssetMetadataStatus["DoesNotExist"] = "DOES_NOT_EXIST";
|
|
87
87
|
AssetMetadataStatus["Exists"] = "EXISTS";
|
|
88
88
|
})(AssetMetadataStatus = exports.AssetMetadataStatus || (exports.AssetMetadataStatus = {}));
|
|
89
|
+
var AuthProtocolType;
|
|
90
|
+
(function (AuthProtocolType) {
|
|
91
|
+
AuthProtocolType["Oidc"] = "OIDC";
|
|
92
|
+
})(AuthProtocolType = exports.AuthProtocolType || (exports.AuthProtocolType = {}));
|
|
89
93
|
var BuildCredentialsSource;
|
|
90
94
|
(function (BuildCredentialsSource) {
|
|
91
95
|
BuildCredentialsSource["Local"] = "LOCAL";
|
|
@@ -114,6 +118,7 @@ var BuildPriority;
|
|
|
114
118
|
(function (BuildPriority) {
|
|
115
119
|
BuildPriority["High"] = "HIGH";
|
|
116
120
|
BuildPriority["Normal"] = "NORMAL";
|
|
121
|
+
BuildPriority["NormalPlus"] = "NORMAL_PLUS";
|
|
117
122
|
})(BuildPriority = exports.BuildPriority || (exports.BuildPriority = {}));
|
|
118
123
|
var BuildResourceClass;
|
|
119
124
|
(function (BuildResourceClass) {
|
|
@@ -157,6 +162,7 @@ var EasServiceMetric;
|
|
|
157
162
|
(function (EasServiceMetric) {
|
|
158
163
|
EasServiceMetric["AssetsRequests"] = "ASSETS_REQUESTS";
|
|
159
164
|
EasServiceMetric["BandwidthUsage"] = "BANDWIDTH_USAGE";
|
|
165
|
+
EasServiceMetric["Builds"] = "BUILDS";
|
|
160
166
|
EasServiceMetric["ManifestRequests"] = "MANIFEST_REQUESTS";
|
|
161
167
|
EasServiceMetric["UniqueUsers"] = "UNIQUE_USERS";
|
|
162
168
|
})(EasServiceMetric = exports.EasServiceMetric || (exports.EasServiceMetric = {}));
|
|
@@ -299,6 +305,7 @@ var UploadSessionType;
|
|
|
299
305
|
var UsageMetricType;
|
|
300
306
|
(function (UsageMetricType) {
|
|
301
307
|
UsageMetricType["Bandwidth"] = "BANDWIDTH";
|
|
308
|
+
UsageMetricType["Build"] = "BUILD";
|
|
302
309
|
UsageMetricType["Request"] = "REQUEST";
|
|
303
310
|
UsageMetricType["User"] = "USER";
|
|
304
311
|
})(UsageMetricType = exports.UsageMetricType || (exports.UsageMetricType = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AppPlatform } from '../generated';
|
|
2
|
+
export declare const AppVersionMutation: {
|
|
3
|
+
createAppVersionAsync(appVersionInput: {
|
|
4
|
+
appId: string;
|
|
5
|
+
platform: AppPlatform;
|
|
6
|
+
applicationIdentifier: string;
|
|
7
|
+
storeVersion: string;
|
|
8
|
+
buildVersion: string;
|
|
9
|
+
runtimeVersion?: string;
|
|
10
|
+
}): Promise<string>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppVersionMutation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
|
+
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
7
|
+
const client_1 = require("../client");
|
|
8
|
+
exports.AppVersionMutation = {
|
|
9
|
+
async createAppVersionAsync(appVersionInput) {
|
|
10
|
+
var _a;
|
|
11
|
+
const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
12
|
+
.mutation((0, graphql_tag_1.default) `
|
|
13
|
+
mutation CreateAppVersionMutation($appVersionInput: AppVersionInput!) {
|
|
14
|
+
appVersion {
|
|
15
|
+
createAppVersion(appVersionInput: $appVersionInput) {
|
|
16
|
+
id
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`, {
|
|
21
|
+
appVersionInput,
|
|
22
|
+
})
|
|
23
|
+
.toPromise());
|
|
24
|
+
const appVersionId = (_a = data.appVersion) === null || _a === void 0 ? void 0 : _a.createAppVersion.id;
|
|
25
|
+
(0, assert_1.default)(appVersionId, 'AppVersion ID must be defined');
|
|
26
|
+
return appVersionId;
|
|
27
|
+
},
|
|
28
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppVersionQuery = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
|
+
const client_1 = require("../client");
|
|
7
|
+
exports.AppVersionQuery = {
|
|
8
|
+
async latestVersionAsync(appId, platform, applicationIdentifier) {
|
|
9
|
+
var _a;
|
|
10
|
+
const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
11
|
+
.query((0, graphql_tag_1.default) `
|
|
12
|
+
query LatestAppVersion(
|
|
13
|
+
$appId: String!
|
|
14
|
+
$platform: AppPlatform!
|
|
15
|
+
$applicationIdentifier: String!
|
|
16
|
+
) {
|
|
17
|
+
app {
|
|
18
|
+
byId(appId: $appId) {
|
|
19
|
+
id
|
|
20
|
+
latestAppVersionByPlatformAndApplicationIdentifier(
|
|
21
|
+
platform: $platform
|
|
22
|
+
applicationIdentifier: $applicationIdentifier
|
|
23
|
+
) {
|
|
24
|
+
id
|
|
25
|
+
storeVersion
|
|
26
|
+
buildVersion
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`, { appId, applicationIdentifier, platform }, {
|
|
32
|
+
additionalTypenames: ['App', 'AppVersion'],
|
|
33
|
+
})
|
|
34
|
+
.toPromise());
|
|
35
|
+
return (_a = data.app.byId.latestAppVersionByPlatformAndApplicationIdentifier) !== null && _a !== void 0 ? _a : null;
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ViewBranchQuery } from '../generated';
|
|
1
|
+
import { BranchesByAppQueryVariables, UpdateBranchFragment, ViewBranchQuery } from '../generated';
|
|
2
2
|
export declare const BranchQuery: {
|
|
3
3
|
getBranchByNameAsync({ appId, name, }: {
|
|
4
4
|
appId: string;
|
|
5
5
|
name: string;
|
|
6
6
|
}): Promise<ViewBranchQuery['app']['byId']['updateBranchByName']>;
|
|
7
|
+
listBranchesAsync({ appId, limit, offset, }: BranchesByAppQueryVariables): Promise<UpdateBranchFragment[]>;
|
|
7
8
|
};
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BranchQuery = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_1 = require("graphql");
|
|
5
6
|
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
7
|
const client_1 = require("../client");
|
|
8
|
+
const UpdateBranch_1 = require("../types/UpdateBranch");
|
|
7
9
|
exports.BranchQuery = {
|
|
8
10
|
async getBranchByNameAsync({ appId, name, }) {
|
|
9
11
|
const { app: { byId: { updateBranchByName: branch }, }, } = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
@@ -26,4 +28,28 @@ exports.BranchQuery = {
|
|
|
26
28
|
.toPromise());
|
|
27
29
|
return branch;
|
|
28
30
|
},
|
|
31
|
+
async listBranchesAsync({ appId, limit, offset, }) {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
34
|
+
.query((0, graphql_tag_1.default) `
|
|
35
|
+
query BranchesByAppQuery($appId: String!, $limit: Int!, $offset: Int!) {
|
|
36
|
+
app {
|
|
37
|
+
byId(appId: $appId) {
|
|
38
|
+
id
|
|
39
|
+
updateBranches(limit: $limit, offset: $offset) {
|
|
40
|
+
id
|
|
41
|
+
...UpdateBranchFragment
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
${(0, graphql_1.print)(UpdateBranch_1.UpdateBranchFragmentNode)}
|
|
47
|
+
`, {
|
|
48
|
+
appId,
|
|
49
|
+
limit,
|
|
50
|
+
offset,
|
|
51
|
+
}, { additionalTypenames: ['UpdateBranch'] })
|
|
52
|
+
.toPromise());
|
|
53
|
+
return (_b = (_a = data === null || data === void 0 ? void 0 : data.app) === null || _a === void 0 ? void 0 : _a.byId.updateBranches) !== null && _b !== void 0 ? _b : [];
|
|
54
|
+
},
|
|
29
55
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { ViewAllUpdatesQuery, ViewBranchUpdatesQuery, ViewBranchUpdatesQueryVariables } from '../generated';
|
|
2
|
-
export declare
|
|
3
|
-
declare type
|
|
1
|
+
import { ViewAllUpdatesQuery, ViewAllUpdatesQueryVariables, ViewBranchUpdatesQuery, ViewBranchUpdatesQueryVariables } from '../generated';
|
|
2
|
+
export declare type BranchUpdateObject = Exclude<ViewBranchUpdatesQuery['app']['byId']['updateBranchByName'], null | undefined>['updates'][number];
|
|
3
|
+
export declare type AppUpdateObject = ViewAllUpdatesQuery['app']['byId']['updates'][number];
|
|
4
|
+
export declare type UpdateObject = BranchUpdateObject | AppUpdateObject;
|
|
4
5
|
export declare const UpdateQuery: {
|
|
5
|
-
viewAllAsync({ appId }:
|
|
6
|
-
|
|
7
|
-
}): Promise<ViewAllUpdatesQuery>;
|
|
8
|
-
viewBranchAsync({ appId, name, limit, offset, }: ViewBranchUpdatesQueryVariablesWithOptionalLimitAndOffset): Promise<ViewBranchUpdatesQuery>;
|
|
6
|
+
viewAllAsync({ appId, limit, offset }: ViewAllUpdatesQueryVariables): Promise<ViewAllUpdatesQuery>;
|
|
7
|
+
viewBranchAsync({ appId, name, limit, offset }: ViewBranchUpdatesQueryVariables): Promise<ViewBranchUpdatesQuery>;
|
|
9
8
|
};
|
|
10
|
-
export {};
|
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateQuery =
|
|
3
|
+
exports.UpdateQuery = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
6
|
const client_1 = require("../client");
|
|
7
|
-
exports.viewBranchUpdatesQueryUpdateLimit = 300;
|
|
8
7
|
exports.UpdateQuery = {
|
|
9
|
-
async viewAllAsync({ appId }) {
|
|
8
|
+
async viewAllAsync({ appId, limit, offset }) {
|
|
10
9
|
return (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
11
10
|
.query((0, graphql_tag_1.default) `
|
|
12
|
-
query ViewAllUpdates($appId: String!, $limit: Int!) {
|
|
11
|
+
query ViewAllUpdates($appId: String!, $limit: Int!, $offset: Int!) {
|
|
13
12
|
app {
|
|
14
13
|
byId(appId: $appId) {
|
|
15
14
|
id
|
|
16
|
-
|
|
15
|
+
updates(limit: $limit, offset: $offset) {
|
|
17
16
|
id
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
group
|
|
18
|
+
message
|
|
19
|
+
createdAt
|
|
20
|
+
runtimeVersion
|
|
21
|
+
platform
|
|
22
|
+
actor {
|
|
20
23
|
id
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
createdAt
|
|
24
|
-
runtimeVersion
|
|
25
|
-
platform
|
|
26
|
-
actor {
|
|
27
|
-
id
|
|
28
|
-
... on User {
|
|
29
|
-
username
|
|
30
|
-
}
|
|
31
|
-
... on Robot {
|
|
32
|
-
firstName
|
|
33
|
-
}
|
|
24
|
+
... on User {
|
|
25
|
+
username
|
|
34
26
|
}
|
|
27
|
+
... on Robot {
|
|
28
|
+
firstName
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
branch {
|
|
32
|
+
id
|
|
33
|
+
name
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
}
|
|
@@ -39,11 +38,12 @@ exports.UpdateQuery = {
|
|
|
39
38
|
}
|
|
40
39
|
`, {
|
|
41
40
|
appId,
|
|
42
|
-
limit
|
|
41
|
+
limit,
|
|
42
|
+
offset,
|
|
43
43
|
}, { additionalTypenames: ['UpdateBranch', 'Update'] })
|
|
44
44
|
.toPromise());
|
|
45
45
|
},
|
|
46
|
-
async viewBranchAsync({ appId, name, limit
|
|
46
|
+
async viewBranchAsync({ appId, name, limit, offset }) {
|
|
47
47
|
return (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
48
48
|
.query((0, graphql_tag_1.default) `
|
|
49
49
|
query ViewBranchUpdates($appId: String!, $name: String!, $limit: Int!, $offset: Int!) {
|
|
@@ -53,7 +53,7 @@ exports.UpdateQuery = {
|
|
|
53
53
|
updateBranchByName(name: $name) {
|
|
54
54
|
id
|
|
55
55
|
name
|
|
56
|
-
updates(
|
|
56
|
+
updates(limit: $limit, offset: $offset) {
|
|
57
57
|
id
|
|
58
58
|
group
|
|
59
59
|
message
|
|
@@ -70,6 +70,10 @@ exports.UpdateQuery = {
|
|
|
70
70
|
firstName
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
+
branch {
|
|
74
|
+
id
|
|
75
|
+
name
|
|
76
|
+
}
|
|
73
77
|
}
|
|
74
78
|
}
|
|
75
79
|
}
|
package/build/platform.d.ts
CHANGED
|
@@ -12,4 +12,5 @@ export declare enum RequestedPlatform {
|
|
|
12
12
|
}
|
|
13
13
|
export declare const requestedPlatformDisplayNames: Record<RequestedPlatform, string>;
|
|
14
14
|
export declare function selectRequestedPlatformAsync(platform?: string): Promise<RequestedPlatform>;
|
|
15
|
+
export declare function selectPlatformAsync(platform?: string): Promise<Platform>;
|
|
15
16
|
export declare function toPlatforms(requestedPlatform: RequestedPlatform): Platform[];
|
package/build/platform.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toPlatforms = exports.selectRequestedPlatformAsync = exports.requestedPlatformDisplayNames = exports.RequestedPlatform = exports.appPlatformEmojis = exports.appPlatformDisplayNames = void 0;
|
|
3
|
+
exports.toPlatforms = exports.selectPlatformAsync = exports.selectRequestedPlatformAsync = exports.requestedPlatformDisplayNames = exports.RequestedPlatform = exports.appPlatformEmojis = exports.appPlatformDisplayNames = void 0;
|
|
4
4
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
5
5
|
const generated_1 = require("./graphql/generated");
|
|
6
6
|
const prompts_1 = require("./prompts");
|
|
@@ -42,6 +42,22 @@ async function selectRequestedPlatformAsync(platform) {
|
|
|
42
42
|
return requestedPlatform;
|
|
43
43
|
}
|
|
44
44
|
exports.selectRequestedPlatformAsync = selectRequestedPlatformAsync;
|
|
45
|
+
async function selectPlatformAsync(platform) {
|
|
46
|
+
if (platform && Object.values(eas_build_job_1.Platform).includes(platform.toLowerCase())) {
|
|
47
|
+
return platform.toLowerCase();
|
|
48
|
+
}
|
|
49
|
+
const { resolvedPlatform } = await (0, prompts_1.promptAsync)({
|
|
50
|
+
type: 'select',
|
|
51
|
+
message: 'Select platform',
|
|
52
|
+
name: 'resolvedPlatform',
|
|
53
|
+
choices: [
|
|
54
|
+
{ title: 'Android', value: eas_build_job_1.Platform.ANDROID },
|
|
55
|
+
{ title: 'iOS', value: eas_build_job_1.Platform.IOS },
|
|
56
|
+
],
|
|
57
|
+
});
|
|
58
|
+
return resolvedPlatform;
|
|
59
|
+
}
|
|
60
|
+
exports.selectPlatformAsync = selectPlatformAsync;
|
|
45
61
|
function toPlatforms(requestedPlatform) {
|
|
46
62
|
if (requestedPlatform === RequestedPlatform.All) {
|
|
47
63
|
return [eas_build_job_1.Platform.ANDROID, eas_build_job_1.Platform.IOS];
|
|
@@ -120,8 +120,8 @@ exports.isApplicationIdValid = isApplicationIdValid;
|
|
|
120
120
|
let warnPrinted = false;
|
|
121
121
|
function warnIfAndroidPackageDefinedInAppConfigForBareWorkflowProject(projectDir, exp) {
|
|
122
122
|
if (config_plugins_1.AndroidConfig.Package.getPackage(exp) && !warnPrinted) {
|
|
123
|
-
log_1.default.warn(`
|
|
124
|
-
'EAS Build
|
|
123
|
+
log_1.default.warn(`Specified value for "android.package" in ${(0, projectUtils_1.getProjectConfigDescription)(projectDir)} is ignored because an ${chalk_1.default.bold('android')} directory was detected in the project.\n` +
|
|
124
|
+
'EAS Build will use the value found in the native code.');
|
|
125
125
|
warnPrinted = true;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNextVersionCode = exports.isValidVersionCode = exports.VERSION_CODE_REQUIREMENTS = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
|
+
const MAX_VERSION_CODE = 2000000000;
|
|
7
|
+
exports.VERSION_CODE_REQUIREMENTS = `versionCode needs to be a positive integer smaller or equal to ${MAX_VERSION_CODE}`;
|
|
8
|
+
function isValidVersionCode(versionCode) {
|
|
9
|
+
const numericVersionCode = typeof versionCode === 'string' ? Number(versionCode) : versionCode;
|
|
10
|
+
return (Number.isInteger(numericVersionCode) &&
|
|
11
|
+
numericVersionCode <= MAX_VERSION_CODE &&
|
|
12
|
+
numericVersionCode > 0);
|
|
13
|
+
}
|
|
14
|
+
exports.isValidVersionCode = isValidVersionCode;
|
|
15
|
+
function getNextVersionCode(versionCode) {
|
|
16
|
+
(0, assert_1.default)(isValidVersionCode(versionCode), `Invalid versionCode ${versionCode}`);
|
|
17
|
+
const numericVersionCode = typeof versionCode === 'string' ? Number(versionCode) : versionCode;
|
|
18
|
+
if (numericVersionCode >= MAX_VERSION_CODE) {
|
|
19
|
+
throw new Error(`Invalid value: ${exports.VERSION_CODE_REQUIREMENTS}.`);
|
|
20
|
+
}
|
|
21
|
+
return numericVersionCode + 1;
|
|
22
|
+
}
|
|
23
|
+
exports.getNextVersionCode = getNextVersionCode;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ExpoConfig } from '@expo/config';
|
|
2
|
+
import { Platform } from '@expo/eas-build-job';
|
|
3
|
+
import { BuildProfile } from '@expo/eas-json';
|
|
4
|
+
export declare function getApplicationIdentifierAsync(projectDir: string, exp: ExpoConfig, buildProfile: BuildProfile, platform: Platform): Promise<string>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getApplicationIdentifierAsync = void 0;
|
|
4
|
+
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
5
|
+
const applicationId_1 = require("./android/applicationId");
|
|
6
|
+
const gradle_1 = require("./android/gradle");
|
|
7
|
+
const bundleIdentifier_1 = require("./ios/bundleIdentifier");
|
|
8
|
+
const scheme_1 = require("./ios/scheme");
|
|
9
|
+
const target_1 = require("./ios/target");
|
|
10
|
+
const workflow_1 = require("./workflow");
|
|
11
|
+
async function getApplicationIdentifierAsync(projectDir, exp, buildProfile, platform) {
|
|
12
|
+
if (platform === eas_build_job_1.Platform.ANDROID) {
|
|
13
|
+
const profile = buildProfile;
|
|
14
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
15
|
+
const gradleContext = await (0, gradle_1.resolveGradleBuildContextAsync)(projectDir, profile);
|
|
16
|
+
if (workflow === eas_build_job_1.Workflow.MANAGED) {
|
|
17
|
+
await (0, applicationId_1.ensureApplicationIdIsDefinedForManagedProjectAsync)(projectDir, exp);
|
|
18
|
+
}
|
|
19
|
+
return await (0, applicationId_1.getApplicationIdAsync)(projectDir, exp, gradleContext);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
const profile = buildProfile;
|
|
23
|
+
const xcodeBuildContext = await (0, scheme_1.resolveXcodeBuildContextAsync)({ exp, projectDir, nonInteractive: false }, profile);
|
|
24
|
+
const targets = await (0, target_1.resolveTargetsAsync)({
|
|
25
|
+
projectDir,
|
|
26
|
+
exp,
|
|
27
|
+
xcodeBuildContext,
|
|
28
|
+
env: profile.env,
|
|
29
|
+
});
|
|
30
|
+
const applicationTarget = (0, target_1.findApplicationTarget)(targets);
|
|
31
|
+
return await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, {
|
|
32
|
+
targetName: applicationTarget.targetName,
|
|
33
|
+
buildConfiguration: applicationTarget.buildConfiguration,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.getApplicationIdentifierAsync = getApplicationIdentifierAsync;
|
|
@@ -104,8 +104,8 @@ exports.isBundleIdentifierValid = isBundleIdentifierValid;
|
|
|
104
104
|
let warnPrinted = false;
|
|
105
105
|
function warnIfBundleIdentifierDefinedInAppConfigForBareWorkflowProject(projectDir, exp) {
|
|
106
106
|
if (config_plugins_1.IOSConfig.BundleIdentifier.getBundleIdentifier(exp) && !warnPrinted) {
|
|
107
|
-
log_1.default.warn(`
|
|
108
|
-
'EAS Build
|
|
107
|
+
log_1.default.warn(`Specified value for "ios.bundleIdentifier" in ${(0, projectUtils_1.getProjectConfigDescription)(projectDir)} is ignored because an ${chalk_1.default.bold('ios')} directory was detected in the project.\n` +
|
|
108
|
+
'EAS Build will use the value found in the native code.');
|
|
109
109
|
warnPrinted = true;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -55,6 +55,7 @@ exports.resolveMangedProjectTargetsAsync = resolveMangedProjectTargetsAsync;
|
|
|
55
55
|
async function resolveBareProjectTargetsAsync({ exp, projectDir, xcodeBuildContext, }) {
|
|
56
56
|
const { buildScheme, buildConfiguration } = xcodeBuildContext;
|
|
57
57
|
const result = [];
|
|
58
|
+
const pbxProject = config_plugins_1.IOSConfig.XcodeUtils.getPbxproj(projectDir);
|
|
58
59
|
const applicationTarget = await config_plugins_1.IOSConfig.Target.findApplicationTargetWithDependenciesAsync(projectDir, buildScheme);
|
|
59
60
|
const bundleIdentifier = await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, {
|
|
60
61
|
targetName: applicationTarget.name,
|
|
@@ -69,6 +70,7 @@ async function resolveBareProjectTargetsAsync({ exp, projectDir, xcodeBuildConte
|
|
|
69
70
|
bundleIdentifier,
|
|
70
71
|
buildConfiguration,
|
|
71
72
|
entitlements: entitlements !== null && entitlements !== void 0 ? entitlements : {},
|
|
73
|
+
buildSettings: resolveBareProjectBuildSettings(pbxProject, applicationTarget.name, buildConfiguration),
|
|
72
74
|
});
|
|
73
75
|
const dependencies = await resolveBareProjectDependenciesAsync({
|
|
74
76
|
exp,
|
|
@@ -76,6 +78,7 @@ async function resolveBareProjectTargetsAsync({ exp, projectDir, xcodeBuildConte
|
|
|
76
78
|
buildConfiguration,
|
|
77
79
|
target: applicationTarget,
|
|
78
80
|
bundleIdentifier,
|
|
81
|
+
pbxProject,
|
|
79
82
|
});
|
|
80
83
|
if (dependencies.length > 0) {
|
|
81
84
|
result.push(...dependencies);
|
|
@@ -96,7 +99,7 @@ async function resolveTargetsAsync(opts) {
|
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
101
|
exports.resolveTargetsAsync = resolveTargetsAsync;
|
|
99
|
-
async function resolveBareProjectDependenciesAsync({ exp, projectDir, buildConfiguration, target, bundleIdentifier, }) {
|
|
102
|
+
async function resolveBareProjectDependenciesAsync({ exp, projectDir, buildConfiguration, target, bundleIdentifier, pbxProject, }) {
|
|
100
103
|
const result = [];
|
|
101
104
|
if (target.dependencies && target.dependencies.length > 0) {
|
|
102
105
|
for (const dependency of target.dependencies) {
|
|
@@ -114,6 +117,7 @@ async function resolveBareProjectDependenciesAsync({ exp, projectDir, buildConfi
|
|
|
114
117
|
bundleIdentifier: dependencyBundleIdentifier,
|
|
115
118
|
parentBundleIdentifier: bundleIdentifier,
|
|
116
119
|
entitlements: entitlements !== null && entitlements !== void 0 ? entitlements : {},
|
|
120
|
+
buildSettings: resolveBareProjectBuildSettings(pbxProject, dependency.name, buildConfiguration),
|
|
117
121
|
});
|
|
118
122
|
const dependencyDependencies = await resolveBareProjectDependenciesAsync({
|
|
119
123
|
exp,
|
|
@@ -121,6 +125,7 @@ async function resolveBareProjectDependenciesAsync({ exp, projectDir, buildConfi
|
|
|
121
125
|
buildConfiguration,
|
|
122
126
|
target: dependency,
|
|
123
127
|
bundleIdentifier: dependencyBundleIdentifier,
|
|
128
|
+
pbxProject,
|
|
124
129
|
});
|
|
125
130
|
if (dependencyDependencies.length > 0) {
|
|
126
131
|
result.push(...dependencyDependencies);
|
|
@@ -145,3 +150,11 @@ function findTargetByName(targets, name) {
|
|
|
145
150
|
return target;
|
|
146
151
|
}
|
|
147
152
|
exports.findTargetByName = findTargetByName;
|
|
153
|
+
function resolveBareProjectBuildSettings(project, targetName, buildConfiguration) {
|
|
154
|
+
var _a;
|
|
155
|
+
const xcBuildConfiguration = config_plugins_1.IOSConfig.Target.getXCBuildConfigurationFromPbxproj(project, {
|
|
156
|
+
targetName,
|
|
157
|
+
buildConfiguration,
|
|
158
|
+
});
|
|
159
|
+
return (_a = xcBuildConfiguration === null || xcBuildConfiguration === void 0 ? void 0 : xcBuildConfiguration.buildSettings) !== null && _a !== void 0 ? _a : {};
|
|
160
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const BUILD_NUMBER_REQUIREMENTS = "buildNumber needs to consist only of up to 3 dot-separated positive integers";
|
|
2
|
+
export declare function isValidBuildNumber(buildNumber: string): boolean;
|
|
3
|
+
export declare function getNextBuildNumber(buildNumber: string): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNextBuildNumber = exports.isValidBuildNumber = exports.BUILD_NUMBER_REQUIREMENTS = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
|
+
exports.BUILD_NUMBER_REQUIREMENTS = `buildNumber needs to consist only of up to 3 dot-separated positive integers`;
|
|
7
|
+
function isValidBuildNumber(buildNumber) {
|
|
8
|
+
return !!buildNumber.match(/^\d+(\.\d+)?(\.\d+)?$/);
|
|
9
|
+
}
|
|
10
|
+
exports.isValidBuildNumber = isValidBuildNumber;
|
|
11
|
+
function getNextBuildNumber(buildNumber) {
|
|
12
|
+
(0, assert_1.default)(isValidBuildNumber(buildNumber), `Invalid buildNumber ${buildNumber}`);
|
|
13
|
+
const comps = buildNumber.split('.');
|
|
14
|
+
comps[comps.length - 1] = String(Number(comps[comps.length - 1]) + 1);
|
|
15
|
+
return comps.join('.');
|
|
16
|
+
}
|
|
17
|
+
exports.getNextBuildNumber = getNextBuildNumber;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { ExpoConfig, Platform } from '@expo/config';
|
|
3
3
|
import Joi from 'joi';
|
|
4
4
|
import { PartialManifestAsset } from '../graphql/generated';
|
|
5
|
-
export declare const TIMEOUT_LIMIT = 60000;
|
|
6
5
|
export declare type PublishPlatform = Extract<'android' | 'ios', Platform>;
|
|
7
6
|
declare type Metadata = {
|
|
8
7
|
version: number;
|
|
@@ -78,5 +77,5 @@ declare type AssetUploadResult = {
|
|
|
78
77
|
uniqueAssetCount: number;
|
|
79
78
|
uniqueUploadedAssetCount: number;
|
|
80
79
|
};
|
|
81
|
-
export declare function uploadAssetsAsync(assetsForUpdateInfoGroup: CollectedAssets, updateSpinnerText?: (
|
|
80
|
+
export declare function uploadAssetsAsync(assetsForUpdateInfoGroup: CollectedAssets, updateSpinnerText?: (totalAssets: number, missingAssets: number) => void): Promise<AssetUploadResult>;
|
|
82
81
|
export {};
|
package/build/project/publish.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.uploadAssetsAsync = exports.filterOutAssetsThatAlreadyExistAsync = exports.collectAssetsAsync = exports.loadMetadata = exports.resolveInputDirectoryAsync = exports.buildBundlesAsync = exports.buildUnsortedUpdateInfoGroupAsync = exports.convertAssetToUpdateInfoGroupFormatAsync = exports.getStorageKeyForAssetAsync = exports.getStorageKey = exports.getBase64URLEncoding = exports.guessContentTypeFromExtension = exports.MetadataJoi =
|
|
3
|
+
exports.uploadAssetsAsync = exports.filterOutAssetsThatAlreadyExistAsync = exports.collectAssetsAsync = exports.loadMetadata = exports.resolveInputDirectoryAsync = exports.buildBundlesAsync = exports.buildUnsortedUpdateInfoGroupAsync = exports.convertAssetToUpdateInfoGroupFormatAsync = exports.getStorageKeyForAssetAsync = exports.getStorageKey = exports.getBase64URLEncoding = exports.guessContentTypeFromExtension = exports.MetadataJoi = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const json_file_1 = tslib_1.__importDefault(require("@expo/json-file"));
|
|
6
6
|
const crypto_1 = tslib_1.__importDefault(require("crypto"));
|
|
@@ -15,7 +15,6 @@ const PublishQuery_1 = require("../graphql/queries/PublishQuery");
|
|
|
15
15
|
const uploads_1 = require("../uploads");
|
|
16
16
|
const expoCli_1 = require("../utils/expoCli");
|
|
17
17
|
const uniqBy_1 = tslib_1.__importDefault(require("../utils/expodash/uniqBy"));
|
|
18
|
-
exports.TIMEOUT_LIMIT = 60000; // 1 minute
|
|
19
18
|
const fileMetadataJoi = joi_1.default.object({
|
|
20
19
|
assets: joi_1.default.array()
|
|
21
20
|
.required()
|
|
@@ -113,6 +112,7 @@ async function buildBundlesAsync({ projectDir, inputDir, }) {
|
|
|
113
112
|
inputDir,
|
|
114
113
|
'--experimental-bundle',
|
|
115
114
|
'--non-interactive',
|
|
115
|
+
'--dump-sourcemap',
|
|
116
116
|
]);
|
|
117
117
|
}
|
|
118
118
|
exports.buildBundlesAsync = buildBundlesAsync;
|
|
@@ -194,7 +194,6 @@ async function uploadAssetsAsync(assetsForUpdateInfoGroup, updateSpinnerText) {
|
|
|
194
194
|
...assetsForUpdateInfoGroup[platform].assets,
|
|
195
195
|
];
|
|
196
196
|
}
|
|
197
|
-
updateSpinnerText === null || updateSpinnerText === void 0 ? void 0 : updateSpinnerText(`${assets.length} ${assets.length === 1 ? 'asset' : 'assets'} present`);
|
|
198
197
|
const assetsWithStorageKey = await Promise.all(assets.map(async (asset) => {
|
|
199
198
|
return {
|
|
200
199
|
...asset,
|
|
@@ -202,29 +201,26 @@ async function uploadAssetsAsync(assetsForUpdateInfoGroup, updateSpinnerText) {
|
|
|
202
201
|
};
|
|
203
202
|
}));
|
|
204
203
|
const uniqueAssets = (0, uniqBy_1.default)(assetsWithStorageKey, asset => asset.storageKey);
|
|
205
|
-
|
|
204
|
+
const totalAssets = uniqueAssets.length;
|
|
205
|
+
updateSpinnerText === null || updateSpinnerText === void 0 ? void 0 : updateSpinnerText(totalAssets, totalAssets);
|
|
206
206
|
let missingAssets = await filterOutAssetsThatAlreadyExistAsync(uniqueAssets);
|
|
207
207
|
const uniqueUploadedAssetCount = missingAssets.length;
|
|
208
208
|
const { specifications } = await PublishMutation_1.PublishMutation.getUploadURLsAsync(missingAssets.map(ma => ma.contentType));
|
|
209
|
+
updateSpinnerText === null || updateSpinnerText === void 0 ? void 0 : updateSpinnerText(totalAssets, missingAssets.length);
|
|
209
210
|
const assetUploadPromiseLimit = (0, promise_limit_1.default)(15);
|
|
210
211
|
await Promise.all(missingAssets.map((missingAsset, i) => {
|
|
211
212
|
assetUploadPromiseLimit(async () => {
|
|
212
213
|
const presignedPost = JSON.parse(specifications[i]);
|
|
213
|
-
|
|
214
|
+
await (0, uploads_1.uploadWithPresignedPostAsync)(missingAsset.path, presignedPost);
|
|
214
215
|
});
|
|
215
216
|
}));
|
|
216
|
-
updateSpinnerText === null || updateSpinnerText === void 0 ? void 0 : updateSpinnerText(`${missingAssets.length} new ${missingAssets.length === 1 ? 'asset' : 'assets'} uploading`);
|
|
217
|
-
// Wait up to TIMEOUT_LIMIT for assets to be uploaded and processed
|
|
218
|
-
const start = Date.now();
|
|
219
217
|
let timeout = 1;
|
|
220
218
|
while (missingAssets.length > 0) {
|
|
221
|
-
const timeoutPromise = new Promise(resolve => setTimeout(resolve, timeout * 1000)); // linear backoff
|
|
219
|
+
const timeoutPromise = new Promise(resolve => setTimeout(resolve, Math.min(timeout * 1000, 5000))); // linear backoff
|
|
222
220
|
missingAssets = await filterOutAssetsThatAlreadyExistAsync(missingAssets);
|
|
223
221
|
await timeoutPromise; // await after filterOutAssetsThatAlreadyExistAsync for easy mocking with jest.runAllTimers
|
|
224
222
|
timeout += 1;
|
|
225
|
-
|
|
226
|
-
throw new Error('Asset upload timed out. Please try again.');
|
|
227
|
-
}
|
|
223
|
+
updateSpinnerText === null || updateSpinnerText === void 0 ? void 0 : updateSpinnerText(totalAssets, missingAssets.length);
|
|
228
224
|
}
|
|
229
225
|
return {
|
|
230
226
|
assetCount: assets.length,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ExpoConfig } from '@expo/config';
|
|
2
|
+
import { Platform } from '@expo/eas-build-job';
|
|
3
|
+
import { EasJsonReader } from '@expo/eas-json';
|
|
4
|
+
export declare function ensureRemoteVersionPolicyAsync(projectDir: string, easJsonReader: EasJsonReader): Promise<void>;
|
|
5
|
+
export declare function validateAppConfigForRemoteVersionPolicyAsync(exp: ExpoConfig): Promise<void>;
|
|
6
|
+
export declare function getBuildVersionName(platform: Platform): string;
|