@kokuin/vault 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/README.md +73 -2
- package/lib/branch.d.ts +4 -0
- package/lib/branch.js +12 -0
- package/lib/canonical-token.d.ts +1 -0
- package/lib/canonical-token.js +10 -0
- package/lib/digest.d.ts +31 -0
- package/lib/digest.js +60 -0
- package/lib/errors.d.ts +43 -0
- package/lib/errors.js +91 -0
- package/lib/factors.d.ts +17 -0
- package/lib/factors.js +59 -0
- package/lib/id.d.ts +7 -0
- package/lib/id.js +24 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.js +12 -0
- package/lib/key-cache.d.ts +17 -0
- package/lib/key-cache.js +65 -0
- package/lib/pin-throttle.d.ts +16 -0
- package/lib/pin-throttle.js +40 -0
- package/lib/record-types.d.ts +44 -0
- package/lib/record-types.js +339 -0
- package/lib/records.d.ts +91 -0
- package/lib/records.js +258 -0
- package/lib/suite.d.ts +89 -0
- package/lib/suite.js +267 -0
- package/lib/wrappable.d.ts +4 -0
- package/lib/wrappable.js +4 -0
- package/package.json +49 -3
package/lib/suite.d.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { KeyAgreementIdentity, MethodRegistry } from '@kokuin/token';
|
|
2
|
+
import type { Runtime } from '@sozai/runtime';
|
|
3
|
+
import type { FactorDescriptor } from './factors.js';
|
|
4
|
+
/** X25519 / HKDF-SHA256 / Argon2id / A256GCM. */
|
|
5
|
+
export declare const SUITE_VAULT_1 = 1;
|
|
6
|
+
export type Argon2Cost = {
|
|
7
|
+
m: number;
|
|
8
|
+
t: number;
|
|
9
|
+
p: number;
|
|
10
|
+
};
|
|
11
|
+
/** Memory KiB, passes, lanes. Costs are per wrapping, independent of suite version. */
|
|
12
|
+
export declare const DEFAULT_ARGON2_COST: Argon2Cost;
|
|
13
|
+
export type SecretFactorKind = 'passphrase' | 'pin';
|
|
14
|
+
export type FactorInput = {
|
|
15
|
+
kind: 'did';
|
|
16
|
+
recipientDID: string;
|
|
17
|
+
} | {
|
|
18
|
+
kind: SecretFactorKind;
|
|
19
|
+
input: Uint8Array;
|
|
20
|
+
cost?: Argon2Cost;
|
|
21
|
+
};
|
|
22
|
+
export type FactorInputs = Partial<Record<SecretFactorKind, Uint8Array>>;
|
|
23
|
+
export type VaultSuite = {
|
|
24
|
+
id: number;
|
|
25
|
+
name: string;
|
|
26
|
+
generateContentKey(runtime: Runtime): Uint8Array;
|
|
27
|
+
wrap(params: WrapParams): Promise<WrapResult>;
|
|
28
|
+
unwrap(params: UnwrapParams): Promise<Uint8Array>;
|
|
29
|
+
encryptEntry(params: EncryptEntryParams): EncryptEntryResult;
|
|
30
|
+
decryptEntry(params: DecryptEntryParams): Uint8Array;
|
|
31
|
+
};
|
|
32
|
+
export type WrapParams = {
|
|
33
|
+
runtime: Runtime;
|
|
34
|
+
contentKey: Uint8Array;
|
|
35
|
+
factors: Array<FactorInput>;
|
|
36
|
+
wrappingID: string;
|
|
37
|
+
keyID: string;
|
|
38
|
+
keyVersion: number;
|
|
39
|
+
methods?: MethodRegistry;
|
|
40
|
+
};
|
|
41
|
+
export type EncryptEntryResult = {
|
|
42
|
+
iv: Uint8Array;
|
|
43
|
+
ciphertext: Uint8Array;
|
|
44
|
+
};
|
|
45
|
+
export type WrapResult = {
|
|
46
|
+
descriptorDigest: string;
|
|
47
|
+
descriptors: Array<FactorDescriptor>;
|
|
48
|
+
iv: Uint8Array;
|
|
49
|
+
wrappedKey: Uint8Array;
|
|
50
|
+
};
|
|
51
|
+
export type UnwrapParams = {
|
|
52
|
+
/** Trusted local state or authenticated metadata, independent of presented descriptors. */
|
|
53
|
+
expectedDescriptorDigest?: string;
|
|
54
|
+
/** Informational digest from the presented wrapping, never used as a trust anchor. */
|
|
55
|
+
descriptorDigest?: string;
|
|
56
|
+
identity: KeyAgreementIdentity | null;
|
|
57
|
+
descriptors: Array<FactorDescriptor>;
|
|
58
|
+
inputs?: FactorInputs;
|
|
59
|
+
iv: Uint8Array;
|
|
60
|
+
wrappedKey: Uint8Array;
|
|
61
|
+
wrappingID: string;
|
|
62
|
+
keyID: string;
|
|
63
|
+
keyVersion: number;
|
|
64
|
+
};
|
|
65
|
+
export type EncryptEntryParams = {
|
|
66
|
+
runtime: Runtime;
|
|
67
|
+
contentKey: Uint8Array;
|
|
68
|
+
plaintext: Uint8Array;
|
|
69
|
+
keyID: string;
|
|
70
|
+
keyVersion: number;
|
|
71
|
+
entryID: string;
|
|
72
|
+
};
|
|
73
|
+
export type DecryptEntryParams = {
|
|
74
|
+
contentKey: Uint8Array;
|
|
75
|
+
iv: Uint8Array;
|
|
76
|
+
ciphertext: Uint8Array;
|
|
77
|
+
keyID: string;
|
|
78
|
+
keyVersion: number;
|
|
79
|
+
entryID: string;
|
|
80
|
+
};
|
|
81
|
+
export declare function validateFactorList(kinds: Array<string>): void;
|
|
82
|
+
export declare function getSuite(id: number): VaultSuite;
|
|
83
|
+
export declare function isSupportedSuite(id: number): boolean;
|
|
84
|
+
export type WrappedKey = WrapResult;
|
|
85
|
+
export type EncryptedEntry = EncryptEntryResult;
|
|
86
|
+
export type CryptoAddress = {
|
|
87
|
+
keyID: string;
|
|
88
|
+
keyVersion: number;
|
|
89
|
+
};
|
package/lib/suite.js
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { deriveSharedSecretAsync } from '@kokuin/jwe';
|
|
2
|
+
import { gcm } from '@noble/ciphers/aes.js';
|
|
3
|
+
import { argon2idAsync } from '@noble/hashes/argon2.js';
|
|
4
|
+
import { hkdf } from '@noble/hashes/hkdf.js';
|
|
5
|
+
import { sha256 } from '@noble/hashes/sha2.js';
|
|
6
|
+
import { concatBytes } from '@noble/hashes/utils.js';
|
|
7
|
+
import { canonicalStringify, fromB64, fromUTF, toB64 } from '@sozai/codec';
|
|
8
|
+
import { checkDescriptorDigest, descriptorDigest } from './digest.js';
|
|
9
|
+
import { InvalidVaultFactors, NoAvailableFactor, UnsupportedVaultSuite, VaultSecretRejected, VaultTampered } from './errors.js';
|
|
10
|
+
/** X25519 / HKDF-SHA256 / Argon2id / A256GCM. */ export const SUITE_VAULT_1 = 1;
|
|
11
|
+
const IV_LENGTH = 12;
|
|
12
|
+
const CONTENT_KEY_LENGTH = 32;
|
|
13
|
+
const FACTOR_SECRET_LENGTH = 32;
|
|
14
|
+
const SALT_LENGTH = 16;
|
|
15
|
+
const WRAP_INFO_PREFIX = 'kokuin/vault/wrap/v1';
|
|
16
|
+
const ARGON2_COST_LIMITS = {
|
|
17
|
+
m: {
|
|
18
|
+
min: 8,
|
|
19
|
+
max: 262_144
|
|
20
|
+
},
|
|
21
|
+
t: {
|
|
22
|
+
min: 1,
|
|
23
|
+
max: 10
|
|
24
|
+
},
|
|
25
|
+
p: {
|
|
26
|
+
min: 1,
|
|
27
|
+
max: 16
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
/** Memory KiB, passes, lanes. Costs are per wrapping, independent of suite version. */ export const DEFAULT_ARGON2_COST = {
|
|
31
|
+
m: 19456,
|
|
32
|
+
t: 2,
|
|
33
|
+
p: 1
|
|
34
|
+
};
|
|
35
|
+
function invalidArgon2Cost(cost) {
|
|
36
|
+
for (const name of [
|
|
37
|
+
'm',
|
|
38
|
+
't',
|
|
39
|
+
'p'
|
|
40
|
+
]){
|
|
41
|
+
const value = cost[name];
|
|
42
|
+
const limits = ARGON2_COST_LIMITS[name];
|
|
43
|
+
if (!Number.isSafeInteger(value) || value < limits.min || value > limits.max) {
|
|
44
|
+
return `${name} must be an integer from ${limits.min} through ${limits.max}`;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
// Factor order, wrapping salt, and suite/key/version binding are part of the wire scheme.
|
|
50
|
+
function deriveKEK(secrets, wrappingID, suiteID, keyID, keyVersion) {
|
|
51
|
+
const info = fromUTF(`${WRAP_INFO_PREFIX}:${suiteID}:${keyID}:${keyVersion}`);
|
|
52
|
+
return hkdf(sha256, concatBytes(...secrets), fromUTF(wrappingID), info, CONTENT_KEY_LENGTH);
|
|
53
|
+
}
|
|
54
|
+
// Canonical object keys, ordered descriptors.
|
|
55
|
+
function wrappingAAD(descriptors) {
|
|
56
|
+
return fromUTF(canonicalStringify(descriptors));
|
|
57
|
+
}
|
|
58
|
+
function entryAAD(suiteID, keyID, keyVersion, entryID) {
|
|
59
|
+
return fromUTF(`kokuin/vault/entry/v1:${suiteID}:${keyID}:${keyVersion}:${entryID}`);
|
|
60
|
+
}
|
|
61
|
+
async function didFactorSecretForSender(recipientDID, methods) {
|
|
62
|
+
const { sharedSecret, ephemeralPublicKey } = await deriveSharedSecretAsync(recipientDID, {
|
|
63
|
+
methods: methods ?? []
|
|
64
|
+
});
|
|
65
|
+
return {
|
|
66
|
+
secret: sharedSecret,
|
|
67
|
+
params: {
|
|
68
|
+
recipient: recipientDID,
|
|
69
|
+
epk: toB64(ephemeralPublicKey)
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
async function secretFactorForSender(runtime, input, cost) {
|
|
74
|
+
const invalid = invalidArgon2Cost(cost);
|
|
75
|
+
if (invalid != null) {
|
|
76
|
+
throw new InvalidVaultFactors(`invalid Argon2 cost: ${invalid}`);
|
|
77
|
+
}
|
|
78
|
+
const salt = runtime.getRandomValues(new Uint8Array(SALT_LENGTH));
|
|
79
|
+
const secret = await argon2idAsync(input, salt, {
|
|
80
|
+
...cost,
|
|
81
|
+
dkLen: FACTOR_SECRET_LENGTH
|
|
82
|
+
});
|
|
83
|
+
return {
|
|
84
|
+
secret,
|
|
85
|
+
params: {
|
|
86
|
+
salt: toB64(salt),
|
|
87
|
+
...cost
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
async function secretFactorForRecipient(kind, input, params) {
|
|
92
|
+
if (input == null) {
|
|
93
|
+
throw new NoAvailableFactor(kind);
|
|
94
|
+
}
|
|
95
|
+
const { salt, m, t, p } = params;
|
|
96
|
+
if (typeof salt !== 'string' || typeof m !== 'number' || typeof t !== 'number' || typeof p !== 'number') {
|
|
97
|
+
throw new VaultTampered(`${kind} factor descriptor carries no usable Argon2 parameters`);
|
|
98
|
+
}
|
|
99
|
+
const invalid = invalidArgon2Cost({
|
|
100
|
+
m,
|
|
101
|
+
t,
|
|
102
|
+
p
|
|
103
|
+
});
|
|
104
|
+
if (invalid != null) {
|
|
105
|
+
throw new VaultTampered(`${kind} factor descriptor has invalid Argon2 cost: ${invalid}`);
|
|
106
|
+
}
|
|
107
|
+
let decodedSalt;
|
|
108
|
+
try {
|
|
109
|
+
decodedSalt = fromB64(salt);
|
|
110
|
+
} catch (cause) {
|
|
111
|
+
throw new VaultTampered(`${kind} factor descriptor carries an invalid Argon2 salt`, {
|
|
112
|
+
cause
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
if (decodedSalt.length !== SALT_LENGTH) {
|
|
116
|
+
throw new VaultTampered(`${kind} factor descriptor Argon2 salt must be ${SALT_LENGTH} bytes`);
|
|
117
|
+
}
|
|
118
|
+
return await argon2idAsync(input, decodedSalt, {
|
|
119
|
+
m,
|
|
120
|
+
t,
|
|
121
|
+
p,
|
|
122
|
+
dkLen: FACTOR_SECRET_LENGTH
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
// A PIN requires device possession; a passphrase alone does not substitute for it.
|
|
126
|
+
export function validateFactorList(kinds) {
|
|
127
|
+
if (kinds.length === 0) {
|
|
128
|
+
throw new InvalidVaultFactors('a wrapping needs at least one factor');
|
|
129
|
+
}
|
|
130
|
+
const seen = new Set();
|
|
131
|
+
for (const kind of kinds){
|
|
132
|
+
if (kind === 'did') {
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
if (seen.has(kind)) {
|
|
136
|
+
throw new InvalidVaultFactors(`duplicate "${kind}" factor`);
|
|
137
|
+
}
|
|
138
|
+
seen.add(kind);
|
|
139
|
+
}
|
|
140
|
+
if (seen.has('pin') && !kinds.includes('did')) {
|
|
141
|
+
throw new InvalidVaultFactors('a "pin" factor requires a "did" factor in the same wrapping');
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
async function didFactorSecretForRecipient(identity, params) {
|
|
145
|
+
if (identity == null) {
|
|
146
|
+
throw new NoAvailableFactor('did');
|
|
147
|
+
}
|
|
148
|
+
const epk = params.epk;
|
|
149
|
+
if (typeof epk !== 'string') {
|
|
150
|
+
throw new VaultTampered('did factor descriptor carries no epk');
|
|
151
|
+
}
|
|
152
|
+
return await identity.agreeKey(fromB64(epk));
|
|
153
|
+
}
|
|
154
|
+
const suite1 = {
|
|
155
|
+
id: SUITE_VAULT_1,
|
|
156
|
+
name: 'VAULT_1',
|
|
157
|
+
generateContentKey (runtime) {
|
|
158
|
+
return runtime.getRandomValues(new Uint8Array(CONTENT_KEY_LENGTH));
|
|
159
|
+
},
|
|
160
|
+
async wrap (params) {
|
|
161
|
+
validateFactorList(params.factors.map((factor)=>factor.kind));
|
|
162
|
+
const secrets = [];
|
|
163
|
+
const descriptors = [];
|
|
164
|
+
for (const factor of params.factors){
|
|
165
|
+
switch(factor.kind){
|
|
166
|
+
case 'did':
|
|
167
|
+
{
|
|
168
|
+
const { secret, params: factorParams } = await didFactorSecretForSender(factor.recipientDID, params.methods);
|
|
169
|
+
secrets.push(secret);
|
|
170
|
+
descriptors.push({
|
|
171
|
+
kind: 'did',
|
|
172
|
+
params: factorParams
|
|
173
|
+
});
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
case 'passphrase':
|
|
177
|
+
case 'pin':
|
|
178
|
+
{
|
|
179
|
+
const { secret, params: factorParams } = await secretFactorForSender(params.runtime, factor.input, factor.cost ?? DEFAULT_ARGON2_COST);
|
|
180
|
+
secrets.push(secret);
|
|
181
|
+
descriptors.push({
|
|
182
|
+
kind: factor.kind,
|
|
183
|
+
params: factorParams
|
|
184
|
+
});
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
const kek = deriveKEK(secrets, params.wrappingID, SUITE_VAULT_1, params.keyID, params.keyVersion);
|
|
190
|
+
const iv = params.runtime.getRandomValues(new Uint8Array(IV_LENGTH));
|
|
191
|
+
return {
|
|
192
|
+
descriptors,
|
|
193
|
+
descriptorDigest: descriptorDigest(descriptors),
|
|
194
|
+
iv,
|
|
195
|
+
wrappedKey: gcm(kek, iv, wrappingAAD(descriptors)).encrypt(params.contentKey)
|
|
196
|
+
};
|
|
197
|
+
},
|
|
198
|
+
async unwrap (params) {
|
|
199
|
+
if (params.expectedDescriptorDigest !== undefined) {
|
|
200
|
+
checkDescriptorDigest({
|
|
201
|
+
descriptors: params.descriptors,
|
|
202
|
+
expectedDescriptorDigest: params.expectedDescriptorDigest
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
validateFactorList(params.descriptors.map((descriptor)=>descriptor.kind));
|
|
206
|
+
const secrets = [];
|
|
207
|
+
const userSuppliedKinds = [];
|
|
208
|
+
for (const descriptor of params.descriptors){
|
|
209
|
+
switch(descriptor.kind){
|
|
210
|
+
case 'did':
|
|
211
|
+
secrets.push(await didFactorSecretForRecipient(params.identity, descriptor.params));
|
|
212
|
+
break;
|
|
213
|
+
case 'passphrase':
|
|
214
|
+
case 'pin':
|
|
215
|
+
secrets.push(await secretFactorForRecipient(descriptor.kind, params.inputs?.[descriptor.kind], descriptor.params));
|
|
216
|
+
userSuppliedKinds.push(descriptor.kind);
|
|
217
|
+
break;
|
|
218
|
+
default:
|
|
219
|
+
throw new NoAvailableFactor(descriptor.kind);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
const kek = deriveKEK(secrets, params.wrappingID, SUITE_VAULT_1, params.keyID, params.keyVersion);
|
|
223
|
+
try {
|
|
224
|
+
return gcm(kek, params.iv, wrappingAAD(params.descriptors)).decrypt(params.wrappedKey);
|
|
225
|
+
} catch (cause) {
|
|
226
|
+
// A tag failure cannot attribute corruption versus a wrong secret, including DID-only wraps.
|
|
227
|
+
throw new VaultSecretRejected(userSuppliedKinds, {
|
|
228
|
+
cause,
|
|
229
|
+
keyID: params.keyID
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
encryptEntry (params) {
|
|
234
|
+
const iv = params.runtime.getRandomValues(new Uint8Array(IV_LENGTH));
|
|
235
|
+
const aad = entryAAD(SUITE_VAULT_1, params.keyID, params.keyVersion, params.entryID);
|
|
236
|
+
return {
|
|
237
|
+
iv,
|
|
238
|
+
ciphertext: gcm(params.contentKey, iv, aad).encrypt(params.plaintext)
|
|
239
|
+
};
|
|
240
|
+
},
|
|
241
|
+
decryptEntry (params) {
|
|
242
|
+
const aad = entryAAD(SUITE_VAULT_1, params.keyID, params.keyVersion, params.entryID);
|
|
243
|
+
try {
|
|
244
|
+
return gcm(params.contentKey, params.iv, aad).decrypt(params.ciphertext);
|
|
245
|
+
} catch (cause) {
|
|
246
|
+
throw new VaultTampered('vault entry failed authentication: it was altered, or is being read under the wrong key version', {
|
|
247
|
+
cause
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
const SUITES = new Map([
|
|
253
|
+
[
|
|
254
|
+
SUITE_VAULT_1,
|
|
255
|
+
suite1
|
|
256
|
+
]
|
|
257
|
+
]);
|
|
258
|
+
export function getSuite(id) {
|
|
259
|
+
const suite = SUITES.get(id);
|
|
260
|
+
if (suite == null) {
|
|
261
|
+
throw new UnsupportedVaultSuite(id);
|
|
262
|
+
}
|
|
263
|
+
return suite;
|
|
264
|
+
}
|
|
265
|
+
export function isSupportedSuite(id) {
|
|
266
|
+
return SUITES.has(id);
|
|
267
|
+
}
|
package/lib/wrappable.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kokuin/vault",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Database-free content keys, ordered factor wrapping and authenticated byte encryption",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"vault",
|
|
7
|
+
"encryption",
|
|
8
|
+
"keys"
|
|
9
|
+
],
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/TairuFramework/kokuin",
|
|
13
|
+
"directory": "packages/vault"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"type": "module",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": "./lib/index.js"
|
|
20
|
+
},
|
|
21
|
+
"main": "lib/index.js",
|
|
22
|
+
"types": "lib/index.d.ts",
|
|
23
|
+
"files": [
|
|
24
|
+
"lib/*"
|
|
25
|
+
],
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@kokuin/jwe": "^0.1.1",
|
|
28
|
+
"@kokuin/records": "^0.2.0",
|
|
29
|
+
"@kokuin/token": "^0.6.3",
|
|
30
|
+
"@noble/ciphers": "^2.4.0",
|
|
31
|
+
"@noble/hashes": "^2.4.0",
|
|
32
|
+
"@sozai/codec": "^0.4.3",
|
|
33
|
+
"@sozai/hlc": "^0.1.0",
|
|
34
|
+
"@sozai/json": "^0.3.0",
|
|
35
|
+
"@sozai/runtime": "^0.1.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^26.6.5"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "pnpm run build:clean && pnpm run build:js && pnpm run build:types",
|
|
45
|
+
"build:clean": "del-cli lib",
|
|
46
|
+
"build:js": "del-cli 'lib/**/*.js' && swc src -d ./lib --config-file ../../node_modules/@kigu/dev/swc.json --strip-leading-paths",
|
|
47
|
+
"build:types": "del-cli 'lib/**/*.d.ts' 'lib/**/*.d.ts.map' && tsc --emitDeclarationOnly --skipLibCheck",
|
|
48
|
+
"test": "pnpm run test:types && pnpm run test:unit",
|
|
49
|
+
"test:types": "tsc --noEmit --skipLibCheck -p tsconfig.test.json",
|
|
50
|
+
"test:unit": "vitest run"
|
|
51
|
+
}
|
|
6
52
|
}
|