claude-code-wakatime 3.0.3 → 3.0.5
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 +18 -14
- package/package.json +4 -4
- package/src/options.ts +21 -17
package/dist/index.js
CHANGED
|
@@ -40987,22 +40987,26 @@ var Options = class {
|
|
|
40987
40987
|
this.logFile = path3.join(this.resourcesLocation, "wakatime.log");
|
|
40988
40988
|
}
|
|
40989
40989
|
getSetting(section, key, internal) {
|
|
40990
|
-
|
|
40991
|
-
|
|
40992
|
-
|
|
40993
|
-
|
|
40994
|
-
|
|
40995
|
-
|
|
40996
|
-
|
|
40997
|
-
|
|
40998
|
-
|
|
40999
|
-
|
|
41000
|
-
|
|
41001
|
-
|
|
41002
|
-
|
|
40990
|
+
try {
|
|
40991
|
+
const content = fs3.readFileSync(this.getConfigFile(internal ?? false), "utf-8");
|
|
40992
|
+
if (content.trim()) {
|
|
40993
|
+
let currentSection = "";
|
|
40994
|
+
let lines = content.split("\n");
|
|
40995
|
+
for (var i = 0; i < lines.length; i++) {
|
|
40996
|
+
let line = lines[i];
|
|
40997
|
+
if (this.startsWith(line.trim(), "[") && this.endsWith(line.trim(), "]")) {
|
|
40998
|
+
currentSection = line.trim().substring(1, line.trim().length - 1).toLowerCase();
|
|
40999
|
+
} else if (currentSection === section) {
|
|
41000
|
+
let parts = line.split("=");
|
|
41001
|
+
let currentKey = parts[0].trim();
|
|
41002
|
+
if (currentKey === key && parts.length > 1) {
|
|
41003
|
+
return this.removeNulls(parts[1].trim());
|
|
41004
|
+
}
|
|
41003
41005
|
}
|
|
41004
41006
|
}
|
|
41007
|
+
return void 0;
|
|
41005
41008
|
}
|
|
41009
|
+
} catch (_) {
|
|
41006
41010
|
return void 0;
|
|
41007
41011
|
}
|
|
41008
41012
|
}
|
|
@@ -41123,7 +41127,7 @@ var Options = class {
|
|
|
41123
41127
|
};
|
|
41124
41128
|
|
|
41125
41129
|
// src/version.ts
|
|
41126
|
-
var VERSION = "3.0.
|
|
41130
|
+
var VERSION = "3.0.5";
|
|
41127
41131
|
|
|
41128
41132
|
// src/dependencies.ts
|
|
41129
41133
|
var import_adm_zip = __toESM(require_adm_zip());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-wakatime",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "WakaTime plugin for Claude Code",
|
|
5
5
|
"bin": {
|
|
6
6
|
"claude-code-wakatime": "dist/index.js"
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"build:legacy": "esbuild src/install-hooks.ts --bundle --platform=node --outfile=dist/install-hooks.js",
|
|
12
12
|
"build": "npm run build:legacy && esbuild src/index.ts --bundle --platform=node --outfile=dist/index.js",
|
|
13
13
|
"watch": "npm run prebuild && tsc --watch",
|
|
14
|
-
"release:major": "npm
|
|
15
|
-
"release:minor": "npm
|
|
16
|
-
"release:patch": "npm
|
|
14
|
+
"release:major": "npm version major && npm run build && npm publish && git push && git push --tags",
|
|
15
|
+
"release:minor": "npm version minor && npm run build && npm publish && git push && git push --tags",
|
|
16
|
+
"release:patch": "npm version patch && npm run build && npm publish && git push && git push --tags"
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
package/src/options.ts
CHANGED
|
@@ -34,26 +34,30 @@ export class Options {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
public getSetting(section: string, key: string, internal?: boolean): string | undefined {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
37
|
+
try {
|
|
38
|
+
const content = fs.readFileSync(this.getConfigFile(internal ?? false), 'utf-8');
|
|
39
|
+
if (content.trim()) {
|
|
40
|
+
let currentSection = '';
|
|
41
|
+
let lines = content.split('\n');
|
|
42
|
+
for (var i = 0; i < lines.length; i++) {
|
|
43
|
+
let line = lines[i];
|
|
44
|
+
if (this.startsWith(line.trim(), '[') && this.endsWith(line.trim(), ']')) {
|
|
45
|
+
currentSection = line
|
|
46
|
+
.trim()
|
|
47
|
+
.substring(1, line.trim().length - 1)
|
|
48
|
+
.toLowerCase();
|
|
49
|
+
} else if (currentSection === section) {
|
|
50
|
+
let parts = line.split('=');
|
|
51
|
+
let currentKey = parts[0].trim();
|
|
52
|
+
if (currentKey === key && parts.length > 1) {
|
|
53
|
+
return this.removeNulls(parts[1].trim());
|
|
54
|
+
}
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
|
-
}
|
|
56
57
|
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
} catch (_) {
|
|
57
61
|
return undefined;
|
|
58
62
|
}
|
|
59
63
|
}
|