eddev 2.0.0-beta.171 → 2.0.0-beta.173

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.
@@ -313,12 +313,12 @@ export class ServerContext {
313
313
  let resultStatus = result.status;
314
314
  let resultHeaders = result.headers;
315
315
  let resultData = await result.json();
316
- if (resultData && typeof resultData === "object") {
317
- resultData.__generated = new Date().toISOString();
318
- }
319
- if (resultData.queryMonitor) {
320
- this.debugLogQueryMonitor("query", req.name, resultData.queryMonitor);
321
- }
316
+ // if (resultData && typeof resultData === "object") {
317
+ // resultData.__generated = new Date().toISOString()
318
+ // }
319
+ // if (resultData.queryMonitor) {
320
+ // this.debugLogQueryMonitor("query", req.name, resultData.queryMonitor)
321
+ // }
322
322
  return {
323
323
  status: resultStatus,
324
324
  headers: resultHeaders,
@@ -337,18 +337,18 @@ export function createVinxiCodegen(opts) {
337
337
  const id = "/" + getRouterParam(event, "name")
338
338
  const paramString = getQuery(event).params
339
339
 
340
- let params = null
340
+ let params = {}
341
341
  try {
342
342
  params = typeof paramString === "string" && paramString.length ? JSON.parse(paramString) : {}
343
343
  } catch (e) {
344
344
  throw new Error("Invalid query parameters")
345
345
  }
346
346
 
347
- return await serverContext.fetchNamedQuery({ name: id, params: params, headers: getRequestHeaders(event) }).then(res => {
348
- return res
349
- }).catch(err => {
350
- throw new Error("Error fetching query:"+JSON.stringify(err))
351
- })
347
+ try {
348
+ return await serverContext.fetchNamedQuery({ name: id, params: params, headers: getRequestHeaders(event) })
349
+ } catch (err) {
350
+ throw new Error("Error fetching query: "+JSON.stringify({...err}))
351
+ }
352
352
  }),
353
353
  )
354
354
  .get(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "2.0.0-beta.171",
3
+ "version": "2.0.0-beta.173",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",