imdone-core 1.54.10 → 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/workflows/ci.yml +2 -2
- package/.imdoneignore +2 -1
- package/README.md +2 -2
- package/_index.md +7 -0
- package/build.js +57 -0
- package/esm-migration.md +446 -0
- package/lib/FileProjectContext.js +13 -0
- package/lib/ProjectContext.js +19 -18
- package/lib/adapters/date-time.js +3 -8
- package/lib/adapters/environment.js +3 -0
- package/lib/adapters/file-gateway.js +133 -106
- package/lib/adapters/git-download.js +36 -16
- package/lib/adapters/index.js +9 -0
- package/lib/adapters/logger.js +136 -0
- package/lib/adapters/markdown.js +31 -19
- package/lib/adapters/parsers/DateLanguageParser.js +11 -9
- package/lib/adapters/parsers/content-transformer.js +35 -30
- package/lib/adapters/parsers/file/LocalFileParserFactory.js +8 -9
- package/lib/adapters/parsers/file/ReadStreamCodeParser.js +8 -8
- package/lib/adapters/parsers/file/ReadStreamMarkdownParser.js +4 -4
- package/lib/adapters/parsers/file/ReadStreamTaskParser.js +5 -3
- package/lib/adapters/parsers/file/index.js +4 -0
- package/lib/adapters/parsers/function-parser.js +1 -5
- package/lib/adapters/parsers/index.js +5 -0
- package/lib/adapters/parsers/task/CardContentParser.js +23 -32
- package/lib/adapters/parsers/task/CheckStyleTaskParser.js +2 -2
- package/lib/adapters/parsers/task/CodeStyleTaskParser.js +2 -2
- package/lib/adapters/parsers/task/HashStyleTaskParser.js +3 -3
- package/lib/adapters/parsers/task/MarkdownStyleTaskParser.js +2 -2
- package/lib/adapters/parsers/task/TaskParser.js +1 -1
- package/lib/adapters/parsers/task/index.js +6 -0
- package/lib/adapters/storage/config.js +15 -20
- package/lib/adapters/storage/index.js +2 -0
- package/lib/adapters/storage/tags.js +11 -12
- package/lib/adapters/yaml.js +8 -5
- package/lib/card.js +25 -26
- package/lib/checksum.js +22 -0
- package/lib/cli.js +114 -0
- package/lib/config.js +106 -71
- package/lib/constants.js +21 -50
- package/lib/context/ApplicationContext.js +7 -4
- package/lib/context/index.js +1 -0
- package/lib/default-settings.js +3 -3
- package/lib/domain/entities/View.js +4 -11
- package/lib/domain/entities/index.js +1 -0
- package/lib/domain/index.js +2 -0
- package/lib/domain/usecases/GetViewsUsecase.js +6 -12
- package/lib/domain/usecases/SaveViewUsecase.js +8 -14
- package/lib/domain/usecases/index.js +2 -0
- package/lib/file.js +1158 -1162
- package/lib/get-tasks-to-modify.js +117 -0
- package/lib/index.js +23 -0
- package/lib/languages.js +4 -5
- package/lib/list.js +46 -95
- package/lib/migrate-config.js +5 -5
- package/lib/mixins/index.js +2 -0
- package/lib/mixins/repo-fs-store.js +224 -289
- package/lib/mixins/repo-watched-fs-store.js +158 -147
- package/lib/plugins/archive-plugin.js +10 -8
- package/lib/plugins/default-board-actions-plugin.js +2 -2
- package/lib/plugins/default-board-properties-plugin.js +7 -7
- package/lib/plugins/default-plugins.js +7 -0
- package/lib/plugins/epic-plugin.js +6 -5
- package/lib/plugins/extension-plugin.js +24 -17
- package/lib/plugins/index.js +9 -0
- package/lib/plugins/persist-tags-plugin.js +4 -3
- package/lib/plugins/plugin-manager.js +89 -52
- package/lib/plugins/plugin-registry.js +12 -16
- package/lib/project-factory.js +21 -24
- package/lib/project.js +97 -144
- package/lib/repository.js +1323 -1555
- package/lib/task.js +562 -580
- package/lib/tools.js +39 -113
- package/lib/usecases/actions.js +32 -0
- package/lib/usecases/get-project-tags.js +3 -12
- package/lib/usecases/get-tasks-in-file.js +4 -7
- package/lib/usecases/index.js +4 -0
- package/package.json +44 -66
- package/scripts/delete-markdown-indexes.js +87 -0
- package/scripts/generate-index.js +35 -0
- package/{index-markdown.js → scripts/index-markdown.js} +7 -7
- 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/cli.js +0 -74
- package/index.js +0 -1
- package/lib/adapters/readers/FileSystemProjectReader.js +0 -45
- package/lib/context/StreamingApplicationContext.js +0 -31
- package/lib/controlers/SaveViewController.js +0 -10
- package/lib/domain/entities/FileProjectContext.js +0 -10
- package/lib/domain/usecases/OpenProjectUsecase.js +0 -13
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export function exists(path: any): Promise<false | _fs.Stats>;
|
|
2
|
+
export function statSync(path: any): _fs.Stats | undefined;
|
|
3
|
+
export function init(fileSystem?: typeof _fs): void;
|
|
4
|
+
export function existsSync(...args: any[]): boolean;
|
|
5
|
+
export function readFileSync(...args: any[]): string | Buffer<ArrayBufferLike>;
|
|
6
|
+
export function appendFileSync(...args: any[]): void;
|
|
7
|
+
export function writeFileSync(...args: any[]): void;
|
|
8
|
+
export function readdir(...args: any[]): Promise<_fs.Dirent[]>;
|
|
9
|
+
export function unlinkSync(...args: any[]): void;
|
|
10
|
+
export function readdirSyncRecursive(path: any): any[];
|
|
11
|
+
export function readdirSync(path: any): _fs.Dirent[];
|
|
12
|
+
export function sanitizeFileName(fileName: any, replaceSpacesWith: any): any;
|
|
13
|
+
export function preparePathForWriting(path: any, directory?: boolean): Promise<{
|
|
14
|
+
isFile: any;
|
|
15
|
+
isDirectory: any;
|
|
16
|
+
}>;
|
|
17
|
+
export function cp(src: any, dest: any, opts: any): Promise<void>;
|
|
18
|
+
export function rm(path: any, opts: any): Promise<void>;
|
|
19
|
+
export const sep: "/" | "\\";
|
|
20
|
+
export const stat: typeof _fs.promises.stat;
|
|
21
|
+
export const lstat: typeof _fs.promises.lstat;
|
|
22
|
+
export const lstatSync: _fs.StatSyncFn;
|
|
23
|
+
export const writeFile: typeof _fs.promises.writeFile;
|
|
24
|
+
export const unlink: typeof _fs.promises.unlink;
|
|
25
|
+
export const mkdir: typeof _fs.promises.mkdir;
|
|
26
|
+
export const readFile: typeof _fs.promises.readFile;
|
|
27
|
+
declare namespace _default {
|
|
28
|
+
export { cp };
|
|
29
|
+
export { rm };
|
|
30
|
+
export { exists };
|
|
31
|
+
export { stat };
|
|
32
|
+
export { lstat };
|
|
33
|
+
export { lstatSync };
|
|
34
|
+
export { readFileSync };
|
|
35
|
+
export { appendFileSync };
|
|
36
|
+
export { writeFileSync };
|
|
37
|
+
export { writeFile };
|
|
38
|
+
export { readdir };
|
|
39
|
+
export { unlink };
|
|
40
|
+
export { mkdir };
|
|
41
|
+
export { readFile };
|
|
42
|
+
export { readdirSyncRecursive };
|
|
43
|
+
export { readdirSync };
|
|
44
|
+
export { sanitizeFileName };
|
|
45
|
+
export { preparePathForWriting };
|
|
46
|
+
export { unlinkSync };
|
|
47
|
+
export { existsSync };
|
|
48
|
+
export { sep };
|
|
49
|
+
}
|
|
50
|
+
export default _default;
|
|
51
|
+
import _fs from 'fs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function downloadPlugin(repo: any, dest: any): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./date-time.js";
|
|
2
|
+
export * from "./environment.js";
|
|
3
|
+
export * from "./file-gateway.js";
|
|
4
|
+
export * from "./git-download.js";
|
|
5
|
+
export * from "./logger.js";
|
|
6
|
+
export * from "./markdown.js";
|
|
7
|
+
export * from "./yaml.js";
|
|
8
|
+
export * as parsers from "./parsers/index.js";
|
|
9
|
+
export * as storage from "./storage/index.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const logger: Logger;
|
|
2
|
+
declare class Logger {
|
|
3
|
+
level: number;
|
|
4
|
+
setLevel(level: any): this;
|
|
5
|
+
shouldLog(level: any): boolean;
|
|
6
|
+
formatMessage(args: any): any;
|
|
7
|
+
log(...args: any[]): void;
|
|
8
|
+
error(...args: any[]): void;
|
|
9
|
+
warn(...args: any[]): void;
|
|
10
|
+
info(...args: any[]): void;
|
|
11
|
+
debug(...args: any[]): void;
|
|
12
|
+
trace(...args: any[]): void;
|
|
13
|
+
time(label: any): void;
|
|
14
|
+
timeEnd(label: any): void;
|
|
15
|
+
}
|
|
16
|
+
export namespace LogLevel {
|
|
17
|
+
let ERROR: number;
|
|
18
|
+
let WARN: number;
|
|
19
|
+
let INFO: number;
|
|
20
|
+
let DEBUG: number;
|
|
21
|
+
let TRACE: number;
|
|
22
|
+
let NONE: number;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function extractWikilinkTopics(markdown: any): string[];
|
|
2
|
+
export function _setPlatform(platform: any): void;
|
|
3
|
+
export function renderMarkdown(markdown: any, filePath: any): any;
|
|
4
|
+
export function removeMD(...args: any[]): any;
|
|
5
|
+
export const allEmoji: any;
|
|
6
|
+
declare namespace _default {
|
|
7
|
+
export { extractWikilinkTopics };
|
|
8
|
+
export { renderMarkdown };
|
|
9
|
+
export { removeMD };
|
|
10
|
+
export { _setPlatform };
|
|
11
|
+
export { allEmoji };
|
|
12
|
+
}
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function replaceDateLanguage(text: any, asDate?: boolean): any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interpolates the content with the provided data.
|
|
3
|
+
* @param {string} content - The content to interpolate.
|
|
4
|
+
* @param {object} data - The data to use for interpolation.
|
|
5
|
+
* @param {object} opts - The options for interpolation.
|
|
6
|
+
* @returns {object} - The interpolated content, whether there was interpolation, and error tokens.
|
|
7
|
+
*/
|
|
8
|
+
export function interpolate(content: string, data: object, opts?: object): object;
|
|
9
|
+
export function encodeMarkdownLinks(content: any): any;
|
|
10
|
+
export function format(content: any, data: any, mustache: any): any;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export function getLang(config: any, filePath: any): any;
|
|
2
|
+
export function getLanguages(config: any): any;
|
|
3
|
+
export function getFileParser(filePath: any, config: any, readStream: any): Promise<ReadStreamMarkdownParser | ReadStreamCodeParser>;
|
|
4
|
+
import { ReadStreamMarkdownParser } from './ReadStreamMarkdownParser.js';
|
|
5
|
+
import { ReadStreamCodeParser } from './ReadStreamCodeParser.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export class ReadStreamCodeParser extends ReadStreamTaskParser {
|
|
2
|
+
constructor(readStream: any, filePath: any, lang: any, lists: any);
|
|
3
|
+
lists: any;
|
|
4
|
+
filePath: any;
|
|
5
|
+
lang: any;
|
|
6
|
+
taskParsers: CodeStyleTaskParser[];
|
|
7
|
+
init(): Promise<void>;
|
|
8
|
+
cards: any[] | undefined;
|
|
9
|
+
parseCards(code: any, tokens?: string[]): any[];
|
|
10
|
+
parseComments(code: any): any;
|
|
11
|
+
}
|
|
12
|
+
import { ReadStreamTaskParser } from './ReadStreamTaskParser.js';
|
|
13
|
+
import { CodeStyleTaskParser } from '../task/CodeStyleTaskParser.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export class ReadStreamMarkdownParser extends ReadStreamTaskParser {
|
|
2
|
+
constructor(readStream: any, config: any);
|
|
3
|
+
taskParsers: (HashStyleTaskParser | MarkdownStyleTaskParser)[];
|
|
4
|
+
}
|
|
5
|
+
import { ReadStreamTaskParser } from './ReadStreamTaskParser.js';
|
|
6
|
+
import { HashStyleTaskParser } from '../task/HashStyleTaskParser.js';
|
|
7
|
+
import { MarkdownStyleTaskParser } from '../task/MarkdownStyleTaskParser.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export class ReadStreamTaskParser {
|
|
2
|
+
constructor(readStream: any);
|
|
3
|
+
readStream: any;
|
|
4
|
+
task: any;
|
|
5
|
+
line: IteratorResult<string, any> | null;
|
|
6
|
+
taskParsers: any[];
|
|
7
|
+
lineNo: number;
|
|
8
|
+
blankLines: number;
|
|
9
|
+
readInterface: ReadLine.Interface;
|
|
10
|
+
readTask(): Promise<any>;
|
|
11
|
+
readLine(): Promise<IteratorResult<string, any>>;
|
|
12
|
+
isEndOfTask(line: any): boolean;
|
|
13
|
+
nextTask: any;
|
|
14
|
+
getTaskFromLine(line: any): undefined;
|
|
15
|
+
addLineToTask(line: any): void;
|
|
16
|
+
trimLinesToEndTask(): void;
|
|
17
|
+
close(): void;
|
|
18
|
+
}
|
|
19
|
+
import * as ReadLine from 'node:readline/promises';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getFunctionSignature(fn: any): string;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export function getHashStyleRegex(tokenPrefix?: string, orderMeta?: boolean): any;
|
|
2
|
+
export function getCheckedData(content: any): {
|
|
3
|
+
pad: number;
|
|
4
|
+
checked: boolean;
|
|
5
|
+
} | null;
|
|
6
|
+
export function hasTaskInText(config: any, text: any, isCodeFile: any): boolean;
|
|
7
|
+
export function isBeforeTextMarkdownList(beforeText: any): boolean;
|
|
8
|
+
export function padDescription(description?: any[], beforeText?: string): any[];
|
|
9
|
+
export function getTaskContent({ config, content, inBlockComment, beforeText, fileType, lang }: {
|
|
10
|
+
config: any;
|
|
11
|
+
content: any;
|
|
12
|
+
inBlockComment: any;
|
|
13
|
+
beforeText: any;
|
|
14
|
+
fileType: any;
|
|
15
|
+
lang: any;
|
|
16
|
+
}): {
|
|
17
|
+
rawTaskContentLines: string[];
|
|
18
|
+
taskContentLines: string[];
|
|
19
|
+
} | undefined;
|
|
20
|
+
export function getRawTask({ tokenPrefix, orderMeta, beforeText, hasColon, list, order, text, type }: {
|
|
21
|
+
tokenPrefix?: string | undefined;
|
|
22
|
+
orderMeta?: boolean | undefined;
|
|
23
|
+
beforeText?: string | undefined;
|
|
24
|
+
hasColon?: boolean | undefined;
|
|
25
|
+
list: any;
|
|
26
|
+
order?: string | undefined;
|
|
27
|
+
text: any;
|
|
28
|
+
type?: string | undefined;
|
|
29
|
+
}): string;
|
|
30
|
+
export function isNumber(value: any): boolean;
|
|
31
|
+
export function toNumber(value: any): number | undefined;
|
|
32
|
+
export namespace FILE_TYPES {
|
|
33
|
+
let MARKDOWN: string;
|
|
34
|
+
let CODE: string;
|
|
35
|
+
}
|
|
36
|
+
export namespace TASK_TYPES {
|
|
37
|
+
let CODE_1: string;
|
|
38
|
+
export { CODE_1 as CODE };
|
|
39
|
+
export let HASHTAG: string;
|
|
40
|
+
let MARKDOWN_1: string;
|
|
41
|
+
export { MARKDOWN_1 as MARKDOWN };
|
|
42
|
+
}
|
|
43
|
+
export const LIST_NAME_PATTERN: "[\\p{L}0-9-_]{2,}";
|
|
44
|
+
export const LINK_STYLE_REGEX: any;
|
|
45
|
+
export const CHECK_REGEX: RegExp;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class CheckStyleTaskParser extends TaskParser {
|
|
2
|
+
constructor();
|
|
3
|
+
get pattern(): RegExp;
|
|
4
|
+
parse(lineContent: any, line: any, matchResult: any, task: any): {
|
|
5
|
+
beforeText: any;
|
|
6
|
+
text: any;
|
|
7
|
+
line: any;
|
|
8
|
+
checked: any;
|
|
9
|
+
type: any;
|
|
10
|
+
} | undefined;
|
|
11
|
+
}
|
|
12
|
+
import { TaskParser } from "./TaskParser.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class CodeStyleTaskParser extends TaskParser {
|
|
2
|
+
constructor(config: any);
|
|
3
|
+
get pattern(): RegExp;
|
|
4
|
+
parse(lineContent: any, line: any, matchResult: any): {
|
|
5
|
+
beforeText: any;
|
|
6
|
+
text: any;
|
|
7
|
+
order: any;
|
|
8
|
+
list: any;
|
|
9
|
+
line: any;
|
|
10
|
+
colon: any;
|
|
11
|
+
type: any;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
import { TaskParser } from './TaskParser.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export class HashStyleTaskParser extends TaskParser {
|
|
2
|
+
constructor(config: any);
|
|
3
|
+
get pattern(): any;
|
|
4
|
+
parse(lineContent: any, line: any, matchResult: any): {
|
|
5
|
+
text: any;
|
|
6
|
+
order: any;
|
|
7
|
+
list: any;
|
|
8
|
+
line: any;
|
|
9
|
+
colon: any;
|
|
10
|
+
type: any;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
import { TaskParser } from './TaskParser.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class MarkdownStyleTaskParser extends TaskParser {
|
|
2
|
+
constructor(config: any);
|
|
3
|
+
get pattern(): RegExp;
|
|
4
|
+
parse(lineContent: any, line: any, matchResult: any): {
|
|
5
|
+
beforeText: any;
|
|
6
|
+
text: any;
|
|
7
|
+
order: any;
|
|
8
|
+
list: any;
|
|
9
|
+
line: any;
|
|
10
|
+
colon: any;
|
|
11
|
+
type: any;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
import { TaskParser } from './TaskParser.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export function load(projectPath: any, configPath?: string): Promise<Config | undefined>;
|
|
2
|
+
export function save(config: any, projectPath: any): Promise<void>;
|
|
3
|
+
export function loadForFilePath(filePath: any): Promise<Config | undefined>;
|
|
4
|
+
export function loadYamlConfig(filePath: any): Promise<{} | undefined>;
|
|
5
|
+
export function findImdonePath(cwd: any): Promise<string>;
|
|
6
|
+
import { Config } from '../../config.js';
|
package/types/card.d.ts
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
export function newCard(task: any, _project: any, dontParse: any): {
|
|
2
|
+
readonly settings: any;
|
|
3
|
+
readonly maxLines: any;
|
|
4
|
+
interpretedContent: any;
|
|
5
|
+
innerInterpretedContent: any;
|
|
6
|
+
init(totals?: any): /*elided*/ any;
|
|
7
|
+
totals: any;
|
|
8
|
+
onTaskUpdate(): void;
|
|
9
|
+
initProps(): void;
|
|
10
|
+
props: any;
|
|
11
|
+
initComputed(): void;
|
|
12
|
+
computed: any;
|
|
13
|
+
initActions(): void;
|
|
14
|
+
links: any[] | undefined;
|
|
15
|
+
readonly projectPath: any;
|
|
16
|
+
readonly relPath: any;
|
|
17
|
+
readonly fullPath: string | undefined;
|
|
18
|
+
readonly defaultData: any;
|
|
19
|
+
initData(): void;
|
|
20
|
+
dataKeys: string[] | undefined;
|
|
21
|
+
data: any;
|
|
22
|
+
updateDescriptionData(): void;
|
|
23
|
+
desc: {
|
|
24
|
+
title: any;
|
|
25
|
+
html: any;
|
|
26
|
+
truncHtml: any;
|
|
27
|
+
encodedText: string;
|
|
28
|
+
encodedMD: string;
|
|
29
|
+
markdown: any;
|
|
30
|
+
rawMarkdown: any;
|
|
31
|
+
htmlLength: any;
|
|
32
|
+
htmlTruncLength: any;
|
|
33
|
+
isOverMaxLines: any;
|
|
34
|
+
} | undefined;
|
|
35
|
+
getEncodedContent(content: any): {
|
|
36
|
+
encodedMD: string;
|
|
37
|
+
encodedText: string;
|
|
38
|
+
content: any;
|
|
39
|
+
};
|
|
40
|
+
formatContent(content: any, mustache: any): {
|
|
41
|
+
encodedMD: string;
|
|
42
|
+
encodedText: string;
|
|
43
|
+
content: any;
|
|
44
|
+
};
|
|
45
|
+
format(content: any, mustache: any): any;
|
|
46
|
+
getCardMarkdown(): {
|
|
47
|
+
totalLines: number;
|
|
48
|
+
markdown: string;
|
|
49
|
+
rawMarkdown: string;
|
|
50
|
+
};
|
|
51
|
+
truncLines: any;
|
|
52
|
+
getHtml(content: any): {
|
|
53
|
+
html: any;
|
|
54
|
+
truncHtml: any;
|
|
55
|
+
};
|
|
56
|
+
getDescriptionData(): {
|
|
57
|
+
title: any;
|
|
58
|
+
html: any;
|
|
59
|
+
truncHtml: any;
|
|
60
|
+
encodedText: string;
|
|
61
|
+
encodedMD: string;
|
|
62
|
+
markdown: any;
|
|
63
|
+
rawMarkdown: any;
|
|
64
|
+
htmlLength: any;
|
|
65
|
+
htmlTruncLength: any;
|
|
66
|
+
isOverMaxLines: any;
|
|
67
|
+
};
|
|
68
|
+
frontMatter: any;
|
|
69
|
+
pos: any;
|
|
70
|
+
rawTask: any;
|
|
71
|
+
beforeText: any;
|
|
72
|
+
text: any;
|
|
73
|
+
list: any;
|
|
74
|
+
order: any;
|
|
75
|
+
hasColon: any;
|
|
76
|
+
line: any;
|
|
77
|
+
id: any;
|
|
78
|
+
repoId: any;
|
|
79
|
+
source: any;
|
|
80
|
+
type: any;
|
|
81
|
+
tags: any;
|
|
82
|
+
context: any;
|
|
83
|
+
meta: any;
|
|
84
|
+
metaIndex: any;
|
|
85
|
+
inBlockComment: any;
|
|
86
|
+
singleLineBlockComment: any;
|
|
87
|
+
description: any;
|
|
88
|
+
rawTaskContentLines: any;
|
|
89
|
+
taskStartOnLine: any;
|
|
90
|
+
commentStartOnLine: any;
|
|
91
|
+
descriptionStartsWith: any;
|
|
92
|
+
filteredListName: any;
|
|
93
|
+
isWrappedWithCardTag: any;
|
|
94
|
+
config: any;
|
|
95
|
+
allMeta: any;
|
|
96
|
+
allContext: any;
|
|
97
|
+
allTags: any;
|
|
98
|
+
progress: any;
|
|
99
|
+
content: any;
|
|
100
|
+
lastLine: any;
|
|
101
|
+
orderModified: any;
|
|
102
|
+
index: any;
|
|
103
|
+
innerOrder: any;
|
|
104
|
+
readonly descriptionString: any;
|
|
105
|
+
updateLastLine(): void;
|
|
106
|
+
getLastLine(): any;
|
|
107
|
+
parse(): void;
|
|
108
|
+
paddingLength: number | undefined;
|
|
109
|
+
metaKeys: string[] | undefined;
|
|
110
|
+
topics: string[] | undefined;
|
|
111
|
+
issueNumberRegExp(): RegExp;
|
|
112
|
+
readonly listId: any;
|
|
113
|
+
readonly path: any;
|
|
114
|
+
readonly markdownBeforeText: string;
|
|
115
|
+
getTextAndDescription(): any;
|
|
116
|
+
getRawTextAndDescription(): any;
|
|
117
|
+
getProgress(): {
|
|
118
|
+
completed: any;
|
|
119
|
+
total: any;
|
|
120
|
+
};
|
|
121
|
+
getContent(): any;
|
|
122
|
+
updateContent(): void;
|
|
123
|
+
updateFromContent(content: any): void;
|
|
124
|
+
toJSON(): /*elided*/ any & {
|
|
125
|
+
allTags: any;
|
|
126
|
+
allContext: any;
|
|
127
|
+
allMeta: any;
|
|
128
|
+
config: undefined;
|
|
129
|
+
expand: boolean;
|
|
130
|
+
};
|
|
131
|
+
getTagPrefix(): any;
|
|
132
|
+
addToLastCommentInContent(content: any, toAdd: any, newLine: any): string;
|
|
133
|
+
getCheckedData(): {
|
|
134
|
+
pad: number;
|
|
135
|
+
checked: boolean;
|
|
136
|
+
} | null;
|
|
137
|
+
updateOrderMeta(config: any, descContent?: any): undefined;
|
|
138
|
+
replaceContent(regex: any, replacement: any): void;
|
|
139
|
+
replaceMetaSep(oldMetaSep: any, newMetaSep: any): void;
|
|
140
|
+
updateContext(): void;
|
|
141
|
+
parseTodoTxt(): void;
|
|
142
|
+
getTags(): any[];
|
|
143
|
+
getContext(): any[];
|
|
144
|
+
getDueMeta(): any;
|
|
145
|
+
getMetaData(): any;
|
|
146
|
+
getListTrackingMeta(lists: any): any[];
|
|
147
|
+
hasListChanged(lists: any): boolean;
|
|
148
|
+
hasMetaData(key: any, value: any): any;
|
|
149
|
+
getMetaDataWithLinks(config: any): any[];
|
|
150
|
+
getMetaLink(config: any, metaKey: any, metaValue: any): {
|
|
151
|
+
title: string;
|
|
152
|
+
url: string;
|
|
153
|
+
icon: any;
|
|
154
|
+
} | undefined;
|
|
155
|
+
toString(): string;
|
|
156
|
+
getRepoId(): any;
|
|
157
|
+
getSource(): any;
|
|
158
|
+
getId(): any;
|
|
159
|
+
getList(): any;
|
|
160
|
+
getText(opts: any, text: any): any;
|
|
161
|
+
getChecksFromHtml(html: any): boolean[];
|
|
162
|
+
getLine(): any;
|
|
163
|
+
getType(): any;
|
|
164
|
+
equals(task: any): boolean | undefined;
|
|
165
|
+
};
|
|
166
|
+
export const allEmoji: any;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute a checksum for a given string or file.
|
|
3
|
+
* @param {string} input - The string or file path to hash.
|
|
4
|
+
* @param {string} algorithm - The hash algorithm to use (default: 'sha1').
|
|
5
|
+
* @param {boolean} isFile - Whether the input is a file path.
|
|
6
|
+
* @returns {Promise<string>} The computed checksum.
|
|
7
|
+
*/
|
|
8
|
+
export function computeChecksum(input: string, algorithm?: string, isFile?: boolean): Promise<string>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export class Config {
|
|
2
|
+
static DEFAULT_CONFIG: {
|
|
3
|
+
keepEmptyPriority: boolean;
|
|
4
|
+
code: {
|
|
5
|
+
include_lists: string[];
|
|
6
|
+
};
|
|
7
|
+
lists: {
|
|
8
|
+
hidden: boolean;
|
|
9
|
+
name: string;
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
static JOURNAL_TYPE: {
|
|
13
|
+
SINGLE_FILE: string;
|
|
14
|
+
FOLDER: string;
|
|
15
|
+
NEW_FILE: string;
|
|
16
|
+
};
|
|
17
|
+
static newDefaultConfig(config?: {}): Config;
|
|
18
|
+
constructor(opts: any);
|
|
19
|
+
settings: {};
|
|
20
|
+
get cards(): any;
|
|
21
|
+
set defaultFilter(filter: any);
|
|
22
|
+
get defaultFilter(): any;
|
|
23
|
+
set name(name: any);
|
|
24
|
+
get name(): any;
|
|
25
|
+
includeList(name: any): any;
|
|
26
|
+
ignoreList(name: any): any;
|
|
27
|
+
listExists(name: any): boolean;
|
|
28
|
+
getDefaultList(): any;
|
|
29
|
+
getDoneList(): any;
|
|
30
|
+
getDoingList(): any;
|
|
31
|
+
isAddNewCardsToTop(): any;
|
|
32
|
+
getNewCardSyntax(): any;
|
|
33
|
+
isMetaNewLine(): any;
|
|
34
|
+
getTagPrefix(): any;
|
|
35
|
+
getTaskPrefix(): any;
|
|
36
|
+
isAddCheckBoxTasks(): any;
|
|
37
|
+
isAddCompletedMeta(): any;
|
|
38
|
+
set customCardTerminator(terminator: any);
|
|
39
|
+
get customCardTerminator(): any;
|
|
40
|
+
get markdownOnly(): any;
|
|
41
|
+
get views(): any;
|
|
42
|
+
get appendNewCardsTo(): any;
|
|
43
|
+
get ignoreFrontMatter(): any;
|
|
44
|
+
get ignoreFrontMatterTags(): any;
|
|
45
|
+
set journalPath(path: any);
|
|
46
|
+
get journalPath(): any;
|
|
47
|
+
get journalTemplate(): any;
|
|
48
|
+
get journalType(): any;
|
|
49
|
+
get journalFilePrefix(): any;
|
|
50
|
+
get journalFileSuffix(): any;
|
|
51
|
+
get replaceSpacesWith(): any;
|
|
52
|
+
get devMode(): any;
|
|
53
|
+
get plugins(): any;
|
|
54
|
+
get orderMeta(): any;
|
|
55
|
+
get maxLines(): any;
|
|
56
|
+
get archiveFolder(): any;
|
|
57
|
+
get archiveCompleted(): any;
|
|
58
|
+
get tokenPrefix(): any;
|
|
59
|
+
get doneList(): any;
|
|
60
|
+
getMetaSep(): any;
|
|
61
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export namespace constants {
|
|
2
|
+
export { JOURNAL_TYPE };
|
|
3
|
+
export let ASYNC_LIMIT: number;
|
|
4
|
+
export { CONFIG_DIR };
|
|
5
|
+
export { CONFIG_FILE };
|
|
6
|
+
export { CONFIG_FILE_YML };
|
|
7
|
+
export { SORT_FILE };
|
|
8
|
+
export { TEMPLATES_DIR };
|
|
9
|
+
export let IGNORE_FILE: string;
|
|
10
|
+
export let DEFAULT_FILE_PATTERN: string;
|
|
11
|
+
export { DEFAULT_IGNORE };
|
|
12
|
+
export { DEFAULT_IGNORE_PATHS };
|
|
13
|
+
export { DEFAULT_IGNORE_EXTS };
|
|
14
|
+
export namespace ERRORS {
|
|
15
|
+
let NOT_A_FILE: string;
|
|
16
|
+
let CALLBACK_REQUIRED: string;
|
|
17
|
+
let NO_CONTENT: string;
|
|
18
|
+
let LIST_NOT_FOUND: string;
|
|
19
|
+
let TASK_NOT_FOUND: string;
|
|
20
|
+
}
|
|
21
|
+
export { DEFAULT_CONFIG };
|
|
22
|
+
}
|
|
23
|
+
declare const JOURNAL_TYPE: {
|
|
24
|
+
SINGLE_FILE: string;
|
|
25
|
+
FOLDER: string;
|
|
26
|
+
NEW_FILE: string;
|
|
27
|
+
};
|
|
28
|
+
declare const CONFIG_DIR: ".imdone";
|
|
29
|
+
declare const CONFIG_FILE: string;
|
|
30
|
+
declare const CONFIG_FILE_YML: string;
|
|
31
|
+
declare const SORT_FILE: string;
|
|
32
|
+
declare const TEMPLATES_DIR: string;
|
|
33
|
+
declare const DEFAULT_IGNORE: string;
|
|
34
|
+
declare var DEFAULT_IGNORE_PATHS: string;
|
|
35
|
+
declare var DEFAULT_IGNORE_EXTS: string;
|
|
36
|
+
declare const DEFAULT_CONFIG: {
|
|
37
|
+
keepEmptyPriority: boolean;
|
|
38
|
+
code: {
|
|
39
|
+
include_lists: string[];
|
|
40
|
+
};
|
|
41
|
+
lists: {
|
|
42
|
+
hidden: boolean;
|
|
43
|
+
name: string;
|
|
44
|
+
}[];
|
|
45
|
+
};
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export function appContext(): ApplicationContext;
|
|
2
|
+
declare class ApplicationContext {
|
|
3
|
+
constructor({ project, repo, projectContext, projectReader, projectPresenter, }: {
|
|
4
|
+
project: any;
|
|
5
|
+
repo: any;
|
|
6
|
+
projectContext: any;
|
|
7
|
+
projectReader: any;
|
|
8
|
+
projectPresenter: any;
|
|
9
|
+
});
|
|
10
|
+
project: any;
|
|
11
|
+
repo: any;
|
|
12
|
+
projectContext: any;
|
|
13
|
+
projectReader: any;
|
|
14
|
+
projectPresenter: any;
|
|
15
|
+
innerConfig: Config;
|
|
16
|
+
pluginRegistry: {
|
|
17
|
+
getAvailablePlugins: typeof getAvailablePlugins;
|
|
18
|
+
};
|
|
19
|
+
set config(config: any);
|
|
20
|
+
get config(): any;
|
|
21
|
+
}
|
|
22
|
+
import { Config } from '../config.js';
|
|
23
|
+
import { getAvailablePlugins } from '../plugins/plugin-registry.js';
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ApplicationContext.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export const defaultSettingsString: "openIn: default #override\nopenCodeIn: default #override\njournalType: New File\njournalPath: imdone-tasks #override\nappendNewCardsTo: imdone-tasks.md\nnewCardSyntax: HASHTAG #override\nreplaceSpacesWith: '-' #override\nplugins:\n devMode: false\ncards:\n colors: [] #override if\n template: | # This is the template for new cards that are created in imdone\n \n \n <!--\n created:${(new Date()).toISOString()}\n -->\n trackChanges: false #override\n metaNewLine: false #override\n addCompletedMeta: false #override\n addCheckBoxTasks: false #override\n doingList: DOING #override if\n doneList: DONE #override if\n tokenPrefix: '#' #override\n taskPrefix: '##' #override\n tagPrefix: '+' #override\n metaSep: ':' #override\n orderMeta: true\n maxLines: 6 #override\n addNewCardsToTop: true #override\n showTagsAndMeta: true #override\njournalTemplate: #override\nmarkdownOnly: false #override\n";
|
|
2
|
+
export const defaultSettings: any;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class View {
|
|
2
|
+
static DEFAULT_VIEW_ID: string;
|
|
3
|
+
static DEFAULT_VIEW_NAME: string;
|
|
4
|
+
constructor({ id, name, filter, lists, modifiable }: {
|
|
5
|
+
id: any;
|
|
6
|
+
name: any;
|
|
7
|
+
filter?: string | undefined;
|
|
8
|
+
lists?: never[] | undefined;
|
|
9
|
+
modifiable?: boolean | undefined;
|
|
10
|
+
});
|
|
11
|
+
id: any;
|
|
12
|
+
name: any;
|
|
13
|
+
lists: any[];
|
|
14
|
+
filter: string;
|
|
15
|
+
get isModifiable(): boolean;
|
|
16
|
+
#private;
|
|
17
|
+
}
|