@fluwa-tool/sdk 1.0.34 → 1.0.35

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.
@@ -115,6 +115,10 @@ class FetchInterceptor {
115
115
  requestMetadata.source = types_1.RequestSource.MOCK;
116
116
  requestMetadata.response = mockResponse.response;
117
117
  requestMetadata.status = mockResponse.status;
118
+ this.logger.debug(`✅ Retornando mock para ${method} ${url}`, {
119
+ status: mockResponse.status,
120
+ response: mockResponse.response
121
+ });
118
122
  // Aplicar delay se configurado
119
123
  if (mockResponse.delay) {
120
124
  await this.delay(mockResponse.delay);
@@ -124,11 +128,16 @@ class FetchInterceptor {
124
128
  // Registrar completamento
125
129
  await this.requestLogger.logComplete(requestMetadata);
126
130
  // Retornar mock como Response
127
- return new Response(JSON.stringify(mockResponse.response), {
131
+ const mockResponseObj = new Response(JSON.stringify(mockResponse.response), {
128
132
  status: mockResponse.status || 200,
129
133
  statusText: 'Mock',
130
134
  headers: { 'Content-Type': 'application/json' },
131
135
  });
136
+ this.logger.debug(`📤 Mock Response criada:`, {
137
+ status: mockResponseObj.status,
138
+ statusText: mockResponseObj.statusText
139
+ });
140
+ return mockResponseObj;
132
141
  }
133
142
  // Fazer request real
134
143
  const response = await this.originalFetch.apply(globalThis, args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluwa-tool/sdk",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
4
4
  "description": "Fluwa DevTools SDK for network interception and mocking",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",