@nsshunt/ststestrunner 1.0.83 → 1.0.85

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.
@@ -1,4 +1,4 @@
1
- import { defaultLogger, Sleep, STSAxiosConfig, AgentManager } from "@nsshunt/stsutils";
1
+ import { defaultLogger, Sleep, STSAxiosConfig, createAgentManager } from "@nsshunt/stsutils";
2
2
  import "@nsshunt/stsobservability";
3
3
  import { Emitter } from "@socket.io/component-emitter";
4
4
  import http from "node:http";
@@ -4498,12 +4498,25 @@ const isEmptyObject = (val) => {
4498
4498
  };
4499
4499
  const isDate = kindOfTest("Date");
4500
4500
  const isFile = kindOfTest("File");
4501
+ const isReactNativeBlob = (value2) => {
4502
+ return !!(value2 && typeof value2.uri !== "undefined");
4503
+ };
4504
+ const isReactNative$2 = (formData) => formData && typeof formData.getParts !== "undefined";
4501
4505
  const isBlob = kindOfTest("Blob");
4502
4506
  const isFileList = kindOfTest("FileList");
4503
4507
  const isStream = (val) => isObject$2(val) && isFunction$1(val.pipe);
4508
+ function getGlobal() {
4509
+ if (typeof globalThis !== "undefined") return globalThis;
4510
+ if (typeof self !== "undefined") return self;
4511
+ if (typeof window !== "undefined") return window;
4512
+ if (typeof global !== "undefined") return global;
4513
+ return {};
4514
+ }
4515
+ const G$2 = getGlobal();
4516
+ const FormDataCtor = typeof G$2.FormData !== "undefined" ? G$2.FormData : void 0;
4504
4517
  const isFormData = (thing) => {
4505
4518
  let kind;
4506
- return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction$1(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
4519
+ return thing && (FormDataCtor && thing instanceof FormDataCtor || isFunction$1(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
4507
4520
  kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
4508
4521
  };
4509
4522
  const isURLSearchParams = kindOfTest("URLSearchParams");
@@ -4513,7 +4526,9 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = [
4513
4526
  "Response",
4514
4527
  "Headers"
4515
4528
  ].map(kindOfTest);
4516
- const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
4529
+ const trim = (str) => {
4530
+ return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
4531
+ };
4517
4532
  function forEach(obj, fn, { allOwnKeys = false } = {}) {
4518
4533
  if (obj === null || typeof obj === "undefined") {
4519
4534
  return;
@@ -4615,10 +4630,7 @@ const stripBOM = (content) => {
4615
4630
  return content;
4616
4631
  };
4617
4632
  const inherits = (constructor, superConstructor, props, descriptors) => {
4618
- constructor.prototype = Object.create(
4619
- superConstructor.prototype,
4620
- descriptors
4621
- );
4633
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
4622
4634
  Object.defineProperty(constructor.prototype, "constructor", {
4623
4635
  value: constructor,
4624
4636
  writable: true,
@@ -4817,6 +4829,8 @@ const utils$1 = {
4817
4829
  isUndefined,
4818
4830
  isDate,
4819
4831
  isFile,
4832
+ isReactNativeBlob,
4833
+ isReactNative: isReactNative$2,
4820
4834
  isBlob,
4821
4835
  isRegExp,
4822
4836
  isFunction: isFunction$1,
@@ -4863,6 +4877,9 @@ let AxiosError$1 = class AxiosError extends Error {
4863
4877
  const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
4864
4878
  axiosError.cause = error;
4865
4879
  axiosError.name = error.name;
4880
+ if (error.status != null && axiosError.status == null) {
4881
+ axiosError.status = error.status;
4882
+ }
4866
4883
  customProps && Object.assign(axiosError, customProps);
4867
4884
  return axiosError;
4868
4885
  }
@@ -4879,6 +4896,12 @@ let AxiosError$1 = class AxiosError extends Error {
4879
4896
  */
4880
4897
  constructor(message, code, config, request, response) {
4881
4898
  super(message);
4899
+ Object.defineProperty(this, "message", {
4900
+ value: message,
4901
+ enumerable: true,
4902
+ writable: true,
4903
+ configurable: true
4904
+ });
4882
4905
  this.name = "AxiosError";
4883
4906
  this.isAxiosError = true;
4884
4907
  code && (this.code = code);
@@ -4946,13 +4969,18 @@ function toFormData$1(obj, formData, options) {
4946
4969
  throw new TypeError("target must be an object");
4947
4970
  }
4948
4971
  formData = formData || new FormData();
4949
- options = utils$1.toFlatObject(options, {
4950
- metaTokens: true,
4951
- dots: false,
4952
- indexes: false
4953
- }, false, function defined(option, source2) {
4954
- return !utils$1.isUndefined(source2[option]);
4955
- });
4972
+ options = utils$1.toFlatObject(
4973
+ options,
4974
+ {
4975
+ metaTokens: true,
4976
+ dots: false,
4977
+ indexes: false
4978
+ },
4979
+ false,
4980
+ function defined(option, source2) {
4981
+ return !utils$1.isUndefined(source2[option]);
4982
+ }
4983
+ );
4956
4984
  const metaTokens = options.metaTokens;
4957
4985
  const visitor = options.visitor || defaultVisitor;
4958
4986
  const dots = options.dots;
@@ -4980,6 +5008,10 @@ function toFormData$1(obj, formData, options) {
4980
5008
  }
4981
5009
  function defaultVisitor(value2, key, path) {
4982
5010
  let arr = value2;
5011
+ if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value2)) {
5012
+ formData.append(renderKey(path, key, dots), convertValue(value2));
5013
+ return false;
5014
+ }
4983
5015
  if (value2 && !path && typeof value2 === "object") {
4984
5016
  if (utils$1.endsWith(key, "{}")) {
4985
5017
  key = metaTokens ? key : key.slice(0, -2);
@@ -5015,13 +5047,7 @@ function toFormData$1(obj, formData, options) {
5015
5047
  }
5016
5048
  stack.push(value2);
5017
5049
  utils$1.forEach(value2, function each(el, key) {
5018
- const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
5019
- formData,
5020
- el,
5021
- utils$1.isString(key) ? key.trim() : key,
5022
- path,
5023
- exposedHelpers
5024
- );
5050
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
5025
5051
  if (result === true) {
5026
5052
  build(el, path ? path.concat(key) : [key]);
5027
5053
  }
@@ -5269,70 +5295,74 @@ function stringifySafely(rawValue, parser2, encoder) {
5269
5295
  const defaults = {
5270
5296
  transitional: transitionalDefaults,
5271
5297
  adapter: ["xhr", "http", "fetch"],
5272
- transformRequest: [function transformRequest(data, headers) {
5273
- const contentType = headers.getContentType() || "";
5274
- const hasJSONContentType = contentType.indexOf("application/json") > -1;
5275
- const isObjectPayload = utils$1.isObject(data);
5276
- if (isObjectPayload && utils$1.isHTMLForm(data)) {
5277
- data = new FormData(data);
5278
- }
5279
- const isFormData2 = utils$1.isFormData(data);
5280
- if (isFormData2) {
5281
- return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
5282
- }
5283
- if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
5284
- return data;
5285
- }
5286
- if (utils$1.isArrayBufferView(data)) {
5287
- return data.buffer;
5288
- }
5289
- if (utils$1.isURLSearchParams(data)) {
5290
- headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
5291
- return data.toString();
5292
- }
5293
- let isFileList2;
5294
- if (isObjectPayload) {
5295
- if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
5296
- return toURLEncodedForm(data, this.formSerializer).toString();
5298
+ transformRequest: [
5299
+ function transformRequest(data, headers) {
5300
+ const contentType = headers.getContentType() || "";
5301
+ const hasJSONContentType = contentType.indexOf("application/json") > -1;
5302
+ const isObjectPayload = utils$1.isObject(data);
5303
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
5304
+ data = new FormData(data);
5305
+ }
5306
+ const isFormData2 = utils$1.isFormData(data);
5307
+ if (isFormData2) {
5308
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
5309
+ }
5310
+ if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
5311
+ return data;
5297
5312
  }
5298
- if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
5299
- const _FormData = this.env && this.env.FormData;
5300
- return toFormData$1(
5301
- isFileList2 ? { "files[]": data } : data,
5302
- _FormData && new _FormData(),
5303
- this.formSerializer
5304
- );
5313
+ if (utils$1.isArrayBufferView(data)) {
5314
+ return data.buffer;
5315
+ }
5316
+ if (utils$1.isURLSearchParams(data)) {
5317
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
5318
+ return data.toString();
5319
+ }
5320
+ let isFileList2;
5321
+ if (isObjectPayload) {
5322
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
5323
+ return toURLEncodedForm(data, this.formSerializer).toString();
5324
+ }
5325
+ if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
5326
+ const _FormData = this.env && this.env.FormData;
5327
+ return toFormData$1(
5328
+ isFileList2 ? { "files[]": data } : data,
5329
+ _FormData && new _FormData(),
5330
+ this.formSerializer
5331
+ );
5332
+ }
5333
+ }
5334
+ if (isObjectPayload || hasJSONContentType) {
5335
+ headers.setContentType("application/json", false);
5336
+ return stringifySafely(data);
5305
5337
  }
5306
- }
5307
- if (isObjectPayload || hasJSONContentType) {
5308
- headers.setContentType("application/json", false);
5309
- return stringifySafely(data);
5310
- }
5311
- return data;
5312
- }],
5313
- transformResponse: [function transformResponse(data) {
5314
- const transitional2 = this.transitional || defaults.transitional;
5315
- const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
5316
- const JSONRequested = this.responseType === "json";
5317
- if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
5318
5338
  return data;
5319
5339
  }
5320
- if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
5321
- const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
5322
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
5323
- try {
5324
- return JSON.parse(data, this.parseReviver);
5325
- } catch (e2) {
5326
- if (strictJSONParsing) {
5327
- if (e2.name === "SyntaxError") {
5328
- throw AxiosError$1.from(e2, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
5340
+ ],
5341
+ transformResponse: [
5342
+ function transformResponse(data) {
5343
+ const transitional2 = this.transitional || defaults.transitional;
5344
+ const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
5345
+ const JSONRequested = this.responseType === "json";
5346
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
5347
+ return data;
5348
+ }
5349
+ if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
5350
+ const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
5351
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
5352
+ try {
5353
+ return JSON.parse(data, this.parseReviver);
5354
+ } catch (e2) {
5355
+ if (strictJSONParsing) {
5356
+ if (e2.name === "SyntaxError") {
5357
+ throw AxiosError$1.from(e2, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
5358
+ }
5359
+ throw e2;
5329
5360
  }
5330
- throw e2;
5331
5361
  }
5332
5362
  }
5363
+ return data;
5333
5364
  }
5334
- return data;
5335
- }],
5365
+ ],
5336
5366
  /**
5337
5367
  * A timeout in milliseconds to abort a request. If set to 0 (default) a
5338
5368
  * timeout is not created.
@@ -5351,7 +5381,7 @@ const defaults = {
5351
5381
  },
5352
5382
  headers: {
5353
5383
  common: {
5354
- "Accept": "application/json, text/plain, */*",
5384
+ Accept: "application/json, text/plain, */*",
5355
5385
  "Content-Type": void 0
5356
5386
  }
5357
5387
  }
@@ -5617,7 +5647,14 @@ let AxiosHeaders$1 = class AxiosHeaders {
5617
5647
  return this;
5618
5648
  }
5619
5649
  };
5620
- AxiosHeaders$1.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
5650
+ AxiosHeaders$1.accessor([
5651
+ "Content-Type",
5652
+ "Content-Length",
5653
+ "Accept",
5654
+ "Accept-Encoding",
5655
+ "User-Agent",
5656
+ "Authorization"
5657
+ ]);
5621
5658
  utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({ value: value2 }, key) => {
5622
5659
  let mapped = key[0].toUpperCase() + key.slice(1);
5623
5660
  return {
@@ -5663,13 +5700,15 @@ function settle(resolve, reject, response) {
5663
5700
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
5664
5701
  resolve(response);
5665
5702
  } else {
5666
- reject(new AxiosError$1(
5667
- "Request failed with status code " + response.status,
5668
- [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
5669
- response.config,
5670
- response.request,
5671
- response
5672
- ));
5703
+ reject(
5704
+ new AxiosError$1(
5705
+ "Request failed with status code " + response.status,
5706
+ [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
5707
+ response.config,
5708
+ response.request,
5709
+ response
5710
+ )
5711
+ );
5673
5712
  }
5674
5713
  }
5675
5714
  function parseProtocol(url2) {
@@ -5767,11 +5806,14 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
5767
5806
  };
5768
5807
  const progressEventDecorator = (total, throttled) => {
5769
5808
  const lengthComputable = total != null;
5770
- return [(loaded) => throttled[0]({
5771
- lengthComputable,
5772
- total,
5773
- loaded
5774
- }), throttled[1]];
5809
+ return [
5810
+ (loaded) => throttled[0]({
5811
+ lengthComputable,
5812
+ total,
5813
+ loaded
5814
+ }),
5815
+ throttled[1]
5816
+ ];
5775
5817
  };
5776
5818
  const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
5777
5819
  const isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url2) => {
@@ -5912,27 +5954,29 @@ function mergeConfig$1(config1, config2) {
5912
5954
  validateStatus: mergeDirectKeys,
5913
5955
  headers: (a2, b2, prop) => mergeDeepProperties(headersToObject(a2), headersToObject(b2), prop, true)
5914
5956
  };
5915
- utils$1.forEach(
5916
- Object.keys({ ...config1, ...config2 }),
5917
- function computeConfigValue(prop) {
5918
- if (prop === "__proto__" || prop === "constructor" || prop === "prototype")
5919
- return;
5920
- const merge2 = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
5921
- const configValue = merge2(config1[prop], config2[prop], prop);
5922
- utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
5923
- }
5924
- );
5957
+ utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
5958
+ if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
5959
+ const merge2 = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
5960
+ const configValue = merge2(config1[prop], config2[prop], prop);
5961
+ utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
5962
+ });
5925
5963
  return config;
5926
5964
  }
5927
5965
  const resolveConfig = (config) => {
5928
5966
  const newConfig = mergeConfig$1({}, config);
5929
5967
  let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
5930
5968
  newConfig.headers = headers = AxiosHeaders$1.from(headers);
5931
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
5969
+ newConfig.url = buildURL(
5970
+ buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
5971
+ config.params,
5972
+ config.paramsSerializer
5973
+ );
5932
5974
  if (auth) {
5933
5975
  headers.set(
5934
5976
  "Authorization",
5935
- "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
5977
+ "Basic " + btoa(
5978
+ (auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")
5979
+ )
5936
5980
  );
5937
5981
  }
5938
5982
  if (utils$1.isFormData(data)) {
@@ -5994,13 +6038,17 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
5994
6038
  config,
5995
6039
  request
5996
6040
  };
5997
- settle(function _resolve(value2) {
5998
- resolve(value2);
5999
- done();
6000
- }, function _reject(err) {
6001
- reject(err);
6002
- done();
6003
- }, response);
6041
+ settle(
6042
+ function _resolve(value2) {
6043
+ resolve(value2);
6044
+ done();
6045
+ },
6046
+ function _reject(err) {
6047
+ reject(err);
6048
+ done();
6049
+ },
6050
+ response
6051
+ );
6004
6052
  request = null;
6005
6053
  }
6006
6054
  if ("onloadend" in request) {
@@ -6036,12 +6084,14 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
6036
6084
  if (_config.timeoutErrorMessage) {
6037
6085
  timeoutErrorMessage = _config.timeoutErrorMessage;
6038
6086
  }
6039
- reject(new AxiosError$1(
6040
- timeoutErrorMessage,
6041
- transitional2.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
6042
- config,
6043
- request
6044
- ));
6087
+ reject(
6088
+ new AxiosError$1(
6089
+ timeoutErrorMessage,
6090
+ transitional2.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
6091
+ config,
6092
+ request
6093
+ )
6094
+ );
6045
6095
  request = null;
6046
6096
  };
6047
6097
  requestData === void 0 && requestHeaders.setContentType(null);
@@ -6081,7 +6131,13 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
6081
6131
  }
6082
6132
  const protocol2 = parseProtocol(_config.url);
6083
6133
  if (protocol2 && platform.protocols.indexOf(protocol2) === -1) {
6084
- reject(new AxiosError$1("Unsupported protocol " + protocol2 + ":", AxiosError$1.ERR_BAD_REQUEST, config));
6134
+ reject(
6135
+ new AxiosError$1(
6136
+ "Unsupported protocol " + protocol2 + ":",
6137
+ AxiosError$1.ERR_BAD_REQUEST,
6138
+ config
6139
+ )
6140
+ );
6085
6141
  return;
6086
6142
  }
6087
6143
  request.send(requestData || null);
@@ -6097,7 +6153,9 @@ const composeSignals = (signals, timeout) => {
6097
6153
  aborted = true;
6098
6154
  unsubscribe();
6099
6155
  const err = reason instanceof Error ? reason : this.reason;
6100
- controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
6156
+ controller.abort(
6157
+ err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err)
6158
+ );
6101
6159
  }
6102
6160
  };
6103
6161
  let timer = timeout && setTimeout(() => {
@@ -6167,33 +6225,36 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
6167
6225
  onFinish && onFinish(e2);
6168
6226
  }
6169
6227
  };
6170
- return new ReadableStream({
6171
- async pull(controller) {
6172
- try {
6173
- const { done: done2, value: value2 } = await iterator2.next();
6174
- if (done2) {
6175
- _onFinish();
6176
- controller.close();
6177
- return;
6178
- }
6179
- let len = value2.byteLength;
6180
- if (onProgress) {
6181
- let loadedBytes = bytes += len;
6182
- onProgress(loadedBytes);
6228
+ return new ReadableStream(
6229
+ {
6230
+ async pull(controller) {
6231
+ try {
6232
+ const { done: done2, value: value2 } = await iterator2.next();
6233
+ if (done2) {
6234
+ _onFinish();
6235
+ controller.close();
6236
+ return;
6237
+ }
6238
+ let len = value2.byteLength;
6239
+ if (onProgress) {
6240
+ let loadedBytes = bytes += len;
6241
+ onProgress(loadedBytes);
6242
+ }
6243
+ controller.enqueue(new Uint8Array(value2));
6244
+ } catch (err) {
6245
+ _onFinish(err);
6246
+ throw err;
6183
6247
  }
6184
- controller.enqueue(new Uint8Array(value2));
6185
- } catch (err) {
6186
- _onFinish(err);
6187
- throw err;
6248
+ },
6249
+ cancel(reason) {
6250
+ _onFinish(reason);
6251
+ return iterator2.return();
6188
6252
  }
6189
6253
  },
6190
- cancel(reason) {
6191
- _onFinish(reason);
6192
- return iterator2.return();
6254
+ {
6255
+ highWaterMark: 2
6193
6256
  }
6194
- }, {
6195
- highWaterMark: 2
6196
- });
6257
+ );
6197
6258
  };
6198
6259
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
6199
6260
  const { isFunction } = utils$1;
@@ -6201,10 +6262,7 @@ const globalFetchAPI = (({ Request: Request3, Response }) => ({
6201
6262
  Request: Request3,
6202
6263
  Response
6203
6264
  }))(utils$1.global);
6204
- const {
6205
- ReadableStream: ReadableStream$1,
6206
- TextEncoder: TextEncoder$1
6207
- } = utils$1.global;
6265
+ const { ReadableStream: ReadableStream$1, TextEncoder: TextEncoder$1 } = utils$1.global;
6208
6266
  const test = (fn, ...args) => {
6209
6267
  try {
6210
6268
  return !!fn(...args);
@@ -6213,9 +6271,13 @@ const test = (fn, ...args) => {
6213
6271
  }
6214
6272
  };
6215
6273
  const factory = (env) => {
6216
- env = utils$1.merge.call({
6217
- skipUndefined: true
6218
- }, globalFetchAPI, env);
6274
+ env = utils$1.merge.call(
6275
+ {
6276
+ skipUndefined: true
6277
+ },
6278
+ globalFetchAPI,
6279
+ env
6280
+ );
6219
6281
  const { fetch: envFetch, Request: Request3, Response } = env;
6220
6282
  const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === "function";
6221
6283
  const isRequestSupported = isFunction(Request3);
@@ -6248,7 +6310,11 @@ const factory = (env) => {
6248
6310
  if (method) {
6249
6311
  return method.call(res);
6250
6312
  }
6251
- throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
6313
+ throw new AxiosError$1(
6314
+ `Response type '${type}' is not supported`,
6315
+ AxiosError$1.ERR_NOT_SUPPORT,
6316
+ config
6317
+ );
6252
6318
  });
6253
6319
  });
6254
6320
  })();
@@ -6297,7 +6363,10 @@ const factory = (env) => {
6297
6363
  } = resolveConfig(config);
6298
6364
  let _fetch = envFetch || fetch;
6299
6365
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
6300
- let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
6366
+ let composedSignal = composeSignals(
6367
+ [signal, cancelToken && cancelToken.toAbortSignal()],
6368
+ timeout
6369
+ );
6301
6370
  let request = null;
6302
6371
  const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
6303
6372
  composedSignal.unsubscribe();
@@ -6357,7 +6426,10 @@ const factory = (env) => {
6357
6426
  );
6358
6427
  }
6359
6428
  responseType = responseType || "text";
6360
- let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
6429
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](
6430
+ response,
6431
+ config
6432
+ );
6361
6433
  !isStreamResponse && unsubscribe && unsubscribe();
6362
6434
  return await new Promise((resolve, reject) => {
6363
6435
  settle(resolve, reject, {
@@ -6373,7 +6445,13 @@ const factory = (env) => {
6373
6445
  unsubscribe && unsubscribe();
6374
6446
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
6375
6447
  throw Object.assign(
6376
- new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request, err && err.response),
6448
+ new AxiosError$1(
6449
+ "Network Error",
6450
+ AxiosError$1.ERR_NETWORK,
6451
+ config,
6452
+ request,
6453
+ err && err.response
6454
+ ),
6377
6455
  {
6378
6456
  cause: err.cause || err
6379
6457
  }
@@ -6387,11 +6465,7 @@ const seedCache = /* @__PURE__ */ new Map();
6387
6465
  const getFetch = (config) => {
6388
6466
  let env = config && config.env || {};
6389
6467
  const { fetch: fetch2, Request: Request3, Response } = env;
6390
- const seeds = [
6391
- Request3,
6392
- Response,
6393
- fetch2
6394
- ];
6468
+ const seeds = [Request3, Response, fetch2];
6395
6469
  let len = seeds.length, i = len, seed, target, map = seedCache;
6396
6470
  while (i--) {
6397
6471
  seed = seeds[i];
@@ -6476,39 +6550,35 @@ function throwIfCancellationRequested(config) {
6476
6550
  function dispatchRequest(config) {
6477
6551
  throwIfCancellationRequested(config);
6478
6552
  config.headers = AxiosHeaders$1.from(config.headers);
6479
- config.data = transformData.call(
6480
- config,
6481
- config.transformRequest
6482
- );
6553
+ config.data = transformData.call(config, config.transformRequest);
6483
6554
  if (["post", "put", "patch"].indexOf(config.method) !== -1) {
6484
6555
  config.headers.setContentType("application/x-www-form-urlencoded", false);
6485
6556
  }
6486
6557
  const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
6487
- return adapter(config).then(function onAdapterResolution(response) {
6488
- throwIfCancellationRequested(config);
6489
- response.data = transformData.call(
6490
- config,
6491
- config.transformResponse,
6492
- response
6493
- );
6494
- response.headers = AxiosHeaders$1.from(response.headers);
6495
- return response;
6496
- }, function onAdapterRejection(reason) {
6497
- if (!isCancel$1(reason)) {
6558
+ return adapter(config).then(
6559
+ function onAdapterResolution(response) {
6498
6560
  throwIfCancellationRequested(config);
6499
- if (reason && reason.response) {
6500
- reason.response.data = transformData.call(
6501
- config,
6502
- config.transformResponse,
6503
- reason.response
6504
- );
6505
- reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
6561
+ response.data = transformData.call(config, config.transformResponse, response);
6562
+ response.headers = AxiosHeaders$1.from(response.headers);
6563
+ return response;
6564
+ },
6565
+ function onAdapterRejection(reason) {
6566
+ if (!isCancel$1(reason)) {
6567
+ throwIfCancellationRequested(config);
6568
+ if (reason && reason.response) {
6569
+ reason.response.data = transformData.call(
6570
+ config,
6571
+ config.transformResponse,
6572
+ reason.response
6573
+ );
6574
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
6575
+ }
6506
6576
  }
6577
+ return Promise.reject(reason);
6507
6578
  }
6508
- return Promise.reject(reason);
6509
- });
6579
+ );
6510
6580
  }
6511
- const VERSION$1 = "1.13.5";
6581
+ const VERSION$1 = "1.13.6";
6512
6582
  const validators$1 = {};
6513
6583
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
6514
6584
  validators$1[type] = function validator2(thing) {
@@ -6558,7 +6628,10 @@ function assertOptions(options, schema, allowUnknown) {
6558
6628
  const value2 = options[opt];
6559
6629
  const result = value2 === void 0 || validator2(value2, opt, options);
6560
6630
  if (result !== true) {
6561
- throw new AxiosError$1("option " + opt + " must be " + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
6631
+ throw new AxiosError$1(
6632
+ "option " + opt + " must be " + result,
6633
+ AxiosError$1.ERR_BAD_OPTION_VALUE
6634
+ );
6562
6635
  }
6563
6636
  continue;
6564
6637
  }
@@ -6618,12 +6691,16 @@ let Axios$1 = class Axios {
6618
6691
  config = mergeConfig$1(this.defaults, config);
6619
6692
  const { transitional: transitional2, paramsSerializer, headers } = config;
6620
6693
  if (transitional2 !== void 0) {
6621
- validator.assertOptions(transitional2, {
6622
- silentJSONParsing: validators.transitional(validators.boolean),
6623
- forcedJSONParsing: validators.transitional(validators.boolean),
6624
- clarifyTimeoutError: validators.transitional(validators.boolean),
6625
- legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
6626
- }, false);
6694
+ validator.assertOptions(
6695
+ transitional2,
6696
+ {
6697
+ silentJSONParsing: validators.transitional(validators.boolean),
6698
+ forcedJSONParsing: validators.transitional(validators.boolean),
6699
+ clarifyTimeoutError: validators.transitional(validators.boolean),
6700
+ legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
6701
+ },
6702
+ false
6703
+ );
6627
6704
  }
6628
6705
  if (paramsSerializer != null) {
6629
6706
  if (utils$1.isFunction(paramsSerializer)) {
@@ -6631,10 +6708,14 @@ let Axios$1 = class Axios {
6631
6708
  serialize: paramsSerializer
6632
6709
  };
6633
6710
  } else {
6634
- validator.assertOptions(paramsSerializer, {
6635
- encode: validators.function,
6636
- serialize: validators.function
6637
- }, true);
6711
+ validator.assertOptions(
6712
+ paramsSerializer,
6713
+ {
6714
+ encode: validators.function,
6715
+ serialize: validators.function
6716
+ },
6717
+ true
6718
+ );
6638
6719
  }
6639
6720
  }
6640
6721
  if (config.allowAbsoluteUrls !== void 0) ;
@@ -6643,21 +6724,19 @@ let Axios$1 = class Axios {
6643
6724
  } else {
6644
6725
  config.allowAbsoluteUrls = true;
6645
6726
  }
6646
- validator.assertOptions(config, {
6647
- baseUrl: validators.spelling("baseURL"),
6648
- withXsrfToken: validators.spelling("withXSRFToken")
6649
- }, true);
6650
- config.method = (config.method || this.defaults.method || "get").toLowerCase();
6651
- let contextHeaders = headers && utils$1.merge(
6652
- headers.common,
6653
- headers[config.method]
6654
- );
6655
- headers && utils$1.forEach(
6656
- ["delete", "get", "head", "post", "put", "patch", "common"],
6657
- (method) => {
6658
- delete headers[method];
6659
- }
6727
+ validator.assertOptions(
6728
+ config,
6729
+ {
6730
+ baseUrl: validators.spelling("baseURL"),
6731
+ withXsrfToken: validators.spelling("withXSRFToken")
6732
+ },
6733
+ true
6660
6734
  );
6735
+ config.method = (config.method || this.defaults.method || "get").toLowerCase();
6736
+ let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
6737
+ headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
6738
+ delete headers[method];
6739
+ });
6661
6740
  config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
6662
6741
  const requestInterceptorChain = [];
6663
6742
  let synchronousRequestInterceptors = true;
@@ -6724,24 +6803,28 @@ let Axios$1 = class Axios {
6724
6803
  };
6725
6804
  utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
6726
6805
  Axios$1.prototype[method] = function(url2, config) {
6727
- return this.request(mergeConfig$1(config || {}, {
6728
- method,
6729
- url: url2,
6730
- data: (config || {}).data
6731
- }));
6806
+ return this.request(
6807
+ mergeConfig$1(config || {}, {
6808
+ method,
6809
+ url: url2,
6810
+ data: (config || {}).data
6811
+ })
6812
+ );
6732
6813
  };
6733
6814
  });
6734
6815
  utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
6735
6816
  function generateHTTPMethod(isForm) {
6736
6817
  return function httpMethod(url2, data, config) {
6737
- return this.request(mergeConfig$1(config || {}, {
6738
- method,
6739
- headers: isForm ? {
6740
- "Content-Type": "multipart/form-data"
6741
- } : {},
6742
- url: url2,
6743
- data
6744
- }));
6818
+ return this.request(
6819
+ mergeConfig$1(config || {}, {
6820
+ method,
6821
+ headers: isForm ? {
6822
+ "Content-Type": "multipart/form-data"
6823
+ } : {},
6824
+ url: url2,
6825
+ data
6826
+ })
6827
+ );
6745
6828
  };
6746
6829
  }
6747
6830
  Axios$1.prototype[method] = generateHTTPMethod();
@@ -12782,7 +12865,7 @@ class TestCaseFhirBase {
12782
12865
  console.log(`TestCaseFhirBase(): fhirEndpoint: [${this.#options.fhirEndpoint}]`);
12783
12866
  let agentManager = void 0;
12784
12867
  if (this.#options.nodeAgentOptions) {
12785
- agentManager = new AgentManager({
12868
+ agentManager = createAgentManager({
12786
12869
  agentOptions: {
12787
12870
  keepAlive: this.#options.nodeAgentOptions.keepAlive,
12788
12871
  maxSockets: this.#options.nodeAgentOptions.maxSockets,