@workscribe/cli 1.6.2 → 1.7.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/README.md +46 -4
- package/dist/index.js +108 -51
- package/dist/index.js.map +1 -1
- package/package.json +7 -13
- package/shell/hook.bash +1 -1
- package/shell/hook.zsh +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workscribe/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "Passive developer work journal — automatic terminal activity summaries",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"bin": {
|
|
@@ -8,12 +8,14 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsup",
|
|
11
|
+
"preuninstall": "workscribe uninstall --hooks-only 2>/dev/null; exit 0",
|
|
11
12
|
"prepack": "npm run build",
|
|
12
|
-
"postbuild": "chmod +x dist/index.js && node -e \"const fs=require('fs'),p='dist/index.js';fs.writeFileSync(p,fs.readFileSync(p,'utf8').replace(
|
|
13
|
+
"postbuild": "chmod +x dist/index.js && node -e \"const fs=require('fs'),p='dist/index.js';fs.writeFileSync(p,fs.readFileSync(p,'utf8').replace('require(\\\"sqlite\\\")', 'require(\\\"node:sqlite\\\")'))\"",
|
|
13
14
|
"dev": "tsx src/index.ts",
|
|
14
15
|
"watch": "tsup --watch",
|
|
15
16
|
"typecheck": "tsc --noEmit",
|
|
16
17
|
"test": "vitest run",
|
|
18
|
+
"test:coverage": "vitest run --coverage",
|
|
17
19
|
"test:watch": "vitest",
|
|
18
20
|
"lint": "eslint src tests",
|
|
19
21
|
"lint:fix": "eslint src tests --fix",
|
|
@@ -21,8 +23,7 @@
|
|
|
21
23
|
"format:check": "prettier --check src tests",
|
|
22
24
|
"prepare": "husky",
|
|
23
25
|
"release": "release-it",
|
|
24
|
-
"release:dry": "release-it --dry-run"
|
|
25
|
-
"sync-docs": "node scripts/sync-docs.js ../workscribe-landing-page user-docs"
|
|
26
|
+
"release:dry": "release-it --dry-run"
|
|
26
27
|
},
|
|
27
28
|
"files": [
|
|
28
29
|
"dist",
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
"@types/prompts": "^2.4.9",
|
|
49
50
|
"@typescript-eslint/eslint-plugin": "^8.60.0",
|
|
50
51
|
"@typescript-eslint/parser": "^8.60.0",
|
|
52
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
51
53
|
"eslint": "^10.4.0",
|
|
52
54
|
"eslint-config-prettier": "^10.1.8",
|
|
53
55
|
"husky": "^9.1.7",
|
|
@@ -73,15 +75,7 @@
|
|
|
73
75
|
"prettier --write"
|
|
74
76
|
]
|
|
75
77
|
},
|
|
76
|
-
"optionalDependencies": {
|
|
77
|
-
"better-sqlite3": ">=9.0.0"
|
|
78
|
-
},
|
|
79
|
-
"peerDependenciesMeta": {
|
|
80
|
-
"better-sqlite3": {
|
|
81
|
-
"optional": true
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
78
|
"engines": {
|
|
85
|
-
"node": ">=
|
|
79
|
+
"node": ">=22"
|
|
86
80
|
}
|
|
87
81
|
}
|
package/shell/hook.bash
CHANGED
package/shell/hook.zsh
CHANGED
|
@@ -9,7 +9,7 @@ _workscribe_preexec() {
|
|
|
9
9
|
|
|
10
10
|
_workscribe_precmd() {
|
|
11
11
|
local exit_code=$?
|
|
12
|
-
|
|
12
|
+
command -v workscribe > /dev/null 2>&1 || return 0
|
|
13
13
|
if [[ -n "$_workscribe_cmd" ]]; then
|
|
14
14
|
local _raw_ms=$(( ($EPOCHREALTIME - $_workscribe_cmd_start) * 1000 ))
|
|
15
15
|
local duration_ms=${_raw_ms%%.*}
|
|
@@ -19,7 +19,7 @@ _workscribe_precmd() {
|
|
|
19
19
|
--exit "$exit_code" \
|
|
20
20
|
--duration "$duration_ms" \
|
|
21
21
|
${_workscribe_git_before:+--git-before "$_workscribe_git_before"} \
|
|
22
|
-
|
|
22
|
+
> /dev/null 2>&1 &!
|
|
23
23
|
_workscribe_cmd=""
|
|
24
24
|
_workscribe_git_before=""
|
|
25
25
|
fi
|