@staff0rd/assist 0.145.0 → 0.145.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.
Files changed (2) hide show
  1. package/dist/index.js +6 -2
  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.145.1",
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" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.145.0",
3
+ "version": "0.145.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {