pusher-js 8.4.0 → 8.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +23 -31
- package/.github/workflows/run-tests.yml +0 -2
- package/CHANGELOG.md +13 -0
- package/integration_tests_server/package-lock.json +564 -245
- package/integration_tests_server/package.json +1 -1
- package/package.json +17 -1
- package/spec/config/karma/config.ci.js +18 -18
- package/src/runtimes/web/dom/sockjs/COPYING +0 -11
- package/src/runtimes/web/dom/sockjs/Changelog +0 -147
- package/src/runtimes/web/dom/sockjs/LICENSE-MIT-SockJS +0 -19
- package/src/runtimes/web/dom/sockjs/Makefile +0 -109
- package/src/runtimes/web/dom/sockjs/README.md +0 -388
- package/src/runtimes/web/dom/sockjs/VERSION-GEN +0 -17
- package/src/runtimes/web/dom/sockjs/bin/render.coffee +0 -111
- package/src/runtimes/web/dom/sockjs/bin/run_testling.sh +0 -135
- package/src/runtimes/web/dom/sockjs/package.json +0 -18
- package/src/runtimes/web/dom/sockjs/version +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pusher-js",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.3",
|
|
4
4
|
"description": "Pusher Channels JavaScript library for browsers, React Native, NodeJS and web workers",
|
|
5
5
|
"main": "dist/node/pusher.js",
|
|
6
6
|
"browser": "dist/web/pusher.js",
|
|
@@ -66,5 +66,21 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"tweetnacl": "^1.0.3"
|
|
69
|
+
},
|
|
70
|
+
"overrides": {
|
|
71
|
+
"body-parser": "^1.20.3",
|
|
72
|
+
"browserstack-local": "^1.5.12",
|
|
73
|
+
"cipher-base": "^1.0.6",
|
|
74
|
+
"compression": "^1.8.1",
|
|
75
|
+
"express": "^4.22.1",
|
|
76
|
+
"js-yaml": "^3.14.2",
|
|
77
|
+
"lodash": "^4.17.23",
|
|
78
|
+
"minimatch": "^3.1.5",
|
|
79
|
+
"node-forge": "^1.3.2",
|
|
80
|
+
"on-headers": "^1.1.0",
|
|
81
|
+
"pbkdf2": "^3.1.5",
|
|
82
|
+
"qs": "^6.14.0",
|
|
83
|
+
"sha.js": "^2.4.12",
|
|
84
|
+
"tmp": "^0.2.4"
|
|
69
85
|
}
|
|
70
86
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
var config = {
|
|
2
|
-
|
|
3
|
-
startTunnel: true,
|
|
4
|
-
timeout: 1800,
|
|
5
|
-
},
|
|
6
|
-
browsers: ['ChromeHeadless', 'FirefoxHeadless'],
|
|
2
|
+
browsers: ['ChromeHeadlessNoHttpsUpgrade', 'FirefoxHeadlessNoHttpsUpgrade'],
|
|
7
3
|
customLaunchers: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
// When forceTLS=true XHR tests run first, browsers store an HSTS entry for
|
|
5
|
+
// sockjs-*.pusher.com (Pusher servers send Strict-Transport-Security headers).
|
|
6
|
+
// Subsequent forceTLS=false XHR tests request HTTP URLs which are then
|
|
7
|
+
// silently upgraded to HTTPS via HSTS. The resulting CORS preflight for the
|
|
8
|
+
// upgraded URL fails, blocking the connection. Disabling web security (Chrome)
|
|
9
|
+
// or HTTPS-only mode (Firefox) bypasses this so the HSTS-upgraded HTTPS
|
|
10
|
+
// response is returned to the Pusher client and the connection can establish.
|
|
11
|
+
ChromeHeadlessNoHttpsUpgrade: {
|
|
12
|
+
base: 'ChromeHeadless',
|
|
13
|
+
flags: ['--disable-web-security']
|
|
14
|
+
},
|
|
15
|
+
FirefoxHeadlessNoHttpsUpgrade: {
|
|
16
|
+
base: 'FirefoxHeadless',
|
|
17
|
+
prefs: {
|
|
18
|
+
'dom.security.https_only_mode': false,
|
|
19
|
+
'network.stricttransportsecurity.preloadlist': false
|
|
20
|
+
}
|
|
14
21
|
}
|
|
15
22
|
}
|
|
16
23
|
};
|
|
17
|
-
if (process.env.CI === 'full' && browserStackCredsAvailable()) {
|
|
18
|
-
config.browsers.push('bs_safari_12');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function browserStackCredsAvailable() {
|
|
22
|
-
return process.env.BROWSER_STACK_USERNAME && process.env.BROWSER_STACK_ACCESS_KEY
|
|
23
|
-
}
|
|
24
24
|
|
|
25
25
|
module.exports = config;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Parts of the code are derived from various open source projects.
|
|
2
|
-
|
|
3
|
-
For code derived from Socket.IO by Guillermo Rauch see
|
|
4
|
-
https://github.com/LearnBoost/socket.io/tree/0.6.17#readme.
|
|
5
|
-
|
|
6
|
-
Snippets derived from JSON-js by Douglas Crockford are public domain.
|
|
7
|
-
|
|
8
|
-
Snippets derived from jQuery-JSONP by Julian Aubourg, generic MIT
|
|
9
|
-
license.
|
|
10
|
-
|
|
11
|
-
All other code is released on MIT license, see LICENSE-MIT-SockJS.
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
0.3.4
|
|
2
|
-
=====
|
|
3
|
-
|
|
4
|
-
* Mentioned njoyce's fork of sockjs-gevent.
|
|
5
|
-
* #90 - Don't catch onbeforeunload event - it breaks javascript://
|
|
6
|
-
links in IE.
|
|
7
|
-
* IE mangles 204 response code for 1223 on ajax, see:
|
|
8
|
-
http://bugs.jquery.com/ticket/1450
|
|
9
|
-
* Make `new` optional for SockJS constructor (via substack).
|
|
10
|
-
* It is impossible to cancel JSONP polling request - compensate for that.
|
|
11
|
-
* Refactored EventEmitter prototype (used only internally)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
0.3.2
|
|
15
|
-
=====
|
|
16
|
-
|
|
17
|
-
* #77 - Getting /info on modern browsers when html is served from
|
|
18
|
-
file:// urls was broken.
|
|
19
|
-
|
|
20
|
-
0.3.1
|
|
21
|
-
=====
|
|
22
|
-
|
|
23
|
-
* #61 - Meteor guys found that we unintentionally catch "onopen" errors.
|
|
24
|
-
* #63 - Meteorjs guys found that xhr-streaming on Safari sometimes
|
|
25
|
-
left busy cursor running.
|
|
26
|
-
* Increased allowed time for websocket transport (from 1 rtt to 2),
|
|
27
|
-
this should make ws transport more reliable over SSL, at the cost
|
|
28
|
-
of slightly longer connection time for users with blocked ws.
|
|
29
|
-
* #57 - previous fix didn't really work, sockjs-client still left
|
|
30
|
-
a mess in browsers history when using iframe transports. This
|
|
31
|
-
is fixed now.
|
|
32
|
-
* #60 - Opera 12 (next) claims to do AJAX2 / CORS, but can't
|
|
33
|
-
do xhr-streaming.
|
|
34
|
-
* #58 - onunload test sometimes failed on Safari on windows
|
|
35
|
-
* Updated readme WRT websocket protocols
|
|
36
|
-
* Updated readme WRT deployments on heroku
|
|
37
|
-
* Add minimalistic license block to every source file.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
0.3.0
|
|
41
|
-
=====
|
|
42
|
-
|
|
43
|
-
* Temporarily disabled iframe tests - they are failing unpredictably.
|
|
44
|
-
* #57 - pointing an iframe to "about:blank" during cleanup caused
|
|
45
|
-
Opera to messup history.
|
|
46
|
-
* #55 - Improved iframe abstraction (reduced a possible mem leak)
|
|
47
|
-
* Refactored AJAX abstractions, for better CORS handing - again.
|
|
48
|
-
* Add additional parent origin security check to an iframe.
|
|
49
|
-
* Urls with hashes or query strings can't be passed to SockJS.
|
|
50
|
-
* #18 - Mention workaround for Firefox ESC key issue
|
|
51
|
-
* #53 - AMD compliance
|
|
52
|
-
* sockjs/sockjs-protocol#28 - always use square brackets for
|
|
53
|
-
websocket frames
|
|
54
|
-
* #51 - initial support for IE10 - try XHR before XDR
|
|
55
|
-
* #28 - handle onunload / onbeforeunload in a more robust fashion
|
|
56
|
-
* #49 - support SockJS-client being used from files served from
|
|
57
|
-
file:// urls.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
0.2.1
|
|
61
|
-
=====
|
|
62
|
-
|
|
63
|
-
* "smoke-latency.html" test was unnecesairly sending too much data.
|
|
64
|
-
* Bumped core dependencies (coffee-script and uglify-js)
|
|
65
|
-
* Minor updates to the README, few cosmetic changes in the code.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
0.2.0
|
|
69
|
-
=====
|
|
70
|
-
|
|
71
|
-
* The API had changed - use `protocols_whitelist` option instead of
|
|
72
|
-
passing an array of protocols as a second argument to SockJS constructor.
|
|
73
|
-
* Dropped 'chunking-test' functionality and replace it with 'info'.
|
|
74
|
-
* Rewritten protocol-choosing alogirthm, see "utils.detectProtocols" method.
|
|
75
|
-
* Use dynamic protocol timeouts based on RTT, not hardcoded 5 seconds
|
|
76
|
-
* #34 - Don't ever reuse `session_id`, especially when trying
|
|
77
|
-
fallback protocols.
|
|
78
|
-
* The test server got moved from SockJS-client to SockJS-node.
|
|
79
|
-
* Don't test unicode surrogates - it can't work in some environments.
|
|
80
|
-
* XHR/XDR helpers were rewritten, ajax transports were simplified.
|
|
81
|
-
* Added a domain check in the iframe to improve security.
|
|
82
|
-
* SockJS will now trigger 1002 error if there is a problem during handshake
|
|
83
|
-
instead of 2000 error.
|
|
84
|
-
* Smoke-throughput test is renamed to smoke-latency.
|
|
85
|
-
|
|
86
|
-
0.1.2
|
|
87
|
-
=====
|
|
88
|
-
|
|
89
|
-
* #29 - Allow all unicode characters to be send over SockJS.
|
|
90
|
-
* #15 - SockJS should now work fine even if the connection is started
|
|
91
|
-
in HEAD, before BODY is loaded.
|
|
92
|
-
* #28 - In rare circumstances WebSocket connection can be left intact
|
|
93
|
-
after the page is unloaded in FireFox.
|
|
94
|
-
* Updated scripts to work with Node 0.6.
|
|
95
|
-
* Initial work to do better QUnit testing.
|
|
96
|
-
* Updated the minifying script (always escape unicode chars, remove
|
|
97
|
-
trailing comment).
|
|
98
|
-
* Use string instead of array of chars (utils.js:random_number_string).
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
0.1.1
|
|
102
|
-
=====
|
|
103
|
-
|
|
104
|
-
* #21 Get JsonP transport working on IE9 (Vladimir Dronnikov).
|
|
105
|
-
* #26 Emit heartbeat event.
|
|
106
|
-
* #27 Include license inline.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
0.1.0
|
|
110
|
-
=====
|
|
111
|
-
|
|
112
|
-
* SockJS-client can only send UTF-8 encodable strings. Previously we
|
|
113
|
-
took advantage of rich data structures and automatically
|
|
114
|
-
json-encoded them, but this got removed. Now, all data passed to
|
|
115
|
-
`send` will be converted to string. This is also how native
|
|
116
|
-
* `status` property on `EventClose` is renamed to `code`
|
|
117
|
-
as per Websocket API
|
|
118
|
-
WebSockets behave.
|
|
119
|
-
* The test server was updated to new `sockjs-node` API
|
|
120
|
-
* Fixed problem with Jsonp-polling transport on IE9
|
|
121
|
-
* Repository was moved - updated links.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
0.0.4
|
|
125
|
-
=====
|
|
126
|
-
|
|
127
|
-
* All transports were refactored, some transports were introduced:
|
|
128
|
-
htmlfile and separate xhr-streaming.
|
|
129
|
-
* Added logic to detect support for http chunking, and thus a
|
|
130
|
-
possibility to rule out streaming transports before running them.
|
|
131
|
-
* Added 'cookie' option, useful for cookie-based load balancing
|
|
132
|
-
(currently, it make a difference only for IE).
|
|
133
|
-
* Added hack to prevent EventSource from crashing Safari and Chrome.
|
|
134
|
-
* Loads and loads of other small and medium changes.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
0.0.2
|
|
138
|
-
=====
|
|
139
|
-
|
|
140
|
-
* Initial support for JSESSIONID based load balancing. Currently
|
|
141
|
-
doesn't play nicely with IE XDomainRequest transport.
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
0.0.1
|
|
145
|
-
=====
|
|
146
|
-
|
|
147
|
-
* Initial release.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2011-2012 VMware, Inc.
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
-
in the Software without restriction, including without limitation the rights
|
|
6
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
-
furnished to do so, subject to the following conditions:
|
|
9
|
-
|
|
10
|
-
The above copyright notice and this permission notice shall be included in
|
|
11
|
-
all copies or substantial portions of the Software.
|
|
12
|
-
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
-
THE SOFTWARE.
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
.PHONY: all build tests test serve clean
|
|
2
|
-
|
|
3
|
-
COFFEE:=./node_modules/.bin/coffee
|
|
4
|
-
|
|
5
|
-
all: sockjs.js
|
|
6
|
-
|
|
7
|
-
build: sockjs.js sockjs.min.js
|
|
8
|
-
|
|
9
|
-
sockjs.js: lib/*js version
|
|
10
|
-
@$(COFFEE) -v > /dev/null
|
|
11
|
-
$(COFFEE) bin/render.coffee --set-version $(VER) lib/all.js > $@
|
|
12
|
-
|
|
13
|
-
sockjs.min.js: lib/*js version
|
|
14
|
-
@$(COFFEE) -v > /dev/null
|
|
15
|
-
$(COFFEE) bin/render.coffee --set-version $(VER) --minify lib/all.js > $@
|
|
16
|
-
|
|
17
|
-
sockjs.pretty.js: lib/*js version
|
|
18
|
-
@$(COFFEE) -v > /dev/null
|
|
19
|
-
$(COFFEE) bin/render.coffee --set-version $(VER) --minify --pretty lib/all.js > $@
|
|
20
|
-
|
|
21
|
-
tests/html/lib/sockjs.js: sockjs.js
|
|
22
|
-
cp $< $@
|
|
23
|
-
|
|
24
|
-
tests/html/lib/%.js: tests/html/src/%.coffee
|
|
25
|
-
@$(COFFEE) -v > /dev/null
|
|
26
|
-
$(COFFEE) -o tests/html/lib/ -c --bare $<
|
|
27
|
-
|
|
28
|
-
build_tests: tests/html/lib/sockjs.js tests/html/lib/tests.js \
|
|
29
|
-
tests/html/lib/unittests.js tests/html/lib/domtests.js \
|
|
30
|
-
tests/html/lib/endtoendtests.js \
|
|
31
|
-
tests/html/lib/utils.js \
|
|
32
|
-
tests/html/lib/heartbeattests.js
|
|
33
|
-
|
|
34
|
-
test: tests
|
|
35
|
-
tests: build_tests
|
|
36
|
-
node tests/server.js
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
serve:
|
|
40
|
-
@if [ -e .pidfile.pid ]; then \
|
|
41
|
-
kill `cat .pidfile.pid`; \
|
|
42
|
-
rm .pidfile.pid; \
|
|
43
|
-
fi
|
|
44
|
-
|
|
45
|
-
@while [ 1 ]; do \
|
|
46
|
-
make build_tests; \
|
|
47
|
-
echo " [*] Running http server"; \
|
|
48
|
-
make test & \
|
|
49
|
-
SRVPID=$$!; \
|
|
50
|
-
echo $$SRVPID > .pidfile.pid; \
|
|
51
|
-
echo " [*] Server pid: $$SRVPID"; \
|
|
52
|
-
inotifywait -r -q -e modify . ../sockjs-node; \
|
|
53
|
-
kill `cat .pidfile.pid`; \
|
|
54
|
-
rm -f .pidfile.pid; \
|
|
55
|
-
sleep 0.1; \
|
|
56
|
-
done
|
|
57
|
-
|
|
58
|
-
clean:
|
|
59
|
-
rm -f sockjs*.js tests/html/lib/*.js
|
|
60
|
-
|
|
61
|
-
# To release:
|
|
62
|
-
# 0) 'make prepare-release'
|
|
63
|
-
# 1) commit everything you need
|
|
64
|
-
# 2) amend 'version' file (don't commit)
|
|
65
|
-
# 3) run 'make tag', and git push/git push --tag as suggested
|
|
66
|
-
# 4) run 'make upload', and suggested commands
|
|
67
|
-
|
|
68
|
-
RVER:=$(shell cat version)
|
|
69
|
-
VER:=$(shell ./VERSION-GEN)
|
|
70
|
-
# The first two dots: 1.2.3 -> 1.2
|
|
71
|
-
MAJVER:=$(shell echo $(VER)|sed 's|^\([^.]\+[.][^.]\+\).*$$|\1|' )
|
|
72
|
-
|
|
73
|
-
.PHONY: prepare-release tag upload
|
|
74
|
-
prepare-release:
|
|
75
|
-
make clean
|
|
76
|
-
[ -e ../sockjs-client-gh-pages ] || \
|
|
77
|
-
git clone `git remote -v|tr "[:space:]" "\t"|cut -f 2` \
|
|
78
|
-
--branch gh-pages ../sockjs-client-gh-pages
|
|
79
|
-
(cd ../sockjs-client-gh-pages; git pull;)
|
|
80
|
-
|
|
81
|
-
#-git tag -d v$(RVER)
|
|
82
|
-
tag:
|
|
83
|
-
git commit $(TAG_OPTS) version Changelog -m "Release $(RVER)" --allow-empty
|
|
84
|
-
git tag -s v$(RVER) -m "Release $(RVER)"
|
|
85
|
-
@echo ' [*] Now run'
|
|
86
|
-
@echo 'git push; git push --tag'
|
|
87
|
-
|
|
88
|
-
ARTIFACTS=\
|
|
89
|
-
sockjs-$(VER).js \
|
|
90
|
-
sockjs-$(VER).min.js \
|
|
91
|
-
sockjs-$(MAJVER).js \
|
|
92
|
-
sockjs-$(MAJVER).min.js
|
|
93
|
-
|
|
94
|
-
upload: build
|
|
95
|
-
echo "VER=$(VER) MAJVER=$(MAJVER)"
|
|
96
|
-
cp sockjs.js ../sockjs-client-gh-pages/sockjs-$(VER).js
|
|
97
|
-
cp sockjs.min.js ../sockjs-client-gh-pages/sockjs-$(VER).min.js
|
|
98
|
-
cp sockjs.js ../sockjs-client-gh-pages/sockjs-$(MAJVER).js
|
|
99
|
-
cp sockjs.min.js ../sockjs-client-gh-pages/sockjs-$(MAJVER).min.js
|
|
100
|
-
(cd ../sockjs-client-gh-pages; \
|
|
101
|
-
git add $(ARTIFACTS); \
|
|
102
|
-
git commit -m "Release $(VER)"; \
|
|
103
|
-
node generate_index.js > index.html; \
|
|
104
|
-
git add index.html; \
|
|
105
|
-
git commit --amend -m "Release $(VER)";)
|
|
106
|
-
@echo ' [*] Now run: '
|
|
107
|
-
@echo '(cd ../sockjs-client-gh-pages; git push; )'
|
|
108
|
-
@echo '(cd ../sockjs-client-gh-pages; \
|
|
109
|
-
s3cmd put --acl-public index.html $(ARTIFACTS) s3://sockjs; );'
|