ai-speedometer 2.0.5 → 2.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.
@@ -1,4 +1,9 @@
1
- #!/usr/bin/env bun
1
+ #!/bin/sh -
2
+ ':'; /*-
3
+ test1=$(bun --version 2>&1) && exec bun "$0" "$@"
4
+ test2=$(node --version 2>&1) && exec node "$0" "$@"
5
+ exec printf '%s\n' "$test1" "$test2" 1>&2
6
+ */
2
7
  // @bun
3
8
  var __defProp = Object.defineProperty;
4
9
  var __export = (target, all) => {
@@ -1426,7 +1431,7 @@ var getXDGPaths = () => ({
1426
1431
  const errors = [];
1427
1432
  const parsed = parse2(data, errors, { allowTrailingComma: true });
1428
1433
  if (errors.length > 0) {
1429
- console.warn("Warning: JSONC parsing errors in auth.json");
1434
+ console.warn("Warning: JSONC parsing errors in auth.json:", errors.map((e) => e.error).join(", "));
1430
1435
  return parsed || {};
1431
1436
  }
1432
1437
  return parsed;
@@ -1470,7 +1475,9 @@ var getXDGPaths = () => ({
1470
1475
  provider: { ...merged.provider ?? {}, ...parsed.provider ?? {} }
1471
1476
  };
1472
1477
  }
1473
- } catch {}
1478
+ } catch (error) {
1479
+ console.warn(`Warning: Could not read opencode config file ${filename}:`, error.message);
1480
+ }
1474
1481
  }
1475
1482
  return merged;
1476
1483
  }, getOpencodeGlobalConfigProviders = async () => {
@@ -1933,7 +1940,8 @@ async function loadConfig(includeAll) {
1933
1940
  try {
1934
1941
  const providers = await getAllAvailableProviders(includeAll);
1935
1942
  return { providers };
1936
- } catch {
1943
+ } catch (error) {
1944
+ console.error("Error: Failed to load providers:", error.message);
1937
1945
  return { providers: [] };
1938
1946
  }
1939
1947
  }
@@ -1976,6 +1984,8 @@ async function runHeadlessBenchmark(cliArgs) {
1976
1984
  }
1977
1985
  };
1978
1986
  const result2 = await benchmarkSingleModelRest(modelConfig2);
1987
+ if (!result2.success && result2.error)
1988
+ console.error(`Error: Benchmark failed: ${result2.error}`);
1979
1989
  console.log(buildJsonOutput(customProvider.name, customProvider.id, modelDef.name, modelDef.id, result2, cliArgs.formatted));
1980
1990
  process.exit(result2.success ? 0 : 1);
1981
1991
  }
@@ -2043,6 +2053,8 @@ async function runHeadlessBenchmark(cliArgs) {
2043
2053
  }
2044
2054
  };
2045
2055
  const result = await benchmarkSingleModelRest(modelConfig);
2056
+ if (!result.success && result.error)
2057
+ console.error(`Error: Benchmark failed: ${result.error}`);
2046
2058
  console.log(buildJsonOutput(provider.name, provider.id, model.name, model.id, result, cliArgs.formatted));
2047
2059
  process.exit(result.success ? 0 : 1);
2048
2060
  } catch (error) {
@@ -2149,14 +2161,15 @@ var package_default;
2149
2161
  var init_package = __esm(() => {
2150
2162
  package_default = {
2151
2163
  name: "ai-speedometer",
2152
- version: "2.0.5",
2164
+ version: "2.1.1",
2153
2165
  description: "A comprehensive CLI tool for benchmarking AI models across multiple providers with parallel execution and professional metrics",
2154
2166
  bin: {
2155
2167
  "ai-speedometer": "dist/ai-speedometer",
2156
2168
  aispeed: "dist/ai-speedometer"
2157
2169
  },
2158
2170
  engines: {
2159
- bun: ">=1.0.0"
2171
+ bun: ">=1.0.0",
2172
+ node: ">=18.0.0"
2160
2173
  },
2161
2174
  scripts: {
2162
2175
  start: "bun src/index.ts",
@@ -2165,7 +2178,7 @@ var init_package = __esm(() => {
2165
2178
  "test:watch": "bun test --watch",
2166
2179
  "test:update": "bun test --update-snapshots",
2167
2180
  typecheck: "bun tsc --noEmit",
2168
- build: "bun build src/index.ts --outdir dist --target bun --external '@opentui/core' --external '@opentui/react' --external 'react' --external 'react-reconciler' && printf '#!/usr/bin/env bun\\n' | cat - dist/index.js > dist/ai-speedometer && chmod +x dist/ai-speedometer && rm dist/index.js",
2181
+ build: "bun build src/index.ts --outdir dist --target bun --external '@opentui/core' --external '@opentui/react' --external 'react' --external 'react-reconciler' && cat scripts/shebang dist/index.js > dist/ai-speedometer && chmod +x dist/ai-speedometer && rm dist/index.js",
2169
2182
  prepublishOnly: "bun run build"
2170
2183
  },
2171
2184
  keywords: [
@@ -2196,6 +2209,7 @@ var init_package = __esm(() => {
2196
2209
  files: [
2197
2210
  "dist/",
2198
2211
  "docs/",
2212
+ "scripts/",
2199
2213
  "README.md",
2200
2214
  "ai-benchmark-config.json.template"
2201
2215
  ],
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "ai-speedometer",
3
- "version": "2.0.5",
3
+ "version": "2.1.1",
4
4
  "description": "A comprehensive CLI tool for benchmarking AI models across multiple providers with parallel execution and professional metrics",
5
5
  "bin": {
6
6
  "ai-speedometer": "dist/ai-speedometer",
7
7
  "aispeed": "dist/ai-speedometer"
8
8
  },
9
9
  "engines": {
10
- "bun": ">=1.0.0"
10
+ "bun": ">=1.0.0",
11
+ "node": ">=18.0.0"
11
12
  },
12
13
  "scripts": {
13
14
  "start": "bun src/index.ts",
@@ -16,7 +17,7 @@
16
17
  "test:watch": "bun test --watch",
17
18
  "test:update": "bun test --update-snapshots",
18
19
  "typecheck": "bun tsc --noEmit",
19
- "build": "bun build src/index.ts --outdir dist --target bun --external '@opentui/core' --external '@opentui/react' --external 'react' --external 'react-reconciler' && printf '#!/usr/bin/env bun\\n' | cat - dist/index.js > dist/ai-speedometer && chmod +x dist/ai-speedometer && rm dist/index.js",
20
+ "build": "bun build src/index.ts --outdir dist --target bun --external '@opentui/core' --external '@opentui/react' --external 'react' --external 'react-reconciler' && cat scripts/shebang dist/index.js > dist/ai-speedometer && chmod +x dist/ai-speedometer && rm dist/index.js",
20
21
  "prepublishOnly": "bun run build"
21
22
  },
22
23
  "keywords": [
@@ -47,6 +48,7 @@
47
48
  "files": [
48
49
  "dist/",
49
50
  "docs/",
51
+ "scripts/",
50
52
  "README.md",
51
53
  "ai-benchmark-config.json.template"
52
54
  ],
@@ -0,0 +1,6 @@
1
+ #!/bin/sh -
2
+ ':'; /*-
3
+ test1=$(bun --version 2>&1) && exec bun "$0" "$@"
4
+ test2=$(node --version 2>&1) && exec node "$0" "$@"
5
+ exec printf '%s\n' "$test1" "$test2" 1>&2
6
+ */