tokengolf 1.1.1 → 1.1.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/.claude-plugin/marketplace.json +1 -1
- package/dist/cli.js +4 -4
- package/hooks/session-start.js +1 -1
- package/package.json +2 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/scripts/session-start.js +1 -1
- package/scripts/create-release.sh +28 -0
- package/src/lib/install.js +4 -4
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"name": "tokengolf",
|
|
12
12
|
"source": "./plugin",
|
|
13
13
|
"description": "Gamify your Claude Code sessions — track token efficiency, earn achievements, level up your prompting.",
|
|
14
|
-
"version": "1.1.
|
|
14
|
+
"version": "1.1.2",
|
|
15
15
|
"homepage": "https://josheche.github.io/tokengolf/",
|
|
16
16
|
"license": "MIT"
|
|
17
17
|
}
|
package/dist/cli.js
CHANGED
|
@@ -1394,14 +1394,14 @@ function installHooks() {
|
|
|
1394
1394
|
settings.statusLine = {
|
|
1395
1395
|
type: "command",
|
|
1396
1396
|
command: STABLE_WRAPPER,
|
|
1397
|
-
padding: existing?.padding ??
|
|
1397
|
+
padding: existing?.padding ?? 0
|
|
1398
1398
|
};
|
|
1399
1399
|
console.log(" \u2713 statusLine \u2192 updated paths (kept your existing statusline)");
|
|
1400
1400
|
} else {
|
|
1401
1401
|
settings.statusLine = {
|
|
1402
1402
|
type: "command",
|
|
1403
1403
|
command: STABLE_STATUSLINE,
|
|
1404
|
-
padding: existing?.padding ??
|
|
1404
|
+
padding: existing?.padding ?? 0
|
|
1405
1405
|
};
|
|
1406
1406
|
console.log(" \u2713 statusLine \u2192 updated to current install path");
|
|
1407
1407
|
}
|
|
@@ -1419,14 +1419,14 @@ function installHooks() {
|
|
|
1419
1419
|
settings.statusLine = {
|
|
1420
1420
|
type: "command",
|
|
1421
1421
|
command: STABLE_WRAPPER,
|
|
1422
|
-
padding:
|
|
1422
|
+
padding: 0
|
|
1423
1423
|
};
|
|
1424
1424
|
console.log(" \u2713 statusLine \u2192 wrapped your existing statusline + tokengolf HUD");
|
|
1425
1425
|
} else {
|
|
1426
1426
|
settings.statusLine = {
|
|
1427
1427
|
type: "command",
|
|
1428
1428
|
command: STABLE_STATUSLINE,
|
|
1429
|
-
padding:
|
|
1429
|
+
padding: 0
|
|
1430
1430
|
};
|
|
1431
1431
|
console.log(" \u2713 statusLine \u2192 live HUD in every Claude session");
|
|
1432
1432
|
}
|
package/hooks/session-start.js
CHANGED
|
@@ -64,7 +64,7 @@ try {
|
|
|
64
64
|
const needsInstall = !current || current.includes('tokengolf');
|
|
65
65
|
const needsUpdate = needsInstall && current !== stablePath;
|
|
66
66
|
if (needsUpdate) {
|
|
67
|
-
settings.statusLine = { type: 'command', command: stablePath, padding:
|
|
67
|
+
settings.statusLine = { type: 'command', command: stablePath, padding: 0 };
|
|
68
68
|
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
|
|
69
69
|
}
|
|
70
70
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tokengolf",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Gamify your Claude Code sessions. Flow mode tracks you. Roguelike mode trains you.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"format:check": "prettier --check src/ hooks/",
|
|
20
20
|
"version": "./scripts/sync-plugin-version.sh && git add CHANGELOG.md plugin/ .claude-plugin/",
|
|
21
21
|
"postversion": "git push && git push --tags",
|
|
22
|
-
"postpublish": "./scripts/update-homebrew.sh"
|
|
22
|
+
"postpublish": "./scripts/create-release.sh && ./scripts/update-homebrew.sh"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@inkjs/ui": "^2.0.0",
|
|
@@ -64,7 +64,7 @@ try {
|
|
|
64
64
|
const needsInstall = !current || current.includes('tokengolf');
|
|
65
65
|
const needsUpdate = needsInstall && current !== stablePath;
|
|
66
66
|
if (needsUpdate) {
|
|
67
|
-
settings.statusLine = { type: 'command', command: stablePath, padding:
|
|
67
|
+
settings.statusLine = { type: 'command', command: stablePath, padding: 0 };
|
|
68
68
|
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Creates a GitHub Release from the current version tag with CHANGELOG notes.
|
|
3
|
+
# Called automatically during `npm publish` via postpublish.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
VERSION=$(node -p "require('./package.json').version")
|
|
7
|
+
TAG="v${VERSION}"
|
|
8
|
+
|
|
9
|
+
echo "Creating GitHub Release for ${TAG}..."
|
|
10
|
+
|
|
11
|
+
# Extract the changelog section for this version.
|
|
12
|
+
# Grabs everything between "## [X.Y.Z]" and the next "## [" or "---" separator.
|
|
13
|
+
NOTES=$(awk "
|
|
14
|
+
/^## \\[${VERSION}\\]/ { found=1; next }
|
|
15
|
+
found && /^## \\[/ { exit }
|
|
16
|
+
found && /^---$/ { exit }
|
|
17
|
+
found { print }
|
|
18
|
+
" CHANGELOG.md)
|
|
19
|
+
|
|
20
|
+
# If no changelog section found, fall back to auto-generated notes from commits
|
|
21
|
+
if [ -z "$NOTES" ]; then
|
|
22
|
+
echo " No CHANGELOG section found for ${VERSION}, using auto-generated notes"
|
|
23
|
+
gh release create "$TAG" --generate-notes --title "$TAG"
|
|
24
|
+
else
|
|
25
|
+
echo "$NOTES" | gh release create "$TAG" --title "$TAG" --notes-file -
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
echo "Done — https://github.com/josheche/tokengolf/releases/tag/${TAG}"
|
package/src/lib/install.js
CHANGED
|
@@ -208,7 +208,7 @@ export function installHooks() {
|
|
|
208
208
|
settings.statusLine = {
|
|
209
209
|
type: 'command',
|
|
210
210
|
command: STABLE_WRAPPER,
|
|
211
|
-
padding: existing?.padding ??
|
|
211
|
+
padding: existing?.padding ?? 0,
|
|
212
212
|
};
|
|
213
213
|
console.log(' ✓ statusLine → updated paths (kept your existing statusline)');
|
|
214
214
|
} else {
|
|
@@ -216,7 +216,7 @@ export function installHooks() {
|
|
|
216
216
|
settings.statusLine = {
|
|
217
217
|
type: 'command',
|
|
218
218
|
command: STABLE_STATUSLINE,
|
|
219
|
-
padding: existing?.padding ??
|
|
219
|
+
padding: existing?.padding ?? 0,
|
|
220
220
|
};
|
|
221
221
|
console.log(' ✓ statusLine → updated to current install path');
|
|
222
222
|
}
|
|
@@ -235,7 +235,7 @@ export function installHooks() {
|
|
|
235
235
|
settings.statusLine = {
|
|
236
236
|
type: 'command',
|
|
237
237
|
command: STABLE_WRAPPER,
|
|
238
|
-
padding:
|
|
238
|
+
padding: 0,
|
|
239
239
|
};
|
|
240
240
|
console.log(' ✓ statusLine → wrapped your existing statusline + tokengolf HUD');
|
|
241
241
|
} else {
|
|
@@ -243,7 +243,7 @@ export function installHooks() {
|
|
|
243
243
|
settings.statusLine = {
|
|
244
244
|
type: 'command',
|
|
245
245
|
command: STABLE_STATUSLINE,
|
|
246
|
-
padding:
|
|
246
|
+
padding: 0,
|
|
247
247
|
};
|
|
248
248
|
console.log(' ✓ statusLine → live HUD in every Claude session');
|
|
249
249
|
}
|