django-channels
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -8,4 +8,4 @@ parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"QVnC":[function(require,module,exports) { | ||
},{}],"Focm":[function(require,module,exports) { | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebSocketBridge=exports.Stream=void 0,require("regenerator-runtime/runtime");var e=require("event-target-shim"),t=n(require("reconnecting-websocket"));function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(n,!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function f(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?p(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(t){function n(){var e;return a(this,n),(e=f(this,d(n).call(this))).forwardEvent=e.forwardEvent.bind(p(e)),e}return l(n,e.EventTarget),u(n,[{key:"forwardEvent",value:function(e){this.dispatchEvent(e)}}]),n}(),h=function(e){function t(e,n){var r;return a(this,t),(r=f(this,d(t).call(this))).name=e,r.socket=n,r.handleMessage=r.handleMessage.bind(p(r)),r.socket.addEventListener("message",r.handleMessage),r.socket.addEventListener("open",r.forwardEvent),r.socket.addEventListener("close",r.forwardEvent),r.socket.addEventListener("error",r.forwardEvent),r}return l(t,y),u(t,[{key:"handleMessage",value:function(e){var t=JSON.parse(e.data);if(t.stream===this.name){var n=new MessageEvent("message",{data:t.payload,origin:this.name});this.dispatchEvent(n)}}},{key:"send",value:function(e){var t={stream:this.name,payload:e};this.socket.send(JSON.stringify(t))}}]),t}();exports.Stream=h,(0,e.defineEventAttribute)(h.prototype,"open"),(0,e.defineEventAttribute)(h.prototype,"close"),(0,e.defineEventAttribute)(h.prototype,"error"),(0,e.defineEventAttribute)(h.prototype,"message");var b=function(e){function n(e){var t;return a(this,n),(t=f(this,d(n).call(this))).socket=null,t.streams={},t.options=o({},e),t.handleMessage=t.handleMessage.bind(p(t)),t}return l(n,y),u(n,[{key:"connect",value:function(e,n,r){var o,i="https:"===window.location.protocol?"wss":"ws",s="".concat(i,"://").concat(window.location.host);o=void 0===e?s:"/"==e[0]?"".concat(s).concat(e):e,this.socket=new t.default(o,n,r),this.socket.addEventListener("open",this.forwardEvent),this.socket.addEventListener("close",this.forwardEvent),this.socket.addEventListener("error",this.forwardEvent),this.socket.addEventListener("message",this.handleMessage)}},{key:"handleMessage",value:function(e){var t=JSON.parse(e.data);if(void 0===t.stream){var n=new MessageEvent("message",{data:t,origin:""});this.dispatchEvent(n)}}},{key:"demultiplex",value:function(e,t){this.stream(e).addEventListener("message",t)}},{key:"send",value:function(e){this.socket.send(JSON.stringify(e))}},{key:"stream",value:function(e){var t;return void 0!==this.streams[e]?t=this.streams[e]:(t=new h(e,this.socket),this.streams[e]=t),t}}]),n}();exports.WebSocketBridge=b,(0,e.defineEventAttribute)(b.prototype,"open"),(0,e.defineEventAttribute)(b.prototype,"close"),(0,e.defineEventAttribute)(b.prototype,"error"),(0,e.defineEventAttribute)(b.prototype,"message"); | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebSocketBridge=exports.Stream=void 0,require("regenerator-runtime/runtime");var e=require("event-target-shim"),t=n(require("reconnecting-websocket"));function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function f(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?p(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(t){function n(){var e;return a(this,n),(e=f(this,d(n).call(this))).forwardEvent=e.forwardEvent.bind(p(e)),e}return l(n,e.EventTarget),u(n,[{key:"forwardEvent",value:function(e){this.dispatchEvent(e)}}]),n}(),h=function(e){function t(e,n){var r;return a(this,t),(r=f(this,d(t).call(this))).name=e,r.socket=n,r.handleMessage=r.handleMessage.bind(p(r)),r.socket.addEventListener("message",r.handleMessage),r.socket.addEventListener("open",r.forwardEvent),r.socket.addEventListener("close",r.forwardEvent),r.socket.addEventListener("error",r.forwardEvent),r}return l(t,y),u(t,[{key:"handleMessage",value:function(e){var t=JSON.parse(e.data);if(t.stream===this.name){var n=new MessageEvent("message",{data:t.payload,origin:this.name});this.dispatchEvent(n)}}},{key:"send",value:function(e){var t={stream:this.name,payload:e};this.socket.send(JSON.stringify(t))}}]),t}();exports.Stream=h,(0,e.defineEventAttribute)(h.prototype,"open"),(0,e.defineEventAttribute)(h.prototype,"close"),(0,e.defineEventAttribute)(h.prototype,"error"),(0,e.defineEventAttribute)(h.prototype,"message");var b=function(e){function n(e){var t;return a(this,n),(t=f(this,d(n).call(this))).socket=null,t.streams={},t.options=o({},e),t.handleMessage=t.handleMessage.bind(p(t)),t}return l(n,y),u(n,[{key:"connect",value:function(e,n,r){var o,i="https:"===window.location.protocol?"wss":"ws",s="".concat(i,"://").concat(window.location.host);o=void 0===e?s:"/"==e[0]?"".concat(s).concat(e):e,this.socket=new t.default(o,n,r),this.socket.addEventListener("open",this.forwardEvent),this.socket.addEventListener("close",this.forwardEvent),this.socket.addEventListener("error",this.forwardEvent),this.socket.addEventListener("message",this.handleMessage)}},{key:"handleMessage",value:function(e){var t=JSON.parse(e.data);if(void 0===t.stream){var n=new MessageEvent("message",{data:t,origin:""});this.dispatchEvent(n)}}},{key:"demultiplex",value:function(e,t){this.stream(e).addEventListener("message",t)}},{key:"send",value:function(e){this.socket.send(JSON.stringify(e))}},{key:"stream",value:function(e){var t;return void 0!==this.streams[e]?t=this.streams[e]:(t=new h(e,this.socket),this.streams[e]=t),t}}]),n}();exports.WebSocketBridge=b,(0,e.defineEventAttribute)(b.prototype,"open"),(0,e.defineEventAttribute)(b.prototype,"close"),(0,e.defineEventAttribute)(b.prototype,"error"),(0,e.defineEventAttribute)(b.prototype,"message"); | ||
},{"regenerator-runtime/runtime":"QVnC","event-target-shim":"w7m6","reconnecting-websocket":"Oeha"}]},{},["Focm"], null) | ||
//# sourceMappingURL=/index.js.map |
{ | ||
"name": "django-channels", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "", | ||
@@ -41,7 +41,7 @@ "repository": { | ||
"devDependencies": { | ||
"@babel/core": "^7.6.2", | ||
"@babel/plugin-proposal-class-properties": "^7.5.5", | ||
"@babel/core": "^7.7.7", | ||
"@babel/plugin-proposal-class-properties": "^7.7.4", | ||
"@babel/plugin-transform-async-to-generator": "^7.5.0", | ||
"@babel/plugin-transform-runtime": "^7.5.5", | ||
"@babel/preset-env": "^7.6.2", | ||
"@babel/preset-env": "^7.7.7", | ||
"esdoc": "^1.1.0", | ||
@@ -48,0 +48,0 @@ "esdoc-ecmascript-proposal-plugin": "^1.0.0", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
134128