From 6326c2bb26ab8f0eb16f01644cc99ece742a4b8e Mon Sep 17 00:00:00 2001 From: Benjamin Toby Date: Thu, 15 Oct 2026 04:37:38 +0100 Subject: [PATCH] Updates --- .dockerignore | 3 +- .gitignore | 6 +- Dockerfile | 13 +- bun-mariadb.config.ts | 3 +- bun.lock | 92 ++++--- bunext.config.ts | 26 ++ db/schema.ts | 192 ++++++++++++++- db/types/db.ts | 293 +++-------------------- deploy/deploy-mail-server.sh | 2 +- deploy/deploy-oracle.sh | 20 +- deploy/deploy-summitlending-contabo.sh | 32 +++ entrypoint.sh | 15 ++ package.json | 4 +- src/components/pages/Home/(data)/work.ts | 40 +++- src/data/site-data.ts | 6 + src/pages/blog/[slug]/index.server.ts | 47 ++-- src/pages/blog/index.server.ts | 33 ++- src/types/index.ts | 6 +- 18 files changed, 469 insertions(+), 364 deletions(-) mode change 100644 => 100755 deploy/deploy-oracle.sh create mode 100755 deploy/deploy-summitlending-contabo.sh create mode 100644 entrypoint.sh create mode 100644 src/data/site-data.ts diff --git a/.dockerignore b/.dockerignore index 1e2eb54..b74ba70 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,4 +4,5 @@ node_modules /test .vscode .data -bun.lock \ No newline at end of file +bun.lock +.env \ No newline at end of file diff --git a/.gitignore b/.gitignore index 39813a9..7fc2591 100644 --- a/.gitignore +++ b/.gitignore @@ -46,4 +46,8 @@ dsql-schema-to-typedef.json /.bunext /db/.backups /db/.exports -.bun-mariadb \ No newline at end of file +.bun-mariadb +.git + +/assets +/secrets \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index f84bcc5..e4ccdec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,11 @@ -FROM oven/bun:1.3.1-debian +FROM oven/bun:1.4-debian RUN apt update RUN apt install -y curl bash nano wget zip unzip ENV NODE_ENV=production +ENV BUN_FEATURE_FLAG_DISABLE_STREAMING_INSTALL=1 +ENV PAGE_LASTMOD_FILE=/data/page-lastmod.json RUN mkdir /app @@ -15,8 +17,13 @@ RUN echo 'alias ll="ls -laF"' >/root/.bashrc COPY . /app/. RUN bun install -# RUN bun db:schema + +COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh ENV NODE_ENV=production -CMD ["bun", "start"] +HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ + CMD curl -fsS "http://localhost:${PORT:-3000}/api/health" || exit 1 + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/bun-mariadb.config.ts b/bun-mariadb.config.ts index 39dcd08..355b11d 100644 --- a/bun-mariadb.config.ts +++ b/bun-mariadb.config.ts @@ -1,9 +1,10 @@ import type { BunMariaDBConfig } from "@moduletrace/bun-mariadb"; const config: BunMariaDBConfig = { - db_name: "tben", + db_name: "datasquirel_user_2_tbenme", db_dir: "./db", typedef_file_path: "./db/types/db.ts", + ssl_reject_unauthorized: false, }; export default config; diff --git a/bun.lock b/bun.lock index b661e60..0c9f8b5 100644 --- a/bun.lock +++ b/bun.lock @@ -5,8 +5,8 @@ "": { "name": "new-personal-site-bunext", "dependencies": { - "@moduletrace/bun-mariadb": "^1.0.19", - "@moduletrace/bunext": "^1.0.61", + "@moduletrace/bun-mariadb": "^1.1.1", + "@moduletrace/bunext": "^1.2.0", "gray-matter": "^4.0.3", "html-to-react": "^1.7.0", "lodash": "^4.17.21", @@ -45,57 +45,57 @@ "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.29.7", "", {}, "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg=="], - "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.27.7", "", { "os": "aix", "cpu": "ppc64" }, "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg=="], + "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.28.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ=="], - "@esbuild/android-arm": ["@esbuild/android-arm@0.27.7", "", { "os": "android", "cpu": "arm" }, "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ=="], + "@esbuild/android-arm": ["@esbuild/android-arm@0.28.2", "", { "os": "android", "cpu": "arm" }, "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg=="], - "@esbuild/android-arm64": ["@esbuild/android-arm64@0.27.7", "", { "os": "android", "cpu": "arm64" }, "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ=="], + "@esbuild/android-arm64": ["@esbuild/android-arm64@0.28.2", "", { "os": "android", "cpu": "arm64" }, "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A=="], - "@esbuild/android-x64": ["@esbuild/android-x64@0.27.7", "", { "os": "android", "cpu": "x64" }, "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg=="], + "@esbuild/android-x64": ["@esbuild/android-x64@0.28.2", "", { "os": "android", "cpu": "x64" }, "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q=="], - "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.27.7", "", { "os": "darwin", "cpu": "arm64" }, "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw=="], + "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.28.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw=="], - "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.27.7", "", { "os": "darwin", "cpu": "x64" }, "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ=="], + "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.28.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw=="], - "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.27.7", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w=="], + "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.28.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw=="], - "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.27.7", "", { "os": "freebsd", "cpu": "x64" }, "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ=="], + "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.28.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg=="], - "@esbuild/linux-arm": ["@esbuild/linux-arm@0.27.7", "", { "os": "linux", "cpu": "arm" }, "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA=="], + "@esbuild/linux-arm": ["@esbuild/linux-arm@0.28.2", "", { "os": "linux", "cpu": "arm" }, "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w=="], - "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.27.7", "", { "os": "linux", "cpu": "arm64" }, "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A=="], + "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.28.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug=="], - "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.27.7", "", { "os": "linux", "cpu": "ia32" }, "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg=="], + "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.28.2", "", { "os": "linux", "cpu": "ia32" }, "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ=="], - "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.27.7", "", { "os": "linux", "cpu": "none" }, "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q=="], + "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.28.2", "", { "os": "linux", "cpu": "none" }, "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ=="], - "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.27.7", "", { "os": "linux", "cpu": "none" }, "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw=="], + "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.28.2", "", { "os": "linux", "cpu": "none" }, "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA=="], - "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.27.7", "", { "os": "linux", "cpu": "ppc64" }, "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ=="], + "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.28.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ=="], - "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.27.7", "", { "os": "linux", "cpu": "none" }, "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ=="], + "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.28.2", "", { "os": "linux", "cpu": "none" }, "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA=="], - "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.27.7", "", { "os": "linux", "cpu": "s390x" }, "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw=="], + "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.28.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg=="], - "@esbuild/linux-x64": ["@esbuild/linux-x64@0.27.7", "", { "os": "linux", "cpu": "x64" }, "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA=="], + "@esbuild/linux-x64": ["@esbuild/linux-x64@0.28.2", "", { "os": "linux", "cpu": "x64" }, "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ=="], - "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.27.7", "", { "os": "none", "cpu": "arm64" }, "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w=="], + "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.28.2", "", { "os": "none", "cpu": "arm64" }, "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw=="], - "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.27.7", "", { "os": "none", "cpu": "x64" }, "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw=="], + "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.28.2", "", { "os": "none", "cpu": "x64" }, "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw=="], - "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.27.7", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A=="], + "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.28.2", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ=="], - "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.27.7", "", { "os": "openbsd", "cpu": "x64" }, "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg=="], + "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.28.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw=="], - "@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.27.7", "", { "os": "none", "cpu": "arm64" }, "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw=="], + "@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.28.2", "", { "os": "none", "cpu": "arm64" }, "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q=="], - "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.27.7", "", { "os": "sunos", "cpu": "x64" }, "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA=="], + "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.28.2", "", { "os": "sunos", "cpu": "x64" }, "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g=="], - "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.27.7", "", { "os": "win32", "cpu": "arm64" }, "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA=="], + "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.28.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ=="], - "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.27.7", "", { "os": "win32", "cpu": "ia32" }, "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw=="], + "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.28.2", "", { "os": "win32", "cpu": "ia32" }, "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA=="], - "@esbuild/win32-x64": ["@esbuild/win32-x64@0.27.7", "", { "os": "win32", "cpu": "x64" }, "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg=="], + "@esbuild/win32-x64": ["@esbuild/win32-x64@0.28.2", "", { "os": "win32", "cpu": "x64" }, "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g=="], "@inquirer/ansi": ["@inquirer/ansi@2.0.7", "", {}, "sha512-3eTuUO1vH2cZm2ZKHeQxnOqlTi9EfZDGgIe3BL3I4u+rJHocr9Fz86M4fjYABPvFnQG/gGK551HqDiIcETwU6Q=="], @@ -143,9 +143,9 @@ "@mdx-js/react": ["@mdx-js/react@3.1.1", "", { "dependencies": { "@types/mdx": "^2.0.0" }, "peerDependencies": { "@types/react": ">=16", "react": ">=16" } }, "sha512-f++rKLQgUVYDAtECQ6fn/is15GkEH9+nZPM3MS0RcxVqoTfawHvDlSCH7JbMhAM6uJ32v3eXLvLmLvjGu7PTQw=="], - "@moduletrace/bun-mariadb": ["@moduletrace/bun-mariadb@1.0.19", "https://git.tben.me/api/packages/Moduletrace/npm/%40moduletrace%2Fbun-mariadb/-/1.0.19/bun-mariadb-1.0.19.tgz", { "dependencies": { "@inquirer/prompts": "^8.3.0", "chalk": "^5.6.2", "commander": "^14.0.3", "lodash": "^4.17.23", "sanitize-html": "^2.17.6" }, "peerDependencies": { "typescript": ">=5" }, "optionalPeers": ["typescript"], "bin": { "bun-mariadb": "dist/commands/index.js" } }, "sha512-IUnQXt76rUGGYBTfpVe26XSx23+LNCBASlPtAGS9hXMcH4Kyf2JmcMr6fVJUiZ6SrgA232DF2A248r/2kFch0Q=="], + "@moduletrace/bun-mariadb": ["@moduletrace/bun-mariadb@1.1.1", "https://git.tben.me/api/packages/Moduletrace/npm/%40moduletrace%2Fbun-mariadb/-/1.1.1/bun-mariadb-1.1.1.tgz", { "dependencies": { "@inquirer/prompts": "^8.3.0", "chalk": "^5.6.2", "commander": "^14.0.3", "lodash": "^4.17.23", "sanitize-html": "^2.17.6" }, "peerDependencies": { "typescript": ">=5" }, "optionalPeers": ["typescript"], "bin": { "bun-mariadb": "dist/commands/index.js" } }, "sha512-nDKaKr59lC6td9rxwopvO3DQbpH34U+dPlGVFvozmsKu89hP7a/e0IpwnTfd7Otw9cnqPjG3F9a7tHWS7fCgdg=="], - "@moduletrace/bunext": ["@moduletrace/bunext@1.1.7", "https://git.tben.me/api/packages/Moduletrace/npm/%40moduletrace%2Fbunext/-/1.1.7/bunext-1.1.7.tgz", { "dependencies": { "@tailwindcss/postcss": "^4.2.2", "@types/bun": "latest", "@types/node": "^24.10.0", "@types/react": "^19.2.2", "@types/react-dom": "^19.2.2", "bun-plugin-tailwind": "^0.1.2", "chalk": "^5.6.2", "chokidar": "^5.0.0", "commander": "^14.0.2", "esbuild": "^0.27.4", "lightningcss-wasm": "^1.32.0", "lodash": "^4.17.23", "micromatch": "^4.0.8", "ora": "^9.0.0", "postcss": "^8.5.8", "react": "^19.2.4", "react-dom": "^19.2.4", "tailwindcss": "^4.2.2", "typescript": "^5.0.0" }, "bin": { "bunext": "dist/commands/index.js" } }, "sha512-4xXXJqK+Ap7Tkf+KJZyxidcDsbnJjR2fG6Ypc00SwgSXx54sg0tINM62bnhHp/YJdRC0eHc14mWH/sLqunQE0g=="], + "@moduletrace/bunext": ["@moduletrace/bunext@1.2.0", "https://git.tben.me/api/packages/Moduletrace/npm/%40moduletrace%2Fbunext/-/1.2.0/bunext-1.2.0.tgz", { "dependencies": { "@tailwindcss/postcss": "^4.3.3", "@types/bun": "1.3.14", "@types/node": "^24.10.0", "@types/react": "^19.3.0", "@types/react-dom": "^19.3.0", "bun-plugin-tailwind": "^0.1.2", "chalk": "^5.6.2", "chokidar": "^5.0.0", "commander": "^14.0.2", "esbuild": "^0.28.2", "lightningcss-wasm": "^1.32.0", "lodash": "^4.18.1", "ora": "^9.0.0", "postcss": "^8.5.30", "react": "^19.3.0", "react-dom": "^19.3.0", "tailwindcss": "^4.3.3", "typescript": "^5.0.0", "uuid": "^14.0.2" }, "bin": { "bunext": "dist/commands/index.js" } }, "sha512-GypVMYehm+ykoHB3ch6ygzLLJKa0Fo1ugLtLB0JZoJlZOgqYTvMuxmSLi/j2dL3t5NdAdcgzerkFp/7iU0jKJA=="], "@oven/bun-darwin-aarch64": ["@oven/bun-darwin-aarch64@1.3.14", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Omj20SuiHBOUjUBIyqtkNjSUIjOtEOJwmbix/ZyFH4BaQ6OZTaaRWIR4TjHVz0yadHgli6lLTiAh1uarnvD49A=="], @@ -259,8 +259,6 @@ "bail": ["bail@2.0.2", "", {}, "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="], - "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], - "bun": ["bun@1.3.14", "", { "optionalDependencies": { "@oven/bun-darwin-aarch64": "1.3.14", "@oven/bun-darwin-x64": "1.3.14", "@oven/bun-darwin-x64-baseline": "1.3.14", "@oven/bun-freebsd-aarch64": "1.3.14", "@oven/bun-freebsd-x64": "1.3.14", "@oven/bun-linux-aarch64": "1.3.14", "@oven/bun-linux-aarch64-android": "1.3.14", "@oven/bun-linux-aarch64-musl": "1.3.14", "@oven/bun-linux-x64": "1.3.14", "@oven/bun-linux-x64-android": "1.3.14", "@oven/bun-linux-x64-baseline": "1.3.14", "@oven/bun-linux-x64-musl": "1.3.14", "@oven/bun-linux-x64-musl-baseline": "1.3.14", "@oven/bun-windows-aarch64": "1.3.14", "@oven/bun-windows-x64": "1.3.14", "@oven/bun-windows-x64-baseline": "1.3.14" }, "os": [ "!aix", "!sunos", "!openbsd", ], "cpu": [ "x64", "arm64", ], "bin": { "bun": "bin/bun.exe", "bunx": "bin/bunx.exe" } }, "sha512-aB6GVd42x1Y5ie1K16SF+oLGtgSkwX9hgoDdIW88pjvfTccU8F1vfpoOt34QLv0dZ1v3XimtaxPlZUG81Gx9Zg=="], "bun-plugin-tailwind": ["bun-plugin-tailwind@0.1.2", "", { "peerDependencies": { "bun": ">=1.0.0" } }, "sha512-41jNC1tZRSK3s1o7pTNrLuQG8kL/0vR/JgiTmZAJ1eHwe0w5j6HFPKeqEk0WAD13jfrUC7+ULuewFBBCoADPpg=="], @@ -339,7 +337,7 @@ "esast-util-from-js": ["esast-util-from-js@2.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "acorn": "^8.0.0", "esast-util-from-estree": "^2.0.0", "vfile-message": "^4.0.0" } }, "sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw=="], - "esbuild": ["esbuild@0.27.7", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.27.7", "@esbuild/android-arm": "0.27.7", "@esbuild/android-arm64": "0.27.7", "@esbuild/android-x64": "0.27.7", "@esbuild/darwin-arm64": "0.27.7", "@esbuild/darwin-x64": "0.27.7", "@esbuild/freebsd-arm64": "0.27.7", "@esbuild/freebsd-x64": "0.27.7", "@esbuild/linux-arm": "0.27.7", "@esbuild/linux-arm64": "0.27.7", "@esbuild/linux-ia32": "0.27.7", "@esbuild/linux-loong64": "0.27.7", "@esbuild/linux-mips64el": "0.27.7", "@esbuild/linux-ppc64": "0.27.7", "@esbuild/linux-riscv64": "0.27.7", "@esbuild/linux-s390x": "0.27.7", "@esbuild/linux-x64": "0.27.7", "@esbuild/netbsd-arm64": "0.27.7", "@esbuild/netbsd-x64": "0.27.7", "@esbuild/openbsd-arm64": "0.27.7", "@esbuild/openbsd-x64": "0.27.7", "@esbuild/openharmony-arm64": "0.27.7", "@esbuild/sunos-x64": "0.27.7", "@esbuild/win32-arm64": "0.27.7", "@esbuild/win32-ia32": "0.27.7", "@esbuild/win32-x64": "0.27.7" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w=="], + "esbuild": ["esbuild@0.28.2", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.28.2", "@esbuild/android-arm": "0.28.2", "@esbuild/android-arm64": "0.28.2", "@esbuild/android-x64": "0.28.2", "@esbuild/darwin-arm64": "0.28.2", "@esbuild/darwin-x64": "0.28.2", "@esbuild/freebsd-arm64": "0.28.2", "@esbuild/freebsd-x64": "0.28.2", "@esbuild/linux-arm": "0.28.2", "@esbuild/linux-arm64": "0.28.2", "@esbuild/linux-ia32": "0.28.2", "@esbuild/linux-loong64": "0.28.2", "@esbuild/linux-mips64el": "0.28.2", "@esbuild/linux-ppc64": "0.28.2", "@esbuild/linux-riscv64": "0.28.2", "@esbuild/linux-s390x": "0.28.2", "@esbuild/linux-x64": "0.28.2", "@esbuild/netbsd-arm64": "0.28.2", "@esbuild/netbsd-x64": "0.28.2", "@esbuild/openbsd-arm64": "0.28.2", "@esbuild/openbsd-x64": "0.28.2", "@esbuild/openharmony-arm64": "0.28.2", "@esbuild/sunos-x64": "0.28.2", "@esbuild/win32-arm64": "0.28.2", "@esbuild/win32-ia32": "0.28.2", "@esbuild/win32-x64": "0.28.2" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA=="], "escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="], @@ -369,8 +367,6 @@ "fast-wrap-ansi": ["fast-wrap-ansi@0.2.2", "", { "dependencies": { "fast-string-width": "^3.0.2" } }, "sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q=="], - "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], - "find-up": ["find-up@1.1.2", "", { "dependencies": { "path-exists": "^2.0.0", "pinkie-promise": "^2.0.0" } }, "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA=="], "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], @@ -433,8 +429,6 @@ "is-interactive": ["is-interactive@2.0.0", "", {}, "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ=="], - "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], - "is-plain-obj": ["is-plain-obj@4.1.0", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="], "is-plain-object": ["is-plain-object@5.0.0", "", {}, "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q=="], @@ -609,8 +603,6 @@ "micromark-util-types": ["micromark-util-types@2.0.2", "", {}, "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA=="], - "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], - "mimic-function": ["mimic-function@5.0.1", "", {}, "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA=="], "minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="], @@ -653,8 +645,6 @@ "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], - "picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], - "pify": ["pify@2.3.0", "", {}, "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog=="], "pinkie": ["pinkie@2.0.4", "", {}, "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg=="], @@ -669,9 +659,9 @@ "property-information": ["property-information@7.2.0", "", {}, "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg=="], - "react": ["react@19.2.8", "", {}, "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw=="], + "react": ["react@19.3.1", "", {}, "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw=="], - "react-dom": ["react-dom@19.2.8", "", { "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { "react": "^19.2.8" } }, "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ=="], + "react-dom": ["react-dom@19.3.1", "", { "dependencies": { "scheduler": "^0.28.0" }, "peerDependencies": { "react": "^19.3.1" } }, "sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ=="], "react-markdown": ["react-markdown@10.1.0", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "html-url-attributes": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "unified": "^11.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" }, "peerDependencies": { "@types/react": ">=18", "react": ">=18" } }, "sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ=="], @@ -721,7 +711,7 @@ "sanitize-html": ["sanitize-html@2.17.7", "", { "dependencies": { "deepmerge": "^4.2.2", "escape-string-regexp": "^4.0.0", "htmlparser2": "^12.0.0", "is-plain-object": "^5.0.0", "launder": "^1.7.1", "parse-srcset": "^1.0.2", "postcss": "^8.3.11" } }, "sha512-PGtEkc9cbnedU3s9TmzDbpsZ8w086g/0Q8k8/oIO1NLNU3i5k9yn835CrjJSajp1KMmkisbO1qPXxNKO3welAg=="], - "scheduler": ["scheduler@0.27.0", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="], + "scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="], "section-matter": ["section-matter@1.0.0", "", { "dependencies": { "extend-shallow": "^2.0.1", "kind-of": "^6.0.0" } }, "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA=="], @@ -773,8 +763,6 @@ "tapable": ["tapable@2.3.3", "", {}, "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A=="], - "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], - "trim-lines": ["trim-lines@3.0.1", "", {}, "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="], "trim-newlines": ["trim-newlines@1.0.0", "", {}, "sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw=="], @@ -803,6 +791,8 @@ "unist-util-visit-parents": ["unist-util-visit-parents@6.0.2", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ=="], + "uuid": ["uuid@14.0.3", "", { "bin": { "uuid": "dist-node/bin/uuid" } }, "sha512-Sc5u1VVln93y1Xnz4R+CunOZc7R9LUcTmhj7Rc7Eg3HVcf7rVn2FOoa812fe0W8p3jD7xeoGSYbfqCGGH2B6xw=="], + "validate-npm-package-license": ["validate-npm-package-license@3.0.4", "", { "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew=="], "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], @@ -825,9 +815,11 @@ "@moduletrace/bunext/@types/node": ["@types/node@24.13.3", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q=="], - "@moduletrace/bunext/@types/react": ["@types/react@19.2.18", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w=="], + "@moduletrace/bunext/@types/react": ["@types/react@19.3.0", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg=="], - "@moduletrace/bunext/@types/react-dom": ["@types/react-dom@19.2.4", "", { "peerDependencies": { "@types/react": "^19.2.0" } }, "sha512-Bsc+QHgp+P/F02XDzNCY9jnZNCUuLki36KT7VKrTXXLdHf+vHMNZnW1rVu5DNW/rCK+fya3DATySbLM4yhtKUw=="], + "@moduletrace/bunext/@types/react-dom": ["@types/react-dom@19.3.0", "", { "peerDependencies": { "@types/react": "^19.3.0" } }, "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q=="], + + "@moduletrace/bunext/postcss": ["postcss@8.5.30", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-zkd+e9S1AQHhmaBKye9zlFHWjOwVgqXl1q3ECYy8561K7qxR2cREf/STLskulBFd78k6AOFeA+ff1TtEzk9bAA=="], "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.11.3", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.3", "tslib": "^2.4.0" }, "bundled": true }, "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg=="], @@ -859,6 +851,10 @@ "@moduletrace/bunext/@types/node/undici-types": ["undici-types@7.18.2", "", {}, "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="], + "@moduletrace/bunext/postcss/nanoid": ["nanoid@3.3.20", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ=="], + + "@moduletrace/bunext/postcss/source-map-js": ["source-map-js@1.2.2", "", {}, "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw=="], + "bun-types/@types/node/undici-types": ["undici-types@7.18.2", "", {}, "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="], "sanitize-html/htmlparser2/domelementtype": ["domelementtype@3.0.0", "", {}, "sha512-umCQid3jKbDmVjx8jGaW7uUykm4DEUeyV21hPxNMo2nV955DhUThwqyOIDtreepP31hl84X7G5U9ZfsWvIB3Pg=="], diff --git a/bunext.config.ts b/bunext.config.ts index 8ba9c15..98306a6 100644 --- a/bunext.config.ts +++ b/bunext.config.ts @@ -1,6 +1,32 @@ import type { BunextConfig } from "@moduletrace/bunext/types"; +import { SiteData } from "./src/data/site-data"; + +const DisallowedPaths = [ + "/admin", + "/auth", + "/api", + "/media", + "/ws", + "/webhooks", +]; const config: BunextConfig = { port: 3070, + sitemap: { + origin: SiteData["SiteURL"], + exclude: DisallowedPaths.map((prefix) => `${prefix}/*`), + lastmod_file: process.env.PAGE_LASTMOD_FILE, + }, + robots: { + origin: SiteData["SiteURL"], + rules: [ + { + user_agent: "*", + allow: ["/"], + disallow: DisallowedPaths, + }, + ], + sitemaps: ["/sitemap.xml"], + }, }; export default config; diff --git a/db/schema.ts b/db/schema.ts index d68dece..9087cb7 100644 --- a/db/schema.ts +++ b/db/schema.ts @@ -5,13 +5,22 @@ const schema: BUN_MARIADB_DatabaseSchemaType = { { tableName: "blog_posts", fields: [ + { + fieldName: "id", + dataType: "BIGINT", + primaryKey: true, + autoIncrement: true, + notNullValue: true, + }, { fieldName: "title", dataType: "VARCHAR", + notNullValue: true, }, { fieldName: "slug", dataType: "VARCHAR", + notNullValue: true, }, { fieldName: "excerpt", @@ -20,35 +29,202 @@ const schema: BUN_MARIADB_DatabaseSchemaType = { { fieldName: "body", dataType: "LONGTEXT", - html: true, + markdown: true, }, { + json: true, fieldName: "metadata", dataType: "TEXT", - json: true, + nullValue: true, }, { + dataType: "BOOLEAN", fieldName: "published", - dataType: "TINYINT", - options: [0, 1], + defaultValue: "0", }, { - fieldName: "meta_title", dataType: "VARCHAR", + fieldName: "meta_title", }, { - fieldName: "meta_description", dataType: "TEXT", + fieldName: "meta_description", + }, + { + fieldName: "date_created", + dataType: "VARCHAR", + notNullValue: true, + }, + { + fieldName: "date_created_code", + dataType: "BIGINT", + notNullValue: true, + }, + { + fieldName: "date_created_timestamp", + dataType: "TIMESTAMP", + defaultValueLiteral: "CURRENT_TIMESTAMP", + nullValue: true, + }, + { + fieldName: "date_updated", + dataType: "VARCHAR", + notNullValue: true, + }, + { + fieldName: "date_updated_code", + dataType: "BIGINT", + notNullValue: true, + }, + { + fieldName: "date_updated_timestamp", + dataType: "TIMESTAMP", + defaultValueLiteral: "CURRENT_TIMESTAMP", + nullValue: true, }, ], + indexes: [], + uniqueConstraints: [], }, { tableName: "portfolio", - fields: [], + fields: [ + { + fieldName: "id", + dataType: "BIGINT", + primaryKey: true, + autoIncrement: true, + notNullValue: true, + }, + { + fieldName: "title", + dataType: "VARCHAR", + notNullValue: true, + }, + { + fieldName: "description", + dataType: "VARCHAR", + nullValue: true, + }, + { + fieldName: "url", + dataType: "VARCHAR", + nullValue: true, + }, + { + fieldName: "image", + dataType: "VARCHAR", + nullValue: true, + }, + { + fieldName: "full_description", + dataType: "LONGTEXT", + nullValue: true, + html: true, + }, + { + fieldName: "starting_date", + dataType: "VARCHAR", + nullValue: true, + }, + { + fieldName: "completion_date", + dataType: "VARCHAR", + nullValue: true, + }, + { + fieldName: "project_order", + dataType: "INT", + }, + { + fieldName: "date_created", + dataType: "VARCHAR", + notNullValue: true, + }, + { + fieldName: "date_created_code", + dataType: "BIGINT", + notNullValue: true, + }, + { + fieldName: "date_created_timestamp", + dataType: "TIMESTAMP", + defaultValueLiteral: "CURRENT_TIMESTAMP", + nullValue: true, + }, + { + fieldName: "date_updated", + dataType: "VARCHAR", + notNullValue: true, + }, + { + fieldName: "date_updated_code", + dataType: "BIGINT", + notNullValue: true, + }, + { + fieldName: "date_updated_timestamp", + dataType: "TIMESTAMP", + defaultValueLiteral: "CURRENT_TIMESTAMP", + nullValue: true, + }, + ], + indexes: [], }, { tableName: "documents", - fields: [], + fields: [ + { + fieldName: "id", + dataType: "BIGINT", + primaryKey: true, + autoIncrement: true, + notNullValue: true, + }, + { + fieldName: "project_name", + dataType: "VARCHAR", + notNullValue: true, + }, + { + fieldName: "html", + dataType: "LONGTEXT", + html: true, + cssFiles: [], + }, + { + fieldName: "date_created", + dataType: "VARCHAR", + notNullValue: true, + }, + { + fieldName: "date_created_code", + dataType: "BIGINT", + notNullValue: true, + }, + { + fieldName: "date_created_timestamp", + dataType: "TIMESTAMP", + defaultValueLiteral: "CURRENT_TIMESTAMP", + nullValue: true, + }, + { + fieldName: "date_updated", + dataType: "VARCHAR", + notNullValue: true, + }, + { + fieldName: "date_updated_code", + dataType: "BIGINT", + notNullValue: true, + }, + { + fieldName: "date_updated_timestamp", + dataType: "TIMESTAMP", + defaultValueLiteral: "CURRENT_TIMESTAMP", + nullValue: true, + }, + ], }, ], }; diff --git a/db/types/db.ts b/db/types/db.ts index 95d00d6..abac929 100644 --- a/db/types/db.ts +++ b/db/types/db.ts @@ -1,21 +1,10 @@ export const BunMariaDBTables = [ - "users", - "user_types", - "sso_login_codes", - "media", - "media_paradigms", - "events", - "event_media", - "user_media", - "locations", - "location_types", - "publications", - "publication_types", - "publication_media", - "variables", + "blog_posts", + "portfolio", + "documents", ] as const -export type BUN_MARIADB_SBF_USERS = { +export type BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS = { /** * The unique identifier of the record. */ @@ -28,223 +17,23 @@ export type BUN_MARIADB_SBF_USERS = { * The time when the record was updated. (Unix Timestamp) */ updated_at?: number | ""; - first_name?: string; - last_name?: string; - email?: string; - sbf_email?: string; - username?: string; - bio_summary?: string; - bio?: string; - archived?: 0 | 1 | ""; - date_of_birth?: number | ""; - location_id?: number | ""; -} - -export type BUN_MARIADB_SBF_USER_TYPES = { - /** - * The unique identifier of the record. - */ - id?: number | ""; - /** - * The time when the record was created. (Unix Timestamp) - */ - created_at?: number | ""; - /** - * The time when the record was updated. (Unix Timestamp) - */ - updated_at?: number | ""; - user_id?: number | ""; - user_type?: "super_admin" | "admin" | "auditor" | "chairman" | "founder" | "vice_chairman" | "secretary" | "orphan" | "revoked" | "read_only" | "board_member" | "suspended" | ""; -} - -export type BUN_MARIADB_SBF_SSO_LOGIN_CODES = { - /** - * The unique identifier of the record. - */ - id?: number | ""; - /** - * The time when the record was created. (Unix Timestamp) - */ - created_at?: number | ""; - /** - * The time when the record was updated. (Unix Timestamp) - */ - updated_at?: number | ""; - user_id?: number | ""; - code?: string; -} - -export type BUN_MARIADB_SBF_MEDIA = { - /** - * The unique identifier of the record. - */ - id?: number | ""; - /** - * The time when the record was created. (Unix Timestamp) - */ - created_at?: number | ""; - /** - * The time when the record was updated. (Unix Timestamp) - */ - updated_at?: number | ""; - user_id?: number | ""; - title?: string; - description?: string; - summary?: string; - media_type?: "image" | "video" | "document" | ""; - media_write_path?: string; - media_thumbnail_write_path?: string; - mime_type?: string; - text_content?: string; - is_primary?: 0 | 1 | ""; - is_rag_ingested?: 0 | 1 | ""; - is_private?: 0 | 1 | ""; - archived?: 0 | 1 | ""; -} - -export type BUN_MARIADB_SBF_MEDIA_PARADIGMS = { - /** - * The unique identifier of the record. - */ - id?: number | ""; - /** - * The time when the record was created. (Unix Timestamp) - */ - created_at?: number | ""; - /** - * The time when the record was updated. (Unix Timestamp) - */ - updated_at?: number | ""; - media_id?: number | ""; - media_paradigm?: "user-profile-image" | "generic" | "event" | "location" | "publication" | ""; -} - -export type BUN_MARIADB_SBF_EVENTS = { - /** - * The unique identifier of the record. - */ - id?: number | ""; - /** - * The time when the record was created. (Unix Timestamp) - */ - created_at?: number | ""; - /** - * The time when the record was updated. (Unix Timestamp) - */ - updated_at?: number | ""; - user_id?: number | ""; - title?: string; - slug?: string; - short_description?: string; - long_description?: string; - event_date?: number | ""; - subsidiary?: "childrens-home" | "youth-development" | "women-empowerment" | ""; -} - -export type BUN_MARIADB_SBF_EVENT_MEDIA = { - /** - * The unique identifier of the record. - */ - id?: number | ""; - /** - * The time when the record was created. (Unix Timestamp) - */ - created_at?: number | ""; - /** - * The time when the record was updated. (Unix Timestamp) - */ - updated_at?: number | ""; - event_id?: number | ""; - media_id?: number | ""; - is_primary?: 0 | 1 | ""; -} - -export type BUN_MARIADB_SBF_USER_MEDIA = { - /** - * The unique identifier of the record. - */ - id?: number | ""; - /** - * The time when the record was created. (Unix Timestamp) - */ - created_at?: number | ""; - /** - * The time when the record was updated. (Unix Timestamp) - */ - updated_at?: number | ""; - user_id?: number | ""; - media_id?: number | ""; -} - -export type BUN_MARIADB_SBF_LOCATIONS = { - /** - * The unique identifier of the record. - */ - id?: number | ""; - /** - * The time when the record was created. (Unix Timestamp) - */ - created_at?: number | ""; - /** - * The time when the record was updated. (Unix Timestamp) - */ - updated_at?: number | ""; - name?: string; - slug?: string; - address?: string; - city?: string; - state?: string; - country?: string; - description?: string; - user_id?: number | ""; - media_id?: number | ""; - subsidiary?: "childrens-home" | "youth-development" | "women-empowerment" | ""; - is_primary?: 0 | 1 | ""; - archived?: 0 | 1 | ""; -} - -export type BUN_MARIADB_SBF_LOCATION_TYPES = { - /** - * The unique identifier of the record. - */ - id?: number | ""; - /** - * The time when the record was created. (Unix Timestamp) - */ - created_at?: number | ""; - /** - * The time when the record was updated. (Unix Timestamp) - */ - updated_at?: number | ""; - location_id?: number | ""; - location_type?: "orphanage" | "office" | "rural_community_branch" | "headquaters" | ""; -} - -export type BUN_MARIADB_SBF_PUBLICATIONS = { - /** - * The unique identifier of the record. - */ - id?: number | ""; - /** - * The time when the record was created. (Unix Timestamp) - */ - created_at?: number | ""; - /** - * The time when the record was updated. (Unix Timestamp) - */ - updated_at?: number | ""; - user_id?: number | ""; title?: string; slug?: string; excerpt?: string; - summary?: string; body?: string; - body_plain?: string; - archived?: 0 | 1 | ""; - subsidiary?: "childrens-home" | "youth-development" | "women-empowerment" | ""; + metadata?: string; + published?: 0 | 1; + meta_title?: string; + meta_description?: string; + date_created?: string; + date_created_code?: number | ""; + date_created_timestamp?: string; + date_updated?: string; + date_updated_code?: number | ""; + date_updated_timestamp?: string; } -export type BUN_MARIADB_SBF_PUBLICATION_TYPES = { +export type BUN_MARIADB_DATASQUIREL_USER_2_TBENME_PORTFOLIO = { /** * The unique identifier of the record. */ @@ -257,11 +46,23 @@ export type BUN_MARIADB_SBF_PUBLICATION_TYPES = { * The time when the record was updated. (Unix Timestamp) */ updated_at?: number | ""; - publication_id?: number | ""; - publication_type?: "blog" | "article" | "case_study" | ""; + title?: string; + description?: string; + url?: string; + image?: string; + full_description?: string; + starting_date?: string; + completion_date?: string; + project_order?: number | ""; + date_created?: string; + date_created_code?: number | ""; + date_created_timestamp?: string; + date_updated?: string; + date_updated_code?: number | ""; + date_updated_timestamp?: string; } -export type BUN_MARIADB_SBF_PUBLICATION_MEDIA = { +export type BUN_MARIADB_DATASQUIREL_USER_2_TBENME_DOCUMENTS = { /** * The unique identifier of the record. */ @@ -274,30 +75,14 @@ export type BUN_MARIADB_SBF_PUBLICATION_MEDIA = { * The time when the record was updated. (Unix Timestamp) */ updated_at?: number | ""; - publication_id?: number | ""; - media_id?: number | ""; - is_primary?: 0 | 1 | ""; + project_name?: string; + html?: string; + date_created?: string; + date_created_code?: number | ""; + date_created_timestamp?: string; + date_updated?: string; + date_updated_code?: number | ""; + date_updated_timestamp?: string; } -export type BUN_MARIADB_SBF_VARIABLES = { - /** - * The unique identifier of the record. - */ - id?: number | ""; - /** - * The time when the record was created. (Unix Timestamp) - */ - created_at?: number | ""; - /** - * The time when the record was updated. (Unix Timestamp) - */ - updated_at?: number | ""; - name?: "childrens_home_latest_event" | ""; - short_description?: string; - long_description?: string; - media_id?: number | ""; - user_id?: number | ""; - subsidiary?: "childrens-home" | "youth-development" | "women-empowerment" | ""; -} - -export type BUN_MARIADB_SBF_ALL_TYPEDEFS = BUN_MARIADB_SBF_USERS & BUN_MARIADB_SBF_USER_TYPES & BUN_MARIADB_SBF_SSO_LOGIN_CODES & BUN_MARIADB_SBF_MEDIA & BUN_MARIADB_SBF_MEDIA_PARADIGMS & BUN_MARIADB_SBF_EVENTS & BUN_MARIADB_SBF_EVENT_MEDIA & BUN_MARIADB_SBF_USER_MEDIA & BUN_MARIADB_SBF_LOCATIONS & BUN_MARIADB_SBF_LOCATION_TYPES & BUN_MARIADB_SBF_PUBLICATIONS & BUN_MARIADB_SBF_PUBLICATION_TYPES & BUN_MARIADB_SBF_PUBLICATION_MEDIA & BUN_MARIADB_SBF_VARIABLES \ No newline at end of file +export type BUN_MARIADB_DATASQUIREL_USER_2_TBENME_ALL_TYPEDEFS = BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS & BUN_MARIADB_DATASQUIREL_USER_2_TBENME_PORTFOLIO & BUN_MARIADB_DATASQUIREL_USER_2_TBENME_DOCUMENTS \ No newline at end of file diff --git a/deploy/deploy-mail-server.sh b/deploy/deploy-mail-server.sh index e7954b3..824b16e 100755 --- a/deploy/deploy-mail-server.sh +++ b/deploy/deploy-mail-server.sh @@ -16,5 +16,5 @@ cd /docker/tben-me docker build -t tben-me . docker kill tben-me || echo "Service already killed" docker rm tben-me || echo "Container already removed" -docker run --name tben-me -d --network cloudflare --network mariadb tben-me:latest +docker run --name tben-me -d --network cloudflare --network mariadb --cpus=0.5 tben-me:latest EOF \ No newline at end of file diff --git a/deploy/deploy-oracle.sh b/deploy/deploy-oracle.sh old mode 100644 new mode 100755 index a341a7f..ba7ca30 --- a/deploy/deploy-oracle.sh +++ b/deploy/deploy-oracle.sh @@ -1,4 +1,20 @@ #!/bin/bash -SERVER_IP="10.1.0.1" -SERVER_PATH="/docker/git/" \ No newline at end of file +set -e + +SOURCE_PATH="/home/archben/Projects/Git/personal/new-personal-site-bunext" + +SERVER_IP="150.136.47.131" +SERVER_PATH="/docker/tben-me" + +cd $SOURCE_PATH + +rsync -avz --exclude-from=.gitignore --delete $SOURCE_PATH/ root@$SERVER_IP:$SERVER_PATH/ + +ssh -i /home/archben/.ssh/tben root@$SERVER_IP << 'EOF' +cd /docker/tben-me +docker build -t tben-me . +docker kill tben-me || echo "Service already killed" +docker rm tben-me || echo "Container already removed" +docker run --name tben-me -d --network nginx-proxy-manager --network mariadb --restart unless-stopped tben-me:latest +EOF \ No newline at end of file diff --git a/deploy/deploy-summitlending-contabo.sh b/deploy/deploy-summitlending-contabo.sh new file mode 100755 index 0000000..5b08aa4 --- /dev/null +++ b/deploy/deploy-summitlending-contabo.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +set -e + +SOURCE_PATH="/home/archben/Projects/Git/personal/new-personal-site-bunext" + +SERVER_IP="195.26.246.243" +SERVER_PATH="/docker/tben-me" + +cd $SOURCE_PATH + +rsync -avz --exclude-from=.gitignore --delete $SOURCE_PATH/ root@$SERVER_IP:$SERVER_PATH/ +rsync -avz $SOURCE_PATH/secrets/prod.env root@$SERVER_IP:$SERVER_PATH/.env + +ssh -i /home/archben/.ssh/tben root@$SERVER_IP << 'EOF' +set -e + +DEPLOY_NAME="tben-me" + +cd /docker/$DEPLOY_NAME +docker build -t $DEPLOY_NAME . +docker kill $DEPLOY_NAME 2>/dev/null || echo "Service already killed" +docker rm $DEPLOY_NAME 2>/dev/null || echo "Container already removed" + +docker run --name $DEPLOY_NAME -d \ + --network cloudflare --network mariadb \ + -v /data/$DEPLOY_NAME/.data:/data \ + --restart unless-stopped \ + --cpus 0.5 --memory 1g \ + --env-file /docker/$DEPLOY_NAME/.env \ + $DEPLOY_NAME:latest +EOF \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..0c5a482 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -e + +echo "=== Tben INC ===" + +cd /app + +# bunx bun-mariadb schema + +bunx bunext build +bunx bunext sitemap + +echo "Starting server on port ${PORT:-3000}..." + +bunx bunext start diff --git a/package.json b/package.json index e0a8718..07538ca 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "deploy": "./deploy/deploy-mail-server.sh" }, "dependencies": { - "@moduletrace/bun-mariadb": "^1.0.19", - "@moduletrace/bunext": "^1.0.61", + "@moduletrace/bun-mariadb": "^1.1.1", + "@moduletrace/bunext": "^1.2.0", "gray-matter": "^4.0.3", "html-to-react": "^1.7.0", "lodash": "^4.17.21", diff --git a/src/components/pages/Home/(data)/work.ts b/src/components/pages/Home/(data)/work.ts index b875782..846c835 100644 --- a/src/components/pages/Home/(data)/work.ts +++ b/src/components/pages/Home/(data)/work.ts @@ -64,19 +64,19 @@ export const work = { "Tailwind CSS", ], }, - { - title: "Circlenav", - description: "The AI search engine done right", - href: "https://circlenav.net", - metrics: [""], - technologies: [ - "SearXNG", - "NextJS", - "Docker", - "Grok (XAI)", - "Websockets", - ], - }, + // { + // title: "Circlenav", + // description: "The AI search engine done right", + // href: "https://circlenav.net", + // metrics: [""], + // technologies: [ + // "SearXNG", + // "NextJS", + // "Docker", + // "Grok (XAI)", + // "Websockets", + // ], + // }, ], }, Devops: { @@ -146,6 +146,20 @@ export const work = { "Azure", ], }, + { + title: "Bun MariaDB", + description: + "A schema-driven MariaDB manager for Bun, featuring automatic schema synchronization, type-safe CRUD operations, vector embedding support, and TypeScript type definition generation.", + href: "https://git.tben.me/Moduletrace/bun-mariadb", + technologies: [ + "MariaDB", + "SQL", + "Bun", + "Shell", + "Typescript", + "Vector Database", + ], + }, { title: "Bun SQLite", description: diff --git a/src/data/site-data.ts b/src/data/site-data.ts new file mode 100644 index 0000000..5eda56a --- /dev/null +++ b/src/data/site-data.ts @@ -0,0 +1,6 @@ +export const SiteData = { + SiteName: `Tben INC`, + SiteSlug: `tben-inc`, + SiteDescription: `10X Software and Devops Engineer`, + SiteURL: `https://www.tben.me`, +} as const; diff --git a/src/pages/blog/[slug]/index.server.ts b/src/pages/blog/[slug]/index.server.ts index bea5eec..6bb21c9 100644 --- a/src/pages/blog/[slug]/index.server.ts +++ b/src/pages/blog/[slug]/index.server.ts @@ -1,29 +1,40 @@ +import { + BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS, + BunMariaDBTables, +} from "@/db/types/db"; import { PagePropsType } from "@/src/types"; +import BunMariaDB from "@moduletrace/bun-mariadb"; import { BunextPageServerFn } from "@moduletrace/bunext/types"; export const server: BunextPageServerFn = async (ctx) => { - // const blog_post_res = await sql` - // SELECT * FROM blog_posts - // WHERE slug=${ctx.query?.slug} - // `; + const blog_post = await BunMariaDB.select< + BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS, + (typeof BunMariaDBTables)[number] + >({ + table: "blog_posts", + query: { + query: { + slug: { + value: ctx.query?.slug, + }, + published: { + value: 1, + }, + }, + }, + }); - // const blog_post: DSQL_TBEN_ME_BLOG_POSTS = [...blog_post_res]?.[0]; - - // if (!blog_post?.body) { - // return { - // props: {}, - // }; - // } - - // const pageMdString = blog_post.body; - - // const pageGrayMatter = matter(pageMdString); - - // const content = pageGrayMatter.content; + if (!blog_post?.single_res?.id) { + return { + redirect: { + destination: "/blog", + }, + }; + } return { props: { - blogPost: {}, + blogPost: blog_post.single_res, }, }; }; diff --git a/src/pages/blog/index.server.ts b/src/pages/blog/index.server.ts index 6ae487c..ab8080b 100644 --- a/src/pages/blog/index.server.ts +++ b/src/pages/blog/index.server.ts @@ -1,19 +1,34 @@ +import { + BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS, + BunMariaDBTables, +} from "@/db/types/db"; import { PagePropsType } from "@/src/types"; -import { DSQL_TBEN_ME_BLOG_POSTS } from "@/src/types/dsql"; +import BunMariaDB from "@moduletrace/bun-mariadb"; import { BunextPageServerFn } from "@moduletrace/bunext/types"; +import _ from "lodash"; export const server: BunextPageServerFn = async (ctx) => { - // const blog_posts_res = await sql` - // SELECT * FROM blog_posts - // WHERE published=1 - // ORDER BY id DESC - // `; - - // const blog_posts: DSQL_TBEN_ME_BLOG_POSTS[] = [...blog_posts_res]; + const blog_posts = await BunMariaDB.select< + BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS, + (typeof BunMariaDBTables)[number] + >({ + table: "blog_posts", + query: { + order: { + field: "id", + strategy: "DESC", + }, + query: { + published: { + value: 1, + }, + }, + }, + }); return { props: { - blogPosts: [], + blogPosts: blog_posts.payload || [], }, }; }; diff --git a/src/types/index.ts b/src/types/index.ts index 5ce733c..238c8c9 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,6 +1,6 @@ -import { DSQL_TBEN_ME_BLOG_POSTS } from "./dsql"; +import { BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS } from "@/db/types/db"; export type PagePropsType = { - blogPosts?: DSQL_TBEN_ME_BLOG_POSTS[] | null; - blogPost?: DSQL_TBEN_ME_BLOG_POSTS | null; + blogPosts?: BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS[] | null; + blogPost?: BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS | null; };