-
Notifications
You must be signed in to change notification settings - Fork 212
[🧱 MCP Server Tool] Project Structure Cleanup #2699
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
Changes from 6 commits
aa032c1
5de9967
6a7096b
9804f33
09db6aa
76deb5e
067680c
fb01733
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -460,8 +460,13 @@ const getAnswersFromStdin = async () => { | |
| /** | ||
| * Prints the contents of program.json in a nicely formatted way and exits the process. | ||
| */ | ||
| const printProgramJsonAndExit = () => { | ||
| console.log(JSON.stringify(PROGRAM, null, 2)) | ||
| const printProgramJsonAndExit = async () => { | ||
| const output = JSON.stringify(PROGRAM, null, 2) | ||
| await new Promise((resolve) => { | ||
| process.stdout.write(output + '\n', () => { | ||
| resolve() | ||
| }) | ||
| }) | ||
|
Comment on lines
+463
to
+469
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was a bug that I originally made where the output was being printed and the program exited before the standard out could be flushed. This fixes that problem. |
||
| process.exit(0) | ||
| } | ||
|
|
||
|
|
@@ -490,7 +495,7 @@ const main = async (opts) => { | |
|
|
||
| // Exit if the preset provided is not valid. | ||
| if (displayProgram) { | ||
| printProgramJsonAndExit() | ||
| await printProgramJsonAndExit() | ||
| } | ||
|
|
||
| // Exit if the preset provided is not valid. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,9 +4,4 @@ | |
| * SPDX-License-Identifier: BSD-3-Clause | ||
| * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
| */ | ||
| const parentConfig = require('@salesforce/pwa-kit-dev/configs/babel/babel-config').default | ||
|
|
||
| module.exports = { | ||
| ...parentConfig, | ||
| sourceType: 'module' | ||
| } | ||
| module.exports = require('internal-lib-build/configs/babel.config') | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Module type was no longer required and our project is not an esm project anymore but we still use import syntax. Its a little weird, but that is how we currently do it in the pwa-kit mono repo. We could choose to change this, but we might have to drop pwa-kit-dev as a source of our jest integration. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,21 +4,16 @@ | |
| * SPDX-License-Identifier: BSD-3-Clause | ||
| * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
| */ | ||
| // eslint-disable-next-line @typescript-eslint/no-var-requires | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixing some lint errors now that we have linting for all files working. |
||
| const parentConfig = require('@salesforce/pwa-kit-dev/configs/jest/jest.config.js') | ||
|
|
||
| module.exports = { | ||
| ...parentConfig, | ||
| testEnvironment: 'node', | ||
| testMatch: [ | ||
| '**/__tests__/**/*.js', | ||
| '**/?(*.)+(spec|test).js' | ||
| ], | ||
| collectCoverageFrom: [ | ||
| 'src/**/*.js', | ||
| '!src/**/*.test.js', | ||
| '!src/**/*.spec.js' | ||
| ], | ||
| testMatch: ['**/__tests__/**/*.js', '**/?(*.)+(spec|test).js'], | ||
| testPathIgnorePatterns: ['bin/*', 'coverage/*', 'dist/*', 'node_modules/*', 'scripts/*'], | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dont test node modules etc. |
||
| collectCoverageFrom: ['src/**/*.js', '!src/**/*.test.js', '!src/**/*.spec.js'], | ||
| coverageDirectory: 'coverage', | ||
| coverageReporters: ['text', 'lcov', 'html'], | ||
| testTimeout: 10000 | ||
| } | ||
| } | ||
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.
I'm not sure why this was added as it wasn't in develop, so I removed it. Things still work without it.