@rigstate/cli 0.7.15 → 0.7.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rigstate/cli",
3
- "version": "0.7.15",
3
+ "version": "0.7.17",
4
4
  "description": "Rigstate CLI - Code audit, sync and supervision tool",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  import { Command } from 'commander';
2
2
  import chalk from 'chalk';
3
- import { getApiKey, setApiKey, getProjectId, setProjectId, getApiUrl } from '../utils/config.js';
3
+ import { getApiKey, setApiKey, getProjectId, setProjectId, getApiUrl, setApiUrl } from '../utils/config.js';
4
4
 
5
5
  export function createConfigCommand() {
6
6
  const config = new Command('config');
@@ -68,12 +68,12 @@ export function createConfigCommand() {
68
68
  console.log(chalk.green(`✅ project_id updated`));
69
69
  break;
70
70
  case 'api_url':
71
- // api_url is not settable via this command for now
72
- console.log(chalk.yellow('api_url is set via RIGSTATE_API_URL environment variable'));
71
+ setApiUrl(value);
72
+ console.log(chalk.green(`✅ api_url updated`));
73
73
  break;
74
74
  default:
75
75
  console.log(chalk.red(`Unknown config key: ${key}`));
76
- console.log(chalk.dim('Valid keys: api_key, project_id'));
76
+ console.log(chalk.dim('Valid keys: api_key, project_id, api_url'));
77
77
  }
78
78
  });
79
79
 
@@ -4,6 +4,7 @@ import fs from 'fs/promises';
4
4
  import path from 'path';
5
5
  import chalk from 'chalk';
6
6
  import os from 'os';
7
+ import { getApiUrl, getApiKey } from '../utils/config.js';
7
8
 
8
9
  export function createLinkCommand() {
9
10
  return new Command('link')
@@ -31,7 +32,7 @@ export function createLinkCommand() {
31
32
 
32
33
  const content = {
33
34
  project_id: projectId,
34
- api_url: process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:3000',
35
+ api_url: getApiUrl(),
35
36
  linked_at: new Date().toISOString()
36
37
  };
37
38
 
@@ -45,7 +46,7 @@ export function createLinkCommand() {
45
46
  console.log(chalk.bold('🤖 Rigstate Automation Detected'));
46
47
  console.log('');
47
48
 
48
- const { getApiKey, getApiUrl } = await import('../utils/config.js');
49
+ const { getApiKey: _getApiKey, getApiUrl: _getApiUrl } = await import('../utils/config.js');
49
50
  const apiKey = getApiKey(); // Might throw if not logged in
50
51
  const apiUrl = getApiUrl();
51
52