diff --git a/README.md b/README.md index 7b2d3de0..945f7bf4 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ For direct use in a browser script: ```{"language":"html"} - + diff --git a/build/README.md b/build/README.md index 7b2d3de0..945f7bf4 100644 --- a/build/README.md +++ b/build/README.md @@ -28,7 +28,7 @@ For direct use in a browser script: ```{"language":"html"} - + diff --git a/build/dist/node/purecloud-guest-chat-client.js b/build/dist/node/purecloud-guest-chat-client.js index d80a6802..c5832a23 100644 --- a/build/dist/node/purecloud-guest-chat-client.js +++ b/build/dist/node/purecloud-guest-chat-client.js @@ -14,7 +14,7 @@ var PureCloudRegionHosts = { /** * @module purecloud-guest-chat-client/ApiClient - * @version 5.0.2 + * @version 5.1.0 */ class ApiClient { /** @@ -541,7 +541,7 @@ class ApiClient { // set header parameters request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - //request.set({ 'purecloud-sdk': '5.0.2' }); + //request.set({ 'purecloud-sdk': '5.1.0' }); // set request timeout request.timeout(this.timeout); @@ -666,7 +666,7 @@ class WebChatApi { /** * WebChat service. * @module purecloud-guest-chat-client/api/WebChatApi - * @version 5.0.2 + * @version 5.1.0 */ /** @@ -1045,7 +1045,7 @@ class WebChatApi { * *
* @module purecloud-guest-chat-client/index - * @version 5.0.2 + * @version 5.1.0 */ class platformClient { constructor() { diff --git a/build/dist/web-amd/purecloud-guest-chat-client.js b/build/dist/web-amd/purecloud-guest-chat-client.js index 7036de85..5c0a41f7 100644 --- a/build/dist/web-amd/purecloud-guest-chat-client.js +++ b/build/dist/web-amd/purecloud-guest-chat-client.js @@ -12,7 +12,7 @@ define(['superagent'], function (superagent) { 'use strict'; /** * @module purecloud-guest-chat-client/ApiClient - * @version 5.0.2 + * @version 5.1.0 */ class ApiClient { /** @@ -539,7 +539,7 @@ define(['superagent'], function (superagent) { 'use strict'; // set header parameters request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - //request.set({ 'purecloud-sdk': '5.0.2' }); + //request.set({ 'purecloud-sdk': '5.1.0' }); // set request timeout request.timeout(this.timeout); @@ -664,7 +664,7 @@ define(['superagent'], function (superagent) { 'use strict'; /** * WebChat service. * @module purecloud-guest-chat-client/api/WebChatApi - * @version 5.0.2 + * @version 5.1.0 */ /** @@ -1043,7 +1043,7 @@ define(['superagent'], function (superagent) { 'use strict'; * * * @module purecloud-guest-chat-client/index - * @version 5.0.2 + * @version 5.1.0 */ class platformClient { constructor() { diff --git a/build/dist/web-cjs/bundle.js b/build/dist/web-cjs/bundle.js index d5acc1e5..3bedec3e 100644 --- a/build/dist/web-cjs/bundle.js +++ b/build/dist/web-cjs/bundle.js @@ -1979,7 +1979,7 @@ function isSlowBuffer (obj) { /** * @module purecloud-guest-chat-client/ApiClient - * @version 5.0.2 + * @version 5.1.0 */ class ApiClient { /** @@ -2506,7 +2506,7 @@ class ApiClient { // set header parameters request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - //request.set({ 'purecloud-sdk': '5.0.2' }); + //request.set({ 'purecloud-sdk': '5.1.0' }); // set request timeout request.timeout(this.timeout); @@ -2631,7 +2631,7 @@ class WebChatApi { /** * WebChat service. * @module purecloud-guest-chat-client/api/WebChatApi - * @version 5.0.2 + * @version 5.1.0 */ /** @@ -3010,7 +3010,7 @@ class WebChatApi { * * * @module purecloud-guest-chat-client/index - * @version 5.0.2 + * @version 5.1.0 */ class platformClient { constructor() { diff --git a/build/dist/web-cjs/purecloud-guest-chat-client.js b/build/dist/web-cjs/purecloud-guest-chat-client.js index e767853b..9c05a258 100644 --- a/build/dist/web-cjs/purecloud-guest-chat-client.js +++ b/build/dist/web-cjs/purecloud-guest-chat-client.js @@ -68,7 +68,8 @@ function toByteArray (b64) { ? validLen - 4 : validLen - for (var i = 0; i < len; i += 4) { + var i + for (i = 0; i < len; i += 4) { tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | @@ -167,6 +168,10 @@ function fromByteArray (uint8) { var base64 = require('base64-js') var ieee754 = require('ieee754') +var customInspectSymbol = + (typeof Symbol === 'function' && typeof Symbol.for === 'function') + ? Symbol.for('nodejs.util.inspect.custom') + : null exports.Buffer = Buffer exports.SlowBuffer = SlowBuffer @@ -203,7 +208,9 @@ function typedArraySupport () { // Can typed array instances can be augmented? try { var arr = new Uint8Array(1) - arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } + var proto = { foo: function () { return 42 } } + Object.setPrototypeOf(proto, Uint8Array.prototype) + Object.setPrototypeOf(arr, proto) return arr.foo() === 42 } catch (e) { return false @@ -232,7 +239,7 @@ function createBuffer (length) { } // Return an augmented `Uint8Array` instance var buf = new Uint8Array(length) - buf.__proto__ = Buffer.prototype + Object.setPrototypeOf(buf, Buffer.prototype) return buf } @@ -282,7 +289,7 @@ function from (value, encodingOrOffset, length) { } if (value == null) { - throw TypeError( + throw new TypeError( 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + (typeof value) ) @@ -334,8 +341,8 @@ Buffer.from = function (value, encodingOrOffset, length) { // Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: // https://github.com/feross/buffer/pull/148 -Buffer.prototype.__proto__ = Uint8Array.prototype -Buffer.__proto__ = Uint8Array +Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype) +Object.setPrototypeOf(Buffer, Uint8Array) function assertSize (size) { if (typeof size !== 'number') { @@ -439,7 +446,8 @@ function fromArrayBuffer (array, byteOffset, length) { } // Return an augmented `Uint8Array` instance - buf.__proto__ = Buffer.prototype + Object.setPrototypeOf(buf, Buffer.prototype) + return buf } @@ -761,6 +769,9 @@ Buffer.prototype.inspect = function inspect () { if (this.length > max) str += ' ... ' return '