dbdocs 0.9.2 → 0.10.1
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/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.
|
|
1
|
+
{"version":"0.10.1","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},"public":{"name":"public","type":"boolean","description":"anyone with the URL can access","helpGroup":"sharing","allowNo":false,"exclusive":["private","password"]},"private":{"name":"private","type":"boolean","description":"only invited people can access","helpGroup":"sharing","allowNo":false,"exclusive":["public","password"]},"password":{"name":"password","type":"option","char":"p","description":"anyone with the URL + password can access","helpGroup":"sharing","multiple":false,"exclusive":["public","private"]}},"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 project","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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dbdocs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"author": "@holistics",
|
|
5
5
|
"bin": {
|
|
6
6
|
"dbdocs": "./bin/run"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"oclif/**/ansi-regex": "^3.0.1"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@dbml/core": "3.
|
|
12
|
+
"@dbml/core": "3.6.2",
|
|
13
13
|
"@oclif/core": "1.12.1",
|
|
14
14
|
"@oclif/plugin-help": "5.1.12",
|
|
15
15
|
"axios": "1.6.0",
|
package/src/commands/build.js
CHANGED
|
@@ -6,6 +6,7 @@ const path = require('path');
|
|
|
6
6
|
const ora = require('ora');
|
|
7
7
|
const chalk = require('chalk');
|
|
8
8
|
const removeMd = require('remove-markdown');
|
|
9
|
+
const { VERSION } = require('@dbml/core');
|
|
9
10
|
const { vars } = require('../vars');
|
|
10
11
|
const verifyToken = require('../utils/verifyToken');
|
|
11
12
|
const { getOrg } = require('../utils/org');
|
|
@@ -94,6 +95,8 @@ class BuildCommand extends Command {
|
|
|
94
95
|
content,
|
|
95
96
|
},
|
|
96
97
|
shallowSchema: model.schemas,
|
|
98
|
+
normalizedDatabase: model.normalizedDatabase,
|
|
99
|
+
dbmlVersion: VERSION,
|
|
97
100
|
}, authConfig);
|
|
98
101
|
switch (newProject.generalAccessType) {
|
|
99
102
|
case PROJECT_GENERAL_ACCESS_TYPE.public:
|
|
@@ -5,6 +5,7 @@ function parse (content) {
|
|
|
5
5
|
try {
|
|
6
6
|
const parser = new Parser();
|
|
7
7
|
const databaseObject = parser.parse(content, 'dbmlv2');
|
|
8
|
+
const normalizedDatabase = databaseObject.normalize();
|
|
8
9
|
const schemas = databaseObject.schemas.map((schema) => ({
|
|
9
10
|
name: schema.name,
|
|
10
11
|
tables: schema.tables.map((table) => table.name),
|
|
@@ -14,6 +15,7 @@ function parse (content) {
|
|
|
14
15
|
name: databaseObject.name,
|
|
15
16
|
description: databaseObject.note,
|
|
16
17
|
schemas,
|
|
18
|
+
normalizedDatabase,
|
|
17
19
|
};
|
|
18
20
|
} catch (err) {
|
|
19
21
|
// Worker will cast custom error to `Error` type so we map DBML errors to JSON here to fix it.
|