Skip to content

Commit 9513493

Browse files
committed
integration
Now, it can be build with maven, we can debug using "yarn debug" Updated readme
1 parent d96bc53 commit 9513493

23 files changed

Lines changed: 13409 additions & 1214 deletions

pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,27 @@
9696
<target>${java.version}</target>
9797
</configuration>
9898
</plugin>
99+
<plugin>
100+
<groupId>org.codehaus.mojo</groupId>
101+
<artifactId>exec-maven-plugin</artifactId>
102+
<version>3.1.0</version>
103+
<executions>
104+
<execution>
105+
<id>yarn install build</id>
106+
<phase>generate-sources</phase>
107+
<goals>
108+
<goal>exec</goal>
109+
</goals>
110+
<configuration>
111+
<executable>yarn</executable>
112+
<arguments>
113+
<argument>installAndBuild</argument>
114+
</arguments>
115+
<workingDirectory>${project.basedir}/web-report</workingDirectory>
116+
</configuration>
117+
</execution>
118+
</executions>
119+
</plugin>
99120
</plugins>
100121
</build>
101122

web-report/README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Web Report
2+
3+
Web Fuzzing Commons (WFC): A set of standards and library support for facilitating fuzzing Web APIs.
4+
5+
6+
## Prerequisites
7+
8+
- Node.js (version 18.x or higher)
9+
- npm (comes with Node.js) or Yarn (version 1.22.x or higher)
10+
11+
## Installation
12+
13+
Install dependencies using npm:
14+
```bash
15+
npm install
16+
```
17+
18+
Or using Yarn:
19+
```bash
20+
yarn install
21+
```
22+
23+
## Development
24+
25+
To start the development server:
26+
27+
```bash
28+
npm run dev
29+
# or
30+
yarn dev
31+
```
32+
33+
The development server will start at `http://localhost:5173` by default.
34+
35+
## Building for Production
36+
37+
To build the project for production:
38+
39+
```bash
40+
npm run build
41+
# or
42+
yarn build
43+
```
44+
45+
The build artifacts will be stored in the `dist/` directory.
46+
47+
## Preview Production Build
48+
49+
To preview the production build locally:
50+
51+
```bash
52+
npm run preview
53+
# or
54+
yarn preview
55+
```
56+
57+
## Available Scripts
58+
59+
- `dev` - Start development server
60+
- `build` - Build for production
61+
- `preview` - Preview production build
62+
- `lint` - Run ESLint
63+
- `installAndBuild` - Install dependencies and build (Yarn only)

web-report/package-lock.json

Lines changed: 119 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web-report/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
8+
"generate": "json2ts ../src/main/resources/wfc/schemas/report.yaml src/types/GeneratedTypes.tsx",
89
"build": "tsc -b && vite build",
10+
"installAndBuild": "yarn install && yarn generate && tsc -b && vite build",
911
"lint": "eslint .",
10-
"preview": "vite preview"
12+
"preview": "vite preview",
13+
"debug": "cpx \"tests/static/*\" ../target/generated-sources/webreport && vite preview"
1114
},
1215
"dependencies": {
1316
"@radix-ui/react-accordion": "^1.2.3",
@@ -19,6 +22,7 @@
1922
"@tailwindcss/vite": "^4.0.14",
2023
"class-variance-authority": "^0.7.1",
2124
"clsx": "^2.1.1",
25+
"json-schema-to-typescript": "^15.0.4",
2226
"lucide-react": "^0.483.0",
2327
"react": "^19.0.0",
2428
"react-dom": "^19.0.0",
@@ -35,11 +39,12 @@
3539
"@types/react-dom": "^19.0.4",
3640
"@types/react-syntax-highlighter": "^15.5.13",
3741
"@vitejs/plugin-react": "^4.3.4",
42+
"cpx": "^1.5.0",
3843
"eslint": "^9.21.0",
3944
"eslint-plugin-react-hooks": "^5.1.0",
4045
"eslint-plugin-react-refresh": "^0.4.19",
4146
"globals": "^15.15.0",
42-
"typescript": "~5.7.2",
47+
"typescript": "^5.8.3",
4348
"typescript-eslint": "^8.24.1",
4449
"vite": "^6.2.0"
4550
}

web-report/src/App.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
import './App.css'
22
import {Dashboard} from "@/components/Dashboard.tsx";
33
import {useEffect, useState} from "react";
4-
import {ITestFilesType, ITypes} from "@/Types.tsx";
4+
import {WebFuzzingReport} from "@/types/GeneratedTypes.tsx";
55
import {LoadingScreen} from "@/components/LoadingScreen.tsx";
66
import {fetchFileContent} from "@/utils.tsx";
7+
import {ITestFiles} from "@/types/General.tsx";
78

89
function App() {
910

10-
const [data, setData] = useState<ITypes | null>(null);
11+
const [data, setData] = useState<WebFuzzingReport | null>(null);
1112
const [loading, setLoading] = useState(true);
1213
const [error, setError] = useState<string | null>(null);
13-
const [testFiles, setTestFiles] = useState<ITestFilesType[]>([]);
14+
const [testFiles, setTestFiles] = useState<ITestFiles[]>([]);
1415

1516
useEffect(() => {
1617
const fetchData = async () => {
1718
try {
18-
const jsonData = await fetchFileContent('./report.json') as ITypes;
19+
const jsonData = await fetchFileContent('./report.json') as WebFuzzingReport;
1920
setData(jsonData);
2021
} catch (error: Error | unknown) {
2122
if (error instanceof Error) {

0 commit comments

Comments
 (0)