@leyyo/http-mock 1.3.4 → 1.3.5
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/application/mock-application.js +3 -1
- package/dist/event/http-event.d.ts +1 -1
- package/dist/event/http-event.js +3 -0
- package/dist/http-mock.js +3 -0
- package/dist/index.loader.js +1 -1
- package/dist/request/mock.request.js +3 -1
- package/dist/response/mock-response.js +3 -1
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HttpEvent } from "../event/index.js";
|
|
2
|
-
import { logCommon } from "@leyyo/common";
|
|
2
|
+
import { logCommon, setFqn } from "@leyyo/common";
|
|
3
|
+
import { FQN } from "../internal.js";
|
|
3
4
|
let _firstOrigin;
|
|
4
5
|
// noinspection JSUnusedGlobalSymbols
|
|
5
6
|
/**
|
|
@@ -263,4 +264,5 @@ export class MockApplication extends HttpEvent {
|
|
|
263
264
|
return _firstOrigin;
|
|
264
265
|
}
|
|
265
266
|
}
|
|
267
|
+
setFqn(MockApplication, FQN);
|
|
266
268
|
const logger = logCommon.of(MockApplication);
|
package/dist/event/http-event.js
CHANGED
package/dist/http-mock.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { MockResponse } from "./response/index.js";
|
|
2
2
|
import { MockRequest } from "./request/index.js";
|
|
3
3
|
import { MockApplication } from "./application/index.js";
|
|
4
|
+
import { setFqn } from "@leyyo/common";
|
|
5
|
+
import { FQN } from "./internal.js";
|
|
4
6
|
/**
|
|
5
7
|
* Http mock class
|
|
6
8
|
* */
|
|
@@ -31,6 +33,7 @@ class HttpMock {
|
|
|
31
33
|
return [newReq, newRes, newApp];
|
|
32
34
|
}
|
|
33
35
|
}
|
|
36
|
+
setFqn(HttpMock, FQN);
|
|
34
37
|
// noinspection JSUnusedGlobalSymbols
|
|
35
38
|
/**
|
|
36
39
|
* Http mock instance
|
package/dist/index.loader.js
CHANGED
|
@@ -7,4 +7,4 @@ export const loader_leyyoHttpMock = defineLoader(FQN,
|
|
|
7
7
|
// enums
|
|
8
8
|
() => import('./enum/http-method.js').then(m => m.HttpMethodItems), () => import('./enum/http-protocol.js').then(m => m.HttpProtocolItems),
|
|
9
9
|
// classes
|
|
10
|
-
() => import('./application/mock-application.js').then(m => m.MockApplication), () => import('./request/mock.request.js').then(m => m.MockRequest), () => import('./response/mock-response.js').then(m => m.MockResponse));
|
|
10
|
+
() => import('./application/mock-application.js').then(m => m.MockApplication), () => import('./request/mock.request.js').then(m => m.MockRequest), () => import('./response/mock-response.js').then(m => m.MockResponse), () => import('./http-mock.js').then(m => m.httpMock));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HttpEvent } from "../event/index.js";
|
|
2
|
-
import { delay, logCommon } from "@leyyo/common";
|
|
2
|
+
import { delay, logCommon, setFqn } from "@leyyo/common";
|
|
3
|
+
import { FQN } from "../internal.js";
|
|
3
4
|
let _firstOrigin;
|
|
4
5
|
// noinspection JSUnusedGlobalSymbols
|
|
5
6
|
export class MockRequest extends HttpEvent {
|
|
@@ -358,6 +359,7 @@ export class MockRequest extends HttpEvent {
|
|
|
358
359
|
return _firstOrigin;
|
|
359
360
|
}
|
|
360
361
|
}
|
|
362
|
+
setFqn(MockRequest, FQN);
|
|
361
363
|
const logger = logCommon.of(MockRequest);
|
|
362
364
|
// region functions
|
|
363
365
|
function _removePath(req) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as mime from "mime-types";
|
|
2
|
-
import { logCommon } from "@leyyo/common";
|
|
2
|
+
import { logCommon, setFqn } from "@leyyo/common";
|
|
3
3
|
import { HttpEvent } from "../event/index.js";
|
|
4
|
+
import { FQN } from "../internal.js";
|
|
4
5
|
let _firstOrigin;
|
|
5
6
|
export class MockResponse extends HttpEvent {
|
|
6
7
|
// region property
|
|
@@ -501,4 +502,5 @@ export class MockResponse extends HttpEvent {
|
|
|
501
502
|
return _firstOrigin;
|
|
502
503
|
}
|
|
503
504
|
}
|
|
505
|
+
setFqn(MockResponse, FQN);
|
|
504
506
|
const logger = logCommon.of(MockResponse);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leyyo/http-mock",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"description": "Http Mock",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"http mock",
|
|
@@ -55,6 +55,6 @@
|
|
|
55
55
|
"typescript": "^5.7.3"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@leyyo/common": "^1.3.
|
|
58
|
+
"@leyyo/common": "^1.3.12"
|
|
59
59
|
}
|
|
60
60
|
}
|