@rebasepro/server-core 0.6.0 → 0.6.1

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.umd.js CHANGED
@@ -3619,7 +3619,9 @@ const require = __createRequire(import.meta.url);
3619
3619
  });
3620
3620
  return c.json(response, 201);
3621
3621
  } catch (error) {
3622
- if (isRebaseApiError(error) && !error.code) error.code = "BAD_REQUEST";
3622
+ if (isRebaseApiError(error) && !error.code) {
3623
+ if (!(error instanceof TypeError || error instanceof RangeError || error instanceof SyntaxError || error instanceof ReferenceError)) error.code = "BAD_REQUEST";
3624
+ }
3623
3625
  throw error;
3624
3626
  }
3625
3627
  });
@@ -3649,7 +3651,9 @@ const require = __createRequire(import.meta.url);
3649
3651
  });
3650
3652
  return c.json(response);
3651
3653
  } catch (error) {
3652
- if (isRebaseApiError(error) && !error.code) error.code = "BAD_REQUEST";
3654
+ if (isRebaseApiError(error) && !error.code) {
3655
+ if (!(error instanceof TypeError || error instanceof RangeError || error instanceof SyntaxError || error instanceof ReferenceError)) error.code = "BAD_REQUEST";
3656
+ }
3653
3657
  throw error;
3654
3658
  }
3655
3659
  });
@@ -25520,6 +25524,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
25520
25524
  * Path: /file/{bucket}/{path} or /file/{path}
25521
25525
  */
25522
25526
  router.get("/file/*", readAuthMiddleware, async (c) => {
25527
+ c.header("Cross-Origin-Resource-Policy", "cross-origin");
25523
25528
  const rawPath = extractWildcardPath(c);
25524
25529
  if (!rawPath) throw ApiError.notFound("File not found");
25525
25530
  const filePath = decodeURIComponent(rawPath);
@@ -43436,7 +43441,7 @@ nodeEnables: "GOOGLE_SDK_NODE_LOGGING" };
43436
43441
  }
43437
43442
  function serializeLogicalCondition(cond) {
43438
43443
  if ("type" in cond) {
43439
- const sub = cond.conditions.map(serializeLogicalCondition).join(",");
43444
+ const sub = (cond.conditions ?? []).map(serializeLogicalCondition).join(",");
43440
43445
  return `${cond.type}(${sub})`;
43441
43446
  } else {
43442
43447
  const op = OP_MAP[cond.operator] ?? cond.operator;
@@ -43457,7 +43462,7 @@ nodeEnables: "GOOGLE_SDK_NODE_LOGGING" };
43457
43462
  if (params.include && params.include.length > 0) parts.push(`include=${encodeURIComponent(params.include.join(","))}`);
43458
43463
  if (params.logical) {
43459
43464
  const root = params.logical;
43460
- const serialized = root.conditions.map(serializeLogicalCondition).join(",");
43465
+ const serialized = (root.conditions ?? []).map(serializeLogicalCondition).join(",");
43461
43466
  parts.push(`${root.type}=${encodeURIComponent(`(${serialized})`)}`);
43462
43467
  }
43463
43468
  if (params.where) for (const [field, value] of Object.entries(params.where)) if (Array.isArray(value) && value.length > 0 && Array.isArray(value[0])) for (const subVal of value) {