@sgedda/mockifyer-fetch 1.8.42 → 1.8.43
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.js +6 -2
- package/package.json +2 -2
- package/src/index.ts +9 -2
package/dist/index.js
CHANGED
|
@@ -1293,8 +1293,12 @@ function setupMockifyer(config) {
|
|
|
1293
1293
|
const method = init?.method || 'GET';
|
|
1294
1294
|
const headers = init?.headers || {};
|
|
1295
1295
|
const body = init?.body;
|
|
1296
|
-
// Skip Mockifyer sync endpoints and Resend API
|
|
1297
|
-
if (url.includes('/mockifyer-save') ||
|
|
1296
|
+
// Skip Mockifyer sync endpoints, dashboard `/api/proxy` plumbing, and Resend API
|
|
1297
|
+
if (url.includes('/mockifyer-save') ||
|
|
1298
|
+
url.includes('/mockifyer-clear') ||
|
|
1299
|
+
url.includes('/mockifyer-sync') ||
|
|
1300
|
+
url.includes('api.resend.com') ||
|
|
1301
|
+
(0, mockifyer_core_1.isMockifyerDashboardProxyApiUrl)(url)) {
|
|
1298
1302
|
return await originalFetchForPatched(input, init);
|
|
1299
1303
|
}
|
|
1300
1304
|
const simpleRequestKey = `${method}:${url}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sgedda/mockifyer-fetch",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.43",
|
|
4
4
|
"description": "Mockifyer for Fetch - API mocking and logging utility for storing and replaying API responses",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"license": "MIT",
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@sgedda/mockifyer-core": "^1.10.
|
|
52
|
+
"@sgedda/mockifyer-core": "^1.10.25"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "^20.11.24",
|
package/src/index.ts
CHANGED
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
isUsableNodeLikePoolFs,
|
|
43
43
|
type PoolResponseItem,
|
|
44
44
|
shouldBypassMockifyerForUrl,
|
|
45
|
+
isMockifyerDashboardProxyApiUrl,
|
|
45
46
|
resolveRecordingExclusions,
|
|
46
47
|
shouldExcludeRecording,
|
|
47
48
|
mockPassesThroughToRealApi,
|
|
@@ -1623,8 +1624,14 @@ export function setupMockifyer(config: MockifyerConfig): MockifyerInstance {
|
|
|
1623
1624
|
const headers = init?.headers || {};
|
|
1624
1625
|
const body = init?.body;
|
|
1625
1626
|
|
|
1626
|
-
// Skip Mockifyer sync endpoints and Resend API
|
|
1627
|
-
if (
|
|
1627
|
+
// Skip Mockifyer sync endpoints, dashboard `/api/proxy` plumbing, and Resend API
|
|
1628
|
+
if (
|
|
1629
|
+
url.includes('/mockifyer-save') ||
|
|
1630
|
+
url.includes('/mockifyer-clear') ||
|
|
1631
|
+
url.includes('/mockifyer-sync') ||
|
|
1632
|
+
url.includes('api.resend.com') ||
|
|
1633
|
+
isMockifyerDashboardProxyApiUrl(url)
|
|
1634
|
+
) {
|
|
1628
1635
|
return await originalFetchForPatched(input, init);
|
|
1629
1636
|
}
|
|
1630
1637
|
|