@staff0rd/assist 0.171.0 → 0.171.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 +17 -6
  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.171.0",
9
+ version: "0.171.1",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -128,6 +128,22 @@ function deleteItem(db, id) {
128
128
  import { statSync, writeFileSync } from "fs";
129
129
  import { join } from "path";
130
130
 
131
+ // src/commands/backlog/loadComments.ts
132
+ function loadComments(db, itemId) {
133
+ const rows = db.prepare(
134
+ "SELECT text, phase, timestamp, type FROM comments WHERE item_id = ? ORDER BY idx"
135
+ ).all(itemId);
136
+ return rows.map((r) => {
137
+ const c = {
138
+ text: r.text,
139
+ timestamp: r.timestamp,
140
+ type: r.type
141
+ };
142
+ if (r.phase != null) c.phase = r.phase;
143
+ return c;
144
+ });
145
+ }
146
+
131
147
  // src/commands/backlog/loadPlan.ts
132
148
  function toPhase(db, itemId, p) {
133
149
  const tasks = db.prepare(
@@ -154,11 +170,6 @@ function loadPlan(db, itemId) {
154
170
  }
155
171
 
156
172
  // src/commands/backlog/loadAllItems.ts
157
- function loadComments(db, itemId) {
158
- return db.prepare(
159
- "SELECT text, phase, timestamp, type FROM comments WHERE item_id = ? ORDER BY idx"
160
- ).all(itemId);
161
- }
162
173
  function loadLinks(db, itemId) {
163
174
  return db.prepare("SELECT type, target_id as targetId FROM links WHERE item_id = ?").all(itemId);
164
175
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.171.0",
3
+ "version": "0.171.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {