statebus 6.2.2 → 6.2.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "statebus",
3
- "version": "6.2.2",
3
+ "version": "6.2.4",
4
4
  "description": "Synchronize state.",
5
5
  "main": "statebus.js",
6
6
  "scripts": {
@@ -11,7 +11,14 @@
11
11
  "statebus.js",
12
12
  "client.js",
13
13
  "server.js",
14
- "extras/",
14
+ "extras/coffee.js",
15
+ "extras/dash.coffee",
16
+ "extras/diffsync.js",
17
+ "extras/getCaretCoordinates.js",
18
+ "extras/react.js",
19
+ "extras/sockjs.js",
20
+ "extras/tcp-bind.js",
21
+ "extras/tests.js",
15
22
  "readme.md"
16
23
  ],
17
24
  "repository": "invisible-college/statebus",
package/server.js CHANGED
@@ -2010,7 +2010,7 @@ function import_server (bus, options)
2010
2010
  // Validate that the login/name is not changed to something clobberish
2011
2011
  var old_login = u.login || u.name
2012
2012
  if (old_login.toLowerCase() !== login.toLowerCase()
2013
- && userpass.hasOwnProperty(login)) {
2013
+ && userpass.hasOwnProperty(login.toLowerCase())) {
2014
2014
  client.log('The login', login, 'is already taken. Aborting.')
2015
2015
  client.save.abort(o) // Abort
2016
2016
 
@@ -2364,9 +2364,7 @@ function import_server (bus, options)
2364
2364
 
2365
2365
  textbus.fetch(req.path) // So that textbus never clears the cache
2366
2366
  textbus.fetch(req.path, function cb (o) {
2367
- res.setHeader('Cache-Control', 'public')
2368
- // res.setHeader('Cache-Control', 'public, max-age='
2369
- // + (60 * 60 * 24 * 30)) // 1 month
2367
+ res.setHeader('Cache-Control', 'public, max-age=' + (60 * 60 * 6)) // 6 hours
2370
2368
  res.setHeader('ETag', o.etag)
2371
2369
  res.setHeader('Access-Control-Allow-Origin', '*')
2372
2370
  res.setHeader('Content-Type', 'application/javascript')
package/statebus.js CHANGED
@@ -671,9 +671,9 @@
671
671
  param_names.push(param.slice(1))
672
672
  return prefix + '([^/]+)'
673
673
  }
674
- var regex = new RegExp('^'
675
- + pattern.replace(/(^|\/)(:[^/()]+)|(\*)/g, replace_param)
676
- + '$')
674
+ var regex = new RegExp(
675
+ '^' + pattern.replace(/(^|\/)(:[^/()]+)|(\*)/g, replace_param) + '$'
676
+ )
677
677
 
678
678
  return function (path) {
679
679
  var match = path.match(regex)
@@ -1,3 +0,0 @@
1
- import statebus from 'statebus'
2
-
3
- console.log(statebus)