@root-signals/scorable-cli 0.1.0 → 0.1.2
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/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/package.json +3 -2
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAMA,wBAAsB,UAAU,CAC9B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IACR,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GACA,OAAO,CAAC,OAAO,CAAC,CAoDlB"}
|
package/dist/client.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
1
2
|
import { getApiKey, getBaseUrl } from "./auth.js";
|
|
2
3
|
import { printError, printJson } from "./output.js";
|
|
4
|
+
const { version } = createRequire(import.meta.url)("../package.json");
|
|
3
5
|
export async function apiRequest(method, endpoint, options) {
|
|
4
6
|
const apiKey = options?.apiKey ?? getApiKey();
|
|
5
7
|
const baseUrl = options?.baseUrl ?? getBaseUrl();
|
|
@@ -16,7 +18,7 @@ export async function apiRequest(method, endpoint, options) {
|
|
|
16
18
|
Authorization: `Api-Key ${apiKey}`,
|
|
17
19
|
"Content-Type": "application/json",
|
|
18
20
|
Accept: "application/json",
|
|
19
|
-
"User-Agent":
|
|
21
|
+
"User-Agent": `scorable/${version}`,
|
|
20
22
|
};
|
|
21
23
|
let response;
|
|
22
24
|
try {
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,SAAS,IAAI,OAAO,CAUnC"}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
import { Command } from "commander";
|
|
2
3
|
import { registerJudgeCommands } from "./commands/judge/index.js";
|
|
3
4
|
import { registerPromptTestCommands } from "./commands/prompt-test/index.js";
|
|
4
5
|
export function createCli() {
|
|
5
6
|
const program = new Command()
|
|
6
|
-
.name("scorable
|
|
7
|
+
.name("scorable")
|
|
7
8
|
.description("A CLI tool to interact with the Scorable API")
|
|
8
9
|
.exitOverride();
|
|
9
10
|
registerJudgeCommands(program);
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@root-signals/scorable-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "CLI for Scorable",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Scorable",
|
|
7
7
|
"bin": {
|
|
8
|
-
"scorable": "./dist/index.js"
|
|
8
|
+
"scorable": "./dist/index.js",
|
|
9
|
+
"scorable-cli": "./dist/index.js"
|
|
9
10
|
},
|
|
10
11
|
"files": [
|
|
11
12
|
"dist/**/*.js",
|