@freehour/supabase-core 1.7.0 → 1.7.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/errors.d.ts CHANGED
@@ -38,6 +38,30 @@ export declare class FileNotFoundError extends TracedError {
38
38
  readonly path?: string;
39
39
  constructor(message: string, { fileId, bucket, path, }?: FileNotFoundErrorOptions);
40
40
  }
41
+ export interface FileNotSupportedErrorOptions extends ErrorOptions {
42
+ /**
43
+ * The name of the file that caused the error.
44
+ */
45
+ fileName?: string;
46
+ /**
47
+ * The type of the file that is not supported.
48
+ */
49
+ fileType?: string;
50
+ }
51
+ /**
52
+ * An error that indicates that a file is not supported, e.g. due to its MIME type or extension.
53
+ */
54
+ export declare class FileNotSupportedError extends Error {
55
+ /**
56
+ * The name of the file that caused the error.
57
+ */
58
+ readonly fileName?: string;
59
+ /**
60
+ * The type of the file that is not supported.
61
+ */
62
+ readonly fileType?: string;
63
+ constructor(message: string, { fileName, fileType, ...options }?: FileNotSupportedErrorOptions);
64
+ }
41
65
  export interface ParseErrorOptions extends ErrorOptions {
42
66
  /**
43
67
  * The encountered expression that could not be parsed.
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../lib/errors.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD;;GAEG;AACH,qBAAa,WAAY,SAAQ,KAAK;gBACtB,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB;CAK3D;AAGD,MAAM,WAAW,wBAAwB;IAErC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAC9C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C;AAEP,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,uBAAuB,CAAC;AAExE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E"}
package/dist/index.js CHANGED
@@ -14,54 +14,60 @@ var i = class extends Error {
14
14
  constructor(e, { fileId: t, bucket: n, path: r } = {}) {
15
15
  super(e), this.fileId = t, this.bucket = n, this.path = r;
16
16
  }
17
- }, o = class extends i {
17
+ }, o = class extends Error {
18
+ fileName;
19
+ fileType;
20
+ constructor(e, { fileName: t, fileType: n, ...r } = {}) {
21
+ super(e, r), this.fileName = t, this.fileType = n;
22
+ }
23
+ }, s = class extends i {
18
24
  expression;
19
25
  format;
20
26
  constructor(e, { expression: t, format: n, ...r } = {}) {
21
27
  super(e, r), this.expression = t, this.format = n;
22
28
  }
23
- }, s = class extends i {
29
+ }, c = class extends i {
24
30
  schema;
25
31
  relation;
26
32
  id;
27
33
  constructor(e, { schema: t, relation: n, id: r } = {}) {
28
34
  super(e), this.schema = t, this.relation = n, this.id = r;
29
35
  }
30
- }, c = t.object({
36
+ }, l = t.object({
31
37
  code: t.string(),
32
38
  details: t.string().nullable(),
33
39
  hint: t.string().nullable(),
34
40
  name: t.string().optional(),
35
41
  message: t.string().optional()
36
42
  });
37
- function l(e) {
38
- return e instanceof n || c.safeParse(e).success;
43
+ function u(e) {
44
+ return e instanceof n || l.safeParse(e).success;
39
45
  }
40
46
  //#endregion
41
47
  //#region lib/utils.ts
42
- function u(e, t = "/") {
48
+ function d(e, t = "/") {
43
49
  let n = e.lastIndexOf(t);
44
50
  return n === -1 ? ["", e] : [e.substring(0, n), e.substring(n + 1)];
45
51
  }
46
- function d(e) {
52
+ function f(e) {
47
53
  return Array.isArray(e) ? e : [e];
48
54
  }
49
- function f(e, t) {
55
+ function p(e, t) {
50
56
  return e.reduce((e, n) => {
51
57
  let r = t(n);
52
58
  return (e[r] ??= []).push(n), e;
53
59
  }, {});
54
60
  }
55
- function p(e, t) {
61
+ function m(e, t) {
56
62
  let n = e.findIndex(t);
57
63
  return n !== -1 && e.splice(n, 1), e;
58
64
  }
59
- function m(e) {
65
+ function h(e) {
60
66
  return Object.entries(e);
61
67
  }
62
68
  //#endregion
63
69
  //#region lib/data-service.ts
64
- var h = class {
70
+ var g = class {
65
71
  database;
66
72
  schema;
67
73
  relation;
@@ -69,7 +75,7 @@ var h = class {
69
75
  this.database = e, this.schema = t, this.relation = n;
70
76
  }
71
77
  recordNotFoundError(e) {
72
- return new s(`Record with id ${e} not found in ${this.schema}.${this.relation}`, {
78
+ return new c(`Record with id ${e} not found in ${this.schema}.${this.relation}`, {
73
79
  schema: this.schema,
74
80
  relation: this.relation,
75
81
  id: e
@@ -117,7 +123,7 @@ var h = class {
117
123
  }
118
124
  async upsert(e, { onConflict: t, ...n } = {}) {
119
125
  let { data: r } = await this.query.upsert(e, {
120
- onConflict: t === void 0 ? void 0 : d(t).join(","),
126
+ onConflict: t === void 0 ? void 0 : f(t).join(","),
121
127
  ...n
122
128
  }).select().single().throwOnError();
123
129
  return r;
@@ -126,7 +132,7 @@ var h = class {
126
132
  let { data: n } = await this.query.update(t).eq("id", e).select().single().throwOnError();
127
133
  return n;
128
134
  }
129
- }, g = class extends h {
135
+ }, _ = class extends g {
130
136
  constructor({ database: e, schema: t, table: n }) {
131
137
  super({
132
138
  database: e,
@@ -134,7 +140,7 @@ var h = class {
134
140
  relation: n
135
141
  });
136
142
  }
137
- }, _ = class extends h {
143
+ }, v = class extends g {
138
144
  constructor({ database: e, schema: t, view: n }) {
139
145
  super({
140
146
  database: e,
@@ -143,13 +149,13 @@ var h = class {
143
149
  });
144
150
  }
145
151
  };
146
- function v(t) {
152
+ function y(t) {
147
153
  if (t.error) throw t.error;
148
154
  return e(t.count !== null, "Response does not contain a count. Make sure to set the `count` option in the request."), t;
149
155
  }
150
156
  //#endregion
151
157
  //#region lib/filter.ts
152
- var y = [
158
+ var b = [
153
159
  "eq",
154
160
  "neq",
155
161
  "gt",
@@ -175,17 +181,17 @@ var y = [
175
181
  "nxr",
176
182
  "nxl",
177
183
  "adj"
178
- ], b = ["and", "or"], x = ",", S = "~", C = (e) => (n = {}) => {
184
+ ], x = ["and", "or"], S = ",", C = "~", w = (e) => (n = {}) => {
179
185
  let r = (e) => n[e] ?? e, i = Object.keys(e.shape);
180
186
  return t.string().transform((e, t) => {
181
187
  try {
182
- return k(e, i, r);
188
+ return A(e, i, r);
183
189
  } catch (n) {
184
190
  return t.addIssue({
185
191
  code: "custom",
186
192
  input: e,
187
193
  message: n instanceof Error ? n.message : void 0,
188
- params: n instanceof o ? {
194
+ params: n instanceof s ? {
189
195
  expression: n.expression,
190
196
  format: n.format
191
197
  } : void 0
@@ -193,26 +199,26 @@ var y = [
193
199
  }
194
200
  });
195
201
  };
196
- function w(e) {
202
+ function T(e) {
197
203
  return e.startsWith("not.") ? e.slice(4) : `not.${e}`;
198
204
  }
199
- function T(e) {
205
+ function E(e) {
200
206
  return {
201
207
  ...e,
202
- op: w(e.op)
208
+ op: T(e.op)
203
209
  };
204
210
  }
205
- function E(e, t = (e) => e) {
211
+ function D(e, t = (e) => e) {
206
212
  if (e.type === "logical") {
207
- let n = e.args.map((e) => E(e, t));
213
+ let n = e.args.map((e) => D(e, t));
208
214
  return `${e.op}(${n})`;
209
215
  }
210
216
  return `${t(e.key)}.${e.op}.${e.value}`;
211
217
  }
212
- function D(e, t = (e) => e, n = "~") {
213
- return e.map((e) => E(e, t)).join(n);
218
+ function O(e, t = (e) => e, n = "~") {
219
+ return e.map((e) => D(e, t)).join(n);
214
220
  }
215
- function O(t, n = [], r = (e) => e) {
221
+ function k(t, n = [], r = (e) => e) {
216
222
  function i(e) {
217
223
  let t = [], n = 0, r = "", i = !1;
218
224
  for (let a of e) a === "\"" ? (i = !i, r += a) : a === "(" && !i ? (n++, r += a) : a === ")" && !i ? (n--, r += a) : a === "," && n === 0 && !i ? (t.push(r.trim()), r = "") : r += a;
@@ -222,34 +228,34 @@ function O(t, n = [], r = (e) => e) {
222
228
  if (t.startsWith("and(")) return {
223
229
  type: "logical",
224
230
  op: "and",
225
- args: i(t.slice(4, -1)).map((e) => O(e, n, r))
231
+ args: i(t.slice(4, -1)).map((e) => k(e, n, r))
226
232
  };
227
233
  if (t.startsWith("or(")) return {
228
234
  type: "logical",
229
235
  op: "or",
230
- args: i(t.slice(3, -1)).map((e) => O(e, n, r))
236
+ args: i(t.slice(3, -1)).map((e) => k(e, n, r))
231
237
  };
232
238
  if (t.startsWith("not.and(")) return {
233
239
  type: "logical",
234
240
  op: "not.and",
235
- args: i(t.slice(8, -1)).map((e) => O(e, n, r))
241
+ args: i(t.slice(8, -1)).map((e) => k(e, n, r))
236
242
  };
237
243
  if (t.startsWith("not.or(")) return {
238
244
  type: "logical",
239
245
  op: "not.or",
240
- args: i(t.slice(7, -1)).map((e) => O(e, n, r))
246
+ args: i(t.slice(7, -1)).map((e) => k(e, n, r))
241
247
  };
242
248
  }
243
- let a = `^(${n.length === 0 ? "[a-zA-Z_][a-zA-Z0-9_]*" : n.join("|")})\\.((?:not\\.)?(?:${y.join("|")}))\\.(.+)$`, s = new RegExp(a).exec(t);
244
- if (!s) throw new o(`Invalid filter expression '${t}'`, {
249
+ let a = `^(${n.length === 0 ? "[a-zA-Z_][a-zA-Z0-9_]*" : n.join("|")})\\.((?:not\\.)?(?:${b.join("|")}))\\.(.+)$`, o = new RegExp(a).exec(t);
250
+ if (!o) throw new s(`Invalid filter expression '${t}'`, {
245
251
  expression: t,
246
252
  format: {
247
253
  syntax: "key.(not.)op.value",
248
254
  keys: n.length === 0 ? "*" : n,
249
- operators: y
255
+ operators: b
250
256
  }
251
257
  });
252
- let [, c, l, u] = s;
258
+ let [, c, l, u] = o;
253
259
  return {
254
260
  type: "condition",
255
261
  key: r(c),
@@ -257,22 +263,22 @@ function O(t, n = [], r = (e) => e) {
257
263
  value: e.defined(u)
258
264
  };
259
265
  }
260
- function k(e, t = [], n = (e) => e, r = "~") {
261
- return e.length === 0 ? [] : e.split(r).map((e) => O(e, t, n));
266
+ function A(e, t = [], n = (e) => e, r = "~") {
267
+ return e.length === 0 ? [] : e.split(r).map((e) => k(e, t, n));
262
268
  }
263
269
  //#endregion
264
270
  //#region lib/postgrest.ts
265
- var A = class t extends r.PostgrestFilterBuilder {
271
+ var j = class t extends r.PostgrestFilterBuilder {
266
272
  pagination;
267
273
  constructor(e) {
268
274
  super(e);
269
275
  }
270
276
  select(e = "*") {
271
- return new t(super.select(d(e).join(",")));
277
+ return new t(super.select(f(e).join(",")));
272
278
  }
273
279
  where(e) {
274
280
  if (e.type === "logical") {
275
- let t = e.args.map((e) => E(e)).join(",");
281
+ let t = e.args.map((e) => D(e)).join(",");
276
282
  this.url.searchParams.append(e.op, `(${t})`);
277
283
  } else this.url.searchParams.append(e.key, `${e.op}.${e.value}`);
278
284
  return this;
@@ -314,75 +320,75 @@ var A = class t extends r.PostgrestFilterBuilder {
314
320
  };
315
321
  });
316
322
  }
317
- }, j = class extends r.PostgrestQueryBuilder {
323
+ }, M = class extends r.PostgrestQueryBuilder {
318
324
  constructor(e) {
319
325
  super(e.url, e);
320
326
  }
321
327
  select(e = "*", t) {
322
- return new A(super.select(d(e).join(","), t));
328
+ return new j(super.select(f(e).join(","), t));
323
329
  }
324
330
  count(e = "exact") {
325
- return new A(this.select("*", {
331
+ return new j(this.select("*", {
326
332
  count: e,
327
333
  head: !0
328
334
  }));
329
335
  }
330
336
  insert(e, t) {
331
- return new A(super.insert(e, t));
337
+ return new j(super.insert(e, t));
332
338
  }
333
339
  upsert(e, { onConflict: t, ...n } = {}) {
334
- return new A(super.upsert(e, {
335
- onConflict: d(t).join(","),
340
+ return new j(super.upsert(e, {
341
+ onConflict: f(t).join(","),
336
342
  ...n
337
343
  }));
338
344
  }
339
345
  update(e, t) {
340
- return new A(super.update(e, t));
346
+ return new j(super.update(e, t));
341
347
  }
342
348
  delete() {
343
- return new A(super.delete());
349
+ return new j(super.delete());
344
350
  }
345
- }, M = class {
351
+ }, N = class {
346
352
  client;
347
353
  constructor(e) {
348
354
  this.client = e;
349
355
  }
350
356
  from(e) {
351
- return new j(this.client.from(e));
357
+ return new M(this.client.from(e));
352
358
  }
353
359
  rpc(e, t, n) {
354
- return new A(this.client.rpc(e, t, n));
360
+ return new j(this.client.rpc(e, t, n));
355
361
  }
356
- }, N = class {
362
+ }, P = class {
357
363
  supabase;
358
364
  constructor({ supabase: e }) {
359
365
  this.supabase = e;
360
366
  }
361
367
  schema(e) {
362
- return new M(this.supabase.schema(e));
368
+ return new N(this.supabase.schema(e));
363
369
  }
364
370
  relation(e, t) {
365
- return new h({
371
+ return new g({
366
372
  database: this,
367
373
  schema: e,
368
374
  relation: t
369
375
  });
370
376
  }
371
377
  table(e, t) {
372
- return new g({
378
+ return new _({
373
379
  database: this,
374
380
  schema: e,
375
381
  table: t
376
382
  });
377
383
  }
378
384
  view(e, t) {
379
- return new _({
385
+ return new v({
380
386
  database: this,
381
387
  schema: e,
382
388
  view: t
383
389
  });
384
390
  }
385
- }, P = class {
391
+ }, F = class {
386
392
  storage;
387
393
  constructor({ storage: e }) {
388
394
  this.storage = e;
@@ -421,15 +427,15 @@ var A = class t extends r.PostgrestFilterBuilder {
421
427
  };
422
428
  //#endregion
423
429
  //#region lib/processing.ts
424
- function F(e) {
430
+ function I(e) {
425
431
  return e.replace(/!\[([^\]]*)\]\([^)]*\)/g, (e, t) => `![${t}]()`);
426
432
  }
427
- function I(e) {
433
+ function L(e) {
428
434
  return e.replace(/\[([^\]]*)\]\([^)]*\)/g, (e, t) => `[${t}]()`);
429
435
  }
430
436
  //#endregion
431
437
  //#region lib/storage-service.ts
432
- var L = class {
438
+ var R = class {
433
439
  client;
434
440
  database;
435
441
  constructor({ client: e, database: t }) {
@@ -508,7 +514,7 @@ var L = class {
508
514
  async downloadFile(e) {
509
515
  let { fileId: t, bucket: n, path: r, properties: i } = await this.getFileInfo(e), { data: a, error: o } = await this.client.from(n).download(r);
510
516
  if (o) throw o;
511
- let [, s] = u(r);
517
+ let [, s] = d(r);
512
518
  return {
513
519
  fileId: t,
514
520
  bucket: n,
@@ -520,7 +526,7 @@ var L = class {
520
526
  let n = t.filter((e) => "fileId" in e).map((e) => e.fileId), r = (await this.files.query.select(["bucket_id", "path_tokens"]).containedBy("id", n).throwOnError()).data.map(({ bucket_id: t, path_tokens: n }) => ({
521
527
  bucket: e.notNull(t, "bucket_id must not be null"),
522
528
  path: e.notNull(n, "path_tokens must not be null").join("/")
523
- })), i = m(f(t.filter((e) => "path" in e).concat(r), (e) => e.bucket)).map(([e, t]) => ({
529
+ })), i = h(p(t.filter((e) => "path" in e).concat(r), (e) => e.bucket)).map(([e, t]) => ({
524
530
  bucket: e,
525
531
  paths: t.map((e) => e.path)
526
532
  }));
@@ -535,4 +541,4 @@ var L = class {
535
541
  }
536
542
  };
537
543
  //#endregion
538
- export { h as DataService, N as DatabaseService, P as EmbeddingService, a as FileNotFoundError, C as Filter, S as FilterChainSeparator, y as FilterOp, b as LogicalOp, x as LogicalOpSeparator, o as ParseError, M as PostgrestClient, c as PostgrestErrorInterface, A as PostgrestFilterBuilder, j as PostgrestQueryBuilder, s as RecordNotFoundError, L as StorageService, g as TableDataService, i as TracedError, _ as ViewDataService, v as assertCounted, d as coerceArray, D as encodeFilter, E as encodeFilterNode, m as entries, f as groupBy, l as isDatabaseApiError, T as negateFilterNode, w as negateOp, O as parseFilterExpression, k as parseFilterExpressionChain, p as removeElement, F as removeImagesFromMarkdown, I as removeLinksFromMarkdown, u as splitPath };
544
+ export { g as DataService, P as DatabaseService, F as EmbeddingService, a as FileNotFoundError, o as FileNotSupportedError, w as Filter, C as FilterChainSeparator, b as FilterOp, x as LogicalOp, S as LogicalOpSeparator, s as ParseError, N as PostgrestClient, l as PostgrestErrorInterface, j as PostgrestFilterBuilder, M as PostgrestQueryBuilder, c as RecordNotFoundError, R as StorageService, _ as TableDataService, i as TracedError, v as ViewDataService, y as assertCounted, f as coerceArray, O as encodeFilter, D as encodeFilterNode, h as entries, p as groupBy, u as isDatabaseApiError, E as negateFilterNode, T as negateOp, k as parseFilterExpression, A as parseFilterExpressionChain, m as removeElement, I as removeImagesFromMarkdown, L as removeLinksFromMarkdown, d as splitPath };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "displayName": "Supabase-Core",
5
5
  "description": "Lightweight services for supabase to make it easier to work with databases, tables and storage buckets",
6
- "version": "1.7.0",
6
+ "version": "1.7.1",
7
7
  "type": "module",
8
8
  "repository": {
9
9
  "type": "git",