@deepraxis/sdk 0.1.1-dev.a60648b → 0.1.1-dev.a67dca4

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.
@@ -4,6 +4,7 @@ import { abortable, fetchWithRetry } from "./retry.js";
4
4
  import { parseSSE } from "./sse.js";
5
5
  import { resolveDefaultCredentials } from "./credentials.js";
6
6
  import { isBinaryOperation } from "./binary-operations.js";
7
+ import { envSilencesDeprecations } from "./deprecation.js";
7
8
  /** Our own per-call keys, beyond what the generated hey-api client accepts. */
8
9
  const SDK_OPTION_KEYS = ['timeoutMs', 'maxRetries', 'stream', 'lastEventId'];
9
10
  /** Every key of the generated client's per-call RequestOptions (request parts, fetch/RequestInit, serializers,
@@ -50,6 +51,8 @@ export class Transport {
50
51
  this.config = { timeoutMs: 600_000, maxRetries: 2, fetch: globalThis.fetch, ...options };
51
52
  this.validate(this.config.timeoutMs, this.config.maxRetries);
52
53
  }
54
+ /** Whether deprecated-method warnings are off (client option or PRAXIS_SDK_SILENCE_DEPRECATIONS). */
55
+ silenced = () => this.config.silenceDeprecations === true || envSilencesDeprecations();
53
56
  validate(timeout, retries) {
54
57
  if (!Number.isFinite(timeout) || timeout <= 0)
55
58
  throw new RangeError('timeoutMs must be positive and finite');