@veloxts/client 0.6.94 → 0.6.96

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @veloxts/client
2
2
 
3
+ ## 0.6.96
4
+
5
+ ### Patch Changes
6
+
7
+ - updates to trpc scaffold template
8
+
9
+ ## 0.6.95
10
+
11
+ ### Patch Changes
12
+
13
+ - fix(create): use /trpc baseUrl for tRPC template and unwrap tRPC response format
14
+
3
15
  ## 0.6.94
4
16
 
5
17
  ### Patch Changes
package/dist/client.js CHANGED
@@ -412,6 +412,14 @@ async function executeProcedure(call, state, isRetry = false) {
412
412
  if (state.config.onResponse) {
413
413
  await state.config.onResponse(response);
414
414
  }
415
+ // Unwrap tRPC response format: { result: { data: ... } }
416
+ const mode = detectMode(state.config);
417
+ if (mode === 'trpc' && body && typeof body === 'object') {
418
+ const trpcResponse = body;
419
+ if (trpcResponse.result?.data !== undefined) {
420
+ return trpcResponse.result.data;
421
+ }
422
+ }
415
423
  return body;
416
424
  }
417
425
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/client",
3
- "version": "0.6.94",
3
+ "version": "0.6.96",
4
4
  "description": "Type-safe frontend API client for VeloxTS framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",