@metabase/cli 0.5.16 → 0.5.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/cli.mjs CHANGED
@@ -527,7 +527,7 @@ function trustSystemCa() {
527
527
  //#endregion
528
528
  //#region package.json
529
529
  var name = "@metabase/cli";
530
- var version = "0.5.16";
530
+ var version = "0.5.17";
531
531
  var description = "Metabase CLI";
532
532
  //#endregion
533
533
  //#region src/runtime/command-augment.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metabase/cli",
3
- "version": "0.5.16",
3
+ "version": "0.5.17",
4
4
  "description": "Metabase CLI",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
@@ -78,7 +78,7 @@ The preview reads `DATA_APP_MB_URL` and an admin `DATA_APP_MB_API_KEY` from `<re
78
78
  [ -n "$KEY" ] && [ "$KEY" != null ] && printf 'DATA_APP_MB_URL=%s\nDATA_APP_MB_API_KEY=%s\n' "$URL" "$KEY" > <repo>/.env.local && echo written )
79
79
  ```
80
80
 
81
- Group `2` is Administrators. Never print `.env.local`. Delete the key at handoff, when you finish and give the app back to the user (`mb api-key list --profile <name>`, then `mb api-key delete <id> --yes --profile <name>`), and stop `npm run dev` with it: the preview can't reach Metabase once the key is gone. The next session writes a new one. Metabase allows any localhost origin unless `MB_DISABLE_CORS_ON_LOCALHOST` is set, so a CORS error from the preview means it is: ask the user to unset it on this instance. Otherwise check `DATA_APP_MB_URL`.
81
+ Group `2` is Administrators. Never print `.env.local`. Delete the key at handoff, when you finish and give the app back to the user (`mb api-key list --profile <name>`, then `mb api-key delete <id> --yes --profile <name>`), and stop `npm run dev` with it: the preview can't reach Metabase once the key is gone. The next session writes a new one. When the preview can't reach Metabase, the diagnostics feed says why: `connection.reachable: false` means nothing answers at `DATA_APP_MB_URL`, and an `sdk-call` answered `401` means the key in `.env.local` is wrong or deleted. An `sdk-call` with `failed` in place of a status while `connection.reachable` is `true` is a CORS error: Metabase allows any localhost origin unless `MB_DISABLE_CORS_ON_LOCALHOST` is set on the instance, so ask the user to unset it.
82
82
 
83
83
  ### The diagnostics feed
84
84
 
@@ -106,7 +106,8 @@ curl -s "http://localhost:5174/__data-app/diagnostics?startEventId=0"
106
106
  "buildId": 7, // the bundle running now
107
107
  "staleEntries": 164, // withheld: reported by a build already replaced
108
108
  "nextEventId": 32, // pass back as ?startEventId=
109
- // also connection, sessionId, lastReportAt and lastRebuildAt, for diagnosing the feed itself
109
+ "connection": { "metabaseUrl": "http://localhost:3000", "reachable": true, "error": null }, // whether Metabase answers the preview
110
+ // also sessionId, lastReportAt and lastRebuildAt, for diagnosing the feed itself
110
111
  }
111
112
  ```
112
113
 
@@ -148,7 +149,7 @@ A viewer needs one of their groups assigned to the app (otherwise "You don't hav
148
149
  | The app still runs the old bundle | `dist/index.js` isn't in the pushed commit, or the push wasn't imported: build, commit, push, import. |
149
150
  | Works in the preview, a question or action fails in Metabase | `generate-queries` or `generate-actions` didn't run after the last change, or the files weren't committed with the bundle: _Release_. |
150
151
  | Blank app, `Bundle did not assign a function to __dataAppFactory__` | `src/index.tsx` must `export default` the factory and nothing else; otherwise the diagnostics feed has the real error. |
151
- | "Failed to fetch the user, the session might be invalid." | A bad key in `<repo>/.env.local`, or CORS (_Dev preview_). |
152
+ | "Failed to fetch the user, the session might be invalid." | A wrong or deleted key in `<repo>/.env.local`, or CORS (_Dev preview_). |
152
153
  | The app stays on loading; the terminal says "Failed to load Embedding SDK bundle" | No `<repo>/.env.local`, or a wrong `DATA_APP_MB_URL` in it (_Dev preview_). |
153
154
  | A bundle of several MB | `vite.config.ts` doesn't use `dataAppConfig()`, or the SDK isn't the tag `mb data-app sdk-version` answers. |
154
155
  | "Invalid hook call" | A second React got bundled: nothing may add another `react` or `react-dom`. |