@authhero/kysely-adapter 11.8.9 → 11.8.10
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/kysely-adapter.mjs
CHANGED
|
@@ -472,7 +472,7 @@ function Te(e) {
|
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
474
|
//#endregion
|
|
475
|
-
//#region ../../node_modules/.pnpm/hono@4.12.
|
|
475
|
+
//#region ../../node_modules/.pnpm/hono@4.12.27/node_modules/hono/dist/http-exception.js
|
|
476
476
|
var D = class extends Error {
|
|
477
477
|
res;
|
|
478
478
|
status;
|
|
@@ -1609,7 +1609,7 @@ function It(e) {
|
|
|
1609
1609
|
//#region src/clients/list.ts
|
|
1610
1610
|
function Lt(e) {
|
|
1611
1611
|
return async (t, n) => {
|
|
1612
|
-
let r = e.selectFrom("clients").where("clients.tenant_id", "=", t), i = new Set(["owner_user_id", "registration_type"]);
|
|
1612
|
+
let r = e.selectFrom("clients").where("clients.tenant_id", "=", t), i = /* @__PURE__ */ new Set(["owner_user_id", "registration_type"]);
|
|
1613
1613
|
if (n?.q) {
|
|
1614
1614
|
let e = n.q.trim().match(/^([a-zA-Z_][a-zA-Z0-9_]*):"?([^"]*)"?$/);
|
|
1615
1615
|
if (e && i.has(e[1]) && e[2]) {
|
|
@@ -3482,7 +3482,7 @@ function Zr(e) {
|
|
|
3482
3482
|
return async (n, r) => {
|
|
3483
3483
|
let i = (/* @__PURE__ */ new Date()).toISOString(), a = r.scope ?? [], o = r.audience ?? "", s = await e.selectFrom("grants").where("tenant_id", "=", n).where("user_id", "=", r.user_id).where("client_id", "=", r.clientID).where("audience", "=", o).selectAll().executeTakeFirst();
|
|
3484
3484
|
if (s) {
|
|
3485
|
-
let t = s.scope ? JSON.parse(s.scope) : [], r = Array.from(new Set([...t, ...a]));
|
|
3485
|
+
let t = s.scope ? JSON.parse(s.scope) : [], r = Array.from(/* @__PURE__ */ new Set([...t, ...a]));
|
|
3486
3486
|
return await e.updateTable("grants").set({
|
|
3487
3487
|
scope: JSON.stringify(r),
|
|
3488
3488
|
updated_at: i
|
|
@@ -4950,29 +4950,32 @@ function ba(e) {
|
|
|
4950
4950
|
};
|
|
4951
4951
|
}
|
|
4952
4952
|
//#endregion
|
|
4953
|
+
//#region ../../node_modules/.pnpm/kysely@0.29.2/node_modules/kysely/dist/plugin/noop-plugin.js
|
|
4954
|
+
var xa = class {
|
|
4955
|
+
transformQuery(e) {
|
|
4956
|
+
return e.node;
|
|
4957
|
+
}
|
|
4958
|
+
async transformResult(e) {
|
|
4959
|
+
return e.result;
|
|
4960
|
+
}
|
|
4961
|
+
};
|
|
4962
|
+
//#endregion
|
|
4953
4963
|
//#region ../../node_modules/.pnpm/kysely@0.29.2/node_modules/kysely/dist/util/object-utils.js
|
|
4954
|
-
function
|
|
4964
|
+
function Sa(e) {
|
|
4955
4965
|
return typeof e == "string";
|
|
4956
4966
|
}
|
|
4957
|
-
function
|
|
4967
|
+
function Ca(e) {
|
|
4958
4968
|
return typeof e == "object" && !!e;
|
|
4959
4969
|
}
|
|
4960
|
-
function
|
|
4970
|
+
function wa(e) {
|
|
4961
4971
|
return e[e.length - 1];
|
|
4962
4972
|
}
|
|
4963
4973
|
function U(e) {
|
|
4964
4974
|
return Object.freeze(e);
|
|
4965
4975
|
}
|
|
4966
4976
|
//#endregion
|
|
4967
|
-
//#region ../../node_modules/.pnpm/kysely@0.29.2/node_modules/kysely/dist/
|
|
4968
|
-
var
|
|
4969
|
-
transformQuery(e) {
|
|
4970
|
-
return e.node;
|
|
4971
|
-
}
|
|
4972
|
-
async transformResult(e) {
|
|
4973
|
-
return e.result;
|
|
4974
|
-
}
|
|
4975
|
-
}, Ta = U({
|
|
4977
|
+
//#region ../../node_modules/.pnpm/kysely@0.29.2/node_modules/kysely/dist/operation-node/alias-node.js
|
|
4978
|
+
var Ta = U({
|
|
4976
4979
|
is(e) {
|
|
4977
4980
|
return e.kind === "AliasNode";
|
|
4978
4981
|
},
|
|
@@ -5976,7 +5979,7 @@ var wa = class {
|
|
|
5976
5979
|
//#endregion
|
|
5977
5980
|
//#region ../../node_modules/.pnpm/kysely@0.29.2/node_modules/kysely/dist/operation-node/operation-node.js
|
|
5978
5981
|
function Ma(e) {
|
|
5979
|
-
return
|
|
5982
|
+
return Ca(e) && Sa(e.kind);
|
|
5980
5983
|
}
|
|
5981
5984
|
//#endregion
|
|
5982
5985
|
//#region ../../node_modules/.pnpm/kysely@0.29.2/node_modules/kysely/dist/operation-node/root-operation-node.js
|
|
@@ -6195,7 +6198,7 @@ var Va = class {
|
|
|
6195
6198
|
}
|
|
6196
6199
|
async migrateTo(e, t) {
|
|
6197
6200
|
return this.#t(({ migrations: t, executedMigrations: n, pendingMigrations: r }) => {
|
|
6198
|
-
if (
|
|
6201
|
+
if (Ca(e) && e.__noMigrations__ === !0) return {
|
|
6199
6202
|
direction: "Down",
|
|
6200
6203
|
step: Infinity
|
|
6201
6204
|
};
|
|
@@ -6244,7 +6247,7 @@ var Va = class {
|
|
|
6244
6247
|
return this.#e.allowUnorderedMigrations ?? !1;
|
|
6245
6248
|
}
|
|
6246
6249
|
get #o() {
|
|
6247
|
-
return this.#n ? new za(this.#n) : new
|
|
6250
|
+
return this.#n ? new za(this.#n) : new xa();
|
|
6248
6251
|
}
|
|
6249
6252
|
async #s() {
|
|
6250
6253
|
if (this.#n && !await this.#d()) try {
|
|
@@ -6317,7 +6320,7 @@ var Va = class {
|
|
|
6317
6320
|
return U({
|
|
6318
6321
|
migrations: t,
|
|
6319
6322
|
executedMigrations: n,
|
|
6320
|
-
lastMigration:
|
|
6323
|
+
lastMigration: wa(n),
|
|
6321
6324
|
pendingMigrations: r
|
|
6322
6325
|
});
|
|
6323
6326
|
}
|