@kubun/plugin-credential 0.13.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,57 @@
1
+ # The Prosperity Public License 3.0.0
2
+
3
+ Contributor: Paul Le Cam
4
+
5
+ Source Code: https://github.com/PaulLeCam/kubun
6
+
7
+ ## Purpose
8
+
9
+ This license allows you to use and share this software for noncommercial purposes for free and to try this software for commercial purposes for thirty days.
10
+
11
+ ## Agreement
12
+
13
+ In order to receive this license, you have to agree to its rules. Those rules are both obligations under that agreement and conditions to your license. Don't do anything with this software that triggers a rule you can't or won't follow.
14
+
15
+ ## Notices
16
+
17
+ Make sure everyone who gets a copy of any part of this software from you, with or without changes, also gets the text of this license and the contributor and source code lines above.
18
+
19
+ ## Commercial Trial
20
+
21
+ Limit your use of this software for commercial purposes to a thirty-day trial period. If you use this software for work, your company gets one trial period for all personnel, not one trial per person.
22
+
23
+ ## Contributions Back
24
+
25
+ Developing feedback, changes, or additions that you contribute back to the contributor on the terms of a standardized public software license such as [the Blue Oak Model License 1.0.0](https://blueoakcouncil.org/license/1.0.0), [the Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html), [the MIT license](https://spdx.org/licenses/MIT.html), or [the two-clause BSD license](https://spdx.org/licenses/BSD-2-Clause.html) doesn't count as use for a commercial purpose.
26
+
27
+ ## Personal Uses
28
+
29
+ Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, doesn't count as use for a commercial purpose.
30
+
31
+ ## Noncommercial Organizations
32
+
33
+ Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution doesn't count as use for a commercial purpose regardless of the source of funding or obligations resulting from the funding.
34
+
35
+ ## Defense
36
+
37
+ Don't make any legal claim against anyone accusing this software, with or without changes, alone or with other technology, of infringing any patent.
38
+
39
+ ## Copyright
40
+
41
+ The contributor licenses you to do everything with this software that would otherwise infringe their copyright in it.
42
+
43
+ ## Patent
44
+
45
+ The contributor licenses you to do everything with this software that would otherwise infringe any patents they can license or become able to license.
46
+
47
+ ## Reliability
48
+
49
+ The contributor can't revoke this license.
50
+
51
+ ## Excuse
52
+
53
+ You're excused for unknowingly breaking [Notices](#notices) if you take all practical steps to comply within thirty days of learning you broke the rule.
54
+
55
+ ## No Liability
56
+
57
+ ***As far as the law allows, this software comes as is, without any warranty or condition, and the contributor won't be liable to anyone for any damages related to this software or this license, under any kind of legal claim.***
@@ -0,0 +1,79 @@
1
+ import { type CredentialAuthority } from '@kubun/credential';
2
+ import { HLC } from '@kubun/hlc';
3
+ import type { CredentialFactorDescriptor, CredentialStoreAPI } from '@kubun/store-credential';
4
+ /**
5
+ * Row-level operations over credential material, gated on authorization.
6
+ *
7
+ * Nothing here decrypts. The client generated the content key, encrypted the
8
+ * entry and built every wrapping, so the server's whole job is to hold bytes it
9
+ * cannot read and hand them back to someone entitled to them. The one component
10
+ * that does decrypt server-side is the plugin's own `api`, which opens the
11
+ * engine identity's wrapping for a consumer like the connector sync engine.
12
+ */
13
+ export type CredentialWrappingResult = {
14
+ wrappingID: string;
15
+ keyVersion: number;
16
+ factors: Array<CredentialFactorDescriptor>;
17
+ iv: string;
18
+ wrappedKey: string;
19
+ recipientDID: string | null;
20
+ };
21
+ export type CredentialKeyResult = {
22
+ keyID: string;
23
+ ownerDID: string;
24
+ suite: number;
25
+ version: number;
26
+ state: string;
27
+ wrappings: Array<CredentialWrappingResult>;
28
+ };
29
+ export type CredentialEntryResult = {
30
+ entryID: string;
31
+ keyID: string;
32
+ keyVersion: number;
33
+ iv: string;
34
+ ciphertext: string;
35
+ updatedAt: string | null;
36
+ writerDID: string | null;
37
+ };
38
+ export type PutCredentialWrappingInput = {
39
+ wrappingID: string;
40
+ keyVersion: number;
41
+ factors: Array<CredentialFactorDescriptor>;
42
+ iv: string;
43
+ wrappedKey: string;
44
+ recipientDID?: string | null;
45
+ };
46
+ export type PutCredentialKeyInput = {
47
+ keyID: string;
48
+ suite: number;
49
+ version: number;
50
+ wrappings: Array<PutCredentialWrappingInput>;
51
+ };
52
+ export type PutCredentialEntryInput = {
53
+ entryID: string;
54
+ keyID: string;
55
+ keyVersion: number;
56
+ iv: string;
57
+ ciphertext: string;
58
+ };
59
+ export type CredentialQueryContext = {
60
+ getKey(keyID: string): Promise<CredentialKeyResult>;
61
+ getEntry(entryID: string): Promise<CredentialEntryResult>;
62
+ listEntries(keyID: string): Promise<Array<string>>;
63
+ putKey(input: PutCredentialKeyInput): Promise<CredentialKeyResult>;
64
+ putEntry(input: PutCredentialEntryInput): Promise<CredentialEntryResult>;
65
+ deleteKey(keyID: string): Promise<boolean>;
66
+ deleteEntry(entryID: string): Promise<boolean>;
67
+ };
68
+ export declare function createCredentialQueryContext(params: {
69
+ getStore: () => Promise<CredentialStoreAPI>;
70
+ viewerDID: string;
71
+ /** The device's one clock — the same instance every other writer stamps from. */
72
+ hlc: HLC;
73
+ /**
74
+ * Required so no live caller falls back to device-DID equality: the engine
75
+ * assembles it per request from the viewer plus delegation tokens. Every gate
76
+ * below asks through it.
77
+ */
78
+ authority: CredentialAuthority;
79
+ }): CredentialQueryContext;
package/lib/context.js ADDED
@@ -0,0 +1,191 @@
1
+ import { entryProvenanceFields } from '@kubun/credential';
2
+ import { HLC } from '@kubun/hlc';
3
+ import { CredentialEntryID, CredentialKeyID } from '@kubun/id';
4
+ import { fromB64, toB64 } from '@sozai/codec';
5
+ import { GraphQLError } from 'graphql';
6
+ function notFound(what, id) {
7
+ return new GraphQLError(`${what} not found: ${id}`, {
8
+ extensions: {
9
+ code: 'CREDENTIAL_NOT_FOUND'
10
+ }
11
+ });
12
+ }
13
+ /**
14
+ * Kept distinct from not-found rather than collapsed.
15
+ *
16
+ * Collapsing hides an operator-debuggable condition and buys close to no
17
+ * privacy: ids are digests, so anyone able to name one already obtained it
18
+ * somewhere.
19
+ */ function notYours(keyID) {
20
+ return new GraphQLError(`Credential key ${keyID} belongs to another owner`, {
21
+ extensions: {
22
+ code: 'CREDENTIAL_NOT_YOURS'
23
+ }
24
+ });
25
+ }
26
+ function invalidID(what, id, cause) {
27
+ return new GraphQLError(`Invalid ${what}: ${id}`, {
28
+ extensions: {
29
+ code: 'CREDENTIAL_ID_INVALID'
30
+ },
31
+ originalError: cause instanceof Error ? cause : undefined
32
+ });
33
+ }
34
+ function toWrappingResult(wrapping) {
35
+ return {
36
+ wrappingID: wrapping.wrapping_id,
37
+ keyVersion: wrapping.key_version,
38
+ factors: wrapping.factors,
39
+ iv: toB64(new Uint8Array(wrapping.iv)),
40
+ wrappedKey: toB64(new Uint8Array(wrapping.wrapped_key)),
41
+ recipientDID: wrapping.recipient_did
42
+ };
43
+ }
44
+ function toEntryResult(entry) {
45
+ return {
46
+ entryID: entry.entry_id,
47
+ keyID: entry.key_id,
48
+ keyVersion: entry.key_version,
49
+ iv: toB64(new Uint8Array(entry.iv)),
50
+ ciphertext: toB64(new Uint8Array(entry.ciphertext)),
51
+ ...entryProvenanceFields(entry)
52
+ };
53
+ }
54
+ export function createCredentialQueryContext(params) {
55
+ const { authority, getStore } = params;
56
+ async function requireAuthorized(store, key, keyID, authorization) {
57
+ if (key == null) {
58
+ throw notFound('Credential key', keyID);
59
+ }
60
+ if (!await authority.authorize(authorization, {
61
+ key,
62
+ store
63
+ })) {
64
+ throw notYours(keyID);
65
+ }
66
+ return key;
67
+ }
68
+ async function loadKey(store, keyID, authorization) {
69
+ return await requireAuthorized(store, await store.getKey(keyID), keyID, authorization);
70
+ }
71
+ async function keyResult(store, key) {
72
+ const wrappings = await store.listWrappings(key.key_id);
73
+ return {
74
+ keyID: key.key_id,
75
+ ownerDID: key.owner_did,
76
+ suite: key.suite,
77
+ version: key.version,
78
+ state: key.state,
79
+ // Every wrapping, not only the viewer's: a client picks its own by reading
80
+ // the descriptors, and a device holding two identities has two candidates.
81
+ wrappings: wrappings.map(toWrappingResult)
82
+ };
83
+ }
84
+ return {
85
+ async getKey (keyID) {
86
+ const store = await getStore();
87
+ return await keyResult(store, await loadKey(store, keyID, 'read'));
88
+ },
89
+ async getEntry (entryID) {
90
+ const store = await getStore();
91
+ const entry = await store.getEntryWithProvenance(entryID);
92
+ if (entry == null) {
93
+ throw notFound('Credential entry', entryID);
94
+ }
95
+ // An entry carries no authorization of its own. Its key does, and that is
96
+ // the only thing that decides who may read the ciphertext.
97
+ await loadKey(store, entry.key_id, 'read');
98
+ return toEntryResult(entry);
99
+ },
100
+ async listEntries (keyID) {
101
+ const store = await getStore();
102
+ await loadKey(store, keyID, 'read');
103
+ return (await store.listEntries(keyID)).map((entry)=>entry.entry_id);
104
+ },
105
+ async putKey (input) {
106
+ try {
107
+ CredentialKeyID.fromString(input.keyID);
108
+ } catch (cause) {
109
+ throw invalidID('CredentialKeyID', input.keyID, cause);
110
+ }
111
+ if (input.wrappings.length === 0) {
112
+ throw new GraphQLError('A credential key needs at least one wrapping', {
113
+ extensions: {
114
+ code: 'CREDENTIAL_FACTORS_INVALID'
115
+ }
116
+ });
117
+ }
118
+ const store = await getStore();
119
+ const existing = await store.getKey(input.keyID);
120
+ if (existing != null) {
121
+ // Re-put is an update, and an update to someone else's key is a takeover.
122
+ await requireAuthorized(store, existing, input.keyID, 'administer');
123
+ }
124
+ // No op, stated rather than omitted. This context holds a VIEWER's DID and
125
+ // no signing key, and signing a viewer's write with the device key would
126
+ // attribute the change to the wrong principal.
127
+ await store.putKey({
128
+ keyID: input.keyID,
129
+ // Never the input, so a client cannot mint a key under another DID and
130
+ // then be refused access to what it wrote; and never re-resolved on an
131
+ // update, so an administrator cannot walk an existing key's owner.
132
+ ownerDID: existing?.owner_did ?? await authority.ownerForNewKey(),
133
+ suite: input.suite,
134
+ version: input.version,
135
+ state: 'active'
136
+ }, null);
137
+ for (const wrapping of input.wrappings){
138
+ await store.putWrapping({
139
+ wrappingID: wrapping.wrappingID,
140
+ keyID: input.keyID,
141
+ keyVersion: wrapping.keyVersion,
142
+ factors: wrapping.factors,
143
+ iv: fromB64(wrapping.iv),
144
+ wrappedKey: fromB64(wrapping.wrappedKey),
145
+ recipientDID: wrapping.recipientDID ?? null
146
+ }, null);
147
+ }
148
+ return await keyResult(store, await loadKey(store, input.keyID, 'administer'));
149
+ },
150
+ async putEntry (input) {
151
+ try {
152
+ CredentialEntryID.fromString(input.entryID);
153
+ } catch (cause) {
154
+ throw invalidID('CredentialEntryID', input.entryID, cause);
155
+ }
156
+ const store = await getStore();
157
+ // Administrative, not read: a recipient can decrypt this key's entries,
158
+ // which is not a reason to let it write into someone else's vault.
159
+ await loadKey(store, input.keyID, 'administer');
160
+ await store.putEntry({
161
+ entryID: input.entryID,
162
+ keyID: input.keyID,
163
+ keyVersion: input.keyVersion,
164
+ iv: fromB64(input.iv),
165
+ ciphertext: fromB64(input.ciphertext),
166
+ hlc: HLC.serialize(params.hlc.now())
167
+ }, null);
168
+ const written = await store.getEntryWithProvenance(input.entryID);
169
+ if (written == null) {
170
+ throw notFound('Credential entry', input.entryID);
171
+ }
172
+ return toEntryResult(written);
173
+ },
174
+ async deleteKey (keyID) {
175
+ const store = await getStore();
176
+ await loadKey(store, keyID, 'administer');
177
+ await store.deleteKey(keyID, null);
178
+ return true;
179
+ },
180
+ async deleteEntry (entryID) {
181
+ const store = await getStore();
182
+ const entry = await store.getEntry(entryID);
183
+ if (entry == null) {
184
+ throw notFound('Credential entry', entryID);
185
+ }
186
+ await loadKey(store, entry.key_id, 'administer');
187
+ await store.deleteEntry(entryID, null);
188
+ return true;
189
+ }
190
+ };
191
+ }
package/lib/index.d.ts ADDED
@@ -0,0 +1,17 @@
1
+ import type { KubunPlugin, PluginFactoryParams } from '@kubun/engine';
2
+ export type { CredentialAuthority, CredentialAuthorityParams, CredentialAuthorization, } from '@kubun/credential';
3
+ export type { CredentialEntryResult, CredentialKeyResult, CredentialQueryContext, CredentialWrappingResult, PutCredentialEntryInput, PutCredentialKeyInput, PutCredentialWrappingInput, } from './context.js';
4
+ export { createCredentialQueryContext } from './context.js';
5
+ export { createCredentialSchemaExtension } from './schema.js';
6
+ /**
7
+ * No `api`, so nothing reaches this plugin through `engine.getAPI('credential')`.
8
+ *
9
+ * It once carried a `readEntry` verb, justified by a connector that would call
10
+ * it. The connector does not: a plugin that needs to decrypt takes
11
+ * `@kubun/credential` directly, which is what the three-package split is for,
12
+ * and which is also the only way to bind a manager to the request's
13
+ * `StoreProvider` — a manager built here is bound to the root one and would put
14
+ * a write outside the transaction meant to contain it. Phases 5 and 6 do the
15
+ * same, so the verb was removed rather than left waiting for a caller.
16
+ */
17
+ export declare function createCredentialPlugin(): (params: PluginFactoryParams) => KubunPlugin;
package/lib/index.js ADDED
@@ -0,0 +1,40 @@
1
+ import { credentialStoreDefinition, getCredentialStore } from '@kubun/store-credential';
2
+ import { createCredentialQueryContext } from './context.js';
3
+ import { createCredentialSchemaExtension } from './schema.js';
4
+ export { createCredentialQueryContext } from './context.js';
5
+ export { createCredentialSchemaExtension } from './schema.js';
6
+ /**
7
+ * No `api`, so nothing reaches this plugin through `engine.getAPI('credential')`.
8
+ *
9
+ * It once carried a `readEntry` verb, justified by a connector that would call
10
+ * it. The connector does not: a plugin that needs to decrypt takes
11
+ * `@kubun/credential` directly, which is what the three-package split is for,
12
+ * and which is also the only way to bind a manager to the request's
13
+ * `StoreProvider` — a manager built here is bound to the root one and would put
14
+ * a write outside the transaction meant to contain it. Phases 5 and 6 do the
15
+ * same, so the verb was removed rather than left waiting for a caller.
16
+ */ export function createCredentialPlugin() {
17
+ return (params)=>{
18
+ params.db.register(credentialStoreDefinition);
19
+ return {
20
+ name: 'credential',
21
+ schemaExtension: ()=>createCredentialSchemaExtension(),
22
+ createContextFactory: ()=>{
23
+ // Returned bare: the engine nests each plugin's context under its own
24
+ // `name`, so wrapping it here would produce `ctx.credential.credential`.
25
+ return (ctx, stores)=>createCredentialQueryContext({
26
+ // Bound to the request's stores, which during a mutation IS the
27
+ // transaction. Reaching for the root provider here would put a write
28
+ // outside the transaction that is supposed to contain it.
29
+ getStore: ()=>getCredentialStore(stores),
30
+ viewerDID: ctx.viewerDID,
31
+ hlc: params.hlc,
32
+ // Assembled by the engine per request from the viewer plus the
33
+ // request's delegation tokens, so the vault honors a controller's
34
+ // `credential/administer` delegation instead of only owner equality.
35
+ authority: ctx.credentialAuthority
36
+ });
37
+ }
38
+ };
39
+ };
40
+ }
@@ -0,0 +1,18 @@
1
+ import type { SchemaExtension } from '@kubun/engine';
2
+ import type { CredentialQueryContext } from './context.js';
3
+ declare module '@kubun/graphql' {
4
+ interface PluginContextMap {
5
+ credential: CredentialQueryContext;
6
+ }
7
+ }
8
+ /**
9
+ * No rotate, revoke, unlock, lock or status field, and their absence is load
10
+ * bearing rather than pending.
11
+ *
12
+ * Rotate and revoke are not part of this surface. The lock lifecycle belongs to
13
+ * whichever process decrypts, which under this design is the client — a `status`
14
+ * field would have
15
+ * to report on a cache the server does not hold, and an `unlock` field would put
16
+ * a user's PIN in a GraphQL variable for no gain.
17
+ */
18
+ export declare function createCredentialSchemaExtension(): SchemaExtension;
package/lib/schema.js ADDED
@@ -0,0 +1,111 @@
1
+ import { GraphQLError } from 'graphql';
2
+ /**
3
+ * Ids are `String` rather than the `CredentialEntryID` scalar.
4
+ *
5
+ * The scalar's job is a *document field* that references an entry, where it stops
6
+ * a document id being stored as a credential reference. A plugin argument has no
7
+ * such schema to be registered against, so the resolver path validates by
8
+ * decoding instead — same check, different place.
9
+ */ const SDL = `
10
+ type CredentialWrapping {
11
+ wrappingID: String!
12
+ keyVersion: Int!
13
+ factors: JSON!
14
+ iv: String!
15
+ wrappedKey: String!
16
+ recipientDID: String
17
+ }
18
+
19
+ type CredentialKey {
20
+ keyID: String!
21
+ ownerDID: String!
22
+ suite: Int!
23
+ version: Int!
24
+ state: String!
25
+ wrappings: [CredentialWrapping!]!
26
+ }
27
+
28
+ type CredentialEntry {
29
+ entryID: String!
30
+ keyID: String!
31
+ keyVersion: Int!
32
+ iv: String!
33
+ ciphertext: String!
34
+ updatedAt: String
35
+ writerDID: String
36
+ }
37
+
38
+ input CredentialWrappingInput {
39
+ wrappingID: String!
40
+ keyVersion: Int!
41
+ factors: JSON!
42
+ iv: String!
43
+ wrappedKey: String!
44
+ recipientDID: String
45
+ }
46
+
47
+ input CredentialKeyInput {
48
+ keyID: String!
49
+ suite: Int!
50
+ version: Int!
51
+ wrappings: [CredentialWrappingInput!]!
52
+ }
53
+
54
+ input CredentialEntryInput {
55
+ entryID: String!
56
+ keyID: String!
57
+ keyVersion: Int!
58
+ iv: String!
59
+ ciphertext: String!
60
+ }
61
+
62
+ extend type Query {
63
+ credentialKey(keyID: String!): CredentialKey!
64
+ credentialEntry(entryID: String!): CredentialEntry!
65
+ credentialEntries(keyID: String!): [String!]!
66
+ }
67
+
68
+ extend type Mutation {
69
+ putCredentialKey(input: CredentialKeyInput!): CredentialKey!
70
+ putCredentialEntry(input: CredentialEntryInput!): CredentialEntry!
71
+ deleteCredentialKey(keyID: String!): Boolean!
72
+ deleteCredentialEntry(entryID: String!): Boolean!
73
+ }
74
+ `;
75
+ function requireCredential(ctx) {
76
+ if (ctx.credential == null) {
77
+ throw new GraphQLError('credential plugin is not wired into this context', {
78
+ extensions: {
79
+ code: 'CREDENTIAL_PLUGIN_MISSING'
80
+ }
81
+ });
82
+ }
83
+ return ctx.credential;
84
+ }
85
+ /**
86
+ * No rotate, revoke, unlock, lock or status field, and their absence is load
87
+ * bearing rather than pending.
88
+ *
89
+ * Rotate and revoke are not part of this surface. The lock lifecycle belongs to
90
+ * whichever process decrypts, which under this design is the client — a `status`
91
+ * field would have
92
+ * to report on a cache the server does not hold, and an `unlock` field would put
93
+ * a user's PIN in a GraphQL variable for no gain.
94
+ */ export function createCredentialSchemaExtension() {
95
+ return {
96
+ sdl: SDL,
97
+ resolvers: {
98
+ queryFields: {
99
+ credentialKey: (_source, args, context)=>requireCredential(context).getKey(args.keyID),
100
+ credentialEntry: (_source, args, context)=>requireCredential(context).getEntry(args.entryID),
101
+ credentialEntries: (_source, args, context)=>requireCredential(context).listEntries(args.keyID)
102
+ },
103
+ mutationFields: {
104
+ putCredentialKey: (_source, args, context)=>requireCredential(context).putKey(args.input),
105
+ putCredentialEntry: (_source, args, context)=>requireCredential(context).putEntry(args.input),
106
+ deleteCredentialKey: (_source, args, context)=>requireCredential(context).deleteKey(args.keyID),
107
+ deleteCredentialEntry: (_source, args, context)=>requireCredential(context).deleteEntry(args.entryID)
108
+ }
109
+ }
110
+ };
111
+ }
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@kubun/plugin-credential",
3
+ "version": "0.13.0",
4
+ "license": "see LICENSE.md",
5
+ "sideEffects": false,
6
+ "type": "module",
7
+ "exports": {
8
+ ".": "./lib/index.js"
9
+ },
10
+ "main": "lib/index.js",
11
+ "types": "lib/index.d.ts",
12
+ "files": [
13
+ "lib/*",
14
+ "LICENSE.md"
15
+ ],
16
+ "dependencies": {
17
+ "@kokuin/token": "^0.5.0",
18
+ "@sozai/codec": "^0.4.0",
19
+ "@sozai/runtime": "^0.1.0",
20
+ "graphql": "^16.14.2",
21
+ "@kubun/credential": "^0.13.0",
22
+ "@kubun/hlc": "^0.13.0",
23
+ "@kubun/db": "^0.13.0",
24
+ "@kubun/graphql": "^0.13.0",
25
+ "@kubun/id": "^0.13.0",
26
+ "@kubun/store-credential": "^0.13.0",
27
+ "@kubun/engine": "^0.13.0"
28
+ },
29
+ "devDependencies": {
30
+ "@kokuin/capability": "^0.3.0",
31
+ "@kokuin/controller": "^0.1.0",
32
+ "@kubun/db-better-sqlite": "^0.13.0",
33
+ "@kubun/test-utils": "^0.13.0",
34
+ "@kubun/store-controller": "^0.13.0"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "scripts": {
40
+ "build": "pnpm run build:clean && pnpm run build:js && pnpm run build:types",
41
+ "build:clean": "del lib",
42
+ "build:js": "swc src -d ./lib --config-file ../../node_modules/@kigu/dev/swc.json --strip-leading-paths",
43
+ "build:types": "tsc --emitDeclarationOnly --skipLibCheck",
44
+ "test": "pnpm run test:types && pnpm run test:unit",
45
+ "test:types": "tsc --noEmit -p tsconfig.test.json",
46
+ "test:unit": "vitest run"
47
+ }
48
+ }