Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: environment mode #43

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
58a4128
Add: environment mode
Jan 21, 2022
faf3457
added: dialers module
Jloykrolik Mar 14, 2022
bd351ea
changed: npm version
Jloykrolik Mar 14, 2022
9025829
updated: default config
Jloykrolik Mar 14, 2022
e846b6a
updated: handler store
Jloykrolik Mar 14, 2022
f8f3fd2
updated: dialers vuex file
Jloykrolik Mar 14, 2022
de1d74e
updated: build folder
Jloykrolik Mar 14, 2022
3247baa
updated: dialer store
Jloykrolik Mar 15, 2022
3c34333
Update: add ability to load socket library using external function
Mar 21, 2022
58ec2b5
Merge branch 'module_dialers' into compatibility_mode
Jloykrolik Mar 28, 2022
c13945c
merged with module_dialers
Jloykrolik Mar 28, 2022
80fae24
Fix: get tabs session logic
Apr 1, 2022
d74609b
Update: version
Apr 1, 2022
be62a2e
updated: updating dialers logic in handlerStoreEvents
Jloykrolik Apr 3, 2022
2ed24b8
updated: dialer store
Jloykrolik Apr 4, 2022
984a0d7
updated: logic of updating dialers
Jloykrolik Apr 5, 2022
d74aaf1
updated: dialer event
Jloykrolik Apr 6, 2022
cfded36
fixed window is not defined for chrome extension
May 23, 2022
468d098
update: socket fixes
Jun 6, 2022
66dd882
update: added missing log
Jun 10, 2022
7f71e92
added new sdk build for usage in chrome extensions
Jul 14, 2022
9c8d6fc
added log types, removed comments
Jul 15, 2022
f16c122
Merge pull request #45 from VoicenterTeam/compatibility_mode_fixes
Regani Jul 19, 2022
f582395
added possibility to use specific socket version
Jul 19, 2022
12a4a42
Update: logger version
Jul 19, 2022
e999af7
Merge pull request #47 from VoicenterTeam/compatibility_mode_fixes
SerhiiKun Jul 19, 2022
043f8c3
updated docs
Jul 19, 2022
7eac228
Merge pull request #48 from VoicenterTeam/compatibility_mode_fixes
SerhiiKun Jul 19, 2022
29d88d2
updated logger version
Apr 14, 2023
0fc12fc
Fix: max timout value
Regani Oct 5, 2023
f9cb073
Update: build
Regani Oct 5, 2023
e633580
Add: build
Regani Oct 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ The SDK constructor accepts multiple options when initializing which can be used

| Option | Type | Default | Description |
|-----------|---------------|---------------|---------------|
| environment | String | browser | Could be 'browser'/'chrome_extension' |
| token | String | Null | Monitor code token to use for login |
| user | String | Can be used to login with "user" or "account" login type | |
| password | String | Used for login with "user" or "account" login type. Must be used together with user property | |
Expand All @@ -117,6 +118,11 @@ The SDK constructor accepts multiple options when initializing which can be used
| store | object | Vuex store to use in order to register an extensions module. This should simplify the end usage of the SDK | |
| extensionsModuleName | string | Vuex store extension module name. Defaults to `sdkExtensions` | |
| queuesModuleName | string | Vuex store queue module name. Defaults to `sdkQueues` | |
| useLogger | boolean | `false` | Determines if the SDK will use logger
| loggerSocketConnection | socketIo | `null` | Socket connection which will be used by logger
| loggerServer | string | `http://127.0.0.1:3000/` | Server url which logger uses to send logs to
| loggerConfig | object | `{ logToConsole: true, overloadGlobalConsole: false, namespace: "events-sdk",socketEmitInterval: 10000}` | Logger options
| loggerConnectOptions | object | `{ reconnection: true, reconnectionDelay: 5000, reconnectionAttempts: 10, perMessageDeflate: false, upgrade: false, transports: ['websocket'], debug: false}` | Logger's socket connect options

Servers array format
```js
Expand Down
14 changes: 10 additions & 4 deletions bili.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
function getDistName (input) {
return input.includes('extension-sdk') ? 'ext-voicenter-events-sdk': 'voicenter-events-sdk'
}

module.exports = {
input: 'src/index.js',
input: ["src/versions/sdk.js", "src/versions/extension-sdk.js"],
presets: ['bili/babel'],
output: {
format: ['esm', 'cjs', 'umd-min'],
moduleName: 'VoicenterEventsSDK',
fileName({ format }) {
return `voicenter-events-sdk.${format}.js`
}
},
extendRollupConfig: config => {
const distName = getDistName(config.inputConfig.input[0])
config.outputConfig.entryFileNames = `${distName}.${config.outputConfig.format}.js`
return config
},
externals: ['socket.io-client', 'socket.io-client/socket.io'],
globals: {
Expand Down
Loading