diff --git a/bun.config.mjs b/bun.config.mjs index 19d7158..071d6b4 100644 --- a/bun.config.mjs +++ b/bun.config.mjs @@ -4,7 +4,7 @@ import { execSync } from 'node:child_process'; const entry = 'src/index.ts'; const naming = 'app'; -const external = ['sequelize', 'pg', 'sqlite3', 'ioredis', 'pm2']; +const external = ['sequelize', 'pg', 'sqlite3', 'ioredis', 'pm2', 'bun']; /** * @type {import('bun').BuildConfig} */ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4555590..4f0259d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,6 +30,9 @@ importers: bullmq: specifier: ^5.66.5 version: 5.66.5 + bun: + specifier: ^1.3.6 + version: 1.3.6 busboy: specifier: ^1.6.0 version: 1.6.0 @@ -610,6 +613,61 @@ packages: resolution: {integrity: sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==} engines: {node: ^14.21.3 || >=16} + '@oven/bun-darwin-aarch64@1.3.6': + resolution: {integrity: sha512-27rypIapNkYboOSylkf1tD9UW9Ado2I+P1NBL46Qz29KmOjTL6WuJ7mHDC5O66CYxlOkF5r93NPDAC3lFHYBXw==} + cpu: [arm64] + os: [darwin] + + '@oven/bun-darwin-x64-baseline@1.3.6': + resolution: {integrity: sha512-nqtr+pTsHqusYpG2OZc6s+AmpWDB/FmBvstrK0y5zkti4OqnCuu7Ev2xNjS7uyb47NrAFF40pWqkpaio5XEd7w==} + cpu: [x64] + os: [darwin] + + '@oven/bun-darwin-x64@1.3.6': + resolution: {integrity: sha512-I82xGzPkBxzBKgbl8DsA0RfMQCWTWjNmLjIEkW1ECiv3qK02kHGQ5FGUr/29L/SuvnGsULW4tBTRNZiMzL37nA==} + cpu: [x64] + os: [darwin] + + '@oven/bun-linux-aarch64-musl@1.3.6': + resolution: {integrity: sha512-FR+iJt17rfFgYgpxL3M67AUwujOgjw52ZJzB9vElI5jQXNjTyOKf8eH4meSk4vjlYF3h/AjKYd6pmN0OIUlVKQ==} + cpu: [arm64] + os: [linux] + + '@oven/bun-linux-aarch64@1.3.6': + resolution: {integrity: sha512-YaQEAYjBanoOOtpqk/c5GGcfZIyxIIkQ2m1TbHjedRmJNwxzWBhGinSARFkrRIc3F8pRIGAopXKvJ/2rjN1LzQ==} + cpu: [arm64] + os: [linux] + + '@oven/bun-linux-x64-baseline@1.3.6': + resolution: {integrity: sha512-jRmnX18ak8WzqLrex3siw0PoVKyIeI5AiCv4wJLgSs7VKfOqrPycfHIWfIX2jdn7ngqbHFPzI09VBKANZ4Pckg==} + cpu: [x64] + os: [linux] + + '@oven/bun-linux-x64-musl-baseline@1.3.6': + resolution: {integrity: sha512-7FjVnxnRTp/AgWqSQRT/Vt9TYmvnZ+4M+d9QOKh/Lf++wIFXFGSeAgD6bV1X/yr2UPVmZDk+xdhr2XkU7l2v3w==} + cpu: [x64] + os: [linux] + + '@oven/bun-linux-x64-musl@1.3.6': + resolution: {integrity: sha512-YeXcJ9K6vJAt1zSkeA21J6pTe7PgDMLTHKGI3nQBiMYnYf7Ob3K+b/ChSCznrJG7No5PCPiQPg4zTgA+BOTmSA==} + cpu: [x64] + os: [linux] + + '@oven/bun-linux-x64@1.3.6': + resolution: {integrity: sha512-egfngj0dfJ868cf30E7B+ye9KUWSebYxOG4l9YP5eWeMXCtenpenx0zdKtAn9qxJgEJym5AN6trtlk+J6x8Lig==} + cpu: [x64] + os: [linux] + + '@oven/bun-windows-x64-baseline@1.3.6': + resolution: {integrity: sha512-PFUa7JL4lGoyyppeS4zqfuoXXih+gSE0XxhDMrCPVEUev0yhGNd/tbWBvcdpYnUth80owENoGjc8s5Knopv9wA==} + cpu: [x64] + os: [win32] + + '@oven/bun-windows-x64@1.3.6': + resolution: {integrity: sha512-Sr1KwUcbB0SEpnSPO22tNJppku2khjFluEst+mTGhxHzAGQTQncNeJxDnt3F15n+p9Q+mlcorxehd68n1siikQ==} + cpu: [x64] + os: [win32] + '@paralleldrive/cuid2@2.2.2': resolution: {integrity: sha512-ZOBkgDwEdoYVlSeRbYYXs0S9MejQofiVYoTbKzy/6GQa39/q5tQU2IX46+shYnUkpEl3wc+J6wRlar7r2EK2xA==} @@ -892,6 +950,12 @@ packages: bun-types@1.3.6: resolution: {integrity: sha512-OlFwHcnNV99r//9v5IIOgQ9Uk37gZqrNMCcqEaExdkVq3Avwqok1bJFmvGMCkCE0FqzdY8VMOZpfpR3lwI+CsQ==} + bun@1.3.6: + resolution: {integrity: sha512-Tn98GlZVN2WM7+lg/uGn5DzUao37Yc0PUz7yzYHdeF5hd+SmHQGbCUIKE4Sspdgtxn49LunK3mDNBC2Qn6GJjw==} + cpu: [arm64, x64] + os: [darwin, linux, win32] + hasBin: true + busboy@1.6.0: resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} engines: {node: '>=10.16.0'} @@ -2688,6 +2752,39 @@ snapshots: '@noble/hashes@1.8.0': {} + '@oven/bun-darwin-aarch64@1.3.6': + optional: true + + '@oven/bun-darwin-x64-baseline@1.3.6': + optional: true + + '@oven/bun-darwin-x64@1.3.6': + optional: true + + '@oven/bun-linux-aarch64-musl@1.3.6': + optional: true + + '@oven/bun-linux-aarch64@1.3.6': + optional: true + + '@oven/bun-linux-x64-baseline@1.3.6': + optional: true + + '@oven/bun-linux-x64-musl-baseline@1.3.6': + optional: true + + '@oven/bun-linux-x64-musl@1.3.6': + optional: true + + '@oven/bun-linux-x64@1.3.6': + optional: true + + '@oven/bun-windows-x64-baseline@1.3.6': + optional: true + + '@oven/bun-windows-x64@1.3.6': + optional: true + '@paralleldrive/cuid2@2.2.2': dependencies: '@noble/hashes': 1.8.0 @@ -3080,6 +3177,20 @@ snapshots: dependencies: '@types/node': 25.0.8 + bun@1.3.6: + optionalDependencies: + '@oven/bun-darwin-aarch64': 1.3.6 + '@oven/bun-darwin-x64': 1.3.6 + '@oven/bun-darwin-x64-baseline': 1.3.6 + '@oven/bun-linux-aarch64': 1.3.6 + '@oven/bun-linux-aarch64-musl': 1.3.6 + '@oven/bun-linux-x64': 1.3.6 + '@oven/bun-linux-x64-baseline': 1.3.6 + '@oven/bun-linux-x64-musl': 1.3.6 + '@oven/bun-linux-x64-musl-baseline': 1.3.6 + '@oven/bun-windows-x64': 1.3.6 + '@oven/bun-windows-x64-baseline': 1.3.6 + busboy@1.6.0: dependencies: streamsearch: 1.1.0 diff --git a/src/modules/html/stat/index.ts b/src/modules/html/stat/index.ts index 9869cde..603dc07 100644 --- a/src/modules/html/stat/index.ts +++ b/src/modules/html/stat/index.ts @@ -1,3 +1,4 @@ +import { useKey } from '@kevisual/use-config'; import { config } from '../../config.ts'; /** @@ -9,7 +10,7 @@ export const addStat = (html: string, addStat = true) => { if (!addStat) { return html; } - const { websiteId } = config.stat || {}; + const websiteId = useKey('DATA_WEBSITE_ID') if (!websiteId) { return html; }