imdone-core 2.0.0 → 2.0.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.
- package/.dependency-cruiser.cjs +412 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
- package/.github/workflows/ci.yml +24 -0
- package/.imdoneignore +13 -0
- package/.mocharc.json +10 -0
- package/.prettierrc +6 -0
- package/CHANGELOG.md +160 -0
- package/_index.md +7 -0
- package/_navbar.md +1 -0
- package/build.js +57 -0
- package/esm-migration.md +446 -0
- package/index.html +184 -0
- package/lib/FileProjectContext.js +13 -0
- package/lib/ProjectContext.js +43 -0
- package/lib/adapters/date-time.js +15 -0
- package/lib/adapters/environment.js +3 -0
- package/lib/adapters/file-gateway.js +154 -0
- package/lib/adapters/git-download.js +55 -0
- package/lib/adapters/index.js +9 -0
- package/lib/adapters/logger.js +136 -0
- package/lib/adapters/markdown.js +180 -0
- package/lib/adapters/parsers/DateLanguageParser.js +12 -0
- package/lib/adapters/parsers/content-transformer.js +116 -0
- package/lib/adapters/parsers/file/LocalFileParserFactory.js +36 -0
- package/lib/adapters/parsers/file/ReadStreamCodeParser.js +126 -0
- package/lib/adapters/parsers/file/ReadStreamMarkdownParser.js +17 -0
- package/lib/adapters/parsers/file/ReadStreamTaskParser.js +106 -0
- package/lib/adapters/parsers/file/index.js +4 -0
- package/lib/adapters/parsers/function-parser.js +25 -0
- package/lib/adapters/parsers/index.js +5 -0
- package/lib/adapters/parsers/task/CardContentParser.js +367 -0
- package/lib/adapters/parsers/task/CheckStyleTaskParser.js +28 -0
- package/lib/adapters/parsers/task/CodeStyleTaskParser.js +24 -0
- package/lib/adapters/parsers/task/HashStyleTaskParser.js +27 -0
- package/lib/adapters/parsers/task/MarkdownStyleTaskParser.js +24 -0
- package/lib/adapters/parsers/task/TaskParser.js +38 -0
- package/lib/adapters/parsers/task/index.js +6 -0
- package/lib/adapters/storage/config.js +44 -0
- package/lib/adapters/storage/index.js +2 -0
- package/lib/adapters/storage/tags.js +29 -0
- package/lib/adapters/yaml.js +9 -0
- package/lib/card.js +299 -0
- package/lib/checksum.js +22 -0
- package/lib/config.js +249 -0
- package/lib/constants.js +68 -0
- package/lib/context/ApplicationContext.js +35 -0
- package/lib/context/index.js +1 -0
- package/lib/default-settings.js +37 -0
- package/lib/domain/entities/View.js +23 -0
- package/lib/domain/entities/index.js +1 -0
- package/lib/domain/index.js +2 -0
- package/lib/domain/usecases/GetViewsUsecase.js +44 -0
- package/lib/domain/usecases/SaveViewUsecase.js +51 -0
- package/lib/domain/usecases/index.js +2 -0
- package/lib/file.js +1391 -0
- package/lib/get-tasks-to-modify.js +117 -0
- package/lib/languages.js +113 -0
- package/lib/list.js +56 -0
- package/lib/migrate-config.js +165 -0
- package/lib/mixins/index.js +2 -0
- package/lib/mixins/repo-fs-store.js +359 -0
- package/lib/mixins/repo-watched-fs-store.js +206 -0
- package/lib/plugins/archive-plugin.js +72 -0
- package/lib/plugins/default-board-actions-plugin.js +56 -0
- package/lib/plugins/default-board-properties-plugin.js +101 -0
- package/lib/plugins/default-plugins.js +7 -0
- package/lib/plugins/epic-plugin.js +177 -0
- package/lib/plugins/extension-plugin.js +94 -0
- package/lib/plugins/index.js +9 -0
- package/lib/plugins/persist-tags-plugin.js +14 -0
- package/lib/plugins/plugin-manager.js +458 -0
- package/lib/plugins/plugin-registry.js +57 -0
- package/lib/project-factory.js +42 -0
- package/lib/project.js +864 -0
- package/lib/repository.js +1514 -0
- package/lib/task.js +780 -0
- package/lib/tools.js +176 -0
- package/lib/usecases/actions.js +32 -0
- package/lib/usecases/get-imdone-url.js +6 -0
- package/lib/usecases/get-project-tags.js +7 -0
- package/lib/usecases/get-tasks-in-file.js +26 -0
- package/lib/usecases/index.js +4 -0
- package/package.json +2 -6
- package/scripts/delete-markdown-indexes.js +87 -0
- package/scripts/generate-index.js +35 -0
- package/scripts/index-markdown.js +55 -0
- package/tsconfig.json +15 -0
- package/types/FileProjectContext.d.ts +4 -0
- package/types/ProjectContext.d.ts +9 -0
- package/types/adapters/date-time.d.ts +2 -0
- package/types/adapters/environment.d.ts +1 -0
- package/types/adapters/file-gateway.d.ts +51 -0
- package/types/adapters/git-download.d.ts +1 -0
- package/types/adapters/index.d.ts +9 -0
- package/types/adapters/logger.d.ts +24 -0
- package/types/adapters/markdown.d.ts +13 -0
- package/types/adapters/parsers/DateLanguageParser.d.ts +1 -0
- package/types/adapters/parsers/content-transformer.d.ts +10 -0
- package/types/adapters/parsers/file/LocalFileParserFactory.d.ts +5 -0
- package/types/adapters/parsers/file/ReadStreamCodeParser.d.ts +13 -0
- package/types/adapters/parsers/file/ReadStreamMarkdownParser.d.ts +7 -0
- package/types/adapters/parsers/file/ReadStreamTaskParser.d.ts +19 -0
- package/types/adapters/parsers/file/index.d.ts +4 -0
- package/types/adapters/parsers/function-parser.d.ts +1 -0
- package/types/adapters/parsers/index.d.ts +5 -0
- package/types/adapters/parsers/task/CardContentParser.d.ts +45 -0
- package/types/adapters/parsers/task/CheckStyleTaskParser.d.ts +12 -0
- package/types/adapters/parsers/task/CodeStyleTaskParser.d.ts +14 -0
- package/types/adapters/parsers/task/HashStyleTaskParser.d.ts +13 -0
- package/types/adapters/parsers/task/MarkdownStyleTaskParser.d.ts +14 -0
- package/types/adapters/parsers/task/TaskParser.d.ts +7 -0
- package/types/adapters/parsers/task/index.d.ts +6 -0
- package/types/adapters/storage/config.d.ts +6 -0
- package/types/adapters/storage/index.d.ts +2 -0
- package/types/adapters/storage/tags.d.ts +3 -0
- package/types/adapters/yaml.d.ts +2 -0
- package/types/card.d.ts +166 -0
- package/types/checksum.d.ts +8 -0
- package/types/config.d.ts +61 -0
- package/types/constants.d.ts +46 -0
- package/types/context/ApplicationContext.d.ts +24 -0
- package/types/context/index.d.ts +1 -0
- package/types/default-settings.d.ts +2 -0
- package/types/domain/entities/FileProjectContext.d.ts +5 -0
- package/types/domain/entities/View.d.ts +17 -0
- package/types/domain/entities/index.d.ts +1 -0
- package/types/domain/index.d.ts +2 -0
- package/types/domain/usecases/GetViewsUsecase.d.ts +4 -0
- package/types/domain/usecases/SaveViewUsecase.d.ts +8 -0
- package/types/domain/usecases/index.d.ts +2 -0
- package/types/file.d.ts +344 -0
- package/types/get-tasks-to-modify.d.ts +3 -0
- package/types/index.d.ts +23 -0
- package/types/languages.d.ts +649 -0
- package/types/list.d.ts +30 -0
- package/types/migrate-config.d.ts +1 -0
- package/types/mixins/index.d.ts +2 -0
- package/types/mixins/repo-fs-store.d.ts +2 -0
- package/types/mixins/repo-watched-fs-store.d.ts +2 -0
- package/types/plugins/archive-plugin.d.ts +8 -0
- package/types/plugins/default-board-actions-plugin.d.ts +9 -0
- package/types/plugins/default-board-properties-plugin.d.ts +16 -0
- package/types/plugins/default-plugins.d.ts +6 -0
- package/types/plugins/epic-plugin.d.ts +19 -0
- package/types/plugins/extension-plugin.d.ts +15 -0
- package/types/plugins/index.d.ts +9 -0
- package/types/plugins/persist-tags-plugin.d.ts +4 -0
- package/types/plugins/plugin-manager.d.ts +68 -0
- package/types/plugins/plugin-registry.d.ts +1 -0
- package/types/project-factory.d.ts +14 -0
- package/types/project.d.ts +158 -0
- package/types/repository.d.ts +996 -0
- package/types/task.d.ts +202 -0
- package/types/tools.d.ts +29 -0
- package/types/usecases/actions.d.ts +7 -0
- package/types/usecases/get-imdone-url.d.ts +1 -0
- package/types/usecases/get-project-tags.d.ts +1 -0
- package/types/usecases/get-tasks-in-file.d.ts +4 -0
- package/types/usecases/index.d.ts +4 -0
- package/vitest.config.js +13 -0
package/types/task.d.ts
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Description
|
|
3
|
+
* @method Task
|
|
4
|
+
* @param {} obj
|
|
5
|
+
* @return
|
|
6
|
+
*/
|
|
7
|
+
export class Task {
|
|
8
|
+
static addToLastCommentInContent(content: any, toAdd: any, newLine: any): string;
|
|
9
|
+
static DATE_META_KEYS: string[];
|
|
10
|
+
static hasCheckPrefix(content: any): boolean;
|
|
11
|
+
static padDescription(description?: any[], beforeText?: string): any[];
|
|
12
|
+
static trimDescription(rawTaskContentLines: any, beforeText: any): any;
|
|
13
|
+
static Types: {
|
|
14
|
+
CODE: string;
|
|
15
|
+
HASHTAG: string;
|
|
16
|
+
MARKDOWN: string;
|
|
17
|
+
};
|
|
18
|
+
static AnyLanguageGroup: string;
|
|
19
|
+
static EmojiGroup: string;
|
|
20
|
+
static getTagRegexp(prefix?: string): RegExp;
|
|
21
|
+
static getTags(text: any, prefix?: string): string[];
|
|
22
|
+
static getMarkdownLinkLabelPositions(text: any): {
|
|
23
|
+
start: number;
|
|
24
|
+
end: number;
|
|
25
|
+
}[];
|
|
26
|
+
static isResultInMarkdownLinkLabel(linkLabelPositions: any, index: any): any;
|
|
27
|
+
static ContextRegExp: RegExp;
|
|
28
|
+
static getContext(text: any): string[];
|
|
29
|
+
static MetaRegExp: RegExp;
|
|
30
|
+
static getMetaRegExp(config: any): RegExp;
|
|
31
|
+
static getMetaRegExpQuotes(config: any): RegExp;
|
|
32
|
+
static parseMetaData(config: any, content: any): {};
|
|
33
|
+
static getMetaData(config: any, task: any): {};
|
|
34
|
+
static execMetaRegex(re: any, content: any, codePositions: any, cb: any): void;
|
|
35
|
+
static eachMetaInContent(config: any, content: any, cb: any): void;
|
|
36
|
+
static hasWindowsEOL(content: any): boolean;
|
|
37
|
+
static getLinePos(content: any, lineNo: any): any;
|
|
38
|
+
static getLineNumber(content: any, pos: any): number;
|
|
39
|
+
static getMetaOrderRegex(config: any): RegExp;
|
|
40
|
+
/**
|
|
41
|
+
* Description
|
|
42
|
+
* @method isTask
|
|
43
|
+
* @param {} task
|
|
44
|
+
* @return BinaryExpression
|
|
45
|
+
*/
|
|
46
|
+
static isTask(task: any): task is Task;
|
|
47
|
+
static getMarkdownCodePositions(text: any): {
|
|
48
|
+
start: number;
|
|
49
|
+
end: number;
|
|
50
|
+
}[];
|
|
51
|
+
static isResultInMarkdownCode(positions: any, index: any): boolean;
|
|
52
|
+
static removeTags(text: any, prefix?: string): any;
|
|
53
|
+
static removeContext(text: any): any;
|
|
54
|
+
static removeMetaDataFromText(config: any, text: any): any;
|
|
55
|
+
static removeMetaData({ config, content, key, value }: {
|
|
56
|
+
config: any;
|
|
57
|
+
content: any;
|
|
58
|
+
key: any;
|
|
59
|
+
value: any;
|
|
60
|
+
}): any;
|
|
61
|
+
constructor(config: any, obj: any, dontParse: any);
|
|
62
|
+
frontMatter: any;
|
|
63
|
+
pos: any;
|
|
64
|
+
rawTask: any;
|
|
65
|
+
beforeText: any;
|
|
66
|
+
text: any;
|
|
67
|
+
list: any;
|
|
68
|
+
set order(val: any);
|
|
69
|
+
get order(): any;
|
|
70
|
+
hasColon: any;
|
|
71
|
+
line: any;
|
|
72
|
+
id: any;
|
|
73
|
+
repoId: any;
|
|
74
|
+
source: any;
|
|
75
|
+
type: any;
|
|
76
|
+
tags: any;
|
|
77
|
+
context: any;
|
|
78
|
+
meta: any;
|
|
79
|
+
metaIndex: any;
|
|
80
|
+
inBlockComment: any;
|
|
81
|
+
singleLineBlockComment: any;
|
|
82
|
+
description: any;
|
|
83
|
+
rawTaskContentLines: any;
|
|
84
|
+
taskStartOnLine: any;
|
|
85
|
+
commentStartOnLine: any;
|
|
86
|
+
descriptionStartsWith: any;
|
|
87
|
+
filteredListName: any;
|
|
88
|
+
isWrappedWithCardTag: any;
|
|
89
|
+
config: any;
|
|
90
|
+
allMeta: any;
|
|
91
|
+
allContext: any;
|
|
92
|
+
allTags: any;
|
|
93
|
+
progress: any;
|
|
94
|
+
content: any;
|
|
95
|
+
lastLine: any;
|
|
96
|
+
orderModified: any;
|
|
97
|
+
index: any;
|
|
98
|
+
innerOrder: any;
|
|
99
|
+
get descriptionString(): any;
|
|
100
|
+
updateLastLine(): void;
|
|
101
|
+
getLastLine(): any;
|
|
102
|
+
parse(): void;
|
|
103
|
+
paddingLength: number | undefined;
|
|
104
|
+
metaKeys: string[] | undefined;
|
|
105
|
+
topics: string[] | undefined;
|
|
106
|
+
issueNumberRegExp(): RegExp;
|
|
107
|
+
get listId(): any;
|
|
108
|
+
get path(): any;
|
|
109
|
+
get markdownBeforeText(): string;
|
|
110
|
+
getTextAndDescription(): any;
|
|
111
|
+
getRawTextAndDescription(): any;
|
|
112
|
+
getProgress(): {
|
|
113
|
+
completed: any;
|
|
114
|
+
total: any;
|
|
115
|
+
};
|
|
116
|
+
getContent(): any;
|
|
117
|
+
updateContent(): void;
|
|
118
|
+
updateFromContent(content: any): void;
|
|
119
|
+
toJSON(): this & {
|
|
120
|
+
allTags: any;
|
|
121
|
+
allContext: any;
|
|
122
|
+
allMeta: any;
|
|
123
|
+
config: undefined;
|
|
124
|
+
expand: boolean;
|
|
125
|
+
};
|
|
126
|
+
getTagPrefix(): any;
|
|
127
|
+
addToLastCommentInContent(content: any, toAdd: any, newLine: any): string;
|
|
128
|
+
getCheckedData(): {
|
|
129
|
+
pad: number;
|
|
130
|
+
checked: boolean;
|
|
131
|
+
} | null;
|
|
132
|
+
updateOrderMeta(config: any, descContent?: any): undefined;
|
|
133
|
+
replaceContent(regex: any, replacement: any): void;
|
|
134
|
+
replaceMetaSep(oldMetaSep: any, newMetaSep: any): void;
|
|
135
|
+
updateContext(): void;
|
|
136
|
+
parseTodoTxt(): void;
|
|
137
|
+
getTags(): any[];
|
|
138
|
+
getContext(): any[];
|
|
139
|
+
getDueMeta(): any;
|
|
140
|
+
getMetaData(): any;
|
|
141
|
+
getListTrackingMeta(lists: any): any[];
|
|
142
|
+
hasListChanged(lists: any): boolean;
|
|
143
|
+
hasMetaData(key: any, value: any): any;
|
|
144
|
+
/**
|
|
145
|
+
* Returns metadata as list with links
|
|
146
|
+
* @method getMetaDataWithLinks
|
|
147
|
+
* @param {} repository config
|
|
148
|
+
* @return Array
|
|
149
|
+
*/
|
|
150
|
+
getMetaDataWithLinks(config: any): any[];
|
|
151
|
+
getMetaLink(config: any, metaKey: any, metaValue: any): {
|
|
152
|
+
title: string;
|
|
153
|
+
url: string;
|
|
154
|
+
icon: any;
|
|
155
|
+
} | undefined;
|
|
156
|
+
toString(): string;
|
|
157
|
+
/**
|
|
158
|
+
* Description
|
|
159
|
+
* @method getRepoId
|
|
160
|
+
* @return MemberExpression
|
|
161
|
+
*/
|
|
162
|
+
getRepoId(): any;
|
|
163
|
+
/**
|
|
164
|
+
* Description
|
|
165
|
+
* @method getSource
|
|
166
|
+
* @return MemberExpression
|
|
167
|
+
*/
|
|
168
|
+
getSource(): any;
|
|
169
|
+
/**
|
|
170
|
+
* Description
|
|
171
|
+
* @method getId
|
|
172
|
+
* @return MemberExpression
|
|
173
|
+
*/
|
|
174
|
+
getId(): any;
|
|
175
|
+
/**
|
|
176
|
+
* Description
|
|
177
|
+
* @method getList
|
|
178
|
+
* @return MemberExpression
|
|
179
|
+
*/
|
|
180
|
+
getList(): any;
|
|
181
|
+
/**
|
|
182
|
+
* Description
|
|
183
|
+
* @method getText
|
|
184
|
+
* @return text
|
|
185
|
+
*/
|
|
186
|
+
getText(opts: any, text: any): any;
|
|
187
|
+
getChecksFromHtml(html: any): boolean[];
|
|
188
|
+
/**
|
|
189
|
+
* Description
|
|
190
|
+
* @method getLine
|
|
191
|
+
* @return MemberExpression
|
|
192
|
+
*/
|
|
193
|
+
getLine(): any;
|
|
194
|
+
getType(): any;
|
|
195
|
+
/**
|
|
196
|
+
* Description
|
|
197
|
+
* @method equals
|
|
198
|
+
* @param {} task
|
|
199
|
+
* @return LogicalExpression
|
|
200
|
+
*/
|
|
201
|
+
equals(task: any): boolean | undefined;
|
|
202
|
+
}
|
package/types/tools.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export namespace tools {
|
|
2
|
+
export function union(...arrays: any[]): any[];
|
|
3
|
+
export function escapeRegExp(str: any): any;
|
|
4
|
+
export function userHome(): string | undefined;
|
|
5
|
+
export { deepEqual };
|
|
6
|
+
/**
|
|
7
|
+
* Description
|
|
8
|
+
* @method user
|
|
9
|
+
* @return LogicalExpression
|
|
10
|
+
*/
|
|
11
|
+
export function user(): string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Description
|
|
14
|
+
* @method cb
|
|
15
|
+
* @param {} cb
|
|
16
|
+
* @return ConditionalExpression
|
|
17
|
+
*/
|
|
18
|
+
export function cb(cb: any): any;
|
|
19
|
+
export function inMixinsNoop(cb: any): any;
|
|
20
|
+
export function sha(data: any): string;
|
|
21
|
+
export function format(template: any, col: any, ...args: any[]): any;
|
|
22
|
+
export function isBinaryFile(fs: any, file: any, callback: any): void;
|
|
23
|
+
export { isBinaryCheck };
|
|
24
|
+
export function sortTasks(tasks: any): any[];
|
|
25
|
+
export function hasBlankLines(content: any): boolean;
|
|
26
|
+
}
|
|
27
|
+
declare function deepEqual(a: any, b: any): any;
|
|
28
|
+
declare function isBinaryCheck(bytes: any, size: any): boolean;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function executeBoardAction({ projectPath, configPath, task, action }: {
|
|
2
|
+
projectPath: any;
|
|
3
|
+
configPath: any;
|
|
4
|
+
task: any;
|
|
5
|
+
action: any;
|
|
6
|
+
}): Promise<void>;
|
|
7
|
+
export function listAvailableActions(projectPath: any, configPath: any, plugin: any): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getTags(filePath: any): Promise<any>;
|
package/vitest.config.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineConfig } from 'vitest/config';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
test: {
|
|
5
|
+
include: ['lib/**/*.spec.js'], // Only look for test files inside src/
|
|
6
|
+
coverage: {
|
|
7
|
+
provider: "v8", // or "istanbul" if using @vitest/coverage-istanbul
|
|
8
|
+
reporter: ["text"], // Ensure text output is included
|
|
9
|
+
clean: false,
|
|
10
|
+
reportOnFailure: true,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
});
|