Skip to content

Commit e2df2ed

Browse files
committed
Merge remote-tracking branch 'origin/staging' into dev_fang
2 parents 7b473b2 + e23db06 commit e2df2ed

33 files changed

+6584
-831
lines changed

.github/workflows/build-deploy-zodiac.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ on:
77
- dev-fan
88
- dev_mario
99
- dev_fang
10+
- staging
1011

1112
jobs:
1213
deploy:
1314
runs-on: ubuntu-22.04
15+
env:
16+
CI: false
1417

1518
steps:
1619
- name: Check out the repository
@@ -27,6 +30,11 @@ jobs:
2730
run: |
2831
echo "Building for /dev/${{ env.BRANCH_NAME }}/"
2932
PUBLIC_URL="/dev/${{ env.BRANCH_NAME }}/" yarn build
33+
34+
- name: Copy JS libraries (jdata, bjdata etc.)
35+
run: |
36+
mkdir -p build/js
37+
cp -r public/js/* build/js/
3038
3139
- name: Copy package to server
3240
uses: NeuroJSON/[email protected]

.github/workflows/validate.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
jobs:
99
validate:
1010
runs-on: ubuntu-latest
11+
env:
12+
CI: false
1113

1214
steps:
1315
- name: Check out the repository
@@ -28,5 +30,5 @@ jobs:
2830
run: |
2931
PUBLIC_URL="/dev/${{ github.head_ref }}/" yarn build
3032
31-
- name: Run Security Audit
32-
run: yarn audit --level moderate
33+
- name: Run Security Audit (non-blocking)
34+
run: yarn audit --level moderate || echo "Ignoring audit failure for now"

build-log.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
yarn run v1.22.22
2+
$ craco build --debug
3+
Creating an optimized production build...
4+
Compiled with warnings.
5+
6+
Critical dependency: the request of a dependency is an expression
7+
8+
Search for the keywords to learn more about each warning.
9+
To ignore, add // eslint-disable-next-line to the line before.
10+
11+
File sizes after gzip:
12+
13+
717.18 kB build/static/js/main.30f0cad2.js
14+
15+
The bundle size is significantly larger than recommended.
16+
Consider reducing it with code splitting: https://goo.gl/9VhYWB
17+
You can also analyze the project dependencies: https://goo.gl/LeUzfb
18+
19+
The project was built assuming it is hosted at /.
20+
You can control this with the homepage field in your package.json.
21+
22+
The build folder is ready to be deployed.
23+
You may serve it with a static server:
24+
25+
yarn global add serve
26+
serve -s build
27+
28+
Find out more about deployment here:
29+
30+
https://cra.link/deployment
31+
32+
Done in 15.95s.

craco.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
webpack: {
3+
configure: (webpackConfig) => {
4+
webpackConfig.resolve.fallback = {
5+
...webpackConfig.resolve.fallback,
6+
path: require.resolve("path-browserify"),
7+
};
8+
9+
webpackConfig.module.rules.push({
10+
test: /\.js$/,
11+
parser: {
12+
requireEnsure: false, // Prevents Webpack from treating require() as a critical dependency
13+
},
14+
});
15+
16+
webpackConfig.ignoreWarnings = [/the request of a dependency is an expression/];
17+
18+
return webpackConfig;
19+
},
20+
},
21+
};

package.json

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"3d-force-graph": "^1.73.4",
77
"@babel/helpers": "7.26.10",
88
"@babel/runtime": "7.26.10",
9+
"@craco/craco": "^7.1.0",
910
"@emotion/react": "^11.11.1",
1011
"@emotion/styled": "^11.11.0",
1112
"@mui/icons-material": "^5.14.3",
@@ -17,19 +18,30 @@
1718
"@types/jest": "^27.0.1",
1819
"@types/react": "^18.0.0",
1920
"@types/react-dom": "^18.0.0",
20-
"@types/three": "^0.169.0",
21-
"axios": "1.8.2",
21+
"@types/three": "^0.174.0",
22+
"ajv": "^8",
23+
"ajv-keywords": "^5",
24+
"axios": "^1.4.0",
25+
"bda": "^1.0.0",
26+
"bjd": "^0.3.2",
27+
"buffer": "^6.0.3",
2228
"dayjs": "^1.11.10",
29+
"jda": "^0.4.0",
30+
"jquery": "^3.7.1",
31+
"json-stringify-safe": "^5.0.1",
2332
"jwt-decode": "^3.1.2",
33+
"path-browserify": "^1.0.1",
2434
"query-string": "^8.1.0",
2535
"react": "^18.2.0",
2636
"react-dom": "^18.2.0",
2737
"react-json-view": "^1.21.3",
2838
"react-redux": "^8.1.2",
2939
"react-router-dom": "^6.15.0",
3040
"react-scripts": "^5.0.1",
31-
"three": "^0.169.0",
41+
"sharp": "^0.33.5",
42+
"stats-js": "^1.0.1",
3243
"typescript": "^5.1.6",
44+
"uplot": "^1.6.31",
3345
"web-vitals": "^2.1.0"
3446
},
3547
"devDependencies": {
@@ -49,10 +61,10 @@
4961
"prettier": "^2.3.1"
5062
},
5163
"scripts": {
52-
"start": "react-scripts start",
53-
"build": "react-scripts build",
54-
"test": "react-scripts test",
55-
"eject": "react-scripts eject",
64+
"start": "craco start || react-scripts start",
65+
"build": "craco build || react-scripts build",
66+
"test": "craco test || react-scripts test",
67+
"eject": "craco eject || react-scripts eject",
5668
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}' --ext .js,.jsx,.ts,.tsx"
5769
},
5870
"browserslist": {

public/.htaccess

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<IfModule mod_rewrite.c>
2+
3+
RewriteEngine on
4+
# RewriteBase /dev/dev-fan
5+
6+
# Don't rewrite files or directories
7+
RewriteCond %{REQUEST_FILENAME} -f [OR]
8+
RewriteCond %{REQUEST_FILENAME} -d
9+
RewriteRule ^ - [L]
10+
11+
# Rewrite everything else to index.html to allow html5 state links
12+
RewriteRule ^ /dev/dev-fan/index.html [L]
13+
14+
#RewriteCond %{REQUEST_FILENAME} (.*)/databases/.*$
15+
#RewriteRule ^(.*)/databases/.*  $1/index.html [QSA,L]
16+
</IfModule>

public/index.html

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="es">
2+
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
55
<link rel="icon" href="io_fav.png" />
@@ -44,7 +44,43 @@
4444
rel="stylesheet"
4545
/>
4646

47+
<!-- <link
48+
rel="stylesheet"
49+
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css"
50+
/> -->
51+
4752
<title>NeuroJSON.io - Free Data Worth Sharing</title>
53+
<link rel="stylesheet" href="https://leeoniya.github.io/uPlot/dist/uPlot.min.css" />
54+
<style>
55+
#chartpanel {
56+
background-color: #707070;
57+
padding: 10px;
58+
display: block;
59+
margin-top: 20px;
60+
border-radius: 10px;
61+
}
62+
63+
#chartpanel h4 {
64+
padding-top: 0;
65+
margin-bottom: 10px;
66+
color: black;
67+
}
68+
69+
#chartpanel a.closebtn {
70+
float: right;
71+
font-size: 28px;
72+
font-weight: bold;
73+
color: yellow;
74+
text-decoration: none;
75+
margin-top: -10px;
76+
}
77+
78+
.uplot {
79+
margin: auto;
80+
max-width: 100%;
81+
}
82+
</style>
83+
4884
</head>
4985
<body>
5086
<noscript>You need to enable JavaScript to run this app.</noscript>
@@ -59,5 +95,19 @@
5995
To begin the development, run `npm start` or `yarn start`.
6096
To create a production bundle, use `npm run build` or `yarn build`.
6197
-->
98+
<!-- ✅ Global Script Dependencies -->
99+
<script src="https://unpkg.com/jquery"></script>
100+
<script src="%PUBLIC_URL%/js/jsonview.js"></script>
101+
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/0.145.0/three.min.js"></script>
102+
<script src="https://unpkg.com/[email protected]/build/stats.min.js"></script>
103+
<script src="https://cdnjs.cloudflare.com/ajax/libs/numjs/0.16.0/numjs.min.js"></script>
104+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.11/pako.min.js"></script>
105+
<script src="%PUBLIC_URL%/js/js_lzma.js"></script>
106+
<script src="%PUBLIC_URL%/js/js_lzma_shim.js"></script>
107+
<script src="%PUBLIC_URL%/js/jdata.js"></script>
108+
<script src="%PUBLIC_URL%/js/bjdata.js"></script>
109+
<script src="https://bundle.run/[email protected]"></script>
110+
<script>var buffer_module = buffer;</script>
111+
<script src="https://leeoniya.github.io/uPlot/dist/uPlot.iife.min.js"></script>
62112
</body>
63113
</html>

0 commit comments

Comments
 (0)