@inneropen/marvin-sdk 2.0.0-next.12 → 2.0.0-next.13

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.
@@ -237,7 +237,12 @@ var init_HttpClient = __esm({
237
237
  if (!contentType || !contentType.includes("application/json")) {
238
238
  return void 0;
239
239
  }
240
- return await response.json();
240
+ const data = await response.json();
241
+ if (this.debug) {
242
+ const preview = typeof data === "object" && data !== null ? Array.isArray(data) ? `Array(${data.length})` : `Object with keys: ${Object.keys(data).join(", ")}` : String(data);
243
+ this.logger.log(`[Marvin] Response: ${preview}`);
244
+ }
245
+ return data;
241
246
  } catch (error) {
242
247
  clearTimeout(timeoutId);
243
248
  if (error instanceof MarvinApiError || error instanceof MarvinNotFoundError || error instanceof MarvinAuthError || error instanceof MarvinServerError) {
package/dist/index.cjs CHANGED
@@ -280,7 +280,12 @@ var init_HttpClient = __esm({
280
280
  if (!contentType || !contentType.includes("application/json")) {
281
281
  return void 0;
282
282
  }
283
- return await response.json();
283
+ const data = await response.json();
284
+ if (this.debug) {
285
+ const preview = typeof data === "object" && data !== null ? Array.isArray(data) ? `Array(${data.length})` : `Object with keys: ${Object.keys(data).join(", ")}` : String(data);
286
+ this.logger.log(`[Marvin] Response: ${preview}`);
287
+ }
288
+ return data;
284
289
  } catch (error) {
285
290
  clearTimeout(timeoutId);
286
291
  if (error instanceof MarvinApiError || error instanceof MarvinNotFoundError || error instanceof MarvinAuthError || error instanceof MarvinServerError) {
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  isPaginatedResponse,
23
23
  offsetToPage,
24
24
  pageToOffset
25
- } from "./chunk-QBHM2XNX.js";
25
+ } from "./chunk-DYC2BEA4.js";
26
26
 
27
27
  // src/client/config.ts
28
28
  var config_exports = {};
package/dist/platform.cjs CHANGED
@@ -230,7 +230,12 @@ var HttpClient = class {
230
230
  if (!contentType || !contentType.includes("application/json")) {
231
231
  return void 0;
232
232
  }
233
- return await response.json();
233
+ const data = await response.json();
234
+ if (this.debug) {
235
+ const preview = typeof data === "object" && data !== null ? Array.isArray(data) ? `Array(${data.length})` : `Object with keys: ${Object.keys(data).join(", ")}` : String(data);
236
+ this.logger.log(`[Marvin] Response: ${preview}`);
237
+ }
238
+ return data;
234
239
  } catch (error) {
235
240
  clearTimeout(timeoutId);
236
241
  if (error instanceof MarvinApiError || error instanceof MarvinNotFoundError || error instanceof MarvinAuthError || error instanceof MarvinServerError) {
package/dist/platform.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  HttpClient,
3
3
  SessionAuth,
4
4
  init_core
5
- } from "./chunk-QBHM2XNX.js";
5
+ } from "./chunk-DYC2BEA4.js";
6
6
 
7
7
  // src/platform/client.ts
8
8
  init_core();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inneropen/marvin-sdk",
3
- "version": "2.0.0-next.12",
3
+ "version": "2.0.0-next.13",
4
4
  "description": "Official TypeScript SDK for Marvin CMS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",