@getxflow/cli 0.11.0 → 0.11.1

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.
@@ -177,14 +177,13 @@ async function dbQuery(args) {
177
177
  }
178
178
  (0, ui_1.table)([data.columns, ...data.rows.map((row) => data.columns.map((column) => cell(row[column])))]);
179
179
  if (data.truncated) {
180
- // "raise --limit" used to be the whole advice, and for a long time it was
181
- // impossible to follow: the ceiling and the default were the same number, so
182
- // the flag could only ask for less. Now it can ask for more, and the line
183
- // says so only while there is room left.
180
+ // No exact total here: the platform stops reading at limit + 1 rows, so all
181
+ // it knows is that more exist. The "raise --limit" advice shows only while
182
+ // the flag still has room below the ceiling.
184
183
  const room = data.limit !== undefined && data.limit_max !== undefined && data.limit < data.limit_max;
185
184
  (0, ui_1.note)((0, ui_1.dim)(room
186
- ? ` Shown ${data.rows.length} of ${data.total}: raise --limit (up to ${data.limit_max}), or narrow the query`
187
- : ` Shown ${data.rows.length} of ${data.total}: narrow the query, with a where clause or an offset`));
185
+ ? ` Shown the first ${data.rows.length} rows, more exist: raise --limit (up to ${data.limit_max}), or narrow the query`
186
+ : ` Shown the first ${data.rows.length} rows, more exist: narrow the query, with a where clause or an offset`));
188
187
  }
189
188
  }
190
189
  async function dbMigrate(args) {
package/dist/version.js CHANGED
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DEFAULT_API_URL = exports.CLI_VERSION = void 0;
4
4
  /** Keep in sync with cli/package.json. */
5
- exports.CLI_VERSION = '0.11.0';
5
+ exports.CLI_VERSION = '0.11.1';
6
6
  /** Overridden by XFLOW_API_URL or the `api` field in xflow.json. */
7
7
  exports.DEFAULT_API_URL = 'https://app.getxflow.com';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getxflow/cli",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "CLI for the XFlow platform: source sync, deployment and publishing of applications",
5
5
  "license": "UNLICENSED",
6
6
  "engines": {
@@ -24,7 +24,7 @@ contains the fix.
24
24
 
25
25
  ## Keeping these instructions current
26
26
 
27
- These instructions ship with xflow CLI 0.11.0. They travel inside the package, so the copy
27
+ These instructions ship with xflow CLI 0.11.1. They travel inside the package, so the copy
28
28
  you are reading can be older than the CLI answering your commands, and nothing about that
29
29
  is visible in the text itself.
30
30
 
@@ -235,6 +235,13 @@ enforces this, but a project where every function answers its own way costs an a
235
235
  on every call. Branch the frontend on `error.code`, never on `error.message`: wording
236
236
  gets rewritten on any edit, a code does not.
237
237
 
238
+ How a non-2xx answer reaches the page depends on the generation of `src/lib/xflow.ts`
239
+ in the project, so look at that file before writing the catch: a copy that declares
240
+ `XFlowError` throws it carrying `code` and `status`, and a copy that says nothing about
241
+ errors is older and throws a plain `Error` whose message is all there is. In an older
242
+ project, a function that wants its error text seen on the page answers `200` with
243
+ `{ success: false, error }` in the body.
244
+
238
245
  The sources are the whole truth about which functions exist. Delete the directory and the
239
246
  next deploy would delete the function from the cloud, schedules included, and that cannot be
240
247
  undone: a function created again later gets a different address. So never remove a function