Remove unnecessary description and whitespace from nexumi.mdc file

This commit is contained in:
smueller
2026-07-22 11:07:38 +02:00
parent 226379eac5
commit c2271485a5
21 changed files with 415 additions and 2 deletions

View File

@@ -0,0 +1,16 @@
{
"name": "@nexumi/shared",
"version": "0.1.0",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc -p tsconfig.json",
"lint": "eslint src --ext .ts",
"test": "vitest run",
"typecheck": "tsc --noEmit -p tsconfig.json"
},
"dependencies": {
"zod": "^3.24.1"
}
}

View File

@@ -0,0 +1,50 @@
import { z } from 'zod';
export const LocaleSchema = z.enum(['de', 'en']);
export type Locale = z.infer<typeof LocaleSchema>;
export const GuildSettingsSchema = z.object({
guildId: z.string(),
locale: LocaleSchema.default('de'),
moderationEnabled: z.boolean().default(true)
});
export const ModerationActionSchema = z.enum([
'BAN',
'UNBAN',
'KICK',
'TIMEOUT',
'UN_TIMEOUT',
'WARN_ADD',
'WARN_REMOVE',
'WARN_CLEAR',
'PURGE',
'LOCK',
'UNLOCK',
'SLOWMODE',
'NICK_SET',
'NICK_RESET',
'CASE_EDIT',
'CASE_DELETE',
'MODNOTE_ADD'
]);
export type ModerationAction = z.infer<typeof ModerationActionSchema>;
type Dictionary = Record<string, string>;
const de: Dictionary = {
'generic.noPermission': 'Du hast keine Berechtigung für diese Aktion.',
'moderation.success': 'Aktion erfolgreich ausgeführt.',
'moderation.reason.none': 'Kein Grund angegeben'
};
const en: Dictionary = {
'generic.noPermission': 'You do not have permission for this action.',
'moderation.success': 'Action executed successfully.',
'moderation.reason.none': 'No reason provided'
};
const locales: Record<Locale, Dictionary> = { de, en };
export function t(locale: Locale, key: string): string {
return locales[locale][key] ?? key;
}

View File

@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
},
"include": ["src"]
}