ai-heatmap 1.14.3 → 1.14.6
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 +13 -8
- package/bin/init.mjs +1 -1
- package/package.json +1 -1
- package/scripts/generate.mjs +2 -2
package/README.md
CHANGED
|
@@ -12,14 +12,12 @@ Powered by [ccusage](https://github.com/ryoppippi/ccusage) + [react-activity-cal
|
|
|
12
12
|
|
|
13
13
|
## Quick Start
|
|
14
14
|
|
|
15
|
-
```
|
|
15
|
+
```bash
|
|
16
16
|
brew install gh
|
|
17
17
|
gh auth login
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
```
|
|
21
|
-
USER=$(gh api user -q .login)
|
|
22
|
-
|
|
20
|
+
```bash
|
|
23
21
|
# npx --yes ai-heatmap@latest delete
|
|
24
22
|
npx --yes ai-heatmap@latest init
|
|
25
23
|
|
|
@@ -27,10 +25,17 @@ USER=$(gh api user -q .login)
|
|
|
27
25
|
open "https://${USER}.github.io/${USER}-ai-heatmap/heatmap.svg"
|
|
28
26
|
```
|
|
29
27
|
|
|
28
|
+
```bash
|
|
29
|
+
npx --yes ai-heatmap@latest deploy
|
|
30
|
+
|
|
31
|
+
USER=$(gh api user -q .login)
|
|
32
|
+
open "https://${USER}-ai-heatmap.vercel.app/api/heatmap?colorScheme=dark"
|
|
33
|
+
```
|
|
34
|
+
|
|
30
35
|
## Preview
|
|
31
36
|
|
|
32
37
|
<!-- Replace seunggabi-ai-heatmap.vercel.app with your actual Vercel deployment URL -->
|
|
33
|
-

|
|
38
|
+

|
|
34
39
|
|
|
35
40
|
### Variations
|
|
36
41
|
```markdown
|
|
@@ -111,7 +116,7 @@ A static SVG (`heatmap.svg`) is also generated during build. You can embed it as
|
|
|
111
116
|
All options are controlled via query string:
|
|
112
117
|
|
|
113
118
|
```
|
|
114
|
-
https://
|
|
119
|
+
https://{user}.github.io/{user}-ai-heatmap/?colorScheme=dark&blockSize=14
|
|
115
120
|
```
|
|
116
121
|
|
|
117
122
|
| Parameter | Default | Description |
|
|
@@ -142,14 +147,14 @@ https://owner.github.io/{user}-ai-heatmap/?colorScheme=dark&blockSize=14
|
|
|
142
147
|
## Configuration
|
|
143
148
|
|
|
144
149
|
```
|
|
145
|
-
https://
|
|
150
|
+
https://{user}.github.io/{user}-ai-heatmap/heatmap.svg
|
|
146
151
|
```
|
|
147
152
|
|
|
148
153
|
Customize the static SVG output by editing `heatmap.config.json` in the project root:
|
|
149
154
|
|
|
150
155
|
```json
|
|
151
156
|
{
|
|
152
|
-
"colorScheme": "
|
|
157
|
+
"colorScheme": "dark",
|
|
153
158
|
"theme": "",
|
|
154
159
|
"blockSize": 16,
|
|
155
160
|
"blockMargin": 4,
|
package/bin/init.mjs
CHANGED
|
@@ -134,7 +134,7 @@ readmeLines.push(
|
|
|
134
134
|
"",
|
|
135
135
|
"## Dynamic SVG (by Vercel)",
|
|
136
136
|
"",
|
|
137
|
-
``,
|
|
137
|
+
``,
|
|
138
138
|
"",
|
|
139
139
|
"```bash",
|
|
140
140
|
"npx --yes ai-heatmap@latest deploy",
|
package/package.json
CHANGED
package/scripts/generate.mjs
CHANGED
|
@@ -11,12 +11,12 @@ const args = process.argv.slice(2);
|
|
|
11
11
|
const sinceFlag = args.find((a) => a.startsWith("--since"));
|
|
12
12
|
const untilFlag = args.find((a) => a.startsWith("--until"));
|
|
13
13
|
|
|
14
|
-
let cmd = "npx ccusage@latest daily --json";
|
|
14
|
+
let cmd = "npx --yes ccusage@latest daily --json";
|
|
15
15
|
if (sinceFlag) cmd += ` ${sinceFlag}`;
|
|
16
16
|
if (untilFlag) cmd += ` ${untilFlag}`;
|
|
17
17
|
|
|
18
18
|
console.log(`Running: ${cmd}`);
|
|
19
|
-
const raw = execSync(cmd, { encoding: "utf-8", timeout:
|
|
19
|
+
const raw = execSync(cmd, { encoding: "utf-8", timeout: 300000 });
|
|
20
20
|
const { daily } = JSON.parse(raw);
|
|
21
21
|
|
|
22
22
|
const costs = daily.map((d) => d.totalCost);
|