neon 8.18.0 → 8.19.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.
package/README.md CHANGED
@@ -330,9 +330,12 @@ neon realtime subscribe "SELECT id, title, completed FROM realtime_todos ORDER B
330
330
  The default terminal output is append-only. It identifies the selected project,
331
331
  branch, and database; prints the initial result once; reports connection-state
332
332
  changes; and then prints each published change set with its transaction IDs, a compact
333
- `+insert ~update -delete` summary, and the affected rows. It does not take over the
334
- terminal or require keyboard navigation. Pass `--changes` to display the raw `rows`
335
- and `changes` events instead of the materialized view.
333
+ `+insert ~update -delete` summary, and the affected rows. Row moves appear as
334
+ `↔ move` with a separate `↔` count and retain the row's values. It does not take
335
+ over the terminal or require keyboard navigation. Pass `--changes` to display the
336
+ raw `rows` and `changes` events instead of the materialized view. Raw table output
337
+ includes each move's `after_row_id` destination, with `(head)` for the first
338
+ position, and counts moves separately from removals.
336
339
 
337
340
  For scripts and agents, JSON output is a JSON Lines stream with one complete event
338
341
  per line. YAML output uses one document per event:
@@ -101,7 +101,8 @@ const EMAIL_PASSWORD_FIELDS = [
101
101
  "auto_sign_in_after_verification",
102
102
  "send_verification_email_on_sign_up",
103
103
  "send_verification_email_on_sign_in",
104
- "disable_sign_up"
104
+ "disable_sign_up",
105
+ "revoke_sessions_on_password_reset"
105
106
  ];
106
107
  const EMAIL_PROVIDER_FIELDS = [
107
108
  "type",
@@ -333,6 +334,10 @@ const builder = (argv) => {
333
334
  "disable-sign-up": {
334
335
  describe: "Disable new user sign ups",
335
336
  type: "boolean"
337
+ },
338
+ "revoke-sessions-on-password-reset": {
339
+ describe: "Revoke all of a user's sessions when their password is reset",
340
+ type: "boolean"
336
341
  }
337
342
  }), async (args) => {
338
343
  await emailPasswordUpdate(args);
@@ -825,7 +830,8 @@ const printEmailPasswordEntries = (data) => [
825
830
  ["Auto Sign In After Verify: ", String(data.auto_sign_in_after_verification)],
826
831
  ["Send Email On Sign Up: ", String(data.send_verification_email_on_sign_up)],
827
832
  ["Send Email On Sign In: ", String(data.send_verification_email_on_sign_in)],
828
- ["Disable Sign Up:", String(data.disable_sign_up)]
833
+ ["Disable Sign Up:", String(data.disable_sign_up)],
834
+ ["Revoke Sessions On Reset:", String(data.revoke_sessions_on_password_reset)]
829
835
  ];
830
836
  const emailPasswordGet = async (props) => {
831
837
  const branchId = await resolveBranch(props);
@@ -845,7 +851,8 @@ const emailPasswordUpdate = async (props) => {
845
851
  auto_sign_in_after_verification: props.autoSignInAfterVerification,
846
852
  send_verification_email_on_sign_up: props.sendVerificationEmailOnSignUp,
847
853
  send_verification_email_on_sign_in: props.sendVerificationEmailOnSignIn,
848
- disable_sign_up: props.disableSignUp
854
+ disable_sign_up: props.disableSignUp,
855
+ revoke_sessions_on_password_reset: props.revokeSessionsOnPasswordReset
849
856
  });
850
857
  if (props.output === "json" || props.output === "yaml") {
851
858
  writer(props).end(data, { fields: EMAIL_PASSWORD_FIELDS });
@@ -29,7 +29,7 @@ import { a as init_exports } from "../_chunks/init-D2fClHtC.js";
29
29
  import { o as inspect_exports } from "../_chunks/inspect-yFAb61qo.js";
30
30
  import { a as ip_allow_exports } from "../_chunks/ip_allow-DBdxNEUa.js";
31
31
  import { l as logs_exports } from "../_chunks/logs-BB4uvblR.js";
32
- import { a as neon_auth_exports } from "../_chunks/neon_auth-Dw-ucM5Y.js";
32
+ import { a as neon_auth_exports } from "../_chunks/neon_auth-C1CgNTGP.js";
33
33
  import { a as open_exports } from "../_chunks/open-T2nI89Oh.js";
34
34
  import { s as operations_exports } from "../_chunks/operations-CzaR_uqx.js";
35
35
  import { o as orgs_exports } from "../_chunks/orgs-Dpbr-K0A.js";
@@ -1 +1 @@
1
- export { t as builder, n as command, r as describe, i as handler } from "../_chunks/neon_auth-Dw-ucM5Y.js";
1
+ export { t as builder, n as command, r as describe, i as handler } from "../_chunks/neon_auth-C1CgNTGP.js";
@@ -171,11 +171,13 @@ const renderTableEvent = (out, event, now) => {
171
171
  const rows = event.changes.map((change) => ({
172
172
  type: change.type,
173
173
  row_id: change.rowId,
174
+ after_row_id: change.type === "move" ? change.afterRowId ?? "(head)" : void 0,
174
175
  row: change.type === "upsert" ? change.row : void 0
175
176
  }));
176
177
  renderRows(out, rows, [
177
178
  "type",
178
179
  "row_id",
180
+ "after_row_id",
179
181
  "row"
180
182
  ], `${timestamp(now)} ${transactionLabel(event.txids)} · ${rawChangeSummary(event.changes)}`, "Changes event contains no row changes.");
181
183
  };
@@ -210,13 +212,14 @@ const renderHumanChanges = (out, event, rowsById, now) => {
210
212
  const inserted = changes.filter((change) => change.operation === "+ insert");
211
213
  const updated = changes.filter((change) => change.operation === "~ update");
212
214
  const deleted = changes.filter((change) => change.operation === "- delete");
215
+ const moved = changes.filter((change) => change.operation === "↔ move");
213
216
  const rowFieldsInChanges = rowFields(changes.flatMap((change) => change.row ? [change.row] : []));
214
217
  const operationField = uniqueOperationField(rowFieldsInChanges);
215
218
  const rows = changes.map((change) => ({
216
219
  ...change.row ?? {},
217
220
  [operationField]: change.operation
218
221
  }));
219
- renderRows(out, rows, [operationField, ...rowFieldsInChanges], `${timestamp(now)} ${transactionLabel(event.txids)} · +${inserted.length} ~${updated.length} -${deleted.length}`, "Transaction contains no row changes.");
222
+ renderRows(out, rows, [operationField, ...rowFieldsInChanges], `${timestamp(now)} ${transactionLabel(event.txids)} · +${inserted.length} ~${updated.length} -${deleted.length}${moved.length ? ` ↔${moved.length}` : ""}`, "Transaction contains no row changes.");
220
223
  };
221
224
  const renderRows = (out, rows, fields, title, emptyMessage) => {
222
225
  writer({
@@ -229,20 +232,29 @@ const renderRows = (out, rows, fields, title, emptyMessage) => {
229
232
  if (rows.length === 0) out.write(`${emptyMessage}\n`);
230
233
  };
231
234
  const classifyChanges = (changes, rowsById) => changes.map((change) => {
232
- if (change.type === "upsert") {
233
- const operation = rowsById.has(change.rowId) ? "~ update" : "+ insert";
234
- rowsById.set(change.rowId, change.row);
235
- return {
236
- operation,
237
- row: change.row
235
+ switch (change.type) {
236
+ case "upsert": {
237
+ const operation = rowsById.has(change.rowId) ? "~ update" : "+ insert";
238
+ rowsById.set(change.rowId, change.row);
239
+ return {
240
+ operation,
241
+ row: change.row
242
+ };
243
+ }
244
+ case "remove": {
245
+ const row = rowsById.get(change.rowId);
246
+ rowsById.delete(change.rowId);
247
+ return {
248
+ operation: "- delete",
249
+ ...row ? { row } : {}
250
+ };
251
+ }
252
+ case "move": return {
253
+ operation: "↔ move",
254
+ row: rowsById.get(change.rowId)
238
255
  };
256
+ default: throw new Error(`Unsupported Realtime change: ${change}`);
239
257
  }
240
- const row = rowsById.get(change.rowId);
241
- rowsById.delete(change.rowId);
242
- return {
243
- operation: "- delete",
244
- ...row ? { row } : {}
245
- };
246
258
  });
247
259
  const uniqueOperationField = (fields) => {
248
260
  for (const candidate of [
@@ -260,8 +272,9 @@ const transactionLabel = (txids) => {
260
272
  };
261
273
  const rawChangeSummary = (changes) => {
262
274
  const upserts = changes.filter((change) => change.type === "upsert").length;
263
- const removals = changes.length - upserts;
264
- return `${upserts} upsert${upserts === 1 ? "" : "s"}, ${removals} removal${removals === 1 ? "" : "s"}`;
275
+ const removals = changes.filter((change) => change.type === "remove").length;
276
+ const moves = changes.filter((change) => change.type === "move").length;
277
+ return `${upserts} upsert${upserts === 1 ? "" : "s"}, ${removals} removal${removals === 1 ? "" : "s"}${moves ? `, ${moves} move${moves === 1 ? "" : "s"}` : ""}`;
265
278
  };
266
279
  const rowCount = (count) => `${count} ${count === 1 ? "row" : "rows"}`;
267
280
  const timestamp = (now) => `[${now().toISOString()}]`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neon",
3
- "version": "8.18.0",
3
+ "version": "8.19.0",
4
4
  "description": "CLI tool for Neon, the cloud backend primitives built around Lakebase Postgres",
5
5
  "keywords": [
6
6
  "neon",
@@ -73,10 +73,10 @@
73
73
  "yaml": "^2.9.0",
74
74
  "yargs": "17.7.2",
75
75
  "yoctocolors": "^2.1.2",
76
- "@neon/config-runtime": "1.11.1",
76
+ "@neon/config": "1.10.3",
77
+ "@neon/config-runtime": "1.11.3",
77
78
  "@neon/realtime": "0.1.2",
78
- "@neon/sdk": "7.8.0",
79
- "@neon/config": "1.10.1"
79
+ "@neon/sdk": "7.8.1"
80
80
  },
81
81
  "optionalDependencies": {
82
82
  "@napi-rs/keyring": "1.3.0",
@@ -113,9 +113,9 @@
113
113
  "typescript": "^5.9.0",
114
114
  "vitest": "^3.0.9",
115
115
  "@neon-internals/cli-core": "0.0.0",
116
- "@neon-internals/env-core": "0.0.39",
116
+ "@neon-internals/env-core": "0.0.41",
117
117
  "@neon/e2e-harness": "0.0.0",
118
- "@neon/env": "1.6.9",
118
+ "@neon/env": "1.6.11",
119
119
  "@neon/functions": "0.11.0"
120
120
  },
121
121
  "publishConfig": {