slopcode 0.1.22 → 0.1.24
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/slopcode +14 -1
- package/package.json +12 -12
package/bin/slopcode
CHANGED
|
@@ -151,6 +151,19 @@ function names(prefix) {
|
|
|
151
151
|
|
|
152
152
|
const resolvedNames = Array.from(new Set([...names("slopcode-bin"), ...names("slopcode")]))
|
|
153
153
|
|
|
154
|
+
function resolveBinary() {
|
|
155
|
+
for (const name of resolvedNames) {
|
|
156
|
+
try {
|
|
157
|
+
const candidate = require.resolve(`${name}/bin/${binary}`, {
|
|
158
|
+
paths: [scriptDir],
|
|
159
|
+
})
|
|
160
|
+
if (fs.existsSync(candidate)) return candidate
|
|
161
|
+
} catch {
|
|
162
|
+
continue
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
154
167
|
function findBinary(startDir) {
|
|
155
168
|
let current = startDir
|
|
156
169
|
for (;;) {
|
|
@@ -169,7 +182,7 @@ function findBinary(startDir) {
|
|
|
169
182
|
}
|
|
170
183
|
}
|
|
171
184
|
|
|
172
|
-
const resolved = findBinary(scriptDir)
|
|
185
|
+
const resolved = resolveBinary() || findBinary(scriptDir)
|
|
173
186
|
if (!resolved) {
|
|
174
187
|
console.error(
|
|
175
188
|
"It seems that your package manager failed to install the right version of the slopcode CLI for your platform. You can try manually installing " +
|
package/package.json
CHANGED
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
"scripts": {
|
|
35
35
|
"postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
|
|
36
36
|
},
|
|
37
|
-
"version": "0.1.
|
|
37
|
+
"version": "0.1.24",
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"slopcode-bin-linux-x64": "0.1.
|
|
41
|
-
"slopcode-bin-linux-x64-baseline-musl": "0.1.
|
|
42
|
-
"slopcode-bin-windows-x64-baseline": "0.1.
|
|
43
|
-
"slopcode-bin-linux-x64-baseline": "0.1.
|
|
44
|
-
"slopcode-bin-windows-x64": "0.1.
|
|
45
|
-
"slopcode-bin-darwin-x64-baseline": "0.1.
|
|
46
|
-
"slopcode-bin-darwin-arm64": "0.1.
|
|
47
|
-
"slopcode-bin-linux-x64-musl": "0.1.
|
|
48
|
-
"slopcode-bin-darwin-x64": "0.1.
|
|
49
|
-
"slopcode-bin-linux-arm64-musl": "0.1.
|
|
50
|
-
"slopcode-bin-linux-arm64": "0.1.
|
|
40
|
+
"slopcode-bin-linux-x64": "0.1.24",
|
|
41
|
+
"slopcode-bin-linux-x64-baseline-musl": "0.1.24",
|
|
42
|
+
"slopcode-bin-windows-x64-baseline": "0.1.24",
|
|
43
|
+
"slopcode-bin-linux-x64-baseline": "0.1.24",
|
|
44
|
+
"slopcode-bin-windows-x64": "0.1.24",
|
|
45
|
+
"slopcode-bin-darwin-x64-baseline": "0.1.24",
|
|
46
|
+
"slopcode-bin-darwin-arm64": "0.1.24",
|
|
47
|
+
"slopcode-bin-linux-x64-musl": "0.1.24",
|
|
48
|
+
"slopcode-bin-darwin-x64": "0.1.24",
|
|
49
|
+
"slopcode-bin-linux-arm64-musl": "0.1.24",
|
|
50
|
+
"slopcode-bin-linux-arm64": "0.1.24"
|
|
51
51
|
}
|
|
52
52
|
}
|