@freehour/supabase-core 1.5.4 → 1.7.0

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.
@@ -1,11 +1,10 @@
1
- import { Embedding, EmbeddingPreprocessingStep, EmbeddingSynchronizationResult, FileMetadata, Metadata, MetadataGeneratorFn } from './embedding';
1
+ import { Embedding, EmbeddingSynchronizationResult, Metadata, MetadataGeneratorFn } from './embedding';
2
2
  import { FileRef, StorageLocation } from './storage';
3
3
  import { StorageService } from './storage-service';
4
4
  export interface EmbeddingServiceParams<BucketName extends string = string> {
5
5
  storage: StorageService<BucketName>;
6
6
  }
7
7
  export declare abstract class EmbeddingService<BucketName extends string = string> {
8
- private readonly preprocesses;
9
8
  protected readonly storage: StorageService<BucketName>;
10
9
  constructor({ storage, }: EmbeddingServiceParams<BucketName>);
11
10
  /**
@@ -24,7 +23,7 @@ export declare abstract class EmbeddingService<BucketName extends string = strin
24
23
  * @param metadata Additional metadata to store with the embedding.
25
24
  * @return An array of generated embeddings.
26
25
  */
27
- protected abstract createEmbeddings(location: StorageLocation, text: string, file: FileMetadata, metadata?: Metadata): Promise<Embedding[]>;
26
+ protected abstract createEmbeddings(location: StorageLocation, metadata?: Metadata): Promise<Embedding[]>;
28
27
  /**
29
28
  * Delete the embeddings associated with the given file reference.
30
29
  *
@@ -40,9 +39,6 @@ export declare abstract class EmbeddingService<BucketName extends string = strin
40
39
  * @returns A promise that resolves to an array of file references with outdated embeddings.
41
40
  */
42
41
  protected getOutdatedEmbeddings(bucket: BucketName): Promise<FileRef<BucketName>[]>;
43
- private preprocess;
44
- addPreprocessingStep(preprocess: EmbeddingPreprocessingStep): this;
45
- removePreprocessingStep(name: string): this;
46
42
  get(fileRef: FileRef<BucketName>): Promise<Embedding[]>;
47
43
  ingest(fileRef: FileRef<BucketName>, metadata?: Metadata | MetadataGeneratorFn): Promise<Embedding[]>;
48
44
  synchronize(bucket: BucketName, metadata?: Metadata | MetadataGeneratorFn):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AE,CAAC;IAEjF;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAEzG;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAE7E;;;;;;;OAOG;cACa,qBAAqB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IA4BnF,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAKvD,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,mBAAmB,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAarG,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,mBAAmB,GAAG,OAAO,CAAC,8BAA8B,EAAE,CAAC;CAoB9H"}
@@ -1,13 +1,7 @@
1
- import { MimeString } from '@freehour/mime';
2
1
  import { Json } from './json';
3
2
  import { FileRef, StorageLocation } from './storage';
4
3
  export type Metadata = Record<string, Json>;
5
- export type MetadataGeneratorFn = (file: File, location: StorageLocation) => Metadata;
6
- export interface FileMetadata {
7
- name: string;
8
- type: MimeString;
9
- size: number;
10
- }
4
+ export type MetadataGeneratorFn = (location: StorageLocation) => Metadata;
11
5
  export interface Embedding extends StorageLocation {
12
6
  text: string;
13
7
  vector: number[];
@@ -25,9 +19,4 @@ export interface EmbeddingSynchronizationFailure {
25
19
  error: Error;
26
20
  }
27
21
  export type EmbeddingSynchronizationResult = EmbeddingSynchronizationSuccess | EmbeddingSynchronizationFailure;
28
- export interface EmbeddingPreprocessingStep {
29
- name: string;
30
- run: (text: string, metadata: FileMetadata) => string;
31
- }
32
- export declare const preprocessingSteps: Record<string, EmbeddingPreprocessingStep>;
33
22
  //# sourceMappingURL=embedding.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"embedding.d.ts","sourceRoot":"","sources":["../lib/embedding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG1D,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAC5C,MAAM,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,eAAe,KAAK,QAAQ,CAAC;AAEtF,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAU,SAAQ,eAAe;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,+BAA+B;IAC5C,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,+BAA+B;IAC5C,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,MAAM,8BAA8B,GAAG,+BAA+B,GAAG,+BAA+B,CAAC;AAE/G,MAAM,WAAW,0BAA0B;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,KAAK,MAAM,CAAC;CACzD;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAwBzE,CAAC"}
1
+ {"version":3,"file":"embedding.d.ts","sourceRoot":"","sources":["../lib/embedding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG1D,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAC5C,MAAM,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,eAAe,KAAK,QAAQ,CAAC;AAG1E,MAAM,WAAW,SAAU,SAAQ,eAAe;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,+BAA+B;IAC5C,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,+BAA+B;IAC5C,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,MAAM,8BAA8B,GAAG,+BAA+B,GAAG,+BAA+B,CAAC"}
package/dist/errors.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { default as z } from 'zod';
2
- import { Mime } from '@freehour/mime';
3
2
  import { PostgrestError } from '@supabase/supabase-js';
4
3
  /**
5
4
  * Automatically sets the name and captures the stack trace for the error.
@@ -98,30 +97,6 @@ export declare class RecordNotFoundError extends TracedError {
98
97
  readonly id?: string | number;
99
98
  constructor(message: string, { schema, relation, id, }?: RecordNotFoundErrorOptions);
100
99
  }
101
- export interface UnsupportedMimeErrorOptions extends ErrorOptions {
102
- /**
103
- * The MIME type that is unsupported.
104
- */
105
- value?: Mime;
106
- /**
107
- * The list of supported MIME types.
108
- */
109
- supported?: Mime[];
110
- }
111
- /**
112
- * An error that indicates that a supplied MIME type is not supported.
113
- */
114
- export declare class UnsupportedMimeError extends Error {
115
- /**
116
- * The MIME type that is unsupported.
117
- */
118
- readonly value?: Mime;
119
- /**
120
- * The list of supported MIME types.
121
- */
122
- readonly supported?: Mime[];
123
- constructor(message: string, { value, supported, ...options }?: UnsupportedMimeErrorOptions);
124
- }
125
100
  /**
126
101
  * PostgREST errors are sometimes returned in this format instead of the declared PostgrestError class.
127
102
  */
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../lib/errors.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC3C,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;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;gBAGnB,OAAO,EAAE,MAAM,EACf,EACI,MA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IAAI,gBAAgB,CAE5E"}
package/dist/index.d.ts CHANGED
@@ -1,12 +1,13 @@
1
1
  export * from './data-service';
2
2
  export type * from './database';
3
3
  export * from './database-service';
4
- export * from './embedding';
4
+ export type * from './embedding';
5
5
  export * from './embedding-service';
6
6
  export * from './errors';
7
7
  export * from './filter';
8
8
  export type * from './json';
9
9
  export * from './postgrest';
10
+ export * from './processing';
10
11
  export type * from './storage';
11
12
  export * from './storage-service';
12
13
  export * from './utils';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,mBAAmB,YAAY,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,mBAAmB,QAAQ,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,mBAAmB,WAAW,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,mBAAmB,YAAY,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,mBAAmB,aAAa,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,mBAAmB,QAAQ,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,mBAAmB,WAAW,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -2,73 +2,66 @@ import { assert as e } from "@freehour/assert";
2
2
  import t from "zod";
3
3
  import { PostgrestError as n } from "@supabase/supabase-js";
4
4
  import * as r from "@supabase/postgrest-js";
5
- import { Mime as i } from "@freehour/mime";
6
5
  //#region lib/errors.ts
7
- var a = class extends Error {
6
+ var i = class extends Error {
8
7
  constructor(e, t = {}) {
9
8
  super(e, t), this.name = this.constructor.name, Error.captureStackTrace(this, this.constructor);
10
9
  }
11
- }, o = class extends a {
10
+ }, a = class extends i {
12
11
  fileId;
13
12
  bucket;
14
13
  path;
15
14
  constructor(e, { fileId: t, bucket: n, path: r } = {}) {
16
15
  super(e), this.fileId = t, this.bucket = n, this.path = r;
17
16
  }
18
- }, s = class extends a {
17
+ }, o = class extends i {
19
18
  expression;
20
19
  format;
21
20
  constructor(e, { expression: t, format: n, ...r } = {}) {
22
21
  super(e, r), this.expression = t, this.format = n;
23
22
  }
24
- }, c = class extends a {
23
+ }, s = class extends i {
25
24
  schema;
26
25
  relation;
27
26
  id;
28
27
  constructor(e, { schema: t, relation: n, id: r } = {}) {
29
28
  super(e), this.schema = t, this.relation = n, this.id = r;
30
29
  }
31
- }, l = class extends Error {
32
- value;
33
- supported;
34
- constructor(e, { value: t, supported: n, ...r } = {}) {
35
- super(e, r), this.value = t, this.supported = n;
36
- }
37
- }, u = t.object({
30
+ }, c = t.object({
38
31
  code: t.string(),
39
32
  details: t.string().nullable(),
40
33
  hint: t.string().nullable(),
41
34
  name: t.string().optional(),
42
35
  message: t.string().optional()
43
36
  });
44
- function d(e) {
45
- return e instanceof n || u.safeParse(e).success;
37
+ function l(e) {
38
+ return e instanceof n || c.safeParse(e).success;
46
39
  }
47
40
  //#endregion
48
41
  //#region lib/utils.ts
49
- function f(e, t = "/") {
42
+ function u(e, t = "/") {
50
43
  let n = e.lastIndexOf(t);
51
44
  return n === -1 ? ["", e] : [e.substring(0, n), e.substring(n + 1)];
52
45
  }
53
- function p(e) {
46
+ function d(e) {
54
47
  return Array.isArray(e) ? e : [e];
55
48
  }
56
- function m(e, t) {
49
+ function f(e, t) {
57
50
  return e.reduce((e, n) => {
58
51
  let r = t(n);
59
52
  return (e[r] ??= []).push(n), e;
60
53
  }, {});
61
54
  }
62
- function h(e, t) {
55
+ function p(e, t) {
63
56
  let n = e.findIndex(t);
64
57
  return n !== -1 && e.splice(n, 1), e;
65
58
  }
66
- function g(e) {
59
+ function m(e) {
67
60
  return Object.entries(e);
68
61
  }
69
62
  //#endregion
70
63
  //#region lib/data-service.ts
71
- var _ = class {
64
+ var h = class {
72
65
  database;
73
66
  schema;
74
67
  relation;
@@ -76,7 +69,7 @@ var _ = class {
76
69
  this.database = e, this.schema = t, this.relation = n;
77
70
  }
78
71
  recordNotFoundError(e) {
79
- return new c(`Record with id ${e} not found in ${this.schema}.${this.relation}`, {
72
+ return new s(`Record with id ${e} not found in ${this.schema}.${this.relation}`, {
80
73
  schema: this.schema,
81
74
  relation: this.relation,
82
75
  id: e
@@ -124,7 +117,7 @@ var _ = class {
124
117
  }
125
118
  async upsert(e, { onConflict: t, ...n } = {}) {
126
119
  let { data: r } = await this.query.upsert(e, {
127
- onConflict: t === void 0 ? void 0 : p(t).join(","),
120
+ onConflict: t === void 0 ? void 0 : d(t).join(","),
128
121
  ...n
129
122
  }).select().single().throwOnError();
130
123
  return r;
@@ -133,7 +126,7 @@ var _ = class {
133
126
  let { data: n } = await this.query.update(t).eq("id", e).select().single().throwOnError();
134
127
  return n;
135
128
  }
136
- }, v = class extends _ {
129
+ }, g = class extends h {
137
130
  constructor({ database: e, schema: t, table: n }) {
138
131
  super({
139
132
  database: e,
@@ -141,7 +134,7 @@ var _ = class {
141
134
  relation: n
142
135
  });
143
136
  }
144
- }, y = class extends _ {
137
+ }, _ = class extends h {
145
138
  constructor({ database: e, schema: t, view: n }) {
146
139
  super({
147
140
  database: e,
@@ -150,13 +143,13 @@ var _ = class {
150
143
  });
151
144
  }
152
145
  };
153
- function b(t) {
146
+ function v(t) {
154
147
  if (t.error) throw t.error;
155
148
  return e(t.count !== null, "Response does not contain a count. Make sure to set the `count` option in the request."), t;
156
149
  }
157
150
  //#endregion
158
151
  //#region lib/filter.ts
159
- var x = [
152
+ var y = [
160
153
  "eq",
161
154
  "neq",
162
155
  "gt",
@@ -182,17 +175,17 @@ var x = [
182
175
  "nxr",
183
176
  "nxl",
184
177
  "adj"
185
- ], S = ["and", "or"], C = ",", w = "~", T = (e) => (n = {}) => {
178
+ ], b = ["and", "or"], x = ",", S = "~", C = (e) => (n = {}) => {
186
179
  let r = (e) => n[e] ?? e, i = Object.keys(e.shape);
187
180
  return t.string().transform((e, t) => {
188
181
  try {
189
- return j(e, i, r);
182
+ return k(e, i, r);
190
183
  } catch (n) {
191
184
  return t.addIssue({
192
185
  code: "custom",
193
186
  input: e,
194
187
  message: n instanceof Error ? n.message : void 0,
195
- params: n instanceof s ? {
188
+ params: n instanceof o ? {
196
189
  expression: n.expression,
197
190
  format: n.format
198
191
  } : void 0
@@ -200,26 +193,26 @@ var x = [
200
193
  }
201
194
  });
202
195
  };
203
- function E(e) {
196
+ function w(e) {
204
197
  return e.startsWith("not.") ? e.slice(4) : `not.${e}`;
205
198
  }
206
- function D(e) {
199
+ function T(e) {
207
200
  return {
208
201
  ...e,
209
- op: E(e.op)
202
+ op: w(e.op)
210
203
  };
211
204
  }
212
- function O(e, t = (e) => e) {
205
+ function E(e, t = (e) => e) {
213
206
  if (e.type === "logical") {
214
- let n = e.args.map((e) => O(e, t));
207
+ let n = e.args.map((e) => E(e, t));
215
208
  return `${e.op}(${n})`;
216
209
  }
217
210
  return `${t(e.key)}.${e.op}.${e.value}`;
218
211
  }
219
- function k(e, t = (e) => e, n = "~") {
220
- return e.map((e) => O(e, t)).join(n);
212
+ function D(e, t = (e) => e, n = "~") {
213
+ return e.map((e) => E(e, t)).join(n);
221
214
  }
222
- function A(t, n = [], r = (e) => e) {
215
+ function O(t, n = [], r = (e) => e) {
223
216
  function i(e) {
224
217
  let t = [], n = 0, r = "", i = !1;
225
218
  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;
@@ -229,34 +222,34 @@ function A(t, n = [], r = (e) => e) {
229
222
  if (t.startsWith("and(")) return {
230
223
  type: "logical",
231
224
  op: "and",
232
- args: i(t.slice(4, -1)).map((e) => A(e, n, r))
225
+ args: i(t.slice(4, -1)).map((e) => O(e, n, r))
233
226
  };
234
227
  if (t.startsWith("or(")) return {
235
228
  type: "logical",
236
229
  op: "or",
237
- args: i(t.slice(3, -1)).map((e) => A(e, n, r))
230
+ args: i(t.slice(3, -1)).map((e) => O(e, n, r))
238
231
  };
239
232
  if (t.startsWith("not.and(")) return {
240
233
  type: "logical",
241
234
  op: "not.and",
242
- args: i(t.slice(8, -1)).map((e) => A(e, n, r))
235
+ args: i(t.slice(8, -1)).map((e) => O(e, n, r))
243
236
  };
244
237
  if (t.startsWith("not.or(")) return {
245
238
  type: "logical",
246
239
  op: "not.or",
247
- args: i(t.slice(7, -1)).map((e) => A(e, n, r))
240
+ args: i(t.slice(7, -1)).map((e) => O(e, n, r))
248
241
  };
249
242
  }
250
- let a = `^(${n.length === 0 ? "[a-zA-Z_][a-zA-Z0-9_]*" : n.join("|")})\\.((?:not\\.)?(?:${x.join("|")}))\\.(.+)$`, o = new RegExp(a).exec(t);
251
- if (!o) throw new s(`Invalid filter expression '${t}'`, {
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}'`, {
252
245
  expression: t,
253
246
  format: {
254
247
  syntax: "key.(not.)op.value",
255
248
  keys: n.length === 0 ? "*" : n,
256
- operators: x
249
+ operators: y
257
250
  }
258
251
  });
259
- let [, c, l, u] = o;
252
+ let [, c, l, u] = s;
260
253
  return {
261
254
  type: "condition",
262
255
  key: r(c),
@@ -264,22 +257,22 @@ function A(t, n = [], r = (e) => e) {
264
257
  value: e.defined(u)
265
258
  };
266
259
  }
267
- function j(e, t = [], n = (e) => e, r = "~") {
268
- return e.length === 0 ? [] : e.split(r).map((e) => A(e, t, n));
260
+ function k(e, t = [], n = (e) => e, r = "~") {
261
+ return e.length === 0 ? [] : e.split(r).map((e) => O(e, t, n));
269
262
  }
270
263
  //#endregion
271
264
  //#region lib/postgrest.ts
272
- var M = class t extends r.PostgrestFilterBuilder {
265
+ var A = class t extends r.PostgrestFilterBuilder {
273
266
  pagination;
274
267
  constructor(e) {
275
268
  super(e);
276
269
  }
277
270
  select(e = "*") {
278
- return new t(super.select(p(e).join(",")));
271
+ return new t(super.select(d(e).join(",")));
279
272
  }
280
273
  where(e) {
281
274
  if (e.type === "logical") {
282
- let t = e.args.map((e) => O(e)).join(",");
275
+ let t = e.args.map((e) => E(e)).join(",");
283
276
  this.url.searchParams.append(e.op, `(${t})`);
284
277
  } else this.url.searchParams.append(e.key, `${e.op}.${e.value}`);
285
278
  return this;
@@ -321,89 +314,75 @@ var M = class t extends r.PostgrestFilterBuilder {
321
314
  };
322
315
  });
323
316
  }
324
- }, N = class extends r.PostgrestQueryBuilder {
317
+ }, j = class extends r.PostgrestQueryBuilder {
325
318
  constructor(e) {
326
319
  super(e.url, e);
327
320
  }
328
321
  select(e = "*", t) {
329
- return new M(super.select(p(e).join(","), t));
322
+ return new A(super.select(d(e).join(","), t));
330
323
  }
331
324
  count(e = "exact") {
332
- return new M(this.select("*", {
325
+ return new A(this.select("*", {
333
326
  count: e,
334
327
  head: !0
335
328
  }));
336
329
  }
337
330
  insert(e, t) {
338
- return new M(super.insert(e, t));
331
+ return new A(super.insert(e, t));
339
332
  }
340
333
  upsert(e, { onConflict: t, ...n } = {}) {
341
- return new M(super.upsert(e, {
342
- onConflict: p(t).join(","),
334
+ return new A(super.upsert(e, {
335
+ onConflict: d(t).join(","),
343
336
  ...n
344
337
  }));
345
338
  }
346
339
  update(e, t) {
347
- return new M(super.update(e, t));
340
+ return new A(super.update(e, t));
348
341
  }
349
342
  delete() {
350
- return new M(super.delete());
343
+ return new A(super.delete());
351
344
  }
352
- }, P = class {
345
+ }, M = class {
353
346
  client;
354
347
  constructor(e) {
355
348
  this.client = e;
356
349
  }
357
350
  from(e) {
358
- return new N(this.client.from(e));
351
+ return new j(this.client.from(e));
359
352
  }
360
353
  rpc(e, t, n) {
361
- return new M(this.client.rpc(e, t, n));
354
+ return new A(this.client.rpc(e, t, n));
362
355
  }
363
- }, F = class {
356
+ }, N = class {
364
357
  supabase;
365
358
  constructor({ supabase: e }) {
366
359
  this.supabase = e;
367
360
  }
368
361
  schema(e) {
369
- return new P(this.supabase.schema(e));
362
+ return new M(this.supabase.schema(e));
370
363
  }
371
364
  relation(e, t) {
372
- return new _({
365
+ return new h({
373
366
  database: this,
374
367
  schema: e,
375
368
  relation: t
376
369
  });
377
370
  }
378
371
  table(e, t) {
379
- return new v({
372
+ return new g({
380
373
  database: this,
381
374
  schema: e,
382
375
  table: t
383
376
  });
384
377
  }
385
378
  view(e, t) {
386
- return new y({
379
+ return new _({
387
380
  database: this,
388
381
  schema: e,
389
382
  view: t
390
383
  });
391
384
  }
392
- }, I = {
393
- removeImagesFromMarkdown: {
394
- name: "removeImagesFromMarkdown",
395
- run(e, t) {
396
- return t.type === "text/markdown" ? e.replace(/!\[([^\]]*)\]\([^)]*\)/g, (e, t) => `![${t}]()`) : e;
397
- }
398
- },
399
- removeLinksFromMarkdown: {
400
- name: "removeLinksFromMarkdown",
401
- run(e, t) {
402
- return t.type === "text/markdown" ? e.replace(/\[([^\]]*)\]\([^)]*\)/g, (e, t) => `[${t}]()`) : e;
403
- }
404
- }
405
- }, L = class {
406
- preprocesses = [];
385
+ }, P = class {
407
386
  storage;
408
387
  constructor({ storage: e }) {
409
388
  this.storage = e;
@@ -415,49 +394,42 @@ var M = class t extends r.PostgrestFilterBuilder {
415
394
  let t = new Date(e.updated_at), n = await this.storage.getFileStorageLocation({ fileId: e.id }), r = await this.getEmbeddings(n);
416
395
  return r.length === 0 || r.some((e) => e.createdAt < t);
417
396
  }));
418
- t.push(...i.filter((e, t) => o[t]).map(({ id: e }) => ({ fileId: e }))), {hasNext: n, nextCursor: r} = a;
397
+ t.push(...i.filter((e, t) => o[t] ?? !1).map(({ id: e }) => ({ fileId: e }))), {hasNext: n, nextCursor: r} = a;
419
398
  }
420
399
  return t;
421
400
  }
422
- preprocess(e, t) {
423
- return this.preprocesses.forEach((n) => {
424
- e = n.run(e, t);
425
- }), e;
426
- }
427
- addPreprocessingStep(e) {
428
- return this.preprocesses.push(e), this;
429
- }
430
- removePreprocessingStep(e) {
431
- return h(this.preprocesses, (t) => t.name === e), this;
432
- }
433
401
  async get(e) {
434
402
  let t = await this.storage.getFileStorageLocation(e);
435
403
  return this.getEmbeddings(t);
436
404
  }
437
405
  async ingest(e, t) {
438
- let { file: n, ...r } = await this.storage.downloadFile(e), a = i.parse(n.type);
439
- if (a.type !== "text") throw new l(`Unsupported file type: ${a}. Only text files can be embedded.`);
440
- await this.deleteEmbeddings(r);
441
- let o = {
442
- name: n.name,
443
- type: n.type,
444
- size: n.size
445
- }, s = this.preprocess(await n.text(), o);
446
- return this.createEmbeddings(r, s, o, typeof t == "function" ? t(n, r) : t);
406
+ let n = await this.storage.getFileStorageLocation(e);
407
+ return await this.deleteEmbeddings(n), this.createEmbeddings(n, typeof t == "function" ? t(n) : t);
447
408
  }
448
409
  async synchronize(e, t) {
449
410
  let n = await this.getOutdatedEmbeddings(e);
450
- return (await Promise.all(n.map(async (e) => this.ingest(e, t).then(() => ({
411
+ return Promise.all(n.map(async (e) => this.ingest(e, t).then(() => ({
451
412
  file: e,
452
413
  success: !0,
453
414
  error: null
454
- })).catch((t) => t instanceof l ? null : {
415
+ })).catch((t) => ({
455
416
  file: e,
456
417
  error: t,
457
418
  success: !1
458
- })))).filter((e) => e !== null);
419
+ }))));
459
420
  }
460
- }, R = class {
421
+ };
422
+ //#endregion
423
+ //#region lib/processing.ts
424
+ function F(e) {
425
+ return e.replace(/!\[([^\]]*)\]\([^)]*\)/g, (e, t) => `![${t}]()`);
426
+ }
427
+ function I(e) {
428
+ return e.replace(/\[([^\]]*)\]\([^)]*\)/g, (e, t) => `[${t}]()`);
429
+ }
430
+ //#endregion
431
+ //#region lib/storage-service.ts
432
+ var L = class {
461
433
  client;
462
434
  database;
463
435
  constructor({ client: e, database: t }) {
@@ -479,7 +451,7 @@ var M = class t extends r.PostgrestFilterBuilder {
479
451
  async getFileStorageLocation(t) {
480
452
  if ("fileId" in t) {
481
453
  let { fileId: n } = t, r = await this.files.get(n, ["bucket_id", "path_tokens"]);
482
- if (!r) throw new o(`File with ID ${n} not found`, { fileId: n });
454
+ if (!r) throw new a(`File with ID ${n} not found`, { fileId: n });
483
455
  return {
484
456
  fileId: n,
485
457
  bucket: e.notNull(r.bucket_id, "bucket_id must not be null"),
@@ -519,7 +491,7 @@ var M = class t extends r.PostgrestFilterBuilder {
519
491
  async assertExistsFile(e) {
520
492
  let { bucket: t, path: n } = await this.getFileStorageLocation(e), { data: r, error: i } = await this.client.from(t).exists(n);
521
493
  if (i) throw i;
522
- if (!r) throw new o(`File not found in bucket '${t}' at path '${n}'`, {
494
+ if (!r) throw new a(`File not found in bucket '${t}' at path '${n}'`, {
523
495
  bucket: t,
524
496
  path: n
525
497
  });
@@ -536,7 +508,7 @@ var M = class t extends r.PostgrestFilterBuilder {
536
508
  async downloadFile(e) {
537
509
  let { fileId: t, bucket: n, path: r, properties: i } = await this.getFileInfo(e), { data: a, error: o } = await this.client.from(n).download(r);
538
510
  if (o) throw o;
539
- let [, s] = f(r);
511
+ let [, s] = u(r);
540
512
  return {
541
513
  fileId: t,
542
514
  bucket: n,
@@ -548,7 +520,7 @@ var M = class t extends r.PostgrestFilterBuilder {
548
520
  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 }) => ({
549
521
  bucket: e.notNull(t, "bucket_id must not be null"),
550
522
  path: e.notNull(n, "path_tokens must not be null").join("/")
551
- })), i = g(m(t.filter((e) => "path" in e).concat(r), (e) => e.bucket)).map(([e, t]) => ({
523
+ })), i = m(f(t.filter((e) => "path" in e).concat(r), (e) => e.bucket)).map(([e, t]) => ({
552
524
  bucket: e,
553
525
  paths: t.map((e) => e.path)
554
526
  }));
@@ -563,4 +535,4 @@ var M = class t extends r.PostgrestFilterBuilder {
563
535
  }
564
536
  };
565
537
  //#endregion
566
- export { _ as DataService, F as DatabaseService, L as EmbeddingService, o as FileNotFoundError, T as Filter, w as FilterChainSeparator, x as FilterOp, S as LogicalOp, C as LogicalOpSeparator, s as ParseError, P as PostgrestClient, u as PostgrestErrorInterface, M as PostgrestFilterBuilder, N as PostgrestQueryBuilder, c as RecordNotFoundError, R as StorageService, v as TableDataService, a as TracedError, l as UnsupportedMimeError, y as ViewDataService, b as assertCounted, p as coerceArray, k as encodeFilter, O as encodeFilterNode, g as entries, m as groupBy, d as isDatabaseApiError, D as negateFilterNode, E as negateOp, A as parseFilterExpression, j as parseFilterExpressionChain, I as preprocessingSteps, h as removeElement, f as splitPath };
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 };
@@ -0,0 +1,3 @@
1
+ export declare function removeImagesFromMarkdown(text: string): string;
2
+ export declare function removeLinksFromMarkdown(text: string): string;
3
+ //# sourceMappingURL=processing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processing.d.ts","sourceRoot":"","sources":["../lib/processing.ts"],"names":[],"mappings":"AACA,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG7D;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG5D"}
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.5.4",
6
+ "version": "1.7.0",
7
7
  "type": "module",
8
8
  "repository": {
9
9
  "type": "git",
@@ -28,20 +28,19 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@freehour/assert": "^1.0.0",
31
- "@freehour/mime": "^1.0.5",
32
31
  "@supabase/postgrest-js": "^2.101.1",
33
32
  "@supabase/storage-js": "^2.101.1",
34
33
  "@supabase/supabase-js": "^2.101.1",
35
34
  "zod": "4.3.6"
36
35
  },
37
36
  "devDependencies": {
38
- "@freehour/eslint-rules": "^1.0.15",
37
+ "@freehour/eslint-rules": "^1.0.16",
39
38
  "ajv": "^8.18.0",
40
39
  "bun-types": "^1.3.11",
41
40
  "eslint": "9.39.4",
42
- "supabase": "^2.84.10",
41
+ "supabase": "^2.85.0",
43
42
  "typescript": "^6.0.2",
44
- "vite": "^8.0.4",
43
+ "vite": "^8.0.5",
45
44
  "vite-plugin-dts": "^4.5.4"
46
45
  },
47
46
  "trustedDependencies": [