@equinor/echo-framework 0.9.13 → 0.9.16
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/dist/components/appLinks/applinkUtils.d.ts +2 -0
- package/dist/components/appLinks/applinkUtils.test.d.ts +1 -0
- package/dist/components/containers/layouts.d.ts +5 -3
- package/dist/components/panel/corePanelLeft.d.ts +1 -4
- package/dist/components/panel/corePanelRight.d.ts +1 -4
- package/dist/components/router/echoRoute.d.ts +2 -2
- package/dist/components/router/index.d.ts +1 -0
- package/dist/components/router/useLayout.d.ts +3 -0
- package/dist/coreApplication/index.d.ts +0 -2
- package/dist/hooks/index.d.ts +0 -2
- package/dist/index.d.ts +0 -8
- package/dist/index.js +3 -0
- package/dist/types/eventTypes/legendEvent.d.ts +1 -1
- package/dist/types/hookLibrary.d.ts +0 -1
- package/package.json +43 -39
- package/dist/_virtual/_tslib.js +0 -67
- package/dist/_virtual/index.js +0 -9
- package/dist/coreApplication/EchoBarComponent.d.ts +0 -9
- package/dist/coreApplication/EchoUserInterfaceContextProvider.d.ts +0 -11
- package/dist/hooks/useIsCompactLayout.d.ts +0 -5
- package/dist/hooks/useScreenOrientation.d.ts +0 -5
- package/dist/hooks/useScreenValues.d.ts +0 -13
- package/dist/hooks/useWindowSize.d.ts +0 -9
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -25
- package/dist/node_modules/@equinor/eds-icons/dist/icons.esm.js +0 -5285
- package/dist/node_modules/@microsoft/signalr/dist/esm/AbortController.js +0 -54
- package/dist/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +0 -96
- package/dist/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js +0 -47
- package/dist/node_modules/@microsoft/signalr/dist/esm/Errors.js +0 -287
- package/dist/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +0 -283
- package/dist/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js +0 -86
- package/dist/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js +0 -20
- package/dist/node_modules/@microsoft/signalr/dist/esm/HttpClient.js +0 -82
- package/dist/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +0 -1169
- package/dist/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +0 -1346
- package/dist/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js +0 -165
- package/dist/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js +0 -33
- package/dist/node_modules/@microsoft/signalr/dist/esm/ILogger.js +0 -37
- package/dist/node_modules/@microsoft/signalr/dist/esm/ITransport.js +0 -37
- package/dist/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js +0 -179
- package/dist/node_modules/@microsoft/signalr/dist/esm/Loggers.js +0 -35
- package/dist/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +0 -448
- package/dist/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +0 -238
- package/dist/node_modules/@microsoft/signalr/dist/esm/Subject.js +0 -99
- package/dist/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js +0 -45
- package/dist/node_modules/@microsoft/signalr/dist/esm/Utils.js +0 -435
- package/dist/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +0 -264
- package/dist/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +0 -133
- package/dist/node_modules/classnames/index.js +0 -67
- package/dist/node_modules/history/esm/history.js +0 -498
- package/dist/node_modules/resolve-pathname/esm/resolve-pathname.js +0 -73
- package/dist/node_modules/style-inject/dist/style-inject.es.js +0 -36
- package/dist/node_modules/tiny-invariant/dist/tiny-invariant.esm.js +0 -23
- package/dist/node_modules/tiny-warning/dist/tiny-warning.esm.js +0 -26
- package/dist/src/components/appLinks/AppLinks.js +0 -38
- package/dist/src/components/appLinks/AppLinks.module.css.js +0 -14
- package/dist/src/components/appLinks/linkButton/linkButton.js +0 -45
- package/dist/src/components/containers/layout.module.css.js +0 -29
- package/dist/src/components/containers/layouts.js +0 -101
- package/dist/src/components/contextualAppLinks/contextualAppLinks.context.js +0 -20
- package/dist/src/components/contextualAppLinks/contextualAppLinks.js +0 -47
- package/dist/src/components/contextualAppLinks/externalAppsMenu.js +0 -157
- package/dist/src/components/contextualAppLinks/externalAppsMenu.module.css.js +0 -16
- package/dist/src/components/contextualAppLinks/externalLinkButtons/allExternalLinks.js +0 -127
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.js +0 -169
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.js +0 -95
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.js +0 -95
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.js +0 -84
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSafeX.js +0 -38
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.js +0 -110
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.js +0 -59
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToStid.js +0 -40
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.js +0 -114
- package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.js +0 -44
- package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.module.css.js +0 -15
- package/dist/src/components/contextualAppLinks/hooks/useContextualAppLinks.js +0 -52
- package/dist/src/components/contextualAppLinks/hooks/useContextualAppLinksContext.js +0 -36
- package/dist/src/components/contextualAppLinks/index.js +0 -22
- package/dist/src/components/contextualAppLinks/internalAppLinks.js +0 -115
- package/dist/src/components/contextualAppLinks/linkButton.js +0 -57
- package/dist/src/components/echoLogo/echoLogo.js +0 -30
- package/dist/src/components/echoLogo/echoLogo.module.css.js +0 -15
- package/dist/src/components/errorBoundary/components/chunkLoadErrorMessage.js +0 -64
- package/dist/src/components/errorBoundary/components/chunkLoadErrorMessage.module.css.js +0 -17
- package/dist/src/components/errorBoundary/components/errorBoundaryBaseMessage.js +0 -85
- package/dist/src/components/errorBoundary/components/errorBoundaryBaseMessage.module.css.js +0 -19
- package/dist/src/components/errorBoundary/components/notificationCardWithLogo.js +0 -55
- package/dist/src/components/errorBoundary/components/notificationCardWithLogo.module.css.js +0 -19
- package/dist/src/components/errorBoundary/errorBoundary.js +0 -100
- package/dist/src/components/externalLinkButton/externalLinkButton.js +0 -310
- package/dist/src/components/externalLinkButton/externalLinkButton.module.css.js +0 -23
- package/dist/src/components/footer/footer.js +0 -42
- package/dist/src/components/footer/footer.module.css.js +0 -17
- package/dist/src/components/lazyLoading/appLoadingIndicator.js +0 -34
- package/dist/src/components/lazyLoading/appLoadingIndicator.module.css.js +0 -15
- package/dist/src/components/lazyLoading/lazyLoadedAppWrapper.js +0 -40
- package/dist/src/components/mediator/mediator.js +0 -32
- package/dist/src/components/pageMenu/Navigation/applicationList.js +0 -35
- package/dist/src/components/pageMenu/Navigation/applicationList.module.css.js +0 -17
- package/dist/src/components/pageMenu/accordionItem.module.css.js +0 -16
- package/dist/src/components/pageMenu/defaultAccordionItem.js +0 -61
- package/dist/src/components/pageMenu/pageMenu.js +0 -141
- package/dist/src/components/pageMenu/pageMenu.module.css.js +0 -17
- package/dist/src/components/pageMenu/pageMenuDrawerItem.js +0 -77
- package/dist/src/components/pageMenu/pageMenuDrawerItem.module.css.js +0 -20
- package/dist/src/components/pageMenu/settings/asset.js +0 -40
- package/dist/src/components/pageMenu/settings/profile.js +0 -62
- package/dist/src/components/pageMenu/settings/settings.js +0 -41
- package/dist/src/components/pageMenu/settings/settings.module.css.js +0 -25
- package/dist/src/components/pageMenu/version/version.js +0 -88
- package/dist/src/components/pageMenu/version/version.module.css.js +0 -14
- package/dist/src/components/panel/corePanelIcon.js +0 -31
- package/dist/src/components/panel/corePanelLeft.js +0 -94
- package/dist/src/components/panel/corePanelLeft.module.css.js +0 -21
- package/dist/src/components/panel/corePanelRight.js +0 -98
- package/dist/src/components/panel/corePanelRight.module.css.js +0 -18
- package/dist/src/components/panelButton/panelButton.js +0 -124
- package/dist/src/components/panelButton/panelButton.module.css.js +0 -25
- package/dist/src/components/plantSelector/plantSelector.js +0 -137
- package/dist/src/components/projectSelector/ProcosysProjectSelector.js +0 -115
- package/dist/src/components/projectSelector/ProcosysProjectSelector.module.css.js +0 -14
- package/dist/src/components/realTimeData/RealTimePopoverButton.js +0 -168
- package/dist/src/components/realTimeData/components/IMSDropdown/RealTimeIMSDropdown.js +0 -83
- package/dist/src/components/realTimeData/components/IMSDropdown/RealTimeIMSDropdown.module.css.js +0 -15
- package/dist/src/components/realTimeData/components/connectorForIMSTag/IMSConnector.module.css.js +0 -17
- package/dist/src/components/realTimeData/components/connectorForIMSTag/RealTimeConnectorForIMSTag.js +0 -149
- package/dist/src/components/realTimeData/components/contextButton/RealTimeContextButton.js +0 -75
- package/dist/src/components/realTimeData/components/contextButton/RealTimeContextButton.module.css.js +0 -15
- package/dist/src/components/realTimeData/components/contextPopover/Popover.js +0 -37
- package/dist/src/components/realTimeData/components/contextPopover/Popover.module.css.js +0 -15
- package/dist/src/components/realTimeData/hooks/useRealTimeHub.js +0 -124
- package/dist/src/components/realTimeData/hooks/useSignalR.js +0 -175
- package/dist/src/components/realTimeData/hooks/useSignalRListener.js +0 -22
- package/dist/src/components/router/echoRoute.js +0 -51
- package/dist/src/components/router/echoRouter.js +0 -30
- package/dist/src/components/router/echoWrapper.js +0 -33
- package/dist/src/components/router/routes.js +0 -43
- package/dist/src/components/searchMenu/searchMenu.js +0 -46
- package/dist/src/components/searchMenu/searchMenu.module.css.js +0 -16
- package/dist/src/components/tagNumber/tagNo.module.css.js +0 -14
- package/dist/src/components/tagNumber/tagNumber.js +0 -38
- package/dist/src/components/toaster/toaster.js +0 -44
- package/dist/src/components/toaster/toaster.module.css.js +0 -16
- package/dist/src/components/toaster/toasters.js +0 -101
- package/dist/src/coreApplication/EchoBarComponent.js +0 -164
- package/dist/src/coreApplication/EchoContent.js +0 -52
- package/dist/src/coreApplication/EchoContent.module.css.js +0 -17
- package/dist/src/coreApplication/EchoContentPanels.js +0 -40
- package/dist/src/coreApplication/EchoEventHandler.js +0 -79
- package/dist/src/coreApplication/EchoEventHandler.module.css.js +0 -14
- package/dist/src/coreApplication/EchoUserInterfaceContextProvider.js +0 -66
- package/dist/src/globalStyles.css.js +0 -6
- package/dist/src/hooks/hookLibrary.js +0 -86
- package/dist/src/hooks/index.js +0 -18
- package/dist/src/hooks/useEchoHistory.js +0 -38
- package/dist/src/hooks/useIsCompactLayout.js +0 -50
- package/dist/src/hooks/useLongPress.js +0 -37
- package/dist/src/hooks/useScreenOrientation.js +0 -62
- package/dist/src/hooks/useScreenValues.js +0 -35
- package/dist/src/hooks/useSemi.js +0 -100
- package/dist/src/hooks/useTagDetails.js +0 -153
- package/dist/src/hooks/useWindowSize.js +0 -62
- package/dist/src/icons/common/CommissionApp-icon.png.js +0 -7
- package/dist/src/icons/common/Evision.svg.js +0 -68
- package/dist/src/icons/common/Fusion.svg.js +0 -111
- package/dist/src/icons/common/McApp.svg.js +0 -70
- package/dist/src/icons/common/Notification.svg.js +0 -81
- package/dist/src/icons/common/ProCoSysIcon.svg.js +0 -68
- package/dist/src/icons/common/Robim.svg.js +0 -66
- package/dist/src/icons/common/SX-logo.png.js +0 -7
- package/dist/src/icons/common/SapLogo.svg.js +0 -95
- package/dist/src/icons/common/SemiIcon.svg.js +0 -82
- package/dist/src/icons/common/Stid.svg.js +0 -65
- package/dist/src/icons/common/TR2000.svg.js +0 -73
- package/dist/src/icons/common/WorkOrder.svg.js +0 -71
- package/dist/src/icons/common/Yammer.svg.js +0 -65
- package/dist/src/icons/common/satos-logo.png.js +0 -7
- package/dist/src/icons/edsIons.js +0 -15
- package/dist/src/icons/equinor-logo.js +0 -62
- package/dist/src/icons/logo_ee.js +0 -37
- package/dist/src/icons/search.js +0 -35
- package/dist/src/index.js +0 -218
- package/dist/src/index2.js +0 -205
- package/dist/src/services/api/api-manager.js +0 -190
- package/dist/src/services/api/api-plantinfo.js +0 -196
- package/dist/src/services/api/api-plants.js +0 -75
- package/dist/src/services/api/api-realtimedata.js +0 -55
- package/dist/src/services/api/api-tag-details.js +0 -69
- package/dist/src/services/api/api-tags.js +0 -88
- package/dist/src/services/api/api-version.js +0 -124
- package/dist/src/services/componentRegistry/componentRegistry.js +0 -69
- package/dist/src/services/echopediaAnalyticsModule/echopediaAnalyticsModule.js +0 -10
- package/dist/src/services/eventCallbacks/plantChanged.js +0 -42
- package/dist/src/services/eventHubActions/toastActions.js +0 -18
- package/dist/src/theme/themeConst.js +0 -75
- package/dist/src/types/extensions.js +0 -10
- package/dist/src/types/legend.js +0 -58
- package/dist/src/types/pingableSources.js +0 -11
- package/dist/src/utils/copyText.js +0 -67
- package/dist/src/utils/eventHandlerUtils.js +0 -11
- package/dist/src/utils/legendUtils.js +0 -168
- package/dist/src/utils/navigationUtils.js +0 -28
- package/dist/src/utils/plantInfo.js +0 -535
- package/dist/src/utils/plantsDataUtils.js +0 -35
- package/dist/src/utils/projectSelectorUtils.js +0 -19
- package/dist/src/utils/startup.js +0 -89
- package/dist/src/utils/taskCache.js +0 -89
|
@@ -1,435 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4
|
-
|
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
-
|
|
7
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
|
-
|
|
9
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
-
|
|
11
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
-
|
|
13
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
-
|
|
15
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
16
|
-
|
|
17
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
18
|
-
|
|
19
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
-
|
|
21
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
22
|
-
|
|
23
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
24
|
-
|
|
25
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
26
|
-
|
|
27
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
28
|
-
|
|
29
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
30
|
-
|
|
31
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
32
|
-
|
|
33
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
34
|
-
|
|
35
|
-
Object.defineProperty(exports, '__esModule', {
|
|
36
|
-
value: true
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
var ILogger = require('./ILogger.js');
|
|
40
|
-
|
|
41
|
-
var Loggers = require('./Loggers.js'); // Licensed to the .NET Foundation under one or more agreements.
|
|
42
|
-
// Version token that will be replaced by the prepack command
|
|
43
|
-
|
|
44
|
-
/** The version of the SignalR client. */
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
var VERSION = "6.0.6";
|
|
48
|
-
/** @private */
|
|
49
|
-
|
|
50
|
-
var Arg = /*#__PURE__*/function () {
|
|
51
|
-
function Arg() {
|
|
52
|
-
_classCallCheck(this, Arg);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
_createClass(Arg, null, [{
|
|
56
|
-
key: "isRequired",
|
|
57
|
-
value: function isRequired(val, name) {
|
|
58
|
-
if (val === null || val === undefined) {
|
|
59
|
-
throw new Error("The '".concat(name, "' argument is required."));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}, {
|
|
63
|
-
key: "isNotEmpty",
|
|
64
|
-
value: function isNotEmpty(val, name) {
|
|
65
|
-
if (!val || val.match(/^\s*$/)) {
|
|
66
|
-
throw new Error("The '".concat(name, "' argument should not be empty."));
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}, {
|
|
70
|
-
key: "isIn",
|
|
71
|
-
value: function isIn(val, values, name) {
|
|
72
|
-
// TypeScript enums have keys for **both** the name and the value of each enum member on the type itself.
|
|
73
|
-
if (!(val in values)) {
|
|
74
|
-
throw new Error("Unknown ".concat(name, " value: ").concat(val, "."));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}]);
|
|
78
|
-
|
|
79
|
-
return Arg;
|
|
80
|
-
}();
|
|
81
|
-
/** @private */
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
var Platform = /*#__PURE__*/function () {
|
|
85
|
-
function Platform() {
|
|
86
|
-
_classCallCheck(this, Platform);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
_createClass(Platform, null, [{
|
|
90
|
-
key: "isBrowser",
|
|
91
|
-
get: // react-native has a window but no document so we should check both
|
|
92
|
-
function get() {
|
|
93
|
-
return (typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" && _typeof(window.document) === "object";
|
|
94
|
-
} // WebWorkers don't have a window object so the isBrowser check would fail
|
|
95
|
-
|
|
96
|
-
}, {
|
|
97
|
-
key: "isWebWorker",
|
|
98
|
-
get: function get() {
|
|
99
|
-
return (typeof self === "undefined" ? "undefined" : _typeof(self)) === "object" && "importScripts" in self;
|
|
100
|
-
} // react-native has a window but no document
|
|
101
|
-
|
|
102
|
-
}, {
|
|
103
|
-
key: "isReactNative",
|
|
104
|
-
get: function get() {
|
|
105
|
-
return (typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" && typeof window.document === "undefined";
|
|
106
|
-
} // Node apps shouldn't have a window object, but WebWorkers don't either
|
|
107
|
-
// so we need to check for both WebWorker and window
|
|
108
|
-
|
|
109
|
-
}, {
|
|
110
|
-
key: "isNode",
|
|
111
|
-
get: function get() {
|
|
112
|
-
return !this.isBrowser && !this.isWebWorker && !this.isReactNative;
|
|
113
|
-
}
|
|
114
|
-
}]);
|
|
115
|
-
|
|
116
|
-
return Platform;
|
|
117
|
-
}();
|
|
118
|
-
/** @private */
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
function getDataDetail(data, includeContent) {
|
|
122
|
-
var detail = "";
|
|
123
|
-
|
|
124
|
-
if (isArrayBuffer(data)) {
|
|
125
|
-
detail = "Binary data of length ".concat(data.byteLength);
|
|
126
|
-
|
|
127
|
-
if (includeContent) {
|
|
128
|
-
detail += ". Content: '".concat(formatArrayBuffer(data), "'");
|
|
129
|
-
}
|
|
130
|
-
} else if (typeof data === "string") {
|
|
131
|
-
detail = "String data of length ".concat(data.length);
|
|
132
|
-
|
|
133
|
-
if (includeContent) {
|
|
134
|
-
detail += ". Content: '".concat(data, "'");
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
return detail;
|
|
139
|
-
}
|
|
140
|
-
/** @private */
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
function formatArrayBuffer(data) {
|
|
144
|
-
var view = new Uint8Array(data); // Uint8Array.map only supports returning another Uint8Array?
|
|
145
|
-
|
|
146
|
-
var str = "";
|
|
147
|
-
view.forEach(function (num) {
|
|
148
|
-
var pad = num < 16 ? "0" : "";
|
|
149
|
-
str += "0x".concat(pad).concat(num.toString(16), " ");
|
|
150
|
-
}); // Trim of trailing space.
|
|
151
|
-
|
|
152
|
-
return str.substr(0, str.length - 1);
|
|
153
|
-
} // Also in signalr-protocol-msgpack/Utils.ts
|
|
154
|
-
|
|
155
|
-
/** @private */
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
function isArrayBuffer(val) {
|
|
159
|
-
return val && typeof ArrayBuffer !== "undefined" && (val instanceof ArrayBuffer || // Sometimes we get an ArrayBuffer that doesn't satisfy instanceof
|
|
160
|
-
val.constructor && val.constructor.name === "ArrayBuffer");
|
|
161
|
-
}
|
|
162
|
-
/** @private */
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
function sendMessage(_x, _x2, _x3, _x4, _x5, _x6, _x7) {
|
|
166
|
-
return _sendMessage.apply(this, arguments);
|
|
167
|
-
}
|
|
168
|
-
/** @private */
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
function _sendMessage() {
|
|
172
|
-
_sendMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(logger, transportName, httpClient, url, accessTokenFactory, content, options) {
|
|
173
|
-
var headers, token, _getUserAgentHeader, _getUserAgentHeader2, name, value, responseType, response;
|
|
174
|
-
|
|
175
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
176
|
-
while (1) {
|
|
177
|
-
switch (_context.prev = _context.next) {
|
|
178
|
-
case 0:
|
|
179
|
-
headers = {};
|
|
180
|
-
|
|
181
|
-
if (!accessTokenFactory) {
|
|
182
|
-
_context.next = 6;
|
|
183
|
-
break;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
_context.next = 4;
|
|
187
|
-
return accessTokenFactory();
|
|
188
|
-
|
|
189
|
-
case 4:
|
|
190
|
-
token = _context.sent;
|
|
191
|
-
|
|
192
|
-
if (token) {
|
|
193
|
-
headers = _defineProperty({}, "Authorization", "Bearer ".concat(token));
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
case 6:
|
|
197
|
-
_getUserAgentHeader = getUserAgentHeader(), _getUserAgentHeader2 = _slicedToArray(_getUserAgentHeader, 2), name = _getUserAgentHeader2[0], value = _getUserAgentHeader2[1];
|
|
198
|
-
headers[name] = value;
|
|
199
|
-
logger.log(ILogger.LogLevel.Trace, "(".concat(transportName, " transport) sending data. ").concat(getDataDetail(content, options.logMessageContent), "."));
|
|
200
|
-
responseType = isArrayBuffer(content) ? "arraybuffer" : "text";
|
|
201
|
-
_context.next = 12;
|
|
202
|
-
return httpClient.post(url, {
|
|
203
|
-
content: content,
|
|
204
|
-
headers: _objectSpread(_objectSpread({}, headers), options.headers),
|
|
205
|
-
responseType: responseType,
|
|
206
|
-
timeout: options.timeout,
|
|
207
|
-
withCredentials: options.withCredentials
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
case 12:
|
|
211
|
-
response = _context.sent;
|
|
212
|
-
logger.log(ILogger.LogLevel.Trace, "(".concat(transportName, " transport) request complete. Response status: ").concat(response.statusCode, "."));
|
|
213
|
-
|
|
214
|
-
case 14:
|
|
215
|
-
case "end":
|
|
216
|
-
return _context.stop();
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}, _callee);
|
|
220
|
-
}));
|
|
221
|
-
return _sendMessage.apply(this, arguments);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
function createLogger(logger) {
|
|
225
|
-
if (logger === undefined) {
|
|
226
|
-
return new ConsoleLogger(ILogger.LogLevel.Information);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
if (logger === null) {
|
|
230
|
-
return Loggers.NullLogger.instance;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
if (logger.log !== undefined) {
|
|
234
|
-
return logger;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
return new ConsoleLogger(logger);
|
|
238
|
-
}
|
|
239
|
-
/** @private */
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
var SubjectSubscription = /*#__PURE__*/function () {
|
|
243
|
-
function SubjectSubscription(subject, observer) {
|
|
244
|
-
_classCallCheck(this, SubjectSubscription);
|
|
245
|
-
|
|
246
|
-
this._subject = subject;
|
|
247
|
-
this._observer = observer;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
_createClass(SubjectSubscription, [{
|
|
251
|
-
key: "dispose",
|
|
252
|
-
value: function dispose() {
|
|
253
|
-
var index = this._subject.observers.indexOf(this._observer);
|
|
254
|
-
|
|
255
|
-
if (index > -1) {
|
|
256
|
-
this._subject.observers.splice(index, 1);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
if (this._subject.observers.length === 0 && this._subject.cancelCallback) {
|
|
260
|
-
this._subject.cancelCallback()["catch"](function (_) {});
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}]);
|
|
264
|
-
|
|
265
|
-
return SubjectSubscription;
|
|
266
|
-
}();
|
|
267
|
-
/** @private */
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
var ConsoleLogger = /*#__PURE__*/function () {
|
|
271
|
-
function ConsoleLogger(minimumLogLevel) {
|
|
272
|
-
_classCallCheck(this, ConsoleLogger);
|
|
273
|
-
|
|
274
|
-
this._minLevel = minimumLogLevel;
|
|
275
|
-
this.out = console;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
_createClass(ConsoleLogger, [{
|
|
279
|
-
key: "log",
|
|
280
|
-
value: function log(logLevel, message) {
|
|
281
|
-
if (logLevel >= this._minLevel) {
|
|
282
|
-
var msg = "[".concat(new Date().toISOString(), "] ").concat(ILogger.LogLevel[logLevel], ": ").concat(message);
|
|
283
|
-
|
|
284
|
-
switch (logLevel) {
|
|
285
|
-
case ILogger.LogLevel.Critical:
|
|
286
|
-
case ILogger.LogLevel.Error:
|
|
287
|
-
this.out.error(msg);
|
|
288
|
-
break;
|
|
289
|
-
|
|
290
|
-
case ILogger.LogLevel.Warning:
|
|
291
|
-
this.out.warn(msg);
|
|
292
|
-
break;
|
|
293
|
-
|
|
294
|
-
case ILogger.LogLevel.Information:
|
|
295
|
-
this.out.info(msg);
|
|
296
|
-
break;
|
|
297
|
-
|
|
298
|
-
default:
|
|
299
|
-
// console.debug only goes to attached debuggers in Node, so we use console.log for Trace and Debug
|
|
300
|
-
this.out.log(msg);
|
|
301
|
-
break;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}]);
|
|
306
|
-
|
|
307
|
-
return ConsoleLogger;
|
|
308
|
-
}();
|
|
309
|
-
/** @private */
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
function getUserAgentHeader() {
|
|
313
|
-
var userAgentHeaderName = "X-SignalR-User-Agent";
|
|
314
|
-
|
|
315
|
-
if (Platform.isNode) {
|
|
316
|
-
userAgentHeaderName = "User-Agent";
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
return [userAgentHeaderName, constructUserAgent(VERSION, getOsName(), getRuntime(), getRuntimeVersion())];
|
|
320
|
-
}
|
|
321
|
-
/** @private */
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
function constructUserAgent(version, os, runtime, runtimeVersion) {
|
|
325
|
-
// Microsoft SignalR/[Version] ([Detailed Version]; [Operating System]; [Runtime]; [Runtime Version])
|
|
326
|
-
var userAgent = "Microsoft SignalR/";
|
|
327
|
-
var majorAndMinor = version.split(".");
|
|
328
|
-
userAgent += "".concat(majorAndMinor[0], ".").concat(majorAndMinor[1]);
|
|
329
|
-
userAgent += " (".concat(version, "; ");
|
|
330
|
-
|
|
331
|
-
if (os && os !== "") {
|
|
332
|
-
userAgent += "".concat(os, "; ");
|
|
333
|
-
} else {
|
|
334
|
-
userAgent += "Unknown OS; ";
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
userAgent += "".concat(runtime);
|
|
338
|
-
|
|
339
|
-
if (runtimeVersion) {
|
|
340
|
-
userAgent += "; ".concat(runtimeVersion);
|
|
341
|
-
} else {
|
|
342
|
-
userAgent += "; Unknown Runtime Version";
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
userAgent += ")";
|
|
346
|
-
return userAgent;
|
|
347
|
-
} // eslint-disable-next-line spaced-comment
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
function getOsName() {
|
|
351
|
-
if (Platform.isNode) {
|
|
352
|
-
switch (process.platform) {
|
|
353
|
-
case "win32":
|
|
354
|
-
return "Windows NT";
|
|
355
|
-
|
|
356
|
-
case "darwin":
|
|
357
|
-
return "macOS";
|
|
358
|
-
|
|
359
|
-
case "linux":
|
|
360
|
-
return "Linux";
|
|
361
|
-
|
|
362
|
-
default:
|
|
363
|
-
return process.platform;
|
|
364
|
-
}
|
|
365
|
-
} else {
|
|
366
|
-
return "";
|
|
367
|
-
}
|
|
368
|
-
} // eslint-disable-next-line spaced-comment
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
function getRuntimeVersion() {
|
|
372
|
-
if (Platform.isNode) {
|
|
373
|
-
return process.versions.node;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
return undefined;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
function getRuntime() {
|
|
380
|
-
if (Platform.isNode) {
|
|
381
|
-
return "NodeJS";
|
|
382
|
-
} else {
|
|
383
|
-
return "Browser";
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
/** @private */
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
function getErrorString(e) {
|
|
390
|
-
if (e.stack) {
|
|
391
|
-
return e.stack;
|
|
392
|
-
} else if (e.message) {
|
|
393
|
-
return e.message;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
return "".concat(e);
|
|
397
|
-
}
|
|
398
|
-
/** @private */
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
function getGlobalThis() {
|
|
402
|
-
// globalThis is semi-new and not available in Node until v12
|
|
403
|
-
if (typeof globalThis !== "undefined") {
|
|
404
|
-
return globalThis;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
if (typeof self !== "undefined") {
|
|
408
|
-
return self;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
if (typeof window !== "undefined") {
|
|
412
|
-
return window;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
if (typeof global !== "undefined") {
|
|
416
|
-
return global;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
throw new Error("could not find global");
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
exports.Arg = Arg;
|
|
423
|
-
exports.ConsoleLogger = ConsoleLogger;
|
|
424
|
-
exports.Platform = Platform;
|
|
425
|
-
exports.SubjectSubscription = SubjectSubscription;
|
|
426
|
-
exports.VERSION = VERSION;
|
|
427
|
-
exports.constructUserAgent = constructUserAgent;
|
|
428
|
-
exports.createLogger = createLogger;
|
|
429
|
-
exports.formatArrayBuffer = formatArrayBuffer;
|
|
430
|
-
exports.getDataDetail = getDataDetail;
|
|
431
|
-
exports.getErrorString = getErrorString;
|
|
432
|
-
exports.getGlobalThis = getGlobalThis;
|
|
433
|
-
exports.getUserAgentHeader = getUserAgentHeader;
|
|
434
|
-
exports.isArrayBuffer = isArrayBuffer;
|
|
435
|
-
exports.sendMessage = sendMessage;
|