@authhero/kysely-adapter 0.17.0 → 0.19.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.
@@ -1490,6 +1490,7 @@ declare const loginInsertSchema: z.ZodObject<{
1490
1490
  authParams: z.ZodObject<{
1491
1491
  client_id: z.ZodString;
1492
1492
  vendor_id: z.ZodOptional<z.ZodString>;
1493
+ act_as: z.ZodOptional<z.ZodString>;
1493
1494
  response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
1494
1495
  response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
1495
1496
  redirect_uri: z.ZodOptional<z.ZodString>;
@@ -1507,6 +1508,7 @@ declare const loginInsertSchema: z.ZodObject<{
1507
1508
  username?: string | undefined;
1508
1509
  audience?: string | undefined;
1509
1510
  vendor_id?: string | undefined;
1511
+ act_as?: string | undefined;
1510
1512
  response_type?: AuthorizationResponseType | undefined;
1511
1513
  response_mode?: AuthorizationResponseMode | undefined;
1512
1514
  redirect_uri?: string | undefined;
@@ -1522,6 +1524,7 @@ declare const loginInsertSchema: z.ZodObject<{
1522
1524
  username?: string | undefined;
1523
1525
  audience?: string | undefined;
1524
1526
  vendor_id?: string | undefined;
1527
+ act_as?: string | undefined;
1525
1528
  response_type?: AuthorizationResponseType | undefined;
1526
1529
  response_mode?: AuthorizationResponseMode | undefined;
1527
1530
  redirect_uri?: string | undefined;
@@ -1543,6 +1546,7 @@ declare const loginInsertSchema: z.ZodObject<{
1543
1546
  username?: string | undefined;
1544
1547
  audience?: string | undefined;
1545
1548
  vendor_id?: string | undefined;
1549
+ act_as?: string | undefined;
1546
1550
  response_type?: AuthorizationResponseType | undefined;
1547
1551
  response_mode?: AuthorizationResponseMode | undefined;
1548
1552
  redirect_uri?: string | undefined;
@@ -1564,6 +1568,7 @@ declare const loginInsertSchema: z.ZodObject<{
1564
1568
  username?: string | undefined;
1565
1569
  audience?: string | undefined;
1566
1570
  vendor_id?: string | undefined;
1571
+ act_as?: string | undefined;
1567
1572
  response_type?: AuthorizationResponseType | undefined;
1568
1573
  response_mode?: AuthorizationResponseMode | undefined;
1569
1574
  redirect_uri?: string | undefined;
@@ -1588,6 +1593,7 @@ declare const loginSchema: z.ZodObject<{
1588
1593
  authParams: z.ZodObject<{
1589
1594
  client_id: z.ZodString;
1590
1595
  vendor_id: z.ZodOptional<z.ZodString>;
1596
+ act_as: z.ZodOptional<z.ZodString>;
1591
1597
  response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
1592
1598
  response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
1593
1599
  redirect_uri: z.ZodOptional<z.ZodString>;
@@ -1605,6 +1611,7 @@ declare const loginSchema: z.ZodObject<{
1605
1611
  username?: string | undefined;
1606
1612
  audience?: string | undefined;
1607
1613
  vendor_id?: string | undefined;
1614
+ act_as?: string | undefined;
1608
1615
  response_type?: AuthorizationResponseType | undefined;
1609
1616
  response_mode?: AuthorizationResponseMode | undefined;
1610
1617
  redirect_uri?: string | undefined;
@@ -1620,6 +1627,7 @@ declare const loginSchema: z.ZodObject<{
1620
1627
  username?: string | undefined;
1621
1628
  audience?: string | undefined;
1622
1629
  vendor_id?: string | undefined;
1630
+ act_as?: string | undefined;
1623
1631
  response_type?: AuthorizationResponseType | undefined;
1624
1632
  response_mode?: AuthorizationResponseMode | undefined;
1625
1633
  redirect_uri?: string | undefined;
@@ -1644,6 +1652,7 @@ declare const loginSchema: z.ZodObject<{
1644
1652
  username?: string | undefined;
1645
1653
  audience?: string | undefined;
1646
1654
  vendor_id?: string | undefined;
1655
+ act_as?: string | undefined;
1647
1656
  response_type?: AuthorizationResponseType | undefined;
1648
1657
  response_mode?: AuthorizationResponseMode | undefined;
1649
1658
  redirect_uri?: string | undefined;
@@ -1668,6 +1677,7 @@ declare const loginSchema: z.ZodObject<{
1668
1677
  username?: string | undefined;
1669
1678
  audience?: string | undefined;
1670
1679
  vendor_id?: string | undefined;
1680
+ act_as?: string | undefined;
1671
1681
  response_type?: AuthorizationResponseType | undefined;
1672
1682
  response_mode?: AuthorizationResponseMode | undefined;
1673
1683
  redirect_uri?: string | undefined;
@@ -3112,6 +3112,7 @@ var ur = /* @__PURE__ */ ((t) => (t.TOKEN = "token", t.TOKEN_ID_TOKEN = "token i
3112
3112
  const hs = i.object({
3113
3113
  client_id: i.string(),
3114
3114
  vendor_id: i.string().optional(),
3115
+ act_as: i.string().optional(),
3115
3116
  response_type: i.nativeEnum(ur).optional(),
3116
3117
  response_mode: i.nativeEnum(hr).optional(),
3117
3118
  redirect_uri: i.string().optional(),
@@ -9681,6 +9682,17 @@ const Hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9681
9682
  __proto__: null,
9682
9683
  down: Gu,
9683
9684
  up: Qu
9685
+ }, Symbol.toStringTag, { value: "Module" }));
9686
+ async function Yu(t) {
9687
+ await t.schema.alterTable("logins").addColumn("authParams_act_as", "varchar(255)").execute();
9688
+ }
9689
+ async function Xu(t) {
9690
+ await t.schema.alterTable("logins").dropColumn("authParam_act_as").execute();
9691
+ }
9692
+ const eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9693
+ __proto__: null,
9694
+ down: Xu,
9695
+ up: Yu
9684
9696
  }, Symbol.toStringTag, { value: "Module" })), Qr = {
9685
9697
  m1_init: Od,
9686
9698
  m2_magicLink: Id,
@@ -9744,9 +9756,10 @@ const Hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9744
9756
  n60_users_metadata: Fu,
9745
9757
  n61_userLocales: Ku,
9746
9758
  n62_prompt: qu,
9747
- n63_connection_cleanup: Hu
9759
+ n63_connection_cleanup: Hu,
9760
+ n64_act_as: eh
9748
9761
  };
9749
- async function Xu(t, e = !1) {
9762
+ async function nh(t, e = !1) {
9750
9763
  e && console.log("migrating...");
9751
9764
  const n = new qr(Qr), r = new $r({
9752
9765
  db: t,
@@ -9759,7 +9772,7 @@ async function Xu(t, e = !1) {
9759
9772
  }), a)
9760
9773
  throw console.error("failed to migrate"), console.error(a), a;
9761
9774
  }
9762
- async function eh(t) {
9775
+ async function rh(t) {
9763
9776
  console.log("migrating...");
9764
9777
  const e = new qr(Qr), n = new $r({
9765
9778
  db: t,
@@ -9770,7 +9783,7 @@ async function eh(t) {
9770
9783
  }), r)
9771
9784
  throw console.error("failed to migrate"), console.error(r), r;
9772
9785
  }
9773
- function th(t) {
9786
+ function ah(t) {
9774
9787
  return {
9775
9788
  applications: Ti(t),
9776
9789
  branding: Qo(t),
@@ -9792,7 +9805,7 @@ function th(t) {
9792
9805
  };
9793
9806
  }
9794
9807
  export {
9795
- th as default,
9796
- eh as migrateDown,
9797
- Xu as migrateToLatest
9808
+ ah as default,
9809
+ rh as migrateDown,
9810
+ nh as migrateToLatest
9798
9811
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/markusahlstrand/authhero"
13
13
  },
14
- "version": "0.17.0",
14
+ "version": "0.19.0",
15
15
  "files": [
16
16
  "dist"
17
17
  ],
@@ -26,22 +26,29 @@
26
26
  }
27
27
  },
28
28
  "devDependencies": {
29
+ "@hono/zod-openapi": "^0.18.0",
29
30
  "@rollup/plugin-commonjs": "^28.0.1",
30
31
  "@rollup/plugin-node-resolve": "^15.3.0",
31
- "@types/node": "^22.8.6",
32
+ "@types/node": "^22.9.1",
33
+ "hono": "^4.6.11",
34
+ "kysely-bun-sqlite": "^0.3.2",
35
+ "kysely-planetscale": "^1.5.0",
32
36
  "dts-bundle-generator": "^9.5.1",
33
37
  "typescript": "^5.6.3",
34
- "vite": "^5.4.10",
35
- "vitest": "^2.1.4"
38
+ "vite": "^5.4.11",
39
+ "vitest": "^2.1.5",
40
+ "@authhero/adapter-interfaces": "^0.22.1"
36
41
  },
37
42
  "dependencies": {
43
+ "kysely": "^0.27.4",
44
+ "nanoid": "^5.0.8"
45
+ },
46
+ "peerDependencies": {
38
47
  "@hono/zod-openapi": "^0.16.4",
39
48
  "hono": "^4.6.8",
40
- "kysely": "^0.27.4",
41
49
  "kysely-bun-sqlite": "^0.3.2",
42
50
  "kysely-planetscale": "^1.5.0",
43
- "nanoid": "^5.0.8",
44
- "@authhero/adapter-interfaces": "^0.20.3"
51
+ "@authhero/adapter-interfaces": "^0.22.1"
45
52
  },
46
53
  "scripts": {
47
54
  "build": "tsc && vite build && dts-bundle-generator --config ./dts-bundle-generator.config.ts",