@shined/doctor 0.0.45-canary.3 → 0.0.45
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/es/cli.mjs +8 -8
- package/package.json +3 -3
package/es/cli.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const cli =
|
|
1
|
+
import { cac } from "cac";
|
|
2
|
+
import { JsSpecifications, initializeLogger } from "@shined/doctor-binding";
|
|
3
|
+
import { performance } from "node:perf_hooks";
|
|
4
|
+
const cli = cac("doctor");
|
|
5
5
|
cli.command('', 'check project health').option('-v, --verbose', 'Verbose output').option('--cwd <path>', 'Current working directory').action(async (options)=>{
|
|
6
|
-
const start =
|
|
7
|
-
|
|
6
|
+
const start = performance.now();
|
|
7
|
+
initializeLogger();
|
|
8
8
|
const cwd = options.cwd || process.cwd();
|
|
9
|
-
const standards = await
|
|
9
|
+
const standards = await JsSpecifications.create(cwd, {
|
|
10
10
|
quiet: false,
|
|
11
11
|
withDashboard: true
|
|
12
12
|
});
|
|
@@ -16,7 +16,7 @@ cli.command('', 'check project health').option('-v, --verbose', 'Verbose output'
|
|
|
16
16
|
console.log(`Found ${errorCount} errors`);
|
|
17
17
|
process.exit(1);
|
|
18
18
|
}
|
|
19
|
-
const end =
|
|
19
|
+
const end = performance.now();
|
|
20
20
|
console.log(`Time taken: ${end - start} milliseconds`);
|
|
21
21
|
});
|
|
22
22
|
cli.help();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shined/doctor",
|
|
3
|
-
"version": "0.0.45
|
|
3
|
+
"version": "0.0.45",
|
|
4
4
|
"main": "es/index.mjs",
|
|
5
5
|
"types": "es/index.d.mts",
|
|
6
6
|
"bin": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"publishConfig": {
|
|
13
13
|
"access": "public",
|
|
14
|
-
"tag": "
|
|
14
|
+
"tag": "latest"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"bin",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"cac": "^6.7.14",
|
|
23
|
-
"@shined/doctor-binding": "0.0.45
|
|
23
|
+
"@shined/doctor-binding": "0.0.45"
|
|
24
24
|
},
|
|
25
25
|
"bugs": {
|
|
26
26
|
"url": "https://github.com/sheinsight/doctor-engine/issues"
|