bitfab-cli 0.2.435 → 0.2.437
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/index.js +11 -7
- package/package.json +2 -3
package/dist/index.js
CHANGED
|
@@ -29921,7 +29921,7 @@ var semver3 = __toESM(require_semver2(), 1);
|
|
|
29921
29921
|
|
|
29922
29922
|
// ../bitfab-plugin-lib/dist/bakedSdkVersions.js
|
|
29923
29923
|
var BAKED_SDK_VERSIONS = {
|
|
29924
|
-
typescript: "0.64.
|
|
29924
|
+
typescript: "0.64.19",
|
|
29925
29925
|
python: "0.64.18",
|
|
29926
29926
|
ruby: "0.64.16",
|
|
29927
29927
|
go: "0.64.17"
|
|
@@ -31274,6 +31274,13 @@ Run ${platform2.loginHint} to re-authenticate.`);
|
|
|
31274
31274
|
}
|
|
31275
31275
|
|
|
31276
31276
|
// ../bitfab-plugin-lib/dist/commands/switchOrg.js
|
|
31277
|
+
async function switchFailureMessage(res) {
|
|
31278
|
+
const body = await res.json().catch(() => null);
|
|
31279
|
+
if (typeof body?.error === "string") {
|
|
31280
|
+
return body.error;
|
|
31281
|
+
}
|
|
31282
|
+
return `Failed to switch organization (HTTP ${res.status})`;
|
|
31283
|
+
}
|
|
31277
31284
|
async function requestSwitch(serviceUrl, apiKey, authOrganizationId) {
|
|
31278
31285
|
const res = await fetch(`${serviceUrl}/api/plugin/organizations/switch`, {
|
|
31279
31286
|
method: "POST",
|
|
@@ -31281,13 +31288,10 @@ async function requestSwitch(serviceUrl, apiKey, authOrganizationId) {
|
|
|
31281
31288
|
Authorization: `Bearer ${apiKey}`,
|
|
31282
31289
|
"Content-Type": "application/json"
|
|
31283
31290
|
},
|
|
31284
|
-
body: JSON.stringify({
|
|
31285
|
-
authOrganizationId,
|
|
31286
|
-
clerkOrganizationId: authOrganizationId
|
|
31287
|
-
})
|
|
31291
|
+
body: JSON.stringify({ authOrganizationId })
|
|
31288
31292
|
});
|
|
31289
31293
|
if (!res.ok) {
|
|
31290
|
-
throw new Error(
|
|
31294
|
+
throw new Error(await switchFailureMessage(res));
|
|
31291
31295
|
}
|
|
31292
31296
|
return await res.json();
|
|
31293
31297
|
}
|
|
@@ -31318,7 +31322,7 @@ async function runSwitchOrg(platform2) {
|
|
|
31318
31322
|
emitJson({
|
|
31319
31323
|
event: "switched",
|
|
31320
31324
|
status: result.status,
|
|
31321
|
-
authOrganizationId: result.authOrganizationId
|
|
31325
|
+
authOrganizationId: result.authOrganizationId,
|
|
31322
31326
|
organizationName: result.organizationName,
|
|
31323
31327
|
apiKey: result.apiKey
|
|
31324
31328
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bitfab-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.437",
|
|
4
4
|
"description": "Install and configure the Bitfab plugin in Claude Code, Codex, or Cursor, or the Bitfab skill pack in Amp (Alpha).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -36,8 +36,7 @@
|
|
|
36
36
|
"lint:fix": "biome check --write",
|
|
37
37
|
"tsc": "tsc --noEmit",
|
|
38
38
|
"knip": "knip",
|
|
39
|
-
"
|
|
40
|
-
"validate": "pnpm lint && pnpm tsc && pnpm knip && pnpm madge && pnpm build"
|
|
39
|
+
"validate": "pnpm lint && pnpm tsc && pnpm knip && pnpm build"
|
|
41
40
|
},
|
|
42
41
|
"author": "Bitfab",
|
|
43
42
|
"license": "MIT",
|