commandbar 1.6.2 → 1.6.5-alpha.1
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/commandbar-js/src/init.d.ts +5 -1
- package/build/internal/src/client/{Reporting.d.ts → AnalyticsEventTypes.d.ts} +1 -1
- package/build/internal/src/client/CommandBarClientSDK.d.ts +53 -6
- package/build/internal/src/client/CommandBarSDK.d.ts +7 -6
- package/build/internal/src/client/EventHandler.d.ts +19 -1
- package/build/internal/src/client/SDKConfig.d.ts +6 -0
- package/build/internal/src/client/globals.d.ts +18 -0
- package/build/internal/src/client/symbols.d.ts +1 -0
- package/build/internal/src/middleware/CommandFromClientV.d.ts +12 -5
- package/build/internal/src/middleware/OrganizationV.d.ts +58 -2
- package/build/internal/src/middleware/ResourceSettingsV.d.ts +8 -0
- package/build/internal/src/middleware/command.d.ts +2852 -0
- package/build/internal/src/middleware/commandCategory.d.ts +87 -0
- package/build/internal/src/middleware/context.d.ts +40 -0
- package/build/internal/src/middleware/environment.d.ts +11 -0
- package/build/internal/src/middleware/generics.d.ts +32 -0
- package/build/internal/src/middleware/guide.d.ts +37 -0
- package/build/internal/src/middleware/helpers/argument.d.ts +4 -4
- package/build/internal/src/middleware/helpers/endUser.d.ts +10 -0
- package/build/internal/src/middleware/helpers/rules.d.ts +154 -3
- package/build/internal/src/middleware/historyEvent.d.ts +40 -0
- package/build/internal/src/middleware/network.d.ts +4 -0
- package/build/internal/src/middleware/organization.d.ts +589 -0
- package/build/internal/src/middleware/placeholder.d.ts +47 -0
- package/build/internal/src/middleware/profile.d.ts +11 -0
- package/build/internal/src/middleware/releases.d.ts +261 -0
- package/build/internal/src/middleware/skin.d.ts +66 -0
- package/build/internal/src/middleware/types.d.ts +359 -0
- package/build/internal/src/middleware/user.d.ts +12 -0
- package/build/internal/src/util/LocalStorage.d.ts +6 -0
- package/build/internal/src/util/Logger.d.ts +18 -0
- package/build/internal/src/util/dispatchCustomEvent.d.ts +2 -0
- package/package.json +2 -2
- package/src/init.ts +12 -3
- package/src/snippet.ts +1 -1
@@ -0,0 +1,6 @@
|
|
1
|
+
declare const LocalStorage: {
|
2
|
+
set: (label: string, value: string | boolean | number) => string | number | boolean;
|
3
|
+
get: (label: string, defaultValue: string | boolean | number) => string | number | boolean;
|
4
|
+
remove: (label: string) => void;
|
5
|
+
};
|
6
|
+
export default LocalStorage;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import Debug from 'debug';
|
2
|
+
declare const Logger: {
|
3
|
+
debug: Debug.Debugger;
|
4
|
+
log: Debug.Debugger;
|
5
|
+
info: Debug.Debugger;
|
6
|
+
warn: Debug.Debugger;
|
7
|
+
error: Debug.Debugger;
|
8
|
+
red: (...args: any[]) => void;
|
9
|
+
green: (...args: any[]) => void;
|
10
|
+
blue: (...args: any[]) => void;
|
11
|
+
orange: (...args: any[]) => void;
|
12
|
+
yellow: (...args: any[]) => void;
|
13
|
+
purple: (...args: any[]) => void;
|
14
|
+
black: (...args: any[]) => void;
|
15
|
+
portalsend: (...args: any[]) => void;
|
16
|
+
portalreceive: (...args: any[]) => void;
|
17
|
+
};
|
18
|
+
export default Logger;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "commandbar",
|
3
|
-
"version": "1.6.
|
3
|
+
"version": "1.6.5-alpha.1",
|
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",
|
@@ -23,6 +23,6 @@
|
|
23
23
|
},
|
24
24
|
"devDependencies": {},
|
25
25
|
"peerDependencies": {
|
26
|
-
"@sentry/react": "6.
|
26
|
+
"@sentry/react": "6.19.7"
|
27
27
|
}
|
28
28
|
}
|
package/src/init.ts
CHANGED
@@ -3,9 +3,13 @@ import 'es6-object-assign/auto';
|
|
3
3
|
import 'es6-symbol/implement';
|
4
4
|
import { getProxySDK } from '../../internal/src/client/proxy';
|
5
5
|
import { _configuration } from '../../internal/src/client/symbols';
|
6
|
+
import { IConfigEndpointResponse } from '@commandbar/internal/middleware/types';
|
6
7
|
|
7
8
|
interface IInitOptions {
|
8
9
|
debug?: boolean;
|
10
|
+
environment?: string;
|
11
|
+
version?: string;
|
12
|
+
config?: IConfigEndpointResponse;
|
9
13
|
}
|
10
14
|
|
11
15
|
const getSrc = (org: string) => {
|
@@ -57,7 +61,7 @@ const DEFAULT_OPTS = { debug: false };
|
|
57
61
|
* finished loading yet.
|
58
62
|
*
|
59
63
|
* @param {string} org Your organization ID, which can be found [here](https://app.commandbar.com/docs/getting-started/installation#step-1:-install-commandbar).
|
60
|
-
* @param {IInitOptions} [opts] Additional options to use for initialization: `debug` will enable additional logging
|
64
|
+
* @param {IInitOptions} [opts] Additional options to use for initialization: `debug` will enable additional logging, `environment` specifies the environment to load config from
|
61
65
|
* output.
|
62
66
|
*/
|
63
67
|
const init = (org: string, opts: IInitOptions = DEFAULT_OPTS) => {
|
@@ -68,9 +72,14 @@ const init = (org: string, opts: IInitOptions = DEFAULT_OPTS) => {
|
|
68
72
|
return;
|
69
73
|
}
|
70
74
|
|
71
|
-
config.debug && console.log('CommandBar init...');
|
75
|
+
config.debug && console.log('CommandBar init...', { environment: opts.environment, version: opts.version });
|
72
76
|
|
73
|
-
getProxySDK()[_configuration] = {
|
77
|
+
getProxySDK()[_configuration] = {
|
78
|
+
uuid: org,
|
79
|
+
environment: opts.environment,
|
80
|
+
version: opts.version,
|
81
|
+
config: opts.config,
|
82
|
+
};
|
74
83
|
loadLatest(org);
|
75
84
|
};
|
76
85
|
|