todoosy 0.3.3 → 0.3.5
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/cjs/formatter.d.ts +5 -0
- package/dist/cjs/formatter.js +202 -0
- package/dist/cjs/index.d.ts +13 -0
- package/dist/cjs/index.js +29 -0
- package/dist/cjs/linter.d.ts +6 -0
- package/dist/cjs/linter.js +518 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/parser.d.ts +11 -0
- package/dist/cjs/parser.js +719 -0
- package/dist/cjs/query.d.ts +22 -0
- package/dist/cjs/query.js +153 -0
- package/dist/cjs/scheme.d.ts +7 -0
- package/dist/cjs/scheme.js +14 -0
- package/dist/cjs/sequence.d.ts +53 -0
- package/dist/cjs/sequence.js +233 -0
- package/dist/cjs/settings.d.ts +65 -0
- package/dist/cjs/settings.js +262 -0
- package/dist/cjs/types.d.ts +102 -0
- package/dist/cjs/types.js +5 -0
- package/dist/settings.js +1 -1
- package/dist/settings.js.map +1 -1
- package/package.json +10 -4
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Todoosy Settings Parser
|
|
4
|
+
*
|
|
5
|
+
* Parses todoosy.settings.md files using a canonical Markdown-compatible format.
|
|
6
|
+
*
|
|
7
|
+
* ## Canonical Format
|
|
8
|
+
*
|
|
9
|
+
* Settings files use standard Markdown with level-1 headings as setting names:
|
|
10
|
+
*
|
|
11
|
+
* ```markdown
|
|
12
|
+
* # Setting Name
|
|
13
|
+
*
|
|
14
|
+
* value
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* ## Value Types
|
|
18
|
+
*
|
|
19
|
+
* 1. **Single Value** - First non-empty line after heading
|
|
20
|
+
* ```markdown
|
|
21
|
+
* # Timezone
|
|
22
|
+
*
|
|
23
|
+
* America/Denver
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* 2. **List Value** - Bulleted list items (- or *)
|
|
27
|
+
* ```markdown
|
|
28
|
+
* # Tags
|
|
29
|
+
*
|
|
30
|
+
* - work
|
|
31
|
+
* - personal
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* 3. **Key-Value Map** - Lines with `key - value` format
|
|
35
|
+
* ```markdown
|
|
36
|
+
* # Priorities
|
|
37
|
+
*
|
|
38
|
+
* P0 - Critical
|
|
39
|
+
* P1 - High
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* ## Known Settings
|
|
43
|
+
*
|
|
44
|
+
* - Timezone: Single value (IANA timezone identifier)
|
|
45
|
+
* - Priorities: Key-value map (P0 - Label)
|
|
46
|
+
* - Misc: Single value (filename/headingname)
|
|
47
|
+
* - Calendar Format: Single value (yyyy-mm-dd, mm/dd/yyyy, etc.)
|
|
48
|
+
* - Formatting Style: Single value (roomy, balanced, tight)
|
|
49
|
+
*
|
|
50
|
+
* ## Extended Settings
|
|
51
|
+
*
|
|
52
|
+
* Any heading not matching known settings is captured as an extended setting,
|
|
53
|
+
* with automatic value type inference.
|
|
54
|
+
*/
|
|
55
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
|
+
exports.VALID_FORMATTING_STYLES = exports.VALID_CALENDAR_FORMATS = void 0;
|
|
57
|
+
exports.parseSettings = parseSettings;
|
|
58
|
+
exports.parseScheme = parseScheme;
|
|
59
|
+
// Heading patterns for known settings
|
|
60
|
+
const HEADING_REGEX = /^#{1,6}\s+(.+?)\s*$/;
|
|
61
|
+
const KNOWN_SETTINGS = {
|
|
62
|
+
timezone: 'timezone',
|
|
63
|
+
priorities: 'priorities',
|
|
64
|
+
misc: 'misc',
|
|
65
|
+
'calendar format': 'calendar_format',
|
|
66
|
+
'formatting style': 'formatting_style',
|
|
67
|
+
};
|
|
68
|
+
// Value parsing patterns
|
|
69
|
+
const BULLET_LINE_REGEX = /^[*\-]\s+(.+)$/;
|
|
70
|
+
const KEY_VALUE_REGEX = /^([^-–—]+?)\s*[-–—]\s+(.+)$/;
|
|
71
|
+
const PRIORITY_KEY_REGEX = /^[Pp](\d+)$/;
|
|
72
|
+
exports.VALID_CALENDAR_FORMATS = new Set([
|
|
73
|
+
'yyyy-mm-dd',
|
|
74
|
+
'yyyy/mm/dd',
|
|
75
|
+
'mm/dd/yyyy',
|
|
76
|
+
'dd/mm/yyyy',
|
|
77
|
+
]);
|
|
78
|
+
exports.VALID_FORMATTING_STYLES = new Set(['roomy', 'balanced', 'tight']);
|
|
79
|
+
/**
|
|
80
|
+
* Normalize a setting name for comparison with known settings
|
|
81
|
+
*/
|
|
82
|
+
function normalizeName(name) {
|
|
83
|
+
return name.toLowerCase().trim();
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Parse the file into sections based on level-1 headings
|
|
87
|
+
*/
|
|
88
|
+
function parseSections(text) {
|
|
89
|
+
const lines = text.split('\n');
|
|
90
|
+
const sections = [];
|
|
91
|
+
let currentSection = null;
|
|
92
|
+
for (const line of lines) {
|
|
93
|
+
const headingMatch = line.match(HEADING_REGEX);
|
|
94
|
+
if (headingMatch) {
|
|
95
|
+
// Save previous section
|
|
96
|
+
if (currentSection) {
|
|
97
|
+
sections.push(currentSection);
|
|
98
|
+
}
|
|
99
|
+
// Start new section
|
|
100
|
+
const name = headingMatch[1];
|
|
101
|
+
currentSection = {
|
|
102
|
+
name,
|
|
103
|
+
normalizedName: normalizeName(name),
|
|
104
|
+
lines: [],
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
else if (currentSection) {
|
|
108
|
+
currentSection.lines.push(line);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// Don't forget the last section
|
|
112
|
+
if (currentSection) {
|
|
113
|
+
sections.push(currentSection);
|
|
114
|
+
}
|
|
115
|
+
return sections;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Infer the value type and parse accordingly
|
|
119
|
+
*/
|
|
120
|
+
function parseValue(lines) {
|
|
121
|
+
const nonEmptyLines = [];
|
|
122
|
+
const bulletItems = [];
|
|
123
|
+
const keyValuePairs = {};
|
|
124
|
+
let hasBullets = false;
|
|
125
|
+
let hasKeyValues = false;
|
|
126
|
+
for (const line of lines) {
|
|
127
|
+
const trimmed = line.trim();
|
|
128
|
+
if (!trimmed)
|
|
129
|
+
continue;
|
|
130
|
+
// Check for bullet
|
|
131
|
+
const bulletMatch = trimmed.match(BULLET_LINE_REGEX);
|
|
132
|
+
if (bulletMatch) {
|
|
133
|
+
bulletItems.push(bulletMatch[1].trim());
|
|
134
|
+
hasBullets = true;
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
// Check for key-value
|
|
138
|
+
const kvMatch = trimmed.match(KEY_VALUE_REGEX);
|
|
139
|
+
if (kvMatch) {
|
|
140
|
+
const key = kvMatch[1].trim();
|
|
141
|
+
const value = kvMatch[2].trim();
|
|
142
|
+
keyValuePairs[key] = value;
|
|
143
|
+
hasKeyValues = true;
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
nonEmptyLines.push(trimmed);
|
|
147
|
+
}
|
|
148
|
+
// Determine value type based on what we found
|
|
149
|
+
if (hasBullets && bulletItems.length > 0) {
|
|
150
|
+
return bulletItems;
|
|
151
|
+
}
|
|
152
|
+
if (hasKeyValues && Object.keys(keyValuePairs).length > 0) {
|
|
153
|
+
return keyValuePairs;
|
|
154
|
+
}
|
|
155
|
+
// Single value - return first non-empty line
|
|
156
|
+
return nonEmptyLines.length > 0 ? nonEmptyLines[0] : '';
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Parse priorities section specifically (handles P0, P1, etc. format)
|
|
160
|
+
*/
|
|
161
|
+
function parsePriorities(lines) {
|
|
162
|
+
const priorities = {};
|
|
163
|
+
for (const line of lines) {
|
|
164
|
+
const trimmed = line.trim();
|
|
165
|
+
if (!trimmed)
|
|
166
|
+
continue;
|
|
167
|
+
// Handle bullet prefix
|
|
168
|
+
let content = trimmed;
|
|
169
|
+
const bulletMatch = trimmed.match(BULLET_LINE_REGEX);
|
|
170
|
+
if (bulletMatch) {
|
|
171
|
+
content = bulletMatch[1];
|
|
172
|
+
}
|
|
173
|
+
// Parse key-value
|
|
174
|
+
const kvMatch = content.match(KEY_VALUE_REGEX);
|
|
175
|
+
if (kvMatch) {
|
|
176
|
+
const key = kvMatch[1].trim();
|
|
177
|
+
const value = kvMatch[2].trim();
|
|
178
|
+
// Extract priority number from P0, P1, etc.
|
|
179
|
+
const priorityMatch = key.match(PRIORITY_KEY_REGEX);
|
|
180
|
+
if (priorityMatch) {
|
|
181
|
+
priorities[priorityMatch[1]] = value;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return priorities;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Parse a settings file and return structured settings
|
|
189
|
+
*/
|
|
190
|
+
function parseSettings(text) {
|
|
191
|
+
const sections = parseSections(text);
|
|
192
|
+
const settings = {
|
|
193
|
+
timezone: null,
|
|
194
|
+
priorities: {},
|
|
195
|
+
misc: 'todoosy.md/Misc',
|
|
196
|
+
calendar_format: 'yyyy-mm-dd',
|
|
197
|
+
formatting_style: 'roomy',
|
|
198
|
+
extended: {},
|
|
199
|
+
};
|
|
200
|
+
for (const section of sections) {
|
|
201
|
+
const knownKey = KNOWN_SETTINGS[section.normalizedName];
|
|
202
|
+
if (knownKey) {
|
|
203
|
+
// Handle known settings
|
|
204
|
+
switch (knownKey) {
|
|
205
|
+
case 'timezone': {
|
|
206
|
+
const value = parseValue(section.lines);
|
|
207
|
+
if (typeof value === 'string' && value) {
|
|
208
|
+
settings.timezone = value;
|
|
209
|
+
}
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
case 'priorities': {
|
|
213
|
+
settings.priorities = parsePriorities(section.lines);
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
case 'misc': {
|
|
217
|
+
const value = parseValue(section.lines);
|
|
218
|
+
if (typeof value === 'string' && value) {
|
|
219
|
+
settings.misc = value;
|
|
220
|
+
}
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
case 'calendar_format': {
|
|
224
|
+
const value = parseValue(section.lines);
|
|
225
|
+
if (typeof value === 'string' && value) {
|
|
226
|
+
settings.calendar_format = value.toLowerCase();
|
|
227
|
+
}
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
230
|
+
case 'formatting_style': {
|
|
231
|
+
const value = parseValue(section.lines);
|
|
232
|
+
if (typeof value === 'string' && value) {
|
|
233
|
+
settings.formatting_style = value.toLowerCase();
|
|
234
|
+
}
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
// Extended setting - use original name as key
|
|
241
|
+
const value = parseValue(section.lines);
|
|
242
|
+
if (value !== '') {
|
|
243
|
+
settings.extended[section.name] = value;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return settings;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Parse a settings file and return legacy Scheme format
|
|
251
|
+
* @deprecated Use parseSettings instead
|
|
252
|
+
*/
|
|
253
|
+
function parseScheme(text) {
|
|
254
|
+
const settings = parseSettings(text);
|
|
255
|
+
return {
|
|
256
|
+
timezone: settings.timezone,
|
|
257
|
+
priorities: settings.priorities,
|
|
258
|
+
misc: settings.misc,
|
|
259
|
+
calendar_format: settings.calendar_format,
|
|
260
|
+
formatting_style: settings.formatting_style,
|
|
261
|
+
};
|
|
262
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Todoosy Types
|
|
3
|
+
*/
|
|
4
|
+
export interface ItemMetadata {
|
|
5
|
+
due: string | null;
|
|
6
|
+
due_soft: boolean | null;
|
|
7
|
+
priority: number | null;
|
|
8
|
+
estimate_minutes: number | null;
|
|
9
|
+
progress: string | null;
|
|
10
|
+
hashtags: string[];
|
|
11
|
+
effective_hashtags: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface ItemNode {
|
|
14
|
+
id: string;
|
|
15
|
+
type: 'heading' | 'list';
|
|
16
|
+
level?: number;
|
|
17
|
+
marker_type?: 'bullet' | 'numbered';
|
|
18
|
+
sequence_number?: number;
|
|
19
|
+
raw_line: string;
|
|
20
|
+
title_text: string;
|
|
21
|
+
metadata: ItemMetadata;
|
|
22
|
+
comments: string[];
|
|
23
|
+
children: string[];
|
|
24
|
+
item_span: [number, number];
|
|
25
|
+
subtree_span: [number, number];
|
|
26
|
+
line: number;
|
|
27
|
+
column: number;
|
|
28
|
+
}
|
|
29
|
+
export interface AST {
|
|
30
|
+
items: ItemNode[];
|
|
31
|
+
root_ids: string[];
|
|
32
|
+
}
|
|
33
|
+
export interface Warning {
|
|
34
|
+
code: string;
|
|
35
|
+
message: string;
|
|
36
|
+
line: number | null;
|
|
37
|
+
column: number | null;
|
|
38
|
+
span: [number, number] | null;
|
|
39
|
+
}
|
|
40
|
+
export interface LintResult {
|
|
41
|
+
warnings: Warning[];
|
|
42
|
+
}
|
|
43
|
+
export interface UpcomingItem {
|
|
44
|
+
id: string;
|
|
45
|
+
due: string;
|
|
46
|
+
priority: number | null;
|
|
47
|
+
priority_label?: string;
|
|
48
|
+
path: string;
|
|
49
|
+
item_span: [number, number];
|
|
50
|
+
}
|
|
51
|
+
export interface UpcomingResult {
|
|
52
|
+
items: UpcomingItem[];
|
|
53
|
+
}
|
|
54
|
+
export interface MiscItem {
|
|
55
|
+
id: string;
|
|
56
|
+
title_text: string;
|
|
57
|
+
item_span: [number, number];
|
|
58
|
+
}
|
|
59
|
+
export interface MiscResult {
|
|
60
|
+
items: MiscItem[];
|
|
61
|
+
}
|
|
62
|
+
export interface Scheme {
|
|
63
|
+
timezone: string | null;
|
|
64
|
+
priorities: Record<string, string>;
|
|
65
|
+
misc: string;
|
|
66
|
+
calendar_format: string;
|
|
67
|
+
formatting_style: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Represents the value of a setting in the settings file.
|
|
71
|
+
* - string: Single value (e.g., timezone, calendar format)
|
|
72
|
+
* - string[]: List of values (e.g., tags, categories)
|
|
73
|
+
* - Record<string, string>: Key-value pairs (e.g., priorities, colors)
|
|
74
|
+
*/
|
|
75
|
+
export type SettingValue = string | string[] | Record<string, string>;
|
|
76
|
+
/**
|
|
77
|
+
* Extended settings interface that supports both known and custom settings.
|
|
78
|
+
* Known settings are typed explicitly, custom settings are captured in `extended`.
|
|
79
|
+
*/
|
|
80
|
+
export interface Settings {
|
|
81
|
+
timezone: string | null;
|
|
82
|
+
priorities: Record<string, string>;
|
|
83
|
+
misc: string;
|
|
84
|
+
calendar_format: string;
|
|
85
|
+
formatting_style: string;
|
|
86
|
+
extended: Record<string, SettingValue>;
|
|
87
|
+
}
|
|
88
|
+
export interface ParsedToken {
|
|
89
|
+
type: 'due' | 'priority' | 'estimate' | 'progress' | 'hashtag';
|
|
90
|
+
value: string | number;
|
|
91
|
+
raw: string;
|
|
92
|
+
start: number;
|
|
93
|
+
end: number;
|
|
94
|
+
soft?: boolean;
|
|
95
|
+
}
|
|
96
|
+
export interface ParenGroup {
|
|
97
|
+
start: number;
|
|
98
|
+
end: number;
|
|
99
|
+
content: string;
|
|
100
|
+
tokens: ParsedToken[];
|
|
101
|
+
hasRecognizedTokens: boolean;
|
|
102
|
+
}
|
package/dist/settings.js
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
* with automatic value type inference.
|
|
53
53
|
*/
|
|
54
54
|
// Heading patterns for known settings
|
|
55
|
-
const HEADING_REGEX =
|
|
55
|
+
const HEADING_REGEX = /^#{1,6}\s+(.+?)\s*$/;
|
|
56
56
|
const KNOWN_SETTINGS = {
|
|
57
57
|
timezone: 'timezone',
|
|
58
58
|
priorities: 'priorities',
|
package/dist/settings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;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GG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,UAAU,EAAE,QAAQ,CAAC,UAAU;QAC/B,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,eAAe,EAAE,QAAQ,CAAC,eAAe;QACzC,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB;KAC5C,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "todoosy",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Todoosy - Markdown-based todo system parser, formatter, linter, and query engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build": "tsc",
|
|
9
|
+
"build": "tsc && tsc -p tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
|
|
10
10
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
11
11
|
"lint": "eslint src --ext .ts"
|
|
12
12
|
},
|
|
@@ -22,8 +22,14 @@
|
|
|
22
22
|
"files": ["dist"],
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
25
|
-
"import":
|
|
26
|
-
|
|
25
|
+
"import": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"require": {
|
|
30
|
+
"types": "./dist/cjs/index.d.ts",
|
|
31
|
+
"default": "./dist/cjs/index.js"
|
|
32
|
+
}
|
|
27
33
|
}
|
|
28
34
|
}
|
|
29
35
|
}
|