@inditextech/weave-store-azure-web-pubsub 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.js CHANGED
@@ -637,8 +637,8 @@ var require_depd$1 = __commonJS({ "../../node_modules/depd/index.js"(exports, mo
637
637
  process.emit("deprecation", err);
638
638
  return;
639
639
  }
640
- var format$3 = process.stderr.isTTY ? formatColor$1 : formatPlain$1;
641
- var output = format$3.call(this, msg, caller, stack.slice(i));
640
+ var format$4 = process.stderr.isTTY ? formatColor$1 : formatPlain$1;
641
+ var output = format$4.call(this, msg, caller, stack.slice(i));
642
642
  process.stderr.write(output + "\n", "utf8");
643
643
  }
644
644
  /**
@@ -9047,8 +9047,8 @@ var require_content_type = __commonJS({ "../../node_modules/content-type/index.j
9047
9047
  * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
9048
9048
  */
9049
9049
  var PARAM_REGEXP$1 = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g;
9050
- var TEXT_REGEXP$1 = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/;
9051
- var TOKEN_REGEXP$1 = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
9050
+ var TEXT_REGEXP$2 = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/;
9051
+ var TOKEN_REGEXP$2 = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
9052
9052
  /**
9053
9053
  * RegExp to match quoted-pair in RFC 7230 sec 3.2.6
9054
9054
  *
@@ -9059,7 +9059,7 @@ var require_content_type = __commonJS({ "../../node_modules/content-type/index.j
9059
9059
  /**
9060
9060
  * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6
9061
9061
  */
9062
- var QUOTE_REGEXP$1 = /([\\"])/g;
9062
+ var QUOTE_REGEXP$2 = /([\\"])/g;
9063
9063
  /**
9064
9064
  * RegExp to match type in RFC 7231 sec 3.1.1.1
9065
9065
  *
@@ -9067,13 +9067,13 @@ var require_content_type = __commonJS({ "../../node_modules/content-type/index.j
9067
9067
  * type = token
9068
9068
  * subtype = token
9069
9069
  */
9070
- var TYPE_REGEXP$1 = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
9070
+ var TYPE_REGEXP$2 = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
9071
9071
  /**
9072
9072
  * Module exports.
9073
9073
  * @public
9074
9074
  */
9075
- exports.format = format$2;
9076
- exports.parse = parse$5;
9075
+ exports.format = format$3;
9076
+ exports.parse = parse$6;
9077
9077
  /**
9078
9078
  * Format object to media type.
9079
9079
  *
@@ -9081,19 +9081,19 @@ var require_content_type = __commonJS({ "../../node_modules/content-type/index.j
9081
9081
  * @return {string}
9082
9082
  * @public
9083
9083
  */
9084
- function format$2(obj) {
9084
+ function format$3(obj) {
9085
9085
  if (!obj || typeof obj !== "object") throw new TypeError("argument obj is required");
9086
9086
  var parameters = obj.parameters;
9087
9087
  var type = obj.type;
9088
- if (!type || !TYPE_REGEXP$1.test(type)) throw new TypeError("invalid type");
9088
+ if (!type || !TYPE_REGEXP$2.test(type)) throw new TypeError("invalid type");
9089
9089
  var string = type;
9090
9090
  if (parameters && typeof parameters === "object") {
9091
9091
  var param;
9092
9092
  var params = Object.keys(parameters).sort();
9093
9093
  for (var i = 0; i < params.length; i++) {
9094
9094
  param = params[i];
9095
- if (!TOKEN_REGEXP$1.test(param)) throw new TypeError("invalid parameter name");
9096
- string += "; " + param + "=" + qstring$1(parameters[param]);
9095
+ if (!TOKEN_REGEXP$2.test(param)) throw new TypeError("invalid parameter name");
9096
+ string += "; " + param + "=" + qstring$2(parameters[param]);
9097
9097
  }
9098
9098
  }
9099
9099
  return string;
@@ -9105,13 +9105,13 @@ var require_content_type = __commonJS({ "../../node_modules/content-type/index.j
9105
9105
  * @return {Object}
9106
9106
  * @public
9107
9107
  */
9108
- function parse$5(string) {
9108
+ function parse$6(string) {
9109
9109
  if (!string) throw new TypeError("argument string is required");
9110
9110
  var header = typeof string === "object" ? getcontenttype(string) : string;
9111
9111
  if (typeof header !== "string") throw new TypeError("argument string is required to be a string");
9112
9112
  var index = header.indexOf(";");
9113
9113
  var type = index !== -1 ? header.slice(0, index).trim() : header.trim();
9114
- if (!TYPE_REGEXP$1.test(type)) throw new TypeError("invalid media type");
9114
+ if (!TYPE_REGEXP$2.test(type)) throw new TypeError("invalid media type");
9115
9115
  var obj = new ContentType(type.toLowerCase());
9116
9116
  if (index !== -1) {
9117
9117
  var key;
@@ -9154,11 +9154,11 @@ var require_content_type = __commonJS({ "../../node_modules/content-type/index.j
9154
9154
  * @return {string}
9155
9155
  * @private
9156
9156
  */
9157
- function qstring$1(val) {
9157
+ function qstring$2(val) {
9158
9158
  var str = String(val);
9159
- if (TOKEN_REGEXP$1.test(str)) return str;
9160
- if (str.length > 0 && !TEXT_REGEXP$1.test(str)) throw new TypeError("invalid parameter value");
9161
- return "\"" + str.replace(QUOTE_REGEXP$1, "\\$1") + "\"";
9159
+ if (TOKEN_REGEXP$2.test(str)) return str;
9160
+ if (str.length > 0 && !TEXT_REGEXP$2.test(str)) throw new TypeError("invalid parameter value");
9161
+ return "\"" + str.replace(QUOTE_REGEXP$2, "\\$1") + "\"";
9162
9162
  }
9163
9163
  /**
9164
9164
  * Class to represent a content type.
@@ -9178,7 +9178,7 @@ var require_parseurl = __commonJS({ "../../node_modules/parseurl/index.js"(expor
9178
9178
  * @private
9179
9179
  */
9180
9180
  var url = __require("url");
9181
- var parse$4 = url.parse;
9181
+ var parse$5 = url.parse;
9182
9182
  var Url = url.Url;
9183
9183
  /**
9184
9184
  * Module exports.
@@ -9226,7 +9226,7 @@ var require_parseurl = __commonJS({ "../../node_modules/parseurl/index.js"(expor
9226
9226
  * @private
9227
9227
  */
9228
9228
  function fastparse(str) {
9229
- if (typeof str !== "string" || str.charCodeAt(0) !== 47) return parse$4(str);
9229
+ if (typeof str !== "string" || str.charCodeAt(0) !== 47) return parse$5(str);
9230
9230
  var pathname = str;
9231
9231
  var query = null;
9232
9232
  var search = null;
@@ -9245,7 +9245,7 @@ var require_parseurl = __commonJS({ "../../node_modules/parseurl/index.js"(expor
9245
9245
  case 32:
9246
9246
  case 35:
9247
9247
  case 160:
9248
- case 65279: return parse$4(str);
9248
+ case 65279: return parse$5(str);
9249
9249
  }
9250
9250
  var url$1 = Url !== void 0 ? new Url() : {};
9251
9251
  url$1.path = str;
@@ -9299,6 +9299,167 @@ var require_search_params = __commonJS({ "../../node_modules/koa/lib/search-para
9299
9299
  };
9300
9300
  } });
9301
9301
 
9302
+ //#endregion
9303
+ //#region ../../node_modules/type-is/node_modules/content-type/dist/index.js
9304
+ var require_dist = __commonJS({ "../../node_modules/type-is/node_modules/content-type/dist/index.js"(exports) {
9305
+ /*!
9306
+ * content-type
9307
+ * Copyright(c) 2015 Douglas Christopher Wilson
9308
+ * MIT Licensed
9309
+ */
9310
+ Object.defineProperty(exports, "__esModule", { value: true });
9311
+ exports.format = format$2;
9312
+ exports.parse = parse$4;
9313
+ const TEXT_REGEXP$1 = /^[\u0009\u0020-\u007e\u0080-\u00ff]*$/;
9314
+ const TOKEN_REGEXP$1 = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
9315
+ /**
9316
+ * RegExp to match chars that must be quoted-pair in RFC 9110 sec 5.6.4
9317
+ */
9318
+ const QUOTE_REGEXP$1 = /[\\"]/g;
9319
+ /**
9320
+ * RegExp to match type in RFC 9110 sec 8.3.1
9321
+ *
9322
+ * media-type = type "/" subtype
9323
+ * type = token
9324
+ * subtype = token
9325
+ */
9326
+ const TYPE_REGEXP$1 = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
9327
+ /**
9328
+ * Null object perf optimization. Faster than `Object.create(null)` and `{ __proto__: null }`.
9329
+ */
9330
+ const NullObject = /* @__PURE__ */ (() => {
9331
+ const C = function() {};
9332
+ C.prototype = Object.create(null);
9333
+ return C;
9334
+ })();
9335
+ /**
9336
+ * Format an object into a `Content-Type` header.
9337
+ */
9338
+ function format$2(obj) {
9339
+ const { type, parameters } = obj;
9340
+ if (!type || !TYPE_REGEXP$1.test(type)) throw new TypeError(`Invalid type: ${type}`);
9341
+ let result = type;
9342
+ if (parameters) for (const param of Object.keys(parameters)) {
9343
+ if (!TOKEN_REGEXP$1.test(param)) throw new TypeError(`Invalid parameter name: ${param}`);
9344
+ result += `; ${param}=${qstring$1(parameters[param])}`;
9345
+ }
9346
+ return result;
9347
+ }
9348
+ /**
9349
+ * Parse a `Content-Type` header.
9350
+ */
9351
+ function parse$4(header, options) {
9352
+ const len = header.length;
9353
+ let index = skipOWS(header, 0, len);
9354
+ const valueStart = index;
9355
+ index = skipValue(header, index, len);
9356
+ const valueEnd = trailingOWS(header, valueStart, index);
9357
+ const type = header.slice(valueStart, valueEnd).toLowerCase();
9358
+ const parameters = options?.parameters === false ? new NullObject() : parseParameters(header, index, len);
9359
+ return {
9360
+ type,
9361
+ parameters
9362
+ };
9363
+ }
9364
+ const SP = 32;
9365
+ const HTAB = 9;
9366
+ const SEMI = 59;
9367
+ const EQ = 61;
9368
+ const DQUOTE = 34;
9369
+ const BSLASH = 92;
9370
+ /**
9371
+ * Parses the parameters of a `Content-Type` header starting at the given index.
9372
+ */
9373
+ function parseParameters(header, index, len) {
9374
+ const parameters = new NullObject();
9375
+ parameter: while (index < len) {
9376
+ index = skipOWS(header, index + 1, len);
9377
+ const keyStart = index;
9378
+ while (index < len) {
9379
+ const code = header.charCodeAt(index);
9380
+ if (code === SEMI) continue parameter;
9381
+ if (code === EQ) {
9382
+ const keyEnd = trailingOWS(header, keyStart, index);
9383
+ const key = header.slice(keyStart, keyEnd).toLowerCase();
9384
+ index = skipOWS(header, index + 1, len);
9385
+ if (index < len && header.charCodeAt(index) === DQUOTE) {
9386
+ index++;
9387
+ let value = "";
9388
+ while (index < len) {
9389
+ const code$1 = header.charCodeAt(index++);
9390
+ if (code$1 === DQUOTE) {
9391
+ index = skipValue(header, index, len);
9392
+ if (parameters[key] === void 0) parameters[key] = value;
9393
+ break;
9394
+ }
9395
+ if (code$1 === BSLASH && index < len) {
9396
+ value += header[index++];
9397
+ continue;
9398
+ }
9399
+ value += String.fromCharCode(code$1);
9400
+ }
9401
+ continue parameter;
9402
+ }
9403
+ const valueStart = index;
9404
+ index = skipValue(header, index, len);
9405
+ if (parameters[key] === void 0) {
9406
+ const valueEnd = trailingOWS(header, valueStart, index);
9407
+ parameters[key] = header.slice(valueStart, valueEnd);
9408
+ }
9409
+ continue parameter;
9410
+ }
9411
+ index++;
9412
+ }
9413
+ }
9414
+ return parameters;
9415
+ }
9416
+ /**
9417
+ * Skip over characters until a semicolon.
9418
+ */
9419
+ function skipValue(str, index, len) {
9420
+ while (index < len) {
9421
+ const char = str.charCodeAt(index);
9422
+ if (char === SEMI) break;
9423
+ index++;
9424
+ }
9425
+ return index;
9426
+ }
9427
+ /**
9428
+ * Skip optional whitespace (OWS) in an HTTP header value.
9429
+ *
9430
+ * OWS is defined in RFC 9110 sec 5.6.3 as SP (" ") or HTAB ("\t").
9431
+ */
9432
+ function skipOWS(header, index, len) {
9433
+ while (index < len) {
9434
+ const char = header.charCodeAt(index);
9435
+ if (char !== SP && char !== HTAB) break;
9436
+ index++;
9437
+ }
9438
+ return index;
9439
+ }
9440
+ /**
9441
+ * Trim optional whitespace (OWS) from the end of a substring.
9442
+ *
9443
+ * OWS is defined in RFC 9110 sec 5.6.3 as SP (" ") or HTAB ("\t").
9444
+ */
9445
+ function trailingOWS(header, start, end) {
9446
+ while (end > start) {
9447
+ const char = header.charCodeAt(end - 1);
9448
+ if (char !== SP && char !== HTAB) break;
9449
+ end--;
9450
+ }
9451
+ return end;
9452
+ }
9453
+ /**
9454
+ * Serialize a parameter value.
9455
+ */
9456
+ function qstring$1(str) {
9457
+ if (TOKEN_REGEXP$1.test(str)) return str;
9458
+ if (TEXT_REGEXP$1.test(str)) return `"${str.replace(QUOTE_REGEXP$1, "\\$&")}"`;
9459
+ throw new TypeError(`Invalid parameter value: ${str}`);
9460
+ }
9461
+ } });
9462
+
9302
9463
  //#endregion
9303
9464
  //#region ../../node_modules/mime-db/db.json
9304
9465
  var require_db = __commonJS({ "../../node_modules/mime-db/db.json"(exports, module) {
@@ -17203,7 +17364,7 @@ var require_type_is = __commonJS({ "../../node_modules/type-is/index.js"(exports
17203
17364
  * Module dependencies.
17204
17365
  * @private
17205
17366
  */
17206
- var contentType$1 = require_content_type();
17367
+ var contentType$1 = require_dist();
17207
17368
  var mime = require_mime_types();
17208
17369
  var typer = require_media_typer();
17209
17370
  /**
@@ -17229,9 +17390,10 @@ var require_type_is = __commonJS({ "../../node_modules/type-is/index.js"(exports
17229
17390
  * @public
17230
17391
  */
17231
17392
  function typeis$2(value, types_) {
17393
+ if (value && typeof value === "object") value = value.headers["content-type"];
17232
17394
  var i;
17233
17395
  var types = types_;
17234
- var val = tryNormalizeType(value);
17396
+ var val = normalizeType(value);
17235
17397
  if (!val) return false;
17236
17398
  if (types && !Array.isArray(types)) {
17237
17399
  types = new Array(arguments.length - 1);
@@ -17340,23 +17502,10 @@ var require_type_is = __commonJS({ "../../node_modules/type-is/index.js"(exports
17340
17502
  * @private
17341
17503
  */
17342
17504
  function normalizeType(value) {
17343
- var type = contentType$1.parse(value).type;
17505
+ if (!value) return null;
17506
+ var type = contentType$1.parse(value, { parameters: false }).type;
17344
17507
  return typer.test(type) ? type : null;
17345
17508
  }
17346
- /**
17347
- * Try to normalize a type and remove parameters.
17348
- *
17349
- * @param {string} value
17350
- * @return {(string|null)}
17351
- * @private
17352
- */
17353
- function tryNormalizeType(value) {
17354
- try {
17355
- return value ? normalizeType(value) : null;
17356
- } catch (err) {
17357
- return null;
17358
- }
17359
- }
17360
17509
  } });
17361
17510
 
17362
17511
  //#endregion
@@ -18894,8 +19043,8 @@ var require_depd = __commonJS({ "../../node_modules/http-assert/node_modules/dep
18894
19043
  process.emit("deprecation", err);
18895
19044
  return;
18896
19045
  }
18897
- var format$3 = process.stderr.isTTY ? formatColor : formatPlain;
18898
- var output = format$3.call(this, msg, caller, stack.slice(i));
19046
+ var format$4 = process.stderr.isTTY ? formatColor : formatPlain;
19047
+ var output = format$4.call(this, msg, caller, stack.slice(i));
18899
19048
  process.stderr.write(output + "\n", "utf8");
18900
19049
  }
18901
19050
  /**