@madewithremy/admin 0.1.36 → 0.1.37

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/README.md CHANGED
@@ -25,7 +25,7 @@ Configuration is read from the environment and the workspace — there are no co
25
25
  | Source | Meaning |
26
26
  |---|---|
27
27
  | `MINDSTUDIO_API_KEY` | Org-scoped `sk_` API key (required) |
28
- | `MINDSTUDIO_BASE_URL` | API origin (default `https://api.mindstudio.ai`) |
28
+ | `MINDSTUDIO_BASE_URL` | API origin (default `https://v1.mindstudio-api.com`) |
29
29
  | `WORKSPACE_DIR` | Workspace root (default `/home/vercel-sandbox/workspace`) |
30
30
  | `${WORKSPACE_DIR}/mindstudio.json` | `appId` — which app the CLI manages |
31
31
  | `REMY_SIDECAR_URL` | Sandbox sidecar for `qa-recordings export` (default `http://127.0.0.1:4388`) |
package/dist/index.d.ts CHANGED
@@ -7225,6 +7225,15 @@ declare function byCommit(ctx: AdminContext, commitSha: string): Promise<{
7225
7225
  * if (live) console.log(live.commitSha, live.publishedAt);
7226
7226
  */
7227
7227
  declare function dashboardLive(ctx: AdminContext): Promise<DashboardLiveRelease | null>;
7228
+ /**
7229
+ * The URL the app is served on, as the platform resolves it: its live custom
7230
+ * domain, then its platform subdomain, then its id's own host. Ends in a slash.
7231
+ * Fetched from the dashboard endpoint.
7232
+ *
7233
+ * @example
7234
+ * const url = await admin.releases.primaryUrl();
7235
+ */
7236
+ declare function primaryUrl(ctx: AdminContext): Promise<string>;
7228
7237
  /**
7229
7238
  * Compact, stable projection of a release for the wait result.
7230
7239
  *
@@ -7342,9 +7351,10 @@ type releases_WaitForCommitResult = WaitForCommitResult;
7342
7351
  type releases_WaitOutcome = WaitOutcome;
7343
7352
  declare const releases_byCommit: typeof byCommit;
7344
7353
  declare const releases_dashboardLive: typeof dashboardLive;
7354
+ declare const releases_primaryUrl: typeof primaryUrl;
7345
7355
  declare const releases_waitForCommit: typeof waitForCommit;
7346
7356
  declare namespace releases {
7347
- export { type releases_ReleaseSummary as ReleaseSummary, type releases_ReleasesListParams as ReleasesListParams, type releases_WaitForCommitParams as WaitForCommitParams, type releases_WaitForCommitResult as WaitForCommitResult, type releases_WaitOutcome as WaitOutcome, releases_byCommit as byCommit, releases_dashboardLive as dashboardLive, get$2 as get, list$3 as list, releases_waitForCommit as waitForCommit };
7357
+ export { type releases_ReleaseSummary as ReleaseSummary, type releases_ReleasesListParams as ReleasesListParams, type releases_WaitForCommitParams as WaitForCommitParams, type releases_WaitForCommitResult as WaitForCommitResult, type releases_WaitOutcome as WaitOutcome, releases_byCommit as byCommit, releases_dashboardLive as dashboardLive, get$2 as get, list$3 as list, releases_primaryUrl as primaryUrl, releases_waitForCommit as waitForCommit };
7348
7358
  }
7349
7359
 
7350
7360
  /**
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ function parseJsonConfig(raw) {
37
37
  }
38
38
 
39
39
  // src/ctx.ts
40
- var DEFAULT_BASE_URL = "https://api.mindstudio.ai";
40
+ var DEFAULT_BASE_URL = "https://v1.mindstudio-api.com";
41
41
  function loadWorkspaceAppId(workspaceDir = WORKSPACE_DIR) {
42
42
  const manifestPath = path.join(workspaceDir, "mindstudio.json");
43
43
  let raw;
@@ -1626,6 +1626,7 @@ __export(releases_exports, {
1626
1626
  dashboardLive: () => dashboardLive,
1627
1627
  get: () => get5,
1628
1628
  list: () => list6,
1629
+ primaryUrl: () => primaryUrl,
1629
1630
  waitForCommit: () => waitForCommit
1630
1631
  });
1631
1632
  function list6(ctx, params = {}) {
@@ -1657,6 +1658,14 @@ async function dashboardLive(ctx) {
1657
1658
  );
1658
1659
  return dashboard.liveRelease;
1659
1660
  }
1661
+ async function primaryUrl(ctx) {
1662
+ const dashboard = await call(
1663
+ ctx,
1664
+ "GET",
1665
+ `/_internal/v2/apps/${ctx.appId}/dashboard`
1666
+ );
1667
+ return dashboard.primaryUrl;
1668
+ }
1660
1669
  function summarizeRelease(release) {
1661
1670
  const summary2 = {
1662
1671
  releaseId: release.id,