@overscore/cli 0.11.5 → 0.11.6

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.js +12 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -71,6 +71,18 @@ async function loadEnv() {
71
71
  projectSlug: cfg.OVERSCORE_PROJECT_SLUG || "",
72
72
  };
73
73
  }
74
+ // Device token + project slug present but no API key — bootstrap one
75
+ if (cfg.OVERSCORE_DEVICE_TOKEN && cfg.OVERSCORE_PROJECT_SLUG) {
76
+ const newKey = await refreshApiKey(cfg.OVERSCORE_PROJECT_SLUG);
77
+ if (newKey) {
78
+ return {
79
+ apiUrl: cfg.OVERSCORE_API_URL || `${HUB_URL}/api`,
80
+ apiKey: newKey,
81
+ dashboardSlug: path.basename(process.cwd()),
82
+ projectSlug: cfg.OVERSCORE_PROJECT_SLUG,
83
+ };
84
+ }
85
+ }
74
86
  }
75
87
  // No creds — trigger browser auth inline, then re-check
76
88
  console.log("\n No Overscore credentials found. Launching browser login...\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overscore/cli",
3
- "version": "0.11.5",
3
+ "version": "0.11.6",
4
4
  "description": "CLI for deploying Overscore dashboards and publishing analyses",
5
5
  "bin": {
6
6
  "overscore": "dist/index.js"