Bläddra i källkod

修改音频上传 和mq

zs 1 år sedan
förälder
incheckning
158b7f0b78
100 ändrade filer med 9256 tillägg och 22 borttagningar
  1. 91 0
      common/websocket.js
  2. 1 0
      config.js
  3. 25 22
      main.js
  4. 12 0
      node_modules/.bin/node-gyp-build
  5. 12 0
      node_modules/.bin/node-gyp-build-optional
  6. 17 0
      node_modules/.bin/node-gyp-build-optional.cmd
  7. 28 0
      node_modules/.bin/node-gyp-build-optional.ps1
  8. 12 0
      node_modules/.bin/node-gyp-build-test
  9. 17 0
      node_modules/.bin/node-gyp-build-test.cmd
  10. 28 0
      node_modules/.bin/node-gyp-build-test.ps1
  11. 17 0
      node_modules/.bin/node-gyp-build.cmd
  12. 28 0
      node_modules/.bin/node-gyp-build.ps1
  13. 179 0
      node_modules/.package-lock.json
  14. 202 0
      node_modules/@stomp/stompjs/LICENSE
  15. 147 0
      node_modules/@stomp/stompjs/README.md
  16. 6 0
      node_modules/@stomp/stompjs/bundles/package.json
  17. 1879 0
      node_modules/@stomp/stompjs/bundles/stomp.umd.js
  18. 1 0
      node_modules/@stomp/stompjs/bundles/stomp.umd.js.map
  19. 1 0
      node_modules/@stomp/stompjs/bundles/stomp.umd.min.js
  20. 5 0
      node_modules/@stomp/stompjs/esm6/augment-websocket.d.ts
  21. 27 0
      node_modules/@stomp/stompjs/esm6/augment-websocket.js
  22. 1 0
      node_modules/@stomp/stompjs/esm6/augment-websocket.js.map
  23. 11 0
      node_modules/@stomp/stompjs/esm6/byte.d.ts
  24. 14 0
      node_modules/@stomp/stompjs/esm6/byte.js
  25. 1 0
      node_modules/@stomp/stompjs/esm6/byte.js.map
  26. 495 0
      node_modules/@stomp/stompjs/esm6/client.d.ts
  27. 594 0
      node_modules/@stomp/stompjs/esm6/client.js
  28. 1 0
      node_modules/@stomp/stompjs/esm6/client.js.map
  29. 155 0
      node_modules/@stomp/stompjs/esm6/compatibility/compat-client.d.ts
  30. 241 0
      node_modules/@stomp/stompjs/esm6/compatibility/compat-client.js
  31. 1 0
      node_modules/@stomp/stompjs/esm6/compatibility/compat-client.js.map
  32. 14 0
      node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.d.ts
  33. 23 0
      node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.js
  34. 1 0
      node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.js.map
  35. 67 0
      node_modules/@stomp/stompjs/esm6/compatibility/stomp.d.ts
  36. 102 0
      node_modules/@stomp/stompjs/esm6/compatibility/stomp.js
  37. 1 0
      node_modules/@stomp/stompjs/esm6/compatibility/stomp.js.map
  38. 95 0
      node_modules/@stomp/stompjs/esm6/frame-impl.d.ts
  39. 171 0
      node_modules/@stomp/stompjs/esm6/frame-impl.js
  40. 1 0
      node_modules/@stomp/stompjs/esm6/frame-impl.js.map
  41. 35 0
      node_modules/@stomp/stompjs/esm6/i-frame.d.ts
  42. 2 0
      node_modules/@stomp/stompjs/esm6/i-frame.js
  43. 1 0
      node_modules/@stomp/stompjs/esm6/i-frame.js.map
  44. 32 0
      node_modules/@stomp/stompjs/esm6/i-message.d.ts
  45. 2 0
      node_modules/@stomp/stompjs/esm6/i-message.js
  46. 1 0
      node_modules/@stomp/stompjs/esm6/i-message.js.map
  47. 21 0
      node_modules/@stomp/stompjs/esm6/i-transaction.d.ts
  48. 2 0
      node_modules/@stomp/stompjs/esm6/i-transaction.js
  49. 1 0
      node_modules/@stomp/stompjs/esm6/i-transaction.js.map
  50. 13 0
      node_modules/@stomp/stompjs/esm6/index.d.ts
  51. 15 0
      node_modules/@stomp/stompjs/esm6/index.js
  52. 1 0
      node_modules/@stomp/stompjs/esm6/index.js.map
  53. 70 0
      node_modules/@stomp/stompjs/esm6/parser.d.ts
  54. 222 0
      node_modules/@stomp/stompjs/esm6/parser.js
  55. 1 0
      node_modules/@stomp/stompjs/esm6/parser.js.map
  56. 116 0
      node_modules/@stomp/stompjs/esm6/stomp-config.d.ts
  57. 10 0
      node_modules/@stomp/stompjs/esm6/stomp-config.js
  58. 1 0
      node_modules/@stomp/stompjs/esm6/stomp-config.js.map
  59. 69 0
      node_modules/@stomp/stompjs/esm6/stomp-handler.d.ts
  60. 391 0
      node_modules/@stomp/stompjs/esm6/stomp-handler.js
  61. 1 0
      node_modules/@stomp/stompjs/esm6/stomp-handler.js.map
  62. 12 0
      node_modules/@stomp/stompjs/esm6/stomp-headers.d.ts
  63. 12 0
      node_modules/@stomp/stompjs/esm6/stomp-headers.js
  64. 1 0
      node_modules/@stomp/stompjs/esm6/stomp-headers.js.map
  65. 16 0
      node_modules/@stomp/stompjs/esm6/stomp-subscription.d.ts
  66. 2 0
      node_modules/@stomp/stompjs/esm6/stomp-subscription.js
  67. 1 0
      node_modules/@stomp/stompjs/esm6/stomp-subscription.js.map
  68. 167 0
      node_modules/@stomp/stompjs/esm6/types.d.ts
  69. 20 0
      node_modules/@stomp/stompjs/esm6/types.js
  70. 1 0
      node_modules/@stomp/stompjs/esm6/types.js.map
  71. 39 0
      node_modules/@stomp/stompjs/esm6/versions.d.ts
  72. 49 0
      node_modules/@stomp/stompjs/esm6/versions.js
  73. 1 0
      node_modules/@stomp/stompjs/esm6/versions.js.map
  74. 1 0
      node_modules/@stomp/stompjs/index.d.ts
  75. 64 0
      node_modules/@stomp/stompjs/package.json
  76. 39 0
      node_modules/@stomp/stompjs/src/augment-websocket.ts
  77. 13 0
      node_modules/@stomp/stompjs/src/byte.ts
  78. 867 0
      node_modules/@stomp/stompjs/src/client.ts
  79. 269 0
      node_modules/@stomp/stompjs/src/compatibility/compat-client.ts
  80. 26 0
      node_modules/@stomp/stompjs/src/compatibility/heartbeat-info.ts
  81. 118 0
      node_modules/@stomp/stompjs/src/compatibility/stomp.ts
  82. 254 0
      node_modules/@stomp/stompjs/src/frame-impl.ts
  83. 41 0
      node_modules/@stomp/stompjs/src/i-frame.ts
  84. 35 0
      node_modules/@stomp/stompjs/src/i-message.ts
  85. 23 0
      node_modules/@stomp/stompjs/src/i-transaction.ts
  86. 15 0
      node_modules/@stomp/stompjs/src/index.ts
  87. 267 0
      node_modules/@stomp/stompjs/src/parser.ts
  88. 149 0
      node_modules/@stomp/stompjs/src/stomp-config.ts
  89. 555 0
      node_modules/@stomp/stompjs/src/stomp-handler.ts
  90. 12 0
      node_modules/@stomp/stompjs/src/stomp-headers.ts
  91. 18 0
      node_modules/@stomp/stompjs/src/stomp-subscription.ts
  92. 184 0
      node_modules/@stomp/stompjs/src/types.ts
  93. 50 0
      node_modules/@stomp/stompjs/src/versions.ts
  94. 20 0
      node_modules/bufferutil/LICENSE
  95. 78 0
      node_modules/bufferutil/README.md
  96. 29 0
      node_modules/bufferutil/binding.gyp
  97. 34 0
      node_modules/bufferutil/fallback.js
  98. 7 0
      node_modules/bufferutil/index.js
  99. 36 0
      node_modules/bufferutil/package.json
  100. 0 0
      node_modules/bufferutil/prebuilds/darwin-x64+arm64/node.napi.node

+ 91 - 0
common/websocket.js

@@ -0,0 +1,91 @@
+import Stomp from 'stompjs'
+
+let socketOpen = false
+let socketMsgQueue = []
+
+export default {
+	client: null,
+	init(url, header, connectWS) {
+		if (this.client) {
+			return Promise.resolve(this.client)
+		}
+
+		return new Promise((resolve, reject) => {
+			const ws = {
+				send: this.sendMessage,
+				onopen: null,
+				onmessage: null,
+			}
+
+			uni.connectSocket({
+				url,
+				header
+			})
+
+			uni.onSocketOpen(function(res) {
+				console.log('WebSocket连接已打开!', res)
+
+				socketOpen = true
+				for (let i = 0; i < socketMsgQueue.length; i++) {
+					ws.send(socketMsgQueue[i])
+				}
+				socketMsgQueue = []
+
+				ws.onopen && ws.onopen()
+			})
+
+			uni.onSocketMessage(function(res) {
+				// ios 缺少 0x00 导致解析失败
+				if (res && res.data) {
+					let value = res.data;
+					let code = value.charCodeAt(value.length - 1);
+					if (code !== 0x00) {
+						value += String.fromCharCode(0x00);
+						res.data = value;
+					}
+				}
+				ws.onmessage && ws.onmessage(res)
+			})
+
+			uni.onSocketError(function(res) {
+				console.log('WebSocket 错误!', res)
+			})
+
+			uni.onSocketClose((res) => {
+				this.client = null
+				socketOpen = false
+				console.log('WebSocket 已关闭!', res)
+				if (res.code !== 1000) {
+					setTimeout(() => {
+						connectWS()
+					}, 3000)
+				}
+			})
+
+			Stomp.setInterval = function(interval, f) {
+				return setInterval(f, interval)
+			}
+			Stomp.clearInterval = function(id) {
+				return clearInterval(id)
+			}
+			const client = (this.client = Stomp.over(ws))
+			// 关闭连接
+			client.close = () => {
+				uni.closeSocket()
+			}
+			client.connect(header, function() {
+				console.log('stomp connected')
+				resolve(client)
+			})
+		})
+	},
+	sendMessage(message) {
+		if (socketOpen) {
+			uni.sendSocketMessage({
+				data: message,
+			})
+		} else {
+			socketMsgQueue.push(message)
+		}
+	},
+}

+ 1 - 0
config.js

@@ -10,6 +10,7 @@ if (system.uniPlatform == 'mp-weixin') {
 export default {
 	serverFile: 'http://192.168.1.113:8890',
 	serverUrl: 'http://192.168.1.113:8890',
+	brokerURL: 'ws://192.168.1.197:15674/ws',
 	wx_projectkey: wx_projectkey,
 	wx_miniProgram: wx_min.miniProgram,
 	system: system,

+ 25 - 22
main.js

@@ -4,37 +4,40 @@ import App from './App'
 
 Vue.config.productionTip = false
 
-// jwt解析
-import weappJwt from '@/common/weapp-jwt.js';
-Vue.prototype.$jwt = weappJwt;
-// requset请求
-import {
+// jwt解析
+import weappJwt from '@/common/weapp-jwt.js';
+Vue.prototype.$jwt = weappJwt;
+// requset请求
+import {
 	requestBase,
-	requestApp,
-	requestFile
-} from '@/common/api.js';
+	requestApp,
+	requestFile
+} from '@/common/api.js';
 Vue.prototype.$api = requestBase;
-Vue.prototype.$app = requestApp;
-Vue.prototype.$apifile = requestFile;
-// 配置文件
-import config from '@/config.js';
+Vue.prototype.$app = requestApp;
+Vue.prototype.$apifile = requestFile;
+// 配置文件
+import config from '@/config.js';
+
 Vue.prototype.$config = config;
 
 App.mpType = 'app'
 
 const app = new Vue({
-    ...App
+	...App
 })
 app.$mount()
-// #endif
-
+// #endif
+
 // #ifdef VUE3
-import { createSSRApp } from 'vue'
-import App from './App.vue'
-export function createApp() {
-  const app = createSSRApp(App)
-  return {
-    app
-  }
+import {
+	createSSRApp
+} from 'vue'
+import App from './App.vue'
+export function createApp() {
+	const app = createSSRApp(App)
+	return {
+		app
+	}
 }
 // #endif

+ 12 - 0
node_modules/.bin/node-gyp-build

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../node-gyp-build/bin.js" "$@"
+else 
+  exec node  "$basedir/../node-gyp-build/bin.js" "$@"
+fi

+ 12 - 0
node_modules/.bin/node-gyp-build-optional

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../node-gyp-build/optional.js" "$@"
+else 
+  exec node  "$basedir/../node-gyp-build/optional.js" "$@"
+fi

+ 17 - 0
node_modules/.bin/node-gyp-build-optional.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\node-gyp-build\optional.js" %*

+ 28 - 0
node_modules/.bin/node-gyp-build-optional.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../node-gyp-build/optional.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../node-gyp-build/optional.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../node-gyp-build/optional.js" $args
+  } else {
+    & "node$exe"  "$basedir/../node-gyp-build/optional.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 12 - 0
node_modules/.bin/node-gyp-build-test

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../node-gyp-build/build-test.js" "$@"
+else 
+  exec node  "$basedir/../node-gyp-build/build-test.js" "$@"
+fi

+ 17 - 0
node_modules/.bin/node-gyp-build-test.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\node-gyp-build\build-test.js" %*

+ 28 - 0
node_modules/.bin/node-gyp-build-test.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../node-gyp-build/build-test.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../node-gyp-build/build-test.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../node-gyp-build/build-test.js" $args
+  } else {
+    & "node$exe"  "$basedir/../node-gyp-build/build-test.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 17 - 0
node_modules/.bin/node-gyp-build.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\node-gyp-build\bin.js" %*

+ 28 - 0
node_modules/.bin/node-gyp-build.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../node-gyp-build/bin.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../node-gyp-build/bin.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../node-gyp-build/bin.js" $args
+  } else {
+    & "node$exe"  "$basedir/../node-gyp-build/bin.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 179 - 0
node_modules/.package-lock.json

@@ -3,6 +3,100 @@
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
+    "node_modules/@stomp/stompjs": {
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/@stomp/stompjs/-/stompjs-7.0.0.tgz",
+      "integrity": "sha512-fGdq4wPDnSV/KyOsjq4P+zLc8MFWC3lMmP5FBgLWKPJTYcuCbAIrnRGjB7q2jHZdYCOD5vxLuFoKIYLy5/u8Pw=="
+    },
+    "node_modules/bufferutil": {
+      "version": "4.0.8",
+      "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz",
+      "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==",
+      "hasInstallScript": true,
+      "optional": true,
+      "dependencies": {
+        "node-gyp-build": "^4.3.0"
+      },
+      "engines": {
+        "node": ">=6.14.2"
+      }
+    },
+    "node_modules/d": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
+      "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
+      "optional": true,
+      "dependencies": {
+        "es5-ext": "^0.10.50",
+        "type": "^1.0.1"
+      }
+    },
+    "node_modules/debug": {
+      "version": "2.6.9",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+      "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+      "optional": true,
+      "dependencies": {
+        "ms": "2.0.0"
+      }
+    },
+    "node_modules/es5-ext": {
+      "version": "0.10.62",
+      "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz",
+      "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==",
+      "hasInstallScript": true,
+      "optional": true,
+      "dependencies": {
+        "es6-iterator": "^2.0.3",
+        "es6-symbol": "^3.1.3",
+        "next-tick": "^1.1.0"
+      },
+      "engines": {
+        "node": ">=0.10"
+      }
+    },
+    "node_modules/es6-iterator": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
+      "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==",
+      "optional": true,
+      "dependencies": {
+        "d": "1",
+        "es5-ext": "^0.10.35",
+        "es6-symbol": "^3.1.1"
+      }
+    },
+    "node_modules/es6-symbol": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
+      "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
+      "optional": true,
+      "dependencies": {
+        "d": "^1.0.1",
+        "ext": "^1.1.2"
+      }
+    },
+    "node_modules/ext": {
+      "version": "1.7.0",
+      "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz",
+      "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==",
+      "optional": true,
+      "dependencies": {
+        "type": "^2.7.2"
+      }
+    },
+    "node_modules/ext/node_modules/type": {
+      "version": "2.7.2",
+      "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz",
+      "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==",
+      "optional": true
+    },
+    "node_modules/is-typedarray": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+      "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==",
+      "optional": true
+    },
     "node_modules/moment": {
       "version": "2.29.4",
       "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
@@ -10,6 +104,91 @@
       "engines": {
         "node": "*"
       }
+    },
+    "node_modules/ms": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+      "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+      "optional": true
+    },
+    "node_modules/next-tick": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
+      "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==",
+      "optional": true
+    },
+    "node_modules/node-gyp-build": {
+      "version": "4.6.1",
+      "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz",
+      "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==",
+      "optional": true,
+      "bin": {
+        "node-gyp-build": "bin.js",
+        "node-gyp-build-optional": "optional.js",
+        "node-gyp-build-test": "build-test.js"
+      }
+    },
+    "node_modules/stompjs": {
+      "version": "2.3.3",
+      "resolved": "https://registry.npmjs.org/stompjs/-/stompjs-2.3.3.tgz",
+      "integrity": "sha512-5l/Ogz0DTFW7TrpHF0LAETGqM/so8UxNJvYZjJKqcX31EVprSQgnGkO80tZctPC/lFBDUrSFiTG3xd0R27XAIA==",
+      "optionalDependencies": {
+        "websocket": "latest"
+      }
+    },
+    "node_modules/type": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
+      "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==",
+      "optional": true
+    },
+    "node_modules/typedarray-to-buffer": {
+      "version": "3.1.5",
+      "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
+      "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
+      "optional": true,
+      "dependencies": {
+        "is-typedarray": "^1.0.0"
+      }
+    },
+    "node_modules/utf-8-validate": {
+      "version": "5.0.10",
+      "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz",
+      "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==",
+      "hasInstallScript": true,
+      "optional": true,
+      "dependencies": {
+        "node-gyp-build": "^4.3.0"
+      },
+      "engines": {
+        "node": ">=6.14.2"
+      }
+    },
+    "node_modules/websocket": {
+      "version": "1.0.34",
+      "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz",
+      "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==",
+      "optional": true,
+      "dependencies": {
+        "bufferutil": "^4.0.1",
+        "debug": "^2.2.0",
+        "es5-ext": "^0.10.50",
+        "typedarray-to-buffer": "^3.1.5",
+        "utf-8-validate": "^5.0.2",
+        "yaeti": "^0.0.6"
+      },
+      "engines": {
+        "node": ">=4.0.0"
+      }
+    },
+    "node_modules/yaeti": {
+      "version": "0.0.6",
+      "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz",
+      "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==",
+      "optional": true,
+      "engines": {
+        "node": ">=0.10.32"
+      }
     }
   }
 }

+ 202 - 0
node_modules/@stomp/stompjs/LICENSE

@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright 2018-2020 Deepak Kumar <deepak@kreatio.com>
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

+ 147 - 0
node_modules/@stomp/stompjs/README.md

@@ -0,0 +1,147 @@
+# STOMP.js
+
+[![Firefox, Chrome](https://github.com/stomp-js/stompjs/actions/workflows/linux.yml/badge.svg?branch=develop)](https://github.com/stomp-js/stompjs/actions/workflows/linux.yml)
+[![Safari, Edge](https://github.com/stomp-js/stompjs/actions/workflows/osx.yml/badge.svg?branch=develop)](https://github.com/stomp-js/stompjs/actions/workflows/osx.yml)
+[![NodeJS Test](https://github.com/stomp-js/stompjs/actions/workflows/node-js.yml/badge.svg?branch=develop)](https://github.com/stomp-js/stompjs/actions/workflows/node-js.yml)
+[![API docs refresh](https://github.com/stomp-js/stompjs/actions/workflows/docs-refresh.yml/badge.svg?branch=develop)](https://github.com/stomp-js/stompjs/actions/workflows/docs-refresh.yml)
+
+This library provides a STOMP over WebSocket client for Web browser and node.js applications.
+
+Please visit https://stomp-js.github.io/ for guides, FAQs and API docs.
+
+# Introduction
+
+This library allows you to connect to a STOMP broker over WebSocket. This library
+supports complete STOMP specifications including all current protocol variants. Most
+popular messaging brokers support STOMP and STOMP over WebSockets out-of-the-box
+or using plugins.
+
+## Features
+
+- Simple API to interact with the Stomp protocol
+- Support for v1.2, v1.1 and v1.0 of the Stomp protocol
+- Support for fallback options in case of WebSocket unavailable
+- Browser and Node.js support
+- Option to use STOMP over TCP
+- Binary payload support
+
+## Usage
+
+### Browser
+
+```html
+<!--
+    JSPM Generator Import Map
+    Edit URL: https://generator.jspm.io/#U2NgYGBkDM0rySzJSU1hcCguyc8t0AeTWcUO5noGega6SakliaYAYTzJAykA
+  -->
+<script type="importmap">
+  {
+    "imports": {
+      "@stomp/stompjs": "https://ga.jspm.io/npm:@stomp/stompjs@7.0.0/esm6/index.js"
+    }
+  }
+</script>
+
+<!-- ES Module Shims: Import maps polyfill for modules browsers without import maps support (all except Chrome 89+) -->
+<script
+  async
+  src="https://ga.jspm.io/npm:es-module-shims@1.5.1/dist/es-module-shims.js"
+  crossorigin="anonymous"
+></script>
+
+<script type="module">
+  import { Client } from '@stomp/stompjs';
+
+  const client = new Client({
+    brokerURL: 'ws://localhost:15674/ws',
+    onConnect: () => {
+      client.subscribe('/topic/test01', message =>
+        console.log(`Received: ${message.body}`)
+      );
+      client.publish({ destination: '/topic/test01', body: 'First Message' });
+    },
+  });
+
+  client.activate();
+</script>
+```
+
+### NodeJS
+
+```bash
+$ npm install @stomp/stompjs ws
+```
+
+```javascript
+import { Client } from '@stomp/stompjs';
+
+import { WebSocket } from 'ws';
+Object.assign(global, { WebSocket });
+
+const client = new Client({
+  brokerURL: 'ws://localhost:15674/ws',
+  onConnect: () => {
+    client.subscribe('/topic/test01', message =>
+      console.log(`Received: ${message.body}`)
+    );
+    client.publish({ destination: '/topic/test01', body: 'First Message' });
+  },
+});
+
+client.activate();
+```
+
+## Further information
+
+The API documentation is hosted as GitHub pages for the StompJS family of libraries.
+You may head straight to the https://stomp-js.github.io/api-docs/latest/
+
+This library comes with detailed usage instructions. Please find it at
+[Usage instructions](https://stomp-js.github.io/guide/stompjs/using-stompjs-v5.html).
+Check out other guides at https://stomp-js.github.io/.
+
+There is quite detailed API documentation,
+you should start at https://stomp-js.github.io/api-docs/latest/classes/Client.html.
+
+## Upgrading
+
+if you were using an older version of this library, you would need to make changes
+to your code. Head to
+[Upgrading](https://stomp-js.github.io/#upgrading).
+
+## Usage with RxJS
+
+https://github.com/stomp-js/rx-stomp is based on this library and exposes the entire functionality
+offered by this library as RxJS Observables.
+
+## TypeScript definitions
+
+The npm package includes TypeScript definitions, so there is no need to install it separately.
+
+## Change-log
+
+Please visit [Change Log](Change-log.md).
+
+## Contributing
+
+If you want to understand the code, develop, or contribute. Please visit
+[How to contribute](Contribute.md).
+
+## Authors
+
+- [Jeff Mesnil](http://jmesnil.net/)
+- [Jeff Lindsay](http://github.com/progrium)
+- [Vanessa Williams](http://github.com/fridgebuzz)
+- [Deepak Kumar](https://github.com/kum-deepak)
+- [Astha Deep](https://github.com/astha183)
+- [Dillon Sellars](https://github.com/dillon-sellars)
+- [Jimi Charalampidis](https://github.com/jimic)
+- [Raul](https://github.com/rulonder)
+- [Dimitar Georgiev](https://github.com/iMitaka)
+- [Genadi](https://github.com/genadis)
+- [Bobohuochai](https://github.com/bobohuochai)
+- [Sailai](https://github.com/sailai)
+
+## License
+
+[License](LICENSE) - Apache-2.0

+ 6 - 0
node_modules/@stomp/stompjs/bundles/package.json

@@ -0,0 +1,6 @@
+{
+  "name": "spec",
+  "version": "1.0.0",
+  "description": "Just for running specs with commonjs modules",
+  "type": "commonjs"
+}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1879 - 0
node_modules/@stomp/stompjs/bundles/stomp.umd.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
node_modules/@stomp/stompjs/bundles/stomp.umd.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
node_modules/@stomp/stompjs/bundles/stomp.umd.min.js


+ 5 - 0
node_modules/@stomp/stompjs/esm6/augment-websocket.d.ts

@@ -0,0 +1,5 @@
+import { IStompSocket } from './types.js';
+/**
+ * @internal
+ */
+export declare function augmentWebsocket(webSocket: IStompSocket, debug: (msg: string) => void): void;

+ 27 - 0
node_modules/@stomp/stompjs/esm6/augment-websocket.js

@@ -0,0 +1,27 @@
+/**
+ * @internal
+ */
+export function augmentWebsocket(webSocket, debug) {
+    webSocket.terminate = function () {
+        const noOp = () => { };
+        // set all callbacks to no op
+        this.onerror = noOp;
+        this.onmessage = noOp;
+        this.onopen = noOp;
+        const ts = new Date();
+        const id = Math.random().toString().substring(2, 8); // A simulated id
+        const origOnClose = this.onclose;
+        // Track delay in actual closure of the socket
+        this.onclose = closeEvent => {
+            const delay = new Date().getTime() - ts.getTime();
+            debug(`Discarded socket (#${id})  closed after ${delay}ms, with code/reason: ${closeEvent.code}/${closeEvent.reason}`);
+        };
+        this.close();
+        origOnClose?.call(webSocket, {
+            code: 4001,
+            reason: `Quick discarding socket (#${id}) without waiting for the shutdown sequence.`,
+            wasClean: false,
+        });
+    };
+}
+//# sourceMappingURL=augment-websocket.js.map

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
node_modules/@stomp/stompjs/esm6/augment-websocket.js.map


+ 11 - 0
node_modules/@stomp/stompjs/esm6/byte.d.ts

@@ -0,0 +1,11 @@
+/**
+ * Some byte values, used as per STOMP specifications.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export declare const BYTE: {
+    LF: string;
+    NULL: string;
+};

+ 14 - 0
node_modules/@stomp/stompjs/esm6/byte.js

@@ -0,0 +1,14 @@
+/**
+ * Some byte values, used as per STOMP specifications.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export const BYTE = {
+    // LINEFEED byte (octet 10)
+    LF: '\x0A',
+    // NULL byte (octet 0)
+    NULL: '\x00',
+};
+//# sourceMappingURL=byte.js.map

+ 1 - 0
node_modules/@stomp/stompjs/esm6/byte.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"byte.js","sourceRoot":"","sources":["../src/byte.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,2BAA2B;IAC3B,EAAE,EAAE,MAAM;IACV,sBAAsB;IACtB,IAAI,EAAE,MAAM;CACb,CAAC"}

+ 495 - 0
node_modules/@stomp/stompjs/esm6/client.d.ts

@@ -0,0 +1,495 @@
+import { ITransaction } from './i-transaction.js';
+import { StompConfig } from './stomp-config.js';
+import { StompHeaders } from './stomp-headers.js';
+import { StompSubscription } from './stomp-subscription.js';
+import { ActivationState, closeEventCallbackType, debugFnType, frameCallbackType, IPublishParams, IStompSocket, messageCallbackType, wsErrorCallbackType } from './types.js';
+import { Versions } from './versions.js';
+/**
+ * STOMP Client Class.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare class Client {
+    /**
+     * The URL for the STOMP broker to connect to.
+     * Typically like `"ws://broker.329broker.com:15674/ws"` or `"wss://broker.329broker.com:15674/ws"`.
+     *
+     * Only one of this or [Client#webSocketFactory]{@link Client#webSocketFactory} need to be set.
+     * If both are set, [Client#webSocketFactory]{@link Client#webSocketFactory} will be used.
+     *
+     * If your environment does not support WebSockets natively, please refer to
+     * [Polyfills]{@link https://stomp-js.github.io/guide/stompjs/rx-stomp/ng2-stompjs/pollyfils-for-stompjs-v5.html}.
+     */
+    brokerURL: string | undefined;
+    /**
+     * STOMP versions to attempt during STOMP handshake. By default, versions `1.2`, `1.1`, and `1.0` are attempted.
+     *
+     * Example:
+     * ```javascript
+     *        // Try only versions 1.1 and 1.0
+     *        client.stompVersions = new Versions(['1.1', '1.0'])
+     * ```
+     */
+    stompVersions: Versions;
+    /**
+     * This function should return a WebSocket or a similar (e.g. SockJS) object.
+     * If your environment does not support WebSockets natively, please refer to
+     * [Polyfills]{@link https://stomp-js.github.io/guide/stompjs/rx-stomp/ng2-stompjs/pollyfils-for-stompjs-v5.html}.
+     * If your STOMP Broker supports WebSockets, prefer setting [Client#brokerURL]{@link Client#brokerURL}.
+     *
+     * If both this and [Client#brokerURL]{@link Client#brokerURL} are set, this will be used.
+     *
+     * Example:
+     * ```javascript
+     *        // use a WebSocket
+     *        client.webSocketFactory= function () {
+     *          return new WebSocket("wss://broker.329broker.com:15674/ws");
+     *        };
+     *
+     *        // Typical usage with SockJS
+     *        client.webSocketFactory= function () {
+     *          return new SockJS("http://broker.329broker.com/stomp");
+     *        };
+     * ```
+     */
+    webSocketFactory: (() => IStompSocket) | undefined;
+    /**
+     * Will retry if Stomp connection is not established in specified milliseconds.
+     * Default 0, which switches off automatic reconnection.
+     */
+    connectionTimeout: number;
+    private _connectionWatcher;
+    /**
+     *  automatically reconnect with delay in milliseconds, set to 0 to disable.
+     */
+    reconnectDelay: number;
+    /**
+     * Incoming heartbeat interval in milliseconds. Set to 0 to disable.
+     */
+    heartbeatIncoming: number;
+    /**
+     * Outgoing heartbeat interval in milliseconds. Set to 0 to disable.
+     */
+    heartbeatOutgoing: number;
+    /**
+     * This switches on a non-standard behavior while sending WebSocket packets.
+     * It splits larger (text) packets into chunks of [maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.
+     * Only Java Spring brokers seem to support this mode.
+     *
+     * WebSockets, by itself, split large (text) packets,
+     * so it is not needed with a truly compliant STOMP/WebSocket broker.
+     * Setting it for such a broker will cause large messages to fail.
+     *
+     * `false` by default.
+     *
+     * Binary frames are never split.
+     */
+    splitLargeFrames: boolean;
+    /**
+     * See [splitLargeFrames]{@link Client#splitLargeFrames}.
+     * This has no effect if [splitLargeFrames]{@link Client#splitLargeFrames} is `false`.
+     */
+    maxWebSocketChunkSize: number;
+    /**
+     * Usually the
+     * [type of WebSocket frame]{@link https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send#Parameters}
+     * is automatically decided by type of the payload.
+     * Default is `false`, which should work with all compliant brokers.
+     *
+     * Set this flag to force binary frames.
+     */
+    forceBinaryWSFrames: boolean;
+    /**
+     * A bug in ReactNative chops a string on occurrence of a NULL.
+     * See issue [https://github.com/stomp-js/stompjs/issues/89]{@link https://github.com/stomp-js/stompjs/issues/89}.
+     * This makes incoming WebSocket messages invalid STOMP packets.
+     * Setting this flag attempts to reverse the damage by appending a NULL.
+     * If the broker splits a large message into multiple WebSocket messages,
+     * this flag will cause data loss and abnormal termination of connection.
+     *
+     * This is not an ideal solution, but a stop gap until the underlying issue is fixed at ReactNative library.
+     */
+    appendMissingNULLonIncoming: boolean;
+    /**
+     * Underlying WebSocket instance, READONLY.
+     */
+    get webSocket(): IStompSocket | undefined;
+    /**
+     * Connection headers, important keys - `login`, `passcode`, `host`.
+     * Though STOMP 1.2 standard marks these keys to be present, check your broker documentation for
+     * details specific to your broker.
+     */
+    connectHeaders: StompHeaders;
+    /**
+     * Disconnection headers.
+     */
+    get disconnectHeaders(): StompHeaders;
+    set disconnectHeaders(value: StompHeaders);
+    private _disconnectHeaders;
+    /**
+     * This function will be called for any unhandled messages.
+     * It is useful for receiving messages sent to RabbitMQ temporary queues.
+     *
+     * It can also get invoked with stray messages while the server is processing
+     * a request to [Client#unsubscribe]{@link Client#unsubscribe}
+     * from an endpoint.
+     *
+     * The actual {@link IMessage} will be passed as parameter to the callback.
+     */
+    onUnhandledMessage: messageCallbackType;
+    /**
+     * STOMP brokers can be requested to notify when an operation is actually completed.
+     * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}. See
+     * [Client#watchForReceipt]{@link Client#watchForReceipt} for examples.
+     *
+     * The actual {@link IFrame} will be passed as parameter to the callback.
+     */
+    onUnhandledReceipt: frameCallbackType;
+    /**
+     * Will be invoked if {@link IFrame} of an unknown type is received from the STOMP broker.
+     *
+     * The actual {@link IFrame} will be passed as parameter to the callback.
+     */
+    onUnhandledFrame: frameCallbackType;
+    /**
+     * `true` if there is an active connection to STOMP Broker
+     */
+    get connected(): boolean;
+    /**
+     * Callback, invoked on before a connection to the STOMP broker.
+     *
+     * You can change options on the client, which will impact the immediate connecting.
+     * It is valid to call [Client#decativate]{@link Client#deactivate} in this callback.
+     *
+     * As of version 5.1, this callback can be
+     * [async](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)
+     * (i.e., it can return a
+     * [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)).
+     * In that case, connect will be called only after the Promise is resolved.
+     * This can be used to reliably fetch credentials, access token etc. from some other service
+     * in an asynchronous way.
+     */
+    beforeConnect: () => void | Promise<void>;
+    /**
+     * Callback, invoked on every successful connection to the STOMP broker.
+     *
+     * The actual {@link IFrame} will be passed as parameter to the callback.
+     * Sometimes clients will like to use headers from this frame.
+     */
+    onConnect: frameCallbackType;
+    /**
+     * Callback, invoked on every successful disconnection from the STOMP broker. It will not be invoked if
+     * the STOMP broker disconnected due to an error.
+     *
+     * The actual Receipt {@link IFrame} acknowledging the DISCONNECT will be passed as parameter to the callback.
+     *
+     * The way STOMP protocol is designed, the connection may close/terminate without the client
+     * receiving the Receipt {@link IFrame} acknowledging the DISCONNECT.
+     * You might find [Client#onWebSocketClose]{@link Client#onWebSocketClose} more appropriate to watch
+     * STOMP broker disconnects.
+     */
+    onDisconnect: frameCallbackType;
+    /**
+     * Callback, invoked on an ERROR frame received from the STOMP Broker.
+     * A compliant STOMP Broker will close the connection after this type of frame.
+     * Please check broker specific documentation for exact behavior.
+     *
+     * The actual {@link IFrame} will be passed as parameter to the callback.
+     */
+    onStompError: frameCallbackType;
+    /**
+     * Callback, invoked when underlying WebSocket is closed.
+     *
+     * Actual [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}
+     * is passed as parameter to the callback.
+     */
+    onWebSocketClose: closeEventCallbackType;
+    /**
+     * Callback, invoked when underlying WebSocket raises an error.
+     *
+     * Actual [Event]{@link https://developer.mozilla.org/en-US/docs/Web/API/Event}
+     * is passed as parameter to the callback.
+     */
+    onWebSocketError: wsErrorCallbackType;
+    /**
+     * Set it to log the actual raw communication with the broker.
+     * When unset, it logs headers of the parsed frames.
+     *
+     * Changes effect from the next broker reconnect.
+     *
+     * **Caution: this assumes that frames only have valid UTF8 strings.**
+     */
+    logRawCommunication: boolean;
+    /**
+     * By default, debug messages are discarded. To log to `console` following can be used:
+     *
+     * ```javascript
+     *        client.debug = function(str) {
+     *          console.log(str);
+     *        };
+     * ```
+     *
+     * Currently this method does not support levels of log. Be aware that the
+     * output can be quite verbose
+     * and may contain sensitive information (like passwords, tokens etc.).
+     */
+    debug: debugFnType;
+    /**
+     * Browsers do not immediately close WebSockets when `.close` is issued.
+     * This may cause reconnection to take a significantly long time in case
+     *  of some types of failures.
+     * In case of incoming heartbeat failure, this experimental flag instructs
+     * the library to discard the socket immediately
+     * (even before it is actually closed).
+     */
+    discardWebsocketOnCommFailure: boolean;
+    /**
+     * version of STOMP protocol negotiated with the server, READONLY
+     */
+    get connectedVersion(): string | undefined;
+    private _stompHandler;
+    /**
+     * if the client is active (connected or going to reconnect)
+     */
+    get active(): boolean;
+    /**
+     * It will be called on state change.
+     *
+     * When deactivating, it may go from ACTIVE to INACTIVE without entering DEACTIVATING.
+     */
+    onChangeState: (state: ActivationState) => void;
+    private _changeState;
+    /**
+     * Activation state.
+     *
+     * It will usually be ACTIVE or INACTIVE.
+     * When deactivating, it may go from ACTIVE to INACTIVE without entering DEACTIVATING.
+     */
+    state: ActivationState;
+    private _reconnector;
+    /**
+     * Create an instance.
+     */
+    constructor(conf?: StompConfig);
+    /**
+     * Update configuration.
+     */
+    configure(conf: StompConfig): void;
+    /**
+     * Initiate the connection with the broker.
+     * If the connection breaks, as per [Client#reconnectDelay]{@link Client#reconnectDelay},
+     * it will keep trying to reconnect.
+     *
+     * Call [Client#deactivate]{@link Client#deactivate} to disconnect and stop reconnection attempts.
+     */
+    activate(): void;
+    private _connect;
+    private _createWebSocket;
+    private _schedule_reconnect;
+    /**
+     * Disconnect if connected and stop auto reconnect loop.
+     * Appropriate callbacks will be invoked if there is an underlying STOMP connection.
+     *
+     * This call is async. It will resolve immediately if there is no underlying active websocket,
+     * otherwise, it will resolve after the underlying websocket is properly disposed of.
+     *
+     * It is not an error to invoke this method more than once.
+     * Each of those would resolve on completion of deactivation.
+     *
+     * To reactivate, you can call [Client#activate]{@link Client#activate}.
+     *
+     * Experimental: pass `force: true` to immediately discard the underlying connection.
+     * This mode will skip both the STOMP and the Websocket shutdown sequences.
+     * In some cases, browsers take a long time in the Websocket shutdown
+     * if the underlying connection had gone stale.
+     * Using this mode can speed up.
+     * When this mode is used, the actual Websocket may linger for a while
+     * and the broker may not realize that the connection is no longer in use.
+     *
+     * It is possible to invoke this method initially without the `force` option
+     * and subsequently, say after a wait, with the `force` option.
+     */
+    deactivate(options?: {
+        force?: boolean;
+    }): Promise<void>;
+    /**
+     * Force disconnect if there is an active connection by directly closing the underlying WebSocket.
+     * This is different from a normal disconnect where a DISCONNECT sequence is carried out with the broker.
+     * After forcing disconnect, automatic reconnect will be attempted.
+     * To stop further reconnects call [Client#deactivate]{@link Client#deactivate} as well.
+     */
+    forceDisconnect(): void;
+    private _disposeStompHandler;
+    /**
+     * Send a message to a named destination. Refer to your STOMP broker documentation for types
+     * and naming of destinations.
+     *
+     * STOMP protocol specifies and suggests some headers and also allows broker-specific headers.
+     *
+     * `body` must be String.
+     * You will need to covert the payload to string in case it is not string (e.g. JSON).
+     *
+     * To send a binary message body, use `binaryBody` parameter. It should be a
+     * [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).
+     * Sometimes brokers may not support binary frames out of the box.
+     * Please check your broker documentation.
+     *
+     * `content-length` header is automatically added to the STOMP Frame sent to the broker.
+     * Set `skipContentLengthHeader` to indicate that `content-length` header should not be added.
+     * For binary messages, `content-length` header is always added.
+     *
+     * Caution: The broker will, most likely, report an error and disconnect
+     * if the message body has NULL octet(s) and `content-length` header is missing.
+     *
+     * ```javascript
+     *        client.publish({destination: "/queue/test", headers: {priority: 9}, body: "Hello, STOMP"});
+     *
+     *        // Only destination is mandatory parameter
+     *        client.publish({destination: "/queue/test", body: "Hello, STOMP"});
+     *
+     *        // Skip content-length header in the frame to the broker
+     *        client.publish({"/queue/test", body: "Hello, STOMP", skipContentLengthHeader: true});
+     *
+     *        var binaryData = generateBinaryData(); // This need to be of type Uint8Array
+     *        // setting content-type header is not mandatory, however a good practice
+     *        client.publish({destination: '/topic/special', binaryBody: binaryData,
+     *                         headers: {'content-type': 'application/octet-stream'}});
+     * ```
+     */
+    publish(params: IPublishParams): void;
+    private _checkConnection;
+    /**
+     * STOMP brokers may carry out operation asynchronously and allow requesting for acknowledgement.
+     * To request an acknowledgement, a `receipt` header needs to be sent with the actual request.
+     * The value (say receipt-id) for this header needs to be unique for each use.
+     * Typically, a sequence, a UUID, a random number or a combination may be used.
+     *
+     * A complaint broker will send a RECEIPT frame when an operation has actually been completed.
+     * The operation needs to be matched based on the value of the receipt-id.
+     *
+     * This method allows watching for a receipt and invoking the callback
+     *  when the corresponding receipt has been received.
+     *
+     * The actual {@link IFrame} will be passed as parameter to the callback.
+     *
+     * Example:
+     * ```javascript
+     *        // Subscribing with acknowledgement
+     *        let receiptId = randomText();
+     *
+     *        client.watchForReceipt(receiptId, function() {
+     *          // Will be called after server acknowledges
+     *        });
+     *
+     *        client.subscribe(TEST.destination, onMessage, {receipt: receiptId});
+     *
+     *
+     *        // Publishing with acknowledgement
+     *        receiptId = randomText();
+     *
+     *        client.watchForReceipt(receiptId, function() {
+     *          // Will be called after server acknowledges
+     *        });
+     *        client.publish({destination: TEST.destination, headers: {receipt: receiptId}, body: msg});
+     * ```
+     */
+    watchForReceipt(receiptId: string, callback: frameCallbackType): void;
+    /**
+     * Subscribe to a STOMP Broker location. The callback will be invoked for each
+     * received message with the {@link IMessage} as argument.
+     *
+     * Note: The library will generate a unique ID if there is none provided in the headers.
+     *       To use your own ID, pass it using the `headers` argument.
+     *
+     * ```javascript
+     *        callback = function(message) {
+     *        // called when the client receives a STOMP message from the server
+     *          if (message.body) {
+     *            alert("got message with body " + message.body)
+     *          } else {
+     *            alert("got empty message");
+     *          }
+     *        });
+     *
+     *        var subscription = client.subscribe("/queue/test", callback);
+     *
+     *        // Explicit subscription id
+     *        var mySubId = 'my-subscription-id-001';
+     *        var subscription = client.subscribe(destination, callback, { id: mySubId });
+     * ```
+     */
+    subscribe(destination: string, callback: messageCallbackType, headers?: StompHeaders): StompSubscription;
+    /**
+     * It is preferable to unsubscribe from a subscription by calling
+     * `unsubscribe()` directly on {@link StompSubscription} returned by `client.subscribe()`:
+     *
+     * ```javascript
+     *        var subscription = client.subscribe(destination, onmessage);
+     *        // ...
+     *        subscription.unsubscribe();
+     * ```
+     *
+     * See: https://stomp.github.com/stomp-specification-1.2.html#UNSUBSCRIBE UNSUBSCRIBE Frame
+     */
+    unsubscribe(id: string, headers?: StompHeaders): void;
+    /**
+     * Start a transaction, the returned {@link ITransaction} has methods - [commit]{@link ITransaction#commit}
+     * and [abort]{@link ITransaction#abort}.
+     *
+     * `transactionId` is optional, if not passed the library will generate it internally.
+     */
+    begin(transactionId?: string): ITransaction;
+    /**
+     * Commit a transaction.
+     *
+     * It is preferable to commit a transaction by calling [commit]{@link ITransaction#commit} directly on
+     * {@link ITransaction} returned by [client.begin]{@link Client#begin}.
+     *
+     * ```javascript
+     *        var tx = client.begin(txId);
+     *        //...
+     *        tx.commit();
+     * ```
+     */
+    commit(transactionId: string): void;
+    /**
+     * Abort a transaction.
+     * It is preferable to abort a transaction by calling [abort]{@link ITransaction#abort} directly on
+     * {@link ITransaction} returned by [client.begin]{@link Client#begin}.
+     *
+     * ```javascript
+     *        var tx = client.begin(txId);
+     *        //...
+     *        tx.abort();
+     * ```
+     */
+    abort(transactionId: string): void;
+    /**
+     * ACK a message. It is preferable to acknowledge a message by calling [ack]{@link IMessage#ack} directly
+     * on the {@link IMessage} handled by a subscription callback:
+     *
+     * ```javascript
+     *        var callback = function (message) {
+     *          // process the message
+     *          // acknowledge it
+     *          message.ack();
+     *        };
+     *        client.subscribe(destination, callback, {'ack': 'client'});
+     * ```
+     */
+    ack(messageId: string, subscriptionId: string, headers?: StompHeaders): void;
+    /**
+     * NACK a message. It is preferable to acknowledge a message by calling [nack]{@link IMessage#nack} directly
+     * on the {@link IMessage} handled by a subscription callback:
+     *
+     * ```javascript
+     *        var callback = function (message) {
+     *          // process the message
+     *          // an error occurs, nack it
+     *          message.nack();
+     *        };
+     *        client.subscribe(destination, callback, {'ack': 'client'});
+     * ```
+     */
+    nack(messageId: string, subscriptionId: string, headers?: StompHeaders): void;
+}

+ 594 - 0
node_modules/@stomp/stompjs/esm6/client.js

@@ -0,0 +1,594 @@
+import { StompHandler } from './stomp-handler.js';
+import { ActivationState, StompSocketState, } from './types.js';
+import { Versions } from './versions.js';
+/**
+ * STOMP Client Class.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class Client {
+    /**
+     * Create an instance.
+     */
+    constructor(conf = {}) {
+        /**
+         * STOMP versions to attempt during STOMP handshake. By default, versions `1.2`, `1.1`, and `1.0` are attempted.
+         *
+         * Example:
+         * ```javascript
+         *        // Try only versions 1.1 and 1.0
+         *        client.stompVersions = new Versions(['1.1', '1.0'])
+         * ```
+         */
+        this.stompVersions = Versions.default;
+        /**
+         * Will retry if Stomp connection is not established in specified milliseconds.
+         * Default 0, which switches off automatic reconnection.
+         */
+        this.connectionTimeout = 0;
+        /**
+         *  automatically reconnect with delay in milliseconds, set to 0 to disable.
+         */
+        this.reconnectDelay = 5000;
+        /**
+         * Incoming heartbeat interval in milliseconds. Set to 0 to disable.
+         */
+        this.heartbeatIncoming = 10000;
+        /**
+         * Outgoing heartbeat interval in milliseconds. Set to 0 to disable.
+         */
+        this.heartbeatOutgoing = 10000;
+        /**
+         * This switches on a non-standard behavior while sending WebSocket packets.
+         * It splits larger (text) packets into chunks of [maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.
+         * Only Java Spring brokers seem to support this mode.
+         *
+         * WebSockets, by itself, split large (text) packets,
+         * so it is not needed with a truly compliant STOMP/WebSocket broker.
+         * Setting it for such a broker will cause large messages to fail.
+         *
+         * `false` by default.
+         *
+         * Binary frames are never split.
+         */
+        this.splitLargeFrames = false;
+        /**
+         * See [splitLargeFrames]{@link Client#splitLargeFrames}.
+         * This has no effect if [splitLargeFrames]{@link Client#splitLargeFrames} is `false`.
+         */
+        this.maxWebSocketChunkSize = 8 * 1024;
+        /**
+         * Usually the
+         * [type of WebSocket frame]{@link https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send#Parameters}
+         * is automatically decided by type of the payload.
+         * Default is `false`, which should work with all compliant brokers.
+         *
+         * Set this flag to force binary frames.
+         */
+        this.forceBinaryWSFrames = false;
+        /**
+         * A bug in ReactNative chops a string on occurrence of a NULL.
+         * See issue [https://github.com/stomp-js/stompjs/issues/89]{@link https://github.com/stomp-js/stompjs/issues/89}.
+         * This makes incoming WebSocket messages invalid STOMP packets.
+         * Setting this flag attempts to reverse the damage by appending a NULL.
+         * If the broker splits a large message into multiple WebSocket messages,
+         * this flag will cause data loss and abnormal termination of connection.
+         *
+         * This is not an ideal solution, but a stop gap until the underlying issue is fixed at ReactNative library.
+         */
+        this.appendMissingNULLonIncoming = false;
+        /**
+         * Browsers do not immediately close WebSockets when `.close` is issued.
+         * This may cause reconnection to take a significantly long time in case
+         *  of some types of failures.
+         * In case of incoming heartbeat failure, this experimental flag instructs
+         * the library to discard the socket immediately
+         * (even before it is actually closed).
+         */
+        this.discardWebsocketOnCommFailure = false;
+        /**
+         * Activation state.
+         *
+         * It will usually be ACTIVE or INACTIVE.
+         * When deactivating, it may go from ACTIVE to INACTIVE without entering DEACTIVATING.
+         */
+        this.state = ActivationState.INACTIVE;
+        // No op callbacks
+        const noOp = () => { };
+        this.debug = noOp;
+        this.beforeConnect = noOp;
+        this.onConnect = noOp;
+        this.onDisconnect = noOp;
+        this.onUnhandledMessage = noOp;
+        this.onUnhandledReceipt = noOp;
+        this.onUnhandledFrame = noOp;
+        this.onStompError = noOp;
+        this.onWebSocketClose = noOp;
+        this.onWebSocketError = noOp;
+        this.logRawCommunication = false;
+        this.onChangeState = noOp;
+        // These parameters would typically get proper values before connect is called
+        this.connectHeaders = {};
+        this._disconnectHeaders = {};
+        // Apply configuration
+        this.configure(conf);
+    }
+    /**
+     * Underlying WebSocket instance, READONLY.
+     */
+    get webSocket() {
+        return this._stompHandler?._webSocket;
+    }
+    /**
+     * Disconnection headers.
+     */
+    get disconnectHeaders() {
+        return this._disconnectHeaders;
+    }
+    set disconnectHeaders(value) {
+        this._disconnectHeaders = value;
+        if (this._stompHandler) {
+            this._stompHandler.disconnectHeaders = this._disconnectHeaders;
+        }
+    }
+    /**
+     * `true` if there is an active connection to STOMP Broker
+     */
+    get connected() {
+        return !!this._stompHandler && this._stompHandler.connected;
+    }
+    /**
+     * version of STOMP protocol negotiated with the server, READONLY
+     */
+    get connectedVersion() {
+        return this._stompHandler ? this._stompHandler.connectedVersion : undefined;
+    }
+    /**
+     * if the client is active (connected or going to reconnect)
+     */
+    get active() {
+        return this.state === ActivationState.ACTIVE;
+    }
+    _changeState(state) {
+        this.state = state;
+        this.onChangeState(state);
+    }
+    /**
+     * Update configuration.
+     */
+    configure(conf) {
+        // bulk assign all properties to this
+        Object.assign(this, conf);
+    }
+    /**
+     * Initiate the connection with the broker.
+     * If the connection breaks, as per [Client#reconnectDelay]{@link Client#reconnectDelay},
+     * it will keep trying to reconnect.
+     *
+     * Call [Client#deactivate]{@link Client#deactivate} to disconnect and stop reconnection attempts.
+     */
+    activate() {
+        const _activate = () => {
+            if (this.active) {
+                this.debug('Already ACTIVE, ignoring request to activate');
+                return;
+            }
+            this._changeState(ActivationState.ACTIVE);
+            this._connect();
+        };
+        // if it is deactivating, wait for it to complete before activating.
+        if (this.state === ActivationState.DEACTIVATING) {
+            this.debug('Waiting for deactivation to finish before activating');
+            this.deactivate().then(() => {
+                _activate();
+            });
+        }
+        else {
+            _activate();
+        }
+    }
+    async _connect() {
+        await this.beforeConnect();
+        if (this._stompHandler) {
+            this.debug('There is already a stompHandler, skipping the call to connect');
+            return;
+        }
+        if (!this.active) {
+            this.debug('Client has been marked inactive, will not attempt to connect');
+            return;
+        }
+        // setup connection watcher
+        if (this.connectionTimeout > 0) {
+            // clear first
+            if (this._connectionWatcher) {
+                clearTimeout(this._connectionWatcher);
+            }
+            this._connectionWatcher = setTimeout(() => {
+                if (this.connected) {
+                    return;
+                }
+                // Connection not established, close the underlying socket
+                // a reconnection will be attempted
+                this.debug(`Connection not established in ${this.connectionTimeout}ms, closing socket`);
+                this.forceDisconnect();
+            }, this.connectionTimeout);
+        }
+        this.debug('Opening Web Socket...');
+        // Get the actual WebSocket (or a similar object)
+        const webSocket = this._createWebSocket();
+        this._stompHandler = new StompHandler(this, webSocket, {
+            debug: this.debug,
+            stompVersions: this.stompVersions,
+            connectHeaders: this.connectHeaders,
+            disconnectHeaders: this._disconnectHeaders,
+            heartbeatIncoming: this.heartbeatIncoming,
+            heartbeatOutgoing: this.heartbeatOutgoing,
+            splitLargeFrames: this.splitLargeFrames,
+            maxWebSocketChunkSize: this.maxWebSocketChunkSize,
+            forceBinaryWSFrames: this.forceBinaryWSFrames,
+            logRawCommunication: this.logRawCommunication,
+            appendMissingNULLonIncoming: this.appendMissingNULLonIncoming,
+            discardWebsocketOnCommFailure: this.discardWebsocketOnCommFailure,
+            onConnect: frame => {
+                // Successfully connected, stop the connection watcher
+                if (this._connectionWatcher) {
+                    clearTimeout(this._connectionWatcher);
+                    this._connectionWatcher = undefined;
+                }
+                if (!this.active) {
+                    this.debug('STOMP got connected while deactivate was issued, will disconnect now');
+                    this._disposeStompHandler();
+                    return;
+                }
+                this.onConnect(frame);
+            },
+            onDisconnect: frame => {
+                this.onDisconnect(frame);
+            },
+            onStompError: frame => {
+                this.onStompError(frame);
+            },
+            onWebSocketClose: evt => {
+                this._stompHandler = undefined; // a new one will be created in case of a reconnect
+                if (this.state === ActivationState.DEACTIVATING) {
+                    // Mark deactivation complete
+                    this._changeState(ActivationState.INACTIVE);
+                }
+                // The callback is called before attempting to reconnect, this would allow the client
+                // to be `deactivated` in the callback.
+                this.onWebSocketClose(evt);
+                if (this.active) {
+                    this._schedule_reconnect();
+                }
+            },
+            onWebSocketError: evt => {
+                this.onWebSocketError(evt);
+            },
+            onUnhandledMessage: message => {
+                this.onUnhandledMessage(message);
+            },
+            onUnhandledReceipt: frame => {
+                this.onUnhandledReceipt(frame);
+            },
+            onUnhandledFrame: frame => {
+                this.onUnhandledFrame(frame);
+            },
+        });
+        this._stompHandler.start();
+    }
+    _createWebSocket() {
+        let webSocket;
+        if (this.webSocketFactory) {
+            webSocket = this.webSocketFactory();
+        }
+        else if (this.brokerURL) {
+            webSocket = new WebSocket(this.brokerURL, this.stompVersions.protocolVersions());
+        }
+        else {
+            throw new Error('Either brokerURL or webSocketFactory must be provided');
+        }
+        webSocket.binaryType = 'arraybuffer';
+        return webSocket;
+    }
+    _schedule_reconnect() {
+        if (this.reconnectDelay > 0) {
+            this.debug(`STOMP: scheduling reconnection in ${this.reconnectDelay}ms`);
+            this._reconnector = setTimeout(() => {
+                this._connect();
+            }, this.reconnectDelay);
+        }
+    }
+    /**
+     * Disconnect if connected and stop auto reconnect loop.
+     * Appropriate callbacks will be invoked if there is an underlying STOMP connection.
+     *
+     * This call is async. It will resolve immediately if there is no underlying active websocket,
+     * otherwise, it will resolve after the underlying websocket is properly disposed of.
+     *
+     * It is not an error to invoke this method more than once.
+     * Each of those would resolve on completion of deactivation.
+     *
+     * To reactivate, you can call [Client#activate]{@link Client#activate}.
+     *
+     * Experimental: pass `force: true` to immediately discard the underlying connection.
+     * This mode will skip both the STOMP and the Websocket shutdown sequences.
+     * In some cases, browsers take a long time in the Websocket shutdown
+     * if the underlying connection had gone stale.
+     * Using this mode can speed up.
+     * When this mode is used, the actual Websocket may linger for a while
+     * and the broker may not realize that the connection is no longer in use.
+     *
+     * It is possible to invoke this method initially without the `force` option
+     * and subsequently, say after a wait, with the `force` option.
+     */
+    async deactivate(options = {}) {
+        const force = options.force || false;
+        const needToDispose = this.active;
+        let retPromise;
+        if (this.state === ActivationState.INACTIVE) {
+            this.debug(`Already INACTIVE, nothing more to do`);
+            return Promise.resolve();
+        }
+        this._changeState(ActivationState.DEACTIVATING);
+        // Clear if a reconnection was scheduled
+        if (this._reconnector) {
+            clearTimeout(this._reconnector);
+            this._reconnector = undefined;
+        }
+        if (this._stompHandler &&
+            // @ts-ignore - if there is a _stompHandler, there is the webSocket
+            this.webSocket.readyState !== StompSocketState.CLOSED) {
+            const origOnWebSocketClose = this._stompHandler.onWebSocketClose;
+            // we need to wait for the underlying websocket to close
+            retPromise = new Promise((resolve, reject) => {
+                // @ts-ignore - there is a _stompHandler
+                this._stompHandler.onWebSocketClose = evt => {
+                    origOnWebSocketClose(evt);
+                    resolve();
+                };
+            });
+        }
+        else {
+            // indicate that auto reconnect loop should terminate
+            this._changeState(ActivationState.INACTIVE);
+            return Promise.resolve();
+        }
+        if (force) {
+            this._stompHandler?.discardWebsocket();
+        }
+        else if (needToDispose) {
+            this._disposeStompHandler();
+        }
+        return retPromise;
+    }
+    /**
+     * Force disconnect if there is an active connection by directly closing the underlying WebSocket.
+     * This is different from a normal disconnect where a DISCONNECT sequence is carried out with the broker.
+     * After forcing disconnect, automatic reconnect will be attempted.
+     * To stop further reconnects call [Client#deactivate]{@link Client#deactivate} as well.
+     */
+    forceDisconnect() {
+        if (this._stompHandler) {
+            this._stompHandler.forceDisconnect();
+        }
+    }
+    _disposeStompHandler() {
+        // Dispose STOMP Handler
+        if (this._stompHandler) {
+            this._stompHandler.dispose();
+        }
+    }
+    /**
+     * Send a message to a named destination. Refer to your STOMP broker documentation for types
+     * and naming of destinations.
+     *
+     * STOMP protocol specifies and suggests some headers and also allows broker-specific headers.
+     *
+     * `body` must be String.
+     * You will need to covert the payload to string in case it is not string (e.g. JSON).
+     *
+     * To send a binary message body, use `binaryBody` parameter. It should be a
+     * [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).
+     * Sometimes brokers may not support binary frames out of the box.
+     * Please check your broker documentation.
+     *
+     * `content-length` header is automatically added to the STOMP Frame sent to the broker.
+     * Set `skipContentLengthHeader` to indicate that `content-length` header should not be added.
+     * For binary messages, `content-length` header is always added.
+     *
+     * Caution: The broker will, most likely, report an error and disconnect
+     * if the message body has NULL octet(s) and `content-length` header is missing.
+     *
+     * ```javascript
+     *        client.publish({destination: "/queue/test", headers: {priority: 9}, body: "Hello, STOMP"});
+     *
+     *        // Only destination is mandatory parameter
+     *        client.publish({destination: "/queue/test", body: "Hello, STOMP"});
+     *
+     *        // Skip content-length header in the frame to the broker
+     *        client.publish({"/queue/test", body: "Hello, STOMP", skipContentLengthHeader: true});
+     *
+     *        var binaryData = generateBinaryData(); // This need to be of type Uint8Array
+     *        // setting content-type header is not mandatory, however a good practice
+     *        client.publish({destination: '/topic/special', binaryBody: binaryData,
+     *                         headers: {'content-type': 'application/octet-stream'}});
+     * ```
+     */
+    publish(params) {
+        this._checkConnection();
+        // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+        this._stompHandler.publish(params);
+    }
+    _checkConnection() {
+        if (!this.connected) {
+            throw new TypeError('There is no underlying STOMP connection');
+        }
+    }
+    /**
+     * STOMP brokers may carry out operation asynchronously and allow requesting for acknowledgement.
+     * To request an acknowledgement, a `receipt` header needs to be sent with the actual request.
+     * The value (say receipt-id) for this header needs to be unique for each use.
+     * Typically, a sequence, a UUID, a random number or a combination may be used.
+     *
+     * A complaint broker will send a RECEIPT frame when an operation has actually been completed.
+     * The operation needs to be matched based on the value of the receipt-id.
+     *
+     * This method allows watching for a receipt and invoking the callback
+     *  when the corresponding receipt has been received.
+     *
+     * The actual {@link IFrame} will be passed as parameter to the callback.
+     *
+     * Example:
+     * ```javascript
+     *        // Subscribing with acknowledgement
+     *        let receiptId = randomText();
+     *
+     *        client.watchForReceipt(receiptId, function() {
+     *          // Will be called after server acknowledges
+     *        });
+     *
+     *        client.subscribe(TEST.destination, onMessage, {receipt: receiptId});
+     *
+     *
+     *        // Publishing with acknowledgement
+     *        receiptId = randomText();
+     *
+     *        client.watchForReceipt(receiptId, function() {
+     *          // Will be called after server acknowledges
+     *        });
+     *        client.publish({destination: TEST.destination, headers: {receipt: receiptId}, body: msg});
+     * ```
+     */
+    watchForReceipt(receiptId, callback) {
+        this._checkConnection();
+        // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+        this._stompHandler.watchForReceipt(receiptId, callback);
+    }
+    /**
+     * Subscribe to a STOMP Broker location. The callback will be invoked for each
+     * received message with the {@link IMessage} as argument.
+     *
+     * Note: The library will generate a unique ID if there is none provided in the headers.
+     *       To use your own ID, pass it using the `headers` argument.
+     *
+     * ```javascript
+     *        callback = function(message) {
+     *        // called when the client receives a STOMP message from the server
+     *          if (message.body) {
+     *            alert("got message with body " + message.body)
+     *          } else {
+     *            alert("got empty message");
+     *          }
+     *        });
+     *
+     *        var subscription = client.subscribe("/queue/test", callback);
+     *
+     *        // Explicit subscription id
+     *        var mySubId = 'my-subscription-id-001';
+     *        var subscription = client.subscribe(destination, callback, { id: mySubId });
+     * ```
+     */
+    subscribe(destination, callback, headers = {}) {
+        this._checkConnection();
+        // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+        return this._stompHandler.subscribe(destination, callback, headers);
+    }
+    /**
+     * It is preferable to unsubscribe from a subscription by calling
+     * `unsubscribe()` directly on {@link StompSubscription} returned by `client.subscribe()`:
+     *
+     * ```javascript
+     *        var subscription = client.subscribe(destination, onmessage);
+     *        // ...
+     *        subscription.unsubscribe();
+     * ```
+     *
+     * See: https://stomp.github.com/stomp-specification-1.2.html#UNSUBSCRIBE UNSUBSCRIBE Frame
+     */
+    unsubscribe(id, headers = {}) {
+        this._checkConnection();
+        // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+        this._stompHandler.unsubscribe(id, headers);
+    }
+    /**
+     * Start a transaction, the returned {@link ITransaction} has methods - [commit]{@link ITransaction#commit}
+     * and [abort]{@link ITransaction#abort}.
+     *
+     * `transactionId` is optional, if not passed the library will generate it internally.
+     */
+    begin(transactionId) {
+        this._checkConnection();
+        // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+        return this._stompHandler.begin(transactionId);
+    }
+    /**
+     * Commit a transaction.
+     *
+     * It is preferable to commit a transaction by calling [commit]{@link ITransaction#commit} directly on
+     * {@link ITransaction} returned by [client.begin]{@link Client#begin}.
+     *
+     * ```javascript
+     *        var tx = client.begin(txId);
+     *        //...
+     *        tx.commit();
+     * ```
+     */
+    commit(transactionId) {
+        this._checkConnection();
+        // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+        this._stompHandler.commit(transactionId);
+    }
+    /**
+     * Abort a transaction.
+     * It is preferable to abort a transaction by calling [abort]{@link ITransaction#abort} directly on
+     * {@link ITransaction} returned by [client.begin]{@link Client#begin}.
+     *
+     * ```javascript
+     *        var tx = client.begin(txId);
+     *        //...
+     *        tx.abort();
+     * ```
+     */
+    abort(transactionId) {
+        this._checkConnection();
+        // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+        this._stompHandler.abort(transactionId);
+    }
+    /**
+     * ACK a message. It is preferable to acknowledge a message by calling [ack]{@link IMessage#ack} directly
+     * on the {@link IMessage} handled by a subscription callback:
+     *
+     * ```javascript
+     *        var callback = function (message) {
+     *          // process the message
+     *          // acknowledge it
+     *          message.ack();
+     *        };
+     *        client.subscribe(destination, callback, {'ack': 'client'});
+     * ```
+     */
+    ack(messageId, subscriptionId, headers = {}) {
+        this._checkConnection();
+        // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+        this._stompHandler.ack(messageId, subscriptionId, headers);
+    }
+    /**
+     * NACK a message. It is preferable to acknowledge a message by calling [nack]{@link IMessage#nack} directly
+     * on the {@link IMessage} handled by a subscription callback:
+     *
+     * ```javascript
+     *        var callback = function (message) {
+     *          // process the message
+     *          // an error occurs, nack it
+     *          message.nack();
+     *        };
+     *        client.subscribe(destination, callback, {'ack': 'client'});
+     * ```
+     */
+    nack(messageId, subscriptionId, headers = {}) {
+        this._checkConnection();
+        // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+        this._stompHandler.nack(messageId, subscriptionId, headers);
+    }
+}
+//# sourceMappingURL=client.js.map

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
node_modules/@stomp/stompjs/esm6/client.js.map


+ 155 - 0
node_modules/@stomp/stompjs/esm6/compatibility/compat-client.d.ts

@@ -0,0 +1,155 @@
+import { Client } from '../client.js';
+import { StompHeaders } from '../stomp-headers.js';
+import { frameCallbackType, messageCallbackType } from '../types.js';
+/**
+ * Available for backward compatibility, please shift to using {@link Client}.
+ *
+ * **Deprecated**
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * To upgrade, please follow the [Upgrade Guide](https://stomp-js.github.io/guide/stompjs/upgrading-stompjs.html)
+ */
+export declare class CompatClient extends Client {
+    /**
+     * It is no op now. No longer needed. Large packets work out of the box.
+     */
+    maxWebSocketFrameSize: number;
+    /**
+     * Available for backward compatibility, please shift to using {@link Client}
+     * and [Client#webSocketFactory]{@link Client#webSocketFactory}.
+     *
+     * **Deprecated**
+     *
+     * @internal
+     */
+    constructor(webSocketFactory: () => any);
+    private _parseConnect;
+    /**
+     * Available for backward compatibility, please shift to using [Client#activate]{@link Client#activate}.
+     *
+     * **Deprecated**
+     *
+     * The `connect` method accepts different number of arguments and types. See the Overloads list. Use the
+     * version with headers to pass your broker specific options.
+     *
+     * overloads:
+     * - connect(headers, connectCallback)
+     * - connect(headers, connectCallback, errorCallback)
+     * - connect(login, passcode, connectCallback)
+     * - connect(login, passcode, connectCallback, errorCallback)
+     * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback)
+     * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback, host)
+     *
+     * params:
+     * - headers, see [Client#connectHeaders]{@link Client#connectHeaders}
+     * - connectCallback, see [Client#onConnect]{@link Client#onConnect}
+     * - errorCallback, see [Client#onStompError]{@link Client#onStompError}
+     * - closeEventCallback, see [Client#onWebSocketClose]{@link Client#onWebSocketClose}
+     * - login [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)
+     * - passcode [String], [Client#connectHeaders](../classes/Client.html#connectHeaders)
+     * - host [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)
+     *
+     * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+     */
+    connect(...args: any[]): void;
+    /**
+     * Available for backward compatibility, please shift to using [Client#deactivate]{@link Client#deactivate}.
+     *
+     * **Deprecated**
+     *
+     * See:
+     * [Client#onDisconnect]{@link Client#onDisconnect}, and
+     * [Client#disconnectHeaders]{@link Client#disconnectHeaders}
+     *
+     * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+     */
+    disconnect(disconnectCallback?: any, headers?: StompHeaders): void;
+    /**
+     * Available for backward compatibility, use [Client#publish]{@link Client#publish}.
+     *
+     * Send a message to a named destination. Refer to your STOMP broker documentation for types
+     * and naming of destinations. The headers will, typically, be available to the subscriber.
+     * However, there may be special purpose headers corresponding to your STOMP broker.
+     *
+     *  **Deprecated**, use [Client#publish]{@link Client#publish}
+     *
+     * Note: Body must be String. You will need to covert the payload to string in case it is not string (e.g. JSON)
+     *
+     * ```javascript
+     *        client.send("/queue/test", {priority: 9}, "Hello, STOMP");
+     *
+     *        // If you want to send a message with a body, you must also pass the headers argument.
+     *        client.send("/queue/test", {}, "Hello, STOMP");
+     * ```
+     *
+     * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+     */
+    send(destination: string, headers?: {
+        [key: string]: any;
+    }, body?: string): void;
+    /**
+     * Available for backward compatibility, renamed to [Client#reconnectDelay]{@link Client#reconnectDelay}.
+     *
+     * **Deprecated**
+     */
+    set reconnect_delay(value: number);
+    /**
+     * Available for backward compatibility, renamed to [Client#webSocket]{@link Client#webSocket}.
+     *
+     * **Deprecated**
+     */
+    get ws(): any;
+    /**
+     * Available for backward compatibility, renamed to [Client#connectedVersion]{@link Client#connectedVersion}.
+     *
+     * **Deprecated**
+     */
+    get version(): string | undefined;
+    /**
+     * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+     *
+     * **Deprecated**
+     */
+    get onreceive(): messageCallbackType;
+    /**
+     * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+     *
+     * **Deprecated**
+     */
+    set onreceive(value: messageCallbackType);
+    /**
+     * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+     * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}.
+     *
+     * **Deprecated**
+     */
+    get onreceipt(): frameCallbackType;
+    /**
+     * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+     *
+     * **Deprecated**
+     */
+    set onreceipt(value: frameCallbackType);
+    private _heartbeatInfo;
+    /**
+     * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}
+     * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+     *
+     * **Deprecated**
+     */
+    get heartbeat(): {
+        incoming: number;
+        outgoing: number;
+    };
+    /**
+     * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}
+     * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+     *
+     * **Deprecated**
+     */
+    set heartbeat(value: {
+        incoming: number;
+        outgoing: number;
+    });
+}

+ 241 - 0
node_modules/@stomp/stompjs/esm6/compatibility/compat-client.js

@@ -0,0 +1,241 @@
+import { Client } from '../client.js';
+import { HeartbeatInfo } from './heartbeat-info.js';
+/**
+ * Available for backward compatibility, please shift to using {@link Client}.
+ *
+ * **Deprecated**
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * To upgrade, please follow the [Upgrade Guide](https://stomp-js.github.io/guide/stompjs/upgrading-stompjs.html)
+ */
+export class CompatClient extends Client {
+    /**
+     * Available for backward compatibility, please shift to using {@link Client}
+     * and [Client#webSocketFactory]{@link Client#webSocketFactory}.
+     *
+     * **Deprecated**
+     *
+     * @internal
+     */
+    constructor(webSocketFactory) {
+        super();
+        /**
+         * It is no op now. No longer needed. Large packets work out of the box.
+         */
+        this.maxWebSocketFrameSize = 16 * 1024;
+        this._heartbeatInfo = new HeartbeatInfo(this);
+        this.reconnect_delay = 0;
+        this.webSocketFactory = webSocketFactory;
+        // Default from previous version
+        this.debug = (...message) => {
+            console.log(...message);
+        };
+    }
+    _parseConnect(...args) {
+        let closeEventCallback;
+        let connectCallback;
+        let errorCallback;
+        let headers = {};
+        if (args.length < 2) {
+            throw new Error('Connect requires at least 2 arguments');
+        }
+        if (typeof args[1] === 'function') {
+            [headers, connectCallback, errorCallback, closeEventCallback] = args;
+        }
+        else {
+            switch (args.length) {
+                case 6:
+                    [
+                        headers.login,
+                        headers.passcode,
+                        connectCallback,
+                        errorCallback,
+                        closeEventCallback,
+                        headers.host,
+                    ] = args;
+                    break;
+                default:
+                    [
+                        headers.login,
+                        headers.passcode,
+                        connectCallback,
+                        errorCallback,
+                        closeEventCallback,
+                    ] = args;
+            }
+        }
+        return [headers, connectCallback, errorCallback, closeEventCallback];
+    }
+    /**
+     * Available for backward compatibility, please shift to using [Client#activate]{@link Client#activate}.
+     *
+     * **Deprecated**
+     *
+     * The `connect` method accepts different number of arguments and types. See the Overloads list. Use the
+     * version with headers to pass your broker specific options.
+     *
+     * overloads:
+     * - connect(headers, connectCallback)
+     * - connect(headers, connectCallback, errorCallback)
+     * - connect(login, passcode, connectCallback)
+     * - connect(login, passcode, connectCallback, errorCallback)
+     * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback)
+     * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback, host)
+     *
+     * params:
+     * - headers, see [Client#connectHeaders]{@link Client#connectHeaders}
+     * - connectCallback, see [Client#onConnect]{@link Client#onConnect}
+     * - errorCallback, see [Client#onStompError]{@link Client#onStompError}
+     * - closeEventCallback, see [Client#onWebSocketClose]{@link Client#onWebSocketClose}
+     * - login [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)
+     * - passcode [String], [Client#connectHeaders](../classes/Client.html#connectHeaders)
+     * - host [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)
+     *
+     * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+     */
+    connect(...args) {
+        const out = this._parseConnect(...args);
+        if (out[0]) {
+            this.connectHeaders = out[0];
+        }
+        if (out[1]) {
+            this.onConnect = out[1];
+        }
+        if (out[2]) {
+            this.onStompError = out[2];
+        }
+        if (out[3]) {
+            this.onWebSocketClose = out[3];
+        }
+        super.activate();
+    }
+    /**
+     * Available for backward compatibility, please shift to using [Client#deactivate]{@link Client#deactivate}.
+     *
+     * **Deprecated**
+     *
+     * See:
+     * [Client#onDisconnect]{@link Client#onDisconnect}, and
+     * [Client#disconnectHeaders]{@link Client#disconnectHeaders}
+     *
+     * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+     */
+    disconnect(disconnectCallback, headers = {}) {
+        if (disconnectCallback) {
+            this.onDisconnect = disconnectCallback;
+        }
+        this.disconnectHeaders = headers;
+        super.deactivate();
+    }
+    /**
+     * Available for backward compatibility, use [Client#publish]{@link Client#publish}.
+     *
+     * Send a message to a named destination. Refer to your STOMP broker documentation for types
+     * and naming of destinations. The headers will, typically, be available to the subscriber.
+     * However, there may be special purpose headers corresponding to your STOMP broker.
+     *
+     *  **Deprecated**, use [Client#publish]{@link Client#publish}
+     *
+     * Note: Body must be String. You will need to covert the payload to string in case it is not string (e.g. JSON)
+     *
+     * ```javascript
+     *        client.send("/queue/test", {priority: 9}, "Hello, STOMP");
+     *
+     *        // If you want to send a message with a body, you must also pass the headers argument.
+     *        client.send("/queue/test", {}, "Hello, STOMP");
+     * ```
+     *
+     * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+     */
+    send(destination, headers = {}, body = '') {
+        headers = Object.assign({}, headers);
+        const skipContentLengthHeader = headers['content-length'] === false;
+        if (skipContentLengthHeader) {
+            delete headers['content-length'];
+        }
+        this.publish({
+            destination,
+            headers: headers,
+            body,
+            skipContentLengthHeader,
+        });
+    }
+    /**
+     * Available for backward compatibility, renamed to [Client#reconnectDelay]{@link Client#reconnectDelay}.
+     *
+     * **Deprecated**
+     */
+    set reconnect_delay(value) {
+        this.reconnectDelay = value;
+    }
+    /**
+     * Available for backward compatibility, renamed to [Client#webSocket]{@link Client#webSocket}.
+     *
+     * **Deprecated**
+     */
+    get ws() {
+        return this.webSocket;
+    }
+    /**
+     * Available for backward compatibility, renamed to [Client#connectedVersion]{@link Client#connectedVersion}.
+     *
+     * **Deprecated**
+     */
+    get version() {
+        return this.connectedVersion;
+    }
+    /**
+     * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+     *
+     * **Deprecated**
+     */
+    get onreceive() {
+        return this.onUnhandledMessage;
+    }
+    /**
+     * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+     *
+     * **Deprecated**
+     */
+    set onreceive(value) {
+        this.onUnhandledMessage = value;
+    }
+    /**
+     * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+     * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}.
+     *
+     * **Deprecated**
+     */
+    get onreceipt() {
+        return this.onUnhandledReceipt;
+    }
+    /**
+     * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+     *
+     * **Deprecated**
+     */
+    set onreceipt(value) {
+        this.onUnhandledReceipt = value;
+    }
+    /**
+     * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}
+     * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+     *
+     * **Deprecated**
+     */
+    get heartbeat() {
+        return this._heartbeatInfo;
+    }
+    /**
+     * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}
+     * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+     *
+     * **Deprecated**
+     */
+    set heartbeat(value) {
+        this.heartbeatIncoming = value.incoming;
+        this.heartbeatOutgoing = value.outgoing;
+    }
+}
+//# sourceMappingURL=compat-client.js.map

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
node_modules/@stomp/stompjs/esm6/compatibility/compat-client.js.map


+ 14 - 0
node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.d.ts

@@ -0,0 +1,14 @@
+import { CompatClient } from './compat-client.js';
+/**
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export declare class HeartbeatInfo {
+    private client;
+    constructor(client: CompatClient);
+    get outgoing(): number;
+    set outgoing(value: number);
+    get incoming(): number;
+    set incoming(value: number);
+}

+ 23 - 0
node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.js

@@ -0,0 +1,23 @@
+/**
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export class HeartbeatInfo {
+    constructor(client) {
+        this.client = client;
+    }
+    get outgoing() {
+        return this.client.heartbeatOutgoing;
+    }
+    set outgoing(value) {
+        this.client.heartbeatOutgoing = value;
+    }
+    get incoming() {
+        return this.client.heartbeatIncoming;
+    }
+    set incoming(value) {
+        this.client.heartbeatIncoming = value;
+    }
+}
+//# sourceMappingURL=heartbeat-info.js.map

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.js.map


+ 67 - 0
node_modules/@stomp/stompjs/esm6/compatibility/stomp.d.ts

@@ -0,0 +1,67 @@
+import { CompatClient } from './compat-client.js';
+/**
+ * STOMP Class, acts like a factory to create {@link Client}.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * **Deprecated**
+ *
+ * It will be removed in next major version. Please switch to {@link Client}.
+ */
+export declare class Stomp {
+    /**
+     * In case you need to use a non standard class for WebSocket.
+     *
+     * For example when using within NodeJS environment:
+     *
+     * ```javascript
+     *        StompJs = require('../../esm5/');
+     *        Stomp = StompJs.Stomp;
+     *        Stomp.WebSocketClass = require('websocket').w3cwebsocket;
+     * ```
+     *
+     * **Deprecated**
+     *
+     *
+     * It will be removed in next major version. Please switch to {@link Client}
+     * using [Client#webSocketFactory]{@link Client#webSocketFactory}.
+     */
+    static WebSocketClass: any;
+    /**
+     * This method creates a WebSocket client that is connected to
+     * the STOMP server located at the url.
+     *
+     * ```javascript
+     *        var url = "ws://localhost:61614/stomp";
+     *        var client = Stomp.client(url);
+     * ```
+     *
+     * **Deprecated**
+     *
+     * It will be removed in next major version. Please switch to {@link Client}
+     * using [Client#brokerURL]{@link Client#brokerURL}.
+     */
+    static client(url: string, protocols?: string[]): CompatClient;
+    /**
+     * This method is an alternative to [Stomp#client]{@link Stomp#client} to let the user
+     * specify the WebSocket to use (either a standard HTML5 WebSocket or
+     * a similar object).
+     *
+     * In order to support reconnection, the function Client._connect should be callable more than once.
+     * While reconnecting
+     * a new instance of underlying transport (TCP Socket, WebSocket or SockJS) will be needed. So, this function
+     * alternatively allows passing a function that should return a new instance of the underlying socket.
+     *
+     * ```javascript
+     *        var client = Stomp.over(function(){
+     *          return new WebSocket('ws://localhost:15674/ws')
+     *        });
+     * ```
+     *
+     * **Deprecated**
+     *
+     * It will be removed in next major version. Please switch to {@link Client}
+     * using [Client#webSocketFactory]{@link Client#webSocketFactory}.
+     */
+    static over(ws: any): CompatClient;
+}

+ 102 - 0
node_modules/@stomp/stompjs/esm6/compatibility/stomp.js

@@ -0,0 +1,102 @@
+import { Versions } from '../versions.js';
+import { CompatClient } from './compat-client.js';
+/**
+ * STOMP Class, acts like a factory to create {@link Client}.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * **Deprecated**
+ *
+ * It will be removed in next major version. Please switch to {@link Client}.
+ */
+export class Stomp {
+    /**
+     * This method creates a WebSocket client that is connected to
+     * the STOMP server located at the url.
+     *
+     * ```javascript
+     *        var url = "ws://localhost:61614/stomp";
+     *        var client = Stomp.client(url);
+     * ```
+     *
+     * **Deprecated**
+     *
+     * It will be removed in next major version. Please switch to {@link Client}
+     * using [Client#brokerURL]{@link Client#brokerURL}.
+     */
+    static client(url, protocols) {
+        // This is a hack to allow another implementation than the standard
+        // HTML5 WebSocket class.
+        //
+        // It is possible to use another class by calling
+        //
+        //     Stomp.WebSocketClass = MozWebSocket
+        //
+        // *prior* to call `Stomp.client()`.
+        //
+        // This hack is deprecated and `Stomp.over()` method should be used
+        // instead.
+        // See remarks on the function Stomp.over
+        if (protocols == null) {
+            protocols = Versions.default.protocolVersions();
+        }
+        const wsFn = () => {
+            const klass = Stomp.WebSocketClass || WebSocket;
+            return new klass(url, protocols);
+        };
+        return new CompatClient(wsFn);
+    }
+    /**
+     * This method is an alternative to [Stomp#client]{@link Stomp#client} to let the user
+     * specify the WebSocket to use (either a standard HTML5 WebSocket or
+     * a similar object).
+     *
+     * In order to support reconnection, the function Client._connect should be callable more than once.
+     * While reconnecting
+     * a new instance of underlying transport (TCP Socket, WebSocket or SockJS) will be needed. So, this function
+     * alternatively allows passing a function that should return a new instance of the underlying socket.
+     *
+     * ```javascript
+     *        var client = Stomp.over(function(){
+     *          return new WebSocket('ws://localhost:15674/ws')
+     *        });
+     * ```
+     *
+     * **Deprecated**
+     *
+     * It will be removed in next major version. Please switch to {@link Client}
+     * using [Client#webSocketFactory]{@link Client#webSocketFactory}.
+     */
+    static over(ws) {
+        let wsFn;
+        if (typeof ws === 'function') {
+            wsFn = ws;
+        }
+        else {
+            console.warn('Stomp.over did not receive a factory, auto reconnect will not work. ' +
+                'Please see https://stomp-js.github.io/api-docs/latest/classes/Stomp.html#over');
+            wsFn = () => ws;
+        }
+        return new CompatClient(wsFn);
+    }
+}
+/**
+ * In case you need to use a non standard class for WebSocket.
+ *
+ * For example when using within NodeJS environment:
+ *
+ * ```javascript
+ *        StompJs = require('../../esm5/');
+ *        Stomp = StompJs.Stomp;
+ *        Stomp.WebSocketClass = require('websocket').w3cwebsocket;
+ * ```
+ *
+ * **Deprecated**
+ *
+ *
+ * It will be removed in next major version. Please switch to {@link Client}
+ * using [Client#webSocketFactory]{@link Client#webSocketFactory}.
+ */
+// tslint:disable-next-line:variable-name
+Stomp.WebSocketClass = null;
+//# sourceMappingURL=stomp.js.map

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
node_modules/@stomp/stompjs/esm6/compatibility/stomp.js.map


+ 95 - 0
node_modules/@stomp/stompjs/esm6/frame-impl.d.ts

@@ -0,0 +1,95 @@
+import { IFrame } from './i-frame.js';
+import { StompHeaders } from './stomp-headers.js';
+import { IRawFrameType } from './types.js';
+/**
+ * Frame class represents a STOMP frame.
+ *
+ * @internal
+ */
+export declare class FrameImpl implements IFrame {
+    /**
+     * STOMP Command
+     */
+    command: string;
+    /**
+     * Headers, key value pairs.
+     */
+    headers: StompHeaders;
+    /**
+     * Is this frame binary (based on whether body/binaryBody was passed when creating this frame).
+     */
+    isBinaryBody: boolean;
+    /**
+     * body of the frame
+     */
+    get body(): string;
+    private _body;
+    /**
+     * body as Uint8Array
+     */
+    get binaryBody(): Uint8Array;
+    private _binaryBody;
+    private escapeHeaderValues;
+    private skipContentLengthHeader;
+    /**
+     * Frame constructor. `command`, `headers` and `body` are available as properties.
+     *
+     * @internal
+     */
+    constructor(params: {
+        command: string;
+        headers?: StompHeaders;
+        body?: string;
+        binaryBody?: Uint8Array;
+        escapeHeaderValues?: boolean;
+        skipContentLengthHeader?: boolean;
+    });
+    /**
+     * deserialize a STOMP Frame from raw data.
+     *
+     * @internal
+     */
+    static fromRawFrame(rawFrame: IRawFrameType, escapeHeaderValues: boolean): FrameImpl;
+    /**
+     * @internal
+     */
+    toString(): string;
+    /**
+     * serialize this Frame in a format suitable to be passed to WebSocket.
+     * If the body is string the output will be string.
+     * If the body is binary (i.e. of type Unit8Array) it will be serialized to ArrayBuffer.
+     *
+     * @internal
+     */
+    serialize(): string | ArrayBuffer;
+    private serializeCmdAndHeaders;
+    private isBodyEmpty;
+    private bodyLength;
+    /**
+     * Compute the size of a UTF-8 string by counting its number of bytes
+     * (and not the number of characters composing the string)
+     */
+    private static sizeOfUTF8;
+    private static toUnit8Array;
+    /**
+     * Serialize a STOMP frame as per STOMP standards, suitable to be sent to the STOMP broker.
+     *
+     * @internal
+     */
+    static marshall(params: {
+        command: string;
+        headers?: StompHeaders;
+        body?: string;
+        binaryBody?: Uint8Array;
+        escapeHeaderValues?: boolean;
+        skipContentLengthHeader?: boolean;
+    }): string | ArrayBuffer;
+    /**
+     *  Escape header values
+     */
+    private static hdrValueEscape;
+    /**
+     * UnEscape header values
+     */
+    private static hdrValueUnEscape;
+}

+ 171 - 0
node_modules/@stomp/stompjs/esm6/frame-impl.js

@@ -0,0 +1,171 @@
+import { BYTE } from './byte.js';
+/**
+ * Frame class represents a STOMP frame.
+ *
+ * @internal
+ */
+export class FrameImpl {
+    /**
+     * Frame constructor. `command`, `headers` and `body` are available as properties.
+     *
+     * @internal
+     */
+    constructor(params) {
+        const { command, headers, body, binaryBody, escapeHeaderValues, skipContentLengthHeader, } = params;
+        this.command = command;
+        this.headers = Object.assign({}, headers || {});
+        if (binaryBody) {
+            this._binaryBody = binaryBody;
+            this.isBinaryBody = true;
+        }
+        else {
+            this._body = body || '';
+            this.isBinaryBody = false;
+        }
+        this.escapeHeaderValues = escapeHeaderValues || false;
+        this.skipContentLengthHeader = skipContentLengthHeader || false;
+    }
+    /**
+     * body of the frame
+     */
+    get body() {
+        if (!this._body && this.isBinaryBody) {
+            this._body = new TextDecoder().decode(this._binaryBody);
+        }
+        return this._body || '';
+    }
+    /**
+     * body as Uint8Array
+     */
+    get binaryBody() {
+        if (!this._binaryBody && !this.isBinaryBody) {
+            this._binaryBody = new TextEncoder().encode(this._body);
+        }
+        // At this stage it will definitely have a valid value
+        return this._binaryBody;
+    }
+    /**
+     * deserialize a STOMP Frame from raw data.
+     *
+     * @internal
+     */
+    static fromRawFrame(rawFrame, escapeHeaderValues) {
+        const headers = {};
+        const trim = (str) => str.replace(/^\s+|\s+$/g, '');
+        // In case of repeated headers, as per standards, first value need to be used
+        for (const header of rawFrame.headers.reverse()) {
+            const idx = header.indexOf(':');
+            const key = trim(header[0]);
+            let value = trim(header[1]);
+            if (escapeHeaderValues &&
+                rawFrame.command !== 'CONNECT' &&
+                rawFrame.command !== 'CONNECTED') {
+                value = FrameImpl.hdrValueUnEscape(value);
+            }
+            headers[key] = value;
+        }
+        return new FrameImpl({
+            command: rawFrame.command,
+            headers,
+            binaryBody: rawFrame.binaryBody,
+            escapeHeaderValues,
+        });
+    }
+    /**
+     * @internal
+     */
+    toString() {
+        return this.serializeCmdAndHeaders();
+    }
+    /**
+     * serialize this Frame in a format suitable to be passed to WebSocket.
+     * If the body is string the output will be string.
+     * If the body is binary (i.e. of type Unit8Array) it will be serialized to ArrayBuffer.
+     *
+     * @internal
+     */
+    serialize() {
+        const cmdAndHeaders = this.serializeCmdAndHeaders();
+        if (this.isBinaryBody) {
+            return FrameImpl.toUnit8Array(cmdAndHeaders, this._binaryBody).buffer;
+        }
+        else {
+            return cmdAndHeaders + this._body + BYTE.NULL;
+        }
+    }
+    serializeCmdAndHeaders() {
+        const lines = [this.command];
+        if (this.skipContentLengthHeader) {
+            delete this.headers['content-length'];
+        }
+        for (const name of Object.keys(this.headers || {})) {
+            const value = this.headers[name];
+            if (this.escapeHeaderValues &&
+                this.command !== 'CONNECT' &&
+                this.command !== 'CONNECTED') {
+                lines.push(`${name}:${FrameImpl.hdrValueEscape(`${value}`)}`);
+            }
+            else {
+                lines.push(`${name}:${value}`);
+            }
+        }
+        if (this.isBinaryBody ||
+            (!this.isBodyEmpty() && !this.skipContentLengthHeader)) {
+            lines.push(`content-length:${this.bodyLength()}`);
+        }
+        return lines.join(BYTE.LF) + BYTE.LF + BYTE.LF;
+    }
+    isBodyEmpty() {
+        return this.bodyLength() === 0;
+    }
+    bodyLength() {
+        const binaryBody = this.binaryBody;
+        return binaryBody ? binaryBody.length : 0;
+    }
+    /**
+     * Compute the size of a UTF-8 string by counting its number of bytes
+     * (and not the number of characters composing the string)
+     */
+    static sizeOfUTF8(s) {
+        return s ? new TextEncoder().encode(s).length : 0;
+    }
+    static toUnit8Array(cmdAndHeaders, binaryBody) {
+        const uint8CmdAndHeaders = new TextEncoder().encode(cmdAndHeaders);
+        const nullTerminator = new Uint8Array([0]);
+        const uint8Frame = new Uint8Array(uint8CmdAndHeaders.length + binaryBody.length + nullTerminator.length);
+        uint8Frame.set(uint8CmdAndHeaders);
+        uint8Frame.set(binaryBody, uint8CmdAndHeaders.length);
+        uint8Frame.set(nullTerminator, uint8CmdAndHeaders.length + binaryBody.length);
+        return uint8Frame;
+    }
+    /**
+     * Serialize a STOMP frame as per STOMP standards, suitable to be sent to the STOMP broker.
+     *
+     * @internal
+     */
+    static marshall(params) {
+        const frame = new FrameImpl(params);
+        return frame.serialize();
+    }
+    /**
+     *  Escape header values
+     */
+    static hdrValueEscape(str) {
+        return str
+            .replace(/\\/g, '\\\\')
+            .replace(/\r/g, '\\r')
+            .replace(/\n/g, '\\n')
+            .replace(/:/g, '\\c');
+    }
+    /**
+     * UnEscape header values
+     */
+    static hdrValueUnEscape(str) {
+        return str
+            .replace(/\\r/g, '\r')
+            .replace(/\\n/g, '\n')
+            .replace(/\\c/g, ':')
+            .replace(/\\\\/g, '\\');
+    }
+}
+//# sourceMappingURL=frame-impl.js.map

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
node_modules/@stomp/stompjs/esm6/frame-impl.js.map


+ 35 - 0
node_modules/@stomp/stompjs/esm6/i-frame.d.ts

@@ -0,0 +1,35 @@
+import { StompHeaders } from './stomp-headers.js';
+/**
+ * It represents a STOMP frame. Many of the callbacks pass an IFrame received from
+ * the STOMP broker. For advanced usage you might need to access [headers]{@link IFrame#headers}.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * {@link IMessage} is an extended IFrame.
+ */
+export interface IFrame {
+    /**
+     * STOMP Command
+     */
+    command: string;
+    /**
+     * Headers, key value pairs.
+     */
+    headers: StompHeaders;
+    /**
+     * Is this frame binary (based on whether body/binaryBody was passed when creating this frame).
+     */
+    isBinaryBody: boolean;
+    /**
+     * body of the frame as string
+     */
+    readonly body: string;
+    /**
+     * body as Uint8Array
+     */
+    readonly binaryBody: Uint8Array;
+}
+/**
+ * Alias for {@link IFrame}
+ */
+export declare type Frame = IFrame;

+ 2 - 0
node_modules/@stomp/stompjs/esm6/i-frame.js

@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=i-frame.js.map

+ 1 - 0
node_modules/@stomp/stompjs/esm6/i-frame.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"i-frame.js","sourceRoot":"","sources":["../src/i-frame.ts"],"names":[],"mappings":""}

+ 32 - 0
node_modules/@stomp/stompjs/esm6/i-message.d.ts

@@ -0,0 +1,32 @@
+import { IFrame } from './i-frame.js';
+import { StompHeaders } from './stomp-headers.js';
+/**
+ * Instance of Message will be passed to [subscription callback]{@link Client#subscribe}
+ * and [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+ * Since it is an extended {@link IFrame}, you can access [headers]{@link IFrame#headers}
+ * and [body]{@link IFrame#body} as properties.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * See [Client#subscribe]{@link Client#subscribe} for example.
+ */
+export interface IMessage extends IFrame {
+    /**
+     * When subscribing with manual acknowledgement, call this method on the message to ACK the message.
+     *
+     * See [Client#ack]{@link Client#ack} for an example.
+     */
+    ack: (headers?: StompHeaders) => void;
+    /**
+     * When subscribing with manual acknowledgement, call this method on the message to NACK the message.
+     *
+     * See [Client#nack]{@link Client#nack} for an example.
+     */
+    nack: (headers?: StompHeaders) => void;
+}
+/**
+ * Aliased to {@link IMessage}.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare type Message = IMessage;

+ 2 - 0
node_modules/@stomp/stompjs/esm6/i-message.js

@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=i-message.js.map

+ 1 - 0
node_modules/@stomp/stompjs/esm6/i-message.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"i-message.js","sourceRoot":"","sources":["../src/i-message.ts"],"names":[],"mappings":""}

+ 21 - 0
node_modules/@stomp/stompjs/esm6/i-transaction.d.ts

@@ -0,0 +1,21 @@
+/**
+ * A Transaction is created by calling [Client#begin]{@link Client#begin}
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * TODO: Example and caveat
+ */
+export interface ITransaction {
+    /**
+     * You will need to access this to send, ack, or nack within this transaction.
+     */
+    id: string;
+    /**
+     * Commit this transaction. See [Client#commit]{@link Client#commit} for an example.
+     */
+    commit: () => void;
+    /**
+     * Abort this transaction. See [Client#abort]{@link Client#abort} for an example.
+     */
+    abort: () => void;
+}

+ 2 - 0
node_modules/@stomp/stompjs/esm6/i-transaction.js

@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=i-transaction.js.map

+ 1 - 0
node_modules/@stomp/stompjs/esm6/i-transaction.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"i-transaction.js","sourceRoot":"","sources":["../src/i-transaction.ts"],"names":[],"mappings":""}

+ 13 - 0
node_modules/@stomp/stompjs/esm6/index.d.ts

@@ -0,0 +1,13 @@
+export * from './client.js';
+export * from './frame-impl.js';
+export * from './i-frame.js';
+export * from './i-message.js';
+export * from './parser.js';
+export * from './stomp-config.js';
+export * from './stomp-headers.js';
+export * from './stomp-subscription.js';
+export * from './i-transaction.js';
+export * from './types.js';
+export * from './versions.js';
+export * from './compatibility/compat-client.js';
+export * from './compatibility/stomp.js';

+ 15 - 0
node_modules/@stomp/stompjs/esm6/index.js

@@ -0,0 +1,15 @@
+export * from './client.js';
+export * from './frame-impl.js';
+export * from './i-frame.js';
+export * from './i-message.js';
+export * from './parser.js';
+export * from './stomp-config.js';
+export * from './stomp-headers.js';
+export * from './stomp-subscription.js';
+export * from './i-transaction.js';
+export * from './types.js';
+export * from './versions.js';
+// Compatibility code
+export * from './compatibility/compat-client.js';
+export * from './compatibility/stomp.js';
+//# sourceMappingURL=index.js.map

+ 1 - 0
node_modules/@stomp/stompjs/esm6/index.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAE9B,qBAAqB;AACrB,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC"}

+ 70 - 0
node_modules/@stomp/stompjs/esm6/parser.d.ts

@@ -0,0 +1,70 @@
+import { IRawFrameType } from './types.js';
+/**
+ * This is an evented, rec descent parser.
+ * A stream of Octets can be passed and whenever it recognizes
+ * a complete Frame or an incoming ping it will invoke the registered callbacks.
+ *
+ * All incoming Octets are fed into _onByte function.
+ * Depending on current state the _onByte function keeps changing.
+ * Depending on the state it keeps accumulating into _token and _results.
+ * State is indicated by current value of _onByte, all states are named as _collect.
+ *
+ * STOMP standards https://stomp.github.io/stomp-specification-1.2.html
+ * imply that all lengths are considered in bytes (instead of string lengths).
+ * So, before actual parsing, if the incoming data is String it is converted to Octets.
+ * This allows faithful implementation of the protocol and allows NULL Octets to be present in the body.
+ *
+ * There is no peek function on the incoming data.
+ * When a state change occurs based on an Octet without consuming the Octet,
+ * the Octet, after state change, is fed again (_reinjectByte).
+ * This became possible as the state change can be determined by inspecting just one Octet.
+ *
+ * There are two modes to collect the body, if content-length header is there then it by counting Octets
+ * otherwise it is determined by NULL terminator.
+ *
+ * Following the standards, the command and headers are converted to Strings
+ * and the body is returned as Octets.
+ * Headers are returned as an array and not as Hash - to allow multiple occurrence of an header.
+ *
+ * This parser does not use Regular Expressions as that can only operate on Strings.
+ *
+ * It handles if multiple STOMP frames are given as one chunk, a frame is split into multiple chunks, or
+ * any combination there of. The parser remembers its state (any partial frame) and continues when a new chunk
+ * is pushed.
+ *
+ * Typically the higher level function will convert headers to Hash, handle unescaping of header values
+ * (which is protocol version specific), and convert body to text.
+ *
+ * Check the parser.spec.js to understand cases that this parser is supposed to handle.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export declare class Parser {
+    onFrame: (rawFrame: IRawFrameType) => void;
+    onIncomingPing: () => void;
+    private readonly _encoder;
+    private readonly _decoder;
+    private _results;
+    private _token;
+    private _headerKey;
+    private _bodyBytesRemaining;
+    private _onByte;
+    constructor(onFrame: (rawFrame: IRawFrameType) => void, onIncomingPing: () => void);
+    parseChunk(segment: string | ArrayBuffer, appendMissingNULLonIncoming?: boolean): void;
+    private _collectFrame;
+    private _collectCommand;
+    private _collectHeaders;
+    private _reinjectByte;
+    private _collectHeaderKey;
+    private _collectHeaderValue;
+    private _setupCollectBody;
+    private _collectBodyNullTerminated;
+    private _collectBodyFixedSize;
+    private _retrievedBody;
+    private _consumeByte;
+    private _consumeTokenAsUTF8;
+    private _consumeTokenAsRaw;
+    private _initState;
+}

+ 222 - 0
node_modules/@stomp/stompjs/esm6/parser.js

@@ -0,0 +1,222 @@
+/**
+ * @internal
+ */
+const NULL = 0;
+/**
+ * @internal
+ */
+const LF = 10;
+/**
+ * @internal
+ */
+const CR = 13;
+/**
+ * @internal
+ */
+const COLON = 58;
+/**
+ * This is an evented, rec descent parser.
+ * A stream of Octets can be passed and whenever it recognizes
+ * a complete Frame or an incoming ping it will invoke the registered callbacks.
+ *
+ * All incoming Octets are fed into _onByte function.
+ * Depending on current state the _onByte function keeps changing.
+ * Depending on the state it keeps accumulating into _token and _results.
+ * State is indicated by current value of _onByte, all states are named as _collect.
+ *
+ * STOMP standards https://stomp.github.io/stomp-specification-1.2.html
+ * imply that all lengths are considered in bytes (instead of string lengths).
+ * So, before actual parsing, if the incoming data is String it is converted to Octets.
+ * This allows faithful implementation of the protocol and allows NULL Octets to be present in the body.
+ *
+ * There is no peek function on the incoming data.
+ * When a state change occurs based on an Octet without consuming the Octet,
+ * the Octet, after state change, is fed again (_reinjectByte).
+ * This became possible as the state change can be determined by inspecting just one Octet.
+ *
+ * There are two modes to collect the body, if content-length header is there then it by counting Octets
+ * otherwise it is determined by NULL terminator.
+ *
+ * Following the standards, the command and headers are converted to Strings
+ * and the body is returned as Octets.
+ * Headers are returned as an array and not as Hash - to allow multiple occurrence of an header.
+ *
+ * This parser does not use Regular Expressions as that can only operate on Strings.
+ *
+ * It handles if multiple STOMP frames are given as one chunk, a frame is split into multiple chunks, or
+ * any combination there of. The parser remembers its state (any partial frame) and continues when a new chunk
+ * is pushed.
+ *
+ * Typically the higher level function will convert headers to Hash, handle unescaping of header values
+ * (which is protocol version specific), and convert body to text.
+ *
+ * Check the parser.spec.js to understand cases that this parser is supposed to handle.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export class Parser {
+    constructor(onFrame, onIncomingPing) {
+        this.onFrame = onFrame;
+        this.onIncomingPing = onIncomingPing;
+        this._encoder = new TextEncoder();
+        this._decoder = new TextDecoder();
+        this._token = [];
+        this._initState();
+    }
+    parseChunk(segment, appendMissingNULLonIncoming = false) {
+        let chunk;
+        if (typeof segment === 'string') {
+            chunk = this._encoder.encode(segment);
+        }
+        else {
+            chunk = new Uint8Array(segment);
+        }
+        // See https://github.com/stomp-js/stompjs/issues/89
+        // Remove when underlying issue is fixed.
+        //
+        // Send a NULL byte, if the last byte of a Text frame was not NULL.F
+        if (appendMissingNULLonIncoming && chunk[chunk.length - 1] !== 0) {
+            const chunkWithNull = new Uint8Array(chunk.length + 1);
+            chunkWithNull.set(chunk, 0);
+            chunkWithNull[chunk.length] = 0;
+            chunk = chunkWithNull;
+        }
+        // tslint:disable-next-line:prefer-for-of
+        for (let i = 0; i < chunk.length; i++) {
+            const byte = chunk[i];
+            this._onByte(byte);
+        }
+    }
+    // The following implements a simple Rec Descent Parser.
+    // The grammar is simple and just one byte tells what should be the next state
+    _collectFrame(byte) {
+        if (byte === NULL) {
+            // Ignore
+            return;
+        }
+        if (byte === CR) {
+            // Ignore CR
+            return;
+        }
+        if (byte === LF) {
+            // Incoming Ping
+            this.onIncomingPing();
+            return;
+        }
+        this._onByte = this._collectCommand;
+        this._reinjectByte(byte);
+    }
+    _collectCommand(byte) {
+        if (byte === CR) {
+            // Ignore CR
+            return;
+        }
+        if (byte === LF) {
+            this._results.command = this._consumeTokenAsUTF8();
+            this._onByte = this._collectHeaders;
+            return;
+        }
+        this._consumeByte(byte);
+    }
+    _collectHeaders(byte) {
+        if (byte === CR) {
+            // Ignore CR
+            return;
+        }
+        if (byte === LF) {
+            this._setupCollectBody();
+            return;
+        }
+        this._onByte = this._collectHeaderKey;
+        this._reinjectByte(byte);
+    }
+    _reinjectByte(byte) {
+        this._onByte(byte);
+    }
+    _collectHeaderKey(byte) {
+        if (byte === COLON) {
+            this._headerKey = this._consumeTokenAsUTF8();
+            this._onByte = this._collectHeaderValue;
+            return;
+        }
+        this._consumeByte(byte);
+    }
+    _collectHeaderValue(byte) {
+        if (byte === CR) {
+            // Ignore CR
+            return;
+        }
+        if (byte === LF) {
+            this._results.headers.push([
+                this._headerKey,
+                this._consumeTokenAsUTF8(),
+            ]);
+            this._headerKey = undefined;
+            this._onByte = this._collectHeaders;
+            return;
+        }
+        this._consumeByte(byte);
+    }
+    _setupCollectBody() {
+        const contentLengthHeader = this._results.headers.filter((header) => {
+            return header[0] === 'content-length';
+        })[0];
+        if (contentLengthHeader) {
+            this._bodyBytesRemaining = parseInt(contentLengthHeader[1], 10);
+            this._onByte = this._collectBodyFixedSize;
+        }
+        else {
+            this._onByte = this._collectBodyNullTerminated;
+        }
+    }
+    _collectBodyNullTerminated(byte) {
+        if (byte === NULL) {
+            this._retrievedBody();
+            return;
+        }
+        this._consumeByte(byte);
+    }
+    _collectBodyFixedSize(byte) {
+        // It is post decrement, so that we discard the trailing NULL octet
+        if (this._bodyBytesRemaining-- === 0) {
+            this._retrievedBody();
+            return;
+        }
+        this._consumeByte(byte);
+    }
+    _retrievedBody() {
+        this._results.binaryBody = this._consumeTokenAsRaw();
+        try {
+            this.onFrame(this._results);
+        }
+        catch (e) {
+            console.log(`Ignoring an exception thrown by a frame handler. Original exception: `, e);
+        }
+        this._initState();
+    }
+    // Rec Descent Parser helpers
+    _consumeByte(byte) {
+        this._token.push(byte);
+    }
+    _consumeTokenAsUTF8() {
+        return this._decoder.decode(this._consumeTokenAsRaw());
+    }
+    _consumeTokenAsRaw() {
+        const rawResult = new Uint8Array(this._token);
+        this._token = [];
+        return rawResult;
+    }
+    _initState() {
+        this._results = {
+            command: undefined,
+            headers: [],
+            binaryBody: undefined,
+        };
+        this._token = [];
+        this._headerKey = undefined;
+        this._onByte = this._collectFrame;
+    }
+}
+//# sourceMappingURL=parser.js.map

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
node_modules/@stomp/stompjs/esm6/parser.js.map


+ 116 - 0
node_modules/@stomp/stompjs/esm6/stomp-config.d.ts

@@ -0,0 +1,116 @@
+import { StompHeaders } from './stomp-headers.js';
+import { ActivationState, closeEventCallbackType, debugFnType, frameCallbackType, messageCallbackType, wsErrorCallbackType } from './types.js';
+import { Versions } from './versions.js';
+/**
+ * Configuration options for STOMP Client, each key corresponds to
+ * field by the same name in {@link Client}. This can be passed to
+ * the constructor of {@link Client} or to [Client#configure]{@link Client#configure}.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare class StompConfig {
+    /**
+     * See [Client#brokerURL]{@link Client#brokerURL}.
+     */
+    brokerURL?: string;
+    /**
+     * See [Client#stompVersions]{@link Client#stompVersions}.
+     */
+    stompVersions?: Versions;
+    /**
+     * See [Client#webSocketFactory]{@link Client#webSocketFactory}.
+     */
+    webSocketFactory?: () => any;
+    /**
+     * See [Client#connectionTimeout]{@link Client#connectionTimeout}.
+     */
+    connectionTimeout?: number;
+    /**
+     * See [Client#reconnectDelay]{@link Client#reconnectDelay}.
+     */
+    reconnectDelay?: number;
+    /**
+     * See [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}.
+     */
+    heartbeatIncoming?: number;
+    /**
+     * See [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+     */
+    heartbeatOutgoing?: number;
+    /**
+     * See [Client#splitLargeFrames]{@link Client#splitLargeFrames}.
+     */
+    splitLargeFrames?: boolean;
+    /**
+     * See [Client#forceBinaryWSFrames]{@link Client#forceBinaryWSFrames}.
+     */
+    forceBinaryWSFrames?: boolean;
+    /**
+     * See [Client#appendMissingNULLonIncoming]{@link Client#appendMissingNULLonIncoming}.
+     */
+    appendMissingNULLonIncoming?: boolean;
+    /**
+     * See [Client#maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.
+     */
+    maxWebSocketChunkSize?: number;
+    /**
+     * See [Client#connectHeaders]{@link Client#connectHeaders}.
+     */
+    connectHeaders?: StompHeaders;
+    /**
+     * See [Client#disconnectHeaders]{@link Client#disconnectHeaders}.
+     */
+    disconnectHeaders?: StompHeaders;
+    /**
+     * See [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+     */
+    onUnhandledMessage?: messageCallbackType;
+    /**
+     * See [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+     */
+    onUnhandledReceipt?: frameCallbackType;
+    /**
+     * See [Client#onUnhandledFrame]{@link Client#onUnhandledFrame}.
+     */
+    onUnhandledFrame?: frameCallbackType;
+    /**
+     * See [Client#beforeConnect]{@link Client#beforeConnect}.
+     */
+    beforeConnect?: () => void | Promise<void>;
+    /**
+     * See [Client#onConnect]{@link Client#onConnect}.
+     */
+    onConnect?: frameCallbackType;
+    /**
+     * See [Client#onDisconnect]{@link Client#onDisconnect}.
+     */
+    onDisconnect?: frameCallbackType;
+    /**
+     * See [Client#onStompError]{@link Client#onStompError}.
+     */
+    onStompError?: frameCallbackType;
+    /**
+     * See [Client#onWebSocketClose]{@link Client#onWebSocketClose}.
+     */
+    onWebSocketClose?: closeEventCallbackType;
+    /**
+     * See [Client#onWebSocketError]{@link Client#onWebSocketError}.
+     */
+    onWebSocketError?: wsErrorCallbackType;
+    /**
+     * See [Client#logRawCommunication]{@link Client#logRawCommunication}.
+     */
+    logRawCommunication?: boolean;
+    /**
+     * See [Client#debug]{@link Client#debug}.
+     */
+    debug?: debugFnType;
+    /**
+     * See [Client#discardWebsocketOnCommFailure]{@link Client#discardWebsocketOnCommFailure}.
+     */
+    discardWebsocketOnCommFailure?: boolean;
+    /**
+     * See [Client#onChangeState]{@link Client#onChangeState}.
+     */
+    onChangeState?: (state: ActivationState) => void;
+}

+ 10 - 0
node_modules/@stomp/stompjs/esm6/stomp-config.js

@@ -0,0 +1,10 @@
+/**
+ * Configuration options for STOMP Client, each key corresponds to
+ * field by the same name in {@link Client}. This can be passed to
+ * the constructor of {@link Client} or to [Client#configure]{@link Client#configure}.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class StompConfig {
+}
+//# sourceMappingURL=stomp-config.js.map

+ 1 - 0
node_modules/@stomp/stompjs/esm6/stomp-config.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"stomp-config.js","sourceRoot":"","sources":["../src/stomp-config.ts"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,MAAM,OAAO,WAAW;CAkIvB"}

+ 69 - 0
node_modules/@stomp/stompjs/esm6/stomp-handler.d.ts

@@ -0,0 +1,69 @@
+import { Client } from './client.js';
+import { ITransaction } from './i-transaction.js';
+import { StompHeaders } from './stomp-headers.js';
+import { StompSubscription } from './stomp-subscription.js';
+import { closeEventCallbackType, debugFnType, frameCallbackType, IPublishParams, IStompSocket, IStomptHandlerConfig, messageCallbackType, wsErrorCallbackType } from './types.js';
+import { Versions } from './versions.js';
+/**
+ * The STOMP protocol handler
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export declare class StompHandler {
+    private _client;
+    _webSocket: IStompSocket;
+    debug: debugFnType;
+    stompVersions: Versions;
+    connectHeaders: StompHeaders;
+    disconnectHeaders: StompHeaders;
+    heartbeatIncoming: number;
+    heartbeatOutgoing: number;
+    onUnhandledMessage: messageCallbackType;
+    onUnhandledReceipt: frameCallbackType;
+    onUnhandledFrame: frameCallbackType;
+    onConnect: frameCallbackType;
+    onDisconnect: frameCallbackType;
+    onStompError: frameCallbackType;
+    onWebSocketClose: closeEventCallbackType;
+    onWebSocketError: wsErrorCallbackType;
+    logRawCommunication: boolean;
+    splitLargeFrames: boolean;
+    maxWebSocketChunkSize: number;
+    forceBinaryWSFrames: boolean;
+    appendMissingNULLonIncoming: boolean;
+    discardWebsocketOnCommFailure: boolean;
+    get connectedVersion(): string | undefined;
+    private _connectedVersion;
+    get connected(): boolean;
+    private _connected;
+    private readonly _subscriptions;
+    private readonly _receiptWatchers;
+    private _partialData;
+    private _escapeHeaderValues;
+    private _counter;
+    private _pinger;
+    private _ponger;
+    private _lastServerActivityTS;
+    constructor(_client: Client, _webSocket: IStompSocket, config: IStomptHandlerConfig);
+    start(): void;
+    private readonly _serverFrameHandlers;
+    private _setupHeartbeat;
+    private _closeOrDiscardWebsocket;
+    forceDisconnect(): void;
+    _closeWebsocket(): void;
+    discardWebsocket(): void;
+    private _transmit;
+    dispose(): void;
+    private _cleanUp;
+    publish(params: IPublishParams): void;
+    watchForReceipt(receiptId: string, callback: frameCallbackType): void;
+    subscribe(destination: string, callback: messageCallbackType, headers?: StompHeaders): StompSubscription;
+    unsubscribe(id: string, headers?: StompHeaders): void;
+    begin(transactionId: string): ITransaction;
+    commit(transactionId: string): void;
+    abort(transactionId: string): void;
+    ack(messageId: string, subscriptionId: string, headers?: StompHeaders): void;
+    nack(messageId: string, subscriptionId: string, headers?: StompHeaders): void;
+}

+ 391 - 0
node_modules/@stomp/stompjs/esm6/stomp-handler.js

@@ -0,0 +1,391 @@
+import { BYTE } from './byte.js';
+import { FrameImpl } from './frame-impl.js';
+import { Parser } from './parser.js';
+import { StompSocketState, } from './types.js';
+import { Versions } from './versions.js';
+import { augmentWebsocket } from './augment-websocket.js';
+/**
+ * The STOMP protocol handler
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export class StompHandler {
+    constructor(_client, _webSocket, config) {
+        this._client = _client;
+        this._webSocket = _webSocket;
+        this._connected = false;
+        this._serverFrameHandlers = {
+            // [CONNECTED Frame](https://stomp.github.com/stomp-specification-1.2.html#CONNECTED_Frame)
+            CONNECTED: frame => {
+                this.debug(`connected to server ${frame.headers.server}`);
+                this._connected = true;
+                this._connectedVersion = frame.headers.version;
+                // STOMP version 1.2 needs header values to be escaped
+                if (this._connectedVersion === Versions.V1_2) {
+                    this._escapeHeaderValues = true;
+                }
+                this._setupHeartbeat(frame.headers);
+                this.onConnect(frame);
+            },
+            // [MESSAGE Frame](https://stomp.github.com/stomp-specification-1.2.html#MESSAGE)
+            MESSAGE: frame => {
+                // the callback is registered when the client calls
+                // `subscribe()`.
+                // If there is no registered subscription for the received message,
+                // the default `onUnhandledMessage` callback is used that the client can set.
+                // This is useful for subscriptions that are automatically created
+                // on the browser side (e.g. [RabbitMQ's temporary
+                // queues](https://www.rabbitmq.com/stomp.html)).
+                const subscription = frame.headers.subscription;
+                const onReceive = this._subscriptions[subscription] || this.onUnhandledMessage;
+                // bless the frame to be a Message
+                const message = frame;
+                const client = this;
+                const messageId = this._connectedVersion === Versions.V1_2
+                    ? message.headers.ack
+                    : message.headers['message-id'];
+                // add `ack()` and `nack()` methods directly to the returned frame
+                // so that a simple call to `message.ack()` can acknowledge the message.
+                message.ack = (headers = {}) => {
+                    return client.ack(messageId, subscription, headers);
+                };
+                message.nack = (headers = {}) => {
+                    return client.nack(messageId, subscription, headers);
+                };
+                onReceive(message);
+            },
+            // [RECEIPT Frame](https://stomp.github.com/stomp-specification-1.2.html#RECEIPT)
+            RECEIPT: frame => {
+                const callback = this._receiptWatchers[frame.headers['receipt-id']];
+                if (callback) {
+                    callback(frame);
+                    // Server will acknowledge only once, remove the callback
+                    delete this._receiptWatchers[frame.headers['receipt-id']];
+                }
+                else {
+                    this.onUnhandledReceipt(frame);
+                }
+            },
+            // [ERROR Frame](https://stomp.github.com/stomp-specification-1.2.html#ERROR)
+            ERROR: frame => {
+                this.onStompError(frame);
+            },
+        };
+        // used to index subscribers
+        this._counter = 0;
+        // subscription callbacks indexed by subscriber's ID
+        this._subscriptions = {};
+        // receipt-watchers indexed by receipts-ids
+        this._receiptWatchers = {};
+        this._partialData = '';
+        this._escapeHeaderValues = false;
+        this._lastServerActivityTS = Date.now();
+        this.debug = config.debug;
+        this.stompVersions = config.stompVersions;
+        this.connectHeaders = config.connectHeaders;
+        this.disconnectHeaders = config.disconnectHeaders;
+        this.heartbeatIncoming = config.heartbeatIncoming;
+        this.heartbeatOutgoing = config.heartbeatOutgoing;
+        this.splitLargeFrames = config.splitLargeFrames;
+        this.maxWebSocketChunkSize = config.maxWebSocketChunkSize;
+        this.forceBinaryWSFrames = config.forceBinaryWSFrames;
+        this.logRawCommunication = config.logRawCommunication;
+        this.appendMissingNULLonIncoming = config.appendMissingNULLonIncoming;
+        this.discardWebsocketOnCommFailure = config.discardWebsocketOnCommFailure;
+        this.onConnect = config.onConnect;
+        this.onDisconnect = config.onDisconnect;
+        this.onStompError = config.onStompError;
+        this.onWebSocketClose = config.onWebSocketClose;
+        this.onWebSocketError = config.onWebSocketError;
+        this.onUnhandledMessage = config.onUnhandledMessage;
+        this.onUnhandledReceipt = config.onUnhandledReceipt;
+        this.onUnhandledFrame = config.onUnhandledFrame;
+    }
+    get connectedVersion() {
+        return this._connectedVersion;
+    }
+    get connected() {
+        return this._connected;
+    }
+    start() {
+        const parser = new Parser(
+        // On Frame
+        rawFrame => {
+            const frame = FrameImpl.fromRawFrame(rawFrame, this._escapeHeaderValues);
+            // if this.logRawCommunication is set, the rawChunk is logged at this._webSocket.onmessage
+            if (!this.logRawCommunication) {
+                this.debug(`<<< ${frame}`);
+            }
+            const serverFrameHandler = this._serverFrameHandlers[frame.command] || this.onUnhandledFrame;
+            serverFrameHandler(frame);
+        }, 
+        // On Incoming Ping
+        () => {
+            this.debug('<<< PONG');
+        });
+        this._webSocket.onmessage = (evt) => {
+            this.debug('Received data');
+            this._lastServerActivityTS = Date.now();
+            if (this.logRawCommunication) {
+                const rawChunkAsString = evt.data instanceof ArrayBuffer
+                    ? new TextDecoder().decode(evt.data)
+                    : evt.data;
+                this.debug(`<<< ${rawChunkAsString}`);
+            }
+            parser.parseChunk(evt.data, this.appendMissingNULLonIncoming);
+        };
+        this._webSocket.onclose = (closeEvent) => {
+            this.debug(`Connection closed to ${this._webSocket.url}`);
+            this._cleanUp();
+            this.onWebSocketClose(closeEvent);
+        };
+        this._webSocket.onerror = (errorEvent) => {
+            this.onWebSocketError(errorEvent);
+        };
+        this._webSocket.onopen = () => {
+            // Clone before updating
+            const connectHeaders = Object.assign({}, this.connectHeaders);
+            this.debug('Web Socket Opened...');
+            connectHeaders['accept-version'] = this.stompVersions.supportedVersions();
+            connectHeaders['heart-beat'] = [
+                this.heartbeatOutgoing,
+                this.heartbeatIncoming,
+            ].join(',');
+            this._transmit({ command: 'CONNECT', headers: connectHeaders });
+        };
+    }
+    _setupHeartbeat(headers) {
+        if (headers.version !== Versions.V1_1 &&
+            headers.version !== Versions.V1_2) {
+            return;
+        }
+        // It is valid for the server to not send this header
+        // https://stomp.github.io/stomp-specification-1.2.html#Heart-beating
+        if (!headers['heart-beat']) {
+            return;
+        }
+        // heart-beat header received from the server looks like:
+        //
+        //     heart-beat: sx, sy
+        const [serverOutgoing, serverIncoming] = headers['heart-beat']
+            .split(',')
+            .map((v) => parseInt(v, 10));
+        if (this.heartbeatOutgoing !== 0 && serverIncoming !== 0) {
+            const ttl = Math.max(this.heartbeatOutgoing, serverIncoming);
+            this.debug(`send PING every ${ttl}ms`);
+            this._pinger = setInterval(() => {
+                if (this._webSocket.readyState === StompSocketState.OPEN) {
+                    this._webSocket.send(BYTE.LF);
+                    this.debug('>>> PING');
+                }
+            }, ttl);
+        }
+        if (this.heartbeatIncoming !== 0 && serverOutgoing !== 0) {
+            const ttl = Math.max(this.heartbeatIncoming, serverOutgoing);
+            this.debug(`check PONG every ${ttl}ms`);
+            this._ponger = setInterval(() => {
+                const delta = Date.now() - this._lastServerActivityTS;
+                // We wait twice the TTL to be flexible on window's setInterval calls
+                if (delta > ttl * 2) {
+                    this.debug(`did not receive server activity for the last ${delta}ms`);
+                    this._closeOrDiscardWebsocket();
+                }
+            }, ttl);
+        }
+    }
+    _closeOrDiscardWebsocket() {
+        if (this.discardWebsocketOnCommFailure) {
+            this.debug('Discarding websocket, the underlying socket may linger for a while');
+            this.discardWebsocket();
+        }
+        else {
+            this.debug('Issuing close on the websocket');
+            this._closeWebsocket();
+        }
+    }
+    forceDisconnect() {
+        if (this._webSocket) {
+            if (this._webSocket.readyState === StompSocketState.CONNECTING ||
+                this._webSocket.readyState === StompSocketState.OPEN) {
+                this._closeOrDiscardWebsocket();
+            }
+        }
+    }
+    _closeWebsocket() {
+        this._webSocket.onmessage = () => { }; // ignore messages
+        this._webSocket.close();
+    }
+    discardWebsocket() {
+        if (typeof this._webSocket.terminate !== 'function') {
+            augmentWebsocket(this._webSocket, (msg) => this.debug(msg));
+        }
+        // @ts-ignore - this method will be there at this stage
+        this._webSocket.terminate();
+    }
+    _transmit(params) {
+        const { command, headers, body, binaryBody, skipContentLengthHeader } = params;
+        const frame = new FrameImpl({
+            command,
+            headers,
+            body,
+            binaryBody,
+            escapeHeaderValues: this._escapeHeaderValues,
+            skipContentLengthHeader,
+        });
+        let rawChunk = frame.serialize();
+        if (this.logRawCommunication) {
+            this.debug(`>>> ${rawChunk}`);
+        }
+        else {
+            this.debug(`>>> ${frame}`);
+        }
+        if (this.forceBinaryWSFrames && typeof rawChunk === 'string') {
+            rawChunk = new TextEncoder().encode(rawChunk);
+        }
+        if (typeof rawChunk !== 'string' || !this.splitLargeFrames) {
+            this._webSocket.send(rawChunk);
+        }
+        else {
+            let out = rawChunk;
+            while (out.length > 0) {
+                const chunk = out.substring(0, this.maxWebSocketChunkSize);
+                out = out.substring(this.maxWebSocketChunkSize);
+                this._webSocket.send(chunk);
+                this.debug(`chunk sent = ${chunk.length}, remaining = ${out.length}`);
+            }
+        }
+    }
+    dispose() {
+        if (this.connected) {
+            try {
+                // clone before updating
+                const disconnectHeaders = Object.assign({}, this.disconnectHeaders);
+                if (!disconnectHeaders.receipt) {
+                    disconnectHeaders.receipt = `close-${this._counter++}`;
+                }
+                this.watchForReceipt(disconnectHeaders.receipt, frame => {
+                    this._closeWebsocket();
+                    this._cleanUp();
+                    this.onDisconnect(frame);
+                });
+                this._transmit({ command: 'DISCONNECT', headers: disconnectHeaders });
+            }
+            catch (error) {
+                this.debug(`Ignoring error during disconnect ${error}`);
+            }
+        }
+        else {
+            if (this._webSocket.readyState === StompSocketState.CONNECTING ||
+                this._webSocket.readyState === StompSocketState.OPEN) {
+                this._closeWebsocket();
+            }
+        }
+    }
+    _cleanUp() {
+        this._connected = false;
+        if (this._pinger) {
+            clearInterval(this._pinger);
+            this._pinger = undefined;
+        }
+        if (this._ponger) {
+            clearInterval(this._ponger);
+            this._ponger = undefined;
+        }
+    }
+    publish(params) {
+        const { destination, headers, body, binaryBody, skipContentLengthHeader } = params;
+        const hdrs = Object.assign({ destination }, headers);
+        this._transmit({
+            command: 'SEND',
+            headers: hdrs,
+            body,
+            binaryBody,
+            skipContentLengthHeader,
+        });
+    }
+    watchForReceipt(receiptId, callback) {
+        this._receiptWatchers[receiptId] = callback;
+    }
+    subscribe(destination, callback, headers = {}) {
+        headers = Object.assign({}, headers);
+        if (!headers.id) {
+            headers.id = `sub-${this._counter++}`;
+        }
+        headers.destination = destination;
+        this._subscriptions[headers.id] = callback;
+        this._transmit({ command: 'SUBSCRIBE', headers });
+        const client = this;
+        return {
+            id: headers.id,
+            unsubscribe(hdrs) {
+                return client.unsubscribe(headers.id, hdrs);
+            },
+        };
+    }
+    unsubscribe(id, headers = {}) {
+        headers = Object.assign({}, headers);
+        delete this._subscriptions[id];
+        headers.id = id;
+        this._transmit({ command: 'UNSUBSCRIBE', headers });
+    }
+    begin(transactionId) {
+        const txId = transactionId || `tx-${this._counter++}`;
+        this._transmit({
+            command: 'BEGIN',
+            headers: {
+                transaction: txId,
+            },
+        });
+        const client = this;
+        return {
+            id: txId,
+            commit() {
+                client.commit(txId);
+            },
+            abort() {
+                client.abort(txId);
+            },
+        };
+    }
+    commit(transactionId) {
+        this._transmit({
+            command: 'COMMIT',
+            headers: {
+                transaction: transactionId,
+            },
+        });
+    }
+    abort(transactionId) {
+        this._transmit({
+            command: 'ABORT',
+            headers: {
+                transaction: transactionId,
+            },
+        });
+    }
+    ack(messageId, subscriptionId, headers = {}) {
+        headers = Object.assign({}, headers);
+        if (this._connectedVersion === Versions.V1_2) {
+            headers.id = messageId;
+        }
+        else {
+            headers['message-id'] = messageId;
+        }
+        headers.subscription = subscriptionId;
+        this._transmit({ command: 'ACK', headers });
+    }
+    nack(messageId, subscriptionId, headers = {}) {
+        headers = Object.assign({}, headers);
+        if (this._connectedVersion === Versions.V1_2) {
+            headers.id = messageId;
+        }
+        else {
+            headers['message-id'] = messageId;
+        }
+        headers.subscription = subscriptionId;
+        return this._transmit({ command: 'NACK', headers });
+    }
+}
+//# sourceMappingURL=stomp-handler.js.map

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
node_modules/@stomp/stompjs/esm6/stomp-handler.js.map


+ 12 - 0
node_modules/@stomp/stompjs/esm6/stomp-headers.d.ts

@@ -0,0 +1,12 @@
+/**
+ * STOMP headers. Many functions calls will accept headers as parameters.
+ * The headers sent by Broker will be available as [IFrame#headers]{@link IFrame#headers}.
+ *
+ * `key` and `value` must be valid strings.
+ * In addition, `key` must not contain `CR`, `LF`, or `:`.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare class StompHeaders {
+    [key: string]: string;
+}

+ 12 - 0
node_modules/@stomp/stompjs/esm6/stomp-headers.js

@@ -0,0 +1,12 @@
+/**
+ * STOMP headers. Many functions calls will accept headers as parameters.
+ * The headers sent by Broker will be available as [IFrame#headers]{@link IFrame#headers}.
+ *
+ * `key` and `value` must be valid strings.
+ * In addition, `key` must not contain `CR`, `LF`, or `:`.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class StompHeaders {
+}
+//# sourceMappingURL=stomp-headers.js.map

+ 1 - 0
node_modules/@stomp/stompjs/esm6/stomp-headers.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"stomp-headers.js","sourceRoot":"","sources":["../src/stomp-headers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,OAAO,YAAY;CAExB"}

+ 16 - 0
node_modules/@stomp/stompjs/esm6/stomp-subscription.d.ts

@@ -0,0 +1,16 @@
+import { StompHeaders } from './stomp-headers.js';
+/**
+ * Call [Client#subscribe]{@link Client#subscribe} to create a StompSubscription.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export interface StompSubscription {
+    /**
+     * Id associated with this subscription.
+     */
+    id: string;
+    /**
+     * Unsubscribe. See [Client#unsubscribe]{@link Client#unsubscribe} for an example.
+     */
+    unsubscribe: (headers?: StompHeaders) => void;
+}

+ 2 - 0
node_modules/@stomp/stompjs/esm6/stomp-subscription.js

@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=stomp-subscription.js.map

+ 1 - 0
node_modules/@stomp/stompjs/esm6/stomp-subscription.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"stomp-subscription.js","sourceRoot":"","sources":["../src/stomp-subscription.ts"],"names":[],"mappings":""}

+ 167 - 0
node_modules/@stomp/stompjs/esm6/types.d.ts

@@ -0,0 +1,167 @@
+import { IFrame } from './i-frame.js';
+import { IMessage } from './i-message.js';
+import { StompHeaders } from './stomp-headers.js';
+import { Versions } from './versions.js';
+/**
+ * This callback will receive a `string` as a parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare type debugFnType = (msg: string) => void;
+/**
+ * This callback will receive a {@link IMessage} as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare type messageCallbackType = (message: IMessage) => void;
+/**
+ * This callback will receive a {@link IFrame} as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare type frameCallbackType = ((frame: IFrame) => void) | (() => void);
+/**
+ * This callback will receive a [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}
+ * as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare type closeEventCallbackType<T = any> = (evt: T) => void;
+/**
+ * This callback will receive an [Event]{@link https://developer.mozilla.org/en-US/docs/Web/API/Event}
+ * as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare type wsErrorCallbackType<T = any> = (evt: T) => void;
+/**
+ * Parameters for [Client#publish]{@link Client#publish}.
+ * Aliased as publishParams as well.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export interface IPublishParams {
+    /**
+     * destination end point
+     */
+    destination: string;
+    /**
+     * headers (optional)
+     */
+    headers?: StompHeaders;
+    /**
+     * body (optional)
+     */
+    body?: string;
+    /**
+     * binary body (optional)
+     */
+    binaryBody?: Uint8Array;
+    /**
+     * By default, a `content-length` header will be added in the Frame to the broker.
+     * Set it to `true` for the header to be skipped.
+     */
+    skipContentLengthHeader?: boolean;
+}
+/**
+ * Backward compatibility, switch to {@link IPublishParams}.
+ */
+export declare type publishParams = IPublishParams;
+/**
+ * Used in {@link IRawFrameType}
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export declare type RawHeaderType = [string, string];
+/**
+ * The parser yield frames in this structure
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export interface IRawFrameType {
+    command: string | undefined;
+    headers: RawHeaderType[];
+    binaryBody: Uint8Array | undefined;
+}
+/**
+ * @internal
+ */
+export interface IStompSocketMessageEvent {
+    data?: string | ArrayBuffer;
+}
+/**
+ * Copied from Websocket interface to avoid dom typelib dependency.
+ *
+ * @internal
+ */
+export interface IStompSocket {
+    url: string;
+    onclose: ((ev?: any) => any) | undefined | null;
+    onerror: ((ev: any) => any) | undefined | null;
+    onmessage: ((ev: IStompSocketMessageEvent) => any) | undefined | null;
+    onopen: ((ev?: any) => any) | undefined | null;
+    terminate?: (() => any) | undefined | null;
+    /**
+     * Returns a string that indicates how binary data from the socket is exposed to scripts:
+     * We support only 'arraybuffer'.
+     */
+    binaryType?: string;
+    /**
+     * Returns the state of the socket connection. It can have the values of StompSocketState.
+     */
+    readonly readyState: number;
+    /**
+     * Closes the connection.
+     */
+    close(): void;
+    /**
+     * Transmits data using the connection. data can be a string or an ArrayBuffer.
+     */
+    send(data: string | ArrayBuffer): void;
+}
+/**
+ * Possible states for the IStompSocket
+ */
+export declare enum StompSocketState {
+    CONNECTING = 0,
+    OPEN = 1,
+    CLOSING = 2,
+    CLOSED = 3
+}
+/**
+ * Possible activation state
+ */
+export declare enum ActivationState {
+    ACTIVE = 0,
+    DEACTIVATING = 1,
+    INACTIVE = 2
+}
+/**
+ * @internal
+ */
+export interface IStomptHandlerConfig {
+    debug: debugFnType;
+    stompVersions: Versions;
+    connectHeaders: StompHeaders;
+    disconnectHeaders: StompHeaders;
+    heartbeatIncoming: number;
+    heartbeatOutgoing: number;
+    splitLargeFrames: boolean;
+    maxWebSocketChunkSize: number;
+    forceBinaryWSFrames: boolean;
+    logRawCommunication: boolean;
+    appendMissingNULLonIncoming: boolean;
+    discardWebsocketOnCommFailure: boolean;
+    onConnect: frameCallbackType;
+    onDisconnect: frameCallbackType;
+    onStompError: frameCallbackType;
+    onWebSocketClose: closeEventCallbackType;
+    onWebSocketError: wsErrorCallbackType;
+    onUnhandledMessage: messageCallbackType;
+    onUnhandledReceipt: frameCallbackType;
+    onUnhandledFrame: frameCallbackType;
+}

+ 20 - 0
node_modules/@stomp/stompjs/esm6/types.js

@@ -0,0 +1,20 @@
+/**
+ * Possible states for the IStompSocket
+ */
+export var StompSocketState;
+(function (StompSocketState) {
+    StompSocketState[StompSocketState["CONNECTING"] = 0] = "CONNECTING";
+    StompSocketState[StompSocketState["OPEN"] = 1] = "OPEN";
+    StompSocketState[StompSocketState["CLOSING"] = 2] = "CLOSING";
+    StompSocketState[StompSocketState["CLOSED"] = 3] = "CLOSED";
+})(StompSocketState = StompSocketState || (StompSocketState = {}));
+/**
+ * Possible activation state
+ */
+export var ActivationState;
+(function (ActivationState) {
+    ActivationState[ActivationState["ACTIVE"] = 0] = "ACTIVE";
+    ActivationState[ActivationState["DEACTIVATING"] = 1] = "DEACTIVATING";
+    ActivationState[ActivationState["INACTIVE"] = 2] = "INACTIVE";
+})(ActivationState = ActivationState || (ActivationState = {}));
+//# sourceMappingURL=types.js.map

+ 1 - 0
node_modules/@stomp/stompjs/esm6/types.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AA4IA;;GAEG;AACH,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,mEAAU,CAAA;IACV,uDAAI,CAAA;IACJ,6DAAO,CAAA;IACP,2DAAM,CAAA;AACR,CAAC,EALW,gBAAgB,GAAhB,gBAAgB,KAAhB,gBAAgB,QAK3B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,yDAAM,CAAA;IACN,qEAAY,CAAA;IACZ,6DAAQ,CAAA;AACV,CAAC,EAJW,eAAe,GAAf,eAAe,KAAf,eAAe,QAI1B"}

+ 39 - 0
node_modules/@stomp/stompjs/esm6/versions.d.ts

@@ -0,0 +1,39 @@
+/**
+ * Supported STOMP versions
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare class Versions {
+    versions: string[];
+    /**
+     * Indicates protocol version 1.0
+     */
+    static V1_0: string;
+    /**
+     * Indicates protocol version 1.1
+     */
+    static V1_1: string;
+    /**
+     * Indicates protocol version 1.2
+     */
+    static V1_2: string;
+    /**
+     * @internal
+     */
+    static default: Versions;
+    /**
+     * Takes an array of versions, typical elements '1.2', '1.1', or '1.0'
+     *
+     * You will be creating an instance of this class if you want to override
+     * supported versions to be declared during STOMP handshake.
+     */
+    constructor(versions: string[]);
+    /**
+     * Used as part of CONNECT STOMP Frame
+     */
+    supportedVersions(): string;
+    /**
+     * Used while creating a WebSocket
+     */
+    protocolVersions(): string[];
+}

+ 49 - 0
node_modules/@stomp/stompjs/esm6/versions.js

@@ -0,0 +1,49 @@
+/**
+ * Supported STOMP versions
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class Versions {
+    /**
+     * Takes an array of versions, typical elements '1.2', '1.1', or '1.0'
+     *
+     * You will be creating an instance of this class if you want to override
+     * supported versions to be declared during STOMP handshake.
+     */
+    constructor(versions) {
+        this.versions = versions;
+    }
+    /**
+     * Used as part of CONNECT STOMP Frame
+     */
+    supportedVersions() {
+        return this.versions.join(',');
+    }
+    /**
+     * Used while creating a WebSocket
+     */
+    protocolVersions() {
+        return this.versions.map(x => `v${x.replace('.', '')}.stomp`);
+    }
+}
+/**
+ * Indicates protocol version 1.0
+ */
+Versions.V1_0 = '1.0';
+/**
+ * Indicates protocol version 1.1
+ */
+Versions.V1_1 = '1.1';
+/**
+ * Indicates protocol version 1.2
+ */
+Versions.V1_2 = '1.2';
+/**
+ * @internal
+ */
+Versions.default = new Versions([
+    Versions.V1_2,
+    Versions.V1_1,
+    Versions.V1_0,
+]);
+//# sourceMappingURL=versions.js.map

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
node_modules/@stomp/stompjs/esm6/versions.js.map


+ 1 - 0
node_modules/@stomp/stompjs/index.d.ts

@@ -0,0 +1 @@
+export * from './esm6/index.js';

+ 64 - 0
node_modules/@stomp/stompjs/package.json

@@ -0,0 +1,64 @@
+{
+  "name": "@stomp/stompjs",
+  "version": "7.0.0",
+  "description": "STOMP client for Javascript and Typescript",
+  "scripts": {
+    "clean": "rm -rf bundles esm6",
+    "rollup": "rollup -c && rm -rf bundles/*.d.ts bundles/compatibility/",
+    "build": "npm run clean && npx tsc && npm run rollup && cp spec/package.json bundles",
+    "test": "jasmine",
+    "karma": "karma start spec/karma.conf.js --single-run",
+    "lint": "tslint 'src/**/*.ts'",
+    "prettier": "prettier --write .",
+    "test-helpers": "tsc -p spec/helpers-src/tsconfig.json",
+    "prepublishOnly": "npm run lint && npm run build && npm run karma && npm run test"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/stomp-js/stompjs.git"
+  },
+  "keywords": [
+    "STOMP",
+    "RabbitMQ",
+    "ActiveMQ",
+    "Websocket",
+    "messaging",
+    "queue",
+    "SockJS"
+  ],
+  "author": "deepak@kreatio.com",
+  "license": "Apache-2.0",
+  "bugs": {
+    "url": "https://github.com/stomp-js/stompjs/issues"
+  },
+  "homepage": "https://github.com/stomp-js/stompjs#readme",
+  "devDependencies": {
+    "@chiragrupani/karma-chromium-edge-launcher": "^2.2.2",
+    "@rollup/plugin-terser": "^0.4.0",
+    "@rollup/plugin-typescript": "^11.0.0",
+    "jasmine": "^4.3.0",
+    "karma": "^6.4.0",
+    "karma-chrome-launcher": "^3.1.1",
+    "karma-firefox-launcher": "^2.1.2",
+    "karma-jasmine": "^5.1.0",
+    "karma-safari-launcher": "https://github.com/RLovelett/karma-safari-launcher.git#safari-webdriver",
+    "karma-summary-reporter": "^3.1.1",
+    "onchange": "^7.1.0",
+    "prettier": "^2.7.1",
+    "rollup": "^3.9.1",
+    "text-encoding": "^0.7.0",
+    "ts-loader": "^9.3.1",
+    "tslint": "^6.1.3",
+    "tslint-config-prettier": "^1.18.0",
+    "typescript": "^4.8.2",
+    "ws": "^8.8.1"
+  },
+  "type": "module",
+  "exports": {
+    "import": "./esm6/index.js",
+    "require": "./bundles/stomp.umd.js"
+  },
+  "browser": "./bundles/stomp.umd.js",
+  "typings": "index.d.ts",
+  "sideEffects": false
+}

+ 39 - 0
node_modules/@stomp/stompjs/src/augment-websocket.ts

@@ -0,0 +1,39 @@
+import { IStompSocket } from './types.js';
+
+/**
+ * @internal
+ */
+export function augmentWebsocket(
+  webSocket: IStompSocket,
+  debug: (msg: string) => void
+) {
+  webSocket.terminate = function () {
+    const noOp = () => {};
+
+    // set all callbacks to no op
+    this.onerror = noOp;
+    this.onmessage = noOp;
+    this.onopen = noOp;
+
+    const ts = new Date();
+    const id = Math.random().toString().substring(2, 8); // A simulated id
+
+    const origOnClose = this.onclose;
+
+    // Track delay in actual closure of the socket
+    this.onclose = closeEvent => {
+      const delay = new Date().getTime() - ts.getTime();
+      debug(
+        `Discarded socket (#${id})  closed after ${delay}ms, with code/reason: ${closeEvent.code}/${closeEvent.reason}`
+      );
+    };
+
+    this.close();
+
+    origOnClose?.call(webSocket, {
+      code: 4001,
+      reason: `Quick discarding socket (#${id}) without waiting for the shutdown sequence.`,
+      wasClean: false,
+    });
+  };
+}

+ 13 - 0
node_modules/@stomp/stompjs/src/byte.ts

@@ -0,0 +1,13 @@
+/**
+ * Some byte values, used as per STOMP specifications.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export const BYTE = {
+  // LINEFEED byte (octet 10)
+  LF: '\x0A',
+  // NULL byte (octet 0)
+  NULL: '\x00',
+};

+ 867 - 0
node_modules/@stomp/stompjs/src/client.ts

@@ -0,0 +1,867 @@
+import { ITransaction } from './i-transaction.js';
+import { StompConfig } from './stomp-config.js';
+import { StompHandler } from './stomp-handler.js';
+import { StompHeaders } from './stomp-headers.js';
+import { StompSubscription } from './stomp-subscription.js';
+import {
+  ActivationState,
+  closeEventCallbackType,
+  debugFnType,
+  frameCallbackType,
+  IPublishParams,
+  IStompSocket,
+  messageCallbackType,
+  StompSocketState,
+  wsErrorCallbackType,
+} from './types.js';
+import { Versions } from './versions.js';
+
+/**
+ * @internal
+ */
+declare const WebSocket: {
+  prototype: IStompSocket;
+  new (url: string, protocols?: string | string[]): IStompSocket;
+};
+
+/**
+ * STOMP Client Class.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class Client {
+  /**
+   * The URL for the STOMP broker to connect to.
+   * Typically like `"ws://broker.329broker.com:15674/ws"` or `"wss://broker.329broker.com:15674/ws"`.
+   *
+   * Only one of this or [Client#webSocketFactory]{@link Client#webSocketFactory} need to be set.
+   * If both are set, [Client#webSocketFactory]{@link Client#webSocketFactory} will be used.
+   *
+   * If your environment does not support WebSockets natively, please refer to
+   * [Polyfills]{@link https://stomp-js.github.io/guide/stompjs/rx-stomp/ng2-stompjs/pollyfils-for-stompjs-v5.html}.
+   */
+  public brokerURL: string | undefined;
+
+  /**
+   * STOMP versions to attempt during STOMP handshake. By default, versions `1.2`, `1.1`, and `1.0` are attempted.
+   *
+   * Example:
+   * ```javascript
+   *        // Try only versions 1.1 and 1.0
+   *        client.stompVersions = new Versions(['1.1', '1.0'])
+   * ```
+   */
+  public stompVersions = Versions.default;
+
+  /**
+   * This function should return a WebSocket or a similar (e.g. SockJS) object.
+   * If your environment does not support WebSockets natively, please refer to
+   * [Polyfills]{@link https://stomp-js.github.io/guide/stompjs/rx-stomp/ng2-stompjs/pollyfils-for-stompjs-v5.html}.
+   * If your STOMP Broker supports WebSockets, prefer setting [Client#brokerURL]{@link Client#brokerURL}.
+   *
+   * If both this and [Client#brokerURL]{@link Client#brokerURL} are set, this will be used.
+   *
+   * Example:
+   * ```javascript
+   *        // use a WebSocket
+   *        client.webSocketFactory= function () {
+   *          return new WebSocket("wss://broker.329broker.com:15674/ws");
+   *        };
+   *
+   *        // Typical usage with SockJS
+   *        client.webSocketFactory= function () {
+   *          return new SockJS("http://broker.329broker.com/stomp");
+   *        };
+   * ```
+   */
+  public webSocketFactory: (() => IStompSocket) | undefined;
+
+  /**
+   * Will retry if Stomp connection is not established in specified milliseconds.
+   * Default 0, which switches off automatic reconnection.
+   */
+  public connectionTimeout: number = 0;
+
+  // As per https://stackoverflow.com/questions/45802988/typescript-use-correct-version-of-settimeout-node-vs-window/56239226#56239226
+  private _connectionWatcher: ReturnType<typeof setTimeout> | undefined; // Timer
+
+  /**
+   *  automatically reconnect with delay in milliseconds, set to 0 to disable.
+   */
+  public reconnectDelay: number = 5000;
+
+  /**
+   * Incoming heartbeat interval in milliseconds. Set to 0 to disable.
+   */
+  public heartbeatIncoming: number = 10000;
+
+  /**
+   * Outgoing heartbeat interval in milliseconds. Set to 0 to disable.
+   */
+  public heartbeatOutgoing: number = 10000;
+
+  /**
+   * This switches on a non-standard behavior while sending WebSocket packets.
+   * It splits larger (text) packets into chunks of [maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.
+   * Only Java Spring brokers seem to support this mode.
+   *
+   * WebSockets, by itself, split large (text) packets,
+   * so it is not needed with a truly compliant STOMP/WebSocket broker.
+   * Setting it for such a broker will cause large messages to fail.
+   *
+   * `false` by default.
+   *
+   * Binary frames are never split.
+   */
+  public splitLargeFrames: boolean = false;
+
+  /**
+   * See [splitLargeFrames]{@link Client#splitLargeFrames}.
+   * This has no effect if [splitLargeFrames]{@link Client#splitLargeFrames} is `false`.
+   */
+  public maxWebSocketChunkSize: number = 8 * 1024;
+
+  /**
+   * Usually the
+   * [type of WebSocket frame]{@link https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send#Parameters}
+   * is automatically decided by type of the payload.
+   * Default is `false`, which should work with all compliant brokers.
+   *
+   * Set this flag to force binary frames.
+   */
+  public forceBinaryWSFrames: boolean = false;
+
+  /**
+   * A bug in ReactNative chops a string on occurrence of a NULL.
+   * See issue [https://github.com/stomp-js/stompjs/issues/89]{@link https://github.com/stomp-js/stompjs/issues/89}.
+   * This makes incoming WebSocket messages invalid STOMP packets.
+   * Setting this flag attempts to reverse the damage by appending a NULL.
+   * If the broker splits a large message into multiple WebSocket messages,
+   * this flag will cause data loss and abnormal termination of connection.
+   *
+   * This is not an ideal solution, but a stop gap until the underlying issue is fixed at ReactNative library.
+   */
+  public appendMissingNULLonIncoming: boolean = false;
+
+  /**
+   * Underlying WebSocket instance, READONLY.
+   */
+  get webSocket(): IStompSocket | undefined {
+    return this._stompHandler?._webSocket;
+  }
+
+  /**
+   * Connection headers, important keys - `login`, `passcode`, `host`.
+   * Though STOMP 1.2 standard marks these keys to be present, check your broker documentation for
+   * details specific to your broker.
+   */
+  public connectHeaders: StompHeaders;
+
+  /**
+   * Disconnection headers.
+   */
+  get disconnectHeaders(): StompHeaders {
+    return this._disconnectHeaders;
+  }
+
+  set disconnectHeaders(value: StompHeaders) {
+    this._disconnectHeaders = value;
+    if (this._stompHandler) {
+      this._stompHandler.disconnectHeaders = this._disconnectHeaders;
+    }
+  }
+  private _disconnectHeaders: StompHeaders;
+
+  /**
+   * This function will be called for any unhandled messages.
+   * It is useful for receiving messages sent to RabbitMQ temporary queues.
+   *
+   * It can also get invoked with stray messages while the server is processing
+   * a request to [Client#unsubscribe]{@link Client#unsubscribe}
+   * from an endpoint.
+   *
+   * The actual {@link IMessage} will be passed as parameter to the callback.
+   */
+  public onUnhandledMessage: messageCallbackType;
+
+  /**
+   * STOMP brokers can be requested to notify when an operation is actually completed.
+   * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}. See
+   * [Client#watchForReceipt]{@link Client#watchForReceipt} for examples.
+   *
+   * The actual {@link IFrame} will be passed as parameter to the callback.
+   */
+  public onUnhandledReceipt: frameCallbackType;
+
+  /**
+   * Will be invoked if {@link IFrame} of an unknown type is received from the STOMP broker.
+   *
+   * The actual {@link IFrame} will be passed as parameter to the callback.
+   */
+  public onUnhandledFrame: frameCallbackType;
+
+  /**
+   * `true` if there is an active connection to STOMP Broker
+   */
+  get connected(): boolean {
+    return !!this._stompHandler && this._stompHandler.connected;
+  }
+
+  /**
+   * Callback, invoked on before a connection to the STOMP broker.
+   *
+   * You can change options on the client, which will impact the immediate connecting.
+   * It is valid to call [Client#decativate]{@link Client#deactivate} in this callback.
+   *
+   * As of version 5.1, this callback can be
+   * [async](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)
+   * (i.e., it can return a
+   * [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)).
+   * In that case, connect will be called only after the Promise is resolved.
+   * This can be used to reliably fetch credentials, access token etc. from some other service
+   * in an asynchronous way.
+   */
+  public beforeConnect: () => void | Promise<void>;
+
+  /**
+   * Callback, invoked on every successful connection to the STOMP broker.
+   *
+   * The actual {@link IFrame} will be passed as parameter to the callback.
+   * Sometimes clients will like to use headers from this frame.
+   */
+  public onConnect: frameCallbackType;
+
+  /**
+   * Callback, invoked on every successful disconnection from the STOMP broker. It will not be invoked if
+   * the STOMP broker disconnected due to an error.
+   *
+   * The actual Receipt {@link IFrame} acknowledging the DISCONNECT will be passed as parameter to the callback.
+   *
+   * The way STOMP protocol is designed, the connection may close/terminate without the client
+   * receiving the Receipt {@link IFrame} acknowledging the DISCONNECT.
+   * You might find [Client#onWebSocketClose]{@link Client#onWebSocketClose} more appropriate to watch
+   * STOMP broker disconnects.
+   */
+  public onDisconnect: frameCallbackType;
+
+  /**
+   * Callback, invoked on an ERROR frame received from the STOMP Broker.
+   * A compliant STOMP Broker will close the connection after this type of frame.
+   * Please check broker specific documentation for exact behavior.
+   *
+   * The actual {@link IFrame} will be passed as parameter to the callback.
+   */
+  public onStompError: frameCallbackType;
+
+  /**
+   * Callback, invoked when underlying WebSocket is closed.
+   *
+   * Actual [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}
+   * is passed as parameter to the callback.
+   */
+  public onWebSocketClose: closeEventCallbackType;
+
+  /**
+   * Callback, invoked when underlying WebSocket raises an error.
+   *
+   * Actual [Event]{@link https://developer.mozilla.org/en-US/docs/Web/API/Event}
+   * is passed as parameter to the callback.
+   */
+  public onWebSocketError: wsErrorCallbackType;
+
+  /**
+   * Set it to log the actual raw communication with the broker.
+   * When unset, it logs headers of the parsed frames.
+   *
+   * Changes effect from the next broker reconnect.
+   *
+   * **Caution: this assumes that frames only have valid UTF8 strings.**
+   */
+  public logRawCommunication: boolean;
+
+  /**
+   * By default, debug messages are discarded. To log to `console` following can be used:
+   *
+   * ```javascript
+   *        client.debug = function(str) {
+   *          console.log(str);
+   *        };
+   * ```
+   *
+   * Currently this method does not support levels of log. Be aware that the
+   * output can be quite verbose
+   * and may contain sensitive information (like passwords, tokens etc.).
+   */
+  public debug: debugFnType;
+
+  /**
+   * Browsers do not immediately close WebSockets when `.close` is issued.
+   * This may cause reconnection to take a significantly long time in case
+   *  of some types of failures.
+   * In case of incoming heartbeat failure, this experimental flag instructs
+   * the library to discard the socket immediately
+   * (even before it is actually closed).
+   */
+  public discardWebsocketOnCommFailure: boolean = false;
+
+  /**
+   * version of STOMP protocol negotiated with the server, READONLY
+   */
+  get connectedVersion(): string | undefined {
+    return this._stompHandler ? this._stompHandler.connectedVersion : undefined;
+  }
+
+  private _stompHandler: StompHandler | undefined;
+
+  /**
+   * if the client is active (connected or going to reconnect)
+   */
+  get active(): boolean {
+    return this.state === ActivationState.ACTIVE;
+  }
+
+  /**
+   * It will be called on state change.
+   *
+   * When deactivating, it may go from ACTIVE to INACTIVE without entering DEACTIVATING.
+   */
+  public onChangeState: (state: ActivationState) => void;
+
+  private _changeState(state: ActivationState) {
+    this.state = state;
+    this.onChangeState(state);
+  }
+
+  /**
+   * Activation state.
+   *
+   * It will usually be ACTIVE or INACTIVE.
+   * When deactivating, it may go from ACTIVE to INACTIVE without entering DEACTIVATING.
+   */
+  public state: ActivationState = ActivationState.INACTIVE;
+
+  private _reconnector: any;
+
+  /**
+   * Create an instance.
+   */
+  constructor(conf: StompConfig = {}) {
+    // No op callbacks
+    const noOp = () => {};
+    this.debug = noOp;
+    this.beforeConnect = noOp;
+    this.onConnect = noOp;
+    this.onDisconnect = noOp;
+    this.onUnhandledMessage = noOp;
+    this.onUnhandledReceipt = noOp;
+    this.onUnhandledFrame = noOp;
+    this.onStompError = noOp;
+    this.onWebSocketClose = noOp;
+    this.onWebSocketError = noOp;
+    this.logRawCommunication = false;
+    this.onChangeState = noOp;
+
+    // These parameters would typically get proper values before connect is called
+    this.connectHeaders = {};
+    this._disconnectHeaders = {};
+
+    // Apply configuration
+    this.configure(conf);
+  }
+
+  /**
+   * Update configuration.
+   */
+  public configure(conf: StompConfig): void {
+    // bulk assign all properties to this
+    (Object as any).assign(this, conf);
+  }
+
+  /**
+   * Initiate the connection with the broker.
+   * If the connection breaks, as per [Client#reconnectDelay]{@link Client#reconnectDelay},
+   * it will keep trying to reconnect.
+   *
+   * Call [Client#deactivate]{@link Client#deactivate} to disconnect and stop reconnection attempts.
+   */
+  public activate(): void {
+    const _activate = () => {
+      if (this.active) {
+        this.debug('Already ACTIVE, ignoring request to activate');
+        return;
+      }
+
+      this._changeState(ActivationState.ACTIVE);
+
+      this._connect();
+    };
+
+    // if it is deactivating, wait for it to complete before activating.
+    if (this.state === ActivationState.DEACTIVATING) {
+      this.debug('Waiting for deactivation to finish before activating');
+      this.deactivate().then(() => {
+        _activate();
+      });
+    } else {
+      _activate();
+    }
+  }
+
+  private async _connect(): Promise<void> {
+    await this.beforeConnect();
+
+    if (this._stompHandler) {
+      this.debug('There is already a stompHandler, skipping the call to connect');
+      return;
+    }
+
+    if (!this.active) {
+      this.debug(
+        'Client has been marked inactive, will not attempt to connect'
+      );
+      return;
+    }
+
+    // setup connection watcher
+    if (this.connectionTimeout > 0) {
+      // clear first
+      if (this._connectionWatcher) {
+        clearTimeout(this._connectionWatcher);
+      }
+      this._connectionWatcher = setTimeout(() => {
+        if (this.connected) {
+          return;
+        }
+        // Connection not established, close the underlying socket
+        // a reconnection will be attempted
+        this.debug(
+          `Connection not established in ${this.connectionTimeout}ms, closing socket`
+        );
+        this.forceDisconnect();
+      }, this.connectionTimeout);
+    }
+
+    this.debug('Opening Web Socket...');
+
+    // Get the actual WebSocket (or a similar object)
+    const webSocket = this._createWebSocket();
+
+    this._stompHandler = new StompHandler(this, webSocket, {
+      debug: this.debug,
+      stompVersions: this.stompVersions,
+      connectHeaders: this.connectHeaders,
+      disconnectHeaders: this._disconnectHeaders,
+      heartbeatIncoming: this.heartbeatIncoming,
+      heartbeatOutgoing: this.heartbeatOutgoing,
+      splitLargeFrames: this.splitLargeFrames,
+      maxWebSocketChunkSize: this.maxWebSocketChunkSize,
+      forceBinaryWSFrames: this.forceBinaryWSFrames,
+      logRawCommunication: this.logRawCommunication,
+      appendMissingNULLonIncoming: this.appendMissingNULLonIncoming,
+      discardWebsocketOnCommFailure: this.discardWebsocketOnCommFailure,
+
+      onConnect: frame => {
+        // Successfully connected, stop the connection watcher
+        if (this._connectionWatcher) {
+          clearTimeout(this._connectionWatcher);
+          this._connectionWatcher = undefined;
+        }
+
+        if (!this.active) {
+          this.debug(
+            'STOMP got connected while deactivate was issued, will disconnect now'
+          );
+          this._disposeStompHandler();
+          return;
+        }
+        this.onConnect(frame);
+      },
+      onDisconnect: frame => {
+        this.onDisconnect(frame);
+      },
+      onStompError: frame => {
+        this.onStompError(frame);
+      },
+      onWebSocketClose: evt => {
+        this._stompHandler = undefined; // a new one will be created in case of a reconnect
+
+        if (this.state === ActivationState.DEACTIVATING) {
+          // Mark deactivation complete
+          this._changeState(ActivationState.INACTIVE);
+        }
+
+        // The callback is called before attempting to reconnect, this would allow the client
+        // to be `deactivated` in the callback.
+        this.onWebSocketClose(evt);
+
+        if (this.active) {
+          this._schedule_reconnect();
+        }
+      },
+      onWebSocketError: evt => {
+        this.onWebSocketError(evt);
+      },
+      onUnhandledMessage: message => {
+        this.onUnhandledMessage(message);
+      },
+      onUnhandledReceipt: frame => {
+        this.onUnhandledReceipt(frame);
+      },
+      onUnhandledFrame: frame => {
+        this.onUnhandledFrame(frame);
+      },
+    });
+
+    this._stompHandler.start();
+  }
+
+  private _createWebSocket(): IStompSocket {
+    let webSocket: IStompSocket;
+
+    if (this.webSocketFactory) {
+      webSocket = this.webSocketFactory();
+    } else if (this.brokerURL) {
+      webSocket = new WebSocket(
+        this.brokerURL,
+        this.stompVersions.protocolVersions()
+      );
+    } else {
+      throw new Error('Either brokerURL or webSocketFactory must be provided');
+    }
+    webSocket.binaryType = 'arraybuffer';
+    return webSocket;
+  }
+
+  private _schedule_reconnect(): void {
+    if (this.reconnectDelay > 0) {
+      this.debug(`STOMP: scheduling reconnection in ${this.reconnectDelay}ms`);
+
+      this._reconnector = setTimeout(() => {
+        this._connect();
+      }, this.reconnectDelay);
+    }
+  }
+
+  /**
+   * Disconnect if connected and stop auto reconnect loop.
+   * Appropriate callbacks will be invoked if there is an underlying STOMP connection.
+   *
+   * This call is async. It will resolve immediately if there is no underlying active websocket,
+   * otherwise, it will resolve after the underlying websocket is properly disposed of.
+   *
+   * It is not an error to invoke this method more than once.
+   * Each of those would resolve on completion of deactivation.
+   *
+   * To reactivate, you can call [Client#activate]{@link Client#activate}.
+   *
+   * Experimental: pass `force: true` to immediately discard the underlying connection.
+   * This mode will skip both the STOMP and the Websocket shutdown sequences.
+   * In some cases, browsers take a long time in the Websocket shutdown
+   * if the underlying connection had gone stale.
+   * Using this mode can speed up.
+   * When this mode is used, the actual Websocket may linger for a while
+   * and the broker may not realize that the connection is no longer in use.
+   *
+   * It is possible to invoke this method initially without the `force` option
+   * and subsequently, say after a wait, with the `force` option.
+   */
+  public async deactivate(options: { force?: boolean } = {}): Promise<void> {
+    const force: boolean = options.force || false;
+    const needToDispose = this.active;
+    let retPromise: Promise<void>;
+
+    if (this.state === ActivationState.INACTIVE) {
+      this.debug(`Already INACTIVE, nothing more to do`);
+      return Promise.resolve();
+    }
+
+    this._changeState(ActivationState.DEACTIVATING);
+
+    // Clear if a reconnection was scheduled
+    if (this._reconnector) {
+      clearTimeout(this._reconnector);
+      this._reconnector = undefined;
+    }
+
+    if (
+      this._stompHandler &&
+      // @ts-ignore - if there is a _stompHandler, there is the webSocket
+      this.webSocket.readyState !== StompSocketState.CLOSED
+    ) {
+      const origOnWebSocketClose = this._stompHandler.onWebSocketClose;
+      // we need to wait for the underlying websocket to close
+      retPromise = new Promise<void>((resolve, reject) => {
+        // @ts-ignore - there is a _stompHandler
+        this._stompHandler.onWebSocketClose = evt => {
+          origOnWebSocketClose(evt);
+          resolve();
+        };
+      });
+    } else {
+      // indicate that auto reconnect loop should terminate
+      this._changeState(ActivationState.INACTIVE);
+      return Promise.resolve();
+    }
+
+    if (force) {
+      this._stompHandler?.discardWebsocket();
+    } else if (needToDispose) {
+      this._disposeStompHandler();
+    }
+
+    return retPromise;
+  }
+
+  /**
+   * Force disconnect if there is an active connection by directly closing the underlying WebSocket.
+   * This is different from a normal disconnect where a DISCONNECT sequence is carried out with the broker.
+   * After forcing disconnect, automatic reconnect will be attempted.
+   * To stop further reconnects call [Client#deactivate]{@link Client#deactivate} as well.
+   */
+  public forceDisconnect() {
+    if (this._stompHandler) {
+      this._stompHandler.forceDisconnect();
+    }
+  }
+
+  private _disposeStompHandler() {
+    // Dispose STOMP Handler
+    if (this._stompHandler) {
+      this._stompHandler.dispose();
+    }
+  }
+
+  /**
+   * Send a message to a named destination. Refer to your STOMP broker documentation for types
+   * and naming of destinations.
+   *
+   * STOMP protocol specifies and suggests some headers and also allows broker-specific headers.
+   *
+   * `body` must be String.
+   * You will need to covert the payload to string in case it is not string (e.g. JSON).
+   *
+   * To send a binary message body, use `binaryBody` parameter. It should be a
+   * [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).
+   * Sometimes brokers may not support binary frames out of the box.
+   * Please check your broker documentation.
+   *
+   * `content-length` header is automatically added to the STOMP Frame sent to the broker.
+   * Set `skipContentLengthHeader` to indicate that `content-length` header should not be added.
+   * For binary messages, `content-length` header is always added.
+   *
+   * Caution: The broker will, most likely, report an error and disconnect
+   * if the message body has NULL octet(s) and `content-length` header is missing.
+   *
+   * ```javascript
+   *        client.publish({destination: "/queue/test", headers: {priority: 9}, body: "Hello, STOMP"});
+   *
+   *        // Only destination is mandatory parameter
+   *        client.publish({destination: "/queue/test", body: "Hello, STOMP"});
+   *
+   *        // Skip content-length header in the frame to the broker
+   *        client.publish({"/queue/test", body: "Hello, STOMP", skipContentLengthHeader: true});
+   *
+   *        var binaryData = generateBinaryData(); // This need to be of type Uint8Array
+   *        // setting content-type header is not mandatory, however a good practice
+   *        client.publish({destination: '/topic/special', binaryBody: binaryData,
+   *                         headers: {'content-type': 'application/octet-stream'}});
+   * ```
+   */
+  public publish(params: IPublishParams) {
+    this._checkConnection();
+    // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+    this._stompHandler.publish(params);
+  }
+
+  private _checkConnection() {
+    if (!this.connected) {
+      throw new TypeError('There is no underlying STOMP connection');
+    }
+  }
+
+  /**
+   * STOMP brokers may carry out operation asynchronously and allow requesting for acknowledgement.
+   * To request an acknowledgement, a `receipt` header needs to be sent with the actual request.
+   * The value (say receipt-id) for this header needs to be unique for each use.
+   * Typically, a sequence, a UUID, a random number or a combination may be used.
+   *
+   * A complaint broker will send a RECEIPT frame when an operation has actually been completed.
+   * The operation needs to be matched based on the value of the receipt-id.
+   *
+   * This method allows watching for a receipt and invoking the callback
+   *  when the corresponding receipt has been received.
+   *
+   * The actual {@link IFrame} will be passed as parameter to the callback.
+   *
+   * Example:
+   * ```javascript
+   *        // Subscribing with acknowledgement
+   *        let receiptId = randomText();
+   *
+   *        client.watchForReceipt(receiptId, function() {
+   *          // Will be called after server acknowledges
+   *        });
+   *
+   *        client.subscribe(TEST.destination, onMessage, {receipt: receiptId});
+   *
+   *
+   *        // Publishing with acknowledgement
+   *        receiptId = randomText();
+   *
+   *        client.watchForReceipt(receiptId, function() {
+   *          // Will be called after server acknowledges
+   *        });
+   *        client.publish({destination: TEST.destination, headers: {receipt: receiptId}, body: msg});
+   * ```
+   */
+  public watchForReceipt(receiptId: string, callback: frameCallbackType): void {
+    this._checkConnection();
+    // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+    this._stompHandler.watchForReceipt(receiptId, callback);
+  }
+
+  /**
+   * Subscribe to a STOMP Broker location. The callback will be invoked for each
+   * received message with the {@link IMessage} as argument.
+   *
+   * Note: The library will generate a unique ID if there is none provided in the headers.
+   *       To use your own ID, pass it using the `headers` argument.
+   *
+   * ```javascript
+   *        callback = function(message) {
+   *        // called when the client receives a STOMP message from the server
+   *          if (message.body) {
+   *            alert("got message with body " + message.body)
+   *          } else {
+   *            alert("got empty message");
+   *          }
+   *        });
+   *
+   *        var subscription = client.subscribe("/queue/test", callback);
+   *
+   *        // Explicit subscription id
+   *        var mySubId = 'my-subscription-id-001';
+   *        var subscription = client.subscribe(destination, callback, { id: mySubId });
+   * ```
+   */
+  public subscribe(
+    destination: string,
+    callback: messageCallbackType,
+    headers: StompHeaders = {}
+  ): StompSubscription {
+    this._checkConnection();
+    // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+    return this._stompHandler.subscribe(destination, callback, headers);
+  }
+
+  /**
+   * It is preferable to unsubscribe from a subscription by calling
+   * `unsubscribe()` directly on {@link StompSubscription} returned by `client.subscribe()`:
+   *
+   * ```javascript
+   *        var subscription = client.subscribe(destination, onmessage);
+   *        // ...
+   *        subscription.unsubscribe();
+   * ```
+   *
+   * See: https://stomp.github.com/stomp-specification-1.2.html#UNSUBSCRIBE UNSUBSCRIBE Frame
+   */
+  public unsubscribe(id: string, headers: StompHeaders = {}): void {
+    this._checkConnection();
+    // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+    this._stompHandler.unsubscribe(id, headers);
+  }
+
+  /**
+   * Start a transaction, the returned {@link ITransaction} has methods - [commit]{@link ITransaction#commit}
+   * and [abort]{@link ITransaction#abort}.
+   *
+   * `transactionId` is optional, if not passed the library will generate it internally.
+   */
+  public begin(transactionId?: string): ITransaction {
+    this._checkConnection();
+    // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+    return this._stompHandler.begin(transactionId);
+  }
+
+  /**
+   * Commit a transaction.
+   *
+   * It is preferable to commit a transaction by calling [commit]{@link ITransaction#commit} directly on
+   * {@link ITransaction} returned by [client.begin]{@link Client#begin}.
+   *
+   * ```javascript
+   *        var tx = client.begin(txId);
+   *        //...
+   *        tx.commit();
+   * ```
+   */
+  public commit(transactionId: string): void {
+    this._checkConnection();
+    // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+    this._stompHandler.commit(transactionId);
+  }
+
+  /**
+   * Abort a transaction.
+   * It is preferable to abort a transaction by calling [abort]{@link ITransaction#abort} directly on
+   * {@link ITransaction} returned by [client.begin]{@link Client#begin}.
+   *
+   * ```javascript
+   *        var tx = client.begin(txId);
+   *        //...
+   *        tx.abort();
+   * ```
+   */
+  public abort(transactionId: string): void {
+    this._checkConnection();
+    // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+    this._stompHandler.abort(transactionId);
+  }
+
+  /**
+   * ACK a message. It is preferable to acknowledge a message by calling [ack]{@link IMessage#ack} directly
+   * on the {@link IMessage} handled by a subscription callback:
+   *
+   * ```javascript
+   *        var callback = function (message) {
+   *          // process the message
+   *          // acknowledge it
+   *          message.ack();
+   *        };
+   *        client.subscribe(destination, callback, {'ack': 'client'});
+   * ```
+   */
+  public ack(
+    messageId: string,
+    subscriptionId: string,
+    headers: StompHeaders = {}
+  ): void {
+    this._checkConnection();
+    // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+    this._stompHandler.ack(messageId, subscriptionId, headers);
+  }
+
+  /**
+   * NACK a message. It is preferable to acknowledge a message by calling [nack]{@link IMessage#nack} directly
+   * on the {@link IMessage} handled by a subscription callback:
+   *
+   * ```javascript
+   *        var callback = function (message) {
+   *          // process the message
+   *          // an error occurs, nack it
+   *          message.nack();
+   *        };
+   *        client.subscribe(destination, callback, {'ack': 'client'});
+   * ```
+   */
+  public nack(
+    messageId: string,
+    subscriptionId: string,
+    headers: StompHeaders = {}
+  ): void {
+    this._checkConnection();
+    // @ts-ignore - we already checked that there is a _stompHandler, and it is connected
+    this._stompHandler.nack(messageId, subscriptionId, headers);
+  }
+}

+ 269 - 0
node_modules/@stomp/stompjs/src/compatibility/compat-client.ts

@@ -0,0 +1,269 @@
+import { Client } from '../client.js';
+import { StompHeaders } from '../stomp-headers.js';
+import { frameCallbackType, messageCallbackType } from '../types.js';
+import { HeartbeatInfo } from './heartbeat-info.js';
+
+/**
+ * Available for backward compatibility, please shift to using {@link Client}.
+ *
+ * **Deprecated**
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * To upgrade, please follow the [Upgrade Guide](https://stomp-js.github.io/guide/stompjs/upgrading-stompjs.html)
+ */
+export class CompatClient extends Client {
+  /**
+   * It is no op now. No longer needed. Large packets work out of the box.
+   */
+  public maxWebSocketFrameSize: number = 16 * 1024;
+
+  /**
+   * Available for backward compatibility, please shift to using {@link Client}
+   * and [Client#webSocketFactory]{@link Client#webSocketFactory}.
+   *
+   * **Deprecated**
+   *
+   * @internal
+   */
+  constructor(webSocketFactory: () => any) {
+    super();
+    this.reconnect_delay = 0;
+    this.webSocketFactory = webSocketFactory;
+    // Default from previous version
+    this.debug = (...message: any[]) => {
+      console.log(...message);
+    };
+  }
+
+  private _parseConnect(...args: any[]): any {
+    let closeEventCallback;
+    let connectCallback;
+    let errorCallback;
+    let headers: StompHeaders = {};
+    if (args.length < 2) {
+      throw new Error('Connect requires at least 2 arguments');
+    }
+    if (typeof args[1] === 'function') {
+      [headers, connectCallback, errorCallback, closeEventCallback] = args;
+    } else {
+      switch (args.length) {
+        case 6:
+          [
+            headers.login,
+            headers.passcode,
+            connectCallback,
+            errorCallback,
+            closeEventCallback,
+            headers.host,
+          ] = args;
+          break;
+        default:
+          [
+            headers.login,
+            headers.passcode,
+            connectCallback,
+            errorCallback,
+            closeEventCallback,
+          ] = args;
+      }
+    }
+
+    return [headers, connectCallback, errorCallback, closeEventCallback];
+  }
+
+  /**
+   * Available for backward compatibility, please shift to using [Client#activate]{@link Client#activate}.
+   *
+   * **Deprecated**
+   *
+   * The `connect` method accepts different number of arguments and types. See the Overloads list. Use the
+   * version with headers to pass your broker specific options.
+   *
+   * overloads:
+   * - connect(headers, connectCallback)
+   * - connect(headers, connectCallback, errorCallback)
+   * - connect(login, passcode, connectCallback)
+   * - connect(login, passcode, connectCallback, errorCallback)
+   * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback)
+   * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback, host)
+   *
+   * params:
+   * - headers, see [Client#connectHeaders]{@link Client#connectHeaders}
+   * - connectCallback, see [Client#onConnect]{@link Client#onConnect}
+   * - errorCallback, see [Client#onStompError]{@link Client#onStompError}
+   * - closeEventCallback, see [Client#onWebSocketClose]{@link Client#onWebSocketClose}
+   * - login [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)
+   * - passcode [String], [Client#connectHeaders](../classes/Client.html#connectHeaders)
+   * - host [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)
+   *
+   * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+   */
+  public connect(...args: any[]): void {
+    const out = this._parseConnect(...args);
+
+    if (out[0]) {
+      this.connectHeaders = out[0];
+    }
+    if (out[1]) {
+      this.onConnect = out[1];
+    }
+    if (out[2]) {
+      this.onStompError = out[2];
+    }
+    if (out[3]) {
+      this.onWebSocketClose = out[3];
+    }
+
+    super.activate();
+  }
+
+  /**
+   * Available for backward compatibility, please shift to using [Client#deactivate]{@link Client#deactivate}.
+   *
+   * **Deprecated**
+   *
+   * See:
+   * [Client#onDisconnect]{@link Client#onDisconnect}, and
+   * [Client#disconnectHeaders]{@link Client#disconnectHeaders}
+   *
+   * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+   */
+  public disconnect(
+    disconnectCallback?: any,
+    headers: StompHeaders = {}
+  ): void {
+    if (disconnectCallback) {
+      this.onDisconnect = disconnectCallback;
+    }
+    this.disconnectHeaders = headers;
+
+    super.deactivate();
+  }
+
+  /**
+   * Available for backward compatibility, use [Client#publish]{@link Client#publish}.
+   *
+   * Send a message to a named destination. Refer to your STOMP broker documentation for types
+   * and naming of destinations. The headers will, typically, be available to the subscriber.
+   * However, there may be special purpose headers corresponding to your STOMP broker.
+   *
+   *  **Deprecated**, use [Client#publish]{@link Client#publish}
+   *
+   * Note: Body must be String. You will need to covert the payload to string in case it is not string (e.g. JSON)
+   *
+   * ```javascript
+   *        client.send("/queue/test", {priority: 9}, "Hello, STOMP");
+   *
+   *        // If you want to send a message with a body, you must also pass the headers argument.
+   *        client.send("/queue/test", {}, "Hello, STOMP");
+   * ```
+   *
+   * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+   */
+  public send(
+    destination: string,
+    headers: { [key: string]: any } = {},
+    body: string = ''
+  ): void {
+    headers = (Object as any).assign({}, headers);
+
+    const skipContentLengthHeader = headers['content-length'] === false;
+    if (skipContentLengthHeader) {
+      delete headers['content-length'];
+    }
+    this.publish({
+      destination,
+      headers: headers as StompHeaders,
+      body,
+      skipContentLengthHeader,
+    });
+  }
+
+  /**
+   * Available for backward compatibility, renamed to [Client#reconnectDelay]{@link Client#reconnectDelay}.
+   *
+   * **Deprecated**
+   */
+  set reconnect_delay(value: number) {
+    this.reconnectDelay = value;
+  }
+
+  /**
+   * Available for backward compatibility, renamed to [Client#webSocket]{@link Client#webSocket}.
+   *
+   * **Deprecated**
+   */
+  get ws(): any {
+    return this.webSocket;
+  }
+
+  /**
+   * Available for backward compatibility, renamed to [Client#connectedVersion]{@link Client#connectedVersion}.
+   *
+   * **Deprecated**
+   */
+  get version() {
+    return this.connectedVersion;
+  }
+
+  /**
+   * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+   *
+   * **Deprecated**
+   */
+  get onreceive(): messageCallbackType {
+    return this.onUnhandledMessage;
+  }
+
+  /**
+   * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+   *
+   * **Deprecated**
+   */
+  set onreceive(value: messageCallbackType) {
+    this.onUnhandledMessage = value;
+  }
+
+  /**
+   * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+   * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}.
+   *
+   * **Deprecated**
+   */
+  get onreceipt(): frameCallbackType {
+    return this.onUnhandledReceipt;
+  }
+
+  /**
+   * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+   *
+   * **Deprecated**
+   */
+  set onreceipt(value: frameCallbackType) {
+    this.onUnhandledReceipt = value;
+  }
+
+  private _heartbeatInfo: HeartbeatInfo = new HeartbeatInfo(this);
+
+  /**
+   * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}
+   * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+   *
+   * **Deprecated**
+   */
+  get heartbeat() {
+    return this._heartbeatInfo;
+  }
+
+  /**
+   * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}
+   * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+   *
+   * **Deprecated**
+   */
+  set heartbeat(value: { incoming: number; outgoing: number }) {
+    this.heartbeatIncoming = value.incoming;
+    this.heartbeatOutgoing = value.outgoing;
+  }
+}

+ 26 - 0
node_modules/@stomp/stompjs/src/compatibility/heartbeat-info.ts

@@ -0,0 +1,26 @@
+import { CompatClient } from './compat-client.js';
+
+/**
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export class HeartbeatInfo {
+  constructor(private client: CompatClient) {}
+
+  get outgoing(): number {
+    return this.client.heartbeatOutgoing;
+  }
+
+  set outgoing(value: number) {
+    this.client.heartbeatOutgoing = value;
+  }
+
+  get incoming(): number {
+    return this.client.heartbeatIncoming;
+  }
+
+  set incoming(value: number) {
+    this.client.heartbeatIncoming = value;
+  }
+}

+ 118 - 0
node_modules/@stomp/stompjs/src/compatibility/stomp.ts

@@ -0,0 +1,118 @@
+import { Versions } from '../versions.js';
+import { CompatClient } from './compat-client.js';
+import { IStompSocket } from '../types.js';
+
+/**
+ * @internal
+ */
+declare const WebSocket: {
+  prototype: IStompSocket;
+  new (url: string, protocols?: string | string[]): IStompSocket;
+};
+
+/**
+ * STOMP Class, acts like a factory to create {@link Client}.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * **Deprecated**
+ *
+ * It will be removed in next major version. Please switch to {@link Client}.
+ */
+export class Stomp {
+  /**
+   * In case you need to use a non standard class for WebSocket.
+   *
+   * For example when using within NodeJS environment:
+   *
+   * ```javascript
+   *        StompJs = require('../../esm5/');
+   *        Stomp = StompJs.Stomp;
+   *        Stomp.WebSocketClass = require('websocket').w3cwebsocket;
+   * ```
+   *
+   * **Deprecated**
+   *
+   *
+   * It will be removed in next major version. Please switch to {@link Client}
+   * using [Client#webSocketFactory]{@link Client#webSocketFactory}.
+   */
+  // tslint:disable-next-line:variable-name
+  public static WebSocketClass: any = null;
+
+  /**
+   * This method creates a WebSocket client that is connected to
+   * the STOMP server located at the url.
+   *
+   * ```javascript
+   *        var url = "ws://localhost:61614/stomp";
+   *        var client = Stomp.client(url);
+   * ```
+   *
+   * **Deprecated**
+   *
+   * It will be removed in next major version. Please switch to {@link Client}
+   * using [Client#brokerURL]{@link Client#brokerURL}.
+   */
+  public static client(url: string, protocols?: string[]): CompatClient {
+    // This is a hack to allow another implementation than the standard
+    // HTML5 WebSocket class.
+    //
+    // It is possible to use another class by calling
+    //
+    //     Stomp.WebSocketClass = MozWebSocket
+    //
+    // *prior* to call `Stomp.client()`.
+    //
+    // This hack is deprecated and `Stomp.over()` method should be used
+    // instead.
+
+    // See remarks on the function Stomp.over
+    if (protocols == null) {
+      protocols = Versions.default.protocolVersions();
+    }
+    const wsFn = () => {
+      const klass = Stomp.WebSocketClass || WebSocket;
+      return new klass(url, protocols);
+    };
+
+    return new CompatClient(wsFn);
+  }
+
+  /**
+   * This method is an alternative to [Stomp#client]{@link Stomp#client} to let the user
+   * specify the WebSocket to use (either a standard HTML5 WebSocket or
+   * a similar object).
+   *
+   * In order to support reconnection, the function Client._connect should be callable more than once.
+   * While reconnecting
+   * a new instance of underlying transport (TCP Socket, WebSocket or SockJS) will be needed. So, this function
+   * alternatively allows passing a function that should return a new instance of the underlying socket.
+   *
+   * ```javascript
+   *        var client = Stomp.over(function(){
+   *          return new WebSocket('ws://localhost:15674/ws')
+   *        });
+   * ```
+   *
+   * **Deprecated**
+   *
+   * It will be removed in next major version. Please switch to {@link Client}
+   * using [Client#webSocketFactory]{@link Client#webSocketFactory}.
+   */
+  public static over(ws: any): CompatClient {
+    let wsFn: () => any;
+
+    if (typeof ws === 'function') {
+      wsFn = ws;
+    } else {
+      console.warn(
+        'Stomp.over did not receive a factory, auto reconnect will not work. ' +
+          'Please see https://stomp-js.github.io/api-docs/latest/classes/Stomp.html#over'
+      );
+      wsFn = () => ws;
+    }
+
+    return new CompatClient(wsFn);
+  }
+}

+ 254 - 0
node_modules/@stomp/stompjs/src/frame-impl.ts

@@ -0,0 +1,254 @@
+import { BYTE } from './byte.js';
+import { IFrame } from './i-frame.js';
+import { StompHeaders } from './stomp-headers.js';
+import { IRawFrameType } from './types.js';
+
+/**
+ * Frame class represents a STOMP frame.
+ *
+ * @internal
+ */
+export class FrameImpl implements IFrame {
+  /**
+   * STOMP Command
+   */
+  public command: string;
+
+  /**
+   * Headers, key value pairs.
+   */
+  public headers: StompHeaders;
+
+  /**
+   * Is this frame binary (based on whether body/binaryBody was passed when creating this frame).
+   */
+  public isBinaryBody: boolean;
+
+  /**
+   * body of the frame
+   */
+  get body(): string {
+    if (!this._body && this.isBinaryBody) {
+      this._body = new TextDecoder().decode(this._binaryBody);
+    }
+    return this._body || '';
+  }
+  private _body: string | undefined;
+
+  /**
+   * body as Uint8Array
+   */
+  get binaryBody(): Uint8Array {
+    if (!this._binaryBody && !this.isBinaryBody) {
+      this._binaryBody = new TextEncoder().encode(this._body);
+    }
+    // At this stage it will definitely have a valid value
+    return this._binaryBody as Uint8Array;
+  }
+  private _binaryBody: Uint8Array | undefined;
+
+  private escapeHeaderValues: boolean;
+  private skipContentLengthHeader: boolean;
+
+  /**
+   * Frame constructor. `command`, `headers` and `body` are available as properties.
+   *
+   * @internal
+   */
+  constructor(params: {
+    command: string;
+    headers?: StompHeaders;
+    body?: string;
+    binaryBody?: Uint8Array;
+    escapeHeaderValues?: boolean;
+    skipContentLengthHeader?: boolean;
+  }) {
+    const {
+      command,
+      headers,
+      body,
+      binaryBody,
+      escapeHeaderValues,
+      skipContentLengthHeader,
+    } = params;
+    this.command = command;
+    this.headers = (Object as any).assign({}, headers || {});
+
+    if (binaryBody) {
+      this._binaryBody = binaryBody;
+      this.isBinaryBody = true;
+    } else {
+      this._body = body || '';
+      this.isBinaryBody = false;
+    }
+    this.escapeHeaderValues = escapeHeaderValues || false;
+    this.skipContentLengthHeader = skipContentLengthHeader || false;
+  }
+
+  /**
+   * deserialize a STOMP Frame from raw data.
+   *
+   * @internal
+   */
+  public static fromRawFrame(
+    rawFrame: IRawFrameType,
+    escapeHeaderValues: boolean
+  ): FrameImpl {
+    const headers: StompHeaders = {};
+    const trim = (str: string): string => str.replace(/^\s+|\s+$/g, '');
+
+    // In case of repeated headers, as per standards, first value need to be used
+    for (const header of rawFrame.headers.reverse()) {
+      const idx = header.indexOf(':');
+
+      const key = trim(header[0]);
+      let value = trim(header[1]);
+
+      if (
+        escapeHeaderValues &&
+        rawFrame.command !== 'CONNECT' &&
+        rawFrame.command !== 'CONNECTED'
+      ) {
+        value = FrameImpl.hdrValueUnEscape(value);
+      }
+
+      headers[key] = value;
+    }
+
+    return new FrameImpl({
+      command: rawFrame.command as string,
+      headers,
+      binaryBody: rawFrame.binaryBody,
+      escapeHeaderValues,
+    });
+  }
+
+  /**
+   * @internal
+   */
+  public toString(): string {
+    return this.serializeCmdAndHeaders();
+  }
+
+  /**
+   * serialize this Frame in a format suitable to be passed to WebSocket.
+   * If the body is string the output will be string.
+   * If the body is binary (i.e. of type Unit8Array) it will be serialized to ArrayBuffer.
+   *
+   * @internal
+   */
+  public serialize(): string | ArrayBuffer {
+    const cmdAndHeaders = this.serializeCmdAndHeaders();
+
+    if (this.isBinaryBody) {
+      return FrameImpl.toUnit8Array(
+        cmdAndHeaders,
+        this._binaryBody as Uint8Array
+      ).buffer;
+    } else {
+      return cmdAndHeaders + this._body + BYTE.NULL;
+    }
+  }
+
+  private serializeCmdAndHeaders(): string {
+    const lines = [this.command];
+    if (this.skipContentLengthHeader) {
+      delete this.headers['content-length'];
+    }
+
+    for (const name of Object.keys(this.headers || {})) {
+      const value = this.headers[name];
+      if (
+        this.escapeHeaderValues &&
+        this.command !== 'CONNECT' &&
+        this.command !== 'CONNECTED'
+      ) {
+        lines.push(`${name}:${FrameImpl.hdrValueEscape(`${value}`)}`);
+      } else {
+        lines.push(`${name}:${value}`);
+      }
+    }
+    if (
+      this.isBinaryBody ||
+      (!this.isBodyEmpty() && !this.skipContentLengthHeader)
+    ) {
+      lines.push(`content-length:${this.bodyLength()}`);
+    }
+    return lines.join(BYTE.LF) + BYTE.LF + BYTE.LF;
+  }
+
+  private isBodyEmpty(): boolean {
+    return this.bodyLength() === 0;
+  }
+
+  private bodyLength(): number {
+    const binaryBody = this.binaryBody;
+    return binaryBody ? binaryBody.length : 0;
+  }
+
+  /**
+   * Compute the size of a UTF-8 string by counting its number of bytes
+   * (and not the number of characters composing the string)
+   */
+  private static sizeOfUTF8(s: string): number {
+    return s ? new TextEncoder().encode(s).length : 0;
+  }
+
+  private static toUnit8Array(
+    cmdAndHeaders: string,
+    binaryBody: Uint8Array
+  ): Uint8Array {
+    const uint8CmdAndHeaders = new TextEncoder().encode(cmdAndHeaders);
+    const nullTerminator = new Uint8Array([0]);
+    const uint8Frame = new Uint8Array(
+      uint8CmdAndHeaders.length + binaryBody.length + nullTerminator.length
+    );
+
+    uint8Frame.set(uint8CmdAndHeaders);
+    uint8Frame.set(binaryBody, uint8CmdAndHeaders.length);
+    uint8Frame.set(
+      nullTerminator,
+      uint8CmdAndHeaders.length + binaryBody.length
+    );
+
+    return uint8Frame;
+  }
+  /**
+   * Serialize a STOMP frame as per STOMP standards, suitable to be sent to the STOMP broker.
+   *
+   * @internal
+   */
+  public static marshall(params: {
+    command: string;
+    headers?: StompHeaders;
+    body?: string;
+    binaryBody?: Uint8Array;
+    escapeHeaderValues?: boolean;
+    skipContentLengthHeader?: boolean;
+  }) {
+    const frame = new FrameImpl(params);
+    return frame.serialize();
+  }
+
+  /**
+   *  Escape header values
+   */
+  private static hdrValueEscape(str: string): string {
+    return str
+      .replace(/\\/g, '\\\\')
+      .replace(/\r/g, '\\r')
+      .replace(/\n/g, '\\n')
+      .replace(/:/g, '\\c');
+  }
+
+  /**
+   * UnEscape header values
+   */
+  private static hdrValueUnEscape(str: string): string {
+    return str
+      .replace(/\\r/g, '\r')
+      .replace(/\\n/g, '\n')
+      .replace(/\\c/g, ':')
+      .replace(/\\\\/g, '\\');
+  }
+}

+ 41 - 0
node_modules/@stomp/stompjs/src/i-frame.ts

@@ -0,0 +1,41 @@
+import { StompHeaders } from './stomp-headers.js';
+
+/**
+ * It represents a STOMP frame. Many of the callbacks pass an IFrame received from
+ * the STOMP broker. For advanced usage you might need to access [headers]{@link IFrame#headers}.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * {@link IMessage} is an extended IFrame.
+ */
+export interface IFrame {
+  /**
+   * STOMP Command
+   */
+  command: string;
+
+  /**
+   * Headers, key value pairs.
+   */
+  headers: StompHeaders;
+
+  /**
+   * Is this frame binary (based on whether body/binaryBody was passed when creating this frame).
+   */
+  isBinaryBody: boolean;
+
+  /**
+   * body of the frame as string
+   */
+  readonly body: string;
+
+  /**
+   * body as Uint8Array
+   */
+  readonly binaryBody: Uint8Array;
+}
+
+/**
+ * Alias for {@link IFrame}
+ */
+export type Frame = IFrame;

+ 35 - 0
node_modules/@stomp/stompjs/src/i-message.ts

@@ -0,0 +1,35 @@
+import { IFrame } from './i-frame.js';
+import { StompHeaders } from './stomp-headers.js';
+
+/**
+ * Instance of Message will be passed to [subscription callback]{@link Client#subscribe}
+ * and [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+ * Since it is an extended {@link IFrame}, you can access [headers]{@link IFrame#headers}
+ * and [body]{@link IFrame#body} as properties.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * See [Client#subscribe]{@link Client#subscribe} for example.
+ */
+export interface IMessage extends IFrame {
+  /**
+   * When subscribing with manual acknowledgement, call this method on the message to ACK the message.
+   *
+   * See [Client#ack]{@link Client#ack} for an example.
+   */
+  ack: (headers?: StompHeaders) => void;
+
+  /**
+   * When subscribing with manual acknowledgement, call this method on the message to NACK the message.
+   *
+   * See [Client#nack]{@link Client#nack} for an example.
+   */
+  nack: (headers?: StompHeaders) => void;
+}
+
+/**
+ * Aliased to {@link IMessage}.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export type Message = IMessage;

+ 23 - 0
node_modules/@stomp/stompjs/src/i-transaction.ts

@@ -0,0 +1,23 @@
+/**
+ * A Transaction is created by calling [Client#begin]{@link Client#begin}
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * TODO: Example and caveat
+ */
+export interface ITransaction {
+  /**
+   * You will need to access this to send, ack, or nack within this transaction.
+   */
+  id: string;
+
+  /**
+   * Commit this transaction. See [Client#commit]{@link Client#commit} for an example.
+   */
+  commit: () => void;
+
+  /**
+   * Abort this transaction. See [Client#abort]{@link Client#abort} for an example.
+   */
+  abort: () => void;
+}

+ 15 - 0
node_modules/@stomp/stompjs/src/index.ts

@@ -0,0 +1,15 @@
+export * from './client.js';
+export * from './frame-impl.js';
+export * from './i-frame.js';
+export * from './i-message.js';
+export * from './parser.js';
+export * from './stomp-config.js';
+export * from './stomp-headers.js';
+export * from './stomp-subscription.js';
+export * from './i-transaction.js';
+export * from './types.js';
+export * from './versions.js';
+
+// Compatibility code
+export * from './compatibility/compat-client.js';
+export * from './compatibility/stomp.js';

+ 267 - 0
node_modules/@stomp/stompjs/src/parser.ts

@@ -0,0 +1,267 @@
+import { IRawFrameType } from './types.js';
+
+/**
+ * @internal
+ */
+const NULL = 0;
+/**
+ * @internal
+ */
+const LF = 10;
+/**
+ * @internal
+ */
+const CR = 13;
+/**
+ * @internal
+ */
+const COLON = 58;
+
+/**
+ * This is an evented, rec descent parser.
+ * A stream of Octets can be passed and whenever it recognizes
+ * a complete Frame or an incoming ping it will invoke the registered callbacks.
+ *
+ * All incoming Octets are fed into _onByte function.
+ * Depending on current state the _onByte function keeps changing.
+ * Depending on the state it keeps accumulating into _token and _results.
+ * State is indicated by current value of _onByte, all states are named as _collect.
+ *
+ * STOMP standards https://stomp.github.io/stomp-specification-1.2.html
+ * imply that all lengths are considered in bytes (instead of string lengths).
+ * So, before actual parsing, if the incoming data is String it is converted to Octets.
+ * This allows faithful implementation of the protocol and allows NULL Octets to be present in the body.
+ *
+ * There is no peek function on the incoming data.
+ * When a state change occurs based on an Octet without consuming the Octet,
+ * the Octet, after state change, is fed again (_reinjectByte).
+ * This became possible as the state change can be determined by inspecting just one Octet.
+ *
+ * There are two modes to collect the body, if content-length header is there then it by counting Octets
+ * otherwise it is determined by NULL terminator.
+ *
+ * Following the standards, the command and headers are converted to Strings
+ * and the body is returned as Octets.
+ * Headers are returned as an array and not as Hash - to allow multiple occurrence of an header.
+ *
+ * This parser does not use Regular Expressions as that can only operate on Strings.
+ *
+ * It handles if multiple STOMP frames are given as one chunk, a frame is split into multiple chunks, or
+ * any combination there of. The parser remembers its state (any partial frame) and continues when a new chunk
+ * is pushed.
+ *
+ * Typically the higher level function will convert headers to Hash, handle unescaping of header values
+ * (which is protocol version specific), and convert body to text.
+ *
+ * Check the parser.spec.js to understand cases that this parser is supposed to handle.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export class Parser {
+  private readonly _encoder = new TextEncoder();
+  private readonly _decoder = new TextDecoder();
+
+  // @ts-ignore - it always has a value
+  private _results: IRawFrameType;
+
+  private _token: number[] = [];
+  private _headerKey: string | undefined;
+  private _bodyBytesRemaining: number | undefined;
+
+  // @ts-ignore - it always has a value
+  private _onByte: (byte: number) => void;
+
+  public constructor(
+    public onFrame: (rawFrame: IRawFrameType) => void,
+    public onIncomingPing: () => void
+  ) {
+    this._initState();
+  }
+
+  public parseChunk(
+    segment: string | ArrayBuffer,
+    appendMissingNULLonIncoming: boolean = false
+  ) {
+    let chunk: Uint8Array;
+
+    if (typeof segment === 'string') {
+      chunk = this._encoder.encode(segment);
+    } else {
+      chunk = new Uint8Array(segment);
+    }
+
+    // See https://github.com/stomp-js/stompjs/issues/89
+    // Remove when underlying issue is fixed.
+    //
+    // Send a NULL byte, if the last byte of a Text frame was not NULL.F
+    if (appendMissingNULLonIncoming && chunk[chunk.length - 1] !== 0) {
+      const chunkWithNull = new Uint8Array(chunk.length + 1);
+      chunkWithNull.set(chunk, 0);
+      chunkWithNull[chunk.length] = 0;
+      chunk = chunkWithNull;
+    }
+
+    // tslint:disable-next-line:prefer-for-of
+    for (let i = 0; i < chunk.length; i++) {
+      const byte = chunk[i];
+      this._onByte(byte);
+    }
+  }
+
+  // The following implements a simple Rec Descent Parser.
+  // The grammar is simple and just one byte tells what should be the next state
+
+  private _collectFrame(byte: number): void {
+    if (byte === NULL) {
+      // Ignore
+      return;
+    }
+    if (byte === CR) {
+      // Ignore CR
+      return;
+    }
+    if (byte === LF) {
+      // Incoming Ping
+      this.onIncomingPing();
+      return;
+    }
+
+    this._onByte = this._collectCommand;
+    this._reinjectByte(byte);
+  }
+
+  private _collectCommand(byte: number): void {
+    if (byte === CR) {
+      // Ignore CR
+      return;
+    }
+    if (byte === LF) {
+      this._results.command = this._consumeTokenAsUTF8();
+      this._onByte = this._collectHeaders;
+      return;
+    }
+
+    this._consumeByte(byte);
+  }
+
+  private _collectHeaders(byte: number): void {
+    if (byte === CR) {
+      // Ignore CR
+      return;
+    }
+    if (byte === LF) {
+      this._setupCollectBody();
+      return;
+    }
+    this._onByte = this._collectHeaderKey;
+    this._reinjectByte(byte);
+  }
+
+  private _reinjectByte(byte: number) {
+    this._onByte(byte);
+  }
+
+  private _collectHeaderKey(byte: number): void {
+    if (byte === COLON) {
+      this._headerKey = this._consumeTokenAsUTF8();
+      this._onByte = this._collectHeaderValue;
+      return;
+    }
+    this._consumeByte(byte);
+  }
+
+  private _collectHeaderValue(byte: number): void {
+    if (byte === CR) {
+      // Ignore CR
+      return;
+    }
+    if (byte === LF) {
+      this._results.headers.push([
+        this._headerKey as string,
+        this._consumeTokenAsUTF8(),
+      ]);
+      this._headerKey = undefined;
+      this._onByte = this._collectHeaders;
+      return;
+    }
+    this._consumeByte(byte);
+  }
+
+  private _setupCollectBody() {
+    const contentLengthHeader = this._results.headers.filter(
+      (header: [string, string]) => {
+        return header[0] === 'content-length';
+      }
+    )[0];
+
+    if (contentLengthHeader) {
+      this._bodyBytesRemaining = parseInt(contentLengthHeader[1], 10);
+      this._onByte = this._collectBodyFixedSize;
+    } else {
+      this._onByte = this._collectBodyNullTerminated;
+    }
+  }
+
+  private _collectBodyNullTerminated(byte: number): void {
+    if (byte === NULL) {
+      this._retrievedBody();
+      return;
+    }
+    this._consumeByte(byte);
+  }
+
+  private _collectBodyFixedSize(byte: number): void {
+    // It is post decrement, so that we discard the trailing NULL octet
+    if ((this._bodyBytesRemaining as number)-- === 0) {
+      this._retrievedBody();
+      return;
+    }
+    this._consumeByte(byte);
+  }
+
+  private _retrievedBody() {
+    this._results.binaryBody = this._consumeTokenAsRaw();
+
+    try {
+      this.onFrame(this._results);
+    } catch (e) {
+      console.log(
+        `Ignoring an exception thrown by a frame handler. Original exception: `,
+        e
+      );
+    }
+
+    this._initState();
+  }
+
+  // Rec Descent Parser helpers
+
+  private _consumeByte(byte: number) {
+    this._token.push(byte);
+  }
+
+  private _consumeTokenAsUTF8() {
+    return this._decoder.decode(this._consumeTokenAsRaw());
+  }
+
+  private _consumeTokenAsRaw() {
+    const rawResult = new Uint8Array(this._token);
+    this._token = [];
+    return rawResult;
+  }
+
+  private _initState() {
+    this._results = {
+      command: undefined,
+      headers: [],
+      binaryBody: undefined,
+    };
+
+    this._token = [];
+    this._headerKey = undefined;
+
+    this._onByte = this._collectFrame;
+  }
+}

+ 149 - 0
node_modules/@stomp/stompjs/src/stomp-config.ts

@@ -0,0 +1,149 @@
+import { StompHeaders } from './stomp-headers.js';
+import {
+  ActivationState,
+  closeEventCallbackType,
+  debugFnType,
+  frameCallbackType,
+  messageCallbackType,
+  wsErrorCallbackType,
+} from './types.js';
+import { Versions } from './versions.js';
+
+/**
+ * Configuration options for STOMP Client, each key corresponds to
+ * field by the same name in {@link Client}. This can be passed to
+ * the constructor of {@link Client} or to [Client#configure]{@link Client#configure}.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class StompConfig {
+  /**
+   * See [Client#brokerURL]{@link Client#brokerURL}.
+   */
+  public brokerURL?: string;
+
+  /**
+   * See [Client#stompVersions]{@link Client#stompVersions}.
+   */
+  public stompVersions?: Versions;
+
+  /**
+   * See [Client#webSocketFactory]{@link Client#webSocketFactory}.
+   */
+  public webSocketFactory?: () => any;
+
+  /**
+   * See [Client#connectionTimeout]{@link Client#connectionTimeout}.
+   */
+  public connectionTimeout?: number;
+
+  /**
+   * See [Client#reconnectDelay]{@link Client#reconnectDelay}.
+   */
+  public reconnectDelay?: number;
+
+  /**
+   * See [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}.
+   */
+  public heartbeatIncoming?: number;
+
+  /**
+   * See [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+   */
+  public heartbeatOutgoing?: number;
+
+  /**
+   * See [Client#splitLargeFrames]{@link Client#splitLargeFrames}.
+   */
+  public splitLargeFrames?: boolean;
+
+  /**
+   * See [Client#forceBinaryWSFrames]{@link Client#forceBinaryWSFrames}.
+   */
+  public forceBinaryWSFrames?: boolean;
+
+  /**
+   * See [Client#appendMissingNULLonIncoming]{@link Client#appendMissingNULLonIncoming}.
+   */
+  public appendMissingNULLonIncoming?: boolean;
+
+  /**
+   * See [Client#maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.
+   */
+  public maxWebSocketChunkSize?: number;
+
+  /**
+   * See [Client#connectHeaders]{@link Client#connectHeaders}.
+   */
+  public connectHeaders?: StompHeaders;
+
+  /**
+   * See [Client#disconnectHeaders]{@link Client#disconnectHeaders}.
+   */
+  public disconnectHeaders?: StompHeaders;
+
+  /**
+   * See [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+   */
+  public onUnhandledMessage?: messageCallbackType;
+
+  /**
+   * See [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+   */
+  public onUnhandledReceipt?: frameCallbackType;
+
+  /**
+   * See [Client#onUnhandledFrame]{@link Client#onUnhandledFrame}.
+   */
+  public onUnhandledFrame?: frameCallbackType;
+
+  /**
+   * See [Client#beforeConnect]{@link Client#beforeConnect}.
+   */
+  public beforeConnect?: () => void | Promise<void>;
+
+  /**
+   * See [Client#onConnect]{@link Client#onConnect}.
+   */
+  public onConnect?: frameCallbackType;
+
+  /**
+   * See [Client#onDisconnect]{@link Client#onDisconnect}.
+   */
+  public onDisconnect?: frameCallbackType;
+
+  /**
+   * See [Client#onStompError]{@link Client#onStompError}.
+   */
+  public onStompError?: frameCallbackType;
+
+  /**
+   * See [Client#onWebSocketClose]{@link Client#onWebSocketClose}.
+   */
+  public onWebSocketClose?: closeEventCallbackType;
+
+  /**
+   * See [Client#onWebSocketError]{@link Client#onWebSocketError}.
+   */
+  public onWebSocketError?: wsErrorCallbackType;
+
+  /**
+   * See [Client#logRawCommunication]{@link Client#logRawCommunication}.
+   */
+  public logRawCommunication?: boolean;
+
+  /**
+   * See [Client#debug]{@link Client#debug}.
+   */
+  public debug?: debugFnType;
+
+  /**
+   * See [Client#discardWebsocketOnCommFailure]{@link Client#discardWebsocketOnCommFailure}.
+   */
+  public discardWebsocketOnCommFailure?: boolean;
+
+  /**
+   * See [Client#onChangeState]{@link Client#onChangeState}.
+   */
+  public onChangeState?: (state: ActivationState) => void;
+}

+ 555 - 0
node_modules/@stomp/stompjs/src/stomp-handler.ts

@@ -0,0 +1,555 @@
+import { BYTE } from './byte.js';
+import { Client } from './client.js';
+import { FrameImpl } from './frame-impl.js';
+import { IMessage } from './i-message.js';
+import { ITransaction } from './i-transaction.js';
+import { Parser } from './parser.js';
+import { StompHeaders } from './stomp-headers.js';
+import { StompSubscription } from './stomp-subscription.js';
+import {
+  closeEventCallbackType,
+  debugFnType,
+  frameCallbackType,
+  IPublishParams,
+  IStompSocket,
+  IStompSocketMessageEvent,
+  IStomptHandlerConfig,
+  messageCallbackType,
+  StompSocketState,
+  wsErrorCallbackType,
+} from './types.js';
+import { Versions } from './versions.js';
+import { augmentWebsocket } from './augment-websocket.js';
+
+/**
+ * The STOMP protocol handler
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export class StompHandler {
+  public debug: debugFnType;
+
+  public stompVersions: Versions;
+
+  public connectHeaders: StompHeaders;
+
+  public disconnectHeaders: StompHeaders;
+
+  public heartbeatIncoming: number;
+
+  public heartbeatOutgoing: number;
+
+  public onUnhandledMessage: messageCallbackType;
+
+  public onUnhandledReceipt: frameCallbackType;
+
+  public onUnhandledFrame: frameCallbackType;
+
+  public onConnect: frameCallbackType;
+
+  public onDisconnect: frameCallbackType;
+
+  public onStompError: frameCallbackType;
+
+  public onWebSocketClose: closeEventCallbackType;
+
+  public onWebSocketError: wsErrorCallbackType;
+
+  public logRawCommunication: boolean;
+
+  public splitLargeFrames: boolean;
+
+  public maxWebSocketChunkSize: number;
+
+  public forceBinaryWSFrames: boolean;
+
+  public appendMissingNULLonIncoming: boolean;
+
+  public discardWebsocketOnCommFailure: boolean;
+
+  get connectedVersion(): string | undefined {
+    return this._connectedVersion;
+  }
+  private _connectedVersion: string | undefined;
+
+  get connected(): boolean {
+    return this._connected;
+  }
+
+  private _connected: boolean = false;
+
+  private readonly _subscriptions: { [key: string]: messageCallbackType };
+  private readonly _receiptWatchers: { [key: string]: frameCallbackType };
+  private _partialData: string;
+  private _escapeHeaderValues: boolean;
+  private _counter: number;
+  private _pinger: any;
+  private _ponger: any;
+  private _lastServerActivityTS: number;
+
+  constructor(
+    private _client: Client,
+    public _webSocket: IStompSocket,
+    config: IStomptHandlerConfig
+  ) {
+    // used to index subscribers
+    this._counter = 0;
+
+    // subscription callbacks indexed by subscriber's ID
+    this._subscriptions = {};
+
+    // receipt-watchers indexed by receipts-ids
+    this._receiptWatchers = {};
+
+    this._partialData = '';
+
+    this._escapeHeaderValues = false;
+
+    this._lastServerActivityTS = Date.now();
+
+    this.debug = config.debug;
+    this.stompVersions = config.stompVersions;
+    this.connectHeaders = config.connectHeaders;
+    this.disconnectHeaders = config.disconnectHeaders;
+    this.heartbeatIncoming = config.heartbeatIncoming;
+    this.heartbeatOutgoing = config.heartbeatOutgoing;
+    this.splitLargeFrames = config.splitLargeFrames;
+    this.maxWebSocketChunkSize = config.maxWebSocketChunkSize;
+    this.forceBinaryWSFrames = config.forceBinaryWSFrames;
+    this.logRawCommunication = config.logRawCommunication;
+    this.appendMissingNULLonIncoming = config.appendMissingNULLonIncoming;
+    this.discardWebsocketOnCommFailure = config.discardWebsocketOnCommFailure;
+    this.onConnect = config.onConnect;
+    this.onDisconnect = config.onDisconnect;
+    this.onStompError = config.onStompError;
+    this.onWebSocketClose = config.onWebSocketClose;
+    this.onWebSocketError = config.onWebSocketError;
+    this.onUnhandledMessage = config.onUnhandledMessage;
+    this.onUnhandledReceipt = config.onUnhandledReceipt;
+    this.onUnhandledFrame = config.onUnhandledFrame;
+  }
+
+  public start(): void {
+    const parser = new Parser(
+      // On Frame
+      rawFrame => {
+        const frame = FrameImpl.fromRawFrame(
+          rawFrame,
+          this._escapeHeaderValues
+        );
+
+        // if this.logRawCommunication is set, the rawChunk is logged at this._webSocket.onmessage
+        if (!this.logRawCommunication) {
+          this.debug(`<<< ${frame}`);
+        }
+
+        const serverFrameHandler =
+          this._serverFrameHandlers[frame.command] || this.onUnhandledFrame;
+        serverFrameHandler(frame);
+      },
+      // On Incoming Ping
+      () => {
+        this.debug('<<< PONG');
+      }
+    );
+
+    this._webSocket.onmessage = (evt: IStompSocketMessageEvent) => {
+      this.debug('Received data');
+      this._lastServerActivityTS = Date.now();
+
+      if (this.logRawCommunication) {
+        const rawChunkAsString =
+          evt.data instanceof ArrayBuffer
+            ? new TextDecoder().decode(evt.data)
+            : evt.data;
+        this.debug(`<<< ${rawChunkAsString}`);
+      }
+
+      parser.parseChunk(
+        evt.data as string | ArrayBuffer,
+        this.appendMissingNULLonIncoming
+      );
+    };
+
+    this._webSocket.onclose = (closeEvent): void => {
+      this.debug(`Connection closed to ${this._webSocket.url}`);
+      this._cleanUp();
+      this.onWebSocketClose(closeEvent);
+    };
+
+    this._webSocket.onerror = (errorEvent): void => {
+      this.onWebSocketError(errorEvent);
+    };
+
+    this._webSocket.onopen = () => {
+      // Clone before updating
+      const connectHeaders = (Object as any).assign({}, this.connectHeaders);
+
+      this.debug('Web Socket Opened...');
+      connectHeaders['accept-version'] = this.stompVersions.supportedVersions();
+      connectHeaders['heart-beat'] = [
+        this.heartbeatOutgoing,
+        this.heartbeatIncoming,
+      ].join(',');
+      this._transmit({ command: 'CONNECT', headers: connectHeaders });
+    };
+  }
+
+  private readonly _serverFrameHandlers: {
+    [key: string]: frameCallbackType;
+  } = {
+    // [CONNECTED Frame](https://stomp.github.com/stomp-specification-1.2.html#CONNECTED_Frame)
+    CONNECTED: frame => {
+      this.debug(`connected to server ${frame.headers.server}`);
+      this._connected = true;
+      this._connectedVersion = frame.headers.version;
+      // STOMP version 1.2 needs header values to be escaped
+      if (this._connectedVersion === Versions.V1_2) {
+        this._escapeHeaderValues = true;
+      }
+
+      this._setupHeartbeat(frame.headers);
+      this.onConnect(frame);
+    },
+
+    // [MESSAGE Frame](https://stomp.github.com/stomp-specification-1.2.html#MESSAGE)
+    MESSAGE: frame => {
+      // the callback is registered when the client calls
+      // `subscribe()`.
+      // If there is no registered subscription for the received message,
+      // the default `onUnhandledMessage` callback is used that the client can set.
+      // This is useful for subscriptions that are automatically created
+      // on the browser side (e.g. [RabbitMQ's temporary
+      // queues](https://www.rabbitmq.com/stomp.html)).
+      const subscription = frame.headers.subscription;
+      const onReceive =
+        this._subscriptions[subscription] || this.onUnhandledMessage;
+
+      // bless the frame to be a Message
+      const message = frame as IMessage;
+
+      const client = this;
+      const messageId =
+        this._connectedVersion === Versions.V1_2
+          ? message.headers.ack
+          : message.headers['message-id'];
+
+      // add `ack()` and `nack()` methods directly to the returned frame
+      // so that a simple call to `message.ack()` can acknowledge the message.
+      message.ack = (headers: StompHeaders = {}): void => {
+        return client.ack(messageId, subscription, headers);
+      };
+      message.nack = (headers: StompHeaders = {}): void => {
+        return client.nack(messageId, subscription, headers);
+      };
+      onReceive(message);
+    },
+
+    // [RECEIPT Frame](https://stomp.github.com/stomp-specification-1.2.html#RECEIPT)
+    RECEIPT: frame => {
+      const callback = this._receiptWatchers[frame.headers['receipt-id']];
+      if (callback) {
+        callback(frame);
+        // Server will acknowledge only once, remove the callback
+        delete this._receiptWatchers[frame.headers['receipt-id']];
+      } else {
+        this.onUnhandledReceipt(frame);
+      }
+    },
+
+    // [ERROR Frame](https://stomp.github.com/stomp-specification-1.2.html#ERROR)
+    ERROR: frame => {
+      this.onStompError(frame);
+    },
+  };
+
+  private _setupHeartbeat(headers: StompHeaders): void {
+    if (
+      headers.version !== Versions.V1_1 &&
+      headers.version !== Versions.V1_2
+    ) {
+      return;
+    }
+
+    // It is valid for the server to not send this header
+    // https://stomp.github.io/stomp-specification-1.2.html#Heart-beating
+    if (!headers['heart-beat']) {
+      return;
+    }
+
+    // heart-beat header received from the server looks like:
+    //
+    //     heart-beat: sx, sy
+    const [serverOutgoing, serverIncoming] = headers['heart-beat']
+      .split(',')
+      .map((v: string) => parseInt(v, 10));
+
+    if (this.heartbeatOutgoing !== 0 && serverIncoming !== 0) {
+      const ttl: number = Math.max(this.heartbeatOutgoing, serverIncoming);
+      this.debug(`send PING every ${ttl}ms`);
+      this._pinger = setInterval(() => {
+        if (this._webSocket.readyState === StompSocketState.OPEN) {
+          this._webSocket.send(BYTE.LF);
+          this.debug('>>> PING');
+        }
+      }, ttl);
+    }
+
+    if (this.heartbeatIncoming !== 0 && serverOutgoing !== 0) {
+      const ttl: number = Math.max(this.heartbeatIncoming, serverOutgoing);
+      this.debug(`check PONG every ${ttl}ms`);
+      this._ponger = setInterval(() => {
+        const delta = Date.now() - this._lastServerActivityTS;
+        // We wait twice the TTL to be flexible on window's setInterval calls
+        if (delta > ttl * 2) {
+          this.debug(`did not receive server activity for the last ${delta}ms`);
+          this._closeOrDiscardWebsocket();
+        }
+      }, ttl);
+    }
+  }
+
+  private _closeOrDiscardWebsocket() {
+    if (this.discardWebsocketOnCommFailure) {
+      this.debug(
+        'Discarding websocket, the underlying socket may linger for a while'
+      );
+      this.discardWebsocket();
+    } else {
+      this.debug('Issuing close on the websocket');
+      this._closeWebsocket();
+    }
+  }
+
+  public forceDisconnect() {
+    if (this._webSocket) {
+      if (
+        this._webSocket.readyState === StompSocketState.CONNECTING ||
+        this._webSocket.readyState === StompSocketState.OPEN
+      ) {
+        this._closeOrDiscardWebsocket();
+      }
+    }
+  }
+
+  public _closeWebsocket() {
+    this._webSocket.onmessage = () => {}; // ignore messages
+    this._webSocket.close();
+  }
+
+  public discardWebsocket() {
+    if (typeof this._webSocket.terminate !== 'function') {
+      augmentWebsocket(this._webSocket, (msg: string) => this.debug(msg));
+    }
+
+    // @ts-ignore - this method will be there at this stage
+    this._webSocket.terminate();
+  }
+
+  private _transmit(params: {
+    command: string;
+    headers?: StompHeaders;
+    body?: string;
+    binaryBody?: Uint8Array;
+    skipContentLengthHeader?: boolean;
+  }): void {
+    const { command, headers, body, binaryBody, skipContentLengthHeader } =
+      params;
+    const frame = new FrameImpl({
+      command,
+      headers,
+      body,
+      binaryBody,
+      escapeHeaderValues: this._escapeHeaderValues,
+      skipContentLengthHeader,
+    });
+
+    let rawChunk = frame.serialize();
+
+    if (this.logRawCommunication) {
+      this.debug(`>>> ${rawChunk}`);
+    } else {
+      this.debug(`>>> ${frame}`);
+    }
+
+    if (this.forceBinaryWSFrames && typeof rawChunk === 'string') {
+      rawChunk = new TextEncoder().encode(rawChunk);
+    }
+
+    if (typeof rawChunk !== 'string' || !this.splitLargeFrames) {
+      this._webSocket.send(rawChunk);
+    } else {
+      let out = rawChunk as string;
+      while (out.length > 0) {
+        const chunk = out.substring(0, this.maxWebSocketChunkSize);
+        out = out.substring(this.maxWebSocketChunkSize);
+        this._webSocket.send(chunk);
+        this.debug(`chunk sent = ${chunk.length}, remaining = ${out.length}`);
+      }
+    }
+  }
+
+  public dispose(): void {
+    if (this.connected) {
+      try {
+        // clone before updating
+        const disconnectHeaders = (Object as any).assign(
+          {},
+          this.disconnectHeaders
+        );
+
+        if (!disconnectHeaders.receipt) {
+          disconnectHeaders.receipt = `close-${this._counter++}`;
+        }
+        this.watchForReceipt(disconnectHeaders.receipt, frame => {
+          this._closeWebsocket();
+          this._cleanUp();
+          this.onDisconnect(frame);
+        });
+        this._transmit({ command: 'DISCONNECT', headers: disconnectHeaders });
+      } catch (error) {
+        this.debug(`Ignoring error during disconnect ${error}`);
+      }
+    } else {
+      if (
+        this._webSocket.readyState === StompSocketState.CONNECTING ||
+        this._webSocket.readyState === StompSocketState.OPEN
+      ) {
+        this._closeWebsocket();
+      }
+    }
+  }
+
+  private _cleanUp() {
+    this._connected = false;
+
+    if (this._pinger) {
+      clearInterval(this._pinger);
+      this._pinger = undefined;
+    }
+    if (this._ponger) {
+      clearInterval(this._ponger);
+      this._ponger = undefined;
+    }
+  }
+
+  public publish(params: IPublishParams): void {
+    const { destination, headers, body, binaryBody, skipContentLengthHeader } =
+      params;
+    const hdrs: StompHeaders = (Object as any).assign({ destination }, headers);
+    this._transmit({
+      command: 'SEND',
+      headers: hdrs,
+      body,
+      binaryBody,
+      skipContentLengthHeader,
+    });
+  }
+
+  public watchForReceipt(receiptId: string, callback: frameCallbackType): void {
+    this._receiptWatchers[receiptId] = callback;
+  }
+
+  public subscribe(
+    destination: string,
+    callback: messageCallbackType,
+    headers: StompHeaders = {}
+  ): StompSubscription {
+    headers = (Object as any).assign({}, headers);
+
+    if (!headers.id) {
+      headers.id = `sub-${this._counter++}`;
+    }
+    headers.destination = destination;
+    this._subscriptions[headers.id] = callback;
+    this._transmit({ command: 'SUBSCRIBE', headers });
+    const client = this;
+    return {
+      id: headers.id,
+
+      unsubscribe(hdrs) {
+        return client.unsubscribe(headers.id, hdrs);
+      },
+    };
+  }
+
+  public unsubscribe(id: string, headers: StompHeaders = {}): void {
+    headers = (Object as any).assign({}, headers);
+
+    delete this._subscriptions[id];
+    headers.id = id;
+    this._transmit({ command: 'UNSUBSCRIBE', headers });
+  }
+
+  public begin(transactionId: string): ITransaction {
+    const txId = transactionId || `tx-${this._counter++}`;
+    this._transmit({
+      command: 'BEGIN',
+      headers: {
+        transaction: txId,
+      },
+    });
+    const client = this;
+    return {
+      id: txId,
+      commit(): void {
+        client.commit(txId);
+      },
+      abort(): void {
+        client.abort(txId);
+      },
+    };
+  }
+
+  public commit(transactionId: string): void {
+    this._transmit({
+      command: 'COMMIT',
+      headers: {
+        transaction: transactionId,
+      },
+    });
+  }
+
+  public abort(transactionId: string): void {
+    this._transmit({
+      command: 'ABORT',
+      headers: {
+        transaction: transactionId,
+      },
+    });
+  }
+
+  public ack(
+    messageId: string,
+    subscriptionId: string,
+    headers: StompHeaders = {}
+  ): void {
+    headers = (Object as any).assign({}, headers);
+
+    if (this._connectedVersion === Versions.V1_2) {
+      headers.id = messageId;
+    } else {
+      headers['message-id'] = messageId;
+    }
+    headers.subscription = subscriptionId;
+    this._transmit({ command: 'ACK', headers });
+  }
+
+  public nack(
+    messageId: string,
+    subscriptionId: string,
+    headers: StompHeaders = {}
+  ): void {
+    headers = (Object as any).assign({}, headers);
+
+    if (this._connectedVersion === Versions.V1_2) {
+      headers.id = messageId;
+    } else {
+      headers['message-id'] = messageId;
+    }
+    headers.subscription = subscriptionId;
+    return this._transmit({ command: 'NACK', headers });
+  }
+}

+ 12 - 0
node_modules/@stomp/stompjs/src/stomp-headers.ts

@@ -0,0 +1,12 @@
+/**
+ * STOMP headers. Many functions calls will accept headers as parameters.
+ * The headers sent by Broker will be available as [IFrame#headers]{@link IFrame#headers}.
+ *
+ * `key` and `value` must be valid strings.
+ * In addition, `key` must not contain `CR`, `LF`, or `:`.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class StompHeaders {
+  [key: string]: string;
+}

+ 18 - 0
node_modules/@stomp/stompjs/src/stomp-subscription.ts

@@ -0,0 +1,18 @@
+import { StompHeaders } from './stomp-headers.js';
+
+/**
+ * Call [Client#subscribe]{@link Client#subscribe} to create a StompSubscription.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export interface StompSubscription {
+  /**
+   * Id associated with this subscription.
+   */
+  id: string;
+
+  /**
+   * Unsubscribe. See [Client#unsubscribe]{@link Client#unsubscribe} for an example.
+   */
+  unsubscribe: (headers?: StompHeaders) => void;
+}

+ 184 - 0
node_modules/@stomp/stompjs/src/types.ts

@@ -0,0 +1,184 @@
+import { IFrame } from './i-frame.js';
+import { IMessage } from './i-message.js';
+import { StompHeaders } from './stomp-headers.js';
+import { Versions } from './versions.js';
+
+/**
+ * This callback will receive a `string` as a parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export type debugFnType = (msg: string) => void;
+
+/**
+ * This callback will receive a {@link IMessage} as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export type messageCallbackType = (message: IMessage) => void;
+
+/**
+ * This callback will receive a {@link IFrame} as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export type frameCallbackType = ((frame: IFrame) => void) | (() => void);
+
+/**
+ * This callback will receive a [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}
+ * as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export type closeEventCallbackType<T = any> = (evt: T) => void;
+
+/**
+ * This callback will receive an [Event]{@link https://developer.mozilla.org/en-US/docs/Web/API/Event}
+ * as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export type wsErrorCallbackType<T = any> = (evt: T) => void;
+
+/**
+ * Parameters for [Client#publish]{@link Client#publish}.
+ * Aliased as publishParams as well.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export interface IPublishParams {
+  /**
+   * destination end point
+   */
+  destination: string;
+  /**
+   * headers (optional)
+   */
+  headers?: StompHeaders;
+  /**
+   * body (optional)
+   */
+  body?: string;
+  /**
+   * binary body (optional)
+   */
+  binaryBody?: Uint8Array;
+  /**
+   * By default, a `content-length` header will be added in the Frame to the broker.
+   * Set it to `true` for the header to be skipped.
+   */
+  skipContentLengthHeader?: boolean;
+}
+
+/**
+ * Backward compatibility, switch to {@link IPublishParams}.
+ */
+export type publishParams = IPublishParams;
+
+/**
+ * Used in {@link IRawFrameType}
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export type RawHeaderType = [string, string];
+
+/**
+ * The parser yield frames in this structure
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export interface IRawFrameType {
+  command: string | undefined;
+  headers: RawHeaderType[];
+  binaryBody: Uint8Array | undefined;
+}
+
+/**
+ * @internal
+ */
+export interface IStompSocketMessageEvent {
+  data?: string | ArrayBuffer;
+}
+
+/**
+ * Copied from Websocket interface to avoid dom typelib dependency.
+ *
+ * @internal
+ */
+export interface IStompSocket {
+  url: string;
+  onclose: ((ev?: any) => any) | undefined | null;
+  onerror: ((ev: any) => any) | undefined | null;
+  onmessage: ((ev: IStompSocketMessageEvent) => any) | undefined | null;
+  onopen: ((ev?: any) => any) | undefined | null;
+  terminate?: (() => any) | undefined | null;
+
+  /**
+   * Returns a string that indicates how binary data from the socket is exposed to scripts:
+   * We support only 'arraybuffer'.
+   */
+  binaryType?: string;
+
+  /**
+   * Returns the state of the socket connection. It can have the values of StompSocketState.
+   */
+  readonly readyState: number;
+
+  /**
+   * Closes the connection.
+   */
+  close(): void;
+  /**
+   * Transmits data using the connection. data can be a string or an ArrayBuffer.
+   */
+  send(data: string | ArrayBuffer): void;
+}
+
+/**
+ * Possible states for the IStompSocket
+ */
+export enum StompSocketState {
+  CONNECTING,
+  OPEN,
+  CLOSING,
+  CLOSED,
+}
+
+/**
+ * Possible activation state
+ */
+export enum ActivationState {
+  ACTIVE,
+  DEACTIVATING,
+  INACTIVE,
+}
+
+/**
+ * @internal
+ */
+export interface IStomptHandlerConfig {
+  debug: debugFnType;
+  stompVersions: Versions;
+  connectHeaders: StompHeaders;
+  disconnectHeaders: StompHeaders;
+  heartbeatIncoming: number;
+  heartbeatOutgoing: number;
+  splitLargeFrames: boolean;
+  maxWebSocketChunkSize: number;
+  forceBinaryWSFrames: boolean;
+  logRawCommunication: boolean;
+  appendMissingNULLonIncoming: boolean;
+  discardWebsocketOnCommFailure: boolean;
+  onConnect: frameCallbackType;
+  onDisconnect: frameCallbackType;
+  onStompError: frameCallbackType;
+  onWebSocketClose: closeEventCallbackType;
+  onWebSocketError: wsErrorCallbackType;
+  onUnhandledMessage: messageCallbackType;
+  onUnhandledReceipt: frameCallbackType;
+  onUnhandledFrame: frameCallbackType;
+}

+ 50 - 0
node_modules/@stomp/stompjs/src/versions.ts

@@ -0,0 +1,50 @@
+/**
+ * Supported STOMP versions
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class Versions {
+  /**
+   * Indicates protocol version 1.0
+   */
+  public static V1_0 = '1.0';
+  /**
+   * Indicates protocol version 1.1
+   */
+  public static V1_1 = '1.1';
+  /**
+   * Indicates protocol version 1.2
+   */
+  public static V1_2 = '1.2';
+
+  /**
+   * @internal
+   */
+  public static default = new Versions([
+    Versions.V1_2,
+    Versions.V1_1,
+    Versions.V1_0,
+  ]);
+
+  /**
+   * Takes an array of versions, typical elements '1.2', '1.1', or '1.0'
+   *
+   * You will be creating an instance of this class if you want to override
+   * supported versions to be declared during STOMP handshake.
+   */
+  constructor(public versions: string[]) {}
+
+  /**
+   * Used as part of CONNECT STOMP Frame
+   */
+  public supportedVersions() {
+    return this.versions.join(',');
+  }
+
+  /**
+   * Used while creating a WebSocket
+   */
+  public protocolVersions() {
+    return this.versions.map(x => `v${x.replace('.', '')}.stomp`);
+  }
+}

+ 20 - 0
node_modules/bufferutil/LICENSE

@@ -0,0 +1,20 @@
+Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
+Copyright (c) 2013 Arnout Kazemier and contributors
+Copyright (c) 2016 Luigi Pinca and contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 78 - 0
node_modules/bufferutil/README.md

@@ -0,0 +1,78 @@
+# bufferutil
+
+[![Version npm](https://img.shields.io/npm/v/bufferutil.svg?logo=npm)](https://www.npmjs.com/package/bufferutil)
+[![Linux/macOS/Windows Build](https://img.shields.io/github/actions/workflow/status/websockets/bufferutil/ci.yml?branch=master&label=build&logo=github)](https://github.com/websockets/bufferutil/actions?query=workflow%3ACI+branch%3Amaster)
+
+`bufferutil` is what makes `ws` fast. It provides some utilities to efficiently
+perform some operations such as masking and unmasking the data payload of
+WebSocket frames.
+
+## Installation
+
+```
+npm install bufferutil --save-optional
+```
+
+The `--save-optional` flag tells npm to save the package in your package.json
+under the
+[`optionalDependencies`](https://docs.npmjs.com/files/package.json#optionaldependencies)
+key.
+
+## API
+
+The module exports two functions.
+
+### `bufferUtil.mask(source, mask, output, offset, length)`
+
+Masks a buffer using the given masking-key as specified by the WebSocket
+protocol.
+
+#### Arguments
+
+- `source` - The buffer to mask.
+- `mask` - A buffer representing the masking-key.
+- `output` - The buffer where to store the result.
+- `offset` - The offset at which to start writing.
+- `length` - The number of bytes to mask.
+
+#### Example
+
+```js
+'use strict';
+
+const bufferUtil = require('bufferutil');
+const crypto = require('crypto');
+
+const source = crypto.randomBytes(10);
+const mask = crypto.randomBytes(4);
+
+bufferUtil.mask(source, mask, source, 0, source.length);
+```
+
+### `bufferUtil.unmask(buffer, mask)`
+
+Unmasks a buffer using the given masking-key as specified by the WebSocket
+protocol.
+
+#### Arguments
+
+- `buffer` - The buffer to unmask.
+- `mask` - A buffer representing the masking-key.
+
+#### Example
+
+```js
+'use strict';
+
+const bufferUtil = require('bufferutil');
+const crypto = require('crypto');
+
+const buffer = crypto.randomBytes(10);
+const mask = crypto.randomBytes(4);
+
+bufferUtil.unmask(buffer, mask);
+```
+
+## License
+
+[MIT](LICENSE)

+ 29 - 0
node_modules/bufferutil/binding.gyp

@@ -0,0 +1,29 @@
+{
+  'targets': [
+    {
+      'target_name': 'bufferutil',
+      'sources': ['src/bufferutil.c'],
+      'cflags': ['-std=c99'],
+      'conditions': [
+        ["OS=='mac'", {
+          'variables': {
+            'clang_version':
+              '<!(cc -v 2>&1 | perl -ne \'print $1 if /clang version ([0-9]+(\.[0-9]+){2,})/\')'
+          },
+          'xcode_settings': {
+            'MACOSX_DEPLOYMENT_TARGET': '10.7'
+          },
+          'conditions': [
+            # Use Perl v-strings to compare versions.
+            ['clang_version and <!(perl -e \'print <(clang_version) cmp 12.0.0\')==1', {
+              'xcode_settings': {
+                'OTHER_CFLAGS': ['-arch arm64'],
+                'OTHER_LDFLAGS': ['-arch arm64']
+              }
+            }]
+          ]
+        }]
+      ]
+    }
+  ]
+}

+ 34 - 0
node_modules/bufferutil/fallback.js

@@ -0,0 +1,34 @@
+'use strict';
+
+/**
+ * Masks a buffer using the given mask.
+ *
+ * @param {Buffer} source The buffer to mask
+ * @param {Buffer} mask The mask to use
+ * @param {Buffer} output The buffer where to store the result
+ * @param {Number} offset The offset at which to start writing
+ * @param {Number} length The number of bytes to mask.
+ * @public
+ */
+const mask = (source, mask, output, offset, length) => {
+  for (var i = 0; i < length; i++) {
+    output[offset + i] = source[i] ^ mask[i & 3];
+  }
+};
+
+/**
+ * Unmasks a buffer using the given mask.
+ *
+ * @param {Buffer} buffer The buffer to unmask
+ * @param {Buffer} mask The mask to use
+ * @public
+ */
+const unmask = (buffer, mask) => {
+  // Required until https://github.com/nodejs/node/issues/9006 is resolved.
+  const length = buffer.length;
+  for (var i = 0; i < length; i++) {
+    buffer[i] ^= mask[i & 3];
+  }
+};
+
+module.exports = { mask, unmask };

+ 7 - 0
node_modules/bufferutil/index.js

@@ -0,0 +1,7 @@
+'use strict';
+
+try {
+  module.exports = require('node-gyp-build')(__dirname);
+} catch (e) {
+  module.exports = require('./fallback');
+}

+ 36 - 0
node_modules/bufferutil/package.json

@@ -0,0 +1,36 @@
+{
+  "name": "bufferutil",
+  "version": "4.0.8",
+  "description": "WebSocket buffer utils",
+  "main": "index.js",
+  "engines": {
+    "node": ">=6.14.2"
+  },
+  "scripts": {
+    "install": "node-gyp-build",
+    "prebuild": "prebuildify --napi --strip --target=14.0.0",
+    "prebuild-darwin-x64+arm64": "prebuildify --arch x64+arm64 --napi --strip --target=14.0.0",
+    "test": "mocha"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/websockets/bufferutil"
+  },
+  "keywords": [
+    "bufferutil"
+  ],
+  "author": "Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/websockets/bufferutil/issues"
+  },
+  "homepage": "https://github.com/websockets/bufferutil",
+  "dependencies": {
+    "node-gyp-build": "^4.3.0"
+  },
+  "devDependencies": {
+    "mocha": "^10.0.0",
+    "node-gyp": "^9.1.0",
+    "prebuildify": "^5.0.0"
+  }
+}

+ 0 - 0
node_modules/bufferutil/prebuilds/darwin-x64+arm64/node.napi.node


Vissa filer visades inte eftersom för många filer har ändrats