Skip to content

Commit 5bf6757

Browse files
committed
plug-in, plug-out
0 parents  commit 5bf6757

File tree

5 files changed

+142
-0
lines changed

5 files changed

+142
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

bin/dbgate-plugin.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env node
2+
3+
const rimraf = require('rimraf');
4+
const path = require('path');
5+
const os = require('os');
6+
const ncp = require('ncp');
7+
8+
const packageName = process.argv[2]
9+
if (!packageName) throw new Error('Missing package name')
10+
11+
const pluginDir = path.join(os.homedir(), 'dbgate-data', 'plugins', packageName)
12+
13+
rimraf.sync(pluginDir)
14+
ncp(process.cwd(), pluginDir)

bin/dbgate-plugout.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env node
2+
3+
const rimraf = require('rimraf');
4+
const path = require('path');
5+
const os = require('os');
6+
7+
const packageName = process.argv[2]
8+
if (!packageName) throw new Error('Missing package name')
9+
10+
const pluginDir = path.join(os.homedir(), 'dbgate-data', 'plugins', packageName)
11+
12+
rimraf.sync(pluginDir)

package.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "dbgate-plugin-tools",
3+
"version": "1.0.3",
4+
"homepage": "https://github.com/dbshell/dbgate-plugin-tools",
5+
"description": "Tools for DbGate plugin development",
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/dbshell/dbgate-plugin-tools.git"
9+
},
10+
"author": "Jan Prochazka",
11+
"license": "GPL",
12+
"keywords": [
13+
"development",
14+
"dbgate",
15+
"plugin"
16+
],
17+
"files": [
18+
"bin"
19+
],
20+
"bin": {
21+
"dbgate-plugin": "./bin/dbgate-plugin.js",
22+
"dbgate-plugout": "./bin/dbgate-plugout.js"
23+
},
24+
"dependencies": {
25+
"rimraf": "^3.0.2",
26+
"ncp": "^2.0.0"
27+
}
28+
}

yarn.lock

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
balanced-match@^1.0.0:
6+
version "1.0.0"
7+
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
8+
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
9+
10+
brace-expansion@^1.1.7:
11+
version "1.1.11"
12+
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
13+
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
14+
dependencies:
15+
balanced-match "^1.0.0"
16+
concat-map "0.0.1"
17+
18+
19+
version "0.0.1"
20+
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
21+
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
22+
23+
fs.realpath@^1.0.0:
24+
version "1.0.0"
25+
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
26+
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
27+
28+
glob@^7.1.3:
29+
version "7.1.6"
30+
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
31+
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
32+
dependencies:
33+
fs.realpath "^1.0.0"
34+
inflight "^1.0.4"
35+
inherits "2"
36+
minimatch "^3.0.4"
37+
once "^1.3.0"
38+
path-is-absolute "^1.0.0"
39+
40+
inflight@^1.0.4:
41+
version "1.0.6"
42+
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
43+
integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
44+
dependencies:
45+
once "^1.3.0"
46+
wrappy "1"
47+
48+
inherits@2:
49+
version "2.0.4"
50+
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
51+
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
52+
53+
minimatch@^3.0.4:
54+
version "3.0.4"
55+
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
56+
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
57+
dependencies:
58+
brace-expansion "^1.1.7"
59+
60+
ncp@^2.0.0:
61+
version "2.0.0"
62+
resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3"
63+
integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=
64+
65+
once@^1.3.0:
66+
version "1.4.0"
67+
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
68+
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
69+
dependencies:
70+
wrappy "1"
71+
72+
path-is-absolute@^1.0.0:
73+
version "1.0.1"
74+
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
75+
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
76+
77+
rimraf@^3.0.2:
78+
version "3.0.2"
79+
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
80+
integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
81+
dependencies:
82+
glob "^7.1.3"
83+
84+
wrappy@1:
85+
version "1.0.2"
86+
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
87+
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=

0 commit comments

Comments
 (0)