@use-tusk/drift-node-sdk 0.1.24 → 0.1.25

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/index.js CHANGED
@@ -8512,6 +8512,19 @@ var TdMockClientRequest = class TdMockClientRequest extends EventEmitter {
8512
8512
  port: this.options.port || void 0,
8513
8513
  timeout: this.options.timeout || void 0
8514
8514
  };
8515
+ if (this.path && (this.path.startsWith("http://") || this.path.startsWith("https://"))) {
8516
+ const hasProxyEnv = process.env.HTTP_PROXY || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.https_proxy;
8517
+ try {
8518
+ const targetUrl = new URL(this.path);
8519
+ rawInputValue.hostname = targetUrl.hostname;
8520
+ rawInputValue.path = targetUrl.pathname + targetUrl.search;
8521
+ rawInputValue.port = targetUrl.port ? parseInt(targetUrl.port) : void 0;
8522
+ rawInputValue.protocol = targetUrl.protocol.replace(":", "");
8523
+ logger.debug(`[TdMockClientRequest] Detected proxy request (proxy env: ${hasProxyEnv ? "set" : "not set"}), extracted target: ${rawInputValue.hostname}${rawInputValue.path}`);
8524
+ } catch (e) {
8525
+ logger.debug("[TdMockClientRequest] Failed to parse proxy URL from path:", e);
8526
+ }
8527
+ }
8515
8528
  if (this.requestBodyBuffers.length > 0) {
8516
8529
  const bodyBuffer = Buffer.concat(this.requestBodyBuffers.map((chunk) => Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)));
8517
8530
  rawInputValue.body = await httpBodyEncoder({ bodyBuffer });
@@ -33453,7 +33466,7 @@ var require_src = /* @__PURE__ */ __commonJS({ "node_modules/@opentelemetry/sdk-
33453
33466
  //#endregion
33454
33467
  //#region package.json
33455
33468
  var import_src$1 = /* @__PURE__ */ __toESM(require_src(), 1);
33456
- var version = "0.1.24";
33469
+ var version = "0.1.25";
33457
33470
 
33458
33471
  //#endregion
33459
33472
  //#region src/version.ts