@lightdash/cli 2.573.4 → 2.575.0

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 (65) hide show
  1. package/README.md +31 -0
  2. package/dist/.tsbuildinfo.build +1 -1
  3. package/dist/agentConnections/agentTokenProvider.d.ts.map +1 -1
  4. package/dist/agentConnections/agentTokenProvider.js +5 -4
  5. package/dist/agentConnections/responseValidation.d.ts +3 -0
  6. package/dist/agentConnections/responseValidation.d.ts.map +1 -0
  7. package/dist/agentConnections/responseValidation.js +12 -0
  8. package/dist/agentConnections/schema.d.ts.map +1 -1
  9. package/dist/agentConnections/schema.js +70 -4
  10. package/dist/agentConnections/serverError.d.ts +5 -0
  11. package/dist/agentConnections/serverError.d.ts.map +1 -0
  12. package/dist/agentConnections/serverError.js +38 -0
  13. package/dist/agentConnections/statusResponse.d.ts.map +1 -1
  14. package/dist/agentConnections/statusResponse.js +19 -11
  15. package/dist/agentConnections/store.d.ts.map +1 -1
  16. package/dist/agentConnections/store.js +6 -32
  17. package/dist/agentConnections/warehouseStatus.d.ts.map +1 -1
  18. package/dist/agentConnections/warehouseStatus.js +4 -26
  19. package/dist/config.d.ts.map +1 -1
  20. package/dist/config.js +2 -0
  21. package/dist/connectionErrors.fixture.d.ts +2 -0
  22. package/dist/connectionErrors.fixture.d.ts.map +1 -0
  23. package/dist/connectionErrors.fixture.js +38 -0
  24. package/dist/dbt/targets/Databricks/oauth.d.ts.map +1 -1
  25. package/dist/dbt/targets/Databricks/oauth.js +3 -3
  26. package/dist/errorHandler.fixture.d.ts +2 -0
  27. package/dist/errorHandler.fixture.d.ts.map +1 -0
  28. package/dist/errorHandler.fixture.js +48 -0
  29. package/dist/handlers/agentConnectionConnect.d.ts.map +1 -1
  30. package/dist/handlers/agentConnectionConnect.js +18 -8
  31. package/dist/handlers/agentConnectionStatus.d.ts.map +1 -1
  32. package/dist/handlers/agentConnectionStatus.js +5 -1
  33. package/dist/handlers/agentRevoke.d.ts.map +1 -1
  34. package/dist/handlers/agentRevoke.js +5 -0
  35. package/dist/handlers/apps/appCodeFiles.d.ts.map +1 -1
  36. package/dist/handlers/apps/appCodeFiles.js +4 -1
  37. package/dist/handlers/apps/appsDownload.d.ts.map +1 -1
  38. package/dist/handlers/apps/appsDownload.js +22 -6
  39. package/dist/handlers/asyncQuery.d.ts +1 -0
  40. package/dist/handlers/asyncQuery.d.ts.map +1 -1
  41. package/dist/handlers/asyncQuery.js +15 -0
  42. package/dist/handlers/compile.d.ts.map +1 -1
  43. package/dist/handlers/compile.js +3 -1
  44. package/dist/handlers/dbt/apiClient.d.ts +1 -0
  45. package/dist/handlers/dbt/apiClient.d.ts.map +1 -1
  46. package/dist/handlers/dbt/apiClient.js +68 -17
  47. package/dist/handlers/deploy.d.ts.map +1 -1
  48. package/dist/handlers/deploy.js +10 -0
  49. package/dist/handlers/download.d.ts.map +1 -1
  50. package/dist/handlers/download.js +31 -8
  51. package/dist/handlers/getProject.d.ts.map +1 -1
  52. package/dist/handlers/getProject.js +10 -1
  53. package/dist/handlers/homepagesAsCode.d.ts.map +1 -1
  54. package/dist/handlers/homepagesAsCode.js +4 -1
  55. package/dist/handlers/runChart.d.ts.map +1 -1
  56. package/dist/handlers/runChart.js +8 -2
  57. package/dist/handlers/spacesAsCode.d.ts.map +1 -1
  58. package/dist/handlers/spacesAsCode.js +16 -3
  59. package/dist/handlers/sql.d.ts.map +1 -1
  60. package/dist/handlers/sql.js +3 -2
  61. package/dist/handlers/timestampConversion.d.ts.map +1 -1
  62. package/dist/handlers/timestampConversion.js +6 -0
  63. package/dist/ordinaryError.main.json +20 -0
  64. package/dist/outputUnchanged.main.json +30 -0
  65. package/package.json +3 -3
package/README.md CHANGED
@@ -310,3 +310,34 @@ The CLI supports these environment variables for authentication:
310
310
  | ------------------------ | ---------------------------------------------- |
311
311
  | `LIGHTDASH_CLI_EMAIL` | Email for login (alternative to `--email`) |
312
312
  | `LIGHTDASH_CLI_PASSWORD` | Password for email login (used with `--email`) |
313
+
314
+ ### Connection errors and credential output
315
+
316
+ On the agent connection commands, and when a request made with a connection fails,
317
+ the CLI prints fixed messages and no server-written text. The CLI never prints a
318
+ credential on purpose. Data that a command exists to show is shown as received.
319
+
320
+ The connection forms are `agent connect`, `agent status` and `agent revoke`.
321
+ Failures include an error status, an error envelope on HTTP 200, an unreadable or
322
+ aborted body, and a redirect. Known error codes select fixed messages; unknown
323
+ codes are omitted. Links use the configured instance and fixed paths and query
324
+ fields. The approval link contains a validated request UUID.
325
+
326
+ An error the CLI raises while using data from a successful answer can quote that
327
+ data (for example a slug or a file path). Two known cases with a connection:
328
+ `download --spaces-only` names a space slug the server returned twice, and
329
+ `download` names the file path built from a chart slug when that file cannot be
330
+ written.
331
+
332
+ Connection success reports show the person's project names, UUIDs, approved and
333
+ effective actions, connection states and timestamps, and warehouse readiness.
334
+ In these connection reports, project names have ANSI escapes and C0/C1 control
335
+ characters removed; other server-supplied report fields are validated UUIDs,
336
+ timestamps, booleans or fixed enums. Report fields the CLI does not know are
337
+ not saved.
338
+
339
+ Successful catalogue names and types, query results, downloaded content and
340
+ project names in ordinary listings retain the server's characters, including
341
+ control characters.
342
+
343
+ The CLI has no general screen that rewrites its output.