@tarsislimadev/myadmin 0.1.0 → 0.1.2
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/.github/workflows/npm-publish.yaml +19 -0
- package/api/v1/index.js +19 -0
- package/config.js +1 -0
- package/index.js +9 -1
- package/package.json +8 -3
- package/public/index.html +16 -0
- package/public/index.js +1 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: Publish to NPM
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [created]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v6
|
|
12
|
+
- uses: actions/setup-node@v6
|
|
13
|
+
with:
|
|
14
|
+
node-version: "24"
|
|
15
|
+
registry-url: "https://registry.npmjs.org"
|
|
16
|
+
- run: npm publish
|
|
17
|
+
env:
|
|
18
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
19
|
+
- run: echo published
|
package/api/v1/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const express = require('express')
|
|
2
|
+
|
|
3
|
+
const router = express.Router()
|
|
4
|
+
|
|
5
|
+
router.get('databases/create', (req, res) => res.json({ status: 'error', message: 'Not implemented', data: null }))
|
|
6
|
+
|
|
7
|
+
router.get('databases/use', (req, res) => res.json({ status: 'error', message: 'Not implemented', data: null }))
|
|
8
|
+
|
|
9
|
+
router.get('tables/create', (req, res) => res.json({ status: 'error', message: 'Not implemented', data: null }))
|
|
10
|
+
|
|
11
|
+
router.get('tables/:id/select', (req, res) => res.json({ status: 'error', message: 'Not implemented', data: null }))
|
|
12
|
+
|
|
13
|
+
router.get('tables/:id/insert', (req, res) => res.json({ status: 'error', message: 'Not implemented', data: null }))
|
|
14
|
+
|
|
15
|
+
router.get('tables/:id/update', (req, res) => res.json({ status: 'error', message: 'Not implemented', data: null }))
|
|
16
|
+
|
|
17
|
+
router.get('tables/:id/delete', (req, res) => res.json({ status: 'error', message: 'Not implemented', data: null }))
|
|
18
|
+
|
|
19
|
+
module.exports = router
|
package/config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = { port: process.env.PORT || '8080' }
|
package/index.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const { port } = require('./config.js')
|
|
4
|
+
const express = require('express')
|
|
5
|
+
const app = express()
|
|
6
|
+
|
|
7
|
+
app.use(express.static('public'))
|
|
8
|
+
|
|
9
|
+
app.get('/api/v1', require('./api/v1/'))
|
|
10
|
+
|
|
11
|
+
app.listen(port, () => console.log(`Listening on ${port}`))
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarsislimadev/myadmin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Manage MySQL and MariaDB databases easily",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"bin":
|
|
6
|
+
"bin": {
|
|
7
|
+
"@tarsislimadev/myadmin": "./index.js"
|
|
8
|
+
},
|
|
7
9
|
"repository": {
|
|
8
10
|
"type": "git",
|
|
9
11
|
"url": "git+https://github.com/tarsislimadev/myadmin.git"
|
|
@@ -13,5 +15,8 @@
|
|
|
13
15
|
"bugs": {
|
|
14
16
|
"url": "https://github.com/tarsislimadev/myadmin/issues"
|
|
15
17
|
},
|
|
16
|
-
"homepage": "https://github.com/tarsislimadev/myadmin#readme"
|
|
18
|
+
"homepage": "https://github.com/tarsislimadev/myadmin#readme",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"express": "^5.2.1"
|
|
21
|
+
}
|
|
17
22
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>MyAdmin</title>
|
|
8
|
+
</head>
|
|
9
|
+
|
|
10
|
+
<body>
|
|
11
|
+
<div id="app"></div>
|
|
12
|
+
<script type="module" src="./index.js"></script>
|
|
13
|
+
<!-- ads -->
|
|
14
|
+
</body>
|
|
15
|
+
|
|
16
|
+
</html>
|
package/public/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.log('MyAdmin')
|