@rigstate/cli 0.7.15 → 0.7.16

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 CHANGED
@@ -1807,6 +1807,7 @@ Your API key has been securely stored. You can now use "rigstate scan" to audit
1807
1807
 
1808
1808
  // src/commands/link.ts
1809
1809
  init_esm_shims();
1810
+ init_config();
1810
1811
  import { Command as Command5 } from "commander";
1811
1812
  import fs3 from "fs/promises";
1812
1813
  import path4 from "path";
@@ -1833,7 +1834,7 @@ function createLinkCommand() {
1833
1834
  const manifestPath = path4.join(process.cwd(), ".rigstate");
1834
1835
  const content = {
1835
1836
  project_id: projectId,
1836
- api_url: process.env.NEXT_PUBLIC_APP_URL || "http://localhost:3000",
1837
+ api_url: getApiUrl(),
1837
1838
  linked_at: (/* @__PURE__ */ new Date()).toISOString()
1838
1839
  };
1839
1840
  try {
@@ -1843,9 +1844,9 @@ function createLinkCommand() {
1843
1844
  console.log("");
1844
1845
  console.log(chalk6.bold("\u{1F916} Rigstate Automation Detected"));
1845
1846
  console.log("");
1846
- const { getApiKey: getApiKey2, getApiUrl: getApiUrl2 } = await Promise.resolve().then(() => (init_config(), config_exports));
1847
- const apiKey = getApiKey2();
1848
- const apiUrl = getApiUrl2();
1847
+ const { getApiKey: _getApiKey, getApiUrl: _getApiUrl } = await Promise.resolve().then(() => (init_config(), config_exports));
1848
+ const apiKey = getApiKey();
1849
+ const apiUrl = getApiUrl();
1849
1850
  if (apiKey) {
1850
1851
  console.log(chalk6.blue("\u{1F510} Checking Vault for secrets..."));
1851
1852
  const { syncEnv: syncEnv2 } = await Promise.resolve().then(() => (init_env(), env_exports));
@@ -4617,11 +4618,12 @@ function createConfigCommand() {
4617
4618
  console.log(chalk23.green(`\u2705 project_id updated`));
4618
4619
  break;
4619
4620
  case "api_url":
4620
- console.log(chalk23.yellow("api_url is set via RIGSTATE_API_URL environment variable"));
4621
+ setApiUrl(value);
4622
+ console.log(chalk23.green(`\u2705 api_url updated`));
4621
4623
  break;
4622
4624
  default:
4623
4625
  console.log(chalk23.red(`Unknown config key: ${key}`));
4624
- console.log(chalk23.dim("Valid keys: api_key, project_id"));
4626
+ console.log(chalk23.dim("Valid keys: api_key, project_id, api_url"));
4625
4627
  }
4626
4628
  });
4627
4629
  return config2;