mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
fix: bot imports
This commit is contained in:
1 parent
03a51c47bb
commit
ab430dc0ca
4 files changed
+44
-28
No files matched your search
@@ -47,6 +47,7 @@
|
||||
"dotenv": "^17.2.2",
|
||||
"fuzzysort": "^3.1.0",
|
||||
"markdown-escape": "^2.0.0",
|
||||
"prisma": "^6.17.1",
|
||||
"react": "^19.1.1",
|
||||
"satori": "^0.18.3",
|
||||
},
|
||||
@@ -2743,6 +2744,8 @@
|
||||
|
||||
"@blitzkit/app/typescript": ["[email protected]", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw=="],
|
||||
|
||||
"@blitzkit/bot/prisma": ["[email protected]", "", { "dependencies": { "@prisma/config": "6.17.1", "@prisma/engines": "6.17.1" }, "peerDependencies": { "typescript": ">=5.1.0" }, "optionalPeers": ["typescript"], "bin": { "prisma": "build/index.js" } }, "sha512-ac6h0sM1Tg3zu8NInY+qhP/S9KhENVaw9n1BrGKQVFu05JT5yT5Qqqmb8tMRIE3ZXvVj4xcRA5yfrsy4X7Yy5g=="],
|
||||
|
||||
"@discordjs/rest/@discordjs/collection": ["@discordjs/[email protected]", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="],
|
||||
|
||||
"@discordjs/rest/undici": ["[email protected]", "", {}, "sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw=="],
|
||||
@@ -2893,6 +2896,10 @@
|
||||
|
||||
"@babel/register/make-dir/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver" } }, "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g=="],
|
||||
|
||||
"@blitzkit/bot/prisma/@prisma/config": ["@prisma/[email protected]", "", { "dependencies": { "c12": "3.1.0", "deepmerge-ts": "7.1.5", "effect": "3.16.12", "empathic": "2.0.0" } }, "sha512-fs8wY6DsvOCzuiyWVckrVs1LOcbY4LZNz8ki4uUIQ28jCCzojTGqdLhN2Jl5lDnC1yI8/gNIKpsWDM8pLhOdwA=="],
|
||||
|
||||
"@blitzkit/bot/prisma/@prisma/engines": ["@prisma/[email protected]", "", { "dependencies": { "@prisma/debug": "6.17.1", "@prisma/engines-version": "6.17.1-1.272a37d34178c2894197e17273bf937f25acdeac", "@prisma/fetch-engine": "6.17.1", "@prisma/get-platform": "6.17.1" } }, "sha512-D95Ik3GYZkqZ8lSR4EyFOJ/tR33FcYRP8kK61o+WMsyD10UfJwd7+YielflHfKwiGodcqKqoraWw8ElAgMDbPw=="],
|
||||
|
||||
"@octokit/core/@octokit/types/@octokit/openapi-types": ["@octokit/[email protected]", "", {}, "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA=="],
|
||||
|
||||
"@octokit/plugin-rest-endpoint-methods/@octokit/types/@octokit/openapi-types": ["@octokit/[email protected]", "", {}, "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA=="],
|
||||
@@ -2973,6 +2980,14 @@
|
||||
|
||||
"@babel/cli/chokidar/readdirp/picomatch": ["[email protected]", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
|
||||
|
||||
"@blitzkit/bot/prisma/@prisma/engines/@prisma/debug": ["@prisma/[email protected]", "", {}, "sha512-Vf7Tt5Wh9XcndpbmeotuqOMLWPTjEKCsgojxXP2oxE1/xYe7PtnP76hsouG9vis6fctX+TxgmwxTuYi/+xc7dQ=="],
|
||||
|
||||
"@blitzkit/bot/prisma/@prisma/engines/@prisma/engines-version": ["@prisma/engines-version@6.17.1-1.272a37d34178c2894197e17273bf937f25acdeac", "", {}, "sha512-17140E3huOuD9lMdJ9+SF/juOf3WR3sTJMVyyenzqUPbuH+89nPhSWcrY+Mf7tmSs6HvaO+7S+HkELinn6bhdg=="],
|
||||
|
||||
"@blitzkit/bot/prisma/@prisma/engines/@prisma/fetch-engine": ["@prisma/[email protected]", "", { "dependencies": { "@prisma/debug": "6.17.1", "@prisma/engines-version": "6.17.1-1.272a37d34178c2894197e17273bf937f25acdeac", "@prisma/get-platform": "6.17.1" } }, "sha512-AYZiHOs184qkDMiTeshyJCtyL4yERkjfTkJiSJdYuSfc24m94lTNL5+GFinZ6vVz+ktX4NJzHKn1zIFzGTWrWg=="],
|
||||
|
||||
"@blitzkit/bot/prisma/@prisma/engines/@prisma/get-platform": ["@prisma/[email protected]", "", { "dependencies": { "@prisma/debug": "6.17.1" } }, "sha512-AKEn6fsfz0r482S5KRDFlIGEaq9wLNcgalD1adL+fPcFFblIKs1sD81kY/utrHdqKuVC6E1XSRpegDK3ZLL4Qg=="],
|
||||
|
||||
"boxen/string-width/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="],
|
||||
|
||||
"cross-fetch/node-fetch/whatwg-url/tr46": ["[email protected]", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="],
|
||||
|
||||
@@ -6,15 +6,16 @@
|
||||
"dependencies": {
|
||||
"@blitzkit/core": "workspace:*",
|
||||
"@blitzkit/i18n": "workspace:*",
|
||||
"satori": "^0.18.3",
|
||||
"@resvg/resvg-js": "^2.6.2",
|
||||
"discord.js": "^14.22.1",
|
||||
"react": "^19.1.1",
|
||||
"@radix-ui/colors": "^3.0.0",
|
||||
"fuzzysort": "^3.1.0",
|
||||
"@resvg/resvg-js": "^2.6.2",
|
||||
"bepaint": "^0.1.0-beta.3",
|
||||
"discord.js": "^14.22.1",
|
||||
"dotenv": "^17.2.2",
|
||||
"markdown-escape": "^2.0.0"
|
||||
"fuzzysort": "^3.1.0",
|
||||
"markdown-escape": "^2.0.0",
|
||||
"prisma": "^6.17.1",
|
||||
"react": "^19.1.1",
|
||||
"satori": "^0.18.3"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "bun --watch src/main.ts",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { I18nString } from "@blitzkit/core";
|
||||
import locales from "@blitzkit/i18n/locales.json";
|
||||
import { I18nString } from "../../core/src";
|
||||
import locales from "../locales.json";
|
||||
|
||||
export function unwrapper(locale = locales.default) {
|
||||
return function (i18nString: I18nString) {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { build } from 'esbuild';
|
||||
import { cp, readdir, rm } from 'fs/promises';
|
||||
import { argv } from 'process';
|
||||
import { build } from "esbuild";
|
||||
import { cp, readdir, rm } from "fs/promises";
|
||||
import { argv } from "process";
|
||||
|
||||
const projectDir = '../..';
|
||||
const projectDir = "../..";
|
||||
const srcRoot = `${projectDir}/packages/bot`;
|
||||
const distRoot = `${projectDir}/dist/bot`;
|
||||
const modulesRoot = `${projectDir}/node_modules`;
|
||||
const modulesRoot = `${projectDir}/packages/bot/node_modules`;
|
||||
const workers = await readdir(`${srcRoot}/src/workers`);
|
||||
const dev = argv.includes('--dev');
|
||||
const dev = argv.includes("--dev");
|
||||
|
||||
await rm(distRoot, { recursive: true, force: true });
|
||||
|
||||
@@ -17,33 +17,33 @@ build({
|
||||
...workers.map((worker) => `${srcRoot}/src/workers/${worker}`),
|
||||
],
|
||||
bundle: true,
|
||||
outdir: '../../dist/bot',
|
||||
platform: 'node',
|
||||
format: 'esm',
|
||||
outdir: "../../dist/bot",
|
||||
platform: "node",
|
||||
format: "esm",
|
||||
loader: {
|
||||
'.ttf': 'file',
|
||||
'.node': 'empty',
|
||||
'.json': 'json',
|
||||
".ttf": "file",
|
||||
".node": "empty",
|
||||
".json": "json",
|
||||
},
|
||||
external: ['sharp'],
|
||||
external: ["sharp"],
|
||||
minifyIdentifiers: false, // causes goofy ahh issues
|
||||
minifySyntax: !dev,
|
||||
minifyWhitespace: !dev,
|
||||
sourcemap: !dev,
|
||||
jsxImportSource: 'react',
|
||||
jsx: 'automatic',
|
||||
jsxImportSource: "react",
|
||||
jsx: "automatic",
|
||||
});
|
||||
|
||||
for (const module of await readdir(`${modulesRoot}/@resvg`)) {
|
||||
readdir(`${modulesRoot}/@resvg/${module}`).then((files) =>
|
||||
files
|
||||
.filter((file) => file.endsWith('.node'))
|
||||
.filter((file) => file.endsWith(".node"))
|
||||
.map((file) =>
|
||||
cp(
|
||||
`${modulesRoot}/@resvg/${module}/${file}`,
|
||||
`${distRoot}/workers/${file}`,
|
||||
),
|
||||
),
|
||||
`${distRoot}/workers/${file}`
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ if (!dev) {
|
||||
await cp(`${projectDir}/prisma`, `${distRoot}/prisma`, { recursive: true });
|
||||
|
||||
for (const file of await readdir(`${modulesRoot}/prisma`).then((files) =>
|
||||
files.filter((file) => file.endsWith('.node')),
|
||||
files.filter((file) => file.endsWith(".node"))
|
||||
)) {
|
||||
cp(`${modulesRoot}/prisma/${file}`, `${distRoot}/prisma/${file}`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user