mysql-dashboard 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DEVELOPMENT.md +32 -0
- package/README.md +37 -0
- package/lib/index.js +927 -0
- package/output/index.html +13 -0
- package/output/static/index.css +1458 -0
- package/output/static/index.css.map +1 -0
- package/output/static/index.js +444 -0
- package/output/static/index.js.map +7 -0
- package/package.json +48 -0
- package/start.mjs +40 -0
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mysql-dashboard",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Web-based MySQL database management tool (f2e-server3)",
|
|
5
|
+
"main": "start.mjs",
|
|
6
|
+
"module": "start.mjs",
|
|
7
|
+
"files": ["lib", "output", "start.mjs", "README.md", "DEVELOPMENT.md"],
|
|
8
|
+
"bin": {
|
|
9
|
+
"mysql-dashboard": "start.mjs"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"lint": "biome check --fix --unsafe ./src",
|
|
13
|
+
"clean": "rm -rf lib output",
|
|
14
|
+
"build:server": "esbuild server/index.ts --bundle --outfile=lib/index.js --platform=node --external:mysql2 --external:f2e-server3",
|
|
15
|
+
"build": "npm run lint && npm run build:server && node start.mjs -m build",
|
|
16
|
+
"dev": "npm run build:server && node start.mjs -m dev",
|
|
17
|
+
"start": "node start.mjs -m prod",
|
|
18
|
+
"prepublishOnly": "npm run build",
|
|
19
|
+
"test": "npm run build:server && node start.mjs -m dev"
|
|
20
|
+
},
|
|
21
|
+
"keywords": ["f2e-server3", "esbuild", "react", "tailwindcss", "mysql"],
|
|
22
|
+
"author": "shy2850",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://gitee.com/shy9120/mysql-dashboard.git"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@biomejs/biome": "^2.3.2",
|
|
30
|
+
"@tailwindcss/postcss": "^4.1.5",
|
|
31
|
+
"@types/node": "^24.10.2",
|
|
32
|
+
"@types/react": "^19.0.8",
|
|
33
|
+
"@types/react-dom": "^19.0.3",
|
|
34
|
+
"@types/react-router-dom": "^5.3.3",
|
|
35
|
+
"chokidar": "^4.0.3",
|
|
36
|
+
"esbuild": "^0.25.0",
|
|
37
|
+
"react": "^19.0.0",
|
|
38
|
+
"react-dom": "^19.0.0"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@ant-design/icons": "^6.1.0",
|
|
42
|
+
"antd": "^6.1.0",
|
|
43
|
+
"f2e-server3": "^1.13.7",
|
|
44
|
+
"mysql2": "^3.15.3",
|
|
45
|
+
"react-markdown": "^10.1.0",
|
|
46
|
+
"react-router-dom": "^7.10.1"
|
|
47
|
+
}
|
|
48
|
+
}
|
package/start.mjs
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-check
|
|
3
|
+
import { Command, logger, ModeOptions, createServer, LogLevelOptions, dynamicImport } from "f2e-server3"
|
|
4
|
+
import * as path from 'node:path'
|
|
5
|
+
import "./lib/index.js"
|
|
6
|
+
|
|
7
|
+
const outputDir = 'output'
|
|
8
|
+
const app = new Command('mysql-dashboard')
|
|
9
|
+
.option('-m, --mode <mode>', 'server mode: dev, build or prod', 'prod', ModeOptions)
|
|
10
|
+
.option('-l, --level <level>', 'debug level: DEBUG, INFO, WARN, ERROR', 'DEBUG', LogLevelOptions)
|
|
11
|
+
.option('-p, --port <port>', 'server port', 7018)
|
|
12
|
+
.action(async (options) => {
|
|
13
|
+
const { mode, port, level } = options
|
|
14
|
+
logger.setLevel(level)
|
|
15
|
+
let postcss
|
|
16
|
+
if (mode !== 'prod') {
|
|
17
|
+
const tailwindcss = await dynamicImport('@tailwindcss/postcss')
|
|
18
|
+
postcss = {
|
|
19
|
+
entryPoints: {
|
|
20
|
+
in: 'src/index.css',
|
|
21
|
+
out: 'static/index.css',
|
|
22
|
+
},
|
|
23
|
+
plugins: [tailwindcss()],
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
createServer({
|
|
27
|
+
root: mode === 'prod' ? path.resolve(import.meta.dirname, outputDir) : undefined,
|
|
28
|
+
mode,
|
|
29
|
+
port,
|
|
30
|
+
gzip: true,
|
|
31
|
+
buildFilter: pathname => /^(index|static|$)/.test(pathname),
|
|
32
|
+
watchFilter: pathname => /^(index|src|$)/.test(pathname),
|
|
33
|
+
outputFilter: pathname => /^(index|static|$)/.test(pathname),
|
|
34
|
+
postcss,
|
|
35
|
+
try_files: 'index.html',
|
|
36
|
+
dest: outputDir,
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
app.parse(process.argv)
|