dbdocs 0.16.2 → 0.17.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 +1 -1
- package/package.json +4 -4
- package/src/user_data.json +1 -0
- package/src/utils/parse.js +10 -12
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dbdocs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"author": "@holistics",
|
|
5
5
|
"bin": {
|
|
6
6
|
"dbdocs": "./bin/run"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@dbml/connector": "
|
|
10
|
-
"@dbml/core": "
|
|
11
|
-
"@oclif/core": "1.
|
|
9
|
+
"@dbml/connector": "5.1.0",
|
|
10
|
+
"@dbml/core": "5.1.0",
|
|
11
|
+
"@oclif/core": "1.26.2",
|
|
12
12
|
"@oclif/plugin-help": "6.2.32",
|
|
13
13
|
"axios": "^1.12.0",
|
|
14
14
|
"chalk": "^3.0.0",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"BUILD_COUNT":2}
|
package/src/utils/parse.js
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
const { Worker } = require('worker_threads');
|
|
2
2
|
|
|
3
|
-
const parse = (content) => {
|
|
4
|
-
|
|
5
|
-
const workerPath = `${__dirname}/parserWorker.js`;
|
|
3
|
+
const parse = (content) => new Promise((resolve, reject) => {
|
|
4
|
+
const workerPath = `${__dirname}/parserWorker.js`;
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
});
|
|
10
|
-
worker.on('message', resolve);
|
|
11
|
-
worker.on('error', reject);
|
|
12
|
-
worker.on('exit', (code) => {
|
|
13
|
-
if (code !== 0) reject(new Error(`Worker stopped with exit code ${code}`));
|
|
14
|
-
});
|
|
6
|
+
const worker = new Worker(workerPath, {
|
|
7
|
+
workerData: { content },
|
|
15
8
|
});
|
|
16
|
-
|
|
9
|
+
worker.on('message', resolve);
|
|
10
|
+
worker.on('error', reject);
|
|
11
|
+
worker.on('exit', (code) => {
|
|
12
|
+
if (code !== 0) reject(new Error(`Worker stopped with exit code ${code}`));
|
|
13
|
+
});
|
|
14
|
+
});
|
|
17
15
|
|
|
18
16
|
module.exports = parse;
|