diff --git a/.gitea/workflows/pipeline.yml b/.gitea/workflows/pipeline.yml index 1256fce..30250a2 100644 --- a/.gitea/workflows/pipeline.yml +++ b/.gitea/workflows/pipeline.yml @@ -2,13 +2,8 @@ name: Monorepo Pipeline on: push: - branches: - - main tags: - 'v*' - pull_request: - branches: - - main concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/packages/next-utils/src/index.test.ts b/packages/next-utils/src/index.test.ts index 152299d..d4bd543 100644 --- a/packages/next-utils/src/index.test.ts +++ b/packages/next-utils/src/index.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from "vitest"; -import { isValidLang } from "../src/index"; +import { isValidLang } from "./lang"; describe("next-utils", () => { it("should validate languages correctly", () => { diff --git a/packages/next-utils/src/index.ts b/packages/next-utils/src/index.ts index c35147d..744b5eb 100644 --- a/packages/next-utils/src/index.ts +++ b/packages/next-utils/src/index.ts @@ -30,12 +30,7 @@ export async function rateLimit( submissions[identifier] = now; } -export const languages = ["en", "de"] as const; -export type Lang = (typeof languages)[number]; - -export function isValidLang(lang: string): lang is Lang { - return (languages as readonly string[]).includes(lang); -} +export * from "./lang"; export * from "./i18n"; export * from "./env"; diff --git a/packages/next-utils/src/lang.ts b/packages/next-utils/src/lang.ts new file mode 100644 index 0000000..22b468f --- /dev/null +++ b/packages/next-utils/src/lang.ts @@ -0,0 +1,6 @@ +export const languages = ["en", "de"] as const; +export type Lang = (typeof languages)[number]; + +export function isValidLang(lang: string): lang is Lang { + return (languages as readonly string[]).includes(lang); +}