@medplum/agent 3.1.4 → 3.1.5

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.
Files changed (2) hide show
  1. package/dist/cjs/index.cjs +11 -23
  2. package/package.json +6 -6
@@ -877,8 +877,6 @@ var require_receiver = __commonJS({
877
877
  var { concat, toArrayBuffer, unmask } = require_buffer_util();
878
878
  var { isValidStatusCode, isValidUTF8 } = require_validation();
879
879
  var FastBuffer = Buffer[Symbol.species];
880
- var promise = Promise.resolve();
881
- var queueTask = typeof queueMicrotask === "function" ? queueMicrotask : queueMicrotaskShim;
882
880
  var GET_INFO = 0;
883
881
  var GET_PAYLOAD_LENGTH_16 = 1;
884
882
  var GET_PAYLOAD_LENGTH_64 = 2;
@@ -891,7 +889,7 @@ var require_receiver = __commonJS({
891
889
  * Creates a Receiver instance.
892
890
  *
893
891
  * @param {Object} [options] Options object
894
- * @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether
892
+ * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
895
893
  * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
896
894
  * multiple times in the same tick
897
895
  * @param {String} [options.binaryType=nodebuffer] The type for binary data
@@ -905,7 +903,7 @@ var require_receiver = __commonJS({
905
903
  */
906
904
  constructor(options = {}) {
907
905
  super();
908
- this._allowSynchronousEvents = !!options.allowSynchronousEvents;
906
+ this._allowSynchronousEvents = options.allowSynchronousEvents !== void 0 ? options.allowSynchronousEvents : true;
909
907
  this._binaryType = options.binaryType || BINARY_TYPES[0];
910
908
  this._extensions = options.extensions || {};
911
909
  this._isServer = !!options.isServer;
@@ -1339,12 +1337,12 @@ var require_receiver = __commonJS({
1339
1337
  } else {
1340
1338
  data2 = fragments;
1341
1339
  }
1342
- if (this._state === INFLATING || this._allowSynchronousEvents) {
1340
+ if (this._allowSynchronousEvents) {
1343
1341
  this.emit("message", data2, true);
1344
1342
  this._state = GET_INFO;
1345
1343
  } else {
1346
1344
  this._state = DEFER_EVENT;
1347
- queueTask(() => {
1345
+ setImmediate(() => {
1348
1346
  this.emit("message", data2, true);
1349
1347
  this._state = GET_INFO;
1350
1348
  this.startLoop(cb);
@@ -1368,7 +1366,7 @@ var require_receiver = __commonJS({
1368
1366
  this._state = GET_INFO;
1369
1367
  } else {
1370
1368
  this._state = DEFER_EVENT;
1371
- queueTask(() => {
1369
+ setImmediate(() => {
1372
1370
  this.emit("message", buf, false);
1373
1371
  this._state = GET_INFO;
1374
1372
  this.startLoop(cb);
@@ -1430,7 +1428,7 @@ var require_receiver = __commonJS({
1430
1428
  this._state = GET_INFO;
1431
1429
  } else {
1432
1430
  this._state = DEFER_EVENT;
1433
- queueTask(() => {
1431
+ setImmediate(() => {
1434
1432
  this.emit(this._opcode === 9 ? "ping" : "pong", data2);
1435
1433
  this._state = GET_INFO;
1436
1434
  this.startLoop(cb);
@@ -1462,15 +1460,6 @@ var require_receiver = __commonJS({
1462
1460
  }
1463
1461
  };
1464
1462
  module2.exports = Receiver2;
1465
- function queueMicrotaskShim(cb) {
1466
- promise.then(cb).catch(throwErrorNextTick);
1467
- }
1468
- function throwError(err) {
1469
- throw err;
1470
- }
1471
- function throwErrorNextTick(err) {
1472
- process.nextTick(throwError, err);
1473
- }
1474
1463
  }
1475
1464
  });
1476
1465
 
@@ -2776,7 +2765,7 @@ var require_websocket = __commonJS({
2776
2765
  module2.exports = WebSocket3;
2777
2766
  function initAsClient(websocket, address, protocols, options) {
2778
2767
  const opts = {
2779
- allowSynchronousEvents: false,
2768
+ allowSynchronousEvents: true,
2780
2769
  autoPong: true,
2781
2770
  protocolVersion: protocolVersions[1],
2782
2771
  maxPayload: 100 * 1024 * 1024,
@@ -2785,7 +2774,6 @@ var require_websocket = __commonJS({
2785
2774
  followRedirects: false,
2786
2775
  maxRedirects: 10,
2787
2776
  ...options,
2788
- createConnection: void 0,
2789
2777
  socketPath: void 0,
2790
2778
  hostname: void 0,
2791
2779
  protocol: void 0,
@@ -2841,7 +2829,7 @@ var require_websocket = __commonJS({
2841
2829
  const request = isSecure ? https.request : http.request;
2842
2830
  const protocolSet = /* @__PURE__ */ new Set();
2843
2831
  let perMessageDeflate;
2844
- opts.createConnection = isSecure ? tlsConnect : netConnect;
2832
+ opts.createConnection = opts.createConnection || (isSecure ? tlsConnect : netConnect);
2845
2833
  opts.defaultPort = opts.defaultPort || defaultPort;
2846
2834
  opts.port = parsedUrl.port || defaultPort;
2847
2835
  opts.host = parsedUrl.hostname.startsWith("[") ? parsedUrl.hostname.slice(1, -1) : parsedUrl.hostname;
@@ -3241,7 +3229,7 @@ var require_websocket_server = __commonJS({
3241
3229
  * Create a `WebSocketServer` instance.
3242
3230
  *
3243
3231
  * @param {Object} options Configuration options
3244
- * @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether
3232
+ * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
3245
3233
  * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
3246
3234
  * multiple times in the same tick
3247
3235
  * @param {Boolean} [options.autoPong=true] Specifies whether or not to
@@ -3271,7 +3259,7 @@ var require_websocket_server = __commonJS({
3271
3259
  constructor(options, callback) {
3272
3260
  super();
3273
3261
  options = {
3274
- allowSynchronousEvents: false,
3262
+ allowSynchronousEvents: true,
3275
3263
  autoPong: true,
3276
3264
  maxPayload: 100 * 1024 * 1024,
3277
3265
  skipUTF8Validation: false,
@@ -38692,7 +38680,7 @@ var Rt = class {
38692
38680
  return this.masterSubEmitter || (this.masterSubEmitter = new Ne(...Array.from(this.criteriaEntries.keys()))), this.masterSubEmitter;
38693
38681
  }
38694
38682
  };
38695
- var Op = "3.1.4-17ee35b26";
38683
+ var Op = "3.1.5-6e0fc2e2f";
38696
38684
  var xs = N.FHIR_JSON + ", */*; q=0.1";
38697
38685
  var vs = "https://api.medplum.com/";
38698
38686
  var Ts = 1e3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medplum/agent",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
4
4
  "description": "Medplum Agent",
5
5
  "homepage": "https://www.medplum.com/",
6
6
  "bugs": {
@@ -23,15 +23,15 @@
23
23
  "test": "jest"
24
24
  },
25
25
  "dependencies": {
26
- "@medplum/core": "3.1.4",
27
- "@medplum/hl7": "3.1.4",
26
+ "@medplum/core": "3.1.5",
27
+ "@medplum/hl7": "3.1.5",
28
28
  "dcmjs-dimse": "0.1.27",
29
29
  "node-windows": "1.0.0-beta.8",
30
- "ws": "8.16.0"
30
+ "ws": "8.17.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@medplum/fhirtypes": "3.1.4",
34
- "@medplum/mock": "3.1.4",
33
+ "@medplum/fhirtypes": "3.1.5",
34
+ "@medplum/mock": "3.1.5",
35
35
  "@types/async-eventemitter": "0.2.4",
36
36
  "@types/node-windows": "0.1.6",
37
37
  "@types/ws": "8.5.10",