@rebasepro/client 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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rebasepro/client",
3
3
  "type": "module",
4
- "version": "0.6.0",
4
+ "version": "0.6.1",
5
5
  "description": "HTTP SDK client for the Rebase custom backend",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/rebaseco"
@@ -30,9 +30,9 @@
30
30
  "./package.json": "./package.json"
31
31
  },
32
32
  "dependencies": {
33
- "@rebasepro/common": "0.6.0",
34
- "@rebasepro/utils": "0.6.0",
35
- "@rebasepro/types": "0.6.0"
33
+ "@rebasepro/common": "0.6.1",
34
+ "@rebasepro/types": "0.6.1",
35
+ "@rebasepro/utils": "0.6.1"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@jest/globals": "^30.4.1",
package/src/transport.ts CHANGED
@@ -90,7 +90,7 @@ function normalizeWhereValue(value: WhereFieldValue): string {
90
90
 
91
91
  function serializeLogicalCondition(cond: any): string {
92
92
  if ("type" in cond) {
93
- const sub = cond.conditions.map(serializeLogicalCondition).join(",");
93
+ const sub = (cond.conditions ?? []).map(serializeLogicalCondition).join(",");
94
94
  return `${cond.type}(${sub})`;
95
95
  } else {
96
96
  const op = OP_MAP[cond.operator] ?? cond.operator;
@@ -126,7 +126,7 @@ export function buildQueryString(params?: FindParams): string {
126
126
 
127
127
  if (params.logical) {
128
128
  const root = params.logical;
129
- const serialized = root.conditions.map(serializeLogicalCondition).join(",");
129
+ const serialized = (root.conditions ?? []).map(serializeLogicalCondition).join(",");
130
130
  parts.push(`${root.type}=${encodeURIComponent(`(${serialized})`)}`);
131
131
  }
132
132