Add BMAD framework, authentication, and new features
This commit is contained in:
16
mcp-server/node_modules/.bin/node-which
generated
vendored
16
mcp-server/node_modules/.bin/node-which
generated
vendored
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../which/bin/node-which" "$@"
|
||||
else
|
||||
exec node "$basedir/../which/bin/node-which" "$@"
|
||||
fi
|
||||
17
mcp-server/node_modules/.bin/node-which.cmd
generated
vendored
17
mcp-server/node_modules/.bin/node-which.cmd
generated
vendored
@@ -1,17 +0,0 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\which\bin\node-which" %*
|
||||
28
mcp-server/node_modules/.bin/node-which.ps1
generated
vendored
28
mcp-server/node_modules/.bin/node-which.ps1
generated
vendored
@@ -1,28 +0,0 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../which/bin/node-which" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../which/bin/node-which" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../which/bin/node-which" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../which/bin/node-which" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
201
mcp-server/node_modules/@prisma/client/LICENSE
generated
vendored
201
mcp-server/node_modules/@prisma/client/LICENSE
generated
vendored
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
27
mcp-server/node_modules/@prisma/client/README.md
generated
vendored
27
mcp-server/node_modules/@prisma/client/README.md
generated
vendored
@@ -1,27 +0,0 @@
|
||||
# Prisma Client · [](https://www.npmjs.com/package/@prisma/client) [](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) [](https://github.com/prisma/prisma/blob/main/LICENSE) [](https://pris.ly/discord)
|
||||
|
||||
Prisma Client JS is an **auto-generated query builder** that enables **type-safe** database access and **reduces boilerplate**. You can use it as an alternative to traditional ORMs such as Sequelize, TypeORM or SQL query builders like knex.js.
|
||||
|
||||
It is part of the [Prisma](https://www.prisma.io/) ecosystem. Prisma provides database tools for data access, declarative data modeling, schema migrations and visual data management. Learn more in the main [`prisma`](https://github.com/prisma/prisma/) repository or read the [documentation](https://www.prisma.io/docs/).
|
||||
|
||||
## Getting started
|
||||
|
||||
Follow one of these guides to get started with Prisma Client JS:
|
||||
|
||||
- [Quickstart](https://www.prisma.io/docs/getting-started/quickstart) (5 min)
|
||||
- [Set up a new project with Prisma (SQL migrations)](https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch-sql) (15 min)
|
||||
- [Set up a new project with Prisma (Prisma Migrate)](https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch-prisma-migrate) (15 min)
|
||||
- [Add Prisma to an existing project](https://www.prisma.io/docs/getting-started/setup-prisma/add-to-existing-project) (15 min)
|
||||
|
||||
Alternatively you can explore the ready-to-run [examples](https://github.com/prisma/prisma-examples/) (REST, GraphQL, gRPC, plain JavaScript and TypeScript demos, ...) or watch the [demo videos](https://www.youtube.com/watch?v=0RhtQgIs-TE&list=PLn2e1F9Rfr6k9PnR_figWOcSHgc_erDr5&index=1) (1-2 min per video).
|
||||
|
||||
## Contributing
|
||||
|
||||
Refer to our [contribution guidelines](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) and [Code of Conduct for contributors](https://github.com/prisma/prisma/blob/main/CODE_OF_CONDUCT.md).
|
||||
|
||||
## Tests Status
|
||||
|
||||
- Prisma Tests Status:
|
||||
[](https://github.com/prisma/prisma/actions/workflows/test.yml)
|
||||
- Ecosystem Tests Status:
|
||||
[](https://github.com/prisma/ecosystem-tests/actions)
|
||||
1
mcp-server/node_modules/@prisma/client/default.d.ts
generated
vendored
1
mcp-server/node_modules/@prisma/client/default.d.ts
generated
vendored
@@ -1 +0,0 @@
|
||||
export * from '.prisma/client/default'
|
||||
3
mcp-server/node_modules/@prisma/client/default.js
generated
vendored
3
mcp-server/node_modules/@prisma/client/default.js
generated
vendored
@@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
...require('.prisma/client/default'),
|
||||
}
|
||||
1
mcp-server/node_modules/@prisma/client/edge.d.ts
generated
vendored
1
mcp-server/node_modules/@prisma/client/edge.d.ts
generated
vendored
@@ -1 +0,0 @@
|
||||
export * from '.prisma/client/edge'
|
||||
4
mcp-server/node_modules/@prisma/client/edge.js
generated
vendored
4
mcp-server/node_modules/@prisma/client/edge.js
generated
vendored
@@ -1,4 +0,0 @@
|
||||
module.exports = {
|
||||
// https://github.com/prisma/prisma/pull/12907
|
||||
...require('.prisma/client/edge'),
|
||||
}
|
||||
1
mcp-server/node_modules/@prisma/client/extension.d.ts
generated
vendored
1
mcp-server/node_modules/@prisma/client/extension.d.ts
generated
vendored
@@ -1 +0,0 @@
|
||||
export * from './scripts/default-index'
|
||||
4
mcp-server/node_modules/@prisma/client/extension.js
generated
vendored
4
mcp-server/node_modules/@prisma/client/extension.js
generated
vendored
@@ -1,4 +0,0 @@
|
||||
module.exports = {
|
||||
// https://github.com/prisma/prisma/pull/12907
|
||||
...require('./scripts/default-index'),
|
||||
}
|
||||
10351
mcp-server/node_modules/@prisma/client/generator-build/index.js
generated
vendored
10351
mcp-server/node_modules/@prisma/client/generator-build/index.js
generated
vendored
File diff suppressed because it is too large
Load Diff
3
mcp-server/node_modules/@prisma/client/index-browser.js
generated
vendored
3
mcp-server/node_modules/@prisma/client/index-browser.js
generated
vendored
@@ -1,3 +0,0 @@
|
||||
const prisma = require('.prisma/client/index-browser')
|
||||
|
||||
module.exports = prisma
|
||||
1
mcp-server/node_modules/@prisma/client/index.d.ts
generated
vendored
1
mcp-server/node_modules/@prisma/client/index.d.ts
generated
vendored
@@ -1 +0,0 @@
|
||||
export * from '.prisma/client/default'
|
||||
4
mcp-server/node_modules/@prisma/client/index.js
generated
vendored
4
mcp-server/node_modules/@prisma/client/index.js
generated
vendored
@@ -1,4 +0,0 @@
|
||||
module.exports = {
|
||||
// https://github.com/prisma/prisma/pull/12907
|
||||
...require('.prisma/client/default'),
|
||||
}
|
||||
280
mcp-server/node_modules/@prisma/client/package.json
generated
vendored
280
mcp-server/node_modules/@prisma/client/package.json
generated
vendored
@@ -1,280 +0,0 @@
|
||||
{
|
||||
"name": "@prisma/client",
|
||||
"version": "5.22.0",
|
||||
"description": "Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.",
|
||||
"keywords": [
|
||||
"ORM",
|
||||
"Prisma",
|
||||
"prisma2",
|
||||
"Prisma Client",
|
||||
"client",
|
||||
"query",
|
||||
"query-builder",
|
||||
"database",
|
||||
"db",
|
||||
"JavaScript",
|
||||
"JS",
|
||||
"TypeScript",
|
||||
"TS",
|
||||
"SQL",
|
||||
"SQLite",
|
||||
"pg",
|
||||
"Postgres",
|
||||
"PostgreSQL",
|
||||
"CockroachDB",
|
||||
"MySQL",
|
||||
"MariaDB",
|
||||
"MSSQL",
|
||||
"SQL Server",
|
||||
"SQLServer",
|
||||
"MongoDB",
|
||||
"react-native"
|
||||
],
|
||||
"main": "default.js",
|
||||
"types": "default.d.ts",
|
||||
"browser": "index-browser.js",
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"require": {
|
||||
"types": "./default.d.ts",
|
||||
"node": "./default.js",
|
||||
"edge-light": "./default.js",
|
||||
"workerd": "./default.js",
|
||||
"worker": "./default.js",
|
||||
"browser": "./index-browser.js"
|
||||
},
|
||||
"import": {
|
||||
"types": "./default.d.ts",
|
||||
"node": "./default.js",
|
||||
"edge-light": "./default.js",
|
||||
"workerd": "./default.js",
|
||||
"worker": "./default.js",
|
||||
"browser": "./index-browser.js"
|
||||
},
|
||||
"default": "./default.js"
|
||||
},
|
||||
"./edge": {
|
||||
"types": "./edge.d.ts",
|
||||
"require": "./edge.js",
|
||||
"import": "./edge.js",
|
||||
"default": "./edge.js"
|
||||
},
|
||||
"./react-native": {
|
||||
"types": "./react-native.d.ts",
|
||||
"require": "./react-native.js",
|
||||
"import": "./react-native.js",
|
||||
"default": "./react-native.js"
|
||||
},
|
||||
"./extension": {
|
||||
"types": "./extension.d.ts",
|
||||
"require": "./extension.js",
|
||||
"import": "./extension.js",
|
||||
"default": "./extension.js"
|
||||
},
|
||||
"./index-browser": {
|
||||
"types": "./index.d.ts",
|
||||
"require": "./index-browser.js",
|
||||
"import": "./index-browser.js",
|
||||
"default": "./index-browser.js"
|
||||
},
|
||||
"./index": {
|
||||
"types": "./index.d.ts",
|
||||
"require": "./index.js",
|
||||
"import": "./index.js",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"./wasm": {
|
||||
"types": "./wasm.d.ts",
|
||||
"require": "./wasm.js",
|
||||
"import": "./wasm.js",
|
||||
"default": "./wasm.js"
|
||||
},
|
||||
"./runtime/library": {
|
||||
"types": "./runtime/library.d.ts",
|
||||
"require": "./runtime/library.js",
|
||||
"import": "./runtime/library.js",
|
||||
"default": "./runtime/library.js"
|
||||
},
|
||||
"./runtime/binary": {
|
||||
"types": "./runtime/binary.d.ts",
|
||||
"require": "./runtime/binary.js",
|
||||
"import": "./runtime/binary.js",
|
||||
"default": "./runtime/binary.js"
|
||||
},
|
||||
"./generator-build": {
|
||||
"require": "./generator-build/index.js",
|
||||
"import": "./generator-build/index.js",
|
||||
"default": "./generator-build/index.js"
|
||||
},
|
||||
"./sql": {
|
||||
"require": {
|
||||
"types": "./sql.d.ts",
|
||||
"node": "./sql.js",
|
||||
"default": "./sql.js"
|
||||
},
|
||||
"import": {
|
||||
"types": "./sql.d.ts",
|
||||
"node": "./sql.mjs",
|
||||
"default": "./sql.mjs"
|
||||
},
|
||||
"default": "./sql.js"
|
||||
},
|
||||
"./*": "./*"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=16.13"
|
||||
},
|
||||
"homepage": "https://www.prisma.io",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/prisma/prisma.git",
|
||||
"directory": "packages/client"
|
||||
},
|
||||
"author": "Tim Suchanek <suchanek@prisma.io>",
|
||||
"bugs": "https://github.com/prisma/prisma/issues",
|
||||
"files": [
|
||||
"README.md",
|
||||
"runtime",
|
||||
"!runtime/*.map",
|
||||
"scripts",
|
||||
"generator-build",
|
||||
"edge.js",
|
||||
"edge.d.ts",
|
||||
"wasm.js",
|
||||
"wasm.d.ts",
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"react-native.js",
|
||||
"react-native.d.ts",
|
||||
"default.js",
|
||||
"default.d.ts",
|
||||
"index-browser.js",
|
||||
"extension.js",
|
||||
"extension.d.ts",
|
||||
"sql.d.ts",
|
||||
"sql.js",
|
||||
"sql.mjs"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@cloudflare/workers-types": "4.20240614.0",
|
||||
"@codspeed/benchmark.js-plugin": "3.1.1",
|
||||
"@faker-js/faker": "8.4.1",
|
||||
"@fast-check/jest": "1.8.2",
|
||||
"@inquirer/prompts": "5.0.5",
|
||||
"@jest/create-cache-key-function": "29.7.0",
|
||||
"@jest/globals": "29.7.0",
|
||||
"@jest/test-sequencer": "29.7.0",
|
||||
"@libsql/client": "0.8.0",
|
||||
"@neondatabase/serverless": "0.9.3",
|
||||
"@opentelemetry/api": "1.9.0",
|
||||
"@opentelemetry/context-async-hooks": "1.25.1",
|
||||
"@opentelemetry/instrumentation": "0.52.1",
|
||||
"@opentelemetry/resources": "1.25.1",
|
||||
"@opentelemetry/sdk-trace-base": "1.25.1",
|
||||
"@opentelemetry/semantic-conventions": "1.25.1",
|
||||
"@planetscale/database": "1.18.0",
|
||||
"@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",
|
||||
"@prisma/mini-proxy": "0.9.5",
|
||||
"@prisma/query-engine-wasm": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",
|
||||
"@snaplet/copycat": "0.17.3",
|
||||
"@swc-node/register": "1.10.9",
|
||||
"@swc/core": "1.6.13",
|
||||
"@swc/jest": "0.2.36",
|
||||
"@timsuchanek/copy": "1.4.5",
|
||||
"@types/debug": "4.1.12",
|
||||
"@types/fs-extra": "9.0.13",
|
||||
"@types/jest": "29.5.12",
|
||||
"@types/js-levenshtein": "1.1.3",
|
||||
"@types/mssql": "9.1.5",
|
||||
"@types/node": "18.19.31",
|
||||
"@types/pg": "8.11.6",
|
||||
"arg": "5.0.2",
|
||||
"benchmark": "2.1.4",
|
||||
"ci-info": "4.0.0",
|
||||
"decimal.js": "10.4.3",
|
||||
"detect-runtime": "1.0.4",
|
||||
"env-paths": "2.2.1",
|
||||
"esbuild": "0.23.0",
|
||||
"execa": "5.1.1",
|
||||
"expect-type": "0.19.0",
|
||||
"flat-map-polyfill": "0.3.8",
|
||||
"fs-extra": "11.1.1",
|
||||
"get-stream": "6.0.1",
|
||||
"globby": "11.1.0",
|
||||
"indent-string": "4.0.0",
|
||||
"jest": "29.7.0",
|
||||
"jest-extended": "4.0.2",
|
||||
"jest-junit": "16.0.0",
|
||||
"jest-serializer-ansi-escapes": "3.0.0",
|
||||
"jest-snapshot": "29.7.0",
|
||||
"js-levenshtein": "1.1.6",
|
||||
"kleur": "4.1.5",
|
||||
"klona": "2.0.6",
|
||||
"mariadb": "3.3.1",
|
||||
"memfs": "4.9.3",
|
||||
"mssql": "11.0.1",
|
||||
"new-github-issue-url": "0.2.1",
|
||||
"node-fetch": "3.3.2",
|
||||
"p-retry": "4.6.2",
|
||||
"pg": "8.11.5",
|
||||
"pkg-up": "3.1.0",
|
||||
"pluralize": "8.0.0",
|
||||
"resolve": "1.22.8",
|
||||
"rimraf": "3.0.2",
|
||||
"simple-statistics": "7.8.5",
|
||||
"sort-keys": "4.2.0",
|
||||
"source-map-support": "0.5.21",
|
||||
"sql-template-tag": "5.2.1",
|
||||
"stacktrace-parser": "0.1.10",
|
||||
"strip-ansi": "6.0.1",
|
||||
"strip-indent": "3.0.0",
|
||||
"ts-node": "10.9.2",
|
||||
"ts-pattern": "5.2.0",
|
||||
"tsd": "0.31.1",
|
||||
"typescript": "5.4.5",
|
||||
"undici": "5.28.4",
|
||||
"wrangler": "3.62.0",
|
||||
"zx": "7.2.3",
|
||||
"@prisma/adapter-d1": "5.22.0",
|
||||
"@prisma/adapter-libsql": "5.22.0",
|
||||
"@prisma/adapter-neon": "5.22.0",
|
||||
"@prisma/adapter-pg": "5.22.0",
|
||||
"@prisma/adapter-planetscale": "5.22.0",
|
||||
"@prisma/driver-adapter-utils": "5.22.0",
|
||||
"@prisma/adapter-pg-worker": "5.22.0",
|
||||
"@prisma/debug": "5.22.0",
|
||||
"@prisma/engines": "5.22.0",
|
||||
"@prisma/fetch-engine": "5.22.0",
|
||||
"@prisma/generator-helper": "5.22.0",
|
||||
"@prisma/get-platform": "5.22.0",
|
||||
"@prisma/instrumentation": "5.22.0",
|
||||
"@prisma/internals": "5.22.0",
|
||||
"@prisma/migrate": "5.22.0",
|
||||
"@prisma/pg-worker": "5.22.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prisma": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"prisma": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"dev": "DEV=true tsx helpers/build.ts",
|
||||
"build": "tsx helpers/build.ts",
|
||||
"test": "dotenv -e ../../.db.env -- jest --silent",
|
||||
"test:e2e": "dotenv -e ../../.db.env -- tsx tests/e2e/_utils/run.ts",
|
||||
"test:functional": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts",
|
||||
"test:memory": "dotenv -e ../../.db.env -- tsx helpers/memory-tests.ts",
|
||||
"test:functional:code": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --no-types",
|
||||
"test:functional:types": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --types-only",
|
||||
"test-notypes": "dotenv -e ../../.db.env -- jest --testPathIgnorePatterns src/__tests__/types/types.test.ts",
|
||||
"generate": "node scripts/postinstall.js",
|
||||
"postinstall": "node scripts/postinstall.js",
|
||||
"new-test": "tsx ./helpers/new-test/new-test.ts"
|
||||
}
|
||||
}
|
||||
1
mcp-server/node_modules/@prisma/client/react-native.d.ts
generated
vendored
1
mcp-server/node_modules/@prisma/client/react-native.d.ts
generated
vendored
@@ -1 +0,0 @@
|
||||
export * from '.prisma/client/react-native'
|
||||
3
mcp-server/node_modules/@prisma/client/react-native.js
generated
vendored
3
mcp-server/node_modules/@prisma/client/react-native.js
generated
vendored
@@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
...require('.prisma/client/react-native'),
|
||||
}
|
||||
1
mcp-server/node_modules/@prisma/client/runtime/binary.d.ts
generated
vendored
1
mcp-server/node_modules/@prisma/client/runtime/binary.d.ts
generated
vendored
@@ -1 +0,0 @@
|
||||
export * from "./library"
|
||||
210
mcp-server/node_modules/@prisma/client/runtime/binary.js
generated
vendored
210
mcp-server/node_modules/@prisma/client/runtime/binary.js
generated
vendored
File diff suppressed because one or more lines are too long
31
mcp-server/node_modules/@prisma/client/runtime/edge-esm.js
generated
vendored
31
mcp-server/node_modules/@prisma/client/runtime/edge-esm.js
generated
vendored
File diff suppressed because one or more lines are too long
31
mcp-server/node_modules/@prisma/client/runtime/edge.js
generated
vendored
31
mcp-server/node_modules/@prisma/client/runtime/edge.js
generated
vendored
File diff suppressed because one or more lines are too long
365
mcp-server/node_modules/@prisma/client/runtime/index-browser.d.ts
generated
vendored
365
mcp-server/node_modules/@prisma/client/runtime/index-browser.d.ts
generated
vendored
@@ -1,365 +0,0 @@
|
||||
declare class AnyNull extends NullTypesEnumValue {
|
||||
}
|
||||
|
||||
declare type Args<T, F extends Operation> = T extends {
|
||||
[K: symbol]: {
|
||||
types: {
|
||||
operations: {
|
||||
[K in F]: {
|
||||
args: any;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
} ? T[symbol]['types']['operations'][F]['args'] : any;
|
||||
|
||||
declare class DbNull extends NullTypesEnumValue {
|
||||
}
|
||||
|
||||
export declare namespace Decimal {
|
||||
export type Constructor = typeof Decimal;
|
||||
export type Instance = Decimal;
|
||||
export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
||||
export type Modulo = Rounding | 9;
|
||||
export type Value = string | number | Decimal;
|
||||
|
||||
// http://mikemcl.github.io/decimal.js/#constructor-properties
|
||||
export interface Config {
|
||||
precision?: number;
|
||||
rounding?: Rounding;
|
||||
toExpNeg?: number;
|
||||
toExpPos?: number;
|
||||
minE?: number;
|
||||
maxE?: number;
|
||||
crypto?: boolean;
|
||||
modulo?: Modulo;
|
||||
defaults?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export declare class Decimal {
|
||||
readonly d: number[];
|
||||
readonly e: number;
|
||||
readonly s: number;
|
||||
|
||||
constructor(n: Decimal.Value);
|
||||
|
||||
absoluteValue(): Decimal;
|
||||
abs(): Decimal;
|
||||
|
||||
ceil(): Decimal;
|
||||
|
||||
clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal;
|
||||
clamp(min: Decimal.Value, max: Decimal.Value): Decimal;
|
||||
|
||||
comparedTo(n: Decimal.Value): number;
|
||||
cmp(n: Decimal.Value): number;
|
||||
|
||||
cosine(): Decimal;
|
||||
cos(): Decimal;
|
||||
|
||||
cubeRoot(): Decimal;
|
||||
cbrt(): Decimal;
|
||||
|
||||
decimalPlaces(): number;
|
||||
dp(): number;
|
||||
|
||||
dividedBy(n: Decimal.Value): Decimal;
|
||||
div(n: Decimal.Value): Decimal;
|
||||
|
||||
dividedToIntegerBy(n: Decimal.Value): Decimal;
|
||||
divToInt(n: Decimal.Value): Decimal;
|
||||
|
||||
equals(n: Decimal.Value): boolean;
|
||||
eq(n: Decimal.Value): boolean;
|
||||
|
||||
floor(): Decimal;
|
||||
|
||||
greaterThan(n: Decimal.Value): boolean;
|
||||
gt(n: Decimal.Value): boolean;
|
||||
|
||||
greaterThanOrEqualTo(n: Decimal.Value): boolean;
|
||||
gte(n: Decimal.Value): boolean;
|
||||
|
||||
hyperbolicCosine(): Decimal;
|
||||
cosh(): Decimal;
|
||||
|
||||
hyperbolicSine(): Decimal;
|
||||
sinh(): Decimal;
|
||||
|
||||
hyperbolicTangent(): Decimal;
|
||||
tanh(): Decimal;
|
||||
|
||||
inverseCosine(): Decimal;
|
||||
acos(): Decimal;
|
||||
|
||||
inverseHyperbolicCosine(): Decimal;
|
||||
acosh(): Decimal;
|
||||
|
||||
inverseHyperbolicSine(): Decimal;
|
||||
asinh(): Decimal;
|
||||
|
||||
inverseHyperbolicTangent(): Decimal;
|
||||
atanh(): Decimal;
|
||||
|
||||
inverseSine(): Decimal;
|
||||
asin(): Decimal;
|
||||
|
||||
inverseTangent(): Decimal;
|
||||
atan(): Decimal;
|
||||
|
||||
isFinite(): boolean;
|
||||
|
||||
isInteger(): boolean;
|
||||
isInt(): boolean;
|
||||
|
||||
isNaN(): boolean;
|
||||
|
||||
isNegative(): boolean;
|
||||
isNeg(): boolean;
|
||||
|
||||
isPositive(): boolean;
|
||||
isPos(): boolean;
|
||||
|
||||
isZero(): boolean;
|
||||
|
||||
lessThan(n: Decimal.Value): boolean;
|
||||
lt(n: Decimal.Value): boolean;
|
||||
|
||||
lessThanOrEqualTo(n: Decimal.Value): boolean;
|
||||
lte(n: Decimal.Value): boolean;
|
||||
|
||||
logarithm(n?: Decimal.Value): Decimal;
|
||||
log(n?: Decimal.Value): Decimal;
|
||||
|
||||
minus(n: Decimal.Value): Decimal;
|
||||
sub(n: Decimal.Value): Decimal;
|
||||
|
||||
modulo(n: Decimal.Value): Decimal;
|
||||
mod(n: Decimal.Value): Decimal;
|
||||
|
||||
naturalExponential(): Decimal;
|
||||
exp(): Decimal;
|
||||
|
||||
naturalLogarithm(): Decimal;
|
||||
ln(): Decimal;
|
||||
|
||||
negated(): Decimal;
|
||||
neg(): Decimal;
|
||||
|
||||
plus(n: Decimal.Value): Decimal;
|
||||
add(n: Decimal.Value): Decimal;
|
||||
|
||||
precision(includeZeros?: boolean): number;
|
||||
sd(includeZeros?: boolean): number;
|
||||
|
||||
round(): Decimal;
|
||||
|
||||
sine() : Decimal;
|
||||
sin() : Decimal;
|
||||
|
||||
squareRoot(): Decimal;
|
||||
sqrt(): Decimal;
|
||||
|
||||
tangent() : Decimal;
|
||||
tan() : Decimal;
|
||||
|
||||
times(n: Decimal.Value): Decimal;
|
||||
mul(n: Decimal.Value) : Decimal;
|
||||
|
||||
toBinary(significantDigits?: number): string;
|
||||
toBinary(significantDigits: number, rounding: Decimal.Rounding): string;
|
||||
|
||||
toDecimalPlaces(decimalPlaces?: number): Decimal;
|
||||
toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
|
||||
toDP(decimalPlaces?: number): Decimal;
|
||||
toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
|
||||
|
||||
toExponential(decimalPlaces?: number): string;
|
||||
toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string;
|
||||
|
||||
toFixed(decimalPlaces?: number): string;
|
||||
toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string;
|
||||
|
||||
toFraction(max_denominator?: Decimal.Value): Decimal[];
|
||||
|
||||
toHexadecimal(significantDigits?: number): string;
|
||||
toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string;
|
||||
toHex(significantDigits?: number): string;
|
||||
toHex(significantDigits: number, rounding?: Decimal.Rounding): string;
|
||||
|
||||
toJSON(): string;
|
||||
|
||||
toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal;
|
||||
|
||||
toNumber(): number;
|
||||
|
||||
toOctal(significantDigits?: number): string;
|
||||
toOctal(significantDigits: number, rounding: Decimal.Rounding): string;
|
||||
|
||||
toPower(n: Decimal.Value): Decimal;
|
||||
pow(n: Decimal.Value): Decimal;
|
||||
|
||||
toPrecision(significantDigits?: number): string;
|
||||
toPrecision(significantDigits: number, rounding: Decimal.Rounding): string;
|
||||
|
||||
toSignificantDigits(significantDigits?: number): Decimal;
|
||||
toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal;
|
||||
toSD(significantDigits?: number): Decimal;
|
||||
toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal;
|
||||
|
||||
toString(): string;
|
||||
|
||||
truncated(): Decimal;
|
||||
trunc(): Decimal;
|
||||
|
||||
valueOf(): string;
|
||||
|
||||
static abs(n: Decimal.Value): Decimal;
|
||||
static acos(n: Decimal.Value): Decimal;
|
||||
static acosh(n: Decimal.Value): Decimal;
|
||||
static add(x: Decimal.Value, y: Decimal.Value): Decimal;
|
||||
static asin(n: Decimal.Value): Decimal;
|
||||
static asinh(n: Decimal.Value): Decimal;
|
||||
static atan(n: Decimal.Value): Decimal;
|
||||
static atanh(n: Decimal.Value): Decimal;
|
||||
static atan2(y: Decimal.Value, x: Decimal.Value): Decimal;
|
||||
static cbrt(n: Decimal.Value): Decimal;
|
||||
static ceil(n: Decimal.Value): Decimal;
|
||||
static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal;
|
||||
static clone(object?: Decimal.Config): Decimal.Constructor;
|
||||
static config(object: Decimal.Config): Decimal.Constructor;
|
||||
static cos(n: Decimal.Value): Decimal;
|
||||
static cosh(n: Decimal.Value): Decimal;
|
||||
static div(x: Decimal.Value, y: Decimal.Value): Decimal;
|
||||
static exp(n: Decimal.Value): Decimal;
|
||||
static floor(n: Decimal.Value): Decimal;
|
||||
static hypot(...n: Decimal.Value[]): Decimal;
|
||||
static isDecimal(object: any): object is Decimal;
|
||||
static ln(n: Decimal.Value): Decimal;
|
||||
static log(n: Decimal.Value, base?: Decimal.Value): Decimal;
|
||||
static log2(n: Decimal.Value): Decimal;
|
||||
static log10(n: Decimal.Value): Decimal;
|
||||
static max(...n: Decimal.Value[]): Decimal;
|
||||
static min(...n: Decimal.Value[]): Decimal;
|
||||
static mod(x: Decimal.Value, y: Decimal.Value): Decimal;
|
||||
static mul(x: Decimal.Value, y: Decimal.Value): Decimal;
|
||||
static noConflict(): Decimal.Constructor; // Browser only
|
||||
static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal;
|
||||
static random(significantDigits?: number): Decimal;
|
||||
static round(n: Decimal.Value): Decimal;
|
||||
static set(object: Decimal.Config): Decimal.Constructor;
|
||||
static sign(n: Decimal.Value): number;
|
||||
static sin(n: Decimal.Value): Decimal;
|
||||
static sinh(n: Decimal.Value): Decimal;
|
||||
static sqrt(n: Decimal.Value): Decimal;
|
||||
static sub(x: Decimal.Value, y: Decimal.Value): Decimal;
|
||||
static sum(...n: Decimal.Value[]): Decimal;
|
||||
static tan(n: Decimal.Value): Decimal;
|
||||
static tanh(n: Decimal.Value): Decimal;
|
||||
static trunc(n: Decimal.Value): Decimal;
|
||||
|
||||
static readonly default?: Decimal.Constructor;
|
||||
static readonly Decimal?: Decimal.Constructor;
|
||||
|
||||
static readonly precision: number;
|
||||
static readonly rounding: Decimal.Rounding;
|
||||
static readonly toExpNeg: number;
|
||||
static readonly toExpPos: number;
|
||||
static readonly minE: number;
|
||||
static readonly maxE: number;
|
||||
static readonly crypto: boolean;
|
||||
static readonly modulo: Decimal.Modulo;
|
||||
|
||||
static readonly ROUND_UP: 0;
|
||||
static readonly ROUND_DOWN: 1;
|
||||
static readonly ROUND_CEIL: 2;
|
||||
static readonly ROUND_FLOOR: 3;
|
||||
static readonly ROUND_HALF_UP: 4;
|
||||
static readonly ROUND_HALF_DOWN: 5;
|
||||
static readonly ROUND_HALF_EVEN: 6;
|
||||
static readonly ROUND_HALF_CEIL: 7;
|
||||
static readonly ROUND_HALF_FLOOR: 8;
|
||||
static readonly EUCLID: 9;
|
||||
}
|
||||
|
||||
declare type Exact<A, W> = (A extends unknown ? (W extends A ? {
|
||||
[K in keyof A]: Exact<A[K], W[K]>;
|
||||
} : W) : never) | (A extends Narrowable ? A : never);
|
||||
|
||||
export declare function getRuntime(): GetRuntimeOutput;
|
||||
|
||||
declare type GetRuntimeOutput = {
|
||||
id: Runtime;
|
||||
prettyName: string;
|
||||
isEdge: boolean;
|
||||
};
|
||||
|
||||
declare class JsonNull extends NullTypesEnumValue {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates more strict variant of an enum which, unlike regular enum,
|
||||
* throws on non-existing property access. This can be useful in following situations:
|
||||
* - we have an API, that accepts both `undefined` and `SomeEnumType` as an input
|
||||
* - enum values are generated dynamically from DMMF.
|
||||
*
|
||||
* In that case, if using normal enums and no compile-time typechecking, using non-existing property
|
||||
* will result in `undefined` value being used, which will be accepted. Using strict enum
|
||||
* in this case will help to have a runtime exception, telling you that you are probably doing something wrong.
|
||||
*
|
||||
* Note: if you need to check for existence of a value in the enum you can still use either
|
||||
* `in` operator or `hasOwnProperty` function.
|
||||
*
|
||||
* @param definition
|
||||
* @returns
|
||||
*/
|
||||
export declare function makeStrictEnum<T extends Record<PropertyKey, string | number>>(definition: T): T;
|
||||
|
||||
declare type Narrowable = string | number | bigint | boolean | [];
|
||||
|
||||
declare class NullTypesEnumValue extends ObjectEnumValue {
|
||||
_getNamespace(): string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Base class for unique values of object-valued enums.
|
||||
*/
|
||||
declare abstract class ObjectEnumValue {
|
||||
constructor(arg?: symbol);
|
||||
abstract _getNamespace(): string;
|
||||
_getName(): string;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare const objectEnumValues: {
|
||||
classes: {
|
||||
DbNull: typeof DbNull;
|
||||
JsonNull: typeof JsonNull;
|
||||
AnyNull: typeof AnyNull;
|
||||
};
|
||||
instances: {
|
||||
DbNull: DbNull;
|
||||
JsonNull: JsonNull;
|
||||
AnyNull: AnyNull;
|
||||
};
|
||||
};
|
||||
|
||||
declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw';
|
||||
|
||||
declare namespace Public {
|
||||
export {
|
||||
validator
|
||||
}
|
||||
}
|
||||
export { Public }
|
||||
|
||||
declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown";
|
||||
|
||||
declare function validator<V>(): <S>(select: Exact<S, V>) => S;
|
||||
|
||||
declare function validator<C, M extends Exclude<keyof C, `$${string}`>, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): <S>(select: Exact<S, Args<C[M], O>>) => S;
|
||||
|
||||
declare function validator<C, M extends Exclude<keyof C, `$${string}`>, O extends keyof C[M] & Operation, P extends keyof Args<C[M], O>>(client: C, model: M, operation: O, prop: P): <S>(select: Exact<S, Args<C[M], O>[P]>) => S;
|
||||
|
||||
export { }
|
||||
13
mcp-server/node_modules/@prisma/client/runtime/index-browser.js
generated
vendored
13
mcp-server/node_modules/@prisma/client/runtime/index-browser.js
generated
vendored
File diff suppressed because one or more lines are too long
3403
mcp-server/node_modules/@prisma/client/runtime/library.d.ts
generated
vendored
3403
mcp-server/node_modules/@prisma/client/runtime/library.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
143
mcp-server/node_modules/@prisma/client/runtime/library.js
generated
vendored
143
mcp-server/node_modules/@prisma/client/runtime/library.js
generated
vendored
File diff suppressed because one or more lines are too long
2
mcp-server/node_modules/@prisma/client/runtime/query_engine_bg.mysql.js
generated
vendored
2
mcp-server/node_modules/@prisma/client/runtime/query_engine_bg.mysql.js
generated
vendored
File diff suppressed because one or more lines are too long
BIN
mcp-server/node_modules/@prisma/client/runtime/query_engine_bg.mysql.wasm
generated
vendored
BIN
mcp-server/node_modules/@prisma/client/runtime/query_engine_bg.mysql.wasm
generated
vendored
Binary file not shown.
2
mcp-server/node_modules/@prisma/client/runtime/query_engine_bg.postgresql.js
generated
vendored
2
mcp-server/node_modules/@prisma/client/runtime/query_engine_bg.postgresql.js
generated
vendored
File diff suppressed because one or more lines are too long
BIN
mcp-server/node_modules/@prisma/client/runtime/query_engine_bg.postgresql.wasm
generated
vendored
BIN
mcp-server/node_modules/@prisma/client/runtime/query_engine_bg.postgresql.wasm
generated
vendored
Binary file not shown.
2
mcp-server/node_modules/@prisma/client/runtime/query_engine_bg.sqlite.js
generated
vendored
2
mcp-server/node_modules/@prisma/client/runtime/query_engine_bg.sqlite.js
generated
vendored
File diff suppressed because one or more lines are too long
BIN
mcp-server/node_modules/@prisma/client/runtime/query_engine_bg.sqlite.wasm
generated
vendored
BIN
mcp-server/node_modules/@prisma/client/runtime/query_engine_bg.sqlite.wasm
generated
vendored
Binary file not shown.
3403
mcp-server/node_modules/@prisma/client/runtime/react-native.d.ts
generated
vendored
3403
mcp-server/node_modules/@prisma/client/runtime/react-native.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
80
mcp-server/node_modules/@prisma/client/runtime/react-native.js
generated
vendored
80
mcp-server/node_modules/@prisma/client/runtime/react-native.js
generated
vendored
File diff suppressed because one or more lines are too long
32
mcp-server/node_modules/@prisma/client/runtime/wasm.js
generated
vendored
32
mcp-server/node_modules/@prisma/client/runtime/wasm.js
generated
vendored
File diff suppressed because one or more lines are too long
176
mcp-server/node_modules/@prisma/client/scripts/colors.js
generated
vendored
176
mcp-server/node_modules/@prisma/client/scripts/colors.js
generated
vendored
@@ -1,176 +0,0 @@
|
||||
'use strict'
|
||||
|
||||
const isObject = (val) => val !== null && typeof val === 'object' && !Array.isArray(val)
|
||||
|
||||
// this is a modified version of https://github.com/chalk/ansi-regex (MIT License)
|
||||
const ANSI_REGEX =
|
||||
/* eslint-disable-next-line no-control-regex */
|
||||
/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g
|
||||
|
||||
const create = () => {
|
||||
const colors = { enabled: true, visible: true, styles: {}, keys: {} }
|
||||
|
||||
if ('FORCE_COLOR' in process.env) {
|
||||
colors.enabled = process.env.FORCE_COLOR !== '0'
|
||||
}
|
||||
|
||||
const ansi = (style) => {
|
||||
let open = (style.open = `\u001b[${style.codes[0]}m`)
|
||||
let close = (style.close = `\u001b[${style.codes[1]}m`)
|
||||
let regex = (style.regex = new RegExp(`\\u001b\\[${style.codes[1]}m`, 'g'))
|
||||
style.wrap = (input, newline) => {
|
||||
if (input.includes(close)) input = input.replace(regex, close + open)
|
||||
let output = open + input + close
|
||||
// see https://github.com/chalk/chalk/pull/92, thanks to the
|
||||
// chalk contributors for this fix. However, we've confirmed that
|
||||
// this issue is also present in Windows terminals
|
||||
return newline ? output.replace(/\r*\n/g, `${close}$&${open}`) : output
|
||||
}
|
||||
return style
|
||||
}
|
||||
|
||||
const wrap = (style, input, newline) => {
|
||||
return typeof style === 'function' ? style(input) : style.wrap(input, newline)
|
||||
}
|
||||
|
||||
const style = (input, stack) => {
|
||||
if (input === '' || input == null) return ''
|
||||
if (colors.enabled === false) return input
|
||||
if (colors.visible === false) return ''
|
||||
let str = '' + input
|
||||
let nl = str.includes('\n')
|
||||
let n = stack.length
|
||||
if (n > 0 && stack.includes('unstyle')) {
|
||||
stack = [...new Set(['unstyle', ...stack])].reverse()
|
||||
}
|
||||
while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl)
|
||||
return str
|
||||
}
|
||||
|
||||
const define = (name, codes, type) => {
|
||||
colors.styles[name] = ansi({ name, codes })
|
||||
let keys = colors.keys[type] || (colors.keys[type] = [])
|
||||
keys.push(name)
|
||||
|
||||
Reflect.defineProperty(colors, name, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
set(value) {
|
||||
colors.alias(name, value)
|
||||
},
|
||||
get() {
|
||||
let color = (input) => style(input, color.stack)
|
||||
Reflect.setPrototypeOf(color, colors)
|
||||
color.stack = this.stack ? this.stack.concat(name) : [name]
|
||||
return color
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
define('reset', [0, 0], 'modifier')
|
||||
define('bold', [1, 22], 'modifier')
|
||||
define('dim', [2, 22], 'modifier')
|
||||
define('italic', [3, 23], 'modifier')
|
||||
define('underline', [4, 24], 'modifier')
|
||||
define('inverse', [7, 27], 'modifier')
|
||||
define('hidden', [8, 28], 'modifier')
|
||||
define('strikethrough', [9, 29], 'modifier')
|
||||
|
||||
define('black', [30, 39], 'color')
|
||||
define('red', [31, 39], 'color')
|
||||
define('green', [32, 39], 'color')
|
||||
define('yellow', [33, 39], 'color')
|
||||
define('blue', [34, 39], 'color')
|
||||
define('magenta', [35, 39], 'color')
|
||||
define('cyan', [36, 39], 'color')
|
||||
define('white', [37, 39], 'color')
|
||||
define('gray', [90, 39], 'color')
|
||||
define('grey', [90, 39], 'color')
|
||||
|
||||
define('bgBlack', [40, 49], 'bg')
|
||||
define('bgRed', [41, 49], 'bg')
|
||||
define('bgGreen', [42, 49], 'bg')
|
||||
define('bgYellow', [43, 49], 'bg')
|
||||
define('bgBlue', [44, 49], 'bg')
|
||||
define('bgMagenta', [45, 49], 'bg')
|
||||
define('bgCyan', [46, 49], 'bg')
|
||||
define('bgWhite', [47, 49], 'bg')
|
||||
|
||||
define('blackBright', [90, 39], 'bright')
|
||||
define('redBright', [91, 39], 'bright')
|
||||
define('greenBright', [92, 39], 'bright')
|
||||
define('yellowBright', [93, 39], 'bright')
|
||||
define('blueBright', [94, 39], 'bright')
|
||||
define('magentaBright', [95, 39], 'bright')
|
||||
define('cyanBright', [96, 39], 'bright')
|
||||
define('whiteBright', [97, 39], 'bright')
|
||||
|
||||
define('bgBlackBright', [100, 49], 'bgBright')
|
||||
define('bgRedBright', [101, 49], 'bgBright')
|
||||
define('bgGreenBright', [102, 49], 'bgBright')
|
||||
define('bgYellowBright', [103, 49], 'bgBright')
|
||||
define('bgBlueBright', [104, 49], 'bgBright')
|
||||
define('bgMagentaBright', [105, 49], 'bgBright')
|
||||
define('bgCyanBright', [106, 49], 'bgBright')
|
||||
define('bgWhiteBright', [107, 49], 'bgBright')
|
||||
|
||||
colors.ansiRegex = ANSI_REGEX
|
||||
colors.hasColor = colors.hasAnsi = (str) => {
|
||||
colors.ansiRegex.lastIndex = 0
|
||||
return typeof str === 'string' && str !== '' && colors.ansiRegex.test(str)
|
||||
}
|
||||
|
||||
colors.alias = (name, color) => {
|
||||
let fn = typeof color === 'string' ? colors[color] : color
|
||||
|
||||
if (typeof fn !== 'function') {
|
||||
throw new TypeError('Expected alias to be the name of an existing color (string) or a function')
|
||||
}
|
||||
|
||||
if (!fn.stack) {
|
||||
Reflect.defineProperty(fn, 'name', { value: name })
|
||||
colors.styles[name] = fn
|
||||
fn.stack = [name]
|
||||
}
|
||||
|
||||
Reflect.defineProperty(colors, name, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
set(value) {
|
||||
colors.alias(name, value)
|
||||
},
|
||||
get() {
|
||||
let color = (input) => style(input, color.stack)
|
||||
Reflect.setPrototypeOf(color, colors)
|
||||
color.stack = this.stack ? this.stack.concat(fn.stack) : fn.stack
|
||||
return color
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
colors.theme = (custom) => {
|
||||
if (!isObject(custom)) throw new TypeError('Expected theme to be an object')
|
||||
for (let name of Object.keys(custom)) {
|
||||
colors.alias(name, custom[name])
|
||||
}
|
||||
return colors
|
||||
}
|
||||
|
||||
colors.alias('unstyle', (str) => {
|
||||
if (typeof str === 'string' && str !== '') {
|
||||
colors.ansiRegex.lastIndex = 0
|
||||
return str.replace(colors.ansiRegex, '')
|
||||
}
|
||||
return ''
|
||||
})
|
||||
|
||||
colors.alias('noop', (str) => str)
|
||||
colors.none = colors.clear = colors.noop
|
||||
|
||||
colors.stripColor = colors.unstyle
|
||||
colors.define = define
|
||||
return colors
|
||||
}
|
||||
|
||||
module.exports = create()
|
||||
module.exports.create = create
|
||||
9
mcp-server/node_modules/@prisma/client/scripts/default-deno-edge.ts
generated
vendored
9
mcp-server/node_modules/@prisma/client/scripts/default-deno-edge.ts
generated
vendored
@@ -1,9 +0,0 @@
|
||||
class PrismaClient {
|
||||
constructor() {
|
||||
throw new Error(
|
||||
'@prisma/client/deno/edge did not initialize yet. Please run "prisma generate" and try to import it again.',
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export { PrismaClient }
|
||||
110
mcp-server/node_modules/@prisma/client/scripts/default-index.d.ts
generated
vendored
110
mcp-server/node_modules/@prisma/client/scripts/default-index.d.ts
generated
vendored
@@ -1,110 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
|
||||
import * as runtime from '@prisma/client/runtime/library'
|
||||
|
||||
/**
|
||||
* ## Prisma Client ʲˢ
|
||||
*
|
||||
* Type-safe database client for TypeScript & Node.js
|
||||
* @example
|
||||
* ```
|
||||
* const prisma = new Prisma()
|
||||
* // Fetch zero or more Users
|
||||
* const users = await prisma.user.findMany()
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client).
|
||||
*/
|
||||
export declare const PrismaClient: any
|
||||
|
||||
/**
|
||||
* ## Prisma Client ʲˢ
|
||||
*
|
||||
* Type-safe database client for TypeScript & Node.js
|
||||
* @example
|
||||
* ```
|
||||
* const prisma = new Prisma()
|
||||
* // Fetch zero or more Users
|
||||
* const users = await prisma.user.findMany()
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client).
|
||||
*/
|
||||
export declare type PrismaClient = any
|
||||
|
||||
export declare class PrismaClientExtends<
|
||||
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
|
||||
> {
|
||||
$extends: { extArgs: ExtArgs } & (<
|
||||
R extends runtime.Types.Extensions.UserArgs['result'] = {},
|
||||
M extends runtime.Types.Extensions.UserArgs['model'] = {},
|
||||
Q extends runtime.Types.Extensions.UserArgs['query'] = {},
|
||||
C extends runtime.Types.Extensions.UserArgs['client'] = {},
|
||||
Args extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.InternalArgs<R, M, {}, C>,
|
||||
>(
|
||||
args:
|
||||
| ((client: PrismaClientExtends<ExtArgs>) => { $extends: { extArgs: Args } })
|
||||
| { name?: string }
|
||||
| { result?: R & runtime.Types.Extensions.UserArgs['result'] }
|
||||
| { model?: M & runtime.Types.Extensions.UserArgs['model'] }
|
||||
| { query?: Q & runtime.Types.Extensions.UserArgs['query'] }
|
||||
| { client?: C & runtime.Types.Extensions.UserArgs['client'] },
|
||||
) => PrismaClientExtends<Args & ExtArgs> & Args['client'])
|
||||
|
||||
$transaction<R>(
|
||||
fn: (prisma: Omit<this, runtime.ITXClientDenyList>) => Promise<R>,
|
||||
options?: { maxWait?: number; timeout?: number; isolationLevel?: string },
|
||||
): Promise<R>
|
||||
$transaction<P extends Prisma.PrismaPromise<any>[]>(
|
||||
arg: [...P],
|
||||
options?: { isolationLevel?: string },
|
||||
): Promise<runtime.Types.Utils.UnwrapTuple<P>>
|
||||
}
|
||||
|
||||
export declare const dmmf: any
|
||||
export declare type dmmf = any
|
||||
|
||||
/**
|
||||
* Get the type of the value, that the Promise holds.
|
||||
*/
|
||||
export declare type PromiseType<T extends PromiseLike<any>> = T extends PromiseLike<infer U> ? U : T
|
||||
|
||||
/**
|
||||
* Get the return type of a function which returns a Promise.
|
||||
*/
|
||||
export declare type PromiseReturnType<T extends (...args: any) => Promise<any>> = PromiseType<ReturnType<T>>
|
||||
|
||||
export namespace Prisma {
|
||||
export type TransactionClient = any
|
||||
|
||||
export function defineExtension<
|
||||
R extends runtime.Types.Extensions.UserArgs['result'] = {},
|
||||
M extends runtime.Types.Extensions.UserArgs['model'] = {},
|
||||
Q extends runtime.Types.Extensions.UserArgs['query'] = {},
|
||||
C extends runtime.Types.Extensions.UserArgs['client'] = {},
|
||||
Args extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.InternalArgs<R, M, {}, C>,
|
||||
>(
|
||||
args:
|
||||
| ((client: PrismaClientExtends) => { $extends: { extArgs: Args } })
|
||||
| { name?: string }
|
||||
| { result?: R & runtime.Types.Extensions.UserArgs['result'] }
|
||||
| { model?: M & runtime.Types.Extensions.UserArgs['model'] }
|
||||
| { query?: Q & runtime.Types.Extensions.UserArgs['query'] }
|
||||
| { client?: C & runtime.Types.Extensions.UserArgs['client'] },
|
||||
): (client: any) => PrismaClientExtends<Args>
|
||||
|
||||
export type Extension = runtime.Types.Extensions.UserArgs
|
||||
export import getExtensionContext = runtime.Extensions.getExtensionContext
|
||||
export import Args = runtime.Types.Public.Args
|
||||
export import Payload = runtime.Types.Public.Payload
|
||||
export import Result = runtime.Types.Public.Result
|
||||
export import Exact = runtime.Types.Public.Exact
|
||||
export import PrismaPromise = runtime.Types.Public.PrismaPromise
|
||||
|
||||
export const prismaVersion: {
|
||||
client: string
|
||||
engine: string
|
||||
}
|
||||
}
|
||||
65
mcp-server/node_modules/@prisma/client/scripts/default-index.js
generated
vendored
65
mcp-server/node_modules/@prisma/client/scripts/default-index.js
generated
vendored
@@ -1,65 +0,0 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/scripts/default-index.ts
|
||||
var default_index_exports = {};
|
||||
__export(default_index_exports, {
|
||||
Prisma: () => Prisma,
|
||||
PrismaClient: () => PrismaClient,
|
||||
default: () => default_index_default
|
||||
});
|
||||
module.exports = __toCommonJS(default_index_exports);
|
||||
|
||||
// ../../node_modules/.pnpm/@prisma+engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2/node_modules/@prisma/engines-version/package.json
|
||||
var prisma = {
|
||||
enginesVersion: "605197351a3c8bdd595af2d2a9bc3025bca48ea2"
|
||||
};
|
||||
|
||||
// package.json
|
||||
var version = "5.22.0";
|
||||
|
||||
// src/runtime/utils/clientVersion.ts
|
||||
var clientVersion = version;
|
||||
|
||||
// src/scripts/default-index.ts
|
||||
var PrismaClient = class {
|
||||
constructor() {
|
||||
throw new Error('@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.');
|
||||
}
|
||||
};
|
||||
function defineExtension(ext) {
|
||||
if (typeof ext === "function") {
|
||||
return ext;
|
||||
}
|
||||
return (client) => client.$extends(ext);
|
||||
}
|
||||
function getExtensionContext(that) {
|
||||
return that;
|
||||
}
|
||||
var Prisma = {
|
||||
defineExtension,
|
||||
getExtensionContext,
|
||||
prismaVersion: { client: clientVersion, engine: prisma.enginesVersion }
|
||||
};
|
||||
var default_index_default = { Prisma };
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
Prisma,
|
||||
PrismaClient
|
||||
});
|
||||
5
mcp-server/node_modules/@prisma/client/scripts/postinstall.d.ts
generated
vendored
5
mcp-server/node_modules/@prisma/client/scripts/postinstall.d.ts
generated
vendored
@@ -1,5 +0,0 @@
|
||||
export function getPostInstallTrigger(): string
|
||||
export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__EMPTY_STRING
|
||||
export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING
|
||||
export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR
|
||||
export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR
|
||||
410
mcp-server/node_modules/@prisma/client/scripts/postinstall.js
generated
vendored
410
mcp-server/node_modules/@prisma/client/scripts/postinstall.js
generated
vendored
@@ -1,410 +0,0 @@
|
||||
// @ts-check
|
||||
const childProcess = require('child_process')
|
||||
const { promisify } = require('util')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const c = require('./colors')
|
||||
|
||||
const exec = promisify(childProcess.exec)
|
||||
|
||||
function debug(message, ...optionalParams) {
|
||||
if (process.env.DEBUG && process.env.DEBUG === 'prisma:postinstall') {
|
||||
console.log(message, ...optionalParams)
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Adds `package.json` to the end of a path if it doesn't already exist'
|
||||
* @param {string} pth
|
||||
*/
|
||||
function addPackageJSON(pth) {
|
||||
if (pth.endsWith('package.json')) return pth
|
||||
return path.join(pth, 'package.json')
|
||||
}
|
||||
|
||||
/**
|
||||
* Looks up for a `package.json` which is not `@prisma/cli` or `prisma` and returns the directory of the package
|
||||
* @param {string | null} startPath - Path to Start At
|
||||
* @param {number} limit - Find Up limit
|
||||
* @returns {string | null}
|
||||
*/
|
||||
function findPackageRoot(startPath, limit = 10) {
|
||||
if (!startPath || !fs.existsSync(startPath)) return null
|
||||
let currentPath = startPath
|
||||
// Limit traversal
|
||||
for (let i = 0; i < limit; i++) {
|
||||
const pkgPath = addPackageJSON(currentPath)
|
||||
if (fs.existsSync(pkgPath)) {
|
||||
try {
|
||||
const pkg = require(pkgPath)
|
||||
if (pkg.name && !['@prisma/cli', 'prisma'].includes(pkg.name)) {
|
||||
return pkgPath.replace('package.json', '')
|
||||
}
|
||||
} catch {} // eslint-disable-line no-empty
|
||||
}
|
||||
currentPath = path.join(currentPath, '../')
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* The `postinstall` hook of client sets up the ground and env vars for the `prisma generate` command,
|
||||
* and runs it, showing a warning if the schema is not found.
|
||||
* - initializes the ./node_modules/.prisma/client folder with the default index(-browser).js/index.d.ts,
|
||||
* which define a `PrismaClient` class stub that throws an error if instantiated before the `prisma generate`
|
||||
* command is successfully executed.
|
||||
* - sets the path of the root of the project (TODO: to verify) to the `process.env.PRISMA_GENERATE_IN_POSTINSTALL`
|
||||
* variable, or `'true'` if the project root cannot be found.
|
||||
* - runs `prisma generate`, passing through additional information about the command that triggered the generation,
|
||||
* which is useful for debugging/telemetry. It tries to use the local `prisma` package if it is installed, otherwise it
|
||||
* falls back to the global `prisma` package. If neither options are available, it warns the user to install `prisma` first.
|
||||
*/
|
||||
async function main() {
|
||||
if (process.env.INIT_CWD) {
|
||||
process.chdir(process.env.INIT_CWD) // necessary, because npm chooses __dirname as process.cwd()
|
||||
// in the postinstall hook
|
||||
}
|
||||
|
||||
await createDefaultGeneratedThrowFiles()
|
||||
|
||||
// TODO: consider using the `which` package
|
||||
const localPath = getLocalPackagePath()
|
||||
|
||||
// Only execute if !localpath
|
||||
const installedGlobally = localPath ? undefined : await isInstalledGlobally()
|
||||
|
||||
// this is needed, so we can find the correct schemas in yarn workspace projects
|
||||
const root = findPackageRoot(localPath)
|
||||
|
||||
process.env.PRISMA_GENERATE_IN_POSTINSTALL = root ? root : 'true'
|
||||
|
||||
debug({
|
||||
localPath,
|
||||
installedGlobally,
|
||||
init_cwd: process.env.INIT_CWD,
|
||||
PRISMA_GENERATE_IN_POSTINSTALL: process.env.PRISMA_GENERATE_IN_POSTINSTALL,
|
||||
})
|
||||
try {
|
||||
if (localPath) {
|
||||
await run('node', [localPath, 'generate', '--postinstall', doubleQuote(getPostInstallTrigger())])
|
||||
return
|
||||
}
|
||||
if (installedGlobally) {
|
||||
await run('prisma', ['generate', '--postinstall', doubleQuote(getPostInstallTrigger())])
|
||||
return
|
||||
}
|
||||
} catch (e) {
|
||||
// if exit code = 1 do not print
|
||||
if (e && e !== 1) {
|
||||
console.error(e)
|
||||
}
|
||||
debug(e)
|
||||
}
|
||||
|
||||
if (!localPath && !installedGlobally) {
|
||||
console.error(
|
||||
`${c.yellow(
|
||||
'warning',
|
||||
)} In order to use "@prisma/client", please install Prisma CLI. You can install it with "npm add -D prisma".`,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function getLocalPackagePath() {
|
||||
try {
|
||||
const packagePath = require.resolve('prisma/package.json')
|
||||
if (packagePath) {
|
||||
return require.resolve('prisma')
|
||||
}
|
||||
} catch (e) {} // eslint-disable-line no-empty
|
||||
|
||||
// TODO: consider removing this
|
||||
try {
|
||||
const packagePath = require.resolve('@prisma/cli/package.json')
|
||||
if (packagePath) {
|
||||
return require.resolve('@prisma/cli')
|
||||
}
|
||||
} catch (e) {} // eslint-disable-line no-empty
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
async function isInstalledGlobally() {
|
||||
try {
|
||||
const result = await exec('prisma -v')
|
||||
if (result.stdout.includes('@prisma/client')) {
|
||||
return true
|
||||
} else {
|
||||
console.error(`${c.yellow('warning')} You still have the ${c.bold('prisma')} cli (Prisma 1) installed globally.
|
||||
Please uninstall it with either ${c.green('npm remove -g prisma')} or ${c.green('yarn global remove prisma')}.`)
|
||||
}
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
if (!process.env.PRISMA_SKIP_POSTINSTALL_GENERATE) {
|
||||
main()
|
||||
.catch((e) => {
|
||||
if (e.stderr) {
|
||||
if (e.stderr.includes(`Can't find schema.prisma`)) {
|
||||
console.error(
|
||||
`${c.yellow('warning')} @prisma/client needs a ${c.bold('schema.prisma')} to function, but couldn't find it.
|
||||
Please either create one manually or use ${c.bold('prisma init')}.
|
||||
Once you created it, run ${c.bold('prisma generate')}.
|
||||
To keep Prisma related things separate, we recommend creating it in a subfolder called ${c.underline(
|
||||
'./prisma',
|
||||
)} like so: ${c.underline('./prisma/schema.prisma')}\n`,
|
||||
)
|
||||
} else {
|
||||
console.error(e.stderr)
|
||||
}
|
||||
} else {
|
||||
console.error(e)
|
||||
}
|
||||
process.exit(0)
|
||||
})
|
||||
.finally(() => {
|
||||
debug(`postinstall trigger: ${getPostInstallTrigger()}`)
|
||||
})
|
||||
}
|
||||
|
||||
function run(cmd, params, cwd = process.cwd()) {
|
||||
const child = childProcess.spawn(cmd, params, {
|
||||
stdio: ['pipe', 'inherit', 'inherit'],
|
||||
cwd,
|
||||
})
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
child.on('close', () => {
|
||||
resolve(undefined)
|
||||
})
|
||||
child.on('exit', (code) => {
|
||||
if (code === 0) {
|
||||
resolve(undefined)
|
||||
} else {
|
||||
reject(code)
|
||||
}
|
||||
})
|
||||
child.on('error', () => {
|
||||
reject()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies our default "throw" files into the default generation folder. These
|
||||
* files are dummy and informative because they just throw an error to let the
|
||||
* user know that they have forgotten to run `prisma generate` or that they
|
||||
* don't have a a schema file yet. We only add these files at the default
|
||||
* location `node_modules/.prisma/client`.
|
||||
*/
|
||||
async function createDefaultGeneratedThrowFiles() {
|
||||
try {
|
||||
const dotPrismaClientDir = path.join(__dirname, '../../../.prisma/client')
|
||||
const denoPrismaClientDir = path.join(__dirname, '../../../.prisma/client/deno')
|
||||
|
||||
await makeDir(dotPrismaClientDir)
|
||||
await makeDir(denoPrismaClientDir)
|
||||
|
||||
const defaultFileConfig = {
|
||||
js: path.join(__dirname, 'default-index.js'),
|
||||
ts: path.join(__dirname, 'default-index.d.ts'),
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {Record<string, { js?: string; ts?: string } | undefined>}
|
||||
*/
|
||||
const defaultFiles = {
|
||||
index: defaultFileConfig,
|
||||
edge: defaultFileConfig,
|
||||
default: defaultFileConfig,
|
||||
wasm: defaultFileConfig,
|
||||
'index-browser': {
|
||||
js: path.join(__dirname, 'default-index.js'),
|
||||
ts: undefined,
|
||||
},
|
||||
'deno/edge': {
|
||||
js: undefined,
|
||||
ts: path.join(__dirname, 'default-deno-edge.ts'),
|
||||
},
|
||||
}
|
||||
|
||||
for (const file of Object.keys(defaultFiles)) {
|
||||
const { js, ts } = defaultFiles[file] ?? {}
|
||||
const dotPrismaJsFilePath = path.join(dotPrismaClientDir, `${file}.js`)
|
||||
const dotPrismaTsFilePath = path.join(dotPrismaClientDir, `${file}.d.ts`)
|
||||
|
||||
if (js && !fs.existsSync(dotPrismaJsFilePath) && fs.existsSync(js)) {
|
||||
await fs.promises.copyFile(js, dotPrismaJsFilePath)
|
||||
}
|
||||
|
||||
if (ts && !fs.existsSync(dotPrismaTsFilePath) && fs.existsSync(ts)) {
|
||||
await fs.promises.copyFile(ts, dotPrismaTsFilePath)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: can this be replaced some utility eg. mkdir
|
||||
function makeDir(input) {
|
||||
const make = async (pth) => {
|
||||
try {
|
||||
await fs.promises.mkdir(pth)
|
||||
|
||||
return pth
|
||||
} catch (error) {
|
||||
if (error.code === 'EPERM') {
|
||||
throw error
|
||||
}
|
||||
|
||||
if (error.code === 'ENOENT') {
|
||||
if (path.dirname(pth) === pth) {
|
||||
throw new Error(`operation not permitted, mkdir '${pth}'`)
|
||||
}
|
||||
|
||||
if (error.message.includes('null bytes')) {
|
||||
throw error
|
||||
}
|
||||
|
||||
await make(path.dirname(pth))
|
||||
|
||||
return make(pth)
|
||||
}
|
||||
|
||||
try {
|
||||
const stats = await fs.promises.stat(pth)
|
||||
if (!stats.isDirectory()) {
|
||||
throw new Error('The path is not a directory')
|
||||
}
|
||||
} catch (_) {
|
||||
throw error
|
||||
}
|
||||
|
||||
return pth
|
||||
}
|
||||
}
|
||||
|
||||
return make(path.resolve(input))
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the command that triggered this postinstall script being run. If there is
|
||||
* an error while attempting to get this value then the string constant
|
||||
* 'ERROR_WHILE_FINDING_POSTINSTALL_TRIGGER' is returned.
|
||||
* This information is just necessary for telemetry.
|
||||
* This is passed to `prisma generate` as a string like `--postinstall value`.
|
||||
*/
|
||||
function getPostInstallTrigger() {
|
||||
/*
|
||||
npm_config_argv` is not officially documented so here are our research notes
|
||||
|
||||
`npm_config_argv` is available to the postinstall script when the containing package has been installed by npm into some project.
|
||||
|
||||
An example of its value:
|
||||
|
||||
```
|
||||
npm_config_argv: '{"remain":["../test"],"cooked":["add","../test"],"original":["add","../test"]}',
|
||||
```
|
||||
|
||||
We are interesting in the data contained in the "original" field.
|
||||
|
||||
Trivia/Note: `npm_config_argv` is not available when running e.g. `npm install` on the containing package itself (e.g. when working on it)
|
||||
|
||||
Yarn mimics this data and environment variable. Here is an example following `yarn add` for the same package:
|
||||
|
||||
```
|
||||
npm_config_argv: '{"remain":[],"cooked":["add"],"original":["add","../test"]}'
|
||||
```
|
||||
|
||||
Other package managers like `pnpm` have not been tested.
|
||||
*/
|
||||
|
||||
const maybe_npm_config_argv_string = process.env.npm_config_argv
|
||||
|
||||
if (maybe_npm_config_argv_string === undefined) {
|
||||
return UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING
|
||||
}
|
||||
|
||||
let npm_config_argv
|
||||
try {
|
||||
npm_config_argv = JSON.parse(maybe_npm_config_argv_string)
|
||||
} catch (e) {
|
||||
return `${UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR}: ${maybe_npm_config_argv_string}`
|
||||
}
|
||||
|
||||
if (typeof npm_config_argv !== 'object' || npm_config_argv === null) {
|
||||
return `${UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR}: ${maybe_npm_config_argv_string}`
|
||||
}
|
||||
|
||||
const npm_config_argv_original_arr = npm_config_argv.original
|
||||
|
||||
if (!Array.isArray(npm_config_argv_original_arr)) {
|
||||
return `${UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR}: ${maybe_npm_config_argv_string}`
|
||||
}
|
||||
|
||||
const npm_config_argv_original = npm_config_argv_original_arr.filter((arg) => arg !== '').join(' ')
|
||||
|
||||
const command =
|
||||
npm_config_argv_original === ''
|
||||
? getPackageManagerName()
|
||||
: [getPackageManagerName(), npm_config_argv_original].join(' ')
|
||||
|
||||
return command
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap double quotes around the given string.
|
||||
*/
|
||||
function doubleQuote(x) {
|
||||
return `"${x}"`
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the package manager name currently being used. If parsing fails, then the following pattern is returned:
|
||||
* UNKNOWN_NPM_CONFIG_USER_AGENT(<string received>).
|
||||
*/
|
||||
function getPackageManagerName() {
|
||||
const userAgent = process.env.npm_config_user_agent
|
||||
if (!userAgent) return 'MISSING_NPM_CONFIG_USER_AGENT'
|
||||
|
||||
const name = parsePackageManagerName(userAgent)
|
||||
if (!name) return `UNKNOWN_NPM_CONFIG_USER_AGENT(${userAgent})`
|
||||
|
||||
return name
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse package manager name from useragent. If parsing fails, `null` is returned.
|
||||
*/
|
||||
function parsePackageManagerName(userAgent) {
|
||||
let packageManager = null
|
||||
|
||||
// example: 'yarn/1.22.4 npm/? node/v13.11.0 darwin x64'
|
||||
// References:
|
||||
// - https://pnpm.io/only-allow-pnpm
|
||||
// - https://github.com/cameronhunter/npm-config-user-agent-parser
|
||||
if (userAgent) {
|
||||
const matchResult = userAgent.match(/^([^/]+)\/.+/)
|
||||
if (matchResult) {
|
||||
packageManager = matchResult[1].trim()
|
||||
}
|
||||
}
|
||||
|
||||
return packageManager
|
||||
}
|
||||
|
||||
// prettier-ignore
|
||||
const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING'
|
||||
// prettier-ignore
|
||||
const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR'
|
||||
// prettier-ignore
|
||||
const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR'
|
||||
|
||||
// expose for testing
|
||||
|
||||
exports.UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING = UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING
|
||||
exports.UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR = UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR
|
||||
exports.UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR = UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR
|
||||
exports.getPostInstallTrigger = getPostInstallTrigger
|
||||
1
mcp-server/node_modules/@prisma/client/sql.d.ts
generated
vendored
1
mcp-server/node_modules/@prisma/client/sql.d.ts
generated
vendored
@@ -1 +0,0 @@
|
||||
export * from '.prisma/client/sql'
|
||||
4
mcp-server/node_modules/@prisma/client/sql.js
generated
vendored
4
mcp-server/node_modules/@prisma/client/sql.js
generated
vendored
@@ -1,4 +0,0 @@
|
||||
'use strict'
|
||||
module.exports = {
|
||||
...require('.prisma/client/sql'),
|
||||
}
|
||||
1
mcp-server/node_modules/@prisma/client/sql.mjs
generated
vendored
1
mcp-server/node_modules/@prisma/client/sql.mjs
generated
vendored
@@ -1 +0,0 @@
|
||||
export * from '../../.prisma/client/sql/index.mjs'
|
||||
1
mcp-server/node_modules/@prisma/client/wasm.d.ts
generated
vendored
1
mcp-server/node_modules/@prisma/client/wasm.d.ts
generated
vendored
@@ -1 +0,0 @@
|
||||
export * from '.prisma/client/wasm'
|
||||
4
mcp-server/node_modules/@prisma/client/wasm.js
generated
vendored
4
mcp-server/node_modules/@prisma/client/wasm.js
generated
vendored
@@ -1,4 +0,0 @@
|
||||
module.exports = {
|
||||
// https://github.com/prisma/prisma/pull/12907
|
||||
...require('.prisma/client/wasm'),
|
||||
}
|
||||
21
mcp-server/node_modules/cross-spawn/LICENSE
generated
vendored
21
mcp-server/node_modules/cross-spawn/LICENSE
generated
vendored
@@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 Made With MOXY Lda <hello@moxy.studio>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
89
mcp-server/node_modules/cross-spawn/README.md
generated
vendored
89
mcp-server/node_modules/cross-spawn/README.md
generated
vendored
@@ -1,89 +0,0 @@
|
||||
# cross-spawn
|
||||
|
||||
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Build status][appveyor-image]][appveyor-url]
|
||||
|
||||
[npm-url]:https://npmjs.org/package/cross-spawn
|
||||
[downloads-image]:https://img.shields.io/npm/dm/cross-spawn.svg
|
||||
[npm-image]:https://img.shields.io/npm/v/cross-spawn.svg
|
||||
[ci-url]:https://github.com/moxystudio/node-cross-spawn/actions/workflows/ci.yaml
|
||||
[ci-image]:https://github.com/moxystudio/node-cross-spawn/actions/workflows/ci.yaml/badge.svg
|
||||
[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn
|
||||
[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg
|
||||
|
||||
A cross platform solution to node's spawn and spawnSync.
|
||||
|
||||
## Installation
|
||||
|
||||
Node.js version 8 and up:
|
||||
`$ npm install cross-spawn`
|
||||
|
||||
Node.js version 7 and under:
|
||||
`$ npm install cross-spawn@6`
|
||||
|
||||
## Why
|
||||
|
||||
Node has issues when using spawn on Windows:
|
||||
|
||||
- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318)
|
||||
- It does not support [shebangs](https://en.wikipedia.org/wiki/Shebang_(Unix))
|
||||
- Has problems running commands with [spaces](https://github.com/nodejs/node/issues/7367)
|
||||
- Has problems running commands with posix relative paths (e.g.: `./my-folder/my-executable`)
|
||||
- Has an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) with command shims (files in `node_modules/.bin/`), where arguments with quotes and parenthesis would result in [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149)
|
||||
- No `options.shell` support on node `<v4.8`
|
||||
|
||||
All these issues are handled correctly by `cross-spawn`.
|
||||
There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) or [`spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), so it's a drop in replacement.
|
||||
|
||||
|
||||
```js
|
||||
const spawn = require('cross-spawn');
|
||||
|
||||
// Spawn NPM asynchronously
|
||||
const child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
|
||||
|
||||
// Spawn NPM synchronously
|
||||
const result = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
|
||||
```
|
||||
|
||||
|
||||
## Caveats
|
||||
|
||||
### Using `options.shell` as an alternative to `cross-spawn`
|
||||
|
||||
Starting from node `v4.8`, `spawn` has a `shell` option that allows you run commands from within a shell. This new option solves
|
||||
the [PATHEXT](https://github.com/joyent/node/issues/2318) issue but:
|
||||
|
||||
- It's not supported in node `<v4.8`
|
||||
- You must manually escape the command and arguments which is very error prone, specially when passing user input
|
||||
- There are a lot of other unresolved issues from the [Why](#why) section that you must take into account
|
||||
|
||||
If you are using the `shell` option to spawn a command in a cross platform way, consider using `cross-spawn` instead. You have been warned.
|
||||
|
||||
### `options.shell` support
|
||||
|
||||
While `cross-spawn` adds support for `options.shell` in node `<v4.8`, all of its enhancements are disabled.
|
||||
|
||||
This mimics the Node.js behavior. More specifically, the command and its arguments will not be automatically escaped nor shebang support will be offered. This is by design because if you are using `options.shell` you are probably targeting a specific platform anyway and you don't want things to get into your way.
|
||||
|
||||
### Shebangs support
|
||||
|
||||
While `cross-spawn` handles shebangs on Windows, its support is limited. More specifically, it just supports `#!/usr/bin/env <program>` where `<program>` must not contain any arguments.
|
||||
If you would like to have the shebang support improved, feel free to contribute via a pull-request.
|
||||
|
||||
Remember to always test your code on Windows!
|
||||
|
||||
|
||||
## Tests
|
||||
|
||||
`$ npm test`
|
||||
`$ npm test -- --watch` during development
|
||||
|
||||
|
||||
## License
|
||||
|
||||
Released under the [MIT License](https://www.opensource.org/licenses/mit-license.php).
|
||||
39
mcp-server/node_modules/cross-spawn/index.js
generated
vendored
39
mcp-server/node_modules/cross-spawn/index.js
generated
vendored
@@ -1,39 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const cp = require('child_process');
|
||||
const parse = require('./lib/parse');
|
||||
const enoent = require('./lib/enoent');
|
||||
|
||||
function spawn(command, args, options) {
|
||||
// Parse the arguments
|
||||
const parsed = parse(command, args, options);
|
||||
|
||||
// Spawn the child process
|
||||
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
||||
|
||||
// Hook into child process "exit" event to emit an error if the command
|
||||
// does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
|
||||
enoent.hookChildProcess(spawned, parsed);
|
||||
|
||||
return spawned;
|
||||
}
|
||||
|
||||
function spawnSync(command, args, options) {
|
||||
// Parse the arguments
|
||||
const parsed = parse(command, args, options);
|
||||
|
||||
// Spawn the child process
|
||||
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
||||
|
||||
// Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
|
||||
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = spawn;
|
||||
module.exports.spawn = spawn;
|
||||
module.exports.sync = spawnSync;
|
||||
|
||||
module.exports._parse = parse;
|
||||
module.exports._enoent = enoent;
|
||||
59
mcp-server/node_modules/cross-spawn/lib/enoent.js
generated
vendored
59
mcp-server/node_modules/cross-spawn/lib/enoent.js
generated
vendored
@@ -1,59 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const isWin = process.platform === 'win32';
|
||||
|
||||
function notFoundError(original, syscall) {
|
||||
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
|
||||
code: 'ENOENT',
|
||||
errno: 'ENOENT',
|
||||
syscall: `${syscall} ${original.command}`,
|
||||
path: original.command,
|
||||
spawnargs: original.args,
|
||||
});
|
||||
}
|
||||
|
||||
function hookChildProcess(cp, parsed) {
|
||||
if (!isWin) {
|
||||
return;
|
||||
}
|
||||
|
||||
const originalEmit = cp.emit;
|
||||
|
||||
cp.emit = function (name, arg1) {
|
||||
// If emitting "exit" event and exit code is 1, we need to check if
|
||||
// the command exists and emit an "error" instead
|
||||
// See https://github.com/IndigoUnited/node-cross-spawn/issues/16
|
||||
if (name === 'exit') {
|
||||
const err = verifyENOENT(arg1, parsed);
|
||||
|
||||
if (err) {
|
||||
return originalEmit.call(cp, 'error', err);
|
||||
}
|
||||
}
|
||||
|
||||
return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params
|
||||
};
|
||||
}
|
||||
|
||||
function verifyENOENT(status, parsed) {
|
||||
if (isWin && status === 1 && !parsed.file) {
|
||||
return notFoundError(parsed.original, 'spawn');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function verifyENOENTSync(status, parsed) {
|
||||
if (isWin && status === 1 && !parsed.file) {
|
||||
return notFoundError(parsed.original, 'spawnSync');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
hookChildProcess,
|
||||
verifyENOENT,
|
||||
verifyENOENTSync,
|
||||
notFoundError,
|
||||
};
|
||||
91
mcp-server/node_modules/cross-spawn/lib/parse.js
generated
vendored
91
mcp-server/node_modules/cross-spawn/lib/parse.js
generated
vendored
@@ -1,91 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const resolveCommand = require('./util/resolveCommand');
|
||||
const escape = require('./util/escape');
|
||||
const readShebang = require('./util/readShebang');
|
||||
|
||||
const isWin = process.platform === 'win32';
|
||||
const isExecutableRegExp = /\.(?:com|exe)$/i;
|
||||
const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
||||
|
||||
function detectShebang(parsed) {
|
||||
parsed.file = resolveCommand(parsed);
|
||||
|
||||
const shebang = parsed.file && readShebang(parsed.file);
|
||||
|
||||
if (shebang) {
|
||||
parsed.args.unshift(parsed.file);
|
||||
parsed.command = shebang;
|
||||
|
||||
return resolveCommand(parsed);
|
||||
}
|
||||
|
||||
return parsed.file;
|
||||
}
|
||||
|
||||
function parseNonShell(parsed) {
|
||||
if (!isWin) {
|
||||
return parsed;
|
||||
}
|
||||
|
||||
// Detect & add support for shebangs
|
||||
const commandFile = detectShebang(parsed);
|
||||
|
||||
// We don't need a shell if the command filename is an executable
|
||||
const needsShell = !isExecutableRegExp.test(commandFile);
|
||||
|
||||
// If a shell is required, use cmd.exe and take care of escaping everything correctly
|
||||
// Note that `forceShell` is an hidden option used only in tests
|
||||
if (parsed.options.forceShell || needsShell) {
|
||||
// Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`
|
||||
// The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument
|
||||
// Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,
|
||||
// we need to double escape them
|
||||
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
||||
|
||||
// Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar)
|
||||
// This is necessary otherwise it will always fail with ENOENT in those cases
|
||||
parsed.command = path.normalize(parsed.command);
|
||||
|
||||
// Escape command & arguments
|
||||
parsed.command = escape.command(parsed.command);
|
||||
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
||||
|
||||
const shellCommand = [parsed.command].concat(parsed.args).join(' ');
|
||||
|
||||
parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
|
||||
parsed.command = process.env.comspec || 'cmd.exe';
|
||||
parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
|
||||
}
|
||||
|
||||
return parsed;
|
||||
}
|
||||
|
||||
function parse(command, args, options) {
|
||||
// Normalize arguments, similar to nodejs
|
||||
if (args && !Array.isArray(args)) {
|
||||
options = args;
|
||||
args = null;
|
||||
}
|
||||
|
||||
args = args ? args.slice(0) : []; // Clone array to avoid changing the original
|
||||
options = Object.assign({}, options); // Clone object to avoid changing the original
|
||||
|
||||
// Build our parsed object
|
||||
const parsed = {
|
||||
command,
|
||||
args,
|
||||
options,
|
||||
file: undefined,
|
||||
original: {
|
||||
command,
|
||||
args,
|
||||
},
|
||||
};
|
||||
|
||||
// Delegate further parsing to shell or non-shell
|
||||
return options.shell ? parsed : parseNonShell(parsed);
|
||||
}
|
||||
|
||||
module.exports = parse;
|
||||
47
mcp-server/node_modules/cross-spawn/lib/util/escape.js
generated
vendored
47
mcp-server/node_modules/cross-spawn/lib/util/escape.js
generated
vendored
@@ -1,47 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
// See http://www.robvanderwoude.com/escapechars.php
|
||||
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
||||
|
||||
function escapeCommand(arg) {
|
||||
// Escape meta chars
|
||||
arg = arg.replace(metaCharsRegExp, '^$1');
|
||||
|
||||
return arg;
|
||||
}
|
||||
|
||||
function escapeArgument(arg, doubleEscapeMetaChars) {
|
||||
// Convert to string
|
||||
arg = `${arg}`;
|
||||
|
||||
// Algorithm below is based on https://qntm.org/cmd
|
||||
// It's slightly altered to disable JS backtracking to avoid hanging on specially crafted input
|
||||
// Please see https://github.com/moxystudio/node-cross-spawn/pull/160 for more information
|
||||
|
||||
// Sequence of backslashes followed by a double quote:
|
||||
// double up all the backslashes and escape the double quote
|
||||
arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
|
||||
|
||||
// Sequence of backslashes followed by the end of the string
|
||||
// (which will become a double quote later):
|
||||
// double up all the backslashes
|
||||
arg = arg.replace(/(?=(\\+?)?)\1$/, '$1$1');
|
||||
|
||||
// All other backslashes occur literally
|
||||
|
||||
// Quote the whole thing:
|
||||
arg = `"${arg}"`;
|
||||
|
||||
// Escape meta chars
|
||||
arg = arg.replace(metaCharsRegExp, '^$1');
|
||||
|
||||
// Double escape meta chars if necessary
|
||||
if (doubleEscapeMetaChars) {
|
||||
arg = arg.replace(metaCharsRegExp, '^$1');
|
||||
}
|
||||
|
||||
return arg;
|
||||
}
|
||||
|
||||
module.exports.command = escapeCommand;
|
||||
module.exports.argument = escapeArgument;
|
||||
23
mcp-server/node_modules/cross-spawn/lib/util/readShebang.js
generated
vendored
23
mcp-server/node_modules/cross-spawn/lib/util/readShebang.js
generated
vendored
@@ -1,23 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const shebangCommand = require('shebang-command');
|
||||
|
||||
function readShebang(command) {
|
||||
// Read the first 150 bytes from the file
|
||||
const size = 150;
|
||||
const buffer = Buffer.alloc(size);
|
||||
|
||||
let fd;
|
||||
|
||||
try {
|
||||
fd = fs.openSync(command, 'r');
|
||||
fs.readSync(fd, buffer, 0, size, 0);
|
||||
fs.closeSync(fd);
|
||||
} catch (e) { /* Empty */ }
|
||||
|
||||
// Attempt to extract shebang (null is returned if not a shebang)
|
||||
return shebangCommand(buffer.toString());
|
||||
}
|
||||
|
||||
module.exports = readShebang;
|
||||
52
mcp-server/node_modules/cross-spawn/lib/util/resolveCommand.js
generated
vendored
52
mcp-server/node_modules/cross-spawn/lib/util/resolveCommand.js
generated
vendored
@@ -1,52 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const which = require('which');
|
||||
const getPathKey = require('path-key');
|
||||
|
||||
function resolveCommandAttempt(parsed, withoutPathExt) {
|
||||
const env = parsed.options.env || process.env;
|
||||
const cwd = process.cwd();
|
||||
const hasCustomCwd = parsed.options.cwd != null;
|
||||
// Worker threads do not have process.chdir()
|
||||
const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;
|
||||
|
||||
// If a custom `cwd` was specified, we need to change the process cwd
|
||||
// because `which` will do stat calls but does not support a custom cwd
|
||||
if (shouldSwitchCwd) {
|
||||
try {
|
||||
process.chdir(parsed.options.cwd);
|
||||
} catch (err) {
|
||||
/* Empty */
|
||||
}
|
||||
}
|
||||
|
||||
let resolved;
|
||||
|
||||
try {
|
||||
resolved = which.sync(parsed.command, {
|
||||
path: env[getPathKey({ env })],
|
||||
pathExt: withoutPathExt ? path.delimiter : undefined,
|
||||
});
|
||||
} catch (e) {
|
||||
/* Empty */
|
||||
} finally {
|
||||
if (shouldSwitchCwd) {
|
||||
process.chdir(cwd);
|
||||
}
|
||||
}
|
||||
|
||||
// If we successfully resolved, ensure that an absolute path is returned
|
||||
// Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it
|
||||
if (resolved) {
|
||||
resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);
|
||||
}
|
||||
|
||||
return resolved;
|
||||
}
|
||||
|
||||
function resolveCommand(parsed) {
|
||||
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
||||
}
|
||||
|
||||
module.exports = resolveCommand;
|
||||
73
mcp-server/node_modules/cross-spawn/package.json
generated
vendored
73
mcp-server/node_modules/cross-spawn/package.json
generated
vendored
@@ -1,73 +0,0 @@
|
||||
{
|
||||
"name": "cross-spawn",
|
||||
"version": "7.0.6",
|
||||
"description": "Cross platform child_process#spawn and child_process#spawnSync",
|
||||
"keywords": [
|
||||
"spawn",
|
||||
"spawnSync",
|
||||
"windows",
|
||||
"cross-platform",
|
||||
"path-ext",
|
||||
"shebang",
|
||||
"cmd",
|
||||
"execute"
|
||||
],
|
||||
"author": "André Cruz <andre@moxy.studio>",
|
||||
"homepage": "https://github.com/moxystudio/node-cross-spawn",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:moxystudio/node-cross-spawn.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"test": "jest --env node --coverage",
|
||||
"prerelease": "npm t && npm run lint",
|
||||
"release": "standard-version",
|
||||
"postrelease": "git push --follow-tags origin HEAD && npm publish"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.js": [
|
||||
"eslint --fix",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"commitlint": {
|
||||
"extends": [
|
||||
"@commitlint/config-conventional"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"path-key": "^3.1.0",
|
||||
"shebang-command": "^2.0.0",
|
||||
"which": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^8.1.0",
|
||||
"@commitlint/config-conventional": "^8.1.0",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-jest": "^24.9.0",
|
||||
"babel-preset-moxy": "^3.1.0",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-moxy": "^7.1.0",
|
||||
"husky": "^3.0.5",
|
||||
"jest": "^24.9.0",
|
||||
"lint-staged": "^9.2.5",
|
||||
"mkdirp": "^0.5.1",
|
||||
"rimraf": "^3.0.0",
|
||||
"standard-version": "^9.5.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
}
|
||||
2
mcp-server/node_modules/isexe/.npmignore
generated
vendored
2
mcp-server/node_modules/isexe/.npmignore
generated
vendored
@@ -1,2 +0,0 @@
|
||||
.nyc_output/
|
||||
coverage/
|
||||
15
mcp-server/node_modules/isexe/LICENSE
generated
vendored
15
mcp-server/node_modules/isexe/LICENSE
generated
vendored
@@ -1,15 +0,0 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
51
mcp-server/node_modules/isexe/README.md
generated
vendored
51
mcp-server/node_modules/isexe/README.md
generated
vendored
@@ -1,51 +0,0 @@
|
||||
# isexe
|
||||
|
||||
Minimal module to check if a file is executable, and a normal file.
|
||||
|
||||
Uses `fs.stat` and tests against the `PATHEXT` environment variable on
|
||||
Windows.
|
||||
|
||||
## USAGE
|
||||
|
||||
```javascript
|
||||
var isexe = require('isexe')
|
||||
isexe('some-file-name', function (err, isExe) {
|
||||
if (err) {
|
||||
console.error('probably file does not exist or something', err)
|
||||
} else if (isExe) {
|
||||
console.error('this thing can be run')
|
||||
} else {
|
||||
console.error('cannot be run')
|
||||
}
|
||||
})
|
||||
|
||||
// same thing but synchronous, throws errors
|
||||
var isExe = isexe.sync('some-file-name')
|
||||
|
||||
// treat errors as just "not executable"
|
||||
isexe('maybe-missing-file', { ignoreErrors: true }, callback)
|
||||
var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true })
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `isexe(path, [options], [callback])`
|
||||
|
||||
Check if the path is executable. If no callback provided, and a
|
||||
global `Promise` object is available, then a Promise will be returned.
|
||||
|
||||
Will raise whatever errors may be raised by `fs.stat`, unless
|
||||
`options.ignoreErrors` is set to true.
|
||||
|
||||
### `isexe.sync(path, [options])`
|
||||
|
||||
Same as `isexe` but returns the value and throws any errors raised.
|
||||
|
||||
### Options
|
||||
|
||||
* `ignoreErrors` Treat all errors as "no, this is not executable", but
|
||||
don't raise them.
|
||||
* `uid` Number to use as the user id
|
||||
* `gid` Number to use as the group id
|
||||
* `pathExt` List of path extensions to use instead of `PATHEXT`
|
||||
environment variable on Windows.
|
||||
57
mcp-server/node_modules/isexe/index.js
generated
vendored
57
mcp-server/node_modules/isexe/index.js
generated
vendored
@@ -1,57 +0,0 @@
|
||||
var fs = require('fs')
|
||||
var core
|
||||
if (process.platform === 'win32' || global.TESTING_WINDOWS) {
|
||||
core = require('./windows.js')
|
||||
} else {
|
||||
core = require('./mode.js')
|
||||
}
|
||||
|
||||
module.exports = isexe
|
||||
isexe.sync = sync
|
||||
|
||||
function isexe (path, options, cb) {
|
||||
if (typeof options === 'function') {
|
||||
cb = options
|
||||
options = {}
|
||||
}
|
||||
|
||||
if (!cb) {
|
||||
if (typeof Promise !== 'function') {
|
||||
throw new TypeError('callback not provided')
|
||||
}
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
isexe(path, options || {}, function (er, is) {
|
||||
if (er) {
|
||||
reject(er)
|
||||
} else {
|
||||
resolve(is)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
core(path, options || {}, function (er, is) {
|
||||
// ignore EACCES because that just means we aren't allowed to run it
|
||||
if (er) {
|
||||
if (er.code === 'EACCES' || options && options.ignoreErrors) {
|
||||
er = null
|
||||
is = false
|
||||
}
|
||||
}
|
||||
cb(er, is)
|
||||
})
|
||||
}
|
||||
|
||||
function sync (path, options) {
|
||||
// my kingdom for a filtered catch
|
||||
try {
|
||||
return core.sync(path, options || {})
|
||||
} catch (er) {
|
||||
if (options && options.ignoreErrors || er.code === 'EACCES') {
|
||||
return false
|
||||
} else {
|
||||
throw er
|
||||
}
|
||||
}
|
||||
}
|
||||
41
mcp-server/node_modules/isexe/mode.js
generated
vendored
41
mcp-server/node_modules/isexe/mode.js
generated
vendored
@@ -1,41 +0,0 @@
|
||||
module.exports = isexe
|
||||
isexe.sync = sync
|
||||
|
||||
var fs = require('fs')
|
||||
|
||||
function isexe (path, options, cb) {
|
||||
fs.stat(path, function (er, stat) {
|
||||
cb(er, er ? false : checkStat(stat, options))
|
||||
})
|
||||
}
|
||||
|
||||
function sync (path, options) {
|
||||
return checkStat(fs.statSync(path), options)
|
||||
}
|
||||
|
||||
function checkStat (stat, options) {
|
||||
return stat.isFile() && checkMode(stat, options)
|
||||
}
|
||||
|
||||
function checkMode (stat, options) {
|
||||
var mod = stat.mode
|
||||
var uid = stat.uid
|
||||
var gid = stat.gid
|
||||
|
||||
var myUid = options.uid !== undefined ?
|
||||
options.uid : process.getuid && process.getuid()
|
||||
var myGid = options.gid !== undefined ?
|
||||
options.gid : process.getgid && process.getgid()
|
||||
|
||||
var u = parseInt('100', 8)
|
||||
var g = parseInt('010', 8)
|
||||
var o = parseInt('001', 8)
|
||||
var ug = u | g
|
||||
|
||||
var ret = (mod & o) ||
|
||||
(mod & g) && gid === myGid ||
|
||||
(mod & u) && uid === myUid ||
|
||||
(mod & ug) && myUid === 0
|
||||
|
||||
return ret
|
||||
}
|
||||
31
mcp-server/node_modules/isexe/package.json
generated
vendored
31
mcp-server/node_modules/isexe/package.json
generated
vendored
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"name": "isexe",
|
||||
"version": "2.0.0",
|
||||
"description": "Minimal module to check if a file is executable.",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mkdirp": "^0.5.1",
|
||||
"rimraf": "^2.5.0",
|
||||
"tap": "^10.3.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test/*.js --100",
|
||||
"preversion": "npm test",
|
||||
"postversion": "npm publish",
|
||||
"postpublish": "git push origin --all; git push origin --tags"
|
||||
},
|
||||
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
|
||||
"license": "ISC",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/isaacs/isexe.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"bugs": {
|
||||
"url": "https://github.com/isaacs/isexe/issues"
|
||||
},
|
||||
"homepage": "https://github.com/isaacs/isexe#readme"
|
||||
}
|
||||
221
mcp-server/node_modules/isexe/test/basic.js
generated
vendored
221
mcp-server/node_modules/isexe/test/basic.js
generated
vendored
@@ -1,221 +0,0 @@
|
||||
var t = require('tap')
|
||||
var fs = require('fs')
|
||||
var path = require('path')
|
||||
var fixture = path.resolve(__dirname, 'fixtures')
|
||||
var meow = fixture + '/meow.cat'
|
||||
var mine = fixture + '/mine.cat'
|
||||
var ours = fixture + '/ours.cat'
|
||||
var fail = fixture + '/fail.false'
|
||||
var noent = fixture + '/enoent.exe'
|
||||
var mkdirp = require('mkdirp')
|
||||
var rimraf = require('rimraf')
|
||||
|
||||
var isWindows = process.platform === 'win32'
|
||||
var hasAccess = typeof fs.access === 'function'
|
||||
var winSkip = isWindows && 'windows'
|
||||
var accessSkip = !hasAccess && 'no fs.access function'
|
||||
var hasPromise = typeof Promise === 'function'
|
||||
var promiseSkip = !hasPromise && 'no global Promise'
|
||||
|
||||
function reset () {
|
||||
delete require.cache[require.resolve('../')]
|
||||
return require('../')
|
||||
}
|
||||
|
||||
t.test('setup fixtures', function (t) {
|
||||
rimraf.sync(fixture)
|
||||
mkdirp.sync(fixture)
|
||||
fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n')
|
||||
fs.chmodSync(meow, parseInt('0755', 8))
|
||||
fs.writeFileSync(fail, '#!/usr/bin/env false\n')
|
||||
fs.chmodSync(fail, parseInt('0644', 8))
|
||||
fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n')
|
||||
fs.chmodSync(mine, parseInt('0744', 8))
|
||||
fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n')
|
||||
fs.chmodSync(ours, parseInt('0754', 8))
|
||||
t.end()
|
||||
})
|
||||
|
||||
t.test('promise', { skip: promiseSkip }, function (t) {
|
||||
var isexe = reset()
|
||||
t.test('meow async', function (t) {
|
||||
isexe(meow).then(function (is) {
|
||||
t.ok(is)
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
t.test('fail async', function (t) {
|
||||
isexe(fail).then(function (is) {
|
||||
t.notOk(is)
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
t.test('noent async', function (t) {
|
||||
isexe(noent).catch(function (er) {
|
||||
t.ok(er)
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
t.test('noent ignore async', function (t) {
|
||||
isexe(noent, { ignoreErrors: true }).then(function (is) {
|
||||
t.notOk(is)
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
t.end()
|
||||
})
|
||||
|
||||
t.test('no promise', function (t) {
|
||||
global.Promise = null
|
||||
var isexe = reset()
|
||||
t.throws('try to meow a promise', function () {
|
||||
isexe(meow)
|
||||
})
|
||||
t.end()
|
||||
})
|
||||
|
||||
t.test('access', { skip: accessSkip || winSkip }, function (t) {
|
||||
runTest(t)
|
||||
})
|
||||
|
||||
t.test('mode', { skip: winSkip }, function (t) {
|
||||
delete fs.access
|
||||
delete fs.accessSync
|
||||
var isexe = reset()
|
||||
t.ok(isexe.sync(ours, { uid: 0, gid: 0 }))
|
||||
t.ok(isexe.sync(mine, { uid: 0, gid: 0 }))
|
||||
runTest(t)
|
||||
})
|
||||
|
||||
t.test('windows', function (t) {
|
||||
global.TESTING_WINDOWS = true
|
||||
var pathExt = '.EXE;.CAT;.CMD;.COM'
|
||||
t.test('pathExt option', function (t) {
|
||||
runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' })
|
||||
})
|
||||
t.test('pathExt env', function (t) {
|
||||
process.env.PATHEXT = pathExt
|
||||
runTest(t)
|
||||
})
|
||||
t.test('no pathExt', function (t) {
|
||||
// with a pathExt of '', any filename is fine.
|
||||
// so the "fail" one would still pass.
|
||||
runTest(t, { pathExt: '', skipFail: true })
|
||||
})
|
||||
t.test('pathext with empty entry', function (t) {
|
||||
// with a pathExt of '', any filename is fine.
|
||||
// so the "fail" one would still pass.
|
||||
runTest(t, { pathExt: ';' + pathExt, skipFail: true })
|
||||
})
|
||||
t.end()
|
||||
})
|
||||
|
||||
t.test('cleanup', function (t) {
|
||||
rimraf.sync(fixture)
|
||||
t.end()
|
||||
})
|
||||
|
||||
function runTest (t, options) {
|
||||
var isexe = reset()
|
||||
|
||||
var optionsIgnore = Object.create(options || {})
|
||||
optionsIgnore.ignoreErrors = true
|
||||
|
||||
if (!options || !options.skipFail) {
|
||||
t.notOk(isexe.sync(fail, options))
|
||||
}
|
||||
t.notOk(isexe.sync(noent, optionsIgnore))
|
||||
if (!options) {
|
||||
t.ok(isexe.sync(meow))
|
||||
} else {
|
||||
t.ok(isexe.sync(meow, options))
|
||||
}
|
||||
|
||||
t.ok(isexe.sync(mine, options))
|
||||
t.ok(isexe.sync(ours, options))
|
||||
t.throws(function () {
|
||||
isexe.sync(noent, options)
|
||||
})
|
||||
|
||||
t.test('meow async', function (t) {
|
||||
if (!options) {
|
||||
isexe(meow, function (er, is) {
|
||||
if (er) {
|
||||
throw er
|
||||
}
|
||||
t.ok(is)
|
||||
t.end()
|
||||
})
|
||||
} else {
|
||||
isexe(meow, options, function (er, is) {
|
||||
if (er) {
|
||||
throw er
|
||||
}
|
||||
t.ok(is)
|
||||
t.end()
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
t.test('mine async', function (t) {
|
||||
isexe(mine, options, function (er, is) {
|
||||
if (er) {
|
||||
throw er
|
||||
}
|
||||
t.ok(is)
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
|
||||
t.test('ours async', function (t) {
|
||||
isexe(ours, options, function (er, is) {
|
||||
if (er) {
|
||||
throw er
|
||||
}
|
||||
t.ok(is)
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
|
||||
if (!options || !options.skipFail) {
|
||||
t.test('fail async', function (t) {
|
||||
isexe(fail, options, function (er, is) {
|
||||
if (er) {
|
||||
throw er
|
||||
}
|
||||
t.notOk(is)
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
t.test('noent async', function (t) {
|
||||
isexe(noent, options, function (er, is) {
|
||||
t.ok(er)
|
||||
t.notOk(is)
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
|
||||
t.test('noent ignore async', function (t) {
|
||||
isexe(noent, optionsIgnore, function (er, is) {
|
||||
if (er) {
|
||||
throw er
|
||||
}
|
||||
t.notOk(is)
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
|
||||
t.test('directory is not executable', function (t) {
|
||||
isexe(__dirname, options, function (er, is) {
|
||||
if (er) {
|
||||
throw er
|
||||
}
|
||||
t.notOk(is)
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
|
||||
t.end()
|
||||
}
|
||||
42
mcp-server/node_modules/isexe/windows.js
generated
vendored
42
mcp-server/node_modules/isexe/windows.js
generated
vendored
@@ -1,42 +0,0 @@
|
||||
module.exports = isexe
|
||||
isexe.sync = sync
|
||||
|
||||
var fs = require('fs')
|
||||
|
||||
function checkPathExt (path, options) {
|
||||
var pathext = options.pathExt !== undefined ?
|
||||
options.pathExt : process.env.PATHEXT
|
||||
|
||||
if (!pathext) {
|
||||
return true
|
||||
}
|
||||
|
||||
pathext = pathext.split(';')
|
||||
if (pathext.indexOf('') !== -1) {
|
||||
return true
|
||||
}
|
||||
for (var i = 0; i < pathext.length; i++) {
|
||||
var p = pathext[i].toLowerCase()
|
||||
if (p && path.substr(-p.length).toLowerCase() === p) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
function checkStat (stat, path, options) {
|
||||
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
||||
return false
|
||||
}
|
||||
return checkPathExt(path, options)
|
||||
}
|
||||
|
||||
function isexe (path, options, cb) {
|
||||
fs.stat(path, function (er, stat) {
|
||||
cb(er, er ? false : checkStat(stat, path, options))
|
||||
})
|
||||
}
|
||||
|
||||
function sync (path, options) {
|
||||
return checkStat(fs.statSync(path), path, options)
|
||||
}
|
||||
21
mcp-server/node_modules/jose/LICENSE.md
generated
vendored
21
mcp-server/node_modules/jose/LICENSE.md
generated
vendored
@@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 Filip Skokan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
153
mcp-server/node_modules/jose/README.md
generated
vendored
153
mcp-server/node_modules/jose/README.md
generated
vendored
@@ -1,153 +0,0 @@
|
||||
# jose
|
||||
|
||||
`jose` is a JavaScript module for JSON Object Signing and Encryption, providing support for JSON Web Tokens (JWT), JSON Web Signature (JWS), JSON Web Encryption (JWE), JSON Web Key (JWK), JSON Web Key Set (JWKS), and more. The module is designed to work across various Web-interoperable runtimes including Node.js, browsers, Cloudflare Workers, Deno, Bun, and others.
|
||||
|
||||
## Sponsor
|
||||
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/panva/jose/HEAD/sponsor/Auth0byOkta_dark.png">
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/panva/jose/HEAD/sponsor/Auth0byOkta_light.png">
|
||||
<img height="65" align="left" alt="Auth0 by Okta" src="https://raw.githubusercontent.com/panva/jose/HEAD/sponsor/Auth0byOkta_light.png">
|
||||
</picture>
|
||||
|
||||
If you want to quickly add JWT authentication to JavaScript apps, feel free to check out Auth0's JavaScript SDK and free plan. [Create an Auth0 account; it's free!][sponsor-auth0]<br><br>
|
||||
|
||||
## [💗 Help the project](https://github.com/sponsors/panva)
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
## Dependencies: 0
|
||||
|
||||
`jose` has no dependencies and it exports tree-shakeable ESM[^cjs].
|
||||
|
||||
## Documentation
|
||||
|
||||
`jose` is distributed via [npmjs.com](https://www.npmjs.com/package/jose), [jsr.io](https://jsr.io/@panva/jose), [jsdelivr.com](https://www.jsdelivr.com/package/npm/jose), and [github.com](https://github.com/panva/jose).
|
||||
|
||||
**`example`** ESM import[^cjs]
|
||||
|
||||
```js
|
||||
import * as jose from 'jose'
|
||||
```
|
||||
|
||||
### JSON Web Tokens (JWT)
|
||||
|
||||
The `jose` module supports JSON Web Tokens (JWT) and provides functionality for signing and verifying tokens, as well as their JWT Claims Set validation.
|
||||
|
||||
- [JWT Claims Set Validation & Signature Verification](docs/jwt/verify/functions/jwtVerify.md) using the `jwtVerify` function
|
||||
- [Using a remote JSON Web Key Set (JWKS)](docs/jwks/remote/functions/createRemoteJWKSet.md)
|
||||
- [Using a local JSON Web Key Set (JWKS)](docs/jwks/local/functions/createLocalJWKSet.md)
|
||||
- [Signing](docs/jwt/sign/classes/SignJWT.md) using the `SignJWT` class
|
||||
- Utility functions
|
||||
- [Decoding Token's Protected Header](docs/util/decode_protected_header/functions/decodeProtectedHeader.md)
|
||||
- [Decoding JWT Claims Set](docs/util/decode_jwt/functions/decodeJwt.md) prior to its validation
|
||||
|
||||
### Encrypted JSON Web Tokens
|
||||
|
||||
The `jose` module supports encrypted JSON Web Tokens and provides functionality for encrypting and decrypting tokens, as well as their JWT Claims Set validation.
|
||||
|
||||
- [Decryption & JWT Claims Set Validation](docs/jwt/decrypt/functions/jwtDecrypt.md) using the `jwtDecrypt` function
|
||||
- [Encryption](docs/jwt/encrypt/classes/EncryptJWT.md) using the `EncryptJWT` class
|
||||
- Utility functions
|
||||
- [Decoding Token's Protected Header](docs/util/decode_protected_header/functions/decodeProtectedHeader.md)
|
||||
|
||||
### Key Utilities
|
||||
|
||||
The `jose` module supports importing, exporting, and generating keys and secrets in various formats, including PEM formats like SPKI, X.509 certificate, and PKCS #8, as well as JSON Web Key (JWK).
|
||||
|
||||
- Key Import Functions
|
||||
- [JWK Import](docs/key/import/functions/importJWK.md)
|
||||
- [Public Key Import (SPKI)](docs/key/import/functions/importSPKI.md)
|
||||
- [Public Key Import (X.509 Certificate)](docs/key/import/functions/importX509.md)
|
||||
- [Private Key Import (PKCS #8)](docs/key/import/functions/importPKCS8.md)
|
||||
- Key and Secret Generation Functions
|
||||
- [Asymmetric Key Pair Generation](docs/key/generate_key_pair/functions/generateKeyPair.md)
|
||||
- [Symmetric Secret Generation](docs/key/generate_secret/functions/generateSecret.md)
|
||||
- Key Export Functions
|
||||
- [JWK Export](docs/key/export/functions/exportJWK.md)
|
||||
- [Private Key Export](docs/key/export/functions/exportPKCS8.md)
|
||||
- [Public Key Export](docs/key/export/functions/exportSPKI.md)
|
||||
|
||||
### JSON Web Signature (JWS)
|
||||
|
||||
The `jose` module supports signing and verification of JWS messages with arbitrary payloads in Compact, Flattened JSON, and General JSON serialization syntaxes.
|
||||
|
||||
- Signing - [Compact](docs/jws/compact/sign/classes/CompactSign.md), [Flattened JSON](docs/jws/flattened/sign/classes/FlattenedSign.md), [General JSON](docs/jws/general/sign/classes/GeneralSign.md)
|
||||
- Verification - [Compact](docs/jws/compact/verify/functions/compactVerify.md), [Flattened JSON](docs/jws/flattened/verify/functions/flattenedVerify.md), [General JSON](docs/jws/general/verify/functions/generalVerify.md)
|
||||
- [Using a remote JSON Web Key Set (JWKS)](docs/jwks/remote/functions/createRemoteJWKSet.md)
|
||||
- [Using a local JSON Web Key Set (JWKS)](docs/jwks/local/functions/createLocalJWKSet.md)
|
||||
- Utility functions
|
||||
- [Decoding Token's Protected Header](docs/util/decode_protected_header/functions/decodeProtectedHeader.md)
|
||||
|
||||
### JSON Web Encryption (JWE)
|
||||
|
||||
The `jose` module supports encryption and decryption of JWE messages with arbitrary plaintext in Compact, Flattened JSON, and General JSON serialization syntaxes.
|
||||
|
||||
- Encryption - [Compact](docs/jwe/compact/encrypt/classes/CompactEncrypt.md), [Flattened JSON](docs/jwe/flattened/encrypt/classes/FlattenedEncrypt.md), [General JSON](docs/jwe/general/encrypt/classes/GeneralEncrypt.md)
|
||||
- Decryption - [Compact](docs/jwe/compact/decrypt/functions/compactDecrypt.md), [Flattened JSON](docs/jwe/flattened/decrypt/functions/flattenedDecrypt.md), [General JSON](docs/jwe/general/decrypt/functions/generalDecrypt.md)
|
||||
- Utility functions
|
||||
- [Decoding Token's Protected Header](docs/util/decode_protected_header/functions/decodeProtectedHeader.md)
|
||||
|
||||
### Other
|
||||
|
||||
The following are additional features and utilities provided by the `jose` module:
|
||||
|
||||
- [Calculating JWK Thumbprint](docs/jwk/thumbprint/functions/calculateJwkThumbprint.md)
|
||||
- [Calculating JWK Thumbprint URI](docs/jwk/thumbprint/functions/calculateJwkThumbprintUri.md)
|
||||
- [Verification using a JWK Embedded in a JWS Header](docs/jwk/embedded/functions/EmbeddedJWK.md)
|
||||
- [Unsecured JWT](docs/jwt/unsecured/classes/UnsecuredJWT.md)
|
||||
- [JOSE Errors](docs/util/errors/README.md)
|
||||
|
||||
## Supported Runtimes
|
||||
|
||||
The `jose` module is compatible with JavaScript runtimes that support the utilized Web API globals and standard built-in objects or are Node.js.
|
||||
|
||||
The following runtimes are supported _(this is not an exhaustive list)_:
|
||||
|
||||
- [Bun](https://github.com/panva/jose/issues/471)
|
||||
- [Browsers](https://github.com/panva/jose/issues/263)
|
||||
- [Cloudflare Workers](https://github.com/panva/jose/issues/265)
|
||||
- [Deno](https://github.com/panva/jose/issues/266)
|
||||
- [Electron](https://github.com/panva/jose/issues/264)
|
||||
- [Node.js](https://github.com/panva/jose/issues/262)
|
||||
|
||||
Please note that certain algorithms may not be available depending on the runtime used. You can find a list of available algorithms for each runtime in the specific issue links provided above.
|
||||
|
||||
## Supported Versions
|
||||
|
||||
| Version | Security Fixes 🔑 | Other Bug Fixes 🐞 | New Features ⭐ | Runtime and Module type |
|
||||
| ----------------------------------------------- | ----------------- | ------------------ | --------------- | ------------------------------- |
|
||||
| [v6.x](https://github.com/panva/jose/tree/v6.x) | [Security Policy] | ✅ | ✅ | Universal[^universal] ESM[^cjs] |
|
||||
| [v5.x](https://github.com/panva/jose/tree/v5.x) | [Security Policy] | ❌ | ❌ | Universal[^universal] CJS + ESM |
|
||||
| [v4.x](https://github.com/panva/jose/tree/v4.x) | [Security Policy] | ❌ | ❌ | Universal[^universal] CJS + ESM |
|
||||
| [v2.x](https://github.com/panva/jose/tree/v2.x) | [Security Policy] | ❌ | ❌ | Node.js CJS |
|
||||
|
||||
## Specifications
|
||||
|
||||
<details>
|
||||
<summary>Details</summary>
|
||||
|
||||
- JSON Web Signature (JWS) - [RFC7515](https://www.rfc-editor.org/rfc/rfc7515)
|
||||
- JSON Web Encryption (JWE) - [RFC7516](https://www.rfc-editor.org/rfc/rfc7516)
|
||||
- JSON Web Key (JWK) - [RFC7517](https://www.rfc-editor.org/rfc/rfc7517)
|
||||
- JSON Web Algorithms (JWA) - [RFC7518](https://www.rfc-editor.org/rfc/rfc7518)
|
||||
- JSON Web Token (JWT) - [RFC7519](https://www.rfc-editor.org/rfc/rfc7519)
|
||||
- JSON Web Key Thumbprint - [RFC7638](https://www.rfc-editor.org/rfc/rfc7638)
|
||||
- JSON Web Key Thumbprint URI - [RFC9278](https://www.rfc-editor.org/rfc/rfc9278)
|
||||
- JWS Unencoded Payload Option - [RFC7797](https://www.rfc-editor.org/rfc/rfc7797)
|
||||
- CFRG Elliptic Curve ECDH and Signatures - [RFC8037](https://www.rfc-editor.org/rfc/rfc8037)
|
||||
- Fully-Specified Algorithms for JOSE - [RFC9864](https://www.rfc-editor.org/rfc/rfc9864.html)
|
||||
- ML-DSA for JOSE - [draft-ietf-cose-dilithium-10](https://www.ietf.org/archive/id/draft-ietf-cose-dilithium-10.html)
|
||||
|
||||
The algorithm implementations in `jose` have been tested using test vectors from their respective specifications as well as [RFC7520](https://www.rfc-editor.org/rfc/rfc7520).
|
||||
|
||||
</details>
|
||||
|
||||
[sponsor-auth0]: https://a0.to/signup/panva
|
||||
[WebCryptoAPI]: https://w3c.github.io/webcrypto/
|
||||
[Fetch API]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
|
||||
[Security Policy]: https://github.com/panva/jose/security/policy
|
||||
|
||||
[^cjs]: CJS style `let jose = require('jose')` is possible in Node.js versions where the `require(esm)` feature is enabled by default (^20.19.0 || ^22.12.0 || >= 23.0.0).
|
||||
|
||||
[^universal]: Assumes runtime support of [WebCryptoAPI][] and [Fetch API][]
|
||||
55
mcp-server/node_modules/jose/dist/types/index.d.ts
generated
vendored
55
mcp-server/node_modules/jose/dist/types/index.d.ts
generated
vendored
@@ -1,55 +0,0 @@
|
||||
export { compactDecrypt } from './jwe/compact/decrypt.js';
|
||||
export type { CompactDecryptGetKey } from './jwe/compact/decrypt.js';
|
||||
export { flattenedDecrypt } from './jwe/flattened/decrypt.js';
|
||||
export type { FlattenedDecryptGetKey } from './jwe/flattened/decrypt.js';
|
||||
export { generalDecrypt } from './jwe/general/decrypt.js';
|
||||
export type { GeneralDecryptGetKey } from './jwe/general/decrypt.js';
|
||||
export { GeneralEncrypt } from './jwe/general/encrypt.js';
|
||||
export type { Recipient } from './jwe/general/encrypt.js';
|
||||
export { compactVerify } from './jws/compact/verify.js';
|
||||
export type { CompactVerifyGetKey } from './jws/compact/verify.js';
|
||||
export { flattenedVerify } from './jws/flattened/verify.js';
|
||||
export type { FlattenedVerifyGetKey } from './jws/flattened/verify.js';
|
||||
export { generalVerify } from './jws/general/verify.js';
|
||||
export type { GeneralVerifyGetKey } from './jws/general/verify.js';
|
||||
export { jwtVerify } from './jwt/verify.js';
|
||||
export type { JWTVerifyOptions, JWTVerifyGetKey } from './jwt/verify.js';
|
||||
export { jwtDecrypt } from './jwt/decrypt.js';
|
||||
export type { JWTDecryptOptions, JWTDecryptGetKey } from './jwt/decrypt.js';
|
||||
export { CompactEncrypt } from './jwe/compact/encrypt.js';
|
||||
export { FlattenedEncrypt } from './jwe/flattened/encrypt.js';
|
||||
export { CompactSign } from './jws/compact/sign.js';
|
||||
export { FlattenedSign } from './jws/flattened/sign.js';
|
||||
export { GeneralSign } from './jws/general/sign.js';
|
||||
export type { Signature } from './jws/general/sign.js';
|
||||
export { SignJWT } from './jwt/sign.js';
|
||||
export { EncryptJWT } from './jwt/encrypt.js';
|
||||
export { calculateJwkThumbprint, calculateJwkThumbprintUri } from './jwk/thumbprint.js';
|
||||
export { EmbeddedJWK } from './jwk/embedded.js';
|
||||
export { createLocalJWKSet } from './jwks/local.js';
|
||||
export { createRemoteJWKSet, jwksCache, customFetch } from './jwks/remote.js';
|
||||
export type { RemoteJWKSetOptions, JWKSCacheInput, ExportedJWKSCache, FetchImplementation, } from './jwks/remote.js';
|
||||
export { UnsecuredJWT } from './jwt/unsecured.js';
|
||||
export type { UnsecuredResult } from './jwt/unsecured.js';
|
||||
export { exportPKCS8, exportSPKI, exportJWK } from './key/export.js';
|
||||
export { importSPKI, importPKCS8, importX509, importJWK } from './key/import.js';
|
||||
export type { KeyImportOptions } from './key/import.js';
|
||||
export { decodeProtectedHeader } from './util/decode_protected_header.js';
|
||||
export { decodeJwt } from './util/decode_jwt.js';
|
||||
export type { ProtectedHeaderParameters } from './util/decode_protected_header.js';
|
||||
import * as errors from './util/errors.js';
|
||||
export { errors };
|
||||
export { generateKeyPair } from './key/generate_key_pair.js';
|
||||
export type { GenerateKeyPairResult, GenerateKeyPairOptions } from './key/generate_key_pair.js';
|
||||
export { generateSecret } from './key/generate_secret.js';
|
||||
export type { GenerateSecretOptions } from './key/generate_secret.js';
|
||||
import * as base64url from './util/base64url.js';
|
||||
export { base64url };
|
||||
export type { CompactDecryptResult, CompactJWEHeaderParameters, CompactJWSHeaderParameters, CompactVerifyResult, CritOption, CryptoKey, DecryptOptions, EncryptOptions, FlattenedDecryptResult, FlattenedJWE, FlattenedJWS, FlattenedJWSInput, FlattenedVerifyResult, GeneralDecryptResult, GeneralJWE, GeneralJWS, GeneralJWSInput, GeneralVerifyResult, GetKeyFunction, JoseHeaderParameters, JSONWebKeySet, JWEHeaderParameters, JWEKeyManagementHeaderParameters, JWK_EC_Private, JWK_EC_Public, JWK_oct, JWK_OKP_Private, JWK_OKP_Public, JWK_RSA_Private, JWK_RSA_Public, JWK, JWKParameters, JWSHeaderParameters, JWTClaimVerificationOptions, JWTDecryptResult, JWTHeaderParameters, JWTPayload, JWTVerifyResult, KeyObject, ProduceJWT, ResolvedKey, SignOptions, VerifyOptions, } from './types.d.ts';
|
||||
/**
|
||||
* In prior releases this indicated whether a Node.js-specific build was loaded, this is now fixed
|
||||
* to `"WebCryptoAPI"`
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
export declare const cryptoRuntime = "WebCryptoAPI";
|
||||
31
mcp-server/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts
generated
vendored
31
mcp-server/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts
generated
vendored
@@ -1,31 +0,0 @@
|
||||
/**
|
||||
* Decrypting JSON Web Encryption (JWE) in Compact Serialization
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../../types.d.ts';
|
||||
/**
|
||||
* Interface for Compact JWE Decryption dynamic key resolution. No token components have been
|
||||
* verified at the time of this function call.
|
||||
*/
|
||||
export interface CompactDecryptGetKey extends types.GetKeyFunction<types.CompactJWEHeaderParameters, types.FlattenedJWE> {
|
||||
}
|
||||
/**
|
||||
* Decrypts a Compact JWE.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/jwe/compact/decrypt'`.
|
||||
*
|
||||
* @param jwe Compact JWE.
|
||||
* @param key Private Key or Secret to decrypt the JWE with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
|
||||
* @param options JWE Decryption options.
|
||||
*/
|
||||
export declare function compactDecrypt(jwe: string | Uint8Array, key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.DecryptOptions): Promise<types.CompactDecryptResult>;
|
||||
/**
|
||||
* @param jwe Compact JWE.
|
||||
* @param getKey Function resolving Private Key or Secret to decrypt the JWE with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
|
||||
* @param options JWE Decryption options.
|
||||
*/
|
||||
export declare function compactDecrypt(jwe: string | Uint8Array, getKey: CompactDecryptGetKey, options?: types.DecryptOptions): Promise<types.CompactDecryptResult & types.ResolvedKey>;
|
||||
65
mcp-server/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts
generated
vendored
65
mcp-server/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts
generated
vendored
@@ -1,65 +0,0 @@
|
||||
/**
|
||||
* Encrypting JSON Web Encryption (JWE) in Compact Serialization
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../../types.d.ts';
|
||||
/**
|
||||
* The CompactEncrypt class is used to build and encrypt Compact JWE strings.
|
||||
*
|
||||
* This class is exported (as a named export) from the main `'jose'` module entry point as well as
|
||||
* from its subpath export `'jose/jwe/compact/encrypt'`.
|
||||
*
|
||||
*/
|
||||
export declare class CompactEncrypt {
|
||||
#private;
|
||||
/**
|
||||
* {@link CompactEncrypt} constructor
|
||||
*
|
||||
* @param plaintext Binary representation of the plaintext to encrypt.
|
||||
*/
|
||||
constructor(plaintext: Uint8Array);
|
||||
/**
|
||||
* Sets a content encryption key to use, by default a random suitable one is generated for the JWE
|
||||
* enc" (Encryption Algorithm) Header Parameter.
|
||||
*
|
||||
* @deprecated You should not use this method. It is only really intended for test and vector
|
||||
* validation purposes.
|
||||
*
|
||||
* @param cek JWE Content Encryption Key.
|
||||
*/
|
||||
setContentEncryptionKey(cek: Uint8Array): this;
|
||||
/**
|
||||
* Sets the JWE Initialization Vector to use for content encryption, by default a random suitable
|
||||
* one is generated for the JWE enc" (Encryption Algorithm) Header Parameter.
|
||||
*
|
||||
* @deprecated You should not use this method. It is only really intended for test and vector
|
||||
* validation purposes.
|
||||
*
|
||||
* @param iv JWE Initialization Vector.
|
||||
*/
|
||||
setInitializationVector(iv: Uint8Array): this;
|
||||
/**
|
||||
* Sets the JWE Protected Header on the CompactEncrypt object.
|
||||
*
|
||||
* @param protectedHeader JWE Protected Header object.
|
||||
*/
|
||||
setProtectedHeader(protectedHeader: types.CompactJWEHeaderParameters): this;
|
||||
/**
|
||||
* Sets the JWE Key Management parameters to be used when encrypting.
|
||||
*
|
||||
* (ECDH-ES) Use of this method is needed for ECDH based algorithms to set the "apu" (Agreement
|
||||
* PartyUInfo) or "apv" (Agreement PartyVInfo) parameters.
|
||||
*
|
||||
* @param parameters JWE Key Management parameters.
|
||||
*/
|
||||
setKeyManagementParameters(parameters: types.JWEKeyManagementHeaderParameters): this;
|
||||
/**
|
||||
* Encrypts and resolves the value of the Compact JWE string.
|
||||
*
|
||||
* @param key Public Key or Secret to encrypt the JWE with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
|
||||
* @param options JWE Encryption options.
|
||||
*/
|
||||
encrypt(key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.EncryptOptions): Promise<string>;
|
||||
}
|
||||
31
mcp-server/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts
generated
vendored
31
mcp-server/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts
generated
vendored
@@ -1,31 +0,0 @@
|
||||
/**
|
||||
* Decrypting JSON Web Encryption (JWE) in Flattened JSON Serialization
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../../types.d.ts';
|
||||
/**
|
||||
* Interface for Flattened JWE Decryption dynamic key resolution. No token components have been
|
||||
* verified at the time of this function call.
|
||||
*/
|
||||
export interface FlattenedDecryptGetKey extends types.GetKeyFunction<types.JWEHeaderParameters | undefined, types.FlattenedJWE> {
|
||||
}
|
||||
/**
|
||||
* Decrypts a Flattened JWE.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/jwe/flattened/decrypt'`.
|
||||
*
|
||||
* @param jwe Flattened JWE.
|
||||
* @param key Private Key or Secret to decrypt the JWE with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
|
||||
* @param options JWE Decryption options.
|
||||
*/
|
||||
export declare function flattenedDecrypt(jwe: types.FlattenedJWE, key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.DecryptOptions): Promise<types.FlattenedDecryptResult>;
|
||||
/**
|
||||
* @param jwe Flattened JWE.
|
||||
* @param getKey Function resolving Private Key or Secret to decrypt the JWE with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
|
||||
* @param options JWE Decryption options.
|
||||
*/
|
||||
export declare function flattenedDecrypt(jwe: types.FlattenedJWE, getKey: FlattenedDecryptGetKey, options?: types.DecryptOptions): Promise<types.FlattenedDecryptResult & types.ResolvedKey>;
|
||||
83
mcp-server/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts
generated
vendored
83
mcp-server/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts
generated
vendored
@@ -1,83 +0,0 @@
|
||||
/**
|
||||
* Encrypting JSON Web Encryption (JWE) in Flattened JSON Serialization
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../../types.d.ts';
|
||||
/**
|
||||
* The FlattenedEncrypt class is used to build and encrypt Flattened JWE objects.
|
||||
*
|
||||
* This class is exported (as a named export) from the main `'jose'` module entry point as well as
|
||||
* from its subpath export `'jose/jwe/flattened/encrypt'`.
|
||||
*
|
||||
*/
|
||||
export declare class FlattenedEncrypt {
|
||||
#private;
|
||||
/**
|
||||
* {@link FlattenedEncrypt} constructor
|
||||
*
|
||||
* @param plaintext Binary representation of the plaintext to encrypt.
|
||||
*/
|
||||
constructor(plaintext: Uint8Array);
|
||||
/**
|
||||
* Sets the JWE Key Management parameters to be used when encrypting.
|
||||
*
|
||||
* (ECDH-ES) Use of this method is needed for ECDH based algorithms to set the "apu" (Agreement
|
||||
* PartyUInfo) or "apv" (Agreement PartyVInfo) parameters.
|
||||
*
|
||||
* @param parameters JWE Key Management parameters.
|
||||
*/
|
||||
setKeyManagementParameters(parameters: types.JWEKeyManagementHeaderParameters): this;
|
||||
/**
|
||||
* Sets the JWE Protected Header on the FlattenedEncrypt object.
|
||||
*
|
||||
* @param protectedHeader JWE Protected Header.
|
||||
*/
|
||||
setProtectedHeader(protectedHeader: types.JWEHeaderParameters): this;
|
||||
/**
|
||||
* Sets the JWE Shared Unprotected Header on the FlattenedEncrypt object.
|
||||
*
|
||||
* @param sharedUnprotectedHeader JWE Shared Unprotected Header.
|
||||
*/
|
||||
setSharedUnprotectedHeader(sharedUnprotectedHeader: types.JWEHeaderParameters): this;
|
||||
/**
|
||||
* Sets the JWE Per-Recipient Unprotected Header on the FlattenedEncrypt object.
|
||||
*
|
||||
* @param unprotectedHeader JWE Per-Recipient Unprotected Header.
|
||||
*/
|
||||
setUnprotectedHeader(unprotectedHeader: types.JWEHeaderParameters): this;
|
||||
/**
|
||||
* Sets the Additional Authenticated Data on the FlattenedEncrypt object.
|
||||
*
|
||||
* @param aad Additional Authenticated Data.
|
||||
*/
|
||||
setAdditionalAuthenticatedData(aad: Uint8Array): this;
|
||||
/**
|
||||
* Sets a content encryption key to use, by default a random suitable one is generated for the JWE
|
||||
* enc" (Encryption Algorithm) Header Parameter.
|
||||
*
|
||||
* @deprecated You should not use this method. It is only really intended for test and vector
|
||||
* validation purposes.
|
||||
*
|
||||
* @param cek JWE Content Encryption Key.
|
||||
*/
|
||||
setContentEncryptionKey(cek: Uint8Array): this;
|
||||
/**
|
||||
* Sets the JWE Initialization Vector to use for content encryption, by default a random suitable
|
||||
* one is generated for the JWE enc" (Encryption Algorithm) Header Parameter.
|
||||
*
|
||||
* @deprecated You should not use this method. It is only really intended for test and vector
|
||||
* validation purposes.
|
||||
*
|
||||
* @param iv JWE Initialization Vector.
|
||||
*/
|
||||
setInitializationVector(iv: Uint8Array): this;
|
||||
/**
|
||||
* Encrypts and resolves the value of the Flattened JWE object.
|
||||
*
|
||||
* @param key Public Key or Secret to encrypt the JWE with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
|
||||
* @param options JWE Encryption options.
|
||||
*/
|
||||
encrypt(key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.EncryptOptions): Promise<types.FlattenedJWE>;
|
||||
}
|
||||
31
mcp-server/node_modules/jose/dist/types/jwe/general/decrypt.d.ts
generated
vendored
31
mcp-server/node_modules/jose/dist/types/jwe/general/decrypt.d.ts
generated
vendored
@@ -1,31 +0,0 @@
|
||||
/**
|
||||
* Decrypting JSON Web Encryption (JWE) in General JSON Serialization
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../../types.d.ts';
|
||||
/**
|
||||
* Interface for General JWE Decryption dynamic key resolution. No token components have been
|
||||
* verified at the time of this function call.
|
||||
*/
|
||||
export interface GeneralDecryptGetKey extends types.GetKeyFunction<types.JWEHeaderParameters, types.FlattenedJWE> {
|
||||
}
|
||||
/**
|
||||
* Decrypts a General JWE.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/jwe/general/decrypt'`.
|
||||
*
|
||||
* @param jwe General JWE.
|
||||
* @param key Private Key or Secret to decrypt the JWE with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
|
||||
* @param options JWE Decryption options.
|
||||
*/
|
||||
export declare function generalDecrypt(jwe: types.GeneralJWE, key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.DecryptOptions): Promise<types.GeneralDecryptResult>;
|
||||
/**
|
||||
* @param jwe General JWE.
|
||||
* @param getKey Function resolving Private Key or Secret to decrypt the JWE with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
|
||||
* @param options JWE Decryption options.
|
||||
*/
|
||||
export declare function generalDecrypt(jwe: types.GeneralJWE, getKey: GeneralDecryptGetKey, options?: types.DecryptOptions): Promise<types.GeneralDecryptResult & types.ResolvedKey>;
|
||||
74
mcp-server/node_modules/jose/dist/types/jwe/general/encrypt.d.ts
generated
vendored
74
mcp-server/node_modules/jose/dist/types/jwe/general/encrypt.d.ts
generated
vendored
@@ -1,74 +0,0 @@
|
||||
/**
|
||||
* Encrypting JSON Web Encryption (JWE) in General JSON Serialization
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../../types.d.ts';
|
||||
/** Used to build General JWE object's individual recipients. */
|
||||
export interface Recipient {
|
||||
/**
|
||||
* Sets the JWE Per-Recipient Unprotected Header on the Recipient object.
|
||||
*
|
||||
* @param unprotectedHeader JWE Per-Recipient Unprotected Header.
|
||||
*/
|
||||
setUnprotectedHeader(unprotectedHeader: types.JWEHeaderParameters): Recipient;
|
||||
/**
|
||||
* Sets the JWE Key Management parameters to be used when encrypting.
|
||||
*
|
||||
* (ECDH-ES) Use of this method is needed for ECDH based algorithms to set the "apu" (Agreement
|
||||
* PartyUInfo) or "apv" (Agreement PartyVInfo) parameters.
|
||||
*
|
||||
* @param parameters JWE Key Management parameters.
|
||||
*/
|
||||
setKeyManagementParameters(parameters: types.JWEKeyManagementHeaderParameters): Recipient;
|
||||
/** A shorthand for calling addRecipient() on the enclosing {@link GeneralEncrypt} instance */
|
||||
addRecipient(...args: Parameters<GeneralEncrypt['addRecipient']>): Recipient;
|
||||
/** A shorthand for calling encrypt() on the enclosing {@link GeneralEncrypt} instance */
|
||||
encrypt(...args: Parameters<GeneralEncrypt['encrypt']>): Promise<types.GeneralJWE>;
|
||||
/** Returns the enclosing {@link GeneralEncrypt} instance */
|
||||
done(): GeneralEncrypt;
|
||||
}
|
||||
/**
|
||||
* The GeneralEncrypt class is used to build and encrypt General JWE objects.
|
||||
*
|
||||
* This class is exported (as a named export) from the main `'jose'` module entry point as well as
|
||||
* from its subpath export `'jose/jwe/general/encrypt'`.
|
||||
*
|
||||
*/
|
||||
export declare class GeneralEncrypt {
|
||||
#private;
|
||||
/**
|
||||
* {@link GeneralEncrypt} constructor
|
||||
*
|
||||
* @param plaintext Binary representation of the plaintext to encrypt.
|
||||
*/
|
||||
constructor(plaintext: Uint8Array);
|
||||
/**
|
||||
* Adds an additional recipient for the General JWE object.
|
||||
*
|
||||
* @param key Public Key or Secret to encrypt the Content Encryption Key for the recipient with.
|
||||
* See {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
|
||||
* @param options JWE Encryption options.
|
||||
*/
|
||||
addRecipient(key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.CritOption): Recipient;
|
||||
/**
|
||||
* Sets the JWE Protected Header on the GeneralEncrypt object.
|
||||
*
|
||||
* @param protectedHeader JWE Protected Header object.
|
||||
*/
|
||||
setProtectedHeader(protectedHeader: types.JWEHeaderParameters): this;
|
||||
/**
|
||||
* Sets the JWE Shared Unprotected Header on the GeneralEncrypt object.
|
||||
*
|
||||
* @param sharedUnprotectedHeader JWE Shared Unprotected Header object.
|
||||
*/
|
||||
setSharedUnprotectedHeader(sharedUnprotectedHeader: types.JWEHeaderParameters): this;
|
||||
/**
|
||||
* Sets the Additional Authenticated Data on the GeneralEncrypt object.
|
||||
*
|
||||
* @param aad Additional Authenticated Data.
|
||||
*/
|
||||
setAdditionalAuthenticatedData(aad: Uint8Array): this;
|
||||
/** Encrypts and resolves the value of the General JWE object. */
|
||||
encrypt(): Promise<types.GeneralJWE>;
|
||||
}
|
||||
17
mcp-server/node_modules/jose/dist/types/jwk/embedded.d.ts
generated
vendored
17
mcp-server/node_modules/jose/dist/types/jwk/embedded.d.ts
generated
vendored
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* Verification using a JWK Embedded in a JWS Header
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/**
|
||||
* EmbeddedJWK is an implementation of a GetKeyFunction intended to be used with the JWS/JWT verify
|
||||
* operations whenever you need to opt-in to verify signatures with a public key embedded in the
|
||||
* token's "jwk" (JSON Web Key) Header Parameter. It is recommended to combine this with the verify
|
||||
* function's `algorithms` option to define accepted JWS "alg" (Algorithm) Header Parameter values.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/jwk/embedded'`.
|
||||
*
|
||||
*/
|
||||
export declare function EmbeddedJWK(protectedHeader?: types.JWSHeaderParameters, token?: types.FlattenedJWSInput): Promise<types.CryptoKey>;
|
||||
32
mcp-server/node_modules/jose/dist/types/jwk/thumbprint.d.ts
generated
vendored
32
mcp-server/node_modules/jose/dist/types/jwk/thumbprint.d.ts
generated
vendored
@@ -1,32 +0,0 @@
|
||||
/**
|
||||
* JSON Web Key Thumbprint and JSON Web Key Thumbprint URI
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/**
|
||||
* Calculates a base64url-encoded JSON Web Key (JWK) Thumbprint
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/jwk/thumbprint'`.
|
||||
*
|
||||
* @param key Key to calculate the thumbprint for.
|
||||
* @param digestAlgorithm Digest Algorithm to use for calculating the thumbprint. Default is
|
||||
* "sha256".
|
||||
*
|
||||
* @see {@link https://www.rfc-editor.org/rfc/rfc7638 RFC7638}
|
||||
*/
|
||||
export declare function calculateJwkThumbprint(key: types.JWK | types.CryptoKey | types.KeyObject, digestAlgorithm?: 'sha256' | 'sha384' | 'sha512'): Promise<string>;
|
||||
/**
|
||||
* Calculates a JSON Web Key (JWK) Thumbprint URI
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/jwk/thumbprint'`.
|
||||
*
|
||||
* @param key Key to calculate the thumbprint for.
|
||||
* @param digestAlgorithm Digest Algorithm to use for calculating the thumbprint. Default is
|
||||
* "sha256".
|
||||
*
|
||||
* @see {@link https://www.rfc-editor.org/rfc/rfc9278 RFC9278}
|
||||
*/
|
||||
export declare function calculateJwkThumbprintUri(key: types.CryptoKey | types.KeyObject | types.JWK, digestAlgorithm?: 'sha256' | 'sha384' | 'sha512'): Promise<string>;
|
||||
29
mcp-server/node_modules/jose/dist/types/jwks/local.d.ts
generated
vendored
29
mcp-server/node_modules/jose/dist/types/jwks/local.d.ts
generated
vendored
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* Verification using a JSON Web Key Set (JWKS) available locally
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/**
|
||||
* Returns a function that resolves a JWS JOSE Header to a public key object from a locally stored,
|
||||
* or otherwise available, JSON Web Key Set.
|
||||
*
|
||||
* It uses the "alg" (JWS Algorithm) Header Parameter to determine the right JWK "kty" (Key Type),
|
||||
* then proceeds to match the JWK "kid" (Key ID) with one found in the JWS Header Parameters (if
|
||||
* there is one) while also respecting the JWK "use" (Public Key Use) and JWK "key_ops" (Key
|
||||
* Operations) Parameters (if they are present on the JWK).
|
||||
*
|
||||
* Only a single public key must match the selection process. As shown in the example below when
|
||||
* multiple keys get matched it is possible to opt-in to iterate over the matched keys and attempt
|
||||
* verification in an iterative manner.
|
||||
*
|
||||
* > [!NOTE]\
|
||||
* > The function's purpose is to resolve public keys used for verifying signatures and will not work
|
||||
* > for public encryption keys.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/jwks/local'`.
|
||||
*
|
||||
* @param jwks JSON Web Key Set formatted object.
|
||||
*/
|
||||
export declare function createLocalJWKSet(jwks: types.JSONWebKeySet): (protectedHeader?: types.JWSHeaderParameters, token?: types.FlattenedJWSInput) => Promise<types.CryptoKey>;
|
||||
237
mcp-server/node_modules/jose/dist/types/jwks/remote.d.ts
generated
vendored
237
mcp-server/node_modules/jose/dist/types/jwks/remote.d.ts
generated
vendored
@@ -1,237 +0,0 @@
|
||||
/**
|
||||
* Verification using a JSON Web Key Set (JWKS) available on an HTTP(S) URL
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/**
|
||||
* When passed to {@link jwks/remote.createRemoteJWKSet createRemoteJWKSet} this allows the resolver
|
||||
* to make use of advanced fetch configurations, HTTP Proxies, retry on network errors, etc.
|
||||
*
|
||||
* > [!NOTE]\
|
||||
* > Known caveat: Expect Type-related issues when passing the inputs through to fetch-like modules,
|
||||
* > they hardly ever get their typings inline with actual fetch, you should `@ts-expect-error` them.
|
||||
*
|
||||
* import ky from 'ky'
|
||||
*
|
||||
* let logRequest!: (request: Request) => void
|
||||
* let logResponse!: (request: Request, response: Response) => void
|
||||
* let logRetry!: (request: Request, error: Error, retryCount: number) => void
|
||||
*
|
||||
* const JWKS = jose.createRemoteJWKSet(url, {
|
||||
* [jose.customFetch]: (...args) =>
|
||||
* ky(args[0], {
|
||||
* ...args[1],
|
||||
* hooks: {
|
||||
* beforeRequest: [
|
||||
* (request) => {
|
||||
* logRequest(request)
|
||||
* },
|
||||
* ],
|
||||
* beforeRetry: [
|
||||
* ({ request, error, retryCount }) => {
|
||||
* logRetry(request, error, retryCount)
|
||||
* },
|
||||
* ],
|
||||
* afterResponse: [
|
||||
* (request, _, response) => {
|
||||
* logResponse(request, response)
|
||||
* },
|
||||
* ],
|
||||
* },
|
||||
* }),
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
* import * as undici from 'undici'
|
||||
*
|
||||
* // see https://undici.nodejs.org/#/docs/api/EnvHttpProxyAgent
|
||||
* let envHttpProxyAgent = new undici.EnvHttpProxyAgent()
|
||||
*
|
||||
* // @ts-ignore
|
||||
* const JWKS = jose.createRemoteJWKSet(url, {
|
||||
* [jose.customFetch]: (...args) => {
|
||||
* // @ts-ignore
|
||||
* return undici.fetch(args[0], { ...args[1], dispatcher: envHttpProxyAgent }) // prettier-ignore
|
||||
* },
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
* import * as undici from 'undici'
|
||||
*
|
||||
* // see https://undici.nodejs.org/#/docs/api/RetryAgent
|
||||
* let retryAgent = new undici.RetryAgent(new undici.Agent(), {
|
||||
* statusCodes: [],
|
||||
* errorCodes: [
|
||||
* 'ECONNRESET',
|
||||
* 'ECONNREFUSED',
|
||||
* 'ENOTFOUND',
|
||||
* 'ENETDOWN',
|
||||
* 'ENETUNREACH',
|
||||
* 'EHOSTDOWN',
|
||||
* 'UND_ERR_SOCKET',
|
||||
* ],
|
||||
* })
|
||||
*
|
||||
* // @ts-ignore
|
||||
* const JWKS = jose.createRemoteJWKSet(url, {
|
||||
* [jose.customFetch]: (...args) => {
|
||||
* // @ts-ignore
|
||||
* return undici.fetch(args[0], { ...args[1], dispatcher: retryAgent }) // prettier-ignore
|
||||
* },
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
* import * as undici from 'undici'
|
||||
*
|
||||
* // see https://undici.nodejs.org/#/docs/api/MockAgent
|
||||
* let mockAgent = new undici.MockAgent()
|
||||
* mockAgent.disableNetConnect()
|
||||
*
|
||||
* // @ts-ignore
|
||||
* const JWKS = jose.createRemoteJWKSet(url, {
|
||||
* [jose.customFetch]: (...args) => {
|
||||
* // @ts-ignore
|
||||
* return undici.fetch(args[0], { ...args[1], dispatcher: mockAgent }) // prettier-ignore
|
||||
* },
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
export declare const customFetch: unique symbol;
|
||||
/** See {@link customFetch}. */
|
||||
export type FetchImplementation = (
|
||||
/** URL the request is being made sent to {@link !fetch} as the `resource` argument */
|
||||
url: string,
|
||||
/** Options otherwise sent to {@link !fetch} as the `options` argument */
|
||||
options: {
|
||||
/** HTTP Headers */
|
||||
headers: Headers;
|
||||
/** The {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods request method} */
|
||||
method: 'GET';
|
||||
/** See {@link !Request.redirect} */
|
||||
redirect: 'manual';
|
||||
signal: AbortSignal;
|
||||
}) => Promise<Response>;
|
||||
/**
|
||||
* > [!WARNING]\
|
||||
* > This option has security implications that must be understood, assessed for applicability, and
|
||||
* > accepted before use. It is critical that the JSON Web Key Set cache only be writable by your own
|
||||
* > code.
|
||||
*
|
||||
* This option is intended for cloud computing runtimes that cannot keep an in memory cache between
|
||||
* their code's invocations. Use in runtimes where an in memory cache between requests is available
|
||||
* is not desirable.
|
||||
*
|
||||
* When passed to {@link jwks/remote.createRemoteJWKSet createRemoteJWKSet} this allows the passed in
|
||||
* object to:
|
||||
*
|
||||
* - Serve as an initial value for the JSON Web Key Set that the module would otherwise need to
|
||||
* trigger an HTTP request for
|
||||
* - Have the JSON Web Key Set the function optionally ended up triggering an HTTP request for
|
||||
* assigned to it as properties
|
||||
*
|
||||
* The intended use pattern is:
|
||||
*
|
||||
* - Before verifying with {@link jwks/remote.createRemoteJWKSet createRemoteJWKSet} you pull the
|
||||
* previously cached object from a low-latency key-value store offered by the cloud computing
|
||||
* runtime it is executed on;
|
||||
* - Default to an empty object `{}` instead when there's no previously cached value;
|
||||
* - Pass it in as {@link RemoteJWKSetOptions[jwksCache]};
|
||||
* - Afterwards, update the key-value storage if the {@link ExportedJWKSCache.uat `uat`} property of
|
||||
* the object has changed.
|
||||
*
|
||||
* // Prerequisites
|
||||
* let url!: URL
|
||||
* let jwt!: string
|
||||
* let getPreviouslyCachedJWKS!: () => Promise<jose.ExportedJWKSCache>
|
||||
* let storeNewJWKScache!: (cache: jose.ExportedJWKSCache) => Promise<void>
|
||||
*
|
||||
* // Load JSON Web Key Set cache
|
||||
* const jwksCache: jose.JWKSCacheInput = (await getPreviouslyCachedJWKS()) || {}
|
||||
* const { uat } = jwksCache
|
||||
*
|
||||
* const JWKS = jose.createRemoteJWKSet(url, {
|
||||
* [jose.jwksCache]: jwksCache,
|
||||
* })
|
||||
*
|
||||
* // Use JSON Web Key Set cache
|
||||
* await jose.jwtVerify(jwt, JWKS)
|
||||
*
|
||||
* if (uat !== jwksCache.uat) {
|
||||
* // Update JSON Web Key Set cache
|
||||
* await storeNewJWKScache(jwksCache)
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export declare const jwksCache: unique symbol;
|
||||
/** Options for the remote JSON Web Key Set. */
|
||||
export interface RemoteJWKSetOptions {
|
||||
/**
|
||||
* Timeout (in milliseconds) for the HTTP request. When reached the request will be aborted and
|
||||
* the verification will fail. Default is 5000 (5 seconds).
|
||||
*/
|
||||
timeoutDuration?: number;
|
||||
/**
|
||||
* Duration (in milliseconds) for which no more HTTP requests will be triggered after a previous
|
||||
* successful fetch. Default is 30000 (30 seconds).
|
||||
*/
|
||||
cooldownDuration?: number;
|
||||
/**
|
||||
* Maximum time (in milliseconds) between successful HTTP requests. Default is 600000 (10
|
||||
* minutes).
|
||||
*/
|
||||
cacheMaxAge?: number | typeof Infinity;
|
||||
/** Headers to be sent with the HTTP request. */
|
||||
headers?: Record<string, string>;
|
||||
/** See {@link jwksCache}. */
|
||||
[jwksCache]?: JWKSCacheInput;
|
||||
/** See {@link customFetch}. */
|
||||
[customFetch]?: FetchImplementation;
|
||||
}
|
||||
/** See {@link jwksCache}. */
|
||||
export interface ExportedJWKSCache {
|
||||
/** Current cached JSON Web Key Set */
|
||||
jwks: types.JSONWebKeySet;
|
||||
/** Last updated at timestamp (seconds since epoch) */
|
||||
uat: number;
|
||||
}
|
||||
/** See {@link jwksCache}. */
|
||||
export type JWKSCacheInput = ExportedJWKSCache | Record<string, never>;
|
||||
/**
|
||||
* Returns a function that resolves a JWS JOSE Header to a public key object downloaded from a
|
||||
* remote endpoint returning a JSON Web Key Set, that is, for example, an OAuth 2.0 or OIDC
|
||||
* jwks_uri. The JSON Web Key Set is fetched when no key matches the selection process but only as
|
||||
* frequently as the `cooldownDuration` option allows to prevent abuse.
|
||||
*
|
||||
* It uses the "alg" (JWS Algorithm) Header Parameter to determine the right JWK "kty" (Key Type),
|
||||
* then proceeds to match the JWK "kid" (Key ID) with one found in the JWS Header Parameters (if
|
||||
* there is one) while also respecting the JWK "use" (Public Key Use) and JWK "key_ops" (Key
|
||||
* Operations) Parameters (if they are present on the JWK).
|
||||
*
|
||||
* Only a single public key must match the selection process. As shown in the example below when
|
||||
* multiple keys get matched it is possible to opt-in to iterate over the matched keys and attempt
|
||||
* verification in an iterative manner.
|
||||
*
|
||||
* > [!NOTE]\
|
||||
* > The function's purpose is to resolve public keys used for verifying signatures and will not work
|
||||
* > for public encryption keys.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/jwks/remote'`.
|
||||
*
|
||||
* @param url URL to fetch the JSON Web Key Set from.
|
||||
* @param options Options for the remote JSON Web Key Set.
|
||||
*/
|
||||
export declare function createRemoteJWKSet(url: URL, options?: RemoteJWKSetOptions): {
|
||||
(protectedHeader?: types.JWSHeaderParameters, token?: types.FlattenedJWSInput): Promise<types.CryptoKey>;
|
||||
/** @ignore */
|
||||
coolingDown: boolean;
|
||||
/** @ignore */
|
||||
fresh: boolean;
|
||||
/** @ignore */
|
||||
reloading: boolean;
|
||||
/** @ignore */
|
||||
reload: () => Promise<void>;
|
||||
/** @ignore */
|
||||
jwks: () => types.JSONWebKeySet | undefined;
|
||||
};
|
||||
36
mcp-server/node_modules/jose/dist/types/jws/compact/sign.d.ts
generated
vendored
36
mcp-server/node_modules/jose/dist/types/jws/compact/sign.d.ts
generated
vendored
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* Signing JSON Web Signature (JWS) in Compact Serialization
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../../types.d.ts';
|
||||
/**
|
||||
* The CompactSign class is used to build and sign Compact JWS strings.
|
||||
*
|
||||
* This class is exported (as a named export) from the main `'jose'` module entry point as well as
|
||||
* from its subpath export `'jose/jws/compact/sign'`.
|
||||
*
|
||||
*/
|
||||
export declare class CompactSign {
|
||||
#private;
|
||||
/**
|
||||
* {@link CompactSign} constructor
|
||||
*
|
||||
* @param payload Binary representation of the payload to sign.
|
||||
*/
|
||||
constructor(payload: Uint8Array);
|
||||
/**
|
||||
* Sets the JWS Protected Header on the CompactSign object.
|
||||
*
|
||||
* @param protectedHeader JWS Protected Header.
|
||||
*/
|
||||
setProtectedHeader(protectedHeader: types.CompactJWSHeaderParameters): this;
|
||||
/**
|
||||
* Signs and resolves the value of the Compact JWS string.
|
||||
*
|
||||
* @param key Private Key or Secret to sign the JWS with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}.
|
||||
* @param options JWS Sign options.
|
||||
*/
|
||||
sign(key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.SignOptions): Promise<string>;
|
||||
}
|
||||
33
mcp-server/node_modules/jose/dist/types/jws/compact/verify.d.ts
generated
vendored
33
mcp-server/node_modules/jose/dist/types/jws/compact/verify.d.ts
generated
vendored
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
* Verifying JSON Web Signature (JWS) in Compact Serialization
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../../types.d.ts';
|
||||
/**
|
||||
* Interface for Compact JWS Verification dynamic key resolution. No token components have been
|
||||
* verified at the time of this function call.
|
||||
*
|
||||
* @see {@link jwks/remote.createRemoteJWKSet createRemoteJWKSet} to verify using a remote JSON Web Key Set.
|
||||
*/
|
||||
export interface CompactVerifyGetKey extends types.GenericGetKeyFunction<types.CompactJWSHeaderParameters, types.FlattenedJWSInput, types.CryptoKey | types.KeyObject | types.JWK | Uint8Array> {
|
||||
}
|
||||
/**
|
||||
* Verifies the signature and format of and afterwards decodes the Compact JWS.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/jws/compact/verify'`.
|
||||
*
|
||||
* @param jws Compact JWS.
|
||||
* @param key Key to verify the JWS with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}.
|
||||
* @param options JWS Verify options.
|
||||
*/
|
||||
export declare function compactVerify(jws: string | Uint8Array, key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.VerifyOptions): Promise<types.CompactVerifyResult>;
|
||||
/**
|
||||
* @param jws Compact JWS.
|
||||
* @param getKey Function resolving a key to verify the JWS with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}.
|
||||
* @param options JWS Verify options.
|
||||
*/
|
||||
export declare function compactVerify(jws: string | Uint8Array, getKey: CompactVerifyGetKey, options?: types.VerifyOptions): Promise<types.CompactVerifyResult & types.ResolvedKey>;
|
||||
42
mcp-server/node_modules/jose/dist/types/jws/flattened/sign.d.ts
generated
vendored
42
mcp-server/node_modules/jose/dist/types/jws/flattened/sign.d.ts
generated
vendored
@@ -1,42 +0,0 @@
|
||||
/**
|
||||
* Signing JSON Web Signature (JWS) in Flattened JSON Serialization
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../../types.d.ts';
|
||||
/**
|
||||
* The FlattenedSign class is used to build and sign Flattened JWS objects.
|
||||
*
|
||||
* This class is exported (as a named export) from the main `'jose'` module entry point as well as
|
||||
* from its subpath export `'jose/jws/flattened/sign'`.
|
||||
*
|
||||
*/
|
||||
export declare class FlattenedSign {
|
||||
#private;
|
||||
/**
|
||||
* {@link FlattenedSign} constructor
|
||||
*
|
||||
* @param payload Binary representation of the payload to sign.
|
||||
*/
|
||||
constructor(payload: Uint8Array);
|
||||
/**
|
||||
* Sets the JWS Protected Header on the FlattenedSign object.
|
||||
*
|
||||
* @param protectedHeader JWS Protected Header.
|
||||
*/
|
||||
setProtectedHeader(protectedHeader: types.JWSHeaderParameters): this;
|
||||
/**
|
||||
* Sets the JWS Unprotected Header on the FlattenedSign object.
|
||||
*
|
||||
* @param unprotectedHeader JWS Unprotected Header.
|
||||
*/
|
||||
setUnprotectedHeader(unprotectedHeader: types.JWSHeaderParameters): this;
|
||||
/**
|
||||
* Signs and resolves the value of the Flattened JWS object.
|
||||
*
|
||||
* @param key Private Key or Secret to sign the JWS with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}.
|
||||
* @param options JWS Sign options.
|
||||
*/
|
||||
sign(key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.SignOptions): Promise<types.FlattenedJWS>;
|
||||
}
|
||||
33
mcp-server/node_modules/jose/dist/types/jws/flattened/verify.d.ts
generated
vendored
33
mcp-server/node_modules/jose/dist/types/jws/flattened/verify.d.ts
generated
vendored
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
* Verifying JSON Web Signature (JWS) in Flattened JSON Serialization
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../../types.d.ts';
|
||||
/**
|
||||
* Interface for Flattened JWS Verification dynamic key resolution. No token components have been
|
||||
* verified at the time of this function call.
|
||||
*
|
||||
* @see {@link jwks/remote.createRemoteJWKSet createRemoteJWKSet} to verify using a remote JSON Web Key Set.
|
||||
*/
|
||||
export interface FlattenedVerifyGetKey extends types.GenericGetKeyFunction<types.JWSHeaderParameters | undefined, types.FlattenedJWSInput, types.CryptoKey | types.KeyObject | types.JWK | Uint8Array> {
|
||||
}
|
||||
/**
|
||||
* Verifies the signature and format of and afterwards decodes the Flattened JWS.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/jws/flattened/verify'`.
|
||||
*
|
||||
* @param jws Flattened JWS.
|
||||
* @param key Key to verify the JWS with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}.
|
||||
* @param options JWS Verify options.
|
||||
*/
|
||||
export declare function flattenedVerify(jws: types.FlattenedJWSInput, key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.VerifyOptions): Promise<types.FlattenedVerifyResult>;
|
||||
/**
|
||||
* @param jws Flattened JWS.
|
||||
* @param getKey Function resolving a key to verify the JWS with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}.
|
||||
* @param options JWS Verify options.
|
||||
*/
|
||||
export declare function flattenedVerify(jws: types.FlattenedJWSInput, getKey: FlattenedVerifyGetKey, options?: types.VerifyOptions): Promise<types.FlattenedVerifyResult & types.ResolvedKey>;
|
||||
53
mcp-server/node_modules/jose/dist/types/jws/general/sign.d.ts
generated
vendored
53
mcp-server/node_modules/jose/dist/types/jws/general/sign.d.ts
generated
vendored
@@ -1,53 +0,0 @@
|
||||
/**
|
||||
* Signing JSON Web Signature (JWS) in General JSON Serialization
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../../types.d.ts';
|
||||
/** Used to build General JWS object's individual signatures. */
|
||||
export interface Signature {
|
||||
/**
|
||||
* Sets the JWS Protected Header on the Signature object.
|
||||
*
|
||||
* @param protectedHeader JWS Protected Header.
|
||||
*/
|
||||
setProtectedHeader(protectedHeader: types.JWSHeaderParameters): Signature;
|
||||
/**
|
||||
* Sets the JWS Unprotected Header on the Signature object.
|
||||
*
|
||||
* @param unprotectedHeader JWS Unprotected Header.
|
||||
*/
|
||||
setUnprotectedHeader(unprotectedHeader: types.JWSHeaderParameters): Signature;
|
||||
/** A shorthand for calling addSignature() on the enclosing {@link GeneralSign} instance */
|
||||
addSignature(...args: Parameters<GeneralSign['addSignature']>): Signature;
|
||||
/** A shorthand for calling encrypt() on the enclosing {@link GeneralSign} instance */
|
||||
sign(...args: Parameters<GeneralSign['sign']>): Promise<types.GeneralJWS>;
|
||||
/** Returns the enclosing {@link GeneralSign} instance */
|
||||
done(): GeneralSign;
|
||||
}
|
||||
/**
|
||||
* The GeneralSign class is used to build and sign General JWS objects.
|
||||
*
|
||||
* This class is exported (as a named export) from the main `'jose'` module entry point as well as
|
||||
* from its subpath export `'jose/jws/general/sign'`.
|
||||
*
|
||||
*/
|
||||
export declare class GeneralSign {
|
||||
#private;
|
||||
/**
|
||||
* {@link GeneralSign} constructor
|
||||
*
|
||||
* @param payload Binary representation of the payload to sign.
|
||||
*/
|
||||
constructor(payload: Uint8Array);
|
||||
/**
|
||||
* Adds an additional signature for the General JWS object.
|
||||
*
|
||||
* @param key Private Key or Secret to sign the individual JWS signature with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}.
|
||||
* @param options JWS Sign options.
|
||||
*/
|
||||
addSignature(key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.SignOptions): Signature;
|
||||
/** Signs and resolves the value of the General JWS object. */
|
||||
sign(): Promise<types.GeneralJWS>;
|
||||
}
|
||||
33
mcp-server/node_modules/jose/dist/types/jws/general/verify.d.ts
generated
vendored
33
mcp-server/node_modules/jose/dist/types/jws/general/verify.d.ts
generated
vendored
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
* Verifying JSON Web Signature (JWS) in General JSON Serialization
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../../types.d.ts';
|
||||
/**
|
||||
* Interface for General JWS Verification dynamic key resolution. No token components have been
|
||||
* verified at the time of this function call.
|
||||
*
|
||||
* @see {@link jwks/remote.createRemoteJWKSet createRemoteJWKSet} to verify using a remote JSON Web Key Set.
|
||||
*/
|
||||
export interface GeneralVerifyGetKey extends types.GenericGetKeyFunction<types.JWSHeaderParameters, types.FlattenedJWSInput, types.CryptoKey | types.KeyObject | types.JWK | Uint8Array> {
|
||||
}
|
||||
/**
|
||||
* Verifies the signature and format of and afterwards decodes the General JWS.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/jws/general/verify'`.
|
||||
*
|
||||
* @param jws General JWS.
|
||||
* @param key Key to verify the JWS with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}.
|
||||
* @param options JWS Verify options.
|
||||
*/
|
||||
export declare function generalVerify(jws: types.GeneralJWSInput, key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.VerifyOptions): Promise<types.GeneralVerifyResult>;
|
||||
/**
|
||||
* @param jws General JWS.
|
||||
* @param getKey Function resolving a key to verify the JWS with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}.
|
||||
* @param options JWS Verify options.
|
||||
*/
|
||||
export declare function generalVerify(jws: types.GeneralJWSInput, getKey: GeneralVerifyGetKey, options?: types.VerifyOptions): Promise<types.GeneralVerifyResult & types.ResolvedKey>;
|
||||
35
mcp-server/node_modules/jose/dist/types/jwt/decrypt.d.ts
generated
vendored
35
mcp-server/node_modules/jose/dist/types/jwt/decrypt.d.ts
generated
vendored
@@ -1,35 +0,0 @@
|
||||
/**
|
||||
* JSON Web Token (JWT) Decryption (JWT is in JWE format)
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/** Combination of JWE Decryption options and JWT Claims Set verification options. */
|
||||
export interface JWTDecryptOptions extends types.DecryptOptions, types.JWTClaimVerificationOptions {
|
||||
}
|
||||
/**
|
||||
* Interface for JWT Decryption dynamic key resolution. No token components have been verified at
|
||||
* the time of this function call.
|
||||
*/
|
||||
export interface JWTDecryptGetKey extends types.GetKeyFunction<types.CompactJWEHeaderParameters, types.FlattenedJWE> {
|
||||
}
|
||||
/**
|
||||
* Verifies the JWT format (to be a JWE Compact format), decrypts the ciphertext, validates the JWT
|
||||
* Claims Set.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/jwt/decrypt'`.
|
||||
*
|
||||
* @param jwt JSON Web Token value (encoded as JWE).
|
||||
* @param key Private Key or Secret to decrypt and verify the JWT with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
|
||||
* @param options JWT Decryption and JWT Claims Set validation options.
|
||||
*/
|
||||
export declare function jwtDecrypt<PayloadType = types.JWTPayload>(jwt: string | Uint8Array, key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: JWTDecryptOptions): Promise<types.JWTDecryptResult<PayloadType>>;
|
||||
/**
|
||||
* @param jwt JSON Web Token value (encoded as JWE).
|
||||
* @param getKey Function resolving Private Key or Secret to decrypt and verify the JWT with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
|
||||
* @param options JWT Decryption and JWT Claims Set validation options.
|
||||
*/
|
||||
export declare function jwtDecrypt<PayloadType = types.JWTPayload>(jwt: string | Uint8Array, getKey: JWTDecryptGetKey, options?: JWTDecryptOptions): Promise<types.JWTDecryptResult<PayloadType> & types.ResolvedKey>;
|
||||
91
mcp-server/node_modules/jose/dist/types/jwt/encrypt.d.ts
generated
vendored
91
mcp-server/node_modules/jose/dist/types/jwt/encrypt.d.ts
generated
vendored
@@ -1,91 +0,0 @@
|
||||
/**
|
||||
* JSON Web Token (JWT) Encryption (JWT is in JWE format)
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/**
|
||||
* The EncryptJWT class is used to build and encrypt Compact JWE formatted JSON Web Tokens.
|
||||
*
|
||||
* This class is exported (as a named export) from the main `'jose'` module entry point as well as
|
||||
* from its subpath export `'jose/jwt/encrypt'`.
|
||||
*
|
||||
*/
|
||||
export declare class EncryptJWT implements types.ProduceJWT {
|
||||
#private;
|
||||
/**
|
||||
* {@link EncryptJWT} constructor
|
||||
*
|
||||
* @param payload The JWT Claims Set object. Defaults to an empty object.
|
||||
*/
|
||||
constructor(payload?: types.JWTPayload);
|
||||
setIssuer(issuer: string): this;
|
||||
setSubject(subject: string): this;
|
||||
setAudience(audience: string | string[]): this;
|
||||
setJti(jwtId: string): this;
|
||||
setNotBefore(input: number | string | Date): this;
|
||||
setExpirationTime(input: number | string | Date): this;
|
||||
setIssuedAt(input?: number | string | Date): this;
|
||||
/**
|
||||
* Sets the JWE Protected Header on the EncryptJWT object.
|
||||
*
|
||||
* @param protectedHeader JWE Protected Header. Must contain an "alg" (JWE Algorithm) and "enc"
|
||||
* (JWE Encryption Algorithm) properties.
|
||||
*/
|
||||
setProtectedHeader(protectedHeader: types.CompactJWEHeaderParameters): this;
|
||||
/**
|
||||
* Sets the JWE Key Management parameters to be used when encrypting.
|
||||
*
|
||||
* (ECDH-ES) Use of this method is needed for ECDH based algorithms to set the "apu" (Agreement
|
||||
* PartyUInfo) or "apv" (Agreement PartyVInfo) parameters.
|
||||
*
|
||||
* @param parameters JWE Key Management parameters.
|
||||
*/
|
||||
setKeyManagementParameters(parameters: types.JWEKeyManagementHeaderParameters): this;
|
||||
/**
|
||||
* Sets a content encryption key to use, by default a random suitable one is generated for the JWE
|
||||
* enc" (Encryption Algorithm) Header Parameter.
|
||||
*
|
||||
* @deprecated You should not use this method. It is only really intended for test and vector
|
||||
* validation purposes.
|
||||
*
|
||||
* @param cek JWE Content Encryption Key.
|
||||
*/
|
||||
setContentEncryptionKey(cek: Uint8Array): this;
|
||||
/**
|
||||
* Sets the JWE Initialization Vector to use for content encryption, by default a random suitable
|
||||
* one is generated for the JWE enc" (Encryption Algorithm) Header Parameter.
|
||||
*
|
||||
* @deprecated You should not use this method. It is only really intended for test and vector
|
||||
* validation purposes.
|
||||
*
|
||||
* @param iv JWE Initialization Vector.
|
||||
*/
|
||||
setInitializationVector(iv: Uint8Array): this;
|
||||
/**
|
||||
* Replicates the "iss" (Issuer) Claim as a JWE Protected Header Parameter.
|
||||
*
|
||||
* @see {@link https://www.rfc-editor.org/rfc/rfc7519#section-5.3 RFC7519#section-5.3}
|
||||
*/
|
||||
replicateIssuerAsHeader(): this;
|
||||
/**
|
||||
* Replicates the "sub" (Subject) Claim as a JWE Protected Header Parameter.
|
||||
*
|
||||
* @see {@link https://www.rfc-editor.org/rfc/rfc7519#section-5.3 RFC7519#section-5.3}
|
||||
*/
|
||||
replicateSubjectAsHeader(): this;
|
||||
/**
|
||||
* Replicates the "aud" (Audience) Claim as a JWE Protected Header Parameter.
|
||||
*
|
||||
* @see {@link https://www.rfc-editor.org/rfc/rfc7519#section-5.3 RFC7519#section-5.3}
|
||||
*/
|
||||
replicateAudienceAsHeader(): this;
|
||||
/**
|
||||
* Encrypts and returns the JWT.
|
||||
*
|
||||
* @param key Public Key or Secret to encrypt the JWT with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
|
||||
* @param options JWE Encryption options.
|
||||
*/
|
||||
encrypt(key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.EncryptOptions): Promise<string>;
|
||||
}
|
||||
43
mcp-server/node_modules/jose/dist/types/jwt/sign.d.ts
generated
vendored
43
mcp-server/node_modules/jose/dist/types/jwt/sign.d.ts
generated
vendored
@@ -1,43 +0,0 @@
|
||||
/**
|
||||
* JSON Web Token (JWT) Signing (JWT is in JWS format)
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/**
|
||||
* The SignJWT class is used to build and sign Compact JWS formatted JSON Web Tokens.
|
||||
*
|
||||
* This class is exported (as a named export) from the main `'jose'` module entry point as well as
|
||||
* from its subpath export `'jose/jwt/sign'`.
|
||||
*
|
||||
*/
|
||||
export declare class SignJWT implements types.ProduceJWT {
|
||||
#private;
|
||||
/**
|
||||
* {@link SignJWT} constructor
|
||||
*
|
||||
* @param payload The JWT Claims Set object. Defaults to an empty object.
|
||||
*/
|
||||
constructor(payload?: types.JWTPayload);
|
||||
setIssuer(issuer: string): this;
|
||||
setSubject(subject: string): this;
|
||||
setAudience(audience: string | string[]): this;
|
||||
setJti(jwtId: string): this;
|
||||
setNotBefore(input: number | string | Date): this;
|
||||
setExpirationTime(input: number | string | Date): this;
|
||||
setIssuedAt(input?: number | string | Date): this;
|
||||
/**
|
||||
* Sets the JWS Protected Header on the SignJWT object.
|
||||
*
|
||||
* @param protectedHeader JWS Protected Header. Must contain an "alg" (JWS Algorithm) property.
|
||||
*/
|
||||
setProtectedHeader(protectedHeader: types.JWTHeaderParameters): this;
|
||||
/**
|
||||
* Signs and returns the JWT.
|
||||
*
|
||||
* @param key Private Key or Secret to sign the JWT with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}.
|
||||
* @param options JWT Sign options.
|
||||
*/
|
||||
sign(key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.SignOptions): Promise<string>;
|
||||
}
|
||||
43
mcp-server/node_modules/jose/dist/types/jwt/unsecured.d.ts
generated
vendored
43
mcp-server/node_modules/jose/dist/types/jwt/unsecured.d.ts
generated
vendored
@@ -1,43 +0,0 @@
|
||||
/**
|
||||
* Unsecured (unsigned & unencrypted) JSON Web Tokens (JWT)
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/** Result of decoding an Unsecured JWT. */
|
||||
export interface UnsecuredResult<PayloadType = types.JWTPayload> {
|
||||
payload: PayloadType & types.JWTPayload;
|
||||
header: types.JWSHeaderParameters;
|
||||
}
|
||||
/**
|
||||
* The UnsecuredJWT class is a utility for dealing with `{ "alg": "none" }` Unsecured JWTs.
|
||||
*
|
||||
* This class is exported (as a named export) from the main `'jose'` module entry point as well as
|
||||
* from its subpath export `'jose/jwt/unsecured'`.
|
||||
*
|
||||
*/
|
||||
export declare class UnsecuredJWT implements types.ProduceJWT {
|
||||
#private;
|
||||
/**
|
||||
* {@link UnsecuredJWT} constructor
|
||||
*
|
||||
* @param payload The JWT Claims Set object. Defaults to an empty object.
|
||||
*/
|
||||
constructor(payload?: types.JWTPayload);
|
||||
/** Encodes the Unsecured JWT. */
|
||||
encode(): string;
|
||||
setIssuer(issuer: string): this;
|
||||
setSubject(subject: string): this;
|
||||
setAudience(audience: string | string[]): this;
|
||||
setJti(jwtId: string): this;
|
||||
setNotBefore(input: number | string | Date): this;
|
||||
setExpirationTime(input: number | string | Date): this;
|
||||
setIssuedAt(input?: number | string | Date): this;
|
||||
/**
|
||||
* Decodes an unsecured JWT.
|
||||
*
|
||||
* @param jwt Unsecured JWT to decode the payload of.
|
||||
* @param options JWT Claims Set validation options.
|
||||
*/
|
||||
static decode<PayloadType = types.JWTPayload>(jwt: string, options?: types.JWTClaimVerificationOptions): UnsecuredResult<PayloadType>;
|
||||
}
|
||||
37
mcp-server/node_modules/jose/dist/types/jwt/verify.d.ts
generated
vendored
37
mcp-server/node_modules/jose/dist/types/jwt/verify.d.ts
generated
vendored
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
* JSON Web Token (JWT) Verification (JWT is in JWS format)
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/** Combination of JWS Verification options and JWT Claims Set verification options. */
|
||||
export interface JWTVerifyOptions extends types.VerifyOptions, types.JWTClaimVerificationOptions {
|
||||
}
|
||||
/**
|
||||
* Interface for JWT Verification dynamic key resolution. No token components have been verified at
|
||||
* the time of this function call.
|
||||
*
|
||||
* @see {@link jwks/remote.createRemoteJWKSet createRemoteJWKSet} to verify using a remote JSON Web Key Set.
|
||||
*/
|
||||
export interface JWTVerifyGetKey extends types.GenericGetKeyFunction<types.JWTHeaderParameters, types.FlattenedJWSInput, types.CryptoKey | types.KeyObject | types.JWK | Uint8Array> {
|
||||
}
|
||||
/**
|
||||
* Verifies the JWT format (to be a JWS Compact format), verifies the JWS signature, validates the
|
||||
* JWT Claims Set.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/jwt/verify'`.
|
||||
*
|
||||
* @param jwt JSON Web Token value (encoded as JWS).
|
||||
* @param key Key to verify the JWT with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}.
|
||||
* @param options JWT Decryption and JWT Claims Set validation options.
|
||||
*/
|
||||
export declare function jwtVerify<PayloadType = types.JWTPayload>(jwt: string | Uint8Array, key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: JWTVerifyOptions): Promise<types.JWTVerifyResult<PayloadType>>;
|
||||
/**
|
||||
* @param jwt JSON Web Token value (encoded as JWS).
|
||||
* @param getKey Function resolving a key to verify the JWT with. See
|
||||
* {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}.
|
||||
* @param options JWT Decryption and JWT Claims Set validation options.
|
||||
*/
|
||||
export declare function jwtVerify<PayloadType = types.JWTPayload>(jwt: string | Uint8Array, getKey: JWTVerifyGetKey, options?: JWTVerifyOptions): Promise<types.JWTVerifyResult<PayloadType> & types.ResolvedKey>;
|
||||
33
mcp-server/node_modules/jose/dist/types/key/export.d.ts
generated
vendored
33
mcp-server/node_modules/jose/dist/types/key/export.d.ts
generated
vendored
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
* Cryptographic key export functions
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/**
|
||||
* Exports a public {@link !CryptoKey} or {@link !KeyObject} to a PEM-encoded SPKI string format.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/key/export'`.
|
||||
*
|
||||
* @param key Key to export to a PEM-encoded SPKI string format.
|
||||
*/
|
||||
export declare function exportSPKI(key: types.CryptoKey | types.KeyObject): Promise<string>;
|
||||
/**
|
||||
* Exports a private {@link !CryptoKey} or {@link !KeyObject} to a PEM-encoded PKCS8 string format.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/key/export'`.
|
||||
*
|
||||
* @param key Key to export to a PEM-encoded PKCS8 string format.
|
||||
*/
|
||||
export declare function exportPKCS8(key: types.CryptoKey | types.KeyObject): Promise<string>;
|
||||
/**
|
||||
* Exports a {@link !CryptoKey}, {@link !KeyObject}, or {@link !Uint8Array} to a JWK.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/key/export'`.
|
||||
*
|
||||
* @param key Key to export as JWK.
|
||||
*/
|
||||
export declare function exportJWK(key: types.CryptoKey | types.KeyObject | Uint8Array): Promise<types.JWK>;
|
||||
47
mcp-server/node_modules/jose/dist/types/key/generate_key_pair.d.ts
generated
vendored
47
mcp-server/node_modules/jose/dist/types/key/generate_key_pair.d.ts
generated
vendored
@@ -1,47 +0,0 @@
|
||||
/**
|
||||
* Asymmetric key generation
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/** Asymmetric key pair generation function result. */
|
||||
export interface GenerateKeyPairResult {
|
||||
/** The generated Private Key. */
|
||||
privateKey: types.CryptoKey;
|
||||
/** Public Key corresponding to the generated Private Key. */
|
||||
publicKey: types.CryptoKey;
|
||||
}
|
||||
/** Asymmetric key pair generation function options. */
|
||||
export interface GenerateKeyPairOptions {
|
||||
/**
|
||||
* The EC "crv" (Curve) or OKP "crv" (Subtype of Key Pair) value to generate. The curve must be
|
||||
* both supported on the runtime as well as applicable for the given JWA algorithm identifier.
|
||||
*/
|
||||
crv?: string;
|
||||
/**
|
||||
* A hint for RSA algorithms to generate an RSA key of a given `modulusLength` (Key size in bits).
|
||||
* JOSE requires 2048 bits or larger. Default is 2048.
|
||||
*/
|
||||
modulusLength?: number;
|
||||
/**
|
||||
* The value to use as {@link !SubtleCrypto.generateKey} `extractable` argument. Default is false.
|
||||
*
|
||||
*/
|
||||
extractable?: boolean;
|
||||
}
|
||||
/**
|
||||
* Generates a private and a public key for a given JWA algorithm identifier. This can only generate
|
||||
* asymmetric key pairs. For symmetric secrets use the `generateSecret` function.
|
||||
*
|
||||
* > [!NOTE]\
|
||||
* > The `privateKey` is generated with `extractable` set to `false` by default. See
|
||||
* > {@link GenerateKeyPairOptions.extractable} to generate an extractable `privateKey`.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/generate/keypair'`.
|
||||
*
|
||||
* @param alg JWA Algorithm Identifier to be used with the generated key pair. See
|
||||
* {@link https://github.com/panva/jose/issues/210 Algorithm Key Requirements}.
|
||||
* @param options Additional options passed down to the key pair generation.
|
||||
*/
|
||||
export declare function generateKeyPair(alg: string, options?: GenerateKeyPairOptions): Promise<GenerateKeyPairResult>;
|
||||
35
mcp-server/node_modules/jose/dist/types/key/generate_secret.d.ts
generated
vendored
35
mcp-server/node_modules/jose/dist/types/key/generate_secret.d.ts
generated
vendored
@@ -1,35 +0,0 @@
|
||||
/**
|
||||
* Symmetric key generation
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/** Secret generation function options. */
|
||||
export interface GenerateSecretOptions {
|
||||
/**
|
||||
* The value to use as {@link !SubtleCrypto.generateKey} `extractable` argument. Default is false.
|
||||
*
|
||||
* > [!NOTE]\
|
||||
* > Because A128CBC-HS256, A192CBC-HS384, and A256CBC-HS512 secrets cannot be represented as
|
||||
* > {@link !CryptoKey} this option has no effect for them.
|
||||
*/
|
||||
extractable?: boolean;
|
||||
}
|
||||
/**
|
||||
* Generates a symmetric secret key for a given JWA algorithm identifier.
|
||||
*
|
||||
* > [!NOTE]\
|
||||
* > The secret key is generated with `extractable` set to `false` by default.
|
||||
*
|
||||
* > [!NOTE]\
|
||||
* > Because A128CBC-HS256, A192CBC-HS384, and A256CBC-HS512 secrets cannot be represented as
|
||||
* > {@link !CryptoKey} this method yields a {@link !Uint8Array} for them instead.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/generate/secret'`.
|
||||
*
|
||||
* @param alg JWA Algorithm Identifier to be used with the generated secret. See
|
||||
* {@link https://github.com/panva/jose/issues/210 Algorithm Key Requirements}.
|
||||
* @param options Additional options passed down to the secret generation.
|
||||
*/
|
||||
export declare function generateSecret(alg: string, options?: GenerateSecretOptions): Promise<types.CryptoKey | Uint8Array>;
|
||||
83
mcp-server/node_modules/jose/dist/types/key/import.d.ts
generated
vendored
83
mcp-server/node_modules/jose/dist/types/key/import.d.ts
generated
vendored
@@ -1,83 +0,0 @@
|
||||
/**
|
||||
* Cryptographic key import functions
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/** Key Import Function options. */
|
||||
export interface KeyImportOptions {
|
||||
/**
|
||||
* The value to use as {@link !SubtleCrypto.importKey} `extractable` argument. Default is false for
|
||||
* private keys, true otherwise.
|
||||
*/
|
||||
extractable?: boolean;
|
||||
}
|
||||
/**
|
||||
* Imports a PEM-encoded SPKI string as a {@link !CryptoKey}.
|
||||
*
|
||||
* > [!NOTE]\
|
||||
* > The OID id-RSASSA-PSS (1.2.840.113549.1.1.10) is not supported in
|
||||
* > {@link https://w3c.github.io/webcrypto/ Web Cryptography API}, use the OID rsaEncryption
|
||||
* > (1.2.840.113549.1.1.1) instead for all RSA algorithms.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/key/import'`.
|
||||
*
|
||||
* @param spki PEM-encoded SPKI string
|
||||
* @param alg JSON Web Algorithm identifier to be used with the imported key. See
|
||||
* {@link https://github.com/panva/jose/issues/210 Algorithm Key Requirements}.
|
||||
*/
|
||||
export declare function importSPKI(spki: string, alg: string, options?: KeyImportOptions): Promise<types.CryptoKey>;
|
||||
/**
|
||||
* Imports the SPKI from an X.509 string certificate as a {@link !CryptoKey}.
|
||||
*
|
||||
* > [!NOTE]\
|
||||
* > The OID id-RSASSA-PSS (1.2.840.113549.1.1.10) is not supported in
|
||||
* > {@link https://w3c.github.io/webcrypto/ Web Cryptography API}, use the OID rsaEncryption
|
||||
* > (1.2.840.113549.1.1.1) instead for all RSA algorithms.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/key/import'`.
|
||||
*
|
||||
* @param x509 X.509 certificate string
|
||||
* @param alg JSON Web Algorithm identifier to be used with the imported key. See
|
||||
* {@link https://github.com/panva/jose/issues/210 Algorithm Key Requirements}.
|
||||
*/
|
||||
export declare function importX509(x509: string, alg: string, options?: KeyImportOptions): Promise<types.CryptoKey>;
|
||||
/**
|
||||
* Imports a PEM-encoded PKCS#8 string as a {@link !CryptoKey}.
|
||||
*
|
||||
* > [!NOTE]\
|
||||
* > The OID id-RSASSA-PSS (1.2.840.113549.1.1.10) is not supported in
|
||||
* > {@link https://w3c.github.io/webcrypto/ Web Cryptography API}, use the OID rsaEncryption
|
||||
* > (1.2.840.113549.1.1.1) instead for all RSA algorithms.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/key/import'`.
|
||||
*
|
||||
* @param pkcs8 PEM-encoded PKCS#8 string
|
||||
* @param alg JSON Web Algorithm identifier to be used with the imported key. See
|
||||
* {@link https://github.com/panva/jose/issues/210 Algorithm Key Requirements}.
|
||||
*/
|
||||
export declare function importPKCS8(pkcs8: string, alg: string, options?: KeyImportOptions): Promise<types.CryptoKey>;
|
||||
/**
|
||||
* Imports a JWK to a {@link !CryptoKey}. Either the JWK "alg" (Algorithm) Parameter, or the optional
|
||||
* "alg" argument, must be present for asymmetric JSON Web Key imports.
|
||||
*
|
||||
* > [!NOTE]\
|
||||
* > The JSON Web Key parameters "use", "key_ops", and "ext" are also used in the {@link !CryptoKey}
|
||||
* > import process.
|
||||
*
|
||||
* > [!NOTE]\
|
||||
* > Symmetric JSON Web Keys (i.e. `kty: "oct"`) yield back an {@link !Uint8Array} instead of a
|
||||
* > {@link !CryptoKey}.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/key/import'`.
|
||||
*
|
||||
* @param jwk JSON Web Key.
|
||||
* @param alg JSON Web Algorithm identifier to be used with the imported key. Default is the "alg"
|
||||
* property on the JWK. See
|
||||
* {@link https://github.com/panva/jose/issues/210 Algorithm Key Requirements}.
|
||||
*/
|
||||
export declare function importJWK(jwk: types.JWK, alg?: string, options?: KeyImportOptions): Promise<types.CryptoKey | Uint8Array>;
|
||||
841
mcp-server/node_modules/jose/dist/types/types.d.ts
generated
vendored
841
mcp-server/node_modules/jose/dist/types/types.d.ts
generated
vendored
@@ -1,841 +0,0 @@
|
||||
/** Generic JSON Web Key Parameters. */
|
||||
export interface JWKParameters {
|
||||
/** JWK "kty" (Key Type) Parameter */
|
||||
kty?: string
|
||||
/**
|
||||
* JWK "alg" (Algorithm) Parameter
|
||||
*
|
||||
* @see {@link https://github.com/panva/jose/issues/210 Algorithm Key Requirements}
|
||||
*/
|
||||
alg?: string
|
||||
/** JWK "key_ops" (Key Operations) Parameter */
|
||||
key_ops?: string[]
|
||||
/** JWK "ext" (Extractable) Parameter */
|
||||
ext?: boolean
|
||||
/** JWK "use" (Public Key Use) Parameter */
|
||||
use?: string
|
||||
/** JWK "x5c" (X.509 Certificate Chain) Parameter */
|
||||
x5c?: string[]
|
||||
/** JWK "x5t" (X.509 Certificate SHA-1 Thumbprint) Parameter */
|
||||
x5t?: string
|
||||
/** JWK "x5t#S256" (X.509 Certificate SHA-256 Thumbprint) Parameter */
|
||||
'x5t#S256'?: string
|
||||
/** JWK "x5u" (X.509 URL) Parameter */
|
||||
x5u?: string
|
||||
/** JWK "kid" (Key ID) Parameter */
|
||||
kid?: string
|
||||
}
|
||||
|
||||
/** Convenience interface for Public OKP JSON Web Keys */
|
||||
export interface JWK_OKP_Public extends JWKParameters {
|
||||
/** OKP JWK "crv" (The Subtype of Key Pair) Parameter */
|
||||
crv: string
|
||||
/** OKP JWK "x" (The public key) Parameter */
|
||||
x: string
|
||||
}
|
||||
|
||||
/** Convenience interface for Private OKP JSON Web Keys */
|
||||
export interface JWK_OKP_Private extends JWK_OKP_Public {
|
||||
/** OKP JWK "d" (The Private Key) Parameter */
|
||||
d: string
|
||||
}
|
||||
|
||||
/** Convenience interface for Public AKP JSON Web Keys */
|
||||
export interface JWK_AKP_Public extends JWKParameters {
|
||||
/** JWK "alg" (Algorithm) Parameter */
|
||||
alg: string
|
||||
/** AKP JWK "pub" (The Public key) Parameter */
|
||||
pub: string
|
||||
}
|
||||
|
||||
/** Convenience interface for Private AKP JSON Web Keys */
|
||||
export interface JWK_AKP_Private extends JWK_AKP_Public {
|
||||
/** AKP JWK "priv" (The Private Key) Parameter */
|
||||
priv: string
|
||||
}
|
||||
|
||||
/** Convenience interface for Public EC JSON Web Keys */
|
||||
export interface JWK_EC_Public extends JWKParameters {
|
||||
/** EC JWK "crv" (Curve) Parameter */
|
||||
crv: string
|
||||
/** EC JWK "x" (X Coordinate) Parameter */
|
||||
x: string
|
||||
/** EC JWK "y" (Y Coordinate) Parameter */
|
||||
y: string
|
||||
}
|
||||
|
||||
/** Convenience interface for Private EC JSON Web Keys */
|
||||
export interface JWK_EC_Private extends JWK_EC_Public {
|
||||
/** EC JWK "d" (ECC Private Key) Parameter */
|
||||
d: string
|
||||
}
|
||||
|
||||
/** Convenience interface for Public RSA JSON Web Keys */
|
||||
export interface JWK_RSA_Public extends JWKParameters {
|
||||
/** RSA JWK "e" (Exponent) Parameter */
|
||||
e: string
|
||||
/** RSA JWK "n" (Modulus) Parameter */
|
||||
n: string
|
||||
}
|
||||
|
||||
/** Convenience interface for Private RSA JSON Web Keys */
|
||||
export interface JWK_RSA_Private extends JWK_RSA_Public {
|
||||
/** RSA JWK "d" (Private Exponent) Parameter */
|
||||
d: string
|
||||
/** RSA JWK "dp" (First Factor CRT Exponent) Parameter */
|
||||
dp: string
|
||||
/** RSA JWK "dq" (Second Factor CRT Exponent) Parameter */
|
||||
dq: string
|
||||
/** RSA JWK "p" (First Prime Factor) Parameter */
|
||||
p: string
|
||||
/** RSA JWK "q" (Second Prime Factor) Parameter */
|
||||
q: string
|
||||
/** RSA JWK "qi" (First CRT Coefficient) Parameter */
|
||||
qi: string
|
||||
}
|
||||
|
||||
/** Convenience interface for oct JSON Web Keys */
|
||||
export interface JWK_oct extends JWKParameters {
|
||||
/** Oct JWK "k" (Key Value) Parameter */
|
||||
k: string
|
||||
}
|
||||
|
||||
/**
|
||||
* JSON Web Key ({@link https://www.rfc-editor.org/rfc/rfc7517 JWK}). "RSA", "EC", "OKP", "AKP", and
|
||||
* "oct" key types are supported.
|
||||
*
|
||||
* @see {@link JWK_AKP_Public}
|
||||
* @see {@link JWK_AKP_Private}
|
||||
* @see {@link JWK_OKP_Public}
|
||||
* @see {@link JWK_OKP_Private}
|
||||
* @see {@link JWK_EC_Public}
|
||||
* @see {@link JWK_EC_Private}
|
||||
* @see {@link JWK_RSA_Public}
|
||||
* @see {@link JWK_RSA_Private}
|
||||
* @see {@link JWK_oct}
|
||||
*/
|
||||
export interface JWK extends JWKParameters {
|
||||
/**
|
||||
* - EC JWK "crv" (Curve) Parameter
|
||||
* - OKP JWK "crv" (The Subtype of Key Pair) Parameter
|
||||
*/
|
||||
crv?: string
|
||||
/**
|
||||
* - Private RSA JWK "d" (Private Exponent) Parameter
|
||||
* - Private EC JWK "d" (ECC Private Key) Parameter
|
||||
* - Private OKP JWK "d" (The Private Key) Parameter
|
||||
*/
|
||||
d?: string
|
||||
/** Private RSA JWK "dp" (First Factor CRT Exponent) Parameter */
|
||||
dp?: string
|
||||
/** Private RSA JWK "dq" (Second Factor CRT Exponent) Parameter */
|
||||
dq?: string
|
||||
/** RSA JWK "e" (Exponent) Parameter */
|
||||
e?: string
|
||||
/** Oct JWK "k" (Key Value) Parameter */
|
||||
k?: string
|
||||
/** RSA JWK "n" (Modulus) Parameter */
|
||||
n?: string
|
||||
/** Private RSA JWK "p" (First Prime Factor) Parameter */
|
||||
p?: string
|
||||
/** Private RSA JWK "q" (Second Prime Factor) Parameter */
|
||||
q?: string
|
||||
/** Private RSA JWK "qi" (First CRT Coefficient) Parameter */
|
||||
qi?: string
|
||||
/**
|
||||
* - EC JWK "x" (X Coordinate) Parameter
|
||||
* - OKP JWK "x" (The public key) Parameter
|
||||
*/
|
||||
x?: string
|
||||
/** EC JWK "y" (Y Coordinate) Parameter */
|
||||
y?: string
|
||||
/** AKP JWK "pub" (Public Key) Parameter */
|
||||
pub?: string
|
||||
/** AKP JWK "priv" (Private key) Parameter */
|
||||
priv?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
export interface GenericGetKeyFunction<IProtectedHeader, IToken, ReturnKeyTypes> {
|
||||
/**
|
||||
* Dynamic key resolution function. No token components have been verified at the time of this
|
||||
* function call.
|
||||
*
|
||||
* If a suitable key for the token cannot be matched, throw an error instead.
|
||||
*
|
||||
* @param protectedHeader JWE or JWS Protected Header.
|
||||
* @param token The consumed JWE or JWS token.
|
||||
*/
|
||||
(protectedHeader: IProtectedHeader, token: IToken): Promise<ReturnKeyTypes> | ReturnKeyTypes
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic Interface for consuming operations dynamic key resolution.
|
||||
*
|
||||
* @param IProtectedHeader Type definition of the JWE or JWS Protected Header.
|
||||
* @param IToken Type definition of the consumed JWE or JWS token.
|
||||
*/
|
||||
export interface GetKeyFunction<IProtectedHeader, IToken> extends GenericGetKeyFunction<
|
||||
IProtectedHeader,
|
||||
IToken,
|
||||
CryptoKey | KeyObject | JWK | Uint8Array
|
||||
> {}
|
||||
|
||||
/**
|
||||
* Flattened JWS definition for verify function inputs, allows payload as {@link !Uint8Array} for
|
||||
* detached signature validation.
|
||||
*/
|
||||
export interface FlattenedJWSInput {
|
||||
/**
|
||||
* The "header" member MUST be present and contain the value JWS Unprotected Header when the JWS
|
||||
* Unprotected Header value is non- empty; otherwise, it MUST be absent. This value is represented
|
||||
* as an unencoded JSON object, rather than as a string. These Header Parameter values are not
|
||||
* integrity protected.
|
||||
*/
|
||||
header?: JWSHeaderParameters
|
||||
|
||||
/**
|
||||
* The "payload" member MUST be present and contain the value BASE64URL(JWS Payload). When RFC7797
|
||||
* "b64": false is used the value passed may also be a {@link !Uint8Array}.
|
||||
*/
|
||||
payload: string | Uint8Array
|
||||
|
||||
/**
|
||||
* The "protected" member MUST be present and contain the value BASE64URL(UTF8(JWS Protected
|
||||
* Header)) when the JWS Protected Header value is non-empty; otherwise, it MUST be absent. These
|
||||
* Header Parameter values are integrity protected.
|
||||
*/
|
||||
protected?: string
|
||||
|
||||
/** The "signature" member MUST be present and contain the value BASE64URL(JWS Signature). */
|
||||
signature: string
|
||||
}
|
||||
|
||||
/**
|
||||
* General JWS definition for verify function inputs, allows payload as {@link !Uint8Array} for
|
||||
* detached signature validation.
|
||||
*/
|
||||
export interface GeneralJWSInput {
|
||||
/**
|
||||
* The "payload" member MUST be present and contain the value BASE64URL(JWS Payload). When when
|
||||
* JWS Unencoded Payload ({@link https://www.rfc-editor.org/rfc/rfc7797 RFC7797}) "b64": false is
|
||||
* used the value passed may also be a {@link !Uint8Array}.
|
||||
*/
|
||||
payload: string | Uint8Array
|
||||
|
||||
/**
|
||||
* The "signatures" member value MUST be an array of JSON objects. Each object represents a
|
||||
* signature or MAC over the JWS Payload and the JWS Protected Header.
|
||||
*/
|
||||
signatures: Omit<FlattenedJWSInput, 'payload'>[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Flattened JWS JSON Serialization Syntax token. Payload is returned as an empty string when JWS
|
||||
* Unencoded Payload ({@link https://www.rfc-editor.org/rfc/rfc7797 RFC7797}) is used.
|
||||
*/
|
||||
export interface FlattenedJWS extends Partial<FlattenedJWSInput> {
|
||||
payload: string
|
||||
signature: string
|
||||
}
|
||||
|
||||
/**
|
||||
* General JWS JSON Serialization Syntax token. Payload is returned as an empty string when JWS
|
||||
* Unencoded Payload ({@link https://www.rfc-editor.org/rfc/rfc7797 RFC7797}) is used.
|
||||
*/
|
||||
export interface GeneralJWS {
|
||||
payload: string
|
||||
signatures: Omit<FlattenedJWSInput, 'payload'>[]
|
||||
}
|
||||
|
||||
/** Header Parameters common to JWE and JWS */
|
||||
export interface JoseHeaderParameters {
|
||||
/** "kid" (Key ID) Header Parameter */
|
||||
kid?: string
|
||||
|
||||
/** "x5t" (X.509 Certificate SHA-1 Thumbprint) Header Parameter */
|
||||
x5t?: string
|
||||
|
||||
/** "x5c" (X.509 Certificate Chain) Header Parameter */
|
||||
x5c?: string[]
|
||||
|
||||
/** "x5u" (X.509 URL) Header Parameter */
|
||||
x5u?: string
|
||||
|
||||
/** "jku" (JWK Set URL) Header Parameter */
|
||||
jku?: string
|
||||
|
||||
/** "jwk" (JSON Web Key) Header Parameter */
|
||||
jwk?: Pick<JWK, 'kty' | 'crv' | 'x' | 'y' | 'e' | 'n' | 'alg' | 'pub'>
|
||||
|
||||
/** "typ" (Type) Header Parameter */
|
||||
typ?: string
|
||||
|
||||
/** "cty" (Content Type) Header Parameter */
|
||||
cty?: string
|
||||
}
|
||||
|
||||
/** Recognized JWS Header Parameters, any other Header Members may also be present. */
|
||||
export interface JWSHeaderParameters extends JoseHeaderParameters {
|
||||
/**
|
||||
* JWS "alg" (Algorithm) Header Parameter
|
||||
*
|
||||
* @see {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}
|
||||
*/
|
||||
alg?: string
|
||||
|
||||
/**
|
||||
* This JWS Extension Header Parameter modifies the JWS Payload representation and the JWS Signing
|
||||
* Input computation as per {@link https://www.rfc-editor.org/rfc/rfc7797 RFC7797}.
|
||||
*/
|
||||
b64?: boolean
|
||||
|
||||
/** JWS "crit" (Critical) Header Parameter */
|
||||
crit?: string[]
|
||||
|
||||
/** Any other JWS Header member. */
|
||||
[propName: string]: unknown
|
||||
}
|
||||
|
||||
/** Recognized JWE Key Management-related Header Parameters. */
|
||||
export interface JWEKeyManagementHeaderParameters {
|
||||
/**
|
||||
* ECDH-ES "apu" (Agreement PartyUInfo). This will be used as a JOSE Header Parameter and will be
|
||||
* used in ECDH's ConcatKDF.
|
||||
*/
|
||||
apu?: Uint8Array
|
||||
|
||||
/**
|
||||
* ECDH-ES "apv" (Agreement PartyVInfo). This will be used as a JOSE Header Parameter and will be
|
||||
* used in ECDH's ConcatKDF.
|
||||
*/
|
||||
apv?: Uint8Array
|
||||
/**
|
||||
* @deprecated You should not use this parameter. It is only intended for testing and vector
|
||||
* validation purposes.
|
||||
*/
|
||||
p2c?: number
|
||||
/**
|
||||
* @deprecated You should not use this parameter. It is only intended for testing and vector
|
||||
* validation purposes.
|
||||
*/
|
||||
p2s?: Uint8Array
|
||||
/**
|
||||
* @deprecated You should not use this parameter. It is only intended for testing and vector
|
||||
* validation purposes.
|
||||
*/
|
||||
iv?: Uint8Array
|
||||
/**
|
||||
* @deprecated You should not use this parameter. It is only intended for testing and vector
|
||||
* validation purposes.
|
||||
*/
|
||||
epk?: CryptoKey | KeyObject
|
||||
}
|
||||
|
||||
/** Flattened JWE JSON Serialization Syntax token. */
|
||||
export interface FlattenedJWE {
|
||||
/**
|
||||
* The "aad" member MUST be present and contain the value BASE64URL(JWE AAD)) when the JWE AAD
|
||||
* value is non-empty; otherwise, it MUST be absent. A JWE AAD value can be included to supply a
|
||||
* base64url-encoded value to be integrity protected but not encrypted.
|
||||
*/
|
||||
aad?: string
|
||||
|
||||
/** The "ciphertext" member MUST be present and contain the value BASE64URL(JWE Ciphertext). */
|
||||
ciphertext: string
|
||||
|
||||
/**
|
||||
* The "encrypted_key" member MUST be present and contain the value BASE64URL(JWE Encrypted Key)
|
||||
* when the JWE Encrypted Key value is non-empty; otherwise, it MUST be absent.
|
||||
*/
|
||||
encrypted_key?: string
|
||||
|
||||
/**
|
||||
* The "header" member MUST be present and contain the value JWE Per- Recipient Unprotected Header
|
||||
* when the JWE Per-Recipient Unprotected Header value is non-empty; otherwise, it MUST be absent.
|
||||
* This value is represented as an unencoded JSON object, rather than as a string. These Header
|
||||
* Parameter values are not integrity protected.
|
||||
*/
|
||||
header?: JWEHeaderParameters
|
||||
|
||||
/**
|
||||
* The "iv" member MUST be present and contain the value BASE64URL(JWE Initialization Vector) when
|
||||
* the JWE Initialization Vector value is non-empty; otherwise, it MUST be absent.
|
||||
*/
|
||||
iv?: string
|
||||
|
||||
/**
|
||||
* The "protected" member MUST be present and contain the value BASE64URL(UTF8(JWE Protected
|
||||
* Header)) when the JWE Protected Header value is non-empty; otherwise, it MUST be absent. These
|
||||
* Header Parameter values are integrity protected.
|
||||
*/
|
||||
protected?: string
|
||||
|
||||
/**
|
||||
* The "tag" member MUST be present and contain the value BASE64URL(JWE Authentication Tag) when
|
||||
* the JWE Authentication Tag value is non-empty; otherwise, it MUST be absent.
|
||||
*/
|
||||
tag?: string
|
||||
|
||||
/**
|
||||
* The "unprotected" member MUST be present and contain the value JWE Shared Unprotected Header
|
||||
* when the JWE Shared Unprotected Header value is non-empty; otherwise, it MUST be absent. This
|
||||
* value is represented as an unencoded JSON object, rather than as a string. These Header
|
||||
* Parameter values are not integrity protected.
|
||||
*/
|
||||
unprotected?: JWEHeaderParameters
|
||||
}
|
||||
|
||||
/** General JWE JSON Serialization Syntax token. */
|
||||
export interface GeneralJWE extends Omit<FlattenedJWE, 'encrypted_key' | 'header'> {
|
||||
recipients: Pick<FlattenedJWE, 'encrypted_key' | 'header'>[]
|
||||
}
|
||||
|
||||
/** Recognized JWE Header Parameters, any other Header members may also be present. */
|
||||
export interface JWEHeaderParameters extends JoseHeaderParameters {
|
||||
/**
|
||||
* JWE "alg" (Algorithm) Header Parameter
|
||||
*
|
||||
* @see {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}
|
||||
*/
|
||||
alg?: string
|
||||
|
||||
/**
|
||||
* JWE "enc" (Encryption Algorithm) Header Parameter
|
||||
*
|
||||
* @see {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}
|
||||
*/
|
||||
enc?: string
|
||||
|
||||
/** JWE "crit" (Critical) Header Parameter */
|
||||
crit?: string[]
|
||||
|
||||
/**
|
||||
* JWE "zip" (Compression Algorithm) Header Parameter. This parameter is not supported anymore.
|
||||
*
|
||||
* @deprecated Compression of data SHOULD NOT be done before encryption, because such compressed
|
||||
* data often reveals information about the plaintext.
|
||||
*
|
||||
* @see {@link https://www.rfc-editor.org/rfc/rfc8725#name-avoid-compression-of-encryp Avoid Compression of Encryption Inputs}
|
||||
*/
|
||||
zip?: string
|
||||
|
||||
/** Any other JWE Header member. */
|
||||
[propName: string]: unknown
|
||||
}
|
||||
|
||||
/** Shared Interface with a "crit" property for all sign, verify, encrypt and decrypt operations. */
|
||||
export interface CritOption {
|
||||
/**
|
||||
* An object with keys representing recognized "crit" (Critical) Header Parameter names. The value
|
||||
* for those is either `true` or `false`. `true` when the Header Parameter MUST be integrity
|
||||
* protected, `false` when it's irrelevant.
|
||||
*
|
||||
* This makes the "Extension Header Parameter "..." is not recognized" error go away.
|
||||
*
|
||||
* Use this when a given JWS/JWT/JWE profile requires the use of proprietary non-registered "crit"
|
||||
* (Critical) Header Parameters. This will only make sure the Header Parameter is syntactically
|
||||
* correct when provided and that it is optionally integrity protected. It will not process the
|
||||
* Header Parameter in any way or reject the operation if it is missing. You MUST still verify the
|
||||
* Header Parameter was present and process it according to the profile's validation steps after
|
||||
* the operation succeeds.
|
||||
*
|
||||
* The JWS extension Header Parameter `b64` is always recognized and processed properly. No other
|
||||
* registered Header Parameters that need this kind of default built-in treatment are currently
|
||||
* available.
|
||||
*/
|
||||
crit?: {
|
||||
[propName: string]: boolean
|
||||
}
|
||||
}
|
||||
|
||||
/** JWE Decryption options. */
|
||||
export interface DecryptOptions extends CritOption {
|
||||
/**
|
||||
* A list of accepted JWE "alg" (Algorithm) Header Parameter values. By default all "alg"
|
||||
* (Algorithm) Header Parameter values applicable for the used key/secret are allowed except for
|
||||
* all PBES2 Key Management Algorithms, these need to be explicitly allowed using this option.
|
||||
*/
|
||||
keyManagementAlgorithms?: string[]
|
||||
|
||||
/**
|
||||
* A list of accepted JWE "enc" (Encryption Algorithm) Header Parameter values. By default all
|
||||
* "enc" (Encryption Algorithm) values applicable for the used key/secret are allowed.
|
||||
*/
|
||||
contentEncryptionAlgorithms?: string[]
|
||||
|
||||
/**
|
||||
* (PBES2 Key Management Algorithms only) Maximum allowed "p2c" (PBES2 Count) Header Parameter
|
||||
* value. The PBKDF2 iteration count defines the algorithm's computational expense. By default
|
||||
* this value is set to 10000.
|
||||
*/
|
||||
maxPBES2Count?: number
|
||||
}
|
||||
|
||||
/** JWE Encryption options. */
|
||||
export interface EncryptOptions extends CritOption {}
|
||||
|
||||
/** JWT Claims Set verification options. */
|
||||
export interface JWTClaimVerificationOptions {
|
||||
/**
|
||||
* Expected JWT "aud" (Audience) Claim value(s).
|
||||
*
|
||||
* This option makes the JWT "aud" (Audience) Claim presence required.
|
||||
*/
|
||||
audience?: string | string[]
|
||||
|
||||
/**
|
||||
* Clock skew tolerance
|
||||
*
|
||||
* - In seconds when number (e.g. 5)
|
||||
* - Resolved into a number of seconds when a string (e.g. "5 seconds", "10 minutes", "2 hours").
|
||||
*
|
||||
* Used when validating the JWT "nbf" (Not Before) and "exp" (Expiration Time) claims, and when
|
||||
* validating the "iat" (Issued At) claim if the {@link maxTokenAge `maxTokenAge` option} is set.
|
||||
*/
|
||||
clockTolerance?: string | number
|
||||
|
||||
/**
|
||||
* Expected JWT "iss" (Issuer) Claim value(s).
|
||||
*
|
||||
* This option makes the JWT "iss" (Issuer) Claim presence required.
|
||||
*/
|
||||
issuer?: string | string[]
|
||||
|
||||
/**
|
||||
* Maximum time elapsed (in seconds) from the JWT "iat" (Issued At) Claim value.
|
||||
*
|
||||
* - In seconds when number (e.g. 5)
|
||||
* - Resolved into a number of seconds when a string (e.g. "5 seconds", "10 minutes", "2 hours").
|
||||
*
|
||||
* This option makes the JWT "iat" (Issued At) Claim presence required.
|
||||
*/
|
||||
maxTokenAge?: string | number
|
||||
|
||||
/**
|
||||
* Expected JWT "sub" (Subject) Claim value.
|
||||
*
|
||||
* This option makes the JWT "sub" (Subject) Claim presence required.
|
||||
*/
|
||||
subject?: string
|
||||
|
||||
/**
|
||||
* Expected JWT "typ" (Type) Header Parameter value.
|
||||
*
|
||||
* This option makes the JWT "typ" (Type) Header Parameter presence required.
|
||||
*/
|
||||
typ?: string
|
||||
|
||||
/** Date to use when comparing NumericDate claims, defaults to `new Date()`. */
|
||||
currentDate?: Date
|
||||
|
||||
/**
|
||||
* Array of required Claim Names that must be present in the JWT Claims Set. Default is that: if
|
||||
* the {@link issuer `issuer` option} is set, then JWT "iss" (Issuer) Claim must be present; if the
|
||||
* {@link audience `audience` option} is set, then JWT "aud" (Audience) Claim must be present; if
|
||||
* the {@link subject `subject` option} is set, then JWT "sub" (Subject) Claim must be present; if
|
||||
* the {@link maxTokenAge `maxTokenAge` option} is set, then JWT "iat" (Issued At) Claim must be
|
||||
* present.
|
||||
*/
|
||||
requiredClaims?: string[]
|
||||
}
|
||||
|
||||
/** JWS Verification options. */
|
||||
export interface VerifyOptions extends CritOption {
|
||||
/**
|
||||
* A list of accepted JWS "alg" (Algorithm) Header Parameter values. By default all "alg"
|
||||
* (Algorithm) values applicable for the used key/secret are allowed.
|
||||
*
|
||||
* > [!NOTE]\
|
||||
* > Unsecured JWTs (`{ "alg": "none" }`) are never accepted by this API.
|
||||
*/
|
||||
algorithms?: string[]
|
||||
}
|
||||
|
||||
/** JWS Signing options. */
|
||||
export interface SignOptions extends CritOption {}
|
||||
|
||||
/** Recognized JWT Claims Set members, any other members may also be present. */
|
||||
export interface JWTPayload {
|
||||
/**
|
||||
* JWT Issuer
|
||||
*
|
||||
* @see {@link https://www.rfc-editor.org/rfc/rfc7519#section-4.1.1 RFC7519#section-4.1.1}
|
||||
*/
|
||||
iss?: string
|
||||
|
||||
/**
|
||||
* JWT Subject
|
||||
*
|
||||
* @see {@link https://www.rfc-editor.org/rfc/rfc7519#section-4.1.2 RFC7519#section-4.1.2}
|
||||
*/
|
||||
sub?: string
|
||||
|
||||
/**
|
||||
* JWT Audience
|
||||
*
|
||||
* @see {@link https://www.rfc-editor.org/rfc/rfc7519#section-4.1.3 RFC7519#section-4.1.3}
|
||||
*/
|
||||
aud?: string | string[]
|
||||
|
||||
/**
|
||||
* JWT ID
|
||||
*
|
||||
* @see {@link https://www.rfc-editor.org/rfc/rfc7519#section-4.1.7 RFC7519#section-4.1.7}
|
||||
*/
|
||||
jti?: string
|
||||
|
||||
/**
|
||||
* JWT Not Before
|
||||
*
|
||||
* @see {@link https://www.rfc-editor.org/rfc/rfc7519#section-4.1.5 RFC7519#section-4.1.5}
|
||||
*/
|
||||
nbf?: number
|
||||
|
||||
/**
|
||||
* JWT Expiration Time
|
||||
*
|
||||
* @see {@link https://www.rfc-editor.org/rfc/rfc7519#section-4.1.4 RFC7519#section-4.1.4}
|
||||
*/
|
||||
exp?: number
|
||||
|
||||
/**
|
||||
* JWT Issued At
|
||||
*
|
||||
* @see {@link https://www.rfc-editor.org/rfc/rfc7519#section-4.1.6 RFC7519#section-4.1.6}
|
||||
*/
|
||||
iat?: number
|
||||
|
||||
/** Any other JWT Claim Set member. */
|
||||
[propName: string]: unknown
|
||||
}
|
||||
|
||||
/** Flattened JWE JSON Serialization Syntax decryption result */
|
||||
export interface FlattenedDecryptResult {
|
||||
/** JWE AAD. */
|
||||
additionalAuthenticatedData?: Uint8Array
|
||||
|
||||
/** Plaintext. */
|
||||
plaintext: Uint8Array
|
||||
|
||||
/** JWE Protected Header. */
|
||||
protectedHeader?: JWEHeaderParameters
|
||||
|
||||
/** JWE Shared Unprotected Header. */
|
||||
sharedUnprotectedHeader?: JWEHeaderParameters
|
||||
|
||||
/** JWE Per-Recipient Unprotected Header. */
|
||||
unprotectedHeader?: JWEHeaderParameters
|
||||
}
|
||||
|
||||
/** General JWE JSON Serialization Syntax decryption result */
|
||||
export interface GeneralDecryptResult extends FlattenedDecryptResult {}
|
||||
|
||||
/** Compact JWE decryption result */
|
||||
export interface CompactDecryptResult {
|
||||
/** Plaintext. */
|
||||
plaintext: Uint8Array
|
||||
|
||||
/** JWE Protected Header. */
|
||||
protectedHeader: CompactJWEHeaderParameters
|
||||
}
|
||||
|
||||
/** Flattened JWS JSON Serialization Syntax verification result */
|
||||
export interface FlattenedVerifyResult {
|
||||
/** JWS Payload. */
|
||||
payload: Uint8Array
|
||||
|
||||
/** JWS Protected Header. */
|
||||
protectedHeader?: JWSHeaderParameters
|
||||
|
||||
/** JWS Unprotected Header. */
|
||||
unprotectedHeader?: JWSHeaderParameters
|
||||
}
|
||||
|
||||
/** General JWS JSON Serialization Syntax verification result */
|
||||
export interface GeneralVerifyResult extends FlattenedVerifyResult {}
|
||||
|
||||
/** Compact JWS verification result */
|
||||
export interface CompactVerifyResult {
|
||||
/** JWS Payload. */
|
||||
payload: Uint8Array
|
||||
|
||||
/** JWS Protected Header. */
|
||||
protectedHeader: CompactJWSHeaderParameters
|
||||
}
|
||||
|
||||
/** Signed JSON Web Token (JWT) verification result */
|
||||
export interface JWTVerifyResult<PayloadType = JWTPayload> {
|
||||
/** JWT Claims Set. */
|
||||
payload: PayloadType & JWTPayload
|
||||
|
||||
/** JWS Protected Header. */
|
||||
protectedHeader: JWTHeaderParameters
|
||||
}
|
||||
|
||||
/** Encrypted JSON Web Token (JWT) decryption result */
|
||||
export interface JWTDecryptResult<PayloadType = JWTPayload> {
|
||||
/** JWT Claims Set. */
|
||||
payload: PayloadType & JWTPayload
|
||||
|
||||
/** JWE Protected Header. */
|
||||
protectedHeader: CompactJWEHeaderParameters
|
||||
}
|
||||
|
||||
/** When key resolver functions are used this becomes part of successful resolves */
|
||||
export interface ResolvedKey {
|
||||
/** Key resolved from the key resolver function. */
|
||||
key: CryptoKey | Uint8Array
|
||||
}
|
||||
|
||||
/** Recognized Compact JWS Header Parameters, any other Header Members may also be present. */
|
||||
export interface CompactJWSHeaderParameters extends JWSHeaderParameters {
|
||||
alg: string
|
||||
}
|
||||
|
||||
/** Recognized Signed JWT Header Parameters, any other Header Members may also be present. */
|
||||
export interface JWTHeaderParameters extends CompactJWSHeaderParameters {
|
||||
b64?: true
|
||||
}
|
||||
|
||||
/** Recognized Compact JWE Header Parameters, any other Header Members may also be present. */
|
||||
export interface CompactJWEHeaderParameters extends JWEHeaderParameters {
|
||||
alg: string
|
||||
enc: string
|
||||
}
|
||||
|
||||
/** JSON Web Key Set */
|
||||
export interface JSONWebKeySet {
|
||||
keys: JWK[]
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link !KeyObject} is a representation of a key/secret available in the Node.js runtime. You may
|
||||
* use the Node.js runtime APIs {@link !createPublicKey}, {@link !createPrivateKey}, and
|
||||
* {@link !createSecretKey} to obtain a {@link !KeyObject} from your existing key material.
|
||||
*/
|
||||
export interface KeyObject {
|
||||
type: string
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link !CryptoKey} is a representation of a key/secret available in all supported runtimes. In
|
||||
* addition to the {@link key/import Key Import Functions} you may use the
|
||||
* {@link !SubtleCrypto.importKey} API to obtain a {@link !CryptoKey} from your existing key
|
||||
* material.
|
||||
*/
|
||||
export type CryptoKey = Extract<
|
||||
Awaited<ReturnType<typeof crypto.subtle.generateKey>>,
|
||||
{ type: string }
|
||||
>
|
||||
|
||||
/** Generic interface for JWT producing classes. */
|
||||
export interface ProduceJWT {
|
||||
/**
|
||||
* Set the "iss" (Issuer) Claim.
|
||||
*
|
||||
* @param issuer "Issuer" Claim value to set on the JWT Claims Set.
|
||||
*/
|
||||
setIssuer(issuer: string): this
|
||||
|
||||
/**
|
||||
* Set the "sub" (Subject) Claim.
|
||||
*
|
||||
* @param subject "sub" (Subject) Claim value to set on the JWT Claims Set.
|
||||
*/
|
||||
setSubject(subject: string): this
|
||||
|
||||
/**
|
||||
* Set the "aud" (Audience) Claim.
|
||||
*
|
||||
* @param audience "aud" (Audience) Claim value to set on the JWT Claims Set.
|
||||
*/
|
||||
setAudience(audience: string | string[]): this
|
||||
|
||||
/**
|
||||
* Set the "jti" (JWT ID) Claim.
|
||||
*
|
||||
* @param jwtId "jti" (JWT ID) Claim value to set on the JWT Claims Set.
|
||||
*/
|
||||
setJti(jwtId: string): this
|
||||
|
||||
/**
|
||||
* Set the "nbf" (Not Before) Claim.
|
||||
*
|
||||
* - If a `number` is passed as an argument it is used as the claim directly.
|
||||
* - If a `Date` instance is passed as an argument it is converted to unix timestamp and used as the
|
||||
* claim.
|
||||
* - If a `string` is passed as an argument it is resolved to a time span, and then added to the
|
||||
* current unix timestamp and used as the claim.
|
||||
*
|
||||
* Format used for time span should be a number followed by a unit, such as "5 minutes" or "1
|
||||
* day".
|
||||
*
|
||||
* Valid units are: "sec", "secs", "second", "seconds", "s", "minute", "minutes", "min", "mins",
|
||||
* "m", "hour", "hours", "hr", "hrs", "h", "day", "days", "d", "week", "weeks", "w", "year",
|
||||
* "years", "yr", "yrs", and "y". It is not possible to specify months. 365.25 days is used as an
|
||||
* alias for a year.
|
||||
*
|
||||
* If the string is suffixed with "ago", or prefixed with a "-", the resulting time span gets
|
||||
* subtracted from the current unix timestamp. A "from now" suffix can also be used for
|
||||
* readability when adding to the current unix timestamp.
|
||||
*
|
||||
* @param input "nbf" (Not Before) Claim value to set on the JWT Claims Set.
|
||||
*/
|
||||
setNotBefore(input: number | string | Date): this
|
||||
|
||||
/**
|
||||
* Set the "exp" (Expiration Time) Claim.
|
||||
*
|
||||
* - If a `number` is passed as an argument it is used as the claim directly.
|
||||
* - If a `Date` instance is passed as an argument it is converted to unix timestamp and used as the
|
||||
* claim.
|
||||
* - If a `string` is passed as an argument it is resolved to a time span, and then added to the
|
||||
* current unix timestamp and used as the claim.
|
||||
*
|
||||
* Format used for time span should be a number followed by a unit, such as "5 minutes" or "1
|
||||
* day".
|
||||
*
|
||||
* Valid units are: "sec", "secs", "second", "seconds", "s", "minute", "minutes", "min", "mins",
|
||||
* "m", "hour", "hours", "hr", "hrs", "h", "day", "days", "d", "week", "weeks", "w", "year",
|
||||
* "years", "yr", "yrs", and "y". It is not possible to specify months. 365.25 days is used as an
|
||||
* alias for a year.
|
||||
*
|
||||
* If the string is suffixed with "ago", or prefixed with a "-", the resulting time span gets
|
||||
* subtracted from the current unix timestamp. A "from now" suffix can also be used for
|
||||
* readability when adding to the current unix timestamp.
|
||||
*
|
||||
* @param input "exp" (Expiration Time) Claim value to set on the JWT Claims Set.
|
||||
*/
|
||||
setExpirationTime(input: number | string | Date): this
|
||||
|
||||
/**
|
||||
* Set the "iat" (Issued At) Claim.
|
||||
*
|
||||
* - If no argument is used the current unix timestamp is used as the claim.
|
||||
* - If a `number` is passed as an argument it is used as the claim directly.
|
||||
* - If a `Date` instance is passed as an argument it is converted to unix timestamp and used as the
|
||||
* claim.
|
||||
* - If a `string` is passed as an argument it is resolved to a time span, and then added to the
|
||||
* current unix timestamp and used as the claim.
|
||||
*
|
||||
* Format used for time span should be a number followed by a unit, such as "5 minutes" or "1
|
||||
* day".
|
||||
*
|
||||
* Valid units are: "sec", "secs", "second", "seconds", "s", "minute", "minutes", "min", "mins",
|
||||
* "m", "hour", "hours", "hr", "hrs", "h", "day", "days", "d", "week", "weeks", "w", "year",
|
||||
* "years", "yr", "yrs", and "y". It is not possible to specify months. 365.25 days is used as an
|
||||
* alias for a year.
|
||||
*
|
||||
* If the string is suffixed with "ago", or prefixed with a "-", the resulting time span gets
|
||||
* subtracted from the current unix timestamp. A "from now" suffix can also be used for
|
||||
* readability when adding to the current unix timestamp.
|
||||
*
|
||||
* @param input "iat" (Expiration Time) Claim value to set on the JWT Claims Set.
|
||||
*/
|
||||
setIssuedAt(input?: number | string | Date): this
|
||||
}
|
||||
9
mcp-server/node_modules/jose/dist/types/util/base64url.d.ts
generated
vendored
9
mcp-server/node_modules/jose/dist/types/util/base64url.d.ts
generated
vendored
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Base64URL encoding and decoding utilities
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
/** Decodes a Base64URL encoded input. */
|
||||
export declare function decode(input: Uint8Array | string): Uint8Array;
|
||||
/** Encodes an input using Base64URL with no padding. */
|
||||
export declare function encode(input: Uint8Array | string): string;
|
||||
18
mcp-server/node_modules/jose/dist/types/util/decode_jwt.d.ts
generated
vendored
18
mcp-server/node_modules/jose/dist/types/util/decode_jwt.d.ts
generated
vendored
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* JSON Web Token (JWT) Claims Set Decoding (no validation, no signature checking)
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/**
|
||||
* Decodes a signed JSON Web Token payload. This does not validate the JWT Claims Set types or
|
||||
* values. This does not validate the JWS Signature. For a proper Signed JWT Claims Set validation
|
||||
* and JWS signature verification use `jose.jwtVerify()`. For an encrypted JWT Claims Set validation
|
||||
* and JWE decryption use `jose.jwtDecrypt()`.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/jwt/decode'`.
|
||||
*
|
||||
* @param jwt JWT token in compact JWS serialization.
|
||||
*/
|
||||
export declare function decodeJwt<PayloadType = types.JWTPayload>(jwt: string): PayloadType & types.JWTPayload;
|
||||
17
mcp-server/node_modules/jose/dist/types/util/decode_protected_header.d.ts
generated
vendored
17
mcp-server/node_modules/jose/dist/types/util/decode_protected_header.d.ts
generated
vendored
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* JOSE Protected Header Decoding (JWE, JWS, all serialization syntaxes)
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/** JWE and JWS Header Parameters */
|
||||
export type ProtectedHeaderParameters = types.JWSHeaderParameters & types.JWEHeaderParameters;
|
||||
/**
|
||||
* Decodes the Protected Header of a JWE/JWS/JWT token utilizing any JOSE serialization.
|
||||
*
|
||||
* This function is exported (as a named export) from the main `'jose'` module entry point as well
|
||||
* as from its subpath export `'jose/decode/protected_header'`.
|
||||
*
|
||||
* @param token JWE/JWS/JWT token in any JOSE serialization.
|
||||
*/
|
||||
export declare function decodeProtectedHeader(token: string | object): ProtectedHeaderParameters;
|
||||
213
mcp-server/node_modules/jose/dist/types/util/errors.d.ts
generated
vendored
213
mcp-server/node_modules/jose/dist/types/util/errors.d.ts
generated
vendored
@@ -1,213 +0,0 @@
|
||||
/**
|
||||
* JOSE module errors and error codes
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
import type * as types from '../types.d.ts';
|
||||
/**
|
||||
* A generic Error that all other JOSE specific Error subclasses extend.
|
||||
*
|
||||
*/
|
||||
export declare class JOSEError extends Error {
|
||||
/**
|
||||
* A unique error code for the particular error subclass.
|
||||
*
|
||||
* @ignore
|
||||
*/
|
||||
static code: string;
|
||||
/** A unique error code for {@link JOSEError}. */
|
||||
code: string;
|
||||
/** @ignore */
|
||||
constructor(message?: string, options?: {
|
||||
cause?: unknown;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* An error subclass thrown when a JWT Claim Set member validation fails.
|
||||
*
|
||||
*/
|
||||
export declare class JWTClaimValidationFailed extends JOSEError {
|
||||
/** @ignore */
|
||||
static code: string;
|
||||
/** A unique error code for {@link JWTClaimValidationFailed}. */
|
||||
code: string;
|
||||
/** The Claim for which the validation failed. */
|
||||
claim: string;
|
||||
/** Reason code for the validation failure. */
|
||||
reason: string;
|
||||
/**
|
||||
* The parsed JWT Claims Set (aka payload). Other JWT claims may or may not have been verified at
|
||||
* this point. The JSON Web Signature (JWS) or a JSON Web Encryption (JWE) structures' integrity
|
||||
* has however been verified. Claims Set verification happens after the JWS Signature or JWE
|
||||
* Decryption processes.
|
||||
*/
|
||||
payload: types.JWTPayload;
|
||||
/** @ignore */
|
||||
constructor(message: string, payload: types.JWTPayload, claim?: string, reason?: string);
|
||||
}
|
||||
/**
|
||||
* An error subclass thrown when a JWT is expired.
|
||||
*
|
||||
*/
|
||||
export declare class JWTExpired extends JOSEError implements JWTClaimValidationFailed {
|
||||
/** @ignore */
|
||||
static code: string;
|
||||
/** A unique error code for {@link JWTExpired}. */
|
||||
code: string;
|
||||
/** The Claim for which the validation failed. */
|
||||
claim: string;
|
||||
/** Reason code for the validation failure. */
|
||||
reason: string;
|
||||
/**
|
||||
* The parsed JWT Claims Set (aka payload). Other JWT claims may or may not have been verified at
|
||||
* this point. The JSON Web Signature (JWS) or a JSON Web Encryption (JWE) structures' integrity
|
||||
* has however been verified. Claims Set verification happens after the JWS Signature or JWE
|
||||
* Decryption processes.
|
||||
*/
|
||||
payload: types.JWTPayload;
|
||||
/** @ignore */
|
||||
constructor(message: string, payload: types.JWTPayload, claim?: string, reason?: string);
|
||||
}
|
||||
/**
|
||||
* An error subclass thrown when a JOSE Algorithm is not allowed per developer preference.
|
||||
*
|
||||
*/
|
||||
export declare class JOSEAlgNotAllowed extends JOSEError {
|
||||
/** @ignore */
|
||||
static code: string;
|
||||
/** A unique error code for {@link JOSEAlgNotAllowed}. */
|
||||
code: string;
|
||||
}
|
||||
/**
|
||||
* An error subclass thrown when a particular feature or algorithm is not supported by this
|
||||
* implementation or JOSE in general.
|
||||
*
|
||||
*/
|
||||
export declare class JOSENotSupported extends JOSEError {
|
||||
/** @ignore */
|
||||
static code: string;
|
||||
/** A unique error code for {@link JOSENotSupported}. */
|
||||
code: string;
|
||||
}
|
||||
/**
|
||||
* An error subclass thrown when a JWE ciphertext decryption fails.
|
||||
*
|
||||
*/
|
||||
export declare class JWEDecryptionFailed extends JOSEError {
|
||||
/** @ignore */
|
||||
static code: string;
|
||||
/** A unique error code for {@link JWEDecryptionFailed}. */
|
||||
code: string;
|
||||
/** @ignore */
|
||||
constructor(message?: string, options?: {
|
||||
cause?: unknown;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* An error subclass thrown when a JWE is invalid.
|
||||
*
|
||||
*/
|
||||
export declare class JWEInvalid extends JOSEError {
|
||||
/** @ignore */
|
||||
static code: string;
|
||||
/** A unique error code for {@link JWEInvalid}. */
|
||||
code: string;
|
||||
}
|
||||
/**
|
||||
* An error subclass thrown when a JWS is invalid.
|
||||
*
|
||||
*/
|
||||
export declare class JWSInvalid extends JOSEError {
|
||||
/** @ignore */
|
||||
static code: string;
|
||||
/** A unique error code for {@link JWSInvalid}. */
|
||||
code: string;
|
||||
}
|
||||
/**
|
||||
* An error subclass thrown when a JWT is invalid.
|
||||
*
|
||||
*/
|
||||
export declare class JWTInvalid extends JOSEError {
|
||||
/** @ignore */
|
||||
static code: string;
|
||||
/** A unique error code for {@link JWTInvalid}. */
|
||||
code: string;
|
||||
}
|
||||
/**
|
||||
* An error subclass thrown when a JWK is invalid.
|
||||
*
|
||||
*/
|
||||
export declare class JWKInvalid extends JOSEError {
|
||||
/** @ignore */
|
||||
static code: string;
|
||||
/** A unique error code for {@link JWKInvalid}. */
|
||||
code: string;
|
||||
}
|
||||
/**
|
||||
* An error subclass thrown when a JWKS is invalid.
|
||||
*
|
||||
*/
|
||||
export declare class JWKSInvalid extends JOSEError {
|
||||
/** @ignore */
|
||||
static code: string;
|
||||
/** A unique error code for {@link JWKSInvalid}. */
|
||||
code: string;
|
||||
}
|
||||
/**
|
||||
* An error subclass thrown when no keys match from a JWKS.
|
||||
*
|
||||
*/
|
||||
export declare class JWKSNoMatchingKey extends JOSEError {
|
||||
/** @ignore */
|
||||
static code: string;
|
||||
/** A unique error code for {@link JWKSNoMatchingKey}. */
|
||||
code: string;
|
||||
/** @ignore */
|
||||
constructor(message?: string, options?: {
|
||||
cause?: unknown;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* An error subclass thrown when multiple keys match from a JWKS.
|
||||
*
|
||||
*/
|
||||
export declare class JWKSMultipleMatchingKeys extends JOSEError {
|
||||
/** @ignore */
|
||||
[Symbol.asyncIterator]: () => AsyncIterableIterator<types.CryptoKey>;
|
||||
/** @ignore */
|
||||
static code: string;
|
||||
/** A unique error code for {@link JWKSMultipleMatchingKeys}. */
|
||||
code: string;
|
||||
/** @ignore */
|
||||
constructor(message?: string, options?: {
|
||||
cause?: unknown;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Timeout was reached when retrieving the JWKS response.
|
||||
*
|
||||
*/
|
||||
export declare class JWKSTimeout extends JOSEError {
|
||||
/** @ignore */
|
||||
static code: string;
|
||||
/** A unique error code for {@link JWKSTimeout}. */
|
||||
code: string;
|
||||
/** @ignore */
|
||||
constructor(message?: string, options?: {
|
||||
cause?: unknown;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* An error subclass thrown when JWS signature verification fails.
|
||||
*
|
||||
*/
|
||||
export declare class JWSSignatureVerificationFailed extends JOSEError {
|
||||
/** @ignore */
|
||||
static code: string;
|
||||
/** A unique error code for {@link JWSSignatureVerificationFailed}. */
|
||||
code: string;
|
||||
/** @ignore */
|
||||
constructor(message?: string, options?: {
|
||||
cause?: unknown;
|
||||
});
|
||||
}
|
||||
32
mcp-server/node_modules/jose/dist/webapi/index.js
generated
vendored
32
mcp-server/node_modules/jose/dist/webapi/index.js
generated
vendored
@@ -1,32 +0,0 @@
|
||||
export { compactDecrypt } from './jwe/compact/decrypt.js';
|
||||
export { flattenedDecrypt } from './jwe/flattened/decrypt.js';
|
||||
export { generalDecrypt } from './jwe/general/decrypt.js';
|
||||
export { GeneralEncrypt } from './jwe/general/encrypt.js';
|
||||
export { compactVerify } from './jws/compact/verify.js';
|
||||
export { flattenedVerify } from './jws/flattened/verify.js';
|
||||
export { generalVerify } from './jws/general/verify.js';
|
||||
export { jwtVerify } from './jwt/verify.js';
|
||||
export { jwtDecrypt } from './jwt/decrypt.js';
|
||||
export { CompactEncrypt } from './jwe/compact/encrypt.js';
|
||||
export { FlattenedEncrypt } from './jwe/flattened/encrypt.js';
|
||||
export { CompactSign } from './jws/compact/sign.js';
|
||||
export { FlattenedSign } from './jws/flattened/sign.js';
|
||||
export { GeneralSign } from './jws/general/sign.js';
|
||||
export { SignJWT } from './jwt/sign.js';
|
||||
export { EncryptJWT } from './jwt/encrypt.js';
|
||||
export { calculateJwkThumbprint, calculateJwkThumbprintUri } from './jwk/thumbprint.js';
|
||||
export { EmbeddedJWK } from './jwk/embedded.js';
|
||||
export { createLocalJWKSet } from './jwks/local.js';
|
||||
export { createRemoteJWKSet, jwksCache, customFetch } from './jwks/remote.js';
|
||||
export { UnsecuredJWT } from './jwt/unsecured.js';
|
||||
export { exportPKCS8, exportSPKI, exportJWK } from './key/export.js';
|
||||
export { importSPKI, importPKCS8, importX509, importJWK } from './key/import.js';
|
||||
export { decodeProtectedHeader } from './util/decode_protected_header.js';
|
||||
export { decodeJwt } from './util/decode_jwt.js';
|
||||
import * as errors from './util/errors.js';
|
||||
export { errors };
|
||||
export { generateKeyPair } from './key/generate_key_pair.js';
|
||||
export { generateSecret } from './key/generate_secret.js';
|
||||
import * as base64url from './util/base64url.js';
|
||||
export { base64url };
|
||||
export const cryptoRuntime = 'WebCryptoAPI';
|
||||
27
mcp-server/node_modules/jose/dist/webapi/jwe/compact/decrypt.js
generated
vendored
27
mcp-server/node_modules/jose/dist/webapi/jwe/compact/decrypt.js
generated
vendored
@@ -1,27 +0,0 @@
|
||||
import { flattenedDecrypt } from '../flattened/decrypt.js';
|
||||
import { JWEInvalid } from '../../util/errors.js';
|
||||
import { decoder } from '../../lib/buffer_utils.js';
|
||||
export async function compactDecrypt(jwe, key, options) {
|
||||
if (jwe instanceof Uint8Array) {
|
||||
jwe = decoder.decode(jwe);
|
||||
}
|
||||
if (typeof jwe !== 'string') {
|
||||
throw new JWEInvalid('Compact JWE must be a string or Uint8Array');
|
||||
}
|
||||
const { 0: protectedHeader, 1: encryptedKey, 2: iv, 3: ciphertext, 4: tag, length, } = jwe.split('.');
|
||||
if (length !== 5) {
|
||||
throw new JWEInvalid('Invalid Compact JWE');
|
||||
}
|
||||
const decrypted = await flattenedDecrypt({
|
||||
ciphertext,
|
||||
iv: iv || undefined,
|
||||
protected: protectedHeader,
|
||||
tag: tag || undefined,
|
||||
encrypted_key: encryptedKey || undefined,
|
||||
}, key, options);
|
||||
const result = { plaintext: decrypted.plaintext, protectedHeader: decrypted.protectedHeader };
|
||||
if (typeof key === 'function') {
|
||||
return { ...result, key: decrypted.key };
|
||||
}
|
||||
return result;
|
||||
}
|
||||
27
mcp-server/node_modules/jose/dist/webapi/jwe/compact/encrypt.js
generated
vendored
27
mcp-server/node_modules/jose/dist/webapi/jwe/compact/encrypt.js
generated
vendored
@@ -1,27 +0,0 @@
|
||||
import { FlattenedEncrypt } from '../flattened/encrypt.js';
|
||||
export class CompactEncrypt {
|
||||
#flattened;
|
||||
constructor(plaintext) {
|
||||
this.#flattened = new FlattenedEncrypt(plaintext);
|
||||
}
|
||||
setContentEncryptionKey(cek) {
|
||||
this.#flattened.setContentEncryptionKey(cek);
|
||||
return this;
|
||||
}
|
||||
setInitializationVector(iv) {
|
||||
this.#flattened.setInitializationVector(iv);
|
||||
return this;
|
||||
}
|
||||
setProtectedHeader(protectedHeader) {
|
||||
this.#flattened.setProtectedHeader(protectedHeader);
|
||||
return this;
|
||||
}
|
||||
setKeyManagementParameters(parameters) {
|
||||
this.#flattened.setKeyManagementParameters(parameters);
|
||||
return this;
|
||||
}
|
||||
async encrypt(key, options) {
|
||||
const jwe = await this.#flattened.encrypt(key, options);
|
||||
return [jwe.protected, jwe.encrypted_key, jwe.iv, jwe.ciphertext, jwe.tag].join('.');
|
||||
}
|
||||
}
|
||||
165
mcp-server/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js
generated
vendored
165
mcp-server/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js
generated
vendored
@@ -1,165 +0,0 @@
|
||||
import { decode as b64u } from '../../util/base64url.js';
|
||||
import { decrypt } from '../../lib/decrypt.js';
|
||||
import { JOSEAlgNotAllowed, JOSENotSupported, JWEInvalid } from '../../util/errors.js';
|
||||
import { isDisjoint } from '../../lib/is_disjoint.js';
|
||||
import { isObject } from '../../lib/is_object.js';
|
||||
import { decryptKeyManagement } from '../../lib/decrypt_key_management.js';
|
||||
import { decoder, concat, encode } from '../../lib/buffer_utils.js';
|
||||
import { generateCek } from '../../lib/cek.js';
|
||||
import { validateCrit } from '../../lib/validate_crit.js';
|
||||
import { validateAlgorithms } from '../../lib/validate_algorithms.js';
|
||||
import { normalizeKey } from '../../lib/normalize_key.js';
|
||||
import { checkKeyType } from '../../lib/check_key_type.js';
|
||||
export async function flattenedDecrypt(jwe, key, options) {
|
||||
if (!isObject(jwe)) {
|
||||
throw new JWEInvalid('Flattened JWE must be an object');
|
||||
}
|
||||
if (jwe.protected === undefined && jwe.header === undefined && jwe.unprotected === undefined) {
|
||||
throw new JWEInvalid('JOSE Header missing');
|
||||
}
|
||||
if (jwe.iv !== undefined && typeof jwe.iv !== 'string') {
|
||||
throw new JWEInvalid('JWE Initialization Vector incorrect type');
|
||||
}
|
||||
if (typeof jwe.ciphertext !== 'string') {
|
||||
throw new JWEInvalid('JWE Ciphertext missing or incorrect type');
|
||||
}
|
||||
if (jwe.tag !== undefined && typeof jwe.tag !== 'string') {
|
||||
throw new JWEInvalid('JWE Authentication Tag incorrect type');
|
||||
}
|
||||
if (jwe.protected !== undefined && typeof jwe.protected !== 'string') {
|
||||
throw new JWEInvalid('JWE Protected Header incorrect type');
|
||||
}
|
||||
if (jwe.encrypted_key !== undefined && typeof jwe.encrypted_key !== 'string') {
|
||||
throw new JWEInvalid('JWE Encrypted Key incorrect type');
|
||||
}
|
||||
if (jwe.aad !== undefined && typeof jwe.aad !== 'string') {
|
||||
throw new JWEInvalid('JWE AAD incorrect type');
|
||||
}
|
||||
if (jwe.header !== undefined && !isObject(jwe.header)) {
|
||||
throw new JWEInvalid('JWE Shared Unprotected Header incorrect type');
|
||||
}
|
||||
if (jwe.unprotected !== undefined && !isObject(jwe.unprotected)) {
|
||||
throw new JWEInvalid('JWE Per-Recipient Unprotected Header incorrect type');
|
||||
}
|
||||
let parsedProt;
|
||||
if (jwe.protected) {
|
||||
try {
|
||||
const protectedHeader = b64u(jwe.protected);
|
||||
parsedProt = JSON.parse(decoder.decode(protectedHeader));
|
||||
}
|
||||
catch {
|
||||
throw new JWEInvalid('JWE Protected Header is invalid');
|
||||
}
|
||||
}
|
||||
if (!isDisjoint(parsedProt, jwe.header, jwe.unprotected)) {
|
||||
throw new JWEInvalid('JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint');
|
||||
}
|
||||
const joseHeader = {
|
||||
...parsedProt,
|
||||
...jwe.header,
|
||||
...jwe.unprotected,
|
||||
};
|
||||
validateCrit(JWEInvalid, new Map(), options?.crit, parsedProt, joseHeader);
|
||||
if (joseHeader.zip !== undefined) {
|
||||
throw new JOSENotSupported('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');
|
||||
}
|
||||
const { alg, enc } = joseHeader;
|
||||
if (typeof alg !== 'string' || !alg) {
|
||||
throw new JWEInvalid('missing JWE Algorithm (alg) in JWE Header');
|
||||
}
|
||||
if (typeof enc !== 'string' || !enc) {
|
||||
throw new JWEInvalid('missing JWE Encryption Algorithm (enc) in JWE Header');
|
||||
}
|
||||
const keyManagementAlgorithms = options && validateAlgorithms('keyManagementAlgorithms', options.keyManagementAlgorithms);
|
||||
const contentEncryptionAlgorithms = options &&
|
||||
validateAlgorithms('contentEncryptionAlgorithms', options.contentEncryptionAlgorithms);
|
||||
if ((keyManagementAlgorithms && !keyManagementAlgorithms.has(alg)) ||
|
||||
(!keyManagementAlgorithms && alg.startsWith('PBES2'))) {
|
||||
throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed');
|
||||
}
|
||||
if (contentEncryptionAlgorithms && !contentEncryptionAlgorithms.has(enc)) {
|
||||
throw new JOSEAlgNotAllowed('"enc" (Encryption Algorithm) Header Parameter value not allowed');
|
||||
}
|
||||
let encryptedKey;
|
||||
if (jwe.encrypted_key !== undefined) {
|
||||
try {
|
||||
encryptedKey = b64u(jwe.encrypted_key);
|
||||
}
|
||||
catch {
|
||||
throw new JWEInvalid('Failed to base64url decode the encrypted_key');
|
||||
}
|
||||
}
|
||||
let resolvedKey = false;
|
||||
if (typeof key === 'function') {
|
||||
key = await key(parsedProt, jwe);
|
||||
resolvedKey = true;
|
||||
}
|
||||
checkKeyType(alg === 'dir' ? enc : alg, key, 'decrypt');
|
||||
const k = await normalizeKey(key, alg);
|
||||
let cek;
|
||||
try {
|
||||
cek = await decryptKeyManagement(alg, k, encryptedKey, joseHeader, options);
|
||||
}
|
||||
catch (err) {
|
||||
if (err instanceof TypeError || err instanceof JWEInvalid || err instanceof JOSENotSupported) {
|
||||
throw err;
|
||||
}
|
||||
cek = generateCek(enc);
|
||||
}
|
||||
let iv;
|
||||
let tag;
|
||||
if (jwe.iv !== undefined) {
|
||||
try {
|
||||
iv = b64u(jwe.iv);
|
||||
}
|
||||
catch {
|
||||
throw new JWEInvalid('Failed to base64url decode the iv');
|
||||
}
|
||||
}
|
||||
if (jwe.tag !== undefined) {
|
||||
try {
|
||||
tag = b64u(jwe.tag);
|
||||
}
|
||||
catch {
|
||||
throw new JWEInvalid('Failed to base64url decode the tag');
|
||||
}
|
||||
}
|
||||
const protectedHeader = jwe.protected !== undefined ? encode(jwe.protected) : new Uint8Array();
|
||||
let additionalData;
|
||||
if (jwe.aad !== undefined) {
|
||||
additionalData = concat(protectedHeader, encode('.'), encode(jwe.aad));
|
||||
}
|
||||
else {
|
||||
additionalData = protectedHeader;
|
||||
}
|
||||
let ciphertext;
|
||||
try {
|
||||
ciphertext = b64u(jwe.ciphertext);
|
||||
}
|
||||
catch {
|
||||
throw new JWEInvalid('Failed to base64url decode the ciphertext');
|
||||
}
|
||||
const plaintext = await decrypt(enc, cek, ciphertext, iv, tag, additionalData);
|
||||
const result = { plaintext };
|
||||
if (jwe.protected !== undefined) {
|
||||
result.protectedHeader = parsedProt;
|
||||
}
|
||||
if (jwe.aad !== undefined) {
|
||||
try {
|
||||
result.additionalAuthenticatedData = b64u(jwe.aad);
|
||||
}
|
||||
catch {
|
||||
throw new JWEInvalid('Failed to base64url decode the aad');
|
||||
}
|
||||
}
|
||||
if (jwe.unprotected !== undefined) {
|
||||
result.sharedUnprotectedHeader = jwe.unprotected;
|
||||
}
|
||||
if (jwe.header !== undefined) {
|
||||
result.unprotectedHeader = jwe.header;
|
||||
}
|
||||
if (resolvedKey) {
|
||||
return { ...result, key: k };
|
||||
}
|
||||
return result;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user