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.
Files changed (160) hide show
  1. package/.dependency-cruiser.cjs +412 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
  3. package/.github/workflows/ci.yml +24 -0
  4. package/.imdoneignore +13 -0
  5. package/.mocharc.json +10 -0
  6. package/.prettierrc +6 -0
  7. package/CHANGELOG.md +160 -0
  8. package/_index.md +7 -0
  9. package/_navbar.md +1 -0
  10. package/build.js +57 -0
  11. package/esm-migration.md +446 -0
  12. package/index.html +184 -0
  13. package/lib/FileProjectContext.js +13 -0
  14. package/lib/ProjectContext.js +43 -0
  15. package/lib/adapters/date-time.js +15 -0
  16. package/lib/adapters/environment.js +3 -0
  17. package/lib/adapters/file-gateway.js +154 -0
  18. package/lib/adapters/git-download.js +55 -0
  19. package/lib/adapters/index.js +9 -0
  20. package/lib/adapters/logger.js +136 -0
  21. package/lib/adapters/markdown.js +180 -0
  22. package/lib/adapters/parsers/DateLanguageParser.js +12 -0
  23. package/lib/adapters/parsers/content-transformer.js +116 -0
  24. package/lib/adapters/parsers/file/LocalFileParserFactory.js +36 -0
  25. package/lib/adapters/parsers/file/ReadStreamCodeParser.js +126 -0
  26. package/lib/adapters/parsers/file/ReadStreamMarkdownParser.js +17 -0
  27. package/lib/adapters/parsers/file/ReadStreamTaskParser.js +106 -0
  28. package/lib/adapters/parsers/file/index.js +4 -0
  29. package/lib/adapters/parsers/function-parser.js +25 -0
  30. package/lib/adapters/parsers/index.js +5 -0
  31. package/lib/adapters/parsers/task/CardContentParser.js +367 -0
  32. package/lib/adapters/parsers/task/CheckStyleTaskParser.js +28 -0
  33. package/lib/adapters/parsers/task/CodeStyleTaskParser.js +24 -0
  34. package/lib/adapters/parsers/task/HashStyleTaskParser.js +27 -0
  35. package/lib/adapters/parsers/task/MarkdownStyleTaskParser.js +24 -0
  36. package/lib/adapters/parsers/task/TaskParser.js +38 -0
  37. package/lib/adapters/parsers/task/index.js +6 -0
  38. package/lib/adapters/storage/config.js +44 -0
  39. package/lib/adapters/storage/index.js +2 -0
  40. package/lib/adapters/storage/tags.js +29 -0
  41. package/lib/adapters/yaml.js +9 -0
  42. package/lib/card.js +299 -0
  43. package/lib/checksum.js +22 -0
  44. package/lib/config.js +249 -0
  45. package/lib/constants.js +68 -0
  46. package/lib/context/ApplicationContext.js +35 -0
  47. package/lib/context/index.js +1 -0
  48. package/lib/default-settings.js +37 -0
  49. package/lib/domain/entities/View.js +23 -0
  50. package/lib/domain/entities/index.js +1 -0
  51. package/lib/domain/index.js +2 -0
  52. package/lib/domain/usecases/GetViewsUsecase.js +44 -0
  53. package/lib/domain/usecases/SaveViewUsecase.js +51 -0
  54. package/lib/domain/usecases/index.js +2 -0
  55. package/lib/file.js +1391 -0
  56. package/lib/get-tasks-to-modify.js +117 -0
  57. package/lib/languages.js +113 -0
  58. package/lib/list.js +56 -0
  59. package/lib/migrate-config.js +165 -0
  60. package/lib/mixins/index.js +2 -0
  61. package/lib/mixins/repo-fs-store.js +359 -0
  62. package/lib/mixins/repo-watched-fs-store.js +206 -0
  63. package/lib/plugins/archive-plugin.js +72 -0
  64. package/lib/plugins/default-board-actions-plugin.js +56 -0
  65. package/lib/plugins/default-board-properties-plugin.js +101 -0
  66. package/lib/plugins/default-plugins.js +7 -0
  67. package/lib/plugins/epic-plugin.js +177 -0
  68. package/lib/plugins/extension-plugin.js +94 -0
  69. package/lib/plugins/index.js +9 -0
  70. package/lib/plugins/persist-tags-plugin.js +14 -0
  71. package/lib/plugins/plugin-manager.js +458 -0
  72. package/lib/plugins/plugin-registry.js +57 -0
  73. package/lib/project-factory.js +42 -0
  74. package/lib/project.js +864 -0
  75. package/lib/repository.js +1514 -0
  76. package/lib/task.js +780 -0
  77. package/lib/tools.js +176 -0
  78. package/lib/usecases/actions.js +32 -0
  79. package/lib/usecases/get-imdone-url.js +6 -0
  80. package/lib/usecases/get-project-tags.js +7 -0
  81. package/lib/usecases/get-tasks-in-file.js +26 -0
  82. package/lib/usecases/index.js +4 -0
  83. package/package.json +2 -6
  84. package/scripts/delete-markdown-indexes.js +87 -0
  85. package/scripts/generate-index.js +35 -0
  86. package/scripts/index-markdown.js +55 -0
  87. package/tsconfig.json +15 -0
  88. package/types/FileProjectContext.d.ts +4 -0
  89. package/types/ProjectContext.d.ts +9 -0
  90. package/types/adapters/date-time.d.ts +2 -0
  91. package/types/adapters/environment.d.ts +1 -0
  92. package/types/adapters/file-gateway.d.ts +51 -0
  93. package/types/adapters/git-download.d.ts +1 -0
  94. package/types/adapters/index.d.ts +9 -0
  95. package/types/adapters/logger.d.ts +24 -0
  96. package/types/adapters/markdown.d.ts +13 -0
  97. package/types/adapters/parsers/DateLanguageParser.d.ts +1 -0
  98. package/types/adapters/parsers/content-transformer.d.ts +10 -0
  99. package/types/adapters/parsers/file/LocalFileParserFactory.d.ts +5 -0
  100. package/types/adapters/parsers/file/ReadStreamCodeParser.d.ts +13 -0
  101. package/types/adapters/parsers/file/ReadStreamMarkdownParser.d.ts +7 -0
  102. package/types/adapters/parsers/file/ReadStreamTaskParser.d.ts +19 -0
  103. package/types/adapters/parsers/file/index.d.ts +4 -0
  104. package/types/adapters/parsers/function-parser.d.ts +1 -0
  105. package/types/adapters/parsers/index.d.ts +5 -0
  106. package/types/adapters/parsers/task/CardContentParser.d.ts +45 -0
  107. package/types/adapters/parsers/task/CheckStyleTaskParser.d.ts +12 -0
  108. package/types/adapters/parsers/task/CodeStyleTaskParser.d.ts +14 -0
  109. package/types/adapters/parsers/task/HashStyleTaskParser.d.ts +13 -0
  110. package/types/adapters/parsers/task/MarkdownStyleTaskParser.d.ts +14 -0
  111. package/types/adapters/parsers/task/TaskParser.d.ts +7 -0
  112. package/types/adapters/parsers/task/index.d.ts +6 -0
  113. package/types/adapters/storage/config.d.ts +6 -0
  114. package/types/adapters/storage/index.d.ts +2 -0
  115. package/types/adapters/storage/tags.d.ts +3 -0
  116. package/types/adapters/yaml.d.ts +2 -0
  117. package/types/card.d.ts +166 -0
  118. package/types/checksum.d.ts +8 -0
  119. package/types/config.d.ts +61 -0
  120. package/types/constants.d.ts +46 -0
  121. package/types/context/ApplicationContext.d.ts +24 -0
  122. package/types/context/index.d.ts +1 -0
  123. package/types/default-settings.d.ts +2 -0
  124. package/types/domain/entities/FileProjectContext.d.ts +5 -0
  125. package/types/domain/entities/View.d.ts +17 -0
  126. package/types/domain/entities/index.d.ts +1 -0
  127. package/types/domain/index.d.ts +2 -0
  128. package/types/domain/usecases/GetViewsUsecase.d.ts +4 -0
  129. package/types/domain/usecases/SaveViewUsecase.d.ts +8 -0
  130. package/types/domain/usecases/index.d.ts +2 -0
  131. package/types/file.d.ts +344 -0
  132. package/types/get-tasks-to-modify.d.ts +3 -0
  133. package/types/index.d.ts +23 -0
  134. package/types/languages.d.ts +649 -0
  135. package/types/list.d.ts +30 -0
  136. package/types/migrate-config.d.ts +1 -0
  137. package/types/mixins/index.d.ts +2 -0
  138. package/types/mixins/repo-fs-store.d.ts +2 -0
  139. package/types/mixins/repo-watched-fs-store.d.ts +2 -0
  140. package/types/plugins/archive-plugin.d.ts +8 -0
  141. package/types/plugins/default-board-actions-plugin.d.ts +9 -0
  142. package/types/plugins/default-board-properties-plugin.d.ts +16 -0
  143. package/types/plugins/default-plugins.d.ts +6 -0
  144. package/types/plugins/epic-plugin.d.ts +19 -0
  145. package/types/plugins/extension-plugin.d.ts +15 -0
  146. package/types/plugins/index.d.ts +9 -0
  147. package/types/plugins/persist-tags-plugin.d.ts +4 -0
  148. package/types/plugins/plugin-manager.d.ts +68 -0
  149. package/types/plugins/plugin-registry.d.ts +1 -0
  150. package/types/project-factory.d.ts +14 -0
  151. package/types/project.d.ts +158 -0
  152. package/types/repository.d.ts +996 -0
  153. package/types/task.d.ts +202 -0
  154. package/types/tools.d.ts +29 -0
  155. package/types/usecases/actions.d.ts +7 -0
  156. package/types/usecases/get-imdone-url.d.ts +1 -0
  157. package/types/usecases/get-project-tags.d.ts +1 -0
  158. package/types/usecases/get-tasks-in-file.d.ts +4 -0
  159. package/types/usecases/index.d.ts +4 -0
  160. package/vitest.config.js +13 -0
package/build.js ADDED
@@ -0,0 +1,57 @@
1
+ import { build } from "esbuild";
2
+ import { readFile, writeFile, stat, chmod } from "fs/promises";
3
+
4
+ // Read dependencies from package.json
5
+ const packageJson = JSON.parse(await readFile(new URL("./package.json", import.meta.url), "utf8"));
6
+ const externalDeps = Object.keys(packageJson.dependencies || {});
7
+
8
+ async function getFileSize(filePath) {
9
+ const stats = await stat(filePath);
10
+ return (stats.size / 1024).toFixed(2); // Convert bytes to kilobytes and format to 2 decimal places
11
+ }
12
+
13
+ await Promise.all([
14
+ build({
15
+ entryPoints: ["lib/index.js"], // Main library entry point
16
+ bundle: true,
17
+ format: "esm",
18
+ platform: "node",
19
+ sourcemap: false,
20
+ external: externalDeps,
21
+ outdir: "dist",
22
+ }).then(async () => {
23
+ const size = await getFileSize("dist/index.js");
24
+ console.log(`✅ Main library bundle size: ${size} KB`);
25
+ }),
26
+ build({
27
+ entryPoints: ["lib/cli.js"], // CLI entry point
28
+ bundle: true,
29
+ format: "esm", // Use CommonJS format for CLI
30
+ platform: "node",
31
+ sourcemap: false,
32
+ external: [...externalDeps], // Add Node.js built-in modules to external dependencies
33
+ outfile: "dist/cli.js",
34
+ loader: {
35
+ ".js": "js",
36
+ ".json": "json"
37
+ }, // ✅ Tell esbuild to handle JSON files
38
+ }).then(async () => {
39
+ // Restore the shebang after bundling
40
+ const cliPath = "dist/cli.js";
41
+ let content = await readFile(cliPath, "utf8");
42
+ if (!content.startsWith('#!/usr/bin/env node')) {
43
+ content = `#!/usr/bin/env node\n${content}`;
44
+ await writeFile(cliPath, content);
45
+ console.log("✅ Shebang restored in CLI build");
46
+ }
47
+
48
+ // Give the CLI script executable permissions
49
+ await chmod(cliPath, 0o755);
50
+ console.log("✅ Executable permissions set for CLI build");
51
+
52
+ const size = await getFileSize(cliPath);
53
+ console.log(`✅ CLI bundle size: ${size} KB`);
54
+ }),
55
+ ]);
56
+
57
+ console.log("✅ Build successful");
@@ -0,0 +1,446 @@
1
+ # #DOING ES Migration of imdone-core
2
+ <!--
3
+ order:-30
4
+ #esm-migration
5
+ -->
6
+
7
+ - [ ] Fix deprecated packages
8
+ ```text
9
+ npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
10
+ npm warn deprecated lodash.pick@3.1.0: This package is deprecated. Use destructuring assignment syntax instead.
11
+ npm warn deprecated lodash.get@4.4.2: This package is deprecated. Use the optional chaining (?.) operator instead.
12
+ npm warn deprecated lodash.omit@4.5.0: This package is deprecated. Use destructuring assignment syntax instead.
13
+ npm warn deprecated lodash.isequal@4.5.0: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.
14
+ npm warn deprecated lodash.clone@4.5.0: This package is deprecated. Use structuredClone instead.
15
+ npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
16
+ npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
17
+ ```
18
+
19
+ [Chat](https://chatgpt.com/share/67d08118-c930-8005-84d1-c29e324ae3b9)
20
+
21
+ Converting `imdone-core` from CommonJS (CJS) to TypeScript (TS) with ECMAScript Modules (ESM, `.mjs`) involves several steps. Since `imdone-core` is currently using CJS, you'll need to:
22
+
23
+ 1. **Update `package.json` to Use ESM**
24
+ 2. **Rename Files and Update Imports/Exports**
25
+ 3. **Update `tsconfig.json` for ESM**
26
+ 4. **Migrate Dependencies and Adjust Configuration**
27
+ 5. **Test and Validate the Migration**
28
+
29
+ ---
30
+
31
+ ### **1. Update `package.json`**
32
+ Modify your `package.json` to specify ESM:
33
+
34
+ ```json
35
+ {
36
+ "type": "module",
37
+ "main": "./dist/index.mjs",
38
+ "exports": {
39
+ "import": "./dist/index.mjs",
40
+ "require": "./dist/index.cjs"
41
+ },
42
+ "scripts": {
43
+ "build": "tsc"
44
+ }
45
+ }
46
+ ```
47
+
48
+ - `"type": "module"` tells Node.js that your project uses ESM.
49
+ - `"exports"` ensures compatibility with both ESM and CJS consumers.
50
+
51
+ If you still need CJS compatibility, you can compile dual builds (covered in Step 4).
52
+
53
+ ---
54
+
55
+ ### **2. Rename Files and Update Imports/Exports**
56
+ - Convert `.js` files to `.ts`
57
+ - Rename entry points from `.js` to `.mjs`
58
+ - Change `require()` to `import`
59
+
60
+ **Before (CJS)**
61
+ ```js
62
+ const fs = require('fs');
63
+ const helper = require('./helper');
64
+ module.exports = { myFunction };
65
+ ```
66
+
67
+ **After (ESM + TS)**
68
+ ```ts
69
+ import fs from 'fs';
70
+ import * as helper from './helper.mjs';
71
+ export function myFunction() { ... }
72
+ ```
73
+
74
+ For named exports:
75
+ ```ts
76
+ export { myFunction, anotherFunction };
77
+ ```
78
+
79
+ For default exports:
80
+ ```ts
81
+ export default myFunction;
82
+ ```
83
+
84
+ For dynamic imports (replacing `require()` where needed):
85
+ ```ts
86
+ const module = await import('./someModule.mjs');
87
+ ```
88
+
89
+ ---
90
+
91
+ ### **3. Update `tsconfig.json`**
92
+ Modify `tsconfig.json`:
93
+
94
+ ```json
95
+ {
96
+ "compilerOptions": {
97
+ "module": "ESNext",
98
+ "moduleResolution": "Node",
99
+ "target": "ESNext",
100
+ "outDir": "./dist",
101
+ "rootDir": "./src",
102
+ "declaration": true,
103
+ "declarationDir": "./dist",
104
+ "esModuleInterop": true,
105
+ "skipLibCheck": true,
106
+ "forceConsistentCasingInFileNames": true
107
+ },
108
+ "include": ["src"],
109
+ "exclude": ["node_modules", "dist"]
110
+ }
111
+ ```
112
+
113
+ ---
114
+
115
+ ### **4. Build and Output Dual CJS + ESM**
116
+ To support both module systems, update `package.json`:
117
+
118
+ ```json
119
+ "exports": {
120
+ "import": "./dist/index.mjs",
121
+ "require": "./dist/index.cjs"
122
+ },
123
+ ```
124
+
125
+ Modify `tsconfig.json` to build both formats:
126
+
127
+ ```json
128
+ {
129
+ "compilerOptions": {
130
+ "module": "ESNext",
131
+ "outDir": "./dist/esm",
132
+ "declarationDir": "./dist/esm"
133
+ }
134
+ }
135
+ ```
136
+
137
+ Then, create a `tsconfig.cjs.json`:
138
+
139
+ ```json
140
+ {
141
+ "extends": "./tsconfig.json",
142
+ "compilerOptions": {
143
+ "module": "CommonJS",
144
+ "outDir": "./dist/cjs",
145
+ "declarationDir": "./dist/cjs"
146
+ }
147
+ }
148
+ ```
149
+
150
+ Update `package.json` scripts:
151
+
152
+ ```json
153
+ "scripts": {
154
+ "build": "tsc && tsc --project tsconfig.cjs.json"
155
+ }
156
+ ```
157
+
158
+ ---
159
+
160
+ ### **5. Test the Migration**
161
+ - Run `npm run build`
162
+ - Check that `dist/index.mjs` and `dist/index.cjs` exist
163
+ - Test imports in both ESM and CJS:
164
+
165
+ **Test ESM**
166
+ ```js
167
+ import { myFunction } from 'imdone-core';
168
+ myFunction();
169
+ ```
170
+
171
+ **Test CJS**
172
+ ```js
173
+ const { myFunction } = require('imdone-core');
174
+ myFunction();
175
+ ```
176
+
177
+ lib
178
+ - [x] `├── ProjectContext.js`
179
+ - [ ] `├── adapters`
180
+ - [ ] `│   ├── __tests__`
181
+ - [x] `│   │   ├── date-time.spec.js`
182
+ - [x] `│   │   └── markdown.spec.js`
183
+ - [x] `│   ├── date-time.js`
184
+ - [x] `│   ├── file-gateway.js`
185
+ - [x] `│   ├── git-download.js`
186
+ - [x] `│   ├── markdown.js`
187
+ - [x] `│   ├── parsers`
188
+ - [x] `│   │   ├── DateLanguageParser.js`
189
+ - [x] `│   │   ├── __tests__`
190
+ - [x] `│   │   │   └── content-transformer.spec.js`
191
+ - [x] `│   │   ├── content-transformer.js`
192
+ - [x] `│   │   ├── file`
193
+ - [x] `│   │   │   ├── LocalFileParserFactory.js`
194
+ - [x] `│   │   │   ├── ReadStreamCodeParser.js`
195
+ - [x] `│   │   │   ├── ReadStreamMarkdownParser.js`
196
+ - [x] `│   │   │   ├── ReadStreamTaskParser.js`
197
+ - [x] `│   │   │   └── __tests__`
198
+ - [x] `│   │   │   ├── LocalFileParser.spec.js`
199
+ - [x] `│   │   │   ├── ReadStreamMarkdownParser.spec.js`
200
+ - [x] `│   │   │   ├── code-file.js`
201
+ - [x] `│   │   │   └── test-big-file.md`
202
+ - [x] `│   │   ├── function-parser.js`
203
+ - [x] `│   │   └── task`
204
+ - [x] `│   │   ├── CardContentParser.js`
205
+ - [x] `│   │   ├── CheckStyleTaskParser.js`
206
+ - [x] `│   │   ├── CodeStyleTaskParser.js`
207
+ - [x] `│   │   ├── HashStyleTaskParser.js`
208
+ - [x] `│   │   ├── MarkdownStyleTaskParser.js`
209
+ - [x] `│   │   ├── TaskParser.js`
210
+ - [x] `│   │   └── __tests__`
211
+ - [x] `│   │   └── CardContentParser.spec.js`
212
+ - [ ] `│   ├── readers`
213
+ - [ ] `│   │   └── FileSystemProjectReader.js`
214
+ - [x] `│   ├── storage`
215
+ - [x] `│   │   ├── config.js`
216
+ - [x] `│   │   └── tags.js`
217
+ - [x] `│   └── yaml.js`
218
+ - [x] `├── card.js`
219
+ - [x] `├── config.js`
220
+ - [x] `├── constants.js`
221
+ - [ ] `├── context`
222
+ - [x] `│   ├── ApplicationContext.js`
223
+ - [ ] `│   └── StreamingApplicationContext.js`
224
+ - [ ] `├── controlers`
225
+ - [x] `│   ├── SaveViewController.js`
226
+ - [x] `│   └── __tests__`
227
+ - [x] `│   ├── SaveViewController.spec.js`
228
+ - [x] `│   └── repos`
229
+ - [x] `│   └── test`
230
+ - [x] `│   └── readme.md`
231
+ - [x] `├── default-settings.js`
232
+ - [x] `├── domain`
233
+ - [x] `│   ├── entities`
234
+ - [x] `│   │   ├── FileProjectContext.js`
235
+ - [x] `│   │   └── View.js`
236
+ - [x] `│   └── usecases`
237
+ - [x] `│   ├── GetViewsUsecase.js`
238
+ - [x] `│   ├── OpenProjectUsecase.js`
239
+ - [x] `│   ├── SaveViewUsecase.js`
240
+ - [x] `│   └── __tests__`
241
+ - [x] `│   ├── GetViewsUsecase.spec.js`
242
+ - [x] `│   ├── OpenProjectUsecase.spec.js`
243
+ - [x] `│   └── SaveViewUsecase.spec.js`
244
+ - [x] `├── file.js`
245
+ - [x] `├── languages.js`
246
+ - [x] `├── list.js`
247
+ - [x] `├── migrate-config.js`
248
+ - [x] `├── mixins`
249
+ - [x] `│   ├── repo-fs-store.js`
250
+ - [x] `│   └── repo-watched-fs-store.js`
251
+ - [x] `├── plugins`
252
+ - [x] `│   ├── archive-plugin.js`
253
+ - [x] `│   ├── default-board-actions-plugin.js`
254
+ - [x] `│   ├── default-board-properties-plugin.js`
255
+ - [x] `│   ├── epic-plugin.js`
256
+ - [x] `│   ├── extension-plugin.js`
257
+ - [x] `│   ├── persist-tags-plugin.js`
258
+ - [x] `│   ├── plugin-manager.js`
259
+ - [x] `│   └── plugin-registry.js`
260
+ - [x] `├── project-factory.js`
261
+ - [x] `├── project.js`
262
+ - [x] `├── repository.js`
263
+ - [x] `├── task.js`
264
+ - [x] `├── tools.js`
265
+ - [x] `└── usecases`
266
+ - [x] ` ├── __tests__`
267
+ - [x] ` │   ├── get-project-tags.spec.js`
268
+ - [x] ` │   └── get-tasks-in-file.spec.js`
269
+ - [x] ` ├── get-imdone-url.js`
270
+ - [x] ` ├── get-project-tags.js`
271
+ - [x] ` └── get-tasks-in-file.js`
272
+
273
+ 24 directories, 71 files
274
+
275
+ ## Dependencies
276
+ lib/ProjectContext.js → lib/adapters/parsers/task/CardContentParser.js
277
+ lib/ProjectContext.js → lib/domain/entities/FileProjectContext.js
278
+ lib/adapters/__tests__/date-time.spec.js → lib/adapters/date-time.js
279
+ lib/adapters/__tests__/markdown.spec.js → lib/adapters/markdown.js
280
+ lib/adapters/markdown.js → path
281
+ lib/adapters/file-gateway.js → lib/tools.js
282
+ lib/adapters/file-gateway.js → fs
283
+ lib/adapters/file-gateway.js → path
284
+ lib/tools.js → crypto
285
+ lib/tools.js → path
286
+ lib/adapters/parsers/__tests__/content-transformer.spec.js → lib/adapters/parsers/content-transformer.js
287
+ lib/adapters/parsers/file/LocalFileParserFactory.js → lib/languages.js
288
+ lib/adapters/parsers/file/LocalFileParserFactory.js → lib/adapters/parsers/file/ReadStreamCodeParser.js
289
+ lib/adapters/parsers/file/LocalFileParserFactory.js → lib/adapters/parsers/file/ReadStreamMarkdownParser.js
290
+ lib/adapters/parsers/file/LocalFileParserFactory.js → fs
291
+ lib/adapters/parsers/file/LocalFileParserFactory.js → path
292
+ lib/adapters/parsers/file/ReadStreamCodeParser.js → lib/languages.js
293
+ lib/adapters/parsers/file/ReadStreamCodeParser.js → lib/adapters/parsers/task/CodeStyleTaskParser.js
294
+ lib/adapters/parsers/file/ReadStreamCodeParser.js → lib/adapters/parsers/file/ReadStreamTaskParser.js
295
+ lib/adapters/parsers/file/ReadStreamCodeParser.js → path
296
+ lib/adapters/parsers/file/ReadStreamCodeParser.js → stream
297
+ lib/adapters/parsers/task/CodeStyleTaskParser.js → lib/adapters/parsers/task/TaskParser.js
298
+ lib/adapters/parsers/file/ReadStreamTaskParser.js → readline
299
+ lib/adapters/parsers/file/ReadStreamMarkdownParser.js → lib/adapters/parsers/task/HashStyleTaskParser.js
300
+ lib/adapters/parsers/file/ReadStreamMarkdownParser.js → lib/adapters/parsers/task/MarkdownStyleTaskParser.js
301
+ lib/adapters/parsers/file/ReadStreamMarkdownParser.js → lib/adapters/parsers/file/ReadStreamTaskParser.js
302
+ lib/adapters/parsers/task/HashStyleTaskParser.js → lib/adapters/parsers/task/CardContentParser.js
303
+ lib/adapters/parsers/task/HashStyleTaskParser.js → lib/adapters/parsers/task/TaskParser.js
304
+ lib/adapters/parsers/task/MarkdownStyleTaskParser.js → lib/adapters/parsers/task/TaskParser.js
305
+ lib/adapters/parsers/file/__tests__/LocalFileParser.spec.js → lib/config.js
306
+ lib/adapters/parsers/file/__tests__/LocalFileParser.spec.js → lib/adapters/parsers/file/LocalFileParserFactory.js
307
+ lib/adapters/parsers/file/__tests__/LocalFileParser.spec.js → path
308
+ lib/config.js → lib/constants.js
309
+ lib/constants.js → path
310
+ lib/adapters/parsers/file/__tests__/ReadStreamMarkdownParser.spec.js → lib/config.js
311
+ lib/adapters/parsers/file/__tests__/ReadStreamMarkdownParser.spec.js → lib/adapters/parsers/file/ReadStreamMarkdownParser.js
312
+ lib/adapters/parsers/file/__tests__/ReadStreamMarkdownParser.spec.js → stream
313
+ lib/adapters/parsers/task/CheckStyleTaskParser.js → lib/adapters/parsers/task/TaskParser.js
314
+ lib/adapters/parsers/task/__tests__/CardContentParser.spec.js → lib/config.js
315
+ lib/adapters/parsers/task/__tests__/CardContentParser.spec.js → lib/constants.js
316
+ lib/adapters/parsers/task/__tests__/CardContentParser.spec.js → lib/adapters/parsers/task/CardContentParser.js
317
+ lib/adapters/readers/FileSystemProjectReader.js → lib/adapters/parsers/file/LocalFileParserFactory.js
318
+ lib/adapters/readers/FileSystemProjectReader.js → fs/promises
319
+ lib/adapters/readers/FileSystemProjectReader.js → path
320
+ lib/adapters/storage/config.js → lib/config.js
321
+ lib/adapters/storage/config.js → lib/constants.js
322
+ lib/adapters/storage/config.js → lib/adapters/file-gateway.js
323
+ lib/adapters/storage/config.js → lib/adapters/yaml.js
324
+ lib/adapters/storage/config.js → path
325
+ lib/adapters/storage/tags.js → lib/constants.js
326
+ lib/adapters/storage/tags.js → lib/adapters/file-gateway.js
327
+ lib/adapters/storage/tags.js → lib/adapters/yaml.js
328
+ lib/adapters/storage/tags.js → path
329
+ lib/card.js → lib/adapters/markdown.js
330
+ lib/card.js → lib/adapters/parsers/content-transformer.js
331
+ lib/card.js → lib/adapters/parsers/function-parser.js
332
+ lib/card.js → lib/task.js
333
+ lib/card.js → path
334
+ lib/task.js → lib/adapters/markdown.js
335
+ lib/task.js → lib/adapters/parsers/task/CardContentParser.js
336
+ lib/task.js → lib/tools.js
337
+ lib/task.js → util
338
+ lib/context/ApplicationContext.js → lib/config.js
339
+ lib/context/ApplicationContext.js → lib/plugins/plugin-registry.js
340
+ lib/plugins/plugin-registry.js → lib/adapters/markdown.js
341
+ lib/plugins/plugin-registry.js → https
342
+ lib/context/StreamingApplicationContext.js → lib/config.js
343
+ lib/controlers/SaveViewController.js → lib/context/ApplicationContext.js
344
+ lib/controlers/SaveViewController.js → lib/domain/usecases/SaveViewUsecase.js
345
+ lib/domain/usecases/SaveViewUsecase.js → lib/context/ApplicationContext.js
346
+ lib/domain/usecases/SaveViewUsecase.js → lib/domain/entities/View.js
347
+ lib/domain/usecases/SaveViewUsecase.js → lib/domain/usecases/GetViewsUsecase.js
348
+ lib/domain/usecases/SaveViewUsecase.js → crypto
349
+ lib/domain/usecases/GetViewsUsecase.js → lib/context/ApplicationContext.js
350
+ lib/domain/usecases/GetViewsUsecase.js → lib/list.js
351
+ lib/domain/usecases/GetViewsUsecase.js → lib/domain/entities/View.js
352
+ lib/controlers/__tests__/SaveViewController.spec.js → lib/domain/entities/View.js
353
+ lib/controlers/__tests__/SaveViewController.spec.js → lib/project-factory.js
354
+ lib/controlers/__tests__/SaveViewController.spec.js → lib/controlers/SaveViewController.js
355
+ lib/controlers/__tests__/SaveViewController.spec.js → path
356
+ lib/project-factory.js → lib/context/ApplicationContext.js
357
+ lib/project-factory.js → lib/mixins/repo-fs-store.js
358
+ lib/project-factory.js → lib/mixins/repo-watched-fs-store.js
359
+ lib/project-factory.js → lib/project.js
360
+ lib/project-factory.js → lib/ProjectContext.js
361
+ lib/project-factory.js → lib/repository.js
362
+ lib/mixins/repo-fs-store.js → lib/adapters/yaml.js
363
+ lib/mixins/repo-fs-store.js → lib/config.js
364
+ lib/mixins/repo-fs-store.js → lib/constants.js
365
+ lib/mixins/repo-fs-store.js → lib/file.js
366
+ lib/mixins/repo-fs-store.js → lib/languages.js
367
+ lib/mixins/repo-fs-store.js → lib/migrate-config.js
368
+ lib/mixins/repo-fs-store.js → lib/repository.js
369
+ lib/mixins/repo-fs-store.js → lib/tools.js
370
+ lib/mixins/repo-fs-store.js → fs
371
+ lib/mixins/repo-fs-store.js → path
372
+ lib/file.js → lib/adapters/date-time.js
373
+ lib/file.js → lib/adapters/parsers/task/CardContentParser.js
374
+ lib/file.js → lib/card.js
375
+ lib/file.js → lib/context/ApplicationContext.js
376
+ lib/file.js → lib/languages.js
377
+ lib/file.js → lib/task.js
378
+ lib/file.js → lib/tools.js
379
+ lib/file.js → crypto
380
+ lib/file.js → events
381
+ lib/file.js → path
382
+ lib/file.js → util
383
+ lib/migrate-config.js → lib/default-settings.js
384
+ lib/migrate-config.js → path
385
+ lib/default-settings.js → lib/adapters/yaml.js
386
+ lib/repository.js → lib/adapters/parsers/DateLanguageParser.js
387
+ lib/repository.js → lib/adapters/parsers/task/CardContentParser.js
388
+ lib/repository.js → lib/card.js
389
+ lib/repository.js → lib/config.js
390
+ lib/repository.js → lib/constants.js
391
+ lib/repository.js → lib/context/ApplicationContext.js
392
+ lib/repository.js → lib/file.js
393
+ lib/repository.js → lib/languages.js
394
+ lib/repository.js → lib/list.js
395
+ lib/repository.js → lib/task.js
396
+ lib/repository.js → lib/tools.js
397
+ lib/repository.js → events
398
+ lib/repository.js → path
399
+ lib/repository.js → util
400
+ lib/mixins/repo-watched-fs-store.js → lib/constants.js
401
+ lib/mixins/repo-watched-fs-store.js → lib/file.js
402
+ lib/mixins/repo-watched-fs-store.js → lib/mixins/repo-fs-store.js
403
+ lib/mixins/repo-watched-fs-store.js → fs
404
+ lib/project.js → lib/adapters/date-time.js
405
+ lib/project.js → lib/adapters/file-gateway.js
406
+ lib/project.js → lib/adapters/markdown.js
407
+ lib/project.js → lib/adapters/parsers/content-transformer.js
408
+ lib/project.js → lib/adapters/parsers/function-parser.js
409
+ lib/project.js → lib/card.js
410
+ lib/project.js → lib/constants.js
411
+ lib/project.js → lib/plugins/plugin-manager.js
412
+ lib/project.js → lib/repository.js
413
+ lib/project.js → lib/task.js
414
+ lib/project.js → child_process
415
+ lib/project.js → path
416
+ lib/plugins/plugin-manager.js → lib/adapters/file-gateway.js
417
+ lib/plugins/plugin-manager.js → lib/adapters/git-download.js
418
+ lib/plugins/plugin-manager.js → lib/context/ApplicationContext.js
419
+ lib/plugins/plugin-manager.js → events
420
+ lib/plugins/plugin-manager.js → path
421
+ lib/domain/usecases/OpenProjectUsecase.js → lib/context/ApplicationContext.js
422
+ lib/domain/usecases/__tests__/OpenProjectUsecase.spec.js → lib/context/ApplicationContext.js
423
+ lib/domain/usecases/__tests__/OpenProjectUsecase.spec.js → lib/domain/usecases/OpenProjectUsecase.js
424
+ lib/domain/usecases/__tests__/SaveViewUsecase.spec.js → lib/context/ApplicationContext.js
425
+ lib/domain/usecases/__tests__/SaveViewUsecase.spec.js → lib/domain/usecases/SaveViewUsecase.js
426
+ lib/plugins/archive-plugin.js → lib/adapters/parsers/task/CardContentParser.js
427
+ lib/plugins/archive-plugin.js → path
428
+ lib/plugins/default-board-properties-plugin.js → lib/adapters/date-time.js
429
+ lib/plugins/default-board-properties-plugin.js → path
430
+ lib/plugins/extension-plugin.js → fs
431
+ lib/plugins/extension-plugin.js → path
432
+ lib/plugins/persist-tags-plugin.js → lib/adapters/storage/tags.js
433
+ lib/usecases/__tests__/get-project-tags.spec.js → test/helper.js
434
+ lib/usecases/__tests__/get-project-tags.spec.js → lib/project-factory.js
435
+ lib/usecases/__tests__/get-project-tags.spec.js → lib/usecases/get-project-tags.js
436
+ lib/usecases/__tests__/get-project-tags.spec.js → path
437
+ test/helper.js → path
438
+ lib/usecases/get-project-tags.js → lib/adapters/storage/config.js
439
+ lib/usecases/get-project-tags.js → lib/adapters/storage/tags.js
440
+ lib/usecases/__tests__/get-tasks-in-file.spec.js → test/helper.js
441
+ lib/usecases/__tests__/get-tasks-in-file.spec.js → lib/usecases/get-tasks-in-file.js
442
+ lib/usecases/__tests__/get-tasks-in-file.spec.js → fs
443
+ lib/usecases/__tests__/get-tasks-in-file.spec.js → path
444
+ lib/usecases/get-tasks-in-file.js → lib/adapters/parsers/file/LocalFileParserFactory.js
445
+ lib/usecases/get-tasks-in-file.js → lib/adapters/storage/config.js
446
+ lib/usecases/get-tasks-in-file.js → stream
package/index.html ADDED
@@ -0,0 +1,184 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <title>imdone-core</title>
7
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
8
+ <meta http-equiv="Pragma" content="no-cache">
9
+ <meta http-equiv="Expires" content="0">
10
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
11
+ <meta name="description" content="imdone-core">
12
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
13
+ <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" , rel="stylesheet">
14
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
15
+ <link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/prism-themes@1.3.0/themes/prism-atom-dark.css'>
16
+ <style>
17
+ .sidebar-nav {
18
+ margin-left: .5rem;
19
+ }
20
+
21
+ .sidebar-nav h2 {
22
+ margin-left: 0.5rem;
23
+ }
24
+
25
+ .markdown-section pre>code {
26
+ -webkit-font-smoothing: antialiased;
27
+ background-color: inherit;
28
+ color: inherit;
29
+ padding: 1.5em .25em;
30
+ }
31
+
32
+ pre[class*="language-"] {
33
+ padding: 0 .5em;
34
+ margin: 0;
35
+ overflow: auto;
36
+ border-radius: 0.3em;
37
+ }
38
+
39
+ .markdown-section {
40
+ font-size: 21px;
41
+ margin: 0 8%;
42
+ max-width: 100%;
43
+ padding: 30px 15px 40px;
44
+ position: relative;
45
+ }
46
+
47
+ a.button {
48
+ -webkit-tap-highlight-color: transparent;
49
+ text-align: center;
50
+ box-sizing: border-box;
51
+ text-decoration: none;
52
+ line-height: 1.33333;
53
+ border-radius: 3px;
54
+ font-size: 1.5em;
55
+ color: #fff;
56
+ background-color: #286090;
57
+ border-color: #204d74;
58
+ background-image: none;
59
+ font-weight: bold;
60
+ padding: .25em .5em;
61
+ margin: 0;
62
+ height: 2em;
63
+ }
64
+ </style>
65
+ </head>
66
+
67
+ <body>
68
+ <div id="app"></div>
69
+ <!-- VueJs -->
70
+ <!-- Production -->
71
+ <!--<script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"></script>-->
72
+ <!-- Development -->
73
+ <script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.js"></script>
74
+ <script src="https://cdn.jsdelivr.net/npm/js-yaml@4.1.0/dist/js-yaml.min.js"></script>
75
+ <script src="https://cdn.jsdelivr.net/npm/jsonpath@1.1.1/jsonpath.min.js"></script>
76
+ <script>
77
+ window.$docsify = {
78
+ maxAge: 3600000,
79
+ repo: 'https://github.com/imdone/imdone-core',
80
+ loadSidebar: "_index.md",
81
+ subMaxLevel: 5,
82
+ loadNavbar: true,
83
+ relativePath: true,
84
+ search: {
85
+ paths: 'auto',
86
+ namespace: 'imdone-core'
87
+ },
88
+ customPageTitle: {
89
+ prefix: 'imdone-core'
90
+ },
91
+ mermaidConfig: {
92
+ querySelector: ".mermaid"
93
+ },
94
+ vueComponents: {
95
+ 'load-yaml': {
96
+ template: `
97
+ <div>
98
+ <strong><a :href="url">{{src}}</a></strong>
99
+ </div>
100
+ <pre>
101
+ <code class="language-yaml">
102
+ {{yaml}}
103
+ </code>
104
+ </pre>
105
+ `,
106
+ props: ['src', 'path'],
107
+ data() {
108
+ return {
109
+ yaml: '',
110
+ data: {},
111
+ url: `${$docsify.repo}/${this.src}`
112
+ };
113
+ },
114
+ created() {
115
+ fetch(this.src)
116
+ .then(async response => {
117
+ const yaml = await response.text()
118
+ const data = jsyaml.load(yaml)
119
+ this.data = this.path ? jsonpath.query(data, this.path) : data
120
+ this.yaml = '\n' + jsyaml.dump(this.data, { forceQuotes: true })
121
+ })
122
+ .catch(err => console.log(err));
123
+ }
124
+ },
125
+ 'load-code': {
126
+ template: `
127
+ <div>
128
+ <strong><a :href="url">{{src}}</a></strong>
129
+ </div>
130
+ <pre :data-lang="innerLang" :class="language">
131
+ <code :class="language">{{text}}</code>
132
+ </pre>
133
+ `,
134
+ props: ['src', 'path', 'lang'],
135
+ data() {
136
+ return {
137
+ text: '',
138
+ data: {},
139
+ url: `${$docsify.repo}/${this.src}`
140
+ };
141
+ },
142
+ created() {
143
+ fetch(this.src)
144
+ .then(async response => {
145
+ this.text = '\n' + await response.text()
146
+ })
147
+ .catch(err => console.log(err));
148
+ },
149
+ computed: {
150
+ language() {
151
+ return `language-${this.innerLang}`
152
+ },
153
+ innerLang() {
154
+ return this.lang || 'text'
155
+ }
156
+ }
157
+ },
158
+
159
+ },
160
+ }
161
+ </script>
162
+ <script src="https://cdn.jsdelivr.net/npm/docsify@4"></script>
163
+ <script src="https://cdn.jsdelivr.net/gh/rizdaprasetya/docsify-fix-pageload-scroll@master/index.js"></script>
164
+ <script src="https://unpkg.com/docsify/lib/plugins/search.min.js"></script>
165
+ <script src="https://unpkg.com/docsify/lib/plugins/zoom-image.min.js"></script>
166
+ <script src="https://cdn.jsdelivr.net/npm/docsify-prism@latest/dist/docsify-prism.min.js"></script>
167
+ <script src="https://unpkg.com/prismjs/components/prism-markdown.min.js"></script>
168
+ <script src="https://unpkg.com/prismjs/components/prism-javascript.min.js"></script>
169
+ <script src="https://unpkg.com/prismjs/components/prism-java.min.js"></script>
170
+ <script src="https://unpkg.com/prismjs/components/prism-yaml.min.js"></script>
171
+ <script src="https://unpkg.com/docsify-copy-code"></script>
172
+ <script src="https://unpkg.com/docsify-sidebar-collapse/dist/docsify-sidebar-collapse.min.js"></script>
173
+ <script src="https://unpkg.com/docsify-include-template/dist/docsify-include-template.js"></script>
174
+ <script src="https://cdn.jsdelivr.net/npm/docsify/lib/plugins/emoji.min.js"></script>
175
+ <script src="https://cdn.jsdelivr.net/npm/@sujaykumarh/docsify-plugin-title@1.x/dist/plugin.min.js"></script>
176
+ <script type="module">
177
+ import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs";
178
+ mermaid.initialize({ startOnLoad: true });
179
+ window.mermaid = mermaid;
180
+ </script>
181
+ <script src="https://unpkg.com/docsify-mermaid@2.0.1/dist/docsify-mermaid.js"></script>
182
+ </body>
183
+
184
+ </html>