@overscore/cli 0.13.12 → 0.13.13

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
@@ -194,6 +194,18 @@ async function apiRequest(method, urlPath, body, command) {
194
194
  console.error(" BigQuery — inspect dataset columns and sample rows with: npm run queries");
195
195
  console.error(" • The project should use BigQuery but no warehouse is connected yet — connect it in the Hub.\n");
196
196
  }
197
+ // Dataset-scoped service account: it can READ a named dataset but can't LIST
198
+ // datasets (project/region INFORMATION_SCHEMA.SCHEMATA needs project-level
199
+ // access). This is where the AI tends to rabbit-hole guessing names — tell it
200
+ // to stop and ASK the user instead.
201
+ if (/INFORMATION_SCHEMA\.SCHEMATA/i.test(errMsg) &&
202
+ /(access denied|datasets\.(get|list)|does not have)/i.test(errMsg)) {
203
+ console.error(" The service account is scoped to specific dataset(s), so it can't LIST datasets.");
204
+ console.error(" • Do NOT guess dataset names. Ask the user: \"Which dataset should I use?\" (and its region, e.g. US).");
205
+ console.error(" • Then explore it directly — this works with a dataset-scoped grant:");
206
+ console.error(" npx @overscore/cli query run \"SELECT table_name FROM \\`<project>\\`.<dataset>.INFORMATION_SCHEMA.TABLES\"");
207
+ console.error(" • For auto-discovery instead, the user can grant BigQuery Data Viewer at the PROJECT level.\n");
208
+ }
197
209
  process.exit(1);
198
210
  }
199
211
  return data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overscore/cli",
3
- "version": "0.13.12",
3
+ "version": "0.13.13",
4
4
  "description": "CLI for deploying Overscore dashboards and publishing analyses",
5
5
  "bin": {
6
6
  "overscore": "dist/index.js"