hiroppy 1.0.22 → 1.0.23
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 +4 -9
- package/generated/articles.json +3 -6
- package/generated/images.tar.gz +0 -0
- package/generated/jobs.json +19 -19
- package/lib/hatena.mjs +19 -0
- package/lib/index.mjs +1 -0
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<samp>
|
|
3
3
|
<a href="https://hiroppy.me/">me</a> |
|
|
4
|
-
<a href="https://hiroppy.me/blog">blog</a> |
|
|
5
|
-
<a href="https://
|
|
4
|
+
<a href="https://hiroppy.me/blog/">blog</a> |
|
|
5
|
+
<a href="https://x.com/about_hiroppy/">tweets</a>
|
|
6
6
|
</samp>
|
|
7
7
|
</p>
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@ I am a JS engineer living in Japan, and I love creating OSS and web services.
|
|
|
16
16
|
## Active Repositories
|
|
17
17
|
|
|
18
18
|
- [web-app-template](https://github.com/hiroppy/web-app-template)
|
|
19
|
-
- A minimal web service template 🎃
|
|
19
|
+
- A minimal web service template 🎃 "npx create-app-foundation@latest" !
|
|
20
20
|
- [nextjs-app-router-training](https://github.com/hiroppy/nextjs-app-router-training)
|
|
21
21
|
- Introducing various basic patterns of app router with simplified code.
|
|
22
22
|
|
|
@@ -141,11 +141,6 @@ $ npm i hiroppy
|
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
```ts
|
|
144
|
-
import jobs
|
|
144
|
+
import jobs from "hiroppy/jobs" with { type: "json" };
|
|
145
145
|
import media from "hiroppy/media" with { type: "json" };
|
|
146
146
|
```
|
|
147
|
-
|
|
148
|
-
<br />
|
|
149
|
-
<br />
|
|
150
|
-
|
|
151
|
-
last auto-updated time: 2025/6/1 22:50:53
|
package/generated/articles.json
CHANGED
|
@@ -157,8 +157,7 @@
|
|
|
157
157
|
"title": "module bundlerの作り方(準備編)",
|
|
158
158
|
"image": "https://cdn.image.st-hatena.com/image/scale/aed8f13afa077875ee6844191ce355b38c9fb44e/backend=imagemagick;version=1;width=1300/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fa%2Fabout_hiroppy%2F20200519%2F20200519095516.png",
|
|
159
159
|
"description": "",
|
|
160
|
-
"publishedAt": "2020-05-19"
|
|
161
|
-
"bookmark": 52
|
|
160
|
+
"publishedAt": "2020-05-19"
|
|
162
161
|
},
|
|
163
162
|
{
|
|
164
163
|
"siteName": "技術探し",
|
|
@@ -388,8 +387,7 @@
|
|
|
388
387
|
"title": "webpackの仕組みを簡潔に説明する",
|
|
389
388
|
"image": "https://cdn.image.st-hatena.com/image/scale/117aec1de94f8e31c2cc0f6e532f7c489a8bd471/backend=imagemagick;version=1;width=1300/https%3A%2F%2Favatars1.githubusercontent.com%2Fu%2F2105791%3Fs%3D200%26v%3D4",
|
|
390
389
|
"description": "",
|
|
391
|
-
"publishedAt": "2018-12-25"
|
|
392
|
-
"bookmark": 411
|
|
390
|
+
"publishedAt": "2018-12-25"
|
|
393
391
|
},
|
|
394
392
|
{
|
|
395
393
|
"siteName": "技術探し",
|
|
@@ -429,8 +427,7 @@
|
|
|
429
427
|
"title": "Node.jsでのイベントループの仕組みとタイマーについて",
|
|
430
428
|
"image": "https://cdn.image.st-hatena.com/image/scale/27946a3b0b593e0ac9e22d91d8e21d7d937ae3c9/backend=imagemagick;version=1;width=1300/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fa%2Fabout_hiroppy%2F20180925%2F20180925083813.png",
|
|
431
429
|
"description": "",
|
|
432
|
-
"publishedAt": "2018-09-26"
|
|
433
|
-
"bookmark": 340
|
|
430
|
+
"publishedAt": "2018-09-26"
|
|
434
431
|
},
|
|
435
432
|
{
|
|
436
433
|
"siteName": "技術探し",
|
package/generated/images.tar.gz
CHANGED
|
Binary file
|
package/generated/jobs.json
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"coderPenguin": {
|
|
4
|
-
"image": "/images/
|
|
4
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9jb2RlclBlbmd1aW4ucG5n.webp",
|
|
5
5
|
"url": "https://coder-penguin.com/"
|
|
6
6
|
},
|
|
7
7
|
"layerX": {
|
|
8
|
-
"image": "/images/
|
|
8
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9sYXllcngucG5n.webp",
|
|
9
9
|
"url": "https://layerx.co.jp/"
|
|
10
10
|
},
|
|
11
11
|
"ship": {
|
|
12
|
-
"image": "/images/
|
|
12
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9zaGlwLnBuZw==.webp",
|
|
13
13
|
"url": "https://www.shipinc.jp/"
|
|
14
14
|
},
|
|
15
15
|
"stract": {
|
|
16
|
-
"image": "/images/
|
|
16
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9zdHJhY3QucG5n.webp",
|
|
17
17
|
"url": "https://stract.co.jp/"
|
|
18
18
|
},
|
|
19
19
|
"aidemy": {
|
|
20
|
-
"image": "/images/
|
|
20
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9haWRlbXkucG5n.webp",
|
|
21
21
|
"url": "https://aidemy.net/"
|
|
22
22
|
},
|
|
23
23
|
"mercari": {
|
|
24
|
-
"image": "/images/
|
|
24
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9tZXJjYXJpLnBuZw==.webp",
|
|
25
25
|
"url": "https://about.mercari.com/"
|
|
26
26
|
},
|
|
27
27
|
"yuimedi": {
|
|
28
|
-
"image": "/images/
|
|
28
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy95dWltZWRpLmpwZWc=.webp",
|
|
29
29
|
"url": "https://yuimedi.com/"
|
|
30
30
|
},
|
|
31
31
|
"dwango": {
|
|
32
|
-
"image": "/images/
|
|
32
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9kd2FuZ28uanBlZw==.webp",
|
|
33
33
|
"url": "https://dwango.co.jp/"
|
|
34
34
|
},
|
|
35
35
|
"estie": {
|
|
36
|
-
"image": "/images/
|
|
36
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9lc3RpZS5wbmc=.webp",
|
|
37
37
|
"url": "https://www.estie.jp/"
|
|
38
38
|
},
|
|
39
39
|
"runpeace": {
|
|
40
|
-
"image": "/images/
|
|
40
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9ydW5wZWFjZS5qcGc=.webp",
|
|
41
41
|
"url": "https://www.runpeace.biz/"
|
|
42
42
|
},
|
|
43
43
|
"rebase": {
|
|
44
|
-
"image": "/images/
|
|
44
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9yZWJhc2UucG5n.webp",
|
|
45
45
|
"url": "https://rebase.co.jp/"
|
|
46
46
|
},
|
|
47
47
|
"route06": {
|
|
48
|
-
"image": "/images/
|
|
48
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9yb3V0ZTA2LmpwZw==.webp",
|
|
49
49
|
"url": "https://route06.co.jp/"
|
|
50
50
|
},
|
|
51
51
|
"anotherworks": {
|
|
52
|
-
"image": "/images/
|
|
52
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9hbm90aGVyd29ya3Mud2VicA==.webp",
|
|
53
53
|
"url": "https://anotherworks.co.jp/"
|
|
54
54
|
},
|
|
55
55
|
"alpaca": {
|
|
56
|
-
"image": "/images/
|
|
56
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9hbHBhY2EuanBn.webp",
|
|
57
57
|
"url": "https://alpc.tokyo/"
|
|
58
58
|
},
|
|
59
59
|
"black": {
|
|
60
|
-
"image": "/images/
|
|
60
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9ibGFjay5qcGc=.webp",
|
|
61
61
|
"url": "https://by.black/"
|
|
62
62
|
},
|
|
63
63
|
"kakakucom": {
|
|
64
|
-
"image": "/images/
|
|
64
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy90YWJlbG9nLmpwZw==.webp",
|
|
65
65
|
"url": "https://corporate.kakaku.com/"
|
|
66
66
|
},
|
|
67
67
|
"bizreach": {
|
|
68
|
-
"image": "/images/
|
|
68
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9iaXpyZWFjaC5qcGVn.webp",
|
|
69
69
|
"url": "https://www.bizreach.co.jp/"
|
|
70
70
|
},
|
|
71
71
|
"eyesjapan": {
|
|
72
|
-
"image": "/images/
|
|
72
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9leWVzamFwYW4uanBn.webp",
|
|
73
73
|
"url": "https://www.nowhere.co.jp/"
|
|
74
74
|
},
|
|
75
75
|
"cyberagent": {
|
|
76
|
-
"image": "/images/
|
|
76
|
+
"image": "/images/cHVibGljL2NvbXBhbmllcy9jeWJlcmFnZW50LnBuZw==.webp",
|
|
77
77
|
"url": "https://www.cyberagent.co.jp/"
|
|
78
78
|
}
|
|
79
79
|
},
|
package/lib/hatena.mjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get bookmark count from Hatena Bookmark
|
|
3
|
+
* @param {string} entry - URL to get bookmark count for
|
|
4
|
+
* @returns {Promise<number>} Bookmark count
|
|
5
|
+
*/
|
|
6
|
+
export async function getBookmark(entry) {
|
|
7
|
+
try {
|
|
8
|
+
const url = `https://b.hatena.ne.jp/entry/json/${entry}`;
|
|
9
|
+
const res = await fetch(url);
|
|
10
|
+
if (!res.ok) {
|
|
11
|
+
throw new Error(`HTTP error! status: ${res.status}`);
|
|
12
|
+
}
|
|
13
|
+
const data = await res.json();
|
|
14
|
+
return data.count || 0;
|
|
15
|
+
} catch (error) {
|
|
16
|
+
console.error(`Failed to fetch bookmark for ${entry}:`, error);
|
|
17
|
+
return 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
package/lib/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hiroppy",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"packageManager": "pnpm@10.11.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"setup": "corepack enable pnpm",
|
|
24
|
-
"build": "node scripts/index.ts",
|
|
25
|
-
"build:readme": "node scripts/readme.ts",
|
|
26
|
-
"lint": "biome check . --fix",
|
|
24
|
+
"build": "node scripts/index.ts && pnpm lint",
|
|
25
|
+
"build:readme": "node scripts/readme.ts && pnpm lint",
|
|
26
|
+
"lint": "prettier -w './**/*.{md,yml}' && biome check . --fix",
|
|
27
27
|
"reset": "rm -rf generated && mkdir generated && mkdir generated/images",
|
|
28
28
|
"cleanup": "node scripts/cleanup-unused-images.ts",
|
|
29
29
|
"compress:images": "node scripts/compress-images.ts",
|
|
@@ -57,6 +57,8 @@
|
|
|
57
57
|
"@types/node": "22.15.29",
|
|
58
58
|
"cheerio": "1.0.0",
|
|
59
59
|
"emoji-js": "3.8.1",
|
|
60
|
+
"lefthook": "1.11.13",
|
|
61
|
+
"prettier": "3.5.3",
|
|
60
62
|
"sharp": "0.34.2"
|
|
61
63
|
}
|
|
62
64
|
}
|