@microsoft/m365agentstoolkit-mcp 0.1.0-alpha.0fa12bc9d.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +70 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +74 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Microsoft
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Microsoft 365 Agents Toolkit MCP Server
|
|
2
|
+
|
|
3
|
+
The Microsoft 365 Agents Toolkit MCP Server is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction)
|
|
4
|
+
server that provides a seamless connection between AI agents and developers for building apps and agents for Microsoft 365 and Microsoft 365 Copilot.
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
### What can you do with it?
|
|
9
|
+
|
|
10
|
+
M365 Agents Toolkit MCP Server is designed to help you:
|
|
11
|
+
- Build and deploy AI agents for Microsoft 365
|
|
12
|
+
- Integrate with Microsoft 365 Copilot features
|
|
13
|
+
- Access and manage app and agent templates
|
|
14
|
+
- Troubleshoot common issues effectively
|
|
15
|
+
|
|
16
|
+
## Currently Supported Tools
|
|
17
|
+
- Schema Fetcher for:
|
|
18
|
+
- App Manifest
|
|
19
|
+
- Declarative Agent Manifest
|
|
20
|
+
- API Plugin Manifest
|
|
21
|
+
- Microsoft 365 and Microsoft 365 Copilot Knowledge Retriever
|
|
22
|
+
- Apps and Agents Samples and Templates Retriever
|
|
23
|
+
- Troubleshooting Retriever
|
|
24
|
+
|
|
25
|
+
## Getting Started
|
|
26
|
+
|
|
27
|
+
The Microsoft 365 Agents Toolkit MCP Server requires Node.js to install and run the server. If you don't have it installed, follow the instructions [here](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
|
|
28
|
+
|
|
29
|
+
### Prerequisites
|
|
30
|
+
|
|
31
|
+
1. Install either the stable or Insiders release of VS Code:
|
|
32
|
+
* [💫 Stable release](https://code.visualstudio.com/download)
|
|
33
|
+
* [🔮 Insiders release](https://code.visualstudio.com/insiders)
|
|
34
|
+
2. Install the [GitHub Copilot](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) and [GitHub Copilot Chat](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat) extensions
|
|
35
|
+
3. Open VS Code in an empty folder
|
|
36
|
+
|
|
37
|
+
### Setup
|
|
38
|
+
|
|
39
|
+
#### Personal Access Token
|
|
40
|
+
|
|
41
|
+
[Create a GitHub Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with appropriate permissions:
|
|
42
|
+
- Go to [Personal access tokens](https://github.com/settings/tokens) (in GitHub Settings > Developer settings)
|
|
43
|
+
- Select which repositories you'd like this token to have access to (Public, All, or Select)
|
|
44
|
+
- Generate token
|
|
45
|
+
- Copy the generated token
|
|
46
|
+
|
|
47
|
+
#### Manual Install
|
|
48
|
+
|
|
49
|
+
For a step-by-step guide to install the Microsoft 365 Agents Toolkit MCP Server, follow these instructions:
|
|
50
|
+
|
|
51
|
+
- Add `.vscode/mcp.json`:
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"servers": {
|
|
55
|
+
"M365AgentsToolkit MCP Server": {
|
|
56
|
+
"command": "npx",
|
|
57
|
+
"args": [
|
|
58
|
+
"-y",
|
|
59
|
+
"@microsoft/m365agentstoolkit-mcp"
|
|
60
|
+
],
|
|
61
|
+
"env": {
|
|
62
|
+
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
This project is licensed under the [MIT License](LICENSE).
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(()=>{"use strict";var e={292:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fetchSchema=t.clearSchemaCache=t.SchemaTypeEnum=void 0;const r=o(569);t.SchemaTypeEnum=r.z.enum(["app_manifest","declarative_agent_manifest","api_plugin_manifest"]);const s={app_manifest:{baseUrl:"https://developer.microsoft.com/json-schemas/teams/{{version}}/MicrosoftTeams.schema.json"},declarative_agent_manifest:{baseUrl:"https://developer.microsoft.com/json-schemas/copilot/declarative-agent/{{version}}/schema.json"},api_plugin_manifest:{baseUrl:"https://developer.microsoft.com/json-schemas/copilot/plugin/{{version}}/schema.json"}},n={};t.clearSchemaCache=function(){Object.keys(n).forEach((e=>{delete n[e]}))},t.fetchSchema=async function(e,t){const o=`${e}:${t}`;if(n[o])return n[o];const r=s[e];if(!r)return`Unknown schema name: ${e}`;try{const e=r.baseUrl.replace("{{version}}",t),s=await fetch(e);if(!s.ok)throw new Error(`HTTP error with status: ${s.status}`);const i=await s.json(),a=JSON.stringify({schema_url:e,content:i});return n[o]=a,a}catch(e){return`Failed fetching schema at version: ${t}, error: ${e instanceof Error?e.message:String(e)}. Try different version.`}}},373:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.retrieveResource=t.ResourceTypeEnum=void 0;const r=o(569);t.ResourceTypeEnum=r.z.enum(["documents","samples","issues"]),t.retrieveResource=async function(e,t){try{const o=process.env.GITHUB_PERSONAL_ACCESS_TOKEN,r=process.env.RETRIEVER_API_ENDPOINT;if(!o)return"GITHUB_PERSONAL_ACCESS_TOKEN is not set, set it in your MCP server configuration to use this tool.";if(!r)return"RETRIEVER_API_ENDPOINT is not set, set it in your MCP server configuration to use this tool.";const s=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`},body:JSON.stringify({resource_type:e,question:t})});if(!s.ok)return`Fail to retrieve resource, ${s.status}: ${s.statusText}`;return(await s.json()).data}catch(e){return`Error retrieving resource: ${e instanceof Error?e.message:"Unknown error occurred"}`}}},569:e=>{e.exports=require("zod")},737:e=>{e.exports=require("@modelcontextprotocol/sdk/server/mcp.js")},752:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createServer=void 0;const r=o(737),s=o(569),n=o(292),i=o(373);t.createServer=function(){const e=new r.McpServer({name:"m365agentstoolkit-mcp",version:"0.1.0"});return e.tool("get_schema",'Get the schema for "App manifest", "Declarative agent manifest", "API plugin manifest", use it everytime before understanding, modifying or creating any of these manifest files.',{schema_name:n.SchemaTypeEnum.describe("name of schema"),schema_version:s.z.string().describe("version of schema")},(async({schema_name:e,schema_version:t})=>({content:[{type:"text",text:await(0,n.fetchSchema)(e,t)}]}))),e.tool("get_knowledge","Access comprehensive knowledge about Microsoft 365 and Microsoft 365 Copilot development. Use this tool everytime for questions related to Microsoft 365 and Microsoft 365 Copilot.",{question:s.z.string().describe("Question to use for knowledge retrieval")},(async({question:e})=>({content:[{type:"text",text:await(0,i.retrieveResource)("documents",e)}]}))),e.tool("get_samples","Access templates and code samples for Microsoft 365 and Microsoft 365 Copilot development. Use this tool when looking for implementation examples, starter templates, or reference architectures.",{question:s.z.string().describe("Query to find relevant samples and templates")},(async({question:e})=>({content:[{type:"text",text:await(0,i.retrieveResource)("samples",e)}]}))),e.tool("troubleshoot","Access troubleshooting solutions for common Microsoft 365 and Microsoft 365 Copilot development issues. Use this tool when encountering errors, unexpected behaviors, or implementation challenges.",{question:s.z.string().describe("Description of the issue or error you're experiencing")},(async({question:e})=>({content:[{type:"text",text:await(0,i.retrieveResource)("issues",e)}]}))),e}},802:e=>{e.exports=require("@modelcontextprotocol/sdk/server/stdio.js")}},t={};function o(r){var s=t[r];if(void 0!==s)return s.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,o),n.exports}(()=>{const e=o(802),t=o(752);(async function(){const o=(0,t.createServer)(),r=new e.StdioServerTransport;await o.connect(r)})().catch((e=>{console.error("Fatal error in main():",e),process.exit(1)}))})()})();
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","mappings":"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","sources":["webpack://@microsoft/m365agentstoolkit-mcp/./src/fetcher.ts","webpack://@microsoft/m365agentstoolkit-mcp/./src/retriever.ts","webpack://@microsoft/m365agentstoolkit-mcp/external commonjs \"zod\"","webpack://@microsoft/m365agentstoolkit-mcp/external commonjs \"@modelcontextprotocol/sdk/server/mcp.js\"","webpack://@microsoft/m365agentstoolkit-mcp/./src/server.ts","webpack://@microsoft/m365agentstoolkit-mcp/external commonjs \"@modelcontextprotocol/sdk/server/stdio.js\"","webpack://@microsoft/m365agentstoolkit-mcp/webpack/bootstrap","webpack://@microsoft/m365agentstoolkit-mcp/./src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { z } from \"zod\";\n\n/**\n * Schema types supported by the fetcher\n */\nexport const SchemaTypeEnum = z.enum([\n \"app_manifest\",\n \"declarative_agent_manifest\",\n \"api_plugin_manifest\",\n]);\nexport type SchemaType = z.infer<typeof SchemaTypeEnum>;\n\n/**\n * Interface for schema repository information\n */\ninterface SchemaRepository {\n baseUrl: string;\n}\n\n/**\n * Repository configurations for each schema type\n */\nconst schemaRepositories: Record<SchemaType, SchemaRepository> = {\n app_manifest: {\n baseUrl: `https://developer.microsoft.com/json-schemas/teams/{{version}}/MicrosoftTeams.schema.json`,\n },\n declarative_agent_manifest: {\n baseUrl: `https://developer.microsoft.com/json-schemas/copilot/declarative-agent/{{version}}/schema.json`,\n },\n api_plugin_manifest: {\n baseUrl: `https://developer.microsoft.com/json-schemas/copilot/plugin/{{version}}/schema.json`,\n },\n};\n\n/**\n * Cache for previously fetched schemas\n */\nconst schemaCache: Record<string, any> = {};\n\n/**\n * Clear the schema cache\n */\nexport function clearSchemaCache(): void {\n Object.keys(schemaCache).forEach((key) => {\n delete schemaCache[key];\n });\n}\n\n/**\n * Fetch schema from the appropriate repository\n * @param schemaName The type of schema to fetch\n * @param schemaVersion The version of the schema to fetch\n * @returns The requested schema as a JSON object with schema_url and content properties\n */\nexport async function fetchSchema(schemaName: SchemaType, schemaVersion: string): Promise<string> {\n // Create a cache key\n const cacheKey = `${schemaName}:${schemaVersion}`;\n\n // Check if we have this schema in cache\n if (schemaCache[cacheKey]) {\n return schemaCache[cacheKey];\n }\n\n const repository = schemaRepositories[schemaName];\n if (!repository) {\n return `Unknown schema name: ${schemaName}`;\n }\n\n try {\n const url = repository.baseUrl.replace(\"{{version}}\", schemaVersion);\n const response = await fetch(url);\n\n if (!response.ok) {\n throw new Error(`HTTP error with status: ${response.status}`);\n }\n\n const content = await response.json();\n\n const result = JSON.stringify({\n schema_url: url,\n content: content,\n });\n\n // Save to cache\n schemaCache[cacheKey] = result;\n\n return result;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n return `Failed fetching schema at version: ${schemaVersion}, error: ${errorMessage}. Try different version.`;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { z } from \"zod\";\n\nexport const ResourceTypeEnum = z.enum([\"documents\", \"samples\", \"issues\"]);\nexport type ResourceType = z.infer<typeof ResourceTypeEnum>;\n\n/**\n * Retrieves resources from the API service\n * @param resourceType The type of resource to retrieve\n * @param question The question to use for retrieval\n * @returns The retrieved resources or error message as string\n */\nexport async function retrieveResource(\n resourceType: ResourceType,\n question: string\n): Promise<string> {\n try {\n const token = process.env.GITHUB_PERSONAL_ACCESS_TOKEN;\n const apiEndpoint = process.env.RETRIEVER_API_ENDPOINT;\n\n if (!token) {\n return \"GITHUB_PERSONAL_ACCESS_TOKEN is not set, set it in your MCP server configuration to use this tool.\";\n }\n\n if (!apiEndpoint) {\n return \"RETRIEVER_API_ENDPOINT is not set, set it in your MCP server configuration to use this tool.\";\n }\n\n const response = await fetch(apiEndpoint, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${token}`,\n },\n body: JSON.stringify({\n resource_type: resourceType,\n question: question,\n }),\n });\n\n if (!response.ok) {\n return `Fail to retrieve resource, ${response.status}: ${response.statusText}`;\n }\n\n const data = await response.json();\n return data.data;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : \"Unknown error occurred\";\n return `Error retrieving resource: ${errorMessage}`;\n }\n}\n","module.exports = require(\"zod\");","module.exports = require(\"@modelcontextprotocol/sdk/server/mcp.js\");","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport { fetchSchema, SchemaTypeEnum } from \"./fetcher\";\nimport { retrieveResource } from \"./retriever\";\n\nexport function createServer(): McpServer {\n const server = new McpServer({\n name: \"m365agentstoolkit-mcp\",\n version: \"0.1.0\",\n });\n server.tool(\n \"get_schema\",\n 'Get the schema for \"App manifest\", \"Declarative agent manifest\", \"API plugin manifest\", use it everytime before understanding, modifying or creating any of these manifest files.',\n {\n schema_name: SchemaTypeEnum.describe(\"name of schema\"),\n schema_version: z.string().describe(\"version of schema\"),\n },\n async ({ schema_name, schema_version }) => {\n const schema = await fetchSchema(schema_name, schema_version);\n\n return {\n content: [\n {\n type: \"text\",\n text: schema,\n },\n ],\n };\n }\n );\n\n server.tool(\n \"get_knowledge\",\n \"Access comprehensive knowledge about Microsoft 365 and Microsoft 365 Copilot development. Use this tool everytime for questions related to Microsoft 365 and Microsoft 365 Copilot.\",\n {\n question: z.string().describe(\"Question to use for knowledge retrieval\"),\n },\n async ({ question }) => {\n const result = await retrieveResource(\"documents\", question);\n\n return {\n content: [\n {\n type: \"text\",\n text: result,\n },\n ],\n };\n }\n );\n\n server.tool(\n \"get_samples\",\n \"Access templates and code samples for Microsoft 365 and Microsoft 365 Copilot development. Use this tool when looking for implementation examples, starter templates, or reference architectures.\",\n {\n question: z.string().describe(\"Query to find relevant samples and templates\"),\n },\n async ({ question }) => {\n const result = await retrieveResource(\"samples\", question);\n\n return {\n content: [\n {\n type: \"text\",\n text: result,\n },\n ],\n };\n }\n );\n\n server.tool(\n \"troubleshoot\",\n \"Access troubleshooting solutions for common Microsoft 365 and Microsoft 365 Copilot development issues. Use this tool when encountering errors, unexpected behaviors, or implementation challenges.\",\n {\n question: z.string().describe(\"Description of the issue or error you're experiencing\"),\n },\n async ({ question }) => {\n const result = await retrieveResource(\"issues\", question);\n\n return {\n content: [\n {\n type: \"text\",\n text: result,\n },\n ],\n };\n }\n );\n\n return server;\n}\n","module.exports = require(\"@modelcontextprotocol/sdk/server/stdio.js\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","#!/usr/bin/env node\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\n\nimport { createServer } from \"./server\";\n\nasync function main() {\n const server: McpServer = createServer();\n const transport = new StdioServerTransport();\n await server.connect(transport);\n}\n\nmain().catch((error) => {\n console.error(\"Fatal error in main():\", error);\n process.exit(1);\n});\n"],"names":["SchemaTypeEnum","z","enum","schemaRepositories","app_manifest","baseUrl","declarative_agent_manifest","api_plugin_manifest","schemaCache","Object","keys","forEach","key","async","schemaName","schemaVersion","cacheKey","repository","url","replace","response","fetch","ok","Error","status","content","json","result","JSON","stringify","schema_url","error","message","String","ResourceTypeEnum","resourceType","question","token","process","env","GITHUB_PERSONAL_ACCESS_TOKEN","apiEndpoint","RETRIEVER_API_ENDPOINT","method","headers","Authorization","body","resource_type","statusText","data","module","exports","require","server","McpServer","name","version","tool","schema_name","describe","schema_version","string","type","text","fetchSchema","retrieveResource","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","createServer","transport","StdioServerTransport","connect","main","catch","console","exit"],"sourceRoot":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@microsoft/m365agentstoolkit-mcp",
|
|
3
|
+
"version": "0.1.0-alpha.0fa12bc9d.0",
|
|
4
|
+
"bin": {
|
|
5
|
+
"m365agentstoolkit-mcp": "./dist/index.js"
|
|
6
|
+
},
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "npm run build:prod",
|
|
9
|
+
"build:dev": "webpack --mode development",
|
|
10
|
+
"build:prod": "webpack --mode production",
|
|
11
|
+
"watch": "webpack --watch --mode development",
|
|
12
|
+
"start": "node ./dist/index.js",
|
|
13
|
+
"test:unit": "jest",
|
|
14
|
+
"precommit": "lint-staged",
|
|
15
|
+
"lint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\"",
|
|
16
|
+
"lint:staged": "lint-staged",
|
|
17
|
+
"lint:fix": "eslint --fix \"src/**/*.ts\" \"tests/**/*.ts\""
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"keywords": [
|
|
26
|
+
"mcp"
|
|
27
|
+
],
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/OfficeDev/teams-toolkit.git"
|
|
31
|
+
},
|
|
32
|
+
"author": "Microsoft Corporation",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"description": "MCP server for Microsoft 365 Agents Toolkit",
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@modelcontextprotocol/sdk": "^1.9.0",
|
|
37
|
+
"zod": "^3.24.2"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
41
|
+
"@types/jest": "^29.5.13",
|
|
42
|
+
"@types/node": "^20.10.0",
|
|
43
|
+
"@types/sinon": "^17.0.4",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^4.19.0",
|
|
45
|
+
"@typescript-eslint/parser": "^4.19.0",
|
|
46
|
+
"chai": "^5.2.0",
|
|
47
|
+
"eslint": "^7.29.0",
|
|
48
|
+
"eslint-plugin-header": "^3.1.1",
|
|
49
|
+
"eslint-plugin-import": "^2.25.2",
|
|
50
|
+
"eslint-plugin-no-secrets": "^0.8.9",
|
|
51
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
52
|
+
"jest": "^29.7.0",
|
|
53
|
+
"jest-environment-node": "^29.7.0",
|
|
54
|
+
"lint-staged": "^15.5.1",
|
|
55
|
+
"nock": "^14.0.4",
|
|
56
|
+
"prettier": "^2.4.1",
|
|
57
|
+
"shx": "^0.3.4",
|
|
58
|
+
"sinon": "^20.0.0",
|
|
59
|
+
"terser-webpack-plugin": "^5.3.14",
|
|
60
|
+
"ts-jest": "29.2.5",
|
|
61
|
+
"ts-loader": "^9.5.2",
|
|
62
|
+
"ts-node": "^9.1.1",
|
|
63
|
+
"typescript": "^4.4.4",
|
|
64
|
+
"webpack": "^5.99.7",
|
|
65
|
+
"webpack-cli": "^6.0.1",
|
|
66
|
+
"webpack-node-externals": "^3.0.0"
|
|
67
|
+
},
|
|
68
|
+
"lint-staged": {
|
|
69
|
+
"*.{js,jsx,css,ts,tsx}": [
|
|
70
|
+
"npx eslint --cache --fix --quiet"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"gitHead": "5af177a19a5fe04155526235434e3e9cd94fb9be"
|
|
74
|
+
}
|