better-supabase 0.2.0 → 0.3.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.
- package/README.md +34 -31
- package/dist/base64-CQeB1eSf.js +42 -0
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +4 -14
- package/dist/{compiler-CZ9nIuqy.d.ts → compiler-2zqGzxVZ.d.ts} +2 -2
- package/dist/config/index.d.ts +4 -3
- package/dist/config/index.js +5 -3
- package/dist/config-Be4GwsqI.js +129 -0
- package/dist/{index-DOsjFvMf.d.ts → config-C1CYcm6o.d.ts} +49 -49
- package/dist/{config-ClDXmVtY.js → config-DOsGYSiT.js} +14 -137
- package/dist/{define-BXMYD9AY.js → define-DF341GDj.js} +71 -51
- package/dist/{define-e3zI4_4g.d.ts → define-DUbydmJa.d.ts} +10 -9
- package/dist/edge/index.d.ts +4 -4
- package/dist/edge/index.js +4 -4
- package/dist/{entitlements-Dng-ctuT.d.ts → entitlements-DvJXoI02.d.ts} +1 -1
- package/dist/env/index.js +203 -1
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.js +139 -1
- package/dist/{events-DOt3nSO-.d.ts → events-Do8jXh4D.d.ts} +3 -3
- package/dist/{executor-BYXQ9AGn.d.ts → executor-B26lgbHD.d.ts} +2 -2
- package/dist/{executor-DeppvirK.js → executor-C57jx2pn.js} +7 -2
- package/dist/{executor-CGdNQ27g.d.ts → executor-DynmIWhq.d.ts} +2 -2
- package/dist/hono/index.d.ts +5 -5
- package/dist/hono/index.js +4 -4
- package/dist/{index-CBDufH1M.d.ts → index-BNsABq7P.d.ts} +8 -8
- package/dist/{index-Bw1bwtC0.d.ts → index-CADlNHK-.d.ts} +27 -14
- package/dist/{index-DuP14VHo.d.ts → index-CTTMS6_1.d.ts} +19 -8
- package/dist/index-Cf-D2jk1.d.ts +50 -0
- package/dist/{index-K-3WM2Hp.d.ts → index-CriFFJ_p.d.ts} +4 -4
- package/dist/{index-Ciu5Xlml.d.ts → index-GV77NpRP.d.ts} +5 -4
- package/dist/{index-D4v7sncu.d.ts → index-UJ-LUxtI.d.ts} +3 -3
- package/dist/{index-CG69s15v.d.ts → index-kpgopLNv.d.ts} +4 -3
- package/dist/{index-DbxFr7XG.d.ts → index-qriRM9cZ.d.ts} +7 -2
- package/dist/index.d.ts +12 -12
- package/dist/index.js +16 -7
- package/dist/jobs/index.d.ts +25 -24
- package/dist/jobs/index.js +16 -10
- package/dist/{json-schema-BpYqkCKf.js → json-schema--aOXAGfU.js} +7 -2
- package/dist/lint/index.js +1 -1
- package/dist/list/index.d.ts +2 -2
- package/dist/list/index.js +128 -93
- package/dist/{live-DJyZMD6w.d.ts → live-QE3UPbGm.d.ts} +16 -6
- package/dist/mcp/index.d.ts +24 -17
- package/dist/mcp/index.js +41 -12
- package/dist/{mfa-CpLfJSde.js → mfa-BxoR1RkN.js} +74 -19
- package/dist/{mfa-TVia554c.d.ts → mfa-x3V3vGh-.d.ts} +1 -1
- package/dist/next/index.d.ts +39 -26
- package/dist/next/index.js +28 -23
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.js +57 -34
- package/dist/orpc/index.d.ts +6 -6
- package/dist/orpc/index.js +3 -3
- package/dist/otel/index.d.ts +2 -2
- package/dist/otel/index.js +4 -2
- package/dist/{permdock-sql-CghlHPuH.js → permdock-sql-Bta_G0v-.js} +11 -6
- package/dist/permdock-sql-DImJULY-.d.ts +17 -0
- package/dist/{plugin-C4TR9J0Z.d.ts → plugin-DVRB8qNE.d.ts} +5 -4
- package/dist/plugins/actor/index.d.ts +1 -1
- package/dist/plugins/rules/index.d.ts +2 -2
- package/dist/plugins/rules/index.js +4 -4
- package/dist/plugins/soft-delete/index.d.ts +3 -3
- package/dist/plugins/soft-delete/index.js +2 -2
- package/dist/plugins/tenant/index.d.ts +2 -2
- package/dist/plugins/timestamps/index.d.ts +1 -1
- package/dist/plugins/timestamps/index.js +1 -1
- package/dist/plugins/validation/index.d.ts +2 -2
- package/dist/pool-B9qsLyFR.d.ts +71 -0
- package/dist/postgres/index.d.ts +10 -5
- package/dist/postgres/index.js +36 -16
- package/dist/{postgrest-cAEQ_IQN.d.ts → postgrest-DmBlevh-.d.ts} +1 -1
- package/dist/{problem-BTkTtRV9.js → problem-CGt1ADix.js} +10 -4
- package/dist/{problem-DlgB0lYl.d.ts → problem-Z2RTQjZD.d.ts} +6 -4
- package/dist/query/index.d.ts +2 -2
- package/dist/query/index.js +1 -1
- package/dist/{query-ChvDbsDE.js → query-BdKLTPlj.js} +2 -2
- package/dist/react/index.d.ts +7 -7
- package/dist/react/index.js +2 -2
- package/dist/react/server.d.ts +3 -3
- package/dist/react/server.js +1 -1
- package/dist/react/session.d.ts +21 -2
- package/dist/react/session.js +19 -1
- package/dist/{react-C83BdBGt.js → react-DNBYNazu.js} +20 -16
- package/dist/{read-set-4lI3W_gZ.js → read-set-D0qBcboM.js} +3 -3
- package/dist/realtime/index.d.ts +4 -3
- package/dist/realtime/index.js +7 -6
- package/dist/{resolve-CjHILk2w.d.ts → resolve-BRciX2jK.d.ts} +6 -5
- package/dist/{resource-CgZa3YG_.d.ts → resource-CwVgiI5q.d.ts} +16 -7
- package/dist/{resource-BHEWmQJK.js → resource-D30rp0GN.js} +38 -16
- package/dist/{respond-DMcbQwfN.js → respond-C44EZAJo.js} +35 -19
- package/dist/{respond-Dne1ARSa.d.ts → respond-DAkPIdTH.d.ts} +15 -9
- package/dist/{result-CTkCZ6JA.d.ts → result-c2OYgCV2.d.ts} +13 -8
- package/dist/server/index.d.ts +35 -10
- package/dist/server/index.js +38 -9
- package/dist/{simplify-bwJpLnaS.js → simplify-LakqK1vH.js} +10 -16
- package/dist/sql/index.d.ts +139 -0
- package/dist/sql/index.js +1983 -0
- package/dist/{sql-DTjA1LPj.js → sql-BIgk12ew.js} +72 -16
- package/dist/ssr/index.d.ts +4 -4
- package/dist/ssr/index.js +2 -2
- package/dist/{standard-CyhRzctb.d.ts → standard-eudBiRk1.d.ts} +1 -1
- package/dist/{stats-C5W-rBfR.js → stats-D78UQ8Yu.js} +8 -7
- package/dist/storage/index.d.ts +4 -3
- package/dist/storage/index.js +530 -1
- package/dist/{tables-rZxRxNPW.js → tables-Dhha3BXM.js} +5 -5
- package/dist/temporal-BwshQk0W.js +27 -0
- package/dist/temporal-required-CMxeSVPo.js +19 -0
- package/dist/testing/index.d.ts +13 -11
- package/dist/testing/index.js +128 -29
- package/dist/{types-C83v5SQz.d.ts → types-DONv9SHN.d.ts} +14 -11
- package/dist/{version-Cqq1m3UY.js → version-BfpG2gks.js} +1 -1
- package/dist/{view-D1s0wa0T.d.ts → view-3Po_PVlr.d.ts} +34 -4
- package/dist/{view-aOYizTeE.js → view-wZ-9qIUz.js} +11 -2
- package/dist/webhooks/index.d.ts +18 -16
- package/dist/webhooks/index.js +1 -1
- package/dist/{webhooks-DMipjhSP.js → webhooks-CAIFQSTM.js} +11 -9
- package/package.json +24 -28
- package/schemas/config-v1.json +31 -1
- package/schemas/doctor-report-v1.json +17 -1
- package/schemas/snapshot-v2.json +35 -0
- package/skills/better-supabase/SKILL.md +23 -11
- package/skills/better-supabase/references/plugins.md +21 -18
- package/skills/better-supabase/references/troubleshooting.md +15 -15
- package/skills/better-supabase-api/SKILL.md +7 -7
- package/skills/better-supabase-api/references/adapters.md +30 -25
- package/skills/better-supabase-testing/SKILL.md +11 -8
- package/bin/better-supabase.js +0 -4
- package/dist/casing-da0uRTqt.js +0 -14
- package/dist/cli/bin.d.ts +0 -1
- package/dist/cli/bin.js +0 -15
- package/dist/cli/index.d.ts +0 -226
- package/dist/cli/index.js +0 -3
- package/dist/cli-DrSgDOQC.js +0 -6646
- package/dist/env-BEToab0I.js +0 -204
- package/dist/events-BuzTgn2D.js +0 -135
- package/dist/pool-R2m_DkXi.d.ts +0 -37
- package/dist/seed-CzecODcJ.js +0 -101
- package/dist/session-C3LxnQ0e.d.ts +0 -22
- package/dist/session-CqEwzVup.js +0 -20
- package/dist/storage-DuGn38fr.js +0 -527
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { a as invalidRequest, n as simplifyOrFalse } from "./simplify-
|
|
1
|
+
import { a as invalidRequest, n as simplifyOrFalse } from "./simplify-LakqK1vH.js";
|
|
2
2
|
//#region src/compile/sql.ts
|
|
3
|
+
const MAX_PARAMS = 65535;
|
|
3
4
|
const MAX_PAIRS = 50;
|
|
4
5
|
function quoteIdent(name) {
|
|
5
6
|
return `"${name.replaceAll("\"", "\"\"")}"`;
|
|
@@ -15,6 +16,33 @@ function dbColumn(table, app) {
|
|
|
15
16
|
function columnType(table, db) {
|
|
16
17
|
return Object.values(table.columns).find((meta) => meta.db === db)?.type;
|
|
17
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* `a > x or (a = x and b > y) or ...` as `(a, b) > (x, y)`, which an index
|
|
21
|
+
* on `(a, b)` serves. Both forms give the same result under SQL's
|
|
22
|
+
* three-valued logic, nulls included.
|
|
23
|
+
*/
|
|
24
|
+
function rowComparison(condition) {
|
|
25
|
+
const steps = [];
|
|
26
|
+
for (const [index, item] of condition.items.entries()) {
|
|
27
|
+
const terms = index === 0 ? [item] : item.kind === "and" ? item.items : [];
|
|
28
|
+
if (terms.length !== index + 1) return null;
|
|
29
|
+
const step = terms[index];
|
|
30
|
+
if (step.kind !== "column" || step.op !== "gt" && step.op !== "lt") return null;
|
|
31
|
+
for (const [at, term] of terms.slice(0, index).entries()) {
|
|
32
|
+
const prev = steps[at];
|
|
33
|
+
if (term.kind !== "column" || term.op !== "eq" || term.column !== prev.column || !Object.is(term.value, prev.value)) return null;
|
|
34
|
+
}
|
|
35
|
+
steps.push(step);
|
|
36
|
+
}
|
|
37
|
+
const op = steps[0]?.op;
|
|
38
|
+
if (op !== "gt" && op !== "lt") return null;
|
|
39
|
+
if (steps.length < 2 || steps.some((step) => step.op !== op)) return null;
|
|
40
|
+
return {
|
|
41
|
+
columns: steps.map((step) => step.column),
|
|
42
|
+
op,
|
|
43
|
+
values: steps.map((step) => step.value)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
18
46
|
var SqlCompiler = class {
|
|
19
47
|
params = [];
|
|
20
48
|
#aliases = 0;
|
|
@@ -35,6 +63,12 @@ var SqlCompiler = class {
|
|
|
35
63
|
case "and":
|
|
36
64
|
case "or": {
|
|
37
65
|
if (condition.items.length === 0) return condition.kind === "and" ? "true" : "false";
|
|
66
|
+
const row = condition.kind === "or" ? rowComparison(condition) : null;
|
|
67
|
+
if (row) {
|
|
68
|
+
const columns = row.columns.map((name) => this.column(alias, name));
|
|
69
|
+
const values = row.values.map((value) => this.param(value));
|
|
70
|
+
return `(${columns.join(", ")}) ${row.op === "gt" ? ">" : "<"} (${values.join(", ")})`;
|
|
71
|
+
}
|
|
38
72
|
const joiner = condition.kind === "and" ? " and " : " or ";
|
|
39
73
|
return `(${condition.items.map((item) => this.condition(item, table, alias)).join(joiner)})`;
|
|
40
74
|
}
|
|
@@ -85,6 +119,7 @@ var SqlCompiler = class {
|
|
|
85
119
|
}
|
|
86
120
|
}
|
|
87
121
|
join(relation, source, sourceAlias, target, targetAlias) {
|
|
122
|
+
if (relation.columns.length !== relation.references.length) invalidRequest(`Relation to "${target.key}" has mismatched columns`);
|
|
88
123
|
return relation.columns.map((column, index) => {
|
|
89
124
|
const reference = relation.references[index];
|
|
90
125
|
if (reference === void 0) invalidRequest(`Relation to "${target.key}" has mismatched columns`);
|
|
@@ -199,21 +234,20 @@ function compileSql(op) {
|
|
|
199
234
|
never: true
|
|
200
235
|
};
|
|
201
236
|
const columns = insertColumns(op);
|
|
202
|
-
|
|
203
|
-
if (
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
return mutation(`insert into ${from} ${body}${conflict}${returningRows(compiler, op, alias)}`, op.returning !== void 0, compiler.params);
|
|
237
|
+
const perChunk = Math.floor(MAX_PARAMS / Math.max(columns.length, 1));
|
|
238
|
+
if (op.rows.length <= perChunk) return insertPlan(compiler, from, alias, op, columns);
|
|
239
|
+
const [first, ...rest] = chunk(op.rows, perChunk).map((rows) => {
|
|
240
|
+
const own = new SqlCompiler();
|
|
241
|
+
const ownAlias = own.alias();
|
|
242
|
+
return insertPlan(own, `${tableRef(op.table)} as ${ownAlias}`, ownAlias, {
|
|
243
|
+
...op,
|
|
244
|
+
rows
|
|
245
|
+
}, columns);
|
|
246
|
+
});
|
|
247
|
+
return {
|
|
248
|
+
...first,
|
|
249
|
+
chunks: rest
|
|
250
|
+
};
|
|
217
251
|
}
|
|
218
252
|
case "update": {
|
|
219
253
|
const simple = simplifyOrFalse(op.where);
|
|
@@ -238,6 +272,28 @@ function compileSql(op) {
|
|
|
238
272
|
default: return op;
|
|
239
273
|
}
|
|
240
274
|
}
|
|
275
|
+
function chunk(items, size) {
|
|
276
|
+
const out = [];
|
|
277
|
+
for (let start = 0; start < items.length; start += size) out.push(items.slice(start, start + size));
|
|
278
|
+
return out;
|
|
279
|
+
}
|
|
280
|
+
function insertPlan(compiler, from, alias, op, columns) {
|
|
281
|
+
let body;
|
|
282
|
+
if (columns.length === 0) {
|
|
283
|
+
if (op.rows.length > 1) invalidRequest("Cannot insert several rows without columns");
|
|
284
|
+
body = "default values";
|
|
285
|
+
} else {
|
|
286
|
+
const values = op.rows.map((row) => `(${columns.map((column) => column in row ? compiler.param(row[column]) : op.defaultToNull ? "null" : "default").join(", ")})`);
|
|
287
|
+
body = `(${columns.map(quoteIdent).join(", ")}) values ${values.join(", ")}`;
|
|
288
|
+
}
|
|
289
|
+
let conflict = "";
|
|
290
|
+
if (op.onConflict) {
|
|
291
|
+
const target = `(${op.onConflict.columns.map(quoteIdent).join(", ")})`;
|
|
292
|
+
const updates = columns.map((column) => `${quoteIdent(column)} = excluded.${quoteIdent(column)}`);
|
|
293
|
+
conflict = op.onConflict.action === "ignore" || updates.length === 0 ? ` on conflict ${target} do nothing` : ` on conflict ${target} do update set ${updates.join(", ")}`;
|
|
294
|
+
}
|
|
295
|
+
return mutation(`insert into ${from} ${body}${conflict}${returningRows(compiler, op, alias)}`, op.returning !== void 0, compiler.params);
|
|
296
|
+
}
|
|
241
297
|
function mutation(statement, returning, params) {
|
|
242
298
|
if (returning) return {
|
|
243
299
|
rows: {
|
package/dist/ssr/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as readSession, a as ResolveAuthOptions, b as writeSession, d as CookieOptions, f as CookieRecord, g as parseCookies, h as applyCookieWrites, l as resolveAuth, m as StoredSession, n as AuthResolver, p as CookieWrite, r as AuthState, s as authContext, t as AuthResolution, u as AUTH_CACHE_HEADERS, v as serializeCookie, y as sessionCookieName } from "../resolve-
|
|
2
|
-
import { n as toSession, t as AuthSession } from "../view-
|
|
3
|
-
import { n as MembershipClaim, r as hasEntitlement, t as EntitlementKey } from "../entitlements-
|
|
4
|
-
import { n as RefreshOutcome, r as refreshSession, t as RefreshOptions } from "../index-
|
|
1
|
+
import { _ as readSession, a as ResolveAuthOptions, b as writeSession, d as CookieOptions, f as CookieRecord, g as parseCookies, h as applyCookieWrites, l as resolveAuth, m as StoredSession, n as AuthResolver, p as CookieWrite, r as AuthState, s as authContext, t as AuthResolution, u as AUTH_CACHE_HEADERS, v as serializeCookie, y as sessionCookieName } from "../resolve-BRciX2jK.js";
|
|
2
|
+
import { n as toSession, t as AuthSession } from "../view-3Po_PVlr.js";
|
|
3
|
+
import { n as MembershipClaim, r as hasEntitlement, t as EntitlementKey } from "../entitlements-DvJXoI02.js";
|
|
4
|
+
import { n as RefreshOutcome, r as refreshSession, t as RefreshOptions } from "../index-kpgopLNv.js";
|
|
5
5
|
export { AUTH_CACHE_HEADERS, type AuthResolution, type AuthResolver, type AuthSession, type AuthState, type CookieOptions, type CookieRecord, type CookieWrite, type EntitlementKey, type MembershipClaim, type RefreshOptions, type RefreshOutcome, type ResolveAuthOptions, type StoredSession, applyCookieWrites, authContext, hasEntitlement, parseCookies, readSession, refreshSession, resolveAuth, serializeCookie, sessionCookieName, toSession, writeSession };
|
package/dist/ssr/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { t as hasEntitlement } from "../entitlements-CTEBm7IB.js";
|
|
2
|
-
import { c as applyCookieWrites, d as serializeCookie, f as sessionCookieName, i as authContext, l as parseCookies, m as refreshSession, o as resolveAuth, p as writeSession, s as AUTH_CACHE_HEADERS, u as readSession } from "../mfa-
|
|
3
|
-
import { t as toSession } from "../view-
|
|
2
|
+
import { c as applyCookieWrites, d as serializeCookie, f as sessionCookieName, i as authContext, l as parseCookies, m as refreshSession, o as resolveAuth, p as writeSession, s as AUTH_CACHE_HEADERS, u as readSession } from "../mfa-BxoR1RkN.js";
|
|
3
|
+
import { t as toSession } from "../view-wZ-9qIUz.js";
|
|
4
4
|
export { AUTH_CACHE_HEADERS, applyCookieWrites, authContext, hasEntitlement, parseCookies, readSession, refreshSession, resolveAuth, serializeCookie, sessionCookieName, toSession, writeSession };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as Result } from "./result-
|
|
1
|
+
import { o as Result } from "./result-c2OYgCV2.js";
|
|
2
2
|
import { StandardSchemaV1 as StandardSchemaV1$1 } from "@standard-schema/spec";
|
|
3
3
|
//#region src/core/standard.d.ts
|
|
4
4
|
/** Validates with any Standard Schema (zod, valibot, arktype, ...). */
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { c as mapDbError, n as dbError } from "./errors-Bl3rkOzo.js";
|
|
2
|
-
import { a as invalidRequest, n as simplifyOrFalse } from "./simplify-
|
|
2
|
+
import { a as invalidRequest, n as simplifyOrFalse } from "./simplify-LakqK1vH.js";
|
|
3
|
+
import { i as temporalText } from "./temporal-BwshQk0W.js";
|
|
3
4
|
import { i as ok, n as err, o as toDbError } from "./result-DWXatkd6.js";
|
|
4
5
|
//#region src/compile/postgrest.ts
|
|
5
6
|
function scalar(value) {
|
|
6
|
-
if (value instanceof Date) return value.toISOString();
|
|
7
7
|
if (typeof value === "string") return value;
|
|
8
|
+
const temporalValue = temporalText(value);
|
|
9
|
+
if (temporalValue !== void 0) return temporalValue;
|
|
8
10
|
if (typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") return String(value);
|
|
9
11
|
if (value === null) return "null";
|
|
10
12
|
return JSON.stringify(value);
|
|
11
13
|
}
|
|
12
14
|
/** Double-quotes a value for PostgREST lists and logic trees. */
|
|
13
15
|
function quote(value) {
|
|
14
|
-
return `"${scalar(value).
|
|
16
|
+
return `"${scalar(value).replaceAll("\\", "\\\\").replaceAll("\"", "\\\"")}"`;
|
|
15
17
|
}
|
|
16
18
|
function list(values, open, close) {
|
|
17
19
|
return `${open}${values.map(quote).join(",")}${close}`;
|
|
@@ -220,8 +222,7 @@ var PostgrestCompiler = class {
|
|
|
220
222
|
path: `${aliasPath}.${column}`,
|
|
221
223
|
operator: "is",
|
|
222
224
|
value: "null"
|
|
223
|
-
}
|
|
224
|
-
this.filters.push({
|
|
225
|
+
}, {
|
|
225
226
|
kind: "filter",
|
|
226
227
|
path: `${aliasPath}.${column}`,
|
|
227
228
|
operator: "not.is",
|
|
@@ -365,7 +366,7 @@ function applyFilters(builder, plan) {
|
|
|
365
366
|
for (const filter of plan.filters) query = filter.kind === "filter" ? query.filter(filter.path, filter.operator, filter.value) : query.or(filter.expression, filter.referencedTable ? { referencedTable: filter.referencedTable } : {});
|
|
366
367
|
return query;
|
|
367
368
|
}
|
|
368
|
-
function
|
|
369
|
+
function applyOrderAndLimits(builder, plan) {
|
|
369
370
|
let query = builder;
|
|
370
371
|
for (const order of plan.orders) {
|
|
371
372
|
const options = { ascending: order.ascending };
|
|
@@ -384,7 +385,7 @@ function build(client, op, plan) {
|
|
|
384
385
|
const options = {};
|
|
385
386
|
if (op.count) options.count = op.count;
|
|
386
387
|
if (op.head) options.head = true;
|
|
387
|
-
let query =
|
|
388
|
+
let query = applyOrderAndLimits(applyFilters(op.source ? fromFunction(client, op.source, options).select(plan.select) : base.select(plan.select, options), plan), plan);
|
|
388
389
|
if (op.single === "one") query = query.single();
|
|
389
390
|
if (op.single === "maybe") query = query.maybeSingle();
|
|
390
391
|
return query;
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { b as PermdockBucketPolicy } from "../types-
|
|
1
|
+
import { b as PermdockBucketPolicy } from "../types-DONv9SHN.js";
|
|
2
2
|
import { n as StoragePath, t as PathIn } from "../path-Cv__-OTj.js";
|
|
3
|
+
import { t as PermdockCatalog } from "../permdock-sql-DImJULY-.js";
|
|
3
4
|
import { n as TemplateValues, t as TemplateParams } from "../template-mbvlysOo.js";
|
|
4
|
-
import { C as parseSize, S as fromStorageError, _ as TtlPreset, a as BucketDrift, b as UrlOptions, c as ReplaceOptions, d as StorageClient, f as StoredObject, g as TransformOptions, h as TTL, i as BucketConfig, l as ReplaceResult, m as SweepResult, n as Bucket, o as BucketPolicy, p as SweepOptions, r as BucketClient, s as ObjectTarget, t as ActualBucket, u as Reservation, v as UploadBody, x as defineBucket, y as UploadOptions } from "../index-
|
|
5
|
-
export { ActualBucket, Bucket, BucketClient, BucketConfig, BucketDrift, BucketPolicy, ObjectTarget, type PathIn, type PermdockBucketPolicy, ReplaceOptions, ReplaceResult, Reservation, StorageClient, type StoragePath, StoredObject, SweepOptions, SweepResult, TTL, type TemplateParams, type TemplateValues, TransformOptions, TtlPreset, UploadBody, UploadOptions, UrlOptions, defineBucket, fromStorageError, parseSize };
|
|
5
|
+
import { C as parseSize, S as fromStorageError, _ as TtlPreset, a as BucketDrift, b as UrlOptions, c as ReplaceOptions, d as StorageClient, f as StoredObject, g as TransformOptions, h as TTL, i as BucketConfig, l as ReplaceResult, m as SweepResult, n as Bucket, o as BucketPolicy, p as SweepOptions, r as BucketClient, s as ObjectTarget, t as ActualBucket, u as Reservation, v as UploadBody, x as defineBucket, y as UploadOptions } from "../index-CTTMS6_1.js";
|
|
6
|
+
export { type ActualBucket, type Bucket, type BucketClient, type BucketConfig, type BucketDrift, type BucketPolicy, type ObjectTarget, type PathIn, type PermdockBucketPolicy, type PermdockCatalog, type ReplaceOptions, type ReplaceResult, type Reservation, type StorageClient, type StoragePath, type StoredObject, type SweepOptions, type SweepResult, TTL, type TemplateParams, type TemplateValues, type TransformOptions, type TtlPreset, type UploadBody, type UploadOptions, type UrlOptions, defineBucket, fromStorageError, parseSize };
|