@madewithremy/admin 0.1.35 → 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/dist/prod.js CHANGED
@@ -1019,6 +1019,14 @@ async function dashboardLive(ctx) {
1019
1019
  );
1020
1020
  return dashboard.liveRelease;
1021
1021
  }
1022
+ async function primaryUrl(ctx) {
1023
+ const dashboard = await call(
1024
+ ctx,
1025
+ "GET",
1026
+ `/_internal/v2/apps/${ctx.appId}/dashboard`
1027
+ );
1028
+ return dashboard.primaryUrl;
1029
+ }
1022
1030
  function summarizeRelease(release) {
1023
1031
  const summary2 = {
1024
1032
  releaseId: release.id,
@@ -2735,9 +2743,9 @@ async function prerenderInvalidate(ctx, a) {
2735
2743
  async function prerenderGet(ctx, a) {
2736
2744
  const rawPath = a.req("path");
2737
2745
  const normalized = rawPath.startsWith("/") ? rawPath : `/${rawPath}`;
2738
- const isDev = !ctx.baseUrl.includes("api.mindstudio.ai");
2739
- const host = a.str("host")?.replace(/^https?:\/\//, "").replace(/\/+$/, "") || `${ctx.appId}${isDev ? "-dev" : ""}.madewithremy.com`;
2740
- const url = `https://${host}${normalized}`;
2746
+ const host = a.str("host")?.replace(/^https?:\/\//, "").replace(/\/+$/, "");
2747
+ const origin = host ? `https://${host}` : new URL(await primaryUrl(ctx)).origin;
2748
+ const url = `${origin}${normalized}`;
2741
2749
  const res = await fetchWithTimeout(
2742
2750
  url,
2743
2751
  {
@@ -2786,6 +2794,8 @@ Notes:
2786
2794
  - 'pages'/'view' read what's stored for the LIVE release; 'get' exercises the real
2787
2795
  serve path with a bot User-Agent. A warm path returns the snapshot; a cold path
2788
2796
  returns the live SPA and triggers a render \u2014 re-run to see it.
2797
+ - 'get' fetches from the app's own URL (its custom domain, else its subdomain) unless
2798
+ --host names another.
2789
2799
  - 'view' errors with snapshot_not_found when the path has no snapshot yet.
2790
2800
  - Invalidation targets the current LIVE release; a deploy already invalidates on its own.
2791
2801
  - Mounted pages: when another app mounts this one, 'pages' lists paths carrying that
@@ -5188,7 +5198,7 @@ Bulk ingestion (jobs):
5188
5198
  it; \`jobs approve\` starts the run. Two gates: the corpus has to fit the
5189
5199
  source's placement (a shared-pool source over the per-source cap answers
5190
5200
  plan_requires_dedicated: place it on dedicated capacity first), and the
5191
- workspace has to be able to cover the projection (insufficient_credits).
5201
+ workspace has to be able to cover the projection (insufficient_credits/*).
5192
5202
 
5193
5203
  Options on start:
5194
5204
  --approve Run as soon as the plan passes the gates, no separate approve
@@ -8924,7 +8934,7 @@ A resource bills by the clock hour at the active rate for every hour it is
8924
8934
  active in, including the hour a resume lands in, and costs nothing while
8925
8935
  hibernated or once destroyed. Provisioning, growing and resuming need a month's
8926
8936
  worth of credits available in the workspace, checked before the request is
8927
- accepted (insufficient_credits); nothing is charged until activation. The
8937
+ accepted (insufficient_credits/*); nothing is charged until activation. The
8928
8938
  provision output prints the price it committed to. Every action below is
8929
8939
  audited.
8930
8940
 
@@ -9328,7 +9338,7 @@ function parseJsonConfig(raw) {
9328
9338
  }
9329
9339
 
9330
9340
  // src/ctx.ts
9331
- var DEFAULT_BASE_URL = "https://api.mindstudio.ai";
9341
+ var DEFAULT_BASE_URL = "https://v1.mindstudio-api.com";
9332
9342
  function loadWorkspaceAppId(workspaceDir = WORKSPACE_DIR) {
9333
9343
  const manifestPath = path7.join(workspaceDir, "mindstudio.json");
9334
9344
  let raw;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madewithremy/admin",
3
- "version": "0.1.35",
3
+ "version": "0.1.37",
4
4
  "description": "Admin SDK + CLI for managing production Remy apps",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",