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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- require('@oclif/command').run()
4
- .then(require('@oclif/command/flush'))
5
- .catch(require('@oclif/errors/handle'))
3
+ require('@oclif/core').run()
4
+ .then(require('@oclif/core/flush'))
5
+ .catch(require('@oclif/core/handle'))
@@ -1 +1 @@
1
- {"version":"0.6.4","commands":{"build":{"id":"build","description":"build docs","pluginName":"dbdocs","pluginType":"core","aliases":[],"flags":{"project":{"name":"project","type":"option","description":"project name"},"password":{"name":"password","type":"option","char":"p","description":"password for project"}},"args":[{"name":"filepath","description":"dbml file path"}]},"login":{"id":"login","description":"login to dbdocs\nlogin with your dbdocs credentials\n","pluginName":"dbdocs","pluginType":"core","aliases":[],"flags":{},"args":[]},"logout":{"id":"logout","description":"logout\nclears local login credentials\n","pluginName":"dbdocs","pluginType":"core","aliases":[],"flags":{},"args":[]},"ls":{"id":"ls","description":"list projects","pluginName":"dbdocs","pluginType":"core","aliases":[],"flags":{},"args":[]},"password":{"id":"password","description":"set password for your project or remove password","pluginName":"dbdocs","pluginType":"core","aliases":[],"flags":{"project":{"name":"project","type":"option","char":"p","description":"project name","helpValue":"project name"},"set":{"name":"set","type":"option","char":"s","description":"password for your project","helpValue":"password"},"remove":{"name":"remove","type":"boolean","char":"r","description":"remove password from your project","allowNo":false}},"args":[]},"remove":{"id":"remove","description":"remove docs","pluginName":"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","pluginName":"dbdocs","pluginType":"core","aliases":[],"flags":{},"args":[]},"token":{"id":"token","description":"generate or revoke your authentication token","pluginName":"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","pluginName":"dbdocs","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"filepath","description":"dbml file path"}]}}}
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.6.4",
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.2",
10
- "@oclif/command": "^1",
11
- "@oclif/config": "^1",
12
- "@oclif/plugin-help": "^2",
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/dev-cli": "^1",
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": ">=8.0.0"
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-dev manifest",
64
+ "prepack": "oclif manifest",
65
65
  "test": "nyc mocha --forbid-only \"test/**/*.test.js\"",
66
- "version": "oclif-dev readme && git add README.md"
66
+ "version": "oclif readme && git add README.md"
67
67
  }
68
68
  }
@@ -1,4 +1,4 @@
1
- const { Command, flags } = require('@oclif/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: flags.string({ description: 'project name' }),
141
- password: flags.string({ char: 'p', description: 'password for project' }),
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 = [
@@ -1,4 +1,4 @@
1
- const { Command } = require('@oclif/command');
1
+ const { Command } = require('@oclif/core');
2
2
  const open = require('open');
3
3
  const inquirer = require('inquirer');
4
4
  const axios = require('axios');
@@ -1,4 +1,4 @@
1
- const { Command } = require('@oclif/command');
1
+ const { Command } = require('@oclif/core');
2
2
  const netrc = require('netrc-parser').default;
3
3
  const { vars } = require('../vars');
4
4
 
@@ -1,5 +1,4 @@
1
- const { Command } = require('@oclif/command');
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
- cli.table(projects, {
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);
@@ -1,4 +1,4 @@
1
- const { Command, flags } = require('@oclif/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: 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' }),
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;
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable camelcase */
2
- const { Command } = require('@oclif/command');
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([
@@ -1,4 +1,4 @@
1
- const { Command } = require('@oclif/command');
1
+ const { Command } = require('@oclif/core');
2
2
  const inquirer = require('inquirer');
3
3
  const axios = require('axios');
4
4
  const ora = require('ora');
@@ -1,4 +1,4 @@
1
- const { Command, flags } = require('@oclif/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: flags.boolean({
59
+ generate: Flags.boolean({
60
60
  char: 'g',
61
61
  description: 'generate authentication token',
62
62
  default: false,
63
63
  }),
64
- revoke: flags.boolean({
64
+ revoke: Flags.boolean({
65
65
  char: 'r',
66
66
  description: 'revoke authentication token',
67
67
  default: false,
@@ -1,4 +1,4 @@
1
- const { Command, flags } = require('@oclif/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/command');
1
+ module.exports = require('@oclif/core');
@@ -1 +0,0 @@
1
- {"BUILD_COUNT":1}