amazon-connect-chatjs
Advanced tools
Comparing version 1.1.11 to 1.1.12
{ | ||
"name": "amazon-connect-chatjs", | ||
"version": "1.1.11", | ||
"version": "1.1.12", | ||
"main": "dist/amazon-connect-chat.js", | ||
@@ -53,5 +53,10 @@ "types": "src/index.d.ts", | ||
"collectCoverage": true, | ||
"collectCoverageFrom": [ | ||
"src/**/*.js" | ||
], | ||
"coverageReporters": [ | ||
"json", | ||
"html" | ||
"html", | ||
"cobertura", | ||
"lcov" | ||
] | ||
@@ -62,18 +67,17 @@ }, | ||
"devDependencies": { | ||
"@babel/core": "^7.15.5", | ||
"@babel/core": "^7.17.0", | ||
"@babel/preset-env": "^7.15.4", | ||
"babel-core": "^7.0.0-0", | ||
"babel-loader": "^8.2.3", | ||
"@babel/cli": "^7.17.6", | ||
"babel-loader": "^8.2.4", | ||
"eslint": "^8.9.0", | ||
"jest": "^27.4.7", | ||
"jest": "^27.5.1", | ||
"regenerator-runtime": "^0.13.9", | ||
"webpack": "^5.54.0", | ||
"webpack-cli": "^4.8.0", | ||
"webpack-dev-server": "^4.7.4", | ||
"webpack-dev-server": "^4.8.1", | ||
"typescript": "^4.4.2" | ||
}, | ||
"dependencies": { | ||
"sprintf-js": "^1.1.2", | ||
"@types/express-serve-static-core": "^4.17.21" | ||
"sprintf-js": "^1.1.2" | ||
} | ||
} |
@@ -37,7 +37,7 @@ # About | ||
# Importing using npm and ES6 | ||
### Importing using npm and ES6 | ||
`import "amazon-connect-chatjs"` | ||
Note: this will apply the global `connect` variable to your current scope. | ||
# Usage with TypeScript | ||
### Usage with TypeScript | ||
@@ -56,3 +56,3 @@ `amazon-connect-chatjs` is compatible with TypeScript. You'll need to use version `3.0.1` or higher: | ||
``` | ||
# Building | ||
### Building | ||
1. Install latest LTS version of [NodeJS](https://nodejs.org) | ||
@@ -87,3 +87,4 @@ 2. Checkout this package into workspace and navigate to root folder | ||
loggerConfig: { // optional, the logging configuration. If omitted, no logging occurs | ||
logger: { // optional, a logger object implementation | ||
// You can provide your own logger here, otherwise this property is optional | ||
customizedLogger: { | ||
debug: (msg) => console.debug(msg), // REQUIRED, can be any function | ||
@@ -94,3 +95,6 @@ info: (msg) => console.info(msg), // REQUIRED, can be any function | ||
}, | ||
level: connect.ChatSession.LogLevel.WARN, // optional, defaults to: `connect.ChatSession.LogLevel.INFO` | ||
// There are four levels available - DEBUG, INFO, WARN, ERROR. Default is INFO | ||
level: connect.LogLevel.INFO, | ||
// Choose if you want to use the default logger | ||
useDefaultLogger: true | ||
}, | ||
@@ -101,5 +105,12 @@ region: "us-east-1", // optional, defaults to: "us-west-2" | ||
Setup the global configuration to use. If this method is not called, the defaults of `loggerConfig` and `region` are used. | ||
Set the global configuration to use. If this method is not called, the defaults of `loggerConfig` and `region` are used. | ||
This method should be called before `connect.ChatSession.create()`. | ||
Customizing `loggerConfig` for ChatJS: | ||
- If you don't want to use any logger, you can skip this field. | ||
- There are four log levels available - DEBUG, INFO, WARN, ERROR. | ||
- If you want to use your own logger, you can add them into `customizedLogger`, and add `customizedLogger` object as the value of `loggerConfig.customizedLogger`, then set the lowest logger level. `globalConfig.loggerConfig.useDefaultLogger` is not required. | ||
- If you want to use the default logger provided by ChatJS, you can set the logger level, and set `useDefaultLogger` to true. `loggerConfig.customizedLogger` is not required. | ||
- If you not only provide your own logger, but also set `useDefaultLogger` to true, your own logger will be overwritten by the default logger. | ||
### `connect.ChatSession.create()` | ||
@@ -106,0 +117,0 @@ ```js |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1040453
1
8
1776
446
3
- Removed@types/express-serve-static-core@4.19.6(transitive)
- Removed@types/mime@1.3.5(transitive)
- Removed@types/node@22.13.4(transitive)
- Removed@types/qs@6.9.18(transitive)
- Removed@types/range-parser@1.2.7(transitive)
- Removed@types/send@0.17.4(transitive)
- Removedundici-types@6.20.0(transitive)