recess-cli 3.58.0 → 3.59.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/dist/args.js CHANGED
@@ -92,6 +92,7 @@ export const BOOLEAN_FLAGS = new Set([
92
92
  "state-funding",
93
93
  "supersede",
94
94
  "to-end",
95
+ "top-up",
95
96
  "unlink",
96
97
  "visual-only",
97
98
  "wait",
@@ -1,7 +1,7 @@
1
1
  import { fs } from "../in-app.js";
2
2
  import path from "node:path";
3
3
  import { unwrap } from "../api.js";
4
- import { flagString } from "../args.js";
4
+ import { flagString, hasFlag } from "../args.js";
5
5
  import { CliError } from "../errors.js";
6
6
  import { assertChoice, positional } from "./shared.js";
7
7
  async function readSend(parsed) {
@@ -33,6 +33,22 @@ export async function runChangelogCommand({ parsed, api, writeCommand, }) {
33
33
  throw new CliError("invalid_arguments", "Use changelog preview|test|send|history|show.");
34
34
  }
35
35
  const send = await readSend(parsed);
36
+ if (action === "send" && hasFlag(parsed, "top-up")) {
37
+ const slug = send.slug;
38
+ const { added } = unwrap(await api.client.POST("/admin/changelog-sends/top-up/", {
39
+ body: { slug, preview: true },
40
+ }));
41
+ if (added === 0)
42
+ return { slug, added, queued: false };
43
+ return writeCommand(parsed, {
44
+ action: `email and text the ${added} people the "${slug}" send missed, with its original copy. The feed and Slack posts don't repeat.`,
45
+ target: { slug },
46
+ request: { slug },
47
+ details: { added },
48
+ }, async () => unwrap(await api.client.POST("/admin/changelog-sends/top-up/", {
49
+ body: { slug },
50
+ })));
51
+ }
36
52
  if (action === "test") {
37
53
  const audience = assertChoice(flagString(parsed, "audience", { required: true }), ["kids", "parents", "tutors"], "--audience");
38
54
  return unwrap(await api.client.POST("/admin/changelog-sends/test/", {
package/dist/help.js CHANGED
@@ -463,7 +463,7 @@ Usage:
463
463
  recess [--json] feed post --users <id,id,...> --text TEXT [--send-email] [--confirm]
464
464
  recess [--json] changelog preview --file <send.json> [--html-dir <dir>]
465
465
  recess [--json] changelog test --file <send.json> --audience kids|parents|tutors
466
- recess [--json] changelog send --file <send.json> [--confirm]
466
+ recess [--json] changelog send --file <send.json> [--top-up] [--confirm]
467
467
  recess [--json] changelog history
468
468
  recess [--json] changelog show <slug>
469
469
  recess [--json] dms send --users <id,id,...> --text TEXT [--confirm]
@@ -1645,7 +1645,7 @@ export const COMMAND_SUMMARIES = {
1645
1645
  "feed post": "Post a message to users' feeds (optionally email).",
1646
1646
  "changelog preview": "Render a changelog blast and count who it reaches, sending nothing.",
1647
1647
  "changelog test": "Send yourself one audience's email and text.",
1648
- "changelog send": "Send a live changelog post to its audience, once.",
1648
+ "changelog send": "Send a live changelog post to its audience, once. --top-up reaches whoever its audience now covers but it missed.",
1649
1649
  "changelog history": "List every changelog send.",
1650
1650
  "changelog show": "One changelog send and its exact copy.",
1651
1651
  "dms send": "Send a Recess chat DM as yourself to each user (1:1).",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "recess-cli",
3
- "version": "3.58.0",
3
+ "version": "3.59.0",
4
4
  "description": "Safe Recess administration and family AI tools from the command line.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {