-
Notifications
You must be signed in to change notification settings - Fork 187
Expand file tree
/
Copy pathindex.ts
More file actions
44 lines (38 loc) · 1.25 KB
/
index.ts
File metadata and controls
44 lines (38 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { Flags } from '@oclif/core';
import EasCommand from '../../commandUtils/EasCommand';
import { SelectPlatform } from '../../credentials/manager/SelectPlatform';
export default class Credentials extends EasCommand {
static override description = 'manage credentials';
static override flags = {
platform: Flags.option({ char: 'p', options: ['android', 'ios'] as const })(),
};
static override contextDefinition = {
...this.ContextOptions.LoggedIn,
...this.ContextOptions.OptionalProjectConfig,
...this.ContextOptions.DynamicProjectConfig,
...this.ContextOptions.Analytics,
...this.ContextOptions.Vcs,
};
async runAsync(): Promise<void> {
const { flags } = await this.parse(Credentials);
const {
loggedIn: { actor, graphqlClient },
optionalPrivateProjectConfig: privateProjectConfig,
getDynamicPrivateProjectConfigAsync,
analytics,
vcsClient,
} = await this.getContextAsync(Credentials, {
nonInteractive: false,
withServerSideEnvironment: null,
});
await new SelectPlatform(
actor,
graphqlClient,
vcsClient,
analytics,
privateProjectConfig ?? null,
getDynamicPrivateProjectConfigAsync,
flags.platform
).runAsync();
}
}