@xberg-io/liter-llm-cli 1.19.2 → 2.0.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/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 main();
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) return reject(new Error("too many redirects"));
42
+ if (maxRedirects < 0) {
43
+ reject(new Error("too many redirects"));
44
+ return;
45
+ }
43
46
  if (!/^https:\/\//i.test(url)) {
44
- return reject(new Error(`refusing non-https URL: ${url}`));
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xberg-io/liter-llm-cli",
3
- "version": "1.19.2",
3
+ "version": "2.0.1",
4
4
  "description": "CLI proxy for liter-llm — downloads and runs the native liter-llm binary from GitHub releases.",
5
5
  "license": "MIT",
6
6
  "author": "Na'aman Hirschfeld",