@dads-framework/identity 0.0.0-stage → 0.1.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.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Bryton Cooper
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,47 @@
1
- # Temporary Holding Version
1
+ # @dads-framework/identity
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The account, session, and mail contracts used by Dads applications and their identity adapters.
4
+
5
+ ## Try it
6
+
7
+ ```ts
8
+ import type { Identity } from "@dads-framework/identity";
9
+
10
+ export async function currentAccount(identity: Identity, request: Request) {
11
+ const session = await identity.readSession(request.headers);
12
+ return session?.account ?? null;
13
+ }
14
+ ```
15
+
16
+ ## Use it
17
+
18
+ The application mounts `Identity.handle` at the adapter's HTTP boundary and
19
+ calls `Identity.readSession` in server-side authentication. Map a successful
20
+ lookup to the application's account or authorization subject. An email
21
+ address or user ID from a request body is never proof of identity.
22
+
23
+ `normalizeIdentityEmail` accepts an untrusted value and returns a normalized
24
+ email address for invitations or `null` when it cannot use the value.
25
+
26
+ ## What it refuses to do
27
+
28
+ This package has no database, password implementation, network calls, or role
29
+ policy. The identity adapter verifies the session and the application decides
30
+ what its account can access.
31
+
32
+ ## Contract
33
+
34
+ `IdentitySession.account` contains an ID, email, and email verification flag.
35
+ `expiresAt` is the server-side session expiration. A missing, expired, or revoked
36
+ session resolves to `null`. Operational failures can reject the lookup and
37
+ must fail closed in the application.
38
+
39
+ `EnqueueIdentityEmail` receives an address and a confidential link.
40
+ Applications own message delivery and keep addresses and links out of logs.
41
+
42
+ ## Testing sessions
43
+
44
+ `@dads-framework/identity/testing` provides `inMemoryIdentity` for tests that
45
+ seed verified sessions and control their clock.
46
+ `verifyIdentitySessionConformance` runs the same read, expiry, and revocation
47
+ laws against that stand-in and the database adapter.
@@ -0,0 +1,23 @@
1
+ /** Account identity proven by a server-side session lookup. */
2
+ export type IdentityAccount = {
3
+ readonly id: string;
4
+ readonly email: string;
5
+ readonly emailVerified: boolean;
6
+ };
7
+ export type IdentitySession = {
8
+ readonly account: IdentityAccount;
9
+ readonly expiresAt: Date;
10
+ };
11
+ /** Mount the handler at the application's identity route boundary. */
12
+ export type Identity = {
13
+ readonly handle: (request: Request) => Promise<Response>;
14
+ readonly readSession: (headers: Headers) => Promise<IdentitySession | null>;
15
+ };
16
+ export type IdentityEmail = {
17
+ readonly kind: "verify-email" | "reset-password" | "account-invitation";
18
+ readonly to: string;
19
+ readonly url: string;
20
+ };
21
+ /** Enqueue confidential messages through the application's mail transport. */
22
+ export type EnqueueIdentityEmail = (message: IdentityEmail) => Promise<void>;
23
+ //# sourceMappingURL=identity-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-types.d.ts","sourceRoot":"","sources":["../src/identity-types.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;CAC1B,CAAC;AAEF,sEAAsE;AACtE,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzD,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;CAC7E,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,gBAAgB,GAAG,oBAAoB,CAAC;IACxE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=identity-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-types.js","sourceRoot":"","sources":["../src/identity-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":"7.0.2","root":[[64,69]],"packageJsons":["../../../../node_modules/@types/node/package.json","../../../../node_modules/buffer/package.json","../../../../node_modules/events/package.json","../../../../node_modules/process/package.json","../../../../node_modules/punycode/package.json","../../../../node_modules/string_decoder/package.json","../../../../node_modules/undici-types/package.json","../package.json"],"missingPackageJsons":["../../../../node_modules/@types/assert/package.json","../../../../node_modules/@types/assert/strict/package.json","../../../../node_modules/@types/async_hooks/package.json","../../../../node_modules/@types/child_process/package.json","../../../../node_modules/@types/cluster/package.json","../../../../node_modules/@types/console/package.json","../../../../node_modules/@types/constants/package.json","../../../../node_modules/@types/crypto/package.json","../../../../node_modules/@types/dgram/package.json","../../../../node_modules/@types/diagnostics_channel/package.json","../../../../node_modules/@types/dns/package.json","../../../../node_modules/@types/dns/promises/package.json","../../../../node_modules/@types/domain/package.json","../../../../node_modules/@types/events/package.json","../../../../node_modules/@types/fs/package.json","../../../../node_modules/@types/fs/promises/package.json","../../../../node_modules/@types/http/package.json","../../../../node_modules/@types/http2/package.json","../../../../node_modules/@types/https/package.json","../../../../node_modules/@types/inspector/package.json","../../../../node_modules/@types/inspector/promises/package.json","../../../../node_modules/@types/module/package.json","../../../../node_modules/@types/net/package.json","../../../../node_modules/@types/node/assert/package.json","../../../../node_modules/@types/node/compatibility/package.json","../../../../node_modules/@types/node/dns/package.json","../../../../node_modules/@types/node/fs/package.json","../../../../node_modules/@types/node/readline/package.json","../../../../node_modules/@types/node/stream/package.json","../../../../node_modules/@types/node/timers/package.json","../../../../node_modules/@types/node/web-globals/package.json","../../../../node_modules/@types/os/package.json","../../../../node_modules/@types/path/package.json","../../../../node_modules/@types/path/posix/package.json","../../../../node_modules/@types/path/win32/package.json","../../../../node_modules/@types/perf_hooks/package.json","../../../../node_modules/@types/process/package.json","../../../../node_modules/@types/punycode/package.json","../../../../node_modules/@types/querystring/package.json","../../../../node_modules/@types/readline/package.json","../../../../node_modules/@types/readline/promises/package.json","../../../../node_modules/@types/repl/package.json","../../../../node_modules/@types/stream/consumers/package.json","../../../../node_modules/@types/stream/package.json","../../../../node_modules/@types/stream/promises/package.json","../../../../node_modules/@types/stream/web/package.json","../../../../node_modules/@types/string_decoder/package.json","../../../../node_modules/@types/timers/package.json","../../../../node_modules/@types/timers/promises/package.json","../../../../node_modules/@types/tls/package.json","../../../../node_modules/@types/trace_events/package.json","../../../../node_modules/@types/tty/package.json","../../../../node_modules/@types/url/package.json","../../../../node_modules/@types/util/package.json","../../../../node_modules/@types/util/types/package.json","../../../../node_modules/@types/v8/package.json","../../../../node_modules/@types/vm/package.json","../../../../node_modules/@types/wasi/package.json","../../../../node_modules/@types/worker_threads/package.json","../../../../node_modules/@types/zlib/package.json","../../../../node_modules/assert/package.json","../../../../node_modules/assert/strict/package.json","../../../../node_modules/async_hooks/package.json","../../../../node_modules/child_process/package.json","../../../../node_modules/cluster/package.json","../../../../node_modules/console/package.json","../../../../node_modules/constants/package.json","../../../../node_modules/crypto/package.json","../../../../node_modules/dgram/package.json","../../../../node_modules/diagnostics_channel/package.json","../../../../node_modules/dns/package.json","../../../../node_modules/dns/promises/package.json","../../../../node_modules/domain/package.json","../../../../node_modules/fs/package.json","../../../../node_modules/fs/promises/package.json","../../../../node_modules/http/package.json","../../../../node_modules/http2/package.json","../../../../node_modules/https/package.json","../../../../node_modules/inspector/package.json","../../../../node_modules/inspector/promises/package.json","../../../../node_modules/module/package.json","../../../../node_modules/net/package.json","../../../../node_modules/os/package.json","../../../../node_modules/path/package.json","../../../../node_modules/path/posix/package.json","../../../../node_modules/path/win32/package.json","../../../../node_modules/perf_hooks/package.json","../../../../node_modules/querystring/package.json","../../../../node_modules/readline/package.json","../../../../node_modules/readline/promises/package.json","../../../../node_modules/repl/package.json","../../../../node_modules/stream/consumers/package.json","../../../../node_modules/stream/package.json","../../../../node_modules/stream/promises/package.json","../../../../node_modules/stream/web/package.json","../../../../node_modules/timers/package.json","../../../../node_modules/timers/promises/package.json","../../../../node_modules/tls/package.json","../../../../node_modules/trace_events/package.json","../../../../node_modules/tty/package.json","../../../../node_modules/url/package.json","../../../../node_modules/util/package.json","../../../../node_modules/util/types/package.json","../../../../node_modules/v8/package.json","../../../../node_modules/vm/package.json","../../../../node_modules/wasi/package.json","../../../../node_modules/worker_threads/package.json","../../../../node_modules/zlib/package.json"],"fileNames":["lib.es5.d.ts","lib.es2015.d.ts","lib.es2016.d.ts","lib.es2017.d.ts","lib.es2018.d.ts","lib.es2019.d.ts","lib.es2020.d.ts","lib.es2021.d.ts","lib.es2022.d.ts","lib.es2023.d.ts","lib.es2015.core.d.ts","lib.es2015.collection.d.ts","lib.es2015.generator.d.ts","lib.es2015.iterable.d.ts","lib.es2015.promise.d.ts","lib.es2015.proxy.d.ts","lib.es2015.reflect.d.ts","lib.es2015.symbol.d.ts","lib.es2015.symbol.wellknown.d.ts","lib.es2016.array.include.d.ts","lib.es2016.intl.d.ts","lib.es2017.arraybuffer.d.ts","lib.es2017.date.d.ts","lib.es2017.object.d.ts","lib.es2017.sharedmemory.d.ts","lib.es2017.string.d.ts","lib.es2017.intl.d.ts","lib.es2017.typedarrays.d.ts","lib.es2018.asyncgenerator.d.ts","lib.es2018.asynciterable.d.ts","lib.es2018.intl.d.ts","lib.es2018.promise.d.ts","lib.es2018.regexp.d.ts","lib.es2019.array.d.ts","lib.es2019.object.d.ts","lib.es2019.string.d.ts","lib.es2019.symbol.d.ts","lib.es2019.intl.d.ts","lib.es2020.bigint.d.ts","lib.es2020.date.d.ts","lib.es2020.promise.d.ts","lib.es2020.sharedmemory.d.ts","lib.es2020.string.d.ts","lib.es2020.symbol.wellknown.d.ts","lib.es2020.intl.d.ts","lib.es2020.number.d.ts","lib.es2021.promise.d.ts","lib.es2021.string.d.ts","lib.es2021.weakref.d.ts","lib.es2021.intl.d.ts","lib.es2022.array.d.ts","lib.es2022.error.d.ts","lib.es2022.intl.d.ts","lib.es2022.object.d.ts","lib.es2022.string.d.ts","lib.es2022.regexp.d.ts","lib.es2023.array.d.ts","lib.es2023.collection.d.ts","lib.es2023.intl.d.ts","lib.es2025.float16.d.ts","lib.esnext.disposable.d.ts","lib.decorators.d.ts","lib.decorators.legacy.d.ts","../src/identity-types.ts","../src/normalize-identity-email.ts","../src/index.ts","../src/testing/identity-session-conformance.ts","../src/testing/in-memory-identity.ts","../src/testing/index.ts","../../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../../node_modules/@types/node/globals.typedarray.d.ts","../../../../node_modules/@types/node/buffer.buffer.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../../node_modules/@types/node/web-globals/crypto.d.ts","../../../../node_modules/@types/node/web-globals/domexception.d.ts","../../../../node_modules/@types/node/web-globals/events.d.ts","../../../../node_modules/undici-types/utility.d.ts","../../../../node_modules/undici-types/header.d.ts","../../../../node_modules/undici-types/readable.d.ts","../../../../node_modules/undici-types/fetch.d.ts","../../../../node_modules/undici-types/formdata.d.ts","../../../../node_modules/undici-types/connector.d.ts","../../../../node_modules/undici-types/client-stats.d.ts","../../../../node_modules/undici-types/client.d.ts","../../../../node_modules/undici-types/errors.d.ts","../../../../node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/undici-types/global-origin.d.ts","../../../../node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/undici-types/pool.d.ts","../../../../node_modules/undici-types/handlers.d.ts","../../../../node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/undici-types/round-robin-pool.d.ts","../../../../node_modules/undici-types/h2c-client.d.ts","../../../../node_modules/undici-types/agent.d.ts","../../../../node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/undici-types/mock-call-history.d.ts","../../../../node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/undici-types/mock-client.d.ts","../../../../node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/undici-types/snapshot-agent.d.ts","../../../../node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../../node_modules/undici-types/retry-handler.d.ts","../../../../node_modules/undici-types/retry-agent.d.ts","../../../../node_modules/undici-types/api.d.ts","../../../../node_modules/undici-types/cache-interceptor.d.ts","../../../../node_modules/undici-types/interceptors.d.ts","../../../../node_modules/undici-types/util.d.ts","../../../../node_modules/undici-types/cookies.d.ts","../../../../node_modules/undici-types/patch.d.ts","../../../../node_modules/undici-types/websocket.d.ts","../../../../node_modules/undici-types/eventsource.d.ts","../../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/undici-types/content-type.d.ts","../../../../node_modules/undici-types/cache.d.ts","../../../../node_modules/undici-types/index.d.ts","../../../../node_modules/@types/node/web-globals/fetch.d.ts","../../../../node_modules/@types/node/web-globals/navigator.d.ts","../../../../node_modules/@types/node/web-globals/storage.d.ts","../../../../node_modules/@types/node/web-globals/streams.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/buffer/index.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/inspector.generated.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/sea.d.ts","../../../../node_modules/@types/node/sqlite.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"16934abaab7026ac114da441aabea1a0","affectsGlobalScope":true,"impliedNodeFormat":1},"d4306fb2e47f74835e8674ffac07d76f","e437c5c1302869326c3bb93da85bbbcf","e4324975a566567b21d350615f1fc6ac","333b1b9a2a9ac3b8497dba5c63b5ba50","6cffacd662b6eb5fa7a36aa2ea366bfa","b4c34f9c23304dbef2d23698637ed638","e5cb86a5fc491796ecd1d2dd348d208f","feb6c6fb19cdb246a5d8acb36a6901c7","9443a7f109277ffaa79d893ed2549995",{"version":"926204c28cd3d073865348473ae28d2e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f25e42c801b2cb3cf2b39792006a9beb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6344b55f26a4e81d9608777dbfb877dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3c0ed28e53d3695b363e256ec1c023fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4c2761daba7f17141c25baa0821ac5da","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b87656acabd63e69379ff6ffcfe52fc7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"597469522da047a5af5222cc6989f405","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1708ea4d34dc37fadadc63ca01127e80","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"55d97a8c6fbf34a30450a7b1e5f7a298","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0ee05eb59426d33e374226d8dcfa708b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e347c14030993906efcfbb88915b6a05","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b0231263857c9b6a03641acdc9280ceb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3b15c4a83b598cacb4067676e6f0abed","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b417d97b7934cef63b1889abec0bbfbf","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"09a6cf4032ebba60ce22a501e663f881","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2b056277dd138e8f5650fc04e20eaa8d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e22cc07e3f3cc242ba52fa3f8ea1fc58","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2c45da767a1bfbb220848df1bc4029e4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b44c3e0fbaf2130cdcf6ac38b120ffa1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b612fb5cf8e5d964b92063a75207632a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02705151a5e1551b9162a9ed8ab763f7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"41025e398be9215d32e4337335da8f0b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"52684c2b1f353a5538e4f275182a54cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6dedb6a4f90d1df3a6fbe5693e44886c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ca3f36fe3562c07e0f0d71c2bebd3f6d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"409974d6129befbb8226ddd1c6558568","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4d9cfde2a1ae1b4925f1f9bc10848e5d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7e1daecc66dd564144e3bb1a0266b5fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a8e1d9bb35fd0637f2f9fd2b2a54f2ec","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f168501772a6543182765bfd5f2fbfe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a19c80aad1b2162103496f5ba293a732","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b69afa63cd5d059851c78adb2856ee09","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ae2fc5d954e9b0f5feee3d481b953c27","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1cfd3091a071d8b6feec15277643bafe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1da2c1f258970fd3cc91184f69e91a9d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a0d87491913d843139e0c993650a3235","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4ef72aa378127e7b7abba915b0110b1e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3ec74c6a7d4463f0254db3a74cf75646","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"84c2bdfa470d075526cce6322d81b0b6","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0b3844c2b8c73e4e1ab91431411cad11","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4fc71cf4a15b8d99675a31df77f26e07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d1b49564ddaeca3df5b6dbae925d2242","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6a25be566d60ccfc2d6e8b7bfdeefa83","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8a20e27646985dfd58c57ca6566553dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9969f02ad3cdcbf4f709405cda44167f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9c9be4792a7a4f42c15ae7360bf28779","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8cf777fe00349b71ee9c4b6f3fe7fd19","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"74f96bc192530c9723f572bfff3d3078","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1df91c56b25955c56387426f378173c5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0219894bfe5042c7e1aa2d22e4a91ed0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"be41035d7b941482a1e1ae6a5c5dcca5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f64453cbf9671f28158677fa5c43967a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"33f317af5428801f944a478d2c1e38e5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"fd63ac68285d817bd19923709a48f624","signature":"233d5026a5d4bd8724142128a2fe2130","impliedNodeFormat":99},{"version":"9075a0db67e32df49f403b54c177b456","signature":"5807c0d89a79a671f9a1eabd5bcecbad","impliedNodeFormat":99},{"version":"ee8ba5a0037ec392b439c24748b98db8","signature":"b9e803b5f65b7844eaa00cade4d9fbfe","impliedNodeFormat":99},{"version":"7158b19e3219f0e15b63910f2fa932d2","signature":"65e51da710d402a4f1184e7845bd49d6","impliedNodeFormat":99},{"version":"52c899c9dc8804f19c90618a0cc87ffa","signature":"44acc31fd48dd958d1858d18b7bd6931","impliedNodeFormat":99},{"version":"7c70265554bc7a79d61219866c94eef6","signature":"72fa9cb68721fd274bafd58a5ef5c55c","impliedNodeFormat":99},{"version":"2514e9a2749c0fc18d2f478e9e1e641e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6ae4c332ecb24e76c1e47c0e21d4663d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"69ee0752d1e70c56ca160360425752a9","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bf33440030f0a0fae7d1efd6c293a8d2","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9af0a7e3ef1c42cd066b9f8d365cc1ba","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7b772cebc7136c34fc77954aef70519d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9eca652586205dc5b07f9ba57b1c8500","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ec5f75939754ce94652189ec7d0d3058","affectsGlobalScope":true,"impliedNodeFormat":1},"49133c0dfbc32ab95668c3443dea49e5","85c2cf74d24d4069fac4686501a2d7e3","9f970a4ba4bb3ed6326d46b3ddab3f63","f444b82bb192c8ecc7c9a06cba5c1fba","75de66fc4824402123c0d694ccc0a085","db51f206bae5021bd84c7079251e08e9","fcd1a513c1e5802916fa602e8b8e64bc","aedc93367cdc148d7dd56ef6fd5ef308","8e2bc11d0328ba95e490a741c44a215d","d63481078bffe02fbaf6694a35815dc7","705645fe223430c696f47b708d592ca8","28d57c837c94adb42add03d499793cab","8c01a9bbae8449be21b3e018d59a74ac","44d3b7d58481743f4726cf411e667164","679024f8e9f58a112f4badf119c4d612","74d351e4ed233e82c6d74c444c1a6b86","94d8e37d28e92494f484dd9afe8f043c","79db245997e9261ae21e5f3d93e3493b","c3659054228b00c4e2a22d9ebea8b4f0","d7e5f7a0f1f883f28458f684106e7643","c2364011a80b6a9e3cc0e77895bad577","38da5c670190f4a35cbc204ca6c616bf","d95cc0eb29beed58f5ce72db21398f53","ecd53256b1ec7379c73316eaf392a69c","db5a9211b779628398011a5b8f5b8b5d","69c7bb9c3befe9ae37eed0e6a6310fee","1cba93fafccb7b2655f0e75229185e83","094ecadae30f65a82b77343dde77a666","f75df12d75dd783b03a0329b95abdb25","b438b08b2f0ed94a95a75c8990d9021b","f2becd2589591db92ab14e803eb8bdd5","8dec66ce34e6fe771e58a92b7068edc0","30f12c2660896a33bd3c3a126392c80a","0468c0ccd0ec7770b76481b165564d62","188234d616a4f50ed9b14c8f84a39f33","4c116bcf0a47ea8fbf4072f380925fa7","22111ccb71c0e95ff0796144b40eed2b","add85ec26ba695fc99c698dbec065f8c","5bfde23f96fc502b5413d772c35e1abf","b744265d8ad12b7d4d5c5dc35d18d44e","eff32168b8348b822afeed9cbf61afa7","acaa6ef6fcd5ba662929d6036121a616",{"version":"dd1cf1cc3aa21cd78b4869a44d98c6d9","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"292c9398a407b33b1d9c9812b673387a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"45df94b3c51b898624bacc2bcd6d9eb2","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7d352f71d1b1bcc12c79dd0e4597537c","affectsGlobalScope":true,"impliedNodeFormat":1},"db11b80743ed5356b81d763a708788e6","39078ea063fcaf72bd3cca7e0d13d017","f81aa09811fa65ac6f354ab0018d3c38","e2f0114efc512fd95bdc12c81d5e8d6a",{"version":"282318b178d190157a4deacb14f3040a","affectsGlobalScope":true,"impliedNodeFormat":1},"aafe512c4216100fd65028f9b2afce83","54c5c3dcfdb5f7cf5fbbccfff6ead3fa",{"version":"dc14f078230582a2f8fb2138bfcf4f85","affectsGlobalScope":true,"impliedNodeFormat":1},"b2b472cd0bf0f8d5f022e00ca1c401f4","370d966b810b687a9e58851208cb3d4c","39b3089f3df8d14e0f2ddac0479872d9","cc7a57e86f908c313649aea8d90377e1","5c271f10d8a9b9a1206bc82a4fe5b84d","fbe31979333ec391d8b59e8f42236e8e","6751c8c175fac6bbe7b935582cdfdca7",{"version":"a3f111d2a29b6cdd04fc4b41aa560c86","affectsGlobalScope":true,"impliedNodeFormat":1},"5f4ac576bcdc670a8489c881b23a2b17","a500e7362abeae2d2f1fefea525dc869","02a1ccf1ef65bfbf65865ac4ce346974","d589d01c82f6793f20d2f5c838462e3d","dbe700f7f1fa52fd220c7ee2c6617ebc","579675a2c3b0f8c532a82ad9cbd5d384","b2e8f93606aeb2dee2a4cc9272c56973",{"version":"a8e5d3e42303570b1114b6cd9ef9f38a","affectsGlobalScope":true,"impliedNodeFormat":1},"0003c8459d069181cc4856724fcf2832","c9053dbbe4fa2853f2d3f73b9a2fee81","4e458316a6083cbd2bba2fd29f674dd5",{"version":"3cccee1f2c106192d18ac4e08119f872","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"057189402e597cd50262b082723f21ff","affectsGlobalScope":true,"impliedNodeFormat":1},"6b26581aa2587701d570206a0db8c9ee","88a29e2aac8082c0910733950159e1ca","10282f14d9c2a5cbf3bcf2b1c8cebeaf","0f80958d77cd6301b43c1d7904e3e4bc","3bdc645524ab0d2f6795d3a008833bd7","deb50b47eb75a5566532a763fa1324fa","6e61cd09c2e15845909de3ed59a00b37","3e4ffe5f2733e0589b2612bd86f6cec3","c8206d568b54e5ea06131963eecd576a","15878f4f50c2e562c0768eb735c2aed5",{"version":"cb8f7733bee3d973c152a75fad9f6da6","affectsGlobalScope":true,"impliedNodeFormat":1},"dd404118e8bd70aff746f7d31e46270b","a0fa4618173795c74b488178ea77f951",{"version":"6b8649a280031d9e86955db721cfad87","affectsGlobalScope":true,"impliedNodeFormat":1},"4bc8f13c472858fb74f77388c0c5d885","75ab229142dad0ca2ff14d02d52f11f9","c72d2516d1e8910caca33c4dff75fcd4","f0231f36cb7117fbe9271ff19ef0f5f4",{"version":"8a642eed2a45ac7028479b6089a04842","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1e6ddb6b86dc5d86e75ba797d5324346","affectsGlobalScope":true,"impliedNodeFormat":1},"701aef085585b152042aa216b06bb4b8","e9bc5b1de50e48fa9857b64091673883","9268959cff1006c82e6abbd73824db97",{"version":"8f1c048bd5761910f5ea340fe4d792cd","affectsGlobalScope":true,"impliedNodeFormat":1},"6b1f3649b0eabeaca20c778fcc5f270c","eb567c7b5824aab578f75bbccf9f4b05"],"fileIdsList":[[72,125,126,128,129,130,131,132,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],[72,124,126,128,129,130,131,132,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],[72,124,125,128,129,130,131,132,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],[124,125,126,128,129,130,131,132,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],[72,124,125,126,129,130,131,132,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],[72,124,125,126,128,130,131,132,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],[72,124,125,126,128,129,131,132,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],[72,124,125,126,128,129,130,131,132,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],[72,124,125,126,128,129,130,132,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],[72,124,125,126,128,129,130,131,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],[72,124,125,126,128,129,130,131,132,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],[72,124,125,126,128,129,130,131,132,133,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],[72,124,125,126,128,129,130,131,132,133,134,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],[72,124,125,126,128,129,130,131,132,133,134,135,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,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],[72,119,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,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],[70,71,72,73,74,75,76,77,120,121,122,123,124,125,126,128,129,130,131,132,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,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],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,164,165,166,167,168,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,165,166,167,168,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,166,167,168,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,167,168,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,168,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,169,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,170,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,171,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,172,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,173,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,174,175,176,177],[72,124,125,126,128,129,130,131,132,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,175,176,177],[72,124,125,126,128,129,130,131,132,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,176,177],[72,119,124,125,126,128,129,130,131,132,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],[72,119,124,125,126,128,129,130,131,132,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,177],[72,124,125,126,128,129,130,131,132,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],[72,84,87,90,91,124,125,126,128,129,130,131,132,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],[72,87,124,125,126,128,129,130,131,132,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],[72,87,91,124,125,126,128,129,130,131,132,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],[72,81,124,125,126,128,129,130,131,132,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],[72,85,124,125,126,128,129,130,131,132,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],[72,83,84,87,124,125,126,128,129,130,131,132,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],[72,124,125,126,128,129,130,131,132,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],[72,81,124,125,126,128,129,130,131,132,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],[72,83,87,124,125,126,128,129,130,131,132,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],[72,78,79,80,82,86,124,125,126,128,129,130,131,132,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],[72,87,96,104,124,125,126,128,129,130,131,132,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],[72,79,85,124,125,126,128,129,130,131,132,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],[72,87,113,114,124,125,126,128,129,130,131,132,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],[72,79,82,87,124,125,126,128,129,130,131,132,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],[72,78,124,125,126,128,129,130,131,132,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],[72,81,82,83,85,86,87,88,89,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,114,115,116,117,118,124,125,126,128,129,130,131,132,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],[72,87,106,109,124,125,126,128,129,130,131,132,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],[72,87,96,97,98,124,125,126,128,129,130,131,132,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],[72,85,87,97,99,124,125,126,128,129,130,131,132,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],[72,86,124,125,126,128,129,130,131,132,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],[72,79,81,87,124,125,126,128,129,130,131,132,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],[72,87,91,97,99,124,125,126,128,129,130,131,132,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],[72,91,124,125,126,128,129,130,131,132,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],[72,85,87,90,124,125,126,128,129,130,131,132,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],[72,79,83,87,96,124,125,126,128,129,130,131,132,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],[72,87,106,124,125,126,128,129,130,131,132,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],[72,99,124,125,126,128,129,130,131,132,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],[72,81,87,113,124,125,126,128,129,130,131,132,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],[64,65,72,124,125,126,128,129,130,131,132,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],[64,72,124,125,126,128,129,130,131,132,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],[67,68,72,124,125,126,128,129,130,131,132,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]],"options":{"composite":true,"declaration":true,"declarationMap":true,"exactOptionalPropertyTypes":true,"module":199,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noPropertyAccessFromIndexSignature":true,"noUncheckedIndexedAccess":true,"noImplicitOverride":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":true,"sourceMap":true,"target":10,"tsBuildInfoFile":"./identity.tsbuildinfo","useUnknownInCatchVariables":true,"verbatimModuleSyntax":true},"referencedMap":[[124,1],[125,2],[126,3],[72,4],[128,5],[129,6],[130,7],[70,8],[131,9],[132,10],[133,11],[134,12],[135,13],[136,14],[137,15],[138,16],[139,17],[140,18],[141,19],[73,8],[71,8],[142,20],[143,21],[144,22],[178,23],[145,24],[146,25],[147,26],[148,27],[149,28],[150,29],[151,30],[152,31],[153,32],[154,33],[155,34],[156,35],[157,36],[158,37],[159,38],[160,39],[162,40],[161,41],[163,42],[164,43],[165,44],[166,45],[167,46],[168,47],[169,48],[170,49],[171,50],[172,51],[173,52],[174,53],[175,54],[74,8],[75,8],[76,8],[77,8],[120,55],[121,8],[122,8],[123,8],[176,56],[177,57],[62,8],[63,8],[12,8],[11,8],[2,8],[13,8],[14,8],[15,8],[16,8],[17,8],[18,8],[19,8],[20,8],[3,8],[21,8],[22,8],[4,8],[23,8],[27,8],[24,8],[25,8],[26,8],[28,8],[29,8],[30,8],[5,8],[31,8],[32,8],[33,8],[34,8],[6,8],[38,8],[35,8],[36,8],[37,8],[39,8],[7,8],[40,8],[45,8],[46,8],[41,8],[42,8],[43,8],[44,8],[8,8],[50,8],[47,8],[48,8],[49,8],[51,8],[9,8],[52,8],[53,8],[54,8],[56,8],[55,8],[57,8],[58,8],[10,8],[59,8],[60,8],[1,8],[61,8],[127,8],[96,58],[108,59],[93,60],[109,8],[118,61],[84,62],[85,63],[83,8],[117,64],[112,65],[116,66],[87,67],[105,68],[86,69],[115,70],[81,71],[82,65],[88,59],[89,8],[95,66],[92,59],[79,72],[119,73],[110,74],[99,75],[98,59],[100,76],[103,77],[97,78],[101,79],[113,64],[90,80],[91,81],[104,82],[80,8],[107,83],[106,59],[94,81],[102,84],[111,8],[78,8],[114,85],[64,8],[66,86],[65,8],[67,87],[68,87],[69,88]],"latestChangedDtsFile":"./testing/index.d.ts"}
@@ -0,0 +1,3 @@
1
+ export type { EnqueueIdentityEmail, Identity, IdentityAccount, IdentityEmail, IdentitySession, } from "./identity-types.js";
2
+ export { normalizeIdentityEmail } from "./normalize-identity-email.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,oBAAoB,EACpB,QAAQ,EACR,eAAe,EACf,aAAa,EACb,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { normalizeIdentityEmail } from "./normalize-identity-email.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Normalize an email before addressing a message or comparing an invitation. */
2
+ export declare function normalizeIdentityEmail(value: unknown): string | null;
3
+ //# sourceMappingURL=normalize-identity-email.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize-identity-email.d.ts","sourceRoot":"","sources":["../src/normalize-identity-email.ts"],"names":[],"mappings":"AAEA,iFAAiF;AACjF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAIpE"}
@@ -0,0 +1,9 @@
1
+ const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/u;
2
+ /** Normalize an email before addressing a message or comparing an invitation. */
3
+ export function normalizeIdentityEmail(value) {
4
+ if (typeof value !== "string")
5
+ return null;
6
+ const email = value.trim().toLowerCase();
7
+ return email.length <= 254 && EMAIL.test(email) ? email : null;
8
+ }
9
+ //# sourceMappingURL=normalize-identity-email.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize-identity-email.js","sourceRoot":"","sources":["../src/normalize-identity-email.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG,6BAA6B,CAAC;AAE5C,iFAAiF;AACjF,MAAM,UAAU,sBAAsB,CAAC,KAAc;IACnD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3C,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACzC,OAAO,KAAK,CAAC,MAAM,IAAI,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AACjE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { Identity, IdentityAccount } from "../identity-types.js";
2
+ export type IdentitySessionConformance = {
3
+ readonly identity: Identity;
4
+ readonly origin: string;
5
+ readonly activeCookie: string;
6
+ readonly otherCookie: string;
7
+ readonly expiredCookie: string;
8
+ readonly account: IdentityAccount;
9
+ };
10
+ /** Apply the same session laws to a stand-in and a database-backed provider. */
11
+ export declare function verifyIdentitySessionConformance(input: IdentitySessionConformance): Promise<void>;
12
+ //# sourceMappingURL=identity-session-conformance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-session-conformance.d.ts","sourceRoot":"","sources":["../../src/testing/identity-session-conformance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEtE,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;CACnC,CAAC;AAEF,gFAAgF;AAChF,wBAAsB,gCAAgC,CACpD,KAAK,EAAE,0BAA0B,GAChC,OAAO,CAAC,IAAI,CAAC,CAwCf"}
@@ -0,0 +1,30 @@
1
+ import assert from "node:assert/strict";
2
+ /** Apply the same session laws to a stand-in and a database-backed provider. */
3
+ export async function verifyIdentitySessionConformance(input) {
4
+ const { identity, origin, activeCookie, otherCookie, expiredCookie, account, } = input;
5
+ const active = new Headers({ cookie: activeCookie });
6
+ const other = new Headers({ cookie: otherCookie });
7
+ const expired = new Headers({ cookie: expiredCookie });
8
+ assert.equal(await identity.readSession(new Headers()), null);
9
+ assert.equal(await identity.readSession(expired), null);
10
+ const current = await identity.readSession(active);
11
+ assert.ok(current);
12
+ assert.deepEqual(current.account, account);
13
+ assert.ok(current.expiresAt instanceof Date);
14
+ assert.ok(await identity.readSession(other));
15
+ const projection = await identity.handle(new Request(`${origin}/api/auth/get-session`, { headers: active }));
16
+ assert.equal(projection.status, 200);
17
+ const body = await projection.json();
18
+ assert.deepEqual(body, {
19
+ account,
20
+ expiresAt: current.expiresAt.toISOString(),
21
+ });
22
+ const signedOut = await identity.handle(new Request(`${origin}/api/auth/sign-out`, {
23
+ method: "POST",
24
+ headers: new Headers({ cookie: activeCookie, origin }),
25
+ }));
26
+ assert.equal(signedOut.status, 200);
27
+ assert.equal(await identity.readSession(active), null);
28
+ assert.ok(await identity.readSession(other));
29
+ }
30
+ //# sourceMappingURL=identity-session-conformance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-session-conformance.js","sourceRoot":"","sources":["../../src/testing/identity-session-conformance.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAYxC,gFAAgF;AAChF,MAAM,CAAC,KAAK,UAAU,gCAAgC,CACpD,KAAiC;IAEjC,MAAM,EACJ,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,WAAW,EACX,aAAa,EACb,OAAO,GACR,GAAG,KAAK,CAAC;IACV,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;IACrD,MAAM,KAAK,GAAG,IAAI,OAAO,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;IAEvD,MAAM,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,WAAW,CAAC,IAAI,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;IAC9D,MAAM,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;IACxD,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACnD,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;IACnB,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,YAAY,IAAI,CAAC,CAAC;IAC7C,MAAM,CAAC,EAAE,CAAC,MAAM,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;IAE7C,MAAM,UAAU,GAAG,MAAM,QAAQ,CAAC,MAAM,CACtC,IAAI,OAAO,CAAC,GAAG,MAAM,uBAAuB,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CACnE,CAAC;IACF,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,MAAM,IAAI,GAAY,MAAM,UAAU,CAAC,IAAI,EAAE,CAAC;IAC9C,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE;QACrB,OAAO;QACP,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE;KAC3C,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,MAAM,CACrC,IAAI,OAAO,CAAC,GAAG,MAAM,oBAAoB,EAAE;QACzC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,IAAI,OAAO,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;KACvD,CAAC,CACH,CAAC;IACF,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,MAAM,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC;IACvD,MAAM,CAAC,EAAE,CAAC,MAAM,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { Identity, IdentitySession } from "../identity-types.js";
2
+ export type InMemoryIdentitySessions = Readonly<Record<string, IdentitySession>>;
3
+ /** A cookie header value for a session explicitly seeded by a test. */
4
+ export declare function inMemoryIdentityCookie(key: string): string;
5
+ /** A stand-in for the verified-session boundary, driven by a test clock. */
6
+ export declare function inMemoryIdentity(seed: InMemoryIdentitySessions, now: () => Date): Identity;
7
+ //# sourceMappingURL=in-memory-identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-memory-identity.d.ts","sourceRoot":"","sources":["../../src/testing/in-memory-identity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEtE,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAC7C,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAChC,CAAC;AAcF,uEAAuE;AACvE,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,wBAAwB,EAC9B,GAAG,EAAE,MAAM,IAAI,GACd,QAAQ,CA8BV"}
@@ -0,0 +1,45 @@
1
+ const SESSION_COOKIE = "dads_fixture_session";
2
+ function tokenFrom(headers) {
3
+ const prefix = `${SESSION_COOKIE}=`;
4
+ return headers
5
+ .get("cookie")
6
+ ?.split(";")
7
+ .map((cookie) => cookie.trim())
8
+ .find((cookie) => cookie.startsWith(prefix))
9
+ ?.slice(prefix.length);
10
+ }
11
+ /** A cookie header value for a session explicitly seeded by a test. */
12
+ export function inMemoryIdentityCookie(key) {
13
+ return `${SESSION_COOKIE}=${key}`;
14
+ }
15
+ /** A stand-in for the verified-session boundary, driven by a test clock. */
16
+ export function inMemoryIdentity(seed, now) {
17
+ const sessions = new Map(Object.entries(seed));
18
+ function sessionFor(headers) {
19
+ const key = tokenFrom(headers);
20
+ const session = key === undefined ? undefined : sessions.get(key);
21
+ if (session === undefined || !session.account.emailVerified)
22
+ return null;
23
+ if (session.expiresAt.getTime() <= now().getTime())
24
+ return null;
25
+ return session;
26
+ }
27
+ function handle(request) {
28
+ const path = new URL(request.url).pathname;
29
+ if (path === "/api/auth/get-session" && request.method === "GET") {
30
+ return Promise.resolve(Response.json(sessionFor(request.headers)));
31
+ }
32
+ if (path === "/api/auth/sign-out" && request.method === "POST") {
33
+ const key = tokenFrom(request.headers);
34
+ if (key !== undefined)
35
+ sessions.delete(key);
36
+ return Promise.resolve(Response.json({ ok: true }));
37
+ }
38
+ return Promise.resolve(Response.json({ error: "not-found" }, { status: 404 }));
39
+ }
40
+ return {
41
+ handle,
42
+ readSession: (headers) => Promise.resolve(sessionFor(headers)),
43
+ };
44
+ }
45
+ //# sourceMappingURL=in-memory-identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-memory-identity.js","sourceRoot":"","sources":["../../src/testing/in-memory-identity.ts"],"names":[],"mappings":"AAMA,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAE9C,SAAS,SAAS,CAAC,OAAgB;IACjC,MAAM,MAAM,GAAG,GAAG,cAAc,GAAG,CAAC;IACpC,OAAO,OAAO;SACX,GAAG,CAAC,QAAQ,CAAC;QACd,EAAE,KAAK,CAAC,GAAG,CAAC;SACX,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;SAC9B,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5C,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,sBAAsB,CAAC,GAAW;IAChD,OAAO,GAAG,cAAc,IAAI,GAAG,EAAE,CAAC;AACpC,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,gBAAgB,CAC9B,IAA8B,EAC9B,GAAe;IAEf,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAE/C,SAAS,UAAU,CAAC,OAAgB;QAClC,MAAM,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;QAC/B,MAAM,OAAO,GAAG,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAClE,IAAI,OAAO,KAAK,SAAS,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa;YAAE,OAAO,IAAI,CAAC;QACzE,IAAI,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE;YAAE,OAAO,IAAI,CAAC;QAChE,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,SAAS,MAAM,CAAC,OAAgB;QAC9B,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;QAC3C,IAAI,IAAI,KAAK,uBAAuB,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,EAAE,CAAC;YACjE,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACrE,CAAC;QACD,IAAI,IAAI,KAAK,oBAAoB,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YAC/D,MAAM,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACvC,IAAI,GAAG,KAAK,SAAS;gBAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC5C,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACtD,CAAC;QACD,OAAO,OAAO,CAAC,OAAO,CACpB,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CACvD,CAAC;IACJ,CAAC;IAED,OAAO;QACL,MAAM;QACN,WAAW,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;KAC/D,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { verifyIdentitySessionConformance, type IdentitySessionConformance, } from "./identity-session-conformance.js";
2
+ export { inMemoryIdentity, inMemoryIdentityCookie, type InMemoryIdentitySessions, } from "./in-memory-identity.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,KAAK,0BAA0B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,KAAK,wBAAwB,GAC9B,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { verifyIdentitySessionConformance, } from "./identity-session-conformance.js";
2
+ export { inMemoryIdentity, inMemoryIdentityCookie, } from "./in-memory-identity.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,GAEjC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,sBAAsB,GAEvB,MAAM,yBAAyB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,38 @@
1
1
  {
2
2
  "name": "@dads-framework/identity",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "engines": {
6
+ "node": ">=22"
7
+ },
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ },
13
+ "./testing": {
14
+ "types": "./dist/testing/index.d.ts",
15
+ "default": "./dist/testing/index.js"
16
+ }
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "README.md"
21
+ ],
22
+ "scripts": {
23
+ "prepublishOnly": "node ../../../scripts/verify-prepublish.mjs",
24
+ "build": "tsc -b",
25
+ "test": "vitest run",
26
+ "typecheck": "tsc -b --pretty false"
27
+ },
28
+ "devDependencies": {
29
+ "vitest": "~4.1.0"
30
+ },
31
+ "license": "MIT",
32
+ "author": "Bryton Cooper",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/brytoncooper/dads-framework.git",
36
+ "directory": "packages/server/identity"
37
+ }
38
+ }