@aiao/rxdb-adapter-supabase 0.0.13 → 0.0.14

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.
@@ -3,6 +3,13 @@ import { SupabaseClient } from '@supabase/supabase-js';
3
3
  import { Observable } from 'rxjs';
4
4
  import { SupabaseAdapterOptions } from './supabase.interface.js';
5
5
  export declare const ADAPTER_NAME = "supabase";
6
+ /** pushChanges 参数结构(已压缩的变更) */
7
+ interface CompressedChange {
8
+ entityKey: string;
9
+ finalType: 'INSERT' | 'UPDATE' | 'DELETE' | null;
10
+ finalPatch: Record<string, unknown> | null;
11
+ inversePatch: Record<string, unknown> | null;
12
+ }
6
13
  /**
7
14
  * Supabase 适配器
8
15
  *
@@ -88,7 +95,7 @@ export declare class RxDBAdapterSupabase extends RxDBAdapterRemoteBase implement
88
95
  * @param changes - 待推送的变更(已压缩)
89
96
  * @throws 当任何变更推送失败时抛出错误
90
97
  */
91
- pushChanges(changes: any[]): Promise<void>;
98
+ pushChanges(changes: CompressedChange[]): Promise<void>;
92
99
  /**
93
100
  * 应用压缩后的变更到远程(事务)
94
101
  *
@@ -131,4 +138,5 @@ export declare class RxDBAdapterSupabase extends RxDBAdapterRemoteBase implement
131
138
  /** 执行 delete(非事务) */
132
139
  private executeDelete;
133
140
  }
141
+ export {};
134
142
  //# sourceMappingURL=RxDBAdapterSupabase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RxDBAdapterSupabase.d.ts","sourceRoot":"","sources":["../src/RxDBAdapterSupabase.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,YAAY,EACZ,wBAAwB,EACxB,YAAY,EACZ,SAAS,EACT,IAAI,EACJ,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAqB,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EAAiC,KAAK,cA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qB;YACP,aAAa;CA4C5B"}
@@ -7,7 +7,7 @@ export declare function group_by_type<T extends EntityType>(entities: InstanceTy
7
7
  export declare function build_upsert_params<T extends EntityType>(entityMap: Map<T, Set<InstanceType<T>>>, userId?: string): Array<{
8
8
  table: string;
9
9
  schema: string;
10
- data: any[];
10
+ data: Record<string, unknown>[];
11
11
  }>;
12
12
  /** 构建 delete RPC 参数 */
13
13
  export declare function build_delete_params<T extends EntityType>(entityMap: Map<T, Set<InstanceType<T>>>): Array<{
@@ -1 +1 @@
1
- {"version":3,"file":"RxDBAdapterSupabase.utils.d.ts","sourceRoot":"","sources":["../src/RxDBAdapterSupabase.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,YAAY,CAAC;AAE3D;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,UAAU,EAChD,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,GAC1B,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAUvC;AAED,uBAAuB;AACvB,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,UAAU,EACtD,SAAS,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,EACvC,MAAM,CAAC,EAAE,MAAM,GACd,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAG,EAAE,CAAA;CAAE,CAAC,CAcvD;AAED,uBAAuB;AACvB,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,UAAU,EACtD,SAAS,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,GACtC,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAazD"}
1
+ {"version":3,"file":"RxDBAdapterSupabase.utils.d.ts","sourceRoot":"","sources":["../src/RxDBAdapterSupabase.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,YAAY,CAAC;AAE3D;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,UAAU,EAChD,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,GAC1B,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAUvC;AAED,uBAAuB;AACvB,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,UAAU,EACtD,SAAS,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,EACvC,MAAM,CAAC,EAAE,MAAM,GACd,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CAAE,CAAC,CAc3E;AAED,uBAAuB;AACvB,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,UAAU,EACtD,SAAS,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,GACtC,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAazD"}
@@ -1 +1 @@
1
- {"version":3,"file":"SupabaseRepository.d.ts","sourceRoot":"","sources":["../src/SupabaseRepository.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAqB,cAAc,E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1 @@
1
- {"version":3,"file":"handle_supabase_change.d.ts","sourceRoot":"","sources":["../src/handle_supabase_change.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,KAAK,eAAe,GAAG,8BAA8B,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAQ/E;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI,CAkCjG"}
1
+ {"version":3,"file":"handle_supabase_change.d.ts","sourceRoot":"","sources":["../src/handle_supabase_change.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,KAAK,eAAe,GAAG,8BAA8B,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAmB/E;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI,CAmCjG"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { EntityRemoteRemovedEvent as O, EntityRemoteUpdatedEvent as W, EntityRemoteCreatedEvent as U, isRuleGroup as A, getEntityMetadata as _, PropertyType as $, RepositoryBase as K, RxDBAdapterRemoteBase as z } from "@aiao/rxdb";
1
+ import { EntityRemoteRemovedEvent as O, EntityRemoteUpdatedEvent as W, EntityRemoteCreatedEvent as U, isRuleGroup as A, getEntityMetadata as E, PropertyType as $, RepositoryBase as K, RxDBAdapterRemoteBase as z } from "@aiao/rxdb";
2
2
  import { createClient as L } from "@supabase/supabase-js";
3
3
  import { defer as D, from as N, map as k, of as Q } from "rxjs";
4
4
  class S extends Error {
@@ -30,19 +30,19 @@ function J(i, t) {
30
30
  if (t.table !== "RxDBChange" || t.eventType !== "INSERT") return;
31
31
  const e = t.new;
32
32
  if (!e) return;
33
- const { namespace: n, entity: s, entityId: a, type: r, patch: o, clientId: c } = e, d = i.rxdb.context.clientId;
33
+ const { namespace: s, entity: n, entityId: a, type: r, patch: o, clientId: c } = e, d = i.rxdb.context.clientId;
34
34
  if (c && d && c === d || !a || !r) return;
35
- const f = V[r];
36
- if (!f) return;
37
- const u = { id: a, ...o };
35
+ const f = r, u = V[f];
36
+ if (!u) return;
37
+ const p = { id: a, ...o };
38
38
  i.rxdb.dispatchEvent(
39
- new f([
39
+ new u([
40
40
  {
41
- type: r,
42
- namespace: n || "public",
43
- entity: s,
41
+ type: f,
42
+ namespace: s || "public",
43
+ entity: n,
44
44
  id: a,
45
- data: u,
45
+ data: p,
46
46
  recordAt: e.createdAt ? new Date(e.createdAt) : /* @__PURE__ */ new Date()
47
47
  }
48
48
  ])
@@ -92,113 +92,113 @@ function H(i, t) {
92
92
  }
93
93
  }
94
94
  function B(i, t, e) {
95
- const [n, ...s] = i.split(".");
96
- return s.length === 0 ? { field: i, operator: t, value: e } : {
97
- field: n,
95
+ const [s, ...n] = i.split(".");
96
+ return n.length === 0 ? { field: i, operator: t, value: e } : {
97
+ field: s,
98
98
  operator: "exists",
99
- where: { combinator: "and", rules: [B(s.join("."), t, e)] }
99
+ where: { combinator: "and", rules: [B(n.join("."), t, e)] }
100
100
  };
101
101
  }
102
- function x(i, t, e, n) {
102
+ function x(i, t, e, s) {
103
103
  if (!t?.rules?.length) return i;
104
104
  if (t.rules.length === 1) {
105
105
  const a = t.rules[0];
106
- return A(a) ? x(i, a, e, n) : I(i, a, e, n);
106
+ return A(a) ? x(i, a, e, s) : I(i, a, e, s);
107
107
  }
108
108
  if (t.combinator === "and")
109
109
  return t.rules.reduce(
110
- (a, r) => A(r) ? x(a, r, e, n) : I(a, r, e, n),
110
+ (a, r) => A(r) ? x(a, r, e, s) : I(a, r, e, s),
111
111
  i
112
112
  );
113
- const s = t.rules.map((a) => {
113
+ const n = t.rules.map((a) => {
114
114
  if (A(a)) throw new Error("Nested OR conditions not supported");
115
115
  const { field: r, operator: o, value: c } = a;
116
116
  return `${r}.${H(o, c)}`;
117
117
  });
118
- return i.or(s.join(","));
118
+ return i.or(n.join(","));
119
119
  }
120
- function I(i, t, e, n) {
121
- const { field: s, operator: a, value: r } = t;
122
- return typeof s == "string" && s.includes(".") ? I(i, B(s, a, r), e, n) : a === "exists" || a === "notExists" ? Y(i, t, e, n) : F(i, s, a, r);
120
+ function I(i, t, e, s) {
121
+ const { field: n, operator: a, value: r } = t;
122
+ return typeof n == "string" && n.includes(".") ? I(i, B(n, a, r), e, s) : a === "exists" || a === "notExists" ? Y(i, t, e, s) : F(i, n, a, r);
123
123
  }
124
- function Y(i, t, e, n) {
125
- const { field: s, operator: a } = t, r = t.where, o = String(s), c = e?.relationMap?.get(o);
124
+ function Y(i, t, e, s) {
125
+ const { field: n, operator: a, where: r } = t, o = String(n), c = e?.relationMap?.get(o);
126
126
  if (!c)
127
127
  throw new Error(`Relation '${o}' not found in '${e?.name || "unknown"}'`);
128
128
  const d = c.mappedEntity;
129
129
  if (!r?.rules?.length)
130
130
  return a === "exists" ? i.not(d, "is", null) : i.is(d, null);
131
- const f = e ? M(c, n, e) : void 0;
131
+ const f = e ? M(c, s, e) : void 0;
132
132
  if (!f) throw new Error(`Cannot resolve metadata for '${o}'`);
133
- return R(i, d, r, f, n, d);
133
+ return R(i, d, r, f, s, d);
134
134
  }
135
- function R(i, t, e, n, s, a = "") {
135
+ function R(i, t, e, s, n, a = "") {
136
136
  if (!e?.rules?.length) return i;
137
137
  let r = i;
138
138
  for (const o of e.rules) {
139
139
  if (A(o)) {
140
- r = R(r, t, o, n, s, a);
140
+ r = R(r, t, o, s, n, a);
141
141
  continue;
142
142
  }
143
- const { field: c, operator: d, value: f } = o;
143
+ const { field: c, operator: d, value: f, where: u } = o;
144
144
  if (d === "exists" || d === "notExists") {
145
- const p = n?.relationMap?.get(String(c));
146
- if (!p) throw new Error(`Relation '${c}' not found in ${t}`);
147
- const h = p.mappedEntity, l = o.where, m = M(p, s, n);
148
- if (l?.rules?.length) {
149
- const w = a ? `${a}.${h}` : h;
150
- r = R(r, h, l, m, s, w);
145
+ const h = s?.relationMap?.get(String(c));
146
+ if (!h) throw new Error(`Relation '${c}' not found in ${t}`);
147
+ const l = h.mappedEntity, m = u, w = M(h, n, s);
148
+ if (m?.rules?.length) {
149
+ const y = a ? `${a}.${l}` : l;
150
+ r = R(r, l, m, w, n, y);
151
151
  } else
152
- r = d === "exists" ? r.not(h, "is", null) : r.is(h, null);
152
+ r = d === "exists" ? r.not(l, "is", null) : r.is(l, null);
153
153
  continue;
154
154
  }
155
- const u = a ? `${a}.${c}` : `${t}.${c}`;
156
- r = F(r, u, d, f);
155
+ const p = a ? `${a}.${c}` : `${t}.${c}`;
156
+ r = F(r, p, d, f);
157
157
  }
158
158
  return r;
159
159
  }
160
- function F(i, t, e, n) {
161
- const s = C(n);
160
+ function F(i, t, e, s) {
161
+ const n = C(s);
162
162
  if (t.includes(".") && e === "between") {
163
- const [r, o] = s;
163
+ const [r, o] = n;
164
164
  return i.gte(t, r).lte(t, o);
165
165
  }
166
166
  switch (e) {
167
167
  case "=":
168
- return s === null ? i.is(t, null) : i.eq(t, s);
168
+ return n === null ? i.is(t, null) : i.eq(t, n);
169
169
  case "!=":
170
- return s === null ? i.not(t, "is", null) : i.neq(t, s);
170
+ return n === null ? i.not(t, "is", null) : i.neq(t, n);
171
171
  case "<":
172
- return i.lt(t, s);
172
+ return i.lt(t, n);
173
173
  case ">":
174
- return i.gt(t, s);
174
+ return i.gt(t, n);
175
175
  case "<=":
176
- return i.lte(t, s);
176
+ return i.lte(t, n);
177
177
  case ">=":
178
- return i.gte(t, s);
178
+ return i.gte(t, n);
179
179
  case "in":
180
- return i.in(t, s);
180
+ return i.in(t, n);
181
181
  case "notIn":
182
- return i.not(t, "in", `(${s.join(",")})`);
182
+ return i.not(t, "in", `(${n.join(",")})`);
183
183
  case "contains":
184
184
  case "includes":
185
- return i.ilike(t, `%${s}%`);
185
+ return i.ilike(t, `%${n}%`);
186
186
  case "notContains":
187
- return i.not(t, "ilike", `%${s}%`);
187
+ return i.not(t, "ilike", `%${n}%`);
188
188
  case "startsWith":
189
- return i.ilike(t, `${s}%`);
189
+ return i.ilike(t, `${n}%`);
190
190
  case "notStartsWith":
191
- return i.not(t, "ilike", `${s}%`);
191
+ return i.not(t, "ilike", `${n}%`);
192
192
  case "endsWith":
193
- return i.ilike(t, `%${s}`);
193
+ return i.ilike(t, `%${n}`);
194
194
  case "notEndsWith":
195
- return i.not(t, "ilike", `%${s}`);
195
+ return i.not(t, "ilike", `%${n}`);
196
196
  case "between": {
197
- const [r, o] = s;
197
+ const [r, o] = n;
198
198
  return i.gte(t, r).lte(t, o);
199
199
  }
200
200
  case "notBetween": {
201
- const [r, o] = s;
201
+ const [r, o] = n;
202
202
  return i.or(`${t}.lt.${r},${t}.gt.${o}`);
203
203
  }
204
204
  case "null":
@@ -214,15 +214,15 @@ function F(i, t, e, n) {
214
214
  function T(i) {
215
215
  const t = /* @__PURE__ */ new Map();
216
216
  for (const e of i) {
217
- const n = e.constructor;
218
- t.has(n) || t.set(n, /* @__PURE__ */ new Set()), t.get(n).add(e);
217
+ const s = e.constructor;
218
+ t.has(s) || t.set(s, /* @__PURE__ */ new Set()), t.get(s).add(e);
219
219
  }
220
220
  return t;
221
221
  }
222
222
  function v(i, t) {
223
223
  const e = [];
224
- for (const [n, s] of i) {
225
- const a = _(n), r = Array.from(s);
224
+ for (const [s, n] of i) {
225
+ const a = E(s), r = Array.from(n);
226
226
  e.push({
227
227
  table: a.name,
228
228
  schema: a.namespace,
@@ -233,12 +233,12 @@ function v(i, t) {
233
233
  }
234
234
  function Z(i) {
235
235
  const t = [];
236
- for (const [e, n] of i) {
237
- const s = _(e);
236
+ for (const [e, s] of i) {
237
+ const n = E(e);
238
238
  t.push({
239
- table: s.name,
240
- schema: s.namespace,
241
- ids: Array.from(n).map((a) => a.id)
239
+ table: n.name,
240
+ schema: n.namespace,
241
+ ids: Array.from(s).map((a) => a.id)
242
242
  });
243
243
  }
244
244
  return t;
@@ -250,10 +250,10 @@ function j(i, t) {
250
250
  return i instanceof Date ? i : new Date(i);
251
251
  case $.keyValue:
252
252
  if (typeof i == "object" && t.properties) {
253
- const e = {};
253
+ const e = i, s = {};
254
254
  for (const n of t.properties)
255
- i[n.name] !== void 0 && (e[n.name] = j(i[n.name], n));
256
- return e;
255
+ e[n.name] !== void 0 && (s[n.name] = j(e[n.name], n));
256
+ return s;
257
257
  }
258
258
  return i;
259
259
  case $.boolean:
@@ -266,16 +266,16 @@ function j(i, t) {
266
266
  }
267
267
  }
268
268
  function G(i, t, e) {
269
- const n = new i();
270
- for (const s of Object.keys(e)) {
271
- const a = t.propertyMap.get(s);
272
- n[s] = a ? j(e[s], a) : e[s];
269
+ const s = new i();
270
+ for (const n of Object.keys(e)) {
271
+ const a = t.propertyMap.get(n);
272
+ s[n] = a ? j(e[n], a) : e[n];
273
273
  }
274
- return n;
274
+ return s;
275
275
  }
276
276
  class P extends K {
277
277
  constructor(t, e) {
278
- super(t.rxdb, e), this.adapter = t, this.metadata = _(e);
278
+ super(t.rxdb, e), this.adapter = t, this.metadata = E(e);
279
279
  }
280
280
  metadata;
281
281
  /**
@@ -283,24 +283,26 @@ class P extends K {
283
283
  */
284
284
  async find(t) {
285
285
  const e = this.extract_relation_fields(t.where);
286
- let n = "*";
286
+ let s = "*";
287
287
  if (e.size > 0) {
288
288
  const o = Array.from(e);
289
- n = `*, ${o.filter(
289
+ s = `*, ${o.filter(
290
290
  (d) => !o.some((f) => f !== d && f.startsWith(d + "."))
291
291
  ).map((d) => this.build_relation_select(d)).join(", ")}`;
292
292
  }
293
- let s = this.get_client().select(n);
294
- if (s = x(s, t.where, this.metadata, this.adapter.rxdb.schemaManager), t.orderBy?.length)
293
+ let n = this.get_client().select(s);
294
+ if (n = x(n, t.where, this.metadata, this.adapter.rxdb.schemaManager), t.orderBy?.length)
295
295
  for (const o of t.orderBy)
296
- s = s.order(o.field, { ascending: o.sort === "asc" });
296
+ n = n.order(o.field, { ascending: o.sort === "asc" });
297
297
  if (t.offset !== void 0) {
298
298
  const o = t.offset, c = t.limit !== void 0 ? o + t.limit - 1 : Number.MAX_SAFE_INTEGER;
299
- s = s.range(o, c);
300
- } else t.limit !== void 0 && (s = s.limit(t.limit));
301
- const { data: a, error: r } = await s;
299
+ n = n.range(o, c);
300
+ } else t.limit !== void 0 && (n = n.limit(t.limit));
301
+ const { data: a, error: r } = await n;
302
302
  if (r) throw new g(`Failed to find entities: ${r.message}`);
303
- return (a || []).map((o) => G(this.EntityType, this.metadata, o));
303
+ return (a || []).map(
304
+ (o) => G(this.EntityType, this.metadata, o)
305
+ );
304
306
  }
305
307
  /**
306
308
  * 查询实体数量
@@ -308,11 +310,11 @@ class P extends K {
308
310
  async count(t) {
309
311
  if (t.groupBy) throw new Error("groupBy not supported yet");
310
312
  const e = this.extract_relation_fields(t.where);
311
- let n = "*";
312
- e.size > 0 && (n = `*, ${Array.from(e).map((o) => this.build_relation_select(o)).join(", ")}`);
313
- let s = this.get_client().select(n, { count: "exact", head: !0 });
314
- s = x(s, t.where, this.metadata, this.adapter.rxdb.schemaManager);
315
- const { count: a, error: r } = await s;
313
+ let s = "*";
314
+ e.size > 0 && (s = `*, ${Array.from(e).map((o) => this.build_relation_select(o)).join(", ")}`);
315
+ let n = this.get_client().select(s, { count: "exact", head: !0 });
316
+ n = x(n, t.where, this.metadata, this.adapter.rxdb.schemaManager);
317
+ const { count: a, error: r } = await n;
316
318
  if (r) {
317
319
  if (!r.message)
318
320
  return console.warn("Supabase count returned empty error, returning 0. Options:", JSON.stringify(t)), 0;
@@ -324,19 +326,19 @@ class P extends K {
324
326
  * 创建实体
325
327
  */
326
328
  async create(t) {
327
- const e = { ...t }, n = this.rxdb.context.userId;
328
- n && (e.createdBy = n);
329
- const { data: s, error: a } = await this.get_client().insert(e).select().single();
329
+ const e = { ...t }, s = this.rxdb.context.userId;
330
+ s && (e.createdBy = s);
331
+ const { data: n, error: a } = await this.get_client().insert(e).select().single();
330
332
  if (a) throw new g(`Failed to create entity: ${a.message}`);
331
- return s;
333
+ return n;
332
334
  }
333
335
  /**
334
336
  * 更新实体
335
337
  */
336
338
  async update(t, e) {
337
- const { data: n, error: s } = await this.get_client().update(e).eq("id", t.id).select().single();
338
- if (s) throw new g(`Failed to update entity: ${s.message}`);
339
- return n;
339
+ const { data: s, error: n } = await this.get_client().update(e).eq("id", t.id).select().single();
340
+ if (n) throw new g(`Failed to update entity: ${n.message}`);
341
+ return s;
340
342
  }
341
343
  /**
342
344
  * 删除实体
@@ -353,11 +355,11 @@ class P extends K {
353
355
  // ============================================
354
356
  /** 提取查询中的关系字段路径(用于 EXISTS 查询的 INNER JOIN) */
355
357
  extract_relation_fields(t) {
356
- const e = /* @__PURE__ */ new Set(), n = (s, a = "") => {
357
- if (s?.rules) {
358
- for (const r of s.rules)
359
- if (r.rules)
360
- n(r, a);
358
+ const e = /* @__PURE__ */ new Set(), s = (n, a = "") => {
359
+ if (n?.rules) {
360
+ for (const r of n.rules)
361
+ if (A(r))
362
+ s(r, a);
361
363
  else if (typeof r.field == "string" && r.field.includes(".")) {
362
364
  const o = r.field.split(".");
363
365
  for (let c = 1; c < o.length; c++) {
@@ -366,11 +368,11 @@ class P extends K {
366
368
  }
367
369
  } else if (r.operator === "exists" || r.operator === "notExists") {
368
370
  const o = String(r.field), c = a ? `${a}.${o}` : o;
369
- this.metadata.relationMap?.has(o) && e.add(c), r.where && n(r.where, c);
371
+ this.metadata.relationMap?.has(o) && e.add(c), "where" in r && r.where && s(r.where, c);
370
372
  }
371
373
  }
372
374
  };
373
- return n(t), e;
375
+ return s(t), e;
374
376
  }
375
377
  /**
376
378
  * 构建关系字段的 SELECT 语法
@@ -379,18 +381,18 @@ class P extends K {
379
381
  build_relation_select(t) {
380
382
  const e = t.split(".");
381
383
  if (e.length === 1) return this.build_single_relation_select(e[0]);
382
- const n = [];
383
- let s = this.metadata;
384
+ const s = [];
385
+ let n = this.metadata;
384
386
  for (const r of e) {
385
- const o = s.relationMap?.get(r);
387
+ const o = n.relationMap?.get(r);
386
388
  if (!o) return `${r}(id)`;
387
- n.push({ tableName: o.mappedEntity, kind: o.kind, sourceEntity: s.name });
389
+ s.push({ tableName: o.mappedEntity, kind: o.kind, sourceEntity: n.name });
388
390
  const c = this.adapter.rxdb.schemaManager.getEntityMetadata(o.mappedEntity, o.mappedNamespace ?? "");
389
- c && (s = c);
391
+ c && (n = c);
390
392
  }
391
- let a = this.build_relation_segment(n[n.length - 1], !0);
392
- for (let r = n.length - 2; r >= 0; r--)
393
- a = this.build_relation_segment(n[r], !0).replace("(*)", `(*, ${a})`);
393
+ let a = this.build_relation_segment(s[s.length - 1], !0);
394
+ for (let r = s.length - 2; r >= 0; r--)
395
+ a = this.build_relation_segment(s[r], !0).replace("(*)", `(*, ${a})`);
394
396
  return a;
395
397
  }
396
398
  /**
@@ -400,25 +402,25 @@ class P extends K {
400
402
  build_single_relation_select(t) {
401
403
  const e = this.metadata.relationMap?.get(t);
402
404
  if (!e) return `${t}(id)`;
403
- const n = e.mappedEntity, s = this.metadata.name;
405
+ const s = e.mappedEntity, n = this.metadata.name;
404
406
  if (e.kind === "m:1" || e.kind === "1:1") {
405
- const a = `${s}_${t}Id_fkey`;
406
- return `${n}!${a}(*)`;
407
+ const a = `${n}_${t}Id_fkey`;
408
+ return `${s}!${a}(*)`;
407
409
  }
408
410
  if (e.kind === "m:n") {
409
- const a = this.get_join_table_name(s, n);
410
- return `${n}!${a}(*)`;
411
+ const a = this.get_join_table_name(n, s);
412
+ return `${s}!${a}(*)`;
411
413
  }
412
- return `${n}(*)`;
414
+ return `${s}(*)`;
413
415
  }
414
416
  /** 构建关系 SELECT 片段 */
415
417
  build_relation_segment(t, e) {
416
- const n = e ? "!inner" : "";
418
+ const s = e ? "!inner" : "";
417
419
  if (t.kind === "m:n") {
418
- const s = this.get_join_table_name(t.sourceEntity, t.tableName);
419
- return `${t.tableName}!${s}${n}(*)`;
420
+ const n = this.get_join_table_name(t.sourceEntity, t.tableName);
421
+ return `${t.tableName}!${n}${s}(*)`;
420
422
  }
421
- return `${t.tableName}${n}(*)`;
423
+ return `${t.tableName}${s}(*)`;
422
424
  }
423
425
  /** 获取 m:n 中间表名(按字母顺序) */
424
426
  get_join_table_name(t, e) {
@@ -441,16 +443,16 @@ class q extends P {
441
443
  * - 不指定 entityId 时:返回所有根节点及其子孙
442
444
  */
443
445
  async findDescendants(t) {
444
- const { entityId: e, level: n = 100 } = t, { data: s, error: a } = await this.adapter.client.rpc(
446
+ const { entityId: e, level: s = 100 } = t, { data: n, error: a } = await this.adapter.client.rpc(
445
447
  e ? "get_descendants" : "get_root_descendants",
446
- e ? { root_id: e, max_level: n } : { max_level: n }
448
+ e ? { root_id: e, max_level: s } : { max_level: s }
447
449
  );
448
450
  if (a) {
449
451
  if (a.message.includes("function") || a.message.includes("Could not find"))
450
452
  return this.findDescendantsFallback(t);
451
453
  throw new g(`Failed to find descendants: ${a.message}`);
452
454
  }
453
- return (s || []).map((r) => this.transformRowToEntity(r));
455
+ return (n || []).map((r) => this.transformRowToEntity(r));
454
456
  }
455
457
  /**
456
458
  * 查询子孙节点数量
@@ -460,8 +462,8 @@ class q extends P {
460
462
  * - 不指定 entityId 时:统计所有根节点及其后代的总数
461
463
  */
462
464
  async countDescendants(t) {
463
- const { entityId: e } = t, n = await this.findDescendants(t);
464
- return e ? n.length - 1 : n.length;
465
+ const { entityId: e } = t, s = await this.findDescendants(t);
466
+ return e ? s.length - 1 : s.length;
465
467
  }
466
468
  /**
467
469
  * 查询祖先节点
@@ -470,19 +472,19 @@ class q extends P {
470
472
  * 指定 entityId 时:包含当前节点 + 祖先节点
471
473
  */
472
474
  async findAncestors(t) {
473
- const { entityId: e, level: n = 100 } = t;
475
+ const { entityId: e, level: s = 100 } = t;
474
476
  if (!e)
475
477
  return [];
476
- const { data: s, error: a } = await this.adapter.client.rpc("get_ancestors", {
478
+ const { data: n, error: a } = await this.adapter.client.rpc("get_ancestors", {
477
479
  node_id: e,
478
- max_level: n
480
+ max_level: s
479
481
  });
480
482
  if (a) {
481
483
  if (a.message.includes("function") || a.message.includes("Could not find"))
482
484
  return this.findAncestorsFallback(t);
483
485
  throw new g(`Failed to find ancestors: ${a.message}`);
484
486
  }
485
- return (s || []).map((r) => this.transformRowToEntity(r));
487
+ return (n || []).map((r) => this.transformRowToEntity(r));
486
488
  }
487
489
  /**
488
490
  * 查询祖先节点数量
@@ -500,7 +502,7 @@ class q extends P {
500
502
  * 一次查询获取所有节点,在内存中构建树结构,避免 N+1 问题。
501
503
  */
502
504
  async findDescendantsFallback(t) {
503
- const { entityId: e, level: n = 100 } = t, s = this.metadata.name, a = this.metadata.features?.tree?.hasChildren, { data: r, error: o } = await this.adapter.client.schema("public").from(s).select("*");
505
+ const { entityId: e, level: s = 100 } = t, n = this.metadata.name, a = this.metadata.features?.tree?.hasChildren, { data: r, error: o } = await this.adapter.client.schema("public").from(n).select("*");
504
506
  if (o)
505
507
  throw new g(`Failed to find descendants: ${o.message}`);
506
508
  if (!r || r.length === 0) return [];
@@ -519,18 +521,18 @@ class q extends P {
519
521
  p = c.get(null) ?? [];
520
522
  const h = p.map((l) => ({ node: l, depth: 0 }));
521
523
  for (; h.length > 0; ) {
522
- const { node: l, depth: m } = h.shift();
523
- if (u.has(l.id) || m > n) continue;
524
- u.add(l.id);
525
- const w = this.transformRowToEntity(l);
524
+ const { node: l, depth: m } = h.shift(), w = l.id;
525
+ if (u.has(w) || m > s) continue;
526
+ u.add(w);
527
+ const y = this.transformRowToEntity(l);
526
528
  if (a) {
527
- const y = c.get(l.id);
528
- w.hasChildren = !!y && y.length > 0;
529
+ const b = c.get(w);
530
+ y.hasChildren = !!b && b.length > 0;
529
531
  }
530
- if (f.push(w), m < n) {
531
- const y = c.get(l.id) ?? [];
532
- for (const b of y)
533
- h.push({ node: b, depth: m + 1 });
532
+ if (f.push(y), m < s) {
533
+ const b = c.get(w) ?? [];
534
+ for (const _ of b)
535
+ h.push({ node: _, depth: m + 1 });
534
536
  }
535
537
  }
536
538
  return f;
@@ -541,10 +543,10 @@ class q extends P {
541
543
  * 一次查询获取所有节点,在内存中向上遍历,避免 N+1 问题。
542
544
  */
543
545
  async findAncestorsFallback(t) {
544
- const { entityId: e, level: n = 100 } = t;
546
+ const { entityId: e, level: s = 100 } = t;
545
547
  if (!e)
546
548
  return [];
547
- const s = this.metadata.name, a = this.metadata.features?.tree?.hasChildren, { data: r, error: o } = await this.adapter.client.schema("public").from(s).select("*");
549
+ const n = this.metadata.name, a = this.metadata.features?.tree?.hasChildren, { data: r, error: o } = await this.adapter.client.schema("public").from(n).select("*");
548
550
  if (o)
549
551
  throw new g(`Failed to find ancestors: ${o.message}`);
550
552
  if (!r || r.length === 0) return [];
@@ -556,7 +558,7 @@ class q extends P {
556
558
  }
557
559
  const f = [];
558
560
  let u = e, p = 0;
559
- for (; u && p <= n; ) {
561
+ for (; u && p <= s; ) {
560
562
  const h = c.get(u);
561
563
  if (!h) break;
562
564
  const l = this.transformRowToEntity(h);
@@ -573,8 +575,8 @@ class q extends P {
573
575
  */
574
576
  transformRowToEntity(t) {
575
577
  const e = new this.EntityType();
576
- return Object.keys(t).forEach((n) => {
577
- n !== "level" && (e[n] = t[n]);
578
+ return Object.keys(t).forEach((s) => {
579
+ s !== "level" && (e[s] = t[s]);
578
580
  }), e;
579
581
  }
580
582
  }
@@ -629,9 +631,9 @@ class it extends z {
629
631
  * 在单个数据库事务中执行所有操作,确保原子性。
630
632
  */
631
633
  async mutations(t) {
632
- const e = this.rxdb.context.userId, n = [...v(t.create, e), ...v(t.update, e)], s = Z(t.remove), { data: a, error: r } = await this.#t.rpc("rxdb_mutations", {
633
- p_upserts: n,
634
- p_deletes: s
634
+ const e = this.rxdb.context.userId, s = [...v(t.create, e), ...v(t.update, e)], n = Z(t.remove), { data: a, error: r } = await this.#t.rpc("rxdb_mutations", {
635
+ p_upserts: s,
636
+ p_deletes: n
635
637
  });
636
638
  if (r)
637
639
  throw new g(`Transaction failed: ${r.message}`);
@@ -646,18 +648,18 @@ class it extends z {
646
648
  getRepository(t) {
647
649
  if (this.repository_cache.has(t))
648
650
  return this.repository_cache.get(t);
649
- const n = _(t).features?.tree ? new q(this, t) : new P(this, t);
650
- return this.repository_cache.set(t, n), n;
651
+ const s = E(t).features?.tree ? new q(this, t) : new P(this, t);
652
+ return this.repository_cache.set(t, s), s;
651
653
  }
652
654
  // ============================================
653
655
  // 工具方法
654
656
  // ============================================
655
657
  async isTableExisted(t) {
656
- const e = _(t), s = await this.getSchemaClient(e.namespace).from(e.name).select("*", { count: "exact", head: !0 });
657
- if (s.status === 200) return !0;
658
- if (s.status === 204) return !1;
658
+ const e = E(t), n = await this.getSchemaClient(e.namespace).from(e.name).select("*", { count: "exact", head: !0 });
659
+ if (n.status === 200) return !0;
660
+ if (n.status === 204) return !1;
659
661
  throw new g(
660
- `Failed to check table existence: ${s.error?.message || `status ${s.status}`}`
662
+ `Failed to check table existence: ${n.error?.message || `status ${n.status}`}`
661
663
  );
662
664
  }
663
665
  // ============================================
@@ -678,16 +680,16 @@ class it extends z {
678
680
  * 当提供 filter 参数时,会通过 JOIN 实体表并应用过滤条件,
679
681
  * 只返回满足条件的实体对应的变更记录。
680
682
  */
681
- async pullChanges(t, e = 1e3, n, s) {
683
+ async pullChanges(t, e = 1e3, s, n) {
682
684
  const a = [];
683
685
  let r;
684
- if (s && n?.length === 1) {
685
- const u = n[0];
686
- if (r = await this.#n(u, s), r.length === 0)
686
+ if (n && s?.length === 1) {
687
+ const u = s[0];
688
+ if (r = await this.#n(u, n), r.length === 0)
687
689
  return [];
688
690
  }
689
691
  let o = this.#t.from("RxDBChange").select("*").gt("id", t).order("id", { ascending: !0 }).limit(e);
690
- n && n.length > 0 && (o = o.in("entity", n)), r && (o = o.in("entityId", r));
692
+ s && s.length > 0 && (o = o.in("entity", s)), r && (o = o.in("entityId", r));
691
693
  const { data: c, error: d } = await o;
692
694
  if (d)
693
695
  throw new g(`Failed to pull changes: ${d.message}`);
@@ -716,13 +718,13 @@ class it extends z {
716
718
  * ```
717
719
  */
718
720
  async getChangeCount(t, e) {
719
- let n = this.#t.from("RxDBChange").select("*", { count: "exact", head: !0 }).gt("id", t);
720
- e && e.length > 0 && (n = n.in("entity", e));
721
- const { count: s, error: a } = await n;
721
+ let s = this.#t.from("RxDBChange").select("*", { count: "exact", head: !0 }).gt("id", t);
722
+ e && e.length > 0 && (s = s.in("entity", e));
723
+ const { count: n, error: a } = await s;
722
724
  if (a)
723
725
  throw new g(`Failed to get change count: ${a.message}`);
724
726
  let r = t;
725
- if (s && s > 0) {
727
+ if (n && n > 0) {
726
728
  let o = this.#t.from("RxDBChange").select("id").gt("id", t).order("id", { ascending: !1 }).limit(1);
727
729
  e && e.length > 0 && (o = o.in("entity", e));
728
730
  const { data: c, error: d } = await o;
@@ -731,7 +733,7 @@ class it extends z {
731
733
  c && c.length > 0 && (r = c[0].id);
732
734
  }
733
735
  return {
734
- count: s ?? 0,
736
+ count: n ?? 0,
735
737
  latestChangeId: r
736
738
  };
737
739
  }
@@ -749,18 +751,18 @@ class it extends z {
749
751
  updates: /* @__PURE__ */ new Map(),
750
752
  deletes: /* @__PURE__ */ new Map()
751
753
  };
752
- for (const n of t) {
753
- const { entityKey: s, finalType: a, finalPatch: r, inversePatch: o } = n;
754
+ for (const s of t) {
755
+ const { entityKey: n, finalType: a, finalPatch: r, inversePatch: o } = s;
754
756
  if (a)
755
757
  switch (a) {
756
758
  case "INSERT":
757
- e.inserts.set(s, { patch: r, inversePatch: o });
759
+ e.inserts.set(n, { patch: r, inversePatch: o });
758
760
  break;
759
761
  case "UPDATE":
760
- e.updates.set(s, { patch: r, inversePatch: o });
762
+ e.updates.set(n, { patch: r, inversePatch: o });
761
763
  break;
762
764
  case "DELETE":
763
- e.deletes.set(s, { patch: null, inversePatch: o });
765
+ e.deletes.set(n, { patch: null, inversePatch: o });
764
766
  break;
765
767
  }
766
768
  }
@@ -777,10 +779,10 @@ class it extends z {
777
779
  * @param actions - 压缩后的变更操作集合
778
780
  */
779
781
  async mergeChanges(t) {
780
- const e = (/* @__PURE__ */ new Date()).toISOString(), n = this.rxdb.context.userId, s = [], a = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
782
+ const e = (/* @__PURE__ */ new Date()).toISOString(), s = this.rxdb.context.userId, n = [], a = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
781
783
  for (const [u, { inversePatch: p }] of t.deletes) {
782
784
  const [h, l, m] = u.split(":"), w = h ? `${h}.${l}` : l;
783
- s.push({
785
+ n.push({
784
786
  namespace: h || "public",
785
787
  entity: l,
786
788
  entityId: m,
@@ -796,7 +798,7 @@ class it extends z {
796
798
  }
797
799
  for (const [u, { patch: p, inversePatch: h }] of t.updates) {
798
800
  const [l, m, w] = u.split(":"), y = l ? `${l}.${m}` : m;
799
- s.push({
801
+ n.push({
800
802
  namespace: l || "public",
801
803
  entity: m,
802
804
  entityId: w,
@@ -807,12 +809,12 @@ class it extends z {
807
809
  createdAt: e,
808
810
  updatedAt: e
809
811
  });
810
- const b = a.get(y) ?? [], E = { id: w, ...p };
811
- n && (E.updatedBy = n), b.push(E), a.set(y, b);
812
+ const b = a.get(y) ?? [], _ = { id: w, ...p };
813
+ s && (_.updatedBy = s), b.push(_), a.set(y, b);
812
814
  }
813
815
  for (const [u, { patch: p, inversePatch: h }] of t.inserts) {
814
816
  const [l, m, w] = u.split(":"), y = l ? `${l}.${m}` : m;
815
- s.push({
817
+ n.push({
816
818
  namespace: l || "public",
817
819
  entity: m,
818
820
  entityId: w,
@@ -823,8 +825,8 @@ class it extends z {
823
825
  createdAt: e,
824
826
  updatedAt: e
825
827
  });
826
- const b = a.get(y) ?? [], E = { id: w, ...p };
827
- n && (E.createdBy = n, E.updatedBy = n), b.push(E), a.set(y, b);
828
+ const b = a.get(y) ?? [], _ = { id: w, ...p };
829
+ s && (_.createdBy = s, _.updatedBy = s), b.push(_), a.set(y, b);
828
830
  }
829
831
  const o = Array.from(a.entries()).map(([u, p]) => {
830
832
  const [h, l] = u.includes(".") ? u.split(".") : ["public", u];
@@ -835,7 +837,7 @@ class it extends z {
835
837
  }), { data: d, error: f } = await this.#t.rpc("rxdb_mutations", {
836
838
  p_upserts: o,
837
839
  p_deletes: c,
838
- p_changes: s,
840
+ p_changes: n,
839
841
  p_skip_sync: !0
840
842
  });
841
843
  if (f)
@@ -862,12 +864,12 @@ class it extends z {
862
864
  */
863
865
  fetchMetadata(t, e) {
864
866
  return D(() => {
865
- let n = this.#t.from(t).select("id, updatedAt");
866
- return n = x(n, e), N(n).pipe(
867
- k(({ data: s, error: a }) => {
867
+ let s = this.#t.from(t).select("id, updatedAt");
868
+ return s = x(s, e), N(s).pipe(
869
+ k(({ data: n, error: a }) => {
868
870
  if (a)
869
871
  throw new g(`Failed to fetch metadata: ${a.message}`);
870
- return (s ?? []).map((r) => ({
872
+ return (n ?? []).map((r) => ({
871
873
  id: r.id,
872
874
  updatedAt: r.updatedAt
873
875
  }));
@@ -884,10 +886,10 @@ class it extends z {
884
886
  */
885
887
  findByIds(t, e) {
886
888
  return D(() => e.length === 0 ? Q([]) : N(this.#t.from(t).select("*").in("id", e)).pipe(
887
- k(({ data: n, error: s }) => {
888
- if (s)
889
- throw new g(`Failed to find by ids: ${s.message}`);
890
- return n ?? [];
889
+ k(({ data: s, error: n }) => {
890
+ if (n)
891
+ throw new g(`Failed to find by ids: ${n.message}`);
892
+ return s ?? [];
891
893
  })
892
894
  ));
893
895
  }
@@ -900,9 +902,9 @@ class it extends z {
900
902
  }
901
903
  /** 执行 upsert(非事务) */
902
904
  async executeUpsert(t) {
903
- const e = [], n = this.rxdb.context.userId;
904
- for (const [s, a] of t) {
905
- const r = _(s), o = this.getSchemaClient(r.namespace), c = Array.from(a), d = n ? c.map((p) => ({ ...p, createdBy: n, updatedBy: n })) : c, { data: f, error: u } = await o.from(r.name).upsert(d).select();
905
+ const e = [], s = this.rxdb.context.userId;
906
+ for (const [n, a] of t) {
907
+ const r = E(n), o = this.getSchemaClient(r.namespace), c = Array.from(a), d = s ? c.map((p) => ({ ...p, createdBy: s, updatedBy: s })) : c, { data: f, error: u } = await o.from(r.name).upsert(d).select();
906
908
  if (u)
907
909
  throw new g(`Failed to upsert: ${u.message}`);
908
910
  e.push(...f);
@@ -912,8 +914,8 @@ class it extends z {
912
914
  /** 执行 delete(非事务) */
913
915
  async executeDelete(t) {
914
916
  const e = [];
915
- for (const [n, s] of t) {
916
- const a = _(n), r = this.getSchemaClient(a.namespace), o = Array.from(s), c = o.map((f) => f.id), { error: d } = await r.from(a.name).delete().in("id", c);
917
+ for (const [s, n] of t) {
918
+ const a = E(s), r = this.getSchemaClient(a.namespace), o = Array.from(n), c = o.map((f) => f.id), { error: d } = await r.from(a.name).delete().in("id", c);
917
919
  if (d)
918
920
  throw new g(`Failed to delete: ${d.message}`);
919
921
  e.push(...o);
@@ -928,12 +930,12 @@ class it extends z {
928
930
  * @returns 满足条件的 entityId 列表
929
931
  */
930
932
  async #n(t, e) {
931
- let n = this.#t.from(t).select("id");
932
- n = x(n, e);
933
- const { data: s, error: a } = await n;
933
+ let s = this.#t.from(t).select("id");
934
+ s = x(s, e);
935
+ const { data: n, error: a } = await s;
934
936
  if (a)
935
937
  throw new g(`Failed to query filtered entities: ${a.message}`);
936
- return (s ?? []).map((r) => r.id);
938
+ return (n ?? []).map((r) => r.id);
937
939
  }
938
940
  }
939
941
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"rule_group_builder.d.ts","sourceRoot":"","sources":["../src/rule_group_builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAEL,aAAa,EACb,KAAK,cAAc,EAGnB,KAAK,SAAS,EACf,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAMrE;;GAEG;AACH,KAAK,oBAAoB,GAAG,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AA4FtF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,KAAK,EAAE,oBAAoB,EAC3B,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,EACvB,QAAQ,CAAC,EAAE,cAAc,EACzB,aAAa,CAAC,EAAE,aAAa,GAC5B,oBAAoB,CA6BtB"}
1
+ {"version":3,"file":"rule_group_builder.d.ts","sourceRoot":"","sources":["../src/rule_group_builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAEL,aAAa,EACb,KAAK,cAAc,EAGnB,KAAK,SAAS,EACf,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAMrE;;GAEG;AACH,KAAK,oBAAoB,GAAG,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAoGtF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,KAAK,EAAE,oBAAoB,EAC3B,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,EACvB,QAAQ,CAAC,EAAE,cAAc,EACzB,aAAa,CAAC,EAAE,aAAa,GAC5B,oBAAoB,CA6BtB"}
@@ -2,5 +2,5 @@ import { EntityMetadata, EntityType } from '../packages/rxdb/src/index.ts';
2
2
  /**
3
3
  * 将 Supabase 行数据转换为实体实例
4
4
  */
5
- export declare function transform_row_to_entity<T extends EntityType>(EntityType: T, metadata: EntityMetadata, row: Record<string, any>): InstanceType<T>;
5
+ export declare function transform_row_to_entity<T extends EntityType>(EntityType: T, metadata: EntityMetadata, row: Record<string, unknown>): InstanceType<T>;
6
6
  //# sourceMappingURL=transform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAA0B,UAAU,EAAE,MAAM,YAAY,CAAC;AAqCrF;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,UAAU,EAC1D,UAAU,EAAE,CAAC,EACb,QAAQ,EAAE,cAAc,EACxB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACvB,YAAY,CAAC,CAAC,CAAC,CASjB"}
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAA0B,UAAU,EAA4B,MAAM,YAAY,CAAC;AAsC/G;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,UAAU,EAC1D,UAAU,EAAE,CAAC,EACb,QAAQ,EAAE,cAAc,EACxB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,YAAY,CAAC,CAAC,CAAC,CASjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiao/rxdb-adapter-supabase",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -31,11 +31,11 @@
31
31
  "@supabase/postgrest-js": "^2.89.0",
32
32
  "@supabase/supabase-js": "^2.88.0",
33
33
  "rxjs": "^7.8.2",
34
- "@aiao/rxdb": "0.0.13"
34
+ "@aiao/rxdb": "0.0.14"
35
35
  },
36
36
  "devDependencies": {
37
37
  "dotenv": "^17.3.1",
38
- "@aiao/rxdb-test": "0.0.13",
39
- "@aiao/rxdb-adapter-sqlite": "0.0.13"
38
+ "@aiao/rxdb-adapter-sqlite": "0.0.14",
39
+ "@aiao/rxdb-test": "0.0.14"
40
40
  }
41
41
  }