@sharadox/account-web-library 0.1.0-development.0 → 0.1.0-development.15

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.
Files changed (138) hide show
  1. package/README.md +103 -3
  2. package/distribution/account-database/type.d.ts +94 -0
  3. package/distribution/account-database/type.d.ts.map +1 -0
  4. package/distribution/account-database/type.js +2 -0
  5. package/distribution/account-database/type.js.map +1 -0
  6. package/distribution/account-migration/index.d.ts +18 -0
  7. package/distribution/account-migration/index.d.ts.map +1 -0
  8. package/distribution/account-migration/index.js +146 -0
  9. package/distribution/account-migration/index.js.map +1 -0
  10. package/distribution/account-session-revocation/index.d.ts +14 -0
  11. package/distribution/account-session-revocation/index.d.ts.map +1 -0
  12. package/distribution/account-session-revocation/index.js +25 -0
  13. package/distribution/account-session-revocation/index.js.map +1 -0
  14. package/distribution/account-sign-in/index.d.ts +15 -0
  15. package/distribution/account-sign-in/index.d.ts.map +1 -0
  16. package/distribution/account-sign-in/index.js +76 -0
  17. package/distribution/account-sign-in/index.js.map +1 -0
  18. package/distribution/account-sign-in/type.d.ts +20 -0
  19. package/distribution/account-sign-in/type.d.ts.map +1 -0
  20. package/distribution/account-sign-in/type.js +2 -0
  21. package/distribution/account-sign-in/type.js.map +1 -0
  22. package/distribution/account-sign-out/index.d.ts +16 -0
  23. package/distribution/account-sign-out/index.d.ts.map +1 -0
  24. package/distribution/account-sign-out/index.js +34 -0
  25. package/distribution/account-sign-out/index.js.map +1 -0
  26. package/distribution/audit-event/index.d.ts +12 -0
  27. package/distribution/audit-event/index.d.ts.map +1 -0
  28. package/distribution/audit-event/index.js +25 -0
  29. package/distribution/audit-event/index.js.map +1 -0
  30. package/distribution/audit-event/type.d.ts +15 -0
  31. package/distribution/audit-event/type.d.ts.map +1 -0
  32. package/distribution/audit-event/type.js +2 -0
  33. package/distribution/audit-event/type.js.map +1 -0
  34. package/distribution/browser-session-read/index.d.ts +17 -0
  35. package/distribution/browser-session-read/index.d.ts.map +1 -0
  36. package/distribution/browser-session-read/index.js +48 -0
  37. package/distribution/browser-session-read/index.js.map +1 -0
  38. package/distribution/browser-session-read/type.d.ts +14 -0
  39. package/distribution/browser-session-read/type.d.ts.map +1 -0
  40. package/distribution/browser-session-read/type.js +2 -0
  41. package/distribution/browser-session-read/type.js.map +1 -0
  42. package/distribution/code-request/index.d.ts +16 -0
  43. package/distribution/code-request/index.d.ts.map +1 -0
  44. package/distribution/code-request/index.js +52 -0
  45. package/distribution/code-request/index.js.map +1 -0
  46. package/distribution/code-request/type.d.ts +25 -0
  47. package/distribution/code-request/type.d.ts.map +1 -0
  48. package/distribution/code-request/type.js +2 -0
  49. package/distribution/code-request/type.js.map +1 -0
  50. package/distribution/code-request-prune/index.d.ts +13 -0
  51. package/distribution/code-request-prune/index.d.ts.map +1 -0
  52. package/distribution/code-request-prune/index.js +12 -0
  53. package/distribution/code-request-prune/index.js.map +1 -0
  54. package/distribution/code-verification/index.d.ts +14 -0
  55. package/distribution/code-verification/index.d.ts.map +1 -0
  56. package/distribution/code-verification/index.js +43 -0
  57. package/distribution/code-verification/index.js.map +1 -0
  58. package/distribution/code-verification/type.d.ts +22 -0
  59. package/distribution/code-verification/type.d.ts.map +1 -0
  60. package/distribution/code-verification/type.js +2 -0
  61. package/distribution/code-verification/type.js.map +1 -0
  62. package/distribution/contact-addition/index.d.ts +13 -0
  63. package/distribution/contact-addition/index.d.ts.map +1 -0
  64. package/distribution/contact-addition/index.js +48 -0
  65. package/distribution/contact-addition/index.js.map +1 -0
  66. package/distribution/contact-addition/type.d.ts +15 -0
  67. package/distribution/contact-addition/type.d.ts.map +1 -0
  68. package/distribution/contact-addition/type.js +2 -0
  69. package/distribution/contact-addition/type.js.map +1 -0
  70. package/distribution/contact-channel/type.d.ts +20 -0
  71. package/distribution/contact-channel/type.d.ts.map +1 -0
  72. package/distribution/contact-channel/type.js +2 -0
  73. package/distribution/contact-channel/type.js.map +1 -0
  74. package/distribution/contact-kind/index.d.ts +12 -0
  75. package/distribution/contact-kind/index.d.ts.map +1 -0
  76. package/distribution/contact-kind/index.js +18 -0
  77. package/distribution/contact-kind/index.js.map +1 -0
  78. package/distribution/contact-kind/type.d.ts +6 -0
  79. package/distribution/contact-kind/type.d.ts.map +1 -0
  80. package/distribution/contact-kind/type.js +2 -0
  81. package/distribution/contact-kind/type.js.map +1 -0
  82. package/distribution/contact-lookup/index.d.ts +16 -0
  83. package/distribution/contact-lookup/index.d.ts.map +1 -0
  84. package/distribution/contact-lookup/index.js +20 -0
  85. package/distribution/contact-lookup/index.js.map +1 -0
  86. package/distribution/contact-removal/index.d.ts +19 -0
  87. package/distribution/contact-removal/index.d.ts.map +1 -0
  88. package/distribution/contact-removal/index.js +35 -0
  89. package/distribution/contact-removal/index.js.map +1 -0
  90. package/distribution/contact-verification/index.d.ts +20 -0
  91. package/distribution/contact-verification/index.d.ts.map +1 -0
  92. package/distribution/contact-verification/index.js +37 -0
  93. package/distribution/contact-verification/index.js.map +1 -0
  94. package/distribution/database-error/index.d.ts +12 -0
  95. package/distribution/database-error/index.d.ts.map +1 -0
  96. package/distribution/database-error/index.js +14 -0
  97. package/distribution/database-error/index.js.map +1 -0
  98. package/distribution/email-channel/index.d.ts +13 -0
  99. package/distribution/email-channel/index.d.ts.map +1 -0
  100. package/distribution/email-channel/index.js +90 -0
  101. package/distribution/email-channel/index.js.map +1 -0
  102. package/distribution/email-channel/type.d.ts +17 -0
  103. package/distribution/email-channel/type.d.ts.map +1 -0
  104. package/distribution/email-channel/type.js +2 -0
  105. package/distribution/email-channel/type.js.map +1 -0
  106. package/distribution/person-account/index.d.ts +14 -0
  107. package/distribution/person-account/index.d.ts.map +1 -0
  108. package/distribution/person-account/index.js +45 -0
  109. package/distribution/person-account/index.js.map +1 -0
  110. package/distribution/person-account/type.d.ts +17 -0
  111. package/distribution/person-account/type.d.ts.map +1 -0
  112. package/distribution/person-account/type.js +2 -0
  113. package/distribution/person-account/type.js.map +1 -0
  114. package/distribution/session-prune/index.d.ts +17 -0
  115. package/distribution/session-prune/index.d.ts.map +1 -0
  116. package/distribution/session-prune/index.js +30 -0
  117. package/distribution/session-prune/index.js.map +1 -0
  118. package/distribution/session-token/index.d.ts +19 -0
  119. package/distribution/session-token/index.d.ts.map +1 -0
  120. package/distribution/session-token/index.js +22 -0
  121. package/distribution/session-token/index.js.map +1 -0
  122. package/distribution/test-database/index.d.ts +13 -0
  123. package/distribution/test-database/index.d.ts.map +1 -0
  124. package/distribution/test-database/index.js +17 -0
  125. package/distribution/test-database/index.js.map +1 -0
  126. package/distribution/username-availability/index.d.ts +11 -0
  127. package/distribution/username-availability/index.d.ts.map +1 -0
  128. package/distribution/username-availability/index.js +21 -0
  129. package/distribution/username-availability/index.js.map +1 -0
  130. package/distribution/username-change/index.d.ts +15 -0
  131. package/distribution/username-change/index.d.ts.map +1 -0
  132. package/distribution/username-change/index.js +39 -0
  133. package/distribution/username-change/index.js.map +1 -0
  134. package/distribution/username-change/type.d.ts +7 -0
  135. package/distribution/username-change/type.d.ts.map +1 -0
  136. package/distribution/username-change/type.js +2 -0
  137. package/distribution/username-change/type.js.map +1 -0
  138. package/package.json +19 -17
@@ -0,0 +1,22 @@
1
+ import { createHash, randomBytes } from "node:crypto";
2
+ /**
3
+ * A new session token (256 random bits, base64url) for a cookie, and the hash to store instead: a leaked table gives
4
+ * no sessions. A plain SHA-256 is enough for tokens this random.
5
+ *
6
+ * @example
7
+ * const { token, hash } = createSessionToken();
8
+ */
9
+ export function createSessionToken() {
10
+ const token = randomBytes(32).toString("base64url");
11
+ return { token, hash: hashSessionToken(token) };
12
+ }
13
+ /**
14
+ * The stored form of a session token.
15
+ *
16
+ * @example
17
+ * hashSessionToken(cookie); // compare with browser_session.token_hash
18
+ */
19
+ export function hashSessionToken(token) {
20
+ return createHash("sha256").update(token).digest("base64url");
21
+ }
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/session-token/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,KAAK,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACpD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;AAClD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAChE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { MemoryDatabase } from "@sharadox/database-web-library/memory-database/type";
2
+ import type { AccountDatabase } from "@sharadox/account-web-library/account-database/type";
3
+ /**
4
+ * A migrated account database in memory, for this library's tests (and applications' own): Postgres 18 through
5
+ * PGlite, so every constraint and trigger runs as in production.
6
+ *
7
+ * @example
8
+ * const memory = await createTestAccountDatabase();
9
+ * // … test …
10
+ * await memory.close();
11
+ */
12
+ export declare function createTestAccountDatabase(): Promise<MemoryDatabase<AccountDatabase>>;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/test-database/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AAC1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AAG3F;;;;;;;;GAQG;AACH,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,CAI1F"}
@@ -0,0 +1,17 @@
1
+ import { createMemoryDatabase } from "@sharadox/database-web-library/memory-database";
2
+ import { migrateAccount } from "@sharadox/account-web-library/account-migration";
3
+ /**
4
+ * A migrated account database in memory, for this library's tests (and applications' own): Postgres 18 through
5
+ * PGlite, so every constraint and trigger runs as in production.
6
+ *
7
+ * @example
8
+ * const memory = await createTestAccountDatabase();
9
+ * // … test …
10
+ * await memory.close();
11
+ */
12
+ export async function createTestAccountDatabase() {
13
+ const memory = await createMemoryDatabase();
14
+ await migrateAccount(memory.database);
15
+ return memory;
16
+ }
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/test-database/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAGtF,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB;IAC7C,MAAM,MAAM,GAAG,MAAM,oBAAoB,EAAmB,CAAC;IAC7D,MAAM,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type Kysely } from "kysely";
2
+ import type { AccountDatabase } from "@sharadox/account-web-library/account-database/type";
3
+ /**
4
+ * Whether a username can be taken: `available`, `taken` (in any case: `aBc` is taken when `abc` exists) or `invalid`
5
+ * (outside the rules). Rate limit callers: it tells whether an account exists.
6
+ *
7
+ * @example
8
+ * await usernameAvailability(database, "Luis-Pires"); // "available"
9
+ */
10
+ export declare function usernameAvailability(database: Kysely<AccountDatabase>, username: string): Promise<"available" | "taken" | "invalid">;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/username-availability/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AAG3F;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,MAAM,CAAC,eAAe,CAAC,EACjC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,GAAG,OAAO,GAAG,SAAS,CAAC,CAS5C"}
@@ -0,0 +1,21 @@
1
+ import { sql } from "kysely";
2
+ import { checkUsername } from "@sharadox/account-web-library/username";
3
+ /**
4
+ * Whether a username can be taken: `available`, `taken` (in any case: `aBc` is taken when `abc` exists) or `invalid`
5
+ * (outside the rules). Rate limit callers: it tells whether an account exists.
6
+ *
7
+ * @example
8
+ * await usernameAvailability(database, "Luis-Pires"); // "available"
9
+ */
10
+ export async function usernameAvailability(database, username) {
11
+ const check = checkUsername(username);
12
+ if (!check.valid)
13
+ return "invalid";
14
+ const found = await database
15
+ .selectFrom("account")
16
+ .select("id")
17
+ .where(sql `lower(username)`, "=", check.key)
18
+ .executeTakeFirst();
19
+ return found ? "taken" : "available";
20
+ }
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/username-availability/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAe,MAAM,QAAQ,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,QAAiC,EACjC,QAAgB;IAEhB,MAAM,KAAK,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;IACtC,IAAI,CAAC,KAAK,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IACnC,MAAM,KAAK,GAAG,MAAM,QAAQ;SACzB,UAAU,CAAC,SAAS,CAAC;SACrB,MAAM,CAAC,IAAI,CAAC;SACZ,KAAK,CAAC,GAAG,CAAQ,iBAAiB,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC;SACnD,gBAAgB,EAAE,CAAC;IACtB,OAAO,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC;AACvC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { Kysely } from "kysely";
2
+ import type { AccountDatabase } from "@sharadox/account-web-library/account-database/type";
3
+ import type { UsernameChangeResult } from "@sharadox/account-web-library/username-change/type";
4
+ /**
5
+ * Changes an account's username whenever its owner wants; the old one is free for anyone at once. Accounts are
6
+ * referenced by id, so nothing breaks; the audit log keeps the history. Changing only the case is allowed.
7
+ *
8
+ * @example
9
+ * await changeUsername(database, { accountId, username: "Luis-Pires" }); // { changed: true }
10
+ */
11
+ export declare function changeUsername(database: Kysely<AccountDatabase>, { accountId, username }: {
12
+ accountId: string;
13
+ username: string;
14
+ }): Promise<UsernameChangeResult>;
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/username-change/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AAI3F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAE/F;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,QAAQ,EAAE,MAAM,CAAC,eAAe,CAAC,EACjC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC/D,OAAO,CAAC,oBAAoB,CAAC,CAwB/B"}
@@ -0,0 +1,39 @@
1
+ import { recordAuditEvent } from "@sharadox/account-web-library/audit-event";
2
+ import { databaseError } from "@sharadox/account-web-library/database-error";
3
+ import { checkUsername } from "@sharadox/account-web-library/username";
4
+ /**
5
+ * Changes an account's username whenever its owner wants; the old one is free for anyone at once. Accounts are
6
+ * referenced by id, so nothing breaks; the audit log keeps the history. Changing only the case is allowed.
7
+ *
8
+ * @example
9
+ * await changeUsername(database, { accountId, username: "Luis-Pires" }); // { changed: true }
10
+ */
11
+ export async function changeUsername(database, { accountId, username }) {
12
+ if (!checkUsername(username).valid)
13
+ return { changed: false, reason: "username-invalid" };
14
+ try {
15
+ return await database.transaction().execute(async (transaction) => {
16
+ const current = await transaction
17
+ .selectFrom("account")
18
+ .select("username")
19
+ .where("id", "=", accountId)
20
+ .forUpdate()
21
+ .executeTakeFirst();
22
+ if (!current)
23
+ return { changed: false, reason: "no-account" };
24
+ await transaction.updateTable("account").set({ username }).where("id", "=", accountId).execute();
25
+ await recordAuditEvent(transaction, {
26
+ accountId,
27
+ action: "account.username-changed",
28
+ detail: { from: current.username, to: username },
29
+ });
30
+ return { changed: true };
31
+ });
32
+ }
33
+ catch (error) {
34
+ if (databaseError(error)?.constraint === "account_username_key")
35
+ return { changed: false, reason: "username-taken" };
36
+ throw error;
37
+ }
38
+ }
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/username-change/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAGvE;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,QAAiC,EACjC,EAAE,SAAS,EAAE,QAAQ,EAA2C;IAEhE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,KAAK;QAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC1F,IAAI,CAAC;QACH,OAAO,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,EAAiC,EAAE;YAC/F,MAAM,OAAO,GAAG,MAAM,WAAW;iBAC9B,UAAU,CAAC,SAAS,CAAC;iBACrB,MAAM,CAAC,UAAU,CAAC;iBAClB,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,CAAC;iBAC3B,SAAS,EAAE;iBACX,gBAAgB,EAAE,CAAC;YACtB,IAAI,CAAC,OAAO;gBAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;YAC9D,MAAM,WAAW,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC;YACjG,MAAM,gBAAgB,CAAC,WAAW,EAAE;gBAClC,SAAS;gBACT,MAAM,EAAE,0BAA0B;gBAClC,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE;aACjD,CAAC,CAAC;YACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,UAAU,KAAK,sBAAsB;YAC7D,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;QACtD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ export type UsernameChangeResult = {
2
+ changed: true;
3
+ } | {
4
+ changed: false;
5
+ reason: "username-invalid" | "username-taken" | "no-account";
6
+ };
7
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/username-change/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAC9B;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,kBAAkB,GAAG,gBAAgB,GAAG,YAAY,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/username-change/type.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sharadox/account-web-library",
3
- "version": "0.1.0-development.0",
3
+ "version": "0.1.0-development.15",
4
4
  "description": "Passwordless accounts for web applications: one-time codes, two-factor, roles, bans and OpenID Connect for people and agents.",
5
5
  "private": false,
6
6
  "license": "SEE LICENSE IN LICENCA.md",
@@ -29,22 +29,9 @@
29
29
  "engines": {
30
30
  "node": ">=26"
31
31
  },
32
- "packageManager": "pnpm@10.34.9",
33
32
  "publishConfig": {
34
33
  "access": "public"
35
34
  },
36
- "scripts": {
37
- "build": "library-build",
38
- "lint": "eslint --max-warnings=0 .",
39
- "format": "prettier --write .",
40
- "format:check": "prettier --check .",
41
- "type-check": "tsc --noEmit",
42
- "test:unit": "vitest run --coverage",
43
- "test:benchmark": "vitest bench --run --passWithNoTests",
44
- "documentation": "typedoc",
45
- "verify": "turbo run format:check lint type-check test:unit test:benchmark build",
46
- "prepare": "turborepo-configuration library && (husky || true)"
47
- },
48
35
  "lint-staged": {
49
36
  "*.{ts,js,mjs,cjs}": [
50
37
  "prettier --write",
@@ -53,9 +40,13 @@
53
40
  "*.{json,md,yml,yaml}": "prettier --write"
54
41
  },
55
42
  "dependencies": {
56
- "@sharadox/web-library": "^0.11.1"
43
+ "@sharadox/database-web-library": "0.1.0-development.6",
44
+ "@sharadox/email-web-library": "^0.7.1",
45
+ "@sharadox/web-library": "^0.11.1",
46
+ "kysely": "^0.28.20"
57
47
  },
58
48
  "devDependencies": {
49
+ "@electric-sql/pglite": "0.5.16",
59
50
  "@sharadox/es-lint-configuration-web-library": "^0.1.3",
60
51
  "@sharadox/library-build-web-library": "^0.2.1",
61
52
  "@sharadox/prettier-configuration-web-library": "^0.1.2",
@@ -88,5 +79,16 @@
88
79
  "openid-connect",
89
80
  "oauth",
90
81
  "roles"
91
- ]
92
- }
82
+ ],
83
+ "scripts": {
84
+ "build": "library-build",
85
+ "lint": "eslint --max-warnings=0 .",
86
+ "format": "prettier --write .",
87
+ "format:check": "prettier --check .",
88
+ "type-check": "tsc --noEmit",
89
+ "test:unit": "vitest run --coverage",
90
+ "test:benchmark": "vitest bench --run --passWithNoTests",
91
+ "documentation": "typedoc",
92
+ "verify": "turbo run format:check lint type-check test:unit test:benchmark build"
93
+ }
94
+ }