bun-api-starter 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/biome.json +31 -25
- package/template/package.json +21 -21
- package/template/src/index.ts +7 -7
- package/template/src/routes/health.ts +1 -1
- package/template/src/server.ts +3 -3
- package/template/tsconfig.json +15 -15
package/package.json
CHANGED
package/template/biome.json
CHANGED
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.5.12/schema.json",
|
|
3
|
+
"files": {
|
|
4
|
+
"includes": [
|
|
5
|
+
"**",
|
|
6
|
+
"!**/dist",
|
|
7
|
+
"!**/coverage",
|
|
8
|
+
"!**/node_modules",
|
|
9
|
+
"!**/bun.lock"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"formatter": {
|
|
13
|
+
"enabled": true,
|
|
14
|
+
"indentStyle": "space",
|
|
15
|
+
"indentWidth": 2,
|
|
16
|
+
"lineWidth": 120,
|
|
17
|
+
"formatWithErrors": false
|
|
18
|
+
},
|
|
19
|
+
"linter": {
|
|
20
|
+
"enabled": true,
|
|
21
|
+
"rules": {
|
|
22
|
+
"preset": "recommended"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"javascript": {
|
|
26
|
+
"formatter": {
|
|
27
|
+
"quoteStyle": "double",
|
|
28
|
+
"semicolons": "always",
|
|
29
|
+
"trailingCommas": "all"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
package/template/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
2
|
+
"name": "<PACKAGE_NAME>",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": true,
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "bun --watch src/server.ts",
|
|
8
|
+
"start": "bun src/server.ts",
|
|
9
|
+
"lint": "biome check .",
|
|
10
|
+
"typecheck": "tsc --noEmit",
|
|
11
|
+
"format": "biome format --write ."
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@dotenvx/dotenvx": "^1.40.2",
|
|
15
|
+
"elysia": "^1.4.29"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@biomejs/biome": "^2.5.7",
|
|
19
|
+
"@types/bun": "^1.2.2",
|
|
20
|
+
"typescript": "^5.9.0"
|
|
21
|
+
}
|
|
22
|
+
}
|
package/template/src/index.ts
CHANGED
|
@@ -2,15 +2,15 @@ import "@dotenvx/dotenvx/config";
|
|
|
2
2
|
import { Client } from "seyfert";
|
|
3
3
|
|
|
4
4
|
const client = new Client({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
intents: ["Guilds", "GuildMembers", "GuildMessages", "MessageContent"],
|
|
6
|
+
locations: {
|
|
7
|
+
base: "src",
|
|
8
|
+
commands: "commands",
|
|
9
|
+
},
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
client.once("ready", () => {
|
|
13
|
-
|
|
13
|
+
console.log("[seyfert] bot is online");
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
void client.start();
|
|
16
|
+
void client.start();
|
package/template/src/server.ts
CHANGED
|
@@ -5,9 +5,9 @@ import { health } from "./routes/health";
|
|
|
5
5
|
const port = Number(process.env.PORT ?? 5000);
|
|
6
6
|
|
|
7
7
|
const app = new Elysia()
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
.get("/", () => ({ name: "<PACKAGE_NAME>", status: "online" }))
|
|
9
|
+
.use(health);
|
|
10
10
|
|
|
11
11
|
app.listen(port);
|
|
12
12
|
|
|
13
|
-
console.log(`api up at http://localhost:${port}`);
|
|
13
|
+
console.log(`api up at http://localhost:${port}`);
|
package/template/tsconfig.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"types": ["@types/bun"],
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noUncheckedIndexedAccess": true,
|
|
9
|
+
"verbatimModuleSyntax": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"skipLibCheck": true,
|
|
13
|
+
"noEmit": true
|
|
14
|
+
},
|
|
15
|
+
"include": ["src"]
|
|
16
|
+
}
|