34 | )
35 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # [Errordactyl](https://errordactyl.com/)
2 |
3 | Errordactyl is a tool that automates HTTP endpoint testing and error handling for web servers in the Node.js and Deno runtime environment.
4 |
5 | * **Simple:** Errordactyl utilizes a configuration file to store all route endpoints and their associated HTTP methods, making it easy to access or modify custom routes.
6 | * **Easy-to-run:** Errordactyl encapsulates its functionality into minimalist command line interface commands, allowing for a painless setup and execution.
7 | * **Readable:** Compiled error data gets returned from the error stream as a JSON object with elegant formatting to ensure error readability.
8 |
9 | # Installation
10 | * [Deno CLI Tool](https://github.com/oslabs-beta/errordactyl/tree/main/deno_cli/)
11 | * [VS Code Extension](https://github.com/oslabs-beta/errordactyl/tree/main/vscode_extension/)
12 |
13 |
14 | ## Contributing
15 |
16 | The main purpose of this repository is to provide a general overview of the architecture of the application. Development of the tool is ongoing and we are open to any contributions that may be provided from curious onlookers and users.
17 |
--------------------------------------------------------------------------------
/vscode_extension/src/components/RunButtons.tsx:
--------------------------------------------------------------------------------
1 | import { VSCodeButton } from '@vscode/webview-ui-toolkit/react';
2 | import { MdArrowForwardIos, MdDoubleArrow } from 'react-icons/md';
3 | import { endpoint } from '../../types';
4 | import { VSCodeAPI } from '../utils/vsCodeApi';
5 |
6 | interface RunBtnProps {
7 | selectedRoutes: endpoint[]
8 | }
9 |
10 | // buttons to run either batch endpoints or selected
11 | export default function RunButtons({selectedRoutes}:RunBtnProps) {
12 |
13 | const handleSelectClick = () => {
14 | console.log("selected Routes", selectedRoutes);
15 | }
16 |
17 | const handleRunAllClick = () => {
18 | VSCodeAPI.postMessage({action: 'test-routes'});
19 | }
20 |
21 | return (
22 |
23 | handleSelectClick()}>
24 |
25 | Test selected routes
26 |
27 | handleRunAllClick()}>
28 |
29 | Test all routes
30 |
31 |