cici 0.1.1 → 0.2.0
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +13 -13
- package/.next/standalone/.next/app-path-routes-manifest.json +1 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/asset/[...path]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/asset/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/blog/[id]/highlights/[hid]/comments/[cid]/reactions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/blog/[id]/highlights/[hid]/comments/[cid]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/blog/[id]/highlights/[hid]/replies/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/blog/[id]/highlights/[hid]/resolve/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/blog/[id]/highlights/[hid]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/blog/[id]/highlights/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/graphql/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/mile/prompts.body +1 -1
- package/.next/standalone/.next/server/app/api/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/atom.xml/route.js +3 -3
- package/.next/standalone/.next/server/app/atom.xml/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/atom.xml.body +1 -1677
- package/.next/standalone/.next/server/app/blog/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/blog/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/blog/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/blog/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/editor/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/editor/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/memos/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/memos/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/robots.txt/route.js +1 -1
- package/.next/standalone/.next/server/app/rss.xml/route.js +2 -2
- package/.next/standalone/.next/server/app/rss.xml/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/rss.xml.body +1 -227
- package/.next/standalone/.next/server/app/sitemap.xml/route.js +5 -5
- package/.next/standalone/.next/server/app/sitemap.xml.body +5 -101
- package/.next/standalone/.next/server/app/unavailable/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +6 -6
- package/.next/standalone/.next/server/chunks/3464.js +1 -1
- package/.next/standalone/.next/server/chunks/3607.js +1 -1
- package/.next/standalone/.next/server/chunks/719.js +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/package.json +2 -2
- package/.next/standalone/sample-content/blog/hello-cici.md +25 -0
- package/.next/standalone/sample-content/likes.json +1 -0
- package/.next/standalone/sample-content/memos.json +7 -0
- package/.next/standalone/sample-content/site-config.json +18 -0
- package/README.md +17 -1
- package/bin/cici.js +126 -23
- package/package.json +2 -2
- package/.next/standalone/data/assets/1727016079577.jpg +0 -0
- package/.next/standalone/data/assets/images/2024-12-03/1733256504772.jpg +0 -0
- package/.next/standalone/data/assets/images/2024-12-12/.gitkeep +0 -0
- package/.next/standalone/data/assets/images/2024-12-12/1734033798997.png +0 -0
- package/.next/standalone/data/assets/images/2024-12-21/.gitkeep +0 -0
- package/.next/standalone/data/assets/images/2024-12-21/1734785902890.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/.gitkeep +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734990512413.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734991833894.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734993188114.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734993280313.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734993317984.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734993411252.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734993425042.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734993480342.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734993562660.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734993625024.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734993677103.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734993893285.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734993996131.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734994035144.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734994064317.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734994128679.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734994189257.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734994521799.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-23/1734994530669.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-24/.gitkeep +0 -0
- package/.next/standalone/data/assets/images/2024-12-24/1735032434591.jpeg +0 -0
- package/.next/standalone/data/assets/images/2024-12-24/1735068363518.jpeg +0 -0
- package/.next/standalone/data/assets/images/Cofe-app.png +0 -0
- package/.next/standalone/data/blog/.gitkeep +0 -0
- package/.next/standalone/data/blog/2017-summary.md +0 -59
- package/.next/standalone/data/blog/a-complex-web-app-refactor.md +0 -72
- package/.next/standalone/data/blog/a-day-of-remote-worker.md +0 -82
- package/.next/standalone/data/blog/async-action-in-redux.md +0 -257
- package/.next/standalone/data/blog/cofe.md +0 -398
- package/.next/standalone/data/blog/expensee-shortcut-numbers-guide.md +0 -99
- package/.next/standalone/data/blog/first-golang-project-fx.md +0 -113
- package/.next/standalone/data/blog/work-going-index.md +0 -49
- package/.next/standalone/data/blog//344/270/212/346/265/267/345/210/260/351/230/277/345/247/206/346/226/257/347/211/271/344/270/271.md +0 -114
- package/.next/standalone/data/blog//344/272/214/346/234/210/350/221/241/350/220/204/347/211/231/346/270/270/350/256/260.md +0 -107
- package/.next/standalone/data/blog//345/215/216/344/270/272/351/270/277/350/222/231-harmaryos-next-/347/272/277/344/270/213/346/264/273/345/212/250/345/260/217/350/256/260.md +0 -180
- package/.next/standalone/data/blog//345/233/233/346/234/210/347/232/204/345/260/276/345/267/264/351/200/233/345/276/267/345/233/275-/346/237/217/346/236/227.md +0 -76
- package/.next/standalone/data/blog//345/234/250/344/274/246/346/225/246-shoreditch-/345/221/206/344/270/211/345/244/251.md +0 -40
- package/.next/standalone/data/blog//346/204/217/345/244/247/345/210/251/347/275/227/351/251/254/345/244/217/345/244/251/345/233/233/346/227/245/346/270/270.md +0 -59
- package/.next/standalone/data/blog//346/210/221/345/201/232/344/272/206/344/270/200/346/254/276/346/227/205/350/241/214/350/256/260/345/275/225/345/272/224/347/224/250/357/274/232mile.md +0 -40
- package/.next/standalone/data/blog//350/245/277/347/217/255/347/211/231/344/270/203/345/244/251/347/232/204/346/227/205/350/241/214.md +0 -128
- package/.next/standalone/data/blog//351/200/233/351/200/233/346/265/216/345/267/236/345/262/233.md +0 -78
- package/.next/standalone/data/blog-manifest.json +0 -21
- package/.next/standalone/data/highlights/expensee-shortcut-numbers-guide.json +0 -77
- package/.next/standalone/data/likes.json +0 -56
- package/.next/standalone/data/memos.json +0 -1255
- package/.next/standalone/data/site-config.json +0 -22
- /package/.next/standalone/.next/static/{ACh2hmfOOZR7INKDQAX5I → Pl18p4h2shbbqjypPxStc}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{ACh2hmfOOZR7INKDQAX5I → Pl18p4h2shbbqjypPxStc}/_ssgManifest.js +0 -0
- /package/.next/standalone/{data → sample-content/assets}/.gitkeep +0 -0
- /package/.next/standalone/{data/assets/images/2024-12-03 → sample-content/highlights}/.gitkeep +0 -0
|
@@ -2,128 +2,32 @@
|
|
|
2
2
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
3
3
|
<url>
|
|
4
4
|
<loc>https://blog.minghe.me</loc>
|
|
5
|
-
<lastmod>2026-07-
|
|
5
|
+
<lastmod>2026-07-20T22:01:21.388Z</lastmod>
|
|
6
6
|
<changefreq>daily</changefreq>
|
|
7
7
|
<priority>1</priority>
|
|
8
8
|
</url>
|
|
9
9
|
<url>
|
|
10
10
|
<loc>https://blog.minghe.me/blog</loc>
|
|
11
|
-
<lastmod>2026-07-
|
|
11
|
+
<lastmod>2026-07-20T22:01:21.388Z</lastmod>
|
|
12
12
|
<changefreq>daily</changefreq>
|
|
13
13
|
<priority>0.9</priority>
|
|
14
14
|
</url>
|
|
15
15
|
<url>
|
|
16
16
|
<loc>https://blog.minghe.me/memos</loc>
|
|
17
|
-
<lastmod>2026-07-
|
|
17
|
+
<lastmod>2026-07-20T22:01:21.388Z</lastmod>
|
|
18
18
|
<changefreq>daily</changefreq>
|
|
19
19
|
<priority>0.8</priority>
|
|
20
20
|
</url>
|
|
21
21
|
<url>
|
|
22
22
|
<loc>https://blog.minghe.me/editor</loc>
|
|
23
|
-
<lastmod>2026-07-
|
|
23
|
+
<lastmod>2026-07-20T22:01:21.388Z</lastmod>
|
|
24
24
|
<changefreq>weekly</changefreq>
|
|
25
25
|
<priority>0.5</priority>
|
|
26
26
|
</url>
|
|
27
27
|
<url>
|
|
28
28
|
<loc>https://blog.minghe.me/login</loc>
|
|
29
|
-
<lastmod>2026-07-
|
|
29
|
+
<lastmod>2026-07-20T22:01:21.388Z</lastmod>
|
|
30
30
|
<changefreq>monthly</changefreq>
|
|
31
31
|
<priority>0.3</priority>
|
|
32
32
|
</url>
|
|
33
|
-
<url>
|
|
34
|
-
<loc>https://blog.minghe.me/blog/2017-summary</loc>
|
|
35
|
-
<lastmod>2017-12-30T09:20:02.233Z</lastmod>
|
|
36
|
-
<changefreq>weekly</changefreq>
|
|
37
|
-
<priority>0.7</priority>
|
|
38
|
-
</url>
|
|
39
|
-
<url>
|
|
40
|
-
<loc>https://blog.minghe.me/blog/a-complex-web-app-refactor</loc>
|
|
41
|
-
<lastmod>2017-07-05T10:17:04.233Z</lastmod>
|
|
42
|
-
<changefreq>weekly</changefreq>
|
|
43
|
-
<priority>0.7</priority>
|
|
44
|
-
</url>
|
|
45
|
-
<url>
|
|
46
|
-
<loc>https://blog.minghe.me/blog/a-day-of-remote-worker</loc>
|
|
47
|
-
<lastmod>2019-06-09T16:30:26.223Z</lastmod>
|
|
48
|
-
<changefreq>weekly</changefreq>
|
|
49
|
-
<priority>0.7</priority>
|
|
50
|
-
</url>
|
|
51
|
-
<url>
|
|
52
|
-
<loc>https://blog.minghe.me/blog/async-action-in-redux</loc>
|
|
53
|
-
<lastmod>2016-10-17T09:13:34.000Z</lastmod>
|
|
54
|
-
<changefreq>weekly</changefreq>
|
|
55
|
-
<priority>0.7</priority>
|
|
56
|
-
</url>
|
|
57
|
-
<url>
|
|
58
|
-
<loc>https://blog.minghe.me/blog/expensee-shortcut-numbers-guide</loc>
|
|
59
|
-
<lastmod>2026-05-28T10:00:00.000Z</lastmod>
|
|
60
|
-
<changefreq>weekly</changefreq>
|
|
61
|
-
<priority>0.7</priority>
|
|
62
|
-
</url>
|
|
63
|
-
<url>
|
|
64
|
-
<loc>https://blog.minghe.me/blog/first-golang-project-fx</loc>
|
|
65
|
-
<lastmod>2017-10-22T17:42:13.233Z</lastmod>
|
|
66
|
-
<changefreq>weekly</changefreq>
|
|
67
|
-
<priority>0.7</priority>
|
|
68
|
-
</url>
|
|
69
|
-
<url>
|
|
70
|
-
<loc>https://blog.minghe.me/blog/work-going-index</loc>
|
|
71
|
-
<lastmod>2019-05-21T09:43:38.234Z</lastmod>
|
|
72
|
-
<changefreq>weekly</changefreq>
|
|
73
|
-
<priority>0.7</priority>
|
|
74
|
-
</url>
|
|
75
|
-
<url>
|
|
76
|
-
<loc>https://blog.minghe.me/blog/%E4%B8%8A%E6%B5%B7%E5%88%B0%E9%98%BF%E5%A7%86%E6%96%AF%E7%89%B9%E4%B8%B9</loc>
|
|
77
|
-
<lastmod>2024-09-27T17:56:10.267Z</lastmod>
|
|
78
|
-
<changefreq>weekly</changefreq>
|
|
79
|
-
<priority>0.7</priority>
|
|
80
|
-
</url>
|
|
81
|
-
<url>
|
|
82
|
-
<loc>https://blog.minghe.me/blog/%E4%BA%8C%E6%9C%88%E8%91%A1%E8%90%84%E7%89%99%E6%B8%B8%E8%AE%B0</loc>
|
|
83
|
-
<lastmod>2025-02-25T19:42:53.549Z</lastmod>
|
|
84
|
-
<changefreq>weekly</changefreq>
|
|
85
|
-
<priority>0.7</priority>
|
|
86
|
-
</url>
|
|
87
|
-
<url>
|
|
88
|
-
<loc>https://blog.minghe.me/blog/%E5%8D%8E%E4%B8%BA%E9%B8%BF%E8%92%99-harmaryos-next-%E7%BA%BF%E4%B8%8B%E6%B4%BB%E5%8A%A8%E5%B0%8F%E8%AE%B0</loc>
|
|
89
|
-
<lastmod>2024-04-21T05:58:06.454Z</lastmod>
|
|
90
|
-
<changefreq>weekly</changefreq>
|
|
91
|
-
<priority>0.7</priority>
|
|
92
|
-
</url>
|
|
93
|
-
<url>
|
|
94
|
-
<loc>https://blog.minghe.me/blog/%E5%9B%9B%E6%9C%88%E7%9A%84%E5%B0%BE%E5%B7%B4%E9%80%9B%E5%BE%B7%E5%9B%BD-%E6%9F%8F%E6%9E%97</loc>
|
|
95
|
-
<lastmod>2025-04-29T11:44:58.606Z</lastmod>
|
|
96
|
-
<changefreq>weekly</changefreq>
|
|
97
|
-
<priority>0.7</priority>
|
|
98
|
-
</url>
|
|
99
|
-
<url>
|
|
100
|
-
<loc>https://blog.minghe.me/blog/%E5%9C%A8%E4%BC%A6%E6%95%A6-shoreditch-%E5%91%86%E4%B8%89%E5%A4%A9</loc>
|
|
101
|
-
<lastmod>2025-10-06T09:28:06.524Z</lastmod>
|
|
102
|
-
<changefreq>weekly</changefreq>
|
|
103
|
-
<priority>0.7</priority>
|
|
104
|
-
</url>
|
|
105
|
-
<url>
|
|
106
|
-
<loc>https://blog.minghe.me/blog/%E6%84%8F%E5%A4%A7%E5%88%A9%E7%BD%97%E9%A9%AC%E5%A4%8F%E5%A4%A9%E5%9B%9B%E6%97%A5%E6%B8%B8</loc>
|
|
107
|
-
<lastmod>2025-08-14T19:34:28.147Z</lastmod>
|
|
108
|
-
<changefreq>weekly</changefreq>
|
|
109
|
-
<priority>0.7</priority>
|
|
110
|
-
</url>
|
|
111
|
-
<url>
|
|
112
|
-
<loc>https://blog.minghe.me/blog/%E6%88%91%E5%81%9A%E4%BA%86%E4%B8%80%E6%AC%BE%E6%97%85%E8%A1%8C%E8%AE%B0%E5%BD%95%E5%BA%94%E7%94%A8%EF%BC%9Amile</loc>
|
|
113
|
-
<lastmod>2026-01-21T21:30:38.089Z</lastmod>
|
|
114
|
-
<changefreq>weekly</changefreq>
|
|
115
|
-
<priority>0.7</priority>
|
|
116
|
-
</url>
|
|
117
|
-
<url>
|
|
118
|
-
<loc>https://blog.minghe.me/blog/%E8%A5%BF%E7%8F%AD%E7%89%99%E4%B8%83%E5%A4%A9%E7%9A%84%E6%97%85%E8%A1%8C</loc>
|
|
119
|
-
<lastmod>2024-12-24T19:01:37.622Z</lastmod>
|
|
120
|
-
<changefreq>weekly</changefreq>
|
|
121
|
-
<priority>0.7</priority>
|
|
122
|
-
</url>
|
|
123
|
-
<url>
|
|
124
|
-
<loc>https://blog.minghe.me/blog/%E9%80%9B%E9%80%9B%E6%B5%8E%E5%B7%9E%E5%B2%9B</loc>
|
|
125
|
-
<lastmod>2015-06-28T09:20:02.322Z</lastmod>
|
|
126
|
-
<changefreq>weekly</changefreq>
|
|
127
|
-
<priority>0.7</priority>
|
|
128
|
-
</url>
|
|
129
33
|
</urlset>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/unavailable/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"80":{"*":{"id":"41868","name":"*","chunks":[],"async":false}},"3980":{"*":{"id":"94789","name":"*","chunks":[],"async":false}},"4707":{"*":{"id":"79671","name":"*","chunks":[],"async":false}},"12846":{"*":{"id":"12994","name":"*","chunks":[],"async":false}},"14447":{"*":{"id":"34239","name":"*","chunks":[],"async":false}},"16456":{"*":{"id":"13170","name":"*","chunks":[],"async":false}},"19107":{"*":{"id":"96114","name":"*","chunks":[],"async":false}},"28490":{"*":{"id":"93169","name":"*","chunks":[],"async":false}},"36423":{"*":{"id":"84759","name":"*","chunks":[],"async":false}},"37344":{"*":{"id":"92073","name":"*","chunks":[],"async":false}},"51113":{"*":{"id":"27551","name":"*","chunks":[],"async":false}},"59556":{"*":{"id":"77083","name":"*","chunks":[],"async":false}},"61060":{"*":{"id":"9727","name":"*","chunks":[],"async":false}},"63141":{"*":{"id":"78584","name":"*","chunks":[],"async":false}},"63156":{"*":{"id":"41713","name":"*","chunks":[],"async":false}},"65878":{"*":{"id":"92481","name":"*","chunks":[],"async":false}},"72972":{"*":{"id":"79404","name":"*","chunks":[],"async":false}},"75247":{"*":{"id":"80943","name":"*","chunks":[],"async":false}},"75873":{"*":{"id":"52719","name":"*","chunks":[],"async":false}},"81908":{"*":{"id":"18413","name":"*","chunks":[],"async":false}},"87232":{"*":{"id":"72892","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/runner/work/cici/cici/node_modules/next/dist/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/app/globals.css":{"id":47960,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/Analytics.tsx":{"id":75873,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/CreateButton.tsx":{"id":28490,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/EditContext.tsx":{"id":75247,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/SessionProvider.tsx":{"id":63156,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/ui/toaster.tsx":{"id":59556,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next-intl/dist/esm/shared/NextIntlClientProvider.js":{"id":16456,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/font/google/target.css?{\"path\":\"components/ui/font.ts\",\"import\":\"Gowun_Dodum\",\"arguments\":[{\"weight\":\"400\",\"subsets\":[\"latin\"],\"display\":\"swap\"}],\"variableName\":\"gowun_wodum\"}":{"id":91444,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/app/login/page.tsx":{"id":3980,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/app/blog/[id]/component.tsx":{"id":63141,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/discussing/dist/components/Discussion.js":{"id":37344,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/components/BlogList.tsx":{"id":81908,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/components/Editor.tsx":{"id":14447,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/components/GitHubSignInButton.tsx":{"id":51113,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/image-component.js":{"id":65878,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/image-component.js":{"id":65878,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/link.js":{"id":72972,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/link.js":{"id":72972,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/components/MemosList.tsx":{"id":87232,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/home/runner/work/cici/cici/":[],"/home/runner/work/cici/cici/app/layout":["static/css/bf9d0ede562bd061.css","static/css/67e4cfd62ab3f75c.css"],"/home/runner/work/cici/cici/app/page":[],"/home/runner/work/cici/cici/app/unavailable/page":[]}}
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/unavailable/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"80":{"*":{"id":"41868","name":"*","chunks":[],"async":false}},"3980":{"*":{"id":"94789","name":"*","chunks":[],"async":false}},"4707":{"*":{"id":"79671","name":"*","chunks":[],"async":false}},"12846":{"*":{"id":"12994","name":"*","chunks":[],"async":false}},"14447":{"*":{"id":"34239","name":"*","chunks":[],"async":false}},"16456":{"*":{"id":"13170","name":"*","chunks":[],"async":false}},"19107":{"*":{"id":"96114","name":"*","chunks":[],"async":false}},"28490":{"*":{"id":"93169","name":"*","chunks":[],"async":false}},"36423":{"*":{"id":"84759","name":"*","chunks":[],"async":false}},"37344":{"*":{"id":"92073","name":"*","chunks":[],"async":false}},"51113":{"*":{"id":"27551","name":"*","chunks":[],"async":false}},"59556":{"*":{"id":"77083","name":"*","chunks":[],"async":false}},"61060":{"*":{"id":"9727","name":"*","chunks":[],"async":false}},"63141":{"*":{"id":"78584","name":"*","chunks":[],"async":false}},"63156":{"*":{"id":"41713","name":"*","chunks":[],"async":false}},"65878":{"*":{"id":"92481","name":"*","chunks":[],"async":false}},"72972":{"*":{"id":"79404","name":"*","chunks":[],"async":false}},"75247":{"*":{"id":"80943","name":"*","chunks":[],"async":false}},"75873":{"*":{"id":"52719","name":"*","chunks":[],"async":false}},"81908":{"*":{"id":"18413","name":"*","chunks":[],"async":false}},"87232":{"*":{"id":"72892","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/runner/work/cici/cici/node_modules/next/dist/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/app/globals.css":{"id":47960,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/Analytics.tsx":{"id":75873,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/CreateButton.tsx":{"id":28490,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/EditContext.tsx":{"id":75247,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/SessionProvider.tsx":{"id":63156,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/components/ui/toaster.tsx":{"id":59556,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next-intl/dist/esm/shared/NextIntlClientProvider.js":{"id":16456,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/font/google/target.css?{\"path\":\"components/ui/font.ts\",\"import\":\"Gowun_Dodum\",\"arguments\":[{\"weight\":\"400\",\"subsets\":[\"latin\"],\"display\":\"swap\"}],\"variableName\":\"gowun_wodum\"}":{"id":91444,"name":"*","chunks":["310","static/chunks/0e5ce63c-dc8fe6cd5df6dc6f.js","51","static/chunks/795d4814-090707ad3f792458.js","956","static/chunks/ee560e2c-0aeb447bc68f09f5.js","779","static/chunks/0e762574-561b753e40bf5566.js","37","static/chunks/37-4aae6f4051a21b05.js","152","static/chunks/152-16409649f7f42f9f.js","972","static/chunks/972-774fbff93f73f32d.js","343","static/chunks/343-ef3404804cc77cf3.js","153","static/chunks/153-f9c1aae3150e3029.js","185","static/chunks/app/layout-3439dc235234d73d.js"],"async":false},"/home/runner/work/cici/cici/app/login/page.tsx":{"id":3980,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/app/blog/[id]/component.tsx":{"id":63141,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/discussing/dist/components/Discussion.js":{"id":37344,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/components/Editor.tsx":{"id":14447,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/components/GitHubSignInButton.tsx":{"id":51113,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/components/BlogList.tsx":{"id":81908,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/components/MemosList.tsx":{"id":87232,"name":"*","chunks":[],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/image-component.js":{"id":65878,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/image-component.js":{"id":65878,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/client/link.js":{"id":72972,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false},"/home/runner/work/cici/cici/node_modules/next/dist/esm/client/link.js":{"id":72972,"name":"*","chunks":["37","static/chunks/37-4aae6f4051a21b05.js","586","static/chunks/586-51f7e768b82803f6.js","972","static/chunks/972-774fbff93f73f32d.js","878","static/chunks/878-b71984a1ef1b61e8.js","931","static/chunks/app/page-f7dabeade6df80fd.js"],"async":false}},"entryCSSFiles":{"/home/runner/work/cici/cici/":[],"/home/runner/work/cici/cici/app/layout":["static/css/bf9d0ede562bd061.css","static/css/67e4cfd62ab3f75c.css"],"/home/runner/work/cici/cici/app/page":[],"/home/runner/work/cici/cici/app/unavailable/page":[]}}
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
"/_not-found/page": "app/_not-found/page.js",
|
|
3
3
|
"/api/auth/[...nextauth]/route": "app/api/auth/[...nextauth]/route.js",
|
|
4
4
|
"/api/blog/[id]/highlights/[hid]/comments/[cid]/reactions/route": "app/api/blog/[id]/highlights/[hid]/comments/[cid]/reactions/route.js",
|
|
5
|
-
"/api/blog/[id]/highlights/[hid]/comments/[cid]/route": "app/api/blog/[id]/highlights/[hid]/comments/[cid]/route.js",
|
|
6
5
|
"/api/blog/[id]/highlights/[hid]/replies/route": "app/api/blog/[id]/highlights/[hid]/replies/route.js",
|
|
6
|
+
"/api/blog/[id]/highlights/[hid]/comments/[cid]/route": "app/api/blog/[id]/highlights/[hid]/comments/[cid]/route.js",
|
|
7
7
|
"/api/blog/[id]/highlights/[hid]/resolve/route": "app/api/blog/[id]/highlights/[hid]/resolve/route.js",
|
|
8
8
|
"/api/blog/[id]/highlights/[hid]/route": "app/api/blog/[id]/highlights/[hid]/route.js",
|
|
9
9
|
"/api/blog/[id]/highlights/route": "app/api/blog/[id]/highlights/route.js",
|
|
10
10
|
"/api/webhooks/notification/route": "app/api/webhooks/notification/route.js",
|
|
11
|
-
"/login/page": "app/login/page.js",
|
|
12
11
|
"/favicon.ico/route": "app/favicon.ico/route.js",
|
|
12
|
+
"/login/page": "app/login/page.js",
|
|
13
13
|
"/robots.txt/route": "app/robots.txt/route.js",
|
|
14
14
|
"/unavailable/page": "app/unavailable/page.js",
|
|
15
15
|
"/api/asset/[...path]/route": "app/api/asset/[...path]/route.js",
|
|
16
16
|
"/api/upload/route": "app/api/upload/route.js",
|
|
17
17
|
"/blog/[id]/page": "app/blog/[id]/page.js",
|
|
18
|
-
"/blog/page": "app/blog/page.js",
|
|
19
18
|
"/api/mile/prompts/route": "app/api/mile/prompts/route.js",
|
|
20
19
|
"/atom.xml/route": "app/atom.xml/route.js",
|
|
21
20
|
"/editor/page": "app/editor/page.js",
|
|
22
|
-
"/page": "app/page.js",
|
|
21
|
+
"/blog/page": "app/blog/page.js",
|
|
23
22
|
"/memos/page": "app/memos/page.js",
|
|
24
|
-
"/
|
|
23
|
+
"/page": "app/page.js",
|
|
25
24
|
"/rss.xml/route": "app/rss.xml/route.js",
|
|
26
|
-
"/sitemap.xml/route": "app/sitemap.xml/route.js"
|
|
25
|
+
"/sitemap.xml/route": "app/sitemap.xml/route.js",
|
|
26
|
+
"/api/graphql/route": "app/api/graphql/route.js"
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
exports.id=3464,exports.ids=[3464],exports.modules={86092:(e,t,r)=>{var s={"./ar.json":[71230,1230],"./de.json":[28224,8224],"./en.json":[72581,2581],"./es.json":[38038,8038],"./fr.json":[67990,7990],"./hi.json":[53573,3573],"./id.json":[41450,1450],"./it.json":[31446,1446],"./ja.json":[48398,8398],"./ko.json":[67937,7937],"./nl.json":[27667,7667],"./pl.json":[39627,9627],"./pt.json":[99600,9600],"./ru.json":[61536,1536],"./th.json":[88198,8198],"./tr.json":[97674,7674],"./vi.json":[44742,4742],"./zh-HK.json":[14857,4857],"./zh-TW.json":[73125,3125],"./zh.json":[18195,8195]};function o(e){if(!r.o(s,e))return Promise.resolve().then(()=>{var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=s[e],o=t[0];return r.e(t[1]).then(()=>r.t(o,19))}o.keys=()=>Object.keys(s),o.id=86092,e.exports=o},15692:(e,t,r)=>{Promise.resolve().then(r.bind(r,52719)),Promise.resolve().then(r.bind(r,93169)),Promise.resolve().then(r.bind(r,80943)),Promise.resolve().then(r.bind(r,41713)),Promise.resolve().then(r.bind(r,77083)),Promise.resolve().then(r.bind(r,13170))},2028:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,12994,23)),Promise.resolve().then(r.t.bind(r,96114,23)),Promise.resolve().then(r.t.bind(r,9727,23)),Promise.resolve().then(r.t.bind(r,79671,23)),Promise.resolve().then(r.t.bind(r,41868,23)),Promise.resolve().then(r.t.bind(r,84759,23))},52719:(e,t,r)=>{"use strict";r.d(t,{M:()=>n,default:()=>a});var s=r(10326),o=r(96931);function a({websiteId:e=process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID,scriptUrl:t=process.env.NEXT_PUBLIC_UMAMI_SCRIPT_URL||"https://cloud.umami.is/script.js",domains:r=process.env.NEXT_PUBLIC_UMAMI_DOMAINS?.split(",")||[],enabled:a="true"===process.env.NEXT_PUBLIC_ANALYTICS_ENABLED}={}){return a&&e?s.jsx(s.Fragment,{children:s.jsx(o.default,{src:t,"data-website-id":e,"data-domains":r.length>0?r.join(","):void 0,strategy:"afterInteractive",onLoad:()=>{},onError:e=>{console.error("❌ Failed to load Umami Analytics:",e)}})}):null}function n(){return(e,t)=>{}}r(17577)},93169:(e,t,r)=>{"use strict";r.d(t,{default:()=>d});var s=r(10326),o=r(71473),a=r(27551),n=r(90434),i=r(35047),c=r(80943);function d({messages:e}){let t=(0,i.usePathname)();return(0,c.$)()?(0,s.jsxs)(n.default,{href:"/blog"===t?"/editor?type=blog":"/editor?type=memo",className:"fixed bottom-9 right-9 p-2 bg-primary text-primary-foreground hover:bg-primary/90 rounded-full shadow-lg z-20 flex items-center justify-center",children:[s.jsx(o.OvN,{className:"w-6 h-6"}),s.jsx("span",{className:"sr-only",children:"/"===t||"/memos"===t?e.createNewMemo:e.createNewBlogPost})]}):s.jsx("div",{className:"fixed bottom-9 right-9 z-20",children:s.jsx(a.default,{})})}},80943:(e,t,r)=>{"use strict";r.d(t,{$:()=>i,EditProvider:()=>n});var s=r(10326),o=r(17577);let a=(0,o.createContext)(!1);function n({canEdit:e,children:t}){return s.jsx(a.Provider,{value:e,children:t})}function i(){return(0,o.useContext)(a)}},27551:(e,t,r)=>{"use strict";r.d(t,{default:()=>i});var s=r(10326),o=r(77109),a=r(90772),n=r(12893);let i=()=>s.jsx(a.z,{onClick:()=>(0,o.signIn)("github"),className:"rounded-full w-12 h-12 p-0 flex items-center justify-center",children:s.jsx(n.Z,{className:"h-5 w-5"})})},41713:(e,t,r)=>{"use strict";r.d(t,{SessionProvider:()=>a});var s=r(10326),o=r(77109);function a({children:e}){return s.jsx(o.SessionProvider,{children:e})}},90772:(e,t,r)=>{"use strict";r.d(t,{z:()=>d});var s=r(10326),o=r(17577),a=r(34214),n=r(28671),i=r(77863);let c=(0,n.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),d=o.forwardRef(({className:e,variant:t,size:r,asChild:o=!1,...n},d)=>{let l=o?a.g7:"button";return s.jsx(l,{className:(0,i.cn)(c({variant:t,size:r,className:e})),ref:d,...n})});d.displayName="Button"},77083:(e,t,r)=>{"use strict";r.d(t,{Toaster:()=>w});var s=r(10326),o=r(34789),a=r(17577),n=r(76812),i=r(99556),c=r(28671),d=r(77863);let l=i.zt,u=a.forwardRef(({className:e,...t},r)=>s.jsx(i.l_,{ref:r,className:(0,d.cn)("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));u.displayName=i.l_.displayName;let m=(0,c.j)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),p=a.forwardRef(({className:e,variant:t,...r},o)=>s.jsx(i.fC,{ref:o,className:(0,d.cn)(m({variant:t}),e),...r}));p.displayName=i.fC.displayName,a.forwardRef(({className:e,...t},r)=>s.jsx(i.aU,{ref:r,className:(0,d.cn)("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t})).displayName=i.aU.displayName;let h=a.forwardRef(({className:e,...t},r)=>s.jsx(i.x8,{ref:r,className:(0,d.cn)("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsx(n.Pxu,{className:"h-4 w-4"})}));h.displayName=i.x8.displayName;let f=a.forwardRef(({className:e,...t},r)=>s.jsx(i.Dx,{ref:r,className:(0,d.cn)("text-sm font-semibold [&+div]:text-xs",e),...t}));f.displayName=i.Dx.displayName;let g=a.forwardRef(({className:e,...t},r)=>s.jsx(i.dk,{ref:r,className:(0,d.cn)("text-sm opacity-90",e),...t}));g.displayName=i.dk.displayName;var v=r(33771),x=r(94835);function w(){let{toasts:e}=(0,o.pm)();return(0,s.jsxs)(l,{children:[e.map(function({id:e,title:t,description:r,action:o,...a}){let{variant:n}=a;return(0,s.jsxs)(p,{...a,children:[(0,s.jsxs)("div",{className:"gap-2",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:["destructive"===n?s.jsx(x.vVM,{}):s.jsx(v.N9r,{className:"fill-emerald-500"}),t&&s.jsx(f,{children:t})]}),r&&s.jsx(g,{children:r})]}),o,s.jsx(h,{})]},e)}),s.jsx(u,{})]})}},34789:(e,t,r)=>{"use strict";r.d(t,{pm:()=>m});var s=r(17577);let o=0,a=new Map,n=e=>{if(a.has(e))return;let t=setTimeout(()=>{a.delete(e),l({type:"REMOVE_TOAST",toastId:e})},3e3);a.set(e,t)},i=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?n(r):e.toasts.forEach(e=>{n(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},c=[],d={toasts:[]};function l(e){d=i(d,e),c.forEach(e=>{e(d)})}function u({...e}){let t=(o=(o+1)%Number.MAX_VALUE).toString(),r=()=>l({type:"DISMISS_TOAST",toastId:t});return l({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:e=>l({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function m(){let[e,t]=s.useState(d);return s.useEffect(()=>(c.push(t),()=>{let e=c.indexOf(t);e>-1&&c.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>l({type:"DISMISS_TOAST",toastId:e})}}},77863:(e,t,r)=>{"use strict";r.d(t,{cn:()=>a,y4:()=>n});var s=r(41135),o=r(31009);function a(...e){return(0,o.m6)((0,s.W)(e))}function n(e){if(e.startsWith("2000-01-01T00:00:00"))return"date unknown";let t=new Date(e);if(isNaN(t.getTime()))return"invalid date";let r=String(t.getDate()).padStart(2,"0"),s=String(t.getMonth()+1).padStart(2,"0"),o=t.getFullYear();return`${r}/${s}/${o}`}},72096:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S,generateMetadata:()=>j});var s=r(19510);r(67272);var o=r(91622),a=r(75031),n=r(68570);let i=(0,n.createProxy)(String.raw`/home/runner/work/cici/cici/components/CreateButton.tsx#default`);var c=r(54365),d=r.n(c),l=r(35139);let u=(0,n.createProxy)(String.raw`/home/runner/work/cici/cici/components/SessionProvider.tsx#SessionProvider`),m=(0,n.createProxy)(String.raw`/home/runner/work/cici/cici/components/EditContext.tsx#EditProvider`);(0,n.createProxy)(String.raw`/home/runner/work/cici/cici/components/EditContext.tsx#useCanEdit`);let p=(0,n.createProxy)(String.raw`/home/runner/work/cici/cici/components/ui/toaster.tsx#Toaster`);var h=r(90455),f=r(63607),g=r(82575),v=r(45609),x=r(66841),w=r.n(x),b=r(97467);let y=(0,n.createProxy)(String.raw`/home/runner/work/cici/cici/components/Analytics.tsx#default`);async function j(){let e=await (0,v.getServerSession)(h.L),t=await (0,f.VH)(e?.accessToken).getSiteConfig()??(0,b.Z)(),r=t.title,s=t.description,{iconPath:o}=await N(e?.accessToken);return{title:r,description:s,keywords:t.keywords,authors:[{name:t.author.name}],creator:t.author.name,publisher:t.author.name,manifest:"/manifest.json",openGraph:{title:r,description:s,images:[{url:o,width:512,height:512,alt:"App Logo"}],type:"website",siteName:t.title,locale:"en_US"},twitter:{card:"summary_large_image",title:r,description:s,images:[o],creator:`@${t.social.twitter}`,site:`@${t.social.twitter}`}}}async function S({children:e}){let t=await (0,o.Z)(),r=await (0,a.Z)(),n=await (0,v.getServerSession)(h.L),c=(0,f.VH)(n?.accessToken).canWrite(),{iconPath:g}=await N(n?.accessToken);return(0,s.jsxs)("html",{lang:t,children:[(0,s.jsxs)(d(),{children:[s.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, viewport-fit=cover"}),s.jsx("meta",{name:"apple-mobile-web-app-capable",content:"yes"}),s.jsx("meta",{name:"apple-mobile-web-app-status-bar-style",content:"default"}),s.jsx("link",{rel:"apple-touch-icon",href:g})]}),s.jsx(y,{}),s.jsx("body",{className:`${w().className} bg-[#f6f8fa]`,children:s.jsx(l.Z,{messages:r,children:s.jsx(u,{children:(0,s.jsxs)(m,{canEdit:c,children:[s.jsx("main",{className:"pb-20 m-auto",children:e}),s.jsx(i,{messages:r}),s.jsx(p,{})]})})})})]})}async function N(e){return e?await (0,g.CR)(e):{iconPath:"/icon.jpg",appleTouchIconPath:"/icon-144.jpg"}}(0,n.createProxy)(String.raw`/home/runner/work/cici/cici/components/Analytics.tsx#useUmamiTracking`),(0,n.createProxy)(String.raw`/home/runner/work/cici/cici/components/Analytics.tsx#useUmamiPageView`)},16013:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var s=r(30107),o=r(71615);let a=(0,s.Z)(async()=>{let e=(0,o.headers)().get("Accept-Language"),t=e?e.split(",")[0]:"en";t.startsWith("zh")?"zh-TW"===t||"zh-HK"===t||(t="zh"):t=t.split("-")[0];let s=["en","zh","zh-TW","zh-HK","ja","ko","fr","de","es","pt","ru","ar","hi","it","nl","tr","pl","vi","th","id"].includes(t)?t:"en";return{locale:s,messages:(await r(86092)(`./${s}.json`)).default}})},90455:(e,t,r)=>{"use strict";r.d(t,{G:()=>o,L:()=>a});var s=r(45609);async function o(){let e=await (0,s.getServerSession)(a);return e?(e.accessToken?console.log("Session found with access token"):console.log("Session found, but no access token"),e):(console.log("No session found"),null)}let a={providers:[(0,r(77210).Z)({clientId:process.env.GITHUB_ID,clientSecret:process.env.GITHUB_SECRET,authorization:{params:{scope:"public_repo workflow"}}})],callbacks:{async jwt({token:e,account:t,profile:r}){t&&t.access_token&&(e.accessToken=t.access_token);let s=r&&"object"==typeof r&&"login"in r?r.login:void 0,o=t&&"object"==typeof t&&"username"in t?t.username:void 0;return(s||o)&&(e.username=s??o),e},session:async({session:e,token:t})=>(e.accessToken=t.accessToken,e.user&&(e.user.username=t.username),e)},secret:process.env.NEXTAUTH_SECRET,debug:!1}},97467:(e,t,r)=>{"use strict";r.d(t,{q:()=>n,Z:()=>a});let s=JSON.parse('{"title":"Minghe\'s Blog","description":"Minghe\'s personal blog sharing travel experiences across Europe and Asia, tech insights, and daily thoughts. Built with GitHub-powered markdown writing.","author":{"name":"Minghe","bio":"Software engineer and travel enthusiast sharing experiences from around the world","location":"Europe/Asia"},"keywords":["travel","tech","blog","europe","asia","software","programming"],"social":{"github":"metrue","twitter":"_metrue"},"links":{"github.com":"http://github.com/metrue","x.com":"https://x.com/_metrue","linkedin.com":"https://www.linkedin.com/in/huang-minghe-41ab563a","xiaohongshu.com":"https://www.xiaohongshu.com/user/profile/584ac1216a6a6968d037c0a4e","podcasts.apple.com":"https://podcasts.apple.com/nl/podcast/%E8%A5%BF%E6%9F%9A%E8%AF%BE%E9%97%B4/id1787276981","xiaoyuzhoufm.com":"https://www.xiaoyuzhoufm.com/podcast/63f9f6ec75918da323982e2c"}}');var o=r(71615);function a(){return s}function n(){try{let e=(0,o.headers)(),t=e.get("host"),r=e.get("x-forwarded-proto")||"http";if(t)return`${r}://${t}`}catch(e){console.warn("Could not get dynamic base URL, falling back to default:",e)}return"https://blog.minghe.me"}},67272:()=>{}};
|
|
1
|
+
exports.id=3464,exports.ids=[3464],exports.modules={86092:(e,t,r)=>{var s={"./ar.json":[71230,1230],"./de.json":[28224,8224],"./en.json":[72581,2581],"./es.json":[38038,8038],"./fr.json":[67990,7990],"./hi.json":[53573,3573],"./id.json":[41450,1450],"./it.json":[31446,1446],"./ja.json":[48398,8398],"./ko.json":[67937,7937],"./nl.json":[27667,7667],"./pl.json":[39627,9627],"./pt.json":[99600,9600],"./ru.json":[61536,1536],"./th.json":[88198,8198],"./tr.json":[97674,7674],"./vi.json":[44742,4742],"./zh-HK.json":[14857,4857],"./zh-TW.json":[73125,3125],"./zh.json":[18195,8195]};function o(e){if(!r.o(s,e))return Promise.resolve().then(()=>{var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=s[e],o=t[0];return r.e(t[1]).then(()=>r.t(o,19))}o.keys=()=>Object.keys(s),o.id=86092,e.exports=o},15692:(e,t,r)=>{Promise.resolve().then(r.bind(r,52719)),Promise.resolve().then(r.bind(r,93169)),Promise.resolve().then(r.bind(r,80943)),Promise.resolve().then(r.bind(r,41713)),Promise.resolve().then(r.bind(r,77083)),Promise.resolve().then(r.bind(r,13170))},2028:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,12994,23)),Promise.resolve().then(r.t.bind(r,96114,23)),Promise.resolve().then(r.t.bind(r,9727,23)),Promise.resolve().then(r.t.bind(r,79671,23)),Promise.resolve().then(r.t.bind(r,41868,23)),Promise.resolve().then(r.t.bind(r,84759,23))},52719:(e,t,r)=>{"use strict";r.d(t,{M:()=>a,default:()=>n});var s=r(10326),o=r(96931);function n({websiteId:e=process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID,scriptUrl:t=process.env.NEXT_PUBLIC_UMAMI_SCRIPT_URL||"https://cloud.umami.is/script.js",domains:r=process.env.NEXT_PUBLIC_UMAMI_DOMAINS?.split(",")||[],enabled:n="true"===process.env.NEXT_PUBLIC_ANALYTICS_ENABLED}={}){return n&&e?s.jsx(s.Fragment,{children:s.jsx(o.default,{src:t,"data-website-id":e,"data-domains":r.length>0?r.join(","):void 0,strategy:"afterInteractive",onLoad:()=>{},onError:e=>{console.error("❌ Failed to load Umami Analytics:",e)}})}):null}function a(){return(e,t)=>{}}r(17577)},93169:(e,t,r)=>{"use strict";r.d(t,{default:()=>d});var s=r(10326),o=r(71473),n=r(27551),a=r(90434),i=r(35047),c=r(80943);function d({messages:e}){let t=(0,i.usePathname)();return(0,c.$)()?(0,s.jsxs)(a.default,{href:"/blog"===t?"/editor?type=blog":"/editor?type=memo",className:"fixed bottom-9 right-9 p-2 bg-primary text-primary-foreground hover:bg-primary/90 rounded-full shadow-lg z-20 flex items-center justify-center",children:[s.jsx(o.OvN,{className:"w-6 h-6"}),s.jsx("span",{className:"sr-only",children:"/"===t||"/memos"===t?e.createNewMemo:e.createNewBlogPost})]}):s.jsx("div",{className:"fixed bottom-9 right-9 z-20",children:s.jsx(n.default,{})})}},80943:(e,t,r)=>{"use strict";r.d(t,{$:()=>i,EditProvider:()=>a});var s=r(10326),o=r(17577);let n=(0,o.createContext)(!1);function a({canEdit:e,children:t}){return s.jsx(n.Provider,{value:e,children:t})}function i(){return(0,o.useContext)(n)}},27551:(e,t,r)=>{"use strict";r.d(t,{default:()=>i});var s=r(10326),o=r(77109),n=r(90772),a=r(12893);let i=()=>s.jsx(n.z,{onClick:()=>(0,o.signIn)("github"),className:"rounded-full w-12 h-12 p-0 flex items-center justify-center",children:s.jsx(a.Z,{className:"h-5 w-5"})})},41713:(e,t,r)=>{"use strict";r.d(t,{SessionProvider:()=>n});var s=r(10326),o=r(77109);function n({children:e}){return s.jsx(o.SessionProvider,{children:e})}},90772:(e,t,r)=>{"use strict";r.d(t,{z:()=>d});var s=r(10326),o=r(17577),n=r(34214),a=r(28671),i=r(77863);let c=(0,a.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),d=o.forwardRef(({className:e,variant:t,size:r,asChild:o=!1,...a},d)=>{let l=o?n.g7:"button";return s.jsx(l,{className:(0,i.cn)(c({variant:t,size:r,className:e})),ref:d,...a})});d.displayName="Button"},77083:(e,t,r)=>{"use strict";r.d(t,{Toaster:()=>w});var s=r(10326),o=r(34789),n=r(17577),a=r(76812),i=r(99556),c=r(28671),d=r(77863);let l=i.zt,u=n.forwardRef(({className:e,...t},r)=>s.jsx(i.l_,{ref:r,className:(0,d.cn)("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));u.displayName=i.l_.displayName;let m=(0,c.j)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),p=n.forwardRef(({className:e,variant:t,...r},o)=>s.jsx(i.fC,{ref:o,className:(0,d.cn)(m({variant:t}),e),...r}));p.displayName=i.fC.displayName,n.forwardRef(({className:e,...t},r)=>s.jsx(i.aU,{ref:r,className:(0,d.cn)("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t})).displayName=i.aU.displayName;let f=n.forwardRef(({className:e,...t},r)=>s.jsx(i.x8,{ref:r,className:(0,d.cn)("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsx(a.Pxu,{className:"h-4 w-4"})}));f.displayName=i.x8.displayName;let h=n.forwardRef(({className:e,...t},r)=>s.jsx(i.Dx,{ref:r,className:(0,d.cn)("text-sm font-semibold [&+div]:text-xs",e),...t}));h.displayName=i.Dx.displayName;let g=n.forwardRef(({className:e,...t},r)=>s.jsx(i.dk,{ref:r,className:(0,d.cn)("text-sm opacity-90",e),...t}));g.displayName=i.dk.displayName;var v=r(33771),x=r(94835);function w(){let{toasts:e}=(0,o.pm)();return(0,s.jsxs)(l,{children:[e.map(function({id:e,title:t,description:r,action:o,...n}){let{variant:a}=n;return(0,s.jsxs)(p,{...n,children:[(0,s.jsxs)("div",{className:"gap-2",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:["destructive"===a?s.jsx(x.vVM,{}):s.jsx(v.N9r,{className:"fill-emerald-500"}),t&&s.jsx(h,{children:t})]}),r&&s.jsx(g,{children:r})]}),o,s.jsx(f,{})]},e)}),s.jsx(u,{})]})}},34789:(e,t,r)=>{"use strict";r.d(t,{pm:()=>m});var s=r(17577);let o=0,n=new Map,a=e=>{if(n.has(e))return;let t=setTimeout(()=>{n.delete(e),l({type:"REMOVE_TOAST",toastId:e})},3e3);n.set(e,t)},i=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?a(r):e.toasts.forEach(e=>{a(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},c=[],d={toasts:[]};function l(e){d=i(d,e),c.forEach(e=>{e(d)})}function u({...e}){let t=(o=(o+1)%Number.MAX_VALUE).toString(),r=()=>l({type:"DISMISS_TOAST",toastId:t});return l({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:e=>l({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function m(){let[e,t]=s.useState(d);return s.useEffect(()=>(c.push(t),()=>{let e=c.indexOf(t);e>-1&&c.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>l({type:"DISMISS_TOAST",toastId:e})}}},77863:(e,t,r)=>{"use strict";r.d(t,{cn:()=>n,y4:()=>a});var s=r(41135),o=r(31009);function n(...e){return(0,o.m6)((0,s.W)(e))}function a(e){if(e.startsWith("2000-01-01T00:00:00"))return"date unknown";let t=new Date(e);if(isNaN(t.getTime()))return"invalid date";let r=String(t.getDate()).padStart(2,"0"),s=String(t.getMonth()+1).padStart(2,"0"),o=t.getFullYear();return`${r}/${s}/${o}`}},72096:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S,generateMetadata:()=>j});var s=r(19510);r(67272);var o=r(91622),n=r(75031),a=r(68570);let i=(0,a.createProxy)(String.raw`/home/runner/work/cici/cici/components/CreateButton.tsx#default`);var c=r(54365),d=r.n(c),l=r(35139);let u=(0,a.createProxy)(String.raw`/home/runner/work/cici/cici/components/SessionProvider.tsx#SessionProvider`),m=(0,a.createProxy)(String.raw`/home/runner/work/cici/cici/components/EditContext.tsx#EditProvider`);(0,a.createProxy)(String.raw`/home/runner/work/cici/cici/components/EditContext.tsx#useCanEdit`);let p=(0,a.createProxy)(String.raw`/home/runner/work/cici/cici/components/ui/toaster.tsx#Toaster`);var f=r(90455),h=r(63607),g=r(82575),v=r(45609),x=r(66841),w=r.n(x),b=r(94706);let y=(0,a.createProxy)(String.raw`/home/runner/work/cici/cici/components/Analytics.tsx#default`);async function j(){let e=await (0,v.getServerSession)(f.L),t=await (0,h.VH)(e?.accessToken).getSiteConfig()??(0,b.Z)(),r=t.title,s=t.description,{iconPath:o}=await N(e?.accessToken);return{title:r,description:s,keywords:t.keywords,authors:[{name:t.author.name}],creator:t.author.name,publisher:t.author.name,manifest:"/manifest.json",openGraph:{title:r,description:s,images:[{url:o,width:512,height:512,alt:"App Logo"}],type:"website",siteName:t.title,locale:"en_US"},twitter:{card:"summary_large_image",title:r,description:s,images:[o],creator:`@${t.social.twitter}`,site:`@${t.social.twitter}`}}}async function S({children:e}){let t=await (0,o.Z)(),r=await (0,n.Z)(),a=await (0,v.getServerSession)(f.L),c=(0,h.VH)(a?.accessToken).canWrite(),{iconPath:g}=await N(a?.accessToken);return(0,s.jsxs)("html",{lang:t,children:[(0,s.jsxs)(d(),{children:[s.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, viewport-fit=cover"}),s.jsx("meta",{name:"apple-mobile-web-app-capable",content:"yes"}),s.jsx("meta",{name:"apple-mobile-web-app-status-bar-style",content:"default"}),s.jsx("link",{rel:"apple-touch-icon",href:g})]}),s.jsx(y,{}),s.jsx("body",{className:`${w().className} bg-[#f6f8fa]`,children:s.jsx(l.Z,{messages:r,children:s.jsx(u,{children:(0,s.jsxs)(m,{canEdit:c,children:[s.jsx("main",{className:"pb-20 m-auto",children:e}),s.jsx(i,{messages:r}),s.jsx(p,{})]})})})})]})}async function N(e){return e?await (0,g.CR)(e):{iconPath:"/icon.jpg",appleTouchIconPath:"/icon-144.jpg"}}(0,a.createProxy)(String.raw`/home/runner/work/cici/cici/components/Analytics.tsx#useUmamiTracking`),(0,a.createProxy)(String.raw`/home/runner/work/cici/cici/components/Analytics.tsx#useUmamiPageView`)},16013:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});var s=r(30107),o=r(71615);let n=(0,s.Z)(async()=>{let e=(0,o.headers)().get("Accept-Language"),t=e?e.split(",")[0]:"en";t.startsWith("zh")?"zh-TW"===t||"zh-HK"===t||(t="zh"):t=t.split("-")[0];let s=["en","zh","zh-TW","zh-HK","ja","ko","fr","de","es","pt","ru","ar","hi","it","nl","tr","pl","vi","th","id"].includes(t)?t:"en";return{locale:s,messages:(await r(86092)(`./${s}.json`)).default}})},90455:(e,t,r)=>{"use strict";r.d(t,{G:()=>o,L:()=>n});var s=r(45609);async function o(){let e=await (0,s.getServerSession)(n);return e?(e.accessToken?console.log("Session found with access token"):console.log("Session found, but no access token"),e):(console.log("No session found"),null)}let n={providers:[(0,r(77210).Z)({clientId:process.env.GITHUB_ID,clientSecret:process.env.GITHUB_SECRET,authorization:{params:{scope:"public_repo workflow"}}})],callbacks:{async jwt({token:e,account:t,profile:r}){t&&t.access_token&&(e.accessToken=t.access_token);let s=r&&"object"==typeof r&&"login"in r?r.login:void 0,o=t&&"object"==typeof t&&"username"in t?t.username:void 0;return(s||o)&&(e.username=s??o),e},session:async({session:e,token:t})=>(e.accessToken=t.accessToken,e.user&&(e.user.username=t.username),e)},secret:process.env.NEXTAUTH_SECRET,debug:!1}},94706:(e,t,r)=>{"use strict";r.d(t,{q:()=>a,Z:()=>n});let s=JSON.parse('{"title":"cici","description":"A git-backed blog and memo app that just works. Write posts and memos in Markdown, stored in your own repo and always in version control.","author":{"name":"Your Name","bio":"A short bio about yourself goes here.","location":"Somewhere on Earth"},"keywords":["blog","memo","markdown","github","cici"],"social":{"github":"your-github-username","twitter":"your_twitter_handle"},"links":{"github.com":"https://github.com/your-github-username","x.com":"https://x.com/your_twitter_handle"}}');var o=r(71615);function n(){return s}function a(){try{let e=(0,o.headers)(),t=e.get("host"),r=e.get("x-forwarded-proto")||"http";if(t)return`${r}://${t}`}catch(e){console.warn("Could not get dynamic base URL, falling back to default:",e)}return"https://blog.minghe.me"}},67272:()=>{}};
|
|
@@ -11,4 +11,4 @@ title: ${t}
|
|
|
11
11
|
date: ${e}
|
|
12
12
|
${l}${a}${o}---
|
|
13
13
|
|
|
14
|
-
${r}`}function n(t){let e=t.match(/date:\s*(.+)/);return e?e[1]:void 0}function o(t){let e=t.match(/status:\s*(.+)/);return e?e[1].trim():void 0}r.d(e,{Mv:()=>o,X4:()=>s,gk:()=>i,xr:()=>n})},31470:(t,e,r)=>{r.d(e,{Bf:()=>s,CT:()=>o});let i="data",s={rootKeep:()=>".gitkeep",blogDir:()=>"blog",blogDirKeep:()=>"blog/.gitkeep",blogPost:t=>`blog/${t}.md`,blogFile:t=>`blog/${t}`,blogManifest:()=>"blog-manifest.json",memos:()=>"memos.json",likes:()=>"likes.json",siteConfig:()=>"site-config.json",highlightsDir:()=>"highlights",highlightsFile:t=>`highlights/${t}.json`},n=t=>`${i}/${t}`,o={root:()=>i,rootKeep:()=>n(s.rootKeep()),blogDir:()=>n(s.blogDir()),blogDirKeep:()=>n(s.blogDirKeep()),blogPost:t=>n(s.blogPost(t)),blogFile:t=>n(s.blogFile(t)),blogManifest:()=>n(s.blogManifest()),memos:()=>n(s.memos()),likes:()=>n(s.likes()),siteConfig:()=>n(s.siteConfig()),highlightsDir:()=>n(s.highlightsDir()),highlightsFile:t=>n(s.highlightsFile(t))}},82575:(t,e,r)=>{r.d(e,{I7:()=>f,XD:()=>p,CR:()=>y,Kx:()=>m,Ix:()=>w});var i=r(94545),s=r(31470);async function n(t,e,r){try{let n;let o=new i.v({auth:t}),{data:a}=await o.repos.getContent({owner:e,repo:r,path:s.CT.blogDir()});if(!Array.isArray(a)){console.error("Expected array of files but got:",typeof a);return}let l=a.filter(t=>"file"===t.type&&t.name.endsWith(".md")&&".gitkeep"!==t.name).map(t=>t.name).sort();try{let{data:t}=await o.repos.getContent({owner:e,repo:r,path:s.CT.blogManifest()});!Array.isArray(t)&&"sha"in t&&(n=t.sha)}catch(t){console.log("Blog manifest does not exist yet, will create it")}await o.repos.createOrUpdateFileContents({owner:e,repo:r,path:s.CT.blogManifest(),message:"Update blog manifest",content:Buffer.from(JSON.stringify({files:l},null,2)).toString("base64"),sha:n}),console.log("Blog manifest updated successfully with",l.length,"files")}catch(t){console.error("Failed to update blog manifest:",t)}}var o=r(42491),a=r(55315),l=r.n(a),c=r(45854);let u="cici";async function g(t,e,r){try{let{data:i}=await t.repos.get({owner:e,repo:r});if(!i.description){let{data:i}=await t.users.getAuthenticated(),s=i.login;await t.repos.update({owner:e,repo:r,description:`https://tinymind.me/${s}`}),console.log(`Updated repository description to https://tinymind.me/${s}`)}}catch(e){if((0,c.XD)(e))await t.repos.createForAuthenticatedUser({name:r,auto_init:!0}),console.log(`Created new repository: ${r}`);else throw e}try{let{data:i}=await t.repos.getContent({owner:e,repo:r,path:"README.md"});if(console.log("README content:",i),"content"in i){let s=Buffer.from(i.content,"base64").toString("utf-8");console.log("README Decoded content:",s.trim()),(""===s.trim()||"# tinymind-blog"===s.trim())&&(await t.repos.createOrUpdateFileContents({owner:e,repo:r,path:"README.md",message:"Update README.md with default content",content:Buffer.from("# cici Blog\n\nWrite blog posts and memos at https://tinymind.me with data stored on GitHub.").toString("base64"),sha:i.sha}),console.log("README.md updated with default content"))}}catch(i){if(i instanceof Error&&"status"in i&&404===i.status){let i=Buffer.from("Write blog posts and memos at https://tinymind.me with data stored on GitHub.").toString("base64");await t.repos.createOrUpdateFileContents({owner:e,repo:r,path:"README.md",message:"Initial commit: Add README.md",content:i})}else throw i}}async function d(t,e,r){try{await (0,c.QF)(t,e,r,s.CT.rootKeep(),"Initialize content directory",""),await (0,c.QF)(t,e,r,s.CT.blogDirKeep(),"Initialize blog directory",""),await (0,c.QF)(t,e,r,s.CT.memos(),"Initialize memos.json","[]")}catch(t){throw console.error("Error ensuring content structure:",t),t}}async function h(t,e,r){await g(t,e,r),await d(t,e,r)}async function f(t,e,r,i=[],a,l="published",u){let g=(0,c.Pe)(r),{owner:d,repo:f}=u??await (0,c.rP)(r);await h(g,d,f);let p=`${(0,o.gk)(t)}.md`,m=s.CT.blogFile(p),w=(0,o.X4)({title:t,date:new Date().toISOString(),content:e,status:l,location:a,discussions:i});await g.repos.createOrUpdateFileContents({owner:d,repo:f,path:m,message:`Add blog post: ${t}`,content:Buffer.from(w).toString("base64")}),await n(r,d,f)}async function p(t,e,r){if(console.log("Deleting blog post..."),!e)throw Error("Access token is required");let i=(0,c.Pe)(e);try{let{owner:o,repo:a}=r??await (0,c.rP)(e),l=decodeURIComponent(t),u=`${l}.md`,g=s.CT.blogFile(u);console.log(`Attempting to delete file: ${g}`);let d=await i.repos.getContent({owner:o,repo:a,path:g});if(Array.isArray(d.data)||!("sha"in d.data))throw Error("Unexpected response when fetching current blog post");await i.repos.deleteFile({owner:o,repo:a,path:g,message:"Delete blog post",sha:d.data.sha}),console.log("Blog post deleted successfully"),await n(e,o,a)}catch(t){throw console.error("Error deleting blog post:",t),t}}async function m(t,e,r,i,a=[],l,u,g){if(console.log("Updating blog post..."),!i)throw Error("Access token is required");let d=(0,c.Pe)(i);try{let{owner:h,repo:f}=g??await (0,c.rP)(i),{content:p,sha:m}=await (0,c.LK)(d,h,f,s.CT.blogPost(t)),w=(0,o.xr)(p)??new Date().toISOString(),y=void 0!==u?u:(0,o.Mv)(p)??"published",b=(0,o.X4)({title:e,date:w,content:r,status:y,location:l,discussions:a});await (0,c.gO)(d,h,f,s.CT.blogPost(t),"Update blog post",b,m),console.log("Blog post updated successfully"),await n(i,h,f)}catch(t){throw console.error("Error updating blog post:",t),t}}async function w(t,e,r){if(console.log("Uploading image..."),!e)throw Error("Access token is required");let i=(0,c.Pe)(e);console.log("Octokit instance created");try{let{owner:s,repo:n}=r??await (0,c.rP)(e);console.log("Repo info:",{owner:s,repo:n});let{data:o}=await i.repos.get({owner:s,repo:n}),a=o.default_branch;console.log("Default branch:",a),await h(i,s,n),console.log("GitHub structure initialized");let u=new Date().toISOString().split("T")[0],g=Date.now().toString(),d=l().extname(t.name),f=`${g}${d}`,p=`assets/images/${u}/${f}`;await (0,c.kP)(i,s,n,`assets/images/${u}`);let m=await (0,c.sT)(t),w=await i.repos.createOrUpdateFileContents({owner:s,repo:n,path:p,message:`Upload image: ${f}`,content:m});console.log(w),console.log("Image uploaded successfully");let y=w.data.content?.download_url;if(y){let t=y.split("/"),e=t[3],r=t[4],i=t.slice(6).join("/");return`https://github.com/${e}/${r}/blob/${a}/${i}?raw=true`}throw Error("Failed to get image URL")}catch(t){throw console.error("Error uploading image:",t),t}}async function y(t){let e,r;let i=null;if(t.length>40)try{i=(0,c.Pe)(t);let s=await (0,c.rP)(t);e=s.owner,r=s.repo}catch(i){console.error("Error getting authenticated user:",i),e=t,r=u}else e=t,r=u;let s=`https://github.com/${e}.png`,n=`https://github.com/${e}.png`,o=s,a=n;return i&&(o=await b(i,e,r,"assets/icon.jpg",s),a=await b(i,e,r,"assets/icon-144.jpg",n)),{iconPath:o,appleTouchIconPath:a}}async function b(t,e,r,i,s){try{return await t.repos.getContent({owner:e,repo:r,path:i}),`https://github.com/${e}/${r}/blob/main/${i}?raw=true`}catch(t){return console.warn(`No icon found in ${i}, using default:`,s),s}}},45854:(t,e,r)=>{r.d(e,{LK:()=>o,Pe:()=>s,QF:()=>g,XD:()=>u,gO:()=>a,kP:()=>l,rP:()=>n,sT:()=>c});var i=r(94545);function s(t){if(!t)throw Error("Access token is required");return new i.v({auth:t})}async function n(t){if(!t)throw Error("Access token is required");let e=s(t);try{let{data:t}=await e.users.getAuthenticated();return{owner:t.login,repo:"cici"}}catch(t){throw console.error("Error getting authenticated user:",t),Error("Failed to get authenticated user")}}async function o(t,e,r,i){let s=await t.repos.getContent({owner:e,repo:r,path:i});if(Array.isArray(s.data)||!("content"in s.data))throw Error("Unexpected response from GitHub API");return{content:Buffer.from(s.data.content,"base64").toString("utf-8"),sha:s.data.sha}}async function a(t,e,r,i,s,n,o){let a={owner:e,repo:r,path:i,message:s,content:Buffer.from(n).toString("base64")};o&&(a.sha=o),await t.repos.createOrUpdateFileContents(a)}async function l(t,e,r,i){try{await t.repos.getContent({owner:e,repo:r,path:i})}catch(s){if(s instanceof Error&&"status"in s&&404===s.status)await t.repos.createOrUpdateFileContents({owner:e,repo:r,path:`${i}/.gitkeep`,message:`Create directory: ${i}`,content:""});else throw s}}async function c(t){return new Promise((e,r)=>{let i=new FileReader;i.readAsDataURL(t),i.onload=()=>{"string"==typeof i.result?e(i.result.split(",")[1]):r(Error("Failed to convert file to base64"))},i.onerror=t=>r(t)})}function u(t){return t instanceof Error&&"status"in t&&404===t.status}async function g(t,e,r,i,s,n){try{await t.repos.getContent({owner:e,repo:r,path:i}),console.log(`File ${i} already exists.`)}catch(o){if(u(o)){console.log(`Creating file ${i}...`);try{await a(t,e,r,i,s,n),console.log(`File ${i} created successfully.`)}catch(t){throw console.error(`Error creating file ${i}:`,t),t}}else throw console.error(`Error checking file ${i}:`,o),o}}},54428:(t,e,r)=>{r.d(e,{Bi:()=>m,K4:()=>p,VD:()=>w});var i=r(92048),s=r(55315),n=r.n(s),o=r(94545),a=r(8502),l=r(31470),c=r(73194);let u="cici",g=new Map;function d(t){return l.CT.highlightsFile(t)}function h(t){if(!t||0===t.length||t.length>200||t.includes("/")||t.includes("\\")||t.includes("\0")||t.includes("..")||t.startsWith("."))throw Error(`Invalid postId: ${t}`)}function f(t){if("object"==typeof t&&null!==t&&"status"in t){let e=t.status;return"number"==typeof e?e:void 0}}class p{constructor(t){this.rootDir=t}absPath(t){return n().join(this.rootDir,l.Bf.highlightsFile(t))}async load(t){h(t);try{let e=await i.promises.readFile(this.absPath(t),"utf-8");return{data:a.x.parse(JSON.parse(e)),sha:null}}catch(e){if("ENOENT"===e?.code)return{data:(0,a.Bk)(t),sha:null};throw e}}async save(t,e,r,s){h(t);let o=a.x.parse(e),l=this.absPath(t);return await i.promises.mkdir(n().dirname(l),{recursive:!0}),await i.promises.writeFile(l,JSON.stringify(o,null,2),"utf-8"),{sha:""}}}class m{constructor(t,e){this.octokit=t,this.owner=e}async load(t){h(t);let e=g.get(t);if(e&&e.expiresAt>Date.now())return{data:e.data,sha:e.sha};let r=await this.readFile(t);if(!r){let e=(0,a.Bk)(t);return g.set(t,{data:e,sha:null,expiresAt:Date.now()+3e4}),{data:e,sha:null}}let i=a.x.parse(JSON.parse(r.content));return g.set(t,{data:i,sha:r.sha,expiresAt:Date.now()+3e4}),{data:i,sha:r.sha}}async save(t,e,r,i){h(t);let s=a.x.parse(e),n=Buffer.from(JSON.stringify(s,null,2)).toString("base64"),o=0,l=r;for(;o<3;)try{let e=await this.octokit.repos.createOrUpdateFileContents({owner:this.owner,repo:u,path:d(t),message:i,content:n,...l?{sha:l}:{}}),r=e.data.content?.sha??"";return g.set(t,{data:s,sha:r,expiresAt:Date.now()+3e4}),{sha:r}}catch(r){let e=f(r);if(409===e||422===e){g.delete(t),o++;let e=await this.readFile(t);l=e?.sha??null;continue}throw r}throw Error("Save failed after 3 retries due to write contention")}async readFile(t){try{let e=(await this.octokit.repos.getContent({owner:this.owner,repo:u,path:d(t)})).data;if(Array.isArray(e)||"file"!==e.type)return null;return{content:Buffer.from(e.content,"base64").toString("utf-8"),sha:e.sha}}catch(t){if(404===f(t))return null;throw t}}}function w(t={}){if((0,c.g)())return new p((0,c.$)());let e=t.ownerToken??process.env.HIGHLIGHTS_GH_TOKEN;if(!e)throw Error("HIGHLIGHTS_GH_TOKEN not configured. Inline comments require a service token in production.");let r=process.env.GITHUB_USERNAME;if(!r)throw Error("GITHUB_USERNAME not configured.");return new m(new o.v({auth:e}),r)}},8502:(t,e,r)=>{r.d(e,{Bk:()=>u,Om:()=>s,x:()=>c});var i=r(4037);let s=i.Ry({startOffset:i.Rx().int().nonnegative(),endOffset:i.Rx().int().nonnegative(),exact:i.Z_().min(1).max(1e3),prefix:i.Z_().max(64),suffix:i.Z_().max(64)}).refine(t=>t.endOffset>=t.startOffset,{message:"endOffset must be >= startOffset"}),n=i.IM(i.Z_(),i.IX(i.Z_())),o=i.Km(["ios","android","web"]),a=i.Ry({id:i.Z_().min(1).max(64),parentId:i.Z_().min(1).max(64).nullable(),body:i.Z_().min(1).max(2e3),authorName:i.Z_().max(40).nullable(),fingerprint:i.Z_().min(1).max(128),country:i.Z_().max(8),platform:o,reactions:n,resolved:i.O7(),createdAt:i.Z_().datetime(),hidden:i.O7(),hiddenReason:i.Z_().max(200).optional()}),l=i.Ry({id:i.Z_().min(1).max(64),anchor:s,thread:i.IX(a).min(1),resolved:i.O7(),createdAt:i.Z_().datetime()}),c=i.Ry({postId:i.Z_().min(1),highlights:i.IX(l),schemaVersion:i.i0(1)});function u(t){return{postId:t,highlights:[],schemaVersion:1}}},81336:(t,e,r)=>{r.d(e,{T:()=>g,X:()=>u});var i=r(92048),s=r.n(i),n=r(55315),o=r.n(n),a=r(73194);let l={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".avif":"image/avif"};function c(){return o().join((0,a.$)(),"assets")}async function u(t,e){let r=function(t,e){let r=o().extname(t||"").toLowerCase();if(r&&l[r])return r;if(e){let t=`.${e.split("/")[1]||""}`.toLowerCase();if(l[t])return t}return r||".png"}(t.name,t.type),i=o().posix.join("images",e.date),n=`${e.id}${r}`,a=o().join(c(),i);s().mkdirSync(a,{recursive:!0});let u=Buffer.from(await t.arrayBuffer());return s().writeFileSync(o().join(a,n),u),`/api/asset/${i}/${n}`}function g(t){if(t.some(t=>!t||".."===t||t.includes("\0")||t.includes("/")||t.includes("\\")))return null;let e=c(),r=o().resolve(e,...t);if(r!==e&&!r.startsWith(e+o().sep)||!s().existsSync(r)||!s().statSync(r).isFile())return null;let i=o().extname(r).toLowerCase();return{body:s().readFileSync(r),contentType:l[i]??"application/octet-stream"}}},88069:(t,e,r)=>{r.d(e,{D:()=>o});var i=r(55315),s=r.n(i);let n="cici";function o(t){let e=process.env.CICI_DIR;if(e)return{kind:"local",dir:s().resolve(e)};let r=process.env.CICI_REPO;if(r){let[e,i]=r.split("/");if(!e)throw Error(`Invalid CICI_REPO "${r}" — expected "owner/name".`);return{kind:"github",owner:e,repo:i||n,token:process.env.CICI_TOKEN||t||void 0}}return{kind:"github",owner:process.env.GITHUB_USERNAME||"metrue",repo:n,token:t||void 0}}},73194:(t,e,r)=>{r.d(e,{$:()=>a,g:()=>o});var i=r(55315),s=r.n(i),n=r(88069);function o(){return"local"===(0,n.D)().kind}function a(){let t=process.env.CICI_DIR;return t?s().resolve(t):s().join(process.cwd(),"data")}},63607:(t,e,r)=>{r.d(e,{VH:()=>T});var i=r(88069),s=r(81336),n=r(54428),o=r(92048),a=r.n(o),l=r(55315),c=r.n(l);function u(t){let{frontmatter:e}=function(t){let e=t.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);return e?{frontmatter:e[1],body:e[2].replace(/^\n/,"")}:{frontmatter:"",body:t}}(t),r=e.match(/title:[ \t]*(.+)/),i=e.match(/date:[ \t]*(.+)/),s=e.match(/latitude:[ \t]*(.+)/),n=e.match(/longitude:[ \t]*(.+)/),o=e.match(/city:[ \t]*(.+)/),a=e.match(/street:[ \t]*(.+)/),l=e.match(/status:[ \t]*(.+)/),c=e.match(/publishedAt:[ \t]*(.+)/),u=e.match(/lastModified:[ \t]*(.+)/),g=s?.[1]?.trim(),d=n?.[1]?.trim(),h=g?parseFloat(g):NaN,f=d?parseFloat(d):NaN;return{title:r?r[1].trim():"",date:i?i[1].trim():new Date().toISOString(),discussions:function(t){let e=[],r=t.match(/external_discussions:\s*\n([\s\S]*?)(?=\n\w|$)/);if(!r)return e;let i=r[1].split("\n").filter(t=>t.trim()),s={};for(let t of i)t.includes("platform:")?(s.platform&&s.url&&e.push(s),s={platform:t.split(":")[1].trim()}):t.includes("url:")&&s.platform&&(s.url=t.split("url:")[1].trim());return s.platform&&s.url&&e.push(s),e}(e),...g&&!isNaN(h)&&{latitude:h},...d&&!isNaN(f)&&{longitude:f},...o&&o[1].trim()&&{city:o[1].trim()},...a&&a[1].trim()&&{street:a[1].trim()},...l&&{status:l[1].trim()},...c&&{publishedAt:c[1].trim()},...u&&{lastModified:u[1].trim()}}}var g=r(31470),d=r(73194),h=r(42491);class f{abs(t){return c().join((0,d.$)(),t)}get dataDir(){return(0,d.$)()}get blogDir(){return this.abs(g.Bf.blogDir())}async getBlogPosts(t=!1){try{if(!a().existsSync(this.blogDir))return console.log("Blog directory does not exist, returning empty array"),[];let e=a().readdirSync(this.blogDir).filter(t=>t.endsWith(".md")&&".gitkeep"!==t),r=[];for(let t of e){let e=await this.getBlogPost(t);e&&r.push(e)}let i=r.sort((t,e)=>new Date(e.date).getTime()-new Date(t.date).getTime());if(t)return i;return i.filter(t=>"published"===t.status)}catch(t){return console.error("Error reading local blog posts:",t),[]}}async getBlogPost(t){try{let e=c().join(this.blogDir,t);if(!a().existsSync(e))return null;let r=a().readFileSync(e,"utf-8"),i=u(r),s=this.getFirstImageURLFrom(r);return{id:t.replace(".md",""),title:i.title||t.replace(".md",""),content:r,imageUrl:s,date:i.date?new Date(i.date).toISOString():new Date().toISOString(),discussions:i.discussions.length>0?i.discussions:void 0,latitude:i.latitude,longitude:i.longitude,city:i.city,street:i.street,status:i.status||"published",publishedAt:i.publishedAt||i.date,lastModified:i.lastModified||i.date||new Date().toISOString()}}catch(e){return console.error(`Error reading blog post ${t}:`,e),null}}async getMemos(){try{let t=this.abs(g.Bf.memos());if(!a().existsSync(t))return console.log("memos.json not found, returning empty array"),[];let e=a().readFileSync(t,"utf-8"),r=JSON.parse(e);return Array.isArray(r)?r:[]}catch(t){return console.error("Error reading local memos:",t),[]}}async getSiteConfig(){try{let t=a().readFileSync(this.abs(g.Bf.siteConfig()),"utf-8");return JSON.parse(t)}catch{return null}}async getLinks(){try{let t=this.abs(g.Bf.siteConfig());if(!a().existsSync(t))return{};let e=a().readFileSync(t,"utf-8");return JSON.parse(e).links||{}}catch(t){return console.warn("Error reading local site config:",t),{}}}async getLikes(){try{let t=this.abs(g.Bf.likes());if(!a().existsSync(t))return console.log("likes.json not found, returning empty object"),{};let e=a().readFileSync(t,"utf-8"),r=JSON.parse(e);return"object"==typeof r&&null!==r?r:{}}catch(t){return console.error("Error reading local likes:",t),{}}}async updateLikes(t){try{let e=this.abs(g.Bf.likes()),r=JSON.stringify(t,null,2);a().writeFileSync(e,r,"utf-8"),console.log("Updated local likes data")}catch(t){throw console.error("Error updating local likes:",t),Error("Failed to update local likes data")}}async createMemo(t){try{let e=await this.getMemos(),r=[t,...e],i=this.abs(g.Bf.memos()),s=JSON.stringify(r,null,2);return a().writeFileSync(i,s,"utf-8"),console.log("Created new memo locally"),t}catch(t){throw console.error("Error creating local memo:",t),Error("Failed to create memo locally")}}async createBlogPost(t){let e=(0,h.gk)(t.title),r=this.abs(g.Bf.blogFile(`${e}.md`)),i=(0,h.X4)({title:t.title,date:new Date().toISOString(),content:t.content,status:t.status,location:t.location,discussions:t.discussions});return a().mkdirSync(c().dirname(r),{recursive:!0}),a().writeFileSync(r,i,"utf-8"),e}async updateBlogPost(t,e){let r=this.abs(g.Bf.blogPost(t)),i="";try{i=a().readFileSync(r,"utf-8")}catch{}let s=(0,h.xr)(i)??new Date().toISOString(),n=void 0!==e.status?e.status:(0,h.Mv)(i)??"published",o=(0,h.X4)({title:e.title,date:s,content:e.content,status:n,location:e.location,discussions:e.discussions});return a().mkdirSync(c().dirname(r),{recursive:!0}),a().writeFileSync(r,o,"utf-8"),t}async deleteBlogPost(t){let e=this.abs(g.Bf.blogPost(t));try{a().unlinkSync(e)}catch(t){if(t?.code!=="ENOENT")throw t}}async updateMemo(t,e){let r=await this.getMemos(),i=r.findIndex(e=>e.id===t);if(-1===i)throw Error("Memo not found");let s={...r[i],content:e},n=r.map((t,e)=>e===i?s:t);return a().writeFileSync(this.abs(g.Bf.memos()),JSON.stringify(n,null,2),"utf-8"),s}async deleteMemo(t){let e=(await this.getMemos()).filter(e=>e.id!==t);a().writeFileSync(this.abs(g.Bf.memos()),JSON.stringify(e,null,2),"utf-8")}async getDrafts(){return(await this.getBlogPosts(!0)).filter(t=>"draft"===t.status)}async getAllBlogPosts(){return this.getBlogPosts(!0)}async checkRepositoryHealth(){return a().existsSync(this.dataDir)}getFirstImageURLFrom(t){let e=/(https?:\/\/[^\s]+?\.(?:png|jpg|jpeg|gif|webp))/i.exec(t);if(e){let t=e[1];return t.startsWith("https://github")?`${t}?raw=true`:t}return null}}class p{constructor(t){this.dir=t,this.client=new f}get label(){return`local: ${this.dir}`}canWrite(){return!0}getBlogPosts(t){return this.client.getBlogPosts(t?.includeDrafts??!1)}async getBlogPost(t){return await this.client.getBlogPost(`${t}.md`)??void 0}getMemos(){return this.client.getMemos()}getLinks(){return this.client.getLinks()}getLikes(){return this.client.getLikes()}getSiteConfig(){return this.client.getSiteConfig()}createBlogPost(t){return this.client.createBlogPost(t)}updateBlogPost(t,e){return this.client.updateBlogPost(t,e)}deleteBlogPost(t){return this.client.deleteBlogPost(t)}createMemo(t){return this.client.createMemo(t)}updateMemo(t,e){return this.client.updateMemo(t,e)}deleteMemo(t){return this.client.deleteMemo(t)}updateLikes(t){return this.client.updateLikes(t)}uploadAsset(t){return(0,s.X)(t,{date:new Date().toISOString().split("T")[0],id:Date.now().toString()})}highlights(){return new n.K4(this.dir)}}var m=r(45854),w=r(82575),y=r(94545);let b=t=>{let e=/(https?:\/\/[^\s]+?\.(?:png|jpg|jpeg|gif|webp))/i.exec(t);if(e){let t=e[1];return t.startsWith("https://github")?`${t}?raw=true`:t}return null};class k{constructor(t,e="cici"){this.accessToken=t,this.repo=e}async getSafeOwner(t){if(t&&"true"!==t)return t;if(this.accessToken)try{let t=new y.v({auth:this.accessToken}),{data:e}=await t.users.getAuthenticated();if(e.login&&"true"!==e.login)return e.login}catch(t){console.warn("Failed to get authenticated user:",t)}return process.env.GITHUB_USERNAME||"metrue"}async getBlogPosts(t,e=!1){let r=this.accessToken?new y.v({auth:this.accessToken}):new y.v,i=await this.getSafeOwner(t);try{let t=await r.repos.getContent({owner:i,repo:this.repo,path:g.CT.blogDir()});if(!Array.isArray(t.data))return console.warn("Unexpected response from GitHub API: data is not an array"),[];let s=(await Promise.all(t.data.filter(t=>"file"===t.type&&".gitkeep"!==t.name&&t.name.endsWith(".md")).map(async t=>this.getBlogPost(t.name,i)))).filter(t=>void 0!==t);if(e&&this.accessToken)return s;return s.filter(t=>"published"===t.status)}catch(t){if(console.error("Error fetching blog posts:",t),t instanceof Error&&"status"in t&&404===t.status)return console.log("Blog directory does not exist, returning empty array"),[];throw t}}async getBlogPost(t,e){let r=this.accessToken?new y.v({auth:this.accessToken}):new y.v,i=await this.getSafeOwner(e),s=await r.repos.getContent({owner:i,repo:this.repo,path:g.CT.blogFile(t)});if("content"in s.data){let e=Buffer.from(s.data.content,"base64").toString("utf-8"),r=u(e);return{id:t.replace(".md",""),title:r.title?decodeURIComponent(r.title):decodeURIComponent(t.replace(".md","")),content:e,imageUrl:b(e),date:r.date?new Date(r.date).toISOString():new Date().toISOString(),discussions:r.discussions.length>0?r.discussions:void 0,latitude:r.latitude,longitude:r.longitude,city:r.city,street:r.street,status:r.status||"published",publishedAt:r.publishedAt||r.date,lastModified:r.lastModified||r.date||new Date().toISOString()}}}async getMemos(t){let e=this.accessToken?new y.v({auth:this.accessToken}):new y.v,r=await this.getSafeOwner(t);try{let t=await e.repos.getContent({owner:r,repo:this.repo,path:g.CT.memos()});if(Array.isArray(t.data)||!("content"in t.data))return[];let i=Buffer.from(t.data.content,"base64").toString("utf-8");return JSON.parse(i)}catch(t){return console.error("Error fetching public memos:",t),[]}}async getLinks(t){let e=this.accessToken?new y.v({auth:this.accessToken}):new y.v,r=await this.getSafeOwner(t);try{let t=await e.repos.getContent({owner:r,repo:this.repo,path:g.CT.siteConfig()});if(Array.isArray(t.data)||!("content"in t.data))return{};let i=Buffer.from(t.data.content,"base64").toString("utf-8");return JSON.parse(i).links||{}}catch(t){return console.warn("Error fetching links:",t),{}}}async getLikes(t){let e=this.accessToken?new y.v({auth:this.accessToken}):new y.v,r=await this.getSafeOwner(t);try{let t=await e.repos.getContent({owner:r,repo:this.repo,path:g.CT.likes()});if(Array.isArray(t.data)||!("content"in t.data))return{};let i=Buffer.from(t.data.content,"base64").toString("utf-8");return JSON.parse(i)}catch(t){if(console.error("Error fetching likes:",t),t instanceof Error&&"status"in t&&404===t.status)return{};throw t}}async updateLikes(t,e){let r=new y.v({auth:this.accessToken}),i=await this.getSafeOwner(e);try{let e;try{let t=await r.repos.getContent({owner:i,repo:this.repo,path:g.CT.likes()});!Array.isArray(t.data)&&"sha"in t.data&&(e=t.data.sha)}catch(t){}await r.repos.createOrUpdateFileContents({owner:i,repo:this.repo,path:g.CT.likes(),message:`Update likes data - ${new Date().toISOString()}`,content:Buffer.from(JSON.stringify(t,null,2)).toString("base64"),...e&&{sha:e}})}catch(t){throw console.error("Error updating likes:",t),Error("Failed to update likes data")}}async getDrafts(t){return(await this.getBlogPosts(t,!0)).filter(t=>"draft"===t.status)}async getAllBlogPosts(t){return this.getBlogPosts(t,!0)}}let S=(t,e)=>new k(t,e),$=t=>{let e=/(https?:\/\/[^\s]+?\.(?:png|jpg|jpeg|gif|webp))/i.exec(t);if(e){let t=e[1];return t.startsWith("https://github")?`${t}?raw=true`:t}return null};class E{constructor(t,e="cici"){this.owner=t,this.baseUrl=`https://raw.githubusercontent.com/${t}/${e}/main`}async getBlogPosts(t=!1){try{try{let e=await fetch(`${this.baseUrl}/${g.CT.blogManifest()}`);if(e.ok){let r=await e.json(),i=r.files||[...r.published||[],...r.drafts||[]],s=(await Promise.all(i.map(t=>this.getBlogPost(t)))).filter(t=>null!==t);if(t)return s;return s.filter(t=>"published"===t.status)}}catch{}return console.warn("Blog manifest not found, returning empty array"),[]}catch(t){throw console.error("Error fetching blog posts via raw URLs:",t),t}}async getBlogPost(t){try{let e=await fetch(`${this.baseUrl}/${g.CT.blogFile(t)}`);if(!e.ok){if(404===e.status)return null;throw Error(`HTTP ${e.status}: ${e.statusText}`)}let r=await e.text(),i=u(r);return{id:t.replace(".md",""),title:i.title?decodeURIComponent(i.title.trim()):decodeURIComponent(t.replace(".md","")),content:r,imageUrl:$(r),date:i.date?new Date(i.date.trim()).toISOString():new Date().toISOString(),discussions:i.discussions.length>0?i.discussions:void 0,latitude:i.latitude,longitude:i.longitude,city:i.city,street:i.street,status:i.status||"published",publishedAt:i.publishedAt||i.date,lastModified:i.lastModified||i.date||new Date().toISOString()}}catch(e){return console.error(`Error fetching blog post ${t}:`,e),null}}async getMemos(){try{let t=await fetch(`${this.baseUrl}/${g.CT.memos()}`);if(!t.ok){if(404===t.status)return console.log("memos.json not found, returning empty array"),[];throw Error(`HTTP ${t.status}: ${t.statusText}`)}let e=await t.json();return Array.isArray(e)?e:[]}catch(t){return console.error("Error fetching memos via raw URLs:",t),[]}}async getLinks(){try{let t=await fetch(`${this.baseUrl}/${g.CT.siteConfig()}`);if(!t.ok){if(404===t.status)return{};throw Error(`HTTP ${t.status}: ${t.statusText}`)}return(await t.json()).links||{}}catch(t){return console.warn("Error fetching links via raw URLs:",t),{}}}async getLikes(){try{let t=await fetch(`${this.baseUrl}/${g.CT.likes()}`);if(!t.ok){if(404===t.status)return console.log("likes.json not found, returning empty object"),{};throw Error(`HTTP ${t.status}: ${t.statusText}`)}let e=await t.json();return"object"==typeof e&&null!==e?e:{}}catch(t){return console.error("Error fetching likes via raw URLs:",t),{}}}async getDrafts(){return(await this.getBlogPosts(!0)).filter(t=>"draft"===t.status)}async getAllBlogPosts(){return this.getBlogPosts(!0)}async checkRepositoryHealth(){try{return(await fetch(`${this.baseUrl}/README.md`)).ok}catch{return!1}}}class C extends Error{constructor(t="This cici instance is read-only. Provide a token to enable editing."){super(t),this.name="ReadOnlyError"}}class B{constructor(t){this.owner=t.owner,this.repo=t.repo,this.token=t.token,this.reader=new E(t.owner,t.repo),this.apiReader=t.token?S(t.token,t.repo):void 0,this.target={owner:t.owner,repo:t.repo}}async fresh(t,e){if(this.apiReader)try{return await t(this.apiReader)}catch(t){console.warn("GitHub API read failed, falling back to raw URL:",t)}return e()}get label(){return`github: ${this.owner}/${this.repo}${this.token?"":" (read-only)"}`}canWrite(){return!!this.token}requireToken(){if(!this.token)throw new C;return this.token}writeOctokit(){return(0,m.Pe)(this.requireToken())}getBlogPosts(t){let e=t?.includeDrafts??!1;return this.fresh(t=>t.getBlogPosts(this.owner,e),()=>this.reader.getBlogPosts(e))}async getBlogPost(t){return await this.fresh(e=>e.getBlogPost(`${t}.md`,this.owner),()=>this.reader.getBlogPost(`${t}.md`))??void 0}getMemos(){return this.fresh(t=>t.getMemos(this.owner),()=>this.reader.getMemos())}getLinks(){return this.fresh(t=>t.getLinks(this.owner),()=>this.reader.getLinks())}getLikes(){return this.fresh(t=>t.getLikes(this.owner),()=>this.reader.getLikes())}async getSiteConfig(){try{let t=`https://raw.githubusercontent.com/${this.owner}/${this.repo}/main/${g.CT.siteConfig()}`,e=await fetch(t);if(!e.ok)return null;return await e.json()}catch{return null}}async createBlogPost(t){let e=this.requireToken();return await (0,w.I7)(t.title,t.content,e,t.discussions,t.location,t.status,this.target),(0,h.gk)(t.title)}async updateBlogPost(t,e){let r=this.requireToken();return await (0,w.Kx)(t,e.title,e.content,r,e.discussions,e.location,e.status,this.target),t}async deleteBlogPost(t){await (0,w.XD)(t,this.requireToken(),this.target)}async uploadAsset(t){return(0,w.Ix)(t,this.requireToken(),this.target)}async createMemo(t){let e=g.CT.memos(),{data:r,sha:i}=await this.getJsonFile(e),s=Array.isArray(r)?r:[];return await this.putFile(e,JSON.stringify([t,...s],null,2),`Add memo ${t.id}`,i),t}async updateMemo(t,e){let r=g.CT.memos(),{data:i,sha:s}=await this.getJsonFile(r),n=Array.isArray(i)?i:[],o=n.findIndex(e=>e.id===t);if(-1===o)throw Error("Memo not found");let a={...n[o],content:e},l=n.map((t,e)=>e===o?a:t);return await this.putFile(r,JSON.stringify(l,null,2),`Update memo ${t}`,s),a}async deleteMemo(t){let e=g.CT.memos(),{data:r,sha:i}=await this.getJsonFile(e),s=Array.isArray(r)?r:[];await this.putFile(e,JSON.stringify(s.filter(e=>e.id!==t),null,2),`Delete memo ${t}`,i)}async updateLikes(t){let e=g.CT.likes(),{sha:r}=await this.getJsonFile(e);await this.putFile(e,JSON.stringify(t,null,2),"Update likes",r)}highlights(){return new n.Bi((0,m.Pe)(this.token),this.owner)}async getJsonFile(t){let e=this.writeOctokit();try{let r=await e.repos.getContent({owner:this.owner,repo:this.repo,path:t});if(Array.isArray(r.data)||!("content"in r.data))return{data:null};let i=Buffer.from(r.data.content,"base64").toString("utf-8");return{data:JSON.parse(i),sha:r.data.sha}}catch(t){if(t?.status===404)return{data:null};throw t}}putFile(t,e,r,i){return(0,m.gO)(this.writeOctokit(),this.owner,this.repo,t,r,e,i)}}function T(t){var e;return"local"===(e=(0,i.D)(t)).kind?new p(e.dir):new B({owner:e.owner,repo:e.repo,token:e.token})}}};
|
|
14
|
+
${r}`}function n(t){let e=t.match(/date:\s*(.+)/);return e?e[1]:void 0}function o(t){let e=t.match(/status:\s*(.+)/);return e?e[1].trim():void 0}r.d(e,{Mv:()=>o,X4:()=>s,gk:()=>i,xr:()=>n})},31470:(t,e,r)=>{r.d(e,{Bf:()=>s,CT:()=>o});let i="data",s={rootKeep:()=>".gitkeep",blogDir:()=>"blog",blogDirKeep:()=>"blog/.gitkeep",blogPost:t=>`blog/${t}.md`,blogFile:t=>`blog/${t}`,blogManifest:()=>"blog-manifest.json",memos:()=>"memos.json",likes:()=>"likes.json",siteConfig:()=>"site-config.json",highlightsDir:()=>"highlights",highlightsFile:t=>`highlights/${t}.json`},n=t=>`${i}/${t}`,o={root:()=>i,rootKeep:()=>n(s.rootKeep()),blogDir:()=>n(s.blogDir()),blogDirKeep:()=>n(s.blogDirKeep()),blogPost:t=>n(s.blogPost(t)),blogFile:t=>n(s.blogFile(t)),blogManifest:()=>n(s.blogManifest()),memos:()=>n(s.memos()),likes:()=>n(s.likes()),siteConfig:()=>n(s.siteConfig()),highlightsDir:()=>n(s.highlightsDir()),highlightsFile:t=>n(s.highlightsFile(t))}},82575:(t,e,r)=>{r.d(e,{I7:()=>f,XD:()=>p,CR:()=>y,Kx:()=>m,Ix:()=>w});var i=r(94545),s=r(31470);async function n(t,e,r){try{let n;let o=new i.v({auth:t}),{data:a}=await o.repos.getContent({owner:e,repo:r,path:s.CT.blogDir()});if(!Array.isArray(a)){console.error("Expected array of files but got:",typeof a);return}let l=a.filter(t=>"file"===t.type&&t.name.endsWith(".md")&&".gitkeep"!==t.name).map(t=>t.name).sort();try{let{data:t}=await o.repos.getContent({owner:e,repo:r,path:s.CT.blogManifest()});!Array.isArray(t)&&"sha"in t&&(n=t.sha)}catch(t){console.log("Blog manifest does not exist yet, will create it")}await o.repos.createOrUpdateFileContents({owner:e,repo:r,path:s.CT.blogManifest(),message:"Update blog manifest",content:Buffer.from(JSON.stringify({files:l},null,2)).toString("base64"),sha:n}),console.log("Blog manifest updated successfully with",l.length,"files")}catch(t){console.error("Failed to update blog manifest:",t)}}var o=r(42491),a=r(55315),l=r.n(a),c=r(45854);let u="cici";async function g(t,e,r){try{let{data:i}=await t.repos.get({owner:e,repo:r});if(!i.description){let{data:i}=await t.users.getAuthenticated(),s=i.login;await t.repos.update({owner:e,repo:r,description:`https://tinymind.me/${s}`}),console.log(`Updated repository description to https://tinymind.me/${s}`)}}catch(e){if((0,c.XD)(e))await t.repos.createForAuthenticatedUser({name:r,auto_init:!0}),console.log(`Created new repository: ${r}`);else throw e}try{let{data:i}=await t.repos.getContent({owner:e,repo:r,path:"README.md"});if(console.log("README content:",i),"content"in i){let s=Buffer.from(i.content,"base64").toString("utf-8");console.log("README Decoded content:",s.trim()),(""===s.trim()||"# tinymind-blog"===s.trim())&&(await t.repos.createOrUpdateFileContents({owner:e,repo:r,path:"README.md",message:"Update README.md with default content",content:Buffer.from("# cici Blog\n\nWrite blog posts and memos at https://tinymind.me with data stored on GitHub.").toString("base64"),sha:i.sha}),console.log("README.md updated with default content"))}}catch(i){if(i instanceof Error&&"status"in i&&404===i.status){let i=Buffer.from("Write blog posts and memos at https://tinymind.me with data stored on GitHub.").toString("base64");await t.repos.createOrUpdateFileContents({owner:e,repo:r,path:"README.md",message:"Initial commit: Add README.md",content:i})}else throw i}}async function d(t,e,r){try{await (0,c.QF)(t,e,r,s.CT.rootKeep(),"Initialize content directory",""),await (0,c.QF)(t,e,r,s.CT.blogDirKeep(),"Initialize blog directory",""),await (0,c.QF)(t,e,r,s.CT.memos(),"Initialize memos.json","[]")}catch(t){throw console.error("Error ensuring content structure:",t),t}}async function h(t,e,r){await g(t,e,r),await d(t,e,r)}async function f(t,e,r,i=[],a,l="published",u){let g=(0,c.Pe)(r),{owner:d,repo:f}=u??await (0,c.rP)(r);await h(g,d,f);let p=`${(0,o.gk)(t)}.md`,m=s.CT.blogFile(p),w=(0,o.X4)({title:t,date:new Date().toISOString(),content:e,status:l,location:a,discussions:i});await g.repos.createOrUpdateFileContents({owner:d,repo:f,path:m,message:`Add blog post: ${t}`,content:Buffer.from(w).toString("base64")}),await n(r,d,f)}async function p(t,e,r){if(console.log("Deleting blog post..."),!e)throw Error("Access token is required");let i=(0,c.Pe)(e);try{let{owner:o,repo:a}=r??await (0,c.rP)(e),l=decodeURIComponent(t),u=`${l}.md`,g=s.CT.blogFile(u);console.log(`Attempting to delete file: ${g}`);let d=await i.repos.getContent({owner:o,repo:a,path:g});if(Array.isArray(d.data)||!("sha"in d.data))throw Error("Unexpected response when fetching current blog post");await i.repos.deleteFile({owner:o,repo:a,path:g,message:"Delete blog post",sha:d.data.sha}),console.log("Blog post deleted successfully"),await n(e,o,a)}catch(t){throw console.error("Error deleting blog post:",t),t}}async function m(t,e,r,i,a=[],l,u,g){if(console.log("Updating blog post..."),!i)throw Error("Access token is required");let d=(0,c.Pe)(i);try{let{owner:h,repo:f}=g??await (0,c.rP)(i),{content:p,sha:m}=await (0,c.LK)(d,h,f,s.CT.blogPost(t)),w=(0,o.xr)(p)??new Date().toISOString(),y=void 0!==u?u:(0,o.Mv)(p)??"published",b=(0,o.X4)({title:e,date:w,content:r,status:y,location:l,discussions:a});await (0,c.gO)(d,h,f,s.CT.blogPost(t),"Update blog post",b,m),console.log("Blog post updated successfully"),await n(i,h,f)}catch(t){throw console.error("Error updating blog post:",t),t}}async function w(t,e,r){if(console.log("Uploading image..."),!e)throw Error("Access token is required");let i=(0,c.Pe)(e);console.log("Octokit instance created");try{let{owner:s,repo:n}=r??await (0,c.rP)(e);console.log("Repo info:",{owner:s,repo:n});let{data:o}=await i.repos.get({owner:s,repo:n}),a=o.default_branch;console.log("Default branch:",a),await h(i,s,n),console.log("GitHub structure initialized");let u=new Date().toISOString().split("T")[0],g=Date.now().toString(),d=l().extname(t.name),f=`${g}${d}`,p=`assets/images/${u}/${f}`;await (0,c.kP)(i,s,n,`assets/images/${u}`);let m=await (0,c.sT)(t),w=await i.repos.createOrUpdateFileContents({owner:s,repo:n,path:p,message:`Upload image: ${f}`,content:m});console.log(w),console.log("Image uploaded successfully");let y=w.data.content?.download_url;if(y){let t=y.split("/"),e=t[3],r=t[4],i=t.slice(6).join("/");return`https://github.com/${e}/${r}/blob/${a}/${i}?raw=true`}throw Error("Failed to get image URL")}catch(t){throw console.error("Error uploading image:",t),t}}async function y(t){let e,r;let i=null;if(t.length>40)try{i=(0,c.Pe)(t);let s=await (0,c.rP)(t);e=s.owner,r=s.repo}catch(i){console.error("Error getting authenticated user:",i),e=t,r=u}else e=t,r=u;let s=`https://github.com/${e}.png`,n=`https://github.com/${e}.png`,o=s,a=n;return i&&(o=await b(i,e,r,"assets/icon.jpg",s),a=await b(i,e,r,"assets/icon-144.jpg",n)),{iconPath:o,appleTouchIconPath:a}}async function b(t,e,r,i,s){try{return await t.repos.getContent({owner:e,repo:r,path:i}),`https://github.com/${e}/${r}/blob/main/${i}?raw=true`}catch(t){return console.warn(`No icon found in ${i}, using default:`,s),s}}},45854:(t,e,r)=>{r.d(e,{LK:()=>o,Pe:()=>s,QF:()=>g,XD:()=>u,gO:()=>a,kP:()=>l,rP:()=>n,sT:()=>c});var i=r(94545);function s(t){if(!t)throw Error("Access token is required");return new i.v({auth:t})}async function n(t){if(!t)throw Error("Access token is required");let e=s(t);try{let{data:t}=await e.users.getAuthenticated();return{owner:t.login,repo:"cici"}}catch(t){throw console.error("Error getting authenticated user:",t),Error("Failed to get authenticated user")}}async function o(t,e,r,i){let s=await t.repos.getContent({owner:e,repo:r,path:i});if(Array.isArray(s.data)||!("content"in s.data))throw Error("Unexpected response from GitHub API");return{content:Buffer.from(s.data.content,"base64").toString("utf-8"),sha:s.data.sha}}async function a(t,e,r,i,s,n,o){let a={owner:e,repo:r,path:i,message:s,content:Buffer.from(n).toString("base64")};o&&(a.sha=o),await t.repos.createOrUpdateFileContents(a)}async function l(t,e,r,i){try{await t.repos.getContent({owner:e,repo:r,path:i})}catch(s){if(s instanceof Error&&"status"in s&&404===s.status)await t.repos.createOrUpdateFileContents({owner:e,repo:r,path:`${i}/.gitkeep`,message:`Create directory: ${i}`,content:""});else throw s}}async function c(t){return new Promise((e,r)=>{let i=new FileReader;i.readAsDataURL(t),i.onload=()=>{"string"==typeof i.result?e(i.result.split(",")[1]):r(Error("Failed to convert file to base64"))},i.onerror=t=>r(t)})}function u(t){return t instanceof Error&&"status"in t&&404===t.status}async function g(t,e,r,i,s,n){try{await t.repos.getContent({owner:e,repo:r,path:i}),console.log(`File ${i} already exists.`)}catch(o){if(u(o)){console.log(`Creating file ${i}...`);try{await a(t,e,r,i,s,n),console.log(`File ${i} created successfully.`)}catch(t){throw console.error(`Error creating file ${i}:`,t),t}}else throw console.error(`Error checking file ${i}:`,o),o}}},54428:(t,e,r)=>{r.d(e,{Bi:()=>m,K4:()=>p,VD:()=>w});var i=r(92048),s=r(55315),n=r.n(s),o=r(94545),a=r(8502),l=r(31470),c=r(73194);let u="cici",g=new Map;function d(t){return l.CT.highlightsFile(t)}function h(t){if(!t||0===t.length||t.length>200||t.includes("/")||t.includes("\\")||t.includes("\0")||t.includes("..")||t.startsWith("."))throw Error(`Invalid postId: ${t}`)}function f(t){if("object"==typeof t&&null!==t&&"status"in t){let e=t.status;return"number"==typeof e?e:void 0}}class p{constructor(t){this.rootDir=t}absPath(t){return n().join(this.rootDir,l.Bf.highlightsFile(t))}async load(t){h(t);try{let e=await i.promises.readFile(this.absPath(t),"utf-8");return{data:a.x.parse(JSON.parse(e)),sha:null}}catch(e){if("ENOENT"===e?.code)return{data:(0,a.Bk)(t),sha:null};throw e}}async save(t,e,r,s){h(t);let o=a.x.parse(e),l=this.absPath(t);return await i.promises.mkdir(n().dirname(l),{recursive:!0}),await i.promises.writeFile(l,JSON.stringify(o,null,2),"utf-8"),{sha:""}}}class m{constructor(t,e){this.octokit=t,this.owner=e}async load(t){h(t);let e=g.get(t);if(e&&e.expiresAt>Date.now())return{data:e.data,sha:e.sha};let r=await this.readFile(t);if(!r){let e=(0,a.Bk)(t);return g.set(t,{data:e,sha:null,expiresAt:Date.now()+3e4}),{data:e,sha:null}}let i=a.x.parse(JSON.parse(r.content));return g.set(t,{data:i,sha:r.sha,expiresAt:Date.now()+3e4}),{data:i,sha:r.sha}}async save(t,e,r,i){h(t);let s=a.x.parse(e),n=Buffer.from(JSON.stringify(s,null,2)).toString("base64"),o=0,l=r;for(;o<3;)try{let e=await this.octokit.repos.createOrUpdateFileContents({owner:this.owner,repo:u,path:d(t),message:i,content:n,...l?{sha:l}:{}}),r=e.data.content?.sha??"";return g.set(t,{data:s,sha:r,expiresAt:Date.now()+3e4}),{sha:r}}catch(r){let e=f(r);if(409===e||422===e){g.delete(t),o++;let e=await this.readFile(t);l=e?.sha??null;continue}throw r}throw Error("Save failed after 3 retries due to write contention")}async readFile(t){try{let e=(await this.octokit.repos.getContent({owner:this.owner,repo:u,path:d(t)})).data;if(Array.isArray(e)||"file"!==e.type)return null;return{content:Buffer.from(e.content,"base64").toString("utf-8"),sha:e.sha}}catch(t){if(404===f(t))return null;throw t}}}function w(t={}){if((0,c.g)())return new p((0,c.$)());let e=t.ownerToken??process.env.HIGHLIGHTS_GH_TOKEN;if(!e)throw Error("HIGHLIGHTS_GH_TOKEN not configured. Inline comments require a service token in production.");let r=process.env.GITHUB_USERNAME;if(!r)throw Error("GITHUB_USERNAME not configured.");return new m(new o.v({auth:e}),r)}},8502:(t,e,r)=>{r.d(e,{Bk:()=>u,Om:()=>s,x:()=>c});var i=r(4037);let s=i.Ry({startOffset:i.Rx().int().nonnegative(),endOffset:i.Rx().int().nonnegative(),exact:i.Z_().min(1).max(1e3),prefix:i.Z_().max(64),suffix:i.Z_().max(64)}).refine(t=>t.endOffset>=t.startOffset,{message:"endOffset must be >= startOffset"}),n=i.IM(i.Z_(),i.IX(i.Z_())),o=i.Km(["ios","android","web"]),a=i.Ry({id:i.Z_().min(1).max(64),parentId:i.Z_().min(1).max(64).nullable(),body:i.Z_().min(1).max(2e3),authorName:i.Z_().max(40).nullable(),fingerprint:i.Z_().min(1).max(128),country:i.Z_().max(8),platform:o,reactions:n,resolved:i.O7(),createdAt:i.Z_().datetime(),hidden:i.O7(),hiddenReason:i.Z_().max(200).optional()}),l=i.Ry({id:i.Z_().min(1).max(64),anchor:s,thread:i.IX(a).min(1),resolved:i.O7(),createdAt:i.Z_().datetime()}),c=i.Ry({postId:i.Z_().min(1),highlights:i.IX(l),schemaVersion:i.i0(1)});function u(t){return{postId:t,highlights:[],schemaVersion:1}}},81336:(t,e,r)=>{r.d(e,{T:()=>g,X:()=>u});var i=r(92048),s=r.n(i),n=r(55315),o=r.n(n),a=r(73194);let l={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".avif":"image/avif"};function c(){return o().join((0,a.$)(),"assets")}async function u(t,e){let r=function(t,e){let r=o().extname(t||"").toLowerCase();if(r&&l[r])return r;if(e){let t=`.${e.split("/")[1]||""}`.toLowerCase();if(l[t])return t}return r||".png"}(t.name,t.type),i=o().posix.join("images",e.date),n=`${e.id}${r}`,a=o().join(c(),i);s().mkdirSync(a,{recursive:!0});let u=Buffer.from(await t.arrayBuffer());return s().writeFileSync(o().join(a,n),u),`/api/asset/${i}/${n}`}function g(t){if(t.some(t=>!t||".."===t||t.includes("\0")||t.includes("/")||t.includes("\\")))return null;let e=c(),r=o().resolve(e,...t);if(r!==e&&!r.startsWith(e+o().sep)||!s().existsSync(r)||!s().statSync(r).isFile())return null;let i=o().extname(r).toLowerCase();return{body:s().readFileSync(r),contentType:l[i]??"application/octet-stream"}}},88069:(t,e,r)=>{r.d(e,{D:()=>o});var i=r(55315),s=r.n(i);let n="cici";function o(t){let e=process.env.CICI_DIR;if(e)return{kind:"local",dir:s().resolve(e)};let r=process.env.CICI_REPO;if(r){let[e,i]=r.split("/");if(!e)throw Error(`Invalid CICI_REPO "${r}" — expected "owner/name".`);return{kind:"github",owner:e,repo:i||n,token:process.env.CICI_TOKEN||t||void 0}}return{kind:"github",owner:process.env.GITHUB_USERNAME||"metrue",repo:n,token:t||void 0}}},73194:(t,e,r)=>{r.d(e,{$:()=>a,g:()=>o});var i=r(55315),s=r.n(i),n=r(88069);function o(){return"local"===(0,n.D)().kind}function a(){let t=process.env.CICI_DIR;return t?s().resolve(t):s().join(process.cwd(),"sample-content")}},63607:(t,e,r)=>{r.d(e,{VH:()=>A});var i=r(88069),s=r(81336),n=r(54428),o=r(92048),a=r.n(o),l=r(55315),c=r.n(l);function u(t){let{frontmatter:e}=function(t){let e=t.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);return e?{frontmatter:e[1],body:e[2].replace(/^\n/,"")}:{frontmatter:"",body:t}}(t),r=e.match(/title:[ \t]*(.+)/),i=e.match(/date:[ \t]*(.+)/),s=e.match(/latitude:[ \t]*(.+)/),n=e.match(/longitude:[ \t]*(.+)/),o=e.match(/city:[ \t]*(.+)/),a=e.match(/street:[ \t]*(.+)/),l=e.match(/status:[ \t]*(.+)/),c=e.match(/publishedAt:[ \t]*(.+)/),u=e.match(/lastModified:[ \t]*(.+)/),g=s?.[1]?.trim(),d=n?.[1]?.trim(),h=g?parseFloat(g):NaN,f=d?parseFloat(d):NaN;return{title:r?r[1].trim():"",date:i?i[1].trim():new Date().toISOString(),discussions:function(t){let e=[],r=t.match(/external_discussions:\s*\n([\s\S]*?)(?=\n\w|$)/);if(!r)return e;let i=r[1].split("\n").filter(t=>t.trim()),s={};for(let t of i)t.includes("platform:")?(s.platform&&s.url&&e.push(s),s={platform:t.split(":")[1].trim()}):t.includes("url:")&&s.platform&&(s.url=t.split("url:")[1].trim());return s.platform&&s.url&&e.push(s),e}(e),...g&&!isNaN(h)&&{latitude:h},...d&&!isNaN(f)&&{longitude:f},...o&&o[1].trim()&&{city:o[1].trim()},...a&&a[1].trim()&&{street:a[1].trim()},...l&&{status:l[1].trim()},...c&&{publishedAt:c[1].trim()},...u&&{lastModified:u[1].trim()}}}var g=r(31470),d=r(73194),h=r(42491);class f{abs(t){return c().join((0,d.$)(),t)}get dataDir(){return(0,d.$)()}get blogDir(){return this.abs(g.Bf.blogDir())}async getBlogPosts(t=!1){try{if(!a().existsSync(this.blogDir))return console.log("Blog directory does not exist, returning empty array"),[];let e=a().readdirSync(this.blogDir).filter(t=>t.endsWith(".md")&&".gitkeep"!==t),r=[];for(let t of e){let e=await this.getBlogPost(t);e&&r.push(e)}let i=r.sort((t,e)=>new Date(e.date).getTime()-new Date(t.date).getTime());if(t)return i;return i.filter(t=>"published"===t.status)}catch(t){return console.error("Error reading local blog posts:",t),[]}}async getBlogPost(t){try{let e=c().join(this.blogDir,t);if(!a().existsSync(e))return null;let r=a().readFileSync(e,"utf-8"),i=u(r),s=this.getFirstImageURLFrom(r);return{id:t.replace(".md",""),title:i.title||t.replace(".md",""),content:r,imageUrl:s,date:i.date?new Date(i.date).toISOString():new Date().toISOString(),discussions:i.discussions.length>0?i.discussions:void 0,latitude:i.latitude,longitude:i.longitude,city:i.city,street:i.street,status:i.status||"published",publishedAt:i.publishedAt||i.date,lastModified:i.lastModified||i.date||new Date().toISOString()}}catch(e){return console.error(`Error reading blog post ${t}:`,e),null}}async getMemos(){try{let t=this.abs(g.Bf.memos());if(!a().existsSync(t))return console.log("memos.json not found, returning empty array"),[];let e=a().readFileSync(t,"utf-8"),r=JSON.parse(e);return Array.isArray(r)?r:[]}catch(t){return console.error("Error reading local memos:",t),[]}}async getSiteConfig(){try{let t=a().readFileSync(this.abs(g.Bf.siteConfig()),"utf-8");return JSON.parse(t)}catch{return null}}async getLinks(){try{let t=this.abs(g.Bf.siteConfig());if(!a().existsSync(t))return{};let e=a().readFileSync(t,"utf-8");return JSON.parse(e).links||{}}catch(t){return console.warn("Error reading local site config:",t),{}}}async getLikes(){try{let t=this.abs(g.Bf.likes());if(!a().existsSync(t))return console.log("likes.json not found, returning empty object"),{};let e=a().readFileSync(t,"utf-8"),r=JSON.parse(e);return"object"==typeof r&&null!==r?r:{}}catch(t){return console.error("Error reading local likes:",t),{}}}async updateLikes(t){try{let e=this.abs(g.Bf.likes()),r=JSON.stringify(t,null,2);a().writeFileSync(e,r,"utf-8"),console.log("Updated local likes data")}catch(t){throw console.error("Error updating local likes:",t),Error("Failed to update local likes data")}}async createMemo(t){try{let e=await this.getMemos(),r=[t,...e],i=this.abs(g.Bf.memos()),s=JSON.stringify(r,null,2);return a().writeFileSync(i,s,"utf-8"),console.log("Created new memo locally"),t}catch(t){throw console.error("Error creating local memo:",t),Error("Failed to create memo locally")}}async createBlogPost(t){let e=(0,h.gk)(t.title),r=this.abs(g.Bf.blogFile(`${e}.md`)),i=(0,h.X4)({title:t.title,date:new Date().toISOString(),content:t.content,status:t.status,location:t.location,discussions:t.discussions});return a().mkdirSync(c().dirname(r),{recursive:!0}),a().writeFileSync(r,i,"utf-8"),e}async updateBlogPost(t,e){let r=this.abs(g.Bf.blogPost(t)),i="";try{i=a().readFileSync(r,"utf-8")}catch{}let s=(0,h.xr)(i)??new Date().toISOString(),n=void 0!==e.status?e.status:(0,h.Mv)(i)??"published",o=(0,h.X4)({title:e.title,date:s,content:e.content,status:n,location:e.location,discussions:e.discussions});return a().mkdirSync(c().dirname(r),{recursive:!0}),a().writeFileSync(r,o,"utf-8"),t}async deleteBlogPost(t){let e=this.abs(g.Bf.blogPost(t));try{a().unlinkSync(e)}catch(t){if(t?.code!=="ENOENT")throw t}}async updateMemo(t,e){let r=await this.getMemos(),i=r.findIndex(e=>e.id===t);if(-1===i)throw Error("Memo not found");let s={...r[i],content:e},n=r.map((t,e)=>e===i?s:t);return a().writeFileSync(this.abs(g.Bf.memos()),JSON.stringify(n,null,2),"utf-8"),s}async deleteMemo(t){let e=(await this.getMemos()).filter(e=>e.id!==t);a().writeFileSync(this.abs(g.Bf.memos()),JSON.stringify(e,null,2),"utf-8")}async getDrafts(){return(await this.getBlogPosts(!0)).filter(t=>"draft"===t.status)}async getAllBlogPosts(){return this.getBlogPosts(!0)}async checkRepositoryHealth(){return a().existsSync(this.dataDir)}getFirstImageURLFrom(t){let e=/(https?:\/\/[^\s]+?\.(?:png|jpg|jpeg|gif|webp))/i.exec(t);if(e){let t=e[1];return t.startsWith("https://github")?`${t}?raw=true`:t}return null}}class p{constructor(t){this.dir=t,this.client=new f}get label(){return`local: ${this.dir}`}canWrite(){return!0}getBlogPosts(t){return this.client.getBlogPosts(t?.includeDrafts??!1)}async getBlogPost(t){return await this.client.getBlogPost(`${t}.md`)??void 0}getMemos(){return this.client.getMemos()}getLinks(){return this.client.getLinks()}getLikes(){return this.client.getLikes()}getSiteConfig(){return this.client.getSiteConfig()}createBlogPost(t){return this.client.createBlogPost(t)}updateBlogPost(t,e){return this.client.updateBlogPost(t,e)}deleteBlogPost(t){return this.client.deleteBlogPost(t)}createMemo(t){return this.client.createMemo(t)}updateMemo(t,e){return this.client.updateMemo(t,e)}deleteMemo(t){return this.client.deleteMemo(t)}updateLikes(t){return this.client.updateLikes(t)}uploadAsset(t){return(0,s.X)(t,{date:new Date().toISOString().split("T")[0],id:Date.now().toString()})}highlights(){return new n.K4(this.dir)}}var m=r(45854),w=r(82575),y=r(94545);let b=t=>{let e=/(https?:\/\/[^\s]+?\.(?:png|jpg|jpeg|gif|webp))/i.exec(t);if(e){let t=e[1];return t.startsWith("https://github")?`${t}?raw=true`:t}return null};class k{constructor(t,e="cici"){this.accessToken=t,this.repo=e}async getSafeOwner(t){if(t&&"true"!==t)return t;if(this.accessToken)try{let t=new y.v({auth:this.accessToken}),{data:e}=await t.users.getAuthenticated();if(e.login&&"true"!==e.login)return e.login}catch(t){console.warn("Failed to get authenticated user:",t)}return process.env.GITHUB_USERNAME||"metrue"}async getBlogPosts(t,e=!1){let r=this.accessToken?new y.v({auth:this.accessToken}):new y.v,i=await this.getSafeOwner(t);try{let t=await r.repos.getContent({owner:i,repo:this.repo,path:g.CT.blogDir()});if(!Array.isArray(t.data))return console.warn("Unexpected response from GitHub API: data is not an array"),[];let s=(await Promise.all(t.data.filter(t=>"file"===t.type&&".gitkeep"!==t.name&&t.name.endsWith(".md")).map(async t=>this.getBlogPost(t.name,i)))).filter(t=>void 0!==t);if(e&&this.accessToken)return s;return s.filter(t=>"published"===t.status)}catch(t){if(console.error("Error fetching blog posts:",t),t instanceof Error&&"status"in t&&404===t.status)return console.log("Blog directory does not exist, returning empty array"),[];throw t}}async getBlogPost(t,e){let r=this.accessToken?new y.v({auth:this.accessToken}):new y.v,i=await this.getSafeOwner(e),s=await r.repos.getContent({owner:i,repo:this.repo,path:g.CT.blogFile(t)});if("content"in s.data){let e=Buffer.from(s.data.content,"base64").toString("utf-8"),r=u(e);return{id:t.replace(".md",""),title:r.title?decodeURIComponent(r.title):decodeURIComponent(t.replace(".md","")),content:e,imageUrl:b(e),date:r.date?new Date(r.date).toISOString():new Date().toISOString(),discussions:r.discussions.length>0?r.discussions:void 0,latitude:r.latitude,longitude:r.longitude,city:r.city,street:r.street,status:r.status||"published",publishedAt:r.publishedAt||r.date,lastModified:r.lastModified||r.date||new Date().toISOString()}}}async getMemos(t){let e=this.accessToken?new y.v({auth:this.accessToken}):new y.v,r=await this.getSafeOwner(t);try{let t=await e.repos.getContent({owner:r,repo:this.repo,path:g.CT.memos()});if(Array.isArray(t.data)||!("content"in t.data))return[];let i=Buffer.from(t.data.content,"base64").toString("utf-8");return JSON.parse(i)}catch(t){return console.error("Error fetching public memos:",t),[]}}async getLinks(t){let e=this.accessToken?new y.v({auth:this.accessToken}):new y.v,r=await this.getSafeOwner(t);try{let t=await e.repos.getContent({owner:r,repo:this.repo,path:g.CT.siteConfig()});if(Array.isArray(t.data)||!("content"in t.data))return{};let i=Buffer.from(t.data.content,"base64").toString("utf-8");return JSON.parse(i).links||{}}catch(t){return console.warn("Error fetching links:",t),{}}}async getLikes(t){let e=this.accessToken?new y.v({auth:this.accessToken}):new y.v,r=await this.getSafeOwner(t);try{let t=await e.repos.getContent({owner:r,repo:this.repo,path:g.CT.likes()});if(Array.isArray(t.data)||!("content"in t.data))return{};let i=Buffer.from(t.data.content,"base64").toString("utf-8");return JSON.parse(i)}catch(t){if(console.error("Error fetching likes:",t),t instanceof Error&&"status"in t&&404===t.status)return{};throw t}}async updateLikes(t,e){let r=new y.v({auth:this.accessToken}),i=await this.getSafeOwner(e);try{let e;try{let t=await r.repos.getContent({owner:i,repo:this.repo,path:g.CT.likes()});!Array.isArray(t.data)&&"sha"in t.data&&(e=t.data.sha)}catch(t){}await r.repos.createOrUpdateFileContents({owner:i,repo:this.repo,path:g.CT.likes(),message:`Update likes data - ${new Date().toISOString()}`,content:Buffer.from(JSON.stringify(t,null,2)).toString("base64"),...e&&{sha:e}})}catch(t){throw console.error("Error updating likes:",t),Error("Failed to update likes data")}}async getDrafts(t){return(await this.getBlogPosts(t,!0)).filter(t=>"draft"===t.status)}async getAllBlogPosts(t){return this.getBlogPosts(t,!0)}}let S=(t,e)=>new k(t,e),$=t=>{let e=/(https?:\/\/[^\s]+?\.(?:png|jpg|jpeg|gif|webp))/i.exec(t);if(e){let t=e[1];return t.startsWith("https://github")?`${t}?raw=true`:t}return null};class C{constructor(t,e="cici"){this.owner=t,this.baseUrl=`https://raw.githubusercontent.com/${t}/${e}/main`}async getBlogPosts(t=!1){try{try{let e=await fetch(`${this.baseUrl}/${g.CT.blogManifest()}`);if(e.ok){let r=await e.json(),i=r.files||[...r.published||[],...r.drafts||[]],s=(await Promise.all(i.map(t=>this.getBlogPost(t)))).filter(t=>null!==t);if(t)return s;return s.filter(t=>"published"===t.status)}}catch{}return console.warn("Blog manifest not found, returning empty array"),[]}catch(t){throw console.error("Error fetching blog posts via raw URLs:",t),t}}async getBlogPost(t){try{let e=await fetch(`${this.baseUrl}/${g.CT.blogFile(t)}`);if(!e.ok){if(404===e.status)return null;throw Error(`HTTP ${e.status}: ${e.statusText}`)}let r=await e.text(),i=u(r);return{id:t.replace(".md",""),title:i.title?decodeURIComponent(i.title.trim()):decodeURIComponent(t.replace(".md","")),content:r,imageUrl:$(r),date:i.date?new Date(i.date.trim()).toISOString():new Date().toISOString(),discussions:i.discussions.length>0?i.discussions:void 0,latitude:i.latitude,longitude:i.longitude,city:i.city,street:i.street,status:i.status||"published",publishedAt:i.publishedAt||i.date,lastModified:i.lastModified||i.date||new Date().toISOString()}}catch(e){return console.error(`Error fetching blog post ${t}:`,e),null}}async getMemos(){try{let t=await fetch(`${this.baseUrl}/${g.CT.memos()}`);if(!t.ok){if(404===t.status)return console.log("memos.json not found, returning empty array"),[];throw Error(`HTTP ${t.status}: ${t.statusText}`)}let e=await t.json();return Array.isArray(e)?e:[]}catch(t){return console.error("Error fetching memos via raw URLs:",t),[]}}async getLinks(){try{let t=await fetch(`${this.baseUrl}/${g.CT.siteConfig()}`);if(!t.ok){if(404===t.status)return{};throw Error(`HTTP ${t.status}: ${t.statusText}`)}return(await t.json()).links||{}}catch(t){return console.warn("Error fetching links via raw URLs:",t),{}}}async getLikes(){try{let t=await fetch(`${this.baseUrl}/${g.CT.likes()}`);if(!t.ok){if(404===t.status)return console.log("likes.json not found, returning empty object"),{};throw Error(`HTTP ${t.status}: ${t.statusText}`)}let e=await t.json();return"object"==typeof e&&null!==e?e:{}}catch(t){return console.error("Error fetching likes via raw URLs:",t),{}}}async getDrafts(){return(await this.getBlogPosts(!0)).filter(t=>"draft"===t.status)}async getAllBlogPosts(){return this.getBlogPosts(!0)}async checkRepositoryHealth(){try{return(await fetch(`${this.baseUrl}/README.md`)).ok}catch{return!1}}}class E extends Error{constructor(t="This cici instance is read-only. Provide a token to enable editing."){super(t),this.name="ReadOnlyError"}}class B{constructor(t){this.owner=t.owner,this.repo=t.repo,this.token=t.token,this.reader=new C(t.owner,t.repo),this.apiReader=t.token?S(t.token,t.repo):void 0,this.target={owner:t.owner,repo:t.repo}}async fresh(t,e){if(this.apiReader)try{return await t(this.apiReader)}catch(t){console.warn("GitHub API read failed, falling back to raw URL:",t)}return e()}get label(){return`github: ${this.owner}/${this.repo}${this.token?"":" (read-only)"}`}canWrite(){return!!this.token}requireToken(){if(!this.token)throw new E;return this.token}writeOctokit(){return(0,m.Pe)(this.requireToken())}getBlogPosts(t){let e=t?.includeDrafts??!1;return this.fresh(t=>t.getBlogPosts(this.owner,e),()=>this.reader.getBlogPosts(e))}async getBlogPost(t){return await this.fresh(e=>e.getBlogPost(`${t}.md`,this.owner),()=>this.reader.getBlogPost(`${t}.md`))??void 0}getMemos(){return this.fresh(t=>t.getMemos(this.owner),()=>this.reader.getMemos())}getLinks(){return this.fresh(t=>t.getLinks(this.owner),()=>this.reader.getLinks())}getLikes(){return this.fresh(t=>t.getLikes(this.owner),()=>this.reader.getLikes())}async getSiteConfig(){if(this.token)try{let t=(0,m.Pe)(this.token),e=await t.repos.getContent({owner:this.owner,repo:this.repo,path:g.CT.siteConfig()});if(!Array.isArray(e.data)&&"content"in e.data){let t=Buffer.from(e.data.content,"base64").toString("utf-8");return JSON.parse(t)}}catch(t){console.warn("GitHub API site-config read failed, falling back to raw URL:",t)}try{let t=`https://raw.githubusercontent.com/${this.owner}/${this.repo}/main/${g.CT.siteConfig()}`,e=await fetch(t);if(!e.ok)return null;return await e.json()}catch{return null}}async createBlogPost(t){let e=this.requireToken();return await (0,w.I7)(t.title,t.content,e,t.discussions,t.location,t.status,this.target),(0,h.gk)(t.title)}async updateBlogPost(t,e){let r=this.requireToken();return await (0,w.Kx)(t,e.title,e.content,r,e.discussions,e.location,e.status,this.target),t}async deleteBlogPost(t){await (0,w.XD)(t,this.requireToken(),this.target)}async uploadAsset(t){return(0,w.Ix)(t,this.requireToken(),this.target)}async createMemo(t){let e=g.CT.memos(),{data:r,sha:i}=await this.getJsonFile(e),s=Array.isArray(r)?r:[];return await this.putFile(e,JSON.stringify([t,...s],null,2),`Add memo ${t.id}`,i),t}async updateMemo(t,e){let r=g.CT.memos(),{data:i,sha:s}=await this.getJsonFile(r),n=Array.isArray(i)?i:[],o=n.findIndex(e=>e.id===t);if(-1===o)throw Error("Memo not found");let a={...n[o],content:e},l=n.map((t,e)=>e===o?a:t);return await this.putFile(r,JSON.stringify(l,null,2),`Update memo ${t}`,s),a}async deleteMemo(t){let e=g.CT.memos(),{data:r,sha:i}=await this.getJsonFile(e),s=Array.isArray(r)?r:[];await this.putFile(e,JSON.stringify(s.filter(e=>e.id!==t),null,2),`Delete memo ${t}`,i)}async updateLikes(t){let e=g.CT.likes(),{sha:r}=await this.getJsonFile(e);await this.putFile(e,JSON.stringify(t,null,2),"Update likes",r)}highlights(){return new n.Bi((0,m.Pe)(this.token),this.owner)}async getJsonFile(t){let e=this.writeOctokit();try{let r=await e.repos.getContent({owner:this.owner,repo:this.repo,path:t});if(Array.isArray(r.data)||!("content"in r.data))return{data:null};let i=Buffer.from(r.data.content,"base64").toString("utf-8");return{data:JSON.parse(i),sha:r.data.sha}}catch(t){if(t?.status===404)return{data:null};throw t}}putFile(t,e,r,i){return(0,m.gO)(this.writeOctokit(),this.owner,this.repo,t,r,e,i)}}function A(t){var e;return"local"===(e=(0,i.D)(t)).kind?new p(e.dir):new B({owner:e.owner,repo:e.repo,token:e.token})}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=719,exports.ids=[719],exports.modules={90455:(e,t,n)=>{n.d(t,{G:()=>s,L:()=>i});var r=n(45609);async function s(){let e=await (0,r.getServerSession)(i);return e?(e.accessToken?console.log("Session found with access token"):console.log("Session found, but no access token"),e):(console.log("No session found"),null)}let i={providers:[(0,n(77210).Z)({clientId:process.env.GITHUB_ID,clientSecret:process.env.GITHUB_SECRET,authorization:{params:{scope:"public_repo workflow"}}})],callbacks:{async jwt({token:e,account:t,profile:n}){t&&t.access_token&&(e.accessToken=t.access_token);let r=n&&"object"==typeof n&&"login"in n?n.login:void 0,s=t&&"object"==typeof t&&"username"in t?t.username:void 0;return(r||s)&&(e.username=r??s),e},session:async({session:e,token:t})=>(e.accessToken=t.accessToken,e.user&&(e.user.username=t.username),e)},secret:process.env.NEXTAUTH_SECRET,debug:!1}},31470:(e,t,n)=>{n.d(t,{Bf:()=>s,CT:()=>o});let r="data",s={rootKeep:()=>".gitkeep",blogDir:()=>"blog",blogDirKeep:()=>"blog/.gitkeep",blogPost:e=>`blog/${e}.md`,blogFile:e=>`blog/${e}`,blogManifest:()=>"blog-manifest.json",memos:()=>"memos.json",likes:()=>"likes.json",siteConfig:()=>"site-config.json",highlightsDir:()=>"highlights",highlightsFile:e=>`highlights/${e}.json`},i=e=>`${r}/${e}`,o={root:()=>r,rootKeep:()=>i(s.rootKeep()),blogDir:()=>i(s.blogDir()),blogDirKeep:()=>i(s.blogDirKeep()),blogPost:e=>i(s.blogPost(e)),blogFile:e=>i(s.blogFile(e)),blogManifest:()=>i(s.blogManifest()),memos:()=>i(s.memos()),likes:()=>i(s.likes()),siteConfig:()=>i(s.siteConfig()),highlightsDir:()=>i(s.highlightsDir()),highlightsFile:e=>i(s.highlightsFile(e))}},54428:(e,t,n)=>{n.d(t,{Bi:()=>m,K4:()=>p,VD:()=>w});var r=n(92048),s=n(55315),i=n.n(s),o=n(94545),a=n(8502),l=n(31470),c=n(73194);let u="cici",h=new Map;function f(e){return l.CT.highlightsFile(e)}function d(e){if(!e||0===e.length||e.length>200||e.includes("/")||e.includes("\\")||e.includes("\0")||e.includes("..")||e.startsWith("."))throw Error(`Invalid postId: ${e}`)}function g(e){if("object"==typeof e&&null!==e&&"status"in e){let t=e.status;return"number"==typeof t?t:void 0}}class p{constructor(e){this.rootDir=e}absPath(e){return i().join(this.rootDir,l.Bf.highlightsFile(e))}async load(e){d(e);try{let t=await r.promises.readFile(this.absPath(e),"utf-8");return{data:a.x.parse(JSON.parse(t)),sha:null}}catch(t){if("ENOENT"===t?.code)return{data:(0,a.Bk)(e),sha:null};throw t}}async save(e,t,n,s){d(e);let o=a.x.parse(t),l=this.absPath(e);return await r.promises.mkdir(i().dirname(l),{recursive:!0}),await r.promises.writeFile(l,JSON.stringify(o,null,2),"utf-8"),{sha:""}}}class m{constructor(e,t){this.octokit=e,this.owner=t}async load(e){d(e);let t=h.get(e);if(t&&t.expiresAt>Date.now())return{data:t.data,sha:t.sha};let n=await this.readFile(e);if(!n){let t=(0,a.Bk)(e);return h.set(e,{data:t,sha:null,expiresAt:Date.now()+3e4}),{data:t,sha:null}}let r=a.x.parse(JSON.parse(n.content));return h.set(e,{data:r,sha:n.sha,expiresAt:Date.now()+3e4}),{data:r,sha:n.sha}}async save(e,t,n,r){d(e);let s=a.x.parse(t),i=Buffer.from(JSON.stringify(s,null,2)).toString("base64"),o=0,l=n;for(;o<3;)try{let t=await this.octokit.repos.createOrUpdateFileContents({owner:this.owner,repo:u,path:f(e),message:r,content:i,...l?{sha:l}:{}}),n=t.data.content?.sha??"";return h.set(e,{data:s,sha:n,expiresAt:Date.now()+3e4}),{sha:n}}catch(n){let t=g(n);if(409===t||422===t){h.delete(e),o++;let t=await this.readFile(e);l=t?.sha??null;continue}throw n}throw Error("Save failed after 3 retries due to write contention")}async readFile(e){try{let t=(await this.octokit.repos.getContent({owner:this.owner,repo:u,path:f(e)})).data;if(Array.isArray(t)||"file"!==t.type)return null;return{content:Buffer.from(t.content,"base64").toString("utf-8"),sha:t.sha}}catch(e){if(404===g(e))return null;throw e}}}function w(e={}){if((0,c.g)())return new p((0,c.$)());let t=e.ownerToken??process.env.HIGHLIGHTS_GH_TOKEN;if(!t)throw Error("HIGHLIGHTS_GH_TOKEN not configured. Inline comments require a service token in production.");let n=process.env.GITHUB_USERNAME;if(!n)throw Error("GITHUB_USERNAME not configured.");return new m(new o.v({auth:t}),n)}},8502:(e,t,n)=>{n.d(t,{Bk:()=>u,Om:()=>s,x:()=>c});var r=n(4037);let s=r.Ry({startOffset:r.Rx().int().nonnegative(),endOffset:r.Rx().int().nonnegative(),exact:r.Z_().min(1).max(1e3),prefix:r.Z_().max(64),suffix:r.Z_().max(64)}).refine(e=>e.endOffset>=e.startOffset,{message:"endOffset must be >= startOffset"}),i=r.IM(r.Z_(),r.IX(r.Z_())),o=r.Km(["ios","android","web"]),a=r.Ry({id:r.Z_().min(1).max(64),parentId:r.Z_().min(1).max(64).nullable(),body:r.Z_().min(1).max(2e3),authorName:r.Z_().max(40).nullable(),fingerprint:r.Z_().min(1).max(128),country:r.Z_().max(8),platform:o,reactions:i,resolved:r.O7(),createdAt:r.Z_().datetime(),hidden:r.O7(),hiddenReason:r.Z_().max(200).optional()}),l=r.Ry({id:r.Z_().min(1).max(64),anchor:s,thread:r.IX(a).min(1),resolved:r.O7(),createdAt:r.Z_().datetime()}),c=r.Ry({postId:r.Z_().min(1),highlights:r.IX(l),schemaVersion:r.i0(1)});function u(e){return{postId:e,highlights:[],schemaVersion:1}}},54904:(e,t,n)=>{n.d(t,{AH:()=>f,Cg:()=>u,Kz:()=>w,N9:()=>a,W4:()=>c,bH:()=>m,fT:()=>d,mF:()=>h,qF:()=>l});var r=n(87070),s=n(69271),i=n(90455),o=n(73194);function a(e,t){return r.NextResponse.json({success:!0,data:e},t)}function l(e,t=400){return r.NextResponse.json({success:!1,error:e},{status:t})}function c(e,t="Internal server error",n=500){return console.error("[highlights]",e),l(e instanceof Error&&e.message?e.message:t,n)}function u(e){let t=(0,s.H9)(e),n=(0,s.zC)(e),r=(0,s.D4)(t);return{fingerprint:(0,s.F6)(r,n),country:n.country,platform:(0,s.tz)(n.userAgent)}}async function h(){if((0,o.g)())return!0;let e=await (0,i.G)(),t=process.env.GITHUB_USERNAME;if(!t)return!1;if(e?.user?.username)return e.user.username===t;if(e?.accessToken){let n=await p(e.accessToken);if(n)return n===t}return!1}async function f(){let e=await (0,i.G)();return e?.accessToken}async function d(){let e=await (0,i.G)();if(e?.user?.username)return e.user.username;if(e?.accessToken){let t=await p(e.accessToken);if(t)return t}return e?.user?.name??null}let g=new Map;async function p(e){let t=g.get(e);if(t&&t.expiresAt>Date.now())return t.login;try{let t=await fetch("https://api.github.com/user",{headers:{Authorization:`Bearer ${e}`,Accept:"application/vnd.github+json"}});if(!t.ok)return null;let n=await t.json();if(!n.login)return null;return g.set(e,{login:n.login,expiresAt:Date.now()+6e5}),n.login}catch{return null}}class m extends Error{}async function w(e,t){let n;try{n=await e.json()}catch{throw new m("Invalid JSON body")}let r=t.safeParse(n);if(!r.success)throw new m(r.error.issues.map(e=>`${e.path.join(".")}: ${e.message}`).join("; "));return r.data}},69271:(e,t,n)=>{n.d(t,{D4:()=>a,Ed:()=>u,F6:()=>c,H9:()=>i,JS:()=>h,SS:()=>d,Wz:()=>f,tz:()=>l,zC:()=>o});var r=n(84770),s=n.n(r);function i(e){let t=e.headers.get("x-forwarded-for"),n=e.headers.get("x-real-ip");return e.headers.get("cf-connecting-ip")||t?.split(",")[0]?.trim()||n||e.ip||"127.0.0.1"}function o(e){let t=e.headers.get("accept-language")||"",n=e.headers.get("user-agent")||"",r=t.split(",")[0]?.trim()||"unknown";return{country:r.includes("-")?r.split("-")[1]?.toUpperCase():"UNKNOWN",language:r,userAgent:n}}function a(e){let t=process.env.LIKE_HASH_SALT||"cofe-likes-salt-2025";return s().createHash("sha256").update(e+t).digest("hex").substring(0,12)}function l(e){return/iPhone|iPad|iPod/.test(e)?"ios":/Android/.test(e)?"android":"web"}function c(e,t){let n=l(t.userAgent),r=function(e){let t=process.env.LIKE_HASH_SALT||"cofe-likes-salt-2025";return s().createHash("sha256").update(e+t).digest("hex").substring(0,8)}(t.userAgent);return`${e}_${t.country}_${n}_${r}`}function u(e,t){return`${e}_${t}`}function h(e,t,n){let r=Object.keys(e[t]||{}).find(e=>e.startsWith(`${n}_`));return{hasLiked:!!r,existingLikeId:r}}function f(e,t,n){let r=Object.values(e[t]||{}),s=Array.from(new Set(r.map(e=>e.country).filter(e=>"UNKNOWN"!==e))),{hasLiked:i}=h(e,t,n);return{count:r.length,countries:s,userLiked:i}}function d(e,t){return`${e}_${t}`}},88069:(e,t,n)=>{n.d(t,{D:()=>o});var r=n(55315),s=n.n(r);let i="cici";function o(e){let t=process.env.CICI_DIR;if(t)return{kind:"local",dir:s().resolve(t)};let n=process.env.CICI_REPO;if(n){let[t,r]=n.split("/");if(!t)throw Error(`Invalid CICI_REPO "${n}" — expected "owner/name".`);return{kind:"github",owner:t,repo:r||i,token:process.env.CICI_TOKEN||e||void 0}}return{kind:"github",owner:process.env.GITHUB_USERNAME||"metrue",repo:i,token:e||void 0}}},73194:(e,t,n)=>{n.d(t,{$:()=>a,g:()=>o});var r=n(55315),s=n.n(r),i=n(88069);function o(){return"local"===(0,i.D)().kind}function a(){let e=process.env.CICI_DIR;return e?s().resolve(e):s().join(process.cwd(),"
|
|
1
|
+
"use strict";exports.id=719,exports.ids=[719],exports.modules={90455:(e,t,n)=>{n.d(t,{G:()=>s,L:()=>i});var r=n(45609);async function s(){let e=await (0,r.getServerSession)(i);return e?(e.accessToken?console.log("Session found with access token"):console.log("Session found, but no access token"),e):(console.log("No session found"),null)}let i={providers:[(0,n(77210).Z)({clientId:process.env.GITHUB_ID,clientSecret:process.env.GITHUB_SECRET,authorization:{params:{scope:"public_repo workflow"}}})],callbacks:{async jwt({token:e,account:t,profile:n}){t&&t.access_token&&(e.accessToken=t.access_token);let r=n&&"object"==typeof n&&"login"in n?n.login:void 0,s=t&&"object"==typeof t&&"username"in t?t.username:void 0;return(r||s)&&(e.username=r??s),e},session:async({session:e,token:t})=>(e.accessToken=t.accessToken,e.user&&(e.user.username=t.username),e)},secret:process.env.NEXTAUTH_SECRET,debug:!1}},31470:(e,t,n)=>{n.d(t,{Bf:()=>s,CT:()=>o});let r="data",s={rootKeep:()=>".gitkeep",blogDir:()=>"blog",blogDirKeep:()=>"blog/.gitkeep",blogPost:e=>`blog/${e}.md`,blogFile:e=>`blog/${e}`,blogManifest:()=>"blog-manifest.json",memos:()=>"memos.json",likes:()=>"likes.json",siteConfig:()=>"site-config.json",highlightsDir:()=>"highlights",highlightsFile:e=>`highlights/${e}.json`},i=e=>`${r}/${e}`,o={root:()=>r,rootKeep:()=>i(s.rootKeep()),blogDir:()=>i(s.blogDir()),blogDirKeep:()=>i(s.blogDirKeep()),blogPost:e=>i(s.blogPost(e)),blogFile:e=>i(s.blogFile(e)),blogManifest:()=>i(s.blogManifest()),memos:()=>i(s.memos()),likes:()=>i(s.likes()),siteConfig:()=>i(s.siteConfig()),highlightsDir:()=>i(s.highlightsDir()),highlightsFile:e=>i(s.highlightsFile(e))}},54428:(e,t,n)=>{n.d(t,{Bi:()=>m,K4:()=>p,VD:()=>w});var r=n(92048),s=n(55315),i=n.n(s),o=n(94545),a=n(8502),l=n(31470),c=n(73194);let u="cici",h=new Map;function f(e){return l.CT.highlightsFile(e)}function d(e){if(!e||0===e.length||e.length>200||e.includes("/")||e.includes("\\")||e.includes("\0")||e.includes("..")||e.startsWith("."))throw Error(`Invalid postId: ${e}`)}function g(e){if("object"==typeof e&&null!==e&&"status"in e){let t=e.status;return"number"==typeof t?t:void 0}}class p{constructor(e){this.rootDir=e}absPath(e){return i().join(this.rootDir,l.Bf.highlightsFile(e))}async load(e){d(e);try{let t=await r.promises.readFile(this.absPath(e),"utf-8");return{data:a.x.parse(JSON.parse(t)),sha:null}}catch(t){if("ENOENT"===t?.code)return{data:(0,a.Bk)(e),sha:null};throw t}}async save(e,t,n,s){d(e);let o=a.x.parse(t),l=this.absPath(e);return await r.promises.mkdir(i().dirname(l),{recursive:!0}),await r.promises.writeFile(l,JSON.stringify(o,null,2),"utf-8"),{sha:""}}}class m{constructor(e,t){this.octokit=e,this.owner=t}async load(e){d(e);let t=h.get(e);if(t&&t.expiresAt>Date.now())return{data:t.data,sha:t.sha};let n=await this.readFile(e);if(!n){let t=(0,a.Bk)(e);return h.set(e,{data:t,sha:null,expiresAt:Date.now()+3e4}),{data:t,sha:null}}let r=a.x.parse(JSON.parse(n.content));return h.set(e,{data:r,sha:n.sha,expiresAt:Date.now()+3e4}),{data:r,sha:n.sha}}async save(e,t,n,r){d(e);let s=a.x.parse(t),i=Buffer.from(JSON.stringify(s,null,2)).toString("base64"),o=0,l=n;for(;o<3;)try{let t=await this.octokit.repos.createOrUpdateFileContents({owner:this.owner,repo:u,path:f(e),message:r,content:i,...l?{sha:l}:{}}),n=t.data.content?.sha??"";return h.set(e,{data:s,sha:n,expiresAt:Date.now()+3e4}),{sha:n}}catch(n){let t=g(n);if(409===t||422===t){h.delete(e),o++;let t=await this.readFile(e);l=t?.sha??null;continue}throw n}throw Error("Save failed after 3 retries due to write contention")}async readFile(e){try{let t=(await this.octokit.repos.getContent({owner:this.owner,repo:u,path:f(e)})).data;if(Array.isArray(t)||"file"!==t.type)return null;return{content:Buffer.from(t.content,"base64").toString("utf-8"),sha:t.sha}}catch(e){if(404===g(e))return null;throw e}}}function w(e={}){if((0,c.g)())return new p((0,c.$)());let t=e.ownerToken??process.env.HIGHLIGHTS_GH_TOKEN;if(!t)throw Error("HIGHLIGHTS_GH_TOKEN not configured. Inline comments require a service token in production.");let n=process.env.GITHUB_USERNAME;if(!n)throw Error("GITHUB_USERNAME not configured.");return new m(new o.v({auth:t}),n)}},8502:(e,t,n)=>{n.d(t,{Bk:()=>u,Om:()=>s,x:()=>c});var r=n(4037);let s=r.Ry({startOffset:r.Rx().int().nonnegative(),endOffset:r.Rx().int().nonnegative(),exact:r.Z_().min(1).max(1e3),prefix:r.Z_().max(64),suffix:r.Z_().max(64)}).refine(e=>e.endOffset>=e.startOffset,{message:"endOffset must be >= startOffset"}),i=r.IM(r.Z_(),r.IX(r.Z_())),o=r.Km(["ios","android","web"]),a=r.Ry({id:r.Z_().min(1).max(64),parentId:r.Z_().min(1).max(64).nullable(),body:r.Z_().min(1).max(2e3),authorName:r.Z_().max(40).nullable(),fingerprint:r.Z_().min(1).max(128),country:r.Z_().max(8),platform:o,reactions:i,resolved:r.O7(),createdAt:r.Z_().datetime(),hidden:r.O7(),hiddenReason:r.Z_().max(200).optional()}),l=r.Ry({id:r.Z_().min(1).max(64),anchor:s,thread:r.IX(a).min(1),resolved:r.O7(),createdAt:r.Z_().datetime()}),c=r.Ry({postId:r.Z_().min(1),highlights:r.IX(l),schemaVersion:r.i0(1)});function u(e){return{postId:e,highlights:[],schemaVersion:1}}},54904:(e,t,n)=>{n.d(t,{AH:()=>f,Cg:()=>u,Kz:()=>w,N9:()=>a,W4:()=>c,bH:()=>m,fT:()=>d,mF:()=>h,qF:()=>l});var r=n(87070),s=n(69271),i=n(90455),o=n(73194);function a(e,t){return r.NextResponse.json({success:!0,data:e},t)}function l(e,t=400){return r.NextResponse.json({success:!1,error:e},{status:t})}function c(e,t="Internal server error",n=500){return console.error("[highlights]",e),l(e instanceof Error&&e.message?e.message:t,n)}function u(e){let t=(0,s.H9)(e),n=(0,s.zC)(e),r=(0,s.D4)(t);return{fingerprint:(0,s.F6)(r,n),country:n.country,platform:(0,s.tz)(n.userAgent)}}async function h(){if((0,o.g)())return!0;let e=await (0,i.G)(),t=process.env.GITHUB_USERNAME;if(!t)return!1;if(e?.user?.username)return e.user.username===t;if(e?.accessToken){let n=await p(e.accessToken);if(n)return n===t}return!1}async function f(){let e=await (0,i.G)();return e?.accessToken}async function d(){let e=await (0,i.G)();if(e?.user?.username)return e.user.username;if(e?.accessToken){let t=await p(e.accessToken);if(t)return t}return e?.user?.name??null}let g=new Map;async function p(e){let t=g.get(e);if(t&&t.expiresAt>Date.now())return t.login;try{let t=await fetch("https://api.github.com/user",{headers:{Authorization:`Bearer ${e}`,Accept:"application/vnd.github+json"}});if(!t.ok)return null;let n=await t.json();if(!n.login)return null;return g.set(e,{login:n.login,expiresAt:Date.now()+6e5}),n.login}catch{return null}}class m extends Error{}async function w(e,t){let n;try{n=await e.json()}catch{throw new m("Invalid JSON body")}let r=t.safeParse(n);if(!r.success)throw new m(r.error.issues.map(e=>`${e.path.join(".")}: ${e.message}`).join("; "));return r.data}},69271:(e,t,n)=>{n.d(t,{D4:()=>a,Ed:()=>u,F6:()=>c,H9:()=>i,JS:()=>h,SS:()=>d,Wz:()=>f,tz:()=>l,zC:()=>o});var r=n(84770),s=n.n(r);function i(e){let t=e.headers.get("x-forwarded-for"),n=e.headers.get("x-real-ip");return e.headers.get("cf-connecting-ip")||t?.split(",")[0]?.trim()||n||e.ip||"127.0.0.1"}function o(e){let t=e.headers.get("accept-language")||"",n=e.headers.get("user-agent")||"",r=t.split(",")[0]?.trim()||"unknown";return{country:r.includes("-")?r.split("-")[1]?.toUpperCase():"UNKNOWN",language:r,userAgent:n}}function a(e){let t=process.env.LIKE_HASH_SALT||"cofe-likes-salt-2025";return s().createHash("sha256").update(e+t).digest("hex").substring(0,12)}function l(e){return/iPhone|iPad|iPod/.test(e)?"ios":/Android/.test(e)?"android":"web"}function c(e,t){let n=l(t.userAgent),r=function(e){let t=process.env.LIKE_HASH_SALT||"cofe-likes-salt-2025";return s().createHash("sha256").update(e+t).digest("hex").substring(0,8)}(t.userAgent);return`${e}_${t.country}_${n}_${r}`}function u(e,t){return`${e}_${t}`}function h(e,t,n){let r=Object.keys(e[t]||{}).find(e=>e.startsWith(`${n}_`));return{hasLiked:!!r,existingLikeId:r}}function f(e,t,n){let r=Object.values(e[t]||{}),s=Array.from(new Set(r.map(e=>e.country).filter(e=>"UNKNOWN"!==e))),{hasLiked:i}=h(e,t,n);return{count:r.length,countries:s,userLiked:i}}function d(e,t){return`${e}_${t}`}},88069:(e,t,n)=>{n.d(t,{D:()=>o});var r=n(55315),s=n.n(r);let i="cici";function o(e){let t=process.env.CICI_DIR;if(t)return{kind:"local",dir:s().resolve(t)};let n=process.env.CICI_REPO;if(n){let[t,r]=n.split("/");if(!t)throw Error(`Invalid CICI_REPO "${n}" — expected "owner/name".`);return{kind:"github",owner:t,repo:r||i,token:process.env.CICI_TOKEN||e||void 0}}return{kind:"github",owner:process.env.GITHUB_USERNAME||"metrue",repo:i,token:e||void 0}}},73194:(e,t,n)=>{n.d(t,{$:()=>a,g:()=>o});var r=n(55315),s=n.n(r),i=n(88069);function o(){return"local"===(0,i.D)().kind}function a(){let e=process.env.CICI_DIR;return e?s().resolve(e):s().join(process.cwd(),"sample-content")}},49303:(e,t,n)=>{e.exports=n(30517)}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-a3d722a538b58757.js" defer=""></script><script src="/_next/static/chunks/framework-00a8ba1a63cfdc9e.js" defer=""></script><script src="/_next/static/chunks/main-530e55a5659ae7e4.js" defer=""></script><script src="/_next/static/chunks/pages/_app-15e2daefa259f0b5.js" defer=""></script><script src="/_next/static/chunks/pages/_error-28b803cb2479b966.js" defer=""></script><script src="/_next/static/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-a3d722a538b58757.js" defer=""></script><script src="/_next/static/chunks/framework-00a8ba1a63cfdc9e.js" defer=""></script><script src="/_next/static/chunks/main-530e55a5659ae7e4.js" defer=""></script><script src="/_next/static/chunks/pages/_app-15e2daefa259f0b5.js" defer=""></script><script src="/_next/static/chunks/pages/_error-28b803cb2479b966.js" defer=""></script><script src="/_next/static/Pl18p4h2shbbqjypPxStc/_buildManifest.js" defer=""></script><script src="/_next/static/Pl18p4h2shbbqjypPxStc/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"Pl18p4h2shbbqjypPxStc","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"/kEwPCPSA4LlG8pDFa06iRIo3lW0G0T7QAq6TvunPuI="}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cici",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "cici — a git-backed blog CMS. Run `npx cici --dir <dir>` or `--repo <owner/name>` to serve
|
|
5
|
+
"description": "cici — a git-backed blog CMS (pure tooling; your posts live in a separate content repo). Run `npx cici --dir <dir>` or `--repo <owner/name>` to serve/edit, or `cici build` / `cici start` to deploy.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/metrue/cici.git"
|