braintrust 0.0.187 → 0.0.188
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/browser.js +11 -0
- package/dist/browser.mjs +11 -0
- package/dist/cli.js +12 -1
- package/dist/index.js +11 -0
- package/dist/index.mjs +11 -0
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -2502,6 +2502,17 @@ async function loginToState(options = {}) {
|
|
|
2502
2502
|
);
|
|
2503
2503
|
const info = await resp.json();
|
|
2504
2504
|
_check_org_info(state, info.org_info, orgName);
|
|
2505
|
+
if (!state.apiUrl) {
|
|
2506
|
+
if (orgName) {
|
|
2507
|
+
throw new Error(
|
|
2508
|
+
`Unable to log into organization '${orgName}'. Are you sure this credential is scoped to the organization?`
|
|
2509
|
+
);
|
|
2510
|
+
} else {
|
|
2511
|
+
throw new Error(
|
|
2512
|
+
"Unable to log into any organization with the provided credential."
|
|
2513
|
+
);
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2505
2516
|
conn = state.apiConn();
|
|
2506
2517
|
conn.set_token(apiKey);
|
|
2507
2518
|
} else {
|
package/dist/browser.mjs
CHANGED
|
@@ -2451,6 +2451,17 @@ async function loginToState(options = {}) {
|
|
|
2451
2451
|
);
|
|
2452
2452
|
const info = await resp.json();
|
|
2453
2453
|
_check_org_info(state, info.org_info, orgName);
|
|
2454
|
+
if (!state.apiUrl) {
|
|
2455
|
+
if (orgName) {
|
|
2456
|
+
throw new Error(
|
|
2457
|
+
`Unable to log into organization '${orgName}'. Are you sure this credential is scoped to the organization?`
|
|
2458
|
+
);
|
|
2459
|
+
} else {
|
|
2460
|
+
throw new Error(
|
|
2461
|
+
"Unable to log into any organization with the provided credential."
|
|
2462
|
+
);
|
|
2463
|
+
}
|
|
2464
|
+
}
|
|
2454
2465
|
conn = state.apiConn();
|
|
2455
2466
|
conn.set_token(apiKey);
|
|
2456
2467
|
} else {
|
package/dist/cli.js
CHANGED
|
@@ -1236,7 +1236,7 @@ var require_package = __commonJS({
|
|
|
1236
1236
|
"package.json"(exports2, module2) {
|
|
1237
1237
|
module2.exports = {
|
|
1238
1238
|
name: "braintrust",
|
|
1239
|
-
version: "0.0.
|
|
1239
|
+
version: "0.0.188",
|
|
1240
1240
|
description: "SDK for integrating Braintrust",
|
|
1241
1241
|
repository: {
|
|
1242
1242
|
type: "git",
|
|
@@ -3531,6 +3531,17 @@ async function loginToState(options = {}) {
|
|
|
3531
3531
|
);
|
|
3532
3532
|
const info = await resp.json();
|
|
3533
3533
|
_check_org_info(state, info.org_info, orgName);
|
|
3534
|
+
if (!state.apiUrl) {
|
|
3535
|
+
if (orgName) {
|
|
3536
|
+
throw new Error(
|
|
3537
|
+
`Unable to log into organization '${orgName}'. Are you sure this credential is scoped to the organization?`
|
|
3538
|
+
);
|
|
3539
|
+
} else {
|
|
3540
|
+
throw new Error(
|
|
3541
|
+
"Unable to log into any organization with the provided credential."
|
|
3542
|
+
);
|
|
3543
|
+
}
|
|
3544
|
+
}
|
|
3534
3545
|
conn = state.apiConn();
|
|
3535
3546
|
conn.set_token(apiKey);
|
|
3536
3547
|
} else {
|
package/dist/index.js
CHANGED
|
@@ -2739,6 +2739,17 @@ async function loginToState(options = {}) {
|
|
|
2739
2739
|
);
|
|
2740
2740
|
const info = await resp.json();
|
|
2741
2741
|
_check_org_info(state, info.org_info, orgName);
|
|
2742
|
+
if (!state.apiUrl) {
|
|
2743
|
+
if (orgName) {
|
|
2744
|
+
throw new Error(
|
|
2745
|
+
`Unable to log into organization '${orgName}'. Are you sure this credential is scoped to the organization?`
|
|
2746
|
+
);
|
|
2747
|
+
} else {
|
|
2748
|
+
throw new Error(
|
|
2749
|
+
"Unable to log into any organization with the provided credential."
|
|
2750
|
+
);
|
|
2751
|
+
}
|
|
2752
|
+
}
|
|
2742
2753
|
conn = state.apiConn();
|
|
2743
2754
|
conn.set_token(apiKey);
|
|
2744
2755
|
} else {
|
package/dist/index.mjs
CHANGED
|
@@ -2671,6 +2671,17 @@ async function loginToState(options = {}) {
|
|
|
2671
2671
|
);
|
|
2672
2672
|
const info = await resp.json();
|
|
2673
2673
|
_check_org_info(state, info.org_info, orgName);
|
|
2674
|
+
if (!state.apiUrl) {
|
|
2675
|
+
if (orgName) {
|
|
2676
|
+
throw new Error(
|
|
2677
|
+
`Unable to log into organization '${orgName}'. Are you sure this credential is scoped to the organization?`
|
|
2678
|
+
);
|
|
2679
|
+
} else {
|
|
2680
|
+
throw new Error(
|
|
2681
|
+
"Unable to log into any organization with the provided credential."
|
|
2682
|
+
);
|
|
2683
|
+
}
|
|
2684
|
+
}
|
|
2674
2685
|
conn = state.apiConn();
|
|
2675
2686
|
conn.set_token(apiKey);
|
|
2676
2687
|
} else {
|