@sebastienrousseau/crypto-mcp 0.0.8 → 0.0.24
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 +75 -22
- package/dist/protocol.d.ts +18 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +63 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +16 -14
- package/dist/tools/annotations.d.ts +6 -0
- package/dist/tools/annotations.d.ts.map +1 -0
- package/dist/tools/annotations.js +68 -0
- package/dist/tools/definitions.d.ts +3 -0
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +220 -128
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +33 -6
- package/dist/tools/kem.d.ts +8 -0
- package/dist/tools/kem.d.ts.map +1 -0
- package/dist/tools/kem.js +156 -0
- package/dist/tools/keyimport.d.ts +5 -0
- package/dist/tools/keyimport.d.ts.map +1 -0
- package/dist/tools/keyimport.js +207 -0
- package/dist/tools/keys.d.ts +9 -0
- package/dist/tools/keys.d.ts.map +1 -1
- package/dist/tools/keys.js +92 -42
- package/dist/tools/keystore.d.ts +25 -0
- package/dist/tools/keystore.d.ts.map +1 -0
- package/dist/tools/keystore.js +84 -0
- package/dist/tools/kms.d.ts +1 -0
- package/dist/tools/kms.d.ts.map +1 -1
- package/dist/tools/kms.js +28 -18
- package/dist/tools/result.d.ts +0 -1
- package/dist/tools/result.d.ts.map +1 -1
- package/dist/tools/result.js +0 -8
- package/dist/tools/schema-helpers.d.ts +12 -0
- package/dist/tools/schema-helpers.d.ts.map +1 -0
- package/dist/tools/schema-helpers.js +38 -0
- package/dist/tools/signing.d.ts.map +1 -1
- package/dist/tools/signing.js +118 -32
- package/dist/tools/stream-definitions.d.ts +3 -0
- package/dist/tools/stream-definitions.d.ts.map +1 -0
- package/dist/tools/stream-definitions.js +122 -0
- package/dist/tools/stream.d.ts +6 -0
- package/dist/tools/stream.d.ts.map +1 -0
- package/dist/tools/stream.js +97 -0
- package/dist/tools/symmetric.d.ts +1 -0
- package/dist/tools/symmetric.d.ts.map +1 -1
- package/dist/tools/symmetric.js +22 -8
- package/dist/tools/validate.d.ts +3 -0
- package/dist/tools/validate.d.ts.map +1 -0
- package/dist/tools/validate.js +76 -0
- package/dist/types.d.ts +19 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +19 -17
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.streamMultiDecrypt = exports.streamMultiEncrypt = exports.streamDecrypt = exports.streamEncrypt = void 0;
|
|
4
|
+
const crypto_lib_1 = require("@sebastienrousseau/crypto-lib");
|
|
5
|
+
const streaming_1 = require("@sebastienrousseau/crypto-lib/streaming");
|
|
6
|
+
const keystore_1 = require("./keystore");
|
|
7
|
+
const result_1 = require("./result");
|
|
8
|
+
const streamEncrypt = async (args) => {
|
|
9
|
+
const plaintext = Buffer.from(String(args.plaintext), "utf8");
|
|
10
|
+
const recipientX25519Public = String(args.x25519PublicKey);
|
|
11
|
+
const recipientMlKemPublic = String(args.mlKemPublicKey);
|
|
12
|
+
const chunkSize = args.chunkSize !== undefined ? Number(args.chunkSize) : undefined;
|
|
13
|
+
const result = (0, streaming_1.streamPqEncrypt)({
|
|
14
|
+
recipientX25519Public,
|
|
15
|
+
recipientMlKemPublic,
|
|
16
|
+
plaintext,
|
|
17
|
+
chunkSize,
|
|
18
|
+
});
|
|
19
|
+
return (0, result_1.jsonResult)({
|
|
20
|
+
algorithm: result.algorithm,
|
|
21
|
+
ciphertext: Buffer.from(result.ciphertext).toString("base64"),
|
|
22
|
+
chunkSize: chunkSize ?? 65536,
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
exports.streamEncrypt = streamEncrypt;
|
|
26
|
+
const streamDecrypt = async (args) => {
|
|
27
|
+
const ciphertext = Buffer.from(String(args.ciphertext), "base64");
|
|
28
|
+
const xKey = keystore_1.keyStore.use(String(args.x25519KeyHandle), [
|
|
29
|
+
"x25519",
|
|
30
|
+
"symmetric-256",
|
|
31
|
+
]);
|
|
32
|
+
const mlKey = keystore_1.keyStore.use(String(args.mlKemKeyHandle), ["ml-kem-768"]);
|
|
33
|
+
const chunkSize = args.chunkSize !== undefined ? Number(args.chunkSize) : undefined;
|
|
34
|
+
const decrypted = (0, streaming_1.streamPqDecrypt)({
|
|
35
|
+
recipientX25519Secret: xKey.secret,
|
|
36
|
+
recipientMlKemSecret: mlKey.secret,
|
|
37
|
+
ciphertext,
|
|
38
|
+
chunkSize,
|
|
39
|
+
});
|
|
40
|
+
const plaintext = Buffer.from(decrypted).toString("utf8");
|
|
41
|
+
(0, crypto_lib_1.wipeMemory)(decrypted);
|
|
42
|
+
return (0, result_1.jsonResult)({
|
|
43
|
+
algorithm: "x25519-ml-kem-768-xchacha20-poly1305-stream",
|
|
44
|
+
plaintext,
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
exports.streamDecrypt = streamDecrypt;
|
|
48
|
+
const parseMcpRecipients = (raw) => {
|
|
49
|
+
const list = JSON.parse(String(raw));
|
|
50
|
+
if (!Array.isArray(list) || list.length === 0) {
|
|
51
|
+
throw new Error("recipients must be a non-empty array of recipient objects");
|
|
52
|
+
}
|
|
53
|
+
return list;
|
|
54
|
+
};
|
|
55
|
+
const streamMultiEncrypt = async (args) => {
|
|
56
|
+
const plaintext = Buffer.from(String(args.plaintext), "utf8");
|
|
57
|
+
const recipients = parseMcpRecipients(args.recipients);
|
|
58
|
+
const chunkSize = args.chunkSize !== undefined ? Number(args.chunkSize) : undefined;
|
|
59
|
+
const result = (0, streaming_1.streamMultiPqEncrypt)({
|
|
60
|
+
recipients,
|
|
61
|
+
plaintext,
|
|
62
|
+
chunkSize,
|
|
63
|
+
});
|
|
64
|
+
return (0, result_1.jsonResult)({
|
|
65
|
+
algorithm: result.algorithm,
|
|
66
|
+
ciphertext: Buffer.from(result.ciphertext).toString("base64"),
|
|
67
|
+
recipientCount: result.recipientCount,
|
|
68
|
+
chunkSize: chunkSize ?? 65536,
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
exports.streamMultiEncrypt = streamMultiEncrypt;
|
|
72
|
+
const streamMultiDecrypt = async (args) => {
|
|
73
|
+
const ciphertext = Buffer.from(String(args.ciphertext), "base64");
|
|
74
|
+
const xKey = keystore_1.keyStore.use(String(args.x25519KeyHandle), [
|
|
75
|
+
"x25519",
|
|
76
|
+
"symmetric-256",
|
|
77
|
+
]);
|
|
78
|
+
const mlKey = keystore_1.keyStore.use(String(args.mlKemKeyHandle), ["ml-kem-768"]);
|
|
79
|
+
const recipientId = args.recipientId !== undefined ? String(args.recipientId) : undefined;
|
|
80
|
+
const chunkSize = args.chunkSize !== undefined ? Number(args.chunkSize) : undefined;
|
|
81
|
+
const decrypted = (0, streaming_1.streamMultiPqDecrypt)({
|
|
82
|
+
recipientX25519Secret: xKey.secret,
|
|
83
|
+
recipientMlKemSecret: mlKey.secret,
|
|
84
|
+
...(recipientId !== undefined ? { recipientId } : {}),
|
|
85
|
+
ciphertext,
|
|
86
|
+
chunkSize,
|
|
87
|
+
});
|
|
88
|
+
const plaintext = Buffer.from(decrypted.plaintext).toString("utf8");
|
|
89
|
+
(0, crypto_lib_1.wipeMemory)(decrypted.plaintext);
|
|
90
|
+
return (0, result_1.jsonResult)({
|
|
91
|
+
algorithm: "multi-x25519-ml-kem-768-xchacha20-poly1305-stream",
|
|
92
|
+
recipientId: decrypted.recipientId,
|
|
93
|
+
plaintext,
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
exports.streamMultiDecrypt = streamMultiDecrypt;
|
|
97
|
+
//# sourceMappingURL=stream.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symmetric.d.ts","sourceRoot":"","sources":["../../src/tools/symmetric.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"symmetric.d.ts","sourceRoot":"","sources":["../../src/tools/symmetric.ts"],"names":[],"mappings":"AAKA,OAAO,EAAY,WAAW,EAAc,MAAM,UAAU,CAAC;AA0B7D,wBAAgB,eAAe,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,CAE1D;AAaD,eAAO,MAAM,OAAO,EAAE,WAmBrB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,WAarB,CAAC"}
|
package/dist/tools/symmetric.js
CHANGED
|
@@ -4,7 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.decrypt = exports.encrypt = void 0;
|
|
7
|
+
exports.symmetricSecret = symmetricSecret;
|
|
7
8
|
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
9
|
+
const crypto_lib_1 = require("@sebastienrousseau/crypto-lib");
|
|
10
|
+
const keystore_1 = require("./keystore");
|
|
8
11
|
const result_1 = require("./result");
|
|
9
12
|
function aeadAlgorithm(value) {
|
|
10
13
|
return value === "chacha20-poly1305" ? "chacha20-poly1305" : "aes-256-gcm";
|
|
@@ -22,37 +25,48 @@ function createDecipher(algorithm, key, iv) {
|
|
|
22
25
|
}
|
|
23
26
|
return node_crypto_1.default.createDecipheriv(algorithm, key, iv, AEAD_OPTIONS);
|
|
24
27
|
}
|
|
28
|
+
function symmetricSecret(keyHandle) {
|
|
29
|
+
return keystore_1.keyStore.use(String(keyHandle), ["symmetric-256"]).secret;
|
|
30
|
+
}
|
|
31
|
+
function encryptionKeyHandle(args) {
|
|
32
|
+
if (args.keyHandle !== undefined)
|
|
33
|
+
return String(args.keyHandle);
|
|
34
|
+
return keystore_1.keyStore.add((0, keystore_1.symmetricKey)(node_crypto_1.default.randomBytes(32), "generated"));
|
|
35
|
+
}
|
|
25
36
|
const encrypt = async (args) => {
|
|
26
37
|
const plaintext = String(args.plaintext);
|
|
27
38
|
const algorithm = aeadAlgorithm(args.algorithm);
|
|
28
|
-
const generatedKey =
|
|
29
|
-
const
|
|
39
|
+
const generatedKey = args.keyHandle === undefined;
|
|
40
|
+
const keyHandle = encryptionKeyHandle(args);
|
|
30
41
|
const iv = node_crypto_1.default.randomBytes(12);
|
|
31
|
-
const cipher = createCipher(algorithm,
|
|
42
|
+
const cipher = createCipher(algorithm, symmetricSecret(keyHandle), iv);
|
|
32
43
|
const ciphertext = Buffer.concat([
|
|
33
44
|
cipher.update(plaintext, "utf8"),
|
|
34
45
|
cipher.final(),
|
|
35
46
|
]);
|
|
36
47
|
return (0, result_1.jsonResult)({
|
|
37
48
|
algorithm,
|
|
49
|
+
keyHandle,
|
|
50
|
+
generatedKey,
|
|
38
51
|
ciphertext: ciphertext.toString("hex"),
|
|
39
52
|
iv: iv.toString("hex"),
|
|
40
53
|
authTag: cipher.getAuthTag().toString("hex"),
|
|
41
|
-
key: generatedKey ? key.toString("hex") : undefined,
|
|
42
54
|
});
|
|
43
55
|
};
|
|
44
56
|
exports.encrypt = encrypt;
|
|
45
57
|
const decrypt = async (args) => {
|
|
46
|
-
const algorithm = args.algorithm
|
|
47
|
-
const key = (
|
|
58
|
+
const algorithm = aeadAlgorithm(args.algorithm);
|
|
59
|
+
const key = symmetricSecret(args.keyHandle);
|
|
48
60
|
const iv = Buffer.from(String(args.iv), "hex");
|
|
49
|
-
const decipher = createDecipher(
|
|
61
|
+
const decipher = createDecipher(algorithm, key, iv);
|
|
50
62
|
decipher.setAuthTag(Buffer.from(String(args.authTag), "hex"));
|
|
51
63
|
const decrypted = Buffer.concat([
|
|
52
64
|
decipher.update(Buffer.from(String(args.ciphertext), "hex")),
|
|
53
65
|
decipher.final(),
|
|
54
66
|
]);
|
|
55
|
-
|
|
67
|
+
const plaintext = decrypted.toString("utf8");
|
|
68
|
+
(0, crypto_lib_1.wipeMemory)(decrypted);
|
|
69
|
+
return (0, result_1.jsonResult)({ algorithm, plaintext });
|
|
56
70
|
};
|
|
57
71
|
exports.decrypt = decrypt;
|
|
58
72
|
//# sourceMappingURL=symmetric.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/tools/validate.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAGnB,MAAM,UAAU,CAAC;AAoFlB,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,kBAAkB,EAC1B,IAAI,EAAE,OAAO,GACZ,MAAM,GAAG,SAAS,CAiBpB"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateArguments = validateArguments;
|
|
4
|
+
function isPlainObject(value) {
|
|
5
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6
|
+
}
|
|
7
|
+
function hasType(type, value) {
|
|
8
|
+
switch (type) {
|
|
9
|
+
case "string":
|
|
10
|
+
return typeof value === "string";
|
|
11
|
+
case "integer":
|
|
12
|
+
return Number.isSafeInteger(value);
|
|
13
|
+
case "number":
|
|
14
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
15
|
+
case "boolean":
|
|
16
|
+
return typeof value === "boolean";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function checkString(prop, value) {
|
|
20
|
+
if (prop.minLength !== undefined && value.length < prop.minLength) {
|
|
21
|
+
return `must be at least ${prop.minLength} characters`;
|
|
22
|
+
}
|
|
23
|
+
if (prop.maxLength !== undefined && value.length > prop.maxLength) {
|
|
24
|
+
return `must be at most ${prop.maxLength} characters`;
|
|
25
|
+
}
|
|
26
|
+
if (prop.pattern !== undefined &&
|
|
27
|
+
!new RegExp(prop.pattern, "u").test(value)) {
|
|
28
|
+
return "has an invalid format";
|
|
29
|
+
}
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
function checkNumber(prop, value) {
|
|
33
|
+
if (prop.minimum !== undefined && value < prop.minimum) {
|
|
34
|
+
return `must be at least ${prop.minimum}`;
|
|
35
|
+
}
|
|
36
|
+
if (prop.maximum !== undefined && value > prop.maximum) {
|
|
37
|
+
return `must be at most ${prop.maximum}`;
|
|
38
|
+
}
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
function checkProperty(prop, value) {
|
|
42
|
+
if (!hasType(prop.type, value))
|
|
43
|
+
return `must be of type ${prop.type}`;
|
|
44
|
+
if (prop.enum && !prop.enum.includes(value)) {
|
|
45
|
+
return `must be one of: ${prop.enum.join(", ")}`;
|
|
46
|
+
}
|
|
47
|
+
if (typeof value === "string")
|
|
48
|
+
return checkString(prop, value);
|
|
49
|
+
if (typeof value === "number")
|
|
50
|
+
return checkNumber(prop, value);
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
function quoteName(name) {
|
|
54
|
+
return JSON.stringify(name.length > 64 ? `${name.slice(0, 64)}...` : name);
|
|
55
|
+
}
|
|
56
|
+
function validateArguments(schema, args) {
|
|
57
|
+
if (!isPlainObject(args))
|
|
58
|
+
return "arguments must be a JSON object";
|
|
59
|
+
for (const name of Object.keys(args)) {
|
|
60
|
+
if (!Object.hasOwn(schema.properties, name)) {
|
|
61
|
+
return `unknown property ${quoteName(name)}`;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
for (const name of schema.required ?? []) {
|
|
65
|
+
if (!Object.hasOwn(args, name)) {
|
|
66
|
+
return `missing required property "${name}"`;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
for (const [name, value] of Object.entries(args)) {
|
|
70
|
+
const problem = checkProperty(schema.properties[name], value);
|
|
71
|
+
if (problem)
|
|
72
|
+
return `"${name}" ${problem}`;
|
|
73
|
+
}
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=validate.js.map
|
package/dist/types.d.ts
CHANGED
|
@@ -15,21 +15,37 @@ export interface JSONRPCError {
|
|
|
15
15
|
message: string;
|
|
16
16
|
data?: unknown;
|
|
17
17
|
}
|
|
18
|
+
export type MCPToolParameterType = "string" | "integer" | "number" | "boolean";
|
|
18
19
|
export interface MCPToolParameterProperty {
|
|
19
|
-
type:
|
|
20
|
+
type: MCPToolParameterType;
|
|
20
21
|
description: string;
|
|
21
|
-
enum?: string
|
|
22
|
+
enum?: Array<string | number>;
|
|
22
23
|
default?: unknown;
|
|
24
|
+
minLength?: number;
|
|
25
|
+
maxLength?: number;
|
|
26
|
+
pattern?: string;
|
|
27
|
+
minimum?: number;
|
|
28
|
+
maximum?: number;
|
|
23
29
|
}
|
|
24
30
|
export interface MCPToolInputSchema {
|
|
25
31
|
type: "object";
|
|
26
32
|
properties: Record<string, MCPToolParameterProperty>;
|
|
27
33
|
required?: string[];
|
|
34
|
+
additionalProperties: false;
|
|
35
|
+
}
|
|
36
|
+
export interface MCPToolAnnotations {
|
|
37
|
+
title?: string;
|
|
38
|
+
readOnlyHint?: boolean;
|
|
39
|
+
destructiveHint?: boolean;
|
|
40
|
+
idempotentHint?: boolean;
|
|
41
|
+
openWorldHint?: boolean;
|
|
28
42
|
}
|
|
29
43
|
export interface MCPTool {
|
|
30
44
|
name: string;
|
|
45
|
+
title?: string;
|
|
31
46
|
description: string;
|
|
32
47
|
inputSchema: MCPToolInputSchema;
|
|
48
|
+
annotations?: MCPToolAnnotations;
|
|
33
49
|
}
|
|
34
50
|
export interface MCPTextContent {
|
|
35
51
|
type: "text";
|
|
@@ -84,5 +100,6 @@ export interface MCPInitializeResult {
|
|
|
84
100
|
protocolVersion: string;
|
|
85
101
|
capabilities: MCPServerCapabilities;
|
|
86
102
|
serverInfo: MCPServerInfo;
|
|
103
|
+
instructions?: string;
|
|
87
104
|
}
|
|
88
105
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,cAAc;IAC7B,OA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,EAAE,MAAM,CAAC;CACvB"}
|
package/package.json
CHANGED
|
@@ -1,44 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebastienrousseau/crypto-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"description": "Model Context Protocol (MCP) server for the Crypto Service Suite — exposing cryptographic operations, post-quantum primitives, and key management to AI assistants and agentic workflows.",
|
|
5
5
|
"author": "Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>",
|
|
6
6
|
"license": "MIT OR Apache-2.0",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=22.0.0"
|
|
9
9
|
},
|
|
10
|
+
"type": "commonjs",
|
|
10
11
|
"main": "./dist/index.js",
|
|
11
12
|
"types": "./dist/index.d.ts",
|
|
12
|
-
"bin": {
|
|
13
|
-
"crypto-mcp": "./dist/cli.js"
|
|
14
|
-
},
|
|
15
|
-
"sideEffects": false,
|
|
16
13
|
"exports": {
|
|
17
14
|
".": {
|
|
18
15
|
"types": "./dist/index.d.ts",
|
|
19
16
|
"require": "./dist/index.js",
|
|
20
|
-
"
|
|
21
|
-
}
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./package.json": "./package.json"
|
|
22
20
|
},
|
|
21
|
+
"bin": {
|
|
22
|
+
"crypto-mcp": "./dist/cli.js"
|
|
23
|
+
},
|
|
24
|
+
"sideEffects": false,
|
|
23
25
|
"files": [
|
|
24
26
|
"dist/**/*.js",
|
|
25
27
|
"dist/**/*.d.ts",
|
|
26
28
|
"dist/**/*.d.ts.map"
|
|
27
29
|
],
|
|
28
30
|
"dependencies": {
|
|
29
|
-
"@sebastienrousseau/crypto-
|
|
30
|
-
"@sebastienrousseau/crypto-
|
|
31
|
-
"@sebastienrousseau/crypto-lib": "0.0.
|
|
31
|
+
"@sebastienrousseau/crypto-wasm": "0.0.24",
|
|
32
|
+
"@sebastienrousseau/crypto-kms": "0.0.24",
|
|
33
|
+
"@sebastienrousseau/crypto-lib": "0.0.24"
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
|
-
"@types/chai": "^
|
|
36
|
+
"@types/chai": "^5.2.3",
|
|
35
37
|
"@types/chai-as-promised": "^8.0.2",
|
|
36
|
-
"@types/mocha": "^10.0.
|
|
38
|
+
"@types/mocha": "^10.0.10",
|
|
37
39
|
"@types/node": "^26.6.3",
|
|
38
40
|
"c8": "^12.0.0",
|
|
39
|
-
"chai": "^
|
|
40
|
-
"chai-as-promised": "^
|
|
41
|
-
"mocha": "^
|
|
41
|
+
"chai": "^6.3.0",
|
|
42
|
+
"chai-as-promised": "^8.0.2",
|
|
43
|
+
"mocha": "^12.0.3",
|
|
42
44
|
"rimraf": "^6.1.3",
|
|
43
45
|
"ts-node": "^10.9.2",
|
|
44
46
|
"typedoc": "^0.28.20",
|
|
@@ -59,8 +61,8 @@
|
|
|
59
61
|
"clean": "rimraf ./coverage ./dist ./docs",
|
|
60
62
|
"test": "c8 --check-coverage --lines 100 --branches 100 --functions 100 --reporter=lcov --reporter=text mocha --config=.mocharc.cjs",
|
|
61
63
|
"docs": "typedoc",
|
|
62
|
-
"lint": "eslint
|
|
63
|
-
"lint:fix": "eslint --cache --fix
|
|
64
|
+
"lint": "eslint src __tests__",
|
|
65
|
+
"lint:fix": "eslint --cache --fix src __tests__",
|
|
64
66
|
"format": "prettier --write src/**/*.ts",
|
|
65
67
|
"format:check": "prettier --check \"src/**/*.ts\""
|
|
66
68
|
}
|