mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 11:52:01 +00:00
update-sockjs: Update sockjs from version 0.3.4 to 1.1.1.
- Add browserify to npm dependencies. - Add SockJS-client to npm dependencies. - Add npm postinstall script to generate browser version of SockJS-client from npm package. - Change deprecated SockJS object property 'protocol_whitelist' to 'transports'. - Fix settings.
This commit is contained in:
@@ -175,11 +175,6 @@ Files: static/third/string-prototype-codepointat/*
|
|||||||
Copyright: 2014 Mathias Bynens
|
Copyright: 2014 Mathias Bynens
|
||||||
License: Expat
|
License: Expat
|
||||||
|
|
||||||
Files: static/third/sockjs/sockjs-0.3.4.js
|
|
||||||
Copyright: 2011-2012 VMware, Inc.
|
|
||||||
2012 Douglas Crockford
|
|
||||||
License: Expat and public-domain
|
|
||||||
|
|
||||||
Files: static/third/sorttable/sorttable.js
|
Files: static/third/sorttable/sorttable.js
|
||||||
Copyright: 2007 Stuart Langridge
|
Copyright: 2007 Stuart Langridge
|
||||||
License: X11
|
License: X11
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"main": "",
|
"main": "",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"browserify": "13.1.1",
|
||||||
"handlebars": "1.3.0",
|
"handlebars": "1.3.0",
|
||||||
"i18next": "3.0.0",
|
"i18next": "3.0.0",
|
||||||
"i18next-parser": "0.7.0",
|
"i18next-parser": "0.7.0",
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
"i18next-localstorage-cache": "0.3.0",
|
"i18next-localstorage-cache": "0.3.0",
|
||||||
"jquery": "1.12.1",
|
"jquery": "1.12.1",
|
||||||
"jquery-validation": "1.15.1",
|
"jquery-validation": "1.15.1",
|
||||||
|
"sockjs-client":"1.1.1",
|
||||||
"webpack": "1.12.2"
|
"webpack": "1.12.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -28,6 +30,7 @@
|
|||||||
"xmlhttprequest": "1.5.0"
|
"xmlhttprequest": "1.5.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"postinstall": "browserify node_modules/sockjs-client/lib/entry.js --standalone SockJS > node_modules/sockjs-client/sockjs.js",
|
||||||
"lint": "eslint --quiet",
|
"lint": "eslint --quiet",
|
||||||
"lint-loud": "eslint static/js frontend_tests"
|
"lint-loud": "eslint static/js frontend_tests"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ function Socket(url) {
|
|||||||
|
|
||||||
Socket.prototype = {
|
Socket.prototype = {
|
||||||
_create_sockjs_object: function Socket__create_sockjs_object() {
|
_create_sockjs_object: function Socket__create_sockjs_object() {
|
||||||
this._sockjs = new SockJS(this.url, null, {protocols_whitelist: this._supported_protocols});
|
this._sockjs = new SockJS(this.url, null, {transports: this._supported_protocols});
|
||||||
this._setup_sockjs_callbacks(this._sockjs);
|
this._setup_sockjs_callbacks(this._sockjs);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -305,7 +305,7 @@ def respond_send_message(data):
|
|||||||
# securely send us the zulip.com cookie, which we use as part of our
|
# securely send us the zulip.com cookie, which we use as part of our
|
||||||
# authentication scheme.
|
# authentication scheme.
|
||||||
sockjs_router = sockjs.tornado.SockJSRouter(SocketConnection, "/sockjs",
|
sockjs_router = sockjs.tornado.SockJSRouter(SocketConnection, "/sockjs",
|
||||||
{'sockjs_url': 'https://%s/static/third/sockjs/sockjs-0.3.4.js' % (
|
{'sockjs_url': 'https://%s/node_modules/sockjs-client/sockjs.js' % (
|
||||||
settings.EXTERNAL_HOST,),
|
settings.EXTERNAL_HOST,),
|
||||||
'disabled_transports': ['eventsource', 'htmlfile']})
|
'disabled_transports': ['eventsource', 'htmlfile']})
|
||||||
def get_sockjs_router():
|
def get_sockjs_router():
|
||||||
|
|||||||
@@ -709,7 +709,6 @@ PIPELINE = {
|
|||||||
},
|
},
|
||||||
'JAVASCRIPT': {},
|
'JAVASCRIPT': {},
|
||||||
}
|
}
|
||||||
|
|
||||||
JS_SPECS = {
|
JS_SPECS = {
|
||||||
'common': {
|
'common': {
|
||||||
'source_filenames': (
|
'source_filenames': (
|
||||||
@@ -741,6 +740,7 @@ JS_SPECS = {
|
|||||||
'third/bootstrap-notify/js/bootstrap-notify.js',
|
'third/bootstrap-notify/js/bootstrap-notify.js',
|
||||||
'third/html5-formdata/formdata.js',
|
'third/html5-formdata/formdata.js',
|
||||||
'node_modules/jquery-validation/dist/jquery.validate.js',
|
'node_modules/jquery-validation/dist/jquery.validate.js',
|
||||||
|
'node_modules/sockjs-client/sockjs.js',
|
||||||
'third/jquery-form/jquery.form.js',
|
'third/jquery-form/jquery.form.js',
|
||||||
'third/jquery-filedrop/jquery.filedrop.js',
|
'third/jquery-filedrop/jquery.filedrop.js',
|
||||||
'third/jquery-caret/jquery.caret.1.5.2.js',
|
'third/jquery-caret/jquery.caret.1.5.2.js',
|
||||||
@@ -755,7 +755,6 @@ JS_SPECS = {
|
|||||||
'third/spectrum/spectrum.js',
|
'third/spectrum/spectrum.js',
|
||||||
'third/string-prototype-codepointat/codepointat.js',
|
'third/string-prototype-codepointat/codepointat.js',
|
||||||
'third/winchan/winchan.js',
|
'third/winchan/winchan.js',
|
||||||
'third/sockjs/sockjs-0.3.4.js',
|
|
||||||
'third/handlebars/handlebars.runtime.js',
|
'third/handlebars/handlebars.runtime.js',
|
||||||
'third/marked/lib/marked.js',
|
'third/marked/lib/marked.js',
|
||||||
'templates/compiled.js',
|
'templates/compiled.js',
|
||||||
@@ -842,8 +841,8 @@ JS_SPECS = {
|
|||||||
},
|
},
|
||||||
# We also want to minify sockjs separately for the sockjs iframe transport
|
# We also want to minify sockjs separately for the sockjs iframe transport
|
||||||
'sockjs': {
|
'sockjs': {
|
||||||
'source_filenames': ('third/sockjs/sockjs-0.3.4.js',),
|
'source_filenames': ('node_modules/sockjs-client/sockjs.js',),
|
||||||
'output_filename': 'min/sockjs-0.3.4.min.js'
|
'output_filename': 'min/sockjs.min.js'
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user