@overscore/cli 0.13.22 → 0.13.23

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 +7 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3396,18 +3396,17 @@ async function probeDashboard(deviceToken, projectSlug, dashboardSlug) {
3396
3396
  if (!apiKey)
3397
3397
  return { state: "error", apiKey };
3398
3398
  try {
3399
- const vRes = await fetch(`${HUB_URL}/api/dashboards/${dashboardSlug}/versions`, {
3399
+ const sRes = await fetch(`${HUB_URL}/api/dashboards/${dashboardSlug}/source`, {
3400
+ method: "HEAD",
3400
3401
  headers: { Authorization: `Bearer ${apiKey}` },
3401
3402
  });
3402
- if (vRes.status === 401 || vRes.status === 403)
3403
+ if (sRes.status === 401 || sRes.status === 403)
3403
3404
  return { state: "unauthorized", apiKey };
3404
- if (vRes.status === 404)
3405
+ if (sRes.status === 404)
3405
3406
  return { state: "new", apiKey };
3406
- if (!vRes.ok)
3407
- return { state: "error", apiKey };
3408
- const data = (await vRes.json());
3409
- const deployed = Array.isArray(data.versions) && data.versions.length > 0;
3410
- return { state: deployed ? "deployed" : "new", apiKey };
3407
+ if (sRes.ok)
3408
+ return { state: "deployed", apiKey };
3409
+ return { state: "error", apiKey };
3411
3410
  }
3412
3411
  catch {
3413
3412
  return { state: "error", apiKey };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overscore/cli",
3
- "version": "0.13.22",
3
+ "version": "0.13.23",
4
4
  "description": "CLI for deploying Overscore dashboards and publishing analyses",
5
5
  "bin": {
6
6
  "overscore": "dist/index.js"