File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -92,29 +92,34 @@ export async function getUserAgent(
92
92
return pairs . join ( ' ' )
93
93
}
94
94
95
- type EnvType = 'classic' | 'codecatalyst' | ...
95
+ type EnvType =
96
+ | 'cloud9'
97
+ | 'cloud9-codecatalyst'
98
+ | 'amazon-cloud9'
99
+ | 'cloud9-ec2'
100
+ | 'codecatalyst'
101
+ | 'local'
102
+ | 'ec2'
103
+ | 'sagemaker'
104
+ | 'test'
105
+ | 'other'
96
106
97
107
export function getComputeEnvType ( ) : EnvType {
98
- // Compute ENV could be one of the following
99
- // "cloud9"|"cloud9-codecatalyst"|"cloud9-ec2"|"codecatalyst"|"ec2"|"local"|"sagemaker"|"ssh"|"test"|"web"|"wsl"|"other"|string;
100
-
101
108
if ( isCloud9 ( 'classic' ) ) return 'cloud9'
102
109
103
110
if ( isCloud9 ( 'codecatalyst' ) ) return 'cloud9-codecatalyst'
104
111
105
- if ( isInDevEnv ( ) ) return 'codecatalyst' // should it be codecatalyst devEnv?
112
+ if ( isInDevEnv ( ) ) return 'codecatalyst'
106
113
107
- if ( isCn ( ) ) return 'amazon-cloud9' // name better
114
+ if ( isCn ( ) ) return 'amazon-cloud9'
108
115
109
116
if ( isSageMaker ( ) ) return 'sagemaker'
110
117
111
118
if ( env . remoteName == 'ssh-remote' && ! isInDevEnv ( ) ) return 'ec2'
112
119
113
120
if ( isAutomation ( ) ) return 'test'
114
121
115
- if ( ! env . remoteName )
116
- // use isDevenvVscode instead?
117
- return 'local'
122
+ if ( ! env . remoteName ) return 'local'
118
123
else return 'other'
119
124
}
120
125
You can’t perform that action at this time.
0 commit comments