commandbar 1.6.10 → 1.6.13
Sign up to get free protection for your applications and to get access to all the features.
- package/build/commandbar-js/src/index.js +1 -1
- package/build/internal/src/client/AddContextOptions.d.ts +5 -0
- package/build/internal/src/client/CommandBarClientSDK.d.ts +36 -5
- package/build/internal/src/client/CommandBarProxySDK.d.ts +4 -4
- package/build/internal/src/client/CommandBarSDK.d.ts +2 -6
- package/build/internal/src/client/EventHandler.d.ts +2 -2
- package/build/internal/src/client/OrgConfig.d.ts +5 -0
- package/build/internal/src/client/SentryReporter.d.ts +24 -3
- package/build/internal/src/middleware/CommandFromClientV.d.ts +44 -3
- package/build/internal/src/middleware/OrganizationV.d.ts +16 -0
- package/build/internal/src/middleware/ResourceSettingsV.d.ts +4 -0
- package/build/internal/src/middleware/command.d.ts +1043 -84
- package/build/internal/src/middleware/commandCategory.d.ts +16 -0
- package/build/internal/src/middleware/detailPreview.d.ts +4 -2
- package/build/internal/src/middleware/generics.d.ts +10 -10
- package/build/internal/src/middleware/helpers/argument.d.ts +151 -0
- package/build/internal/src/middleware/helpers/commandTemplate.d.ts +17 -0
- package/build/internal/src/middleware/organization.d.ts +114 -3
- package/build/internal/src/middleware/releases.d.ts +1 -1
- package/build/internal/src/middleware/types.d.ts +58 -3
- package/build/internal/src/middleware/user.d.ts +3 -1
- package/package.json +2 -4
- package/src/init.ts +6 -2
@@ -34,6 +34,13 @@ export declare const OrganizationSettingsV: t.TypeC<{
|
|
34
34
|
end_user_shortcuts_enabled: t.BooleanC;
|
35
35
|
fallback_commands: t.ArrayC<t.NumberC>;
|
36
36
|
end_user_recents_enabled: t.BooleanC;
|
37
|
+
tab_direction: t.UnionC<[t.LiteralC<"horizontal">, t.LiteralC<"vertical">]>;
|
38
|
+
recommended_tab_enabled: t.BooleanC;
|
39
|
+
recents_tab_enabled: t.BooleanC;
|
40
|
+
recommended_tab_instruction: t.StringC;
|
41
|
+
recents_tab_instruction: t.StringC;
|
42
|
+
hotload_help_docs: t.BooleanC;
|
43
|
+
slash_filters_enabled: t.BooleanC;
|
37
44
|
}>;
|
38
45
|
export declare class Organization {
|
39
46
|
static read: (arg0: string, params?: Record<string, string> | undefined, callbacks?: {
|
@@ -78,6 +85,8 @@ export declare class Organization {
|
|
78
85
|
show_with_no_results?: boolean | undefined;
|
79
86
|
search_tab_enabled?: boolean | undefined;
|
80
87
|
search_tab_name?: string | null | undefined;
|
88
|
+
slash_filter_enabled?: boolean | undefined;
|
89
|
+
slash_filter_keyword?: string | null | undefined;
|
81
90
|
search_tab_instruction?: string | null | undefined;
|
82
91
|
setting_pin_to_bottom?: boolean | undefined;
|
83
92
|
track_recents?: boolean | undefined;
|
@@ -100,6 +109,12 @@ export declare class Organization {
|
|
100
109
|
releases_enabled: boolean;
|
101
110
|
fallback_commands: number[];
|
102
111
|
tab_direction: "horizontal" | "vertical";
|
112
|
+
recommended_tab_enabled: boolean;
|
113
|
+
recents_tab_enabled: boolean;
|
114
|
+
recommended_tab_instruction: string;
|
115
|
+
recents_tab_instruction: string;
|
116
|
+
hotload_help_docs: boolean;
|
117
|
+
slash_filters_enabled: boolean;
|
103
118
|
}>;
|
104
119
|
static update: (object: {
|
105
120
|
id: string | number;
|
@@ -140,6 +155,8 @@ export declare class Organization {
|
|
140
155
|
show_with_no_results?: boolean | undefined;
|
141
156
|
search_tab_enabled?: boolean | undefined;
|
142
157
|
search_tab_name?: string | null | undefined;
|
158
|
+
slash_filter_enabled?: boolean | undefined;
|
159
|
+
slash_filter_keyword?: string | null | undefined;
|
143
160
|
search_tab_instruction?: string | null | undefined;
|
144
161
|
setting_pin_to_bottom?: boolean | undefined;
|
145
162
|
track_recents?: boolean | undefined;
|
@@ -162,6 +179,12 @@ export declare class Organization {
|
|
162
179
|
releases_enabled: boolean;
|
163
180
|
fallback_commands: number[];
|
164
181
|
tab_direction: "horizontal" | "vertical";
|
182
|
+
recommended_tab_enabled: boolean;
|
183
|
+
recents_tab_enabled: boolean;
|
184
|
+
recommended_tab_instruction: string;
|
185
|
+
recents_tab_instruction: string;
|
186
|
+
hotload_help_docs: boolean;
|
187
|
+
slash_filters_enabled: boolean;
|
165
188
|
}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
|
166
189
|
id: string | number;
|
167
190
|
name: string;
|
@@ -201,6 +224,8 @@ export declare class Organization {
|
|
201
224
|
show_with_no_results?: boolean | undefined;
|
202
225
|
search_tab_enabled?: boolean | undefined;
|
203
226
|
search_tab_name?: string | null | undefined;
|
227
|
+
slash_filter_enabled?: boolean | undefined;
|
228
|
+
slash_filter_keyword?: string | null | undefined;
|
204
229
|
search_tab_instruction?: string | null | undefined;
|
205
230
|
setting_pin_to_bottom?: boolean | undefined;
|
206
231
|
track_recents?: boolean | undefined;
|
@@ -223,6 +248,12 @@ export declare class Organization {
|
|
223
248
|
releases_enabled: boolean;
|
224
249
|
fallback_commands: number[];
|
225
250
|
tab_direction: "horizontal" | "vertical";
|
251
|
+
recommended_tab_enabled: boolean;
|
252
|
+
recents_tab_enabled: boolean;
|
253
|
+
recommended_tab_instruction: string;
|
254
|
+
recents_tab_instruction: string;
|
255
|
+
hotload_help_docs: boolean;
|
256
|
+
slash_filters_enabled: boolean;
|
226
257
|
}>;
|
227
258
|
static listCommands: (orgUID: string) => Promise<({
|
228
259
|
id: number;
|
@@ -313,6 +344,14 @@ export declare class Organization {
|
|
313
344
|
object?: string | undefined;
|
314
345
|
hoverTooltip?: boolean | undefined;
|
315
346
|
operation?: "self" | "router" | "blank" | undefined;
|
347
|
+
}) | ({
|
348
|
+
type: "video";
|
349
|
+
value: string;
|
350
|
+
} & {} & {
|
351
|
+
commandType?: "object" | "independent" | "help" | undefined;
|
352
|
+
object?: string | undefined;
|
353
|
+
hoverTooltip?: boolean | undefined;
|
354
|
+
operation?: "self" | "router" | "blank" | undefined;
|
316
355
|
});
|
317
356
|
} & {
|
318
357
|
disabledReason?: string | undefined;
|
@@ -343,6 +382,8 @@ export declare class Organization {
|
|
343
382
|
allow_create_label?: string | undefined;
|
344
383
|
show_in_record_action_list?: boolean | undefined;
|
345
384
|
show_in_default_list?: boolean | undefined;
|
385
|
+
auto_choose?: boolean | undefined;
|
386
|
+
is_private?: boolean | undefined;
|
346
387
|
}) | ({
|
347
388
|
type: "set";
|
348
389
|
value: string[] | number[] | {
|
@@ -364,6 +405,8 @@ export declare class Organization {
|
|
364
405
|
loaded?: any[] | undefined;
|
365
406
|
allow_create?: boolean | undefined;
|
366
407
|
allow_create_label?: string | undefined;
|
408
|
+
auto_choose?: boolean | undefined;
|
409
|
+
is_private?: boolean | undefined;
|
367
410
|
}) | ({
|
368
411
|
type: "provided";
|
369
412
|
value: "time" | "text";
|
@@ -384,6 +427,8 @@ export declare class Organization {
|
|
384
427
|
dateTimeArgumentTypeId?: number | undefined;
|
385
428
|
allow_create?: boolean | undefined;
|
386
429
|
allow_create_label?: string | undefined;
|
430
|
+
auto_choose?: boolean | undefined;
|
431
|
+
is_private?: boolean | undefined;
|
387
432
|
}) | ({
|
388
433
|
type: "dependent";
|
389
434
|
value: string;
|
@@ -403,6 +448,8 @@ export declare class Organization {
|
|
403
448
|
loaded?: any[] | undefined;
|
404
449
|
allow_create?: boolean | undefined;
|
405
450
|
allow_create_label?: string | undefined;
|
451
|
+
auto_choose?: boolean | undefined;
|
452
|
+
is_private?: boolean | undefined;
|
406
453
|
}) | ({
|
407
454
|
type: "function";
|
408
455
|
value: string;
|
@@ -422,6 +469,34 @@ export declare class Organization {
|
|
422
469
|
loaded?: any[] | undefined;
|
423
470
|
allow_create?: boolean | undefined;
|
424
471
|
allow_create_label?: string | undefined;
|
472
|
+
auto_choose?: boolean | undefined;
|
473
|
+
is_private?: boolean | undefined;
|
474
|
+
}) | ({
|
475
|
+
type: "video";
|
476
|
+
value: {
|
477
|
+
source: string;
|
478
|
+
} & {
|
479
|
+
title?: string | undefined;
|
480
|
+
description?: string | undefined;
|
481
|
+
};
|
482
|
+
order_key: number;
|
483
|
+
} & {
|
484
|
+
label?: string | undefined;
|
485
|
+
chosen?: string | number | undefined;
|
486
|
+
selected?: any[] | undefined;
|
487
|
+
input_type?: string | undefined;
|
488
|
+
preselected_key?: string | undefined;
|
489
|
+
label_field?: string | undefined;
|
490
|
+
availability_condition?: {
|
491
|
+
field: string;
|
492
|
+
operator: "==" | "!=" | "isTruthy" | "isFalsy";
|
493
|
+
value: string | undefined;
|
494
|
+
}[] | undefined;
|
495
|
+
loaded?: any[] | undefined;
|
496
|
+
allow_create?: boolean | undefined;
|
497
|
+
allow_create_label?: string | undefined;
|
498
|
+
is_private?: boolean | undefined;
|
499
|
+
auto_choose?: boolean | undefined;
|
425
500
|
});
|
426
501
|
};
|
427
502
|
tags: string[];
|
@@ -451,6 +526,7 @@ export declare class Organization {
|
|
451
526
|
confirm: string;
|
452
527
|
shortcut: string[];
|
453
528
|
explanation: string;
|
529
|
+
heading: string;
|
454
530
|
is_live: boolean;
|
455
531
|
category: number | null;
|
456
532
|
sort_key: number | null;
|
@@ -474,13 +550,17 @@ export declare class Organization {
|
|
474
550
|
shortcut_win: string[];
|
475
551
|
hotkey_mac: string;
|
476
552
|
hotkey_win: string;
|
477
|
-
detail: string | {
|
553
|
+
detail: string | ({
|
478
554
|
type: "html" | "video" | "plaintext" | "markdown" | "react" | null;
|
479
555
|
value: string;
|
480
|
-
}
|
556
|
+
} & {
|
557
|
+
position?: "inline" | "popover" | undefined;
|
558
|
+
}) | (string | ({
|
481
559
|
type: "html" | "video" | "plaintext" | "markdown" | "react" | null;
|
482
560
|
value: string;
|
483
|
-
}
|
561
|
+
} & {
|
562
|
+
position?: "inline" | "popover" | undefined;
|
563
|
+
}))[] | null;
|
484
564
|
})[]>;
|
485
565
|
static listCommandCategories: (orgUID: string) => Promise<({
|
486
566
|
id: number;
|
@@ -495,6 +575,8 @@ export declare class Organization {
|
|
495
575
|
setting_pin_to_bottom: boolean;
|
496
576
|
search_tab_enabled: boolean;
|
497
577
|
search_tab_name: string;
|
578
|
+
slash_filter_enabled: boolean;
|
579
|
+
slash_filter_keyword: string | null;
|
498
580
|
search_tab_instruction: string;
|
499
581
|
track_recents: boolean;
|
500
582
|
})[]>;
|
@@ -600,6 +682,13 @@ export declare class Organization {
|
|
600
682
|
end_user_shortcuts_enabled: boolean;
|
601
683
|
fallback_commands: number[];
|
602
684
|
end_user_recents_enabled: boolean;
|
685
|
+
tab_direction: "horizontal" | "vertical";
|
686
|
+
recommended_tab_enabled: boolean;
|
687
|
+
recents_tab_enabled: boolean;
|
688
|
+
recommended_tab_instruction: string;
|
689
|
+
recents_tab_instruction: string;
|
690
|
+
hotload_help_docs: boolean;
|
691
|
+
slash_filters_enabled: boolean;
|
603
692
|
}>;
|
604
693
|
static updateSetting: (object: {
|
605
694
|
end_user_limit?: number | undefined;
|
@@ -621,6 +710,13 @@ export declare class Organization {
|
|
621
710
|
end_user_shortcuts_enabled?: boolean | undefined;
|
622
711
|
fallback_commands?: number[] | undefined;
|
623
712
|
end_user_recents_enabled?: boolean | undefined;
|
713
|
+
tab_direction?: "horizontal" | "vertical" | undefined;
|
714
|
+
recommended_tab_enabled?: boolean | undefined;
|
715
|
+
recents_tab_enabled?: boolean | undefined;
|
716
|
+
recommended_tab_instruction?: string | undefined;
|
717
|
+
recents_tab_instruction?: string | undefined;
|
718
|
+
hotload_help_docs?: boolean | undefined;
|
719
|
+
slash_filters_enabled?: boolean | undefined;
|
624
720
|
}, params?: Record<string, string> | undefined, callbacks?: {
|
625
721
|
onSuccess?: (() => void) | undefined;
|
626
722
|
onError?: ((err: string) => void) | undefined;
|
@@ -644,6 +740,13 @@ export declare class Organization {
|
|
644
740
|
end_user_shortcuts_enabled: boolean;
|
645
741
|
fallback_commands: number[];
|
646
742
|
end_user_recents_enabled: boolean;
|
743
|
+
tab_direction: "horizontal" | "vertical";
|
744
|
+
recommended_tab_enabled: boolean;
|
745
|
+
recents_tab_enabled: boolean;
|
746
|
+
recommended_tab_instruction: string;
|
747
|
+
recents_tab_instruction: string;
|
748
|
+
hotload_help_docs: boolean;
|
749
|
+
slash_filters_enabled: boolean;
|
647
750
|
}>;
|
648
751
|
static decode: (data: any) => {
|
649
752
|
id: string | number;
|
@@ -684,6 +787,8 @@ export declare class Organization {
|
|
684
787
|
show_with_no_results?: boolean | undefined;
|
685
788
|
search_tab_enabled?: boolean | undefined;
|
686
789
|
search_tab_name?: string | null | undefined;
|
790
|
+
slash_filter_enabled?: boolean | undefined;
|
791
|
+
slash_filter_keyword?: string | null | undefined;
|
687
792
|
search_tab_instruction?: string | null | undefined;
|
688
793
|
setting_pin_to_bottom?: boolean | undefined;
|
689
794
|
track_recents?: boolean | undefined;
|
@@ -706,5 +811,11 @@ export declare class Organization {
|
|
706
811
|
releases_enabled: boolean;
|
707
812
|
fallback_commands: number[];
|
708
813
|
tab_direction: "horizontal" | "vertical";
|
814
|
+
recommended_tab_enabled: boolean;
|
815
|
+
recents_tab_enabled: boolean;
|
816
|
+
recommended_tab_instruction: string;
|
817
|
+
recents_tab_instruction: string;
|
818
|
+
hotload_help_docs: boolean;
|
819
|
+
slash_filters_enabled: boolean;
|
709
820
|
};
|
710
821
|
}
|
@@ -224,7 +224,7 @@ export declare class Releases {
|
|
224
224
|
tags: string[];
|
225
225
|
};
|
226
226
|
}>;
|
227
|
-
static readDiff: (fromId: string, toId: string) => Promise<
|
227
|
+
static readDiff: (fromId: string, toId: string) => Promise<unknown>;
|
228
228
|
static promoteReleaseStep: (releaseStepId: number) => Promise<any>;
|
229
229
|
static promoteReleaseToFirstEnv: (releaseId: number) => Promise<{
|
230
230
|
created_by: string;
|
@@ -190,6 +190,14 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
|
|
190
190
|
object?: string | undefined;
|
191
191
|
hoverTooltip?: boolean | undefined;
|
192
192
|
operation?: "self" | "router" | "blank" | undefined;
|
193
|
+
}) | ({
|
194
|
+
type: "video";
|
195
|
+
value: string;
|
196
|
+
} & {} & {
|
197
|
+
commandType?: "object" | "independent" | "help" | undefined;
|
198
|
+
object?: string | undefined;
|
199
|
+
hoverTooltip?: boolean | undefined;
|
200
|
+
operation?: "self" | "router" | "blank" | undefined;
|
193
201
|
});
|
194
202
|
} & {
|
195
203
|
disabledReason?: string | undefined;
|
@@ -220,6 +228,8 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
|
|
220
228
|
allow_create_label?: string | undefined;
|
221
229
|
show_in_record_action_list?: boolean | undefined;
|
222
230
|
show_in_default_list?: boolean | undefined;
|
231
|
+
auto_choose?: boolean | undefined;
|
232
|
+
is_private?: boolean | undefined;
|
223
233
|
}) | ({
|
224
234
|
type: "set";
|
225
235
|
value: string[] | number[] | {
|
@@ -241,6 +251,8 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
|
|
241
251
|
loaded?: any[] | undefined;
|
242
252
|
allow_create?: boolean | undefined;
|
243
253
|
allow_create_label?: string | undefined;
|
254
|
+
auto_choose?: boolean | undefined;
|
255
|
+
is_private?: boolean | undefined;
|
244
256
|
}) | ({
|
245
257
|
type: "provided";
|
246
258
|
value: "time" | "text";
|
@@ -261,6 +273,8 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
|
|
261
273
|
dateTimeArgumentTypeId?: number | undefined;
|
262
274
|
allow_create?: boolean | undefined;
|
263
275
|
allow_create_label?: string | undefined;
|
276
|
+
auto_choose?: boolean | undefined;
|
277
|
+
is_private?: boolean | undefined;
|
264
278
|
}) | ({
|
265
279
|
type: "dependent";
|
266
280
|
value: string;
|
@@ -280,6 +294,8 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
|
|
280
294
|
loaded?: any[] | undefined;
|
281
295
|
allow_create?: boolean | undefined;
|
282
296
|
allow_create_label?: string | undefined;
|
297
|
+
auto_choose?: boolean | undefined;
|
298
|
+
is_private?: boolean | undefined;
|
283
299
|
}) | ({
|
284
300
|
type: "function";
|
285
301
|
value: string;
|
@@ -299,6 +315,34 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
|
|
299
315
|
loaded?: any[] | undefined;
|
300
316
|
allow_create?: boolean | undefined;
|
301
317
|
allow_create_label?: string | undefined;
|
318
|
+
auto_choose?: boolean | undefined;
|
319
|
+
is_private?: boolean | undefined;
|
320
|
+
}) | ({
|
321
|
+
type: "video";
|
322
|
+
value: {
|
323
|
+
source: string;
|
324
|
+
} & {
|
325
|
+
title?: string | undefined;
|
326
|
+
description?: string | undefined;
|
327
|
+
};
|
328
|
+
order_key: number;
|
329
|
+
} & {
|
330
|
+
label?: string | undefined;
|
331
|
+
chosen?: string | number | undefined;
|
332
|
+
selected?: any[] | undefined;
|
333
|
+
input_type?: string | undefined;
|
334
|
+
preselected_key?: string | undefined;
|
335
|
+
label_field?: string | undefined;
|
336
|
+
availability_condition?: {
|
337
|
+
field: string;
|
338
|
+
operator: "==" | "!=" | "isTruthy" | "isFalsy";
|
339
|
+
value: string | undefined;
|
340
|
+
}[] | undefined;
|
341
|
+
loaded?: any[] | undefined;
|
342
|
+
allow_create?: boolean | undefined;
|
343
|
+
allow_create_label?: string | undefined;
|
344
|
+
is_private?: boolean | undefined;
|
345
|
+
auto_choose?: boolean | undefined;
|
302
346
|
});
|
303
347
|
};
|
304
348
|
tags: string[];
|
@@ -328,6 +372,7 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
|
|
328
372
|
confirm: string;
|
329
373
|
shortcut: string[];
|
330
374
|
explanation: string;
|
375
|
+
heading: string;
|
331
376
|
is_live: boolean;
|
332
377
|
category: number | null;
|
333
378
|
sort_key: number | null;
|
@@ -351,13 +396,17 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
|
|
351
396
|
shortcut_win: string[];
|
352
397
|
hotkey_mac: string;
|
353
398
|
hotkey_win: string;
|
354
|
-
detail: string | {
|
399
|
+
detail: string | ({
|
355
400
|
type: "html" | "video" | "plaintext" | "markdown" | "react" | null;
|
356
401
|
value: string;
|
357
|
-
}
|
402
|
+
} & {
|
403
|
+
position?: "inline" | "popover" | undefined;
|
404
|
+
}) | (string | ({
|
358
405
|
type: "html" | "video" | "plaintext" | "markdown" | "react" | null;
|
359
406
|
value: string;
|
360
|
-
}
|
407
|
+
} & {
|
408
|
+
position?: "inline" | "popover" | undefined;
|
409
|
+
}))[] | null;
|
361
410
|
};
|
362
411
|
export declare const isResource: (option: any) => option is IResourceType;
|
363
412
|
export declare const isContextArgument: (argument: IArgumentType) => argument is {
|
@@ -381,6 +430,8 @@ export declare const isContextArgument: (argument: IArgumentType) => argument is
|
|
381
430
|
allow_create_label?: string | undefined;
|
382
431
|
show_in_record_action_list?: boolean | undefined;
|
383
432
|
show_in_default_list?: boolean | undefined;
|
433
|
+
auto_choose?: boolean | undefined;
|
434
|
+
is_private?: boolean | undefined;
|
384
435
|
};
|
385
436
|
export declare const isTimeArgument: (argument: IArgumentType) => argument is {
|
386
437
|
type: "provided";
|
@@ -402,6 +453,8 @@ export declare const isTimeArgument: (argument: IArgumentType) => argument is {
|
|
402
453
|
dateTimeArgumentTypeId?: number | undefined;
|
403
454
|
allow_create?: boolean | undefined;
|
404
455
|
allow_create_label?: string | undefined;
|
456
|
+
auto_choose?: boolean | undefined;
|
457
|
+
is_private?: boolean | undefined;
|
405
458
|
};
|
406
459
|
export declare const isFunctionArgument: (argument: IArgumentType) => argument is {
|
407
460
|
type: "function";
|
@@ -422,4 +475,6 @@ export declare const isFunctionArgument: (argument: IArgumentType) => argument i
|
|
422
475
|
loaded?: any[] | undefined;
|
423
476
|
allow_create?: boolean | undefined;
|
424
477
|
allow_create_label?: string | undefined;
|
478
|
+
auto_choose?: boolean | undefined;
|
479
|
+
is_private?: boolean | undefined;
|
425
480
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "commandbar",
|
3
|
-
"version": "1.6.
|
3
|
+
"version": "1.6.13",
|
4
4
|
"description": "Javascript Utility for CommandBar",
|
5
5
|
"main": "build/commandbar-js/src/index.js",
|
6
6
|
"types": "build/commandbar-js/src/index.d.ts",
|
@@ -22,7 +22,5 @@
|
|
22
22
|
"io-ts": "2.2.13"
|
23
23
|
},
|
24
24
|
"devDependencies": {},
|
25
|
-
"peerDependencies": {
|
26
|
-
"@sentry/react": "6.19.7"
|
27
|
-
}
|
25
|
+
"peerDependencies": {}
|
28
26
|
}
|
package/src/init.ts
CHANGED
@@ -20,8 +20,6 @@ const getSrc = (org: string) => {
|
|
20
20
|
if (lc && lc.includes('local')) {
|
21
21
|
// for debugging purposes
|
22
22
|
origin = 'http://localhost:8000';
|
23
|
-
} else if (!lc && org === '10d7dc04') {
|
24
|
-
origin = 'https://api-cu.commandbar.com';
|
25
23
|
}
|
26
24
|
|
27
25
|
let src = origin + '/latest/' + org;
|
@@ -72,6 +70,12 @@ const init = (org: string, opts: IInitOptions = DEFAULT_OPTS) => {
|
|
72
70
|
return;
|
73
71
|
}
|
74
72
|
|
73
|
+
// Do nothing if CommandBar SDK has already been initialized
|
74
|
+
if (!!getProxySDK()[_configuration]?.uuid) {
|
75
|
+
console.warn('CommandBar init was called more than once. Skipping the redundant initialization...');
|
76
|
+
return;
|
77
|
+
}
|
78
|
+
|
75
79
|
config.debug && console.log('CommandBar init...', { environment: opts.environment, version: opts.version });
|
76
80
|
|
77
81
|
getProxySDK()[_configuration] = {
|