@michaelthielemann/kestrel-authn-multi 5.0.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/LICENSE +201 -0
- package/README.md +29 -0
- package/dist/impl.d.ts +47 -0
- package/dist/impl.js +193 -0
- package/dist/module.d.ts +246 -0
- package/dist/module.js +222 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +46 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# authn/multi
|
|
2
|
+
`authn@1` with users and sessions in `persistence@1` (`authn_users`, `authn_sessions`) – sessions
|
|
3
|
+
survive restarts. Passwords are scrypt hashes; `bootstrap` creates the first user when the user
|
|
4
|
+
collection is empty so a fresh install is not locked out. Identity claims: `{ username, roles }`.
|
|
5
|
+
Config: `identifier` (`username` | `email` – the credential field), `minPasswordLength`,
|
|
6
|
+
`sessionTtlSeconds`, `bootstrap { username, passwordHash, roles }`.
|
|
7
|
+
|
|
8
|
+
Every step returns a `Result`; `authn@1`'s own `login`/`resolve`/`logout` only ever answer
|
|
9
|
+
`Err(TRANSIENT)` (wrong credentials are `Ok(null)`). `createUser`, `setPassword`, `changePassword`,
|
|
10
|
+
`setActive`, `getUser`, `listUsers` and `cleanupSessions` beyond the contract can additionally
|
|
11
|
+
answer `VALIDATION`, `CONFLICT` or `NOT_FOUND`; a duplicate username is `CONFLICT` (409).
|
|
12
|
+
|
|
13
|
+
| Step | reads | writes | errors |
|
|
14
|
+
|---|---|---|---|
|
|
15
|
+
| `authn.login` | – | `token`, `identity`, `result` | `UNAUTHENTICATED`, `TRANSIENT` |
|
|
16
|
+
| `authn.identifyUser` | – | `token?`, `identity?` | `TRANSIENT` |
|
|
17
|
+
| `authn.requireUser` | – | `token`, `identity` | `UNAUTHENTICATED`, `TRANSIENT` |
|
|
18
|
+
| `authn.loadIdentity` | `identity` | `result` | `UNAUTHENTICATED` |
|
|
19
|
+
| `authn.logout` | `token` | `result` | `UNAUTHENTICATED`, `TRANSIENT` |
|
|
20
|
+
| `authn.createUser` | – | `result` | `VALIDATION`, `CONFLICT`, `TRANSIENT` |
|
|
21
|
+
| `authn.listUsers` | – | `result` | `TRANSIENT` |
|
|
22
|
+
| `authn.getUser` | `params.id` | `result` | `NOT_FOUND`, `TRANSIENT` |
|
|
23
|
+
| `authn.setPassword` | `params.id` | `result` | `VALIDATION`, `NOT_FOUND`, `TRANSIENT` |
|
|
24
|
+
| `authn.changePassword` | `identity` | `result` | `VALIDATION`, `UNAUTHENTICATED`, `TRANSIENT` |
|
|
25
|
+
| `authn.deactivateUser` | `params.id` | `result` | `VALIDATION` (self), `NOT_FOUND`, `TRANSIENT` |
|
|
26
|
+
| `authn.activateUser` | `params.id` | `result` | `NOT_FOUND`, `TRANSIENT` |
|
|
27
|
+
| `authn.cleanupSessions` | – | `result` | `TRANSIENT` |
|
|
28
|
+
|
|
29
|
+
Not included: self-service registration, password reset by mail, login rate limiting (pipeline concerns).
|
package/dist/impl.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Authn } from "@michaelthielemann/kestrel-contracts/authn";
|
|
2
|
+
import { type KestrelError, type Result } from "@michaelthielemann/kestrel-contracts/errors";
|
|
3
|
+
import type { Document, Persistence } from "@michaelthielemann/kestrel-contracts/persistence";
|
|
4
|
+
export declare const USERS = "authn_users";
|
|
5
|
+
export declare const SESSIONS = "authn_sessions";
|
|
6
|
+
export interface Config {
|
|
7
|
+
identifier: "username" | "email";
|
|
8
|
+
minPasswordLength: number;
|
|
9
|
+
sessionTtlSeconds: number;
|
|
10
|
+
bootstrap?: {
|
|
11
|
+
username: string;
|
|
12
|
+
passwordHash: string;
|
|
13
|
+
roles: string[];
|
|
14
|
+
} | undefined;
|
|
15
|
+
}
|
|
16
|
+
export interface User extends Document {
|
|
17
|
+
username: string;
|
|
18
|
+
passwordHash: string;
|
|
19
|
+
roles: string[];
|
|
20
|
+
active: boolean;
|
|
21
|
+
createdAt: number;
|
|
22
|
+
}
|
|
23
|
+
export interface PublicUser {
|
|
24
|
+
id: string;
|
|
25
|
+
username: string;
|
|
26
|
+
roles: string[];
|
|
27
|
+
active: boolean;
|
|
28
|
+
createdAt: number;
|
|
29
|
+
}
|
|
30
|
+
export type AuthnMultiError = KestrelError<"VALIDATION" | "CONFLICT" | "NOT_FOUND" | "TRANSIENT">;
|
|
31
|
+
export declare function hashPassword(password: string): string;
|
|
32
|
+
export declare function verifyPassword(password: string, stored: string): boolean;
|
|
33
|
+
export declare function tokenFromHeaders(headers: Record<string, string>): string | undefined;
|
|
34
|
+
export interface AuthnMulti extends Authn {
|
|
35
|
+
createUser(input: {
|
|
36
|
+
username: string;
|
|
37
|
+
password: string;
|
|
38
|
+
roles?: string[];
|
|
39
|
+
}): Promise<Result<PublicUser, AuthnMultiError>>;
|
|
40
|
+
listUsers(): Promise<Result<PublicUser[], AuthnMultiError>>;
|
|
41
|
+
getUser(id: string): Promise<Result<PublicUser | null, AuthnMultiError>>;
|
|
42
|
+
setPassword(id: string, password: string): Promise<Result<void, AuthnMultiError>>;
|
|
43
|
+
changePassword(id: string, current: string, next: string, keepToken?: string): Promise<Result<void, AuthnMultiError>>;
|
|
44
|
+
setActive(id: string, active: boolean): Promise<Result<void, AuthnMultiError>>;
|
|
45
|
+
cleanupSessions(): Promise<Result<number, AuthnMultiError>>;
|
|
46
|
+
}
|
|
47
|
+
export declare function createAuthnMulti(config: Config, db: Persistence, now?: () => number): Promise<AuthnMulti>;
|
package/dist/impl.js
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { randomBytes, randomUUID, scryptSync, timingSafeEqual } from "node:crypto";
|
|
2
|
+
import { err, failure, isErr, ok } from "@michaelthielemann/kestrel-contracts/errors";
|
|
3
|
+
export const USERS = "authn_users";
|
|
4
|
+
export const SESSIONS = "authn_sessions";
|
|
5
|
+
const KEY_LENGTH = 64;
|
|
6
|
+
export function hashPassword(password) {
|
|
7
|
+
const salt = randomBytes(16);
|
|
8
|
+
return `scrypt$${salt.toString("hex")}$${scryptSync(password, salt, KEY_LENGTH).toString("hex")}`;
|
|
9
|
+
}
|
|
10
|
+
export function verifyPassword(password, stored) {
|
|
11
|
+
const [algorithm, saltHex, hashHex] = stored.split("$");
|
|
12
|
+
if (algorithm !== "scrypt" || !saltHex || !hashHex)
|
|
13
|
+
throw new Error('authn/multi: passwordHash must look like "scrypt$<salt>$<hash>" (use hashPassword())');
|
|
14
|
+
const expected = Buffer.from(hashHex, "hex");
|
|
15
|
+
return timingSafeEqual(scryptSync(password, Buffer.from(saltHex, "hex"), expected.length), expected);
|
|
16
|
+
}
|
|
17
|
+
const BEARER = /^bearer /i;
|
|
18
|
+
export function tokenFromHeaders(headers) {
|
|
19
|
+
const auth = headers.authorization;
|
|
20
|
+
if (auth && BEARER.test(auth))
|
|
21
|
+
return auth.slice(7).trim();
|
|
22
|
+
for (const pair of (headers.cookie ?? "").split(";")) {
|
|
23
|
+
const [k, v] = pair.trim().split("=");
|
|
24
|
+
if (k === "kestrel_token" && v)
|
|
25
|
+
return decodeURIComponent(v);
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
function publicUser(user) {
|
|
30
|
+
return { id: user.id, username: user.username, roles: user.roles, active: user.active, createdAt: user.createdAt };
|
|
31
|
+
}
|
|
32
|
+
/** findOne/deleteOne calls in login/resolve/logout can only ever answer TRANSIENT; a CONFLICT or NOT_FOUND there is a persistence bug, not an authn@1 failure. */
|
|
33
|
+
function transientOnly(error) {
|
|
34
|
+
if (error.code !== "TRANSIENT")
|
|
35
|
+
throw new Error(`authn/multi: unexpected persistence error ${error.code}: ${error.message}`);
|
|
36
|
+
return error;
|
|
37
|
+
}
|
|
38
|
+
function checkPassword(config, password) {
|
|
39
|
+
return password.length < config.minPasswordLength ? err(failure("VALIDATION", `authn/multi: password must have at least ${config.minPasswordLength} characters`)) : ok();
|
|
40
|
+
}
|
|
41
|
+
export async function createAuthnMulti(config, db, now = Date.now) {
|
|
42
|
+
const usersReady = await db.ensureCollection(USERS, { username: { type: "string", unique: true }, passwordHash: "string", roles: "json", active: "boolean", createdAt: "number" });
|
|
43
|
+
if (isErr(usersReady))
|
|
44
|
+
throw new Error(`authn/multi: setup failed: ${usersReady.error.message}`);
|
|
45
|
+
const sessionsReady = await db.ensureCollection(SESSIONS, { userId: "string", expiresAt: "number" });
|
|
46
|
+
if (isErr(sessionsReady))
|
|
47
|
+
throw new Error(`authn/multi: setup failed: ${sessionsReady.error.message}`);
|
|
48
|
+
const identity = (user) => ({ id: user.id, claims: { username: user.username, roles: user.roles } });
|
|
49
|
+
const userById = async (id) => {
|
|
50
|
+
const found = await db.findOne(USERS, { id });
|
|
51
|
+
if (isErr(found))
|
|
52
|
+
return found;
|
|
53
|
+
if (!found.value)
|
|
54
|
+
return err(failure("NOT_FOUND", `authn/multi: user ${id} does not exist`));
|
|
55
|
+
return ok(found.value);
|
|
56
|
+
};
|
|
57
|
+
const createUser = async ({ username, password, roles = [] }) => {
|
|
58
|
+
if (username.trim() === "")
|
|
59
|
+
return err(failure("VALIDATION", "authn/multi: username must not be empty"));
|
|
60
|
+
const passwordCheck = checkPassword(config, password);
|
|
61
|
+
if (isErr(passwordCheck))
|
|
62
|
+
return passwordCheck;
|
|
63
|
+
const existing = await db.findOne(USERS, { username });
|
|
64
|
+
if (isErr(existing))
|
|
65
|
+
return existing;
|
|
66
|
+
if (existing.value)
|
|
67
|
+
return err(failure("CONFLICT", `authn/multi: user "${username}" already exists`));
|
|
68
|
+
const created = await db.createOne(USERS, { username, passwordHash: hashPassword(password), roles, active: true, createdAt: now() });
|
|
69
|
+
if (isErr(created))
|
|
70
|
+
return created.error.code === "CONFLICT" && created.error.details?.field === "username" ? err(failure("CONFLICT", `authn/multi: user "${username}" already exists`)) : created;
|
|
71
|
+
return ok(publicUser(created.value));
|
|
72
|
+
};
|
|
73
|
+
if (config.bootstrap) {
|
|
74
|
+
const userCount = await db.count(USERS, {});
|
|
75
|
+
if (isErr(userCount))
|
|
76
|
+
throw new Error(`authn/multi: setup failed: ${userCount.error.message}`);
|
|
77
|
+
if (userCount.value === 0) {
|
|
78
|
+
verifyPassword("", config.bootstrap.passwordHash);
|
|
79
|
+
const created = await db.createOne(USERS, { username: config.bootstrap.username, passwordHash: config.bootstrap.passwordHash, roles: config.bootstrap.roles, active: true, createdAt: now() });
|
|
80
|
+
if (isErr(created))
|
|
81
|
+
throw new Error(`authn/multi: setup failed: ${created.error.message}`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
async login(credentials) {
|
|
86
|
+
const username = credentials[config.identifier];
|
|
87
|
+
const password = credentials.password;
|
|
88
|
+
if (typeof username !== "string" || typeof password !== "string")
|
|
89
|
+
return ok(null);
|
|
90
|
+
const userResult = await db.findOne(USERS, { username });
|
|
91
|
+
if (isErr(userResult))
|
|
92
|
+
return err(transientOnly(userResult.error));
|
|
93
|
+
const user = userResult.value;
|
|
94
|
+
if (!user || !user.active || !verifyPassword(password, user.passwordHash))
|
|
95
|
+
return ok(null);
|
|
96
|
+
const token = randomUUID();
|
|
97
|
+
const created = await db.createOne(SESSIONS, { id: token, userId: user.id, expiresAt: now() + config.sessionTtlSeconds * 1000 });
|
|
98
|
+
if (isErr(created))
|
|
99
|
+
return err(transientOnly(created.error));
|
|
100
|
+
return ok({ token, identity: identity(user) });
|
|
101
|
+
},
|
|
102
|
+
async resolve(token) {
|
|
103
|
+
const sessionResult = await db.findOne(SESSIONS, { id: token });
|
|
104
|
+
if (isErr(sessionResult))
|
|
105
|
+
return err(transientOnly(sessionResult.error));
|
|
106
|
+
const session = sessionResult.value;
|
|
107
|
+
if (!session)
|
|
108
|
+
return ok(null);
|
|
109
|
+
if (session.expiresAt <= now()) {
|
|
110
|
+
const deleted = await db.deleteOne(SESSIONS, token);
|
|
111
|
+
if (isErr(deleted))
|
|
112
|
+
return err(transientOnly(deleted.error));
|
|
113
|
+
return ok(null);
|
|
114
|
+
}
|
|
115
|
+
const userResult = await db.findOne(USERS, { id: session.userId });
|
|
116
|
+
if (isErr(userResult))
|
|
117
|
+
return err(transientOnly(userResult.error));
|
|
118
|
+
const user = userResult.value;
|
|
119
|
+
return ok(user && user.active ? identity(user) : null);
|
|
120
|
+
},
|
|
121
|
+
async logout(token) {
|
|
122
|
+
const deleted = await db.deleteOne(SESSIONS, token);
|
|
123
|
+
if (isErr(deleted))
|
|
124
|
+
return err(transientOnly(deleted.error));
|
|
125
|
+
return ok();
|
|
126
|
+
},
|
|
127
|
+
createUser,
|
|
128
|
+
async listUsers() {
|
|
129
|
+
const found = await db.findMany(USERS, {}, { sort: { username: "asc" } });
|
|
130
|
+
if (isErr(found))
|
|
131
|
+
return found;
|
|
132
|
+
return ok(found.value.items.map(publicUser));
|
|
133
|
+
},
|
|
134
|
+
async getUser(id) {
|
|
135
|
+
const found = await db.findOne(USERS, { id });
|
|
136
|
+
if (isErr(found))
|
|
137
|
+
return found;
|
|
138
|
+
return ok(found.value ? publicUser(found.value) : null);
|
|
139
|
+
},
|
|
140
|
+
async setPassword(id, password) {
|
|
141
|
+
const user = await userById(id);
|
|
142
|
+
if (isErr(user))
|
|
143
|
+
return user;
|
|
144
|
+
const passwordCheck = checkPassword(config, password);
|
|
145
|
+
if (isErr(passwordCheck))
|
|
146
|
+
return passwordCheck;
|
|
147
|
+
const updated = await db.updateOne(USERS, id, { passwordHash: hashPassword(password) });
|
|
148
|
+
if (isErr(updated))
|
|
149
|
+
return updated;
|
|
150
|
+
const cleared = await db.deleteMany(SESSIONS, { userId: id });
|
|
151
|
+
if (isErr(cleared))
|
|
152
|
+
return cleared;
|
|
153
|
+
return ok();
|
|
154
|
+
},
|
|
155
|
+
async changePassword(id, current, next, keepToken) {
|
|
156
|
+
const user = await userById(id);
|
|
157
|
+
if (isErr(user))
|
|
158
|
+
return user;
|
|
159
|
+
if (!verifyPassword(current, user.value.passwordHash))
|
|
160
|
+
return err(failure("VALIDATION", "authn/multi: current password is wrong"));
|
|
161
|
+
const passwordCheck = checkPassword(config, next);
|
|
162
|
+
if (isErr(passwordCheck))
|
|
163
|
+
return passwordCheck;
|
|
164
|
+
const updated = await db.updateOne(USERS, id, { passwordHash: hashPassword(next) });
|
|
165
|
+
if (isErr(updated))
|
|
166
|
+
return updated;
|
|
167
|
+
const cleared = await db.deleteMany(SESSIONS, keepToken === undefined ? { userId: id } : { userId: id, id: { ne: keepToken } });
|
|
168
|
+
if (isErr(cleared))
|
|
169
|
+
return cleared;
|
|
170
|
+
return ok();
|
|
171
|
+
},
|
|
172
|
+
async setActive(id, active) {
|
|
173
|
+
const user = await userById(id);
|
|
174
|
+
if (isErr(user))
|
|
175
|
+
return user;
|
|
176
|
+
const updated = await db.updateOne(USERS, id, { active });
|
|
177
|
+
if (isErr(updated))
|
|
178
|
+
return updated;
|
|
179
|
+
if (!active) {
|
|
180
|
+
const cleared = await db.deleteMany(SESSIONS, { userId: id });
|
|
181
|
+
if (isErr(cleared))
|
|
182
|
+
return cleared;
|
|
183
|
+
}
|
|
184
|
+
return ok();
|
|
185
|
+
},
|
|
186
|
+
async cleanupSessions() {
|
|
187
|
+
const removed = await db.deleteMany(SESSIONS, { expiresAt: { lte: now() } });
|
|
188
|
+
if (isErr(removed))
|
|
189
|
+
return removed;
|
|
190
|
+
return ok(removed.value);
|
|
191
|
+
},
|
|
192
|
+
};
|
|
193
|
+
}
|
package/dist/module.d.ts
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { Context } from "@michaelthielemann/kestrel/context";
|
|
3
|
+
export declare const configSchema: z.ZodObject<{
|
|
4
|
+
identifier: z.ZodDefault<z.ZodEnum<["username", "email"]>>;
|
|
5
|
+
minPasswordLength: z.ZodDefault<z.ZodNumber>;
|
|
6
|
+
sessionTtlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
7
|
+
bootstrap: z.ZodOptional<z.ZodObject<{
|
|
8
|
+
username: z.ZodString;
|
|
9
|
+
passwordHash: z.ZodString;
|
|
10
|
+
roles: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
11
|
+
}, "strict", z.ZodTypeAny, {
|
|
12
|
+
username: string;
|
|
13
|
+
passwordHash: string;
|
|
14
|
+
roles: string[];
|
|
15
|
+
}, {
|
|
16
|
+
username: string;
|
|
17
|
+
passwordHash: string;
|
|
18
|
+
roles?: string[] | undefined;
|
|
19
|
+
}>>;
|
|
20
|
+
}, "strict", z.ZodTypeAny, {
|
|
21
|
+
identifier: "username" | "email";
|
|
22
|
+
minPasswordLength: number;
|
|
23
|
+
sessionTtlSeconds: number;
|
|
24
|
+
bootstrap?: {
|
|
25
|
+
username: string;
|
|
26
|
+
passwordHash: string;
|
|
27
|
+
roles: string[];
|
|
28
|
+
} | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
identifier?: "username" | "email" | undefined;
|
|
31
|
+
minPasswordLength?: number | undefined;
|
|
32
|
+
sessionTtlSeconds?: number | undefined;
|
|
33
|
+
bootstrap?: {
|
|
34
|
+
username: string;
|
|
35
|
+
passwordHash: string;
|
|
36
|
+
roles?: string[] | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
declare const _default: import("@michaelthielemann/kestrel/defineModule").ModuleDefinition<"authn/multi", {
|
|
40
|
+
login: (ctx: Context) => Promise<import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError<string>> | import("@michaelthielemann/kestrel/result").Ok<{
|
|
41
|
+
token: string;
|
|
42
|
+
identity: import("@michaelthielemann/kestrel-contracts/authn").Identity;
|
|
43
|
+
result: import("@michaelthielemann/kestrel-contracts/authn").Session;
|
|
44
|
+
runId: string;
|
|
45
|
+
requestId?: string;
|
|
46
|
+
trigger: import("@michaelthielemann/kestrel/context").Trigger;
|
|
47
|
+
payload: Record<string, unknown>;
|
|
48
|
+
params: Record<string, string>;
|
|
49
|
+
headers: Record<string, string>;
|
|
50
|
+
files: import("@michaelthielemann/kestrel/context").UploadedFile[];
|
|
51
|
+
ip?: string;
|
|
52
|
+
fail(code: import("@michaelthielemann/kestrel/errors").CoreCode, message: string, details?: Record<string, unknown>): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
53
|
+
fail(error: import("@michaelthielemann/kestrel/errors").KestrelError): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
54
|
+
done(result: unknown): import("@michaelthielemann/kestrel/result").Ok<Context>;
|
|
55
|
+
}>>;
|
|
56
|
+
identifyUser: (ctx: Context) => Promise<import("@michaelthielemann/kestrel/result").Ok<Context> | import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError<string>>>;
|
|
57
|
+
requireUser: (ctx: Context) => Promise<import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError<string>> | import("@michaelthielemann/kestrel/result").Ok<{
|
|
58
|
+
token: string;
|
|
59
|
+
identity: import("@michaelthielemann/kestrel-contracts/authn").Identity;
|
|
60
|
+
runId: string;
|
|
61
|
+
requestId?: string;
|
|
62
|
+
trigger: import("@michaelthielemann/kestrel/context").Trigger;
|
|
63
|
+
payload: Record<string, unknown>;
|
|
64
|
+
params: Record<string, string>;
|
|
65
|
+
headers: Record<string, string>;
|
|
66
|
+
files: import("@michaelthielemann/kestrel/context").UploadedFile[];
|
|
67
|
+
ip?: string;
|
|
68
|
+
result?: unknown;
|
|
69
|
+
fail(code: import("@michaelthielemann/kestrel/errors").CoreCode, message: string, details?: Record<string, unknown>): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
70
|
+
fail(error: import("@michaelthielemann/kestrel/errors").KestrelError): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
71
|
+
done(result: unknown): import("@michaelthielemann/kestrel/result").Ok<Context>;
|
|
72
|
+
}>>;
|
|
73
|
+
loadIdentity: (ctx: Context) => Promise<import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError<string>> | import("@michaelthielemann/kestrel/result").Ok<{
|
|
74
|
+
result: import("@michaelthielemann/kestrel-contracts/authn").Identity;
|
|
75
|
+
runId: string;
|
|
76
|
+
requestId?: string;
|
|
77
|
+
trigger: import("@michaelthielemann/kestrel/context").Trigger;
|
|
78
|
+
payload: Record<string, unknown>;
|
|
79
|
+
params: Record<string, string>;
|
|
80
|
+
headers: Record<string, string>;
|
|
81
|
+
files: import("@michaelthielemann/kestrel/context").UploadedFile[];
|
|
82
|
+
ip?: string;
|
|
83
|
+
fail(code: import("@michaelthielemann/kestrel/errors").CoreCode, message: string, details?: Record<string, unknown>): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
84
|
+
fail(error: import("@michaelthielemann/kestrel/errors").KestrelError): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
85
|
+
done(result: unknown): import("@michaelthielemann/kestrel/result").Ok<Context>;
|
|
86
|
+
token?: string;
|
|
87
|
+
identity?: import("@michaelthielemann/kestrel-contracts/authn").Identity;
|
|
88
|
+
}>>;
|
|
89
|
+
logout: (ctx: Context) => Promise<import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError<string>> | import("@michaelthielemann/kestrel/result").Ok<{
|
|
90
|
+
result: {
|
|
91
|
+
ok: boolean;
|
|
92
|
+
};
|
|
93
|
+
runId: string;
|
|
94
|
+
requestId?: string;
|
|
95
|
+
trigger: import("@michaelthielemann/kestrel/context").Trigger;
|
|
96
|
+
payload: Record<string, unknown>;
|
|
97
|
+
params: Record<string, string>;
|
|
98
|
+
headers: Record<string, string>;
|
|
99
|
+
files: import("@michaelthielemann/kestrel/context").UploadedFile[];
|
|
100
|
+
ip?: string;
|
|
101
|
+
fail(code: import("@michaelthielemann/kestrel/errors").CoreCode, message: string, details?: Record<string, unknown>): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
102
|
+
fail(error: import("@michaelthielemann/kestrel/errors").KestrelError): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
103
|
+
done(result: unknown): import("@michaelthielemann/kestrel/result").Ok<Context>;
|
|
104
|
+
token?: string;
|
|
105
|
+
identity?: import("@michaelthielemann/kestrel-contracts/authn").Identity;
|
|
106
|
+
}>>;
|
|
107
|
+
createUser: (ctx: Context) => Promise<import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError<string>> | import("@michaelthielemann/kestrel/result").Ok<{
|
|
108
|
+
result: import("./impl.ts").PublicUser;
|
|
109
|
+
runId: string;
|
|
110
|
+
requestId?: string;
|
|
111
|
+
trigger: import("@michaelthielemann/kestrel/context").Trigger;
|
|
112
|
+
payload: Record<string, unknown>;
|
|
113
|
+
params: Record<string, string>;
|
|
114
|
+
headers: Record<string, string>;
|
|
115
|
+
files: import("@michaelthielemann/kestrel/context").UploadedFile[];
|
|
116
|
+
ip?: string;
|
|
117
|
+
fail(code: import("@michaelthielemann/kestrel/errors").CoreCode, message: string, details?: Record<string, unknown>): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
118
|
+
fail(error: import("@michaelthielemann/kestrel/errors").KestrelError): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
119
|
+
done(result: unknown): import("@michaelthielemann/kestrel/result").Ok<Context>;
|
|
120
|
+
token?: string;
|
|
121
|
+
identity?: import("@michaelthielemann/kestrel-contracts/authn").Identity;
|
|
122
|
+
}>>;
|
|
123
|
+
listUsers: (ctx: Context) => Promise<import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError<string>> | import("@michaelthielemann/kestrel/result").Ok<{
|
|
124
|
+
result: import("./impl.ts").PublicUser[];
|
|
125
|
+
runId: string;
|
|
126
|
+
requestId?: string;
|
|
127
|
+
trigger: import("@michaelthielemann/kestrel/context").Trigger;
|
|
128
|
+
payload: Record<string, unknown>;
|
|
129
|
+
params: Record<string, string>;
|
|
130
|
+
headers: Record<string, string>;
|
|
131
|
+
files: import("@michaelthielemann/kestrel/context").UploadedFile[];
|
|
132
|
+
ip?: string;
|
|
133
|
+
fail(code: import("@michaelthielemann/kestrel/errors").CoreCode, message: string, details?: Record<string, unknown>): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
134
|
+
fail(error: import("@michaelthielemann/kestrel/errors").KestrelError): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
135
|
+
done(result: unknown): import("@michaelthielemann/kestrel/result").Ok<Context>;
|
|
136
|
+
token?: string;
|
|
137
|
+
identity?: import("@michaelthielemann/kestrel-contracts/authn").Identity;
|
|
138
|
+
}>>;
|
|
139
|
+
getUser: (ctx: Context) => Promise<import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError<string>> | import("@michaelthielemann/kestrel/result").Ok<{
|
|
140
|
+
result: import("./impl.ts").PublicUser;
|
|
141
|
+
runId: string;
|
|
142
|
+
requestId?: string;
|
|
143
|
+
trigger: import("@michaelthielemann/kestrel/context").Trigger;
|
|
144
|
+
payload: Record<string, unknown>;
|
|
145
|
+
params: Record<string, string>;
|
|
146
|
+
headers: Record<string, string>;
|
|
147
|
+
files: import("@michaelthielemann/kestrel/context").UploadedFile[];
|
|
148
|
+
ip?: string;
|
|
149
|
+
fail(code: import("@michaelthielemann/kestrel/errors").CoreCode, message: string, details?: Record<string, unknown>): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
150
|
+
fail(error: import("@michaelthielemann/kestrel/errors").KestrelError): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
151
|
+
done(result: unknown): import("@michaelthielemann/kestrel/result").Ok<Context>;
|
|
152
|
+
token?: string;
|
|
153
|
+
identity?: import("@michaelthielemann/kestrel-contracts/authn").Identity;
|
|
154
|
+
}>>;
|
|
155
|
+
setPassword: (ctx: Context) => Promise<import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError<string>> | import("@michaelthielemann/kestrel/result").Ok<{
|
|
156
|
+
result: {
|
|
157
|
+
ok: boolean;
|
|
158
|
+
};
|
|
159
|
+
runId: string;
|
|
160
|
+
requestId?: string;
|
|
161
|
+
trigger: import("@michaelthielemann/kestrel/context").Trigger;
|
|
162
|
+
payload: Record<string, unknown>;
|
|
163
|
+
params: Record<string, string>;
|
|
164
|
+
headers: Record<string, string>;
|
|
165
|
+
files: import("@michaelthielemann/kestrel/context").UploadedFile[];
|
|
166
|
+
ip?: string;
|
|
167
|
+
fail(code: import("@michaelthielemann/kestrel/errors").CoreCode, message: string, details?: Record<string, unknown>): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
168
|
+
fail(error: import("@michaelthielemann/kestrel/errors").KestrelError): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
169
|
+
done(result: unknown): import("@michaelthielemann/kestrel/result").Ok<Context>;
|
|
170
|
+
token?: string;
|
|
171
|
+
identity?: import("@michaelthielemann/kestrel-contracts/authn").Identity;
|
|
172
|
+
}>>;
|
|
173
|
+
changePassword: (ctx: Context) => Promise<import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError<string>> | import("@michaelthielemann/kestrel/result").Ok<{
|
|
174
|
+
result: {
|
|
175
|
+
ok: boolean;
|
|
176
|
+
};
|
|
177
|
+
runId: string;
|
|
178
|
+
requestId?: string;
|
|
179
|
+
trigger: import("@michaelthielemann/kestrel/context").Trigger;
|
|
180
|
+
payload: Record<string, unknown>;
|
|
181
|
+
params: Record<string, string>;
|
|
182
|
+
headers: Record<string, string>;
|
|
183
|
+
files: import("@michaelthielemann/kestrel/context").UploadedFile[];
|
|
184
|
+
ip?: string;
|
|
185
|
+
fail(code: import("@michaelthielemann/kestrel/errors").CoreCode, message: string, details?: Record<string, unknown>): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
186
|
+
fail(error: import("@michaelthielemann/kestrel/errors").KestrelError): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
187
|
+
done(result: unknown): import("@michaelthielemann/kestrel/result").Ok<Context>;
|
|
188
|
+
token?: string;
|
|
189
|
+
identity?: import("@michaelthielemann/kestrel-contracts/authn").Identity;
|
|
190
|
+
}>>;
|
|
191
|
+
deactivateUser: (ctx: Context) => Promise<import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError<string>> | import("@michaelthielemann/kestrel/result").Ok<{
|
|
192
|
+
result: {
|
|
193
|
+
ok: boolean;
|
|
194
|
+
};
|
|
195
|
+
runId: string;
|
|
196
|
+
requestId?: string;
|
|
197
|
+
trigger: import("@michaelthielemann/kestrel/context").Trigger;
|
|
198
|
+
payload: Record<string, unknown>;
|
|
199
|
+
params: Record<string, string>;
|
|
200
|
+
headers: Record<string, string>;
|
|
201
|
+
files: import("@michaelthielemann/kestrel/context").UploadedFile[];
|
|
202
|
+
ip?: string;
|
|
203
|
+
fail(code: import("@michaelthielemann/kestrel/errors").CoreCode, message: string, details?: Record<string, unknown>): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
204
|
+
fail(error: import("@michaelthielemann/kestrel/errors").KestrelError): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
205
|
+
done(result: unknown): import("@michaelthielemann/kestrel/result").Ok<Context>;
|
|
206
|
+
token?: string;
|
|
207
|
+
identity?: import("@michaelthielemann/kestrel-contracts/authn").Identity;
|
|
208
|
+
}>>;
|
|
209
|
+
activateUser: (ctx: Context) => Promise<import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError<string>> | import("@michaelthielemann/kestrel/result").Ok<{
|
|
210
|
+
result: {
|
|
211
|
+
ok: boolean;
|
|
212
|
+
};
|
|
213
|
+
runId: string;
|
|
214
|
+
requestId?: string;
|
|
215
|
+
trigger: import("@michaelthielemann/kestrel/context").Trigger;
|
|
216
|
+
payload: Record<string, unknown>;
|
|
217
|
+
params: Record<string, string>;
|
|
218
|
+
headers: Record<string, string>;
|
|
219
|
+
files: import("@michaelthielemann/kestrel/context").UploadedFile[];
|
|
220
|
+
ip?: string;
|
|
221
|
+
fail(code: import("@michaelthielemann/kestrel/errors").CoreCode, message: string, details?: Record<string, unknown>): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
222
|
+
fail(error: import("@michaelthielemann/kestrel/errors").KestrelError): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
223
|
+
done(result: unknown): import("@michaelthielemann/kestrel/result").Ok<Context>;
|
|
224
|
+
token?: string;
|
|
225
|
+
identity?: import("@michaelthielemann/kestrel-contracts/authn").Identity;
|
|
226
|
+
}>>;
|
|
227
|
+
cleanupSessions: (ctx: Context) => Promise<import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError<string>> | import("@michaelthielemann/kestrel/result").Ok<{
|
|
228
|
+
result: {
|
|
229
|
+
removed: number;
|
|
230
|
+
};
|
|
231
|
+
runId: string;
|
|
232
|
+
requestId?: string;
|
|
233
|
+
trigger: import("@michaelthielemann/kestrel/context").Trigger;
|
|
234
|
+
payload: Record<string, unknown>;
|
|
235
|
+
params: Record<string, string>;
|
|
236
|
+
headers: Record<string, string>;
|
|
237
|
+
files: import("@michaelthielemann/kestrel/context").UploadedFile[];
|
|
238
|
+
ip?: string;
|
|
239
|
+
fail(code: import("@michaelthielemann/kestrel/errors").CoreCode, message: string, details?: Record<string, unknown>): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
240
|
+
fail(error: import("@michaelthielemann/kestrel/errors").KestrelError): import("@michaelthielemann/kestrel/result").Err<import("@michaelthielemann/kestrel/errors").KestrelError>;
|
|
241
|
+
done(result: unknown): import("@michaelthielemann/kestrel/result").Ok<Context>;
|
|
242
|
+
token?: string;
|
|
243
|
+
identity?: import("@michaelthielemann/kestrel-contracts/authn").Identity;
|
|
244
|
+
}>>;
|
|
245
|
+
}>;
|
|
246
|
+
export default _default;
|
package/dist/module.js
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AUTHN } from "@michaelthielemann/kestrel-contracts/authn";
|
|
3
|
+
import { PERSISTENCE } from "@michaelthielemann/kestrel-contracts/persistence";
|
|
4
|
+
import { defineModule } from "@michaelthielemann/kestrel/defineModule";
|
|
5
|
+
import { isErr, ok } from "@michaelthielemann/kestrel/result";
|
|
6
|
+
import { createAuthnMulti, tokenFromHeaders } from "./impl.js";
|
|
7
|
+
export const configSchema = z
|
|
8
|
+
.object({
|
|
9
|
+
identifier: z.enum(["username", "email"]).default("username"),
|
|
10
|
+
minPasswordLength: z.number().int().min(8).default(12),
|
|
11
|
+
sessionTtlSeconds: z.number().int().positive().default(86400),
|
|
12
|
+
bootstrap: z.object({ username: z.string().min(1), passwordHash: z.string().startsWith("scrypt$"), roles: z.array(z.string()).default([]) }).strict().optional(),
|
|
13
|
+
})
|
|
14
|
+
.strict();
|
|
15
|
+
function credentials(payload) {
|
|
16
|
+
return Object.fromEntries(Object.entries(payload).filter((e) => typeof e[1] === "string"));
|
|
17
|
+
}
|
|
18
|
+
function str(value) {
|
|
19
|
+
return typeof value === "string" ? value : undefined;
|
|
20
|
+
}
|
|
21
|
+
export default defineModule({
|
|
22
|
+
name: "authn/multi",
|
|
23
|
+
provides: [AUTHN],
|
|
24
|
+
requires: [PERSISTENCE],
|
|
25
|
+
configSchema,
|
|
26
|
+
async setup(config, deps) {
|
|
27
|
+
return createAuthnMulti(config, deps.get(PERSISTENCE));
|
|
28
|
+
},
|
|
29
|
+
steps: (authn) => ({
|
|
30
|
+
login: async (ctx) => {
|
|
31
|
+
const session = await authn.login(credentials(ctx.payload));
|
|
32
|
+
if (isErr(session))
|
|
33
|
+
return ctx.fail(session.error);
|
|
34
|
+
if (!session.value)
|
|
35
|
+
return ctx.fail("UNAUTHENTICATED", "invalid credentials");
|
|
36
|
+
return ok({ ...ctx, token: session.value.token, identity: session.value.identity, result: session.value });
|
|
37
|
+
},
|
|
38
|
+
identifyUser: async (ctx) => {
|
|
39
|
+
const token = tokenFromHeaders(ctx.headers);
|
|
40
|
+
if (!token)
|
|
41
|
+
return ok(ctx);
|
|
42
|
+
const identity = await authn.resolve(token);
|
|
43
|
+
if (isErr(identity))
|
|
44
|
+
return ctx.fail(identity.error);
|
|
45
|
+
return ok(identity.value ? { ...ctx, token, identity: identity.value } : ctx);
|
|
46
|
+
},
|
|
47
|
+
requireUser: async (ctx) => {
|
|
48
|
+
const token = tokenFromHeaders(ctx.headers);
|
|
49
|
+
if (!token)
|
|
50
|
+
return ctx.fail("UNAUTHENTICATED", "not authenticated");
|
|
51
|
+
const identity = await authn.resolve(token);
|
|
52
|
+
if (isErr(identity))
|
|
53
|
+
return ctx.fail(identity.error);
|
|
54
|
+
if (!identity.value)
|
|
55
|
+
return ctx.fail("UNAUTHENTICATED", "not authenticated");
|
|
56
|
+
return ok({ ...ctx, token, identity: identity.value });
|
|
57
|
+
},
|
|
58
|
+
loadIdentity: async (ctx) => {
|
|
59
|
+
if (!ctx.identity)
|
|
60
|
+
return ctx.fail("UNAUTHENTICATED", "not authenticated");
|
|
61
|
+
return ok({ ...ctx, result: ctx.identity });
|
|
62
|
+
},
|
|
63
|
+
logout: async (ctx) => {
|
|
64
|
+
if (!ctx.token)
|
|
65
|
+
return ctx.fail("UNAUTHENTICATED", "not authenticated");
|
|
66
|
+
const result = await authn.logout(ctx.token);
|
|
67
|
+
if (isErr(result))
|
|
68
|
+
return ctx.fail(result.error);
|
|
69
|
+
return ok({ ...ctx, result: { ok: true } });
|
|
70
|
+
},
|
|
71
|
+
createUser: async (ctx) => {
|
|
72
|
+
const username = str(ctx.payload.username);
|
|
73
|
+
const password = str(ctx.payload.password);
|
|
74
|
+
if (!username || !password)
|
|
75
|
+
return ctx.fail("VALIDATION", "username and password are required");
|
|
76
|
+
const roles = Array.isArray(ctx.payload.roles) ? ctx.payload.roles.filter((r) => typeof r === "string") : [];
|
|
77
|
+
const created = await authn.createUser({ username, password, roles });
|
|
78
|
+
if (isErr(created))
|
|
79
|
+
return ctx.fail(created.error);
|
|
80
|
+
return ok({ ...ctx, result: created.value });
|
|
81
|
+
},
|
|
82
|
+
listUsers: async (ctx) => {
|
|
83
|
+
const users = await authn.listUsers();
|
|
84
|
+
if (isErr(users))
|
|
85
|
+
return ctx.fail(users.error);
|
|
86
|
+
return ok({ ...ctx, result: users.value });
|
|
87
|
+
},
|
|
88
|
+
getUser: async (ctx) => {
|
|
89
|
+
const id = ctx.params.id;
|
|
90
|
+
if (id === undefined)
|
|
91
|
+
throw new Error("authn.getUser: no params.id (boot's dataflow check already proved this route always provides it)");
|
|
92
|
+
const user = await authn.getUser(id);
|
|
93
|
+
if (isErr(user))
|
|
94
|
+
return ctx.fail(user.error);
|
|
95
|
+
if (!user.value)
|
|
96
|
+
return ctx.fail("NOT_FOUND", `user ${id} not found`);
|
|
97
|
+
return ok({ ...ctx, result: user.value });
|
|
98
|
+
},
|
|
99
|
+
setPassword: async (ctx) => {
|
|
100
|
+
const id = ctx.params.id;
|
|
101
|
+
if (id === undefined)
|
|
102
|
+
throw new Error("authn.setPassword: no params.id (boot's dataflow check already proved this route always provides it)");
|
|
103
|
+
const password = str(ctx.payload.password);
|
|
104
|
+
if (!password)
|
|
105
|
+
return ctx.fail("VALIDATION", "password is required");
|
|
106
|
+
const result = await authn.setPassword(id, password);
|
|
107
|
+
if (isErr(result))
|
|
108
|
+
return ctx.fail(result.error);
|
|
109
|
+
return ok({ ...ctx, result: { ok: true } });
|
|
110
|
+
},
|
|
111
|
+
changePassword: async (ctx) => {
|
|
112
|
+
if (!ctx.identity)
|
|
113
|
+
return ctx.fail("UNAUTHENTICATED", "not authenticated");
|
|
114
|
+
const current = str(ctx.payload.currentPassword);
|
|
115
|
+
const next = str(ctx.payload.newPassword);
|
|
116
|
+
if (!current || !next)
|
|
117
|
+
return ctx.fail("VALIDATION", "currentPassword and newPassword are required");
|
|
118
|
+
const result = await authn.changePassword(ctx.identity.id, current, next, ctx.token);
|
|
119
|
+
if (isErr(result))
|
|
120
|
+
return ctx.fail(result.error);
|
|
121
|
+
return ok({ ...ctx, result: { ok: true } });
|
|
122
|
+
},
|
|
123
|
+
deactivateUser: async (ctx) => {
|
|
124
|
+
const id = ctx.params.id;
|
|
125
|
+
if (id === undefined)
|
|
126
|
+
throw new Error("authn.deactivateUser: no params.id (boot's dataflow check already proved this route always provides it)");
|
|
127
|
+
if (ctx.identity?.id === id)
|
|
128
|
+
return ctx.fail("VALIDATION", "you cannot deactivate yourself");
|
|
129
|
+
const result = await authn.setActive(id, false);
|
|
130
|
+
if (isErr(result))
|
|
131
|
+
return ctx.fail(result.error);
|
|
132
|
+
return ok({ ...ctx, result: { ok: true } });
|
|
133
|
+
},
|
|
134
|
+
activateUser: async (ctx) => {
|
|
135
|
+
const id = ctx.params.id;
|
|
136
|
+
if (id === undefined)
|
|
137
|
+
throw new Error("authn.activateUser: no params.id (boot's dataflow check already proved this route always provides it)");
|
|
138
|
+
const result = await authn.setActive(id, true);
|
|
139
|
+
if (isErr(result))
|
|
140
|
+
return ctx.fail(result.error);
|
|
141
|
+
return ok({ ...ctx, result: { ok: true } });
|
|
142
|
+
},
|
|
143
|
+
cleanupSessions: async (ctx) => {
|
|
144
|
+
const removed = await authn.cleanupSessions();
|
|
145
|
+
if (isErr(removed))
|
|
146
|
+
return ctx.fail(removed.error);
|
|
147
|
+
return ok({ ...ctx, result: { removed: removed.value } });
|
|
148
|
+
},
|
|
149
|
+
}),
|
|
150
|
+
describe: () => ({
|
|
151
|
+
login: {
|
|
152
|
+
summary: "Log in with credentials",
|
|
153
|
+
reads: [],
|
|
154
|
+
writes: ["token", "identity", "result"],
|
|
155
|
+
input: { type: "object", properties: { username: { type: "string" }, email: { type: "string" }, password: { type: "string" } }, required: ["password"] },
|
|
156
|
+
output: { type: "object", properties: { token: { type: "string" }, identity: { type: "object", properties: { id: { type: "string" }, claims: { type: "object", additionalProperties: true } }, required: ["id", "claims"] } }, required: ["token", "identity"] },
|
|
157
|
+
errors: { 401: "invalid credentials" },
|
|
158
|
+
},
|
|
159
|
+
identifyUser: { summary: "Identify the caller if a valid token is present", reads: [], writes: ["token?", "identity?"], security: "optional" },
|
|
160
|
+
requireUser: { summary: "Require a valid session", reads: [], writes: ["token", "identity"], security: "required", errors: { 401: "not authenticated" } },
|
|
161
|
+
loadIdentity: {
|
|
162
|
+
summary: "Current identity",
|
|
163
|
+
reads: ["identity"],
|
|
164
|
+
writes: ["result"],
|
|
165
|
+
output: { type: "object", properties: { id: { type: "string" }, claims: { type: "object", additionalProperties: true } }, required: ["id", "claims"] },
|
|
166
|
+
errors: { 401: "not authenticated" },
|
|
167
|
+
},
|
|
168
|
+
logout: { summary: "End the current session", reads: ["token"], writes: ["result"], output: { type: "object", properties: { ok: { type: "boolean" } }, required: ["ok"] }, errors: { 401: "not authenticated" } },
|
|
169
|
+
createUser: {
|
|
170
|
+
summary: "Create a user",
|
|
171
|
+
reads: [],
|
|
172
|
+
writes: ["result"],
|
|
173
|
+
input: { type: "object", properties: { username: { type: "string" }, password: { type: "string" }, roles: { type: "array", items: { type: "string" } } }, required: ["username", "password"] },
|
|
174
|
+
output: { type: "object", properties: { id: { type: "string" }, username: { type: "string" }, roles: { type: "array", items: { type: "string" } }, active: { type: "boolean" }, createdAt: { type: "number" } }, required: ["id", "username", "roles", "active", "createdAt"] },
|
|
175
|
+
errors: { 400: "invalid input", 409: "username already exists" },
|
|
176
|
+
},
|
|
177
|
+
listUsers: {
|
|
178
|
+
summary: "List users",
|
|
179
|
+
reads: [],
|
|
180
|
+
writes: ["result"],
|
|
181
|
+
output: { type: "array", items: { type: "object", properties: { id: { type: "string" }, username: { type: "string" }, roles: { type: "array", items: { type: "string" } }, active: { type: "boolean" }, createdAt: { type: "number" } }, required: ["id", "username", "roles", "active", "createdAt"] } },
|
|
182
|
+
},
|
|
183
|
+
getUser: {
|
|
184
|
+
summary: "One user",
|
|
185
|
+
reads: ["params.id"],
|
|
186
|
+
writes: ["result"],
|
|
187
|
+
output: { type: "object", properties: { id: { type: "string" }, username: { type: "string" }, roles: { type: "array", items: { type: "string" } }, active: { type: "boolean" }, createdAt: { type: "number" } }, required: ["id", "username", "roles", "active", "createdAt"] },
|
|
188
|
+
errors: { 404: "user not found" },
|
|
189
|
+
},
|
|
190
|
+
setPassword: {
|
|
191
|
+
summary: "Set a user's password (ends their sessions)",
|
|
192
|
+
reads: ["params.id"],
|
|
193
|
+
writes: ["result"],
|
|
194
|
+
input: { type: "object", properties: { password: { type: "string" } }, required: ["password"] },
|
|
195
|
+
output: { type: "object", properties: { ok: { type: "boolean" } }, required: ["ok"] },
|
|
196
|
+
errors: { 400: "password missing or too short", 404: "user not found" },
|
|
197
|
+
},
|
|
198
|
+
changePassword: {
|
|
199
|
+
summary: "Change own password",
|
|
200
|
+
reads: ["identity"],
|
|
201
|
+
writes: ["result"],
|
|
202
|
+
input: { type: "object", properties: { currentPassword: { type: "string" }, newPassword: { type: "string" } }, required: ["currentPassword", "newPassword"] },
|
|
203
|
+
output: { type: "object", properties: { ok: { type: "boolean" } }, required: ["ok"] },
|
|
204
|
+
errors: { 400: "wrong current password, missing fields, or new one too short", 401: "not authenticated" },
|
|
205
|
+
},
|
|
206
|
+
deactivateUser: {
|
|
207
|
+
summary: "Deactivate a user",
|
|
208
|
+
reads: ["params.id"],
|
|
209
|
+
writes: ["result"],
|
|
210
|
+
output: { type: "object", properties: { ok: { type: "boolean" } }, required: ["ok"] },
|
|
211
|
+
errors: { 400: "cannot deactivate yourself", 404: "user not found" },
|
|
212
|
+
},
|
|
213
|
+
activateUser: {
|
|
214
|
+
summary: "Activate a user",
|
|
215
|
+
reads: ["params.id"],
|
|
216
|
+
writes: ["result"],
|
|
217
|
+
output: { type: "object", properties: { ok: { type: "boolean" } }, required: ["ok"] },
|
|
218
|
+
errors: { 404: "user not found" },
|
|
219
|
+
},
|
|
220
|
+
cleanupSessions: { summary: "Remove expired sessions", reads: [], writes: ["result"], output: { type: "object", properties: { removed: { type: "number" } } } },
|
|
221
|
+
}),
|
|
222
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../core/dist/errors.d.ts","../../core/dist/result.d.ts","../../contracts/dist/errors.d.ts","../../core/dist/defineContract.d.ts","../../contracts/dist/authn.d.ts","../../contracts/dist/query.d.ts","../../contracts/dist/persistence.d.ts","../impl.ts","../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.d.cts","../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.d.cts","../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/index.d.cts","../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.d.cts","../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.d.cts","../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.d.cts","../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.d.cts","../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/enumUtil.d.cts","../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.d.cts","../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/partialUtil.d.cts","../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/standard-schema.d.cts","../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.d.cts","../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.d.cts","../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.d.cts","../../core/dist/context.d.ts","../../core/dist/logger.d.ts","../../core/dist/registry.d.ts","../../core/dist/runner.d.ts","../../core/dist/defineModule.d.ts","../module.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/web-globals/streams.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@22.20.1/node_modules/@types/node/index.d.ts"],"fileIdsList":[[91,137,138,140,157,158],[91,139,140,157,158],[140,157,158],[91,140,145,157,158,175],[91,140,141,146,151,157,158,160,172,183],[91,140,141,142,151,157,158,160],[91,140,157,158],[86,87,88,91,140,157,158],[91,140,143,157,158,184],[91,140,144,145,152,157,158,161],[91,140,145,157,158,172,180],[91,140,146,148,151,157,158,160],[91,139,140,147,157,158],[91,140,148,149,157,158],[91,140,150,151,157,158],[91,139,140,151,157,158],[91,140,151,152,153,157,158,172,183],[91,140,151,152,153,157,158,167,172,175],[91,132,140,148,151,154,157,158,160,172,183],[91,140,151,152,154,155,157,158,160,172,180,183],[91,140,154,156,157,158,172,180,183],[89,90,91,92,93,94,95,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189],[91,140,151,157,158],[91,140,157,158,159,183],[91,140,148,151,157,158,160,172],[91,140,157,158,161],[91,140,157,158,162],[91,139,140,157,158,163],[91,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189],[91,140,157,158,165],[91,140,157,158,166],[91,140,151,157,158,167,168],[91,140,157,158,167,169,184,186],[91,140,152,157,158],[91,140,151,157,158,172,173,175],[91,140,157,158,174,175],[91,140,157,158,172,173],[91,140,157,158,175],[91,140,157,158,176],[91,137,140,157,158,172,177,183],[91,140,151,157,158,178,179],[91,140,157,158,178,179],[91,140,145,157,158,160,172,180],[91,140,157,158,181],[91,140,157,158,160,182],[91,140,154,157,158,166,183],[91,140,145,157,158,184],[91,140,157,158,172,185],[91,140,157,158,159,186],[91,140,157,158,187],[91,132,140,157,158],[91,132,140,151,153,157,158,163,172,175,183,185,186,188],[91,140,157,158,172,189],[91,104,108,140,157,158,183],[91,104,140,157,158,172,183],[91,99,140,157,158],[91,101,104,140,157,158,180,183],[91,140,157,158,160,180],[91,140,157,158,190],[91,99,140,157,158,190],[91,101,104,140,157,158,160,183],[91,96,97,100,103,140,151,157,158,172,183],[91,104,111,140,157,158],[91,96,102,140,157,158],[91,104,125,126,140,157,158],[91,100,104,140,157,158,175,183,190],[91,125,140,157,158,190],[91,98,99,140,157,158,190],[91,104,140,157,158],[91,98,99,100,101,102,103,104,105,106,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,126,127,128,129,130,131,140,157,158],[91,104,119,140,157,158],[91,104,111,112,140,157,158],[91,102,104,112,113,140,157,158],[91,103,140,157,158],[91,96,99,104,140,157,158],[91,104,108,112,113,140,157,158],[91,108,140,157,158],[91,102,104,107,140,157,158,183],[91,96,101,104,111,140,157,158],[91,140,157,158,172],[91,99,104,125,140,157,158,188,190],[78,91,140,157,158],[66,67,68,91,140,157,158],[69,70,91,140,157,158],[66,67,69,71,72,77,91,140,157,158],[67,69,91,140,157,158],[77,91,140,157,158],[69,91,140,157,158],[66,67,69,72,73,74,75,76,91,140,157,158],[60,62,64,91,140,145,157,158],[59,62,64,65,79,80,84,91,140,157,158],[60,61,91,140,157,158],[58,59,91,140,157,158],[60,61,63,91,140,157,158],[61,79,80,81,83,91,140,157,158],[80,84,91,140,157,158],[80,81,82,91,140,157,158]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb0cfe04ce4b3f7ccf1a7dcbce1354a997f2baad78fad073be48858adeb00959","impliedFormat":99},{"version":"b9bfccc7c25817b9f1ae63eb1ad2fbbe69fc37c254a7bce0bf931544f6681202","impliedFormat":99},{"version":"c242b8f37fcaac0ed2e1fcebbd132670b75d2f9f88bd35b85cb0d1d9824ecc1d","impliedFormat":99},{"version":"4823d6cc697b493247fc7ee01c798f2aa26c45611875494031410f25784aa6c4","impliedFormat":99},{"version":"fa2e178443a80a34bc6b904a82db702a540247264f786bd857ac3223b3eb2f38","affectsGlobalScope":true,"impliedFormat":99},{"version":"48af3719ada18f0b70dab907b539ec237bf3fb360bedf37ee5562420cb3a7df5","impliedFormat":99},{"version":"18757a157dd8f10c4b69688b943fcf9edebf8d729a1291366c9aa45b69fcab63","impliedFormat":99},{"version":"26129fe0bb02b94d27e4e6855814b6ee47d1eb2d5f63866aca807a93bf23af41","signature":"78c81b8ab9d10541474a5beff63cdd1e5d65ab7863c27ec6e450f4260fce2ec3","impliedFormat":99},{"version":"d3cfde44f8089768ebb08098c96d01ca260b88bccf238d55eee93f1c620ff5a5","impliedFormat":1},{"version":"293eadad9dead44c6fd1db6de552663c33f215c55a1bfa2802a1bceed88ff0ec","impliedFormat":1},{"version":"833e92c058d033cde3f29a6c7603f517001d1ddd8020bc94d2067a3bc69b2a8e","impliedFormat":1},{"version":"08b2fae7b0f553ad9f79faec864b179fc58bc172e295a70943e8585dd85f600c","impliedFormat":1},{"version":"f12edf1672a94c578eca32216839604f1e1c16b40a1896198deabf99c882b340","impliedFormat":1},{"version":"e3498cf5e428e6c6b9e97bd88736f26d6cf147dedbfa5a8ad3ed8e05e059af8a","impliedFormat":1},{"version":"dba3f34531fd9b1b6e072928b6f885aa4d28dd6789cbd0e93563d43f4b62da53","impliedFormat":1},{"version":"f672c876c1a04a223cf2023b3d91e8a52bb1544c576b81bf64a8fec82be9969c","impliedFormat":1},{"version":"e4b03ddcf8563b1c0aee782a185286ed85a255ce8a30df8453aade2188bbc904","impliedFormat":1},{"version":"2329d90062487e1eaca87b5e06abcbbeeecf80a82f65f949fd332cfcf824b87b","impliedFormat":1},{"version":"25b3f581e12ede11e5739f57a86e8668fbc0124f6649506def306cad2c59d262","impliedFormat":1},{"version":"4fdb529707247a1a917a4626bfb6a293d52cd8ee57ccf03830ec91d39d606d6d","impliedFormat":1},{"version":"a9ebb67d6bbead6044b43714b50dcb77b8f7541ffe803046fdec1714c1eba206","impliedFormat":1},{"version":"5780b706cece027f0d4444fbb4e1af62dc51e19da7c3d3719f67b22b033859b9","impliedFormat":1},{"version":"e43b24b25eb463de8bd4caf9b3b6fff0629fb458f1521ce3ab129f004c76a372","affectsGlobalScope":true,"impliedFormat":99},{"version":"c4f0c8265d482fe878cec9988b8c7d9fb3a42ed899d8d55f5f5d1fd52127ca9f","impliedFormat":99},{"version":"a368885cc6dbeb2b039083305901a41cc3e15f74169c94156f9341edab4f8211","impliedFormat":99},{"version":"f50cd15e882b38f6c758e9b361ccac4b70b2a382219b4386ac2c441ec330eb62","impliedFormat":99},{"version":"1f5706548b626abb6089c715f2f7dbba5f26ca68f77c61215e3c246958ff62c9","impliedFormat":99},{"version":"55dad17386c6877139d330bf541927afce3e53bfbbe7de80daf71845b1553d03","signature":"a1b4bdfd59966c385d850aa3f864eb81b0c45e4f0ec39a47b14c28b0a2fede39","impliedFormat":99},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d97fb21da858fb18b8ae72c314e9743fd52f73ebe2764e12af1db32fc03f853f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"78dbea00e90d2df8ea3dbef0cc379d95b8be9b71cd6bde4c28728f306811803b","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e1e46d0a9837ee058c100501080c920fa98081ea3956af0374308ba6f22a33e","impliedFormat":1},{"version":"272ca407e0c9068bdc5152552d876e68037ceae3de62e529306403e973dec8e1","impliedFormat":1},{"version":"fa7834c715d5357e4540cee40ce96c3250ddb67a7b879a6b7fa0e86d6696f121","impliedFormat":1},{"version":"22dfb07a7ab15b66ac043829056fe70124844636ae719551812ac631ba04985b","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6f137d651076822d4fe884287e68fd61785a0d3d1fdb250a5059b691fa897db","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"0cb167c371eaa8c869f8a7656a7296f2e4fae43b4d8b803a680236b24794e5f9","impliedFormat":1},{"version":"0a839dba0287cc0481ad4beedd48a1c64acf1e212ae865d1315f7007ca215161","impliedFormat":1},{"version":"38dc4655376cd1a4bd6bb3763d92949233e33d38d3dd3cbea7bbf218175a38ef","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"d61e0a64cd175208ac0b83670151a9a6b5916f0d1ffcdc5c29c90b1cebfc5045","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"48a679952eefe4cb776d5a0e1ccba2d3eb53b57448bbb7abc1fcebcbd5440188","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2d14da6ecb49bf828d83948765ec2d3a579d476bbb9645e749610baa6ec880ca","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"0aef708fb4c7a6b915e8305cbfac40cd207b032dbaabe9a01889a5fff3254681","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"ad9bdafb4e7abf14cc53ce7970486a84c87831e62891e5dfe798ddcd55e84701","affectsGlobalScope":true,"impliedFormat":1},{"version":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"71d3ae6a5e73ca4130762560425e00984ebaff64d5353a3333d1bb7eb86ef336","impliedFormat":1}],"root":[65,85],"options":{"allowImportingTsExtensions":false,"composite":true,"declaration":true,"exactOptionalPropertyTypes":true,"module":199,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"outDir":"./","rewriteRelativeImportExtensions":true,"rootDir":"..","skipLibCheck":true,"strict":true,"target":9,"verbatimModuleSyntax":true},"referencedMap":[[137,1],[138,1],[139,2],[91,3],[140,4],[141,5],[142,6],[86,7],[89,8],[87,7],[88,7],[143,9],[144,10],[145,11],[146,12],[147,13],[148,14],[149,14],[150,15],[151,16],[152,17],[153,18],[92,7],[90,7],[154,19],[155,20],[156,21],[190,22],[157,23],[158,7],[159,24],[160,25],[161,26],[162,27],[163,28],[164,29],[165,30],[166,31],[167,32],[168,32],[169,33],[170,7],[171,34],[172,35],[174,36],[173,37],[175,38],[176,39],[177,40],[178,41],[179,42],[180,43],[181,44],[182,45],[183,46],[184,47],[185,48],[186,49],[187,50],[93,7],[94,7],[95,7],[133,51],[134,7],[135,7],[136,38],[188,52],[189,53],[56,7],[57,7],[11,7],[10,7],[2,7],[12,7],[13,7],[14,7],[15,7],[16,7],[17,7],[18,7],[19,7],[3,7],[20,7],[21,7],[4,7],[22,7],[26,7],[23,7],[24,7],[25,7],[27,7],[28,7],[29,7],[5,7],[30,7],[31,7],[32,7],[33,7],[6,7],[37,7],[34,7],[35,7],[36,7],[38,7],[7,7],[39,7],[44,7],[45,7],[40,7],[41,7],[42,7],[43,7],[8,7],[49,7],[46,7],[47,7],[48,7],[50,7],[9,7],[51,7],[52,7],[53,7],[55,7],[54,7],[1,7],[111,54],[121,55],[110,54],[131,56],[102,57],[101,58],[130,59],[124,60],[129,61],[104,62],[118,63],[103,64],[127,65],[99,66],[98,59],[128,67],[100,68],[105,69],[106,7],[109,69],[96,7],[132,70],[122,71],[113,72],[114,73],[116,74],[112,75],[115,76],[125,59],[107,77],[108,78],[117,79],[97,80],[120,71],[119,69],[123,7],[126,81],[79,82],[69,83],[71,84],[78,85],[73,7],[74,7],[72,86],[75,87],[66,7],[67,7],[68,82],[70,88],[76,7],[77,89],[65,90],[85,91],[62,92],[60,93],[64,94],[63,7],[80,93],[61,7],[84,95],[58,7],[81,7],[82,96],[59,7],[83,97]],"latestChangedDtsFile":"./module.d.ts","version":"5.9.3"}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@michaelthielemann/kestrel-authn-multi",
|
|
3
|
+
"version": "5.0.0",
|
|
4
|
+
"description": "authn@1 with users and sessions stored via persistence@1; user management steps.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=22.13.0"
|
|
9
|
+
},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/module.d.ts",
|
|
13
|
+
"default": "./dist/module.js"
|
|
14
|
+
},
|
|
15
|
+
"./impl": {
|
|
16
|
+
"types": "./dist/impl.d.ts",
|
|
17
|
+
"default": "./dist/impl.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@michaelthielemann/kestrel": "^5.0.0",
|
|
26
|
+
"@michaelthielemann/kestrel-contracts": "^5.0.0"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"zod": "^3.23.8"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"vitest": "^3.2.0",
|
|
33
|
+
"@michaelthielemann/kestrel": "5.0.0",
|
|
34
|
+
"@michaelthielemann/kestrel-contracts": "5.0.0"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/MichaelThielemann/kestrel.git",
|
|
39
|
+
"directory": "packages/authn-multi"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/MichaelThielemann/kestrel#readme",
|
|
42
|
+
"bugs": "https://github.com/MichaelThielemann/kestrel/issues",
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsc -b tsconfig.json"
|
|
45
|
+
}
|
|
46
|
+
}
|