@lensjs/express 1.0.11 → 1.0.12

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/adapter.cjs CHANGED
@@ -186,6 +186,10 @@ var ExpressAdapter = class extends import_core.LensAdapter {
186
186
  if (!body) {
187
187
  return null;
188
188
  }
189
- return JSON.parse(body);
189
+ try {
190
+ return JSON.parse(body);
191
+ } catch (_e) {
192
+ return body;
193
+ }
190
194
  }
191
195
  };
package/dist/adapter.js CHANGED
@@ -156,7 +156,11 @@ var ExpressAdapter = class extends LensAdapter {
156
156
  if (!body) {
157
157
  return null;
158
158
  }
159
- return JSON.parse(body);
159
+ try {
160
+ return JSON.parse(body);
161
+ } catch (_e) {
162
+ return body;
163
+ }
160
164
  }
161
165
  };
162
166
  export {
package/dist/index.cjs CHANGED
@@ -189,7 +189,11 @@ var ExpressAdapter = class extends import_core.LensAdapter {
189
189
  if (!body) {
190
190
  return null;
191
191
  }
192
- return JSON.parse(body);
192
+ try {
193
+ return JSON.parse(body);
194
+ } catch (_e) {
195
+ return body;
196
+ }
193
197
  }
194
198
  };
195
199
 
package/dist/index.js CHANGED
@@ -164,7 +164,11 @@ var ExpressAdapter = class extends LensAdapter {
164
164
  if (!body) {
165
165
  return null;
166
166
  }
167
- return JSON.parse(body);
167
+ try {
168
+ return JSON.parse(body);
169
+ } catch (_e) {
170
+ return body;
171
+ }
168
172
  }
169
173
  };
170
174
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lensjs/express",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "Express adapter for LensJs",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -19,10 +19,10 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "express": "^5.1.0",
22
- "@lensjs/watchers": "1.0.11",
23
- "@lensjs/core": "1.0.11",
24
- "@lensjs/typescript-config": "1.0.11",
25
- "@lensjs/date": "1.0.11"
22
+ "@lensjs/date": "1.0.12",
23
+ "@lensjs/core": "1.0.12",
24
+ "@lensjs/watchers": "1.0.12",
25
+ "@lensjs/typescript-config": "1.0.12"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/express": "^5.0.3"