@jive-ai/cli 0.0.11 → 0.0.13

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.
Files changed (2) hide show
  1. package/dist/index.mjs +11 -12
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -98,8 +98,12 @@ async function requireProjectConfig() {
98
98
  return config;
99
99
  }
100
100
  async function getActiveTeamId() {
101
- const config = await requireProjectConfig();
102
- return config.activeTeamId || config.teamId;
101
+ const teamId = (await requireProjectConfig()).activeTeamId;
102
+ if (!teamId) {
103
+ console.error(chalk.red("No team ID found, select one with `jive team switch`"));
104
+ process.exit(1);
105
+ }
106
+ return teamId;
103
107
  }
104
108
  async function isProjectInitialized() {
105
109
  return await getProjectConfig() !== null;
@@ -420,10 +424,7 @@ const teamCommands = {
420
424
  return;
421
425
  }
422
426
  const switchSpinner = ora("Switching team...").start();
423
- if (await getProjectConfig()) await updateProjectConfig({
424
- activeTeamId: response.teamId,
425
- teamId: response.teamId
426
- });
427
+ if (await getProjectConfig()) await updateProjectConfig({ activeTeamId: response.teamId });
427
428
  switchSpinner.succeed(chalk.green("Team switched successfully!"));
428
429
  const selectedTeam = result.teams.find((t) => t.id.toString() === response.teamId);
429
430
  console.log(chalk.cyan(`\n✨ Active team: ${selectedTeam?.name}`));
@@ -730,7 +731,6 @@ async function initCommand() {
730
731
  await addToGitignore(".jive");
731
732
  spinner.text = "Creating project configuration...";
732
733
  await saveProjectConfig({
733
- teamId,
734
734
  activeTeamId: teamId,
735
735
  lastSync: (/* @__PURE__ */ new Date()).toISOString()
736
736
  });
@@ -777,7 +777,7 @@ async function detachCommand() {
777
777
  const projectConfig = await getProjectConfig();
778
778
  await requireAuth();
779
779
  const apiClient$1 = getApiClient();
780
- const teamId = projectConfig?.activeTeamId || projectConfig?.teamId;
780
+ const teamId = projectConfig?.activeTeamId;
781
781
  if (!teamId) {
782
782
  console.error(chalk.red("No team ID found, select one with `jive team switch`"));
783
783
  process.exit(1);
@@ -1344,8 +1344,7 @@ function log(...args) {
1344
1344
  */
1345
1345
  async function startMcpServer() {
1346
1346
  log("=== Jive Server Starting ===");
1347
- const projectConfig = await getProjectConfig();
1348
- if (!(projectConfig?.activeTeamId || projectConfig?.teamId)) {
1347
+ if (!(await getProjectConfig())?.activeTeamId) {
1349
1348
  log("Error: No team ID found, select one with `jive team switch`");
1350
1349
  process.exit(1);
1351
1350
  return;
@@ -1923,7 +1922,7 @@ async function checkProjectInit() {
1923
1922
  return {
1924
1923
  status: "pass",
1925
1924
  message: "Project initialized",
1926
- details: `Team ID: ${config.teamId}`
1925
+ details: `Team ID: ${config.activeTeamId}`
1927
1926
  };
1928
1927
  } catch (error) {
1929
1928
  return {
@@ -2064,7 +2063,7 @@ async function checkTeamMembership() {
2064
2063
 
2065
2064
  //#endregion
2066
2065
  //#region package.json
2067
- var version = "0.0.11";
2066
+ var version = "0.0.12";
2068
2067
 
2069
2068
  //#endregion
2070
2069
  //#region src/index.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@jive-ai/cli",
4
- "version": "0.0.11",
4
+ "version": "0.0.13",
5
5
  "main": "index.js",
6
6
  "files": [
7
7
  "dist",