@zuplo/cli 6.74.2 → 6.74.6
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/dist/cmds/test.d.ts.map +1 -1
- package/dist/cmds/test.js +8 -0
- package/dist/cmds/test.js.map +1 -1
- package/dist/common/utils/pnpm-lifecycle.d.ts.map +1 -1
- package/dist/common/utils/pnpm-lifecycle.js +1 -4
- package/dist/common/utils/pnpm-lifecycle.js.map +1 -1
- package/dist/common/utils/pnpm-lifecycle.test.js +23 -4
- package/dist/common/utils/pnpm-lifecycle.test.js.map +1 -1
- package/dist/test/handler.d.ts +2 -1
- package/dist/test/handler.d.ts.map +1 -1
- package/dist/test/handler.js.map +1 -1
- package/dist/test/invoke-test.d.ts +3 -2
- package/dist/test/invoke-test.d.ts.map +1 -1
- package/dist/test/invoke-test.js +26 -0
- package/dist/test/invoke-test.js.map +1 -1
- package/dist/test/invoke-test.test.js +16 -0
- package/dist/test/invoke-test.test.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +2 -2
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +12 -12
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwe/general/encrypt.js +50 -51
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwks/local.js +10 -31
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwks/remote.js +17 -26
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/compact/verify.js +2 -2
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/flattened/sign.js +1 -9
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/general/sign.js +12 -21
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/general/verify.js +13 -11
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwt/decrypt.js +3 -3
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwt/verify.js +4 -4
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/key/export.js +3 -3
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/key/generate_key_pair.js +7 -6
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/asn1.js +29 -62
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/content_encryption.js +16 -34
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/crypto_key.js +6 -0
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +44 -71
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +46 -41
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +14 -13
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwk_to_key.js +5 -10
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jws_algorithms.js +20 -18
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jws_sign.js +12 -6
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jws_verify.js +26 -27
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +60 -102
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/key.js +61 -99
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/key_algorithm.js +2 -8
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/key_descriptor.js +1 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/key_management.js +74 -161
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/options.js +11 -14
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/signing.js +6 -16
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/type_checks.js +13 -18
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/util/base64url.js +4 -3
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/package.json +1 -1
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +3 -3
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-B5LJC45G.js → chunk-CKGECOOJ.js} +88 -88
- package/node_modules/@zuplo/runtime/out/esm/chunk-CKGECOOJ.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +5 -1
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/package.json +6 -6
- package/node_modules/@zuplo/runtime/out/esm/chunk-B5LJC45G.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-B5LJC45G.js.LEGAL.txt → chunk-CKGECOOJ.js.LEGAL.txt} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JOSENotSupported, JWEInvalid, JWSInvalid } from '../util/errors.js';
|
|
2
|
-
export const JWS_RECOGNIZED =
|
|
3
|
-
export const JWE_RECOGNIZED =
|
|
2
|
+
export const JWS_RECOGNIZED = { __proto__: null, b64: true };
|
|
3
|
+
export const JWE_RECOGNIZED = { __proto__: null };
|
|
4
4
|
export function validateAlgorithms(option, algorithms) {
|
|
5
5
|
if (algorithms !== undefined &&
|
|
6
6
|
(!Array.isArray(algorithms) || algorithms.some((s) => typeof s !== 'string'))) {
|
|
@@ -22,30 +22,27 @@ export function validateCrit(Err, recognizedDefault, recognizedOption, protected
|
|
|
22
22
|
throw new Err('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
23
23
|
}
|
|
24
24
|
if (!protectedHeader || protectedHeader.crit === undefined) {
|
|
25
|
-
return
|
|
25
|
+
return [];
|
|
26
26
|
}
|
|
27
27
|
if (!Array.isArray(protectedHeader.crit) ||
|
|
28
28
|
protectedHeader.crit.length === 0 ||
|
|
29
29
|
protectedHeader.crit.some((input) => typeof input !== 'string' || input.length === 0)) {
|
|
30
30
|
throw new Err('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
recognized = recognizedDefault;
|
|
38
|
-
}
|
|
32
|
+
const recognized = recognizedOption === undefined
|
|
33
|
+
? recognizedDefault
|
|
34
|
+
: { __proto__: null, ...recognizedOption, ...recognizedDefault };
|
|
39
35
|
for (const parameter of protectedHeader.crit) {
|
|
40
|
-
if (!
|
|
36
|
+
if (!(parameter in recognized)) {
|
|
41
37
|
throw new JOSENotSupported(`Extension Header Parameter "${parameter}" is not recognized`);
|
|
42
38
|
}
|
|
43
|
-
if (joseHeader[parameter] === undefined) {
|
|
39
|
+
if (!Object.hasOwn(joseHeader, parameter) || joseHeader[parameter] === undefined) {
|
|
44
40
|
throw new Err(`Extension Header Parameter "${parameter}" is missing`);
|
|
45
41
|
}
|
|
46
|
-
if (recognized
|
|
42
|
+
if (recognized[parameter] &&
|
|
43
|
+
(!Object.hasOwn(protectedHeader, parameter) || protectedHeader[parameter] === undefined)) {
|
|
47
44
|
throw new Err(`Extension Header Parameter "${parameter}" MUST be integrity protected`);
|
|
48
45
|
}
|
|
49
46
|
}
|
|
50
|
-
return
|
|
47
|
+
return protectedHeader.crit;
|
|
51
48
|
}
|
|
@@ -1,34 +1,24 @@
|
|
|
1
|
-
import { checkCryptoKey } from './crypto_key.js';
|
|
2
|
-
export function checkModulusLength(alg, key) {
|
|
3
|
-
const { modulusLength } = key.algorithm;
|
|
4
|
-
if (typeof modulusLength !== 'number' || modulusLength < 2048) {
|
|
5
|
-
throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
function checkSigCryptoKey(entry, key, usage) {
|
|
9
|
-
checkCryptoKey(key, entry.subtle, usage);
|
|
10
|
-
if (entry.minModulusLength) {
|
|
11
|
-
checkModulusLength(entry.alg, key);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
import { checkCryptoKey, checkModulusLength } from './crypto_key.js';
|
|
14
2
|
async function getSigKey(entry, key, usage) {
|
|
15
3
|
if (key instanceof Uint8Array) {
|
|
16
4
|
return crypto.subtle.importKey('raw', key, entry.subtle, false, [
|
|
17
5
|
usage,
|
|
18
6
|
]);
|
|
19
7
|
}
|
|
20
|
-
|
|
8
|
+
checkCryptoKey(key, entry.subtle, usage);
|
|
9
|
+
if (entry.minRsaBits)
|
|
10
|
+
checkModulusLength(entry.alg, key);
|
|
21
11
|
return key;
|
|
22
12
|
}
|
|
23
13
|
export async function sign(entry, key, data) {
|
|
24
14
|
const cryptoKey = await getSigKey(entry, key, 'sign');
|
|
25
|
-
const signature = await crypto.subtle.sign(entry.
|
|
15
|
+
const signature = await crypto.subtle.sign(entry.signing, cryptoKey, data);
|
|
26
16
|
return new Uint8Array(signature);
|
|
27
17
|
}
|
|
28
18
|
export async function verify(entry, key, signature, data) {
|
|
29
19
|
const cryptoKey = await getSigKey(entry, key, 'verify');
|
|
30
20
|
try {
|
|
31
|
-
return await crypto.subtle.verify(entry.
|
|
21
|
+
return await crypto.subtle.verify(entry.signing, cryptoKey, signature, data);
|
|
32
22
|
}
|
|
33
23
|
catch {
|
|
34
24
|
return false;
|
package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/type_checks.js
CHANGED
|
@@ -1,34 +1,29 @@
|
|
|
1
|
-
const isObjectLike = (value) => typeof value === 'object' && value !== null;
|
|
2
1
|
export function isObject(input) {
|
|
3
|
-
if (
|
|
2
|
+
if (typeof input !== 'object' ||
|
|
3
|
+
input === null ||
|
|
4
|
+
Object.prototype.toString.call(input) !== '[object Object]') {
|
|
4
5
|
return false;
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
+
const prototype = Object.getPrototypeOf(input);
|
|
8
|
+
if (prototype === null) {
|
|
7
9
|
return true;
|
|
8
10
|
}
|
|
9
|
-
let proto =
|
|
11
|
+
let proto = prototype;
|
|
10
12
|
while (Object.getPrototypeOf(proto) !== null) {
|
|
11
13
|
proto = Object.getPrototypeOf(proto);
|
|
12
14
|
}
|
|
13
|
-
return
|
|
15
|
+
return prototype === proto;
|
|
14
16
|
}
|
|
15
17
|
export function isDisjoint(...headers) {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
let acc;
|
|
21
|
-
for (const header of sources) {
|
|
22
|
-
const parameters = Object.keys(header);
|
|
23
|
-
if (!acc || acc.size === 0) {
|
|
24
|
-
acc = new Set(parameters);
|
|
18
|
+
const parameters = new Set();
|
|
19
|
+
for (const header of headers) {
|
|
20
|
+
if (!header)
|
|
25
21
|
continue;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (acc.has(parameter)) {
|
|
22
|
+
for (const parameter of Object.keys(header)) {
|
|
23
|
+
if (parameters.has(parameter)) {
|
|
29
24
|
return false;
|
|
30
25
|
}
|
|
31
|
-
|
|
26
|
+
parameters.add(parameter);
|
|
32
27
|
}
|
|
33
28
|
}
|
|
34
29
|
return true;
|
package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/util/base64url.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { encoder, decoder } from '../lib/buffer_utils.js';
|
|
2
2
|
import { encodeBase64, decodeBase64 } from '../lib/base64.js';
|
|
3
|
+
const invalid = 'The input to be decoded is not correctly encoded.';
|
|
3
4
|
export function decode(input) {
|
|
4
5
|
if (Uint8Array.fromBase64) {
|
|
5
6
|
try {
|
|
@@ -8,7 +9,7 @@ export function decode(input) {
|
|
|
8
9
|
});
|
|
9
10
|
}
|
|
10
11
|
catch (cause) {
|
|
11
|
-
throw new TypeError(
|
|
12
|
+
throw new TypeError(invalid, { cause });
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
let encoded = input;
|
|
@@ -16,14 +17,14 @@ export function decode(input) {
|
|
|
16
17
|
encoded = decoder.decode(encoded);
|
|
17
18
|
}
|
|
18
19
|
if (encoded.includes('+') || encoded.includes('/')) {
|
|
19
|
-
throw new TypeError(
|
|
20
|
+
throw new TypeError(invalid);
|
|
20
21
|
}
|
|
21
22
|
encoded = encoded.replace(/-/g, '+').replace(/_/g, '/');
|
|
22
23
|
try {
|
|
23
24
|
return decodeBase64(encoded);
|
|
24
25
|
}
|
|
25
26
|
catch {
|
|
26
|
-
throw new TypeError(
|
|
27
|
+
throw new TypeError(invalid);
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
export function encode(input) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@zuplo/openapi-tools",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "6.74.
|
|
5
|
+
"version": "6.74.6",
|
|
6
6
|
"description": "Tooling for OpenAPI files",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"license": "Copyright 2021",
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsc --build",
|
|
26
|
-
"test": "node --test dist/**/*.spec.js",
|
|
27
|
-
"test:debug": "node --test --test-timeout 0 dist/**/*.spec.js"
|
|
26
|
+
"test": "node --test --enable-source-maps --test-reporter=../../scripts/test-reporter.mjs dist/**/*.spec.js",
|
|
27
|
+
"test:debug": "node --test --test-timeout 0 --test-reporter=spec dist/**/*.spec.js"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"js-yaml": "^4.3.0",
|