@use-tusk/drift-node-sdk 0.1.23 → 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.cjs CHANGED
@@ -8523,6 +8523,19 @@ var TdMockClientRequest = class TdMockClientRequest extends events.EventEmitter
8523
8523
  port: this.options.port || void 0,
8524
8524
  timeout: this.options.timeout || void 0
8525
8525
  };
8526
+ if (this.path && (this.path.startsWith("http://") || this.path.startsWith("https://"))) {
8527
+ const hasProxyEnv = process.env.HTTP_PROXY || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.https_proxy;
8528
+ try {
8529
+ const targetUrl = new URL(this.path);
8530
+ rawInputValue.hostname = targetUrl.hostname;
8531
+ rawInputValue.path = targetUrl.pathname + targetUrl.search;
8532
+ rawInputValue.port = targetUrl.port ? parseInt(targetUrl.port) : void 0;
8533
+ rawInputValue.protocol = targetUrl.protocol.replace(":", "");
8534
+ logger.debug(`[TdMockClientRequest] Detected proxy request (proxy env: ${hasProxyEnv ? "set" : "not set"}), extracted target: ${rawInputValue.hostname}${rawInputValue.path}`);
8535
+ } catch (e) {
8536
+ logger.debug("[TdMockClientRequest] Failed to parse proxy URL from path:", e);
8537
+ }
8538
+ }
8526
8539
  if (this.requestBodyBuffers.length > 0) {
8527
8540
  const bodyBuffer = Buffer.concat(this.requestBodyBuffers.map((chunk) => Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)));
8528
8541
  rawInputValue.body = await httpBodyEncoder({ bodyBuffer });
@@ -33464,7 +33477,7 @@ var require_src = /* @__PURE__ */ __commonJS({ "node_modules/@opentelemetry/sdk-
33464
33477
  //#endregion
33465
33478
  //#region package.json
33466
33479
  var import_src$1 = /* @__PURE__ */ __toESM(require_src(), 1);
33467
- var version = "0.1.23";
33480
+ var version = "0.1.25";
33468
33481
 
33469
33482
  //#endregion
33470
33483
  //#region src/version.ts