@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/dist/index.cjs +8 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/config.ts +4 -4
- package/src/commands/link.ts +3 -2
package/dist/index.cjs
CHANGED
|
@@ -1812,6 +1812,7 @@ var import_promises3 = __toESM(require("fs/promises"), 1);
|
|
|
1812
1812
|
var import_path3 = __toESM(require("path"), 1);
|
|
1813
1813
|
var import_chalk6 = __toESM(require("chalk"), 1);
|
|
1814
1814
|
var import_os = __toESM(require("os"), 1);
|
|
1815
|
+
init_config();
|
|
1815
1816
|
function createLinkCommand() {
|
|
1816
1817
|
return new import_commander5.Command("link").description("Link current directory to a Rigstate project").argument("<projectId>", "Project ID to link").action(async (projectId) => {
|
|
1817
1818
|
try {
|
|
@@ -1833,7 +1834,7 @@ function createLinkCommand() {
|
|
|
1833
1834
|
const manifestPath = import_path3.default.join(process.cwd(), ".rigstate");
|
|
1834
1835
|
const content = {
|
|
1835
1836
|
project_id: projectId,
|
|
1836
|
-
api_url:
|
|
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(import_chalk6.default.bold("\u{1F916} Rigstate Automation Detected"));
|
|
1845
1846
|
console.log("");
|
|
1846
|
-
const { getApiKey:
|
|
1847
|
-
const apiKey =
|
|
1848
|
-
const apiUrl =
|
|
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(import_chalk6.default.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(import_chalk23.default.green(`\u2705 project_id updated`));
|
|
4618
4619
|
break;
|
|
4619
4620
|
case "api_url":
|
|
4620
|
-
|
|
4621
|
+
setApiUrl(value);
|
|
4622
|
+
console.log(import_chalk23.default.green(`\u2705 api_url updated`));
|
|
4621
4623
|
break;
|
|
4622
4624
|
default:
|
|
4623
4625
|
console.log(import_chalk23.default.red(`Unknown config key: ${key}`));
|
|
4624
|
-
console.log(import_chalk23.default.dim("Valid keys: api_key, project_id"));
|
|
4626
|
+
console.log(import_chalk23.default.dim("Valid keys: api_key, project_id, api_url"));
|
|
4625
4627
|
}
|
|
4626
4628
|
});
|
|
4627
4629
|
return config2;
|