startx 0.0.1 → 0.1.0
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/.prettierignore +0 -13
- package/.prettierrc.js +52 -52
- package/.vscode/launch.json +32 -0
- package/.vscode/settings.json +9 -3
- package/apps/core-server/.env.example +18 -24
- package/apps/core-server/Dockerfile +35 -61
- package/apps/core-server/eslint.config.ts +7 -0
- package/apps/core-server/package.json +41 -52
- package/apps/core-server/src/config/custom-type.ts +2 -40
- package/apps/core-server/src/events/index.ts +37 -37
- package/apps/core-server/src/index.ts +4 -13
- package/apps/core-server/src/middlewares/auth-middleware.ts +24 -7
- package/apps/core-server/src/middlewares/cors-middleware.ts +7 -6
- package/apps/core-server/src/middlewares/error-middleware.ts +7 -4
- package/apps/core-server/src/middlewares/logger-middleware.ts +81 -21
- package/apps/core-server/src/middlewares/notfound-middleware.ts +6 -14
- package/apps/core-server/src/middlewares/serve-static.ts +30 -24
- package/apps/core-server/src/routes/files/router.ts +9 -7
- package/apps/core-server/src/routes/server.ts +30 -36
- package/apps/core-server/tsdown.config.ts +4 -3
- package/biome.json +58 -60
- package/configs/eslint-config/package.json +16 -19
- package/configs/eslint-config/src/configs/base.ts +185 -225
- package/configs/eslint-config/src/configs/extend.ts +3 -0
- package/configs/eslint-config/src/configs/frontend.ts +81 -56
- package/configs/eslint-config/src/configs/node.ts +6 -6
- package/configs/eslint-config/src/plugin.ts +1 -0
- package/configs/eslint-config/src/rules/index.ts +8 -12
- package/configs/eslint-config/src/rules/no-json-parse-json-stringify.test.ts +30 -17
- package/configs/eslint-config/src/rules/no-json-parse-json-stringify.ts +52 -49
- package/configs/eslint-config/src/rules/no-uncaught-json-parse.ts +43 -45
- package/configs/tsdown-config/package.json +10 -3
- package/configs/typescript-config/package.json +10 -1
- package/configs/typescript-config/tsconfig.common.json +3 -3
- package/configs/vitest-config/dist/base.mjs +1 -0
- package/configs/vitest-config/dist/frontend.mjs +1 -0
- package/configs/vitest-config/dist/node.mjs +1 -0
- package/configs/vitest-config/package.json +12 -0
- package/configs/vitest-config/src/base.ts +17 -29
- package/configs/vitest-config/src/index.ts +1 -0
- package/package.json +21 -13
- package/packages/@repo/constants/eslint.config.ts +4 -0
- package/packages/@repo/constants/package.json +16 -0
- package/packages/@repo/constants/src/index.ts +8 -8
- package/packages/@repo/db/eslint.config.ts +4 -0
- package/packages/@repo/db/package.json +16 -8
- package/packages/@repo/db/src/index.ts +26 -20
- package/packages/@repo/db/src/schema/common.ts +45 -49
- package/packages/@repo/env/eslint.config.ts +4 -0
- package/packages/@repo/env/package.json +39 -0
- package/packages/@repo/env/src/default-env.ts +12 -0
- package/packages/@repo/env/src/define-env.ts +70 -0
- package/packages/@repo/env/src/index.ts +2 -0
- package/packages/@repo/env/src/utils.ts +52 -0
- package/packages/@repo/env/tsconfig.json +7 -0
- package/packages/@repo/lib/eslint.config.ts +4 -0
- package/packages/@repo/lib/package.json +34 -34
- package/packages/@repo/lib/src/bucket-module/file-storage.ts +50 -49
- package/packages/@repo/lib/src/bucket-module/index.ts +3 -0
- package/packages/@repo/lib/src/bucket-module/s3-storage.ts +120 -114
- package/packages/@repo/lib/src/bucket-module/utils.ts +10 -11
- package/packages/@repo/lib/src/{cookie-module.ts → cookie-module/cookie-module.ts} +48 -42
- package/packages/@repo/lib/src/cookie-module/index.ts +1 -0
- package/packages/@repo/lib/src/extra/index.ts +1 -0
- package/packages/@repo/lib/src/extra/pagination-module.ts +35 -0
- package/packages/@repo/lib/src/{token-module.ts → extra/token-module.ts} +12 -5
- package/packages/@repo/lib/src/file-system-module/index.ts +170 -0
- package/packages/@repo/lib/src/{hashing-module.ts → hashing-module/index.ts} +9 -9
- package/packages/@repo/lib/src/index.ts +0 -26
- package/packages/@repo/lib/src/mail-module/index.ts +2 -0
- package/packages/@repo/lib/src/mail-module/mock.ts +8 -8
- package/packages/@repo/lib/src/mail-module/nodemailer.ts +17 -7
- package/packages/@repo/lib/src/notification-module/index.ts +1 -172
- package/packages/@repo/lib/src/notification-module/push-notification.ts +97 -90
- package/packages/@repo/lib/src/{oauth2-client.ts → oauth2-module/index.ts} +107 -109
- package/packages/@repo/lib/src/otp-module/index.ts +91 -0
- package/packages/@repo/lib/src/session-module/index.ts +113 -0
- package/packages/@repo/lib/src/utils.ts +43 -42
- package/packages/@repo/lib/src/validation-module/index.ts +242 -0
- package/packages/@repo/logger/eslint.config.ts +4 -0
- package/packages/@repo/logger/package.json +40 -0
- package/packages/@repo/logger/src/index.ts +2 -0
- package/packages/@repo/logger/src/logger.ts +72 -0
- package/packages/@repo/{lib/src/logger-module → logger/src}/memory-profiler.ts +64 -65
- package/packages/@repo/logger/tsconfig.json +7 -0
- package/packages/@repo/mail/eslint.config.ts +4 -0
- package/packages/@repo/mail/package.json +10 -3
- package/packages/@repo/mail/src/emails/admin/OtpEmail.tsx +169 -168
- package/packages/@repo/mail/src/index.ts +1 -2
- package/packages/@repo/mail/tsconfig.json +3 -3
- package/packages/@repo/redis/dist/index.d.mts +3 -0
- package/packages/@repo/redis/dist/index.mjs +5 -0
- package/packages/@repo/redis/dist/lib/redis-client.d.mts +7 -0
- package/packages/@repo/redis/dist/lib/redis-client.mjs +25 -0
- package/packages/@repo/redis/dist/lib/redis-client.mjs.map +1 -0
- package/packages/@repo/redis/dist/lib/redis-module.d.mts +5 -0
- package/packages/@repo/redis/dist/lib/redis-module.mjs +6 -0
- package/packages/@repo/redis/dist/lib/redis-module.mjs.map +1 -0
- package/packages/@repo/redis/eslint.config.ts +4 -0
- package/packages/@repo/redis/package.json +13 -10
- package/packages/@repo/redis/src/index.ts +2 -2
- package/packages/@repo/redis/src/lib/redis-client.ts +36 -23
- package/packages/@repo/redis/src/lib/redis-module.ts +69 -3
- package/packages/cli/dist/index.mjs +203 -0
- package/packages/cli/eslint.config.ts +4 -0
- package/packages/cli/package.json +44 -0
- package/packages/cli/tsconfig.json +12 -0
- package/packages/cli/tsdown.config.ts +17 -0
- package/packages/ui/components.json +0 -1
- package/packages/ui/eslint.config.ts +4 -0
- package/packages/ui/package.json +16 -3
- package/packages/ui/postcss.config.mjs +9 -9
- package/packages/ui/src/components/lib/utils.ts +53 -53
- package/packages/ui/src/components/ui/alert-dialog.tsx +118 -116
- package/packages/ui/src/components/ui/avatar.tsx +52 -53
- package/packages/ui/src/components/ui/badge.tsx +45 -46
- package/packages/ui/src/components/ui/breadcrumb.tsx +108 -109
- package/packages/ui/src/components/ui/card.tsx +91 -92
- package/packages/ui/src/components/ui/carousel.tsx +243 -243
- package/packages/ui/src/components/ui/checkbox.tsx +32 -32
- package/packages/ui/src/components/ui/command.tsx +144 -155
- package/packages/ui/src/components/ui/dialog.tsx +124 -127
- package/packages/ui/src/components/ui/form.tsx +166 -165
- package/packages/ui/src/components/ui/input-otp.tsx +74 -76
- package/packages/ui/src/components/ui/input.tsx +19 -21
- package/packages/ui/src/components/ui/multiple-select.tsx +4 -4
- package/packages/ui/src/{components/lucide.tsx → lucide.ts} +3 -3
- package/packages/ui/tailwind.config.ts +94 -94
- package/packages/ui/tsconfig.json +7 -1
- package/pnpm-workspace.yaml +41 -1
- package/turbo.json +20 -27
- package/apps/core-server/eslint.config.mjs +0 -47
- package/configs/eslint-config/src/rules/no-dynamic-import-template.ts +0 -32
- package/configs/eslint-config/src/rules/no-plain-errors.ts +0 -50
- package/configs/eslint-config/tsdown.config.ts +0 -11
- package/packages/@repo/constants/eslint.config.mjs +0 -21
- package/packages/@repo/db/eslint.config.mjs +0 -21
- package/packages/@repo/lib/eslint.config.mjs +0 -49
- package/packages/@repo/lib/src/command-module.ts +0 -77
- package/packages/@repo/lib/src/constants.ts +0 -3
- package/packages/@repo/lib/src/custom-type.ts +0 -54
- package/packages/@repo/lib/src/env.ts +0 -13
- package/packages/@repo/lib/src/file-system/index.ts +0 -90
- package/packages/@repo/lib/src/logger-module/log-config.ts +0 -16
- package/packages/@repo/lib/src/logger-module/logger.ts +0 -78
- package/packages/@repo/lib/src/mail-module/api.ts +0 -0
- package/packages/@repo/lib/src/otp-module.ts +0 -98
- package/packages/@repo/lib/src/pagination-module.ts +0 -49
- package/packages/@repo/lib/src/user-session.ts +0 -117
- package/packages/@repo/lib/src/validation-module.ts +0 -187
- package/packages/@repo/mail/tsconfig.build.json +0 -14
- package/packages/@repo/mail/tsdown.config.ts +0 -9
- package/packages/@repo/redis/eslint.config.mjs +0 -8
- package/packages/ui/eslint.config.mjs +0 -18
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { ENV } from "@repo/env";
|
|
2
|
+
import { ErrorResponse } from "@repo/lib/error-handlers-module";
|
|
3
|
+
import { logger } from "@repo/logger";
|
|
4
|
+
import type { Request, Response } from "express";
|
|
3
5
|
|
|
4
6
|
interface Error {
|
|
5
7
|
message?: string;
|
|
6
8
|
statusCode?: number;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
|
-
export const errorMiddleware = (error: Error,
|
|
11
|
+
export const errorMiddleware = (error: Error, _req: Request, res: Response) => {
|
|
10
12
|
error.message = error?.message ? error.message : "Internal Server Error";
|
|
11
13
|
error.statusCode = error instanceof ErrorResponse ? error.statusCode : 500;
|
|
12
14
|
|
|
13
|
-
if (
|
|
15
|
+
if (ENV.NODE_ENV === "development" || error.statusCode === 500) {
|
|
14
16
|
if (error.statusCode === 404) {
|
|
17
|
+
logger.warn(error);
|
|
15
18
|
} else logger.error(error);
|
|
16
19
|
}
|
|
17
20
|
|
|
@@ -1,21 +1,81 @@
|
|
|
1
|
-
import { logger } from "@repo/
|
|
2
|
-
import
|
|
3
|
-
morgan
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { logger } from "@repo/logger";
|
|
2
|
+
import type { Request, Response } from "express";
|
|
3
|
+
import morgan from "morgan";
|
|
4
|
+
|
|
5
|
+
const jsonFormat = (tokens: morgan.TokenIndexer, req: Request, res: Response) => {
|
|
6
|
+
const method = tokens.method(req, res) || "-";
|
|
7
|
+
const url = tokens.url(req, res) || "-";
|
|
8
|
+
const status = Number(tokens.status(req, res) || 0);
|
|
9
|
+
const responseTime = tokens["response-time"](req, res) ?? "-";
|
|
10
|
+
const ip =
|
|
11
|
+
(req.ip as string) || (req.headers["x-forwarded-for"] as string) || req.socket?.remoteAddress;
|
|
12
|
+
const user = req.user ? { id: req.user.id, email: req.user.email } : null;
|
|
13
|
+
|
|
14
|
+
return JSON.stringify({
|
|
15
|
+
method,
|
|
16
|
+
url,
|
|
17
|
+
status,
|
|
18
|
+
responseTimeMs: responseTime,
|
|
19
|
+
user,
|
|
20
|
+
ip,
|
|
21
|
+
ts: new Date().toISOString(),
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const safeLog = (
|
|
26
|
+
level: "info" | "warn" | "error",
|
|
27
|
+
message: string,
|
|
28
|
+
meta?: Record<string, unknown>
|
|
29
|
+
) => {
|
|
30
|
+
const lg = logger;
|
|
31
|
+
if (typeof lg.log === "function") {
|
|
32
|
+
lg.log({ level, message, msg: message, ...meta });
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const fn = lg[level];
|
|
36
|
+
if (typeof fn === "function") {
|
|
37
|
+
fn(message, meta);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
// fallback
|
|
41
|
+
if (level && console[level]) {
|
|
42
|
+
console[level]?.(message, meta ?? {});
|
|
43
|
+
} else console.warn(message, meta ?? {});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const loggerStream = {
|
|
47
|
+
write: (message: string) => {
|
|
48
|
+
const trimmed = message.trim();
|
|
49
|
+
if (!trimmed) return;
|
|
50
|
+
try {
|
|
51
|
+
const meta = JSON.parse(trimmed) as {
|
|
52
|
+
method: string;
|
|
53
|
+
url: string;
|
|
54
|
+
status: number;
|
|
55
|
+
responseTimeMs: string | number;
|
|
56
|
+
user?: { id: string; email: string } | null;
|
|
57
|
+
ip?: string;
|
|
58
|
+
ts?: string;
|
|
59
|
+
};
|
|
60
|
+
const level = meta.status >= 500 ? "error" : meta.status >= 400 ? "warn" : "info";
|
|
61
|
+
safeLog(level, "http_request", {
|
|
62
|
+
...meta,
|
|
63
|
+
logType: "routeInfo",
|
|
64
|
+
});
|
|
65
|
+
} catch (err) {
|
|
66
|
+
console.error(err);
|
|
67
|
+
safeLog("info", "http_request_parse_error", { raw: trimmed, logType: "routeInfo" });
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const loggerMiddleware = morgan(jsonFormat as any, {
|
|
73
|
+
skip: (req: Request) => {
|
|
74
|
+
return (
|
|
75
|
+
req.path === "/health" || req.path.startsWith("/static") || req.path.startsWith("/_next")
|
|
76
|
+
);
|
|
77
|
+
},
|
|
78
|
+
stream: loggerStream,
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export { loggerMiddleware };
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
import { ErrorResponse } from "@repo/lib";
|
|
2
|
-
import type { Request, Response
|
|
3
|
-
export function notFoundMiddleware(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
) {
|
|
8
|
-
res.status(404);
|
|
9
|
-
const error = new ErrorResponse(
|
|
10
|
-
`Route doesn't exist for ${req.method}: ${req.originalUrl}`,
|
|
11
|
-
404,
|
|
12
|
-
);
|
|
13
|
-
return next(error);
|
|
14
|
-
}
|
|
1
|
+
import { ErrorResponse } from "@repo/lib/error-handlers-module";
|
|
2
|
+
import type { NextFunction, Request, Response } from "express";
|
|
3
|
+
export function notFoundMiddleware(req: Request, res: Response, next: NextFunction) {
|
|
4
|
+
res.status(404);
|
|
5
|
+
return next(new ErrorResponse(`Route doesn't exist for ${req.method}: ${req.originalUrl}`, 404));
|
|
6
|
+
}
|
|
@@ -1,24 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import {
|
|
2
|
+
static as expressStatic,
|
|
3
|
+
type NextFunction,
|
|
4
|
+
type Request,
|
|
5
|
+
type Response,
|
|
6
|
+
Router,
|
|
7
|
+
} from "express";
|
|
8
|
+
import path from "path";
|
|
9
|
+
import { fileURLToPath } from "url";
|
|
10
|
+
|
|
11
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
+
const __dirname = path.dirname(__filename);
|
|
13
|
+
|
|
14
|
+
const distPath = "./frontend";
|
|
15
|
+
|
|
16
|
+
const reactDistPath = path.resolve(__dirname, distPath);
|
|
17
|
+
|
|
18
|
+
export const serveStatic = () => {
|
|
19
|
+
const router = Router();
|
|
20
|
+
router.use(expressStatic(reactDistPath));
|
|
21
|
+
router.get("/*splat", (req: Request, res: Response, next: NextFunction) => {
|
|
22
|
+
const accept = req.headers.accept || "";
|
|
23
|
+
if (accept.includes("text/html")) {
|
|
24
|
+
return res.sendFile(path.join(reactDistPath, "index.html"));
|
|
25
|
+
}
|
|
26
|
+
return next();
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
return router;
|
|
30
|
+
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export function createFilesRouter(): Router {
|
|
4
|
-
const router = Router();
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { static as expressStatic, Router } from "express";
|
|
2
|
+
|
|
3
|
+
export function createFilesRouter(): Router {
|
|
4
|
+
const router = Router();
|
|
5
|
+
|
|
6
|
+
router.get("/*splat", expressStatic("storage"));
|
|
7
|
+
|
|
8
|
+
return router;
|
|
9
|
+
}
|
|
@@ -1,36 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
app.use(
|
|
18
|
-
app.use(
|
|
19
|
-
app.use(
|
|
20
|
-
app.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
app.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
console.warn(ping);
|
|
32
|
-
app.use(serveStatic());
|
|
33
|
-
app.use(notFoundMiddleware);
|
|
34
|
-
app.use(errorMiddleware);
|
|
35
|
-
|
|
36
|
-
export { app };
|
|
1
|
+
import cookieParser from "cookie-parser";
|
|
2
|
+
import express, { json, urlencoded } from "express";
|
|
3
|
+
import fileUpload from "express-fileupload";
|
|
4
|
+
|
|
5
|
+
import { corsMiddleware } from "@/middlewares/cors-middleware.js";
|
|
6
|
+
import { errorMiddleware } from "@/middlewares/error-middleware.js";
|
|
7
|
+
import { loggerMiddleware } from "@/middlewares/logger-middleware.js";
|
|
8
|
+
import { notFoundMiddleware } from "@/middlewares/notfound-middleware.js";
|
|
9
|
+
|
|
10
|
+
import { createFilesRouter } from "./files/router.js";
|
|
11
|
+
const app = express();
|
|
12
|
+
|
|
13
|
+
app.use(loggerMiddleware);
|
|
14
|
+
app.use(cookieParser());
|
|
15
|
+
app.use(urlencoded({ extended: true }));
|
|
16
|
+
app.use(json());
|
|
17
|
+
app.use(fileUpload());
|
|
18
|
+
app.use(corsMiddleware);
|
|
19
|
+
app.use("/files", createFilesRouter());
|
|
20
|
+
app.get("/test", (_req, res) => {
|
|
21
|
+
res.statusCode = 200;
|
|
22
|
+
res.json("OK");
|
|
23
|
+
return;
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// app.use(serveStatic());
|
|
27
|
+
app.use(notFoundMiddleware);
|
|
28
|
+
app.use(errorMiddleware);
|
|
29
|
+
|
|
30
|
+
export { app };
|
|
@@ -2,13 +2,14 @@ import { defineConfig } from "tsdown";
|
|
|
2
2
|
import { baseConfig } from "tsdown-config";
|
|
3
3
|
|
|
4
4
|
export default defineConfig({
|
|
5
|
-
|
|
5
|
+
...baseConfig,
|
|
6
6
|
platform: "node",
|
|
7
7
|
external: ["sharp"],
|
|
8
|
-
|
|
8
|
+
noExternal: [/(.*)/],
|
|
9
|
+
clean: false,
|
|
9
10
|
outputOptions: {
|
|
10
11
|
codeSplitting: false,
|
|
11
12
|
preserveModules: false,
|
|
12
|
-
legalComments: "none"
|
|
13
|
+
legalComments: "none",
|
|
13
14
|
},
|
|
14
15
|
});
|
package/biome.json
CHANGED
|
@@ -1,62 +1,60 @@
|
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
}
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.3.13/schema.json",
|
|
3
|
+
"vcs": {
|
|
4
|
+
"clientKind": "git",
|
|
5
|
+
"enabled": true,
|
|
6
|
+
"useIgnoreFile": true
|
|
7
|
+
},
|
|
8
|
+
"files": {
|
|
9
|
+
"ignoreUnknown": false,
|
|
10
|
+
"includes": [
|
|
11
|
+
"**",
|
|
12
|
+
"!**/node_modules/**",
|
|
13
|
+
"!**/.turbo",
|
|
14
|
+
"!**/components.d.ts",
|
|
15
|
+
"!**/coverage",
|
|
16
|
+
"!**/dist",
|
|
17
|
+
"!**/build",
|
|
18
|
+
"!**/node_modules",
|
|
19
|
+
"!**/pnpm-lock.yaml",
|
|
20
|
+
"!**/package-lock.json",
|
|
21
|
+
"!**/yarn.lock",
|
|
22
|
+
"!**/CHANGELOG.md"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"formatter": {
|
|
26
|
+
"enabled": true,
|
|
27
|
+
"formatWithErrors": false,
|
|
28
|
+
"indentStyle": "tab",
|
|
29
|
+
"indentWidth": 2,
|
|
30
|
+
"lineEnding": "lf",
|
|
31
|
+
"lineWidth": 100,
|
|
32
|
+
"attributePosition": "auto"
|
|
33
|
+
},
|
|
34
|
+
"assist": { "actions": { "source": { "organizeImports": "off" } } },
|
|
35
|
+
"linter": {
|
|
36
|
+
"enabled": false
|
|
37
|
+
},
|
|
38
|
+
"javascript": {
|
|
39
|
+
"parser": {
|
|
40
|
+
"unsafeParameterDecoratorsEnabled": true
|
|
41
|
+
},
|
|
42
|
+
"formatter": {
|
|
43
|
+
"jsxQuoteStyle": "double",
|
|
44
|
+
"quoteProperties": "preserve",
|
|
45
|
+
"trailingCommas": "es5",
|
|
46
|
+
"semicolons": "always",
|
|
47
|
+
"arrowParentheses": "asNeeded",
|
|
48
|
+
"bracketSpacing": true,
|
|
49
|
+
"bracketSameLine": false,
|
|
50
|
+
"quoteStyle": "double",
|
|
51
|
+
"attributePosition": "auto"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"json": {
|
|
55
|
+
"parser": {
|
|
56
|
+
"allowComments": true,
|
|
57
|
+
"allowTrailingCommas": false
|
|
58
|
+
}
|
|
59
|
+
}
|
|
62
60
|
}
|
|
@@ -4,31 +4,18 @@
|
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
|
-
"./base":
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
"./frontend": {
|
|
13
|
-
"types": "./src/configs/frontend.ts",
|
|
14
|
-
"import": "./dist/configs/frontend.mjs",
|
|
15
|
-
"require": "./dist/configs/frontend.mjs"
|
|
16
|
-
},
|
|
17
|
-
"./node": {
|
|
18
|
-
"types": "./src/configs/node.ts",
|
|
19
|
-
"import": "./dist/configs/node.mjs",
|
|
20
|
-
"require": "./dist/configs/node.mjs"
|
|
21
|
-
}
|
|
7
|
+
"./base": "./src/configs/base.ts",
|
|
8
|
+
"./frontend": "./src/configs/frontend.ts",
|
|
9
|
+
"./node": "./src/configs/node.ts",
|
|
10
|
+
"./extend": "./src/configs/extend.ts"
|
|
22
11
|
},
|
|
23
12
|
"scripts": {
|
|
24
|
-
"config:build": "tsdown",
|
|
25
13
|
"clean": "rimraf dist .turbo",
|
|
26
14
|
"deep:clean": "rimraf node_modules dist .turbo",
|
|
27
15
|
"typecheck": "tsc --noEmit",
|
|
28
16
|
"format": "biome format --write .",
|
|
29
17
|
"format:check": "biome ci .",
|
|
30
|
-
"test": "vitest run"
|
|
31
|
-
"test:dev": "vitest"
|
|
18
|
+
"test": "vitest run"
|
|
32
19
|
},
|
|
33
20
|
"dependencies": {
|
|
34
21
|
"@eslint/compat": "^2.0.2",
|
|
@@ -53,8 +40,18 @@
|
|
|
53
40
|
"@typescript-eslint/rule-tester": "^8.54.0",
|
|
54
41
|
"@typescript-eslint/utils": "^8.0.0",
|
|
55
42
|
"eslint": "catalog:",
|
|
56
|
-
"tsdown-config": "workspace:*",
|
|
57
43
|
"typescript-config": "workspace:*",
|
|
58
44
|
"vitest-config": "workspace:*"
|
|
45
|
+
},
|
|
46
|
+
"startx": {
|
|
47
|
+
"tags": [
|
|
48
|
+
"eslint"
|
|
49
|
+
],
|
|
50
|
+
"requiredDevDeps": [
|
|
51
|
+
"typescript-config"
|
|
52
|
+
],
|
|
53
|
+
"ignore": [
|
|
54
|
+
"eslint-config"
|
|
55
|
+
]
|
|
59
56
|
}
|
|
60
57
|
}
|