recess-cli 3.26.0 → 3.27.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/command-schema.js +1 -0
- package/dist/commands/library-books.js +19 -1
- package/dist/help.js +3 -1
- package/package.json +1 -1
package/dist/command-schema.js
CHANGED
|
@@ -100,6 +100,24 @@ export async function runLibraryBooksCommand(context) {
|
|
|
100
100
|
},
|
|
101
101
|
}, async () => unwrap(await api.client.POST("/library-books/from-web", { body })));
|
|
102
102
|
}
|
|
103
|
-
|
|
103
|
+
if (verb === "delete") {
|
|
104
|
+
const id = positional(parsed, 2, "library book ID");
|
|
105
|
+
const book = unwrap(await api.client.GET("/library-books/{id}", {
|
|
106
|
+
params: { path: { id } },
|
|
107
|
+
}));
|
|
108
|
+
return writeCommand(parsed, {
|
|
109
|
+
action: "delete a book from the shared library",
|
|
110
|
+
target: { id: book.id },
|
|
111
|
+
request: { id: book.id },
|
|
112
|
+
details: {
|
|
113
|
+
title: book.title,
|
|
114
|
+
author: book.author,
|
|
115
|
+
consequence: "Removes the book from the library; goals already built from it keep their chapters and PDF.",
|
|
116
|
+
},
|
|
117
|
+
}, async () => unwrap(await api.client.DELETE("/library-books/{id}", {
|
|
118
|
+
params: { path: { id: book.id } },
|
|
119
|
+
})));
|
|
120
|
+
}
|
|
121
|
+
throw new CliError("invalid_arguments", "Use library-books search|list|get|add|delete.");
|
|
104
122
|
}
|
|
105
123
|
//# sourceMappingURL=library-books.js.map
|
package/dist/help.js
CHANGED
|
@@ -633,6 +633,7 @@ Usage:
|
|
|
633
633
|
recess [--json] library-books add (--md5 <md5> --title TEXT [--author TEXT]
|
|
634
634
|
--extension pdf|epub [--cover-url <url>] | --from-search N --query TEXT)
|
|
635
635
|
[--confirm]
|
|
636
|
+
recess [--json] library-books delete <book-id> [--confirm]
|
|
636
637
|
recess [--json] challenge-of-the-week list [--past N] [--ahead N]
|
|
637
638
|
recess [--json] challenge-of-the-week show <week>
|
|
638
639
|
recess [--json] challenge-of-the-week queue <template> --week <week> [--note TEXT] [--confirm]
|
|
@@ -1481,6 +1482,7 @@ export const COMMAND_SUMMARIES = {
|
|
|
1481
1482
|
"library-books list": "List books in the shared library.",
|
|
1482
1483
|
"library-books get": "Read one library book: status, pages, chapters.",
|
|
1483
1484
|
"library-books add": "Add a web search result to the book library.",
|
|
1485
|
+
"library-books delete": "Remove a book from the book library.",
|
|
1484
1486
|
"challenge-of-the-week list": "List Challenge of the Week picks: past, this week, upcoming, and the bench.",
|
|
1485
1487
|
"challenge-of-the-week show": "Read one week's Challenge of the Week pick and note.",
|
|
1486
1488
|
"challenge-of-the-week queue": "Queue a challenge for an empty week, with an optional note for kids.",
|
|
@@ -1549,7 +1551,7 @@ export const NOUN_SUMMARIES = {
|
|
|
1549
1551
|
memories: "Kid memory files and the context Rocky sees.",
|
|
1550
1552
|
rocky: "A kid's Rocky personality settings; free Rocky grants and budgets.",
|
|
1551
1553
|
"tutor-templates": "Tutor templates and their assignment to kids.",
|
|
1552
|
-
"library-books": "Book library: search the web, add books, read status.",
|
|
1554
|
+
"library-books": "Book library: search the web, add and delete books, read status.",
|
|
1553
1555
|
"challenge-of-the-week": "Challenge of the Week: queue weekly picks and the bench (ADMIN, GUIDE).",
|
|
1554
1556
|
mastery: "Mastery graphs and the content linked to them.",
|
|
1555
1557
|
};
|