unslop 0.1.0 → 0.1.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/README.md +3 -0
- package/bin.js +28 -5
- package/package.json +6 -5
package/README.md
CHANGED
package/bin.js
CHANGED
|
@@ -10,8 +10,30 @@ const PLATFORMS = {
|
|
|
10
10
|
"darwin-x64": "@unslop/darwin-x64",
|
|
11
11
|
"linux-x64": "@unslop/linux-x64",
|
|
12
12
|
"linux-arm64": "@unslop/linux-arm64",
|
|
13
|
+
"win32-x64": "@unslop/win32-x64",
|
|
13
14
|
};
|
|
14
15
|
|
|
16
|
+
function resolvePackageBinary(pkg) {
|
|
17
|
+
const candidates = ["bin/unslop", "bin/unslop.exe"];
|
|
18
|
+
for (const rel of candidates) {
|
|
19
|
+
try {
|
|
20
|
+
return require.resolve(`${pkg}/${rel}`);
|
|
21
|
+
} catch {}
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function resolveLocalBinary(key) {
|
|
27
|
+
const candidates = ["unslop", "unslop.exe"];
|
|
28
|
+
for (const name of candidates) {
|
|
29
|
+
const localPath = path.join(__dirname, "npm", key, "bin", name);
|
|
30
|
+
if (existsSync(localPath)) {
|
|
31
|
+
return localPath;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
|
|
15
37
|
function getBinaryPath() {
|
|
16
38
|
const platform = os.platform();
|
|
17
39
|
const arch = os.arch();
|
|
@@ -26,13 +48,14 @@ function getBinaryPath() {
|
|
|
26
48
|
}
|
|
27
49
|
|
|
28
50
|
// Try installed npm package first
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
51
|
+
const fromPackage = resolvePackageBinary(pkg);
|
|
52
|
+
if (fromPackage) {
|
|
53
|
+
return fromPackage;
|
|
54
|
+
}
|
|
32
55
|
|
|
33
56
|
// Fallback: local development build (npm/<platform>/bin/unslop)
|
|
34
|
-
const localPath =
|
|
35
|
-
if (
|
|
57
|
+
const localPath = resolveLocalBinary(key);
|
|
58
|
+
if (localPath) {
|
|
36
59
|
return localPath;
|
|
37
60
|
}
|
|
38
61
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unslop",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Detect duplicated code, dead code, and anti-patterns in AI-generated codebases",
|
|
5
5
|
"bin": {
|
|
6
6
|
"unslop": "bin.js"
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
"bin.js"
|
|
10
10
|
],
|
|
11
11
|
"optionalDependencies": {
|
|
12
|
-
"@unslop/darwin-arm64": "0.1.
|
|
13
|
-
"@unslop/darwin-x64": "0.1.
|
|
14
|
-
"@unslop/linux-
|
|
15
|
-
"@unslop/linux-
|
|
12
|
+
"@unslop/darwin-arm64": "0.1.1",
|
|
13
|
+
"@unslop/darwin-x64": "0.1.1",
|
|
14
|
+
"@unslop/linux-arm64": "0.1.1",
|
|
15
|
+
"@unslop/linux-x64": "0.1.1",
|
|
16
|
+
"@unslop/win32-x64": "0.1.1"
|
|
16
17
|
},
|
|
17
18
|
"license": "Apache-2.0",
|
|
18
19
|
"repository": {
|