bitfab 0.16.0 → 0.16.1

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.d.cts CHANGED
@@ -343,9 +343,9 @@ declare class ReplayEnvironment {
343
343
  type MockStrategy = "none" | "all" | "marked";
344
344
  interface ReplayOptions {
345
345
  /**
346
- * Maximum number of traces to replay (1100, default 5). Mutually
347
- * exclusive with `traceIds` an explicit ID list already determines how
348
- * many traces replay, so passing both throws.
346
+ * Maximum number of traces to replay (1-100, default 5). Ignored when
347
+ * `traceIds` is passed (with a warning): an explicit ID list already
348
+ * determines how many traces replay.
349
349
  */
350
350
  limit?: number;
351
351
  /** Optional list of specific trace IDs to replay (max 100). */
@@ -959,9 +959,9 @@ declare class Bitfab {
959
959
  *
960
960
  * @param traceFunctionKey - The trace function key to replay
961
961
  * @param fn - The function to replay (must be the return value of `withSpan`)
962
- * @param options - Optional replay options. `limit` and `traceIds` are
963
- * mutually exclusive an explicit ID list already determines how many
964
- * traces replay, so passing both throws a BitfabError.
962
+ * @param options - Optional replay options. When `traceIds` is passed,
963
+ * `limit` is ignored (with a warning): an explicit ID list already
964
+ * determines how many traces replay.
965
965
  * @returns ReplayResult with items, testRunId, and testRunUrl
966
966
  */
967
967
  replay<TReturn>(traceFunctionKey: string, fn: (...args: any[]) => TReturn | Promise<TReturn>, options?: ReplayOptions): Promise<ReplayResult<TReturn>>;
@@ -1027,7 +1027,7 @@ declare class BitfabFunction {
1027
1027
  /**
1028
1028
  * SDK version from package.json (injected at build time)
1029
1029
  */
1030
- declare const __version__ = "0.16.0";
1030
+ declare const __version__ = "0.16.1";
1031
1031
 
1032
1032
  /**
1033
1033
  * Constants for the Bitfab SDK.
package/dist/index.d.ts CHANGED
@@ -343,9 +343,9 @@ declare class ReplayEnvironment {
343
343
  type MockStrategy = "none" | "all" | "marked";
344
344
  interface ReplayOptions {
345
345
  /**
346
- * Maximum number of traces to replay (1100, default 5). Mutually
347
- * exclusive with `traceIds` an explicit ID list already determines how
348
- * many traces replay, so passing both throws.
346
+ * Maximum number of traces to replay (1-100, default 5). Ignored when
347
+ * `traceIds` is passed (with a warning): an explicit ID list already
348
+ * determines how many traces replay.
349
349
  */
350
350
  limit?: number;
351
351
  /** Optional list of specific trace IDs to replay (max 100). */
@@ -959,9 +959,9 @@ declare class Bitfab {
959
959
  *
960
960
  * @param traceFunctionKey - The trace function key to replay
961
961
  * @param fn - The function to replay (must be the return value of `withSpan`)
962
- * @param options - Optional replay options. `limit` and `traceIds` are
963
- * mutually exclusive an explicit ID list already determines how many
964
- * traces replay, so passing both throws a BitfabError.
962
+ * @param options - Optional replay options. When `traceIds` is passed,
963
+ * `limit` is ignored (with a warning): an explicit ID list already
964
+ * determines how many traces replay.
965
965
  * @returns ReplayResult with items, testRunId, and testRunUrl
966
966
  */
967
967
  replay<TReturn>(traceFunctionKey: string, fn: (...args: any[]) => TReturn | Promise<TReturn>, options?: ReplayOptions): Promise<ReplayResult<TReturn>>;
@@ -1027,7 +1027,7 @@ declare class BitfabFunction {
1027
1027
  /**
1028
1028
  * SDK version from package.json (injected at build time)
1029
1029
  */
1030
- declare const __version__ = "0.16.0";
1030
+ declare const __version__ = "0.16.1";
1031
1031
 
1032
1032
  /**
1033
1033
  * Constants for the Bitfab SDK.
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  flushTraces,
21
21
  getCurrentSpan,
22
22
  getCurrentTrace
23
- } from "./chunk-53G5GR7B.js";
23
+ } from "./chunk-P4WFJ5O3.js";
24
24
  import {
25
25
  BitfabError
26
26
  } from "./chunk-QT7HWOKU.js";
package/dist/node.cjs CHANGED
@@ -333,9 +333,12 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options) {
333
333
  }
334
334
  }
335
335
  if (options?.limit !== void 0 && options?.traceIds !== void 0) {
336
- throw new BitfabError(
337
- "Pass either limit or traceIds, not both: an explicit trace ID list already determines how many traces replay."
338
- );
336
+ try {
337
+ console.warn(
338
+ "Bitfab: limit is ignored when traceIds is passed: the explicit trace ID list already determines how many traces replay."
339
+ );
340
+ } catch {
341
+ }
339
342
  }
340
343
  await replayContextReady;
341
344
  const {
@@ -452,7 +455,7 @@ registerAsyncLocalStorageClass(
452
455
  );
453
456
 
454
457
  // src/version.generated.ts
455
- var __version__ = "0.16.0";
458
+ var __version__ = "0.16.1";
456
459
 
457
460
  // src/constants.ts
458
461
  var DEFAULT_SERVICE_URL = "https://bitfab.ai";
@@ -3242,9 +3245,9 @@ var Bitfab = class {
3242
3245
  *
3243
3246
  * @param traceFunctionKey - The trace function key to replay
3244
3247
  * @param fn - The function to replay (must be the return value of `withSpan`)
3245
- * @param options - Optional replay options. `limit` and `traceIds` are
3246
- * mutually exclusive an explicit ID list already determines how many
3247
- * traces replay, so passing both throws a BitfabError.
3248
+ * @param options - Optional replay options. When `traceIds` is passed,
3249
+ * `limit` is ignored (with a warning): an explicit ID list already
3250
+ * determines how many traces replay.
3248
3251
  * @returns ReplayResult with items, testRunId, and testRunUrl
3249
3252
  */
3250
3253
  async replay(traceFunctionKey, fn, options) {