mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 15:16:00 +00:00
npm build dbgate
This commit is contained in:
35
.github/workflows/build-npm.yaml
vendored
35
.github/workflows/build-npm.yaml
vendored
@@ -48,3 +48,38 @@ jobs:
|
|||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish tools
|
||||||
|
working-directory: packages/tools
|
||||||
|
env:
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish sqltree
|
||||||
|
working-directory: packages/sqltree
|
||||||
|
env:
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish api
|
||||||
|
working-directory: packages/api
|
||||||
|
env:
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish web
|
||||||
|
working-directory: packages/web
|
||||||
|
env:
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate
|
||||||
|
working-directory: packages/dbgate
|
||||||
|
env:
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|||||||
1
packages/api/.npmrc
Normal file
1
packages/api/.npmrc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
||||||
@@ -8,6 +8,7 @@ const io = require('socket.io');
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const findFreePort = require('find-free-port');
|
const findFreePort = require('find-free-port');
|
||||||
const childProcessChecker = require('./utility/childProcessChecker');
|
const childProcessChecker = require('./utility/childProcessChecker');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
const useController = require('./utility/useController');
|
const useController = require('./utility/useController');
|
||||||
const socket = require('./utility/socket');
|
const socket = require('./utility/socket');
|
||||||
@@ -96,6 +97,14 @@ function start(argument = null) {
|
|||||||
process.send({ msgtype: 'listening', port });
|
process.send({ msgtype: 'listening', port });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
} else if (argument == 'startNodeWeb') {
|
||||||
|
app.use(express.static(path.join(__dirname, '../../dbgate-web/build')));
|
||||||
|
findFreePort(5000, function (err, port) {
|
||||||
|
server.listen(port, () => {
|
||||||
|
console.log(`DbGate API listening on port ${port}`);
|
||||||
|
process.send({ msgtype: 'listening', port });
|
||||||
|
});
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
server.listen(3000);
|
server.listen(3000);
|
||||||
}
|
}
|
||||||
|
|||||||
5
packages/dbgate/bin/dbgate.js
Normal file
5
packages/dbgate/bin/dbgate.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
const dbgateApi = require('dbgate-api');
|
||||||
|
|
||||||
|
dbgateApi.mainModule.start('startNodeWeb');
|
||||||
@@ -9,6 +9,9 @@
|
|||||||
"funding": "https://www.paypal.com/paypalme/JanProchazkaCz/30eur",
|
"funding": "https://www.paypal.com/paypalme/JanProchazkaCz/30eur",
|
||||||
"author": "Jan Prochazka",
|
"author": "Jan Prochazka",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"dbgate": "./bin/dbgate.js"
|
||||||
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"sql",
|
"sql",
|
||||||
"dbgate",
|
"dbgate",
|
||||||
|
|||||||
1
packages/sqltree/.npmrc
Normal file
1
packages/sqltree/.npmrc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
||||||
1
packages/tools/.npmrc
Normal file
1
packages/tools/.npmrc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
||||||
1
packages/web/.npmrc
Normal file
1
packages/web/.npmrc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dbgate-web",
|
"name": "dbgate-web",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"private": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ant-design/colors": "^5.0.0",
|
"@ant-design/colors": "^5.0.0",
|
||||||
"@mdi/font": "^5.8.55",
|
"@mdi/font": "^5.8.55",
|
||||||
@@ -38,10 +37,14 @@
|
|||||||
"styled-components": "^4.4.1",
|
"styled-components": "^4.4.1",
|
||||||
"uuid": "^3.4.0"
|
"uuid": "^3.4.0"
|
||||||
},
|
},
|
||||||
|
"files": [
|
||||||
|
"build"
|
||||||
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "cross-env BROWSER=none PORT=5000 react-scripts start",
|
"start": "cross-env BROWSER=none PORT=5000 react-scripts start",
|
||||||
"build:docker": "cross-env CI=false REACT_APP_API_URL=ORIGIN react-scripts build",
|
"build:docker": "cross-env CI=false REACT_APP_API_URL=ORIGIN react-scripts build",
|
||||||
"build:app": "cross-env PUBLIC_URL=. CI=false react-scripts build",
|
"build:app": "cross-env PUBLIC_URL=. CI=false react-scripts build",
|
||||||
|
"build": "cross-env CI=false REACT_APP_API_URL=ORIGIN react-scripts build",
|
||||||
"test": "react-scripts test",
|
"test": "react-scripts test",
|
||||||
"eject": "react-scripts eject",
|
"eject": "react-scripts eject",
|
||||||
"ts": "tsc"
|
"ts": "tsc"
|
||||||
|
|||||||
Reference in New Issue
Block a user