claude-code-wakatime 3.1.3 → 3.1.4
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/0adb0d40-e7d5-4798-9aab-25c777461dd2.jsonl +622 -0
- package/dist/index.js +10 -4
- package/package.json +1 -1
- package/scripts/run +5 -0
- package/src/types.ts +1 -0
- package/src/utils.ts +10 -4
package/dist/index.js
CHANGED
|
@@ -40905,9 +40905,15 @@ async function getEntityFiles(inp) {
|
|
|
40905
40905
|
if (timestamp2 < lastHeartbeatAt) continue;
|
|
40906
40906
|
const filePath = log.toolUseResult?.filePath;
|
|
40907
40907
|
if (!filePath) continue;
|
|
40908
|
-
const patches = log.toolUseResult?.structuredPatch;
|
|
40909
|
-
|
|
40910
|
-
|
|
40908
|
+
const patches = log.toolUseResult?.structuredPatch ?? [];
|
|
40909
|
+
let lineChanges;
|
|
40910
|
+
if (patches.length > 0) {
|
|
40911
|
+
lineChanges = patches.map((patch) => patch.newLines - patch.oldLines).reduce((p, c) => p + c, 0);
|
|
40912
|
+
} else if (log.toolUseResult?.content && !log.toolUseResult?.originalFile) {
|
|
40913
|
+
lineChanges = log.toolUseResult.content.split("\n").length;
|
|
40914
|
+
} else {
|
|
40915
|
+
continue;
|
|
40916
|
+
}
|
|
40911
40917
|
const prevLineChanges = (entities.get(filePath) ?? { lineChanges: 0 }).lineChanges;
|
|
40912
40918
|
entities.set(filePath, { lineChanges: prevLineChanges + lineChanges, type: "file" });
|
|
40913
40919
|
} catch (err) {
|
|
@@ -41134,7 +41140,7 @@ var Options = class {
|
|
|
41134
41140
|
};
|
|
41135
41141
|
|
|
41136
41142
|
// src/version.ts
|
|
41137
|
-
var VERSION = "3.1.
|
|
41143
|
+
var VERSION = "3.1.4";
|
|
41138
41144
|
|
|
41139
41145
|
// src/dependencies.ts
|
|
41140
41146
|
var import_adm_zip = __toESM(require_adm_zip());
|
package/package.json
CHANGED
package/scripts/run
CHANGED
|
@@ -3,6 +3,11 @@ set -eu
|
|
|
3
3
|
|
|
4
4
|
ROOT="${CLAUDE_PLUGIN_ROOT:-$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)}"
|
|
5
5
|
|
|
6
|
+
# Avoid project-specific NODE_OPTIONS breaking plugin hooks.
|
|
7
|
+
if [ -n "${NODE_OPTIONS:-}" ]; then
|
|
8
|
+
unset NODE_OPTIONS
|
|
9
|
+
fi
|
|
10
|
+
|
|
6
11
|
# If user provides an explicit node path, use it
|
|
7
12
|
if [ -n "${NODE_BIN:-}" ] && [ -x "${NODE_BIN}" ]; then
|
|
8
13
|
exec "${NODE_BIN}" "$ROOT/dist/index.js" "$@"
|
package/src/types.ts
CHANGED
package/src/utils.ts
CHANGED
|
@@ -70,10 +70,16 @@ export async function getEntityFiles(inp: Input | undefined): Promise<{ entities
|
|
|
70
70
|
const filePath = log.toolUseResult?.filePath;
|
|
71
71
|
if (!filePath) continue;
|
|
72
72
|
|
|
73
|
-
const patches = log.toolUseResult?.structuredPatch;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
const patches = log.toolUseResult?.structuredPatch ?? [];
|
|
74
|
+
|
|
75
|
+
let lineChanges: number;
|
|
76
|
+
if (patches.length > 0) {
|
|
77
|
+
lineChanges = patches.map((patch) => patch.newLines - patch.oldLines).reduce((p, c) => p + c, 0);
|
|
78
|
+
} else if (log.toolUseResult?.content && !log.toolUseResult?.originalFile) {
|
|
79
|
+
lineChanges = log.toolUseResult.content.split('\n').length;
|
|
80
|
+
} else {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
77
83
|
|
|
78
84
|
const prevLineChanges = (entities.get(filePath) ?? ({ lineChanges: 0 } as Entity)).lineChanges;
|
|
79
85
|
entities.set(filePath, { lineChanges: prevLineChanges + lineChanges, type: 'file' });
|