You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add gitlab CI CD file
* rename android uuid field to uniqueId
* made all other changes
* addressed some comments
* renamed sub-command to subcommand
* add usage block to android command
* lint fix
* addressed comments
* moved logger debug option upwards
.requiredOption('--file <path>','Path to the mapping file')
103
112
.requiredOption('--realm <value>',
104
113
'Realm for your organization (example: us0). Can also be set using the environment variable O11Y_REALM',
105
114
process.env.O11Y_REALM
106
115
)
107
-
.requiredOption(
116
+
.option(
108
117
'--token <value>',
109
-
'API access token. Can also be set using the environment variable O11Y_TOKEN',
110
-
process.env.O11Y_TOKEN
118
+
'API access token. Can also be set using the environment variable O11Y_TOKEN'
111
119
)
112
-
.option('--uuid <value>','Optional UUID for the upload')
120
+
.option('--uniqueId <value>','Optional unique ID for the upload')
113
121
.option('--dry-run','Preview the file that will be uploaded')
114
122
.option('--debug','Enable debug logs')
115
123
.action(async(options: UploadAndroidOptions)=>{
124
+
consttoken=options.token||process.env.O11Y_TOKEN;
125
+
if(!token){
126
+
androidCommand.error('Error: API access token is required. Please pass it into the command as the --token option, or set using the environment variable O11Y_TOKEN');
127
+
}else{
128
+
options.token=token;
129
+
}
130
+
131
+
if(!options.realm||options.realm.trim()===''){
132
+
androidCommand.error('Error: Realm is required and cannot be empty. Please pass it into the command as the --realm option, or set using the environment variable O11Y_REALM');
androidCommand.error('Error: API access token is required. Please pass it into the command as the --token option, or set using the environment variable O11Y_TOKEN');
234
+
}else{
235
+
options.token=token;
236
+
}
237
+
238
+
if(!options.realm||options.realm.trim()===''){
239
+
androidCommand.error('Error: Realm is required and cannot be empty. Please pass it into the command as the --realm option, or set using the environment variable O11Y_REALM');
'Realm for your organization (example: us0). Can also be set using the environment variable O11Y_REALM',
309
350
process.env.O11Y_REALM
310
351
)
311
-
.requiredOption(
352
+
.option(
312
353
'--token <value>',
313
-
'API access token. Can also be set using the environment variable O11Y_TOKEN',
314
-
process.env.O11Y_TOKEN
354
+
'API access token. Can also be set using the environment variable O11Y_TOKEN'
315
355
)
316
356
.showHelpAfterError(true)
317
357
.description(listProguardDescription)
318
358
.option('--debug',
319
359
'Enable debug logs')
320
360
.action(async(options)=>{
361
+
consttoken=options.token||process.env.O11Y_TOKEN;
362
+
if(!token){
363
+
androidCommand.error('Error: API access token is required. Please pass it into the command as the --token option, or set using the environment variable O11Y_TOKEN');
364
+
}
365
+
366
+
if(!options.realm||options.realm.trim()===''){
367
+
androidCommand.error('Error: Realm is required and cannot be empty. Please pass it into the command as the --realm option, or set using the environment variable O11Y_REALM');
Copy file name to clipboardexpand all lines: src/commands/sourcemaps.ts
+8
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,14 @@ to your environment, any reported stack traces will be automatically symbolicate
57
57
uploaded source maps.
58
58
`;
59
59
60
+
consthelpDescription=`Prepares JavaScript files to support error symbolication and uploads JavaScript source maps
61
+
62
+
For each respective command listed below under 'Commands', please run 'o11y-dem-cli sourcemaps <command> --help' for an overview of its usage and options
Copy file name to clipboardexpand all lines: src/index.ts
+5-2
Original file line number
Diff line number
Diff line change
@@ -28,13 +28,16 @@ const program = new Command();
28
28
consthelpDescription=
29
29
`A CLI tool for uploading and displaying of Android, iOS, and Browser symbolication files to and from Splunk O11y Cloud.
30
30
31
-
For each respective command listed below, please run 'o11y-dem-cli <command>' for an overview of available subcommands and options
31
+
For each respective command listed below under 'Commands', please run 'o11y-dem-cli <command>' for an overview of available subcommands and options.
32
+
33
+
For subcommands like "upload" and "list" that make an API call, please ensure that the realm and token are either passed into the command as options, or set using the environment variables O11Y_REALM and O11Y_TOKEN.
0 commit comments