@xberg-io/liter-llm-cli 1.19.2 → 2.0.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/liter-llm.js +2 -2
- package/install.js +6 -2
- package/package.json +1 -1
package/bin/liter-llm.js
CHANGED
|
@@ -38,8 +38,8 @@ async function ensureBinary() {
|
|
|
38
38
|
// ~keep Call main() explicitly rather than relying on import side-effects:
|
|
39
39
|
// ESM ~keep caches modules, so the installer's top-level run is gated to
|
|
40
40
|
// direct ~keep invocation only and would not fire on import.
|
|
41
|
-
const { main } = await import("../install.js");
|
|
42
|
-
await
|
|
41
|
+
const { main: runInstaller } = await import("../install.js");
|
|
42
|
+
await runInstaller();
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
function printUnavailable() {
|
package/install.js
CHANGED
|
@@ -39,9 +39,13 @@ function binaryName() {
|
|
|
39
39
|
|
|
40
40
|
function httpGetBuffer(url, { headers = {} } = {}, maxRedirects = 5) {
|
|
41
41
|
return new Promise((resolve, reject) => {
|
|
42
|
-
if (maxRedirects < 0)
|
|
42
|
+
if (maxRedirects < 0) {
|
|
43
|
+
reject(new Error("too many redirects"));
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
43
46
|
if (!/^https:\/\//i.test(url)) {
|
|
44
|
-
|
|
47
|
+
reject(new Error(`refusing non-https URL: ${url}`));
|
|
48
|
+
return;
|
|
45
49
|
}
|
|
46
50
|
const req = https.get(url, { headers: { "User-Agent": USER_AGENT, ...headers } }, (res) => {
|
|
47
51
|
if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
|
package/package.json
CHANGED