@monostyle-rs/cli 0.1.0 → 0.2.0
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/monostyle.js +17 -5
- package/package.json +45 -45
package/bin/monostyle.js
CHANGED
|
@@ -19,8 +19,14 @@ const PLATFORM_PACKAGES = {
|
|
|
19
19
|
x64: ["@monostyle-rs/cli-darwin-x64"],
|
|
20
20
|
},
|
|
21
21
|
linux: {
|
|
22
|
-
arm64: [
|
|
23
|
-
|
|
22
|
+
arm64: [
|
|
23
|
+
"@monostyle-rs/cli-linux-arm64-gnu",
|
|
24
|
+
"@monostyle-rs/cli-linux-arm64-musl",
|
|
25
|
+
],
|
|
26
|
+
x64: [
|
|
27
|
+
"@monostyle-rs/cli-linux-x64-gnu",
|
|
28
|
+
"@monostyle-rs/cli-linux-x64-musl",
|
|
29
|
+
],
|
|
24
30
|
},
|
|
25
31
|
win32: {
|
|
26
32
|
arm64: ["@monostyle-rs/cli-win32-arm64-msvc"],
|
|
@@ -57,7 +63,9 @@ function shouldTryNext(result) {
|
|
|
57
63
|
// stderr text is what distinguishes "wrong package" from "the tool failed".
|
|
58
64
|
if (result.status !== 127) return false;
|
|
59
65
|
|
|
60
|
-
return /not found|no such file or directory|exec format error/i.test(
|
|
66
|
+
return /not found|no such file or directory|exec format error/i.test(
|
|
67
|
+
result.stderr ?? "",
|
|
68
|
+
);
|
|
61
69
|
}
|
|
62
70
|
|
|
63
71
|
/** Runs the first binary that works. */
|
|
@@ -85,7 +93,9 @@ function main() {
|
|
|
85
93
|
});
|
|
86
94
|
|
|
87
95
|
if (shouldTryNext(result)) {
|
|
88
|
-
failures.push(
|
|
96
|
+
failures.push(
|
|
97
|
+
`${name}: ${result.error?.message ?? result.stderr?.trim() ?? "failed to launch"}`,
|
|
98
|
+
);
|
|
89
99
|
continue;
|
|
90
100
|
}
|
|
91
101
|
|
|
@@ -94,7 +104,9 @@ function main() {
|
|
|
94
104
|
process.exit(result.status ?? 0);
|
|
95
105
|
}
|
|
96
106
|
|
|
97
|
-
console.error(
|
|
107
|
+
console.error(
|
|
108
|
+
"Unable to find a compatible monostyle binary in the installed npm packages.",
|
|
109
|
+
);
|
|
98
110
|
console.error(`Tried: ${names.join(", ")}`);
|
|
99
111
|
|
|
100
112
|
if (failures.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
2
|
+
"name": "@monostyle-rs/cli",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Score the complexity and readability of a codebase, a file, or a function",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"cli",
|
|
8
|
+
"code-quality",
|
|
9
|
+
"complexity",
|
|
10
|
+
"cyclomatic",
|
|
11
|
+
"cognitive-complexity",
|
|
12
|
+
"readability"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/ifiokjr/monostyle",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/ifiokjr/monostyle/issues"
|
|
17
|
+
},
|
|
18
|
+
"license": "Unlicense",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/ifiokjr/monostyle.git"
|
|
22
|
+
},
|
|
23
|
+
"bin": {
|
|
24
|
+
"monostyle": "bin/monostyle.js"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"bin",
|
|
28
|
+
"README.md"
|
|
29
|
+
],
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public",
|
|
32
|
+
"provenance": true
|
|
33
|
+
},
|
|
34
|
+
"optionalDependencies": {
|
|
35
|
+
"@monostyle-rs/cli-darwin-arm64": "^0.2.0",
|
|
36
|
+
"@monostyle-rs/cli-darwin-x64": "^0.2.0",
|
|
37
|
+
"@monostyle-rs/cli-linux-arm64-gnu": "^0.2.0",
|
|
38
|
+
"@monostyle-rs/cli-linux-arm64-musl": "^0.2.0",
|
|
39
|
+
"@monostyle-rs/cli-linux-x64-gnu": "^0.2.0",
|
|
40
|
+
"@monostyle-rs/cli-linux-x64-musl": "^0.2.0",
|
|
41
|
+
"@monostyle-rs/cli-win32-arm64-msvc": "^0.2.0",
|
|
42
|
+
"@monostyle-rs/cli-win32-x64-msvc": "^0.2.0"
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=20"
|
|
46
|
+
}
|
|
47
47
|
}
|