diff --git a/package.json b/package.json index 196e14f..0fe0a87 100644 --- a/package.json +++ b/package.json @@ -8,12 +8,13 @@ "build": "astro build && pagefind --site dist", "preview": "astro preview", "astro": "astro", + "type-check": "tsc --noEmit --isolatedDeclarations", "new-post": "node scripts/new-post.js", "format": "biome format --write ./src", "lint": "biome check --apply ./src" }, "dependencies": { - "@astrojs/check": "^0.8.3", + "@astrojs/check": "^0.9.2", "@astrojs/rss": "^4.0.7", "@astrojs/sitemap": "^3.1.6", "@astrojs/svelte": "^5.7.0", @@ -21,7 +22,7 @@ "@fontsource-variable/jetbrains-mono": "^5.0.21", "@fontsource/roboto": "^5.0.13", "@swup/astro": "^1.4.1", - "astro": "^4.12.2", + "astro": "^4.14.2", "astro-compress": "^2.3.0", "astro-icon": "1.1.0", "colorjs.io": "^0.5.2", @@ -46,7 +47,7 @@ "unist-util-visit": "^5.0.0" }, "devDependencies": { - "@astrojs/ts-plugin": "^1.9.0", + "@astrojs/ts-plugin": "^1.10.0", "@biomejs/biome": "1.8.3", "@iconify-json/fa6-brands": "^1.1.21", "@iconify-json/fa6-regular": "^1.1.21", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bad8cb1..4761b7d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,8 +13,8 @@ importers: .: dependencies: '@astrojs/check': - specifier: ^0.8.3 - version: 0.8.3(typescript@5.5.4) + specifier: ^0.9.2 + version: 0.9.2(typescript@5.5.4) '@astrojs/rss': specifier: ^4.0.7 version: 4.0.7 @@ -23,10 +23,10 @@ importers: version: 3.1.6 '@astrojs/svelte': specifier: ^5.7.0 - version: 5.7.0(astro@4.12.2(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4))(svelte@4.2.18)(typescript@5.5.4)(vite@5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)) + version: 5.7.0(astro@4.14.2(@types/node@20.14.12)(lightningcss@1.25.1)(rollup@2.79.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4))(svelte@4.2.18)(typescript@5.5.4)(vite@5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)) '@astrojs/tailwind': specifier: ^5.1.0 - version: 5.1.0(astro@4.12.2(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4))(tailwindcss@3.4.7) + version: 5.1.0(astro@4.14.2(@types/node@20.14.12)(lightningcss@1.25.1)(rollup@2.79.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4))(tailwindcss@3.4.7) '@fontsource-variable/jetbrains-mono': specifier: ^5.0.21 version: 5.0.21 @@ -37,11 +37,11 @@ importers: specifier: ^1.4.1 version: 1.4.1(@types/babel__core@7.20.5) astro: - specifier: ^4.12.2 - version: 4.12.2(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4) + specifier: ^4.14.2 + version: 4.14.2(@types/node@20.14.12)(lightningcss@1.25.1)(rollup@2.79.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4) astro-compress: specifier: ^2.3.0 - version: 2.3.0(@types/node@20.14.12)(sass@1.77.8)(stylus@0.63.0)(typescript@5.5.4) + version: 2.3.0(@types/node@20.14.12)(rollup@2.79.1)(sass@1.77.8)(stylus@0.63.0)(typescript@5.5.4) astro-icon: specifier: 1.1.0 version: 1.1.0 @@ -107,8 +107,8 @@ importers: version: 5.0.0 devDependencies: '@astrojs/ts-plugin': - specifier: ^1.9.0 - version: 1.9.0 + specifier: ^1.10.0 + version: 1.10.0 '@biomejs/biome': specifier: 1.8.3 version: 1.8.3 @@ -174,20 +174,20 @@ packages: '@antfu/utils@0.7.10': resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==} - '@astrojs/check@0.8.3': - resolution: {integrity: sha512-ajcSe+ezX5jCc3dreQlWzbknzXgSGnDETNe3C1mawUOtGpO4t5z2YGaD0y+wzB84lmgPWaWZa0fKSPwLq/wUHw==} + '@astrojs/check@0.9.2': + resolution: {integrity: sha512-6rWxtJTbd/ctdAlmla0CAvloGaai5IUTG0K21kctJHHGKJKnGH6Xana7m0zNOtHpVPEJi1SgC/TcsN+ltYt0Cg==} hasBin: true peerDependencies: typescript: ^5.0.0 - '@astrojs/compiler@2.9.2': - resolution: {integrity: sha512-Vpu0Ffsj8SoV+N0DFHlxxOMKHwSC9059Xy/OlG1t6uFYSoJXxkBC2WyF6igO7x10V+8uJrhOxaXr3nA90kJXow==} + '@astrojs/compiler@2.10.3': + resolution: {integrity: sha512-bL/O7YBxsFt55YHU021oL+xz+B/9HvGNId3F9xURN16aeqDK9juHGktdkCSXz+U4nqFACq6ZFvWomOzhV+zfPw==} '@astrojs/internal-helpers@0.4.1': resolution: {integrity: sha512-bMf9jFihO8YP940uD70SI/RDzIhUHJAolWVcO1v5PUivxGKvfLZTLTVVxEYzGYyPsA3ivdLNqMnL5VgmQySa+g==} - '@astrojs/language-server@2.12.8': - resolution: {integrity: sha512-aUppjqbCdFkd2Cdr8tDtd9id7lAZAmpwpYTQrOm69z8P4NaGUE/ksMIhd0Q99zXfSBjDVC7HlxSjPg8Y7xakfg==} + '@astrojs/language-server@2.14.0': + resolution: {integrity: sha512-vDufoVpQ7xP98F1FdI9TwccglqsRGGzyQ0D6dQV2W23p/Nif7npWStrv00WeY6YQHBFxsygccOzdvzzITaxViw==} hasBin: true peerDependencies: prettier: ^3.0.0 @@ -229,8 +229,11 @@ packages: resolution: {integrity: sha512-/ca/+D8MIKEC8/A9cSaPUqQNZm+Es/ZinRv0ZAzvu2ios7POQSsVD+VOj7/hypWNsNM3T7RpfgNq7H2TU1KEHA==} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} - '@astrojs/ts-plugin@1.9.0': - resolution: {integrity: sha512-QastYNlKF2I0oOksKRm3bG8auk2AlyD6be7ptHzSHKj/ikUvK9ObnS2ruGFh0h8aQ760Qw7aEJ9JZT/IZ7t46A==} + '@astrojs/ts-plugin@1.10.0': + resolution: {integrity: sha512-BPGtNXBogGs5g1Ys+EjQ4EsB6tWuG7WZ1yZ8wxNG34SdqUQFfI/IJPCo1r7Ss2hJ6SzF77MJEZo2qLv+K6mL9Q==} + + '@astrojs/yaml2ts@0.2.0': + resolution: {integrity: sha512-xyJ2JpenXis5V2yk4OExNyHXyRlCKrJcPfNPLK0rqf24grqpRZ4bYD/ztesYicYlaXehH9aUJXG0mVu8P02G9A==} '@babel/code-frame@7.24.7': resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} @@ -240,10 +243,18 @@ packages: resolution: {integrity: sha512-P4fwKI2mjEb3ZU5cnMJzvRsRKGBUcs8jvxIoRmr6ufAY9Xk2Bz7JubRTTivkw55c7WQJfTECeqYVa+HZ0FzREg==} engines: {node: '>=6.9.0'} + '@babel/compat-data@7.25.2': + resolution: {integrity: sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ==} + engines: {node: '>=6.9.0'} + '@babel/core@7.24.9': resolution: {integrity: sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg==} engines: {node: '>=6.9.0'} + '@babel/core@7.25.2': + resolution: {integrity: sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==} + engines: {node: '>=6.9.0'} + '@babel/generator@7.25.0': resolution: {integrity: sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==} engines: {node: '>=6.9.0'} @@ -260,6 +271,10 @@ packages: resolution: {integrity: sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw==} engines: {node: '>=6.9.0'} + '@babel/helper-compilation-targets@7.25.2': + resolution: {integrity: sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==} + engines: {node: '>=6.9.0'} + '@babel/helper-create-class-features-plugin@7.25.0': resolution: {integrity: sha512-GYM6BxeQsETc9mnct+nIIpf63SAyzvyYN7UB/IlTyd+MBg06afFGp0mIeUqGyWgS2mxad6vqbMrHVlaL3m70sQ==} engines: {node: '>=6.9.0'} @@ -291,6 +306,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0 + '@babel/helper-module-transforms@7.25.2': + resolution: {integrity: sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/helper-optimise-call-expression@7.24.7': resolution: {integrity: sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==} engines: {node: '>=6.9.0'} @@ -348,6 +369,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.25.3': + resolution: {integrity: sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.0': resolution: {integrity: sha512-dG0aApncVQwAUJa8tP1VHTnmU67BeIQvKafd3raEx315H54FfkZSz3B/TT+33ZQAjatGJA79gZqTtqL5QZUKXw==} engines: {node: '>=6.9.0'} @@ -750,6 +776,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-react-jsx@7.25.2': + resolution: {integrity: sha512-KQsqEAVBpU82NM/B/N9j9WOdphom1SZH3R+2V7INrQUH+V9EBFwZsEJl8eBIVeQE62FxJCc70jzEZwqU7RcVqA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-react-pure-annotations@7.24.7': resolution: {integrity: sha512-PLgBVk3fzbmEjBJ/u8kFzOqS9tUeDjiaWud/rRym/yjCo/M9cASPlnrd2ZmmZpQT40fOOrvR8jh+n8jikrOhNA==} engines: {node: '>=6.9.0'} @@ -860,10 +892,18 @@ packages: resolution: {integrity: sha512-ubALThHQy4GCf6mbb+5ZRNmLLCI7bJ3f8Q6LHBSRlSKSWj5a7dSUzJBLv3VuIhFrFPgjF4IzPF567YG/HSCdZA==} engines: {node: '>=6.9.0'} + '@babel/traverse@7.25.3': + resolution: {integrity: sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ==} + engines: {node: '>=6.9.0'} + '@babel/types@7.25.0': resolution: {integrity: sha512-LcnxQSsd9aXOIgmmSpvZ/1yo46ra2ESYyqLcryaBZOghxy5qqOBjvCWP5JfkI8yl9rlxRgdLTTMCQQRcN2hdCg==} engines: {node: '>=6.9.0'} + '@babel/types@7.25.2': + resolution: {integrity: sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==} + engines: {node: '>=6.9.0'} + '@biomejs/biome@1.8.3': resolution: {integrity: sha512-/uUV3MV+vyAczO+vKrPdOW0Iaet7UnJMU4bNMinggGJTAnBPjCoLEYcyYtYHNnUNYlv4xZMH6hVIQCAozq8d5w==} engines: {node: '>=14.21.3'} @@ -1261,6 +1301,9 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@oslojs/encoding@0.4.1': + resolution: {integrity: sha512-hkjo6MuIK/kQR5CrGNdAPZhS01ZCXuWDRJ187zh6qqF2+yMHZpD9fAYpX8q2bOO6Ryhl3XpCT6kUX76N8hhm4Q==} + '@pagefind/darwin-arm64@1.1.0': resolution: {integrity: sha512-SLsXNLtSilGZjvqis8sX42fBWsWAVkcDh1oerxwqbac84HbiwxpxOC2jm8hRwcR0Z55HPZPWO77XeRix/8GwTg==} cpu: [arm64] @@ -1435,8 +1478,8 @@ packages: cpu: [x64] os: [win32] - '@shikijs/core@1.12.0': - resolution: {integrity: sha512-mc1cLbm6UQ8RxLc0dZES7v5rkH+99LxQp/ZvTqV3NLyYsO/fD6JhEflP1H5b2SDq9gI0+0G36AVZWxvounfR9w==} + '@shikijs/core@1.14.1': + resolution: {integrity: sha512-KyHIIpKNaT20FtFPFjCQB5WVSTpLR/n+jQXhWHWVUMm9MaOaG9BGOG0MSyt7yA4+Lm+4c9rTc03tt3nYzeYSfw==} '@surma/rollup-plugin-off-main-thread@2.2.3': resolution: {integrity: sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ==} @@ -1686,6 +1729,9 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + ajv@8.17.1: + resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} + ansi-align@3.0.1: resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} @@ -1753,8 +1799,8 @@ packages: astro-icon@1.1.0: resolution: {integrity: sha512-Nksc09p7UuHeMcPNS9w1pKqRw3+wEmmh0A3FJW+FNXvqaeWI4RLvD1MCWErpY3Z5Cvad317rvLdik/Hg8GEk8Q==} - astro@4.12.2: - resolution: {integrity: sha512-l6OmqlL+FiuSi9x6F+EGZitteOznq1JffOil7st7cdqeMCTEIym4oagI1a6zp6QekliKWEEZWdplGhgh1k1f7Q==} + astro@4.14.2: + resolution: {integrity: sha512-x9VeYx8Ih6kYKBMVwwsfRzsZVq30+SUhiawnYQ6+46qQnEx3zH05KcH24HsJMe6dVpHD8HdH7CWR5C4o7Q/jeg==} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'} hasBin: true @@ -2126,6 +2172,15 @@ packages: supports-color: optional: true + debug@4.3.6: + resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decode-named-character-reference@1.0.2: resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} @@ -2355,10 +2410,16 @@ packages: engines: {node: '>= 10.17.0'} hasBin: true + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} + fast-uri@3.0.1: + resolution: {integrity: sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==} + fast-xml-parser@4.4.0: resolution: {integrity: sha512-kLY3jFlwIYwBNDojclKsNAC12sfD6NwW74QB2CoNGPvtVxjliYehVunB3HYyNi+n4Tt1dAcgwYvmKF/Z18flqg==} hasBin: true @@ -2889,6 +2950,9 @@ packages: json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} @@ -2897,6 +2961,9 @@ packages: jsonc-parser@2.3.1: resolution: {integrity: sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==} + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -3039,6 +3106,9 @@ packages: lodash.uniq@4.5.0: resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + log-symbols@6.0.0: resolution: {integrity: sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==} engines: {node: '>=18'} @@ -3061,6 +3131,9 @@ packages: magic-string@0.30.10: resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} + magic-string@0.30.11: + resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -3310,6 +3383,10 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + neotraverse@0.6.18: + resolution: {integrity: sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==} + engines: {node: '>= 10'} + nlcst-to-string@4.0.0: resolution: {integrity: sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA==} @@ -3802,10 +3879,19 @@ packages: resolution: {integrity: sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q==} engines: {node: ^10 || ^12 || >=14} + postcss@8.4.41: + resolution: {integrity: sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==} + engines: {node: ^10 || ^12 || >=14} + preferred-pm@4.0.0: resolution: {integrity: sha512-gYBeFTZLu055D8Vv3cSPox/0iTPtkzxpLroSYYA7WXgRi31WCJ51Uyl8ZiPeUUjyvs2MBzK+S8v9JVUgHU/Sqw==} engines: {node: '>=18.12'} + prettier@2.8.7: + resolution: {integrity: sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==} + engines: {node: '>=10.13.0'} + hasBin: true + prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -3943,6 +4029,9 @@ packages: remark-stringify@11.0.0: resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==} + request-light@0.5.8: + resolution: {integrity: sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg==} + request-light@0.7.0: resolution: {integrity: sha512-lMbBMrDoxgsyO+yB3sDcrDuX85yYt7sS8BfQd11jtbW/z5ZWgLZRcEGLsLoYw7I0WSUGQBs8CC8ScIxkTX1+6Q==} @@ -3950,6 +4039,10 @@ packages: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -4110,8 +4203,8 @@ packages: engines: {node: '>=4'} hasBin: true - shiki@1.12.0: - resolution: {integrity: sha512-BuAxWOm5JhRcbSOl7XCei8wGjgJJonnV0oipUupPY58iULxUGyHhW5CF+9FRMuM1pcJ5cGEJGll1LusX6FwpPA==} + shiki@1.14.1: + resolution: {integrity: sha512-FujAN40NEejeXdzPt+3sZ3F2dx1U24BY2XTY01+MG8mbxCiA2XukXdcbyMyLAHJ/1AUUnQd1tZlvIjefWWEJeA==} side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} @@ -4492,8 +4585,8 @@ packages: vfile@6.0.2: resolution: {integrity: sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==} - vite@5.3.5: - resolution: {integrity: sha512-MdjglKR6AQXQb9JGiS7Rc2wC6uMjcm7Go/NHNO63EwiJXfuk9PgqiP/n5IDJCziMkfw9n4Ubp7lttNwz+8ZVKA==} + vite@5.4.1: + resolution: {integrity: sha512-1oE6yuNXssjrZdblI9AfBbHCC41nnyoVoEZxQnID6yvQZAFBzxxkqoFLtHUMkYunL8hwOLEjgTuxpkRxvba3kA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -4501,6 +4594,7 @@ packages: less: '*' lightningcss: ^1.21.0 sass: '*' + sass-embedded: '*' stylus: '*' sugarss: '*' terser: ^5.4.0 @@ -4513,6 +4607,8 @@ packages: optional: true sass: optional: true + sass-embedded: + optional: true stylus: optional: true sugarss: @@ -4579,25 +4675,51 @@ packages: '@volar/language-service': optional: true + volar-service-yaml@0.0.59: + resolution: {integrity: sha512-7Pi7XWnmgcWmdW7essscHn2+CcG1BEgnNjEE/31GaycwvLu4rPF+Xztzc0ErZLSFW3F2EBPzaecWfrGL2l4NGQ==} + peerDependencies: + '@volar/language-service': ~2.4.0-alpha.12 + peerDependenciesMeta: + '@volar/language-service': + optional: true + vscode-css-languageservice@6.3.0: resolution: {integrity: sha512-nU92imtkgzpCL0xikrIb8WvedV553F2BENzgz23wFuok/HLN5BeQmroMy26pUwFxV2eV8oNRmYCUv8iO7kSMhw==} vscode-html-languageservice@5.3.0: resolution: {integrity: sha512-C4Z3KsP5Ih+fjHpiBc5jxmvCl+4iEwvXegIrzu2F5pktbWvQaBT3YkVPk8N+QlSSMk8oCG6PKtZ/Sq2YHb5e8g==} + vscode-json-languageservice@4.1.8: + resolution: {integrity: sha512-0vSpg6Xd9hfV+eZAaYN63xVVMOTmJ4GgHxXnkLCh+9RsQBkWKIghzLhW2B9ebfG+LQQg8uLtsQ2aUKjTgE+QOg==} + engines: {npm: '>=7.0.0'} + + vscode-jsonrpc@6.0.0: + resolution: {integrity: sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==} + engines: {node: '>=8.0.0 || >=10.0.0'} + vscode-jsonrpc@8.2.0: resolution: {integrity: sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==} engines: {node: '>=14.0.0'} + vscode-languageserver-protocol@3.16.0: + resolution: {integrity: sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A==} + vscode-languageserver-protocol@3.17.5: resolution: {integrity: sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==} vscode-languageserver-textdocument@1.0.11: resolution: {integrity: sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==} + vscode-languageserver-types@3.16.0: + resolution: {integrity: sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==} + vscode-languageserver-types@3.17.5: resolution: {integrity: sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==} + vscode-languageserver@7.0.0: + resolution: {integrity: sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw==} + hasBin: true + vscode-languageserver@9.0.1: resolution: {integrity: sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==} hasBin: true @@ -4649,6 +4771,9 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + xxhash-wasm@1.0.2: + resolution: {integrity: sha512-ibF0Or+FivM9lNrg+HGJfVX8WJqgo+kCLDc4vx6xMeTce7Aj+DLttKbxxRR/gNLSAelRc1omAPlJ77N/Jem07A==} + y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -4659,10 +4784,18 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yaml-language-server@1.15.0: + resolution: {integrity: sha512-N47AqBDCMQmh6mBLmI6oqxryHRzi33aPFPsJhYy3VTUGCdLHYjGh4FZzpUjRlphaADBBkDmnkM/++KNIOHi5Rw==} + hasBin: true + yaml@1.10.2: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} + yaml@2.2.2: + resolution: {integrity: sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==} + engines: {node: '>= 14'} + yaml@2.5.0: resolution: {integrity: sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==} engines: {node: '>= 14'} @@ -4687,11 +4820,17 @@ packages: resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} engines: {node: '>=12.20'} - zod-to-json-schema@3.23.1: - resolution: {integrity: sha512-oT9INvydob1XV0v1d2IadrR74rLtDInLvDFfAa1CG0Pmg/vxATk7I2gSelfj271mbzeM4Da0uuDQE/Nkj3DWNw==} + zod-to-json-schema@3.23.2: + resolution: {integrity: sha512-uSt90Gzc/tUfyNqxnjlfBs8W6WSGpNBv0rVsNxP/BVSMHMKGdthPYff4xtCHYloJGM0CFxFsb3NbC0eqPhfImw==} peerDependencies: zod: ^3.23.3 + zod-to-ts@1.2.0: + resolution: {integrity: sha512-x30XE43V+InwGpvTySRNz9kB7qFU8DlyEy7BsSTCHPH1R0QasMmHWZDCzYm6bVXtj/9NNJAZF3jW8rzFvH5OFA==} + peerDependencies: + typescript: ^4.9.4 || ^5.0.2 + zod: ^3 + zod@3.23.8: resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} @@ -4716,9 +4855,9 @@ snapshots: '@antfu/utils@0.7.10': {} - '@astrojs/check@0.8.3(typescript@5.5.4)': + '@astrojs/check@0.9.2(typescript@5.5.4)': dependencies: - '@astrojs/language-server': 2.12.8(typescript@5.5.4) + '@astrojs/language-server': 2.14.0(typescript@5.5.4) chokidar: 3.6.0 fast-glob: 3.3.2 kleur: 4.1.5 @@ -4728,13 +4867,14 @@ snapshots: - prettier - prettier-plugin-astro - '@astrojs/compiler@2.9.2': {} + '@astrojs/compiler@2.10.3': {} '@astrojs/internal-helpers@0.4.1': {} - '@astrojs/language-server@2.12.8(typescript@5.5.4)': + '@astrojs/language-server@2.14.0(typescript@5.5.4)': dependencies: - '@astrojs/compiler': 2.9.2 + '@astrojs/compiler': 2.10.3 + '@astrojs/yaml2ts': 0.2.0 '@jridgewell/sourcemap-codec': 1.5.0 '@volar/kit': 2.4.0-alpha.18(typescript@5.5.4) '@volar/language-core': 2.4.0-alpha.18 @@ -4749,6 +4889,7 @@ snapshots: volar-service-prettier: 0.0.59(@volar/language-service@2.4.0-alpha.18) volar-service-typescript: 0.0.59(@volar/language-service@2.4.0-alpha.18) volar-service-typescript-twoslash-queries: 0.0.59(@volar/language-service@2.4.0-alpha.18) + volar-service-yaml: 0.0.59(@volar/language-service@2.4.0-alpha.18) vscode-html-languageservice: 5.3.0 vscode-uri: 3.0.8 transitivePeerDependencies: @@ -4768,7 +4909,7 @@ snapshots: remark-parse: 11.0.0 remark-rehype: 11.1.0 remark-smartypants: 3.0.2 - shiki: 1.12.0 + shiki: 1.14.1 unified: 11.0.5 unist-util-remove-position: 5.0.0 unist-util-visit: 5.0.0 @@ -4792,10 +4933,10 @@ snapshots: stream-replace-string: 2.0.0 zod: 3.23.8 - '@astrojs/svelte@5.7.0(astro@4.12.2(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4))(svelte@4.2.18)(typescript@5.5.4)(vite@5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3))': + '@astrojs/svelte@5.7.0(astro@4.14.2(@types/node@20.14.12)(lightningcss@1.25.1)(rollup@2.79.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4))(svelte@4.2.18)(typescript@5.5.4)(vite@5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3))': dependencies: - '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.18)(vite@5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)) - astro: 4.12.2(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4) + '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.18)(vite@5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)) + astro: 4.14.2(@types/node@20.14.12)(lightningcss@1.25.1)(rollup@2.79.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4) svelte: 4.2.18 svelte2tsx: 0.7.13(svelte@4.2.18)(typescript@5.5.4) typescript: 5.5.4 @@ -4803,9 +4944,9 @@ snapshots: - supports-color - vite - '@astrojs/tailwind@5.1.0(astro@4.12.2(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4))(tailwindcss@3.4.7)': + '@astrojs/tailwind@5.1.0(astro@4.14.2(@types/node@20.14.12)(lightningcss@1.25.1)(rollup@2.79.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4))(tailwindcss@3.4.7)': dependencies: - astro: 4.12.2(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4) + astro: 4.14.2(@types/node@20.14.12)(lightningcss@1.25.1)(rollup@2.79.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4) autoprefixer: 10.4.19(postcss@8.4.40) postcss: 8.4.40 postcss-load-config: 4.0.2(postcss@8.4.40) @@ -4816,7 +4957,7 @@ snapshots: '@astrojs/telemetry@3.1.0': dependencies: ci-info: 4.0.0 - debug: 4.3.5 + debug: 4.3.6 dlv: 1.1.3 dset: 3.1.3 is-docker: 3.0.0 @@ -4825,15 +4966,20 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/ts-plugin@1.9.0': + '@astrojs/ts-plugin@1.10.0': dependencies: - '@astrojs/compiler': 2.9.2 + '@astrojs/compiler': 2.10.3 + '@astrojs/yaml2ts': 0.2.0 '@jridgewell/sourcemap-codec': 1.5.0 '@volar/language-core': 2.4.0-alpha.18 '@volar/typescript': 2.4.0-alpha.18 semver: 7.6.3 vscode-languageserver-textdocument: 1.0.11 + '@astrojs/yaml2ts@0.2.0': + dependencies: + yaml: 2.5.0 + '@babel/code-frame@7.24.7': dependencies: '@babel/highlight': 7.24.7 @@ -4841,6 +4987,8 @@ snapshots: '@babel/compat-data@7.25.0': {} + '@babel/compat-data@7.25.2': {} + '@babel/core@7.24.9': dependencies: '@ampproject/remapping': 2.3.0 @@ -4861,6 +5009,26 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/core@7.25.2': + dependencies: + '@ampproject/remapping': 2.3.0 + '@babel/code-frame': 7.24.7 + '@babel/generator': 7.25.0 + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) + '@babel/helpers': 7.25.0 + '@babel/parser': 7.25.3 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.3 + '@babel/types': 7.25.2 + convert-source-map: 2.0.0 + debug: 4.3.6 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + '@babel/generator@7.25.0': dependencies: '@babel/types': 7.25.0 @@ -4887,6 +5055,14 @@ snapshots: lru-cache: 5.1.1 semver: 6.3.1 + '@babel/helper-compilation-targets@7.25.2': + dependencies: + '@babel/compat-data': 7.25.2 + '@babel/helper-validator-option': 7.24.8 + browserslist: 4.23.2 + lru-cache: 5.1.1 + semver: 6.3.1 + '@babel/helper-create-class-features-plugin@7.25.0(@babel/core@7.24.9)': dependencies: '@babel/core': 7.24.9 @@ -4942,6 +5118,16 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-module-transforms@7.25.2(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-simple-access': 7.24.7 + '@babel/helper-validator-identifier': 7.24.7 + '@babel/traverse': 7.25.3 + transitivePeerDependencies: + - supports-color + '@babel/helper-optimise-call-expression@7.24.7': dependencies: '@babel/types': 7.25.0 @@ -5010,6 +5196,10 @@ snapshots: dependencies: '@babel/types': 7.25.0 + '@babel/parser@7.25.3': + dependencies: + '@babel/types': 7.25.2 + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.0(@babel/core@7.24.9)': dependencies: '@babel/core': 7.24.9 @@ -5112,6 +5302,11 @@ snapshots: '@babel/core': 7.24.9 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.24.9)': dependencies: '@babel/core': 7.24.9 @@ -5454,6 +5649,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.25.2)': + dependencies: + '@babel/core': 7.25.2 + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.2) + '@babel/types': 7.25.2 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-react-pure-annotations@7.24.7(@babel/core@7.24.9)': dependencies: '@babel/core': 7.24.9 @@ -5661,12 +5867,30 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/traverse@7.25.3': + dependencies: + '@babel/code-frame': 7.24.7 + '@babel/generator': 7.25.0 + '@babel/parser': 7.25.3 + '@babel/template': 7.25.0 + '@babel/types': 7.25.2 + debug: 4.3.6 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + '@babel/types@7.25.0': dependencies: '@babel/helper-string-parser': 7.24.8 '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 + '@babel/types@7.25.2': + dependencies: + '@babel/helper-string-parser': 7.24.8 + '@babel/helper-validator-identifier': 7.24.7 + to-fast-properties: 2.0.0 + '@biomejs/biome@1.8.3': optionalDependencies: '@biomejs/cli-darwin-arm64': 1.8.3 @@ -5971,6 +6195,8 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 + '@oslojs/encoding@0.4.1': {} + '@pagefind/darwin-arm64@1.1.0': optional: true @@ -6113,7 +6339,7 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.19.1': optional: true - '@shikijs/core@1.12.0': + '@shikijs/core@1.14.1': dependencies: '@types/hast': 3.0.4 @@ -6124,26 +6350,26 @@ snapshots: magic-string: 0.25.9 string.prototype.matchall: 4.0.11 - '@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)))(svelte@4.2.18)(vite@5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3))': + '@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)))(svelte@4.2.18)(vite@5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3))': dependencies: - '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.18)(vite@5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)) + '@sveltejs/vite-plugin-svelte': 3.1.1(svelte@4.2.18)(vite@5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)) debug: 4.3.5 svelte: 4.2.18 - vite: 5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3) + vite: 5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3) transitivePeerDependencies: - supports-color - '@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3))': + '@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3))': dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)))(svelte@4.2.18)(vite@5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)) + '@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)))(svelte@4.2.18)(vite@5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)) debug: 4.3.5 deepmerge: 4.3.1 kleur: 4.1.5 magic-string: 0.30.10 svelte: 4.2.18 svelte-hmr: 0.16.0(svelte@4.2.18) - vite: 5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3) - vitefu: 0.2.5(vite@5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)) + vite: 5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3) + vitefu: 0.2.5(vite@5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)) transitivePeerDependencies: - supports-color @@ -6291,24 +6517,24 @@ snapshots: '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.25.0 - '@babel/types': 7.25.0 + '@babel/parser': 7.25.3 + '@babel/types': 7.25.2 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.6 '@types/babel__generator@7.6.8': dependencies: - '@babel/types': 7.25.0 + '@babel/types': 7.25.2 '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.25.0 - '@babel/types': 7.25.0 + '@babel/parser': 7.25.3 + '@babel/types': 7.25.2 '@types/babel__traverse@7.20.6': dependencies: - '@babel/types': 7.25.0 + '@babel/types': 7.25.2 '@types/cheerio@0.22.35': dependencies: @@ -6455,6 +6681,13 @@ snapshots: acorn@8.12.1: {} + ajv@8.17.1: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.0.1 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + ansi-align@3.0.1: dependencies: string-width: 4.2.3 @@ -6514,12 +6747,12 @@ snapshots: is-array-buffer: 3.0.4 is-shared-array-buffer: 1.0.3 - astro-compress@2.3.0(@types/node@20.14.12)(sass@1.77.8)(stylus@0.63.0)(typescript@5.5.4): + astro-compress@2.3.0(@types/node@20.14.12)(rollup@2.79.1)(sass@1.77.8)(stylus@0.63.0)(typescript@5.5.4): dependencies: '@playform/pipe': 0.1.0 '@types/csso': 5.0.4 '@types/html-minifier-terser': 7.0.2 - astro: 4.12.2(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4) + astro: 4.14.2(@types/node@20.14.12)(lightningcss@1.25.1)(rollup@2.79.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4) csso: 5.0.5 html-minifier-terser: 7.2.0 kleur: 4.1.5 @@ -6530,7 +6763,9 @@ snapshots: transitivePeerDependencies: - '@types/node' - less + - rollup - sass + - sass-embedded - stylus - sugarss - supports-color @@ -6544,31 +6779,32 @@ snapshots: transitivePeerDependencies: - supports-color - astro@4.12.2(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4): + astro@4.14.2(@types/node@20.14.12)(lightningcss@1.25.1)(rollup@2.79.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)(typescript@5.5.4): dependencies: - '@astrojs/compiler': 2.9.2 + '@astrojs/compiler': 2.10.3 '@astrojs/internal-helpers': 0.4.1 '@astrojs/markdown-remark': 5.2.0 '@astrojs/telemetry': 3.1.0 - '@babel/core': 7.24.9 + '@babel/core': 7.25.2 '@babel/generator': 7.25.0 - '@babel/parser': 7.25.0 - '@babel/plugin-transform-react-jsx': 7.24.7(@babel/core@7.24.9) - '@babel/traverse': 7.25.0 - '@babel/types': 7.25.0 + '@babel/parser': 7.25.3 + '@babel/plugin-transform-react-jsx': 7.25.2(@babel/core@7.25.2) + '@babel/traverse': 7.25.3 + '@babel/types': 7.25.2 + '@oslojs/encoding': 0.4.1 + '@rollup/pluginutils': 5.1.0(rollup@2.79.1) '@types/babel__core': 7.20.5 '@types/cookie': 0.6.0 acorn: 8.12.1 aria-query: 5.3.0 axobject-query: 4.1.0 boxen: 7.1.1 - chokidar: 3.6.0 ci-info: 4.0.0 clsx: 2.1.1 common-ancestor-path: 1.0.1 cookie: 0.6.0 cssesc: 3.0.0 - debug: 4.3.5 + debug: 4.3.6 deterministic-object-hash: 2.0.2 devalue: 5.0.0 diff: 5.2.0 @@ -6586,8 +6822,10 @@ snapshots: http-cache-semantics: 4.1.1 js-yaml: 4.1.0 kleur: 4.1.5 - magic-string: 0.30.10 + magic-string: 0.30.11 + micromatch: 4.0.7 mrmime: 2.0.0 + neotraverse: 0.6.18 ora: 8.0.1 p-limit: 6.1.0 p-queue: 8.0.1 @@ -6596,25 +6834,29 @@ snapshots: prompts: 2.4.2 rehype: 13.0.1 semver: 7.6.3 - shiki: 1.12.0 + shiki: 1.14.1 string-width: 7.2.0 strip-ansi: 7.1.0 tsconfck: 3.1.1(typescript@5.5.4) unist-util-visit: 5.0.0 vfile: 6.0.2 - vite: 5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3) - vitefu: 0.2.5(vite@5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)) + vite: 5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3) + vitefu: 0.2.5(vite@5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)) which-pm: 3.0.0 + xxhash-wasm: 1.0.2 yargs-parser: 21.1.1 zod: 3.23.8 - zod-to-json-schema: 3.23.1(zod@3.23.8) + zod-to-json-schema: 3.23.2(zod@3.23.8) + zod-to-ts: 1.2.0(typescript@5.5.4)(zod@3.23.8) optionalDependencies: sharp: 0.33.4 transitivePeerDependencies: - '@types/node' - less - lightningcss + - rollup - sass + - sass-embedded - stylus - sugarss - supports-color @@ -7040,6 +7282,10 @@ snapshots: dependencies: ms: 2.1.2 + debug@4.3.6: + dependencies: + ms: 2.1.2 + decode-named-character-reference@1.0.2: dependencies: character-entities: 2.0.2 @@ -7331,6 +7577,8 @@ snapshots: transitivePeerDependencies: - supports-color + fast-deep-equal@3.1.3: {} + fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -7339,6 +7587,8 @@ snapshots: merge2: 1.4.1 micromatch: 4.0.7 + fast-uri@3.0.1: {} + fast-xml-parser@4.4.0: dependencies: strnum: 1.0.5 @@ -7914,10 +8164,14 @@ snapshots: json-parse-even-better-errors@2.3.1: {} + json-schema-traverse@1.0.0: {} + json5@2.2.3: {} jsonc-parser@2.3.1: {} + jsonc-parser@3.3.1: {} + jsonfile@6.1.0: dependencies: universalify: 2.0.1 @@ -8027,6 +8281,8 @@ snapshots: lodash.uniq@4.5.0: {} + lodash@4.17.21: {} + log-symbols@6.0.0: dependencies: chalk: 5.3.0 @@ -8052,6 +8308,10 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 + magic-string@0.30.11: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + make-dir@3.1.0: dependencies: semver: 6.3.1 @@ -8553,6 +8813,8 @@ snapshots: nanoid@3.3.7: {} + neotraverse@0.6.18: {} + nlcst-to-string@4.0.0: dependencies: '@types/nlcst': 2.0.3 @@ -9024,12 +9286,21 @@ snapshots: picocolors: 1.0.1 source-map-js: 1.2.0 + postcss@8.4.41: + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.1 + source-map-js: 1.2.0 + preferred-pm@4.0.0: dependencies: find-up-simple: 1.0.0 find-yarn-workspace-root2: 1.2.16 which-pm: 3.0.0 + prettier@2.8.7: + optional: true + prettier@2.8.8: {} pretty-bytes@3.0.1: @@ -9240,10 +9511,14 @@ snapshots: mdast-util-to-markdown: 2.1.0 unified: 11.0.5 + request-light@0.5.8: {} + request-light@0.7.0: {} require-directory@2.1.1: {} + require-from-string@2.0.2: {} + resolve-from@4.0.0: {} resolve-from@5.0.0: {} @@ -9485,9 +9760,9 @@ snapshots: interpret: 1.4.0 rechoir: 0.6.2 - shiki@1.12.0: + shiki@1.14.1: dependencies: - '@shikijs/core': 1.12.0 + '@shikijs/core': 1.14.1 '@types/hast': 3.0.4 side-channel@1.0.6: @@ -9957,10 +10232,10 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - vite@5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3): + vite@5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3): dependencies: esbuild: 0.21.5 - postcss: 8.4.40 + postcss: 8.4.41 rollup: 4.19.1 optionalDependencies: '@types/node': 20.14.12 @@ -9970,9 +10245,9 @@ snapshots: stylus: 0.63.0 terser: 5.31.3 - vitefu@0.2.5(vite@5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)): + vitefu@0.2.5(vite@5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3)): optionalDependencies: - vite: 5.3.5(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3) + vite: 5.4.1(@types/node@20.14.12)(lightningcss@1.25.1)(sass@1.77.8)(stylus@0.63.0)(terser@5.31.3) volar-service-css@0.0.59(@volar/language-service@2.4.0-alpha.18): dependencies: @@ -10022,6 +10297,13 @@ snapshots: optionalDependencies: '@volar/language-service': 2.4.0-alpha.18 + volar-service-yaml@0.0.59(@volar/language-service@2.4.0-alpha.18): + dependencies: + vscode-uri: 3.0.8 + yaml-language-server: 1.15.0 + optionalDependencies: + '@volar/language-service': 2.4.0-alpha.18 + vscode-css-languageservice@6.3.0: dependencies: '@vscode/l10n': 0.0.18 @@ -10036,8 +10318,23 @@ snapshots: vscode-languageserver-types: 3.17.5 vscode-uri: 3.0.8 + vscode-json-languageservice@4.1.8: + dependencies: + jsonc-parser: 3.3.1 + vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-types: 3.17.5 + vscode-nls: 5.2.0 + vscode-uri: 3.0.8 + + vscode-jsonrpc@6.0.0: {} + vscode-jsonrpc@8.2.0: {} + vscode-languageserver-protocol@3.16.0: + dependencies: + vscode-jsonrpc: 6.0.0 + vscode-languageserver-types: 3.16.0 + vscode-languageserver-protocol@3.17.5: dependencies: vscode-jsonrpc: 8.2.0 @@ -10045,8 +10342,14 @@ snapshots: vscode-languageserver-textdocument@1.0.11: {} + vscode-languageserver-types@3.16.0: {} + vscode-languageserver-types@3.17.5: {} + vscode-languageserver@7.0.0: + dependencies: + vscode-languageserver-protocol: 3.16.0 + vscode-languageserver@9.0.1: dependencies: vscode-languageserver-protocol: 3.17.5 @@ -10103,14 +10406,33 @@ snapshots: wrappy@1.0.2: {} + xxhash-wasm@1.0.2: {} + y18n@5.0.8: {} yallist@3.1.1: {} yallist@4.0.0: {} + yaml-language-server@1.15.0: + dependencies: + ajv: 8.17.1 + lodash: 4.17.21 + request-light: 0.5.8 + vscode-json-languageservice: 4.1.8 + vscode-languageserver: 7.0.0 + vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-types: 3.17.5 + vscode-nls: 5.2.0 + vscode-uri: 3.0.8 + yaml: 2.2.2 + optionalDependencies: + prettier: 2.8.7 + yaml@1.10.2: {} + yaml@2.2.2: {} + yaml@2.5.0: {} yargs-parser@21.1.1: {} @@ -10134,10 +10456,15 @@ snapshots: yocto-queue@1.1.1: {} - zod-to-json-schema@3.23.1(zod@3.23.8): + zod-to-json-schema@3.23.2(zod@3.23.8): dependencies: zod: 3.23.8 + zod-to-ts@1.2.0(typescript@5.5.4)(zod@3.23.8): + dependencies: + typescript: 5.5.4 + zod: 3.23.8 + zod@3.23.8: {} zwitch@2.0.4: {} diff --git a/src/components/ArchivePanel.astro b/src/components/ArchivePanel.astro index b08bfdd..a3596c3 100644 --- a/src/components/ArchivePanel.astro +++ b/src/components/ArchivePanel.astro @@ -1,9 +1,9 @@ --- +import { UNCATEGORIZED } from '@constants/constants' +import I18nKey from '../i18n/i18nKey' +import { i18n } from '../i18n/translation' import { getSortedPosts } from '../utils/content-utils' import { getPostUrlBySlug } from '../utils/url-utils' -import { i18n } from '../i18n/translation' -import I18nKey from '../i18n/i18nKey' -import { UNCATEGORIZED } from '@constants/constants' interface Props { keyword?: string @@ -30,7 +30,7 @@ if (Array.isArray(categories) && categories.length > 0) { ) } -const groups: { year: number; posts: typeof posts }[] = (function () { +const groups: { year: number; posts: typeof posts }[] = (() => { const groupedPosts = posts.reduce( (grouped: { [year: number]: typeof posts }, post) => { const year = post.data.published.getFullYear() @@ -45,8 +45,8 @@ const groups: { year: number; posts: typeof posts }[] = (function () { // convert the object to an array const groupedPostsArray = Object.keys(groupedPosts).map(key => ({ - year: parseInt(key), - posts: groupedPosts[parseInt(key)], + year: Number.parseInt(key), + posts: groupedPosts[Number.parseInt(key)], })) // sort years by latest first diff --git a/src/pages/archive/tag/[tag].astro b/src/pages/archive/tag/[tag].astro index 870bd06..131063c 100644 --- a/src/pages/archive/tag/[tag].astro +++ b/src/pages/archive/tag/[tag].astro @@ -1,27 +1,27 @@ --- -import { getSortedPosts } from '@utils/content-utils' -import MainGridLayout from '@layouts/MainGridLayout.astro' import ArchivePanel from '@components/ArchivePanel.astro' -import { i18n } from '@i18n/translation' import I18nKey from '@i18n/i18nKey' +import { i18n } from '@i18n/translation' +import MainGridLayout from '@layouts/MainGridLayout.astro' +import { getSortedPosts } from '@utils/content-utils' export async function getStaticPaths() { - let posts = await getSortedPosts() + const posts = await getSortedPosts() - const allTags = posts.reduce((acc, post) => { + // タグを集めるための Set の型を指定 + const allTags = posts.reduce>((acc, post) => { + // biome-ignore lint/complexity/noForEach: post.data.tags.forEach(tag => acc.add(tag)) return acc }, new Set()) const allTagsArray = Array.from(allTags) - return allTagsArray.map(tag => { - return { - params: { - tag: tag, - }, - } - }) + return allTagsArray.map(tag => ({ + params: { + tag: tag, + }, + })) } const tag = Astro.params.tag as string @@ -29,4 +29,4 @@ const tag = Astro.params.tag as string - + \ No newline at end of file diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts index da9d0a0..b7a080f 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss.xml.ts @@ -1,25 +1,31 @@ -import rss from '@astrojs/rss' import { siteConfig } from '@/config' -import sanitizeHtml from 'sanitize-html' +import rss from '@astrojs/rss' +import { getSortedPosts } from '@utils/content-utils' +import type { APIContext } from 'astro' import MarkdownIt from 'markdown-it' -import { getSortedPosts } from '@utils/content-utils.ts' +import sanitizeHtml from 'sanitize-html' + const parser = new MarkdownIt() -export async function GET(context: any) { +export async function GET(context: APIContext) { const blog = await getSortedPosts() + return rss({ title: siteConfig.title, description: siteConfig.subtitle || 'No description', - site: context.site, - items: blog.map(post => ({ - title: post.data.title, - pubDate: post.data.published, - description: post.data.description, - link: `/posts/${post.slug}/`, - content: sanitizeHtml(parser.render(post.body), { - allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img']), - }), - })), + site: context.site ?? 'https://fuwari.vercel.app', + items: blog.map(post => { + const body = typeof post.data.body === 'string' ? post.data.body : '' + return { + title: post.data.title, + pubDate: post.data.published, + description: post.data.description || '', + link: `/posts/${post.slug}/`, + content: sanitizeHtml(parser.render(body), { + allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img']), + }), + } + }), customData: `${siteConfig.lang}`, }) } diff --git a/src/plugins/remark-directive-rehype.js b/src/plugins/remark-directive-rehype.js index a11bcfb..2d6b550 100644 --- a/src/plugins/remark-directive-rehype.js +++ b/src/plugins/remark-directive-rehype.js @@ -4,7 +4,7 @@ import { visit } from 'unist-util-visit' export function parseDirectiveNode() { return (tree, { data }) => { - visit(tree, function (node) { + visit(tree, node => { if ( node.type === 'containerDirective' || node.type === 'leafDirective' || diff --git a/src/types/config.ts b/src/types/config.ts index aac35b5..4471fcf 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -1,4 +1,4 @@ -import type { LIGHT_MODE, DARK_MODE, AUTO_MODE } from '@constants/constants' +import type { AUTO_MODE, DARK_MODE, LIGHT_MODE } from '@constants/constants' export type SiteConfig = { title: string @@ -67,3 +67,18 @@ export type LIGHT_DARK_MODE = | typeof LIGHT_MODE | typeof DARK_MODE | typeof AUTO_MODE + +export type BlogPostData = { + body: string + title: string + published: Date + description: string + tags: string[] + draft?: boolean + image?: string + category?: string + prevTitle?: string + prevSlug?: string + nextTitle?: string + nextSlug?: string +} diff --git a/src/utils/content-utils.ts b/src/utils/content-utils.ts index 023c177..6e670cc 100644 --- a/src/utils/content-utils.ts +++ b/src/utils/content-utils.ts @@ -1,16 +1,22 @@ +import { getCollection } from 'astro:content' +import type { BlogPostData } from '@/types/config' import I18nKey from '@i18n/i18nKey' import { i18n } from '@i18n/translation' -import { getCollection } from 'astro:content' -export async function getSortedPosts() { - const allBlogPosts = await getCollection('posts', ({ data }) => { +export async function getSortedPosts(): Promise< + { data: BlogPostData; slug: string }[] +> { + const allBlogPosts = (await getCollection('posts', ({ data }) => { return import.meta.env.PROD ? data.draft !== true : true - }) - const sorted = allBlogPosts.sort((a, b) => { - const dateA = new Date(a.data.published) - const dateB = new Date(b.data.published) - return dateA > dateB ? -1 : 1 - }) + })) as unknown as { data: BlogPostData; slug: string }[] + + const sorted = allBlogPosts.sort( + (a: { data: { published: Date } }, b: { data: { published: Date } }) => { + const dateA = new Date(a.data.published) + const dateB = new Date(b.data.published) + return dateA > dateB ? -1 : 1 + }, + ) for (let i = 1; i < sorted.length; i++) { sorted[i].data.nextSlug = sorted[i - 1].slug @@ -30,12 +36,12 @@ export type Tag = { } export async function getTagList(): Promise { - const allBlogPosts = await getCollection('posts', ({ data }) => { + const allBlogPosts = await getCollection<'posts'>('posts', ({ data }) => { return import.meta.env.PROD ? data.draft !== true : true }) const countMap: { [key: string]: number } = {} - allBlogPosts.map(post => { + allBlogPosts.map((post: { data: { tags: string[] } }) => { post.data.tags.map((tag: string) => { if (!countMap[tag]) countMap[tag] = 0 countMap[tag]++ @@ -56,11 +62,11 @@ export type Category = { } export async function getCategoryList(): Promise { - const allBlogPosts = await getCollection('posts', ({ data }) => { + const allBlogPosts = await getCollection<'posts'>('posts', ({ data }) => { return import.meta.env.PROD ? data.draft !== true : true }) const count: { [key: string]: number } = {} - allBlogPosts.map(post => { + allBlogPosts.map((post: { data: { category: string | number } }) => { if (!post.data.category) { const ucKey = i18n(I18nKey.uncategorized) count[ucKey] = count[ucKey] ? count[ucKey] + 1 : 1 diff --git a/src/utils/setting-utils.ts b/src/utils/setting-utils.ts index 31caf75..eda2e32 100644 --- a/src/utils/setting-utils.ts +++ b/src/utils/setting-utils.ts @@ -1,20 +1,20 @@ +import type { LIGHT_DARK_MODE } from '@/types/config' import { AUTO_MODE, DARK_MODE, DEFAULT_THEME, LIGHT_MODE, } from '@constants/constants.ts' -import type { LIGHT_DARK_MODE } from '@/types/config' export function getDefaultHue(): number { const fallback = '250' const configCarrier = document.getElementById('config-carrier') - return parseInt(configCarrier?.dataset.hue || fallback) + return Number.parseInt(configCarrier?.dataset.hue || fallback) } export function getHue(): number { const stored = localStorage.getItem('hue') - return stored ? parseInt(stored) : getDefaultHue() + return stored ? Number.parseInt(stored) : getDefaultHue() } export function setHue(hue: number): void { diff --git a/tsconfig.json b/tsconfig.json index 86513ab..3c708e6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "strictNullChecks": true, - "allowJs": true, + "allowJs": false, + "declaration": true, "plugins": [ { "name": "@astrojs/ts-plugin"