@@ -1052,7 +1052,7 @@ window.Pusher = __webpack_require__(36);
10521052
10531053window.Echo = new __WEBPACK_IMPORTED_MODULE_0_laravel_echo___default.a({
10541054 broadcaster: 'pusher',
1055- key: '24828cfb3418ebc5ed17 ',
1055+ key: '51aaa8133b2080a29f6d ',
10561056 cluster: 'mt1',
10571057 encrypted: true
10581058});
@@ -31921,7 +31921,7 @@ var Connector = function () {
3192131921 key: 'csrfToken',
3192231922 value: function csrfToken() {
3192331923 var selector = void 0;
31924- if (window && window['Laravel'] && window['Laravel'].csrfToken) {
31924+ if (typeof window !== 'undefined' && window['Laravel'] && window['Laravel'].csrfToken) {
3192531925 return window['Laravel'].csrfToken;
3192631926 } else if (this.options.csrfToken) {
3192731927 return this.options.csrfToken;
@@ -32336,9 +32336,21 @@ var SocketIoConnector = function (_Connector) {
3233632336 createClass(SocketIoConnector, [{
3233732337 key: 'connect',
3233832338 value: function connect() {
32339+ var io = this.getSocketIO();
3233932340 this.socket = io(this.options.host, this.options);
3234032341 return this.socket;
3234132342 }
32343+ }, {
32344+ key: 'getSocketIO',
32345+ value: function getSocketIO() {
32346+ if (typeof io !== 'undefined') {
32347+ return io;
32348+ }
32349+ if (this.options.client !== 'undefined') {
32350+ return this.options.client;
32351+ }
32352+ throw new Error('Socket.io client not found. Should be globally available or passed via options.client');
32353+ }
3234232354 }, {
3234332355 key: 'listen',
3234432356 value: function listen(name, event, callback) {
@@ -32501,7 +32513,7 @@ module.exports = Echo;
3250132513/***/ (function(module, exports, __webpack_require__) {
3250232514
3250332515/*!
32504- * Pusher JavaScript Library v4.2.1
32516+ * Pusher JavaScript Library v4.2.2
3250532517 * https://pusher.com/
3250632518 *
3250732519 * Copyright 2017, Pusher
@@ -32591,7 +32603,7 @@ return /******/ (function(modules) { // webpackBootstrap
3259132603 var _this = this;
3259232604 checkAppKey(app_key);
3259332605 options = options || {};
32594- if (!options.cluster) {
32606+ if (!options.cluster && !(options.wsHost || options.httpHost) ) {
3259532607 var suffix = url_store_1["default"].buildLogSuffix("javascriptQuickStart");
3259632608 logger_1["default"].warn("You should always specify a cluster when connecting. " + suffix);
3259732609 }
@@ -32978,11 +32990,12 @@ return /******/ (function(modules) { // webpackBootstrap
3297832990
3297932991 "use strict";
3298032992 var Defaults = {
32981- VERSION: "4.2.1 ",
32993+ VERSION: "4.2.2 ",
3298232994 PROTOCOL: 7,
3298332995 host: 'ws.pusherapp.com',
3298432996 ws_port: 80,
3298532997 wss_port: 443,
32998+ ws_path: '',
3298632999 sockjs_host: 'sockjs.pusher.com',
3298733000 sockjs_http_port: 80,
3298833001 sockjs_https_port: 443,
@@ -33131,17 +33144,17 @@ return /******/ (function(modules) { // webpackBootstrap
3313133144 args[_i - 0] = arguments[_i];
3313233145 }
3313333146 var message = collections_1.stringify.apply(this, arguments);
33134- if ((window).console) {
33147+ if (pusher_1["default"].log) {
33148+ pusher_1["default"].log(message);
33149+ }
33150+ else if ((window).console) {
3313533151 if ((window).console.warn) {
3313633152 (window).console.warn(message);
3313733153 }
3313833154 else if ((window).console.log) {
3313933155 (window).console.log(message);
3314033156 }
3314133157 }
33142- if (pusher_1["default"].log) {
33143- pusher_1["default"].log(message);
33144- }
3314533158 }
3314633159 };
3314733160 exports.__esModule = true;
@@ -33841,7 +33854,8 @@ return /******/ (function(modules) { // webpackBootstrap
3384133854 }
3384233855 exports.ws = {
3384333856 getInitial: function (key, params) {
33844- return getGenericURL("ws", params, getGenericPath(key, "flash=false"));
33857+ var path = (params.httpPath || "") + getGenericPath(key, "flash=false");
33858+ return getGenericURL("ws", params, path);
3384533859 }
3384633860 };
3384733861 exports.http = {
@@ -34227,7 +34241,8 @@ return /******/ (function(modules) { // webpackBootstrap
3422734241 return [
3422834242 [":def", "ws_options", {
3422934243 hostUnencrypted: config.wsHost + ":" + config.wsPort,
34230- hostEncrypted: config.wsHost + ":" + config.wssPort
34244+ hostEncrypted: config.wsHost + ":" + config.wssPort,
34245+ httpPath: config.wsPath
3423134246 }],
3423234247 [":def", "wss_options", [":extend", ":ws_options", {
3423334248 encrypted: true
@@ -36655,6 +36670,7 @@ return /******/ (function(modules) { // webpackBootstrap
3665536670 wsHost: defaults_1["default"].host,
3665636671 wsPort: defaults_1["default"].ws_port,
3665736672 wssPort: defaults_1["default"].wss_port,
36673+ wsPath: defaults_1["default"].ws_path,
3665836674 httpHost: defaults_1["default"].sockjs_host,
3665936675 httpPort: defaults_1["default"].sockjs_http_port,
3666036676 httpsPort: defaults_1["default"].sockjs_https_port,
0 commit comments