amazon-ivs-chat-messaging
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -15,8 +15,8 @@ "use strict"; | ||
const errors_1 = require("./errors"); | ||
const EventEmitter_1 = require("./EventEmitter"); | ||
const logging_1 = require("./logging"); | ||
const EventEmitter_1 = require("./EventEmitter"); | ||
const deserialize_1 = require("./utils/deserialize"); | ||
const serialize_1 = require("./utils/serialize"); | ||
const url_1 = require("./utils/url"); | ||
const validate_1 = require("./utils/validate"); | ||
const url_1 = require("./utils/url"); | ||
/** | ||
@@ -58,3 +58,5 @@ * Represents IVS chat room connection. | ||
// Abnormal socket termination is reported by `close` event in tests | ||
if (!event.wasClean) { | ||
// Workaround: Firefox incorrectly reports `wasClean === false` for clean close with close code 1000 | ||
const isCleanClose = event.wasClean || event.code === 1000; | ||
if (!isCleanClose) { | ||
this.onError(event); | ||
@@ -61,0 +63,0 @@ return; |
@@ -12,8 +12,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
import { chatErrorCodes } from './errors'; | ||
import { EventEmitter } from './EventEmitter'; | ||
import { ConsoleLogger } from './logging'; | ||
import { EventEmitter } from './EventEmitter'; | ||
import { parseChatError, parseChatEvent, parseChatMessage, parseDeleteMessageEvent, parseDisconnectUserEvent, parseObject, } from './utils/deserialize'; | ||
import { serializeRequest } from './utils/serialize'; | ||
import { makeWebSocketUrl } from './utils/url'; | ||
import { validateToken } from './utils/validate'; | ||
import { makeWebSocketUrl } from './utils/url'; | ||
/** | ||
@@ -55,3 +55,5 @@ * Represents IVS chat room connection. | ||
// Abnormal socket termination is reported by `close` event in tests | ||
if (!event.wasClean) { | ||
// Workaround: Firefox incorrectly reports `wasClean === false` for clean close with close code 1000 | ||
const isCleanClose = event.wasClean || event.code === 1000; | ||
if (!isCleanClose) { | ||
this.onError(event); | ||
@@ -58,0 +60,0 @@ return; |
@@ -1,6 +0,6 @@ | ||
import { ChatLogLevel, ChatLogger } from './logging'; | ||
import { ChatRoomListenerMap } from './events'; | ||
import { SendMessageRequest } from './requests/SendMessageRequest'; | ||
import { ChatLogger, ChatLogLevel } from './logging'; | ||
import { DeleteMessageRequest } from './requests/DeleteMessageRequest'; | ||
import { DisconnectUserRequest } from './requests/DisconnectUserRequest'; | ||
import { SendMessageRequest } from './requests/SendMessageRequest'; | ||
import { ChatMessage, ChatTokenProvider, ConnectionState, DeleteMessageEvent, DisconnectUserEvent } from './types'; | ||
@@ -7,0 +7,0 @@ /** Configuration options accepted by {@link ChatRoom} constructor. */ |
{ | ||
"name": "amazon-ivs-chat-messaging", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"main": "dist/esm/index.js", | ||
"types": "dist/types/index.d.ts", | ||
"author": "mateuswk@justin.tv", | ||
"contributors": [ | ||
"Maciej Jastrzębski <maciej.jastrzebski@callstack.com>", | ||
"Arkadiusz Chrabąszczewski <arkadiusz.chrabaszczewski@callstack.com>", | ||
"Mateusz Kosoń <mateusz.koson@callstack.com>" | ||
], | ||
"license": "SEE LICENSE IN https://ivschat.live-video.net/js/LICENSE.txt", | ||
"private": false, | ||
"files": [ | ||
@@ -10,0 +13,0 @@ "dist", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
187150
87
2240
1