dotmd-cli 0.14.5 → 0.14.6

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/package.json +1 -1
  2. package/src/render.mjs +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotmd-cli",
3
- "version": "0.14.5",
3
+ "version": "0.14.6",
4
4
  "description": "CLI for managing markdown documents with YAML frontmatter — index, query, validate, graph, export, Notion sync, AI summaries.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/render.mjs CHANGED
@@ -17,8 +17,10 @@ export function renderCompactList(index, config) {
17
17
  function _renderCompactList(index, config) {
18
18
  const lines = ['Index', ''];
19
19
  const maxWidth = config.display.lineWidth || process.stdout.columns || 120;
20
+ const hidden = config.lifecycle.archiveStatuses;
20
21
 
21
22
  for (const status of config.statusOrder) {
23
+ if (hidden.has(status)) continue;
22
24
  const docs = index.docs.filter(d => d.status === status);
23
25
  if (!docs.length) continue;
24
26
 
@@ -43,7 +45,7 @@ function _renderCompactList(index, config) {
43
45
 
44
46
  // Render docs with statuses not in statusOrder
45
47
  const knownStatuses = new Set(config.statusOrder);
46
- const otherStatuses = [...new Set(index.docs.filter(d => d.status && !knownStatuses.has(d.status)).map(d => d.status))].sort();
48
+ const otherStatuses = [...new Set(index.docs.filter(d => d.status && !knownStatuses.has(d.status) && !hidden.has(d.status)).map(d => d.status))].sort();
47
49
  for (const status of otherStatuses) {
48
50
  const docs = index.docs.filter(d => d.status === status);
49
51
  if (!docs.length) continue;
@@ -72,8 +74,10 @@ function _renderCompactList(index, config) {
72
74
 
73
75
  export function renderVerboseList(index, config) {
74
76
  const lines = ['Index', ''];
77
+ const hidden = config.lifecycle.archiveStatuses;
75
78
 
76
79
  for (const status of config.statusOrder) {
80
+ if (hidden.has(status)) continue;
77
81
  const docs = index.docs.filter(doc => doc.status === status);
78
82
  if (docs.length === 0) continue;
79
83
 
@@ -90,7 +94,7 @@ export function renderVerboseList(index, config) {
90
94
 
91
95
  // Render docs with statuses not in statusOrder
92
96
  const knownStatuses = new Set(config.statusOrder);
93
- const otherStatuses = [...new Set(index.docs.filter(d => d.status && !knownStatuses.has(d.status)).map(d => d.status))].sort();
97
+ const otherStatuses = [...new Set(index.docs.filter(d => d.status && !knownStatuses.has(d.status) && !hidden.has(d.status)).map(d => d.status))].sort();
94
98
  for (const status of otherStatuses) {
95
99
  const docs = index.docs.filter(doc => doc.status === status);
96
100
  if (docs.length === 0) continue;