dbdocs 0.6.4 → 0.7.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/bin/run +3 -3
- package/oclif.manifest.json +1 -1
- package/package.json +14 -14
- package/src/commands/build.js +5 -5
- package/src/commands/login.js +1 -1
- package/src/commands/logout.js +1 -1
- package/src/commands/ls.js +3 -4
- package/src/commands/password.js +5 -5
- package/src/commands/remove.js +2 -2
- package/src/commands/rename.js +1 -1
- package/src/commands/token.js +4 -4
- package/src/commands/validate.js +2 -2
- package/src/index.js +1 -1
- package/src/user_data.json +0 -1
package/bin/run
CHANGED
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.
|
|
1
|
+
{"version":"0.7.2","commands":{"build":{"id":"build","description":"build docs","strict":true,"pluginName":"dbdocs","pluginAlias":"dbdocs","pluginType":"core","aliases":[],"flags":{"project":{"name":"project","type":"option","description":"project name","multiple":false},"password":{"name":"password","type":"option","char":"p","description":"password for project","multiple":false}},"args":[{"name":"filepath","description":"dbml file path"}]},"login":{"id":"login","description":"login to dbdocs\nlogin with your dbdocs credentials\n","strict":true,"pluginName":"dbdocs","pluginAlias":"dbdocs","pluginType":"core","aliases":[],"flags":{},"args":[]},"logout":{"id":"logout","description":"logout\nclears local login credentials\n","strict":true,"pluginName":"dbdocs","pluginAlias":"dbdocs","pluginType":"core","aliases":[],"flags":{},"args":[]},"ls":{"id":"ls","description":"list projects","strict":true,"pluginName":"dbdocs","pluginAlias":"dbdocs","pluginType":"core","aliases":[],"flags":{},"args":[]},"password":{"id":"password","description":"set password for your project or remove password","strict":true,"pluginName":"dbdocs","pluginAlias":"dbdocs","pluginType":"core","aliases":[],"flags":{"project":{"name":"project","type":"option","char":"p","description":"project name","helpValue":"project name","multiple":false},"set":{"name":"set","type":"option","char":"s","description":"password for your project","helpValue":"password","multiple":false},"remove":{"name":"remove","type":"boolean","char":"r","description":"remove password from your project","allowNo":false}},"args":[]},"remove":{"id":"remove","description":"remove docs","strict":true,"pluginName":"dbdocs","pluginAlias":"dbdocs","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"project_name","description":"name of the project which you want to remove"}]},"rename":{"id":"rename","description":"change your username","strict":true,"pluginName":"dbdocs","pluginAlias":"dbdocs","pluginType":"core","aliases":[],"flags":{},"args":[]},"token":{"id":"token","description":"generate or revoke your authentication token","strict":true,"pluginName":"dbdocs","pluginAlias":"dbdocs","pluginType":"core","aliases":[],"flags":{"generate":{"name":"generate","type":"boolean","char":"g","description":"generate authentication token","allowNo":false},"revoke":{"name":"revoke","type":"boolean","char":"r","description":"revoke authentication token","allowNo":false}},"args":[]},"validate":{"id":"validate","description":"validate docs content","strict":true,"pluginName":"dbdocs","pluginAlias":"dbdocs","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"filepath","description":"dbml file path"}]}}}
|
package/package.json
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dbdocs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"author": "@holistics",
|
|
5
5
|
"bin": {
|
|
6
6
|
"dbdocs": "./bin/run"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@dbml/core": "^2.4.
|
|
10
|
-
"@oclif/
|
|
11
|
-
"@oclif/
|
|
12
|
-
"
|
|
13
|
-
"axios": "^0.19.0",
|
|
9
|
+
"@dbml/core": "^2.4.3",
|
|
10
|
+
"@oclif/core": "1.12.1",
|
|
11
|
+
"@oclif/plugin-help": "5.1.12",
|
|
12
|
+
"axios": "0.27.2",
|
|
14
13
|
"chalk": "^3.0.0",
|
|
15
|
-
"cli-ux": "^5.6.3",
|
|
16
14
|
"dotenv": "^8.2.0",
|
|
17
15
|
"inquirer": "^7.0.1",
|
|
18
16
|
"netrc-parser": "^3.1.6",
|
|
@@ -21,15 +19,15 @@
|
|
|
21
19
|
"update-notifier": "^4.1.0"
|
|
22
20
|
},
|
|
23
21
|
"devDependencies": {
|
|
24
|
-
"@oclif/
|
|
25
|
-
"@oclif/test": "^1",
|
|
22
|
+
"@oclif/test": "2.1.1",
|
|
26
23
|
"chai": "^4",
|
|
27
24
|
"globby": "^10",
|
|
28
25
|
"mocha": "^5",
|
|
29
|
-
"nyc": "^14"
|
|
26
|
+
"nyc": "^14",
|
|
27
|
+
"oclif": "^3.2.0"
|
|
30
28
|
},
|
|
31
29
|
"engines": {
|
|
32
|
-
"node": ">=
|
|
30
|
+
"node": ">=14.0.0"
|
|
33
31
|
},
|
|
34
32
|
"files": [
|
|
35
33
|
"/bin",
|
|
@@ -43,6 +41,8 @@
|
|
|
43
41
|
"license": "MIT",
|
|
44
42
|
"main": "src/index.js",
|
|
45
43
|
"oclif": {
|
|
44
|
+
"additionalHelpFlags": ["help"],
|
|
45
|
+
"additionalVersionFlags": ["version"],
|
|
46
46
|
"commands": "./src/commands",
|
|
47
47
|
"bin": "dbdocs",
|
|
48
48
|
"plugins": [
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"./src/hooks/init/checkUpdate",
|
|
54
54
|
"./src/hooks/init/loadEnv"
|
|
55
55
|
],
|
|
56
|
-
"prerun":[
|
|
56
|
+
"prerun": [
|
|
57
57
|
"./src/hooks/prerun/checkVersion"
|
|
58
58
|
]
|
|
59
59
|
}
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"repository": "holistics/dbdocs",
|
|
62
62
|
"scripts": {
|
|
63
63
|
"postpack": "rm -f oclif.manifest.json",
|
|
64
|
-
"prepack": "oclif
|
|
64
|
+
"prepack": "oclif manifest",
|
|
65
65
|
"test": "nyc mocha --forbid-only \"test/**/*.test.js\"",
|
|
66
|
-
"version": "oclif
|
|
66
|
+
"version": "oclif readme && git add README.md"
|
|
67
67
|
}
|
|
68
68
|
}
|
package/src/commands/build.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { Command,
|
|
1
|
+
const { Command, Flags } = require('@oclif/core');
|
|
2
2
|
const axios = require('axios');
|
|
3
3
|
const inquirer = require('inquirer');
|
|
4
4
|
const fs = require('fs');
|
|
@@ -37,8 +37,8 @@ class BuildCommand extends Command {
|
|
|
37
37
|
try {
|
|
38
38
|
const authConfig = await verifyToken();
|
|
39
39
|
|
|
40
|
-
let { flags: { project, password } } = this.parse(BuildCommand);
|
|
41
|
-
const { args } = this.parse(BuildCommand);
|
|
40
|
+
let { flags: { project, password } } = await this.parse(BuildCommand);
|
|
41
|
+
const { args } = await this.parse(BuildCommand);
|
|
42
42
|
|
|
43
43
|
const { filepath } = args;
|
|
44
44
|
let content = '';
|
|
@@ -137,8 +137,8 @@ class BuildCommand extends Command {
|
|
|
137
137
|
BuildCommand.description = 'build docs';
|
|
138
138
|
|
|
139
139
|
BuildCommand.flags = {
|
|
140
|
-
project:
|
|
141
|
-
password:
|
|
140
|
+
project: Flags.string({ description: 'project name' }),
|
|
141
|
+
password: Flags.string({ char: 'p', description: 'password for project' }),
|
|
142
142
|
};
|
|
143
143
|
|
|
144
144
|
BuildCommand.args = [
|
package/src/commands/login.js
CHANGED
package/src/commands/logout.js
CHANGED
package/src/commands/ls.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
const { Command } = require('@oclif/
|
|
2
|
-
const { cli } = require('cli-ux');
|
|
1
|
+
const { Command, CliUx } = require('@oclif/core');
|
|
3
2
|
const chalk = require('chalk');
|
|
4
3
|
const { vars } = require('../vars');
|
|
5
4
|
const verifyToken = require('../utils/verifyToken');
|
|
@@ -23,7 +22,7 @@ class LsCommand extends Command {
|
|
|
23
22
|
];
|
|
24
23
|
}, [3, 12]);
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
CliUx.ux.table(projects, {
|
|
27
26
|
name: {
|
|
28
27
|
minWidth: 20,
|
|
29
28
|
},
|
|
@@ -43,7 +42,7 @@ class LsCommand extends Command {
|
|
|
43
42
|
get: (project) => (new Date(project.updatedAt)).toLocaleString(),
|
|
44
43
|
},
|
|
45
44
|
}, {
|
|
46
|
-
printLine: this.log,
|
|
45
|
+
printLine: this.log.bind(this),
|
|
47
46
|
});
|
|
48
47
|
} catch (err) {
|
|
49
48
|
this.error(err);
|
package/src/commands/password.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { Command,
|
|
1
|
+
const { Command, Flags } = require('@oclif/core');
|
|
2
2
|
const axios = require('axios');
|
|
3
3
|
const inquirer = require('inquirer');
|
|
4
4
|
const ora = require('ora');
|
|
@@ -24,7 +24,7 @@ class PasswordCommand extends Command {
|
|
|
24
24
|
async run () {
|
|
25
25
|
const spinner = ora({});
|
|
26
26
|
try {
|
|
27
|
-
let { flags: { project, set, remove } } = this.parse(PasswordCommand);
|
|
27
|
+
let { flags: { project, set, remove } } = await this.parse(PasswordCommand);
|
|
28
28
|
|
|
29
29
|
if (set && remove) {
|
|
30
30
|
throw new Error('You must choose one, set password or remove.');
|
|
@@ -102,9 +102,9 @@ class PasswordCommand extends Command {
|
|
|
102
102
|
PasswordCommand.description = 'set password for your project or remove password';
|
|
103
103
|
|
|
104
104
|
PasswordCommand.flags = {
|
|
105
|
-
project:
|
|
106
|
-
set:
|
|
107
|
-
remove:
|
|
105
|
+
project: Flags.string({ char: 'p', description: 'project name', helpValue: 'project name' }),
|
|
106
|
+
set: Flags.string({ char: 's', description: 'password for your project', helpValue: 'password' }),
|
|
107
|
+
remove: Flags.boolean({ char: 'r', description: 'remove password from your project' }),
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
module.exports = PasswordCommand;
|
package/src/commands/remove.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
const { Command } = require('@oclif/
|
|
2
|
+
const { Command } = require('@oclif/core');
|
|
3
3
|
const axios = require('axios');
|
|
4
4
|
const inquirer = require('inquirer');
|
|
5
5
|
const ora = require('ora');
|
|
@@ -21,7 +21,7 @@ class RemoveCommand extends Command {
|
|
|
21
21
|
const authConfig = await verifyToken();
|
|
22
22
|
const org = await getOrg(authConfig);
|
|
23
23
|
|
|
24
|
-
const { args } = this.parse(RemoveCommand);
|
|
24
|
+
const { args } = await this.parse(RemoveCommand);
|
|
25
25
|
let { project_name } = args;
|
|
26
26
|
if (!project_name) {
|
|
27
27
|
const answer = await inquirer.prompt([
|
package/src/commands/rename.js
CHANGED
package/src/commands/token.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { Command,
|
|
1
|
+
const { Command, Flags } = require('@oclif/core');
|
|
2
2
|
const ora = require('ora');
|
|
3
3
|
const axios = require('axios');
|
|
4
4
|
const { vars } = require('../vars');
|
|
@@ -7,7 +7,7 @@ const verifyToken = require('../utils/verifyToken');
|
|
|
7
7
|
class TokenCommand extends Command {
|
|
8
8
|
async run () {
|
|
9
9
|
const spinner = ora({});
|
|
10
|
-
const { flags: { generate, revoke } } = this.parse(TokenCommand);
|
|
10
|
+
const { flags: { generate, revoke } } = await this.parse(TokenCommand);
|
|
11
11
|
if (!generate && !revoke) {
|
|
12
12
|
this.error('Please specify an action, type "dbdocs token --help" to see processable actitons.');
|
|
13
13
|
}
|
|
@@ -56,12 +56,12 @@ class TokenCommand extends Command {
|
|
|
56
56
|
|
|
57
57
|
TokenCommand.description = 'generate or revoke your authentication token';
|
|
58
58
|
TokenCommand.flags = {
|
|
59
|
-
generate:
|
|
59
|
+
generate: Flags.boolean({
|
|
60
60
|
char: 'g',
|
|
61
61
|
description: 'generate authentication token',
|
|
62
62
|
default: false,
|
|
63
63
|
}),
|
|
64
|
-
revoke:
|
|
64
|
+
revoke: Flags.boolean({
|
|
65
65
|
char: 'r',
|
|
66
66
|
description: 'revoke authentication token',
|
|
67
67
|
default: false,
|
package/src/commands/validate.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { Command
|
|
1
|
+
const { Command } = require('@oclif/core');
|
|
2
2
|
const fs = require('fs');
|
|
3
3
|
const path = require('path');
|
|
4
4
|
const ora = require('ora');
|
|
@@ -9,7 +9,7 @@ class ValidateCommand extends Command {
|
|
|
9
9
|
const spinner = ora({});
|
|
10
10
|
let filepath = null;
|
|
11
11
|
try {
|
|
12
|
-
const { args } = this.parse(ValidateCommand);
|
|
12
|
+
const { args } = await this.parse(ValidateCommand);
|
|
13
13
|
filepath = args.filepath;
|
|
14
14
|
let content = '';
|
|
15
15
|
content = fs.readFileSync(path.resolve(process.cwd(), filepath), 'utf-8');
|
package/src/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require('@oclif/
|
|
1
|
+
module.exports = require('@oclif/core');
|
package/src/user_data.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"BUILD_COUNT":1}
|