@warp-drive/holodeck 0.1.0-alpha.77 → 0.1.0-alpha.78

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.ts CHANGED
@@ -6,21 +6,21 @@ import { Store } from "@warp-drive/legacy/store";
6
6
  /**
7
7
  * @public
8
8
  */
9
- declare function setConfig({ host }: {
9
+ export declare function setConfig({ host }: {
10
10
  host: string;
11
11
  }): void;
12
12
  /**
13
13
  * @public
14
14
  */
15
- declare function setTestId(context: object, str: string | null): void;
15
+ export declare function setTestId(context: object, str: string | null): void;
16
16
  /**
17
17
  * @public
18
18
  */
19
- declare function setIsRecording(value: boolean): void;
19
+ export declare function setIsRecording(value: boolean): void;
20
20
  /**
21
21
  * @public
22
22
  */
23
- declare function getIsRecording(): boolean;
23
+ export declare function getIsRecording(): boolean;
24
24
  /**
25
25
  * A request handler that intercepts requests and routes them through
26
26
  * the Holodeck mock server.
@@ -32,7 +32,7 @@ declare function getIsRecording(): boolean;
32
32
  *
33
33
  * @param owner - the test context object used to retrieve the test ID.
34
34
  */
35
- declare class MockServerHandler implements Handler {
35
+ export declare class MockServerHandler implements Handler {
36
36
  owner: object;
37
37
  constructor(owner: object);
38
38
  request<T>(context: RequestContext, next: NextFn<T>): Promise<StructuredDataDocument<T>>;
@@ -44,13 +44,12 @@ declare class MockServerHandler implements Handler {
44
44
  *
45
45
  * @param owner - The test context object used to retrieve the test ID.
46
46
  */
47
- declare function installAdapterFor(owner: object, store: Store): void;
47
+ export declare function installAdapterFor(owner: object, store: Store): void;
48
48
  /**
49
49
  * Mock a request by sending the scaffold to the mock server.
50
50
  *
51
51
  * @public
52
52
  */
53
- declare function mock(owner: object, generate: ScaffoldGenerator, isRecording?: boolean): Promise<void>;
53
+ export declare function mock(owner: object, generate: ScaffoldGenerator, isRecording?: boolean): Promise<void>;
54
54
  //#endregion
55
- export { MockServerHandler, getIsRecording, installAdapterFor, mock, setConfig, setIsRecording, setTestId };
56
55
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;iBAuIgB,YAAY;EAAU;;;;;iBAQtB,UAAU,iBAAiB;;;;iBA2C3B,eAAe;;;;iBAOf;;;;;;;;;;;;cAeH,6BAA6B;EACxC;EACA,YAAY;EAGZ,QAAc,GAAG,SAAS,gBAAgB,MAAM,OAAO,KAAK,QAAQ,uBAAuB;;;;;;;;;iBAkG7E,kBAAkB,eAAe,OAAO;;;;;;iBAuClC,KAAK,eAAe,UAAU,mBAAmB,wBAAwB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;wBAuIgB,YAAY;EAAU;;;;;wBAQtB,UAAU,iBAAiB;;;;wBA2C3B,eAAe;;;;wBAOf;;;;;;;;;;;;qBAeH,6BAA6B;EACxC;EACA,YAAY;EAGZ,QAAc,GAAG,SAAS,gBAAgB,MAAM,OAAO,KAAK,QAAQ,uBAAuB;;;;;;;;;wBAkG7E,kBAAkB,eAAe,OAAO;;;;;;wBAuClC,KAAK,eAAe,UAAU,mBAAmB,wBAAwB"}
package/dist/mock.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * @public
4
4
  */
5
- interface Scaffold {
5
+ export interface Scaffold {
6
6
  status: number;
7
7
  statusText?: string;
8
8
  headers: Record<string, string>;
@@ -14,11 +14,11 @@ interface Scaffold {
14
14
  /**
15
15
  * @public
16
16
  */
17
- type ScaffoldGenerator = () => Scaffold;
17
+ export type ScaffoldGenerator = () => Scaffold;
18
18
  /**
19
19
  * @public
20
20
  */
21
- type ResponseGenerator = () => Record<string, unknown>;
21
+ export type ResponseGenerator = () => Record<string, unknown>;
22
22
  /**
23
23
  * Sets up Mocking for a GET request on the mock server
24
24
  * for the supplied url.
@@ -36,32 +36,32 @@ type ResponseGenerator = () => Record<string, unknown>;
36
36
  * @param options status, headers for the response, body to match against for the request, and whether to record the request
37
37
  * @return
38
38
  */
39
- declare function GET(owner: object, url: string, response: ResponseGenerator, options?: Partial<Omit<Scaffold, "response" | "url" | "method">> & {
39
+ export declare function GET(owner: object, url: string, response: ResponseGenerator, options?: Partial<Omit<Scaffold, "response" | "url" | "method">> & {
40
40
  RECORD?: boolean;
41
41
  }): Promise<void>;
42
42
  /**
43
43
  * Mock a POST request
44
44
  */
45
- declare function POST(owner: object, url: string, response: ResponseGenerator, options?: Partial<Omit<Scaffold, "response" | "url" | "method">> & {
45
+ export declare function POST(owner: object, url: string, response: ResponseGenerator, options?: Partial<Omit<Scaffold, "response" | "url" | "method">> & {
46
46
  RECORD?: boolean;
47
47
  }): Promise<void>;
48
48
  /**
49
49
  * mock a PUT request
50
50
  */
51
- declare function PUT(owner: object, url: string, response: ResponseGenerator, options?: Partial<Omit<Scaffold, "response" | "url" | "method">> & {
51
+ export declare function PUT(owner: object, url: string, response: ResponseGenerator, options?: Partial<Omit<Scaffold, "response" | "url" | "method">> & {
52
52
  RECORD?: boolean;
53
53
  }): Promise<void>;
54
54
  /**
55
55
  * mock a PATCH request
56
56
  *
57
57
  */
58
- declare function PATCH(owner: object, url: string, response: ResponseGenerator, options?: Partial<Omit<Scaffold, "response" | "url" | "method">> & {
58
+ export declare function PATCH(owner: object, url: string, response: ResponseGenerator, options?: Partial<Omit<Scaffold, "response" | "url" | "method">> & {
59
59
  RECORD?: boolean;
60
60
  }): Promise<void>;
61
61
  /**
62
62
  * mock a DELETE request
63
63
  */
64
- declare function DELETE(owner: object, url: string, response: ResponseGenerator, options?: Partial<Omit<Scaffold, "response" | "url" | "method">> & {
64
+ export declare function DELETE(owner: object, url: string, response: ResponseGenerator, options?: Partial<Omit<Scaffold, "response" | "url" | "method">> & {
65
65
  RECORD?: boolean;
66
66
  }): Promise<void>;
67
67
  /**
@@ -81,9 +81,8 @@ declare function DELETE(owner: object, url: string, response: ResponseGenerator,
81
81
  * @param options status, headers for the response, body to match against for the request, and whether to record the request
82
82
  * @return
83
83
  */
84
- declare function HEAD(owner: object, url: string, response: ResponseGenerator, options?: Partial<Omit<Scaffold, "response" | "url" | "method">> & {
84
+ export declare function HEAD(owner: object, url: string, response: ResponseGenerator, options?: Partial<Omit<Scaffold, "response" | "url" | "method">> & {
85
85
  RECORD?: boolean;
86
86
  }): Promise<void>;
87
87
  //#endregion
88
- export { DELETE, GET, HEAD, PATCH, POST, PUT, ResponseGenerator, Scaffold, ScaffoldGenerator };
89
88
  //# sourceMappingURL=mock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mock.d.ts","names":[],"sources":["../src/mock.ts"],"mappings":";;;;UAKiB;EACf;EACA;EACA,SAAS;EACT,MAAM;EACN;EACA;EACA,UAAU;;;;;KAMA,0BAA0B;;;;KAK1B,0BAA0B;;;;;;;;;;;;;;;;;;iBAmBtB,IACd,eACA,aACA,UAAU,mBACV,UAAU,QAAQ,KAAK;EAA8C;IACpE;;;;iBAmFa,KACd,eACA,aACA,UAAU,mBACV,UAAU,QAAQ,KAAK;EAA8C;IACpE;;;;iBAwBa,IACd,eACA,aACA,UAAU,mBACV,UAAU,QAAQ,KAAK;EAA8C;IACpE;;;;;iBAwBa,MACd,eACA,aACA,UAAU,mBACV,UAAU,QAAQ,KAAK;EAA8C;IACpE;;;;iBAuBa,OACd,eACA,aACA,UAAU,mBACV,UAAU,QAAQ,KAAK;EAA8C;IACpE;;;;;;;;;;;;;;;;;;iBAsCa,KACd,eACA,aACA,UAAU,mBAIV,UAAU,QAAQ,KAAK;EAA8C;IACpE"}
1
+ {"version":3,"file":"mock.d.ts","names":[],"sources":["../src/mock.ts"],"mappings":";;;;iBAKiB;EACf;EACA;EACA,SAAS;EACT,MAAM;EACN;EACA;EACA,UAAU;;;;;YAMA,0BAA0B;;;;YAK1B,0BAA0B;;;;;;;;;;;;;;;;;;wBAmBtB,IACd,eACA,aACA,UAAU,mBACV,UAAU,QAAQ,KAAK;EAA8C;IACpE;;;;wBAmFa,KACd,eACA,aACA,UAAU,mBACV,UAAU,QAAQ,KAAK;EAA8C;IACpE;;;;wBAwBa,IACd,eACA,aACA,UAAU,mBACV,UAAU,QAAQ,KAAK;EAA8C;IACpE;;;;;wBAwBa,MACd,eACA,aACA,UAAU,mBACV,UAAU,QAAQ,KAAK;EAA8C;IACpE;;;;wBAuBa,OACd,eACA,aACA,UAAU,mBACV,UAAU,QAAQ,KAAK;EAA8C;IACpE;;;;;;;;;;;;;;;;;;wBAsCa,KACd,eACA,aACA,UAAU,mBAIV,UAAU,QAAQ,KAAK;EAA8C;IACpE"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@warp-drive/holodeck",
3
3
  "description": "⚡️ Simple, Fast HTTP Mocking for Tests",
4
- "version": "0.1.0-alpha.77",
4
+ "version": "0.1.0-alpha.78",
5
5
  "license": "MIT",
6
6
  "author": "Chris Thoburn <runspired@users.noreply.github.com>",
7
7
  "repository": {
@@ -12,13 +12,13 @@
12
12
  "homepage": "https://github.com/warp-drive-data/warp-drive",
13
13
  "bugs": "https://github.com/warp-drive-data/warp-drive/issues",
14
14
  "engines": {
15
- "node": ">= 24.20.0"
15
+ "node": ">= 24.21.0"
16
16
  },
17
17
  "keywords": [
18
18
  "http-mock"
19
19
  ],
20
20
  "dependencies": {
21
- "hono": "^4.13.5",
21
+ "hono": "^4.13.7",
22
22
  "@hono/node-server": "^1.19.0"
23
23
  },
24
24
  "type": "module",
@@ -34,9 +34,9 @@
34
34
  "ensure-cert": "./server/ensure-cert.js"
35
35
  },
36
36
  "peerDependencies": {
37
- "@warp-drive/utilities": "5.10.0-alpha.1",
38
- "@warp-drive/legacy": "5.10.0-alpha.1",
39
- "@warp-drive/core": "5.10.0-alpha.1"
37
+ "@warp-drive/utilities": "5.10.0-alpha.2",
38
+ "@warp-drive/legacy": "5.10.0-alpha.2",
39
+ "@warp-drive/core": "5.10.0-alpha.2"
40
40
  },
41
41
  "peerDependenciesMeta": {
42
42
  "@warp-drive/utilities": {
@@ -52,12 +52,12 @@
52
52
  "@babel/preset-env": "^7.29.7",
53
53
  "@babel/preset-typescript": "^7.29.7",
54
54
  "@babel/runtime": "^7.29.7",
55
- "@warp-drive/utilities": "5.10.0-alpha.1",
56
- "@warp-drive/legacy": "5.10.0-alpha.1",
57
- "@warp-drive/core": "5.10.0-alpha.1",
58
- "@warp-drive/internal-config": "5.10.0-alpha.1",
59
- "tsdown": "^0.22.14",
60
- "typescript-7": "npm:typescript@7.1.0-dev.20260901.1"
55
+ "@warp-drive/utilities": "5.10.0-alpha.2",
56
+ "@warp-drive/legacy": "5.10.0-alpha.2",
57
+ "@warp-drive/core": "5.10.0-alpha.2",
58
+ "@warp-drive/internal-config": "5.10.0-alpha.2",
59
+ "tsdown": "^0.23.0",
60
+ "typescript-7": "npm:typescript@7.1.0-dev.20260906.1"
61
61
  },
62
62
  "exports": {
63
63
  ".": {