-
Notifications
You must be signed in to change notification settings - Fork 50
feat(token-analyzer-mcp): Token analyzer mcp scaffold #403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
brandonthomas
wants to merge
5
commits into
microsoft:main
Choose a base branch
from
brandonthomas:token-analyzer-mcp-scaffold
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5336b2c
scaffolding token-analyzer package
brandonthomas cb567ff
fixing erroneous changes
brandonthomas d61e5e0
Merge branch 'microsoft:main' into token-analyzer-mcp-scaffold
brandonthomas 552f384
scaffold token analyzer mcp package
brandonthomas 47b7b48
removing erroneous entry in nx.json
brandonthomas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { | ||
| "jsc": { | ||
| "target": "es2019", | ||
| "parser": { | ||
| "syntax": "typescript", | ||
| "tsx": true, | ||
| "decorators": false, | ||
| "dynamicImport": false | ||
| }, | ||
| "transform": { | ||
| "react": { | ||
| "runtime": "classic", | ||
| "useSpread": true | ||
| } | ||
| }, | ||
| "keepClassNames": true, | ||
| "externalHelpers": true, | ||
| "loose": true | ||
| }, | ||
| "sourceMaps": true, | ||
| "exclude": [ | ||
| "jest.config.ts", | ||
| ".*\\.spec.tsx?$", | ||
| ".*\\.test.tsx?$", | ||
| "./src/jest-setup.ts$", | ||
| "./**/jest-setup.ts$", | ||
| ".*.js$" | ||
| ], | ||
| "$schema": "https://json.schemastore.org/swcrc" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # token-analyzer-mcp | ||
|
|
||
| This library was generated with [Nx](https://nx.dev). | ||
|
|
||
| ## Building | ||
|
|
||
| Run `nx build token-analyzer-mcp` to build the library. | ||
|
|
||
| ## Running unit tests | ||
|
|
||
| Run `nx test token-analyzer-mcp` to execute the unit tests via [Jest](https://jestjs.io). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| const baseConfig = require('../../eslint.config.js'); | ||
|
|
||
| module.exports = [ | ||
| ...baseConfig, | ||
| { | ||
| files: ['**/*.json'], | ||
| rules: { | ||
| '@nx/dependency-checks': [ | ||
| 'error', | ||
| { | ||
| ignoredFiles: ['{projectRoot}/eslint.config.{js,cjs,mjs}'], | ||
| }, | ||
| ], | ||
| }, | ||
| languageOptions: { | ||
| parser: require('jsonc-eslint-parser'), | ||
| }, | ||
| }, | ||
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| const baseConfig = require('../../eslint.config.js'); | ||
|
|
||
| module.exports = [ | ||
| ...baseConfig, | ||
| { | ||
| files: ['**/*.ts', '**/*.tsx'], | ||
| // Override or add rules here | ||
| rules: {}, | ||
| }, | ||
| { | ||
| files: ['**/*.js', '**/*.jsx'], | ||
| // Override or add rules here | ||
| rules: {}, | ||
| }, | ||
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /* eslint-disable */ | ||
| import { readFileSync } from 'fs'; | ||
|
|
||
| // Reading the SWC compilation config and remove the "exclude" | ||
| // for the test files to be compiled by SWC | ||
| const { exclude: _, ...swcJestConfig } = JSON.parse( | ||
| readFileSync(`${__dirname}/.swcrc`, 'utf-8') | ||
| ); | ||
|
|
||
| // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. | ||
| // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" | ||
| if (swcJestConfig.swcrc === undefined) { | ||
| swcJestConfig.swcrc = false; | ||
| } | ||
|
|
||
| // Uncomment if using global setup/teardown files being transformed via swc | ||
| // https://nx.dev/nx-api/jest/documents/overview#global-setupteardown-with-nx-libraries | ||
| // jest needs EsModule Interop to find the default exported setup/teardown functions | ||
| // swcJestConfig.module.noInterop = false; | ||
|
|
||
| export default { | ||
| displayName: 'token-analyzer-mcp', | ||
| preset: '../../jest.preset.js', | ||
| transform: { | ||
| '^.+\\.[tj]s$': ['@swc/jest', swcJestConfig], | ||
| }, | ||
| moduleFileExtensions: ['ts', 'js', 'html'], | ||
| testEnvironment: 'node', | ||
| coverageDirectory: '../../coverage/packages/token-analyzer-mcp', | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "name": "@fluentui-contrib/token-analyzer-mcp", | ||
| "version": "0.0.1", | ||
| "main": "./src/index.js", | ||
| "types": "./src/index.d.ts", | ||
| "dependencies": {}, | ||
| "private": true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "name": "token-analyzer-mcp", | ||
| "$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
| "sourceRoot": "packages/token-analyzer-mcp/src", | ||
| "projectType": "library", | ||
| "tags": [], | ||
| "targets": { | ||
| "build": { | ||
| "executor": "@fluentui-contrib/nx-plugin:build" | ||
| }, | ||
| "lint": { | ||
| "executor": "@nx/eslint:lint", | ||
| "options": { | ||
| "lintFilePatterns": [ | ||
| "packages/token-analyzer-mcp/**/*.ts", | ||
| "packages/token-analyzer-mcp/**/*.tsx" | ||
| ] | ||
| } | ||
| }, | ||
| "test": { | ||
| "executor": "@nx/jest:jest", | ||
| "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], | ||
| "options": { | ||
| "jestConfig": "packages/token-analyzer-mcp/jest.config.ts", | ||
| "passWithNoTests": true | ||
| } | ||
| }, | ||
| "type-check": { | ||
| "executor": "@fluentui-contrib/nx-plugin:type-check" | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "extends": "../../tsconfig.base.json", | ||
| "files": [], | ||
| "compilerOptions": { | ||
| "jsx": "react" | ||
| }, | ||
| "include": [], | ||
| "references": [ | ||
| { | ||
| "path": "./tsconfig.lib.json" | ||
| }, | ||
| { | ||
| "path": "./tsconfig.spec.json" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "outDir": "../../dist/out-tsc", | ||
| "declaration": true | ||
| }, | ||
| "include": ["src/**/*.ts"], | ||
| "exclude": [ | ||
| "jest.config.ts", | ||
| "src/**/*.test.ts", | ||
| "src/**/*.test.tsx", | ||
| "files/**" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "outDir": "../../dist/out-tsc", | ||
| "module": "commonjs", | ||
| "types": ["jest", "node"] | ||
| }, | ||
| "include": [ | ||
| "jest.config.ts", | ||
| "src/**/*.test.ts", | ||
| "src/**/*.test.tsx", | ||
| "src/**/*.d.ts" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was also added by the generator ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked with source - it was, which is expected, as this lib is setting
nodeas jest envThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, there's no UI so no need for JSDOM test env.