@sylphx/lens-server 4.1.1 → 4.1.2

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 CHANGED
@@ -1070,7 +1070,7 @@ class LensServerImpl {
1070
1070
  });
1071
1071
  }
1072
1072
  if (isSnapshot(result)) {
1073
- return new Response(JSON.stringify({ data: result.data }), {
1073
+ return new Response(JSON.stringify(result), {
1074
1074
  headers: baseHeaders
1075
1075
  });
1076
1076
  }
@@ -1135,7 +1135,7 @@ async function handleWebQuery(server, path, url) {
1135
1135
  return Response.json({ error: result.error }, { status: 400 });
1136
1136
  }
1137
1137
  if (isSnapshot2(result)) {
1138
- return Response.json({ data: result.data });
1138
+ return Response.json(result);
1139
1139
  }
1140
1140
  return Response.json(result);
1141
1141
  } catch (error) {
@@ -1151,7 +1151,7 @@ async function handleWebMutation(server, path, request) {
1151
1151
  return Response.json({ error: result.error }, { status: 400 });
1152
1152
  }
1153
1153
  if (isSnapshot2(result)) {
1154
- return Response.json({ data: result.data });
1154
+ return Response.json(result);
1155
1155
  }
1156
1156
  return Response.json(result);
1157
1157
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sylphx/lens-server",
3
- "version": "4.1.1",
3
+ "version": "4.1.2",
4
4
  "description": "Server runtime for Lens API framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -125,7 +125,7 @@ export async function handleWebQuery(
125
125
  }
126
126
 
127
127
  if (isSnapshot(result)) {
128
- return Response.json({ data: result.data });
128
+ return Response.json(result);
129
129
  }
130
130
 
131
131
  // ops message - forward as-is
@@ -165,7 +165,7 @@ export async function handleWebMutation(
165
165
  }
166
166
 
167
167
  if (isSnapshot(result)) {
168
- return Response.json({ data: result.data });
168
+ return Response.json(result);
169
169
  }
170
170
 
171
171
  // ops message - forward as-is
@@ -356,7 +356,7 @@ export function createHTTPHandler(
356
356
  }
357
357
 
358
358
  if (isSnapshot(result)) {
359
- return new Response(JSON.stringify({ data: result.data }), {
359
+ return new Response(JSON.stringify(result), {
360
360
  headers: {
361
361
  "Content-Type": "application/json",
362
362
  ...baseHeaders,
@@ -1306,7 +1306,7 @@ class LensServerImpl<
1306
1306
  }
1307
1307
 
1308
1308
  if (isSnapshot(result)) {
1309
- return new Response(JSON.stringify({ data: result.data }), {
1309
+ return new Response(JSON.stringify(result), {
1310
1310
  headers: baseHeaders,
1311
1311
  });
1312
1312
  }