1
- import { LogsConfig as ApiLogsConfig } from '@twilio-labs/serverless-api' ;
1
+ import {
2
+ ClientConfig ,
3
+ LogsConfig as ApiLogsConfig ,
4
+ } from '@twilio-labs/serverless-api' ;
2
5
import path from 'path' ;
3
6
import { Arguments } from 'yargs' ;
4
7
import checkForValidServiceSid from '../checks/check-service-sid' ;
5
8
import { cliInfo } from '../commands/logs' ;
6
9
import {
7
10
ExternalCliOptions ,
8
- SharedFlagsWithCrdentials ,
11
+ SharedFlagsWithCredentials ,
9
12
} from '../commands/shared' ;
10
13
import { getFullCommand } from '../commands/utils' ;
11
14
import { readSpecializedConfig } from './global' ;
12
15
import { getCredentialsFromFlags } from './utils' ;
13
16
import { mergeFlagsAndConfig } from './utils/mergeFlagsAndConfig' ;
14
17
15
- export type LogsConfig = ApiLogsConfig & {
16
- cwd : string ;
17
- accountSid : string ;
18
- authToken : string ;
19
- properties ?: string [ ] ;
20
- outputFormat ?: string ;
21
- } ;
18
+ export type LogsConfig = ClientConfig &
19
+ ApiLogsConfig & {
20
+ cwd : string ;
21
+ accountSid : string ;
22
+ authToken : string ;
23
+ properties ?: string [ ] ;
24
+ outputFormat ?: string ;
25
+ } ;
22
26
23
27
export type LogsCliFlags = Arguments <
24
- SharedFlagsWithCrdentials & {
28
+ SharedFlagsWithCredentials & {
25
29
cwd ?: string ;
26
30
environment ?: string ;
27
31
serviceSid ?: string ;
@@ -61,6 +65,8 @@ export async function getConfigFromFlags(
61
65
const command = getFullCommand ( flags ) ;
62
66
const serviceSid = checkForValidServiceSid ( command , flags . serviceSid ) ;
63
67
const outputFormat = flags . outputFormat || externalCliOptions ?. outputFormat ;
68
+ const region = flags . region ;
69
+ const edge = flags . edge ;
64
70
65
71
return {
66
72
cwd,
@@ -71,5 +77,7 @@ export async function getConfigFromFlags(
71
77
outputFormat,
72
78
filterByFunction : flags . functionSid ,
73
79
tail : flags . tail ,
80
+ region,
81
+ edge,
74
82
} ;
75
83
}
0 commit comments