[Pkg-javascript-commits] [sockjs-client] 277/350: [dist] 1.0.0-beta.8
tonnerre at ancient-solutions.com
tonnerre at ancient-solutions.com
Fri Aug 5 01:04:30 UTC 2016
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.
commit c7ec8069fc7b759f6c29536dcd69f399b636dad7
Author: Bryce Kahle <bkahle at gmail.com>
Date: Tue Dec 16 16:06:23 2014 -0500
[dist] 1.0.0-beta.8
---
...ckjs-1.0.0-beta.7.js => sockjs-1.0.0-beta.8.js} | 114 +++++++++++++++------
....0-beta.7.min.js => sockjs-1.0.0-beta.8.min.js} | 6 +-
lib/version.js | 2 +-
package.json | 2 +-
4 files changed, 88 insertions(+), 36 deletions(-)
diff --git a/dist/sockjs-1.0.0-beta.7.js b/dist/sockjs-1.0.0-beta.8.js
old mode 100644
new mode 100755
similarity index 98%
rename from dist/sockjs-1.0.0-beta.7.js
rename to dist/sockjs-1.0.0-beta.8.js
index 8ebbfd2..d0fa358
--- a/dist/sockjs-1.0.0-beta.7.js
+++ b/dist/sockjs-1.0.0-beta.8.js
@@ -1,4 +1,4 @@
-/* sockjs-client v1.0.0-beta.7 | http://sockjs.org | MIT license */
+/* sockjs-client v1.0.0-beta.8 | http://sockjs.org | MIT license */
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.SockJS=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot fin [...]
(function (global){
'use strict';
@@ -3632,7 +3632,7 @@ module.exports = {
}).call(this,{ env: {} })
},{"debug":53,"url-parse":58}],52:[function(require,module,exports){
-module.exports = '1.0.0-beta.7';
+module.exports = '1.0.0-beta.8';
},{}],53:[function(require,module,exports){
/**
@@ -5033,6 +5033,7 @@ var required = require('requires-port')
, qs = require('querystringify');
var keys = ',,protocol,username,password,host,hostname,port,pathname,query,hash'.split(',')
+ , inherit = { protocol: 1, host: 1, hostname: 1 }
, parts = keys.length;
/**
@@ -5061,7 +5062,12 @@ function URL(address, location, parser) {
//
// MOARE: Mother Of All Regular Expressions.
//
- var regexp = /^(?:(?:(([^:\/#\?]+:)?(?:(?:\/\/)(?:(?:(?:([^:@\/#\?]+)(?:\:([^:@\/#\?]*))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;
+ var regexp = /^(?:(?:(([^:\/#\?]+:)?(?:(?:\/\/)(?:(?:(?:([^:@\/#\?]+)(?:\:([^:@\/#\?]*))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/
+ , bits = regexp.exec(address)
+ , type = typeof location
+ , url = this
+ , i = 0
+ , key;
//
// The following if statements allows this module two have compatibility with
@@ -5074,8 +5080,6 @@ function URL(address, location, parser) {
// arguments. The supplied object will be used as default values / fall-back
// for relative paths.
//
- var type = typeof location;
-
if ('object' !== type && 'string' !== type) {
parser = location;
location = null;
@@ -5087,17 +5091,17 @@ function URL(address, location, parser) {
location = lolcation(location);
- for (var i = 0, bits = regexp.exec(address), key; i < parts; key = keys[++i]) {
- if (key) {
- this[key] = bits[i] || location[key] || '';
+ for (; i < parts; key = keys[++i]) {
+ if (!key) continue;
- //
- // The protocol, host, host name should always be lower cased even if they
- // are supplied in uppercase. This way, when people generate an `origin`
- // it be correct.
- //
- if (i === 2 || i === 5 || i === 6) this[key] = this[key].toLowerCase();
- }
+ url[key] = bits[i] || (key in inherit ? location[key] || '' : '');
+
+ //
+ // The protocol, host, host name should always be lower cased even if they
+ // are supplied in uppercase. This way, when people generate an `origin`
+ // it be correct.
+ //
+ if (i === 2 || i === 5 || i === 6) url[key] = url[key].toLowerCase();
}
//
@@ -5105,25 +5109,70 @@ function URL(address, location, parser) {
// with a custom parser as function use that instead of the default build-in
// parser.
//
- if (parser) this.query = parser(this.query);
+ if (parser) url.query = parser(url.query);
//
// We should not add port numbers if they are already the default port number
// for a given protocol. As the host also contains the port number we're going
// override it with the hostname which contains no port number.
//
- if (!required(this.port, this.protocol)) {
- this.host = this.hostname;
- this.port = '';
+ if (!required(url.port, url.protocol)) {
+ url.host = url.hostname;
+ url.port = '';
}
//
// The href is just the compiled result.
//
- this.href = this.toString();
+ url.href = url.toString();
}
/**
+ * This is convenience method for changing properties in the URL instance to
+ * insure that they all propagate correctly.
+ *
+ * @param {String} prop Property we need to adjust.
+ * @param {Mixed} value The newly assigned value.
+ * @returns {URL}
+ * @api public
+ */
+URL.prototype.set = function set(part, value, fn) {
+ var url = this;
+
+ if ('query' === part) {
+ if ('string' === typeof value) value = (fn || qs.parse)(value);
+ url[part] = value;
+ } else if ('port' === part) {
+ url[part] = value;
+
+ if (!required(value, url.protocol)) {
+ url.host = url.hostname;
+ url[part] = '';
+ } else if (value) {
+ url.host = url.hostname +':'+ value;
+ }
+ } else if ('hostname' === part) {
+ url[part] = value;
+
+ if (url.port) value += ':'+ url.port;
+ url.host = value;
+ } else if ('host' === part) {
+ url[part] = value;
+
+ if (/\:\d+/.test(value)) {
+ value = value.split(':');
+ url.hostname = value[0];
+ url.port = value[1];
+ }
+ } else {
+ url[part] = value;
+ }
+
+ url.href = url.toString();
+ return url;
+};
+
+/**
* Transform the properties back in to a valid and full URL string.
*
* @param {Function} stringify Optional query stringify function.
@@ -5133,24 +5182,25 @@ function URL(address, location, parser) {
URL.prototype.toString = function toString(stringify) {
if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;
- var result = this.protocol +'//'
- , query;
+ var query
+ , url = this
+ , result = url.protocol +'//';
- if (this.username) result += this.username +':'+ this.password +'@';
+ if (url.username) result += url.username +':'+ url.password +'@';
- result += this.hostname;
- if (this.port) result += ':'+ this.port;
+ result += url.hostname;
+ if (url.port) result += ':'+ url.port;
- result += this.pathname;
+ result += url.pathname;
- if (this.query) {
- if ('object' === typeof this.query) query = stringify(this.query);
- else query = this.query;
+ if (url.query) {
+ if ('object' === typeof url.query) query = stringify(url.query);
+ else query = url.query;
result += (query.charAt(0) === '?' ? '' : '?') + query;
}
- if (this.hash) result += this.hash;
+ if (url.hash) result += url.hash;
return result;
};
@@ -5215,6 +5265,8 @@ module.exports = function lolcation(loc) {
},{"./":58}],60:[function(require,module,exports){
'use strict';
+var has = Object.prototype.hasOwnProperty;
+
/**
* Simple query string parser.
*
@@ -5259,7 +5311,7 @@ function querystringify(obj, prefix) {
if ('string' !== typeof prefix) prefix = '?';
for (var key in obj) {
- if (obj.hasOwnProperty(key)) {
+ if (has.call(obj, key)) {
pairs.push(encodeURIComponent(key) +'='+ encodeURIComponent(obj[key]));
}
}
diff --git a/dist/sockjs-1.0.0-beta.7.min.js b/dist/sockjs-1.0.0-beta.8.min.js
old mode 100644
new mode 100755
similarity index 91%
rename from dist/sockjs-1.0.0-beta.7.min.js
rename to dist/sockjs-1.0.0-beta.8.min.js
index 3ee30d1..730f945
--- a/dist/sockjs-1.0.0-beta.7.min.js
+++ b/dist/sockjs-1.0.0-beta.8.min.js
@@ -1,3 +1,3 @@
-/* sockjs-client v1.0.0-beta.7 | http://sockjs.org | MIT license */
-!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.SockJS=t()}}(function(){var t;return function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");th [...]
-},{"../../utils/browser":44,"../../utils/iframe":47,"../../utils/random":49,"../../utils/url":51,debug:void 0,events:3,inherits:53}],32:[function(t,e){"use strict";function n(t,e){i.call(this);var n=this;this.bufferPosition=0,this.xo=new e("POST",t,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",function(t,e){n._chunkHandler(t,e),n.xo=null;var r=200===t?"network":"permanent";n.emit("close",null,r),n._cleanup()})}var r=t("inherits"),i=t("events").EventEmitter [...]
\ No newline at end of file
+/* sockjs-client v1.0.0-beta.8 | http://sockjs.org | MIT license */
+!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.SockJS=t()}}(function(){var t;return function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");th [...]
+},{"../../utils/browser":44,"../../utils/iframe":47,"../../utils/random":49,"../../utils/url":51,debug:void 0,events:3,inherits:53}],32:[function(t,e){"use strict";function n(t,e){i.call(this);var n=this;this.bufferPosition=0,this.xo=new e("POST",t,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",function(t,e){n._chunkHandler(t,e),n.xo=null;var r=200===t?"network":"permanent";n.emit("close",null,r),n._cleanup()})}var r=t("inherits"),i=t("events").EventEmitter [...]
\ No newline at end of file
diff --git a/lib/version.js b/lib/version.js
index b38e5d9..e09b31f 100644
--- a/lib/version.js
+++ b/lib/version.js
@@ -1 +1 @@
-module.exports = '1.0.0-beta.7';
\ No newline at end of file
+module.exports = '1.0.0-beta.8';
\ No newline at end of file
diff --git a/package.json b/package.json
index 38f48fb..480ce1f 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "sockjs-client",
"description": "SockJS-client is a browser JavaScript library that provides a WebSocket-like object. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server.",
- "version": "1.0.0-beta.7",
+ "version": "1.0.0-beta.8",
"author": "Bryce Kahle",
"browser": {
"./lib/transport/driver/websocket.js": "./lib/transport/browser/websocket.js",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git
More information about the Pkg-javascript-commits
mailing list