imdone-core 2.0.8 → 2.0.10
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/.husky/pre-commit +7 -0
- package/CHANGELOG.md +6 -0
- package/lib/adapters/storage/config.js +1 -0
- package/lib/card.js +62 -33
- package/lib/clone.js +36 -0
- package/lib/file.js +3 -4
- package/lib/index.js +2 -0
- package/lib/migrate-config.js +3 -3
- package/lib/mixins/repo-fs-store.js +2 -3
- package/lib/omit.js +9 -0
- package/lib/plugins/archive-plugin.js +4 -0
- package/lib/plugins/default-board-actions-plugin.js +4 -0
- package/lib/plugins/default-board-properties-plugin.js +4 -0
- package/lib/plugins/epic-plugin.js +4 -0
- package/lib/plugins/extension-plugin.js +4 -0
- package/lib/plugins/persist-tags-plugin.js +4 -0
- package/lib/plugins/plugin-manager.js +7 -13
- package/lib/project.js +2 -2
- package/lib/repository.js +2 -2
- package/package.json +8 -16
- package/types/card.d.ts +30 -1
- package/types/clone.d.ts +1 -0
- package/types/file.d.ts +31 -2
- package/types/index.d.ts +2 -0
- package/types/omit.d.ts +1 -0
- package/types/plugins/archive-plugin.d.ts +1 -0
- package/types/plugins/default-board-actions-plugin.d.ts +1 -0
- package/types/plugins/default-board-properties-plugin.d.ts +1 -0
- package/types/plugins/epic-plugin.d.ts +1 -0
- package/types/plugins/extension-plugin.d.ts +1 -0
- package/types/plugins/persist-tags-plugin.d.ts +1 -0
- package/types/plugins/plugin-manager.d.ts +1 -1
- package/types/project.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,7 @@ import { Config } from '../../config.js'
|
|
|
7
7
|
import { logger } from '../logger.js'
|
|
8
8
|
|
|
9
9
|
const { CONFIG_DIR, CONFIG_FILE_YML } = constants
|
|
10
|
+
|
|
10
11
|
export async function load(projectPath, configPath = _path.join(projectPath, CONFIG_FILE_YML)) {
|
|
11
12
|
const configLike = await loadYamlConfig(configPath)
|
|
12
13
|
return configLike && new Config(configLike)
|
package/lib/card.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Task } from './task.js'
|
|
2
2
|
import _path from 'path'
|
|
3
|
-
import _pick from 'lodash.pick'
|
|
4
3
|
import _isFunction from 'lodash.isfunction'
|
|
5
4
|
import _isObject from 'lodash.isobject'
|
|
6
5
|
import _isEmpty from 'lodash.isempty'
|
|
@@ -100,39 +99,69 @@ export function newCard(task, _project, dontParse) {
|
|
|
100
99
|
}
|
|
101
100
|
|
|
102
101
|
get defaultData() {
|
|
102
|
+
// Extract all required properties in alphabetical order with destructuring
|
|
103
|
+
const {
|
|
104
|
+
allContext,
|
|
105
|
+
allMeta,
|
|
106
|
+
allTags,
|
|
107
|
+
beforeText,
|
|
108
|
+
completed,
|
|
109
|
+
content,
|
|
110
|
+
context,
|
|
111
|
+
created,
|
|
112
|
+
due,
|
|
113
|
+
filteredListName,
|
|
114
|
+
fullPath,
|
|
115
|
+
id,
|
|
116
|
+
interpretedContent,
|
|
117
|
+
lastLine,
|
|
118
|
+
line,
|
|
119
|
+
list,
|
|
120
|
+
meta,
|
|
121
|
+
metaKeys,
|
|
122
|
+
progress,
|
|
123
|
+
projectPath,
|
|
124
|
+
rawTask,
|
|
125
|
+
relPath,
|
|
126
|
+
source,
|
|
127
|
+
started,
|
|
128
|
+
tags,
|
|
129
|
+
text,
|
|
130
|
+
topics,
|
|
131
|
+
totals
|
|
132
|
+
} = this;
|
|
133
|
+
|
|
134
|
+
// Return a new object with all the extracted properties
|
|
103
135
|
return {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
'topics'].sort()
|
|
134
|
-
),
|
|
135
|
-
}
|
|
136
|
+
allContext,
|
|
137
|
+
allMeta,
|
|
138
|
+
allTags,
|
|
139
|
+
beforeText,
|
|
140
|
+
completed,
|
|
141
|
+
content,
|
|
142
|
+
context,
|
|
143
|
+
created,
|
|
144
|
+
due,
|
|
145
|
+
filteredListName,
|
|
146
|
+
fullPath,
|
|
147
|
+
id,
|
|
148
|
+
interpretedContent,
|
|
149
|
+
lastLine,
|
|
150
|
+
line,
|
|
151
|
+
list,
|
|
152
|
+
meta,
|
|
153
|
+
metaKeys,
|
|
154
|
+
progress,
|
|
155
|
+
projectPath,
|
|
156
|
+
rawTask,
|
|
157
|
+
relPath,
|
|
158
|
+
source,
|
|
159
|
+
started,
|
|
160
|
+
tags,
|
|
161
|
+
text,
|
|
162
|
+
topics,
|
|
163
|
+
totals
|
|
164
|
+
};
|
|
136
165
|
}
|
|
137
166
|
|
|
138
167
|
// TODO Add isInCodeFile property to card
|
package/lib/clone.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export function cloneDeep(obj, seen = new WeakMap()) {
|
|
2
|
+
if (obj === null || typeof obj !== 'object') return obj
|
|
3
|
+
|
|
4
|
+
if (seen.has(obj)) return seen.get(obj)
|
|
5
|
+
|
|
6
|
+
if (typeof obj === 'function') return obj
|
|
7
|
+
|
|
8
|
+
if (obj instanceof Date) return new Date(obj)
|
|
9
|
+
if (obj instanceof RegExp) return new RegExp(obj)
|
|
10
|
+
if (obj instanceof Map) {
|
|
11
|
+
const result = new Map()
|
|
12
|
+
seen.set(obj, result)
|
|
13
|
+
for (const [key, value] of obj.entries()) {
|
|
14
|
+
result.set(cloneDeep(key, seen), cloneDeep(value, seen))
|
|
15
|
+
}
|
|
16
|
+
return result
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (obj instanceof Set) {
|
|
20
|
+
const result = new Set()
|
|
21
|
+
seen.set(obj, result)
|
|
22
|
+
for (const value of obj.values()) {
|
|
23
|
+
result.add(cloneDeep(value, seen))
|
|
24
|
+
}
|
|
25
|
+
return result
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const result = Array.isArray(obj) ? [] : {}
|
|
29
|
+
seen.set(obj, result)
|
|
30
|
+
|
|
31
|
+
for (const key of Object.keys(obj)) {
|
|
32
|
+
result[key] = cloneDeep(obj[key], seen)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return result
|
|
36
|
+
}
|
package/lib/file.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _isObject from 'lodash.isobject'
|
|
2
2
|
import _assign from 'lodash.assign'
|
|
3
|
-
import
|
|
4
|
-
import _get from 'lodash.get'
|
|
3
|
+
import { omit } from './omit.js'
|
|
5
4
|
import crypto from 'crypto'
|
|
6
5
|
import Emitter from 'events'
|
|
7
6
|
import path from 'path'
|
|
@@ -278,7 +277,7 @@ export class File extends Emitter {
|
|
|
278
277
|
beforeTextModified = trackMarkdownChecklistChanges({task, config, modify})
|
|
279
278
|
|
|
280
279
|
if (
|
|
281
|
-
|
|
280
|
+
config?.settings?.cards?.trackChanges &&
|
|
282
281
|
task.hasListChanged(lists)
|
|
283
282
|
) {
|
|
284
283
|
const list = task.list
|
|
@@ -1016,7 +1015,7 @@ export class File extends Emitter {
|
|
|
1016
1015
|
}
|
|
1017
1016
|
|
|
1018
1017
|
toJSON () {
|
|
1019
|
-
return
|
|
1018
|
+
return omit(this, ['domain', '_events', '_maxListeners'])
|
|
1020
1019
|
}
|
|
1021
1020
|
|
|
1022
1021
|
getRepoId () {
|
package/lib/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export * from './FileProjectContext.js';
|
|
|
2
2
|
export * from './ProjectContext.js';
|
|
3
3
|
export * from './card.js';
|
|
4
4
|
export * from './checksum.js';
|
|
5
|
+
export * from './clone.js';
|
|
5
6
|
export * from './config.js';
|
|
6
7
|
export * from './constants.js';
|
|
7
8
|
export * from './default-settings.js';
|
|
@@ -10,6 +11,7 @@ export * from './get-tasks-to-modify.js';
|
|
|
10
11
|
export * from './languages.js';
|
|
11
12
|
export * from './list.js';
|
|
12
13
|
export * from './migrate-config.js';
|
|
14
|
+
export * from './omit.js';
|
|
13
15
|
export * from './project-factory.js';
|
|
14
16
|
export * from './project.js';
|
|
15
17
|
export * from './repository.js';
|
package/lib/migrate-config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _cloneDeep from 'lodash.clonedeep'
|
|
2
1
|
import _path from 'path'
|
|
3
2
|
import uniqid from 'uniqid'
|
|
4
3
|
import { defaultSettings as _defaultSettings } from './default-settings.js'
|
|
4
|
+
import { cloneDeep } from './clone.js'
|
|
5
5
|
|
|
6
6
|
export function buildMigrateConfig (repo, defaultSettings = _defaultSettings) {
|
|
7
7
|
const path = repo.path
|
|
@@ -149,8 +149,8 @@ export function buildMigrateConfig (repo, defaultSettings = _defaultSettings) {
|
|
|
149
149
|
config.settings.kudosProbability = 0.33
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
const defaultCardsSettings =
|
|
153
|
-
const cardsSettings =
|
|
152
|
+
const defaultCardsSettings = cloneDeep(defaultSettings.cards)
|
|
153
|
+
const cardsSettings = cloneDeep(config.settings.cards)
|
|
154
154
|
|
|
155
155
|
delete defaultSettings.cards
|
|
156
156
|
delete config.settings.cards
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _path from 'path'
|
|
2
|
-
import _cloneDeep from 'lodash.clonedeep'
|
|
3
2
|
import _isFunction from 'lodash.isfunction'
|
|
4
3
|
import _isUndefined from 'lodash.isundefined'
|
|
5
4
|
import _assign from 'lodash.assign'
|
|
@@ -173,7 +172,7 @@ export function fileSystemStoreMixin(repo, fs = realFs) {
|
|
|
173
172
|
}
|
|
174
173
|
|
|
175
174
|
repo.updateConfig = async function (loadedConfig) {
|
|
176
|
-
var baseConfig =
|
|
175
|
+
var baseConfig = structuredClone(DEFAULT_CONFIG)
|
|
177
176
|
var include_lists = baseConfig.code.include_lists
|
|
178
177
|
const currentConfig = repo.config
|
|
179
178
|
if (currentConfig && currentConfig.code)
|
|
@@ -192,7 +191,7 @@ export function fileSystemStoreMixin(repo, fs = realFs) {
|
|
|
192
191
|
await repo.migrateTasksByConfig(currentConfig, newConfig)
|
|
193
192
|
repo.config = newConfig
|
|
194
193
|
repo.config.code.include_lists = include_lists
|
|
195
|
-
var _languages =
|
|
194
|
+
var _languages = structuredClone(languages)
|
|
196
195
|
repo.languages = repo.config.languages
|
|
197
196
|
? _assign(_languages, repo.config.languages)
|
|
198
197
|
: _languages
|
package/lib/omit.js
ADDED
|
@@ -5,6 +5,10 @@ export default class DefaultBoardActionsPlugin extends Plugin {
|
|
|
5
5
|
super(project)
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
static get pluginName() {
|
|
9
|
+
return 'DefaultBoardActionsPlugin'
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
getBoardActions() {
|
|
9
13
|
const project = this.project
|
|
10
14
|
const isWindows = process.platform === 'win32'
|
|
@@ -19,6 +19,10 @@ export default class DefaultBoardPropertiesPlugin extends Plugin {
|
|
|
19
19
|
this.templates = {}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
static get pluginName() {
|
|
23
|
+
return 'DefaultBoardPropertiesPlugin'
|
|
24
|
+
}
|
|
25
|
+
|
|
22
26
|
async onBeforeBoardUpdate() {
|
|
23
27
|
this.templates = await this.getTemplates()
|
|
24
28
|
}
|
|
@@ -13,6 +13,10 @@ export default class ExtensionPlugin extends Plugin {
|
|
|
13
13
|
this.configDir = _path.join(project.path, '.imdone')
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
static get pluginName() {
|
|
17
|
+
return 'ExtensionPlugin'
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
async init() {
|
|
17
21
|
this.cardActionsFunction = await this.loadExtensionModule(
|
|
18
22
|
() => [],
|
|
@@ -2,10 +2,9 @@ import Emitter from 'events'
|
|
|
2
2
|
import Plugin from 'imdone-api'
|
|
3
3
|
import _path from 'path'
|
|
4
4
|
import { downloadPlugin } from '../adapters/git-download.js'
|
|
5
|
-
import rimraf from 'rimraf'
|
|
6
5
|
import chokidar from 'chokidar'
|
|
7
6
|
import debounce from 'lodash.debounce'
|
|
8
|
-
import { exists, mkdir, readdir } from '../adapters/file-gateway.js'
|
|
7
|
+
import { exists, mkdir, readdir, rm } from '../adapters/file-gateway.js'
|
|
9
8
|
import { appContext } from '../context/ApplicationContext.js'
|
|
10
9
|
// import { createRequire } from 'node:module';
|
|
11
10
|
|
|
@@ -83,26 +82,21 @@ export class PluginManager extends Emitter {
|
|
|
83
82
|
}
|
|
84
83
|
|
|
85
84
|
async uninstallPlugin(pluginName) {
|
|
86
|
-
return new Promise((resolve, reject) => {
|
|
87
85
|
logger.log('Preparing to uninstall plugin:', pluginName)
|
|
88
86
|
const pluginClassName = Object.keys(this.pluginsMap).find((key) => {
|
|
89
87
|
return this.getPlugin(key).info.name === pluginName
|
|
90
88
|
})
|
|
91
89
|
if (!pluginClassName) {
|
|
92
|
-
|
|
90
|
+
throw new Error('Unable to find plugin:' + pluginName)
|
|
93
91
|
}
|
|
94
92
|
const { info } = this.getPlugin(pluginClassName)
|
|
95
93
|
const { path } = info
|
|
96
94
|
// const pkg = { version, name }
|
|
97
95
|
logger.log('Uninstalling:', info)
|
|
98
96
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
this.emit('plugin-uninstalled', pluginName)
|
|
103
|
-
resolve()
|
|
104
|
-
})
|
|
105
|
-
})
|
|
97
|
+
await rm(path, { recursive: true, force: true })
|
|
98
|
+
delete this.pluginsMap[pluginClassName]
|
|
99
|
+
this.emit('plugin-uninstalled', pluginName)
|
|
106
100
|
}
|
|
107
101
|
|
|
108
102
|
async installPlugin({ name, version }) {
|
|
@@ -190,9 +184,9 @@ export class PluginManager extends Emitter {
|
|
|
190
184
|
}
|
|
191
185
|
|
|
192
186
|
async createPlugin(pluginClass, path = undefined) {
|
|
193
|
-
|
|
187
|
+
const name = pluginClass.pluginName
|
|
188
|
+
if (!name || !this.isPlugin(pluginClass))
|
|
194
189
|
throw new Error(`${pluginClass.name} is not a plugin`)
|
|
195
|
-
const name = pluginClass.name.toString()
|
|
196
190
|
const pluginInstance = new pluginClass(this.project)
|
|
197
191
|
const packageInfo = await this.getPackageInfo(path)
|
|
198
192
|
let info = {
|
package/lib/project.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Project } from 'imdone-api/lib/project.js';
|
|
2
2
|
import { PluginManager } from './plugins/plugin-manager.js';
|
|
3
3
|
import { Repository } from './repository.js';
|
|
4
|
-
import _cloneDeep from 'lodash.clonedeep';
|
|
5
4
|
import { newCard } from './card.js';
|
|
6
5
|
import { constants } from './constants.js';
|
|
7
6
|
const { JOURNAL_TYPE, CONFIG_DIR } = constants;
|
|
@@ -15,6 +14,7 @@ import _isString from 'lodash.isstring';
|
|
|
15
14
|
import _isFunction from 'lodash.isfunction';
|
|
16
15
|
import { exec } from 'node:child_process';
|
|
17
16
|
import { sort } from 'fast-sort';
|
|
17
|
+
import { cloneDeep } from './clone.js'
|
|
18
18
|
import { Task } from './task.js';
|
|
19
19
|
import eol from 'eol';
|
|
20
20
|
import { renderMarkdown, extractWikilinkTopics } from './adapters/markdown.js';
|
|
@@ -484,7 +484,7 @@ export class WorkerProject extends Project {
|
|
|
484
484
|
filterLists(filter, lists = this.lists) {
|
|
485
485
|
return lists.map((list) => {
|
|
486
486
|
let newList = { ...list, tasks: [] }
|
|
487
|
-
newList =
|
|
487
|
+
newList = cloneDeep(newList)
|
|
488
488
|
newList.tasks = Repository.query(list.tasks, filter)
|
|
489
489
|
return newList
|
|
490
490
|
})
|
package/lib/repository.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _isFunction from 'lodash.isfunction'
|
|
2
2
|
import _isUndefined from 'lodash.isundefined'
|
|
3
3
|
import _isString from 'lodash.isstring'
|
|
4
|
-
import
|
|
4
|
+
import { omit } from './omit.js'
|
|
5
5
|
import _reject from 'lodash.reject'
|
|
6
6
|
import _noop from 'lodash.noop'
|
|
7
7
|
import _some from 'lodash.some'
|
|
@@ -395,7 +395,7 @@ export class Repository extends Emitter {
|
|
|
395
395
|
async addList (list) {
|
|
396
396
|
if (this.listExists(list.name)) return;
|
|
397
397
|
|
|
398
|
-
list =
|
|
398
|
+
list = omit(list, 'tasks');
|
|
399
399
|
this.config.lists.push(new List(list));
|
|
400
400
|
|
|
401
401
|
if (!list.filter && !/[a-z]/.test(list.name)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "imdone-core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.10",
|
|
4
4
|
"description": "imdone-core",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,15 +14,18 @@
|
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"prepublishOnly": "npm run build",
|
|
17
|
-
"build": "npm run
|
|
17
|
+
"build": "npm run pre-commit && npm run coverage",
|
|
18
18
|
"build:docs": "doctoc --github --notitle README.md",
|
|
19
19
|
"build:docs:index": "node scripts/index-markdown.js",
|
|
20
20
|
"build:index": "node scripts/generate-index.js",
|
|
21
21
|
"build:types": "tsc --noEmit false",
|
|
22
22
|
"coverage": "vitest --run --coverage",
|
|
23
|
+
"link": "npm link ../imdone-api",
|
|
24
|
+
"pre-commit": "npm run build:docs && npm run build:docs:index && npm run build:index && npm run build:types",
|
|
23
25
|
"test": "vitest --run",
|
|
24
26
|
"test-ci": "vitest --run",
|
|
25
|
-
"serve": "npx docsify-cli serve"
|
|
27
|
+
"serve": "npx docsify-cli serve",
|
|
28
|
+
"prepare": "husky"
|
|
26
29
|
},
|
|
27
30
|
"keywords": [
|
|
28
31
|
"imdone",
|
|
@@ -55,26 +58,20 @@
|
|
|
55
58
|
"find-up-simple": "^1.0.1",
|
|
56
59
|
"gray-matter": "^4.0.2",
|
|
57
60
|
"ignore": "^5.2.0",
|
|
58
|
-
"imdone-api": "^2.0.
|
|
61
|
+
"imdone-api": "^2.0.1",
|
|
59
62
|
"isbinaryfile": "^5.0.4",
|
|
60
63
|
"js-yaml": "^3.14.1",
|
|
61
64
|
"json-fns": "^1.0.0",
|
|
62
65
|
"lodash.assign": "^4.2.0",
|
|
63
|
-
"lodash.clone": "^4.5.0",
|
|
64
|
-
"lodash.clonedeep": "^4.5.0",
|
|
65
66
|
"lodash.debounce": "^4.0.8",
|
|
66
|
-
"lodash.get": "^4.4.2",
|
|
67
67
|
"lodash.groupby": "^4.6.0",
|
|
68
68
|
"lodash.isempty": "^4.4.0",
|
|
69
|
-
"lodash.isequal": "^4.5.0",
|
|
70
69
|
"lodash.isfunction": "^3.0.9",
|
|
71
70
|
"lodash.isnumber": "^3.0.3",
|
|
72
71
|
"lodash.isobject": "^3.0.2",
|
|
73
72
|
"lodash.isstring": "^4.0.1",
|
|
74
73
|
"lodash.isundefined": "^3.0.1",
|
|
75
74
|
"lodash.noop": "^3.0.1",
|
|
76
|
-
"lodash.omit": "^4.5.0",
|
|
77
|
-
"lodash.pick": "^3.1.0",
|
|
78
75
|
"lodash.reject": "^4.6.0",
|
|
79
76
|
"lodash.remove": "^4.7.0",
|
|
80
77
|
"lodash.some": "^4.6.0",
|
|
@@ -96,7 +93,6 @@
|
|
|
96
93
|
"prompts": "^2.4.2",
|
|
97
94
|
"readdirp": "^4.1.2",
|
|
98
95
|
"remove-markdown": "^0.3.0",
|
|
99
|
-
"rimraf": "^3.0.2",
|
|
100
96
|
"sanitize-filename": "^1.6.3",
|
|
101
97
|
"sift": "^17.1.3",
|
|
102
98
|
"simple-git": "^3.19.1",
|
|
@@ -114,13 +110,9 @@
|
|
|
114
110
|
"esbuild": "^0.25.1",
|
|
115
111
|
"expect.js": "~0.3.1",
|
|
116
112
|
"fs-extra": "^11.1.0",
|
|
113
|
+
"husky": "^9.1.7",
|
|
117
114
|
"json-stringify-safe": "~5.0.0",
|
|
118
|
-
"mocha": "^11.1.0",
|
|
119
|
-
"mocha-each": "^2.0.1",
|
|
120
115
|
"prettier": "^2.5.1",
|
|
121
|
-
"should": "13.1.3",
|
|
122
|
-
"sinon": "^19.0.2",
|
|
123
|
-
"sinon-chai": "^4.0.0",
|
|
124
116
|
"typescript": "^5.8.2",
|
|
125
117
|
"vitest": "^3.0.8"
|
|
126
118
|
}
|
package/types/card.d.ts
CHANGED
|
@@ -15,7 +15,36 @@ export function newCard(task: any, _project: any, dontParse: any): {
|
|
|
15
15
|
readonly projectPath: any;
|
|
16
16
|
readonly relPath: any;
|
|
17
17
|
readonly fullPath: string | undefined;
|
|
18
|
-
readonly defaultData:
|
|
18
|
+
readonly defaultData: {
|
|
19
|
+
allContext: any;
|
|
20
|
+
allMeta: any;
|
|
21
|
+
allTags: any;
|
|
22
|
+
beforeText: any;
|
|
23
|
+
completed: any;
|
|
24
|
+
content: any;
|
|
25
|
+
context: any;
|
|
26
|
+
created: any;
|
|
27
|
+
due: any;
|
|
28
|
+
filteredListName: any;
|
|
29
|
+
fullPath: string | undefined;
|
|
30
|
+
id: any;
|
|
31
|
+
interpretedContent: any;
|
|
32
|
+
lastLine: any;
|
|
33
|
+
line: any;
|
|
34
|
+
list: any;
|
|
35
|
+
meta: any;
|
|
36
|
+
metaKeys: string[] | undefined;
|
|
37
|
+
progress: any;
|
|
38
|
+
projectPath: any;
|
|
39
|
+
rawTask: any;
|
|
40
|
+
relPath: any;
|
|
41
|
+
source: any;
|
|
42
|
+
started: any;
|
|
43
|
+
tags: any;
|
|
44
|
+
text: any;
|
|
45
|
+
topics: string[] | undefined;
|
|
46
|
+
totals: any;
|
|
47
|
+
};
|
|
19
48
|
initData(): void;
|
|
20
49
|
dataKeys: string[] | undefined;
|
|
21
50
|
data: any;
|
package/types/clone.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function cloneDeep(obj: any, seen?: WeakMap<WeakKey, any>): any;
|
package/types/file.d.ts
CHANGED
|
@@ -113,7 +113,36 @@ export class File extends Emitter<[never]> {
|
|
|
113
113
|
readonly projectPath: any;
|
|
114
114
|
readonly relPath: any;
|
|
115
115
|
readonly fullPath: string | undefined;
|
|
116
|
-
readonly defaultData:
|
|
116
|
+
readonly defaultData: {
|
|
117
|
+
allContext: any;
|
|
118
|
+
allMeta: any;
|
|
119
|
+
allTags: any;
|
|
120
|
+
beforeText: any;
|
|
121
|
+
completed: any;
|
|
122
|
+
content: any;
|
|
123
|
+
context: any;
|
|
124
|
+
created: any;
|
|
125
|
+
due: any;
|
|
126
|
+
filteredListName: any;
|
|
127
|
+
fullPath: string | undefined;
|
|
128
|
+
id: any;
|
|
129
|
+
interpretedContent: any;
|
|
130
|
+
lastLine: any;
|
|
131
|
+
line: any;
|
|
132
|
+
list: any;
|
|
133
|
+
meta: any;
|
|
134
|
+
metaKeys: string[] | undefined;
|
|
135
|
+
progress: any;
|
|
136
|
+
projectPath: any;
|
|
137
|
+
rawTask: any;
|
|
138
|
+
relPath: any;
|
|
139
|
+
source: any;
|
|
140
|
+
started: any;
|
|
141
|
+
tags: any;
|
|
142
|
+
text: any;
|
|
143
|
+
topics: string[] | undefined;
|
|
144
|
+
totals: any;
|
|
145
|
+
};
|
|
117
146
|
initData(): void;
|
|
118
147
|
dataKeys: string[] | undefined;
|
|
119
148
|
data: any;
|
|
@@ -265,7 +294,7 @@ export class File extends Emitter<[never]> {
|
|
|
265
294
|
getTaskAtLine(line: any): any;
|
|
266
295
|
getLinePos(lineNo: any): any;
|
|
267
296
|
getLineNumber(pos: any, content?: any): number;
|
|
268
|
-
toJSON():
|
|
297
|
+
toJSON(): {};
|
|
269
298
|
getRepoId(): any;
|
|
270
299
|
getPath(): any;
|
|
271
300
|
getFullPath(): string;
|
package/types/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from "./FileProjectContext.js";
|
|
|
2
2
|
export * from "./ProjectContext.js";
|
|
3
3
|
export * from "./card.js";
|
|
4
4
|
export * from "./checksum.js";
|
|
5
|
+
export * from "./clone.js";
|
|
5
6
|
export * from "./config.js";
|
|
6
7
|
export * from "./constants.js";
|
|
7
8
|
export * from "./default-settings.js";
|
|
@@ -10,6 +11,7 @@ export * from "./get-tasks-to-modify.js";
|
|
|
10
11
|
export * from "./languages.js";
|
|
11
12
|
export * from "./list.js";
|
|
12
13
|
export * from "./migrate-config.js";
|
|
14
|
+
export * from "./omit.js";
|
|
13
15
|
export * from "./project-factory.js";
|
|
14
16
|
export * from "./project.js";
|
|
15
17
|
export * from "./repository.js";
|
package/types/omit.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function omit(obj: any, keys: any): {};
|
|
@@ -10,7 +10,7 @@ export class PluginManager extends Emitter<[never]> {
|
|
|
10
10
|
stopDevMode(): void;
|
|
11
11
|
initDevMode(): void;
|
|
12
12
|
reloadPlugins(): Promise<void>;
|
|
13
|
-
uninstallPlugin(pluginName: any): Promise<
|
|
13
|
+
uninstallPlugin(pluginName: any): Promise<void>;
|
|
14
14
|
installPlugin({ name, version }: {
|
|
15
15
|
name: any;
|
|
16
16
|
version: any;
|
package/types/project.d.ts
CHANGED
|
@@ -150,7 +150,7 @@ export class WorkerProject {
|
|
|
150
150
|
name: any;
|
|
151
151
|
version: any;
|
|
152
152
|
}): Promise<void>;
|
|
153
|
-
uninstallPlugin(name: any): Promise<
|
|
153
|
+
uninstallPlugin(name: any): Promise<void>;
|
|
154
154
|
refresh(): Promise<void>;
|
|
155
155
|
renderMarkdown(content: any, filePath: any): any;
|
|
156
156
|
extractWikilinkTopics(markdown: any): string[];
|