taskin 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +26 -4
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -62,7 +62,12 @@ var FileSystemTaskProvider = class {
|
|
|
62
62
|
return task;
|
|
63
63
|
}
|
|
64
64
|
async updateTask(task) {
|
|
65
|
-
await fs.
|
|
65
|
+
const currentContent = await fs.readFile(task.filePath, "utf-8");
|
|
66
|
+
const updatedContent = currentContent.replace(
|
|
67
|
+
/^Status:\s*.+$/im,
|
|
68
|
+
`Status: ${task.status}`
|
|
69
|
+
);
|
|
70
|
+
await fs.writeFile(task.filePath, updatedContent, "utf-8");
|
|
66
71
|
}
|
|
67
72
|
async getAllTasks() {
|
|
68
73
|
const files = await fs.readdir(this.tasksDirectory);
|
|
@@ -1276,9 +1281,26 @@ function showCustomHelp() {
|
|
|
1276
1281
|
return "";
|
|
1277
1282
|
}
|
|
1278
1283
|
|
|
1284
|
+
// src/version.ts
|
|
1285
|
+
init_esm_shims();
|
|
1286
|
+
import { readFileSync } from "fs";
|
|
1287
|
+
import { dirname, join as join4 } from "path";
|
|
1288
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
1289
|
+
var __filename2 = fileURLToPath2(import.meta.url);
|
|
1290
|
+
var __dirname2 = dirname(__filename2);
|
|
1291
|
+
function getVersion() {
|
|
1292
|
+
try {
|
|
1293
|
+
const packageJsonPath = join4(__dirname2, "../package.json");
|
|
1294
|
+
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
|
|
1295
|
+
return packageJson.version;
|
|
1296
|
+
} catch {
|
|
1297
|
+
return "0.0.0";
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1279
1301
|
// src/main.ts
|
|
1280
1302
|
init_esm_shims();
|
|
1281
|
-
import { join as
|
|
1303
|
+
import { join as join5 } from "path";
|
|
1282
1304
|
|
|
1283
1305
|
// src/taskin.ts
|
|
1284
1306
|
init_esm_shims();
|
|
@@ -1368,7 +1390,7 @@ var Taskin = class {
|
|
|
1368
1390
|
|
|
1369
1391
|
// src/main.ts
|
|
1370
1392
|
function createTaskin(tasksDir) {
|
|
1371
|
-
const resolvedTasksDir = tasksDir ||
|
|
1393
|
+
const resolvedTasksDir = tasksDir || join5(process.cwd(), "TASKS");
|
|
1372
1394
|
const taskProvider = new FileSystemTaskProvider(resolvedTasksDir);
|
|
1373
1395
|
const taskManager = new TaskManager(taskProvider);
|
|
1374
1396
|
const linter = new FileSystemTaskLinter();
|
|
@@ -1380,7 +1402,7 @@ function getTaskin() {
|
|
|
1380
1402
|
|
|
1381
1403
|
// src/index.ts
|
|
1382
1404
|
var program = new Command();
|
|
1383
|
-
program.name("taskin").description("\u{1F680} Task Management System").version(
|
|
1405
|
+
program.name("taskin").description("\u{1F680} Task Management System").version(getVersion()).configureHelp({
|
|
1384
1406
|
formatHelp: () => showCustomHelp()
|
|
1385
1407
|
});
|
|
1386
1408
|
initCommand(program);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taskin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Task management system integrated with Git workflows",
|
|
5
5
|
"motivation": "Provide a CLI tool for task management integrated with Git workflows",
|
|
6
6
|
"solve": "Simplifies task tracking and management directly from the command line",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
],
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "tsup",
|
|
65
|
-
"clean": "rm -rf dist coverage .turbo",
|
|
65
|
+
"clean": "rm -rf dist coverage .turbo test-temp-e2e",
|
|
66
66
|
"dev": "tsup --watch",
|
|
67
67
|
"format": "prettier --write .",
|
|
68
68
|
"format:check": "prettier --check .",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"lint:fix": "eslint . --fix",
|
|
71
71
|
"prepublishOnly": "pnpm build",
|
|
72
72
|
"test": "vitest run",
|
|
73
|
+
"test:e2e": "pnpm build && vitest run --config vitest.e2e.config.ts",
|
|
73
74
|
"test:coverage": "vitest run --coverage",
|
|
74
75
|
"typecheck": "tsc --noEmit"
|
|
75
76
|
},
|