eas-cli 0.55.1 → 0.58.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/build.js +17 -3
- package/build/build/android/graphql.js +2 -0
- package/build/build/android/prepareJob.js +5 -0
- package/build/build/android/syncProjectConfiguration.d.ts +3 -4
- package/build/build/android/syncProjectConfiguration.js +2 -3
- package/build/build/android/version.d.ts +16 -0
- package/build/build/android/version.js +86 -9
- package/build/build/build.js +8 -3
- package/build/build/context.d.ts +7 -3
- package/build/build/createContext.d.ts +5 -2
- package/build/build/createContext.js +9 -1
- package/build/build/ios/build.js +18 -17
- package/build/build/ios/graphql.js +2 -0
- package/build/build/ios/prepareJob.js +5 -0
- package/build/build/ios/syncProjectConfiguration.d.ts +5 -6
- package/build/build/ios/syncProjectConfiguration.js +3 -4
- package/build/build/ios/version.d.ts +23 -3
- package/build/build/ios/version.js +128 -28
- package/build/build/local.d.ts +2 -2
- package/build/build/local.js +7 -7
- package/build/build/metadata.d.ts +1 -0
- package/build/build/metadata.js +32 -6
- package/build/build/runBuildAndSubmit.d.ts +1 -0
- package/build/build/runBuildAndSubmit.js +29 -7
- package/build/build/utils/printBuildInfo.d.ts +1 -1
- package/build/build/utils/printBuildInfo.js +7 -13
- 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 +9 -0
- package/build/commands/build/version/set.js +81 -0
- package/build/commands/build/version/sync.d.ts +11 -0
- package/build/commands/build/version/sync.js +123 -0
- package/build/commands/submit.js +4 -1
- package/build/commands/update/index.d.ts +2 -2
- package/build/commands/update/index.js +24 -6
- 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 +501 -59
- package/build/graphql/generated.js +10 -1
- package/build/graphql/mutations/AppVersionMutation.d.ts +11 -0
- package/build/graphql/mutations/AppVersionMutation.js +28 -0
- package/build/graphql/mutations/PublishMutation.d.ts +2 -4
- 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/BuildQuery.d.ts +4 -1
- package/build/graphql/queries/BuildQuery.js +19 -0
- package/build/graphql/queries/PublishQuery.d.ts +2 -1
- package/build/graphql/queries/PublishQuery.js +16 -0
- package/build/graphql/queries/UpdateQuery.d.ts +6 -8
- package/build/graphql/queries/UpdateQuery.js +27 -23
- package/build/graphql/types/Build.d.ts +1 -0
- package/build/graphql/types/Build.js +16 -1
- package/build/metadata/apple/config/reader.d.ts +3 -2
- package/build/metadata/apple/config/reader.js +22 -5
- package/build/metadata/apple/config/writer.d.ts +3 -2
- package/build/metadata/apple/config/writer.js +22 -6
- package/build/metadata/apple/tasks/app-version.d.ts +5 -1
- package/build/metadata/apple/tasks/app-version.js +109 -8
- package/build/metadata/apple/tasks/index.d.ts +6 -1
- package/build/metadata/apple/tasks/index.js +7 -2
- package/build/metadata/apple/types.d.ts +3 -7
- package/build/metadata/upload.js +6 -1
- 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 +3 -2
- package/build/project/publish.js +23 -18
- package/build/project/remoteVersionSource.d.ts +8 -0
- package/build/project/remoteVersionSource.js +61 -0
- package/build/submit/submit.d.ts +2 -1
- package/build/submit/submit.js +3 -2
- package/build/submit/utils/files.d.ts +0 -6
- package/build/submit/utils/files.js +3 -16
- 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 +8 -2
- package/build/uploads.js +19 -4
- 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/build/vcs/clients/gitNoCommit.d.ts +1 -0
- package/build/vcs/clients/gitNoCommit.js +14 -0
- package/oclif.manifest.json +1 -1
- package/package.json +10 -5
- package/schema/metadata-0.json +38 -233
|
@@ -11,8 +11,8 @@ const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
|
11
11
|
const expoConfig_1 = require("../../project/expoConfig");
|
|
12
12
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
13
13
|
const prompts_1 = require("../../prompts");
|
|
14
|
+
const queries_1 = require("../../update/queries");
|
|
14
15
|
const utils_1 = require("../../update/utils");
|
|
15
|
-
const groupBy_1 = tslib_1.__importDefault(require("../../utils/expodash/groupBy"));
|
|
16
16
|
const json_1 = require("../../utils/json");
|
|
17
17
|
const vcs_1 = require("../../vcs");
|
|
18
18
|
class BranchView extends EasCommand_1.default {
|
|
@@ -27,8 +27,15 @@ class BranchView extends EasCommand_1.default {
|
|
|
27
27
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
28
28
|
let updateGroupDescriptions;
|
|
29
29
|
if (all) {
|
|
30
|
-
const branchesAndUpdates = await UpdateQuery_1.UpdateQuery.viewAllAsync({
|
|
31
|
-
|
|
30
|
+
const branchesAndUpdates = await UpdateQuery_1.UpdateQuery.viewAllAsync({
|
|
31
|
+
appId: projectId,
|
|
32
|
+
limit: queries_1.UPDATES_LIMIT,
|
|
33
|
+
offset: 0,
|
|
34
|
+
});
|
|
35
|
+
updateGroupDescriptions = (0, utils_1.getUpdateGroupsWithPlatforms)(branchesAndUpdates.app.byId.updates.map(update => ({
|
|
36
|
+
...update,
|
|
37
|
+
branch: update.branch.name,
|
|
38
|
+
}))).sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
|
|
32
39
|
}
|
|
33
40
|
else {
|
|
34
41
|
let branchInteractive;
|
|
@@ -50,12 +57,14 @@ class BranchView extends EasCommand_1.default {
|
|
|
50
57
|
const branchesAndUpdates = await UpdateQuery_1.UpdateQuery.viewBranchAsync({
|
|
51
58
|
appId: projectId,
|
|
52
59
|
name: branch,
|
|
60
|
+
limit: queries_1.UPDATES_LIMIT,
|
|
61
|
+
offset: 0,
|
|
53
62
|
});
|
|
54
63
|
const UpdateBranch = (_b = branchesAndUpdates.app) === null || _b === void 0 ? void 0 : _b.byId.updateBranchByName;
|
|
55
64
|
if (!UpdateBranch) {
|
|
56
65
|
throw new Error(`Could not find branch "${branch}"`);
|
|
57
66
|
}
|
|
58
|
-
updateGroupDescriptions =
|
|
67
|
+
updateGroupDescriptions = (0, utils_1.getUpdateGroupsWithPlatforms)(UpdateBranch.updates.map(update => ({ ...update, branch }))).sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
|
|
59
68
|
}
|
|
60
69
|
if (jsonFlag) {
|
|
61
70
|
(0, json_1.printJsonOnlyOutput)(updateGroupDescriptions);
|
|
@@ -82,20 +91,6 @@ BranchView.flags = {
|
|
|
82
91
|
default: false,
|
|
83
92
|
}),
|
|
84
93
|
};
|
|
85
|
-
function getUpdateGroupDescriptions(branchesAndUpdates) {
|
|
86
|
-
const flattenedBranchesAndUpdates = branchesAndUpdates.flatMap(branch => branch.updates.map(update => {
|
|
87
|
-
return { branch: branch.name, ...update };
|
|
88
|
-
}));
|
|
89
|
-
const updateGroupDescriptions = Object.values((0, groupBy_1.default)(flattenedBranchesAndUpdates, update => update.group)).map(updateGroup => {
|
|
90
|
-
const platforms = updateGroup
|
|
91
|
-
.map(update => update.platform)
|
|
92
|
-
.sort()
|
|
93
|
-
.join(', ');
|
|
94
|
-
return { ...updateGroup[0], platforms };
|
|
95
|
-
});
|
|
96
|
-
updateGroupDescriptions.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
|
|
97
|
-
return updateGroupDescriptions;
|
|
98
|
-
}
|
|
99
94
|
function logAsTable(updateGroupDescriptions) {
|
|
100
95
|
const table = new cli_table3_1.default({
|
|
101
96
|
head: ['Branch', ...utils_1.UPDATE_COLUMNS],
|
|
@@ -170,10 +170,10 @@ class SetUpAdhocProvisioningProfile {
|
|
|
170
170
|
return selected;
|
|
171
171
|
}
|
|
172
172
|
async registerDevicesAsync(ctx, appleTeam) {
|
|
173
|
-
const action = new action_1.default(this.app.account, appleTeam);
|
|
173
|
+
const action = new action_1.default(ctx.appStore, this.app.account, appleTeam);
|
|
174
174
|
const method = await action.runAsync();
|
|
175
175
|
while (true) {
|
|
176
|
-
if (method
|
|
176
|
+
if (method === action_1.RegistrationMethod.WEBSITE) {
|
|
177
177
|
log_1.default.newLine();
|
|
178
178
|
log_1.default.log(chalk_1.default.bold("Press any key if you've already finished device registration."));
|
|
179
179
|
await (0, prompts_1.pressAnyKeyToContinueAsync)();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSONObject } from '@expo/json-file';
|
|
2
|
+
import type { XCBuildConfiguration } from 'xcode';
|
|
2
3
|
import { CommonIosAppCredentialsFragment, IosAppBuildCredentialsFragment } from '../../graphql/generated';
|
|
3
4
|
import { Account } from '../../user/Account';
|
|
4
5
|
export interface App {
|
|
@@ -11,6 +12,7 @@ export interface Target {
|
|
|
11
12
|
bundleIdentifier: string;
|
|
12
13
|
parentBundleIdentifier?: string;
|
|
13
14
|
entitlements: JSONObject;
|
|
15
|
+
buildSettings?: XCBuildConfiguration['buildSettings'];
|
|
14
16
|
}
|
|
15
17
|
export interface TargetCredentials {
|
|
16
18
|
distributionCertificate: {
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
import AppStoreApi from '../../../credentials/ios/appstore/AppStoreApi';
|
|
1
2
|
import { AppleTeam } from '../../../graphql/generated';
|
|
2
3
|
import { Account } from '../../../user/Account';
|
|
3
4
|
export declare enum RegistrationMethod {
|
|
4
5
|
WEBSITE = 0,
|
|
5
6
|
INPUT = 1,
|
|
6
|
-
|
|
7
|
+
DEVELOPER_PORTAL = 2,
|
|
8
|
+
EXIT = 3
|
|
7
9
|
}
|
|
8
10
|
export default class DeviceCreateAction {
|
|
11
|
+
private appStoreApi;
|
|
9
12
|
private account;
|
|
10
13
|
private appleTeam;
|
|
11
|
-
constructor(account: Account, appleTeam: Pick<AppleTeam, 'appleTeamIdentifier' | 'appleTeamName' | 'id'>);
|
|
14
|
+
constructor(appStoreApi: AppStoreApi, account: Account, appleTeam: Pick<AppleTeam, 'appleTeamIdentifier' | 'appleTeamName' | 'id'>);
|
|
12
15
|
runAsync(): Promise<RegistrationMethod>;
|
|
13
16
|
private askForRegistrationMethodAsync;
|
|
14
17
|
}
|
|
@@ -5,16 +5,19 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
6
|
const log_1 = tslib_1.__importDefault(require("../../../log"));
|
|
7
7
|
const prompts_1 = require("../../../prompts");
|
|
8
|
+
const developerPortalMethod_1 = require("./developerPortalMethod");
|
|
8
9
|
const inputMethod_1 = require("./inputMethod");
|
|
9
10
|
const registrationUrlMethod_1 = require("./registrationUrlMethod");
|
|
10
11
|
var RegistrationMethod;
|
|
11
12
|
(function (RegistrationMethod) {
|
|
12
13
|
RegistrationMethod[RegistrationMethod["WEBSITE"] = 0] = "WEBSITE";
|
|
13
14
|
RegistrationMethod[RegistrationMethod["INPUT"] = 1] = "INPUT";
|
|
14
|
-
RegistrationMethod[RegistrationMethod["
|
|
15
|
+
RegistrationMethod[RegistrationMethod["DEVELOPER_PORTAL"] = 2] = "DEVELOPER_PORTAL";
|
|
16
|
+
RegistrationMethod[RegistrationMethod["EXIT"] = 3] = "EXIT";
|
|
15
17
|
})(RegistrationMethod = exports.RegistrationMethod || (exports.RegistrationMethod = {}));
|
|
16
18
|
class DeviceCreateAction {
|
|
17
|
-
constructor(account, appleTeam) {
|
|
19
|
+
constructor(appStoreApi, account, appleTeam) {
|
|
20
|
+
this.appStoreApi = appStoreApi;
|
|
18
21
|
this.account = account;
|
|
19
22
|
this.appleTeam = appleTeam;
|
|
20
23
|
}
|
|
@@ -23,6 +26,9 @@ class DeviceCreateAction {
|
|
|
23
26
|
if (method === RegistrationMethod.WEBSITE) {
|
|
24
27
|
await (0, registrationUrlMethod_1.runRegistrationUrlMethodAsync)(this.account.id, this.appleTeam);
|
|
25
28
|
}
|
|
29
|
+
else if (method === RegistrationMethod.DEVELOPER_PORTAL) {
|
|
30
|
+
await (0, developerPortalMethod_1.runDeveloperPortalMethodAsync)(this.appStoreApi, this.account.id, this.appleTeam);
|
|
31
|
+
}
|
|
26
32
|
else if (method === RegistrationMethod.INPUT) {
|
|
27
33
|
await (0, inputMethod_1.runInputMethodAsync)(this.account.id, this.appleTeam);
|
|
28
34
|
}
|
|
@@ -42,6 +48,10 @@ class DeviceCreateAction {
|
|
|
42
48
|
title: `${chalk_1.default.bold('Website')} - generates a registration URL to be opened on your devices`,
|
|
43
49
|
value: RegistrationMethod.WEBSITE,
|
|
44
50
|
},
|
|
51
|
+
{
|
|
52
|
+
title: `${chalk_1.default.bold('Developer Portal')} - import devices already registered on Apple Developer Portal`,
|
|
53
|
+
value: RegistrationMethod.DEVELOPER_PORTAL,
|
|
54
|
+
},
|
|
45
55
|
{
|
|
46
56
|
title: `${chalk_1.default.bold('Input')} - allows you to type in UDIDs (advanced option)`,
|
|
47
57
|
value: RegistrationMethod.INPUT,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="@expo/apple-utils/ts-declarations/expo__app-store" />
|
|
2
|
+
import { Device } from '@expo/apple-utils';
|
|
3
|
+
import AppStoreApi from '../../../credentials/ios/appstore/AppStoreApi';
|
|
4
|
+
import { AppleTeam } from '../../../graphql/generated';
|
|
5
|
+
export declare function runDeveloperPortalMethodAsync(appStoreApi: AppStoreApi, accountId: string, appleTeam: Pick<AppleTeam, 'appleTeamIdentifier' | 'appleTeamName' | 'id'>): Promise<void>;
|
|
6
|
+
export declare function formatDeviceLabel(device: Device): string;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatDeviceLabel = exports.runDeveloperPortalMethodAsync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const apple_utils_1 = require("@expo/apple-utils");
|
|
6
|
+
const AppleDeviceMutation_1 = require("../../../credentials/ios/api/graphql/mutations/AppleDeviceMutation");
|
|
7
|
+
const AppleDeviceQuery_1 = require("../../../credentials/ios/api/graphql/queries/AppleDeviceQuery");
|
|
8
|
+
const authenticate_1 = require("../../../credentials/ios/appstore/authenticate");
|
|
9
|
+
const generated_1 = require("../../../graphql/generated");
|
|
10
|
+
const log_1 = tslib_1.__importDefault(require("../../../log"));
|
|
11
|
+
const ora_1 = require("../../../ora");
|
|
12
|
+
const prompts_1 = require("../../../prompts");
|
|
13
|
+
const chunk_1 = tslib_1.__importDefault(require("../../../utils/expodash/chunk"));
|
|
14
|
+
const DEVICE_IMPORT_CHUNK_SIZE = 10;
|
|
15
|
+
const DEVICE_CLASS_TO_GRAPHQL_TYPE = {
|
|
16
|
+
[apple_utils_1.DeviceClass.IPAD]: generated_1.AppleDeviceClass.Ipad,
|
|
17
|
+
[apple_utils_1.DeviceClass.IPHONE]: generated_1.AppleDeviceClass.Iphone,
|
|
18
|
+
};
|
|
19
|
+
async function runDeveloperPortalMethodAsync(appStoreApi, accountId, appleTeam) {
|
|
20
|
+
const appleAuthCtx = await appStoreApi.ensureAuthenticatedAsync();
|
|
21
|
+
const unregisteredPortalDevices = await findUnregisteredPortalDevicesAsync(appleAuthCtx, accountId, appleTeam);
|
|
22
|
+
if (unregisteredPortalDevices.length === 0) {
|
|
23
|
+
log_1.default.log('All your devices registered on Apple Developer Portal are already imported to EAS.');
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const devicesToImport = await chooseDevicesToImportAsync(unregisteredPortalDevices);
|
|
27
|
+
await importDevicesAsync(accountId, appleTeam, devicesToImport);
|
|
28
|
+
}
|
|
29
|
+
exports.runDeveloperPortalMethodAsync = runDeveloperPortalMethodAsync;
|
|
30
|
+
async function importDevicesAsync(accountId, appleTeam, devices) {
|
|
31
|
+
const spinner = (0, ora_1.ora)(`Importing ${devices.length} Apple device${devices.length === 1 ? '' : 's'} to EAS`).start();
|
|
32
|
+
const deviceChunks = (0, chunk_1.default)(devices, DEVICE_IMPORT_CHUNK_SIZE);
|
|
33
|
+
try {
|
|
34
|
+
for (const deviceChunk of deviceChunks) {
|
|
35
|
+
await importDeviceChunkAsync(accountId, appleTeam, deviceChunk);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
spinner.fail();
|
|
40
|
+
throw err;
|
|
41
|
+
}
|
|
42
|
+
spinner.succeed();
|
|
43
|
+
}
|
|
44
|
+
async function importDeviceChunkAsync(accountId, appleTeam, devices) {
|
|
45
|
+
const promises = devices.map(device => {
|
|
46
|
+
var _a;
|
|
47
|
+
return AppleDeviceMutation_1.AppleDeviceMutation.createAppleDeviceAsync({
|
|
48
|
+
appleTeamId: appleTeam.id,
|
|
49
|
+
identifier: device.attributes.udid,
|
|
50
|
+
name: device.attributes.name,
|
|
51
|
+
deviceClass: (_a = DEVICE_CLASS_TO_GRAPHQL_TYPE[device.attributes.deviceClass]) !== null && _a !== void 0 ? _a : undefined,
|
|
52
|
+
}, accountId);
|
|
53
|
+
});
|
|
54
|
+
await Promise.all(promises);
|
|
55
|
+
}
|
|
56
|
+
async function findUnregisteredPortalDevicesAsync(appleAuthCtx, accountId, appleTeam) {
|
|
57
|
+
const expoRegisteredDevices = await AppleDeviceQuery_1.AppleDeviceQuery.getAllByAppleTeamIdentifierAsync(accountId, appleTeam.appleTeamIdentifier, { useCache: false });
|
|
58
|
+
const expoRegisteredDevicesByUdid = expoRegisteredDevices.reduce((acc, device) => {
|
|
59
|
+
acc[device.identifier] = device;
|
|
60
|
+
return acc;
|
|
61
|
+
}, {});
|
|
62
|
+
const portalDevices = await apple_utils_1.Device.getAllIOSProfileDevicesAsync((0, authenticate_1.getRequestContext)(appleAuthCtx));
|
|
63
|
+
return portalDevices.filter(portalDevice => !(portalDevice.attributes.udid in expoRegisteredDevicesByUdid) &&
|
|
64
|
+
[apple_utils_1.DeviceClass.IPAD, apple_utils_1.DeviceClass.IPHONE].includes(portalDevice.attributes.deviceClass));
|
|
65
|
+
}
|
|
66
|
+
async function chooseDevicesToImportAsync(devices) {
|
|
67
|
+
const { chosenDevices } = await (0, prompts_1.promptAsync)({
|
|
68
|
+
type: 'multiselect',
|
|
69
|
+
name: 'chosenDevices',
|
|
70
|
+
message: 'Which devices do you want to import to EAS?',
|
|
71
|
+
choices: devices.map(device => ({
|
|
72
|
+
value: device,
|
|
73
|
+
title: formatDeviceLabel(device),
|
|
74
|
+
selected: true,
|
|
75
|
+
})),
|
|
76
|
+
});
|
|
77
|
+
return chosenDevices;
|
|
78
|
+
}
|
|
79
|
+
function formatDeviceLabel(device) {
|
|
80
|
+
const deviceDetails = formatDeviceDetails(device);
|
|
81
|
+
return `${device.attributes.name} - ${device.attributes.udid})${deviceDetails !== '' ? ` - ${deviceDetails}` : ''}`;
|
|
82
|
+
}
|
|
83
|
+
exports.formatDeviceLabel = formatDeviceLabel;
|
|
84
|
+
function formatDeviceDetails(device) {
|
|
85
|
+
let details = device.attributes.deviceClass;
|
|
86
|
+
if (device.attributes.model) {
|
|
87
|
+
details = device.attributes.model;
|
|
88
|
+
}
|
|
89
|
+
return details === '' ? details : `(${details})`;
|
|
90
|
+
}
|
package/build/devices/manager.js
CHANGED
|
@@ -27,12 +27,12 @@ class DeviceManager {
|
|
|
27
27
|
log_1.default.log(chalk_1.default.green(CREATE_COMMAND_DESCRIPTION));
|
|
28
28
|
log_1.default.addNewLineIfNone();
|
|
29
29
|
const account = await this.resolveAccountAsync();
|
|
30
|
-
const
|
|
30
|
+
const appleAuthCtx = await this.ctx.appStore.ensureAuthenticatedAsync();
|
|
31
31
|
const appleTeam = await ensureAppleTeamExistsAsync(account.id, {
|
|
32
|
-
appleTeamIdentifier: team.id,
|
|
33
|
-
appleTeamName: team.name,
|
|
32
|
+
appleTeamIdentifier: appleAuthCtx.team.id,
|
|
33
|
+
appleTeamName: appleAuthCtx.team.name,
|
|
34
34
|
});
|
|
35
|
-
const action = new action_1.default(account, appleTeam);
|
|
35
|
+
const action = new action_1.default(this.ctx.appStore, account, appleTeam);
|
|
36
36
|
await action.runAsync();
|
|
37
37
|
}
|
|
38
38
|
async resolveAccountAsync() {
|