@jterrazz/test 6.5.1 → 7.1.0

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/types.d.ts CHANGED
@@ -3,12 +3,19 @@
3
3
  * An intercept trigger describes which HTTP request to match.
4
4
  */
5
5
  interface InterceptTrigger {
6
+ /** Adapter name - must match the folder prefix in file-based intercepts. */
7
+ adapter: string;
6
8
  /** HTTP method to match. */
7
9
  method: string;
8
10
  /** URL pattern to match (string for exact prefix, RegExp for pattern). */
9
11
  url: RegExp | string;
10
- /** Optional request body matcher the handler only fires if this returns true. */
12
+ /** Optional request body matcher - the handler only fires if this returns true. */
11
13
  match?: (body: unknown) => boolean;
14
+ /**
15
+ * Transform raw JSON data into a provider-specific response envelope.
16
+ * Called when .intercept(trigger, 'adapter/file.json') loads a file.
17
+ */
18
+ wrap: (data: unknown) => InterceptResponse;
12
19
  }
13
20
  /**
14
21
  * An intercept response describes what to return when the trigger matches.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jterrazz/test",
3
- "version": "6.5.1",
3
+ "version": "7.1.0",
4
4
  "author": "Jean-Baptiste Terrazzoni <contact@jterrazz.com>",
5
5
  "repository": {
6
6
  "type": "git",