maintenance: dependency updates

This commit is contained in:
Gary Sharp
2022-12-04 13:32:10 +11:00
parent 99be87ed9c
commit fcf70f724e
22 changed files with 227 additions and 100 deletions
@@ -0,0 +1,122 @@
/*!
* ASP.NET SignalR JavaScript Library v2.1.1
* http://signalr.net/
*
* Copyright Microsoft Open Technologies, Inc. All rights reserved.
* Licensed under the Apache 2.0
* https://github.com/SignalR/SignalR/blob/master/LICENSE.md
*
*/
/// <reference path="..\..\Core\jquery-2.1.1.js" />
"use strict";
(function ($, window, undefined) {
/// <param name="$" type="jQuery" />
"use strict";
if (typeof $.signalR !== "function") {
throw new Error("SignalR: SignalR is not loaded. Please ensure jquery.signalR-x.js is referenced before ~/signalr/js.");
}
var signalR = $.signalR;
function makeProxyCallback(hub, callback) {
return function () {
// Call the client hub method
callback.apply(hub, $.makeArray(arguments));
};
}
function registerHubProxies(instance, shouldSubscribe) {
var key, hub, memberKey, memberValue, subscriptionMethod;
for (key in instance) {
if (instance.hasOwnProperty(key)) {
hub = instance[key];
if (!hub.hubName) {
// Not a client hub
continue;
}
if (shouldSubscribe) {
// We want to subscribe to the hub events
subscriptionMethod = hub.on;
} else {
// We want to unsubscribe from the hub events
subscriptionMethod = hub.off;
}
// Loop through all members on the hub and find client hub functions to subscribe/unsubscribe
for (memberKey in hub.client) {
if (hub.client.hasOwnProperty(memberKey)) {
memberValue = hub.client[memberKey];
if (!$.isFunction(memberValue)) {
// Not a client hub function
continue;
}
subscriptionMethod.call(hub, memberKey, makeProxyCallback(hub, memberValue));
}
}
}
}
}
$.hubConnection.prototype.createHubProxies = function () {
var proxies = {};
this.starting(function () {
// Register the hub proxies as subscribed
// (instance, shouldSubscribe)
registerHubProxies(proxies, true);
this._registerSubscribedHubs();
}).disconnected(function () {
// Unsubscribe all hub proxies when we "disconnect". This is to ensure that we do not re-add functional call backs.
// (instance, shouldSubscribe)
registerHubProxies(proxies, false);
});
proxies['deviceBatchUpdates'] = this.createHubProxy('deviceBatchUpdates');
proxies['deviceBatchUpdates'].client = {};
proxies['deviceBatchUpdates'].server = {};
proxies['deviceUpdates'] = this.createHubProxy('deviceUpdates');
proxies['deviceUpdates'].client = {};
proxies['deviceUpdates'].server = {};
proxies['jobUpdates'] = this.createHubProxy('jobUpdates');
proxies['jobUpdates'].client = {};
proxies['jobUpdates'].server = {};
proxies['logNotifications'] = this.createHubProxy('logNotifications');
proxies['logNotifications'].client = {};
proxies['logNotifications'].server = {};
proxies['noticeboardUpdates'] = this.createHubProxy('noticeboardUpdates');
proxies['noticeboardUpdates'].client = {};
proxies['noticeboardUpdates'].server = {};
proxies['scheduledTaskNotifications'] = this.createHubProxy('scheduledTaskNotifications');
proxies['scheduledTaskNotifications'].client = {};
proxies['scheduledTaskNotifications'].server = {
getStatus: function getStatus() {
/// <summary>Calls the GetStatus method on the server-side scheduledTaskNotifications hub.&#10;Returns a jQuery.Deferred() promise.</summary>
return proxies['scheduledTaskNotifications'].invoke.apply(proxies['scheduledTaskNotifications'], $.merge(["GetStatus"], $.makeArray(arguments)));
}
};
proxies['userUpdates'] = this.createHubProxy('userUpdates');
proxies['userUpdates'].client = {};
proxies['userUpdates'].server = {};
return proxies;
};
signalR.hub = $.hubConnection("/API/Signalling", { useDefaultPath: false });
$.extend(signalR, signalR.hub.createHubProxies());
})(window.jQuery, window);
/// <reference path="jquery.signalR-2.1.1.js" />
@@ -0,0 +1,10 @@
/*!
* ASP.NET SignalR JavaScript Library v2.1.1
* http://signalr.net/
*
* Copyright Microsoft Open Technologies, Inc. All rights reserved.
* Licensed under the Apache 2.0
* https://github.com/SignalR/SignalR/blob/master/LICENSE.md
*
*/
(function(n){"use strict";function r(t,i){return function(){i.apply(t,n.makeArray(arguments))}}function i(t,i){var e,u,f,o,s;for(e in t)if(t.hasOwnProperty(e)){if(u=t[e],!u.hubName)continue;s=i?u.on:u.off;for(f in u.client)if(u.client.hasOwnProperty(f)){if(o=u.client[f],!n.isFunction(o))continue;s.call(u,f,r(u,o))}}}if(typeof n.signalR!="function")throw new Error("SignalR: SignalR is not loaded. Please ensure jquery.signalR-x.js is referenced before ~/signalr/js.");var t=n.signalR;n.hubConnection.prototype.createHubProxies=function(){var t={};return this.starting(function(){i(t,!0);this._registerSubscribedHubs()}).disconnected(function(){i(t,!1)}),t.deviceBatchUpdates=this.createHubProxy("deviceBatchUpdates"),t.deviceBatchUpdates.client={},t.deviceBatchUpdates.server={},t.deviceUpdates=this.createHubProxy("deviceUpdates"),t.deviceUpdates.client={},t.deviceUpdates.server={},t.jobUpdates=this.createHubProxy("jobUpdates"),t.jobUpdates.client={},t.jobUpdates.server={},t.logNotifications=this.createHubProxy("logNotifications"),t.logNotifications.client={},t.logNotifications.server={},t.noticeboardUpdates=this.createHubProxy("noticeboardUpdates"),t.noticeboardUpdates.client={},t.noticeboardUpdates.server={},t.scheduledTaskNotifications=this.createHubProxy("scheduledTaskNotifications"),t.scheduledTaskNotifications.client={},t.scheduledTaskNotifications.server={getStatus:function(){return t.scheduledTaskNotifications.invoke.apply(t.scheduledTaskNotifications,n.merge(["GetStatus"],n.makeArray(arguments)))}},t.userUpdates=this.createHubProxy("userUpdates"),t.userUpdates.client={},t.userUpdates.server={},t};t.hub=n.hubConnection("/API/Signalling",{useDefaultPath:!1});n.extend(t,t.hub.createHubProxies())})(window.jQuery,window);
@@ -1,14 +1,15 @@
/* jquery.signalR.core.js */
/*global window:false */
/*!
* ASP.NET SignalR JavaScript Library v2.1.1
* ASP.NET SignalR JavaScript Library v2.1.2
* http://signalr.net/
*
* Copyright (C) Microsoft Corporation. All rights reserved.
*
*/
/// <reference path="../../Core/jquery-2.1.1.js" />
/// <reference path="Scripts/jquery-1.6.4.js" />
/// <reference path="jquery.signalR.version.js" />
(function ($, window, undefined) {
var resources = {
@@ -704,7 +705,9 @@
connection.id = res.ConnectionId;
connection.token = res.ConnectionToken;
connection.webSocketServerUrl = res.WebSocketServerUrl;
connection._.longPollDelay = res.LongPollDelay * 1000; // in ms
// The long poll timeout is the ConnectionTimeout plus 10 seconds
connection._.pollTimeout = res.ConnectionTimeout * 1000 + 10000; // in ms
// Once the server has labeled the PersistentConnection as Disconnected, we should stop attempting to reconnect
// after res.DisconnectTimeout seconds.
@@ -959,7 +962,6 @@
delete connection._.pingIntervalId;
delete connection._.lastMessageAt;
delete connection._.lastActiveAt;
delete connection._.longPollDelay;
// Clear out our message buffer
connection._.connectingMessageBuffer.clear();
@@ -1317,7 +1319,7 @@
type: "POST"
});
connection.log("Fired ajax abort async = " + async + ".");
connection.log("Fired ajax abort async = " + doAsync + ".");
},
ajaxStart: function (connection, onSuccess) {
@@ -2149,27 +2151,13 @@
events = $.signalR.events,
changeState = $.signalR.changeState,
isDisconnecting = $.signalR.isDisconnecting,
transportLogic = signalR.transports._logic,
browserSupportsXHRProgress = (function () {
try {
return "onprogress" in new window.XMLHttpRequest();
} catch (e) {
// No XHR means no XHR progress event
return false;
}
})();
transportLogic = signalR.transports._logic;
signalR.transports.longPolling = {
name: "longPolling",
supportsKeepAlive: function (connection) {
return browserSupportsXHRProgress &&
connection.ajaxDataType !== "jsonp" &&
// Don't check for keep alives if there is a delay configured between poll requests.
// Don't check for keep alives if the server didn't send back the "LongPollDelay" as
// part of the response to /negotiate. That indicates the server is running an older
// version of SignalR that doesn't send long polling keep alives.
connection._.longPollDelay === 0;
supportsKeepAlive: function () {
return false;
},
reconnectDelay: 3000,
@@ -2244,6 +2232,7 @@
}
},
url: url,
timeout: connection._.pollTimeout,
success: function (result) {
var minData,
delay = 0,
@@ -2486,6 +2475,8 @@
};
},
constructor: hubProxy,
hasSubscriptions: function () {
return hasMembers(this._.callbackMap);
},
@@ -2823,5 +2814,5 @@
/*global window:false */
/// <reference path="jquery.signalR.core.js" />
(function ($, undefined) {
$.signalR.version = "2.1.1";
$.signalR.version = "2.1.2";
}(window.jQuery));