@staff0rd/assist 0.145.0 → 0.146.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 (2) hide show
  1. package/dist/index.js +7 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.145.0",
9
+ version: "0.146.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -2457,7 +2457,11 @@ async function addFromJson() {
2457
2457
  return;
2458
2458
  }
2459
2459
  const input = await readStdin2();
2460
- const data = addItemSchema.parse(JSON.parse(input));
2460
+ const sanitised = input.replace(
2461
+ /"(?:[^"\\]|\\.)*"/g,
2462
+ (match) => match.replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t")
2463
+ );
2464
+ const data = addItemSchema.parse(JSON.parse(sanitised));
2461
2465
  const items = loadBacklog();
2462
2466
  const id = getNextId(items);
2463
2467
  items.push({ ...data, id, status: "todo" });
@@ -3180,7 +3184,7 @@ function registerItemCommands(cmd) {
3180
3184
  function registerStatusCommands(cmd) {
3181
3185
  cmd.command("start <id>").description("Set a backlog item to in-progress").action(start);
3182
3186
  cmd.command("done <id>").description("Set a backlog item to done").action(done);
3183
- cmd.command("delete <id>").description("Delete a backlog item").action(del);
3187
+ cmd.command("delete <id>").alias("remove").description("Delete a backlog item").action(del);
3184
3188
  cmd.command("web").description("Start a web view of the backlog").option("-p, --port <number>", "Port to listen on", "3000").action(web);
3185
3189
  }
3186
3190
  function registerOrchestrationCommands(cmd) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.145.0",
3
+ "version": "0.146.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {